@livetiles/reach-components-react 0.4.0-preview.293 → 0.4.0-preview.294
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/SearchFilter.d.ts +2 -0
- package/index.d.ts +3 -1
- package/index.esm.js +1 -1
- package/index.esm2.js +443 -542
- package/index.umd.js +443 -541
- package/package.json +1 -1
package/index.esm2.js
CHANGED
|
@@ -7956,7 +7956,7 @@ var Stringify = stringify$4;
|
|
|
7956
7956
|
var Parse = parse$5;
|
|
7957
7957
|
|
|
7958
7958
|
|
|
7959
|
-
var lib$
|
|
7959
|
+
var lib$4 = {
|
|
7960
7960
|
stringify: Stringify,
|
|
7961
7961
|
parse: Parse
|
|
7962
7962
|
};
|
|
@@ -7969,7 +7969,7 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
7969
7969
|
|
|
7970
7970
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
7971
7971
|
|
|
7972
|
-
var _qs = lib$
|
|
7972
|
+
var _qs = lib$4;
|
|
7973
7973
|
|
|
7974
7974
|
var _qs2 = _interopRequireDefault(_qs);
|
|
7975
7975
|
|
|
@@ -8597,7 +8597,7 @@ function createVersionParts(count) {
|
|
|
8597
8597
|
return output;
|
|
8598
8598
|
}
|
|
8599
8599
|
|
|
8600
|
-
var lib$
|
|
8600
|
+
var lib$3 = {exports: {}};
|
|
8601
8601
|
|
|
8602
8602
|
/**
|
|
8603
8603
|
* The code was extracted from:
|
|
@@ -8681,7 +8681,7 @@ function InvalidTokenError(message) {
|
|
|
8681
8681
|
InvalidTokenError.prototype = new Error();
|
|
8682
8682
|
InvalidTokenError.prototype.name = 'InvalidTokenError';
|
|
8683
8683
|
|
|
8684
|
-
lib$
|
|
8684
|
+
lib$3.exports = function (token,options) {
|
|
8685
8685
|
if (typeof token !== 'string') {
|
|
8686
8686
|
throw new InvalidTokenError('Invalid token specified');
|
|
8687
8687
|
}
|
|
@@ -8695,9 +8695,9 @@ lib$4.exports = function (token,options) {
|
|
|
8695
8695
|
}
|
|
8696
8696
|
};
|
|
8697
8697
|
|
|
8698
|
-
lib$
|
|
8698
|
+
lib$3.exports.InvalidTokenError = InvalidTokenError;
|
|
8699
8699
|
|
|
8700
|
-
var jwtDecode = lib$
|
|
8700
|
+
var jwtDecode = lib$3.exports;
|
|
8701
8701
|
|
|
8702
8702
|
var moment$1 = {exports: {}};
|
|
8703
8703
|
|
|
@@ -65307,7 +65307,7 @@ var __importDefault$m = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
65307
65307
|
};
|
|
65308
65308
|
Object.defineProperty(avatar, "__esModule", { value: true });
|
|
65309
65309
|
var styled_1$b = __importDefault$m(require$$0$4);
|
|
65310
|
-
var react_1$
|
|
65310
|
+
var react_1$u = __importStar$d(React__default);
|
|
65311
65311
|
var getSmallAvatar = function (avatar) {
|
|
65312
65312
|
var _a, _b;
|
|
65313
65313
|
if (!avatar)
|
|
@@ -65318,11 +65318,11 @@ var getSmallAvatar = function (avatar) {
|
|
|
65318
65318
|
var Img = styled_1$b.default.img(templateObject_1$2I || (templateObject_1$2I = __makeTemplateObject$j(["\n object-fit: cover;\n width: 32px;\n height: 32px;\n margin-right: 8px;\n"], ["\n object-fit: cover;\n width: 32px;\n height: 32px;\n margin-right: 8px;\n"])));
|
|
65319
65319
|
var Avatar$5 = function (_a) {
|
|
65320
65320
|
var user = _a.user, _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
65321
|
-
var defaultAvatarId = react_1$
|
|
65321
|
+
var defaultAvatarId = react_1$u.useRef(Math.floor(Math.random() * 5) + 1);
|
|
65322
65322
|
var url = user.avatar_url
|
|
65323
65323
|
? getSmallAvatar(user.avatar_url)
|
|
65324
65324
|
: "https://media.giphy.com/avatars/default" + defaultAvatarId.current + ".gif";
|
|
65325
|
-
return react_1$
|
|
65325
|
+
return react_1$u.default.createElement(Img, { src: url, className: className });
|
|
65326
65326
|
};
|
|
65327
65327
|
avatar.default = Avatar$5;
|
|
65328
65328
|
var templateObject_1$2I;
|
|
@@ -65633,17 +65633,17 @@ var __importDefault$l = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
65633
65633
|
};
|
|
65634
65634
|
Object.defineProperty(verifiedBadge, "__esModule", { value: true });
|
|
65635
65635
|
var js_brand_1$6 = dist$2;
|
|
65636
|
-
var react_1$
|
|
65636
|
+
var react_1$t = __importDefault$l(React__default);
|
|
65637
65637
|
var VerifiedBadge = function (_a) {
|
|
65638
65638
|
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.size, size = _c === void 0 ? 17 : _c, _d = _a.fill, fill = _d === void 0 ? '#15CDFF' : _d;
|
|
65639
|
-
return (react_1$
|
|
65640
|
-
react_1$
|
|
65641
|
-
react_1$
|
|
65642
|
-
react_1$
|
|
65643
|
-
react_1$
|
|
65644
|
-
react_1$
|
|
65645
|
-
react_1$
|
|
65646
|
-
react_1$
|
|
65639
|
+
return (react_1$t.default.createElement("svg", { className: [VerifiedBadge.className, className].join(' '), height: size, width: "19px", viewBox: "0 0 19 17" },
|
|
65640
|
+
react_1$t.default.createElement("path", { className: VerifiedBadge.checkMarkClassName, d: "M9.32727273,9.44126709 L9.32727273,3.03016561 L6.55027155,3.03016561 L6.55027155,10.8150746 L6.55027155,12.188882 L12.1042739,12.188882 L12.1042739,9.44126709 L9.32727273,9.44126709 Z", fill: js_brand_1$6.giphyBlack, transform: "translate(9.327273, 7.609524) scale(-1, 1) rotate(-45.000000) translate(-9.327273, -7.609524) " }),
|
|
65641
|
+
react_1$t.default.createElement("g", { transform: "translate(-532.000000, -466.000000)", fill: fill },
|
|
65642
|
+
react_1$t.default.createElement("g", { transform: "translate(141.000000, 235.000000)" },
|
|
65643
|
+
react_1$t.default.createElement("g", { transform: "translate(264.000000, 0.000000)" },
|
|
65644
|
+
react_1$t.default.createElement("g", { transform: "translate(10.000000, 224.000000)" },
|
|
65645
|
+
react_1$t.default.createElement("g", { transform: "translate(114.000000, 2.500000)" },
|
|
65646
|
+
react_1$t.default.createElement("path", { d: "M15.112432,4.80769231 L16.8814194,6.87556817 L19.4157673,7.90116318 L19.6184416,10.6028916 L21.0594951,12.9065042 L19.6184416,15.2101168 L19.4157673,17.9118452 L16.8814194,18.9374402 L15.112432,21.0053161 L12.4528245,20.3611511 L9.79321699,21.0053161 L8.02422954,18.9374402 L5.48988167,17.9118452 L5.28720734,15.2101168 L3.84615385,12.9065042 L5.28720734,10.6028916 L5.48988167,7.90116318 L8.02422954,6.87556817 L9.79321699,4.80769231 L12.4528245,5.4518573 L15.112432,4.80769231 Z M17.8163503,10.8991009 L15.9282384,9.01098901 L11.5681538,13.3696923 L9.68115218,11.4818515 L7.81302031,13.3499833 L9.7011322,15.2380952 L11.5892441,17.1262071 L17.8163503,10.8991009 Z" }))))))));
|
|
65647
65647
|
};
|
|
65648
65648
|
VerifiedBadge.className = 'giphy-verified-badge';
|
|
65649
65649
|
VerifiedBadge.checkMarkClassName = 'giphy-verified-checkmark';
|
|
@@ -65686,7 +65686,7 @@ var __importDefault$k = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
65686
65686
|
};
|
|
65687
65687
|
Object.defineProperty(attribution$1, "__esModule", { value: true });
|
|
65688
65688
|
var styled_1$a = __importDefault$k(require$$0$4);
|
|
65689
|
-
var react_1$
|
|
65689
|
+
var react_1$s = __importDefault$k(React__default);
|
|
65690
65690
|
var avatar_1$3 = __importDefault$k(avatar);
|
|
65691
65691
|
var user_1$1 = __importDefault$k(user);
|
|
65692
65692
|
var Container$b = styled_1$a.default.div(templateObject_1$2G || (templateObject_1$2G = __makeTemplateObject$h(["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n"], ["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n"])));
|
|
@@ -65697,7 +65697,7 @@ var Attribution$2 = function (_a) {
|
|
|
65697
65697
|
if (!(user === null || user === void 0 ? void 0 : user.username) && !(user === null || user === void 0 ? void 0 : user.display_name)) {
|
|
65698
65698
|
return null;
|
|
65699
65699
|
}
|
|
65700
|
-
return (react_1$
|
|
65700
|
+
return (react_1$s.default.createElement(Container$b, { className: [Attribution$2.className, className].join(' '), onClick: function (e) {
|
|
65701
65701
|
e.preventDefault();
|
|
65702
65702
|
e.stopPropagation();
|
|
65703
65703
|
if (onClick) {
|
|
@@ -65709,8 +65709,8 @@ var Attribution$2 = function (_a) {
|
|
|
65709
65709
|
window.open(url, '_blank');
|
|
65710
65710
|
}
|
|
65711
65711
|
} },
|
|
65712
|
-
react_1$
|
|
65713
|
-
react_1$
|
|
65712
|
+
react_1$s.default.createElement(Avatar$4, { user: user }),
|
|
65713
|
+
react_1$s.default.createElement(user_1$1.default, { user: gif.user })));
|
|
65714
65714
|
};
|
|
65715
65715
|
Attribution$2.className = 'giphy-attribution';
|
|
65716
65716
|
attribution$1.default = Attribution$2;
|
|
@@ -65746,21 +65746,21 @@ var __importDefault$j = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
65746
65746
|
};
|
|
65747
65747
|
Object.defineProperty(overlay, "__esModule", { value: true });
|
|
65748
65748
|
var styled_1$9 = __importDefault$j(require$$0$4);
|
|
65749
|
-
var react_1$
|
|
65749
|
+
var react_1$r = __importStar$c(React__default);
|
|
65750
65750
|
var _1$1 = __importDefault$j(attribution$1);
|
|
65751
65751
|
var Background = styled_1$9.default.div(templateObject_1$2F || (templateObject_1$2F = __makeTemplateObject$g(["\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(18, 18, 18, 0.6));\n cursor: default;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 75px;\n pointer-events: none;\n"], ["\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(18, 18, 18, 0.6));\n cursor: default;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 75px;\n pointer-events: none;\n"])));
|
|
65752
65752
|
var Attribution$1 = styled_1$9.default(_1$1.default)(templateObject_2$1N || (templateObject_2$1N = __makeTemplateObject$g(["\n position: absolute;\n bottom: 10px;\n left: 10px;\n right: 10px;\n"], ["\n position: absolute;\n bottom: 10px;\n left: 10px;\n right: 10px;\n"])));
|
|
65753
65753
|
var Container$a = styled_1$9.default.div(templateObject_3$1e || (templateObject_3$1e = __makeTemplateObject$g(["\n transition: opacity 150ms ease-in;\n"], ["\n transition: opacity 150ms ease-in;\n"])));
|
|
65754
65754
|
var AttributionOverlay = function (_a) {
|
|
65755
65755
|
var gif = _a.gif, isHovered = _a.isHovered, onClick = _a.onClick;
|
|
65756
|
-
var hasHovered = react_1$
|
|
65756
|
+
var hasHovered = react_1$r.useRef(isHovered);
|
|
65757
65757
|
if (isHovered) {
|
|
65758
65758
|
// not rendering to avoid loading the avatar until hover
|
|
65759
65759
|
hasHovered.current = true;
|
|
65760
65760
|
}
|
|
65761
|
-
return gif.user && hasHovered.current ? (react_1$
|
|
65762
|
-
react_1$
|
|
65763
|
-
react_1$
|
|
65761
|
+
return gif.user && hasHovered.current ? (react_1$r.default.createElement(Container$a, { style: { opacity: isHovered ? 1 : 0 } },
|
|
65762
|
+
react_1$r.default.createElement(Background, null),
|
|
65763
|
+
react_1$r.default.createElement(Attribution$1, { gif: gif, onClick: onClick }))) : null;
|
|
65764
65764
|
};
|
|
65765
65765
|
overlay.default = AttributionOverlay;
|
|
65766
65766
|
var templateObject_1$2F, templateObject_2$1N, templateObject_3$1e;
|
|
@@ -67715,7 +67715,7 @@ var stringify = stringify_1;
|
|
|
67715
67715
|
var parse = parse$1;
|
|
67716
67716
|
var formats = formats$3;
|
|
67717
67717
|
|
|
67718
|
-
var lib$
|
|
67718
|
+
var lib$2 = {
|
|
67719
67719
|
formats: formats,
|
|
67720
67720
|
parse: parse,
|
|
67721
67721
|
stringify: stringify
|
|
@@ -67983,7 +67983,7 @@ Object.defineProperty(api, "__esModule", { value: true });
|
|
|
67983
67983
|
api.GiphyFetch = void 0;
|
|
67984
67984
|
/* eslint-disable no-dupe-class-members */
|
|
67985
67985
|
var js_util_1$8 = dist$3;
|
|
67986
|
-
var qs_1 = __importDefault$i(lib$
|
|
67986
|
+
var qs_1 = __importDefault$i(lib$2);
|
|
67987
67987
|
var gif_1$2 = gif$1;
|
|
67988
67988
|
var request_1 = __importDefault$i(request);
|
|
67989
67989
|
var getType = function (options) { return (options && options.type ? options.type : 'gifs'); };
|
|
@@ -68482,11 +68482,11 @@ var __importStar$b = (commonjsGlobal$7 && commonjsGlobal$7.__importStar) || func
|
|
|
68482
68482
|
return result;
|
|
68483
68483
|
};
|
|
68484
68484
|
Object.defineProperty(observer, "__esModule", { value: true });
|
|
68485
|
-
var react_1$
|
|
68485
|
+
var react_1$q = __importStar$b(React__default);
|
|
68486
68486
|
var Observer$1 = function (_a) {
|
|
68487
68487
|
var children = _a.children, className = _a.className, onVisibleChange = _a.onVisibleChange, config = _a.config;
|
|
68488
|
-
var container = react_1$
|
|
68489
|
-
react_1$
|
|
68488
|
+
var container = react_1$q.useRef(null);
|
|
68489
|
+
react_1$q.useEffect(function () {
|
|
68490
68490
|
var io;
|
|
68491
68491
|
if (container.current) {
|
|
68492
68492
|
io = new IntersectionObserver(function (_a) {
|
|
@@ -68498,7 +68498,7 @@ var Observer$1 = function (_a) {
|
|
|
68498
68498
|
}
|
|
68499
68499
|
return function () { return io === null || io === void 0 ? void 0 : io.disconnect(); };
|
|
68500
68500
|
}, [onVisibleChange, container, config]);
|
|
68501
|
-
return (react_1$
|
|
68501
|
+
return (react_1$q.default.createElement("div", { ref: container, className: className }, children));
|
|
68502
68502
|
};
|
|
68503
68503
|
observer.default = Observer$1;
|
|
68504
68504
|
|
|
@@ -69024,7 +69024,7 @@ Object.defineProperty(carousel, "__esModule", { value: true });
|
|
|
69024
69024
|
var styled_1$8 = __importDefault$f(require$$0$4);
|
|
69025
69025
|
var js_fetch_api_1$1 = dist$1;
|
|
69026
69026
|
var js_util_1$3 = dist$3;
|
|
69027
|
-
var react_1$
|
|
69027
|
+
var react_1$p = __importStar$a(React__default);
|
|
69028
69028
|
var throttle_debounce_1$1 = cjs;
|
|
69029
69029
|
var observer_1$1 = __importDefault$f(observer);
|
|
69030
69030
|
var gif_1$1 = __importDefault$f(gif);
|
|
@@ -69105,20 +69105,20 @@ var Carousel$1 = /** @class */ (function (_super) {
|
|
|
69105
69105
|
var _d = this.state, gifs = _d.gifs, isDoneFetching = _d.isDoneFetching;
|
|
69106
69106
|
var showLoader = !isDoneFetching;
|
|
69107
69107
|
var isFirstLoad = gifs.length === 0;
|
|
69108
|
-
return (react_1$
|
|
69109
|
-
react_1$
|
|
69108
|
+
return (react_1$p.default.createElement(pingback_context_manager_1$1.default, { attributes: { layout_type: 'CAROUSEL' } },
|
|
69109
|
+
react_1$p.default.createElement(Container$9, { className: className },
|
|
69110
69110
|
gifs.map(function (gif) {
|
|
69111
69111
|
var gifWidth = js_util_1$3.getGifWidth(gif, gifHeight);
|
|
69112
|
-
return (react_1$
|
|
69112
|
+
return (react_1$p.default.createElement(Gif, { gif: gif, key: gif.id, tabIndex: tabIndex, width: gifWidth, onGifClick: onGifClick, onGifSeen: onGifSeen, onGifVisible: onGifVisible, onGifRightClick: onGifRightClick, user: user, ml: gutter, overlay: overlay, hideAttribution: hideAttribution, noLink: noLink, borderRadius: borderRadius, backgroundColor: backgroundColor }));
|
|
69113
69113
|
}),
|
|
69114
69114
|
!showLoader && gifs.length === 0 && noResultsMessage,
|
|
69115
|
-
showLoader && (react_1$
|
|
69116
|
-
react_1$
|
|
69115
|
+
showLoader && (react_1$p.default.createElement(Observer, { onVisibleChange: this.onLoaderVisible, config: loaderConfig },
|
|
69116
|
+
react_1$p.default.createElement(Loader$2, { isFirstLoad: isFirstLoad, height: gifHeight }))))));
|
|
69117
69117
|
};
|
|
69118
69118
|
Carousel.className = 'giphy-carousel';
|
|
69119
69119
|
Carousel.defaultProps = defaultProps$1;
|
|
69120
69120
|
return Carousel;
|
|
69121
|
-
}(react_1$
|
|
69121
|
+
}(react_1$p.PureComponent));
|
|
69122
69122
|
carousel.default = Carousel$1;
|
|
69123
69123
|
var templateObject_1$2E, templateObject_2$1M, templateObject_3$1d, templateObject_4$Q;
|
|
69124
69124
|
|
|
@@ -69136,13 +69136,13 @@ var __importDefault$e = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
69136
69136
|
Object.defineProperty(fetchError, "__esModule", { value: true });
|
|
69137
69137
|
var styled_1$7 = __importDefault$e(require$$0$4);
|
|
69138
69138
|
var js_brand_1$5 = dist$2;
|
|
69139
|
-
var react_1$
|
|
69139
|
+
var react_1$o = __importDefault$e(React__default);
|
|
69140
69140
|
var Message$1 = styled_1$7.default.div(templateObject_1$2D || (templateObject_1$2D = __makeTemplateObject$e(["\n color: ", ";\n display: flex;\n justify-content: center;\n margin: 30px 0;\n font-family: ", ";\n font-size: 16px;\n font-weight: 600;\n a {\n color: ", ";\n cursor: pointer;\n &:hover {\n color: white;\n }\n }\n"], ["\n color: ", ";\n display: flex;\n justify-content: center;\n margin: 30px 0;\n font-family: ", ";\n font-size: 16px;\n font-weight: 600;\n a {\n color: ", ";\n cursor: pointer;\n &:hover {\n color: white;\n }\n }\n"])), js_brand_1$5.giphyLightGrey, js_brand_1$5.fontFamily.body, js_brand_1$5.giphyBlue);
|
|
69141
69141
|
var FetchError = function (_a) {
|
|
69142
69142
|
var onClick = _a.onClick;
|
|
69143
|
-
return (react_1$
|
|
69143
|
+
return (react_1$o.default.createElement(Message$1, null,
|
|
69144
69144
|
"Error loading GIFs.\u00A0",
|
|
69145
|
-
react_1$
|
|
69145
|
+
react_1$o.default.createElement("a", { onClick: onClick }, "Try again?")));
|
|
69146
69146
|
};
|
|
69147
69147
|
fetchError.default = FetchError;
|
|
69148
69148
|
var templateObject_1$2D;
|
|
@@ -69160,19 +69160,19 @@ Object.defineProperty(loader, "__esModule", { value: true });
|
|
|
69160
69160
|
var core_1$4 = require$$0$1;
|
|
69161
69161
|
var styled_1$6 = __importDefault$d(require$$0$4);
|
|
69162
69162
|
var js_brand_1$4 = dist$2;
|
|
69163
|
-
var react_1$
|
|
69163
|
+
var react_1$n = __importDefault$d(React__default);
|
|
69164
69164
|
var bouncer = core_1$4.keyframes(templateObject_1$2C || (templateObject_1$2C = __makeTemplateObject$d(["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"], ["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"])));
|
|
69165
69165
|
var loaderHeight = 37;
|
|
69166
69166
|
var Loader$1 = styled_1$6.default.div(templateObject_2$1L || (templateObject_2$1L = __makeTemplateObject$d(["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n"], ["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n"])), loaderHeight);
|
|
69167
69167
|
var Dot = styled_1$6.default.div(templateObject_3$1c || (templateObject_3$1c = __makeTemplateObject$d(["\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n background: ", ";\n animation-delay: ", ";\n"], ["\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n background: ", ";\n animation-delay: ", ";\n"])), loaderHeight, bouncer, function (props) { return props.color; }, function (props) { return props.delay; });
|
|
69168
69168
|
loader.default = (function (_a) {
|
|
69169
69169
|
var _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
69170
|
-
return (react_1$
|
|
69171
|
-
react_1$
|
|
69172
|
-
react_1$
|
|
69173
|
-
react_1$
|
|
69174
|
-
react_1$
|
|
69175
|
-
react_1$
|
|
69170
|
+
return (react_1$n.default.createElement(Loader$1, { className: className },
|
|
69171
|
+
react_1$n.default.createElement(Dot, { color: js_brand_1$4.giphyGreen, delay: "0" }),
|
|
69172
|
+
react_1$n.default.createElement(Dot, { color: js_brand_1$4.giphyBlue, delay: ".1s" }),
|
|
69173
|
+
react_1$n.default.createElement(Dot, { color: js_brand_1$4.giphyPurple, delay: ".2s" }),
|
|
69174
|
+
react_1$n.default.createElement(Dot, { color: js_brand_1$4.giphyRed, delay: ".3s" }),
|
|
69175
|
+
react_1$n.default.createElement(Dot, { color: js_brand_1$4.giphyYellow, delay: ".4s" })));
|
|
69176
69176
|
});
|
|
69177
69177
|
var templateObject_1$2C, templateObject_2$1L, templateObject_3$1c;
|
|
69178
69178
|
|
|
@@ -69198,7 +69198,7 @@ var __importStar$9 = (commonjsGlobal$7 && commonjsGlobal$7.__importStar) || func
|
|
|
69198
69198
|
return result;
|
|
69199
69199
|
};
|
|
69200
69200
|
Object.defineProperty(masonryGrid, "__esModule", { value: true });
|
|
69201
|
-
var react_1$
|
|
69201
|
+
var react_1$m = __importStar$9(React__default);
|
|
69202
69202
|
function fillArray(length, columnOffsets) {
|
|
69203
69203
|
if (columnOffsets === void 0) { columnOffsets = []; }
|
|
69204
69204
|
return Array.apply(null, Array(length)).map(function (_, index) { return columnOffsets[index] || 0; });
|
|
@@ -69209,7 +69209,7 @@ var MasonryGrid = function (_a) {
|
|
|
69209
69209
|
function getChildren() {
|
|
69210
69210
|
var columnTarget;
|
|
69211
69211
|
var columnHeights = fillArray(columns, columnOffsets);
|
|
69212
|
-
var result = react_1$
|
|
69212
|
+
var result = react_1$m.default.Children.map(children, function (child, index) {
|
|
69213
69213
|
var style = {
|
|
69214
69214
|
position: 'absolute',
|
|
69215
69215
|
};
|
|
@@ -69228,16 +69228,16 @@ var MasonryGrid = function (_a) {
|
|
|
69228
69228
|
if (height) {
|
|
69229
69229
|
columnHeights[columnTarget] += height + gutter;
|
|
69230
69230
|
}
|
|
69231
|
-
return react_1$
|
|
69231
|
+
return react_1$m.default.cloneElement(child, { style: style });
|
|
69232
69232
|
});
|
|
69233
69233
|
containerStyle.position = 'relative';
|
|
69234
69234
|
containerStyle.width = columns * itemWidth + (columns - 1) * gutter + "px";
|
|
69235
69235
|
containerStyle.height = Math.max.apply(Math, columnHeights) - gutter + "px";
|
|
69236
69236
|
return result;
|
|
69237
69237
|
}
|
|
69238
|
-
return react_1$
|
|
69238
|
+
return react_1$m.default.createElement("div", { style: containerStyle }, getChildren());
|
|
69239
69239
|
};
|
|
69240
|
-
masonryGrid.default = react_1$
|
|
69240
|
+
masonryGrid.default = react_1$m.memo(MasonryGrid);
|
|
69241
69241
|
|
|
69242
69242
|
var __makeTemplateObject$c = (commonjsGlobal$7 && commonjsGlobal$7.__makeTemplateObject) || function (cooked, raw) {
|
|
69243
69243
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
@@ -69331,7 +69331,7 @@ Object.defineProperty(grid, "__esModule", { value: true });
|
|
|
69331
69331
|
var styled_1$5 = __importDefault$c(require$$0$4);
|
|
69332
69332
|
var js_fetch_api_1 = dist$1;
|
|
69333
69333
|
var js_util_1$2 = dist$3;
|
|
69334
|
-
var react_1$
|
|
69334
|
+
var react_1$l = __importStar$8(React__default);
|
|
69335
69335
|
var throttle_debounce_1 = cjs;
|
|
69336
69336
|
var observer_1 = __importDefault$c(observer);
|
|
69337
69337
|
var fetch_error_1 = __importDefault$c(fetchError);
|
|
@@ -69421,13 +69421,13 @@ var Grid$1 = /** @class */ (function (_super) {
|
|
|
69421
69421
|
var isFirstLoad = gifs.length === 0;
|
|
69422
69422
|
// get the height of each grid item
|
|
69423
69423
|
var itemHeights = gifs.map(function (gif) { return js_util_1$2.getGifHeight(gif, gifWidth); });
|
|
69424
|
-
return (react_1$
|
|
69425
|
-
react_1$
|
|
69426
|
-
react_1$
|
|
69424
|
+
return (react_1$l.default.createElement(pingback_context_manager_1.default, { attributes: { layout_type: layoutType } },
|
|
69425
|
+
react_1$l.default.createElement("div", { className: className, style: { width: width } },
|
|
69426
|
+
react_1$l.default.createElement(masonry_grid_1.default, { itemHeights: itemHeights, useTransform: useTransform, itemWidth: gifWidth, columns: columns, gutter: gutter, columnOffsets: columnOffsets }, gifs.map(function (gif) { return (react_1$l.default.createElement(gif_1.default, { gif: gif, tabIndex: tabIndex, key: gif.id, width: gifWidth, onGifClick: onGifClick, onGifSeen: onGifSeen, onGifVisible: onGifVisible, onGifRightClick: onGifRightClick, user: user, overlay: overlay, backgroundColor: backgroundColor, hideAttribution: hideAttribution, noLink: noLink, borderRadius: borderRadius })); })),
|
|
69427
69427
|
!showLoader && gifs.length === 0 && noResultsMessage,
|
|
69428
|
-
isError ? (react_1$
|
|
69429
|
-
react_1$
|
|
69430
|
-
react_1$
|
|
69428
|
+
isError ? (react_1$l.default.createElement(fetch_error_1.default, { onClick: this.onFetch })) : (showLoader && (react_1$l.default.createElement(observer_1.default, { onVisibleChange: this.onLoaderVisible, config: loaderConfig },
|
|
69429
|
+
react_1$l.default.createElement(Loader, { isFirstLoad: isFirstLoad },
|
|
69430
|
+
react_1$l.default.createElement(LoaderVisual, { className: Grid.loaderClassName }))))))));
|
|
69431
69431
|
};
|
|
69432
69432
|
Grid.className = 'giphy-grid';
|
|
69433
69433
|
Grid.loaderClassName = 'loader';
|
|
@@ -69443,27 +69443,27 @@ var Grid$1 = /** @class */ (function (_super) {
|
|
|
69443
69443
|
return null;
|
|
69444
69444
|
};
|
|
69445
69445
|
return Grid;
|
|
69446
|
-
}(react_1$
|
|
69446
|
+
}(react_1$l.PureComponent));
|
|
69447
69447
|
grid.default = Grid$1;
|
|
69448
69448
|
var templateObject_1$2B;
|
|
69449
69449
|
|
|
69450
69450
|
var searchBar = {};
|
|
69451
69451
|
|
|
69452
|
-
var useDebounce$
|
|
69452
|
+
var useDebounce$3 = {};
|
|
69453
69453
|
|
|
69454
69454
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(_tslib);
|
|
69455
69455
|
|
|
69456
69456
|
var useTimeoutFn$2 = {};
|
|
69457
69457
|
|
|
69458
69458
|
Object.defineProperty(useTimeoutFn$2, "__esModule", { value: true });
|
|
69459
|
-
var react_1$
|
|
69459
|
+
var react_1$k = React__default;
|
|
69460
69460
|
function useTimeoutFn$1(fn, ms) {
|
|
69461
69461
|
if (ms === void 0) { ms = 0; }
|
|
69462
|
-
var ready = react_1$
|
|
69463
|
-
var timeout = react_1$
|
|
69464
|
-
var callback = react_1$
|
|
69465
|
-
var isReady = react_1$
|
|
69466
|
-
var set = react_1$
|
|
69462
|
+
var ready = react_1$k.useRef(false);
|
|
69463
|
+
var timeout = react_1$k.useRef();
|
|
69464
|
+
var callback = react_1$k.useRef(fn);
|
|
69465
|
+
var isReady = react_1$k.useCallback(function () { return ready.current; }, []);
|
|
69466
|
+
var set = react_1$k.useCallback(function () {
|
|
69467
69467
|
ready.current = false;
|
|
69468
69468
|
timeout.current && clearTimeout(timeout.current);
|
|
69469
69469
|
timeout.current = setTimeout(function () {
|
|
@@ -69471,16 +69471,16 @@ function useTimeoutFn$1(fn, ms) {
|
|
|
69471
69471
|
callback.current();
|
|
69472
69472
|
}, ms);
|
|
69473
69473
|
}, [ms]);
|
|
69474
|
-
var clear = react_1$
|
|
69474
|
+
var clear = react_1$k.useCallback(function () {
|
|
69475
69475
|
ready.current = null;
|
|
69476
69476
|
timeout.current && clearTimeout(timeout.current);
|
|
69477
69477
|
}, []);
|
|
69478
69478
|
// update ref when function changes
|
|
69479
|
-
react_1$
|
|
69479
|
+
react_1$k.useEffect(function () {
|
|
69480
69480
|
callback.current = fn;
|
|
69481
69481
|
}, [fn]);
|
|
69482
69482
|
// set on mount, clear on unmount
|
|
69483
|
-
react_1$
|
|
69483
|
+
react_1$k.useEffect(function () {
|
|
69484
69484
|
set();
|
|
69485
69485
|
return clear;
|
|
69486
69486
|
}, [ms]);
|
|
@@ -69488,18 +69488,18 @@ function useTimeoutFn$1(fn, ms) {
|
|
|
69488
69488
|
}
|
|
69489
69489
|
useTimeoutFn$2.default = useTimeoutFn$1;
|
|
69490
69490
|
|
|
69491
|
-
Object.defineProperty(useDebounce$
|
|
69491
|
+
Object.defineProperty(useDebounce$3, "__esModule", { value: true });
|
|
69492
69492
|
var tslib_1$9 = require$$0;
|
|
69493
|
-
var react_1$
|
|
69493
|
+
var react_1$j = React__default;
|
|
69494
69494
|
var useTimeoutFn_1 = tslib_1$9.__importDefault(useTimeoutFn$2);
|
|
69495
|
-
function useDebounce$
|
|
69495
|
+
function useDebounce$2(fn, ms, deps) {
|
|
69496
69496
|
if (ms === void 0) { ms = 0; }
|
|
69497
69497
|
if (deps === void 0) { deps = []; }
|
|
69498
69498
|
var _a = useTimeoutFn_1.default(fn, ms), isReady = _a[0], cancel = _a[1], reset = _a[2];
|
|
69499
|
-
react_1$
|
|
69499
|
+
react_1$j.useEffect(reset, deps);
|
|
69500
69500
|
return [isReady, cancel];
|
|
69501
69501
|
}
|
|
69502
|
-
useDebounce$
|
|
69502
|
+
useDebounce$3.default = useDebounce$2;
|
|
69503
69503
|
|
|
69504
69504
|
var context = {};
|
|
69505
69505
|
|
|
@@ -69847,7 +69847,7 @@ var __importDefault$a = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
69847
69847
|
Object.defineProperty(searchBarChannel, "__esModule", { value: true });
|
|
69848
69848
|
var core_1$2 = require$$0$1;
|
|
69849
69849
|
var js_brand_1$3 = dist$2;
|
|
69850
|
-
var react_1$
|
|
69850
|
+
var react_1$i = __importStar$7(React__default);
|
|
69851
69851
|
var avatar_1$2 = __importDefault$a(avatar);
|
|
69852
69852
|
var verified_badge_1$1 = __importDefault$a(verifiedBadge);
|
|
69853
69853
|
var context_1$4 = context;
|
|
@@ -69861,14 +69861,14 @@ var Username = theme_1$4.default.div(templateObject_3$1a || (templateObject_3$1a
|
|
|
69861
69861
|
var UsernamePill = theme_1$4.default.div(templateObject_4$P || (templateObject_4$P = __makeTemplateObject$a(["\n background: ", ";\n display: flex;\n padding: 0 4px;\n color: ", ";\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n font-weight: 600;\n font-size: 12px;\n align-items: center;\n height: ", "px;\n @media (", ") {\n display: none;\n }\n"], ["\n background: ", ";\n display: flex;\n padding: 0 4px;\n color: ", ";\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n font-weight: 600;\n font-size: 12px;\n align-items: center;\n height: ", "px;\n @media (", ") {\n display: none;\n }\n"])), js_brand_1$3.giphyWhiteSmoke, js_brand_1$3.giphyDarkCharcoal, function (props) { return channelSearchHeight(props.theme); }, function (props) { return props.theme.condensedMediaQuery; });
|
|
69862
69862
|
var SearchBarChannel = function (_a) {
|
|
69863
69863
|
var _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
69864
|
-
var activeChannel = react_1$
|
|
69865
|
-
return activeChannel ? (react_1$
|
|
69866
|
-
react_1$
|
|
69867
|
-
react_1$
|
|
69868
|
-
react_1$
|
|
69864
|
+
var activeChannel = react_1$i.useContext(context_1$4.SearchContext).activeChannel;
|
|
69865
|
+
return activeChannel ? (react_1$i.default.createElement(Username, { className: className },
|
|
69866
|
+
react_1$i.default.createElement(Avatar$3, { user: activeChannel.user }),
|
|
69867
|
+
react_1$i.default.createElement(UsernamePill, { key: activeChannel.id },
|
|
69868
|
+
react_1$i.default.createElement("div", null,
|
|
69869
69869
|
"@",
|
|
69870
69870
|
activeChannel.user.username),
|
|
69871
|
-
activeChannel.user.is_verified && react_1$
|
|
69871
|
+
activeChannel.user.is_verified && react_1$i.default.createElement(verified_badge_1$1.default, { size: 14 })))) : null;
|
|
69872
69872
|
};
|
|
69873
69873
|
searchBarChannel.default = SearchBarChannel;
|
|
69874
69874
|
var templateObject_1$2z, templateObject_2$1J, templateObject_3$1a, templateObject_4$P;
|
|
@@ -69882,18 +69882,18 @@ var useUnmount$3 = {};
|
|
|
69882
69882
|
var useEffectOnce$3 = {};
|
|
69883
69883
|
|
|
69884
69884
|
Object.defineProperty(useEffectOnce$3, "__esModule", { value: true });
|
|
69885
|
-
var react_1$
|
|
69885
|
+
var react_1$h = React__default;
|
|
69886
69886
|
var useEffectOnce$2 = function (effect) {
|
|
69887
|
-
react_1$
|
|
69887
|
+
react_1$h.useEffect(effect, []);
|
|
69888
69888
|
};
|
|
69889
69889
|
useEffectOnce$3.default = useEffectOnce$2;
|
|
69890
69890
|
|
|
69891
69891
|
Object.defineProperty(useUnmount$3, "__esModule", { value: true });
|
|
69892
69892
|
var tslib_1$8 = require$$0;
|
|
69893
|
-
var react_1$
|
|
69893
|
+
var react_1$g = React__default;
|
|
69894
69894
|
var useEffectOnce_1 = tslib_1$8.__importDefault(useEffectOnce$3);
|
|
69895
69895
|
var useUnmount$2 = function (fn) {
|
|
69896
|
-
var fnRef = react_1$
|
|
69896
|
+
var fnRef = react_1$g.useRef(fn);
|
|
69897
69897
|
// update the ref each render so if it change the newest callback will be invoked
|
|
69898
69898
|
fnRef.current = fn;
|
|
69899
69899
|
useEffectOnce_1.default(function () { return function () { return fnRef.current(); }; });
|
|
@@ -69902,15 +69902,15 @@ useUnmount$3.default = useUnmount$2;
|
|
|
69902
69902
|
|
|
69903
69903
|
Object.defineProperty(useThrottle$3, "__esModule", { value: true });
|
|
69904
69904
|
var tslib_1$7 = require$$0;
|
|
69905
|
-
var react_1$
|
|
69905
|
+
var react_1$f = React__default;
|
|
69906
69906
|
var useUnmount_1 = tslib_1$7.__importDefault(useUnmount$3);
|
|
69907
69907
|
var useThrottle$2 = function (value, ms) {
|
|
69908
69908
|
if (ms === void 0) { ms = 200; }
|
|
69909
|
-
var _a = react_1$
|
|
69910
|
-
var timeout = react_1$
|
|
69911
|
-
var nextValue = react_1$
|
|
69912
|
-
var hasNextValue = react_1$
|
|
69913
|
-
react_1$
|
|
69909
|
+
var _a = react_1$f.useState(value), state = _a[0], setState = _a[1];
|
|
69910
|
+
var timeout = react_1$f.useRef();
|
|
69911
|
+
var nextValue = react_1$f.useRef(null);
|
|
69912
|
+
var hasNextValue = react_1$f.useRef(0);
|
|
69913
|
+
react_1$f.useEffect(function () {
|
|
69914
69914
|
if (!timeout.current) {
|
|
69915
69915
|
setState(value);
|
|
69916
69916
|
var timeoutCallback_1 = function () {
|
|
@@ -69943,20 +69943,20 @@ var __importDefault$9 = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
69943
69943
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
69944
69944
|
};
|
|
69945
69945
|
Object.defineProperty(searchIcon, "__esModule", { value: true });
|
|
69946
|
-
var react_1$
|
|
69946
|
+
var react_1$e = __importDefault$9(React__default);
|
|
69947
69947
|
var SearchIcon$1 = function (_a) {
|
|
69948
69948
|
var _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
69949
|
-
return (react_1$
|
|
69950
|
-
react_1$
|
|
69951
|
-
react_1$
|
|
69952
|
-
react_1$
|
|
69953
|
-
react_1$
|
|
69954
|
-
react_1$
|
|
69955
|
-
react_1$
|
|
69956
|
-
react_1$
|
|
69957
|
-
react_1$
|
|
69958
|
-
react_1$
|
|
69959
|
-
react_1$
|
|
69949
|
+
return (react_1$e.default.createElement("svg", { viewBox: "0 0 30 30", version: "1.1", className: className },
|
|
69950
|
+
react_1$e.default.createElement("defs", null,
|
|
69951
|
+
react_1$e.default.createElement("path", { d: "M11.5482521,20.4090671 L4.24727698,28.2009189 C3.68084207,28.8054377 2.73159653,28.8363108 2.12707771,28.2698759 C1.5225589,27.703441 1.4916858,26.7541954 2.0581207,26.1496766 L9.40599838,18.3077689 C7.95982241,16.4371424 7.0978836,14.0789715 7.0978836,11.5181818 C7.0978836,5.44914339 11.9392549,0.518181818 17.9252787,0.518181818 C23.9113026,0.518181818 28.7526738,5.44914339 28.7526738,11.5181818 C28.7526738,17.5872202 23.9113026,22.5181818 17.9252787,22.5181818 C15.539851,22.5181818 13.3361963,21.7351359 11.5482521,20.4090671 Z M17.9252787,19.5181818 C22.242011,19.5181818 25.7526738,15.9425536 25.7526738,11.5181818 C25.7526738,7.09381 22.242011,3.51818182 17.9252787,3.51818182 C13.6085464,3.51818182 10.0978836,7.09381 10.0978836,11.5181818 C10.0978836,15.9425536 13.6085464,19.5181818 17.9252787,19.5181818 Z", id: "giphy-search-icon-path-1" })),
|
|
69952
|
+
react_1$e.default.createElement("g", { id: "search", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd" },
|
|
69953
|
+
react_1$e.default.createElement("g", { id: "icons/search" },
|
|
69954
|
+
react_1$e.default.createElement("mask", { id: "giphy-search-icon-mask-2", fill: "white" },
|
|
69955
|
+
react_1$e.default.createElement("use", { xlinkHref: "#giphy-search-icon-path-1" })),
|
|
69956
|
+
react_1$e.default.createElement("use", { id: "Mask", fill: "#FFFFFF", fillRule: "nonzero", xlinkHref: "#giphy-search-icon-path-1" }),
|
|
69957
|
+
react_1$e.default.createElement("g", { mask: "url(#giphy-search-icon-mask-2)" },
|
|
69958
|
+
react_1$e.default.createElement("g", { transform: "translate(0.250000, 0.250000)" },
|
|
69959
|
+
react_1$e.default.createElement("g", null)))))));
|
|
69960
69960
|
};
|
|
69961
69961
|
searchIcon.default = SearchIcon$1;
|
|
69962
69962
|
|
|
@@ -69988,7 +69988,7 @@ var __importDefault$8 = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
69988
69988
|
};
|
|
69989
69989
|
Object.defineProperty(searchButton, "__esModule", { value: true });
|
|
69990
69990
|
var core_1$1 = require$$0$1;
|
|
69991
|
-
var react_1$
|
|
69991
|
+
var react_1$d = __importStar$6(React__default);
|
|
69992
69992
|
var useThrottle_1 = __importDefault$8(useThrottle$3);
|
|
69993
69993
|
var context_1$3 = context;
|
|
69994
69994
|
var search_icon_1 = __importDefault$8(searchIcon);
|
|
@@ -70006,14 +70006,14 @@ var Fx = theme_1$3.default.div(templateObject_6$v || (templateObject_6$v = __mak
|
|
|
70006
70006
|
var Scanner = theme_1$3.default.div(templateObject_7$n || (templateObject_7$n = __makeTemplateObject$9(["\n position: absolute;\n width: 200%;\n height: 20px;\n background: rgba(255, 255, 255, 0.5);\n transform: rotate(34deg) translate(-10px, -20px);\n animation: ", " 1s ", " 0s 1;\n filter: blur(1px);\n"], ["\n position: absolute;\n width: 200%;\n height: 20px;\n background: rgba(255, 255, 255, 0.5);\n transform: rotate(34deg) translate(-10px, -20px);\n animation: ", " 1s ", " 0s 1;\n filter: blur(1px);\n"])), searchFx, strongEasing);
|
|
70007
70007
|
var SearchIcon = theme_1$3.default(search_icon_1.default)(templateObject_8$l || (templateObject_8$l = __makeTemplateObject$9(["\n z-index: 1;\n display: flex;\n width: 60%;\n height: 60%;\n"], ["\n z-index: 1;\n display: flex;\n width: 60%;\n height: 60%;\n"])));
|
|
70008
70008
|
var SearchButton = function () {
|
|
70009
|
-
var isFetching = react_1$
|
|
70009
|
+
var isFetching = react_1$d.useContext(context_1$3.SearchContext).isFetching;
|
|
70010
70010
|
// let the animation run by throttling isFetching
|
|
70011
70011
|
var throttledFetch = useThrottle_1.default(isFetching, 1000);
|
|
70012
|
-
return (react_1$
|
|
70013
|
-
react_1$
|
|
70014
|
-
react_1$
|
|
70015
|
-
throttledFetch && (react_1$
|
|
70016
|
-
react_1$
|
|
70012
|
+
return (react_1$d.default.createElement(Container$8, null,
|
|
70013
|
+
react_1$d.default.createElement(GradientBox, null),
|
|
70014
|
+
react_1$d.default.createElement(SearchIcon, null),
|
|
70015
|
+
throttledFetch && (react_1$d.default.createElement(Fx, null,
|
|
70016
|
+
react_1$d.default.createElement(Scanner, null)))));
|
|
70017
70017
|
};
|
|
70018
70018
|
searchButton.default = SearchButton;
|
|
70019
70019
|
var templateObject_1$2y, templateObject_2$1I, templateObject_3$19, templateObject_4$O, templateObject_5$G, templateObject_6$v, templateObject_7$n, templateObject_8$l;
|
|
@@ -70047,15 +70047,15 @@ var __importDefault$7 = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
70047
70047
|
Object.defineProperty(searchBar, "__esModule", { value: true });
|
|
70048
70048
|
var core_1 = require$$0$1;
|
|
70049
70049
|
var js_brand_1$2 = dist$2;
|
|
70050
|
-
var react_1$
|
|
70051
|
-
var useDebounce_1
|
|
70050
|
+
var react_1$c = __importStar$5(React__default);
|
|
70051
|
+
var useDebounce_1 = __importDefault$7(useDebounce$3);
|
|
70052
70052
|
var context_1$2 = context;
|
|
70053
70053
|
var search_bar_channel_1 = __importDefault$7(searchBarChannel);
|
|
70054
70054
|
var search_button_1 = __importDefault$7(searchButton);
|
|
70055
70055
|
var theme_1$2 = __importStar$5(theme);
|
|
70056
70056
|
function usePrevious$1(value) {
|
|
70057
|
-
var ref = react_1$
|
|
70058
|
-
react_1$
|
|
70057
|
+
var ref = react_1$c.useRef(value);
|
|
70058
|
+
react_1$c.useEffect(function () {
|
|
70059
70059
|
ref.current = value;
|
|
70060
70060
|
});
|
|
70061
70061
|
return ref.current;
|
|
@@ -70067,24 +70067,24 @@ var Input = theme_1$2.default.input(templateObject_3$18 || (templateObject_3$18
|
|
|
70067
70067
|
});
|
|
70068
70068
|
var SearchBar = function (_a) {
|
|
70069
70069
|
var className = _a.className, _b = _a.placeholder, placeholder = _b === void 0 ? "Search GIPHY" : _b, _c = _a.clear, clear = _c === void 0 ? false : _c, autoFocus = _a.autoFocus;
|
|
70070
|
-
var _d = react_1$
|
|
70070
|
+
var _d = react_1$c.useContext(context_1$2.SearchContext), setSearch = _d.setSearch, activeChannel = _d.activeChannel, setActiveChannel = _d.setActiveChannel, term = _d.term, channelSearch = _d.channelSearch;
|
|
70071
70071
|
// debounce local input
|
|
70072
|
-
var _e = react_1$
|
|
70072
|
+
var _e = react_1$c.useState(term), debouncedTerm = _e[0], setDebouncedInput = _e[1];
|
|
70073
70073
|
// used to see if the last term was a '' before clearing
|
|
70074
70074
|
var lastTerm = usePrevious$1(debouncedTerm);
|
|
70075
70075
|
// set the term when it changes
|
|
70076
|
-
useDebounce_1
|
|
70076
|
+
useDebounce_1.default(function () { return setSearch(debouncedTerm); }, SEARCH_DEBOUNCE, [debouncedTerm]);
|
|
70077
70077
|
// used only to focus the input
|
|
70078
|
-
var inputRef = react_1$
|
|
70078
|
+
var inputRef = react_1$c.useRef(null);
|
|
70079
70079
|
// we'll use this to see when we went from no channel to channel
|
|
70080
70080
|
var previousActiveChannel = usePrevious$1(activeChannel);
|
|
70081
|
-
react_1$
|
|
70081
|
+
react_1$c.useEffect(function () {
|
|
70082
70082
|
var _a;
|
|
70083
70083
|
if (autoFocus) {
|
|
70084
70084
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
70085
70085
|
}
|
|
70086
70086
|
}, [autoFocus]);
|
|
70087
|
-
react_1$
|
|
70087
|
+
react_1$c.useEffect(function () {
|
|
70088
70088
|
var _a;
|
|
70089
70089
|
// if we know have a channel, focus and clear the input
|
|
70090
70090
|
// so the user can search the channel
|
|
@@ -70094,11 +70094,11 @@ var SearchBar = function (_a) {
|
|
|
70094
70094
|
}
|
|
70095
70095
|
}, [debouncedTerm, activeChannel, previousActiveChannel]);
|
|
70096
70096
|
// a pill could have been clicked, update our local term state
|
|
70097
|
-
react_1$
|
|
70097
|
+
react_1$c.useEffect(function () {
|
|
70098
70098
|
setDebouncedInput(term);
|
|
70099
70099
|
}, [term]);
|
|
70100
|
-
var _f = react_1$
|
|
70101
|
-
react_1$
|
|
70100
|
+
var _f = react_1$c.useState(clear), isCleared = _f[0], setCleared = _f[1];
|
|
70101
|
+
react_1$c.useEffect(function () {
|
|
70102
70102
|
setCleared(clear);
|
|
70103
70103
|
}, [clear]);
|
|
70104
70104
|
// key ups to clear the active channel
|
|
@@ -70117,16 +70117,16 @@ var SearchBar = function (_a) {
|
|
|
70117
70117
|
break;
|
|
70118
70118
|
}
|
|
70119
70119
|
};
|
|
70120
|
-
return (react_1$
|
|
70121
|
-
react_1$
|
|
70122
|
-
react_1$
|
|
70120
|
+
return (react_1$c.default.createElement(Container$7, { className: [SearchBar.className, className].join(' ') },
|
|
70121
|
+
react_1$c.default.createElement(search_bar_channel_1.default, null),
|
|
70122
|
+
react_1$c.default.createElement(Input, { isUsernameSearch: !!channelSearch, onChange: function (_a) {
|
|
70123
70123
|
var value = _a.target.value;
|
|
70124
70124
|
if (!isCleared || value !== '') {
|
|
70125
70125
|
setCleared(false);
|
|
70126
70126
|
setDebouncedInput(value);
|
|
70127
70127
|
}
|
|
70128
70128
|
}, value: isCleared ? '' : debouncedTerm, placeholder: activeChannel ? "Search " + activeChannel.display_name : placeholder, autoCapitalize: "off", autoCorrect: "off", autoComplete: "off", ref: inputRef, onKeyUp: onKeyUp }),
|
|
70129
|
-
react_1$
|
|
70129
|
+
react_1$c.default.createElement(search_button_1.default, null)));
|
|
70130
70130
|
};
|
|
70131
70131
|
SearchBar.className = 'giphy-search-bar';
|
|
70132
70132
|
searchBar.default = SearchBar;
|
|
@@ -70142,14 +70142,14 @@ var __importDefault$6 = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
70142
70142
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
70143
70143
|
};
|
|
70144
70144
|
Object.defineProperty(trendingIcon, "__esModule", { value: true });
|
|
70145
|
-
var react_1$
|
|
70145
|
+
var react_1$b = __importDefault$6(React__default);
|
|
70146
70146
|
var TrendingIcon$1 = function (_a) {
|
|
70147
70147
|
var _b = _a.size, size = _b === void 0 ? 18 : _b, className = _a.className;
|
|
70148
|
-
return (react_1$
|
|
70149
|
-
react_1$
|
|
70150
|
-
react_1$
|
|
70151
|
-
react_1$
|
|
70152
|
-
react_1$
|
|
70148
|
+
return (react_1$b.default.createElement("svg", { width: size, height: size, viewBox: "0 0 18 16", version: "1.1", xmlns: "http://www.w3.org/2000/svg", className: className },
|
|
70149
|
+
react_1$b.default.createElement("g", { id: "trending", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd" },
|
|
70150
|
+
react_1$b.default.createElement("g", null,
|
|
70151
|
+
react_1$b.default.createElement("rect", { id: "Rectangle", stroke: "#979797", fill: "#D8D8D8", opacity: "0", x: "0.5", y: "0.5", width: "17", height: "17" }),
|
|
70152
|
+
react_1$b.default.createElement("path", { d: "M12.6093329,3.12057664 L15.156896,3.12057664 L9.64199318,9.04253019 L6.88133868,6.8175119 C6.7544587,6.67603813 6.56616874,6.60087259 6.38404017,6.61897279 C6.2490402,6.63288422 6.11891631,6.69661171 6.02063992,6.79697337 C2.21226835,10.5943119 0.308082561,12.4929812 0.308082561,12.4929812 C0.308082561,12.4929812 0.527106106,12.8074292 0.710953088,13.0215425 C0.833517743,13.1642848 0.975497751,13.3098497 1.13689311,13.4582373 L6.47329888,8.13191205 L9.16381134,10.2953038 C9.40800276,10.5710787 9.68933701,10.7021044 10.019278,10.4570223 L16.0239805,4.04474473 C16.0239805,5.87956383 16.0239805,6.79697337 16.0239805,6.79697337 C16.0239805,6.79697337 16.4320205,6.79697337 17.2481004,6.79697337 L17.2481004,1.80604505 C14.1555887,1.80604505 12.6093329,1.80604505 12.6093329,1.80604505 C12.6093329,1.80604505 12.6093329,2.24422225 12.6093329,3.12057664 Z", id: "Shape", stroke: "#00CCFF", strokeWidth: "0.4", fill: "#00CCFF", fillRule: "nonzero", transform: "translate(8.778091, 7.632141) rotate(-2.000000) translate(-8.778091, -7.632141) " })))));
|
|
70153
70153
|
};
|
|
70154
70154
|
trendingIcon.default = TrendingIcon$1;
|
|
70155
70155
|
|
|
@@ -70182,7 +70182,7 @@ var __importDefault$5 = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
70182
70182
|
Object.defineProperty(pills, "__esModule", { value: true });
|
|
70183
70183
|
pills.TrendingSearchPill = pills.ChannelPill = void 0;
|
|
70184
70184
|
var js_brand_1$1 = dist$2;
|
|
70185
|
-
var react_1$
|
|
70185
|
+
var react_1$a = __importStar$4(React__default);
|
|
70186
70186
|
var avatar_1$1 = __importDefault$5(avatar);
|
|
70187
70187
|
var verified_badge_1 = __importDefault$5(verifiedBadge);
|
|
70188
70188
|
var context_1$1 = context;
|
|
@@ -70195,20 +70195,20 @@ var Avatar$2 = theme_1$1.default(avatar_1$1.default)(templateObject_3$17 || (tem
|
|
|
70195
70195
|
var TrendingIcon = theme_1$1.default(trending_icon_1.default)(templateObject_4$N || (templateObject_4$N = __makeTemplateObject$7(["\n margin-right: 2px;\n"], ["\n margin-right: 2px;\n"])));
|
|
70196
70196
|
var ChannelPill = function (_a) {
|
|
70197
70197
|
var channel = _a.channel;
|
|
70198
|
-
var setActiveChannel = react_1$
|
|
70199
|
-
return (react_1$
|
|
70200
|
-
react_1$
|
|
70201
|
-
react_1$
|
|
70198
|
+
var setActiveChannel = react_1$a.useContext(context_1$1.SearchContext).setActiveChannel;
|
|
70199
|
+
return (react_1$a.default.createElement(ChannelPillContainer, { key: channel.id, onClick: function () { return setActiveChannel(channel); } },
|
|
70200
|
+
react_1$a.default.createElement(Avatar$2, { user: channel.user }),
|
|
70201
|
+
react_1$a.default.createElement("div", null,
|
|
70202
70202
|
"@",
|
|
70203
70203
|
channel.user.username),
|
|
70204
|
-
channel.user.is_verified && react_1$
|
|
70204
|
+
channel.user.is_verified && react_1$a.default.createElement(verified_badge_1.default, { size: 14 })));
|
|
70205
70205
|
};
|
|
70206
70206
|
pills.ChannelPill = ChannelPill;
|
|
70207
70207
|
var TrendingSearchPill = function (_a) {
|
|
70208
70208
|
var trendingSearch = _a.trendingSearch;
|
|
70209
|
-
var setSearch = react_1$
|
|
70210
|
-
return (react_1$
|
|
70211
|
-
react_1$
|
|
70209
|
+
var setSearch = react_1$a.useContext(context_1$1.SearchContext).setSearch;
|
|
70210
|
+
return (react_1$a.default.createElement(TrendingSearchPillContainer, { key: trendingSearch, onClick: function () { return setSearch(trendingSearch); } },
|
|
70211
|
+
react_1$a.default.createElement(TrendingIcon, { size: 16 }),
|
|
70212
70212
|
trendingSearch));
|
|
70213
70213
|
};
|
|
70214
70214
|
pills.TrendingSearchPill = TrendingSearchPill;
|
|
@@ -70274,15 +70274,15 @@ var __generator$3 = (commonjsGlobal$7 && commonjsGlobal$7.__generator) || functi
|
|
|
70274
70274
|
}
|
|
70275
70275
|
};
|
|
70276
70276
|
Object.defineProperty(suggestionBar, "__esModule", { value: true });
|
|
70277
|
-
var react_1$
|
|
70277
|
+
var react_1$9 = __importStar$3(React__default);
|
|
70278
70278
|
var context_1 = context;
|
|
70279
70279
|
var theme_1 = __importStar$3(theme);
|
|
70280
70280
|
var pills_1 = pills;
|
|
70281
70281
|
var Container$6 = theme_1.default.div(templateObject_1$2v || (templateObject_1$2v = __makeTemplateObject$6(["\n display: flex;\n color: white;\n flex-direction: row;\n font-family: 'interface';\n font-weight: 600;\n font-size: 14px;\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: hidden;\n padding-bottom: 10px;\n ", "\n"], ["\n display: flex;\n color: white;\n flex-direction: row;\n font-family: 'interface';\n font-weight: 600;\n font-size: 14px;\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: hidden;\n padding-bottom: 10px;\n ", "\n"])), function (props) { return theme_1.getSize(props.theme); });
|
|
70282
70282
|
var SuggestionBar = function () {
|
|
70283
|
-
var _a = react_1$
|
|
70284
|
-
var _b = react_1$
|
|
70285
|
-
react_1$
|
|
70283
|
+
var _a = react_1$9.useContext(context_1.SearchContext), channelSearch = _a.channelSearch, fetchChannelSearch = _a.fetchChannelSearch, trendingSearches = _a.trendingSearches, activeChannel = _a.activeChannel;
|
|
70284
|
+
var _b = react_1$9.useState([]), channels = _b[0], setChannels = _b[1];
|
|
70285
|
+
react_1$9.useEffect(function () {
|
|
70286
70286
|
var fetchChannels = function () { return __awaiter$3(void 0, void 0, void 0, function () {
|
|
70287
70287
|
var channels;
|
|
70288
70288
|
return __generator$3(this, function (_a) {
|
|
@@ -70303,9 +70303,9 @@ var SuggestionBar = function () {
|
|
|
70303
70303
|
setChannels([]);
|
|
70304
70304
|
}
|
|
70305
70305
|
}, [channelSearch, activeChannel, fetchChannelSearch]);
|
|
70306
|
-
return (react_1$
|
|
70307
|
-
? channels.map(function (channel) { return react_1$
|
|
70308
|
-
: trendingSearches.map(function (trendingSearch) { return (react_1$
|
|
70306
|
+
return (react_1$9.default.createElement(Container$6, null, channels.length > 0
|
|
70307
|
+
? channels.map(function (channel) { return react_1$9.default.createElement(pills_1.ChannelPill, { key: channel.id, channel: channel }); })
|
|
70308
|
+
: trendingSearches.map(function (trendingSearch) { return (react_1$9.default.createElement(pills_1.TrendingSearchPill, { key: trendingSearch, trendingSearch: trendingSearch })); })));
|
|
70309
70309
|
};
|
|
70310
70310
|
suggestionBar.default = SuggestionBar;
|
|
70311
70311
|
var templateObject_1$2v;
|
|
@@ -71777,7 +71777,7 @@ function useTimeoutFn(fn, ms) {
|
|
|
71777
71777
|
return [isReady, clear, set];
|
|
71778
71778
|
}
|
|
71779
71779
|
|
|
71780
|
-
function useDebounce$
|
|
71780
|
+
function useDebounce$1(fn, ms, deps) {
|
|
71781
71781
|
if (ms === void 0) { ms = 0; }
|
|
71782
71782
|
if (deps === void 0) { deps = []; }
|
|
71783
71783
|
var _a = useTimeoutFn(fn, ms), isReady = _a[0], cancel = _a[1], reset = _a[2];
|
|
@@ -73688,14 +73688,14 @@ var useSearchParam = function (param) {
|
|
|
73688
73688
|
var useSearchParamServer = function () { return null; };
|
|
73689
73689
|
var useSearchParam$1 = isBrowser ? useSearchParam : useSearchParamServer;
|
|
73690
73690
|
|
|
73691
|
-
var lib$
|
|
73691
|
+
var lib$1 = {};
|
|
73692
73692
|
|
|
73693
73693
|
var render$1 = {};
|
|
73694
73694
|
|
|
73695
73695
|
Object.defineProperty(render$1, "__esModule", { value: true });
|
|
73696
73696
|
var tslib_1$6 = require$$0;
|
|
73697
|
-
var react_1$
|
|
73698
|
-
var isReact16Plus = parseInt(react_1$
|
|
73697
|
+
var react_1$8 = React__default;
|
|
73698
|
+
var isReact16Plus = parseInt(react_1$8.version.substr(0, react_1$8.version.indexOf('.'))) > 15;
|
|
73699
73699
|
var isFn = function (fn) { return typeof fn === 'function'; };
|
|
73700
73700
|
var render = function (props, data) {
|
|
73701
73701
|
var more = [];
|
|
@@ -73722,10 +73722,10 @@ var render = function (props, data) {
|
|
|
73722
73722
|
if (isFn(children))
|
|
73723
73723
|
return children.apply(void 0, tslib_1$6.__spreadArrays([data], more));
|
|
73724
73724
|
if (comp) {
|
|
73725
|
-
return react_1$
|
|
73725
|
+
return react_1$8.createElement(comp, data);
|
|
73726
73726
|
}
|
|
73727
73727
|
if (children instanceof Array)
|
|
73728
|
-
return isReact16Plus ? children : react_1$
|
|
73728
|
+
return isReact16Plus ? children : react_1$8.createElement.apply(void 0, tslib_1$6.__spreadArrays(['div', null], children));
|
|
73729
73729
|
if (children && (children instanceof Object)) {
|
|
73730
73730
|
if (browser$1$1.env.NODE_ENV !== 'production') {
|
|
73731
73731
|
if (!children.type || ((typeof children.type !== 'string') && (typeof children.type !== 'function') && (typeof children.type !== 'symbol'))) {
|
|
@@ -73735,12 +73735,12 @@ var render = function (props, data) {
|
|
|
73735
73735
|
}
|
|
73736
73736
|
if (typeof children.type === 'string')
|
|
73737
73737
|
return children;
|
|
73738
|
-
return react_1$
|
|
73738
|
+
return react_1$8.cloneElement(children, Object.assign({}, children.props, data));
|
|
73739
73739
|
}
|
|
73740
73740
|
else {
|
|
73741
73741
|
if (typeof children.type === 'string')
|
|
73742
73742
|
return children;
|
|
73743
|
-
return react_1$
|
|
73743
|
+
return react_1$8.cloneElement(children, Object.assign({}, children.props, data));
|
|
73744
73744
|
}
|
|
73745
73745
|
}
|
|
73746
73746
|
return children || null;
|
|
@@ -73829,15 +73829,15 @@ var hookToRenderProp = function (hook, mapPropsToArgs) {
|
|
|
73829
73829
|
};
|
|
73830
73830
|
hookToRenderProp$1.default = hookToRenderProp;
|
|
73831
73831
|
|
|
73832
|
-
Object.defineProperty(lib$
|
|
73833
|
-
lib$
|
|
73832
|
+
Object.defineProperty(lib$1, "__esModule", { value: true });
|
|
73833
|
+
lib$1.hookToRenderProp = lib$1.createEnhancer = lib$1.render = void 0;
|
|
73834
73834
|
var tslib_1$1 = require$$0;
|
|
73835
73835
|
var render_1 = tslib_1$1.__importDefault(render$1);
|
|
73836
|
-
lib$
|
|
73836
|
+
lib$1.render = render_1.default;
|
|
73837
73837
|
var createEnhancer_1 = tslib_1$1.__importDefault(createEnhancer$1);
|
|
73838
|
-
lib$
|
|
73838
|
+
lib$1.createEnhancer = createEnhancer_1.default;
|
|
73839
73839
|
var hookToRenderProp_1 = tslib_1$1.__importDefault(hookToRenderProp$1);
|
|
73840
|
-
lib$
|
|
73840
|
+
lib$1.hookToRenderProp = hookToRenderProp_1.default;
|
|
73841
73841
|
|
|
73842
73842
|
var useScratch = function (params) {
|
|
73843
73843
|
if (params === void 0) { params = {}; }
|
|
@@ -74570,10 +74570,10 @@ function useTitle(title, options) {
|
|
|
74570
74570
|
}
|
|
74571
74571
|
var useTitle$1 = typeof document !== 'undefined' ? useTitle : function (_title) { };
|
|
74572
74572
|
|
|
74573
|
-
var lib
|
|
74573
|
+
var lib = {};
|
|
74574
74574
|
|
|
74575
|
-
Object.defineProperty(lib
|
|
74576
|
-
var easing$1 = lib
|
|
74575
|
+
Object.defineProperty(lib, "__esModule", { value: true });
|
|
74576
|
+
var easing$1 = lib.easing = {
|
|
74577
74577
|
// No easing, no acceleration
|
|
74578
74578
|
linear: function (t) { return t; },
|
|
74579
74579
|
// Accelerates fast, then slows quickly towards end.
|
|
@@ -74979,7 +74979,7 @@ var esm = /*#__PURE__*/Object.freeze({
|
|
|
74979
74979
|
useCounter: useCounter,
|
|
74980
74980
|
useCss: useCss$1,
|
|
74981
74981
|
useCustomCompareEffect: useCustomCompareEffect$1,
|
|
74982
|
-
useDebounce: useDebounce$
|
|
74982
|
+
useDebounce: useDebounce$1,
|
|
74983
74983
|
useDeepCompareEffect: useDeepCompareEffect$1,
|
|
74984
74984
|
useDefault: useDefault$1,
|
|
74985
74985
|
useDrop: useDrop$1,
|
|
@@ -75087,15 +75087,15 @@ var __importDefault$4 = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
75087
75087
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
75088
75088
|
};
|
|
75089
75089
|
Object.defineProperty(clipsBranding, "__esModule", { value: true });
|
|
75090
|
-
var react_1$
|
|
75090
|
+
var react_1$7 = __importDefault$4(React__default);
|
|
75091
75091
|
var GIPHYClips = function (_a) {
|
|
75092
75092
|
var onClick = _a.onClick;
|
|
75093
|
-
return (react_1$
|
|
75094
|
-
react_1$
|
|
75095
|
-
react_1$
|
|
75096
|
-
react_1$
|
|
75097
|
-
react_1$
|
|
75098
|
-
react_1$
|
|
75093
|
+
return (react_1$7.default.createElement("svg", { width: "66px", height: "13px", viewBox: "0 0 66 13", onClick: onClick },
|
|
75094
|
+
react_1$7.default.createElement("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|
75095
|
+
react_1$7.default.createElement("g", { transform: "translate(-1060.000000, -462.000000)", fill: "#FFFFFF", fillRule: "nonzero" },
|
|
75096
|
+
react_1$7.default.createElement("g", { transform: "translate(931.000000, 286.375671)" },
|
|
75097
|
+
react_1$7.default.createElement("g", { transform: "translate(86.000000, 136.124329)" },
|
|
75098
|
+
react_1$7.default.createElement("path", { d: "M47.968,49.1962322 C49.588,49.1962322 51.052,48.6202322 51.58,47.5522322 L51.58,43.8202322 L47.476,43.8202322 L47.476,45.6802322 L49.6,45.6802322 L49.6,46.7602322 C49.12,47.1082322 48.424,47.1922322 47.98,47.1922322 C46.288,47.1922322 45.724,45.8602322 45.724,44.7802322 C45.724,43.1362322 46.612,42.3202322 47.98,42.3202322 C48.544,42.3202322 49.288,42.4762322 49.9,43.0522322 L51.28,41.6842322 C50.176,40.5682322 49.144,40.3282322 47.98,40.3282322 C44.824,40.3282322 43.384,42.5842322 43.384,44.7802322 C43.384,46.9762322 44.644,49.1962322 47.968,49.1962322 Z M54.928,48.9682322 L54.928,40.5682322 L52.564,40.5682322 L52.564,48.9682322 L54.928,48.9682322 Z M58.648,48.9682322 L58.648,46.7002322 L60.352,46.7002322 C62.596,46.6762322 63.724,45.3442322 63.724,43.6282322 C63.724,41.9842322 62.608,40.5682322 60.352,40.5682322 L56.272,40.5682322 L56.272,48.9682322 L58.648,48.9682322 Z M60.352,44.6962322 L58.648,44.6962322 L58.648,42.6082322 L60.352,42.6082322 C61,42.6082322 61.348,43.1122322 61.348,43.6642322 C61.348,44.2162322 61.012,44.6962322 60.352,44.6962322 Z M66.796,48.9802322 L66.796,45.8002322 L69.82,45.8002322 L69.82,48.9802322 L72.172,48.9802322 L72.172,40.5802322 L69.82,40.5802322 L69.82,43.7722322 L66.796,43.7722322 L66.796,40.5802322 L64.42,40.5802322 L64.42,48.9802322 L66.796,48.9802322 Z M78.16,48.9682322 L78.16,45.6202322 L81.496,40.6762322 L81.496,40.5682322 L78.82,40.5682322 L77.008,43.4482322 L75.268,40.5682322 L72.592,40.5682322 L72.592,40.6642322 L75.784,45.6202322 L75.784,48.9682322 L78.16,48.9682322 Z M87.796,49.1362322 C88.972,49.1362322 90.088,48.7402322 90.952,47.8882322 L90.028,46.9642322 C89.44,47.5522322 88.576,47.8762322 87.796,47.8762322 C85.624,47.8762322 84.712,46.3522322 84.7,44.8162322 C84.688,43.2682322 85.66,41.6962322 87.796,41.6962322 C88.576,41.6962322 89.368,41.9722322 89.968,42.5602322 L90.868,41.6962322 C90.016,40.8442322 88.924,40.4242322 87.796,40.4242322 C84.796,40.4242322 83.356,42.6202322 83.3679256,44.8282322 C83.38,47.0362322 84.748,49.1362322 87.796,49.1362322 Z M93.028,48.9682322 L93.028,40.5802322 L91.792,40.5802322 L91.792,48.9682322 L93.028,48.9682322 Z M94.252,41.3122322 C94.252,42.3322322 95.788,42.3322322 95.788,41.3122322 C95.788,40.3042322 94.252,40.3042322 94.252,41.3122322 Z M95.632,48.9682322 L95.632,43.0282322 L94.396,43.0282322 L94.396,48.9682322 L95.632,48.9682322 Z M98.188,51.7162322 L98.188,48.1042322 C98.632,48.8362322 99.556,49.1002322 100.276,49.1002322 C102.112,49.1002322 103.264,47.8042322 103.264,46.0162322 C103.264,44.2282322 102.04,42.9442322 100.276,42.9322322 C99.484,42.9322322 98.644,43.2922322 98.188,44.0122322 L98.116,43.0522322 L96.952,43.0522322 L96.952,51.7162322 L98.188,51.7162322 Z M100.156,47.9002322 C99.076,47.9002322 98.296,47.0722322 98.296,46.0162322 C98.296,44.9602322 99.016,44.1322322 100.156,44.1322322 C101.284,44.1322322 102.028,44.9002322 102.028,46.0162322 C102.028,47.1202322 101.236,47.9002322 100.156,47.9002322 Z M106.456,49.1482322 C107.992,49.1482322 108.964,48.3802322 108.976,47.2762322 C108.988,45.7522322 107.56,45.5122322 106.468,45.4162322 C105.712,45.3442322 105.196,45.1522322 105.184,44.6602322 C105.184,44.1922322 105.688,43.9402322 106.444,43.9522322 C107.032,43.9522322 107.536,44.0722322 108.004,44.5042322 L108.7,43.6882322 C108.04,43.1002322 107.332,42.8962322 106.42,42.8962322 C105.316,42.8962322 103.96,43.3882322 103.96,44.6962322 C103.972,46.0042322 105.256,46.3642322 106.372,46.4722322 C107.248,46.5562322 107.752,46.7602322 107.74,47.2882322 C107.728,47.8402322 107.068,48.0562322 106.48,48.0562322 C105.784,48.0442322 104.956,47.7922322 104.404,47.1802322 L103.756,48.0562322 C104.536,48.9322322 105.496,49.1482322 106.456,49.1482322 Z", id: "GIPHYClips" })))))));
|
|
75099
75099
|
};
|
|
75100
75100
|
clipsBranding.default = GIPHYClips;
|
|
75101
75101
|
|
|
@@ -75108,7 +75108,7 @@ var __importDefault$3 = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
75108
75108
|
};
|
|
75109
75109
|
Object.defineProperty(attribution, "__esModule", { value: true });
|
|
75110
75110
|
var styled_1$3 = __importDefault$3(require$$0$4);
|
|
75111
|
-
var react_1$
|
|
75111
|
+
var react_1$6 = __importDefault$3(React__default);
|
|
75112
75112
|
var avatar_1 = __importDefault$3(avatar);
|
|
75113
75113
|
var user_1 = __importDefault$3(user);
|
|
75114
75114
|
var clips_branding_1 = __importDefault$3(clipsBranding);
|
|
@@ -75121,7 +75121,7 @@ var Attribution = function (_a) {
|
|
|
75121
75121
|
if (!(user === null || user === void 0 ? void 0 : user.username) && !(user === null || user === void 0 ? void 0 : user.display_name)) {
|
|
75122
75122
|
return null;
|
|
75123
75123
|
}
|
|
75124
|
-
return (react_1$
|
|
75124
|
+
return (react_1$6.default.createElement(Container$5, { className: [Attribution.className, className].join(' '), onClick: function (e) {
|
|
75125
75125
|
e.preventDefault();
|
|
75126
75126
|
e.stopPropagation();
|
|
75127
75127
|
if (onClick) {
|
|
@@ -75133,9 +75133,9 @@ var Attribution = function (_a) {
|
|
|
75133
75133
|
window.open(url, '_blank');
|
|
75134
75134
|
}
|
|
75135
75135
|
} },
|
|
75136
|
-
react_1$
|
|
75137
|
-
react_1$
|
|
75138
|
-
react_1$
|
|
75136
|
+
react_1$6.default.createElement(Avatar$1, { user: user }),
|
|
75137
|
+
react_1$6.default.createElement(Right, null,
|
|
75138
|
+
react_1$6.default.createElement(clips_branding_1.default, { onClick: function (e) {
|
|
75139
75139
|
e.preventDefault();
|
|
75140
75140
|
e.stopPropagation();
|
|
75141
75141
|
if (onClick) {
|
|
@@ -75145,7 +75145,7 @@ var Attribution = function (_a) {
|
|
|
75145
75145
|
window.open(gif.url, '_blank');
|
|
75146
75146
|
}
|
|
75147
75147
|
} }),
|
|
75148
|
-
react_1$
|
|
75148
|
+
react_1$6.default.createElement(user_1.default, { user: user }))));
|
|
75149
75149
|
};
|
|
75150
75150
|
Attribution.className = 'giphy-attribution';
|
|
75151
75151
|
attribution.default = Attribution;
|
|
@@ -75220,19 +75220,19 @@ util$1.isBrowser = typeof window !== 'undefined';
|
|
|
75220
75220
|
util$1.isNavigator = typeof navigator !== 'undefined';
|
|
75221
75221
|
|
|
75222
75222
|
Object.defineProperty(useIsomorphicLayoutEffect$1, "__esModule", { value: true });
|
|
75223
|
-
var react_1$
|
|
75223
|
+
var react_1$5 = React__default;
|
|
75224
75224
|
var util_1$1 = util$1;
|
|
75225
|
-
var useIsomorphicLayoutEffect = util_1$1.isBrowser ? react_1$
|
|
75225
|
+
var useIsomorphicLayoutEffect = util_1$1.isBrowser ? react_1$5.useLayoutEffect : react_1$5.useEffect;
|
|
75226
75226
|
useIsomorphicLayoutEffect$1.default = useIsomorphicLayoutEffect;
|
|
75227
75227
|
|
|
75228
75228
|
Object.defineProperty(useRaf$1, "__esModule", { value: true });
|
|
75229
75229
|
var tslib_1 = require$$0;
|
|
75230
|
-
var react_1$
|
|
75230
|
+
var react_1$4 = React__default;
|
|
75231
75231
|
var useIsomorphicLayoutEffect_1 = tslib_1.__importDefault(useIsomorphicLayoutEffect$1);
|
|
75232
75232
|
var useRaf = function (ms, delay) {
|
|
75233
75233
|
if (ms === void 0) { ms = 1e12; }
|
|
75234
75234
|
if (delay === void 0) { delay = 0; }
|
|
75235
|
-
var _a = react_1$
|
|
75235
|
+
var _a = react_1$4.useState(0), elapsed = _a[0], set = _a[1];
|
|
75236
75236
|
useIsomorphicLayoutEffect_1.default(function () {
|
|
75237
75237
|
var raf;
|
|
75238
75238
|
var timerStop;
|
|
@@ -75274,7 +75274,7 @@ var __importDefault$2 = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
75274
75274
|
Object.defineProperty(progressBar, "__esModule", { value: true });
|
|
75275
75275
|
var styled_1$2 = __importDefault$2(require$$0$4);
|
|
75276
75276
|
var js_brand_1 = dist$2;
|
|
75277
|
-
var react_1$
|
|
75277
|
+
var react_1$3 = __importDefault$2(React__default);
|
|
75278
75278
|
var useRaf_1 = __importDefault$2(useRaf$1);
|
|
75279
75279
|
var Bar$1 = styled_1$2.default.div(templateObject_1$2t || (templateObject_1$2t = __makeTemplateObject$4(["\n background: ", ";\n height: ", "px;\n position: absolute;\n width: 5px;\n bottom: 0;\n left: 0;\n opacity: 0.95;\n"], ["\n background: ", ";\n height: ", "px;\n position: absolute;\n width: 5px;\n bottom: 0;\n left: 0;\n opacity: 0.95;\n"])), js_brand_1.giphyWhite, function (props) { return props.barHeight; });
|
|
75280
75280
|
var ProgressBar = function (_a) {
|
|
@@ -75292,7 +75292,7 @@ var ProgressBar = function (_a) {
|
|
|
75292
75292
|
barHeight = 4;
|
|
75293
75293
|
}
|
|
75294
75294
|
percentage = duration < 10 && percentage > 98 ? 100 : percentage;
|
|
75295
|
-
return react_1$
|
|
75295
|
+
return react_1$3.default.createElement(Bar$1, { style: { width: percentage + "%" }, barHeight: barHeight, className: "hide-in-percy" });
|
|
75296
75296
|
};
|
|
75297
75297
|
progressBar.default = ProgressBar;
|
|
75298
75298
|
var templateObject_1$2t;
|
|
@@ -75388,7 +75388,7 @@ var __generator$2 = (commonjsGlobal$7 && commonjsGlobal$7.__generator) || functi
|
|
|
75388
75388
|
Object.defineProperty(video, "__esModule", { value: true });
|
|
75389
75389
|
var js_analytics_1 = dist;
|
|
75390
75390
|
var js_util_1$1 = dist$3;
|
|
75391
|
-
var react_1$
|
|
75391
|
+
var react_1$2 = __importStar$2(React__default);
|
|
75392
75392
|
var util_1 = util;
|
|
75393
75393
|
var quartileEvents = [0.25, 0.5, 0.75];
|
|
75394
75394
|
var videoClassName = 'giphy-video';
|
|
@@ -75407,28 +75407,28 @@ var Video = function (_a) {
|
|
|
75407
75407
|
var muted = _a.muted, _e = _a.ccEnabled, ccEnabled = _e === void 0 ? false : _e, _f = _a.ccLanguage, ccLanguage = _f === void 0 ? 'en' : _f, _g = _a.loop, loop = _g === void 0 ? true : _g, onStateChange = _a.onStateChange, onTimeUpdate = _a.onTimeUpdate, onCanPlay = _a.onCanPlay, onFirstPlay = _a.onFirstPlay, onWaiting = _a.onWaiting, onMuted = _a.onMuted, onError = _a.onError, onEnded = _a.onEnded, onLoop = _a.onLoop, onQuartile = _a.onQuartile, onEndFullscreen = _a.onEndFullscreen, setVideoEl = _a.setVideoEl, gif = _a.gif, width = _a.width, height_ = _a.height, _h = _a.volume, volume = _h === void 0 ? 0.7 : _h, _j = _a.className, className = _j === void 0 ? videoClassName : _j;
|
|
75408
75408
|
var height = height_ || js_util_1$1.getGifHeight(gif, width);
|
|
75409
75409
|
// state
|
|
75410
|
-
var _k = react_1$
|
|
75411
|
-
var seek = react_1$
|
|
75410
|
+
var _k = react_1$2.useState(js_util_1$1.getBestVideo(gif.video, width, height)), media = _k[0], setMedia = _k[1];
|
|
75411
|
+
var seek = react_1$2.useRef(0);
|
|
75412
75412
|
if (!media) {
|
|
75413
75413
|
// Not all gif requests have video content
|
|
75414
75414
|
// use { type: 'videos' } for search or trending endpoints
|
|
75415
75415
|
console.warn("GiphyJS No video content for id: " + gif.id);
|
|
75416
75416
|
}
|
|
75417
|
-
var mountTime = react_1$
|
|
75418
|
-
var hasPlayingFired = react_1$
|
|
75419
|
-
var loopNumber = react_1$
|
|
75420
|
-
var waitingCount = react_1$
|
|
75421
|
-
var quartilesFired = react_1$
|
|
75417
|
+
var mountTime = react_1$2.useRef(Date.now());
|
|
75418
|
+
var hasPlayingFired = react_1$2.useRef(false);
|
|
75419
|
+
var loopNumber = react_1$2.useRef(0);
|
|
75420
|
+
var waitingCount = react_1$2.useRef(0);
|
|
75421
|
+
var quartilesFired = react_1$2.useRef(new Set());
|
|
75422
75422
|
// reset the above when the gif.id changes
|
|
75423
|
-
react_1$
|
|
75423
|
+
react_1$2.useEffect(function () {
|
|
75424
75424
|
mountTime.current = Date.now();
|
|
75425
75425
|
hasPlayingFired.current = false;
|
|
75426
75426
|
loopNumber.current = 1;
|
|
75427
75427
|
waitingCount.current = 0;
|
|
75428
75428
|
quartilesFired.current = new Set();
|
|
75429
75429
|
}, [gif.id]);
|
|
75430
|
-
var videoEl = react_1$
|
|
75431
|
-
react_1$
|
|
75430
|
+
var videoEl = react_1$2.useRef(null);
|
|
75431
|
+
react_1$2.useEffect(function () {
|
|
75432
75432
|
// when the width and height change, check if there's a new url
|
|
75433
75433
|
var newMedia = js_util_1$1.getBestVideo(gif.video, width, height);
|
|
75434
75434
|
if (videoEl.current && (media === null || media === void 0 ? void 0 : media.url) && newMedia.url !== media.url) {
|
|
@@ -75441,13 +75441,13 @@ var Video = function (_a) {
|
|
|
75441
75441
|
setMedia(newMedia);
|
|
75442
75442
|
}
|
|
75443
75443
|
}, [width, height_, gif.video, height, media === null || media === void 0 ? void 0 : media.url, gif.id]);
|
|
75444
|
-
react_1$
|
|
75444
|
+
react_1$2.useEffect(function () {
|
|
75445
75445
|
if (videoEl.current && (media === null || media === void 0 ? void 0 : media.url) && seek.current) {
|
|
75446
75446
|
videoEl.current.currentTime = seek.current;
|
|
75447
75447
|
seek.current = 0;
|
|
75448
75448
|
}
|
|
75449
75449
|
}, [media === null || media === void 0 ? void 0 : media.url, seek]);
|
|
75450
|
-
var _onError = react_1$
|
|
75450
|
+
var _onError = react_1$2.useCallback(function () {
|
|
75451
75451
|
var _a;
|
|
75452
75452
|
var el = videoEl.current;
|
|
75453
75453
|
var code = (_a = el === null || el === void 0 ? void 0 : el.error) === null || _a === void 0 ? void 0 : _a.code;
|
|
@@ -75457,7 +75457,7 @@ var Video = function (_a) {
|
|
|
75457
75457
|
onError === null || onError === void 0 ? void 0 : onError(code);
|
|
75458
75458
|
}
|
|
75459
75459
|
}, [onError]);
|
|
75460
|
-
var _onPlaying = react_1$
|
|
75460
|
+
var _onPlaying = react_1$2.useCallback(function () {
|
|
75461
75461
|
onStateChange === null || onStateChange === void 0 ? void 0 : onStateChange('playing');
|
|
75462
75462
|
if (!hasPlayingFired.current) {
|
|
75463
75463
|
hasPlayingFired.current = true;
|
|
@@ -75467,8 +75467,8 @@ var Video = function (_a) {
|
|
|
75467
75467
|
onFirstPlay === null || onFirstPlay === void 0 ? void 0 : onFirstPlay(Date.now() - mountTime.current);
|
|
75468
75468
|
}
|
|
75469
75469
|
}, [onFirstPlay, onStateChange, gif]);
|
|
75470
|
-
var _onPaused = react_1$
|
|
75471
|
-
var _onTimeUpdate = react_1$
|
|
75470
|
+
var _onPaused = react_1$2.useCallback(function () { return onStateChange === null || onStateChange === void 0 ? void 0 : onStateChange('paused'); }, [onStateChange]);
|
|
75471
|
+
var _onTimeUpdate = react_1$2.useCallback(function () {
|
|
75472
75472
|
var el = videoEl.current;
|
|
75473
75473
|
if (el) {
|
|
75474
75474
|
var playhead_1 = el.currentTime;
|
|
@@ -75482,15 +75482,15 @@ var Video = function (_a) {
|
|
|
75482
75482
|
onTimeUpdate === null || onTimeUpdate === void 0 ? void 0 : onTimeUpdate(playhead_1 || 0);
|
|
75483
75483
|
}
|
|
75484
75484
|
}, [onQuartile, onTimeUpdate]);
|
|
75485
|
-
var _onCanPlay = react_1$
|
|
75486
|
-
var _onWaiting = react_1$
|
|
75485
|
+
var _onCanPlay = react_1$2.useCallback(function () { return onCanPlay === null || onCanPlay === void 0 ? void 0 : onCanPlay(); }, [onCanPlay]);
|
|
75486
|
+
var _onWaiting = react_1$2.useCallback(function () {
|
|
75487
75487
|
var el = videoEl.current;
|
|
75488
75488
|
// we get a waiting event after a loop, so ignore the first one while the play head is 0
|
|
75489
75489
|
if ((el === null || el === void 0 ? void 0 : el.currentTime) !== 0 && (el === null || el === void 0 ? void 0 : el.networkState) !== Network.IDLE) {
|
|
75490
75490
|
onWaiting === null || onWaiting === void 0 ? void 0 : onWaiting(++waitingCount.current);
|
|
75491
75491
|
}
|
|
75492
75492
|
}, [onWaiting]);
|
|
75493
|
-
var _onEnded = react_1$
|
|
75493
|
+
var _onEnded = react_1$2.useCallback(function () {
|
|
75494
75494
|
// helps prevent two ended events when changing media
|
|
75495
75495
|
if (!hasPlayingFired.current) {
|
|
75496
75496
|
return;
|
|
@@ -75502,8 +75502,8 @@ var Video = function (_a) {
|
|
|
75502
75502
|
loopNumber.current = loopNumber.current + 1;
|
|
75503
75503
|
onEnded === null || onEnded === void 0 ? void 0 : onEnded();
|
|
75504
75504
|
}, [onEnded, loop, onLoop]);
|
|
75505
|
-
var _onEndFullscreen = react_1$
|
|
75506
|
-
var tryAutoPlayWithSound = react_1$
|
|
75505
|
+
var _onEndFullscreen = react_1$2.useCallback(function () { return onEndFullscreen === null || onEndFullscreen === void 0 ? void 0 : onEndFullscreen(); }, [onEndFullscreen]);
|
|
75506
|
+
var tryAutoPlayWithSound = react_1$2.useCallback(function (videoEl) { return __awaiter$2(void 0, void 0, void 0, function () {
|
|
75507
75507
|
var promisePlay;
|
|
75508
75508
|
return __generator$2(this, function (_a) {
|
|
75509
75509
|
switch (_a.label) {
|
|
@@ -75532,7 +75532,7 @@ var Video = function (_a) {
|
|
|
75532
75532
|
}
|
|
75533
75533
|
});
|
|
75534
75534
|
}); }, [onMuted]);
|
|
75535
|
-
react_1$
|
|
75535
|
+
react_1$2.useEffect(function () {
|
|
75536
75536
|
var el = videoEl.current;
|
|
75537
75537
|
if (el) {
|
|
75538
75538
|
tryAutoPlayWithSound(el);
|
|
@@ -75543,7 +75543,7 @@ var Video = function (_a) {
|
|
|
75543
75543
|
}
|
|
75544
75544
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75545
75545
|
}, []);
|
|
75546
|
-
react_1$
|
|
75546
|
+
react_1$2.useEffect(function () {
|
|
75547
75547
|
var el = videoEl.current;
|
|
75548
75548
|
if (el) {
|
|
75549
75549
|
el.addEventListener('play', _onPlaying);
|
|
@@ -75569,7 +75569,7 @@ var Video = function (_a) {
|
|
|
75569
75569
|
};
|
|
75570
75570
|
}, [_onPlaying, _onPaused, _onError, _onTimeUpdate, _onCanPlay, _onEnded, _onWaiting, _onEndFullscreen]);
|
|
75571
75571
|
var captionSrc = (_d = (_c = (_b = gif.video) === null || _b === void 0 ? void 0 : _b.captions) === null || _c === void 0 ? void 0 : _c[ccLanguage]) === null || _d === void 0 ? void 0 : _d.vtt;
|
|
75572
|
-
return (media === null || media === void 0 ? void 0 : media.url) ? (react_1$
|
|
75572
|
+
return (media === null || media === void 0 ? void 0 : media.url) ? (react_1$2.default.createElement("video", { crossOrigin: "anonymous", draggable: true, className: className, width: width, height: height, muted: muted, autoPlay: true, playsInline: true, ref: videoEl, src: media === null || media === void 0 ? void 0 : media.url }, ccEnabled && captionSrc && (react_1$2.default.createElement("track", { label: "English", kind: "subtitles", srcLang: ccLanguage, src: captionSrc, default: true })))) : null;
|
|
75573
75573
|
};
|
|
75574
75574
|
Video.className = videoClassName;
|
|
75575
75575
|
video.default = Video;
|
|
@@ -75614,7 +75614,7 @@ var __importDefault$1 = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) |
|
|
|
75614
75614
|
Object.defineProperty(video$1, "__esModule", { value: true });
|
|
75615
75615
|
var styled_1$1 = __importDefault$1(require$$0$4);
|
|
75616
75616
|
var js_util_1 = dist$3;
|
|
75617
|
-
var react_1$
|
|
75617
|
+
var react_1$1 = __importStar$1(React__default);
|
|
75618
75618
|
var react_use_1 = require$$3;
|
|
75619
75619
|
var attribution_1 = __importDefault$1(attribution);
|
|
75620
75620
|
var volume_1$1 = volume;
|
|
@@ -75630,20 +75630,20 @@ var LARGE_PLAYER_HEIGHT = 300;
|
|
|
75630
75630
|
var AUTO_HIDE_TIMEOUT = 4000;
|
|
75631
75631
|
var VideoPlayer = function (props) {
|
|
75632
75632
|
var width = props.width, hideMute = props.hideMute, hideAttribution = props.hideAttribution, hideProgressBar = props.hideProgressBar, className = props.className, persistentControls = props.persistentControls, gif = props.gif, Overlay = props.overlay;
|
|
75633
|
-
var _a = react_1$
|
|
75634
|
-
var _b = react_1$
|
|
75635
|
-
var _c = react_1$
|
|
75636
|
-
var _d = react_1$
|
|
75633
|
+
var _a = react_1$1.useState(false), isHovered = _a[0], setIsHovered = _a[1];
|
|
75634
|
+
var _b = react_1$1.useState(null), videoEl = _b[0], _setVideoEl = _b[1];
|
|
75635
|
+
var _c = react_1$1.useState(props.muted), muted = _c[0], setMuted = _c[1];
|
|
75636
|
+
var _d = react_1$1.useState(false), mutedByBrowser = _d[0], setMutedByBrowser = _d[1];
|
|
75637
75637
|
var setVideoEl = props.setVideoEl, onMuted = props.onMuted, onUserMuted = props.onUserMuted;
|
|
75638
75638
|
var height = props.height || js_util_1.getGifHeight(gif, width);
|
|
75639
75639
|
var _e = react_use_1.useTimeoutFn(function () {
|
|
75640
75640
|
setIsHovered(false);
|
|
75641
75641
|
}, AUTO_HIDE_TIMEOUT), cancelHideTimeout = _e[1], resetHideTimeout = _e[2];
|
|
75642
|
-
var combinedOnMuted = react_1$
|
|
75642
|
+
var combinedOnMuted = react_1$1.useCallback(function (args) {
|
|
75643
75643
|
onMuted === null || onMuted === void 0 ? void 0 : onMuted(args);
|
|
75644
75644
|
setMutedByBrowser(args);
|
|
75645
75645
|
}, [setMutedByBrowser, onMuted]);
|
|
75646
|
-
var combinedSetVideoEl = react_1$
|
|
75646
|
+
var combinedSetVideoEl = react_1$1.useCallback(function (args) {
|
|
75647
75647
|
setVideoEl === null || setVideoEl === void 0 ? void 0 : setVideoEl(args);
|
|
75648
75648
|
_setVideoEl(args);
|
|
75649
75649
|
}, [setVideoEl, _setVideoEl]);
|
|
@@ -75656,13 +75656,13 @@ var VideoPlayer = function (props) {
|
|
|
75656
75656
|
setMuted(!muted);
|
|
75657
75657
|
}
|
|
75658
75658
|
};
|
|
75659
|
-
react_1$
|
|
75659
|
+
react_1$1.useEffect(function () {
|
|
75660
75660
|
setMuted(props.muted);
|
|
75661
75661
|
}, [props.muted]);
|
|
75662
75662
|
var showControls = persistentControls || isHovered;
|
|
75663
75663
|
var isLargePlayer = height >= LARGE_PLAYER_HEIGHT;
|
|
75664
75664
|
// Manage auto hide controls
|
|
75665
|
-
react_1$
|
|
75665
|
+
react_1$1.useEffect(function () {
|
|
75666
75666
|
if (showControls) {
|
|
75667
75667
|
resetHideTimeout();
|
|
75668
75668
|
}
|
|
@@ -75671,7 +75671,7 @@ var VideoPlayer = function (props) {
|
|
|
75671
75671
|
}
|
|
75672
75672
|
return function () { return cancelHideTimeout(); };
|
|
75673
75673
|
}, [showControls, cancelHideTimeout, resetHideTimeout]);
|
|
75674
|
-
return (react_1$
|
|
75674
|
+
return (react_1$1.default.createElement(Container$4, { className: className, style: { width: width, height: height }, onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onMouseMove: function () {
|
|
75675
75675
|
setIsHovered(true);
|
|
75676
75676
|
resetHideTimeout();
|
|
75677
75677
|
}, onClick: function (e) {
|
|
@@ -75684,25 +75684,25 @@ var VideoPlayer = function (props) {
|
|
|
75684
75684
|
e.preventDefault();
|
|
75685
75685
|
toggleMute();
|
|
75686
75686
|
} },
|
|
75687
|
-
react_1$
|
|
75688
|
-
showControls && react_1$
|
|
75689
|
-
react_1$
|
|
75690
|
-
react_1$
|
|
75691
|
-
isLargePlayer && (react_1$
|
|
75687
|
+
react_1$1.default.createElement(video_1.default, __assign$3({}, props, { onMuted: combinedOnMuted, setVideoEl: combinedSetVideoEl, muted: muted })),
|
|
75688
|
+
showControls && react_1$1.default.createElement(Gradient, { isLargePlayer: isLargePlayer }),
|
|
75689
|
+
react_1$1.default.createElement(Controls, { isHovered: showControls },
|
|
75690
|
+
react_1$1.default.createElement(TitleContainer$1, null,
|
|
75691
|
+
isLargePlayer && (react_1$1.default.createElement(Title$a, { onClick: function (e) {
|
|
75692
75692
|
e.preventDefault();
|
|
75693
75693
|
e.stopPropagation();
|
|
75694
75694
|
window.open(gif.url, '_blank');
|
|
75695
75695
|
} }, gif.title)),
|
|
75696
|
-
videoEl && !hideAttribution ? react_1$
|
|
75697
|
-
!hideMute && react_1$
|
|
75698
|
-
showControls && !hideProgressBar && videoEl ? react_1$
|
|
75699
|
-
Overlay && react_1$
|
|
75696
|
+
videoEl && !hideAttribution ? react_1$1.default.createElement(attribution_1.default, { gif: gif }) : null),
|
|
75697
|
+
!hideMute && react_1$1.default.createElement(Volume, null, muted || mutedByBrowser ? react_1$1.default.createElement(volume_1$1.VolumeOffIcon, null) : react_1$1.default.createElement(volume_1$1.VolumeOnIcon, null))),
|
|
75698
|
+
showControls && !hideProgressBar && videoEl ? react_1$1.default.createElement(progress_bar_1.default, { videoEl: videoEl }) : null,
|
|
75699
|
+
Overlay && react_1$1.default.createElement(Overlay, { gif: gif, isHovered: isHovered, width: width, height: height })));
|
|
75700
75700
|
};
|
|
75701
75701
|
var VideoWrapper = function (props) {
|
|
75702
75702
|
if (props.overlay && !props.controls) {
|
|
75703
75703
|
console.warn(js_util_1.Logger.PREFIX + ": Overlays only work when controls are enabled");
|
|
75704
75704
|
}
|
|
75705
|
-
return props.controls ? react_1$
|
|
75705
|
+
return props.controls ? react_1$1.default.createElement(VideoPlayer, __assign$3({}, props)) : react_1$1.default.createElement(video_1.default, __assign$3({}, props));
|
|
75706
75706
|
};
|
|
75707
75707
|
video$1.default = VideoWrapper;
|
|
75708
75708
|
var templateObject_1$2s, templateObject_2$1E, templateObject_3$15, templateObject_4$M, templateObject_5$F, templateObject_6$u;
|
|
@@ -75777,7 +75777,7 @@ var __importDefault = (commonjsGlobal$7 && commonjsGlobal$7.__importDefault) ||
|
|
|
75777
75777
|
};
|
|
75778
75778
|
Object.defineProperty(videoOverlay, "__esModule", { value: true });
|
|
75779
75779
|
var styled_1 = __importDefault(require$$0$4);
|
|
75780
|
-
var react_1
|
|
75780
|
+
var react_1 = __importStar(React__default);
|
|
75781
75781
|
var _1 = __importDefault(video$1);
|
|
75782
75782
|
var volume_1 = volume;
|
|
75783
75783
|
var VideoContainer = styled_1.default.div(templateObject_1$2r || (templateObject_1$2r = __makeTemplateObject$2(["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 100%;\n"])));
|
|
@@ -75786,16 +75786,16 @@ var Button$2 = styled_1.default.div(templateObject_3$14 || (templateObject_3$14
|
|
|
75786
75786
|
var speakerClassName = 'giphy-video-overlay-button';
|
|
75787
75787
|
var VolumeButton = function (_a) {
|
|
75788
75788
|
var muted = _a.muted, toggleMute = _a.toggleMute, mutedByBrowser = _a.mutedByBrowser, isHovered = _a.isHovered;
|
|
75789
|
-
return (react_1
|
|
75789
|
+
return (react_1.default.createElement(Button$2, { className: speakerClassName, onClick: function (e) {
|
|
75790
75790
|
e.preventDefault();
|
|
75791
75791
|
e.stopPropagation();
|
|
75792
75792
|
toggleMute();
|
|
75793
|
-
}, isHovered: isHovered }, muted || mutedByBrowser || !isHovered ? react_1
|
|
75793
|
+
}, isHovered: isHovered }, muted || mutedByBrowser || !isHovered ? react_1.default.createElement(volume_1.VolumeOffIcon, null) : react_1.default.createElement(volume_1.VolumeOnIcon, null)));
|
|
75794
75794
|
};
|
|
75795
75795
|
var VideoOverlay = function (_a) {
|
|
75796
75796
|
var gif = _a.gif, isHovered = _a.isHovered, hideMuteButton = _a.hideMuteButton, width = _a.width, height = _a.height, className = _a.className, _b = _a.muted, userPrefMuted = _b === void 0 ? false : _b, onUserMuted = _a.onUserMuted;
|
|
75797
|
-
var _c = react_1
|
|
75798
|
-
var _d = react_1
|
|
75797
|
+
var _c = react_1.useState(userPrefMuted), muted = _c[0], setMuted = _c[1];
|
|
75798
|
+
var _d = react_1.useState(false), mutedByBrowser = _d[0], setMutedByBrowser = _d[1];
|
|
75799
75799
|
var toggleMute = function () {
|
|
75800
75800
|
if (mutedByBrowser) {
|
|
75801
75801
|
setMutedByBrowser(false);
|
|
@@ -75806,13 +75806,13 @@ var VideoOverlay = function (_a) {
|
|
|
75806
75806
|
setMuted(!muted);
|
|
75807
75807
|
}
|
|
75808
75808
|
};
|
|
75809
|
-
react_1
|
|
75809
|
+
react_1.useEffect(function () {
|
|
75810
75810
|
setMuted(userPrefMuted);
|
|
75811
75811
|
}, [userPrefMuted, setMuted]);
|
|
75812
75812
|
var props = { toggleMute: toggleMute, muted: muted, mutedByBrowser: mutedByBrowser };
|
|
75813
|
-
return (react_1
|
|
75814
|
-
isHovered && (react_1
|
|
75815
|
-
!hideMuteButton && react_1
|
|
75813
|
+
return (react_1.default.createElement(VideoContainer, { className: className },
|
|
75814
|
+
isHovered && (react_1.default.createElement(VideoStyled, { gif: gif, key: gif.id, loop: true, controls: true, hideAttribution: true, hideMute: true, persistentControls: true, muted: muted, width: width, height: height, onMuted: setMutedByBrowser })),
|
|
75815
|
+
!hideMuteButton && react_1.default.createElement(VolumeButton, __assign$2({}, props, { isHovered: isHovered }))));
|
|
75816
75816
|
};
|
|
75817
75817
|
VideoOverlay.imgClassName = speakerClassName;
|
|
75818
75818
|
videoOverlay.default = VideoOverlay;
|
|
@@ -75999,7 +75999,7 @@ js_util_1.appendGiphySDKRequestHeader("X-GIPHY-SDK-VERSION", version);
|
|
|
75999
75999
|
|
|
76000
76000
|
}(dist$4));
|
|
76001
76001
|
|
|
76002
|
-
function useDebouncedCallback
|
|
76002
|
+
function useDebouncedCallback(callback, delay, options) {
|
|
76003
76003
|
if (options === void 0) { options = {}; }
|
|
76004
76004
|
var maxWait = options.maxWait;
|
|
76005
76005
|
var maxWaitHandler = useRef$1(null);
|
|
@@ -76069,13 +76069,13 @@ function useDebouncedCallback$3(callback, delay, options) {
|
|
|
76069
76069
|
return [debouncedCallback, cancelDebouncedCallback, callPending];
|
|
76070
76070
|
}
|
|
76071
76071
|
|
|
76072
|
-
function valueEquality
|
|
76072
|
+
function valueEquality(left, right) {
|
|
76073
76073
|
return left === right;
|
|
76074
76074
|
}
|
|
76075
|
-
function useDebounce
|
|
76076
|
-
var eq = options && options.equalityFn ? options.equalityFn : valueEquality
|
|
76075
|
+
function useDebounce(value, delay, options) {
|
|
76076
|
+
var eq = options && options.equalityFn ? options.equalityFn : valueEquality;
|
|
76077
76077
|
var _a = useState$2(value), state = _a[0], dispatch = _a[1];
|
|
76078
|
-
var _b = useDebouncedCallback
|
|
76078
|
+
var _b = useDebouncedCallback(useCallback(function (value) { return dispatch(value); }, []), delay, options), callback = _b[0], cancel = _b[1], callPending = _b[2];
|
|
76079
76079
|
var previousValue = useRef$1(value);
|
|
76080
76080
|
useEffect$1(function () {
|
|
76081
76081
|
// We need to use this condition otherwise we will run debounce timer for the first render (including maxWait option)
|
|
@@ -83528,11 +83528,11 @@ var InternalTopActionButton = function InternalTopActionButton(props) {
|
|
|
83528
83528
|
_styled(InternalTopActionButton).withConfig({
|
|
83529
83529
|
displayName: "TopActionButton",
|
|
83530
83530
|
componentId: "sc-1lam7c6-0"
|
|
83531
|
-
})(templateObject_1$w$
|
|
83531
|
+
})(templateObject_1$w$2 || (templateObject_1$w$2 = __makeTemplateObject$1(["\n && {\n font-size: initial;\n font-weight: bold;\n margin: 0 0 ", "px 0;\n\n display: flex;\n align-items: center;\n align-self: flex-start;\n\n color: ", ";\n }\n\n > i {\n padding-right: 8px;\n }\n"], ["\n && {\n font-size: initial;\n font-weight: bold;\n margin: 0 0 ", "px 0;\n\n display: flex;\n align-items: center;\n align-self: flex-start;\n\n color: ", ";\n }\n\n > i {\n padding-right: 8px;\n }\n"])), spacingS, function (p) {
|
|
83532
83532
|
return p.theme.palette.accent;
|
|
83533
83533
|
});
|
|
83534
83534
|
|
|
83535
|
-
var templateObject_1$w$
|
|
83535
|
+
var templateObject_1$w$2;
|
|
83536
83536
|
|
|
83537
83537
|
_styled(IconButton).withConfig({
|
|
83538
83538
|
displayName: "HeaderMenuButton__MenuButton",
|
|
@@ -83917,9 +83917,9 @@ var SearchBoxLargeScreen = _styled.div.withConfig({
|
|
|
83917
83917
|
var SearchIconSmallScreen = _styled.div.withConfig({
|
|
83918
83918
|
displayName: "ToolbarSearch__SearchIconSmallScreen",
|
|
83919
83919
|
componentId: "sc-1f480ry-1"
|
|
83920
|
-
})(templateObject_2$k$
|
|
83920
|
+
})(templateObject_2$k$1 || (templateObject_2$k$1 = __makeTemplateObject$1(["\n @media (min-width: ", "px) {\n display: none;\n }\n"], ["\n @media (min-width: ", "px) {\n display: none;\n }\n"])), minScreenSize.medium);
|
|
83921
83921
|
|
|
83922
|
-
var templateObject_1$p$2, templateObject_2$k$
|
|
83922
|
+
var templateObject_1$p$2, templateObject_2$k$1;
|
|
83923
83923
|
|
|
83924
83924
|
var Toolbar$1 = function Toolbar(_a) {
|
|
83925
83925
|
var leftSide = _a.leftSide,
|
|
@@ -84160,7 +84160,7 @@ var GifSelector = function GifSelector(_a) {
|
|
|
84160
84160
|
searchText = _d[0],
|
|
84161
84161
|
setSearchText = _d[1];
|
|
84162
84162
|
|
|
84163
|
-
var debouncedSearchText = useDebounce
|
|
84163
|
+
var debouncedSearchText = useDebounce(searchText, 500)[0];
|
|
84164
84164
|
var windowSize = useWindowSize$2();
|
|
84165
84165
|
|
|
84166
84166
|
var _e = usePromise$2(getGifs, null, [debouncedSearchText]),
|
|
@@ -87648,9 +87648,9 @@ var AuthenticationContextProvider = function AuthenticationContextProvider(_a) {
|
|
|
87648
87648
|
}), void 0);
|
|
87649
87649
|
};
|
|
87650
87650
|
|
|
87651
|
-
var version$1 = "0.4.0-preview.
|
|
87652
|
-
var buildId = "
|
|
87653
|
-
var commitId = "
|
|
87651
|
+
var version$1 = "0.4.0-preview.294";
|
|
87652
|
+
var buildId = "100195";
|
|
87653
|
+
var commitId = "2f93cb960e0f6efa4b51ec5cd03b817cca19f9e7";
|
|
87654
87654
|
var isCustomerBuild = false;
|
|
87655
87655
|
var buildInfo = {
|
|
87656
87656
|
version: version$1,
|
|
@@ -131868,7 +131868,7 @@ storage.set(cacheKey,apiPage_1).then(function(){return null;});if(!cachedPage){o
|
|
|
131868
131868
|
apiItem.fileAccessToken=cachedItem.fileAccessToken;}});observer.next(apiPage_1);observer.complete();return [3/*break*/,4];case 3:err_1=_a.sent();observer.error(err_1);return [3/*break*/,4];case 4:return [2/*return*/];}});});})();});}function validateFileAccessTokens(page,modifyFunc){if(!page||!page.items){return;}page.items.forEach(function(item){var isTokenValid=isTokenStillValid(item.fileAccessToken);modifyFunc(isTokenValid,item);});}var NewsApiService=/** @class */function(){function NewsApiService(factory,subscriptionId,storage){var _this=this;this.factory=factory;this.storage=storage;this.trackExternalItem=function(itemId,itemType){return _this.api.custom(itemType+"/"+encodeURIComponent(itemId)+"/external_url/track").get().then(function(result){return result.body().data();});};this.getAllNews=function(filterDefinition,paginationToken){return fetchNewsItems('news',NewsApiService.allNewsCacheKey,_this.api,_this.storage,paginationToken,__assign(__assign({},filterDefinition||{}),{includePromoted:true}));};this.getAllUnreadNews=function(filterDefinition,paginationToken){return fetchNewsItems('news',NewsApiService.allNewsCacheKey,_this.api,_this.storage,paginationToken,__assign(__assign({},filterDefinition||{}),{unreadOnly:true,pageSize:0}));};this.getMyNews=function(filterDefinition,paginationToken){return fetchNewsItems('users/current/news',NewsApiService.newsCacheKey,_this.api,_this.storage,paginationToken,filterDefinition);};this.getMyUnreadNews=function(filterDefinition,paginationToken){return fetchNewsItems('users/current/news/unread',NewsApiService.myUnreadNewsCacheKey,_this.api,_this.storage,paginationToken,filterDefinition,true);};this.getBookmarks=function(filterDefinition){return fetchNewsItems('users/current/bookmarks',NewsApiService.bookmarksCacheKey,_this.api,_this.storage,null,filterDefinition,true);};this.getNewsFromCache=function(){return __awaiter(_this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:return [4/*yield*/,this.storage.getObject(NewsApiService.newsItemsCacheKey)];case 1:return [2/*return*/,(_a=_b.sent())!==null&&_a!==void 0?_a:[]];}});});};this.get=function(newsId){var getFromCache=function getFromCache(id){return __awaiter(_this,void 0,void 0,function(){var cache,hits;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,this.getNewsFromCache()];case 1:cache=_a.sent();hits=cache.filter(function(i){return i.id===id;});return [2/*return*/,hits.length>0?hits[0]:null];}});});};var getFromApi=function getFromApi(id){return from(_this.api.all('news').get(id)).pipe(mergeMap(function(res){return updateItemCache(res.body().data());}));};var updateItemCache=function updateItemCache(item){return __awaiter(_this,void 0,void 0,function(){var fromCache,index,cacheItem,clonedCachedItem,clonedNewItem;return __generator(this,function(_a){switch(_a.label){case 0:if(item.statistics){itemStatisticsCache[item.id]=Promise.resolve(__assign({},item.statistics));}return [4/*yield*/,this.getNewsFromCache()];case 1:fromCache=_a.sent();index=fromCache.findIndex(function(i){return i.id===item.id;});if(index>-1){cacheItem=fromCache[index];if(isTokenStillValid(cacheItem.fileAccessToken)){clonedCachedItem=__assign({},cacheItem);delete clonedCachedItem.fileAccessToken;clonedNewItem=__assign({},item);delete clonedNewItem.fileAccessToken;if(JSON.stringify(clonedCachedItem)===JSON.stringify(clonedNewItem)){return [2/*return*/,null];}}fromCache.splice(index,1,item);}else {fromCache.push(item);}return [4/*yield*/,this.storage.set(NewsApiService.newsItemsCacheKey,fromCache)];case 2:_a.sent();return [2/*return*/,item];}});});};return concat(getFromCache(newsId),getFromApi(newsId)).pipe(filter(function(i){return i!=null;}),catchError(function(err){if(err.response&&err.response.statusCode===404){return of(null);}else {return throwError(err);}}));};this.getImageUrlWithToken=function(token,itemId,subscriptionId,resourceType,imageIdentifier,width,height){if(imageIdentifier===void 0){imageIdentifier='banner';}return _this.factory.createApiUrl("/"+resourceType+"/"+itemId+"/images/"+imageIdentifier+"/"+width+"/"+(height||''),{access_token:token,subscriptionId:subscriptionId});};this.getStatistics=function(newsId){if(!itemStatisticsCache[newsId]){itemStatisticsCache[newsId]=_this.api.custom("news/"+newsId+"/statistics").get().then(function(result){return result.body().data();}).then(function(result){var feedbackCountsKeys=Object.keys(result.feedbackCounts);return {bookmarkCount:result.bookmarkCount,likeCount:result.feedbackCounts[feedbackCountsKeys.find(function(k){return k==='like';})],commentCount:result.commentCount,confirmationCount:result.feedbackCounts[feedbackCountsKeys.find(function(k){return k==='confirm';})],readCount:result.readCount};});}return itemStatisticsCache[newsId];};this.refreshStatistics=function(itemId,delta){return __awaiter(_this,void 0,void 0,function(){var _this=this;return __generator(this,function(_a){switch(_a.label){case 0:// update statistics cache with new delta
|
|
131869
131869
|
if(!itemStatisticsCache[itemId]){return [2/*return*/];}return [4/*yield*/,itemStatisticsCache[itemId].then(function(statistics){var updatedStatistics=NewsApiService.getUpdatedStatistics(statistics,delta);_this.tryUpdateStatisticsInCache(itemId,updatedStatistics).then(null,null);itemStatisticsCache[itemId]=Promise.resolve(updatedStatistics);onStatisticsUpdated.next(updatedStatistics);})];case 1:_a.sent();return [2/*return*/];}});});};this.tryUpdateStatisticsInCache=function(newsId,statistics){return __awaiter(_this,void 0,void 0,function(){var fromCache,index,item;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,this.getNewsFromCache()];case 1:fromCache=_a.sent();index=fromCache.findIndex(function(i){return i.id===newsId;});item=fromCache[index];if(!item||!item.statistics){return [2/*return*/];}item.statistics=statistics;fromCache.splice(index,1,item);return [4/*yield*/,this.storage.set(NewsApiService.newsItemsCacheKey,fromCache)];case 2:_a.sent();return [2/*return*/];}});});};this.getExternalItemRoute=function(resourceType,itemId,accessToken){return _this.factory.createApiUrl("/"+resourceType+"/"+encodeURIComponent(itemId)+"/external_url",{access_token:accessToken});};this.api=factory.createApi(false,subscriptionId);}NewsApiService.getUpdatedStatistics=function(curr,delta){var _a,_b,_c,_d,_e,_f;return {bookmarkCount:curr.bookmarkCount+((_a=delta.bookmarkCount)!==null&&_a!==void 0?_a:0),commentCount:curr.commentCount+((_b=delta.commentCount)!==null&&_b!==void 0?_b:0),likeCount:curr.likeCount+((_c=delta.likeCount)!==null&&_c!==void 0?_c:0),confirmationCount:curr.confirmationCount+((_d=delta.confirmationCount)!==null&&_d!==void 0?_d:0),readCount:curr.readCount+((_e=delta.readCount)!==null&&_e!==void 0?_e:0),participantsCount:curr.participantsCount+((_f=delta.participantsCount)!==null&&_f!==void 0?_f:0)};};NewsApiService.bookmarksCacheKey='NewsService::BookmarksV2';NewsApiService.newsItemsCacheKey='NewsService::NewsItems';NewsApiService.newsCacheKey='NewsService::News';NewsApiService.allNewsCacheKey='NewsService::AllNews';NewsApiService.myUnreadNewsCacheKey='NewsService::MyUnreadNews';return NewsApiService;}();function useNewsApi(){var storage=useStorage();var factory=useApiFactory();var identifier=useContext(SubscriptionIdContext).identifier;return useMemo(function(){return new NewsApiService(factory,identifier===null||identifier===void 0?void 0:identifier.id,storage);},[factory,identifier,storage]);}function usePagesApi(){var api=useApi();var createApiUrl=useApiFactory().createApiUrl;return useMemo(function(){return {loadPage:loadPage,loadPageChildren:loadPageChildren,getRootPagesNavigation:getRootPagesNavigation,getPublishedRootPages:getPublishedRootPages,searchPublishedPages:searchPublishedPages,getSubpages:getSubpages,searchPages:searchPages,getDocumentFileUrl:getDocumentFileUrl,searchToc:searchToc};function loadPage(id){return api.all('pages').get(id,{includeNavigationContext:true}).then(function(response){var page=response.body().data();itemStatisticsCache[page.id]=Promise.resolve(__assign({},page.statistics));return page;});}function loadPageChildren(id){return api.all("pages/"+id+"/navigation/children").getAll().then(function(r){return r.body().map(function(g){return g.data();});});}function getRootPagesNavigation(){return api.all('pages').getAll().then(function(r){return r.body().map(function(g){return g.data();});});}function getPublishedRootPages(filter){var rootPagesFilter=__assign(__assign({},filter),{rootPagesOnly:true});return searchPages('pages',rootPagesFilter);}function searchPublishedPages(filter){return searchPages('pages',filter);}function getSubpages(parentId,filter){var subPagesFilter=__assign(__assign({},filter),{parentId:parentId});if(!subPagesFilter.pageSize){// return all subpages & documents
|
|
131870
131870
|
subPagesFilter.pageSize=0;}return searchPages('pages',subPagesFilter);}function searchToc(basePath,searchValue){return searchPages(basePath,{pageSize:100,search:searchValue,searchInTitlesOnly:true});}function searchPages(basePath,filter){if(filter){filter=__assign({},filter);if(!filter.restrictToPageContext){delete filter.pageContextId;}// we never need / want to send this param to the API, only used for the UI
|
|
131871
|
-
delete filter.restrictToPageContext;}var params=__assign(__assign({},filter),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords));return api.all(basePath+"/search").get('',params).then(function(result){return result.body().data();});}function getDocumentFileUrl(basePath,subscriptionId,pageId,fileId,language,token){return createApiUrl("/"+basePath+"/"+pageId+"/"+language+"/documents/"+fileId,{access_token:token,subscriptionId:subscriptionId});}},[api,createApiUrl]);}function usePostsApi(){var searchAccounts=useAccountApi().searchAccounts;var api=useApi();return useMemo(function(){return {createPost:createPost,togglePostLike:togglePostLike,getPosts:getPosts,updatePost:updatePost,deletePost:deletePost,getPost:getPost,getPostThread:getPostThread,translatePost:translatePost,searchPostMentionUsers:searchPostMentionUsers};function createPost(post){return api.all("posts").post(post).then(function(result){return result.body().data();});}function togglePostLike(postId,isLiked){if(isLiked){return api.custom("posts/"+postId+"/feedback/like").put({});}else {return api.custom("posts/"+postId+"/feedback/like").delete();}}function getPosts(filter){var groupIds=[];for(var _i=1;_i<arguments.length;_i++){groupIds[_i-1]=arguments[_i];}var params=__assign(__assign(__assign({},filter),{groupId:groupIds}),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords));return api.custom("posts?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function updatePost(postId,content,attachments,keywords){return api.all('posts').patch(postId,{content:content,attachments:attachments,keywords:keywords}).then(function(result){return result.body().data();});}function deletePost(postId){return api.all("posts").delete(postId);}function getPost(postId){return api.all('posts').get(postId).then(function(result){return result.body().data();});}function getPostThread(postId,threadId){return api.custom("posts/"+postId+"/comments/"+threadId+"/thread").get().then(function(result){return result.body().data();});}function translatePost(postId,language){return api.custom("posts/"+postId+"/content/"+language).get().then(function(res){return res.body().data();});}function searchPostMentionUsers(searchText,postGroupId){return searchAccounts({search:searchText,type:AccountType.User,localOnly:true,groupId:[postGroupId],excludeApiUsers:true});}},[api,searchAccounts]);}function useEmbeddedObjectValidator(){var _this=this;var getPost=usePostsApi().getPost;var getNews=useNewsApi().get;var loadPage=usePagesApi().loadPage;var getEvent=useEventsApi().getEvent;return function(embeddedObject){return __awaiter(_this,void 0,void 0,function(){var _a,item,error_1;return __generator(this,function(_b){switch(_b.label){case 0:_b.trys.push([0,11,,12]);_a=embeddedObject.type;switch(_a){case AttachmentType.Post:return [3/*break*/,1];case AttachmentType.News:return [3/*break*/,3];case AttachmentType.Page:return [3/*break*/,5];case AttachmentType.Event:return [3/*break*/,7];}return [3/*break*/,9];case 1:return [4/*yield*/,getPost(embeddedObject.id)];case 2:_b.sent();return [2/*return*/,true];case 3:return [4/*yield*/,getNews(embeddedObject.id).toPromise()];case 4:item=_b.sent();return [2/*return*/,!!item];case 5:return [4/*yield*/,loadPage(embeddedObject.id)];case 6:_b.sent();return [2/*return*/,true];case 7:return [4/*yield*/,getEvent(embeddedObject.id)];case 8:_b.sent();return [2/*return*/,true];case 9:throw Error('Invalid type');case 10:return [3/*break*/,12];case 11:error_1=_b.sent();logger.error(error_1);return [2/*return*/,false];case 12:return [2/*return*/];}});});};}var RichCommentInput=/*#__PURE__*/forwardRef(function(_a,ref){var className=_a.className,buttons=_a.buttons,attachments=_a.attachments,deletedAttachmentUrls=_a.deletedAttachmentUrls,onAttachmentsChange=_a.onAttachmentsChange;_a.onDeleteAttachment;var allowAttachments=_a.allowAttachments,useLargeDropTarget=_a.useLargeDropTarget,disableDragAndDrop=_a.disableDragAndDrop,disableAddGif=_a.disableAddGif,disableAddFiles=_a.disableAddFiles,props=__rest(_a,["className","buttons","attachments","deletedAttachmentUrls","onAttachmentsChange","onDeleteAttachment","allowAttachments","useLargeDropTarget","disableDragAndDrop","disableAddGif","disableAddFiles"]);var onDrop=useCallback(handleDropFiles,[attachments,onAttachmentsChange]);var _b=useDropzone({onDrop:onDrop}),getRootProps=_b.getRootProps,getInputProps=_b.getInputProps,open=_b.open,isDragActive=_b.isDragActive;var inputRef=useRef$1(null);var formatMessage=useIntl().formatMessage;useImperativeHandle(ref,function(){return inputRef.current;},[inputRef]);var user=useCurrentUser();var debouncedOnEmbeddedObjectsOrVideosChange=useDebouncedCallback
|
|
131871
|
+
delete filter.restrictToPageContext;}var params=__assign(__assign({},filter),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords));return api.all(basePath+"/search").get('',params).then(function(result){return result.body().data();});}function getDocumentFileUrl(basePath,subscriptionId,pageId,fileId,language,token){return createApiUrl("/"+basePath+"/"+pageId+"/"+language+"/documents/"+fileId,{access_token:token,subscriptionId:subscriptionId});}},[api,createApiUrl]);}function usePostsApi(){var searchAccounts=useAccountApi().searchAccounts;var api=useApi();return useMemo(function(){return {createPost:createPost,togglePostLike:togglePostLike,getPosts:getPosts,updatePost:updatePost,deletePost:deletePost,getPost:getPost,getPostThread:getPostThread,translatePost:translatePost,searchPostMentionUsers:searchPostMentionUsers};function createPost(post){return api.all("posts").post(post).then(function(result){return result.body().data();});}function togglePostLike(postId,isLiked){if(isLiked){return api.custom("posts/"+postId+"/feedback/like").put({});}else {return api.custom("posts/"+postId+"/feedback/like").delete();}}function getPosts(filter){var groupIds=[];for(var _i=1;_i<arguments.length;_i++){groupIds[_i-1]=arguments[_i];}var params=__assign(__assign(__assign({},filter),{groupId:groupIds}),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords));return api.custom("posts?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function updatePost(postId,content,attachments,keywords){return api.all('posts').patch(postId,{content:content,attachments:attachments,keywords:keywords}).then(function(result){return result.body().data();});}function deletePost(postId){return api.all("posts").delete(postId);}function getPost(postId){return api.all('posts').get(postId).then(function(result){return result.body().data();});}function getPostThread(postId,threadId){return api.custom("posts/"+postId+"/comments/"+threadId+"/thread").get().then(function(result){return result.body().data();});}function translatePost(postId,language){return api.custom("posts/"+postId+"/content/"+language).get().then(function(res){return res.body().data();});}function searchPostMentionUsers(searchText,postGroupId){return searchAccounts({search:searchText,type:AccountType.User,localOnly:true,groupId:[postGroupId],excludeApiUsers:true});}},[api,searchAccounts]);}function useEmbeddedObjectValidator(){var _this=this;var getPost=usePostsApi().getPost;var getNews=useNewsApi().get;var loadPage=usePagesApi().loadPage;var getEvent=useEventsApi().getEvent;return function(embeddedObject){return __awaiter(_this,void 0,void 0,function(){var _a,item,error_1;return __generator(this,function(_b){switch(_b.label){case 0:_b.trys.push([0,11,,12]);_a=embeddedObject.type;switch(_a){case AttachmentType.Post:return [3/*break*/,1];case AttachmentType.News:return [3/*break*/,3];case AttachmentType.Page:return [3/*break*/,5];case AttachmentType.Event:return [3/*break*/,7];}return [3/*break*/,9];case 1:return [4/*yield*/,getPost(embeddedObject.id)];case 2:_b.sent();return [2/*return*/,true];case 3:return [4/*yield*/,getNews(embeddedObject.id).toPromise()];case 4:item=_b.sent();return [2/*return*/,!!item];case 5:return [4/*yield*/,loadPage(embeddedObject.id)];case 6:_b.sent();return [2/*return*/,true];case 7:return [4/*yield*/,getEvent(embeddedObject.id)];case 8:_b.sent();return [2/*return*/,true];case 9:throw Error('Invalid type');case 10:return [3/*break*/,12];case 11:error_1=_b.sent();logger.error(error_1);return [2/*return*/,false];case 12:return [2/*return*/];}});});};}var RichCommentInput=/*#__PURE__*/forwardRef(function(_a,ref){var className=_a.className,buttons=_a.buttons,attachments=_a.attachments,deletedAttachmentUrls=_a.deletedAttachmentUrls,onAttachmentsChange=_a.onAttachmentsChange;_a.onDeleteAttachment;var allowAttachments=_a.allowAttachments,useLargeDropTarget=_a.useLargeDropTarget,disableDragAndDrop=_a.disableDragAndDrop,disableAddGif=_a.disableAddGif,disableAddFiles=_a.disableAddFiles,props=__rest(_a,["className","buttons","attachments","deletedAttachmentUrls","onAttachmentsChange","onDeleteAttachment","allowAttachments","useLargeDropTarget","disableDragAndDrop","disableAddGif","disableAddFiles"]);var onDrop=useCallback(handleDropFiles,[attachments,onAttachmentsChange]);var _b=useDropzone({onDrop:onDrop}),getRootProps=_b.getRootProps,getInputProps=_b.getInputProps,open=_b.open,isDragActive=_b.isDragActive;var inputRef=useRef$1(null);var formatMessage=useIntl().formatMessage;useImperativeHandle(ref,function(){return inputRef.current;},[inputRef]);var user=useCurrentUser();var debouncedOnEmbeddedObjectsOrVideosChange=useDebouncedCallback(onEmbeddedObjectsOrVideosChange,500)[0];var validateEmbeddedObject=useEmbeddedObjectValidator();var isGifButtonDisabled=props.disabled||disableAddGif;var isAttachmentsButtonDisabled=props.disabled||disableAddFiles;if(props.disabled||!allowAttachments){return jsx$1(CommentInput,__assign({ref:inputRef,className:className,buttons:buttons},props),void 0);}return jsxs("div",__assign({className:className},{children:[jsx$1("input",__assign({},getInputProps()),void 0),!disableDragAndDrop&&jsx$1(DropTarget,__assign({isActive:isDragActive,isLarge:useLargeDropTarget},getRootProps({onClick:function(e){return e.stopPropagation();}}),{"data-drop-target":true},{children:isDragActive&&jsx$1(DropInfo,{isLarge:useLargeDropTarget},void 0)}),void 0),jsx$1(CommentInput,__assign({},props,{onChange:handleChange,ref:inputRef,buttons:{leftSide:jsxs(Fragment,{children:[jsx$1(GifButton,{disabled:isGifButtonDisabled,onGifClick:handleGifClick},'gifButton'+isGifButtonDisabled),jsx$1(IconButton,{iconProps:{iconName:'Attach'},onClick:open,disabled:isAttachmentsButtonDisabled,"data-button-type":"attach",ariaLabel:formatMessage({id:'AriaLabel.attachmentsButton'})},'attachmentsButton'+isAttachmentsButtonDisabled),buttons.leftSide]},void 0),rightSide:buttons.rightSide}}),void 0)]}),void 0);function handleChange(content){props.onChange(content);debouncedOnEmbeddedObjectsOrVideosChange(content);}function onEmbeddedObjectsOrVideosChange(content){return __awaiter(this,void 0,void 0,function(){var existingAttachments,newAttachments,matchedVideoUrls,_i,matchedVideoUrls_1,matchedUrl,url,id,matchedEmbeddedObjects,_a,matchedEmbeddedObjects_1,matchedEmbeddedObject,url,isValid;return __generator(this,function(_b){switch(_b.label){case 0:existingAttachments=new Set(attachments.map(function(a){return a.url;}));newAttachments=[];matchedVideoUrls=__spreadArray([],Array.from(getAllVideosFromString(content)));for(_i=0,matchedVideoUrls_1=matchedVideoUrls;_i<matchedVideoUrls_1.length;_i++){matchedUrl=matchedVideoUrls_1[_i];url=matchedUrl.url;id=new VideoUrlParser(url).id;if(!existingAttachments.has(url)){newAttachments.push(__assign({id:id},matchedUrl));existingAttachments.add(url);}}matchedEmbeddedObjects=__spreadArray([],Array.from(getEmbeddedObjectsFromString(content)).filter(function(ob){return ob.subscriptionIdentifier===user.subscription.id||ob.subscriptionIdentifier===user.subscription.subscriptionHandle;}));_a=0,matchedEmbeddedObjects_1=matchedEmbeddedObjects;_b.label=1;case 1:if(!(_a<matchedEmbeddedObjects_1.length))return [3/*break*/,4];matchedEmbeddedObject=matchedEmbeddedObjects_1[_a];url=matchedEmbeddedObject.url;if(!(!existingAttachments.has(url)&&!(deletedAttachmentUrls===null||deletedAttachmentUrls===void 0?void 0:deletedAttachmentUrls.includes(url))))return [3/*break*/,3];return [4/*yield*/,validateEmbeddedObject(matchedEmbeddedObject)];case 2:isValid=_b.sent();if(isValid){newAttachments.push(__assign({},matchedEmbeddedObject));existingAttachments.add(url);}_b.label=3;case 3:_a++;return [3/*break*/,1];case 4:if(newAttachments.length!==0){onAttachmentsChange(attachments.concat(newAttachments));}return [2/*return*/];}});});}function handleGifClick(newAttachment){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){onAttachmentsChange(attachments.filter(function(attachment){return attachment.type!==AttachmentType.Giphy;}).concat(newAttachment));return [2/*return*/];});});}function handleDropFiles(dropResult){return __awaiter(this,void 0,void 0,function(){var newFiles,_i,_a,image,size;return __generator(this,function(_b){switch(_b.label){case 0:newFiles=dropResult.map(function(f){return {id:createId(),file:f,filename:f.name,previewUrl:URL.createObjectURL(f),type:f.type.startsWith('image/')?AttachmentType.Image:AttachmentType.File};});_i=0,_a=newFiles.filter(function(f){return f.type===AttachmentType.Image;});_b.label=1;case 1:if(!(_i<_a.length))return [3/*break*/,4];image=_a[_i];return [4/*yield*/,getImageSize(image.previewUrl)];case 2:size=_b.sent();image.width=size.width;image.height=size.height;_b.label=3;case 3:_i++;return [3/*break*/,1];case 4:onAttachmentsChange(attachments.concat(newFiles));return [2/*return*/];}});});}});var getMicrosoftStreamEmbedVideoUrl=function getMicrosoftStreamEmbedVideoUrl(id,autoPlay){if(autoPlay===void 0){autoPlay=false;}return "https://web.microsoftstream.com/embed/video/"+id+"?autoplay="+autoPlay+"&showInfo=true";};var getMicrosoftStreamVideoUrl=function getMicrosoftStreamVideoUrl(id){return "https://web.microsoftstream.com/video/"+id+"?autoplay=true";};var VideoElementGenerator=/** @class */function(){function VideoElementGenerator(videoInfo,iframeAreaLabel,autoplay,width,videoProperties){this.videoInfo=videoInfo;this.iframeAreaLabel=iframeAreaLabel;this.autoplay=autoplay;this.width=width;this.videoProperties=videoProperties;}VideoElementGenerator.prototype.getYouTubeVideoElement=function(){// <iframe
|
|
131872
131872
|
// src="https://www.youtube.com/embed/{videoId}?ecver=1" frameborder="0" allowfullscreen>
|
|
131873
131873
|
// </iframe>
|
|
131874
131874
|
var iframe=document.createElement('iframe');iframe.setAttribute('aria-label',this.iframeAreaLabel);iframe.setAttribute('src',"https://www.youtube.com/embed/"+this.videoInfo.id+"?rel=0&autoplay="+(this.autoplay?'1':'0'));iframe.setAttribute('frameborder','0');iframe.setAttribute('allowfullscreen','');return iframe;};VideoElementGenerator.prototype.getVimeoVideoElement=function(){// <iframe src="https://player.vimeo.com/video/{videoId}"
|
|
@@ -131980,9 +131980,9 @@ if(node.querySelector('[data-code-html]')==null){node.innerHTML='';}}};var Heade
|
|
|
131980
131980
|
},[pollResult,isLoadingPollResult]);// If the pollResult and the choice input is rendered with showResults
|
|
131981
131981
|
// at the same time, we miss the animation of the bars when they fill up
|
|
131982
131982
|
// Delay the pollResult a bit so the users sees the animation
|
|
131983
|
-
var delayedFetchPollResult=useDebouncedCallback
|
|
131983
|
+
var delayedFetchPollResult=useDebouncedCallback(fetchPollResults,500)[0];if(isLoading){return null;}var actualQuestions=__spreadArray(__spreadArray([],questionDefinitions),(additionalQuestions===null||additionalQuestions===void 0?void 0:additionalQuestions.questions)||[]);var hasMissingAnswers=!!userAnswers.find(function(a){return a.choiceIds.length===0;});var hasMissingUnsavedAnswer=unsavedQuestionsIds.length>0||userAnswers.some(function(a){return !a.choiceIds.length;});showResult=(showResult||!hasMissingUnsavedAnswer)&&actualQuestions.length>0;return jsx$1(PollUserContext.Provider,__assign({value:{item:item,resourceType:resourceType,questions:actualQuestions,answers:userAnswers,addAnswer:handleAddAnswer,setAnswers:setUserAnswers,pollResult:pollResult,isLoadingPollResult:isLoadingPollResult,showResult:showResult,hasMissingAnswers:hasMissingAnswers,hasMissingUnsavedAnswer:hasMissingUnsavedAnswer,submitPoll:handleSubmitPoll,getQuestionResult:getQuestionResult,reset:reset,onBehalfOfUpn:onBehalfOfUpn,fetchPollResults:fetchPollResults}},{children:jsx$1(PollTranslationContextProvider,__assign({contents:item.contents,language:language,additionalTranslations:additionalQuestions===null||additionalQuestions===void 0?void 0:additionalQuestions.translations},{children:children}),void 0)}),void 0);function handleAddAnswer(questionId,selectedChoiceIds){setUnsavedQuestionsIds(function(a){return __spreadArray(__spreadArray([],a),[questionId]);});setUserAnswers(function(answers){return answers.map(function(a){return a.questionId===questionId?__assign(__assign({},a),{choiceIds:__spreadArray([],selectedChoiceIds)}):a;});});}function handleSubmitPoll(savePollAnswers){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);setUnsavedQuestionsIds([]);return [4/*yield*/,savePollAnswers()];case 1:_a.sent();delayedFetchPollResult();return [3/*break*/,3];case 2:_a.sent();showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}function reset(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){setUnsavedQuestionsIds([]);setUserAnswers(createUsersAnswersFromFeedback({records:[]}));fetchPollResults();return [2/*return*/];});});}function loadUserAnswers(){return __awaiter(this,void 0,void 0,function(){var feedback,error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);return [4/*yield*/,getFeedback(resourceType,itemId,onBehalfOfUpn)];case 1:feedback=_a.sent();return [3/*break*/,3];case 2:error_2=_a.sent();// if we got a 404, the user doesn't exist, in this case we simply treat the feedback as it is not set yet
|
|
131984
131984
|
if((error_2===null||error_2===void 0?void 0:error_2.response.statusCode)!==404){throw error_2;}feedback={records:[]};return [3/*break*/,3];case 3:return [2/*return*/,createUsersAnswersFromFeedback(feedback)];}});});}function createUsersAnswersFromFeedback(feedback){var pollFeedback=feedback.records.find(function(r){return r.type==='poll';});var answers=pollFeedback?pollFeedback.answers:[];return questionDefinitions.map(function(q){return {questionId:q.questionId,choiceIds:answers.filter(function(a){return a.questionId===q.questionId;}).map(function(a){return a.choiceIds;})[0]||[]};}).concat(getAdditionalUserAnswers?getAdditionalUserAnswers(feedback.records)||[]:[]);}function getQuestionResult(questionId){var userSelectedChoices=userAnswers.filter(function(a){return a.questionId===questionId;}).map(function(a){return a.choiceIds;})[0]||[];return {showResults:showResult||unsavedQuestionsIds.every(function(id){return id!==questionId;})&&userSelectedChoices.length>0,userSelectedChoices:userSelectedChoices,totalFeedbackCount:pollResult.totalFeedbackCount,choiceResults:pollResult.answers.filter(function(a){return a.questionId===questionId;}).reduce(function(result,answer){return __spreadArray(__spreadArray([],result),answer.choices);},[]).reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.choiceId]=next.count,_a));},{})};}};var DetailViewSectionPadding=css$2(templateObject_1$1i||(templateObject_1$1i=__makeTemplateObject(["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingXs,spacingM,spacingM,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$1i;var PollResultFeedbackCount=function PollResultFeedbackCount(){var _a=useContext(PollUserContext),showResult=_a.showResult,pollResult=_a.pollResult;if(!showResult){return null;}return jsx$1("div",__assign({className:"ms-fontColor-neutralTertiary","data-poll-result-total-count":pollResult.totalFeedbackCount},{children:jsx$1(FormattedMessage$1,{id:"Polls.editor.totalFeedbackCount",values:{count:pollResult.totalFeedbackCount},tagName:"span"},void 0)}),void 0);};var DetailViewPoll=function DetailViewPoll(){var _a=useDetailViewContext(),item=_a.item,contentLanguage=_a.contentLanguage,resourceType=_a.resourceType,isEditorPreview=_a.isEditorPreview;var features=useFeatures();var getPollResult=useFeedbackApi().getPollResult;if(!features.polls||item==null||item.poll==null||item.poll.questions==null||item.poll.questions.length===0){return null;}return jsx$1(PollUserContextProvider,__assign({item:item,resourceType:resourceType,language:contentLanguage,getPollResults:function(itemId){return getPollResult(resourceType,itemId);}},{children:jsxs(StyledPollDisplay$1,{children:[jsx$1(PollResultFeedbackCount,{},void 0),jsx$1(DetailViewPollsSubmitButton,{isReadOnly:isEditorPreview},void 0),jsx$1(StyledPollResultExport,{},void 0)]},void 0)}),void 0);};var StyledPollResultExport=_styled(DetailViewPollExportButton).withConfig({displayName:"DetailViewPoll__StyledPollResultExport",componentId:"sc-gvqgh8-0"})(templateObject_1$1h||(templateObject_1$1h=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var StyledPollDisplay$1=_styled(PollDisplay).withConfig({displayName:"DetailViewPoll__StyledPollDisplay",componentId:"sc-gvqgh8-1"})(templateObject_2$L||(templateObject_2$L=__makeTemplateObject(["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"],["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"])),DetailViewSectionPadding,spacingL);var templateObject_1$1h,templateObject_2$L;var EventDetailViewResponseExportButton=function EventDetailViewResponseExportButton(_a){var className=_a.className;var features=useFeatures();if(!features.events){return null;}return jsx$1(DetailViewCsvExportButton,{className:className,path:"feedback/registration/result/export",stringResource:"Events.registration.exportResultsAsCsv"},void 0);};var FeedbackItemType;(function(FeedbackItemType){FeedbackItemType["comment"]="comment";FeedbackItemType["like"]="like";FeedbackItemType["confirm"]="confirm";FeedbackItemType["poll"]="poll";FeedbackItemType["eventRegistration"]="eventRegistration";})(FeedbackItemType||(FeedbackItemType={}));var EventRegistrationContextProvider=function EventRegistrationContextProvider(_a){var _b;var onBehalfOfUpn=_a.onBehalfOfUpn,children=_a.children;var formatMessage=useIntl().formatMessage;var features=useFeatures();var _c=useDetailViewContext(),item=_c.item,contentLanguage=_c.contentLanguage;var getEventRegistrationResults=useEventRegistrationApi().getEventRegistrationResults;if(!features.events||item==null){return null;}var locationQuestionId=getLocationQuestionId(item);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;return jsx$1(PollUserContextProvider,__assign({item:item,onBehalfOfUpn:onBehalfOfUpn,resourceType:ItemResourceTypes.Events,language:contentLanguage,getAdditionalQuestions:function(result){return getAdditionalQuestions(result);},getAdditionalUserAnswers:extractLocationAnswers,getPollResults:getRegistrationResult,showResult:!!isCancelled},{children:children}),void 0);function getAdditionalQuestions(result){var _a=getLocationPollDefinitions(item,formatMessage,result,!!onBehalfOfUpn),question=_a.question,translations=_a.translations;return {questions:question?[question]:null,translations:translations};}function extractLocationAnswers(records){if(!item.locations||item.locations.length<2){return null;}var eventResponse=records.find(function(r){return r.type===FeedbackItemType.eventRegistration;});return [{questionId:locationQuestionId,choiceIds:eventResponse&&eventResponse.locationId?[eventResponse.locationId]:[]}];}function getRegistrationResult(itemId){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getEventRegistrationResults(itemId)];case 1:result=_a.sent();return [2/*return*/,{totalFeedbackCount:result.totalFeedbackCount,answers:result.answers.concat([{questionId:locationQuestionId,choices:result.locationAnswers.map(function(l){return {choiceId:l.locationId,count:l.count};})}])}];}});});}};var EventDetailViewUserRegistration=function EventDetailViewUserRegistration(_a){var className=_a.className,hideInfoMessage=_a.hideInfoMessage;var pollUserContext=useContext(PollUserContext);var getFeedback=useFeedbackApi().getFeedback;var item=pollUserContext.item;var isLoadingPollResult=pollUserContext.isLoadingPollResult,pollResult=pollUserContext.pollResult,onBehalfOfUpn=pollUserContext.onBehalfOfUpn;var _b=usePromise$2(getEventResponse,item.userResponse,[item]),eventResponse=_b[0],isLoading=_b[1],setEventResponse=_b[3];// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
131985
|
-
var seatsResult=useMemo(getSeatsLeft,[isLoading,isLoadingPollResult,pollResult,item.id]);return jsx$1(EventUserRegistrationContext.Provider,__assign({value:__assign(__assign({},pollUserContext),{hasPollContext:true,eventResponse:eventResponse,setEventResponse:setEventResponse,isLoading:isLoadingPollResult||isLoading,seatsInfo:seatsResult})},{children:jsx$1(EventUserRegistration,{className:className,hideInfoMessage:hideInfoMessage},void 0)}),void 0);function getEventResponse(){return __awaiter(this,void 0,void 0,function(){var feedback,eventRecord;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getFeedback(ItemResourceTypes.Events,item.id,onBehalfOfUpn)];case 1:feedback=_a.sent();eventRecord=feedback&&feedback.records.find(function(r){return r.type==='eventRegistration';});return [2/*return*/,eventRecord?eventRecord.eventResponse:EventResponse.NotSet];}});});}function getSeatsLeft(){var _a,_b,_c,_d;if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_a=item.cancelInformation)===null||_a===void 0?void 0:_a.isCancelled)||!((_b=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_b===void 0?void 0:_b.length)||isLoadingPollResult){return {hasAnySeatsLeft:true};}var locationsWithSeats=item.locations.filter(function(l){return l.maxNumberOfSeats>0;});var hasLocationsWithoutSeats=locationsWithSeats.length!==item.locations.length;if(!locationsWithSeats.length||hasLocationsWithoutSeats){return {hasAnySeatsLeft:true};}var locationAnswers=(_d=(_c=pollResult.answers.find(function(a){return a.questionId===getLocationQuestionId(item);}))===null||_c===void 0?void 0:_c.choices)===null||_d===void 0?void 0:_d.reduce(function(prev,curr){prev[curr.choiceId]=curr.count;return prev;},{});var locationsWithSeatsLeft=locationsWithSeats.map(function(l){return __assign(__assign({},l),{seatsLeft:Math.max(l.maxNumberOfSeats-(locationAnswers[l.locationId]||0),0)});});return {hasAnySeatsLeft:locationsWithSeatsLeft.some(function(l){return l.seatsLeft>0;}),locations:locationsWithSeatsLeft};}};var EventRegistrationRegisterSomeoneElseDialog=function EventRegistrationRegisterSomeoneElseDialog(_a){var show=_a.show,onDismiss=_a.onDismiss,onUpdate=_a.onUpdate;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var features=useFeatures();var _b=useState$2(),onBehalfOfUser=_b[0],setOnBehalfOfUser=_b[1];var item=useDetailViewContext().item;var isGroupAdmin=hasMinRoleInAllGroups(GroupRoles.Admin,user,item);useListener(EventResponseTriggerAction.type,function(action){if(action.itemId!==item.id){return false;}onUpdate({upn:onBehalfOfUser.userPrincipalName,displayName:onBehalfOfUser.displayName,locationId:action.locationId},action.response);onDismiss();return true;},[item.id,onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.userPrincipalName]);return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:true,className:'dialog-register-user'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.registerSomeoneElse.title'})},onDismiss:onDismiss},{children:jsxs(Host$s,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$2,{},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.peoplePickerLabel"},void 0),jsx$1(StyledPeoplePicker,{accountType:AccountType.User,allowMailItems:isGroupAdmin&&features.userInvitation,localOnly:!isGroupAdmin,includePendingInvitationUsers:true,includePendingRegistrationUsers:true,selectionMode:SelectionMode.single,selectedItems:onBehalfOfUser?[onBehalfOfUser]:[],onChange:function(accounts){return setOnBehalfOfUser(accounts[0]);},placeholderStringResourceKey:"Events.registration.registerSomeoneElse.peoplePickerPlaceholder",excludedItems:[user]},void 0),onBehalfOfUser&&jsxs(EventRegistrationContextProvider,__assign({onBehalfOfUpn:onBehalfOfUser.userPrincipalName},{children:[jsxs(DialogMainContent,__assign({isScrollable:!env.isAnyMobileApp},{children:[!(onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.id)&&jsx$1(InvitationInfoMessage,{subscriptionName:getSubscriptionName(user.subscription)},void 0),jsx$1(StyledPollDisplay,{},void 0)]}),void 0),jsx$1(DialogFooter,{children:jsxs(Buttons,{children:[jsx$1(CancelButton,{onClick:onDismiss},void 0),jsx$1(EventDetailViewUserRegistration,{hideInfoMessage:true},void 0)]},void 0)},void 0)]}),onBehalfOfUser.userPrincipalName)]}),void 0)}),void 0);};var Host$s=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Host",componentId:"sc-1rziepe-0"})(templateObject_1$1g||(templateObject_1$1g=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"])),minScreenSize.small);var Buttons=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Buttons",componentId:"sc-1rziepe-1"})(templateObject_2$K||(templateObject_2$K=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"],["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"])));var StyledPeoplePicker=_styled(PeoplePicker).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPeoplePicker",componentId:"sc-1rziepe-2"})(templateObject_3$u||(templateObject_3$u=__makeTemplateObject(["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"],["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"])),spacingS,spacingM);var DialogMainContent=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__DialogMainContent",componentId:"sc-1rziepe-3"})(templateObject_5$i||(templateObject_5$i=__makeTemplateObject(["\n ","\n margin-bottom: auto;\n"],["\n ","\n margin-bottom: auto;\n"])),function(p){return p.isScrollable&&css$2(templateObject_4$j||(templateObject_4$j=__makeTemplateObject(["\n max-height: 300px;\n overflow: auto;\n "],["\n max-height: 300px;\n overflow: auto;\n "])));});var StyledPollDisplay=_styled(PollDisplay).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPollDisplay",componentId:"sc-1rziepe-4"})(templateObject_6$c||(templateObject_6$c=__makeTemplateObject(["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"],["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"])));var CancelButton=function CancelButton(_a){var onClick=_a.onClick;return jsx$1(StyledCancelButton,__assign({onClick:onClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0);};var InvitationInfoMessage=function InvitationInfoMessage(_a){var subscriptionName=_a.subscriptionName;return jsxs(InfoMessageHost,{children:[jsx$1(InfoIcon,{iconName:"info"},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.userWillBeInvited",values:{subscriptionName:subscriptionName}},void 0)]},void 0);};var InfoMessageHost=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoMessageHost",componentId:"sc-1rziepe-5"})(templateObject_7$7||(templateObject_7$7=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"])),spacingM);var InfoIcon=_styled(Icon).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoIcon",componentId:"sc-1rziepe-6"})(templateObject_8$6||(templateObject_8$6=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledCancelButton=_styled(DefaultButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledCancelButton",componentId:"sc-1rziepe-7"})(templateObject_9$5||(templateObject_9$5=__makeTemplateObject(["\n && {\n margin-right: ","px;\n }\n"],["\n && {\n margin-right: ","px;\n }\n"])),spacingM);var DialogGlobalStyle$2=createGlobalStyle(templateObject_10$4||(templateObject_10$4=__makeTemplateObject(["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"],["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1g,templateObject_2$K,templateObject_3$u,templateObject_4$j,templateObject_5$i,templateObject_6$c,templateObject_7$7,templateObject_8$6,templateObject_9$5,templateObject_10$4;var EventRegistrationRegisterSomeoneElseButton=function EventRegistrationRegisterSomeoneElseButton(_a){var item=_a.item,onRegister=_a.onRegister,onDeregister=_a.onDeregister;var user=useCurrentUser();var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Fragment,{children:[jsx$1(StyledButton$1,__assign({iconProps:{iconName:'AddFriend'},onClick:function(){return setShowDialog(true);}},{children:jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.title"},void 0)}),void 0),showDialog&&jsx$1(EventRegistrationRegisterSomeoneElseDialog,{onDismiss:handleDismiss,onUpdate:handleUpdate,show:showDialog},void 0)]},void 0);function handleDismiss(){setShowDialog(false);}function handleUpdate(participant,response){if(response===EventResponse.Registered){onRegister===null||onRegister===void 0?void 0:onRegister(participant);}else {onDeregister===null||onDeregister===void 0?void 0:onDeregister(participant);}}};var StyledButton$1=_styled(ActionButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseButton__StyledButton",componentId:"sc-mgwolr-0"})(templateObject_1$1f||(templateObject_1$1f=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"])),spacingS);var templateObject_1$1f;var EventRegistrationDeregisterPersonButton=function EventRegistrationDeregisterPersonButton(_a){var item=_a.item,participant=_a.participant,onDeregistered=_a.onDeregistered;var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var setEventRegistration=useEventRegistrationApi().setEventRegistration;var showToast=useNotificationContext().showToast;var formatMessage=useIntl().formatMessage;var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs("div",{children:[jsx$1(Tooltip,__assign({resourceKey:"Events.registration.deRegisterSomeoneElse.title",values:{name:participant.displayName}},{children:jsx$1(IconButton,{iconProps:{iconName:'Delete'},onClick:function(){return setShowDialog(true);},ariaLabel:formatMessage({id:'Events.registration.deRegisterSomeoneElse.title'},{name:participant.displayName})},void 0)}),void 0),showDialog&&jsx$1(ConfirmDialog,{showDialog:showDialog,titleResourceKey:"Events.registration.deRegisterSomeoneElse.confirmTitle",titleResourceValues:{name:participant.displayName},onConfirm:deRegister,onClose:function(){return setShowDialog(false);}},void 0)]},void 0);function deRegister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:onDeregistered();return [4/*yield*/,setEventRegistration(item.id,EventResponse.NotSet,null,null,participant.upn)];case 1:_a.sent();refreshUserDetails();showToast('Events.registration.onBehalfOfDeregistrationSuccess',{mail:participant.displayName});return [2/*return*/];}});});}};var EventRegistrationParticipantsDialog=function EventRegistrationParticipantsDialog(_a){var numberOfParticipants=_a.numberOfParticipants,show=_a.show,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:false,className:'dialog-event-participants'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.participants'},{count:numberOfParticipants})},onDismiss:onDismiss},{children:jsxs(Host$r,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$1,{},void 0),jsx$1(ParticipantsList,{},void 0)]}),void 0)}),void 0);};var Host$r=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__Host",componentId:"sc-1biaauh-0"})(templateObject_1$1e||(templateObject_1$1e=__makeTemplateObject(["\n @media (min-width: ","px) {\n width: 400px;\n }\n"],["\n @media (min-width: ","px) {\n width: 400px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle$1=createGlobalStyle(templateObject_2$J||(templateObject_2$J=__makeTemplateObject(["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"],["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"])),maxScreenSize.small);var ParticipantsList=function ParticipantsList(){var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var getParticipants=useEventRegistrationApi().getParticipants;var textColors=useContext(ThemeContext$1).theme.textColors;var _a=useContext(PollUserContext),fetchPollResults=_a.fetchPollResults,publishableItem=_a.item;var item=publishableItem;var _b=usePromise$2(getSortedParticipants,[],[item.id]),unfilteredParticipants=_b[0],isLoading=_b[1],setParticipants=_b[3];var handleSearchDebounced=useDebouncedCallback$3(handleSearch,300)[0];var _c=useState$2(),filteredParticipants=_c[0],setFilteredParticipants=_c[1];var participants=filteredParticipants||unfilteredParticipants;return jsxs(ListHost,{children:[jsx$1(EventRegistrationRegisterSomeoneElseButton,{item:item,onDeregister:handleDeregister,onRegister:handleRegister},void 0),jsx$1(SearchArea,{children:jsx$1(StyledSearchBox$1,{placeholder:formatMessage({id:'Events.registration.participants.search.placeholder'}),disabled:isLoading,onChange:function(_,value){return handleSearchDebounced(unfilteredParticipants,value);},iconProps:{style:{color:textColors.default}}},void 0)},void 0),isLoading&&jsx$1(Spinner,{},void 0),jsx$1(ListContainer,__assign({isScrollable:!env.isAnyMobileApp},{children:participants.map(function(p){var showDeregisterButton=p.upn!==user.userPrincipalName;return jsxs(ListRow,{children:[jsx$1(PersonaCardWrapper,__assign({showDeregisterButton:showDeregisterButton},{children:jsx$1(StyledPersonaCard$4,__assign({upn:p.upn},{children:jsx$1(StyledAvatar$3,{upn:p.upn,text:p.displayName,secondaryText:p.location&&formatMessage({id:'Events.registration.participants.location'},{location:p.location})},void 0)}),void 0)}),void 0),showDeregisterButton&&jsx$1(EventRegistrationDeregisterPersonButton,{item:item,participant:p,onDeregistered:function(){return handleDeregister(p);}},void 0)]},p.upn);})}),void 0),!isLoading&&!participants.length&&jsx$1(FormattedMessage$1,{id:"Generic.noResultsFound"},void 0)]},void 0);function getSortedParticipants(){return __awaiter(this,void 0,void 0,function(){var numberOfLocations,locationsMap,participants;return __generator(this,function(_a){switch(_a.label){case 0:numberOfLocations=item===null||item===void 0?void 0:item.locations.length;locationsMap=getLocations();return [4/*yield*/,getParticipants(item.id)];case 1:participants=_a.sent()||[];return [2/*return*/,participants.map(function(p){return __assign(__assign({},p),{location:numberOfLocations>1?locationsMap[p.locationId]||'':''});}).sort(function(a,b){var locationCompare=(locationsMap[a.locationId]||'').localeCompare(locationsMap[b.locationId]||'');if(locationCompare!==0){return locationCompare;}return a.displayName.localeCompare(b.displayName);})];}});});}function getLocations(){var _a;return ((_a=item.locations)===null||_a===void 0?void 0:_a.reduce(function(prev,curr){prev[curr.locationId]=curr.name;return prev;},{}))||{};}function handleSearch(unfilteredParticipants,searchValue){if(!searchValue){setFilteredParticipants(null);return;}var filter=new RegExp(searchValue,'i');setFilteredParticipants(unfilteredParticipants.filter(function(p){return (p.displayName+"|"+p.upn+"|"+p.location).search(filter)>-1;}));}function handleDeregister(participant){setParticipants(function(ps){return ps.filter(function(p){return p.upn!==participant.upn;});});fetchPollResults();setFilteredParticipants(null);}function handleRegister(participant){setParticipants(function(ps){return ps.concat([__assign(__assign({},participant),{location:getLocations()[participant.locationId]||''})]);});fetchPollResults();setFilteredParticipants(null);}};var ListContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListContainer",componentId:"sc-1biaauh-1"})(templateObject_4$i||(templateObject_4$i=__makeTemplateObject(["\n padding: 4px;\n\n ","\n"],["\n padding: 4px;\n\n ","\n"])),function(p){return p.isScrollable&&css$2(templateObject_3$t||(templateObject_3$t=__makeTemplateObject(["\n max-height: 382px;\n overflow: auto;\n "],["\n max-height: 382px;\n overflow: auto;\n "])));});var SearchArea=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__SearchArea",componentId:"sc-1biaauh-2"})(templateObject_5$h||(templateObject_5$h=__makeTemplateObject(["\n margin-bottom: ","px;\n display: flex;\n"],["\n margin-bottom: ","px;\n display: flex;\n"])),spacingM);var StyledSearchBox$1=_styled(SearchBox$1).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledSearchBox",componentId:"sc-1biaauh-3"})(templateObject_6$b||(templateObject_6$b=__makeTemplateObject(["\n flex-grow: 1;\n"],["\n flex-grow: 1;\n"])));var ListRow=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListRow",componentId:"sc-1biaauh-4"})(templateObject_7$6$1||(templateObject_7$6$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"])),spacingS);var PersonaCardWrapper=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__PersonaCardWrapper",componentId:"sc-1biaauh-5"})(templateObject_8$5$1||(templateObject_8$5$1=__makeTemplateObject(["\n width: calc(100% - ","px);\n"],["\n width: calc(100% - ","px);\n"])),function(p){return p.showDeregisterButton?32:0;});var StyledPersonaCard$4=_styled(PersonaCard).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledPersonaCard",componentId:"sc-1biaauh-6"})(templateObject_9$4||(templateObject_9$4=__makeTemplateObject(["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"],["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"])));var StyledAvatar$3=_styled(Avatar).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledAvatar",componentId:"sc-1biaauh-7"})(templateObject_10$3$1||(templateObject_10$3$1=__makeTemplateObject(["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"],["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"])));var ListHost=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListHost",componentId:"sc-1biaauh-8"})(templateObject_11$2$1||(templateObject_11$2$1=__makeTemplateObject([""],[""])));var templateObject_1$1e,templateObject_2$J,templateObject_3$t,templateObject_4$i,templateObject_5$h,templateObject_6$b,templateObject_7$6$1,templateObject_8$5$1,templateObject_9$4,templateObject_10$3$1,templateObject_11$2$1;var EventRegistrationParticipantsLink=function EventRegistrationParticipantsLink(){var _a;var user=useCurrentUser();var _b=useContext(PollUserContext),pollResult=_b.pollResult,publishableItem=_b.item;var item=publishableItem;var _c=useState$2(false),showParticipants=_c[0],setShowParticipants=_c[1];var palette=useContext(ThemeContext$1).theme.palette;if(user.isPublicUser||(pollResult===null||pollResult===void 0?void 0:pollResult.totalFeedbackCount)==null){return null;}var isUserAuthor=hasMinRoleInAllGroups(GroupRoles.Author,user,item);var canOpenParticipantsDialog=isUserAuthor||pollResult.totalFeedbackCount>0&&((_a=item.registrationSettings)===null||_a===void 0?void 0:_a.showParticipantsToEverybody);return jsxs("div",__assign({"data-poll-result-total-count":pollResult.totalFeedbackCount},{children:[!canOpenParticipantsDialog?jsx$1(NoParticipantsContainer,{children:jsx$1(FormattedMessage$1,{id:"Events.registration.participants.count",values:{count:pollResult.totalFeedbackCount}},void 0)},void 0):jsx$1(ParticipantsButton,__assign({onClick:function(){return setShowParticipants(true);},color:palette.accent},{children:jsx$1(FormattedMessage$1,{id:isUserAuthor?'Events.registration.participants.viewAndManage':'Events.registration.participants.count',values:{count:pollResult.totalFeedbackCount}},void 0)}),void 0),jsx$1(EventRegistrationParticipantsDialog,{numberOfParticipants:pollResult.totalFeedbackCount,show:showParticipants,onDismiss:function(){return setShowParticipants(false);}},void 0)]}),void 0);};var NoParticipantsContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsLink__NoParticipantsContainer",componentId:"sc-44nkgi-0"})(templateObject_1$1d||(templateObject_1$1d=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n"],["\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.palette.neutralTertiary;},fontSizeSmall);var ParticipantsButton=_styled(ActionButton).withConfig({displayName:"EventRegistrationParticipantsLink__ParticipantsButton",componentId:"sc-44nkgi-1"})(templateObject_2$I||(templateObject_2$I=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"])),fontSizeSmall);var templateObject_1$1d,templateObject_2$I;var EventDetailViewRegistrationPoll=function EventDetailViewRegistrationPoll(){return jsx$1(EventRegistrationContextProvider,{children:jsxs(StyledPollDisplay$1,{children:[jsx$1(EventRegistrationParticipantsLink,{},void 0),jsx$1(StyledEventUserRegistration,{},void 0),jsx$1(StyledResponseExportButton,{},void 0)]},void 0)},void 0);};var StyledEventUserRegistration=_styled(EventDetailViewUserRegistration).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledEventUserRegistration",componentId:"sc-1kxjndz-0"})(templateObject_1$1c||(templateObject_1$1c=__makeTemplateObject(["\n && {\n margin-top: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n }\n"])),spacingS);var StyledResponseExportButton=_styled(EventDetailViewResponseExportButton).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledResponseExportButton",componentId:"sc-1kxjndz-1"})(templateObject_2$H||(templateObject_2$H=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$1c,templateObject_2$H;var EventDetailViewRegistration=function EventDetailViewRegistration(){var item=useDetailViewContext().item;var isRegistrationEnabled=item.registrationSettings&&item.registrationSettings.enabled;if(isRegistrationEnabled){return jsx$1(EventDetailViewRegistrationPoll,{},void 0);}return jsx$1(DetailViewPoll,{},void 0);};var EventDetailViewCancelInformation=function EventDetailViewCancelInformation(){var _a=useDetailViewContext(),item=_a.item,contentLanguage=_a.contentLanguage;return jsx$1(EventCancelInformation,{item:item,language:contentLanguage},void 0);};var classof$a=classofRaw$1;// `IsArray` abstract operation
|
|
131985
|
+
var seatsResult=useMemo(getSeatsLeft,[isLoading,isLoadingPollResult,pollResult,item.id]);return jsx$1(EventUserRegistrationContext.Provider,__assign({value:__assign(__assign({},pollUserContext),{hasPollContext:true,eventResponse:eventResponse,setEventResponse:setEventResponse,isLoading:isLoadingPollResult||isLoading,seatsInfo:seatsResult})},{children:jsx$1(EventUserRegistration,{className:className,hideInfoMessage:hideInfoMessage},void 0)}),void 0);function getEventResponse(){return __awaiter(this,void 0,void 0,function(){var feedback,eventRecord;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getFeedback(ItemResourceTypes.Events,item.id,onBehalfOfUpn)];case 1:feedback=_a.sent();eventRecord=feedback&&feedback.records.find(function(r){return r.type==='eventRegistration';});return [2/*return*/,eventRecord?eventRecord.eventResponse:EventResponse.NotSet];}});});}function getSeatsLeft(){var _a,_b,_c,_d;if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_a=item.cancelInformation)===null||_a===void 0?void 0:_a.isCancelled)||!((_b=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_b===void 0?void 0:_b.length)||isLoadingPollResult){return {hasAnySeatsLeft:true};}var locationsWithSeats=item.locations.filter(function(l){return l.maxNumberOfSeats>0;});var hasLocationsWithoutSeats=locationsWithSeats.length!==item.locations.length;if(!locationsWithSeats.length||hasLocationsWithoutSeats){return {hasAnySeatsLeft:true};}var locationAnswers=(_d=(_c=pollResult.answers.find(function(a){return a.questionId===getLocationQuestionId(item);}))===null||_c===void 0?void 0:_c.choices)===null||_d===void 0?void 0:_d.reduce(function(prev,curr){prev[curr.choiceId]=curr.count;return prev;},{});var locationsWithSeatsLeft=locationsWithSeats.map(function(l){return __assign(__assign({},l),{seatsLeft:Math.max(l.maxNumberOfSeats-(locationAnswers[l.locationId]||0),0)});});return {hasAnySeatsLeft:locationsWithSeatsLeft.some(function(l){return l.seatsLeft>0;}),locations:locationsWithSeatsLeft};}};var EventRegistrationRegisterSomeoneElseDialog=function EventRegistrationRegisterSomeoneElseDialog(_a){var show=_a.show,onDismiss=_a.onDismiss,onUpdate=_a.onUpdate;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var features=useFeatures();var _b=useState$2(),onBehalfOfUser=_b[0],setOnBehalfOfUser=_b[1];var item=useDetailViewContext().item;var isGroupAdmin=hasMinRoleInAllGroups(GroupRoles.Admin,user,item);useListener(EventResponseTriggerAction.type,function(action){if(action.itemId!==item.id){return false;}onUpdate({upn:onBehalfOfUser.userPrincipalName,displayName:onBehalfOfUser.displayName,locationId:action.locationId},action.response);onDismiss();return true;},[item.id,onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.userPrincipalName]);return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:true,className:'dialog-register-user'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.registerSomeoneElse.title'})},onDismiss:onDismiss},{children:jsxs(Host$s,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$2,{},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.peoplePickerLabel"},void 0),jsx$1(StyledPeoplePicker,{accountType:AccountType.User,allowMailItems:isGroupAdmin&&features.userInvitation,localOnly:!isGroupAdmin,includePendingInvitationUsers:true,includePendingRegistrationUsers:true,selectionMode:SelectionMode.single,selectedItems:onBehalfOfUser?[onBehalfOfUser]:[],onChange:function(accounts){return setOnBehalfOfUser(accounts[0]);},placeholderStringResourceKey:"Events.registration.registerSomeoneElse.peoplePickerPlaceholder",excludedItems:[user]},void 0),onBehalfOfUser&&jsxs(EventRegistrationContextProvider,__assign({onBehalfOfUpn:onBehalfOfUser.userPrincipalName},{children:[jsxs(DialogMainContent,__assign({isScrollable:!env.isAnyMobileApp},{children:[!(onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.id)&&jsx$1(InvitationInfoMessage,{subscriptionName:getSubscriptionName(user.subscription)},void 0),jsx$1(StyledPollDisplay,{},void 0)]}),void 0),jsx$1(DialogFooter,{children:jsxs(Buttons,{children:[jsx$1(CancelButton,{onClick:onDismiss},void 0),jsx$1(EventDetailViewUserRegistration,{hideInfoMessage:true},void 0)]},void 0)},void 0)]}),onBehalfOfUser.userPrincipalName)]}),void 0)}),void 0);};var Host$s=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Host",componentId:"sc-1rziepe-0"})(templateObject_1$1g||(templateObject_1$1g=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"])),minScreenSize.small);var Buttons=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Buttons",componentId:"sc-1rziepe-1"})(templateObject_2$K||(templateObject_2$K=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"],["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"])));var StyledPeoplePicker=_styled(PeoplePicker).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPeoplePicker",componentId:"sc-1rziepe-2"})(templateObject_3$u||(templateObject_3$u=__makeTemplateObject(["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"],["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"])),spacingS,spacingM);var DialogMainContent=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__DialogMainContent",componentId:"sc-1rziepe-3"})(templateObject_5$i||(templateObject_5$i=__makeTemplateObject(["\n ","\n margin-bottom: auto;\n"],["\n ","\n margin-bottom: auto;\n"])),function(p){return p.isScrollable&&css$2(templateObject_4$j||(templateObject_4$j=__makeTemplateObject(["\n max-height: 300px;\n overflow: auto;\n "],["\n max-height: 300px;\n overflow: auto;\n "])));});var StyledPollDisplay=_styled(PollDisplay).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPollDisplay",componentId:"sc-1rziepe-4"})(templateObject_6$c||(templateObject_6$c=__makeTemplateObject(["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"],["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"])));var CancelButton=function CancelButton(_a){var onClick=_a.onClick;return jsx$1(StyledCancelButton,__assign({onClick:onClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0);};var InvitationInfoMessage=function InvitationInfoMessage(_a){var subscriptionName=_a.subscriptionName;return jsxs(InfoMessageHost,{children:[jsx$1(InfoIcon,{iconName:"info"},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.userWillBeInvited",values:{subscriptionName:subscriptionName}},void 0)]},void 0);};var InfoMessageHost=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoMessageHost",componentId:"sc-1rziepe-5"})(templateObject_7$7||(templateObject_7$7=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"])),spacingM);var InfoIcon=_styled(Icon).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoIcon",componentId:"sc-1rziepe-6"})(templateObject_8$6||(templateObject_8$6=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledCancelButton=_styled(DefaultButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledCancelButton",componentId:"sc-1rziepe-7"})(templateObject_9$5||(templateObject_9$5=__makeTemplateObject(["\n && {\n margin-right: ","px;\n }\n"],["\n && {\n margin-right: ","px;\n }\n"])),spacingM);var DialogGlobalStyle$2=createGlobalStyle(templateObject_10$4||(templateObject_10$4=__makeTemplateObject(["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"],["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1g,templateObject_2$K,templateObject_3$u,templateObject_4$j,templateObject_5$i,templateObject_6$c,templateObject_7$7,templateObject_8$6,templateObject_9$5,templateObject_10$4;var EventRegistrationRegisterSomeoneElseButton=function EventRegistrationRegisterSomeoneElseButton(_a){var item=_a.item,onRegister=_a.onRegister,onDeregister=_a.onDeregister;var user=useCurrentUser();var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Fragment,{children:[jsx$1(StyledButton$1,__assign({iconProps:{iconName:'AddFriend'},onClick:function(){return setShowDialog(true);}},{children:jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.title"},void 0)}),void 0),showDialog&&jsx$1(EventRegistrationRegisterSomeoneElseDialog,{onDismiss:handleDismiss,onUpdate:handleUpdate,show:showDialog},void 0)]},void 0);function handleDismiss(){setShowDialog(false);}function handleUpdate(participant,response){if(response===EventResponse.Registered){onRegister===null||onRegister===void 0?void 0:onRegister(participant);}else {onDeregister===null||onDeregister===void 0?void 0:onDeregister(participant);}}};var StyledButton$1=_styled(ActionButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseButton__StyledButton",componentId:"sc-mgwolr-0"})(templateObject_1$1f||(templateObject_1$1f=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"])),spacingS);var templateObject_1$1f;var EventRegistrationDeregisterPersonButton=function EventRegistrationDeregisterPersonButton(_a){var item=_a.item,participant=_a.participant,onDeregistered=_a.onDeregistered;var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var setEventRegistration=useEventRegistrationApi().setEventRegistration;var showToast=useNotificationContext().showToast;var formatMessage=useIntl().formatMessage;var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs("div",{children:[jsx$1(Tooltip,__assign({resourceKey:"Events.registration.deRegisterSomeoneElse.title",values:{name:participant.displayName}},{children:jsx$1(IconButton,{iconProps:{iconName:'Delete'},onClick:function(){return setShowDialog(true);},ariaLabel:formatMessage({id:'Events.registration.deRegisterSomeoneElse.title'},{name:participant.displayName})},void 0)}),void 0),showDialog&&jsx$1(ConfirmDialog,{showDialog:showDialog,titleResourceKey:"Events.registration.deRegisterSomeoneElse.confirmTitle",titleResourceValues:{name:participant.displayName},onConfirm:deRegister,onClose:function(){return setShowDialog(false);}},void 0)]},void 0);function deRegister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:onDeregistered();return [4/*yield*/,setEventRegistration(item.id,EventResponse.NotSet,null,null,participant.upn)];case 1:_a.sent();refreshUserDetails();showToast('Events.registration.onBehalfOfDeregistrationSuccess',{mail:participant.displayName});return [2/*return*/];}});});}};var EventRegistrationParticipantsDialog=function EventRegistrationParticipantsDialog(_a){var numberOfParticipants=_a.numberOfParticipants,show=_a.show,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:false,className:'dialog-event-participants'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.participants'},{count:numberOfParticipants})},onDismiss:onDismiss},{children:jsxs(Host$r,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$1,{},void 0),jsx$1(ParticipantsList,{},void 0)]}),void 0)}),void 0);};var Host$r=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__Host",componentId:"sc-1biaauh-0"})(templateObject_1$1e||(templateObject_1$1e=__makeTemplateObject(["\n @media (min-width: ","px) {\n width: 400px;\n }\n"],["\n @media (min-width: ","px) {\n width: 400px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle$1=createGlobalStyle(templateObject_2$J||(templateObject_2$J=__makeTemplateObject(["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"],["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"])),maxScreenSize.small);var ParticipantsList=function ParticipantsList(){var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var getParticipants=useEventRegistrationApi().getParticipants;var textColors=useContext(ThemeContext$1).theme.textColors;var _a=useContext(PollUserContext),fetchPollResults=_a.fetchPollResults,publishableItem=_a.item;var item=publishableItem;var _b=usePromise$2(getSortedParticipants,[],[item.id]),unfilteredParticipants=_b[0],isLoading=_b[1],setParticipants=_b[3];var handleSearchDebounced=useDebouncedCallback(handleSearch,300)[0];var _c=useState$2(),filteredParticipants=_c[0],setFilteredParticipants=_c[1];var participants=filteredParticipants||unfilteredParticipants;return jsxs(ListHost,{children:[jsx$1(EventRegistrationRegisterSomeoneElseButton,{item:item,onDeregister:handleDeregister,onRegister:handleRegister},void 0),jsx$1(SearchArea,{children:jsx$1(StyledSearchBox$1,{placeholder:formatMessage({id:'Events.registration.participants.search.placeholder'}),disabled:isLoading,onChange:function(_,value){return handleSearchDebounced(unfilteredParticipants,value);},iconProps:{style:{color:textColors.default}}},void 0)},void 0),isLoading&&jsx$1(Spinner,{},void 0),jsx$1(ListContainer,__assign({isScrollable:!env.isAnyMobileApp},{children:participants.map(function(p){var showDeregisterButton=p.upn!==user.userPrincipalName;return jsxs(ListRow,{children:[jsx$1(PersonaCardWrapper,__assign({showDeregisterButton:showDeregisterButton},{children:jsx$1(StyledPersonaCard$4,__assign({upn:p.upn},{children:jsx$1(StyledAvatar$3,{upn:p.upn,text:p.displayName,secondaryText:p.location&&formatMessage({id:'Events.registration.participants.location'},{location:p.location})},void 0)}),void 0)}),void 0),showDeregisterButton&&jsx$1(EventRegistrationDeregisterPersonButton,{item:item,participant:p,onDeregistered:function(){return handleDeregister(p);}},void 0)]},p.upn);})}),void 0),!isLoading&&!participants.length&&jsx$1(FormattedMessage$1,{id:"Generic.noResultsFound"},void 0)]},void 0);function getSortedParticipants(){return __awaiter(this,void 0,void 0,function(){var numberOfLocations,locationsMap,participants;return __generator(this,function(_a){switch(_a.label){case 0:numberOfLocations=item===null||item===void 0?void 0:item.locations.length;locationsMap=getLocations();return [4/*yield*/,getParticipants(item.id)];case 1:participants=_a.sent()||[];return [2/*return*/,participants.map(function(p){return __assign(__assign({},p),{location:numberOfLocations>1?locationsMap[p.locationId]||'':''});}).sort(function(a,b){var locationCompare=(locationsMap[a.locationId]||'').localeCompare(locationsMap[b.locationId]||'');if(locationCompare!==0){return locationCompare;}return a.displayName.localeCompare(b.displayName);})];}});});}function getLocations(){var _a;return ((_a=item.locations)===null||_a===void 0?void 0:_a.reduce(function(prev,curr){prev[curr.locationId]=curr.name;return prev;},{}))||{};}function handleSearch(unfilteredParticipants,searchValue){if(!searchValue){setFilteredParticipants(null);return;}var filter=new RegExp(searchValue,'i');setFilteredParticipants(unfilteredParticipants.filter(function(p){return (p.displayName+"|"+p.upn+"|"+p.location).search(filter)>-1;}));}function handleDeregister(participant){setParticipants(function(ps){return ps.filter(function(p){return p.upn!==participant.upn;});});fetchPollResults();setFilteredParticipants(null);}function handleRegister(participant){setParticipants(function(ps){return ps.concat([__assign(__assign({},participant),{location:getLocations()[participant.locationId]||''})]);});fetchPollResults();setFilteredParticipants(null);}};var ListContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListContainer",componentId:"sc-1biaauh-1"})(templateObject_4$i||(templateObject_4$i=__makeTemplateObject(["\n padding: 4px;\n\n ","\n"],["\n padding: 4px;\n\n ","\n"])),function(p){return p.isScrollable&&css$2(templateObject_3$t||(templateObject_3$t=__makeTemplateObject(["\n max-height: 382px;\n overflow: auto;\n "],["\n max-height: 382px;\n overflow: auto;\n "])));});var SearchArea=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__SearchArea",componentId:"sc-1biaauh-2"})(templateObject_5$h||(templateObject_5$h=__makeTemplateObject(["\n margin-bottom: ","px;\n display: flex;\n"],["\n margin-bottom: ","px;\n display: flex;\n"])),spacingM);var StyledSearchBox$1=_styled(SearchBox$1).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledSearchBox",componentId:"sc-1biaauh-3"})(templateObject_6$b||(templateObject_6$b=__makeTemplateObject(["\n flex-grow: 1;\n"],["\n flex-grow: 1;\n"])));var ListRow=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListRow",componentId:"sc-1biaauh-4"})(templateObject_7$6$1||(templateObject_7$6$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"])),spacingS);var PersonaCardWrapper=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__PersonaCardWrapper",componentId:"sc-1biaauh-5"})(templateObject_8$5$1||(templateObject_8$5$1=__makeTemplateObject(["\n width: calc(100% - ","px);\n"],["\n width: calc(100% - ","px);\n"])),function(p){return p.showDeregisterButton?32:0;});var StyledPersonaCard$4=_styled(PersonaCard).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledPersonaCard",componentId:"sc-1biaauh-6"})(templateObject_9$4||(templateObject_9$4=__makeTemplateObject(["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"],["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"])));var StyledAvatar$3=_styled(Avatar).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledAvatar",componentId:"sc-1biaauh-7"})(templateObject_10$3$1||(templateObject_10$3$1=__makeTemplateObject(["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"],["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"])));var ListHost=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListHost",componentId:"sc-1biaauh-8"})(templateObject_11$2$1||(templateObject_11$2$1=__makeTemplateObject([""],[""])));var templateObject_1$1e,templateObject_2$J,templateObject_3$t,templateObject_4$i,templateObject_5$h,templateObject_6$b,templateObject_7$6$1,templateObject_8$5$1,templateObject_9$4,templateObject_10$3$1,templateObject_11$2$1;var EventRegistrationParticipantsLink=function EventRegistrationParticipantsLink(){var _a;var user=useCurrentUser();var _b=useContext(PollUserContext),pollResult=_b.pollResult,publishableItem=_b.item;var item=publishableItem;var _c=useState$2(false),showParticipants=_c[0],setShowParticipants=_c[1];var palette=useContext(ThemeContext$1).theme.palette;if(user.isPublicUser||(pollResult===null||pollResult===void 0?void 0:pollResult.totalFeedbackCount)==null){return null;}var isUserAuthor=hasMinRoleInAllGroups(GroupRoles.Author,user,item);var canOpenParticipantsDialog=isUserAuthor||pollResult.totalFeedbackCount>0&&((_a=item.registrationSettings)===null||_a===void 0?void 0:_a.showParticipantsToEverybody);return jsxs("div",__assign({"data-poll-result-total-count":pollResult.totalFeedbackCount},{children:[!canOpenParticipantsDialog?jsx$1(NoParticipantsContainer,{children:jsx$1(FormattedMessage$1,{id:"Events.registration.participants.count",values:{count:pollResult.totalFeedbackCount}},void 0)},void 0):jsx$1(ParticipantsButton,__assign({onClick:function(){return setShowParticipants(true);},color:palette.accent},{children:jsx$1(FormattedMessage$1,{id:isUserAuthor?'Events.registration.participants.viewAndManage':'Events.registration.participants.count',values:{count:pollResult.totalFeedbackCount}},void 0)}),void 0),jsx$1(EventRegistrationParticipantsDialog,{numberOfParticipants:pollResult.totalFeedbackCount,show:showParticipants,onDismiss:function(){return setShowParticipants(false);}},void 0)]}),void 0);};var NoParticipantsContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsLink__NoParticipantsContainer",componentId:"sc-44nkgi-0"})(templateObject_1$1d||(templateObject_1$1d=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n"],["\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.palette.neutralTertiary;},fontSizeSmall);var ParticipantsButton=_styled(ActionButton).withConfig({displayName:"EventRegistrationParticipantsLink__ParticipantsButton",componentId:"sc-44nkgi-1"})(templateObject_2$I||(templateObject_2$I=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"])),fontSizeSmall);var templateObject_1$1d,templateObject_2$I;var EventDetailViewRegistrationPoll=function EventDetailViewRegistrationPoll(){return jsx$1(EventRegistrationContextProvider,{children:jsxs(StyledPollDisplay$1,{children:[jsx$1(EventRegistrationParticipantsLink,{},void 0),jsx$1(StyledEventUserRegistration,{},void 0),jsx$1(StyledResponseExportButton,{},void 0)]},void 0)},void 0);};var StyledEventUserRegistration=_styled(EventDetailViewUserRegistration).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledEventUserRegistration",componentId:"sc-1kxjndz-0"})(templateObject_1$1c||(templateObject_1$1c=__makeTemplateObject(["\n && {\n margin-top: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n }\n"])),spacingS);var StyledResponseExportButton=_styled(EventDetailViewResponseExportButton).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledResponseExportButton",componentId:"sc-1kxjndz-1"})(templateObject_2$H||(templateObject_2$H=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$1c,templateObject_2$H;var EventDetailViewRegistration=function EventDetailViewRegistration(){var item=useDetailViewContext().item;var isRegistrationEnabled=item.registrationSettings&&item.registrationSettings.enabled;if(isRegistrationEnabled){return jsx$1(EventDetailViewRegistrationPoll,{},void 0);}return jsx$1(DetailViewPoll,{},void 0);};var EventDetailViewCancelInformation=function EventDetailViewCancelInformation(){var _a=useDetailViewContext(),item=_a.item,contentLanguage=_a.contentLanguage;return jsx$1(EventCancelInformation,{item:item,language:contentLanguage},void 0);};var classof$a=classofRaw$1;// `IsArray` abstract operation
|
|
131986
131986
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
131987
131987
|
var isArray$3=Array.isArray||function isArray(arg){return classof$a(arg)=='Array';};var $$3=_export;var isArray$2=isArray$3;var nativeReverse$1=[].reverse;var test$3=[1,2];// `Array.prototype.reverse` method
|
|
131988
131988
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
|
|
@@ -132008,7 +132008,7 @@ if(container.current&&location.hash==='#comments'){setTimeout(function(){return
|
|
|
132008
132008
|
if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath("/"+type+"/"+item.id)}));}setThreadId(null);}function hasFeedbackEnabled(feedbackType){return hasFeedbackType(feedbackSettings||{},feedbackType);}function handleOnShowAllComments(){var _a;setThreadId(null);if((_a=match.params)===null||_a===void 0?void 0:_a.threadId){history.push(__assign(__assign({},location),{pathname:buildPath(type+"/"+item.id)}));}}};var StyledFeedbackButtons=_styled(FeedbackButtons).withConfig({displayName:"FeedbackSection__StyledFeedbackButtons",componentId:"sc-3bzj8d-0"})(templateObject_1$15||(templateObject_1$15=__makeTemplateObject(["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"],["\n padding-bottom: ",";\n @media (max-width: 500px) {\n margin-bottom: 15px;\n }\n"])),function(p){return p.showComments?'15px':'30px';});var templateObject_1$15;var FeedbackButtonLike=function FeedbackButtonLike(_a){var isReadOnly=_a.isReadOnly;var refreshStatistics=useNewsApi().refreshStatistics;var features=useFeatures();var _b=useContext(FeedbackButtonContext),item=_b.item,likeCount=_b.statistics.likeCount,resourceType=_b.resourceType,hasFeedbackEnabled=_b.hasFeedbackEnabled;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var showError=useNotificationContext().showError;var _d=usePromise$2(getLikeState,false,[item.id]),isLiked=_d[0],isLoading=_d[1],setIsLiked=_d[3];var _e=useState$2(false),isSaving=_e[0],setIsSaving=_e[1];if(!features.likes||!hasFeedbackEnabled('like')){return null;}return jsx$1(LikeButton,{itemType:resourceType,itemId:item.id,isActive:isLiked,readOnly:isLoading||isSaving||isReadOnly,count:likeCount,onClick:function(){return handleLikeChanged(!isLiked);},isDemoContent:item.isDemoContent},void 0);function getLikeState(){var _a;return __awaiter(this,void 0,void 0,function(){var hasPublishedVersion,feedbackSummary;return __generator(this,function(_b){switch(_b.label){case 0:hasPublishedVersion=item.publishedVersionId!=null||item.isCurrentPublishedVersion;if(isReadOnly&&!hasPublishedVersion){return [2/*return*/,false];}if(!features.likes||!hasFeedbackEnabled('like')){return [2/*return*/,false];}return [4/*yield*/,getFeedback(resourceType,item.id)];case 1:feedbackSummary=_b.sent();return [2/*return*/,((_a=feedbackSummary.records)===null||_a===void 0?void 0:_a.findIndex(function(r){return r.type==='like';}))>-1];}});});}function handleLikeChanged(isNowLiked){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving||isLoading){return [2/*return*/];}setIsSaving(true);setIsLiked(isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?1:-1})];case 1:_b.sent();_b.label=2;case 2:_b.trys.push([2,7,9,10]);if(!isNowLiked)return [3/*break*/,4];return [4/*yield*/,setFeedback(resourceType,item.id,'like')];case 3:_b.sent();return [3/*break*/,6];case 4:return [4/*yield*/,unsetFeedback(resourceType,item.id,'like')];case 5:_b.sent();_b.label=6;case 6:return [3/*break*/,10];case 7:_b.sent();setIsLiked(!isNowLiked);return [4/*yield*/,refreshStatistics(item.id,{likeCount:isNowLiked?-1:1})];case 8:_b.sent();showError('NewsArticle.setFeedback_error');return [3/*break*/,10];case 9:setIsSaving(false);return [7/*endfinally*/];case 10:return [2/*return*/];}});});}};var FeedbackButtonComments=function FeedbackButtonComments(){var features=useFeatures();var formatMessage=useIntl().formatMessage;var _a=useContext(FeedbackButtonContext),commentCount=_a.statistics.commentCount,resourceType=_a.resourceType,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.comments||!hasFeedbackEnabled('comment')){return null;}return jsx$1(FeedbackCountButton,{count:commentCount,iconName:"Chat",readOnly:true,tooltipResourceKey:resourceType===ItemResourceTypes.Pages?'Page.numberOfComments':'NewsArticle.numberOfComments',tooltipResourceKeyValues:{count:commentCount},ariaLabel:formatMessage({id:'AriaLabel.commentsButton'}),feedbackType:"comment"},void 0);};var FeedbackButtonViews=function FeedbackButtonViews(){var _a=useContext(FeedbackButtonContext),readCount=_a.statistics.readCount,resourceType=_a.resourceType;var formatMessage=useIntl().formatMessage;var resourceKey=getResourceKey();return jsx$1(FeedbackCountButton,{count:readCount,iconName:"View",readOnly:true,tooltipResourceKey:resourceKey,tooltipResourceKeyValues:{count:readCount},ariaLabel:formatMessage({id:resourceKey},{count:readCount}),feedbackType:"view"},void 0);function getResourceKey(){if(resourceType===ItemResourceTypes.Pages){return 'Page.readersTooltip';}if(resourceType===ItemResourceTypes.News){return 'NewsArticle.readersTooltip';}return 'Events.readersTooltip';}};var EventDownloadCalendarFileButton=function EventDownloadCalendarFileButton(_a){var item=_a.item,className=_a.className;var user=useCurrentUser();var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;return jsx$1(Host$p,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"Events.downloadCalendarFile"},{children:jsx$1(DownloadLink,__assign({href:getDownloadUrl(),"aria-label":formatMessage({id:'Events.downloadCalendarFile'})},{children:jsx$1(Icon,{iconName:"AddEvent"},void 0)}),void 0)}),void 0)}),void 0);function getDownloadUrl(){return createApiUrl("/events/"+encodeURI(item.id)+"/export",{access_token:item.fileAccessToken,subscriptionId:user.subscription.id});}};var Host$p=_styled.div.withConfig({displayName:"EventDownloadCalendarFileButton__Host",componentId:"sc-1hjuosf-0"})(templateObject_1$14||(templateObject_1$14=__makeTemplateObject(["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"],["\n && {\n > div {\n display: inline-block;\n }\n\n i {\n font-size: 22px;\n }\n }\n"])));var DownloadLink=_styled.a.withConfig({displayName:"EventDownloadCalendarFileButton__DownloadLink",componentId:"sc-1hjuosf-1"})(templateObject_2$B||(templateObject_2$B=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ","px;\n width: ","px;\n color: ",";\n"])),feedbackButtonHeight,feedbackButtonHeight,function(p){return p.theme.textColors.default;});var templateObject_1$14,templateObject_2$B;var EventFeedbackButtonDownloadCalendarFile=function EventFeedbackButtonDownloadCalendarFile(){var item=useContext(FeedbackButtonContext).item;return jsx$1(StyledEventDownloadCalendarFileButton,{item:item},void 0);};var StyledEventDownloadCalendarFileButton=_styled(EventDownloadCalendarFileButton).withConfig({displayName:"EventFeedbackButtonDownloadCalendarFile__StyledEventDownloadCalendarFileButton",componentId:"sc-dsznxm-0"})(templateObject_1$13||(templateObject_1$13=__makeTemplateObject(["\n min-width: 60px;\n margin-right: 9px;\n"],["\n min-width: 60px;\n margin-right: 9px;\n"])));var templateObject_1$13;var ShareButton=function ShareButton(_a){var url=_a.url,isReadOnly=_a.isReadOnly,className=_a.className;var copyContainerRef=useRef$1();var _b=useState$2(false),didCopy=_b[0],setDidCopy=_b[1];var onShare=useContext(LinkContext).onShare;var formatMessage=useIntl().formatMessage;return jsx$1(Host$o,__assign({className:className},{children:jsx$1(Tooltip,__assign({resourceKey:"ShareButton.ActionDescription"},{children:jsxs(StyledIconWithCallout,__assign({icon:"Share",onIconClick:function(){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,onShare(url)];case 1:return [2/*return*/,_a.sent()];}});});},onCalloutDismissed:function(){return setDidCopy(false);},directionalHint:DirectionalHint.topAutoEdge,ariaLabel:formatMessage({id:'ShareButton.ActionDescription'}),disabled:isReadOnly},{children:[jsx$1(FormattedMessage$1,{id:"ShareButton.ActionDescription"},void 0),jsxs(CopyContainer,__assign({ref:copyContainerRef},{children:[jsx$1(CopyField,{value:url,readOnly:true,onFocus:handleTextFieldFocus,onMouseUp:function(e){return e.preventDefault();},ariaLabel:formatMessage({id:'AriaLabel.shareButton.copyField'})},void 0),jsx$1(CopyIconButton,{iconProps:{iconName:'Copy'},onClick:copyToClipBoard,ariaLabel:formatMessage({id:'AriaLabel.copyText'})},void 0)]}),void 0),didCopy&&jsx$1(FormattedMessage$1,{id:"ShareButton.CopySuccess"},void 0)]}),void 0)}),void 0)}),void 0);function copyToClipBoard(){var tempTextField=document.createElement('textarea');tempTextField.innerText=url;copyContainerRef.current.appendChild(tempTextField);tempTextField.select();document.execCommand('copy');copyContainerRef.current.removeChild(tempTextField);setDidCopy(true);}function handleTextFieldFocus(event){event.target.select();}};var Host$o=_styled.div.withConfig({displayName:"ShareButton__Host",componentId:"sc-6avyh0-0"})(templateObject_1$12||(templateObject_1$12=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIconWithCallout=_styled(IconWithCallout).withConfig({displayName:"ShareButton__StyledIconWithCallout",componentId:"sc-6avyh0-1"})(templateObject_2$A||(templateObject_2$A=__makeTemplateObject(["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"],["\n button {\n height: ","px;\n }\n\n i {\n font-size: ","px;\n }\n"])),feedbackButtonHeight,fontSizeMedium+4);var CopyContainer=_styled.div.withConfig({displayName:"ShareButton__CopyContainer",componentId:"sc-6avyh0-2"})(templateObject_3$p||(templateObject_3$p=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"],["\n display: flex;\n align-items: center;\n padding: 15px 0;\n"])));var CopyField=_styled(TextField).withConfig({displayName:"ShareButton__CopyField",componentId:"sc-6avyh0-3"})(templateObject_4$f||(templateObject_4$f=__makeTemplateObject(["\n padding-right: ","px;\n width: 400px;\n"],["\n padding-right: ","px;\n width: 400px;\n"])),spacingS);var CopyIconButton=_styled(IconButton).withConfig({displayName:"ShareButton__CopyIconButton",componentId:"sc-6avyh0-4"})(templateObject_5$e||(templateObject_5$e=__makeTemplateObject(["\n i {\n font-size: ","px;\n }\n"],["\n i {\n font-size: ","px;\n }\n"])),fontSizeMedium+4);var templateObject_1$12,templateObject_2$A,templateObject_3$p,templateObject_4$f,templateObject_5$e;var FeedbackButtonShare=function FeedbackButtonShare(_a){var isReadOnly=_a.isReadOnly;var item=useContext(FeedbackButtonContext).item;return jsx$1(ShareButton,{url:item.permalink,isReadOnly:isReadOnly},void 0);};var ConfirmationStatistics=function ConfirmationStatistics(_a){var count=_a.count;return jsxs(Host$n,{children:[jsx$1(Icon,{iconName:"Accept"},void 0),jsx$1(FormattedMessage$1,{id:'NewsArticle.feedback.statistic.label',values:{count:count}},void 0)]},void 0);};var Host$n=_styled.div.withConfig({displayName:"ConfirmationStatistics__Host",componentId:"sc-1wprhw1-0"})(templateObject_1$11||(templateObject_1$11=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n display: inline-flex;\n align-items: center;\n\n i {\n margin-right: ","px;\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),spacingXs-1,maxScreenSize.medium,fontSizeSmall);var templateObject_1$11;var ConfirmationStatisticsExport=function ConfirmationStatisticsExport(_a){var item=_a.item;var createApiUrl=useApiFactory().createApiUrl;var formatMessage=useIntl().formatMessage;var exchangeShortLivedToken=useFileAccessTokenApi().exchangeShortLivedToken;return jsx$1(Host$m,__assign({resourceKey:"DownloadButton.downloadTooltip"},{children:jsx$1(DownloadButton$1,{onClick:startDownload,iconProps:{iconName:'Download'},"aria-label":formatMessage({id:'AriaLabel.confirmationStatisticsExportButton'})},void 0)}),void 0);function startDownload(){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,exchangeShortLivedToken(item.fileAccessToken)];case 1:token=_a.sent();window.open(getFileUrlWithToken(item.id,token||item.fileAccessToken));return [2/*return*/];}});});}function getFileUrlWithToken(newsId,fileDownloadToken){return createApiUrl("/news/"+newsId+"/statistics/confirmations",{access_token:fileDownloadToken});}};var DownloadButton$1=_styled(IconButton$1).withConfig({displayName:"ConfirmationStatisticsExport__DownloadButton",componentId:"sc-1gesr6p-0"})(templateObject_1$10||(templateObject_1$10=__makeTemplateObject(["\n color: ",";\n"],["\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var Host$m=_styled(Tooltip).withConfig({displayName:"ConfirmationStatisticsExport__Host",componentId:"sc-1gesr6p-1"})(templateObject_2$z||(templateObject_2$z=__makeTemplateObject(["\n && {\n display: inline-flex;\n align-items: center;\n }\n"],["\n && {\n display: inline-flex;\n align-items: center;\n }\n"])));var templateObject_1$10,templateObject_2$z;var FeedbackButtonConfirmations=function FeedbackButtonConfirmations(){var features=useFeatures();var user=useCurrentUser();var _a=useContext(FeedbackButtonContext),item=_a.item,confirmationCount=_a.statistics.confirmationCount,hasFeedbackEnabled=_a.hasFeedbackEnabled;if(!features.confirmation||!hasFeedbackEnabled('confirm')||!hasMinRoleInSomeGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Host$l,{children:[jsx$1(ConfirmationStatistics,{count:confirmationCount},void 0),jsx$1(ConfirmationStatisticsExport,{item:item},void 0)]},void 0);};var Host$l=_styled.span.withConfig({displayName:"FeedbackButtonConfirmations__Host",componentId:"sc-sgky21-0"})(templateObject_1$$||(templateObject_1$$=__makeTemplateObject(["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"],["\n margin-left: 30px;\n\n @media all and (max-width: ","px) {\n margin-left: 0;\n width: 100%;\n }\n"])),maxScreenSize.medium);var templateObject_1$$;var EventDetailViewFeedbackSection=function EventDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage;// Info: We need this check so that in Teams on mobile we don't show the
|
|
132009
132009
|
return jsxs(StyledFeedbackSection$2,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(EventFeedbackButtonDownloadCalendarFile,{},void 0),jsx$1(FeedbackButtonShare,{},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection$2=_styled(FeedbackSection).withConfig({displayName:"EventDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-1m82rje-0"})(templateObject_1$_||(templateObject_1$_=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$_;var EventDetailViewPlugins=function EventDetailViewPlugins(_a){var eventItem=_a.eventItem;return jsx$1(Host$k,{area:ExtensionArea.eventDetailViewSection,eventItem:eventItem},void 0);};var Host$k=_styled(Plugins)(templateObject_1$Z||(templateObject_1$Z=__makeTemplateObject(["\n margin: auto -","px;\n padding: 0 ","px;\n\n @media (min-width: ","px) {\n margin: auto -","px;\n padding: 0 ","px;\n }\n"],["\n margin: auto -","px;\n padding: 0 ","px;\n\n @media (min-width: ","px) {\n margin: auto -","px;\n padding: 0 ","px;\n }\n"])),spacingM,spacingM,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$Z;var DateMode;(function(DateMode){DateMode[DateMode["Published"]=0]="Published";DateMode[DateMode["Modified"]=1]="Modified";})(DateMode||(DateMode={}));var DateInfo$1=function DateInfo(_a){var item=_a.item,dateMode=_a.dateMode,expiryDate=_a.expiryDate,className=_a.className;var features=useFeatures();return jsxs("span",__assign({className:className},{children:[dateMode===DateMode.Modified&&getModifiedInfo(),dateMode===DateMode.Published&&getPublishInfo(),expiryDate&&features.expiryDate&&getArchiveInfo()]}),void 0);function getPublishInfo(){var format=isSameDay(item.publishingDate)?'relative':'absolute';if(!item.publishingDate){if(item.status!==WorkflowStatus.approved){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishWhenApproved"},void 0);}return jsx$1(FormattedMessage$1,{id:"DateInfo.published"},void 0);}var values={start:jsx$1(DateTime,{value:item.publishingDate},void 0)};if(new Date(item.publishingDate)>=new Date()){return jsx$1(FormattedMessage$1,{id:item.status!==WorkflowStatus.approved?"DateInfo.publishOnIfApproved."+format:"DateInfo.publishOn."+format,values:values},void 0);}if(item.status===WorkflowStatus.approved){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishedOn."+format,values:values},void 0);}if(!!item.publishedVersionId){return jsx$1(FormattedMessage$1,{id:"DateInfo.publishedWithPendingEdits."+format,values:values},void 0);}return jsx$1(FormattedMessage$1,{id:"DateInfo.missingApproval."+format,values:values},void 0);}function getArchiveInfo(){var format=isSameDay(expiryDate)?'relative':'absolute';var values={end:jsx$1(DateTime,{value:expiryDate},void 0)};if(new Date(expiryDate)<new Date()){// if already expired
|
|
132010
132010
|
return jsxs("span",{children:[",\u00A0",jsx$1(FormattedMessage$1,{id:"DateInfo.archivedOn."+format,values:values},void 0)]},void 0);}else {// not yet expired
|
|
132011
|
-
return jsxs("span",{children:[",",' ',jsx$1(FormattedMessage$1,{id:"DateInfo.archiveOn."+format,values:values},void 0)]},void 0);}}function getModifiedInfo(){var date=item.modified||item.created||new Date();var format=isSameDay(date)?'relative':'absolute';return jsx$1("span",{children:jsx$1(FormattedMessage$1,{id:"DateInfo.modifiedOn."+format,values:{modified:jsx$1(ModifiedDateTime,{value:date},void 0)}},void 0)},void 0);}};var ModifiedDateTime=_styled(DateTime).withConfig({displayName:"DateInfo__ModifiedDateTime",componentId:"sc-xnzpy3-0"})(templateObject_1$Y||(templateObject_1$Y=__makeTemplateObject(["\n &&& {\n text-decoration: none;\n }\n"],["\n &&& {\n text-decoration: none;\n }\n"])));var templateObject_1$Y;var getAuthor=function getAuthor(item){return item.onBehalfOf||item.owner||item.author||{};};var getRealAuthor=function getRealAuthor(item){return item.owner||item.author||{};};var ItemMetaInfo=function ItemMetaInfo(_a){var item=_a.item,className=_a.className,expiryDate=_a.expiryDate,showChannels=_a.showChannels,dateMode=_a.dateMode,channels=_a.channels,_b=_a.readOnly,readOnly=_b===void 0?true:_b,_c=_a.hideAvatar,hideAvatar=_c===void 0?false:_c,hideDisplayName=_a.hideDisplayName,language=_a.language,buildChannelFilterUrl=_a.buildChannelFilterUrl,_d=_a.clickableAvatar,clickableAvatar=_d===void 0?true:_d;var hasChannels=channels&&channels.length>0;var onBehalfAuthor=getAuthor(item);var realAuthor=getRealAuthor(item);return jsxs(Host$j,__assign({className:className,"data-item-metadata":true},{children:[!hideAvatar&&jsx$1(PersonaCard,__assign({upn:onBehalfAuthor.userPrincipalName,readOnly:!clickableAvatar,domIdentifier:"avatar"},{children:jsx$1(Avatar,{upn:onBehalfAuthor.userPrincipalName,text:onBehalfAuthor.displayName,secondaryText:onBehalfAuthor.userPrincipalName,hidePersonaDetails:true,coinSize:55},void 0)}),void 0),jsxs(InfoDetailsHost,__assign({"data-meta-info-details":true},{children:[!hideDisplayName&&jsx$1(AuthorContainer,{children:jsx$1(AuthorName$1,{author:onBehalfAuthor,readOnly:readOnly},void 0)},void 0),jsxs(DateAndChannels,{children:[jsx$1(DateInfo$1,{item:item,dateMode:dateMode,expiryDate:expiryDate},void 0),"\u00A0",showChannels&&jsx$1(Fragment,{children:hasChannels?jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.channels",values:{channels:jsxs(Fragment,{children:["\u00A0",jsx$1(Channels$1,{channels:channels.map(function(c){return c.name;}),language:language,buildChannelFilterUrl:buildChannelFilterUrl},void 0)]},void 0)}},void 0):jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.noChannels"},void 0)},void 0)]},void 0),!hideDisplayName&&realAuthor&&realAuthor.userPrincipalName!==onBehalfAuthor.userPrincipalName&&jsx$1(AuthorContainer,{children:jsx$1(FormattedMessage$1,{id:"MetaInfo.writtenBy",values:{author:jsx$1(AuthorName$1,{author:realAuthor,readOnly:readOnly},void 0)}},void 0)},void 0)]}),void 0)]}),void 0);};var Host$j=_styled.div.withConfig({displayName:"ItemMetaInfo__Host",componentId:"sc-1d6drj8-0"})(templateObject_1$X||(templateObject_1$X=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var InfoDetailsHost=_styled.div.withConfig({displayName:"ItemMetaInfo__InfoDetailsHost",componentId:"sc-1d6drj8-1"})(templateObject_2$y||(templateObject_2$y=__makeTemplateObject(["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"],["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"])));var AuthorContainer=_styled.div.withConfig({displayName:"ItemMetaInfo__AuthorContainer",componentId:"sc-1d6drj8-2"})(templateObject_3$o||(templateObject_3$o=__makeTemplateObject(["\n font-style: normal;\n display: inline-block;\n"],["\n font-style: normal;\n display: inline-block;\n"])));var DateAndChannels=_styled.div.withConfig({displayName:"ItemMetaInfo__DateAndChannels",componentId:"sc-1d6drj8-3"})(templateObject_4$e$1||(templateObject_4$e$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var AuthorName$1=function AuthorName(_a){var author=_a.author,readOnly=_a.readOnly;if(!readOnly){return jsx$1(Fragment,{children:author.displayName},void 0);}return jsx$1(PrimaryPersonaCard,__assign({upn:author.userPrincipalName},{children:author.displayName}),void 0);};var PrimaryPersonaCard=_styled(PersonaCard).withConfig({displayName:"ItemMetaInfo__PrimaryPersonaCard",componentId:"sc-1d6drj8-4"})(templateObject_5$d||(templateObject_5$d=__makeTemplateObject(["\n color: ",";\n text-decoration: underline;\n"],["\n color: ",";\n text-decoration: underline;\n"])),function(p){return p.theme.palette.accent;});var Channels$1=_styled(ClickableChannelTitles).withConfig({displayName:"ItemMetaInfo__Channels",componentId:"sc-1d6drj8-5"})(templateObject_6$8$1||(templateObject_6$8$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$X,templateObject_2$y,templateObject_3$o,templateObject_4$e$1,templateObject_5$d,templateObject_6$8$1;var PageDetailViewMetaInfo=function PageDetailViewMetaInfo(){var _a=useDetailViewContext(),item=_a.item,userPreferredLanguage=_a.userPreferredLanguage;return jsx$1(DetailMetaInfo$1,{item:item,dateMode:DateMode.Modified,language:userPreferredLanguage},void 0);};var DetailMetaInfo$1=_styled(ItemMetaInfo).withConfig({displayName:"PageDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-1yz7bl7-0"})(templateObject_1$W||(templateObject_1$W=__makeTemplateObject(["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"],["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"])),minScreenSize.small);var templateObject_1$W;var PageDetailViewFeedbackSection=function PageDetailViewFeedbackSection(_a){var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType,contentLanguage=_b.contentLanguage;return jsxs(StyledFeedbackSection$1,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:item.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{},void 0)]}),void 0);};var StyledFeedbackSection$1=_styled(FeedbackSection).withConfig({displayName:"PageDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-12s3v5d-0"})(templateObject_1$V||(templateObject_1$V=__makeTemplateObject(["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"],["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"])),DetailViewSectionPadding,spacingXl+10,minScreenSize.small);var templateObject_1$V;var PageTocSearch=function PageTocSearch(_a){var onSearch=_a.onSearch,onSearchResultChange=_a.onSearchResultChange;var formatMessage=useIntl().formatMessage;var onDebouncedSearch=useDebouncedCallback
|
|
132011
|
+
return jsxs("span",{children:[",",' ',jsx$1(FormattedMessage$1,{id:"DateInfo.archiveOn."+format,values:values},void 0)]},void 0);}}function getModifiedInfo(){var date=item.modified||item.created||new Date();var format=isSameDay(date)?'relative':'absolute';return jsx$1("span",{children:jsx$1(FormattedMessage$1,{id:"DateInfo.modifiedOn."+format,values:{modified:jsx$1(ModifiedDateTime,{value:date},void 0)}},void 0)},void 0);}};var ModifiedDateTime=_styled(DateTime).withConfig({displayName:"DateInfo__ModifiedDateTime",componentId:"sc-xnzpy3-0"})(templateObject_1$Y||(templateObject_1$Y=__makeTemplateObject(["\n &&& {\n text-decoration: none;\n }\n"],["\n &&& {\n text-decoration: none;\n }\n"])));var templateObject_1$Y;var getAuthor=function getAuthor(item){return item.onBehalfOf||item.owner||item.author||{};};var getRealAuthor=function getRealAuthor(item){return item.owner||item.author||{};};var ItemMetaInfo=function ItemMetaInfo(_a){var item=_a.item,className=_a.className,expiryDate=_a.expiryDate,showChannels=_a.showChannels,dateMode=_a.dateMode,channels=_a.channels,_b=_a.readOnly,readOnly=_b===void 0?true:_b,_c=_a.hideAvatar,hideAvatar=_c===void 0?false:_c,hideDisplayName=_a.hideDisplayName,language=_a.language,buildChannelFilterUrl=_a.buildChannelFilterUrl,_d=_a.clickableAvatar,clickableAvatar=_d===void 0?true:_d;var hasChannels=channels&&channels.length>0;var onBehalfAuthor=getAuthor(item);var realAuthor=getRealAuthor(item);return jsxs(Host$j,__assign({className:className,"data-item-metadata":true},{children:[!hideAvatar&&jsx$1(PersonaCard,__assign({upn:onBehalfAuthor.userPrincipalName,readOnly:!clickableAvatar,domIdentifier:"avatar"},{children:jsx$1(Avatar,{upn:onBehalfAuthor.userPrincipalName,text:onBehalfAuthor.displayName,secondaryText:onBehalfAuthor.userPrincipalName,hidePersonaDetails:true,coinSize:55},void 0)}),void 0),jsxs(InfoDetailsHost,__assign({"data-meta-info-details":true},{children:[!hideDisplayName&&jsx$1(AuthorContainer,{children:jsx$1(AuthorName$1,{author:onBehalfAuthor,readOnly:readOnly},void 0)},void 0),jsxs(DateAndChannels,{children:[jsx$1(DateInfo$1,{item:item,dateMode:dateMode,expiryDate:expiryDate},void 0),"\u00A0",showChannels&&jsx$1(Fragment,{children:hasChannels?jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.channels",values:{channels:jsxs(Fragment,{children:["\u00A0",jsx$1(Channels$1,{channels:channels.map(function(c){return c.name;}),language:language,buildChannelFilterUrl:buildChannelFilterUrl},void 0)]},void 0)}},void 0):jsx$1(FormattedMessage$1,{id:"NewsMetaInfo.noChannels"},void 0)},void 0)]},void 0),!hideDisplayName&&realAuthor&&realAuthor.userPrincipalName!==onBehalfAuthor.userPrincipalName&&jsx$1(AuthorContainer,{children:jsx$1(FormattedMessage$1,{id:"MetaInfo.writtenBy",values:{author:jsx$1(AuthorName$1,{author:realAuthor,readOnly:readOnly},void 0)}},void 0)},void 0)]}),void 0)]}),void 0);};var Host$j=_styled.div.withConfig({displayName:"ItemMetaInfo__Host",componentId:"sc-1d6drj8-0"})(templateObject_1$X||(templateObject_1$X=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var InfoDetailsHost=_styled.div.withConfig({displayName:"ItemMetaInfo__InfoDetailsHost",componentId:"sc-1d6drj8-1"})(templateObject_2$y||(templateObject_2$y=__makeTemplateObject(["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"],["\n padding-left: 8px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n word-wrap: break-word;\n text-align: left;\n"])));var AuthorContainer=_styled.div.withConfig({displayName:"ItemMetaInfo__AuthorContainer",componentId:"sc-1d6drj8-2"})(templateObject_3$o||(templateObject_3$o=__makeTemplateObject(["\n font-style: normal;\n display: inline-block;\n"],["\n font-style: normal;\n display: inline-block;\n"])));var DateAndChannels=_styled.div.withConfig({displayName:"ItemMetaInfo__DateAndChannels",componentId:"sc-1d6drj8-3"})(templateObject_4$e$1||(templateObject_4$e$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var AuthorName$1=function AuthorName(_a){var author=_a.author,readOnly=_a.readOnly;if(!readOnly){return jsx$1(Fragment,{children:author.displayName},void 0);}return jsx$1(PrimaryPersonaCard,__assign({upn:author.userPrincipalName},{children:author.displayName}),void 0);};var PrimaryPersonaCard=_styled(PersonaCard).withConfig({displayName:"ItemMetaInfo__PrimaryPersonaCard",componentId:"sc-1d6drj8-4"})(templateObject_5$d||(templateObject_5$d=__makeTemplateObject(["\n color: ",";\n text-decoration: underline;\n"],["\n color: ",";\n text-decoration: underline;\n"])),function(p){return p.theme.palette.accent;});var Channels$1=_styled(ClickableChannelTitles).withConfig({displayName:"ItemMetaInfo__Channels",componentId:"sc-1d6drj8-5"})(templateObject_6$8$1||(templateObject_6$8$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$X,templateObject_2$y,templateObject_3$o,templateObject_4$e$1,templateObject_5$d,templateObject_6$8$1;var PageDetailViewMetaInfo=function PageDetailViewMetaInfo(){var _a=useDetailViewContext(),item=_a.item,userPreferredLanguage=_a.userPreferredLanguage;return jsx$1(DetailMetaInfo$1,{item:item,dateMode:DateMode.Modified,language:userPreferredLanguage},void 0);};var DetailMetaInfo$1=_styled(ItemMetaInfo).withConfig({displayName:"PageDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-1yz7bl7-0"})(templateObject_1$W||(templateObject_1$W=__makeTemplateObject(["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"],["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ","px) {\n font-size: 14px;\n }\n"])),minScreenSize.small);var templateObject_1$W;var PageDetailViewFeedbackSection=function PageDetailViewFeedbackSection(_a){var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType,contentLanguage=_b.contentLanguage;return jsxs(StyledFeedbackSection$1,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:item.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{},void 0)]}),void 0);};var StyledFeedbackSection$1=_styled(FeedbackSection).withConfig({displayName:"PageDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-12s3v5d-0"})(templateObject_1$V||(templateObject_1$V=__makeTemplateObject(["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"],["\n ",";\n &[data-comment-section] {\n padding-bottom: ","px;\n\n @media (min-width: ","px) {\n padding-bottom: 0;\n }\n }\n"])),DetailViewSectionPadding,spacingXl+10,minScreenSize.small);var templateObject_1$V;var PageTocSearch=function PageTocSearch(_a){var onSearch=_a.onSearch,onSearchResultChange=_a.onSearchResultChange;var formatMessage=useIntl().formatMessage;var onDebouncedSearch=useDebouncedCallback(handleSearch,300)[0];var textColors=useContext(ThemeContext$1).theme.textColors;return jsx$1(StyledSearchBox$2,{"data-toc-search-box":true,onChange:function(_,v){return onDebouncedSearch(v);},placeholder:formatMessage({id:'Pages.pagesTableOfContents.searchFieldPlaceholder'}),onKeyPress:handleKeyPress,iconProps:{style:{color:textColors.default}}},void 0);function handleKeyPress(event){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!(event.key==='Enter'))return [3/*break*/,2];return [4/*yield*/,handleSearch(event.currentTarget.value,true)];case 1:_a.sent();_a.label=2;case 2:return [2/*return*/];}});});}function handleSearch(value,ignoreSearchTextLength){return __awaiter(this,void 0,void 0,function(){var result,allNodesById;return __generator(this,function(_a){switch(_a.label){case 0:if(!value||!ignoreSearchTextLength&&value.trim().length<3){onSearchResultChange(null);return [2/*return*/];}return [4/*yield*/,onSearch(value)];case 1:result=_a.sent();allNodesById={};// the search returns us a flat result of pages, we now have to build up
|
|
132012
132012
|
// an hierarchical tree, with the roots node at the very top
|
|
132013
132013
|
// so we can then pass this in to the actual ToC
|
|
132014
132014
|
result.items.forEach(function(page){var _a;var node=convertToNavigationNode(page);node.isSearchMatch=true;while(true){// if we already have the current node collected
|
|
@@ -132021,7 +132021,7 @@ var existingNode=allNodesById[node.id];if(existingNode){if(existingNode.id===pag
|
|
|
132021
132021
|
// for this case the blockProps would be an empty object and
|
|
132022
132022
|
// we need to set the showPages and showDocuments to true
|
|
132023
132023
|
var InlinePageListByCurrentPage=function InlinePageListByCurrentPage(_a){var _b=_a.blockProps,props=_b===void 0?{showDocuments:true,showPages:true}:_b;var item=useDetailViewContext().item;var getSubpages=usePagesApi().getSubpages;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=useItemLoaderByCurrentPage(item.id,defaultPageSize,item.navigationContext,{showPages:props.showPages,showDocuments:props.showDocuments},getAllSubItems,[item===null||item===void 0?void 0:item.id]),items=_c.pageItems,pagingProps=_c.pagingProps;if(items.length===0){return null;}return jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:pagingProps,baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0);function getAllSubItems(id,pageType){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getSubpages(id,{pageType:pageType})];case 1:result=_a.sent();return [2/*return*/,result.items];}});});}};var InlinePageList=function InlinePageList(_a){var blockProps=_a.blockProps;if(blockProps===null||blockProps===void 0?void 0:blockProps.keywords){return jsx$1(InlinePageListByKeywords,{keywords:blockProps.keywords.split(','),showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}if(blockProps===null||blockProps===void 0?void 0:blockProps.pageId){return jsx$1(InlinePageListByPageId,{pageId:blockProps.pageId,showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}return jsx$1(InlinePageListByCurrentPage,{blockProps:blockProps},void 0);};var InlinePageListMapper={component:InlinePageList,type:EntityType.InlinePageList,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var pageListId=node.getAttribute('data-page-list-id');if(pageListId==null){return null;}var showChildren=node.getAttribute('data-show-children')==='true';var showDocumentsAttribute=node.getAttribute('data-show-documents');var showPagesAttribute=node.getAttribute('data-show-pages');var pageId=node.getAttribute('data-page-id');var keywords=node.getAttribute('data-keywords');if(!showDocumentsAttribute&&!showPagesAttribute){// ensure backwards compatibility
|
|
132024
|
-
return {id:pageListId,showChildren:showChildren,showPages:true,showDocuments:false,pageId:pageId,keywords:keywords};}var showDocuments=showDocumentsAttribute==='true';var showPages=showPagesAttribute==='true';return {id:pageListId,showChildren:showChildren,showDocuments:showDocuments,showPages:showPages,pageId:pageId,keywords:keywords};}};var PageBreadcrumb=function PageBreadcrumb(_a){var page=_a.page,target=_a.target,languageOverride=_a.language,hideCurrentPageNode=_a.hideCurrentPageNode,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var history=useHistory();if(!page||!page.navigationContext){return null;}var _b=getBreadcrumbsItems(page,target,handleOnClick,function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,hideCurrentPageNode),parentNode=_b.parentNode,breadcrumbItems=_b.breadcrumbItems;return jsxs("div",__assign({className:className},{children:[jsx$1(LargeScreenBreadcrumb,{items:breadcrumbItems,onRenderItem:renderBreadcrumbItem,overflowIndex:1,"data-breadcrumb":true,overflowAriaLabel:formatMessage({id:'AriaLabel.otherPages'}),focusZoneProps:{handleTabKey:1}},void 0),jsx$1(MobileBreadcrumb,{target:target,parentNode:parentNode},void 0)]}),void 0);function renderBreadcrumbItem(item){if(item.key==='home'){return jsx$1(BreadcrumbHomeItem,__assign({to:item.href,"aria-label":item.text,"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0);}if(item.isCurrentItem){return jsx$1(BreadcrumbCurrentItem,__assign({"aria-current":"page"},{children:item.text}),void 0);}return jsx$1(BreadcrumbItem,__assign({to:item.href,"data-page-breadcrumb-node":item.key},{children:item.text}),void 0);}function handleOnClick(e,item){e.stopPropagation();e.preventDefault();history.push({pathname:item.href});}};var MobileBreadcrumb=function MobileBreadcrumb(_a){var target=_a.target,parentNode=_a.parentNode;var formatMessage=useIntl().formatMessage;return jsxs(MobileBreadcrumbHost,__assign({"data-mobile-breadcrumb":true},{children:[jsx$1("li",{children:jsx$1(BreadcrumbHomeItem,__assign({to:target,"aria-label":formatMessage({id:'Generic.home'}),"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0)},void 0),parentNode&&jsxs(ParentNode,{children:[jsx$1(LeftChevronIcon,{iconName:"ChevronLeft"},void 0),jsx$1(BreadcrumbItem,__assign({to:NewsService.getNewsRoute(target,parentNode.id,parentNode.title),"data-page-breadcrumb-parent-node":parentNode.id},{children:parentNode.title}),void 0)]},void 0)]}),void 0);};var MobileBreadcrumbHost=_styled.ul.withConfig({displayName:"PageBreadcrumb__MobileBreadcrumbHost",componentId:"sc-1m4qq1d-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"],["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"])),fontSizeSmall,maxScreenSize.medium);var ParentNode=_styled.li.withConfig({displayName:"PageBreadcrumb__ParentNode",componentId:"sc-1m4qq1d-1"})(templateObject_2$u||(templateObject_2$u=__makeTemplateObject(["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"],["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"])),spacingM,function(p){return p.theme.palette.accent;});var LeftChevronIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__LeftChevronIcon",componentId:"sc-1m4qq1d-2"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"],["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var LargeScreenBreadcrumb=_styled(Breadcrumb).withConfig({displayName:"PageBreadcrumb__LargeScreenBreadcrumb",componentId:"sc-1m4qq1d-3"})(templateObject_4$b$1||(templateObject_4$b$1=__makeTemplateObject(["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.medium);var HomeIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__HomeIcon",componentId:"sc-1m4qq1d-4"})(templateObject_5$a$1||(templateObject_5$a$1=__makeTemplateObject(["\n padding-top: 1px;\n"],["\n padding-top: 1px;\n"])));var BreadcrumbItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbItem",componentId:"sc-1m4qq1d-5"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n padding: 0 ","px;\n color: ",";\n"],["\n padding: 0 ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.accent;});var BreadcrumbHomeItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbHomeItem",componentId:"sc-1m4qq1d-6"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"],["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"])),function(p){return p.theme.palette.accent;},spacingS);var BreadcrumbCurrentItem=_styled.div.withConfig({displayName:"PageBreadcrumb__BreadcrumbCurrentItem",componentId:"sc-1m4qq1d-7"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n padding-left: ","px;\n color: ",";\n"],["\n padding-left: ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$P,templateObject_2$u,templateObject_3$l,templateObject_4$b$1,templateObject_5$a$1,templateObject_6$5$1,templateObject_7$3$1,templateObject_8$3$1;var DetailViewPageDocumentDownload=function DetailViewPageDocumentDownload(){var user=useCurrentUser();var _a=useDetailViewContext(),item=_a.item,preferredContent=_a.content;if(!item){return null;}var content=(preferredContent===null||preferredContent===void 0?void 0:preferredContent.fileInfo)?preferredContent:getContentForPage(item,user).content;if(!(content===null||content===void 0?void 0:content.fileInfo)){return null;}return jsx$1(PageDocumentDownloadButton,{item:item,content:content},void 0);};var PageDocumentDownloadButton=function PageDocumentDownloadButton(_a){var item=_a.item,content=_a.content,basePath=_a.basePath;var _b=useInlinePageDocument({pageId:item.id,fileId:content.fileInfo.fileId,extension:content.fileInfo.extension,title:content.title,fileName:content.fileInfo.fileName},item,basePath),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsxs(Host$i$1,{children:[jsx$1(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsx$1(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$i$1=_styled.div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$O||(templateObject_1$O=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled(InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$t||(templateObject_2$t=__makeTemplateObject(["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"],["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"])),spacingS,minScreenSize.medium);var templateObject_1$O,templateObject_2$t;_styled(PublishableItemBanner).withConfig({displayName:"CardBanner__StyledBanner",componentId:"sc-mqzdnh-0"})(templateObject_1$N||(templateObject_1$N=__makeTemplateObject(["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"],["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"])));var templateObject_1$N;_styled.div.withConfig({displayName:"Card__Host",componentId:"sc-1m8ygh-0"})(templateObject_1$M||(templateObject_1$M=__makeTemplateObject(["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"],["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"])),minScreenSize.small,cardWidthS,minScreenSize.medium,cardWidthM,minScreenSize.large,cardWidthL,minScreenSize.xLarge,cardWidthXL);_styled.article.withConfig({displayName:"Card__Article",componentId:"sc-1m8ygh-1"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"])),function(p){return p.highlight&&css$2(templateObject_2$s||(templateObject_2$s=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),spacingXs,function(p){return p.theme.palette.accent;});},spacingM,bannerAspectRatio,spacingM,minScreenSize.small,cardWidthS,bannerAspectRatio,minScreenSize.medium,cardWidthM,bannerAspectRatio,minScreenSize.large,cardWidthL,bannerAspectRatio,minScreenSize.xLarge,cardWidthXL,bannerAspectRatio);var templateObject_1$M,templateObject_2$s,templateObject_3$k;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$L||(templateObject_1$L=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$L;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$K||(templateObject_1$K=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$K;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType,isEditorPreview=_a.isEditorPreview;if(!item.bannerInfo){return null;}return jsx$1(Banner$3,{itemId:item.id,token:item.fileAccessToken,bannerInfo:item.bannerInfo,useEditorRoutes:isEditorPreview,width:getMaxImageWidth(),canOpenImage:true,resourceType:resourceType},void 0);};var Banner$3=_styled(PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$J||(templateObject_1$J=__makeTemplateObject(["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"],["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"])),bannerAspectRatio,minScreenSize.large+1,minScreenSize.large,spacingM,bannerAspectRatio);var templateObject_1$J;var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsx$1(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled.p.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$I||(templateObject_1$I=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"],["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,spacingS,spacingS+2,fontSizeMedium+2);var templateObject_1$I;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsx$1(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled.section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$H||(templateObject_1$H=__makeTemplateObject(["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"],["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"])),detailViewSectionPadding-5,detailViewSectionPadding,detailViewSectionPadding,minScreenSize.small,detailViewSectionPaddingLarge-10,detailViewSectionPaddingLarge,detailViewSectionPaddingLarge);var templateObject_1$H;var GutterMarkerIcon=function GutterMarkerIcon(_a){var iconName=_a.iconName,children=_a.children,isActive=_a.isActive,color=_a.color,tooltipResourceKey=_a.tooltipResourceKey,className=_a.className;return jsxs(Host$f$1,__assign({className:className},{children:[jsx$1(IconContainer$1,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsx$1(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsx$1(StyledIcon$2$1,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsx$1(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsx$1(Content$3,{children:children},void 0)]}),void 0);};var Host$f$1=_styled.div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$G||(templateObject_1$G=__makeTemplateObject(["\n margin: 0;\n display: flex;\n align-content: center;\n"],["\n margin: 0;\n display: flex;\n align-content: center;\n"])));var StyledIcon$2$1=_styled(Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$r||(templateObject_2$r=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$3=_styled.div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"],["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"])));var ActiveContent=_styled(Content$3).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$a$1||(templateObject_4$a$1=__makeTemplateObject(["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"],["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"])));var IconContainer$1=_styled.div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$9$1||(templateObject_5$9$1=__makeTemplateObject(["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"],["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"])),function(_a){var isActive=_a.isActive;return isActive?'50px':'auto';});var StyledTooltip=_styled(Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$G,templateObject_2$r,templateObject_3$j,templateObject_4$a$1,templateObject_5$9$1,templateObject_6$4$1;var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsx$1(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsx$1(Title$4,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$4=_styled.h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$F||(templateObject_1$F=__makeTemplateObject(["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"],["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"])),fontSizeLarge-1,minScreenSize.small);var templateObject_1$F;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$E||(templateObject_1$E=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$E;var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsx$1(TextViewer,{html:html,componentMappers:mappers},void 0);};var DetailViewBody=function DetailViewBody(){var _a=useDetailViewContext(),content=_a.content,resourceType=_a.resourceType;var bodyHtml=content&&content.body;return jsx$1(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled.div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$D||(templateObject_1$D=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS);var templateObject_1$D;var DetailViewKeywords=function DetailViewKeywords(_a){var filterBaseUrl=_a.filterBaseUrl;var features=useFeatures();var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;var formatMessage=useIntl().formatMessage;if(!features.keywords){return null;}return jsx$1(Fragment,{children:Object.keys(item.keywords).length>0&&jsx$1(KeywordsSection,__assign({"aria-label":formatMessage({id:'AriaLabel.section.keywords'})},{children:jsx$1(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)}),void 0)},void 0);};var KeywordsSection=_styled.section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$C||(templateObject_1$C=__makeTemplateObject(["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),maxScreenSize.medium,fontSizeSmall);var templateObject_1$C;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsx$1(Host$e$1,{children:jsx$1(NeutralCheckBox,{disabled:disabled,checked:checked,onChange:function(_,value){return onChange(value);},label:formatMessage({id:checked?'NewsArticle.confirmed':'NewsArticle.confirm'})},void 0)},void 0);};var Host$e$1=_styled.div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"],["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"])));var templateObject_1$B;var ConfirmationSection=function ConfirmationSection(_a){var item=_a.item,showDescription=_a.showDescription,readOnly=_a.readOnly,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var _d=usePromise$2(function(){return getFeedback(ItemResourceTypes.News,item.id);}),summary=_d[0],isLoading=_d[1];var _e=useState$2(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=useRef$1(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxs(Host$d$1,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsx$1(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsx$1(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsx$1(ConfirmationBox,{checked:checked,disabled:true},void 0):jsx$1(ConfirmationBox,{checked:checked,disabled:checked,onChange:handleClickConfirm},void 0)}),void 0)]}),void 0);function handleClickConfirm(){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:setChecked(true);_a.label=1;case 1:_a.trys.push([1,4,,5]);return [4/*yield*/,setFeedback(ItemResourceTypes.News,item.id,'confirm')];case 2:_a.sent();toastHandle.current=showToast('NewsArticle.confirmationSuccessToast',{},jsx$1(DefaultButton,__assign({onClick:handleUndo},{children:jsx$1(FormattedMessage$1,{id:"Generic.undo"},void 0)}),void 0),{autoClose:false});return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:1})];case 3:_a.sent();return [3/*break*/,5];case 4:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setChecked(false);return [3/*break*/,5];case 5:return [2/*return*/];}});});}function handleUndo(){return __awaiter(this,void 0,void 0,function(){var error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);dismissToast(toastHandle.current);toastHandle.current=null;return [4/*yield*/,unsetFeedback(ItemResourceTypes.News,item.id,'confirm')];case 1:_a.sent();return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:-1})];case 2:_a.sent();setChecked(false);return [3/*break*/,4];case 3:error_2=_a.sent();logger.error(error_2);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var Host$d$1=_styled.div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?0.4:1;},spacingM,minScreenSize.small,spacingS,maxScreenSize.medium,fontSizeSmall);var StyledGutterMarkerIcon=_styled(GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"],["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"])),maxScreenSize.small,spacingM);var templateObject_1$A,templateObject_2$q;var DetailViewConfirmations=function DetailViewConfirmations(){var features=useFeatures();var _a=useDetailViewContext(),item=_a.item,isEditorPreview=_a.isEditorPreview;var formatMessage=useIntl().formatMessage;if(!showConfirmationBox()){return null;}return jsx$1(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsx$1(ConfirmationSection,{item:item,showDescription:true,readOnly:isEditorPreview},void 0)}),void 0);function showConfirmationBox(){return features.confirmation&&item.metadata&&item.metadata.feedbackSettings&&item.metadata.feedbackSettings.feedbackOptions.indexOf('confirm')>=0;}};var ConfirmationHost=_styled.section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingL,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$z;var DetailViewPageViewTracker=function DetailViewPageViewTracker(){var _a=useDetailViewContext(),resourceType=_a.resourceType,itemId=_a.itemId;usePageViewTracker(resourceType,itemId);return null;};var FeedbackButtonBookmark=function FeedbackButtonBookmark(_a){var isReadOnly=_a.isReadOnly;var _b=useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxs(CountButtonHost,{children:[jsx$1(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsx$1(CountLabel,__assign({isDisabled:isReadOnly},{children:bookmarkCount}),void 0)]},void 0);};var NewsDetailViewFeedbackSection=function NewsDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage,isEditorPreview=_c.isEditorPreview;return jsxs(StyledFeedbackSection,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,isReadOnly:isEditorPreview},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonBookmark,{isReadOnly:isEditorPreview},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled(FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$y;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsx$1(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsx$1(ExternalLink$2,__assign({href:externalUrl,className:"ms-fontColor-accent",target:"_blank",rel:"noopener noreferrer"},{children:externalUrl}),void 0)}},void 0)},void 0)}),void 0);};var DetailBody=_styled.div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$x;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsx$1(Headline$1$1,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$1$1=_styled.p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"],["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,fontSizeMedium,spacingS);var templateObject_1$w;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},__assign(__assign(__assign({},filter),getCommaSeparatedChannelsString(filter===null||filter===void 0?void 0:filter.channels)),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords)),{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var $$2$1=_export;var requireObjectCoercible$1$1=requireObjectCoercible$c;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$1=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$1('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
132024
|
+
return {id:pageListId,showChildren:showChildren,showPages:true,showDocuments:false,pageId:pageId,keywords:keywords};}var showDocuments=showDocumentsAttribute==='true';var showPages=showPagesAttribute==='true';return {id:pageListId,showChildren:showChildren,showDocuments:showDocuments,showPages:showPages,pageId:pageId,keywords:keywords};}};var PageBreadcrumb=function PageBreadcrumb(_a){var page=_a.page,target=_a.target,languageOverride=_a.language,hideCurrentPageNode=_a.hideCurrentPageNode,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var history=useHistory();if(!page||!page.navigationContext){return null;}var _b=getBreadcrumbsItems(page,target,handleOnClick,function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,hideCurrentPageNode),parentNode=_b.parentNode,breadcrumbItems=_b.breadcrumbItems;return jsxs("div",__assign({className:className},{children:[jsx$1(LargeScreenBreadcrumb,{items:breadcrumbItems,onRenderItem:renderBreadcrumbItem,overflowIndex:1,"data-breadcrumb":true,overflowAriaLabel:formatMessage({id:'AriaLabel.otherPages'}),focusZoneProps:{handleTabKey:1}},void 0),jsx$1(MobileBreadcrumb,{target:target,parentNode:parentNode},void 0)]}),void 0);function renderBreadcrumbItem(item){if(item.key==='home'){return jsx$1(BreadcrumbHomeItem,__assign({to:item.href,"aria-label":item.text,"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0);}if(item.isCurrentItem){return jsx$1(BreadcrumbCurrentItem,__assign({"aria-current":"page"},{children:item.text}),void 0);}return jsx$1(BreadcrumbItem,__assign({to:item.href,"data-page-breadcrumb-node":item.key},{children:item.text}),void 0);}function handleOnClick(e,item){e.stopPropagation();e.preventDefault();history.push({pathname:item.href});}};var MobileBreadcrumb=function MobileBreadcrumb(_a){var target=_a.target,parentNode=_a.parentNode;var formatMessage=useIntl().formatMessage;return jsxs(MobileBreadcrumbHost,__assign({"data-mobile-breadcrumb":true},{children:[jsx$1("li",{children:jsx$1(BreadcrumbHomeItem,__assign({to:target,"aria-label":formatMessage({id:'Generic.home'}),"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0)},void 0),parentNode&&jsxs(ParentNode,{children:[jsx$1(LeftChevronIcon,{iconName:"ChevronLeft"},void 0),jsx$1(BreadcrumbItem,__assign({to:NewsService.getNewsRoute(target,parentNode.id,parentNode.title),"data-page-breadcrumb-parent-node":parentNode.id},{children:parentNode.title}),void 0)]},void 0)]}),void 0);};var MobileBreadcrumbHost=_styled.ul.withConfig({displayName:"PageBreadcrumb__MobileBreadcrumbHost",componentId:"sc-1m4qq1d-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"],["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"])),fontSizeSmall,maxScreenSize.medium);var ParentNode=_styled.li.withConfig({displayName:"PageBreadcrumb__ParentNode",componentId:"sc-1m4qq1d-1"})(templateObject_2$u||(templateObject_2$u=__makeTemplateObject(["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"],["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"])),spacingM,function(p){return p.theme.palette.accent;});var LeftChevronIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__LeftChevronIcon",componentId:"sc-1m4qq1d-2"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"],["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var LargeScreenBreadcrumb=_styled(Breadcrumb).withConfig({displayName:"PageBreadcrumb__LargeScreenBreadcrumb",componentId:"sc-1m4qq1d-3"})(templateObject_4$b$1||(templateObject_4$b$1=__makeTemplateObject(["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.medium);var HomeIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__HomeIcon",componentId:"sc-1m4qq1d-4"})(templateObject_5$a$1||(templateObject_5$a$1=__makeTemplateObject(["\n padding-top: 1px;\n"],["\n padding-top: 1px;\n"])));var BreadcrumbItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbItem",componentId:"sc-1m4qq1d-5"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n padding: 0 ","px;\n color: ",";\n"],["\n padding: 0 ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.accent;});var BreadcrumbHomeItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbHomeItem",componentId:"sc-1m4qq1d-6"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"],["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"])),function(p){return p.theme.palette.accent;},spacingS);var BreadcrumbCurrentItem=_styled.div.withConfig({displayName:"PageBreadcrumb__BreadcrumbCurrentItem",componentId:"sc-1m4qq1d-7"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n padding-left: ","px;\n color: ",";\n"],["\n padding-left: ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$P,templateObject_2$u,templateObject_3$l,templateObject_4$b$1,templateObject_5$a$1,templateObject_6$5$1,templateObject_7$3$1,templateObject_8$3$1;var DetailViewPageDocumentDownload=function DetailViewPageDocumentDownload(){var user=useCurrentUser();var _a=useDetailViewContext(),item=_a.item,preferredContent=_a.content;if(!item){return null;}var content=(preferredContent===null||preferredContent===void 0?void 0:preferredContent.fileInfo)?preferredContent:getContentForPage(item,user).content;if(!(content===null||content===void 0?void 0:content.fileInfo)){return null;}return jsx$1(PageDocumentDownloadButton,{item:item,content:content},void 0);};var PageDocumentDownloadButton=function PageDocumentDownloadButton(_a){var item=_a.item,content=_a.content,basePath=_a.basePath;var _b=useInlinePageDocument({pageId:item.id,fileId:content.fileInfo.fileId,extension:content.fileInfo.extension,title:content.title,fileName:content.fileInfo.fileName},item,basePath),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsxs(Host$i$1,{children:[jsx$1(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsx$1(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$i$1=_styled.div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$O||(templateObject_1$O=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled(InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$t||(templateObject_2$t=__makeTemplateObject(["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"],["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"])),spacingS,minScreenSize.medium);var templateObject_1$O,templateObject_2$t;_styled(PublishableItemBanner).withConfig({displayName:"CardBanner__StyledBanner",componentId:"sc-mqzdnh-0"})(templateObject_1$N||(templateObject_1$N=__makeTemplateObject(["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"],["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"])));var templateObject_1$N;_styled.div.withConfig({displayName:"Card__Host",componentId:"sc-1m8ygh-0"})(templateObject_1$M||(templateObject_1$M=__makeTemplateObject(["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"],["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"])),minScreenSize.small,cardWidthS,minScreenSize.medium,cardWidthM,minScreenSize.large,cardWidthL,minScreenSize.xLarge,cardWidthXL);_styled.article.withConfig({displayName:"Card__Article",componentId:"sc-1m8ygh-1"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"])),function(p){return p.highlight&&css$2(templateObject_2$s||(templateObject_2$s=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),spacingXs,function(p){return p.theme.palette.accent;});},spacingM,bannerAspectRatio,spacingM,minScreenSize.small,cardWidthS,bannerAspectRatio,minScreenSize.medium,cardWidthM,bannerAspectRatio,minScreenSize.large,cardWidthL,bannerAspectRatio,minScreenSize.xLarge,cardWidthXL,bannerAspectRatio);var templateObject_1$M,templateObject_2$s,templateObject_3$k;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$L||(templateObject_1$L=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$L;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$K||(templateObject_1$K=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$K;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType,isEditorPreview=_a.isEditorPreview;if(!item.bannerInfo){return null;}return jsx$1(Banner$3,{itemId:item.id,token:item.fileAccessToken,bannerInfo:item.bannerInfo,useEditorRoutes:isEditorPreview,width:getMaxImageWidth(),canOpenImage:true,resourceType:resourceType},void 0);};var Banner$3=_styled(PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$J||(templateObject_1$J=__makeTemplateObject(["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"],["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"])),bannerAspectRatio,minScreenSize.large+1,minScreenSize.large,spacingM,bannerAspectRatio);var templateObject_1$J;var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsx$1(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled.p.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$I||(templateObject_1$I=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"],["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,spacingS,spacingS+2,fontSizeMedium+2);var templateObject_1$I;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsx$1(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled.section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$H||(templateObject_1$H=__makeTemplateObject(["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"],["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"])),detailViewSectionPadding-5,detailViewSectionPadding,detailViewSectionPadding,minScreenSize.small,detailViewSectionPaddingLarge-10,detailViewSectionPaddingLarge,detailViewSectionPaddingLarge);var templateObject_1$H;var GutterMarkerIcon=function GutterMarkerIcon(_a){var iconName=_a.iconName,children=_a.children,isActive=_a.isActive,color=_a.color,tooltipResourceKey=_a.tooltipResourceKey,className=_a.className;return jsxs(Host$f$1,__assign({className:className},{children:[jsx$1(IconContainer$1,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsx$1(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsx$1(StyledIcon$2$1,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsx$1(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsx$1(Content$3,{children:children},void 0)]}),void 0);};var Host$f$1=_styled.div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$G||(templateObject_1$G=__makeTemplateObject(["\n margin: 0;\n display: flex;\n align-content: center;\n"],["\n margin: 0;\n display: flex;\n align-content: center;\n"])));var StyledIcon$2$1=_styled(Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$r||(templateObject_2$r=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$3=_styled.div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"],["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"])));var ActiveContent=_styled(Content$3).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$a$1||(templateObject_4$a$1=__makeTemplateObject(["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"],["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"])));var IconContainer$1=_styled.div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$9$1||(templateObject_5$9$1=__makeTemplateObject(["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"],["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"])),function(_a){var isActive=_a.isActive;return isActive?'50px':'auto';});var StyledTooltip=_styled(Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$G,templateObject_2$r,templateObject_3$j,templateObject_4$a$1,templateObject_5$9$1,templateObject_6$4$1;var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsx$1(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsx$1(Title$4,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$4=_styled.h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$F||(templateObject_1$F=__makeTemplateObject(["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"],["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"])),fontSizeLarge-1,minScreenSize.small);var templateObject_1$F;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$E||(templateObject_1$E=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$E;var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsx$1(TextViewer,{html:html,componentMappers:mappers},void 0);};var DetailViewBody=function DetailViewBody(){var _a=useDetailViewContext(),content=_a.content,resourceType=_a.resourceType;var bodyHtml=content&&content.body;return jsx$1(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled.div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$D||(templateObject_1$D=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS);var templateObject_1$D;var DetailViewKeywords=function DetailViewKeywords(_a){var filterBaseUrl=_a.filterBaseUrl;var features=useFeatures();var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;var formatMessage=useIntl().formatMessage;if(!features.keywords){return null;}return jsx$1(Fragment,{children:Object.keys(item.keywords).length>0&&jsx$1(KeywordsSection,__assign({"aria-label":formatMessage({id:'AriaLabel.section.keywords'})},{children:jsx$1(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)}),void 0)},void 0);};var KeywordsSection=_styled.section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$C||(templateObject_1$C=__makeTemplateObject(["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),maxScreenSize.medium,fontSizeSmall);var templateObject_1$C;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsx$1(Host$e$1,{children:jsx$1(NeutralCheckBox,{disabled:disabled,checked:checked,onChange:function(_,value){return onChange(value);},label:formatMessage({id:checked?'NewsArticle.confirmed':'NewsArticle.confirm'})},void 0)},void 0);};var Host$e$1=_styled.div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"],["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"])));var templateObject_1$B;var ConfirmationSection=function ConfirmationSection(_a){var item=_a.item,showDescription=_a.showDescription,readOnly=_a.readOnly,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var _d=usePromise$2(function(){return getFeedback(ItemResourceTypes.News,item.id);}),summary=_d[0],isLoading=_d[1];var _e=useState$2(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=useRef$1(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxs(Host$d$1,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsx$1(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsx$1(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsx$1(ConfirmationBox,{checked:checked,disabled:true},void 0):jsx$1(ConfirmationBox,{checked:checked,disabled:checked,onChange:handleClickConfirm},void 0)}),void 0)]}),void 0);function handleClickConfirm(){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:setChecked(true);_a.label=1;case 1:_a.trys.push([1,4,,5]);return [4/*yield*/,setFeedback(ItemResourceTypes.News,item.id,'confirm')];case 2:_a.sent();toastHandle.current=showToast('NewsArticle.confirmationSuccessToast',{},jsx$1(DefaultButton,__assign({onClick:handleUndo},{children:jsx$1(FormattedMessage$1,{id:"Generic.undo"},void 0)}),void 0),{autoClose:false});return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:1})];case 3:_a.sent();return [3/*break*/,5];case 4:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setChecked(false);return [3/*break*/,5];case 5:return [2/*return*/];}});});}function handleUndo(){return __awaiter(this,void 0,void 0,function(){var error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);dismissToast(toastHandle.current);toastHandle.current=null;return [4/*yield*/,unsetFeedback(ItemResourceTypes.News,item.id,'confirm')];case 1:_a.sent();return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:-1})];case 2:_a.sent();setChecked(false);return [3/*break*/,4];case 3:error_2=_a.sent();logger.error(error_2);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var Host$d$1=_styled.div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?0.4:1;},spacingM,minScreenSize.small,spacingS,maxScreenSize.medium,fontSizeSmall);var StyledGutterMarkerIcon=_styled(GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"],["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"])),maxScreenSize.small,spacingM);var templateObject_1$A,templateObject_2$q;var DetailViewConfirmations=function DetailViewConfirmations(){var features=useFeatures();var _a=useDetailViewContext(),item=_a.item,isEditorPreview=_a.isEditorPreview;var formatMessage=useIntl().formatMessage;if(!showConfirmationBox()){return null;}return jsx$1(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsx$1(ConfirmationSection,{item:item,showDescription:true,readOnly:isEditorPreview},void 0)}),void 0);function showConfirmationBox(){return features.confirmation&&item.metadata&&item.metadata.feedbackSettings&&item.metadata.feedbackSettings.feedbackOptions.indexOf('confirm')>=0;}};var ConfirmationHost=_styled.section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingL,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$z;var DetailViewPageViewTracker=function DetailViewPageViewTracker(){var _a=useDetailViewContext(),resourceType=_a.resourceType,itemId=_a.itemId;usePageViewTracker(resourceType,itemId);return null;};var FeedbackButtonBookmark=function FeedbackButtonBookmark(_a){var isReadOnly=_a.isReadOnly;var _b=useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxs(CountButtonHost,{children:[jsx$1(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsx$1(CountLabel,__assign({isDisabled:isReadOnly},{children:bookmarkCount}),void 0)]},void 0);};var NewsDetailViewFeedbackSection=function NewsDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage,isEditorPreview=_c.isEditorPreview;return jsxs(StyledFeedbackSection,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,isReadOnly:isEditorPreview},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonBookmark,{isReadOnly:isEditorPreview},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled(FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$y;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsx$1(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsx$1(ExternalLink$2,__assign({href:externalUrl,className:"ms-fontColor-accent",target:"_blank",rel:"noopener noreferrer"},{children:externalUrl}),void 0)}},void 0)},void 0)}),void 0);};var DetailBody=_styled.div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$x;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsx$1(Headline$1$1,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$1$1=_styled.p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$w$1||(templateObject_1$w$1=__makeTemplateObject(["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"],["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,fontSizeMedium,spacingS);var templateObject_1$w$1;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},__assign(__assign(__assign({},filter),getCommaSeparatedChannelsString(filter===null||filter===void 0?void 0:filter.channels)),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords)),{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var $$2$1=_export;var requireObjectCoercible$1$1=requireObjectCoercible$c;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$1=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$1('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
132025
132025
|
// https://github.com/tc39/proposal-string-replace-all
|
|
132026
132026
|
$$2$1({target:'String',proto:true},{replaceAll:function replaceAll(searchValue,replaceValue){var O=requireObjectCoercible$1$1(this);var IS_REG_EXP,flags,replacer,string,searchString,template,result,position,index;if(searchValue!=null){IS_REG_EXP=isRegExp(searchValue);if(IS_REG_EXP){flags=String(requireObjectCoercible$1$1('flags'in RegExpPrototype$3?searchValue.flags:getRegExpFlags.call(searchValue)));if(!~flags.indexOf('g'))throw TypeError('`.replaceAll` does not allow non-global regexes');}replacer=searchValue[REPLACE$2];if(replacer!==undefined){return replacer.call(searchValue,O,replaceValue);}}string=String(O);searchString=String(searchValue);if(searchString==='')return replaceAll.call(string,/(?:)/g,replaceValue);template=string.split(searchString);if(typeof replaceValue!=='function'){return template.join(String(replaceValue));}result=template[0];position=result.length;for(index=1;index<template.length;index++){result+=String(replaceValue(searchString,position,string));position+=searchString.length+template[index].length;result+=template[index];}return result;}});_styled.div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$v$1||(templateObject_1$v$1=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n position: relative;\n"],["\n display: flex;\n align-items: flex-end;\n position: relative;\n"])));_styled.textarea.withConfig({displayName:"Textarea__StyledTextarea",componentId:"sc-170lrb4-1"})(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"],["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"])),InputPlaceholder('font-style: italic'));_styled(IconButton$1).withConfig({displayName:"Textarea__StyledIconButton",componentId:"sc-170lrb4-2"})(templateObject_3$i||(templateObject_3$i=__makeTemplateObject(["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"],["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"])));var templateObject_1$v$1,templateObject_2$p,templateObject_3$i;var InsertFilesDialogHost=_styled.div.withConfig({displayName:"InsertFilesButton__InsertFilesDialogHost",componentId:"sc-1q7gx3n-0"})(templateObject_2$o||(templateObject_2$o=__makeTemplateObject(["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])),function(p){return p.isActive&&css$2(templateObject_1$u$1||(templateObject_1$u$1=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "])));},spacingM);_styled.p.withConfig({displayName:"InsertFilesButton__DragAndDropText",componentId:"sc-1q7gx3n-1"})(templateObject_3$h||(templateObject_3$h=__makeTemplateObject(["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"],["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"])),fontSizeSmall,spacingS);_styled(DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$9$1||(templateObject_4$9$1=__makeTemplateObject(["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"],["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"])),spacingM);_styled.div.withConfig({displayName:"InsertFilesButton__ButtonsContainer",componentId:"sc-1q7gx3n-3"})(templateObject_5$8$1||(templateObject_5$8$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var templateObject_1$u$1,templateObject_2$o,templateObject_3$h,templateObject_4$9$1,templateObject_5$8$1;_styled(InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$t$1||(templateObject_1$t$1=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled(PrimaryButton).withConfig({displayName:"InsertImagesButton__StyledButton",componentId:"sc-63tjy6-1"})(templateObject_2$n||(templateObject_2$n=__makeTemplateObject(["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"],["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"])));_styled.div.withConfig({displayName:"InsertImagesButton__Text",componentId:"sc-63tjy6-2"})(templateObject_3$g||(templateObject_3$g=__makeTemplateObject(["\n max-width: 100%;\n font-size: large;\n"],["\n max-width: 100%;\n font-size: large;\n"])));var templateObject_1$t$1,templateObject_2$n,templateObject_3$g;_styled.div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$s$1||(templateObject_1$s$1=__makeTemplateObject(["\n width: 100%;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"],["\n width: 100%;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"])),spacingS);_styled(TextField).withConfig({displayName:"InsertVideoDialog__StyledTextField",componentId:"sc-12gp7sa-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n width: 510px;\n\n label {\n font-weight: normal;\n }\n"],["\n width: 510px;\n\n label {\n font-weight: normal;\n }\n"])));var templateObject_1$s$1,templateObject_2$m;var DateTimePicker=function DateTimePicker(props){var timeField=useRef$1();var formatMessage=useIntl().formatMessage;var _a=useState$2(getTime(props.date)),time=_a[0],setTime=_a[1];var _b=useState$2(false),timeHasFocus=_b[0],setTimeHasFocus=_b[1];var _c=useState$2(null),timeErrorMessageResourceKey=_c[0],setTimeErrorMessageResourceKey=_c[1];var momentMonths=['January','February','March','April','May','June','July','August','September','October','November','December'];var momentWeekdays=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];useEffect$1(function(){// do not update if the user is typing time
|
|
132027
132027
|
if(!timeHasFocus){// We might not know that the time field has the focus after an onBlur from the date field.
|
|
@@ -132035,7 +132035,7 @@ if(!triggerEvenIfUnchanged&&(!newDate&&!props.date||newDate&&newDate.isSame(prop
|
|
|
132035
132035
|
props.onChanged(newDate.toISOString(),validationResult.isInRange);}function handleDateChange(newDate){if(timeField.current){// note: focus event is ignored/not propagated without setTimeout
|
|
132036
132036
|
setTimeout(function(){return timeField.current.focus();},0);}if(!newDate){handleChange(null);}else {// include the current time component when triggering a change.
|
|
132037
132037
|
// newDate is only a Date without time.
|
|
132038
|
-
var newDateOnly=moment(newDate);var timeInMilliseconds=0;if(props.date){var oldDateWithTime=moment(props.date);timeInMilliseconds=oldDateWithTime.diff(oldDateWithTime.clone().startOf('day'));}handleChange(newDateOnly.startOf('day').add(timeInMilliseconds,'ms'));}}function handleTimeBlur(timeString){var newTime=timeString||'00:00';var initialTime=getTime(props.date);if(newTime===initialTime){return;}setTimeHasFocus(false);var timeToday=moment(newTime,'HH:mm');if(!timeToday.isValid()){setTimeErrorMessageResourceKey('DateTimePicker.invalidTime');return;}setTime(timeToday.format('HH:mm'));if(props.date==null){handleChange(timeToday);}else {var timeInMilliseconds=timeToday.diff(moment().startOf('day'));var newValue=moment(props.date).startOf('day').add(timeInMilliseconds,'ms');handleChange(newValue);}}function setTimeError(result){if(result.isInRange||!result.isSameDay){setTimeErrorMessageResourceKey(null);return;}setTimeErrorMessageResourceKey(props.timeValidationResourceKey||props.dateValidationResourceKey);}function isDateTimeInRange(newValue){if(!newValue||!props.minDate&&!props.maxDate){return {isInRange:true,isSameDay:true};}return {isInRange:(!props.minDate||moment(props.minDate).unix()<newValue.unix())&&(!props.maxDate||newValue.unix()<moment(props.maxDate).unix()),isSameDay:isSameDay(newValue,props.minDate||props.maxDate)};}function isSameDay(momentDateTime,otherTime){return momentDateTime&&otherTime&&momentDateTime.isSame(otherTime,'day');}};var IEButtonFix=createGlobalStyle(templateObject_1$r$1||(templateObject_1$r$1=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));var GlobalDatePickerStyle=createGlobalStyle(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});var Host$a$1=_styled.div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$f$1||(templateObject_3$f$1=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$r$1,templateObject_2$l,templateObject_3$f$1;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled.div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$q$1||(templateObject_1$q$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$k$1||(templateObject_2$k$1=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$e$1||(templateObject_3$e$1=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$q$1,templateObject_2$k$1,templateObject_3$e$1;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$p$1||(templateObject_1$p$1=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$p$1;_styled.div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$o$1||(templateObject_1$o$1=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled.p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$j$1||(templateObject_2$j$1=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$o$1,templateObject_2$j$1;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$n$1||(templateObject_1$n$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$i$1||(templateObject_2$i$1=__makeTemplateObject(["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$d$1||(templateObject_3$d$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$n$1,templateObject_2$i$1,templateObject_3$d$1,templateObject_4$8$1,templateObject_5$7$1;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$m$1||(templateObject_1$m$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$h$1||(templateObject_2$h$1=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$m$1,templateObject_2$h$1;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$l$1||(templateObject_1$l$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$g$1||(templateObject_2$g$1=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$c$1||(templateObject_3$c$1=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$l$1,templateObject_2$g$1,templateObject_3$c$1,templateObject_4$7$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var $$1$1=_export;var getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f;var toLength$2=toLength$b;var notARegExp=notARegexp;var requireObjectCoercible$d=requireObjectCoercible$c;var correctIsRegExpLogic=correctIsRegexpLogic;var nativeEndsWith=''.endsWith;var min=Math.min;var CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic('endsWith');// https://github.com/zloirock/core-js/pull/702
|
|
132038
|
+
var newDateOnly=moment(newDate);var timeInMilliseconds=0;if(props.date){var oldDateWithTime=moment(props.date);timeInMilliseconds=oldDateWithTime.diff(oldDateWithTime.clone().startOf('day'));}handleChange(newDateOnly.startOf('day').add(timeInMilliseconds,'ms'));}}function handleTimeBlur(timeString){var newTime=timeString||'00:00';var initialTime=getTime(props.date);if(newTime===initialTime){return;}setTimeHasFocus(false);var timeToday=moment(newTime,'HH:mm');if(!timeToday.isValid()){setTimeErrorMessageResourceKey('DateTimePicker.invalidTime');return;}setTime(timeToday.format('HH:mm'));if(props.date==null){handleChange(timeToday);}else {var timeInMilliseconds=timeToday.diff(moment().startOf('day'));var newValue=moment(props.date).startOf('day').add(timeInMilliseconds,'ms');handleChange(newValue);}}function setTimeError(result){if(result.isInRange||!result.isSameDay){setTimeErrorMessageResourceKey(null);return;}setTimeErrorMessageResourceKey(props.timeValidationResourceKey||props.dateValidationResourceKey);}function isDateTimeInRange(newValue){if(!newValue||!props.minDate&&!props.maxDate){return {isInRange:true,isSameDay:true};}return {isInRange:(!props.minDate||moment(props.minDate).unix()<newValue.unix())&&(!props.maxDate||newValue.unix()<moment(props.maxDate).unix()),isSameDay:isSameDay(newValue,props.minDate||props.maxDate)};}function isSameDay(momentDateTime,otherTime){return momentDateTime&&otherTime&&momentDateTime.isSame(otherTime,'day');}};var IEButtonFix=createGlobalStyle(templateObject_1$r$1||(templateObject_1$r$1=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));var GlobalDatePickerStyle=createGlobalStyle(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});var Host$a$1=_styled.div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$f$1||(templateObject_3$f$1=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$r$1,templateObject_2$l,templateObject_3$f$1;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled.div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$q$1||(templateObject_1$q$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$k||(templateObject_2$k=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$e$1||(templateObject_3$e$1=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$q$1,templateObject_2$k,templateObject_3$e$1;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$p$1||(templateObject_1$p$1=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$p$1;_styled.div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$o$1||(templateObject_1$o$1=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled.p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$j$1||(templateObject_2$j$1=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$o$1,templateObject_2$j$1;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$n$1||(templateObject_1$n$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$i$1||(templateObject_2$i$1=__makeTemplateObject(["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$d$1||(templateObject_3$d$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$n$1,templateObject_2$i$1,templateObject_3$d$1,templateObject_4$8$1,templateObject_5$7$1;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$m$1||(templateObject_1$m$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$h$1||(templateObject_2$h$1=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$m$1,templateObject_2$h$1;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$l$1||(templateObject_1$l$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$g$1||(templateObject_2$g$1=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$c$1||(templateObject_3$c$1=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$l$1,templateObject_2$g$1,templateObject_3$c$1,templateObject_4$7$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var $$1$1=_export;var getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f;var toLength$2=toLength$b;var notARegExp=notARegexp;var requireObjectCoercible$d=requireObjectCoercible$c;var correctIsRegExpLogic=correctIsRegexpLogic;var nativeEndsWith=''.endsWith;var min=Math.min;var CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic('endsWith');// https://github.com/zloirock/core-js/pull/702
|
|
132039
132039
|
var MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var descriptor=getOwnPropertyDescriptor(String.prototype,'endsWith');return descriptor&&!descriptor.writable;}();// `String.prototype.endsWith` method
|
|
132040
132040
|
// https://tc39.github.io/ecma262/#sec-string.prototype.endswith
|
|
132041
132041
|
$$1$1({target:'String',proto:true,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{endsWith:function endsWith(searchString/* , endPosition = @length */){var that=String(requireObjectCoercible$d(this));notARegExp(searchString);var endPosition=arguments.length>1?arguments[1]:undefined;var len=toLength$2(that.length);var end=endPosition===undefined?len:min(toLength$2(endPosition),len);var search=String(searchString);return nativeEndsWith?nativeEndsWith.call(that,search,end):that.slice(end-search.length,end)===search;}});var SearchHighlighter=function SearchHighlighter(_a){var highlight=_a.highlight;if(!highlight){return null;}return jsx$1(Fragment,{children:highlight.texts.map(function(t){return jsxs(TextEntry,__assign({highlight:t.type==='hit'},{children:[t.value.startsWith(' ')?jsx$1(Fragment,{children:"\u00A0"},void 0):null,t.value.trim(),t.value.endsWith(' ')?jsx$1(Fragment,{children:"\u00A0"},void 0):null]}),void 0);})},void 0);};var TextEntry=_styled.span.withConfig({displayName:"SearchHighlighter__TextEntry",componentId:"sc-1a25f6p-0"})(templateObject_2$f$1||(templateObject_2$f$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.highlight&&css$2(templateObject_1$k$1||(templateObject_1$k$1=__makeTemplateObject(["\n background-color: yellow;\n "],["\n background-color: yellow;\n "])));});function tryGetHighlight(highlights,preferredLanguage){var _a;if(!highlights){return null;}return (_a=tryGetAllHighlights(highlights,preferredLanguage))===null||_a===void 0?void 0:_a[0];}function tryGetAllHighlights(highlights,preferredLanguage){if(!highlights){return null;}var preferredHighlights=highlights.filter(function(h){return h.language===preferredLanguage;});if(preferredHighlights.length){return preferredHighlights;}var firstHighlight=highlights[0];return highlights.filter(function(h){return h.language===firstHighlight.language;});}var templateObject_1$k$1,templateObject_2$f$1;var PageTitle=function PageTitle(_a){var page=_a.page,title=_a.title,search=_a.search,className=_a.className;var user=useCurrentUser();var isDocument=page.pageType===PageType.Document;var language=getLanguageForPage(page,user);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var handleExternalContentClick=useExternalContentClickHandler();var pageTitle=jsx$1(Fragment,{children:search?jsx$1(TitleHighlight,{search:search,title:title,page:page},void 0):title},void 0);if(page.useExternalContent){var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(page,preferredContentLanguage);var targetRoute=NewsService.getNewsRoute(buildPath('/pages'),page.id,title);return jsx$1(Title$1$1,{children:jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsx$1(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsx$1(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var TitleHighlight=function TitleHighlight(_a){var _b;var search=_a.search,title=_a.title,page=_a.page;var user=useCurrentUser();var preferredLanguage=NewsService.getLanguageForContent(page.contents,user);var titleHighlight=tryGetHighlight((_b=page.searchHighlights)===null||_b===void 0?void 0:_b.title,preferredLanguage);if(titleHighlight){return jsx$1(SearchHighlighter,{highlight:titleHighlight},void 0);}return jsx$1(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0);};var Title$1$1=_styled.h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"],["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"])),spacingS+5,spacingS,fontSizeMedium);var FileIcon=_styled(Icon).withConfig({displayName:"PageTitle__FileIcon",componentId:"sc-gsx6ad-1"})(templateObject_2$e$1||(templateObject_2$e$1=__makeTemplateObject(["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"],["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"])),fontSizeMedium+4,spacingS);var StyledNavLink=_styled(NavLink).withConfig({displayName:"PageTitle__StyledNavLink",componentId:"sc-gsx6ad-2"})(templateObject_3$b$1||(templateObject_3$b$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$j$1,templateObject_2$e$1,templateObject_3$b$1;_styled.div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$i$1||(templateObject_1$i$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageTitle).withConfig({displayName:"PageCard__StyledPageTitle",componentId:"sc-13xtreq-1"})(templateObject_2$d$1||(templateObject_2$d$1=__makeTemplateObject(["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"],["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"])));_styled(Intro$3).withConfig({displayName:"PageCard__StyledIntro",componentId:"sc-13xtreq-2"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"])),spacingS,spacingS);_styled.div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"],["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageCard__Inner",componentId:"sc-13xtreq-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"],["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"])),spacingM,spacingS);_styled(DocumentDownloadButton).withConfig({displayName:"PageCard__StyledDocumentDownloadButton",componentId:"sc-13xtreq-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n align-self: flex-start;\n z-index: 1;\n"],["\n align-self: flex-start;\n z-index: 1;\n"])));var templateObject_1$i$1,templateObject_2$d$1,templateObject_3$a$1,templateObject_4$6$1,templateObject_5$5$1,templateObject_6$2$1;_styled.p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$h$1||(templateObject_1$h$1=__makeTemplateObject(["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"],["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"])),spacingM-5,fontSizeSmall);_styled.div.withConfig({displayName:"PageListItemBody__CutContentContainer",componentId:"sc-7voum-1"})(templateObject_2$c$1||(templateObject_2$c$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"])),spacingM-5);_styled.p.withConfig({displayName:"PageListItemBody__CutContent",componentId:"sc-7voum-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n padding: 0;\n margin: 0;\n ","\n"],["\n padding: 0;\n margin: 0;\n ","\n"])),LineClamp(5,fontSizeSmall,1.5));_styled(ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"],["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"])),spacingXs,spacingXs,spacingXs,fontSizeSmaller);var templateObject_1$h$1,templateObject_2$c$1,templateObject_3$9$1,templateObject_4$5$1;_styled.div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$g$1||(templateObject_1$g$1=__makeTemplateObject(["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"],["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"])),CardBorderInline(2,2),spacingM);_styled.div.withConfig({displayName:"PageListItem__Keywords",componentId:"sc-lz5d51-1"})(templateObject_2$b$1||(templateObject_2$b$1=__makeTemplateObject(["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageListItem__LastUpdated",componentId:"sc-lz5d51-2"})(templateObject_3$8$1||(templateObject_3$8$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$4$1||(templateObject_4$4$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled.div.withConfig({displayName:"PageListItem__Inner",componentId:"sc-lz5d51-4"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var templateObject_1$g$1,templateObject_2$b$1,templateObject_3$8$1,templateObject_4$4$1,templateObject_5$4$1;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
|
|
@@ -132107,9 +132107,9 @@ var NewsDetailViewMetaInfo = function NewsDetailViewMetaInfo() {
|
|
|
132107
132107
|
var DetailMetaInfo = _styled(ItemMetaInfo).withConfig({
|
|
132108
132108
|
displayName: "NewsDetailViewMetaInfo__DetailMetaInfo",
|
|
132109
132109
|
componentId: "sc-1v9a7tf-0"
|
|
132110
|
-
})(templateObject_1$
|
|
132110
|
+
})(templateObject_1$w || (templateObject_1$w = __makeTemplateObject$l(["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ", "px) {\n font-size: 14px;\n }\n"], ["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ", "px) {\n font-size: 14px;\n }\n"])), minScreenSize.small);
|
|
132111
132111
|
|
|
132112
|
-
var templateObject_1$
|
|
132112
|
+
var templateObject_1$w;
|
|
132113
132113
|
|
|
132114
132114
|
var NewsItemContextProvider = function NewsItemContextProvider(_a) {
|
|
132115
132115
|
var itemId = _a.itemId,
|
|
@@ -132215,9 +132215,9 @@ var NewsDetailMainContent = function NewsDetailMainContent(_a) {
|
|
|
132215
132215
|
var Host$i = _styled.div.withConfig({
|
|
132216
132216
|
displayName: "NewsDetail__Host",
|
|
132217
132217
|
componentId: "sc-6rz5th-0"
|
|
132218
|
-
})(templateObject_1$
|
|
132218
|
+
})(templateObject_1$v || (templateObject_1$v = __makeTemplateObject$l([""], [""])));
|
|
132219
132219
|
|
|
132220
|
-
var templateObject_1$
|
|
132220
|
+
var templateObject_1$v;
|
|
132221
132221
|
|
|
132222
132222
|
var anObject$3 = anObject$v;
|
|
132223
132223
|
|
|
@@ -132616,11 +132616,11 @@ var PageTableOfContents = function PageTableOfContents(_a) {
|
|
|
132616
132616
|
}, void 0)]
|
|
132617
132617
|
}, void 0);
|
|
132618
132618
|
};
|
|
132619
|
-
var Host$h = _styled.div(templateObject_1$
|
|
132620
|
-
var PageTableOfContentsButton = _styled(IconButton$1)(templateObject_2$
|
|
132619
|
+
var Host$h = _styled.div(templateObject_1$u || (templateObject_1$u = __makeTemplateObject$l(["\n && {\n margin-top: ", "px;\n }\n"], ["\n && {\n margin-top: ", "px;\n }\n"])), spacingXs);
|
|
132620
|
+
var PageTableOfContentsButton = _styled(IconButton$1)(templateObject_2$j || (templateObject_2$j = __makeTemplateObject$l(["\n && {\n padding: 0;\n margin: 0;\n width: 22px;\n height: 22px;\n\n i {\n font-size: 20px;\n color: ", ";\n }\n }\n"], ["\n && {\n padding: 0;\n margin: 0;\n width: 22px;\n height: 22px;\n\n i {\n font-size: 20px;\n color: ", ";\n }\n }\n"])), function (p) {
|
|
132621
132621
|
return p.theme.textColors.default;
|
|
132622
132622
|
});
|
|
132623
|
-
var templateObject_1$
|
|
132623
|
+
var templateObject_1$u, templateObject_2$j;
|
|
132624
132624
|
|
|
132625
132625
|
var PageDetail = function PageDetail(props) {
|
|
132626
132626
|
var routeMatch = useRouteMatch();
|
|
@@ -132714,12 +132714,12 @@ var PageDetailInternal = function PageDetailInternal(_a) {
|
|
|
132714
132714
|
var Host$g = _styled.div.withConfig({
|
|
132715
132715
|
displayName: "PageDetail__Host",
|
|
132716
132716
|
componentId: "sc-22rpk8-0"
|
|
132717
|
-
})(templateObject_1$
|
|
132717
|
+
})(templateObject_1$t || (templateObject_1$t = __makeTemplateObject$l([""], [""])));
|
|
132718
132718
|
|
|
132719
132719
|
var PageHeader = _styled.div.withConfig({
|
|
132720
132720
|
displayName: "PageDetail__PageHeader",
|
|
132721
132721
|
componentId: "sc-22rpk8-1"
|
|
132722
|
-
})(templateObject_2$
|
|
132722
|
+
})(templateObject_2$i || (templateObject_2$i = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n margin-bottom: ", "px;\n"], ["\n display: flex;\n align-items: center;\n margin-bottom: ", "px;\n"])), spacingM);
|
|
132723
132723
|
|
|
132724
132724
|
var ConsumerBreadcrumbWrapper = function ConsumerBreadcrumbWrapper() {
|
|
132725
132725
|
var item = useDetailViewContext().item;
|
|
@@ -132791,7 +132791,7 @@ var InlinePageListWrapper = function InlinePageListWrapper() {
|
|
|
132791
132791
|
return jsx$1(InlinePageList, {}, void 0);
|
|
132792
132792
|
};
|
|
132793
132793
|
|
|
132794
|
-
var templateObject_1$
|
|
132794
|
+
var templateObject_1$t, templateObject_2$i, templateObject_3$f, templateObject_4$e, templateObject_5$b;
|
|
132795
132795
|
|
|
132796
132796
|
var EventDetail = function EventDetail(_a) {
|
|
132797
132797
|
var itemId = _a.itemId,
|
|
@@ -132859,12 +132859,12 @@ var EventDetail = function EventDetail(_a) {
|
|
|
132859
132859
|
var Host$f = _styled.div.withConfig({
|
|
132860
132860
|
displayName: "EventDetail__Host",
|
|
132861
132861
|
componentId: "sc-hrm4yl-0"
|
|
132862
|
-
})(templateObject_1$
|
|
132862
|
+
})(templateObject_1$s || (templateObject_1$s = __makeTemplateObject$l([""], [""])));
|
|
132863
132863
|
|
|
132864
132864
|
var EventDateAndRecurrenceInfo = _styled.div.withConfig({
|
|
132865
132865
|
displayName: "EventDetail__EventDateAndRecurrenceInfo",
|
|
132866
132866
|
componentId: "sc-hrm4yl-1"
|
|
132867
|
-
})(templateObject_2$
|
|
132867
|
+
})(templateObject_2$h || (templateObject_2$h = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"], ["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));
|
|
132868
132868
|
|
|
132869
132869
|
var DatesInfo = _styled(EventDetailViewDatesInfo).withConfig({
|
|
132870
132870
|
displayName: "EventDetail__DatesInfo",
|
|
@@ -132878,7 +132878,7 @@ var EventRecurrenceSeriesInfoLink = _styled.a.withConfig({
|
|
|
132878
132878
|
return p.theme.textColors.default;
|
|
132879
132879
|
}, spacingM);
|
|
132880
132880
|
|
|
132881
|
-
var templateObject_1$
|
|
132881
|
+
var templateObject_1$s, templateObject_2$h, templateObject_3$e, templateObject_4$d;
|
|
132882
132882
|
|
|
132883
132883
|
function useNewsItemClickHandler() {
|
|
132884
132884
|
var user = useCurrentUserContext().user;
|
|
@@ -133085,11 +133085,11 @@ var NewsCompactCard = function NewsCompactCard(_a) {
|
|
|
133085
133085
|
var Host$e = _styled.div.withConfig({
|
|
133086
133086
|
displayName: "NewsCompactCard__Host",
|
|
133087
133087
|
componentId: "sc-16ovog0-0"
|
|
133088
|
-
})(templateObject_1$
|
|
133088
|
+
})(templateObject_1$r || (templateObject_1$r = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n"], ["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n"])), BannerSize, function (p) {
|
|
133089
133089
|
return p.theme.palette.white;
|
|
133090
133090
|
});
|
|
133091
133091
|
|
|
133092
|
-
var TextStyle = css$2(templateObject_2$
|
|
133092
|
+
var TextStyle = css$2(templateObject_2$g || (templateObject_2$g = __makeTemplateObject$l(["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"], ["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"])), fontSizeSmall);
|
|
133093
133093
|
|
|
133094
133094
|
var Inner$3 = _styled.div.withConfig({
|
|
133095
133095
|
displayName: "NewsCompactCard__Inner",
|
|
@@ -133183,7 +133183,7 @@ var BannerHost = _styled.div.withConfig({
|
|
|
133183
133183
|
});
|
|
133184
133184
|
});
|
|
133185
133185
|
|
|
133186
|
-
var templateObject_1$
|
|
133186
|
+
var templateObject_1$r, templateObject_2$g, templateObject_3$d, templateObject_4$c, templateObject_5$a, templateObject_6$9, templateObject_7$6, templateObject_8$5, templateObject_9$3, templateObject_10$3, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$2, templateObject_15$2, templateObject_16$1;
|
|
133187
133187
|
|
|
133188
133188
|
var EmptyNewsList = function EmptyNewsList() {
|
|
133189
133189
|
return jsxs(Host$d, {
|
|
@@ -133200,19 +133200,19 @@ var EmptyNewsList = function EmptyNewsList() {
|
|
|
133200
133200
|
var Host$d = _styled.div.withConfig({
|
|
133201
133201
|
displayName: "EmptyNewsList__Host",
|
|
133202
133202
|
componentId: "sc-11ktr8s-0"
|
|
133203
|
-
})(templateObject_1$
|
|
133203
|
+
})(templateObject_1$q || (templateObject_1$q = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: auto 0;\n padding: ", "px 0;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: auto 0;\n padding: ", "px 0;\n"])), spacingM);
|
|
133204
133204
|
|
|
133205
133205
|
var StyledIcon$3 = _styled(Icon).withConfig({
|
|
133206
133206
|
displayName: "EmptyNewsList__StyledIcon",
|
|
133207
133207
|
componentId: "sc-11ktr8s-1"
|
|
133208
|
-
})(templateObject_2$
|
|
133208
|
+
})(templateObject_2$f || (templateObject_2$f = __makeTemplateObject$l(["\n font-size: ", "px;\n opacity: 0.8;\n margin-bottom: ", "px;\n"], ["\n font-size: ", "px;\n opacity: 0.8;\n margin-bottom: ", "px;\n"])), fontSizeLarger, spacingM);
|
|
133209
133209
|
|
|
133210
133210
|
var Message = _styled.p.withConfig({
|
|
133211
133211
|
displayName: "EmptyNewsList__Message",
|
|
133212
133212
|
componentId: "sc-11ktr8s-2"
|
|
133213
133213
|
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject$l(["\n text-align: center;\n padding: 0;\n margin: 0;\n"], ["\n text-align: center;\n padding: 0;\n margin: 0;\n"])));
|
|
133214
133214
|
|
|
133215
|
-
var templateObject_1$
|
|
133215
|
+
var templateObject_1$q, templateObject_2$f, templateObject_3$c;
|
|
133216
133216
|
|
|
133217
133217
|
var ItemLayoutMode;
|
|
133218
133218
|
|
|
@@ -133387,12 +133387,12 @@ var NewsListInternal = function NewsListInternal(_a) {
|
|
|
133387
133387
|
var Host$c = _styled.div.withConfig({
|
|
133388
133388
|
displayName: "NewsList__Host",
|
|
133389
133389
|
componentId: "sc-1d0bzx1-0"
|
|
133390
|
-
})(templateObject_1$
|
|
133390
|
+
})(templateObject_1$p || (templateObject_1$p = __makeTemplateObject$l([""], [""])));
|
|
133391
133391
|
|
|
133392
133392
|
var CompactList = _styled.ul.withConfig({
|
|
133393
133393
|
displayName: "NewsList__CompactList",
|
|
133394
133394
|
componentId: "sc-1d0bzx1-1"
|
|
133395
|
-
})(templateObject_2$
|
|
133395
|
+
})(templateObject_2$e || (templateObject_2$e = __makeTemplateObject$l(["\n margin: 0;\n padding: 0;\n list-style: none;\n\n > li:not(:first-child) {\n margin-top: ", "px;\n }\n"], ["\n margin: 0;\n padding: 0;\n list-style: none;\n\n > li:not(:first-child) {\n margin-top: ", "px;\n }\n"])), spacingS);
|
|
133396
133396
|
|
|
133397
133397
|
var StyledNewsItemTile = _styled(NewsItemTile).withConfig({
|
|
133398
133398
|
displayName: "NewsList__StyledNewsItemTile",
|
|
@@ -133427,7 +133427,7 @@ var ErrorContainer$1 = _styled.p.withConfig({
|
|
|
133427
133427
|
return p.theme.palette.red;
|
|
133428
133428
|
}, spacingM);
|
|
133429
133429
|
|
|
133430
|
-
var templateObject_1$
|
|
133430
|
+
var templateObject_1$p, templateObject_2$e, templateObject_3$b, templateObject_4$b, templateObject_5$9, templateObject_6$8, templateObject_7$5, templateObject_8$4;
|
|
133431
133431
|
|
|
133432
133432
|
var ManageChannels = function ManageChannels(_a) {
|
|
133433
133433
|
var className = _a.className;
|
|
@@ -133593,12 +133593,12 @@ var ManageChannels = function ManageChannels(_a) {
|
|
|
133593
133593
|
var Host$b = _styled.div.withConfig({
|
|
133594
133594
|
displayName: "ManageChannels__Host",
|
|
133595
133595
|
componentId: "sc-yyoxfw-0"
|
|
133596
|
-
})(templateObject_1$
|
|
133596
|
+
})(templateObject_1$o || (templateObject_1$o = __makeTemplateObject$l(["\n padding: ", "px ", "px;\n"], ["\n padding: ", "px ", "px;\n"])), spacingX, spacingM);
|
|
133597
133597
|
|
|
133598
133598
|
var Title$2 = _styled.h3.withConfig({
|
|
133599
133599
|
displayName: "ManageChannels__Title",
|
|
133600
133600
|
componentId: "sc-yyoxfw-1"
|
|
133601
|
-
})(templateObject_2$
|
|
133601
|
+
})(templateObject_2$d || (templateObject_2$d = __makeTemplateObject$l(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
133602
133602
|
|
|
133603
133603
|
var Description = _styled.span.withConfig({
|
|
133604
133604
|
displayName: "ManageChannels__Description",
|
|
@@ -133666,7 +133666,7 @@ var StyledIconButton = _styled(IconButton$1).withConfig({
|
|
|
133666
133666
|
return p.theme.textColors.default;
|
|
133667
133667
|
});
|
|
133668
133668
|
|
|
133669
|
-
var templateObject_1$
|
|
133669
|
+
var templateObject_1$o, templateObject_2$d, templateObject_3$a, templateObject_4$a, templateObject_5$8, templateObject_6$7, templateObject_7$4, templateObject_8$3;
|
|
133670
133670
|
|
|
133671
133671
|
var NewsGridCard = function NewsGridCard(_a) {
|
|
133672
133672
|
var _b;
|
|
@@ -133777,8 +133777,8 @@ var NewsGridCard = function NewsGridCard(_a) {
|
|
|
133777
133777
|
return NewsService.getNewsRoute(baseRoute, item.id, title);
|
|
133778
133778
|
}
|
|
133779
133779
|
};
|
|
133780
|
-
var Host$a = _styled.div(templateObject_2$
|
|
133781
|
-
return p.showHighlight && css$2(templateObject_1$
|
|
133780
|
+
var Host$a = _styled.div(templateObject_2$c || (templateObject_2$c = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"])), function (p) {
|
|
133781
|
+
return p.showHighlight && css$2(templateObject_1$n || (templateObject_1$n = __makeTemplateObject$l(["\n position: relative;\n &::after {\n ", ";\n }\n "], ["\n position: relative;\n &::after {\n ", ";\n }\n "])), BannerHighlightStyle);
|
|
133782
133782
|
});
|
|
133783
133783
|
var BannerHighlightStyle = css$2(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject$l(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ", "px;\n display: block;\n background-color: ", ";\n"], ["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ", "px;\n display: block;\n background-color: ", ";\n"])), spacingXs, function (p) {
|
|
133784
133784
|
return p.theme.palette.accent;
|
|
@@ -133805,7 +133805,7 @@ var KeywordsWrapper = _styled.div(templateObject_14$1 || (templateObject_14$1 =
|
|
|
133805
133805
|
return p.theme.palette.neutralTertiary;
|
|
133806
133806
|
});
|
|
133807
133807
|
var StyledChannels$1 = _styled(ChannelList$1)(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject$l(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"], ["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"])), spacingS, spacingM);
|
|
133808
|
-
var templateObject_1$
|
|
133808
|
+
var templateObject_1$n, templateObject_2$c, templateObject_3$9, templateObject_4$9, templateObject_5$7, templateObject_6$6, templateObject_7$3, templateObject_8$2, templateObject_9$2, templateObject_10$2, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1;
|
|
133809
133809
|
|
|
133810
133810
|
var ErrorContainer = function ErrorContainer() {
|
|
133811
133811
|
return jsx$1(Host$9, {
|
|
@@ -133818,11 +133818,11 @@ var ErrorContainer = function ErrorContainer() {
|
|
|
133818
133818
|
var Host$9 = _styled.p.withConfig({
|
|
133819
133819
|
displayName: "ErrorContainer__Host",
|
|
133820
133820
|
componentId: "sc-499uwc-0"
|
|
133821
|
-
})(templateObject_1$
|
|
133821
|
+
})(templateObject_1$m || (templateObject_1$m = __makeTemplateObject$l(["\n color: ", ";\n padding: ", "px 0;\n text-align: center;\n"], ["\n color: ", ";\n padding: ", "px 0;\n text-align: center;\n"])), function (p) {
|
|
133822
133822
|
return p.theme.palette.red;
|
|
133823
133823
|
}, spacingM);
|
|
133824
133824
|
|
|
133825
|
-
var templateObject_1$
|
|
133825
|
+
var templateObject_1$m;
|
|
133826
133826
|
|
|
133827
133827
|
var NewsGrid = function NewsGrid(_a) {
|
|
133828
133828
|
var filter = _a.filter,
|
|
@@ -133914,13 +133914,13 @@ var NewsGrid = function NewsGrid(_a) {
|
|
|
133914
133914
|
var Host$8 = _styled.div.withConfig({
|
|
133915
133915
|
displayName: "NewsGrid__Host",
|
|
133916
133916
|
componentId: "sc-8ugpfz-0"
|
|
133917
|
-
})(templateObject_1$
|
|
133917
|
+
})(templateObject_1$l || (templateObject_1$l = __makeTemplateObject$l([""], [""])));
|
|
133918
133918
|
|
|
133919
133919
|
var Inner$2 = _styled.div.withConfig({
|
|
133920
133920
|
displayName: "NewsGrid__Inner",
|
|
133921
133921
|
componentId: "sc-8ugpfz-1"
|
|
133922
133922
|
})(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject$l(["\n display: flex; // IE fallback\n flex-wrap: wrap;\n\n display: grid;\n gap: ", "px;\n ", "\n"], ["\n display: flex; // IE fallback\n flex-wrap: wrap;\n\n display: grid;\n gap: ", "px;\n ", "\n"])), spacingM, function (p) {
|
|
133923
|
-
return css$2(templateObject_2$
|
|
133923
|
+
return css$2(templateObject_2$b || (templateObject_2$b = __makeTemplateObject$l(["\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n "], ["\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n "])), p.columnCount);
|
|
133924
133924
|
});
|
|
133925
133925
|
|
|
133926
133926
|
_styled(NewsGridCard).withConfig({
|
|
@@ -133930,7 +133930,7 @@ _styled(NewsGridCard).withConfig({
|
|
|
133930
133930
|
return css$2(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject$l(["\n width: calc(100% / ", " - ", "px);\n "], ["\n width: calc(100% / ", " - ", "px);\n "])), p.columnCount, spacingM);
|
|
133931
133931
|
});
|
|
133932
133932
|
|
|
133933
|
-
var templateObject_1$
|
|
133933
|
+
var templateObject_1$l, templateObject_2$b, templateObject_3$8, templateObject_4$8, templateObject_5$6;
|
|
133934
133934
|
|
|
133935
133935
|
var HeroSlide = function HeroSlide(_a) {
|
|
133936
133936
|
var item = _a.item,
|
|
@@ -134075,7 +134075,7 @@ var Host$7 = _styled.div.withConfig({
|
|
|
134075
134075
|
displayName: "HeroSlide__Host",
|
|
134076
134076
|
componentId: "sc-3yofth-0"
|
|
134077
134077
|
})(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject$l(["\n position: relative;\n\n ", "\n\n ", "\n \n ", "\n \n ", "\n"], ["\n position: relative;\n\n ", "\n\n ", "\n \n ", "\n \n ", "\n"])), function (p) {
|
|
134078
|
-
return p.width ? css$2(templateObject_1$
|
|
134078
|
+
return p.width ? css$2(templateObject_1$k || (templateObject_1$k = __makeTemplateObject$l(["\n width: ", ";\n "], ["\n width: ", ";\n "])), p.width) : css$2(templateObject_2$a || (templateObject_2$a = __makeTemplateObject$l(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
|
|
134079
134079
|
}, function (p) {
|
|
134080
134080
|
return p.height ? css$2(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject$l(["\n height: ", ";\n "], ["\n height: ", ";\n "])), p.height) : css$2(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject$l(["\n height: 100%;\n "], ["\n height: 100%;\n "])));
|
|
134081
134081
|
}, function (p) {
|
|
@@ -134195,7 +134195,7 @@ var StyledDateTime = _styled(DateTime).withConfig({
|
|
|
134195
134195
|
return p.color ? css$2(templateObject_31 || (templateObject_31 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.color) : css$2(templateObject_32 || (templateObject_32 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.default);
|
|
134196
134196
|
});
|
|
134197
134197
|
|
|
134198
|
-
var templateObject_1$
|
|
134198
|
+
var templateObject_1$k, templateObject_2$a, templateObject_3$7, templateObject_4$7, templateObject_5$5, templateObject_6$5, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33;
|
|
134199
134199
|
|
|
134200
134200
|
var HeroPaging = function HeroPaging(_a) {
|
|
134201
134201
|
var items = _a.items,
|
|
@@ -134316,12 +134316,12 @@ function getWrappedIndex(index, max) {
|
|
|
134316
134316
|
var PagingHost = _styled.div.withConfig({
|
|
134317
134317
|
displayName: "HeroPaging__PagingHost",
|
|
134318
134318
|
componentId: "sc-1y3j8qb-0"
|
|
134319
|
-
})(templateObject_1$
|
|
134319
|
+
})(templateObject_1$j || (templateObject_1$j = __makeTemplateObject$l(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
134320
134320
|
|
|
134321
134321
|
var Paging = _styled.ul.withConfig({
|
|
134322
134322
|
displayName: "HeroPaging__Paging",
|
|
134323
134323
|
componentId: "sc-1y3j8qb-1"
|
|
134324
|
-
})(templateObject_2$
|
|
134324
|
+
})(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject$l(["\n display: flex;\n width: 100%;\n list-style: none;\n margin: 0 0 ", "px 0;\n padding: 0;\n"], ["\n display: flex;\n width: 100%;\n list-style: none;\n margin: 0 0 ", "px 0;\n padding: 0;\n"])), spacingM);
|
|
134325
134325
|
|
|
134326
134326
|
var PagingItem = _styled.li.withConfig({
|
|
134327
134327
|
displayName: "HeroPaging__PagingItem",
|
|
@@ -134342,7 +134342,7 @@ var PagingArrow = _styled(IconButton).withConfig({
|
|
|
134342
134342
|
componentId: "sc-1y3j8qb-4"
|
|
134343
134343
|
})(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject$l(["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"], ["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"])));
|
|
134344
134344
|
|
|
134345
|
-
var templateObject_1$
|
|
134345
|
+
var templateObject_1$j, templateObject_2$9, templateObject_3$6, templateObject_4$6, templateObject_5$4, templateObject_6$4;
|
|
134346
134346
|
|
|
134347
134347
|
var Hero = function Hero(_a) {
|
|
134348
134348
|
var items = _a.items,
|
|
@@ -134409,9 +134409,9 @@ var Hero = function Hero(_a) {
|
|
|
134409
134409
|
var StyledCarousel = _styled(Carousel).withConfig({
|
|
134410
134410
|
displayName: "Hero__StyledCarousel",
|
|
134411
134411
|
componentId: "sc-55ys37-0"
|
|
134412
|
-
})(templateObject_1$
|
|
134412
|
+
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject$l(["\n .slider-list {\n height: 100% !important;\n\n > li {\n height: 100% !important;\n }\n }\n\n .slider-control-bottomcenter {\n left: ", "px !important;\n right: ", "px !important;\n transform: none !important;\n }\n\n .hero-paging--hidden {\n display: none;\n }\n"], ["\n .slider-list {\n height: 100% !important;\n\n > li {\n height: 100% !important;\n }\n }\n\n .slider-control-bottomcenter {\n left: ", "px !important;\n right: ", "px !important;\n transform: none !important;\n }\n\n .hero-paging--hidden {\n display: none;\n }\n"])), spacingL, spacingL);
|
|
134413
134413
|
|
|
134414
|
-
var templateObject_1$
|
|
134414
|
+
var templateObject_1$i;
|
|
134415
134415
|
|
|
134416
134416
|
var NewsHero = function NewsHero(_a) {
|
|
134417
134417
|
var filter = _a.filter,
|
|
@@ -134564,9 +134564,9 @@ var NewsHero = function NewsHero(_a) {
|
|
|
134564
134564
|
var StyledChannels = _styled(ChannelList$1).withConfig({
|
|
134565
134565
|
displayName: "NewsHero__StyledChannels",
|
|
134566
134566
|
componentId: "sc-i9ar0j-0"
|
|
134567
|
-
})(templateObject_1$
|
|
134567
|
+
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject$l(["\n [data-channels] {\n justify-content: flex-end;\n }\n"], ["\n [data-channels] {\n justify-content: flex-end;\n }\n"])));
|
|
134568
134568
|
|
|
134569
|
-
var templateObject_1$
|
|
134569
|
+
var templateObject_1$h;
|
|
134570
134570
|
|
|
134571
134571
|
// a string of all valid unicode whitespaces
|
|
134572
134572
|
// eslint-disable-next-line max-len
|
|
@@ -134734,7 +134734,7 @@ var GroupsDropdown = function GroupsDropdown(_a) {
|
|
|
134734
134734
|
var StyledDropdown = _styled(Dropdown).withConfig({
|
|
134735
134735
|
displayName: "GroupsDropdown__StyledDropdown",
|
|
134736
134736
|
componentId: "sc-cmsnyu-0"
|
|
134737
|
-
})(templateObject_1$
|
|
134737
|
+
})(templateObject_1$g || (templateObject_1$g = __makeTemplateObject$l(["\n ", "\n\n margin-bottom: ", "px;\n width: 200px;\n min-width: 200px;\n padding: 0;\n\n &&&,\n &&&:hover,\n .ms-Dropdown,\n .ms-Dropdown-title,\n .ms-Dropdown-caretDownWrapper {\n color: ", " !important;\n }\n\n .ms-Dropdown-title {\n background-color: ", ";\n i {\n font-size: ", "px;\n margin: 0 ", "px 0 0;\n }\n }\n\n .ms-Dropdown-caretDownWrapper {\n top: 0;\n\n & > i {\n color: ", " !important;\n }\n }\n"], ["\n ", "\n\n margin-bottom: ", "px;\n width: 200px;\n min-width: 200px;\n padding: 0;\n\n &&&,\n &&&:hover,\n .ms-Dropdown,\n .ms-Dropdown-title,\n .ms-Dropdown-caretDownWrapper {\n color: ", " !important;\n }\n\n .ms-Dropdown-title {\n background-color: ", ";\n i {\n font-size: ", "px;\n margin: 0 ", "px 0 0;\n }\n }\n\n .ms-Dropdown-caretDownWrapper {\n top: 0;\n\n & > i {\n color: ", " !important;\n }\n }\n"])), ToolbarNoBorderDropdownStyles, spacingXs, function (p) {
|
|
134738
134738
|
return p.theme.textColors.onAccent;
|
|
134739
134739
|
}, function (p) {
|
|
134740
134740
|
return p.theme.palette.accent;
|
|
@@ -134745,7 +134745,7 @@ var StyledDropdown = _styled(Dropdown).withConfig({
|
|
|
134745
134745
|
var DropdownOption = _styled.div.withConfig({
|
|
134746
134746
|
displayName: "GroupsDropdown__DropdownOption",
|
|
134747
134747
|
componentId: "sc-cmsnyu-1"
|
|
134748
|
-
})(templateObject_2$
|
|
134748
|
+
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), ToolbarOptionStyles);
|
|
134749
134749
|
|
|
134750
134750
|
var Title = _styled.div.withConfig({
|
|
134751
134751
|
displayName: "GroupsDropdown__Title",
|
|
@@ -134754,7 +134754,7 @@ var Title = _styled.div.withConfig({
|
|
|
134754
134754
|
|
|
134755
134755
|
var GlobalDropdownStyles = createGlobalStyle(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject$l(["\n .ms-Dropdown-item {\n i {\n width: auto;\n margin: 0 ", "px 0 0;\n }\n }\n"], ["\n .ms-Dropdown-item {\n i {\n width: auto;\n margin: 0 ", "px 0 0;\n }\n }\n"])), spacingS);
|
|
134756
134756
|
|
|
134757
|
-
var templateObject_1$
|
|
134757
|
+
var templateObject_1$g, templateObject_2$8, templateObject_3$5, templateObject_4$5;
|
|
134758
134758
|
|
|
134759
134759
|
var TaskButton = function TaskButton(_a) {
|
|
134760
134760
|
var count = _a.count,
|
|
@@ -134796,9 +134796,9 @@ var TaskButton = function TaskButton(_a) {
|
|
|
134796
134796
|
var ToggleButton = _styled(DefaultButton).withConfig({
|
|
134797
134797
|
displayName: "TaskButton__ToggleButton",
|
|
134798
134798
|
componentId: "sc-8eylsw-0"
|
|
134799
|
-
})(templateObject_1$
|
|
134799
|
+
})(templateObject_1$f || (templateObject_1$f = __makeTemplateObject$l(["\n border-radius: 0;\n padding: 0 ", "px;\n margin-bottom: ", "px;\n font-size: ", "px;\n user-select: none;\n height: ", "px;\n\n display: flex;\n align-items: center;\n\n svg {\n margin-right: ", "px;\n }\n"], ["\n border-radius: 0;\n padding: 0 ", "px;\n margin-bottom: ", "px;\n font-size: ", "px;\n user-select: none;\n height: ", "px;\n\n display: flex;\n align-items: center;\n\n svg {\n margin-right: ", "px;\n }\n"])), spacingS, spacingXs, fontSizeSmall, spacingL + 2, spacingS);
|
|
134800
134800
|
|
|
134801
|
-
var templateObject_1$
|
|
134801
|
+
var templateObject_1$f;
|
|
134802
134802
|
|
|
134803
134803
|
var TaskButtons = function TaskButtons(_a) {
|
|
134804
134804
|
var type = _a.type,
|
|
@@ -134864,9 +134864,9 @@ var TaskButtons = function TaskButtons(_a) {
|
|
|
134864
134864
|
var Host$6 = _styled.div.withConfig({
|
|
134865
134865
|
displayName: "TaskButtons__Host",
|
|
134866
134866
|
componentId: "sc-sw0zei-0"
|
|
134867
|
-
})(templateObject_1$
|
|
134867
|
+
})(templateObject_1$e || (templateObject_1$e = __makeTemplateObject$l(["\n display: flex;\n flex-wrap: wrap;\n\n button {\n border: 1px solid #808080;\n\n &:not(:first-child) {\n border-left: none;\n }\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n\n button {\n border: 1px solid #808080;\n\n &:not(:first-child) {\n border-left: none;\n }\n }\n"])));
|
|
134868
134868
|
|
|
134869
|
-
var templateObject_1$
|
|
134869
|
+
var templateObject_1$e;
|
|
134870
134870
|
|
|
134871
134871
|
var NewArticleButton = function NewArticleButton(_a) {
|
|
134872
134872
|
var groupId = _a.groupId,
|
|
@@ -135008,12 +135008,12 @@ var NewsEditorDashboard = function NewsEditorDashboard(_a) {
|
|
|
135008
135008
|
}).length;
|
|
135009
135009
|
}
|
|
135010
135010
|
};
|
|
135011
|
-
var MessageBarStyle = createGlobalStyle(templateObject_1$
|
|
135011
|
+
var MessageBarStyle = createGlobalStyle(templateObject_1$d || (templateObject_1$d = __makeTemplateObject$l(["\n .ms-MessageBar {\n margin-bottom: ", "px;\n }\n .ms-MessageBar-text {\n flex: 1 1 0%;\n }\n"], ["\n .ms-MessageBar {\n margin-bottom: ", "px;\n }\n .ms-MessageBar-text {\n flex: 1 1 0%;\n }\n"])), spacingXs);
|
|
135012
135012
|
|
|
135013
135013
|
var StyledEditorListItem = _styled(EditorListItem).withConfig({
|
|
135014
135014
|
displayName: "NewsEditorDashboard__StyledEditorListItem",
|
|
135015
135015
|
componentId: "sc-vv9dzu-0"
|
|
135016
|
-
})(templateObject_2$
|
|
135016
|
+
})(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject$l(["\n :not(:first-child) {\n margin-top: ", "px;\n }\n"], ["\n :not(:first-child) {\n margin-top: ", "px;\n }\n"])), spacingS + 5);
|
|
135017
135017
|
|
|
135018
135018
|
var FiltersAndButtons = _styled.div.withConfig({
|
|
135019
135019
|
displayName: "NewsEditorDashboard__FiltersAndButtons",
|
|
@@ -135035,7 +135035,7 @@ var StyledNewArticleButton = _styled(NewArticleButton).withConfig({
|
|
|
135035
135035
|
componentId: "sc-vv9dzu-4"
|
|
135036
135036
|
})(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n align-self: flex-start;\n"], ["\n margin-bottom: ", "px;\n align-self: flex-start;\n"])), spacingXs);
|
|
135037
135037
|
|
|
135038
|
-
var templateObject_1$
|
|
135038
|
+
var templateObject_1$d, templateObject_2$7, templateObject_3$4, templateObject_4$4, templateObject_5$3, templateObject_6$3;
|
|
135039
135039
|
|
|
135040
135040
|
// NOTE: This component exists in this project and not in the ui/common/toolbar because it uses DetailViewContext placed in feature/content/
|
|
135041
135041
|
// Also a generic component `ToolbarLanguageSelector` in ui/common/toolbar complicates the flow and requires some code duplication
|
|
@@ -135076,9 +135076,9 @@ var ToolbarNewsLanguageSelector = function ToolbarNewsLanguageSelector(_a) {
|
|
|
135076
135076
|
var LanguageMenuButton = _styled(LanguageSelector).withConfig({
|
|
135077
135077
|
displayName: "ToolbarNewsLanguageSelector__LanguageMenuButton",
|
|
135078
135078
|
componentId: "sc-1xe5l19-0"
|
|
135079
|
-
})(templateObject_1$
|
|
135079
|
+
})(templateObject_1$c || (templateObject_1$c = __makeTemplateObject$l(["\n && {\n i {\n font-size: ", "px;\n }\n }\n"], ["\n && {\n i {\n font-size: ", "px;\n }\n }\n"])), fontSizeNormal);
|
|
135080
135080
|
|
|
135081
|
-
var templateObject_1$
|
|
135081
|
+
var templateObject_1$c;
|
|
135082
135082
|
|
|
135083
135083
|
var ToolbarManageNewsItemButton = function ToolbarManageNewsItemButton(_a) {
|
|
135084
135084
|
var onClick = _a.onClick;
|
|
@@ -135204,9 +135204,9 @@ var NewsDetailPreviewInternal = function NewsDetailPreviewInternal() {
|
|
|
135204
135204
|
var Host$5 = _styled.div.withConfig({
|
|
135205
135205
|
displayName: "NewsDetailPreview__Host",
|
|
135206
135206
|
componentId: "sc-17gmqax-0"
|
|
135207
|
-
})(templateObject_1$
|
|
135207
|
+
})(templateObject_1$b || (templateObject_1$b = __makeTemplateObject$l([""], [""])));
|
|
135208
135208
|
|
|
135209
|
-
var templateObject_1$
|
|
135209
|
+
var templateObject_1$b;
|
|
135210
135210
|
|
|
135211
135211
|
var classof = classofRaw$9;
|
|
135212
135212
|
|
|
@@ -135612,14 +135612,14 @@ var ToolbarFilterPanel = function ToolbarFilterPanel(_a) {
|
|
|
135612
135612
|
var Host$4 = _styled.div.withConfig({
|
|
135613
135613
|
displayName: "ToolbarFilterPanel__Host",
|
|
135614
135614
|
componentId: "sc-118p488-0"
|
|
135615
|
-
})(templateObject_1$
|
|
135615
|
+
})(templateObject_1$a || (templateObject_1$a = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n min-width: 0;\n"], ["\n display: flex;\n align-items: center;\n min-width: 0;\n"])));
|
|
135616
135616
|
|
|
135617
135617
|
var OverflowContainer = _styled.div.withConfig({
|
|
135618
135618
|
displayName: "ToolbarFilterPanel__OverflowContainer",
|
|
135619
135619
|
componentId: "sc-118p488-1"
|
|
135620
|
-
})(templateObject_2$
|
|
135620
|
+
})(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject$l(["\n display: flex;\n flex: 1 1 auto;\n white-space: nowrap;\n align-items: center;\n overflow: hidden;\n"], ["\n display: flex;\n flex: 1 1 auto;\n white-space: nowrap;\n align-items: center;\n overflow: hidden;\n"])));
|
|
135621
135621
|
|
|
135622
|
-
var templateObject_1$
|
|
135622
|
+
var templateObject_1$a, templateObject_2$6;
|
|
135623
135623
|
|
|
135624
135624
|
var FilterCalloutButton = function FilterCalloutButton(_a) {
|
|
135625
135625
|
var buttonText = _a.buttonText,
|
|
@@ -135682,8 +135682,8 @@ var FilterCalloutButton = function FilterCalloutButton(_a) {
|
|
|
135682
135682
|
var StyledCallout = _styled(Callout).withConfig({
|
|
135683
135683
|
displayName: "FilterCalloutButton__StyledCallout",
|
|
135684
135684
|
componentId: "sc-1bleciq-0"
|
|
135685
|
-
})(templateObject_2$
|
|
135686
|
-
return p.doNotLayer && css$2(templateObject_1$
|
|
135685
|
+
})(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), function (p) {
|
|
135686
|
+
return p.doNotLayer && css$2(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject$l(["\n z-index: 1;\n top: 1px !important;\n left: -1px !important;\n\n &&& {\n max-width: 100% !important;\n width: 100%;\n }\n "], ["\n z-index: 1;\n top: 1px !important;\n left: -1px !important;\n\n &&& {\n max-width: 100% !important;\n width: 100%;\n }\n "])));
|
|
135687
135687
|
});
|
|
135688
135688
|
|
|
135689
135689
|
var Host$3 = _styled.div.withConfig({
|
|
@@ -135703,7 +135703,7 @@ var ClearFilterButton = _styled(DefaultButton).withConfig({
|
|
|
135703
135703
|
componentId: "sc-1bleciq-3"
|
|
135704
135704
|
})(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject$l(["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"], ["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"])));
|
|
135705
135705
|
|
|
135706
|
-
var templateObject_1$
|
|
135706
|
+
var templateObject_1$9, templateObject_2$5, templateObject_3$3, templateObject_4$3, templateObject_5$2, templateObject_6$2;
|
|
135707
135707
|
|
|
135708
135708
|
var FilterLogicalOperators = function FilterLogicalOperators(_a) {
|
|
135709
135709
|
var onChange = _a.onChange,
|
|
@@ -135750,14 +135750,14 @@ var FilterLogicalOperators = function FilterLogicalOperators(_a) {
|
|
|
135750
135750
|
var StyledChoiceGroup = _styled(ChoiceGroup).withConfig({
|
|
135751
135751
|
displayName: "FilterLogicalOperators__StyledChoiceGroup",
|
|
135752
135752
|
componentId: "sc-10bpjo8-0"
|
|
135753
|
-
})(templateObject_1$
|
|
135753
|
+
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n\n .ms-ChoiceField {\n margin-right: ", "px;\n }\n"], ["\n margin-bottom: ", "px;\n\n .ms-ChoiceField {\n margin-right: ", "px;\n }\n"])), spacingM, spacingM);
|
|
135754
135754
|
|
|
135755
135755
|
var Operator = _styled.span.withConfig({
|
|
135756
135756
|
displayName: "FilterLogicalOperators__Operator",
|
|
135757
135757
|
componentId: "sc-10bpjo8-1"
|
|
135758
|
-
})(templateObject_2$
|
|
135758
|
+
})(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject$l(["\n text-transform: capitalize;\n"], ["\n text-transform: capitalize;\n"])));
|
|
135759
135759
|
|
|
135760
|
-
var templateObject_1$
|
|
135760
|
+
var templateObject_1$8, templateObject_2$4;
|
|
135761
135761
|
|
|
135762
135762
|
var ChannelFilter = function ChannelFilter(_a) {
|
|
135763
135763
|
var channels = _a.channels,
|
|
@@ -135814,12 +135814,12 @@ var ChannelFilter = function ChannelFilter(_a) {
|
|
|
135814
135814
|
var Host$2 = _styled.div.withConfig({
|
|
135815
135815
|
displayName: "ChannelFilter__Host",
|
|
135816
135816
|
componentId: "sc-1ju8xwz-0"
|
|
135817
|
-
})(templateObject_1$
|
|
135817
|
+
})(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n"], ["\n margin-bottom: ", "px;\n"])), spacingL);
|
|
135818
135818
|
|
|
135819
135819
|
var ChannelsSubTitle = _styled.p.withConfig({
|
|
135820
135820
|
displayName: "ChannelFilter__ChannelsSubTitle",
|
|
135821
135821
|
componentId: "sc-1ju8xwz-1"
|
|
135822
|
-
})(templateObject_2$
|
|
135822
|
+
})(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject$l(["\n font-weight: bold;\n padding: 0;\n margin: 0 0 ", "px 0;\n"], ["\n font-weight: bold;\n padding: 0;\n margin: 0 0 ", "px 0;\n"])), spacingXs + 2);
|
|
135823
135823
|
|
|
135824
135824
|
var StyledFilterCalloutButton = _styled(FilterCalloutButton).withConfig({
|
|
135825
135825
|
displayName: "ChannelFilter__StyledFilterCalloutButton",
|
|
@@ -136045,7 +136045,7 @@ var StyledToggleAllButtons = _styled(ToggleAllButtons).withConfig({
|
|
|
136045
136045
|
componentId: "sc-1ju8xwz-9"
|
|
136046
136046
|
})(templateObject_10 || (templateObject_10 = __makeTemplateObject$l(["\n display: flex;\n justify-content: space-between;\n"], ["\n display: flex;\n justify-content: space-between;\n"])));
|
|
136047
136047
|
|
|
136048
|
-
var templateObject_1$
|
|
136048
|
+
var templateObject_1$7, templateObject_2$3, templateObject_3$2, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8, templateObject_9, templateObject_10;
|
|
136049
136049
|
|
|
136050
136050
|
function toInteger(dirtyNumber) {
|
|
136051
136051
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
@@ -138990,12 +138990,12 @@ var DateShortcutButton = function DateShortcutButton(_a) {
|
|
|
138990
138990
|
var StyledDateTimePicker = _styled(DateTimePicker).withConfig({
|
|
138991
138991
|
displayName: "PublishingDateFilter__StyledDateTimePicker",
|
|
138992
138992
|
componentId: "sc-zv88cu-0"
|
|
138993
|
-
})(templateObject_1$
|
|
138993
|
+
})(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n\n label {\n font-weight: normal;\n }\n"], ["\n margin-bottom: ", "px;\n\n label {\n font-weight: normal;\n }\n"])), spacingS);
|
|
138994
138994
|
|
|
138995
138995
|
var DatePickerShortcutsLabel = _styled.span.withConfig({
|
|
138996
138996
|
displayName: "PublishingDateFilter__DatePickerShortcutsLabel",
|
|
138997
138997
|
componentId: "sc-zv88cu-1"
|
|
138998
|
-
})(templateObject_2$
|
|
138998
|
+
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject$l(["\n font-size: ", "px;\n"], ["\n font-size: ", "px;\n"])), fontSizeSmall);
|
|
138999
138999
|
|
|
139000
139000
|
var DateShortcuts = _styled.div.withConfig({
|
|
139001
139001
|
displayName: "PublishingDateFilter__DateShortcuts",
|
|
@@ -139009,7 +139009,7 @@ var SubTitle$2 = _styled.p.withConfig({
|
|
|
139009
139009
|
componentId: "sc-zv88cu-3"
|
|
139010
139010
|
})(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject$l(["\n font-weight: bold;\n margin-bottom: ", "px;\n"], ["\n font-weight: bold;\n margin-bottom: ", "px;\n"])), spacingXs + 2);
|
|
139011
139011
|
|
|
139012
|
-
var templateObject_1$
|
|
139012
|
+
var templateObject_1$6, templateObject_2$2, templateObject_3$1, templateObject_4$1;
|
|
139013
139013
|
|
|
139014
139014
|
var ClearAllFiltersButton = function ClearAllFiltersButton(_a) {
|
|
139015
139015
|
var onClick = _a.onClick;
|
|
@@ -139116,14 +139116,14 @@ var KeywordsFilterInternal = function KeywordsFilterInternal() {
|
|
|
139116
139116
|
var StyledKeywordPicker = _styled(KeywordPicker).withConfig({
|
|
139117
139117
|
displayName: "KeywordsFilter__StyledKeywordPicker",
|
|
139118
139118
|
componentId: "sc-1aoeg5i-0"
|
|
139119
|
-
})(templateObject_1$
|
|
139119
|
+
})(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n overflow: hidden;\n\n .keyword-picker-tree {\n max-height: 256px;\n overflow-y: auto;\n padding: 0 4px;\n\n div:last-child {\n margin-bottom: 0;\n }\n }\n"], ["\n margin-bottom: ", "px;\n overflow: hidden;\n\n .keyword-picker-tree {\n max-height: 256px;\n overflow-y: auto;\n padding: 0 4px;\n\n div:last-child {\n margin-bottom: 0;\n }\n }\n"])), spacingM);
|
|
139120
139120
|
|
|
139121
139121
|
var SubTitle$1 = _styled.p.withConfig({
|
|
139122
139122
|
displayName: "KeywordsFilter__SubTitle",
|
|
139123
139123
|
componentId: "sc-1aoeg5i-1"
|
|
139124
|
-
})(templateObject_2$
|
|
139124
|
+
})(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject$l(["\n font-weight: bold;\n margin-bottom: ", "px;\n"], ["\n font-weight: bold;\n margin-bottom: ", "px;\n"])), spacingXs + 2);
|
|
139125
139125
|
|
|
139126
|
-
var templateObject_1$
|
|
139126
|
+
var templateObject_1$5, templateObject_2$1;
|
|
139127
139127
|
|
|
139128
139128
|
var EmptyFilterSearchResult = function EmptyFilterSearchResult() {
|
|
139129
139129
|
return jsxs(Host$1, {
|
|
@@ -139136,8 +139136,8 @@ var EmptyFilterSearchResult = function EmptyFilterSearchResult() {
|
|
|
139136
139136
|
}, void 0)]
|
|
139137
139137
|
}, void 0);
|
|
139138
139138
|
};
|
|
139139
|
-
var Host$1 = _styled.div(templateObject_1$
|
|
139140
|
-
var templateObject_1$
|
|
139139
|
+
var Host$1 = _styled.div(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject$l(["\n text-align: center;\n i {\n font-size: ", "px;\n }\n"], ["\n text-align: center;\n i {\n font-size: ", "px;\n }\n"])), fontSizeMedium);
|
|
139140
|
+
var templateObject_1$4;
|
|
139141
139141
|
|
|
139142
139142
|
var AuthorToolbarFilter = function AuthorToolbarFilter() {
|
|
139143
139143
|
var _a;
|
|
@@ -139152,7 +139152,7 @@ var AuthorToolbarFilter = function AuthorToolbarFilter() {
|
|
|
139152
139152
|
searchText = _c[0],
|
|
139153
139153
|
setSearchText = _c[1];
|
|
139154
139154
|
|
|
139155
|
-
var debouncedSearchText = useDebounce
|
|
139155
|
+
var debouncedSearchText = useDebounce(searchText.toLowerCase(), 500)[0];
|
|
139156
139156
|
var searchAccounts = useAccountApi().searchAccounts;
|
|
139157
139157
|
var showError = useNotificationContext().showError;
|
|
139158
139158
|
var authorsFromFilter = (_a = filter === null || filter === void 0 ? void 0 : filter.authors) !== null && _a !== void 0 ? _a : [];
|
|
@@ -139343,7 +139343,7 @@ var UserShimmer = function UserShimmer() {
|
|
|
139343
139343
|
var Host = _styled.div.withConfig({
|
|
139344
139344
|
displayName: "AuthorFilter__Host",
|
|
139345
139345
|
componentId: "sc-cnx0p9-0"
|
|
139346
|
-
})(templateObject_1$
|
|
139346
|
+
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
139347
139347
|
|
|
139348
139348
|
var rowHeight = 40;
|
|
139349
139349
|
var visibleUsers = 9;
|
|
@@ -139351,7 +139351,7 @@ var visibleUsers = 9;
|
|
|
139351
139351
|
var UserList = _styled.div.withConfig({
|
|
139352
139352
|
displayName: "AuthorFilter__UserList",
|
|
139353
139353
|
componentId: "sc-cnx0p9-1"
|
|
139354
|
-
})(templateObject_2
|
|
139354
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject$l(["\n margin: ", "px 0 ", "px;\n max-height: ", "px;\n padding: 4px;\n overflow-y: auto;\n"], ["\n margin: ", "px 0 ", "px;\n max-height: ", "px;\n padding: 4px;\n overflow-y: auto;\n"])), spacingS, spacingM, rowHeight * visibleUsers - 8);
|
|
139355
139355
|
|
|
139356
139356
|
var StyledCheckbox = _styled(Checkbox).withConfig({
|
|
139357
139357
|
displayName: "AuthorFilter__StyledCheckbox",
|
|
@@ -139475,155 +139475,7 @@ var SubTitle = _styled.label.withConfig({
|
|
|
139475
139475
|
componentId: "sc-cnx0p9-6"
|
|
139476
139476
|
})(templateObject_7 || (templateObject_7 = __makeTemplateObject$l(["\n display: block;\n font-weight: bold;\n margin-top: ", "px;\n margin-bottom: ", "px;\n"], ["\n display: block;\n font-weight: bold;\n margin-top: ", "px;\n margin-bottom: ", "px;\n"])), spacingS + 4, spacingXs + 2);
|
|
139477
139477
|
|
|
139478
|
-
var templateObject_1$
|
|
139479
|
-
|
|
139480
|
-
// `SameValue` abstract operation
|
|
139481
|
-
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
139482
|
-
var sameValue$1 = Object.is || function is(x, y) {
|
|
139483
|
-
// eslint-disable-next-line no-self-compare
|
|
139484
|
-
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
|
139485
|
-
};
|
|
139486
|
-
|
|
139487
|
-
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
139488
|
-
var anObject = anObject$v;
|
|
139489
|
-
var requireObjectCoercible = requireObjectCoercible$m;
|
|
139490
|
-
var sameValue = sameValue$1;
|
|
139491
|
-
var regExpExec = regexpExecAbstract;
|
|
139492
|
-
|
|
139493
|
-
// @@search logic
|
|
139494
|
-
fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
|
|
139495
|
-
return [
|
|
139496
|
-
// `String.prototype.search` method
|
|
139497
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.search
|
|
139498
|
-
function search(regexp) {
|
|
139499
|
-
var O = requireObjectCoercible(this);
|
|
139500
|
-
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
|
|
139501
|
-
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
|
|
139502
|
-
},
|
|
139503
|
-
// `RegExp.prototype[@@search]` method
|
|
139504
|
-
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
|
|
139505
|
-
function (regexp) {
|
|
139506
|
-
var res = maybeCallNative(nativeSearch, regexp, this);
|
|
139507
|
-
if (res.done) return res.value;
|
|
139508
|
-
|
|
139509
|
-
var rx = anObject(regexp);
|
|
139510
|
-
var S = String(this);
|
|
139511
|
-
|
|
139512
|
-
var previousLastIndex = rx.lastIndex;
|
|
139513
|
-
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
|
|
139514
|
-
var result = regExpExec(rx, S);
|
|
139515
|
-
if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
|
|
139516
|
-
return result === null ? -1 : result.index;
|
|
139517
|
-
}
|
|
139518
|
-
];
|
|
139519
|
-
});
|
|
139520
|
-
|
|
139521
|
-
var lib = {};
|
|
139522
|
-
|
|
139523
|
-
var useDebounce$1 = {};
|
|
139524
|
-
|
|
139525
|
-
var useDebouncedCallback$2 = {};
|
|
139526
|
-
|
|
139527
|
-
Object.defineProperty(useDebouncedCallback$2, "__esModule", { value: true });
|
|
139528
|
-
var react_1$1 = React__default;
|
|
139529
|
-
function useDebouncedCallback$1(callback, delay, options) {
|
|
139530
|
-
if (options === void 0) { options = {}; }
|
|
139531
|
-
var maxWait = options.maxWait;
|
|
139532
|
-
var maxWaitHandler = react_1$1.useRef(null);
|
|
139533
|
-
var maxWaitArgs = react_1$1.useRef([]);
|
|
139534
|
-
var leading = options.leading;
|
|
139535
|
-
var trailing = options.trailing === undefined ? true : options.trailing;
|
|
139536
|
-
var leadingCall = react_1$1.useRef(false);
|
|
139537
|
-
var functionTimeoutHandler = react_1$1.useRef(null);
|
|
139538
|
-
var isComponentUnmounted = react_1$1.useRef(false);
|
|
139539
|
-
var debouncedFunction = react_1$1.useRef(callback);
|
|
139540
|
-
debouncedFunction.current = callback;
|
|
139541
|
-
var cancelDebouncedCallback = react_1$1.useCallback(function () {
|
|
139542
|
-
clearTimeout(functionTimeoutHandler.current);
|
|
139543
|
-
clearTimeout(maxWaitHandler.current);
|
|
139544
|
-
maxWaitHandler.current = null;
|
|
139545
|
-
maxWaitArgs.current = [];
|
|
139546
|
-
functionTimeoutHandler.current = null;
|
|
139547
|
-
leadingCall.current = false;
|
|
139548
|
-
}, []);
|
|
139549
|
-
react_1$1.useEffect(function () { return function () {
|
|
139550
|
-
// we use flag, as we allow to call callPending outside the hook
|
|
139551
|
-
isComponentUnmounted.current = true;
|
|
139552
|
-
}; }, []);
|
|
139553
|
-
var debouncedCallback = react_1$1.useCallback(function () {
|
|
139554
|
-
var args = [];
|
|
139555
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
139556
|
-
args[_i] = arguments[_i];
|
|
139557
|
-
}
|
|
139558
|
-
maxWaitArgs.current = args;
|
|
139559
|
-
clearTimeout(functionTimeoutHandler.current);
|
|
139560
|
-
if (leadingCall.current) {
|
|
139561
|
-
leadingCall.current = false;
|
|
139562
|
-
}
|
|
139563
|
-
if (!functionTimeoutHandler.current && leading && !leadingCall.current) {
|
|
139564
|
-
debouncedFunction.current.apply(debouncedFunction, args);
|
|
139565
|
-
leadingCall.current = true;
|
|
139566
|
-
}
|
|
139567
|
-
functionTimeoutHandler.current = setTimeout(function () {
|
|
139568
|
-
var shouldCallFunction = true;
|
|
139569
|
-
if (leading && leadingCall.current) {
|
|
139570
|
-
shouldCallFunction = false;
|
|
139571
|
-
}
|
|
139572
|
-
cancelDebouncedCallback();
|
|
139573
|
-
if (!isComponentUnmounted.current && trailing && shouldCallFunction) {
|
|
139574
|
-
debouncedFunction.current.apply(debouncedFunction, args);
|
|
139575
|
-
}
|
|
139576
|
-
}, delay);
|
|
139577
|
-
if (maxWait && !maxWaitHandler.current && trailing) {
|
|
139578
|
-
maxWaitHandler.current = setTimeout(function () {
|
|
139579
|
-
var args = maxWaitArgs.current;
|
|
139580
|
-
cancelDebouncedCallback();
|
|
139581
|
-
if (!isComponentUnmounted.current) {
|
|
139582
|
-
debouncedFunction.current.apply(null, args);
|
|
139583
|
-
}
|
|
139584
|
-
}, maxWait);
|
|
139585
|
-
}
|
|
139586
|
-
}, [maxWait, delay, cancelDebouncedCallback, leading, trailing]);
|
|
139587
|
-
var callPending = react_1$1.useCallback(function () {
|
|
139588
|
-
// Call pending callback only if we have anything in our queue
|
|
139589
|
-
if (!functionTimeoutHandler.current) {
|
|
139590
|
-
return;
|
|
139591
|
-
}
|
|
139592
|
-
debouncedFunction.current.apply(null, maxWaitArgs.current);
|
|
139593
|
-
cancelDebouncedCallback();
|
|
139594
|
-
}, [cancelDebouncedCallback]);
|
|
139595
|
-
// At the moment, we use 3 args array so that we save backward compatibility
|
|
139596
|
-
return [debouncedCallback, cancelDebouncedCallback, callPending];
|
|
139597
|
-
}
|
|
139598
|
-
useDebouncedCallback$2.default = useDebouncedCallback$1;
|
|
139599
|
-
|
|
139600
|
-
Object.defineProperty(useDebounce$1, "__esModule", { value: true });
|
|
139601
|
-
var react_1 = React__default;
|
|
139602
|
-
var useDebouncedCallback_1$1 = useDebouncedCallback$2;
|
|
139603
|
-
function valueEquality(left, right) {
|
|
139604
|
-
return left === right;
|
|
139605
|
-
}
|
|
139606
|
-
function useDebounce(value, delay, options) {
|
|
139607
|
-
var eq = options && options.equalityFn ? options.equalityFn : valueEquality;
|
|
139608
|
-
var _a = react_1.useState(value), state = _a[0], dispatch = _a[1];
|
|
139609
|
-
var _b = useDebouncedCallback_1$1.default(react_1.useCallback(function (value) { return dispatch(value); }, []), delay, options), callback = _b[0], cancel = _b[1], callPending = _b[2];
|
|
139610
|
-
var previousValue = react_1.useRef(value);
|
|
139611
|
-
react_1.useEffect(function () {
|
|
139612
|
-
// We need to use this condition otherwise we will run debounce timer for the first render (including maxWait option)
|
|
139613
|
-
if (!eq(previousValue.current, value)) {
|
|
139614
|
-
callback(value);
|
|
139615
|
-
previousValue.current = value;
|
|
139616
|
-
}
|
|
139617
|
-
}, [value, callback, eq]);
|
|
139618
|
-
return [state, cancel, callPending];
|
|
139619
|
-
}
|
|
139620
|
-
useDebounce$1.default = useDebounce;
|
|
139621
|
-
|
|
139622
|
-
Object.defineProperty(lib, "__esModule", { value: true });
|
|
139623
|
-
var useDebounce_1 = useDebounce$1;
|
|
139624
|
-
lib.useDebounce = useDebounce_1.default;
|
|
139625
|
-
var useDebouncedCallback_1 = useDebouncedCallback$2;
|
|
139626
|
-
var useDebouncedCallback = lib.useDebouncedCallback = useDebouncedCallback_1.default;
|
|
139478
|
+
var templateObject_1$3, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
139627
139479
|
|
|
139628
139480
|
var VerticalFilterPanel = function VerticalFilterPanel(_a) {
|
|
139629
139481
|
var filter = _a.filter,
|
|
@@ -139649,51 +139501,11 @@ var VerticalFilterPanelInternal = function VerticalFilterPanelInternal(_a) {
|
|
|
139649
139501
|
className = _a.className,
|
|
139650
139502
|
children = _a.children;
|
|
139651
139503
|
var formatMessage = useIntl().formatMessage;
|
|
139652
|
-
|
|
139653
|
-
var _b = useContext(FilterContext),
|
|
139654
|
-
filter = _b.filter,
|
|
139655
|
-
onChange = _b.onChange;
|
|
139656
|
-
|
|
139657
|
-
var _c = useState$2((filter === null || filter === void 0 ? void 0 : filter.search) || ''),
|
|
139658
|
-
searchText = _c[0],
|
|
139659
|
-
setSearchText = _c[1];
|
|
139660
|
-
|
|
139661
|
-
var _d = useDebouncedCallback(onChange, 500),
|
|
139662
|
-
debouncedOnChange = _d[0],
|
|
139663
|
-
cancelDebounce = _d[1];
|
|
139664
|
-
|
|
139665
|
-
var textColors = useContext(ThemeContext$1).theme.textColors;
|
|
139666
|
-
useEffectOnUpdate(function () {
|
|
139667
|
-
if ((filter === null || filter === void 0 ? void 0 : filter.search) !== searchText) {
|
|
139668
|
-
setSearchText((filter === null || filter === void 0 ? void 0 : filter.search) || '');
|
|
139669
|
-
}
|
|
139670
|
-
}, [filter === null || filter === void 0 ? void 0 : filter.search]);
|
|
139504
|
+
var onChange = useContext(FilterContext).onChange;
|
|
139671
139505
|
return jsxs("div", __assign$g({
|
|
139672
139506
|
className: className
|
|
139673
139507
|
}, {
|
|
139674
|
-
children: [
|
|
139675
|
-
placeholder: formatMessage({
|
|
139676
|
-
id: 'Generic.search'
|
|
139677
|
-
}),
|
|
139678
|
-
value: searchText,
|
|
139679
|
-
onChange: function (_, text) {
|
|
139680
|
-
setSearchText(text);
|
|
139681
|
-
debouncedOnChange(__assign$g(__assign$g({}, filter), {
|
|
139682
|
-
search: text
|
|
139683
|
-
}));
|
|
139684
|
-
},
|
|
139685
|
-
onSearch: function (text) {
|
|
139686
|
-
cancelDebounce();
|
|
139687
|
-
onChange(__assign$g(__assign$g({}, filter), {
|
|
139688
|
-
search: text
|
|
139689
|
-
}));
|
|
139690
|
-
},
|
|
139691
|
-
iconProps: {
|
|
139692
|
-
style: {
|
|
139693
|
-
color: textColors.default
|
|
139694
|
-
}
|
|
139695
|
-
}
|
|
139696
|
-
}, void 0), children, jsxs(ButtonsHost, {
|
|
139508
|
+
children: [children, jsxs(ButtonsHost, {
|
|
139697
139509
|
children: [jsx$1(DefaultButton, {
|
|
139698
139510
|
iconProps: {
|
|
139699
139511
|
iconName: 'ClearFilter'
|
|
@@ -139702,7 +139514,6 @@ var VerticalFilterPanelInternal = function VerticalFilterPanelInternal(_a) {
|
|
|
139702
139514
|
id: 'FilterPanel.clearFilterText'
|
|
139703
139515
|
}),
|
|
139704
139516
|
onClick: function () {
|
|
139705
|
-
setSearchText('');
|
|
139706
139517
|
onChange(null);
|
|
139707
139518
|
}
|
|
139708
139519
|
}, void 0), jsx$1(DefaultButton, {
|
|
@@ -139718,14 +139529,9 @@ var VerticalFilterPanelInternal = function VerticalFilterPanelInternal(_a) {
|
|
|
139718
139529
|
var ButtonsHost = _styled.div.withConfig({
|
|
139719
139530
|
displayName: "VerticalFilterPanel__ButtonsHost",
|
|
139720
139531
|
componentId: "sc-12j7kak-0"
|
|
139721
|
-
})(templateObject_1$
|
|
139722
|
-
|
|
139723
|
-
var StyledSearchBox = _styled(SearchBox$1).withConfig({
|
|
139724
|
-
displayName: "VerticalFilterPanel__StyledSearchBox",
|
|
139725
|
-
componentId: "sc-12j7kak-1"
|
|
139726
|
-
})(templateObject_2 || (templateObject_2 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n"], ["\n margin-bottom: ", "px;\n"])), spacingL);
|
|
139532
|
+
})(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject$l(["\n display: flex;\n justify-content: flex-end;\n margin-top: 20px;\n\n & > *:not(:first-child) {\n margin-left: 20px;\n }\n"], ["\n display: flex;\n justify-content: flex-end;\n margin-top: 20px;\n\n & > *:not(:first-child) {\n margin-left: 20px;\n }\n"])));
|
|
139727
139533
|
|
|
139728
|
-
var templateObject_1$
|
|
139534
|
+
var templateObject_1$2;
|
|
139729
139535
|
|
|
139730
139536
|
var ToolbarFilterModal = function ToolbarFilterModal(_a) {
|
|
139731
139537
|
var filter = _a.filter,
|
|
@@ -139765,9 +139571,9 @@ var ToolbarFilterModal = function ToolbarFilterModal(_a) {
|
|
|
139765
139571
|
var Inner = _styled.div.withConfig({
|
|
139766
139572
|
displayName: "ToolbarFilterModal__Inner",
|
|
139767
139573
|
componentId: "sc-63ubbe-0"
|
|
139768
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject$l(["\n width: 340px;\n"], ["\n width: 340px;\n"])));
|
|
139574
|
+
})(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject$l(["\n width: 340px;\n"], ["\n width: 340px;\n"])));
|
|
139769
139575
|
|
|
139770
|
-
var templateObject_1;
|
|
139576
|
+
var templateObject_1$1;
|
|
139771
139577
|
|
|
139772
139578
|
var ToolbarFilterModalButton = function ToolbarFilterModalButton(_a) {
|
|
139773
139579
|
var filter = _a.filter,
|
|
@@ -139807,4 +139613,99 @@ var ToolbarFilterModalButton = function ToolbarFilterModalButton(_a) {
|
|
|
139807
139613
|
}
|
|
139808
139614
|
};
|
|
139809
139615
|
|
|
139810
|
-
|
|
139616
|
+
// `SameValue` abstract operation
|
|
139617
|
+
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
139618
|
+
var sameValue$1 = Object.is || function is(x, y) {
|
|
139619
|
+
// eslint-disable-next-line no-self-compare
|
|
139620
|
+
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
|
139621
|
+
};
|
|
139622
|
+
|
|
139623
|
+
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
139624
|
+
var anObject = anObject$v;
|
|
139625
|
+
var requireObjectCoercible = requireObjectCoercible$m;
|
|
139626
|
+
var sameValue = sameValue$1;
|
|
139627
|
+
var regExpExec = regexpExecAbstract;
|
|
139628
|
+
|
|
139629
|
+
// @@search logic
|
|
139630
|
+
fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
|
|
139631
|
+
return [
|
|
139632
|
+
// `String.prototype.search` method
|
|
139633
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.search
|
|
139634
|
+
function search(regexp) {
|
|
139635
|
+
var O = requireObjectCoercible(this);
|
|
139636
|
+
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
|
|
139637
|
+
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
|
|
139638
|
+
},
|
|
139639
|
+
// `RegExp.prototype[@@search]` method
|
|
139640
|
+
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
|
|
139641
|
+
function (regexp) {
|
|
139642
|
+
var res = maybeCallNative(nativeSearch, regexp, this);
|
|
139643
|
+
if (res.done) return res.value;
|
|
139644
|
+
|
|
139645
|
+
var rx = anObject(regexp);
|
|
139646
|
+
var S = String(this);
|
|
139647
|
+
|
|
139648
|
+
var previousLastIndex = rx.lastIndex;
|
|
139649
|
+
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
|
|
139650
|
+
var result = regExpExec(rx, S);
|
|
139651
|
+
if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
|
|
139652
|
+
return result === null ? -1 : result.index;
|
|
139653
|
+
}
|
|
139654
|
+
];
|
|
139655
|
+
});
|
|
139656
|
+
|
|
139657
|
+
var SearchFilter = function SearchFilter() {
|
|
139658
|
+
var _a = useContext(FilterContext),
|
|
139659
|
+
filter = _a.filter,
|
|
139660
|
+
onChange = _a.onChange;
|
|
139661
|
+
|
|
139662
|
+
var formatMessage = useIntl().formatMessage;
|
|
139663
|
+
|
|
139664
|
+
var _b = useDebouncedCallback(onChange, 500),
|
|
139665
|
+
debouncedOnChange = _b[0],
|
|
139666
|
+
cancelDebounce = _b[1];
|
|
139667
|
+
|
|
139668
|
+
var textColors = useContext(ThemeContext$1).theme.textColors;
|
|
139669
|
+
|
|
139670
|
+
var _c = useState$2((filter === null || filter === void 0 ? void 0 : filter.search) || ''),
|
|
139671
|
+
searchText = _c[0],
|
|
139672
|
+
setSearchText = _c[1];
|
|
139673
|
+
|
|
139674
|
+
useEffectOnUpdate(function () {
|
|
139675
|
+
if ((filter === null || filter === void 0 ? void 0 : filter.search) !== searchText) {
|
|
139676
|
+
setSearchText((filter === null || filter === void 0 ? void 0 : filter.search) || '');
|
|
139677
|
+
}
|
|
139678
|
+
}, [filter === null || filter === void 0 ? void 0 : filter.search]);
|
|
139679
|
+
return jsx$1(StyledSearchBox, {
|
|
139680
|
+
placeholder: formatMessage({
|
|
139681
|
+
id: 'Generic.search'
|
|
139682
|
+
}),
|
|
139683
|
+
value: searchText,
|
|
139684
|
+
onChange: function (_, text) {
|
|
139685
|
+
setSearchText(text);
|
|
139686
|
+
debouncedOnChange(__assign$g(__assign$g({}, filter), {
|
|
139687
|
+
search: text
|
|
139688
|
+
}));
|
|
139689
|
+
},
|
|
139690
|
+
onSearch: function (text) {
|
|
139691
|
+
cancelDebounce();
|
|
139692
|
+
onChange(__assign$g(__assign$g({}, filter), {
|
|
139693
|
+
search: text
|
|
139694
|
+
}));
|
|
139695
|
+
},
|
|
139696
|
+
iconProps: {
|
|
139697
|
+
style: {
|
|
139698
|
+
color: textColors.default
|
|
139699
|
+
}
|
|
139700
|
+
}
|
|
139701
|
+
}, void 0);
|
|
139702
|
+
};
|
|
139703
|
+
|
|
139704
|
+
var StyledSearchBox = _styled(SearchBox$1).withConfig({
|
|
139705
|
+
displayName: "SearchFilter__StyledSearchBox",
|
|
139706
|
+
componentId: "sc-f84c6g-0"
|
|
139707
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n"], ["\n margin-bottom: ", "px;\n"])), spacingL);
|
|
139708
|
+
|
|
139709
|
+
var templateObject_1;
|
|
139710
|
+
|
|
139711
|
+
export { Avatar as A, ToolbarFilterModal as B, ToolbarFilterModalButton as C, ChannelFilter as D, EventDetail as E, ChannelToolbarFilter as F, PublishingDateToolbarFilter as G, PublishingDateFilter as H, ItemLayoutMode as I, ClearAllFiltersButton as J, KeywordsFilter as K, KeywordsToolbarFilter as L, ManageChannels as M, NewsDetail as N, AuthorToolbarFilter as O, PropTypes$2 as P, AuthorFilter as Q, ReachContextProvider as R, SearchFilter as S, ThemeContext$1 as T, UserDetails as U, VerticalFilterPanel as V, _assertThisInitialized$b as _, commonjsGlobal$7 as a, _setPrototypeOf$6 as b, commonjsRequire as c, _defineProperty$p as d, _extends$9 as e, minScreenSize as f, PageDetail as g, NewsList as h, NewsGrid as i, useCurrentUser as j, NewsHero as k, NewsEditorDashboard as l, moment$1 as m, Toolbar$1 as n, ToolbarIconButton as o, ToolbarChannelSelector as p, ToolbarMarkAllEventsAsReadButton as q, ToolbarMarkAllNewsAsReadButton as r, ToolbarCloseButton as s, NewsItemContextProvider as t, useWindowSize$2 as u, ToolbarNewsLanguageSelector as v, ToolbarManageNewsItemButton as w, NewsDetailPreview as x, NewsItemPreviewContextProvider as y, ToolbarFilterPanel as z };
|