@livetiles/reach-components-react 0.4.0-preview.216 → 0.4.0-preview.219
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/KeywordsFilter.d.ts +2 -0
- package/common/ToolbarFilterCalloutButton.d.ts +8 -0
- package/en.async.esm.esm.js +3 -0
- package/index.d.ts +3 -1
- package/index.esm.js +1 -1
- package/index.esm2.js +2694 -192
- package/index.umd.js +2697 -191
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -1214,16 +1214,16 @@
|
|
|
1214
1214
|
var process$7 = global$r.process;
|
|
1215
1215
|
var versions$5 = process$7 && process$7.versions;
|
|
1216
1216
|
var v8$4 = versions$5 && versions$5.v8;
|
|
1217
|
-
var match$
|
|
1217
|
+
var match$7, version$a;
|
|
1218
1218
|
|
|
1219
1219
|
if (v8$4) {
|
|
1220
|
-
match$
|
|
1221
|
-
version$a = match$
|
|
1220
|
+
match$7 = v8$4.split('.');
|
|
1221
|
+
version$a = match$7[0] + match$7[1];
|
|
1222
1222
|
} else if (userAgent$5) {
|
|
1223
|
-
match$
|
|
1224
|
-
if (!match$
|
|
1225
|
-
match$
|
|
1226
|
-
if (match$
|
|
1223
|
+
match$7 = userAgent$5.match(/Edge\/(\d+)/);
|
|
1224
|
+
if (!match$7 || match$7[1] >= 74) {
|
|
1225
|
+
match$7 = userAgent$5.match(/Chrome\/(\d+)/);
|
|
1226
|
+
if (match$7) version$a = match$7[1];
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
1229
|
|
|
@@ -41518,17 +41518,17 @@
|
|
|
41518
41518
|
var process$1$3 = global$2$3.process;
|
|
41519
41519
|
var versions$3 = process$1$3 && process$1$3.versions;
|
|
41520
41520
|
var v8$3 = versions$3 && versions$3.v8;
|
|
41521
|
-
var match$
|
|
41521
|
+
var match$6, version$7;
|
|
41522
41522
|
|
|
41523
41523
|
if (v8$3) {
|
|
41524
|
-
match$
|
|
41525
|
-
version$7 = match$
|
|
41524
|
+
match$6 = v8$3.split('.');
|
|
41525
|
+
version$7 = match$6[0] + match$6[1];
|
|
41526
41526
|
} else if (userAgent$4) {
|
|
41527
|
-
match$
|
|
41527
|
+
match$6 = userAgent$4.match(/Edge\/(\d+)/);
|
|
41528
41528
|
|
|
41529
|
-
if (!match$
|
|
41530
|
-
match$
|
|
41531
|
-
if (match$
|
|
41529
|
+
if (!match$6 || match$6[1] >= 74) {
|
|
41530
|
+
match$6 = userAgent$4.match(/Chrome\/(\d+)/);
|
|
41531
|
+
if (match$6) version$7 = match$6[1];
|
|
41532
41532
|
}
|
|
41533
41533
|
}
|
|
41534
41534
|
|
|
@@ -49753,17 +49753,17 @@
|
|
|
49753
49753
|
var process$2$2 = global$4$2.process;
|
|
49754
49754
|
var versions$2 = process$2$2 && process$2$2.versions;
|
|
49755
49755
|
var v8$2 = versions$2 && versions$2.v8;
|
|
49756
|
-
var match$
|
|
49756
|
+
var match$5, version$6;
|
|
49757
49757
|
|
|
49758
49758
|
if (v8$2) {
|
|
49759
|
-
match$
|
|
49760
|
-
version$6 = match$
|
|
49759
|
+
match$5 = v8$2.split('.');
|
|
49760
|
+
version$6 = match$5[0] + match$5[1];
|
|
49761
49761
|
} else if (userAgent$3) {
|
|
49762
|
-
match$
|
|
49762
|
+
match$5 = userAgent$3.match(/Edge\/(\d+)/);
|
|
49763
49763
|
|
|
49764
|
-
if (!match$
|
|
49765
|
-
match$
|
|
49766
|
-
if (match$
|
|
49764
|
+
if (!match$5 || match$5[1] >= 74) {
|
|
49765
|
+
match$5 = userAgent$3.match(/Chrome\/(\d+)/);
|
|
49766
|
+
if (match$5) version$6 = match$5[1];
|
|
49767
49767
|
}
|
|
49768
49768
|
}
|
|
49769
49769
|
|
|
@@ -66092,7 +66092,7 @@
|
|
|
66092
66092
|
var booleanValueOf = Boolean.prototype.valueOf;
|
|
66093
66093
|
var objectToString = Object.prototype.toString;
|
|
66094
66094
|
var functionToString$2 = Function.prototype.toString;
|
|
66095
|
-
var match$
|
|
66095
|
+
var match$4 = String.prototype.match;
|
|
66096
66096
|
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
66097
66097
|
var gOPS = Object.getOwnPropertySymbols;
|
|
66098
66098
|
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
@@ -66268,7 +66268,7 @@
|
|
|
66268
66268
|
if (isString$1(obj)) {
|
|
66269
66269
|
return markBoxed(inspect(String(obj)));
|
|
66270
66270
|
}
|
|
66271
|
-
if (!isDate(obj) && !isRegExp$8(obj)) {
|
|
66271
|
+
if (!isDate$1(obj) && !isRegExp$8(obj)) {
|
|
66272
66272
|
var ys = arrObjKeys(obj, inspect);
|
|
66273
66273
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
66274
66274
|
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
@@ -66294,7 +66294,7 @@
|
|
|
66294
66294
|
}
|
|
66295
66295
|
|
|
66296
66296
|
function isArray$8(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66297
|
-
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66297
|
+
function isDate$1(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66298
66298
|
function isRegExp$8(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66299
66299
|
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66300
66300
|
function isString$1(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
@@ -66341,7 +66341,7 @@
|
|
|
66341
66341
|
|
|
66342
66342
|
function nameOf(f) {
|
|
66343
66343
|
if (f.name) { return f.name; }
|
|
66344
|
-
var m = match$
|
|
66344
|
+
var m = match$4.call(functionToString$2.call(f), /^function\s*([\w$]+)/);
|
|
66345
66345
|
if (m) { return m[1]; }
|
|
66346
66346
|
return null;
|
|
66347
66347
|
}
|
|
@@ -70876,7 +70876,7 @@
|
|
|
70876
70876
|
|
|
70877
70877
|
var defaultMessage = "Copy to clipboard: #{key}, Enter";
|
|
70878
70878
|
|
|
70879
|
-
function format(message) {
|
|
70879
|
+
function format$1(message) {
|
|
70880
70880
|
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
70881
70881
|
return message.replace(/#{\s*key\s*}/g, copyKey);
|
|
70882
70882
|
}
|
|
@@ -70955,7 +70955,7 @@
|
|
|
70955
70955
|
} catch (err) {
|
|
70956
70956
|
debug && console.error("unable to copy using clipboardData: ", err);
|
|
70957
70957
|
debug && console.error("falling back to prompt");
|
|
70958
|
-
message = format("message" in options ? options.message : defaultMessage);
|
|
70958
|
+
message = format$1("message" in options ? options.message : defaultMessage);
|
|
70959
70959
|
window.prompt(message, text);
|
|
70960
70960
|
}
|
|
70961
70961
|
} finally {
|
|
@@ -75561,11 +75561,11 @@
|
|
|
75561
75561
|
var volume_1 = volume;
|
|
75562
75562
|
var VideoContainer = styled_1.default.div(templateObject_1$2q || (templateObject_1$2q = __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"])));
|
|
75563
75563
|
var VideoStyled = styled_1.default(_1.default)(templateObject_2$1D || (templateObject_2$1D = __makeTemplateObject$2(["\n height: 100%;\n display: inline-block;\n object-fit: fill;\n pointer-events: none;\n background: rgb(0, 0, 0, 0);\n"], ["\n height: 100%;\n display: inline-block;\n object-fit: fill;\n pointer-events: none;\n background: rgb(0, 0, 0, 0);\n"])));
|
|
75564
|
-
var Button$
|
|
75564
|
+
var Button$2 = styled_1.default.div(templateObject_3$15 || (templateObject_3$15 = __makeTemplateObject$2(["\n position: absolute;\n top: 6px;\n right: 6px;\n cursor: pointer;\n opacity: ", ";\n transition: opacity ease-out 800ms;\n"], ["\n position: absolute;\n top: 6px;\n right: 6px;\n cursor: pointer;\n opacity: ", ";\n transition: opacity ease-out 800ms;\n"])), function (props) { return (props.isHovered ? 1 : 0.8); });
|
|
75565
75565
|
var speakerClassName = 'giphy-video-overlay-button';
|
|
75566
75566
|
var VolumeButton = function (_a) {
|
|
75567
75567
|
var muted = _a.muted, toggleMute = _a.toggleMute, mutedByBrowser = _a.mutedByBrowser, isHovered = _a.isHovered;
|
|
75568
|
-
return (react_1.default.createElement(Button$
|
|
75568
|
+
return (react_1.default.createElement(Button$2, { className: speakerClassName, onClick: function (e) {
|
|
75569
75569
|
e.preventDefault();
|
|
75570
75570
|
e.stopPropagation();
|
|
75571
75571
|
toggleMute();
|
|
@@ -80172,17 +80172,17 @@
|
|
|
80172
80172
|
var process$2$1 = global$2$1.process;
|
|
80173
80173
|
var versions$1 = process$2$1 && process$2$1.versions;
|
|
80174
80174
|
var v8$1 = versions$1 && versions$1.v8;
|
|
80175
|
-
var match$
|
|
80175
|
+
var match$3, version$2;
|
|
80176
80176
|
|
|
80177
80177
|
if (v8$1) {
|
|
80178
|
-
match$
|
|
80179
|
-
version$2 = match$
|
|
80178
|
+
match$3 = v8$1.split('.');
|
|
80179
|
+
version$2 = match$3[0] + match$3[1];
|
|
80180
80180
|
} else if (userAgent$2) {
|
|
80181
|
-
match$
|
|
80181
|
+
match$3 = userAgent$2.match(/Edge\/(\d+)/);
|
|
80182
80182
|
|
|
80183
|
-
if (!match$
|
|
80184
|
-
match$
|
|
80185
|
-
if (match$
|
|
80183
|
+
if (!match$3 || match$3[1] >= 74) {
|
|
80184
|
+
match$3 = userAgent$2.match(/Chrome\/(\d+)/);
|
|
80185
|
+
if (match$3) version$2 = match$3[1];
|
|
80186
80186
|
}
|
|
80187
80187
|
}
|
|
80188
80188
|
|
|
@@ -82358,7 +82358,7 @@
|
|
|
82358
82358
|
}
|
|
82359
82359
|
|
|
82360
82360
|
var allClassNames = classNames('header-button', className);
|
|
82361
|
-
var IconElement = !link ? jsxRuntime.jsx(Button, __assign$1({
|
|
82361
|
+
var IconElement = !link ? jsxRuntime.jsx(Button$1, __assign$1({
|
|
82362
82362
|
className: allClassNames,
|
|
82363
82363
|
disabled: disabled,
|
|
82364
82364
|
onClick: function (e) {
|
|
@@ -82396,10 +82396,10 @@
|
|
|
82396
82396
|
componentId: "sc-1p61ffo-0"
|
|
82397
82397
|
})(templateObject_1$J$1 || (templateObject_1$J$1 = __makeTemplateObject$1(["\n height: 100%;\n"], ["\n height: 100%;\n"])));
|
|
82398
82398
|
|
|
82399
|
-
var Button = _styled__default["default"](officeUiFabricReact.IconButton).withConfig({
|
|
82399
|
+
var Button$1 = _styled__default["default"](officeUiFabricReact.IconButton).withConfig({
|
|
82400
82400
|
displayName: "IconHeaderButton__Button",
|
|
82401
82401
|
componentId: "sc-1p61ffo-1"
|
|
82402
|
-
})(templateObject_4$d$
|
|
82402
|
+
})(templateObject_4$d$2 || (templateObject_4$d$2 = __makeTemplateObject$1(["\n && {\n display: flex;\n padding: 0 5px;\n background-color: transparent;\n height: 100%;\n margin: 0 -1.5px; // this removes the \"gap\" between two side by side active buttons\n\n ", ";\n ", "\n }\n"], ["\n && {\n display: flex;\n padding: 0 5px;\n background-color: transparent;\n height: 100%;\n margin: 0 -1.5px; // this removes the \"gap\" between two side by side active buttons\n\n ", ";\n ", "\n }\n"])), function (p) {
|
|
82403
82403
|
return !p.isActive && _styled.css(templateObject_2$u$1 || (templateObject_2$u$1 = __makeTemplateObject$1(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.onPrimary);
|
|
82404
82404
|
}, function (p) {
|
|
82405
82405
|
return p.isActive && _styled.css(templateObject_3$l$1 || (templateObject_3$l$1 = __makeTemplateObject$1(["\n background-color: ", ";\n color: ", ";\n\n &&:hover {\n background-color: ", ";\n color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n\n &&:hover {\n background-color: ", ";\n color: ", ";\n }\n "])), p.theme.palette.themeSecondary, p.theme.textColors.onSecondary, p.theme.palette.themeSecondary, p.theme.textColors.onSecondary);
|
|
@@ -82412,7 +82412,7 @@
|
|
|
82412
82412
|
return _styled.css(templateObject_5$8$2 || (templateObject_5$8$2 = __makeTemplateObject$1(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.onPrimary);
|
|
82413
82413
|
});
|
|
82414
82414
|
|
|
82415
|
-
var templateObject_1$J$1, templateObject_2$u$1, templateObject_3$l$1, templateObject_4$d$
|
|
82415
|
+
var templateObject_1$J$1, templateObject_2$u$1, templateObject_3$l$1, templateObject_4$d$2, templateObject_5$8$2, templateObject_6$6$2; // a string of all valid unicode whitespaces
|
|
82416
82416
|
// eslint-disable-next-line max-len
|
|
82417
82417
|
|
|
82418
82418
|
var whitespaces$2$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
@@ -83226,7 +83226,7 @@
|
|
|
83226
83226
|
var ToggleAllButtons = function ToggleAllButtons(_a) {
|
|
83227
83227
|
var toggleAll = _a.toggleAll,
|
|
83228
83228
|
className = _a.className;
|
|
83229
|
-
return jsxRuntime.jsxs(Host$h$
|
|
83229
|
+
return jsxRuntime.jsxs(Host$h$2, __assign$1({
|
|
83230
83230
|
className: className
|
|
83231
83231
|
}, {
|
|
83232
83232
|
children: [jsxRuntime.jsx(StyledButton$1$1, __assign$1({
|
|
@@ -83251,7 +83251,7 @@
|
|
|
83251
83251
|
}), void 0);
|
|
83252
83252
|
};
|
|
83253
83253
|
|
|
83254
|
-
var Host$h$
|
|
83254
|
+
var Host$h$2 = _styled__default["default"].div.withConfig({
|
|
83255
83255
|
displayName: "ToggleAllButtons__Host",
|
|
83256
83256
|
componentId: "sc-kbn3b4-0"
|
|
83257
83257
|
})(templateObject_1$x$1 || (templateObject_1$x$1 = __makeTemplateObject$1(["\n margin-bottom: ", "px;\n"], ["\n margin-bottom: ", "px;\n"])), spacingS);
|
|
@@ -83383,7 +83383,7 @@
|
|
|
83383
83383
|
}
|
|
83384
83384
|
|
|
83385
83385
|
var showMoreIndicator = channels.length > visibleChannelsCount;
|
|
83386
|
-
return jsxRuntime.jsxs(Host$e$
|
|
83386
|
+
return jsxRuntime.jsxs(Host$e$2, __assign$1({
|
|
83387
83387
|
className: className,
|
|
83388
83388
|
"data-has-more-indicator": showMoreIndicator
|
|
83389
83389
|
}, {
|
|
@@ -83469,13 +83469,13 @@
|
|
|
83469
83469
|
// The full width of the container => 100%
|
|
83470
83470
|
// Minus the indicator width which might not be there in the case we have 3 channels or less
|
|
83471
83471
|
|
|
83472
|
-
var Host$e$
|
|
83472
|
+
var Host$e$2 = _styled__default["default"].div(templateObject_1$s$1 || (templateObject_1$s$1 = __makeTemplateObject$1(["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ", "px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"], ["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ", "px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"])), IndicatorWidth + BubbleGap);
|
|
83473
83473
|
|
|
83474
83474
|
var ChannelsHost = _styled__default["default"].div(templateObject_2$m$1 || (templateObject_2$m$1 = __makeTemplateObject$1(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"]))); // Max channel width: Divide the space by the number of bubbles we need to display minus bubble gap - 6px
|
|
83475
83475
|
|
|
83476
83476
|
|
|
83477
83477
|
var StyledChannelTitle = _styled__default["default"].span(templateObject_5$4$2 || (templateObject_5$4$2 = __makeTemplateObject$1(["\n z-index: 1;\n\n ", "\n\n ", "\n\n ", "\n"], ["\n z-index: 1;\n\n ", "\n\n ", "\n\n ", "\n"])), function (p) {
|
|
83478
|
-
return p.bubbleCount && _styled.css(templateObject_3$e$
|
|
83478
|
+
return p.bubbleCount && _styled.css(templateObject_3$e$2 || (templateObject_3$e$2 = __makeTemplateObject$1(["\n max-width: calc(100% / ", " - ", "px);\n "], ["\n max-width: calc(100% / ", " - ", "px);\n "])), p.bubbleCount, BubbleGap);
|
|
83479
83479
|
}, function (p) {
|
|
83480
83480
|
return p.bubbleCount && p.bubbleCount > 1 && _styled.css(templateObject_4$8$2 || (templateObject_4$8$2 = __makeTemplateObject$1(["\n margin-right: ", "px;\n "], ["\n margin-right: ", "px;\n "])), BubbleGap);
|
|
83481
83481
|
}, function (p) {
|
|
@@ -83498,7 +83498,7 @@
|
|
|
83498
83498
|
|
|
83499
83499
|
var CalloutList = _styled__default["default"].ul(templateObject_9$g || (templateObject_9$g = __makeTemplateObject$1(["\n margin: 0;\n padding: 0;\n list-style: none;\n"], ["\n margin: 0;\n padding: 0;\n list-style: none;\n"])));
|
|
83500
83500
|
|
|
83501
|
-
var templateObject_1$s$1, templateObject_2$m$1, templateObject_3$e$
|
|
83501
|
+
var templateObject_1$s$1, templateObject_2$m$1, templateObject_3$e$2, templateObject_4$8$2, templateObject_5$4$2, templateObject_6$2$2, templateObject_7$n, templateObject_8$l, templateObject_9$g;
|
|
83502
83502
|
|
|
83503
83503
|
_styled__default["default"]('div').withConfig({
|
|
83504
83504
|
displayName: "ChannelSelector__Host",
|
|
@@ -83554,7 +83554,7 @@
|
|
|
83554
83554
|
var Host$c$1 = _styled__default["default"].ul.withConfig({
|
|
83555
83555
|
displayName: "ClickableChannelTitles__Host",
|
|
83556
83556
|
componentId: "sc-1a7ny18-0"
|
|
83557
|
-
})(templateObject_1$q$
|
|
83557
|
+
})(templateObject_1$q$2 || (templateObject_1$q$2 = __makeTemplateObject$1(["\n display: flex;\n flex-wrap: wrap;\n font-size: ", "px;\n\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n\n li {\n margin: 0;\n }\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n font-size: ", "px;\n\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n\n li {\n margin: 0;\n }\n }\n"])), fontSizeSmall);
|
|
83558
83558
|
|
|
83559
83559
|
var ChannelBubble = _styled__default["default"].div.withConfig({
|
|
83560
83560
|
displayName: "ClickableChannelTitles__ChannelBubble",
|
|
@@ -83577,7 +83577,7 @@
|
|
|
83577
83577
|
componentId: "sc-1a7ny18-3"
|
|
83578
83578
|
})(templateObject_4$7$2 || (templateObject_4$7$2 = __makeTemplateObject$1(["\n display: block;\n margin: 2px ", "px 2px 0;\n"], ["\n display: block;\n margin: 2px ", "px 2px 0;\n"])), spacingXs);
|
|
83579
83579
|
|
|
83580
|
-
var templateObject_1$q$
|
|
83580
|
+
var templateObject_1$q$2, templateObject_2$l$1, templateObject_3$d$2, templateObject_4$7$2;
|
|
83581
83581
|
|
|
83582
83582
|
var ToolbarSearch = function ToolbarSearch(_a) {
|
|
83583
83583
|
var searchText = _a.searchText,
|
|
@@ -83608,14 +83608,14 @@
|
|
|
83608
83608
|
var SearchBoxLargeScreen = _styled__default["default"].div.withConfig({
|
|
83609
83609
|
displayName: "ToolbarSearch__SearchBoxLargeScreen",
|
|
83610
83610
|
componentId: "sc-1f480ry-0"
|
|
83611
|
-
})(templateObject_1$p$
|
|
83611
|
+
})(templateObject_1$p$2 || (templateObject_1$p$2 = __makeTemplateObject$1(["\n display: flex;\n justify-content: flex-end;\n max-width: 300px;\n flex-grow: 1;\n @media (max-width: ", "px) {\n display: none;\n }\n"], ["\n display: flex;\n justify-content: flex-end;\n max-width: 300px;\n flex-grow: 1;\n @media (max-width: ", "px) {\n display: none;\n }\n"])), maxScreenSize.medium);
|
|
83612
83612
|
|
|
83613
83613
|
var SearchIconSmallScreen = _styled__default["default"].div.withConfig({
|
|
83614
83614
|
displayName: "ToolbarSearch__SearchIconSmallScreen",
|
|
83615
83615
|
componentId: "sc-1f480ry-1"
|
|
83616
83616
|
})(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);
|
|
83617
83617
|
|
|
83618
|
-
var templateObject_1$p$
|
|
83618
|
+
var templateObject_1$p$2, templateObject_2$k$1;
|
|
83619
83619
|
|
|
83620
83620
|
var Toolbar$1 = function Toolbar(_a) {
|
|
83621
83621
|
var leftSide = _a.leftSide,
|
|
@@ -83946,9 +83946,9 @@
|
|
|
83946
83946
|
|
|
83947
83947
|
var StyledCallout$1$1 = _styled__default["default"](Callout)(templateObject_1$h$2 || (templateObject_1$h$2 = __makeTemplateObject$1(["\n border-radius: 10px;\n padding: 5px;\n width: 360px;\n height: 450px;\n"], ["\n border-radius: 10px;\n padding: 5px;\n width: 360px;\n height: 450px;\n"])));
|
|
83948
83948
|
|
|
83949
|
-
var StyledGifSelector = _styled__default["default"](GifSelector)(templateObject_2$f$
|
|
83949
|
+
var StyledGifSelector = _styled__default["default"](GifSelector)(templateObject_2$f$2 || (templateObject_2$f$2 = __makeTemplateObject$1(["\n overflow-y: auto;\n height: 400px;\n"], ["\n overflow-y: auto;\n height: 400px;\n"])));
|
|
83950
83950
|
|
|
83951
|
-
var templateObject_1$h$2, templateObject_2$f$
|
|
83951
|
+
var templateObject_1$h$2, templateObject_2$f$2;
|
|
83952
83952
|
|
|
83953
83953
|
_styled.createGlobalStyle(templateObject_1$g$2 || (templateObject_1$g$2 = __makeTemplateObject$1(["\n .lt-reach.dialog-gif-selector {\n .ms-Dialog-main {\n width: 400px !important;\n\n @media (max-width: ", "px) {\n width: 100% !important;\n }\n }\n}\n"], ["\n .lt-reach.dialog-gif-selector {\n .ms-Dialog-main {\n width: 400px !important;\n\n @media (max-width: ", "px) {\n width: 100% !important;\n }\n }\n}\n"])), maxScreenSize.small);
|
|
83954
83954
|
|
|
@@ -87330,9 +87330,9 @@
|
|
|
87330
87330
|
}), void 0);
|
|
87331
87331
|
};
|
|
87332
87332
|
|
|
87333
|
-
var version$1 = "0.4.0-preview.
|
|
87334
|
-
var buildId = "
|
|
87335
|
-
var commitId = "
|
|
87333
|
+
var version$1 = "0.4.0-preview.219";
|
|
87334
|
+
var buildId = "98555";
|
|
87335
|
+
var commitId = "7017e140d89782fc7985a4be2c49f4898fab5489";
|
|
87336
87336
|
var isCustomerBuild = false;
|
|
87337
87337
|
var buildInfo = {
|
|
87338
87338
|
version: version$1,
|
|
@@ -131493,7 +131493,7 @@
|
|
|
131493
131493
|
// - setTimeout
|
|
131494
131494
|
}else {notify$1=function(){// strange IE + webpack dev server bug - use .call(global)
|
|
131495
131495
|
macrotask.call(global$6,flush);};}}var microtask$1=queueMicrotask||function(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify$1();}last=task;};var newPromiseCapability$2={};var aFunction$4=aFunction$7;var PromiseCapability=function(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(resolve!==undefined||reject!==undefined)throw TypeError('Bad Promise constructor');resolve=$$resolve;reject=$$reject;});this.resolve=aFunction$4(resolve);this.reject=aFunction$4(reject);};// 25.4.1.5 NewPromiseCapability(C)
|
|
131496
|
-
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$3=isObject$c;var newPromiseCapability$1=newPromiseCapability$2;var promiseResolve$1=function(C,x){anObject$2$1(C);if(isObject$3(x)&&x.constructor===C)return x;var promiseCapability=newPromiseCapability$1.f(C);var resolve=promiseCapability.resolve;resolve(x);return promiseCapability.promise;};var global$5=global$m;var hostReportErrors$1=function(a,b){var console=global$5.console;if(console&&console.error){arguments.length===1?console.error(a):console.error(a,b);}};var perform$1=function(exec){try{return {error:false,value:exec()};}catch(error){return {error:true,value:error};}};var global$4=global$m;var userAgent=engineUserAgent;var process$1=global$4.process;var versions=process$1&&process$1.versions;var v8=versions&&versions.v8;var match,version;if(v8){match=v8.split('.');version=match[0]+match[1];}else if(userAgent){match=userAgent.match(/Edge\/(\d+)/);if(!match||match[1]>=74){match=userAgent.match(/Chrome\/(\d+)/);if(match)version=match[1];}}var engineV8Version=version&&+version;var $$9=_export;var global$3=global$m;var getBuiltIn=getBuiltIn$6;var NativePromise=nativePromiseConstructor;var redefine$a=redefine$9.exports;var redefineAll=redefineAll$2;var setToStringTag=setToStringTag$5;var setSpecies=setSpecies$2;var isObject$2=isObject$c;var aFunction$3=aFunction$7;var anInstance=anInstance$3;var classof$1=classofRaw$1;var inspectSource=inspectSource$3;var iterate=iterate$2.exports;var checkCorrectnessOfIteration=checkCorrectnessOfIteration$1;var speciesConstructor=speciesConstructor$2;var task=task$1.set;var microtask=microtask$1;var promiseResolve=promiseResolve$1;var hostReportErrors=hostReportErrors$1;var newPromiseCapabilityModule=newPromiseCapability$2;var perform=perform$1;var InternalStateModule=internalState;var isForced=isForced_1;var wellKnownSymbol$2=wellKnownSymbol$l;var V8_VERSION=engineV8Version;var SPECIES$1=wellKnownSymbol$2('species');var PROMISE='Promise';var getInternalState=InternalStateModule.get;var setInternalState=InternalStateModule.set;var getInternalPromiseState=InternalStateModule.getterFor(PROMISE);var PromiseConstructor=NativePromise;var TypeError$1=global$3.TypeError;var document$1=global$3.document;var process$4=global$3.process;var $fetch=getBuiltIn('fetch');var newPromiseCapability=newPromiseCapabilityModule.f;var newGenericPromiseCapability=newPromiseCapability;var IS_NODE=classof$1(process$4)=='process';var DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$3.dispatchEvent);var UNHANDLED_REJECTION='unhandledrejection';var REJECTION_HANDLED='rejectionhandled';var PENDING=0;var FULFILLED=1;var REJECTED=2;var HANDLED=1;var UNHANDLED=2;var Internal,OwnPromiseCapability,PromiseWrapper,nativeThen;var FORCED$2=isForced(PROMISE,function(){var GLOBAL_CORE_JS_PROMISE=inspectSource(PromiseConstructor)!==String(PromiseConstructor);if(!GLOBAL_CORE_JS_PROMISE){// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
131496
|
+
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$3=isObject$c;var newPromiseCapability$1=newPromiseCapability$2;var promiseResolve$1=function(C,x){anObject$2$1(C);if(isObject$3(x)&&x.constructor===C)return x;var promiseCapability=newPromiseCapability$1.f(C);var resolve=promiseCapability.resolve;resolve(x);return promiseCapability.promise;};var global$5=global$m;var hostReportErrors$1=function(a,b){var console=global$5.console;if(console&&console.error){arguments.length===1?console.error(a):console.error(a,b);}};var perform$1=function(exec){try{return {error:false,value:exec()};}catch(error){return {error:true,value:error};}};var global$4=global$m;var userAgent=engineUserAgent;var process$1=global$4.process;var versions=process$1&&process$1.versions;var v8=versions&&versions.v8;var match$2,version;if(v8){match$2=v8.split('.');version=match$2[0]+match$2[1];}else if(userAgent){match$2=userAgent.match(/Edge\/(\d+)/);if(!match$2||match$2[1]>=74){match$2=userAgent.match(/Chrome\/(\d+)/);if(match$2)version=match$2[1];}}var engineV8Version=version&&+version;var $$9=_export;var global$3=global$m;var getBuiltIn=getBuiltIn$6;var NativePromise=nativePromiseConstructor;var redefine$a=redefine$9.exports;var redefineAll=redefineAll$2;var setToStringTag=setToStringTag$5;var setSpecies=setSpecies$2;var isObject$2=isObject$c;var aFunction$3=aFunction$7;var anInstance=anInstance$3;var classof$1=classofRaw$1;var inspectSource=inspectSource$3;var iterate=iterate$2.exports;var checkCorrectnessOfIteration=checkCorrectnessOfIteration$1;var speciesConstructor=speciesConstructor$2;var task=task$1.set;var microtask=microtask$1;var promiseResolve=promiseResolve$1;var hostReportErrors=hostReportErrors$1;var newPromiseCapabilityModule=newPromiseCapability$2;var perform=perform$1;var InternalStateModule=internalState;var isForced=isForced_1;var wellKnownSymbol$2=wellKnownSymbol$l;var V8_VERSION=engineV8Version;var SPECIES$1=wellKnownSymbol$2('species');var PROMISE='Promise';var getInternalState=InternalStateModule.get;var setInternalState=InternalStateModule.set;var getInternalPromiseState=InternalStateModule.getterFor(PROMISE);var PromiseConstructor=NativePromise;var TypeError$1=global$3.TypeError;var document$1=global$3.document;var process$4=global$3.process;var $fetch=getBuiltIn('fetch');var newPromiseCapability=newPromiseCapabilityModule.f;var newGenericPromiseCapability=newPromiseCapability;var IS_NODE=classof$1(process$4)=='process';var DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$3.dispatchEvent);var UNHANDLED_REJECTION='unhandledrejection';var REJECTION_HANDLED='rejectionhandled';var PENDING=0;var FULFILLED=1;var REJECTED=2;var HANDLED=1;var UNHANDLED=2;var Internal,OwnPromiseCapability,PromiseWrapper,nativeThen;var FORCED$2=isForced(PROMISE,function(){var GLOBAL_CORE_JS_PROMISE=inspectSource(PromiseConstructor)!==String(PromiseConstructor);if(!GLOBAL_CORE_JS_PROMISE){// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
131497
131497
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
131498
131498
|
// We can't detect it synchronously, so just check versions
|
|
131499
131499
|
if(V8_VERSION===66)return true;// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
@@ -131714,7 +131714,7 @@
|
|
|
131714
131714
|
// for this case the blockProps would be an empty object and
|
|
131715
131715
|
// we need to set the showPages and showDocuments to true
|
|
131716
131716
|
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 jsxRuntime.jsx(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 jsxRuntime.jsx(InlinePageListByKeywords,{keywords:blockProps.keywords.split(','),showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}if(blockProps===null||blockProps===void 0?void 0:blockProps.pageId){return jsxRuntime.jsx(InlinePageListByPageId,{pageId:blockProps.pageId,showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}return jsxRuntime.jsx(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
|
|
131717
|
-
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=ReactRouterDom.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 jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx(LargeScreenBreadcrumb,{items:breadcrumbItems,onRenderItem:renderBreadcrumbItem,overflowIndex:1,"data-breadcrumb":true,overflowAriaLabel:formatMessage({id:'AriaLabel.otherPages'}),focusZoneProps:{handleTabKey:1}},void 0),jsxRuntime.jsx(MobileBreadcrumb,{target:target,parentNode:parentNode},void 0)]}),void 0);function renderBreadcrumbItem(item){if(item.key==='home'){return jsxRuntime.jsx(BreadcrumbHomeItem,__assign({to:item.href,"aria-label":item.text,"data-pages-home-icon":true},{children:jsxRuntime.jsx(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0);}if(item.isCurrentItem){return jsxRuntime.jsx(BreadcrumbCurrentItem,__assign({"aria-current":"page"},{children:item.text}),void 0);}return jsxRuntime.jsx(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 jsxRuntime.jsxs(MobileBreadcrumbHost,__assign({"data-mobile-breadcrumb":true},{children:[jsxRuntime.jsx("li",{children:jsxRuntime.jsx(BreadcrumbHomeItem,__assign({to:target,"aria-label":formatMessage({id:'Generic.home'}),"data-pages-home-icon":true},{children:jsxRuntime.jsx(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0)},void 0),parentNode&&jsxRuntime.jsxs(ParentNode,{children:[jsxRuntime.jsx(LeftChevronIcon,{iconName:"ChevronLeft"},void 0),jsxRuntime.jsx(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__default["default"].ul.withConfig({displayName:"PageBreadcrumb__MobileBreadcrumbHost",componentId:"sc-1m4qq1d-0"})(templateObject_1$Q||(templateObject_1$Q=__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__default["default"].li.withConfig({displayName:"PageBreadcrumb__ParentNode",componentId:"sc-1m4qq1d-1"})(templateObject_2$w||(templateObject_2$w=__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__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageBreadcrumb__LeftChevronIcon",componentId:"sc-1m4qq1d-2"})(templateObject_3$n||(templateObject_3$n=__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__default["default"](officeUiFabricReact.Breadcrumb).withConfig({displayName:"PageBreadcrumb__LargeScreenBreadcrumb",componentId:"sc-1m4qq1d-3"})(templateObject_4$e||(templateObject_4$e=__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__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageBreadcrumb__HomeIcon",componentId:"sc-1m4qq1d-4"})(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n padding-top: 1px;\n"],["\n padding-top: 1px;\n"])));var BreadcrumbItem=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbItem",componentId:"sc-1m4qq1d-5"})(templateObject_6$6$1||(templateObject_6$6$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__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbHomeItem",componentId:"sc-1m4qq1d-6"})(templateObject_7$4$1||(templateObject_7$4$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__default["default"].div.withConfig({displayName:"PageBreadcrumb__BreadcrumbCurrentItem",componentId:"sc-1m4qq1d-7"})(templateObject_8$4$1||(templateObject_8$4$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$Q,templateObject_2$w,templateObject_3$n,templateObject_4$e,templateObject_5$c,templateObject_6$6$1,templateObject_7$4$1,templateObject_8$4$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 jsxRuntime.jsx(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 jsxRuntime.jsxs(Host$k,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsxRuntime.jsx(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$k=_styled__default["default"].div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled__default["default"](InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$v||(templateObject_2$v=__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$P,templateObject_2$v;_styled__default["default"](PublishableItemBanner).withConfig({displayName:"CardBanner__StyledBanner",componentId:"sc-mqzdnh-0"})(templateObject_1$O||(templateObject_1$O=__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$O;_styled__default["default"].div.withConfig({displayName:"Card__Host",componentId:"sc-1m8ygh-0"})(templateObject_1$N||(templateObject_1$N=__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__default["default"].article.withConfig({displayName:"Card__Article",componentId:"sc-1m8ygh-1"})(templateObject_3$m||(templateObject_3$m=__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&&_styled.css(templateObject_2$u||(templateObject_2$u=__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$N,templateObject_2$u,templateObject_3$m;var LanguageSelector=function LanguageSelector(props){var history=ReactRouterDom.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 jsxRuntime.jsx(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 jsxRuntime.jsx(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsxRuntime.jsx(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__default["default"](IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$M||(templateObject_1$M=__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$M;_styled__default["default"].article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$L||(templateObject_1$L=__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$L;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType,isEditorPreview=_a.isEditorPreview;if(!item.bannerInfo){return null;}return jsxRuntime.jsx(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__default["default"](PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$K||(templateObject_1$K=__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$K;var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsxRuntime.jsx(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled__default["default"].p.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$J||(templateObject_1$J=__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$J;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsxRuntime.jsx(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled__default["default"].section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$I||(templateObject_1$I=__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$I;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 jsxRuntime.jsxs(Host$h,__assign({className:className},{children:[jsxRuntime.jsx(IconContainer$1,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsxRuntime.jsx(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsxRuntime.jsx(StyledIcon$2$1,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsxRuntime.jsx(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsxRuntime.jsx(Content$3,{children:children},void 0)]}),void 0);};var Host$h=_styled__default["default"].div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$H||(templateObject_1$H=__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__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$t||(templateObject_2$t=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$3=_styled__default["default"].div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$l||(templateObject_3$l=__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__default["default"](Content$3).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$d||(templateObject_4$d=__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__default["default"].div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$b||(templateObject_5$b=__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__default["default"](Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$H,templateObject_2$t,templateObject_3$l,templateObject_4$d,templateObject_5$b,templateObject_6$5$1;var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsxRuntime.jsx(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsxRuntime.jsx(Title$4,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$4=_styled__default["default"].h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$G||(templateObject_1$G=__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$G;_styled__default["default"](ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$F||(templateObject_1$F=__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$F;var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsxRuntime.jsx(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 jsxRuntime.jsx(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsxRuntime.jsx(ItemBodyWrapper,{children:jsxRuntime.jsx(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled__default["default"].div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$E||(templateObject_1$E=__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$E;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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:Object.keys(item.keywords).length>0&&jsxRuntime.jsx(KeywordsSection,__assign({"aria-label":formatMessage({id:'AriaLabel.section.keywords'})},{children:jsxRuntime.jsx(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)}),void 0)},void 0);};var KeywordsSection=_styled__default["default"].section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$D||(templateObject_1$D=__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$D;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsx(Host$g$1,{children:jsxRuntime.jsx(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$g$1=_styled__default["default"].div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$C||(templateObject_1$C=__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$C;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=React$d.useState(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=React$d.useRef(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxRuntime.jsxs(Host$f$1,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsxRuntime.jsx(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsxRuntime.jsx(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsxRuntime.jsx(ConfirmationBox,{checked:checked,disabled:true},void 0):jsxRuntime.jsx(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',{},jsxRuntime.jsx(officeUiFabricReact.DefaultButton,__assign({onClick:handleUndo},{children:jsxRuntime.jsx(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$f$1=_styled__default["default"].div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$B||(templateObject_1$B=__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__default["default"](GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$s||(templateObject_2$s=__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$B,templateObject_2$s;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 jsxRuntime.jsx(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsxRuntime.jsx(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__default["default"].section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$A||(templateObject_1$A=__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$A;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=React$d.useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxRuntime.jsxs(CountButtonHost,{children:[jsxRuntime.jsx(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsxRuntime.jsx(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 jsxRuntime.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&&jsxRuntime.jsx(FeedbackButtonLike,{isReadOnly:isEditorPreview},void 0),jsxRuntime.jsx(FeedbackButtonBookmark,{isReadOnly:isEditorPreview},void 0),!hideComments&&jsxRuntime.jsx(FeedbackButtonComments,{},void 0),jsxRuntime.jsx(FeedbackButtonViews,{},void 0),jsxRuntime.jsx(FeedbackButtonShare,{isReadOnly:isEditorPreview},void 0),jsxRuntime.jsx(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled__default["default"](FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$z;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsxRuntime.jsx(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsxRuntime.jsx(ItemBodyWrapper,{children:jsxRuntime.jsx(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsxRuntime.jsx(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__default["default"].div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$y||(templateObject_1$y=__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$y;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsxRuntime.jsx(Headline$1$1,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$1$1=_styled__default["default"].p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$x||(templateObject_1$x=__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$x;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=React$d.useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsxRuntime.jsx(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 jsxRuntime.jsx("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:jsxRuntime.jsx("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 jsxRuntime.jsx("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:jsxRuntime.jsx("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 React$d.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 SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var ItemType;(function(ItemType){ItemType[ItemType["None"]=0]="None";ItemType[ItemType["News"]=1]="News";ItemType[ItemType["Post"]=2]="Post";ItemType[ItemType["Page"]=4]="Page";ItemType[ItemType["Event"]=8]="Event";})(ItemType||(ItemType={}));var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);_styled__default["default"].div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);_styled__default["default"](ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$r||(templateObject_2$r=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));_styled__default["default"].span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a$1||(templateObject_5$a$1=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&_styled.css(templateObject_4$c$1||(templateObject_4$c$1=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled__default["default"].ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&_styled.css(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled__default["default"].li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$w,templateObject_2$r,templateObject_3$k,templateObject_4$c$1,templateObject_5$a$1,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;_styled__default["default"].div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled__default["default"](ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled__default["default"].div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));_styled__default["default"].div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$b$1||(templateObject_4$b$1=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));_styled__default["default"](IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9$1||(templateObject_5$9$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$v,templateObject_2$q,templateObject_3$j,templateObject_4$b$1,templateObject_5$9$1;var $$2=_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
|
|
131717
|
+
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=ReactRouterDom.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 jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx(LargeScreenBreadcrumb,{items:breadcrumbItems,onRenderItem:renderBreadcrumbItem,overflowIndex:1,"data-breadcrumb":true,overflowAriaLabel:formatMessage({id:'AriaLabel.otherPages'}),focusZoneProps:{handleTabKey:1}},void 0),jsxRuntime.jsx(MobileBreadcrumb,{target:target,parentNode:parentNode},void 0)]}),void 0);function renderBreadcrumbItem(item){if(item.key==='home'){return jsxRuntime.jsx(BreadcrumbHomeItem,__assign({to:item.href,"aria-label":item.text,"data-pages-home-icon":true},{children:jsxRuntime.jsx(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0);}if(item.isCurrentItem){return jsxRuntime.jsx(BreadcrumbCurrentItem,__assign({"aria-current":"page"},{children:item.text}),void 0);}return jsxRuntime.jsx(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 jsxRuntime.jsxs(MobileBreadcrumbHost,__assign({"data-mobile-breadcrumb":true},{children:[jsxRuntime.jsx("li",{children:jsxRuntime.jsx(BreadcrumbHomeItem,__assign({to:target,"aria-label":formatMessage({id:'Generic.home'}),"data-pages-home-icon":true},{children:jsxRuntime.jsx(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0)},void 0),parentNode&&jsxRuntime.jsxs(ParentNode,{children:[jsxRuntime.jsx(LeftChevronIcon,{iconName:"ChevronLeft"},void 0),jsxRuntime.jsx(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__default["default"].ul.withConfig({displayName:"PageBreadcrumb__MobileBreadcrumbHost",componentId:"sc-1m4qq1d-0"})(templateObject_1$Q||(templateObject_1$Q=__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__default["default"].li.withConfig({displayName:"PageBreadcrumb__ParentNode",componentId:"sc-1m4qq1d-1"})(templateObject_2$w||(templateObject_2$w=__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__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageBreadcrumb__LeftChevronIcon",componentId:"sc-1m4qq1d-2"})(templateObject_3$n||(templateObject_3$n=__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__default["default"](officeUiFabricReact.Breadcrumb).withConfig({displayName:"PageBreadcrumb__LargeScreenBreadcrumb",componentId:"sc-1m4qq1d-3"})(templateObject_4$e||(templateObject_4$e=__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__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageBreadcrumb__HomeIcon",componentId:"sc-1m4qq1d-4"})(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n padding-top: 1px;\n"],["\n padding-top: 1px;\n"])));var BreadcrumbItem=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbItem",componentId:"sc-1m4qq1d-5"})(templateObject_6$6$1||(templateObject_6$6$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__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbHomeItem",componentId:"sc-1m4qq1d-6"})(templateObject_7$4$1||(templateObject_7$4$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__default["default"].div.withConfig({displayName:"PageBreadcrumb__BreadcrumbCurrentItem",componentId:"sc-1m4qq1d-7"})(templateObject_8$4$1||(templateObject_8$4$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$Q,templateObject_2$w,templateObject_3$n,templateObject_4$e,templateObject_5$c,templateObject_6$6$1,templateObject_7$4$1,templateObject_8$4$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 jsxRuntime.jsx(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 jsxRuntime.jsxs(Host$k,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsxRuntime.jsx(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$k=_styled__default["default"].div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled__default["default"](InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$v||(templateObject_2$v=__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$P,templateObject_2$v;_styled__default["default"](PublishableItemBanner).withConfig({displayName:"CardBanner__StyledBanner",componentId:"sc-mqzdnh-0"})(templateObject_1$O||(templateObject_1$O=__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$O;_styled__default["default"].div.withConfig({displayName:"Card__Host",componentId:"sc-1m8ygh-0"})(templateObject_1$N||(templateObject_1$N=__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__default["default"].article.withConfig({displayName:"Card__Article",componentId:"sc-1m8ygh-1"})(templateObject_3$m||(templateObject_3$m=__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&&_styled.css(templateObject_2$u||(templateObject_2$u=__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$N,templateObject_2$u,templateObject_3$m;var LanguageSelector=function LanguageSelector(props){var history=ReactRouterDom.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 jsxRuntime.jsx(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 jsxRuntime.jsx(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsxRuntime.jsx(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__default["default"](IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$M||(templateObject_1$M=__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$M;_styled__default["default"].article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$L||(templateObject_1$L=__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$L;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType,isEditorPreview=_a.isEditorPreview;if(!item.bannerInfo){return null;}return jsxRuntime.jsx(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__default["default"](PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$K||(templateObject_1$K=__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$K;var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsxRuntime.jsx(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled__default["default"].p.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$J||(templateObject_1$J=__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$J;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsxRuntime.jsx(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled__default["default"].section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$I||(templateObject_1$I=__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$I;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 jsxRuntime.jsxs(Host$h$1,__assign({className:className},{children:[jsxRuntime.jsx(IconContainer$1,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsxRuntime.jsx(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsxRuntime.jsx(StyledIcon$2$1,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsxRuntime.jsx(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsxRuntime.jsx(Content$3,{children:children},void 0)]}),void 0);};var Host$h$1=_styled__default["default"].div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$H||(templateObject_1$H=__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__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$t||(templateObject_2$t=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$3=_styled__default["default"].div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$l||(templateObject_3$l=__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__default["default"](Content$3).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$d$1||(templateObject_4$d$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__default["default"].div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$b||(templateObject_5$b=__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__default["default"](Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$H,templateObject_2$t,templateObject_3$l,templateObject_4$d$1,templateObject_5$b,templateObject_6$5$1;var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsxRuntime.jsx(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsxRuntime.jsx(Title$4,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$4=_styled__default["default"].h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$G||(templateObject_1$G=__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$G;_styled__default["default"](ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$F||(templateObject_1$F=__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$F;var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsxRuntime.jsx(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 jsxRuntime.jsx(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsxRuntime.jsx(ItemBodyWrapper,{children:jsxRuntime.jsx(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled__default["default"].div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$E||(templateObject_1$E=__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$E;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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:Object.keys(item.keywords).length>0&&jsxRuntime.jsx(KeywordsSection,__assign({"aria-label":formatMessage({id:'AriaLabel.section.keywords'})},{children:jsxRuntime.jsx(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)}),void 0)},void 0);};var KeywordsSection=_styled__default["default"].section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$D||(templateObject_1$D=__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$D;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsx(Host$g$1,{children:jsxRuntime.jsx(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$g$1=_styled__default["default"].div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$C||(templateObject_1$C=__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$C;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=React$d.useState(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=React$d.useRef(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxRuntime.jsxs(Host$f$1,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsxRuntime.jsx(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsxRuntime.jsx(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsxRuntime.jsx(ConfirmationBox,{checked:checked,disabled:true},void 0):jsxRuntime.jsx(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',{},jsxRuntime.jsx(officeUiFabricReact.DefaultButton,__assign({onClick:handleUndo},{children:jsxRuntime.jsx(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$f$1=_styled__default["default"].div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$B||(templateObject_1$B=__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__default["default"](GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$s||(templateObject_2$s=__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$B,templateObject_2$s;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 jsxRuntime.jsx(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsxRuntime.jsx(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__default["default"].section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$A||(templateObject_1$A=__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$A;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=React$d.useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxRuntime.jsxs(CountButtonHost,{children:[jsxRuntime.jsx(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsxRuntime.jsx(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 jsxRuntime.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&&jsxRuntime.jsx(FeedbackButtonLike,{isReadOnly:isEditorPreview},void 0),jsxRuntime.jsx(FeedbackButtonBookmark,{isReadOnly:isEditorPreview},void 0),!hideComments&&jsxRuntime.jsx(FeedbackButtonComments,{},void 0),jsxRuntime.jsx(FeedbackButtonViews,{},void 0),jsxRuntime.jsx(FeedbackButtonShare,{isReadOnly:isEditorPreview},void 0),jsxRuntime.jsx(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled__default["default"](FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$z;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsxRuntime.jsx(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsxRuntime.jsx(ItemBodyWrapper,{children:jsxRuntime.jsx(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsxRuntime.jsx(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__default["default"].div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$y||(templateObject_1$y=__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$y;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsxRuntime.jsx(Headline$1$1,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$1$1=_styled__default["default"].p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$x||(templateObject_1$x=__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$x;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=React$d.useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsxRuntime.jsx(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 jsxRuntime.jsx("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:jsxRuntime.jsx("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 jsxRuntime.jsx("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:jsxRuntime.jsx("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 React$d.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 SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var ItemType;(function(ItemType){ItemType[ItemType["None"]=0]="None";ItemType[ItemType["News"]=1]="News";ItemType[ItemType["Post"]=2]="Post";ItemType[ItemType["Page"]=4]="Page";ItemType[ItemType["Event"]=8]="Event";})(ItemType||(ItemType={}));var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);var KeywordPickerGroup=function KeywordPickerGroup(_a){var group=_a.group,keywords=_a.keywords,expanded=_a.expanded,selectedKeywords=_a.selectedKeywords,onChange=_a.onChange,mandatoryKeywordIds=_a.mandatoryKeywordIds;var _b=React$d.useState(null),isExpanded=_b[0],setIsExpanded=_b[1];var isSelected=!!selectedKeywords.find(function(k){return k.groupId===group.id;});var isCollapsed=!(isExpanded===true||expanded);return jsxRuntime.jsxs(Host$e$1,{children:[jsxRuntime.jsxs(GroupButton,__assign({onClick:toggle,iconProps:{iconName:isCollapsed?'CaretRightSolid8':'CaretDownSolid8'},"aria-expanded":!isCollapsed,"aria-controls":group.name+"-list"},{children:[isSelected&&jsxRuntime.jsx(CheckMarkIcon,{iconName:"CheckMark"},void 0),jsxRuntime.jsx(ButtonLabel,__assign({"data-keyword-group":group.name,isSelected:isSelected},{children:jsxRuntime.jsx(KeywordTitle,{groupName:group.name},void 0)}),void 0)]}),void 0),jsxRuntime.jsx(KeywordsList,__assign({id:group.name+"-list","data-keyword-picker-group-list":true,isCollapsed:isCollapsed},{children:keywords.map(function(k){var checked=isKeywordSelected(k);var disabled=isKeywordDisabled(k);return jsxRuntime.jsx(KeywordItem,__assign({"data-keyword":k.name,"data-is-checked":checked,"data-is-disabled":disabled},{children:jsxRuntime.jsx(officeUiFabricReact.Checkbox,{label:k.name,onRenderLabel:function(){return jsxRuntime.jsx(KeywordTitle,{groupName:group.name,keywordName:k.name},void 0);},checked:checked,onChange:function(_e,isChecked){return handleChange(isChecked,k);},disabled:disabled},k.id)}),k.name);})}),void 0)]},void 0);function toggle(){setIsExpanded(!isExpanded);}function isKeywordSelected(keyword){return !!selectedKeywords.find(function(k){return k.id===keyword.id;});}function isKeywordDisabled(keyword){return mandatoryKeywordIds===null||mandatoryKeywordIds===void 0?void 0:mandatoryKeywordIds.some(function(id){return id===keyword.id;});}function handleChange(add,keyword){if(onChange){var result=selectedKeywords.filter(function(k){return keyword.id!==k.id;});if(add){result.push(keyword);}onChange(result);}}};var Host$e$1=_styled__default["default"].div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var GroupButton=_styled__default["default"](ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$r||(templateObject_2$r=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);var CheckMarkIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));var ButtonLabel=_styled__default["default"].span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a$1||(templateObject_5$a$1=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&_styled.css(templateObject_4$c$1||(templateObject_4$c$1=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});var KeywordsList=_styled__default["default"].ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&_styled.css(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);var KeywordItem=_styled__default["default"].li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$w,templateObject_2$r,templateObject_3$k,templateObject_4$c$1,templateObject_5$a$1,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;var KeywordPicker=function KeywordPicker(_a){var _b;var value=_a.value,onChange=_a.onChange,showSelectionToggle=_a.showSelectionToggle,incomingAvailableKeywords=_a.availableKeywords,mandatoryKeywordIds=_a.mandatoryKeywordIds,className=_a.className;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var _c=React$d.useContext(LazySubscriptionContext),allKeywords=_c.allKeywords,selectedKeywordGroups=_c.selectedKeywordGroups;var _d=React$d.useState(null),searchedKeywords=_d[0],setSearchedKeywords=_d[1];var _e=React$d.useState(null),searchText=_e[0],setSearchText=_e[1];var selectedKeywords=getSelectedKeywords();var availableKeywords=incomingAvailableKeywords!==null&&incomingAvailableKeywords!==void 0?incomingAvailableKeywords:allKeywords;var visibleKeywords=(_b=searchedKeywords!==null&&searchedKeywords!==void 0?searchedKeywords:availableKeywords)!==null&&_b!==void 0?_b:[];var mandatoryKeywords=mandatoryKeywordIds?availableKeywords.filter(function(k){return mandatoryKeywordIds.includes(k.id);}):[];var noKeywordGroups=(selectedKeywordGroups===null||selectedKeywordGroups===void 0?void 0:selectedKeywordGroups.length)===0;var noAvailableKeywords=!noKeywordGroups&&(availableKeywords===null||availableKeywords===void 0?void 0:availableKeywords.length)===0;var isEmpty=visibleKeywords.length===0;return jsxRuntime.jsxs(Host$d$1,__assign({className:classNames('keyword-picker',className)},{children:[(noKeywordGroups||noAvailableKeywords)&&jsxRuntime.jsx("span",__assign({className:"keyword-picker-empty"},{children:jsxRuntime.jsx(FormattedMessage$1,{id:noKeywordGroups?'KeywordPicker.noGroupsDefined':'KeywordPicker.noAvailableKeywordsForGroup'},void 0)}),void 0),!noKeywordGroups&&!noAvailableKeywords&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs(SearchHost,__assign({className:"keyword-picker-search","data-keyword-picker-search":true},{children:[jsxRuntime.jsx(officeUiFabricReact.TextField,{onChange:handleSearch,value:searchText||'',placeholder:formatMessage({id:'KeywordPicker.search'})},void 0),searchText&&jsxRuntime.jsx(SearchCancelButton,{iconProps:{iconName:'Cancel'},onClick:function(){return handleSearch(null,null);},"aria-hidden":"true"},void 0)]}),void 0),showSelectionToggle&&jsxRuntime.jsx(StyledToggleAllButtons,{toggleAll:handleToggleAll},void 0),jsxRuntime.jsxs(KeywordPickerTree,__assign({className:"keyword-picker-tree"},{children:[isEmpty&&jsxRuntime.jsx(FormattedMessage$1,{id:"KeywordPicker.emptySearch"},void 0),!isEmpty&&selectedKeywordGroups&&selectedKeywordGroups.sort(function(a,b){return a.name.localeCompare(b.name);}).map(function(g){var keywords=visibleKeywords.filter(function(k){return k.groupId===g.id;});return keywords.length===0?null:jsxRuntime.jsx(KeywordPickerGroup,{expanded:!!searchText,group:g,keywords:keywords,selectedKeywords:selectedKeywords,onChange:onChange,mandatoryKeywordIds:mandatoryKeywordIds},g.id);})]}),void 0)]},void 0)]}),void 0);function getSelectedKeywords(){if(value==null||allKeywords==null){return [];}return value.map(function(k){return typeof k==='string'?allKeywords.find(function(a){return a.id===k;}):k;}).filter(function(k){return k;});}function handleSearch(_,text){var hasSearch=text&&text.length;var keywords=hasSearch?availableKeywords.filter(function(k){return getKeywordTitle(user,k.translations,k.name).toLocaleLowerCase().indexOf(text.toLocaleLowerCase())>=0;}):availableKeywords;setSearchedKeywords(keywords);setSearchText(hasSearch?text:null);}function handleToggleAll(checkAll){onChange(checkAll?availableKeywords:mandatoryKeywords);}};var KeywordPickerTree=_styled__default["default"].div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));var StyledToggleAllButtons=_styled__default["default"](ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));var Host$d$1=_styled__default["default"].div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));var SearchHost=_styled__default["default"].div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$b$1||(templateObject_4$b$1=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));var SearchCancelButton=_styled__default["default"](IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9$1||(templateObject_5$9$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$v,templateObject_2$q,templateObject_3$j,templateObject_4$b$1,templateObject_5$9$1;var $$2=_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
|
|
131718
131718
|
// https://github.com/tc39/proposal-string-replace-all
|
|
131719
131719
|
$$2({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__default["default"].div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$u||(templateObject_1$u=__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__default["default"].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__default["default"](officeUiFabricReact.IconButton).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$u,templateObject_2$p,templateObject_3$i;var InsertFilesDialogHost=_styled__default["default"].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&&_styled.css(templateObject_1$t||(templateObject_1$t=__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__default["default"].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__default["default"](officeUiFabricReact.DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$a$1||(templateObject_4$a$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__default["default"].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$t,templateObject_2$o,templateObject_3$h,templateObject_4$a$1,templateObject_5$8$1;_styled__default["default"](InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$s||(templateObject_1$s=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled__default["default"](officeUiFabricReact.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__default["default"].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$s,templateObject_2$n,templateObject_3$g;_styled__default["default"].div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$r||(templateObject_1$r=__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__default["default"](officeUiFabricReact.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$r,templateObject_2$m;var DateTimePicker=function DateTimePicker(props){var timeField=React$d.useRef();var formatMessage=useIntl().formatMessage;var _a=React$d.useState(getTime(props.date)),time=_a[0],setTime=_a[1];var _b=React$d.useState(false),timeHasFocus=_b[0],setTimeHasFocus=_b[1];var _c=React$d.useState(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'];React$d.useEffect(function(){// do not update if the user is typing time
|
|
131720
131720
|
if(!timeHasFocus){// We might not know that the time field has the focus after an onBlur from the date field.
|
|
@@ -131728,10 +131728,10 @@
|
|
|
131728
131728
|
props.onChanged(newDate.toISOString(),validationResult.isInRange);}function handleDateChange(newDate){if(timeField.current){// note: focus event is ignored/not propagated without setTimeout
|
|
131729
131729
|
setTimeout(function(){return timeField.current.focus();},0);}if(!newDate){handleChange(null);}else {// include the current time component when triggering a change.
|
|
131730
131730
|
// newDate is only a Date without time.
|
|
131731
|
-
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=_styled.createGlobalStyle(templateObject_1$q||(templateObject_1$q=__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=_styled.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__default["default"].div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$f||(templateObject_3$f=__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$q,templateObject_2$l,templateObject_3$f;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__default["default"].div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$p||(templateObject_1$p=__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__default["default"].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__default["default"].div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$e||(templateObject_3$e=__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$p,templateObject_2$k,templateObject_3$e;_styled__default["default"](IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$o$1||(templateObject_1$o$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$o$1;_styled__default["default"].div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$n$1||(templateObject_1$n$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__default["default"].p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$j||(templateObject_2$j=__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$n$1,templateObject_2$j;_styled__default["default"].p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$m$1||(templateObject_1$m$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled__default["default"].h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$i||(templateObject_2$i=__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__default["default"](ReactRouterDom.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__default["default"].div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$9$1||(templateObject_4$9$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__default["default"](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$m$1,templateObject_2$i,templateObject_3$d$1,templateObject_4$9$1,templateObject_5$7$1;_styled__default["default"].div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$l$1||(templateObject_1$l$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__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$l$1,templateObject_2$h;_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$k$1||(templateObject_1$k$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$g||(templateObject_2$g=__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__default["default"].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__default["default"].div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$8$1||(templateObject_4$8$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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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$k$1,templateObject_2$g,templateObject_3$c$1,templateObject_4$8$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 React$d.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
|
|
131731
|
+
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=_styled.createGlobalStyle(templateObject_1$q$1||(templateObject_1$q$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=_styled.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__default["default"].div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$f||(templateObject_3$f=__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$q$1,templateObject_2$l,templateObject_3$f;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__default["default"].div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$p$1||(templateObject_1$p$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__default["default"].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__default["default"].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$p$1,templateObject_2$k,templateObject_3$e$1;_styled__default["default"](IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$o$1||(templateObject_1$o$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$o$1;_styled__default["default"].div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$n$1||(templateObject_1$n$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__default["default"].p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$j||(templateObject_2$j=__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$n$1,templateObject_2$j;_styled__default["default"].p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$m$1||(templateObject_1$m$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled__default["default"].h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$i||(templateObject_2$i=__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__default["default"](ReactRouterDom.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__default["default"].div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$9$1||(templateObject_4$9$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__default["default"](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$m$1,templateObject_2$i,templateObject_3$d$1,templateObject_4$9$1,templateObject_5$7$1;_styled__default["default"].div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$l$1||(templateObject_1$l$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__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$l$1,templateObject_2$h;_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$k$1||(templateObject_1$k$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$g||(templateObject_2$g=__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__default["default"].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__default["default"].div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$8$1||(templateObject_4$8$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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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$k$1,templateObject_2$g,templateObject_3$c$1,templateObject_4$8$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 React$d.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
|
|
131732
131732
|
var MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var descriptor=getOwnPropertyDescriptor(String.prototype,'endsWith');return descriptor&&!descriptor.writable;}();// `String.prototype.endsWith` method
|
|
131733
131733
|
// https://tc39.github.io/ecma262/#sec-string.prototype.endswith
|
|
131734
|
-
$$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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:highlight.texts.map(function(t){return jsxRuntime.jsxs(TextEntry,__assign({highlight:t.type==='hit'},{children:[t.value.startsWith(' ')?jsxRuntime.jsx(jsxRuntime.Fragment,{children:"\u00A0"},void 0):null,t.value.trim(),t.value.endsWith(' ')?jsxRuntime.jsx(jsxRuntime.Fragment,{children:"\u00A0"},void 0):null]}),void 0);})},void 0);};var TextEntry=_styled__default["default"].span.withConfig({displayName:"SearchHighlighter__TextEntry",componentId:"sc-1a25f6p-0"})(templateObject_2$f||(templateObject_2$f=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.highlight&&_styled.css(templateObject_1$j$1||(templateObject_1$j$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$j$1,templateObject_2$f;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=jsxRuntime.jsx(jsxRuntime.Fragment,{children:search?jsxRuntime.jsx(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 jsxRuntime.jsx(Title$1$1,{children:jsxRuntime.jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxRuntime.jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsxRuntime.jsx(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 jsxRuntime.jsx(SearchHighlighter,{highlight:titleHighlight},void 0);}return jsxRuntime.jsx(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0);};var Title$1$1=_styled__default["default"].h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$i$1||(templateObject_1$i$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__default["default"](officeUiFabricReact.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__default["default"](ReactRouterDom.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$i$1,templateObject_2$e$1,templateObject_3$b$1;_styled__default["default"].div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$h$1||(templateObject_1$h$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__default["default"](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__default["default"](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__default["default"].div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$7$1||(templateObject_4$7$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__default["default"].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__default["default"](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$h$1,templateObject_2$d$1,templateObject_3$a$1,templateObject_4$7$1,templateObject_5$5$1,templateObject_6$2$1;_styled__default["default"].p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$g$1||(templateObject_1$g$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__default["default"].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__default["default"].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__default["default"](ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$6$1||(templateObject_4$6$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$g$1,templateObject_2$c$1,templateObject_3$9$1,templateObject_4$6$1;_styled__default["default"].div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$f$1||(templateObject_1$f$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__default["default"].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__default["default"].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__default["default"](PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled__default["default"].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$f$1,templateObject_2$b$1,templateObject_3$8$1,templateObject_4$5$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
|
|
131734
|
+
$$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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:highlight.texts.map(function(t){return jsxRuntime.jsxs(TextEntry,__assign({highlight:t.type==='hit'},{children:[t.value.startsWith(' ')?jsxRuntime.jsx(jsxRuntime.Fragment,{children:"\u00A0"},void 0):null,t.value.trim(),t.value.endsWith(' ')?jsxRuntime.jsx(jsxRuntime.Fragment,{children:"\u00A0"},void 0):null]}),void 0);})},void 0);};var TextEntry=_styled__default["default"].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&&_styled.css(templateObject_1$j$1||(templateObject_1$j$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$j$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=jsxRuntime.jsx(jsxRuntime.Fragment,{children:search?jsxRuntime.jsx(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 jsxRuntime.jsx(Title$1$1,{children:jsxRuntime.jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxRuntime.jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsxRuntime.jsx(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 jsxRuntime.jsx(SearchHighlighter,{highlight:titleHighlight},void 0);}return jsxRuntime.jsx(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0);};var Title$1$1=_styled__default["default"].h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$i$1||(templateObject_1$i$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__default["default"](officeUiFabricReact.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__default["default"](ReactRouterDom.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$i$1,templateObject_2$e$1,templateObject_3$b$1;_styled__default["default"].div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$h$1||(templateObject_1$h$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__default["default"](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__default["default"](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__default["default"].div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$7$1||(templateObject_4$7$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__default["default"].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__default["default"](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$h$1,templateObject_2$d$1,templateObject_3$a$1,templateObject_4$7$1,templateObject_5$5$1,templateObject_6$2$1;_styled__default["default"].p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$g$1||(templateObject_1$g$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__default["default"].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__default["default"].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__default["default"](ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$6$1||(templateObject_4$6$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$g$1,templateObject_2$c$1,templateObject_3$9$1,templateObject_4$6$1;_styled__default["default"].div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$f$1||(templateObject_1$f$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__default["default"].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__default["default"].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__default["default"](PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled__default["default"].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$f$1,templateObject_2$b$1,templateObject_3$8$1,templateObject_4$5$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
|
|
131735
131735
|
var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxRuntime.jsxs(Host$4$1,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsxRuntime.jsx(PageLinkButton,{isNextNode:false,basePath:basePath,page:previousPage,icon:"ChevronLeftSmall","data-detail-page-navigation-previous-node":previousPage.id,"data-detail-page-navigation-node":previousPage.id},void 0),nextPage&&jsxRuntime.jsx(PageLinkButton,{isNextNode:true,className:"next-page-link-button",basePath:basePath,page:nextPage,icon:"ChevronRightSmall","data-detail-page-navigation-next-node":nextPage.id,"data-detail-page-navigation-node":nextPage.id},void 0)]}),void 0);function getSibling(offset){var index=pages.findIndex(function(s){return s.id===activePageId;});return pages[index+offset];}};var Host$4$1=_styled__default["default"].div.withConfig({displayName:"PagesDetailViewNavigation__Host",componentId:"sc-19ae9g3-0"})(templateObject_1$e$1||(templateObject_1$e$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n"],["\n display: flex;\n flex-wrap: wrap;\n"])));var PageLinkButton=function PageLinkButton(_a){var basePath=_a.basePath,page=_a.page,icon=_a.icon,isNextNode=_a.isNextNode,className=_a.className,props=__rest(_a,["basePath","page","icon","isNextNode","className"]);var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var title=getTitle(page,user,formatMessage);return jsxRuntime.jsxs(Link,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsxRuntime.jsx(LinkIcon,{iconName:icon},void 0),jsxRuntime.jsx(Content$2$1,__assign({},props,{isNextNode:isNextNode},{children:jsxRuntime.jsx("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsxRuntime.jsx(LinkIcon,{iconName:icon},void 0)]}),void 0);function getUrl(){var baseUrl=NewsService.getNewsRoute(basePath,page.id,title);return page.useExternalContent?baseUrl+"?"+queryString.stringify({noRedirect:true}):baseUrl;}};var Link=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PagesDetailViewNavigation__Link",componentId:"sc-19ae9g3-1"})(templateObject_2$a$1||(templateObject_2$a$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"])),spacingS,spacingS,maxScreenSize.small,spacingS,function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.textColors.default;});var LinkIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PagesDetailViewNavigation__LinkIcon",componentId:"sc-19ae9g3-2"})(templateObject_3$7$1||(templateObject_3$7$1=__makeTemplateObject(["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"],["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"])),fontSizeNormal,spacingM);var Content$2$1=_styled__default["default"].div.withConfig({displayName:"PagesDetailViewNavigation__Content",componentId:"sc-19ae9g3-3"})(templateObject_5$3$1||(templateObject_5$3$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"])),function(p){return p.isNextNode&&_styled.css(templateObject_4$4$1||(templateObject_4$4$1=__makeTemplateObject(["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "],["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "])));});var templateObject_1$e$1,templateObject_2$a$1,templateObject_3$7$1,templateObject_4$4$1,templateObject_5$3$1;_styled__default["default"](Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$d$1||(templateObject_1$d$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$9$1||(templateObject_2$9$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.createGlobalStyle(templateObject_3$6$1||(templateObject_3$6$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$d$1,templateObject_2$9$1,templateObject_3$6$1;_styled__default["default"].div.withConfig({displayName:"GroupNotificationsSettings__Host",componentId:"sc-1z0rxrb-0"})(templateObject_1$c$1||(templateObject_1$c$1=__makeTemplateObject(["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"],["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"])),maxScreenSize.small);_styled__default["default"].h2.withConfig({displayName:"GroupNotificationsSettings__Title",componentId:"sc-1z0rxrb-1"})(templateObject_2$8$1||(templateObject_2$8$1=__makeTemplateObject(["\n margin-top: 0;\n"],["\n margin-top: 0;\n"])));_styled__default["default"].div.withConfig({displayName:"GroupNotificationsSettings__Infos",componentId:"sc-1z0rxrb-2"})(templateObject_3$5$1||(templateObject_3$5$1=__makeTemplateObject(["\n color: ",";\n padding-left: 55px;\n"],["\n color: ",";\n padding-left: 55px;\n"])),function(p){return p.theme.palette.neutralTertiaryAlt;});var templateObject_1$c$1,templateObject_2$8$1,templateObject_3$5$1;function getPostGroups(user){return getGroupsWithExplicitMinRole(GroupRoles.LimitedReader,user,function(g){return g.allowPosts;});}function getPostsBaseRoute(post,user){var _a;var postGroups=getPostGroups(user);var subscriptionHandle=(_a=user.subscription.subscriptionHandle)!==null&&_a!==void 0?_a:user.subscription.id;return postGroups.length>1?"/"+subscriptionHandle+"/posts/groups/"+((post===null||post===void 0?void 0:post.groupId)||''):"/"+subscriptionHandle+"/posts";}function getPostsHashtagFilterRoute(post,user,hashtag){return getPostsBaseRoute(post,user)+"?"+queryString.stringify({search:""+hashtag});}var PostReplies=function PostReplies(_a){var className=_a.className,post=_a.post,comments=_a.comments,initialPageSize=_a.initialPageSize,autoFocusReplyField=_a.autoFocusReplyField,onReplyAdded=_a.onReplyAdded,onReplyDeleted=_a.onReplyDeleted,onThreadReply=_a.onThreadReply;var user=useCurrentUser();var searchPostMentionUsers=usePostsApi().searchPostMentionUsers;if(!post||!post.id){return null;}return jsxRuntime.jsx(StyledPagedCommentsSection,{className:className,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},type:ItemResourceTypes.Posts,scope:ConversationScope.Posts,itemId:post.id,groupIds:[post.groupId],readOnly:false,pageSize:5,initialPageSize:initialPageSize,initialComments:comments,onCommentAdded:onReplyAdded,onCommentDeleted:onReplyDeleted,noItemsYetStringResourceKey:"Posts.replies.empty",autoFocusReplyField:autoFocusReplyField,baseAttachmentPath:"/posts/"+post.id+"/comments",getHashtagFilterRoute:function(hashtag){return getPostsHashtagFilterRoute(post,user,hashtag);},onThreadReply:onThreadReply},post.id);};var StyledPagedCommentsSection=_styled__default["default"](PagedCommentsSection).withConfig({displayName:"PostReplies__StyledPagedCommentsSection",componentId:"sc-8mrgcg-0"})(templateObject_1$b$1||(templateObject_1$b$1=__makeTemplateObject(["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"],["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"])));var templateObject_1$b$1;var PostEditor=function PostEditor(_a){var className=_a.className,post=_a.post,onBeforeSave=_a.onBeforeSave,onSaved=_a.onSaved,onCancel=_a.onCancel,keywordSettings=_a.keywordSettings;var features=useFeatures();var _b=usePostsApi(),searchPostMentionUsers=_b.searchPostMentionUsers,updatePost=_b.updatePost;var _c=React$d.useContext(LazySubscriptionContext),allKeywords=_c.allKeywords,keywordsByGroupId=_c.keywordsByGroupId;var _d=useNotificationContext(),showToast=_d.showToast,showError=_d.showError;if(allKeywords==null||keywordsByGroupId==null){return null;}return jsxRuntime.jsx(EditCommentWithAttachments,{className:className,onCancel:onCancel,content:post.content,onSave:handleSavePost,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},inputTheme:"dark",item:post,basePath:'/posts',allowKeywords:features.keywords&&features.postKeywords,availableKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords,mandatoryKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords,keywords:post.keywords,saveOnCtrlEnter:true},void 0);function handleSavePost(newContent,attachments,keywords){return __awaiter(this,void 0,void 0,function(){var updatedPost,error_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);onBeforeSave(__assign(__assign({},post),{content:newContent,attachments:attachments,keywords:keywords}));return [4/*yield*/,updatePost(post.id,newContent,attachments,keywords)];case 1:updatedPost=_a.sent();onSaved(updatedPost);showToast('Posts.successfullyUpdated');return [3/*break*/,3];case 2:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}};_styled__default["default"](IconButton).withConfig({displayName:"PostFollowButton__StyledIconButton",componentId:"sc-1i97syp-0"})(templateObject_1$a$1||(templateObject_1$a$1=__makeTemplateObject(["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"],["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"])));var templateObject_1$a$1;var PostGroup=function PostGroup(_a){var groupId=_a.groupId,to=_a.to,className=_a.className;var intl=useIntl();var user=useCurrentUser();var group=user.groups.find(function(g){return g.id===groupId;});var groupName=getGroupName(group,user,intl);return jsxRuntime.jsx(Group,__assign({"data-post-group":groupId,title:groupName,to:to,className:className},{children:jsxRuntime.jsx("span",{children:groupName},void 0)}),void 0);};var Group=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostGroup__Group",componentId:"sc-182l34m-0"})(templateObject_1$9$1||(templateObject_1$9$1=__makeTemplateObject(["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"],["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"])),fontSizeSmall,function(){return HighlightBubble();});var templateObject_1$9$1;_styled__default["default"].div.withConfig({displayName:"PostDisplay__Host",componentId:"sc-1tope3b-0"})(templateObject_1$8$1||(templateObject_1$8$1=__makeTemplateObject(["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"],["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"])),CardBorderInline(2,2),fontSizeSmall,spacingM);_styled__default["default"].div.withConfig({displayName:"PostDisplay__Header",componentId:"sc-1tope3b-1"})(templateObject_2$7$1||(templateObject_2$7$1=__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n"],["\n display: flex;\n align-items: flex-start;\n"])));var avatarWidth=40;var maxButtonsWidth=120;// max 4 buttons at 30 px each (translate, notifications, like and context menu)
|
|
131736
131736
|
var paddingLeft=spacingS;var postGroupWidth=250;var postGroupWidthSmall=215;_styled__default["default"].div.withConfig({displayName:"PostDisplay__HeaderMetadata",componentId:"sc-1tope3b-2"})(templateObject_3$4$1||(templateObject_3$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"],["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"])),fontSizeSmall,paddingLeft,avatarWidth,maxButtonsWidth,paddingLeft,function(p){return p.addSafetySpace?postGroupWidth:0;},maxScreenSize.medium,avatarWidth,maxButtonsWidth,paddingLeft);_styled__default["default"].div.withConfig({displayName:"PostDisplay__Content",componentId:"sc-1tope3b-3"})(templateObject_4$3$1||(templateObject_4$3$1=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"])));_styled__default["default"].div.withConfig({displayName:"PostDisplay__ActionButtons",componentId:"sc-1tope3b-4"})(templateObject_5$2$1||(templateObject_5$2$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: auto;\n"],["\n display: flex;\n align-items: center;\n margin-left: auto;\n"])));_styled__default["default"].div.withConfig({displayName:"PostDisplay__PostDisplayName",componentId:"sc-1tope3b-5"})(templateObject_6$1$1||(templateObject_6$1$1=__makeTemplateObject(["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));_styled__default["default"](DateTime).withConfig({displayName:"PostDisplay__PostDateTime",componentId:"sc-1tope3b-6"})(templateObject_7$1$1||(templateObject_7$1$1=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);_styled__default["default"](ActionButton).withConfig({displayName:"PostDisplay__AddReplyButton",componentId:"sc-1tope3b-7"})(templateObject_8$1$1||(templateObject_8$1$1=__makeTemplateObject(["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"],["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"])),spacingM,function(p){return p.theme.palette.accent;});_styled__default["default"].div.withConfig({displayName:"PostDisplay__InnerHost",componentId:"sc-1tope3b-8"})(templateObject_10$d||(templateObject_10$d=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"],["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"])),postsSectionPadding,function(p){return p.highlight&&_styled.css(templateObject_9$1$1||(templateObject_9$1$1=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\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: 6px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.accent;});});_styled__default["default"](PostReplies).withConfig({displayName:"PostDisplay__StyledPostComments",componentId:"sc-1tope3b-9"})(templateObject_11$8||(templateObject_11$8=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});_styled__default["default"](PostEditor).withConfig({displayName:"PostDisplay__StyledPostEditor",componentId:"sc-1tope3b-10"})(templateObject_12$7||(templateObject_12$7=__makeTemplateObject(["\n margin-top: 7px;\n position: relative;\n"],["\n margin-top: 7px;\n position: relative;\n"])));_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostDisplay__PostLink",componentId:"sc-1tope3b-11"})(templateObject_13$6||(templateObject_13$6=__makeTemplateObject(["\n display: block;\n width: 100%;\n"],["\n display: block;\n width: 100%;\n"])));_styled__default["default"](PostGroup).withConfig({displayName:"PostDisplay__StyledPostGroup",componentId:"sc-1tope3b-12"})(templateObject_14$6||(templateObject_14$6=__makeTemplateObject(["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"],["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"])),spacingM,postGroupWidth,maxScreenSize.medium,spacingS,postGroupWidthSmall);_styled__default["default"](LikeButton).withConfig({displayName:"PostDisplay__StyledLikeButton",componentId:"sc-1tope3b-13"})(templateObject_15$6||(templateObject_15$6=__makeTemplateObject(["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"],["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"])));_styled__default["default"](ImagesAndFilesList).withConfig({displayName:"PostDisplay__StyledImagesAndFilesList",componentId:"sc-1tope3b-14"})(templateObject_16$6||(templateObject_16$6=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled__default["default"](IconButton).withConfig({displayName:"PostDisplay__MenuButton",componentId:"sc-1tope3b-15"})(templateObject_17$5||(templateObject_17$5=__makeTemplateObject(["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"],["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"])));_styled__default["default"](KeywordsInfo).withConfig({displayName:"PostDisplay__StyledKeywordsInfo",componentId:"sc-1tope3b-16"})(templateObject_18$4||(templateObject_18$4=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled__default["default"](ThreadView).withConfig({displayName:"PostDisplay__StyledThreadView",componentId:"sc-1tope3b-17"})(templateObject_19$4||(templateObject_19$4=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});var templateObject_1$8$1,templateObject_2$7$1,templateObject_3$4$1,templateObject_4$3$1,templateObject_5$2$1,templateObject_6$1$1,templateObject_7$1$1,templateObject_8$1$1,templateObject_9$1$1,templateObject_10$d,templateObject_11$8,templateObject_12$7,templateObject_13$6,templateObject_14$6,templateObject_15$6,templateObject_16$6,templateObject_17$5,templateObject_18$4,templateObject_19$4;_styled__default["default"](Dropdown).withConfig({displayName:"PostGroupsSelector__StyledDropdown",componentId:"sc-g6rhck-0"})(templateObject_1$7$1||(templateObject_1$7$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostGroupsSelector__DropdownOption",componentId:"sc-g6rhck-1"})(templateObject_2$6$1||(templateObject_2$6$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.createGlobalStyle(templateObject_3$3$1||(templateObject_3$3$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$7$1,templateObject_2$6$1,templateObject_3$3$1;var isArray$1=isArray$3;var toLength$1=toLength$b;var bind=functionBindContext;// `FlattenIntoArray` abstract operation
|
|
131737
131737
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
@@ -131801,9 +131801,9 @@
|
|
|
131801
131801
|
var DetailMetaInfo = _styled__default["default"](ItemMetaInfo).withConfig({
|
|
131802
131802
|
displayName: "NewsDetailViewMetaInfo__DetailMetaInfo",
|
|
131803
131803
|
componentId: "sc-1v9a7tf-0"
|
|
131804
|
-
})(templateObject_1$
|
|
131804
|
+
})(templateObject_1$q || (templateObject_1$q = __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);
|
|
131805
131805
|
|
|
131806
|
-
var templateObject_1$
|
|
131806
|
+
var templateObject_1$q;
|
|
131807
131807
|
|
|
131808
131808
|
var NewsItemContextProvider = function NewsItemContextProvider(_a) {
|
|
131809
131809
|
var itemId = _a.itemId,
|
|
@@ -131839,7 +131839,7 @@
|
|
|
131839
131839
|
}
|
|
131840
131840
|
|
|
131841
131841
|
if (!itemContext) {
|
|
131842
|
-
return jsxRuntime.jsx(Host$
|
|
131842
|
+
return jsxRuntime.jsx(Host$h, __assign$g({
|
|
131843
131843
|
className: className
|
|
131844
131844
|
}, {
|
|
131845
131845
|
children: jsxRuntime.jsx(NewsItemContextProvider, __assign$g({
|
|
@@ -131854,7 +131854,7 @@
|
|
|
131854
131854
|
}), void 0);
|
|
131855
131855
|
}
|
|
131856
131856
|
|
|
131857
|
-
return jsxRuntime.jsx(Host$
|
|
131857
|
+
return jsxRuntime.jsx(Host$h, __assign$g({
|
|
131858
131858
|
className: className
|
|
131859
131859
|
}, {
|
|
131860
131860
|
children: jsxRuntime.jsx(NewsDetailInternal, {
|
|
@@ -131906,12 +131906,12 @@
|
|
|
131906
131906
|
}, void 0);
|
|
131907
131907
|
};
|
|
131908
131908
|
|
|
131909
|
-
var Host$
|
|
131909
|
+
var Host$h = _styled__default["default"].div.withConfig({
|
|
131910
131910
|
displayName: "NewsDetail__Host",
|
|
131911
131911
|
componentId: "sc-6rz5th-0"
|
|
131912
|
-
})(templateObject_1$
|
|
131912
|
+
})(templateObject_1$p || (templateObject_1$p = __makeTemplateObject$l([""], [""])));
|
|
131913
131913
|
|
|
131914
|
-
var templateObject_1$
|
|
131914
|
+
var templateObject_1$p;
|
|
131915
131915
|
|
|
131916
131916
|
var anObject$2 = anObject$v;
|
|
131917
131917
|
|
|
@@ -132285,7 +132285,7 @@
|
|
|
132285
132285
|
showDialog = _b[0],
|
|
132286
132286
|
setShowDialog = _b[1];
|
|
132287
132287
|
|
|
132288
|
-
return jsxRuntime.jsxs(Host$
|
|
132288
|
+
return jsxRuntime.jsxs(Host$g, {
|
|
132289
132289
|
children: [jsxRuntime.jsx(Tooltip, __assign$g({
|
|
132290
132290
|
resourceKey: "Pages.pagesTableOfContents"
|
|
132291
132291
|
}, {
|
|
@@ -132310,11 +132310,11 @@
|
|
|
132310
132310
|
}, void 0)]
|
|
132311
132311
|
}, void 0);
|
|
132312
132312
|
};
|
|
132313
|
-
var Host$
|
|
132314
|
-
var PageTableOfContentsButton = _styled__default["default"](officeUiFabricReact.IconButton)(templateObject_2$
|
|
132313
|
+
var Host$g = _styled__default["default"].div(templateObject_1$o || (templateObject_1$o = __makeTemplateObject$l(["\n && {\n margin-top: ", "px;\n }\n"], ["\n && {\n margin-top: ", "px;\n }\n"])), spacingXs);
|
|
132314
|
+
var PageTableOfContentsButton = _styled__default["default"](officeUiFabricReact.IconButton)(templateObject_2$f || (templateObject_2$f = __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) {
|
|
132315
132315
|
return p.theme.textColors.default;
|
|
132316
132316
|
});
|
|
132317
|
-
var templateObject_1$
|
|
132317
|
+
var templateObject_1$o, templateObject_2$f;
|
|
132318
132318
|
|
|
132319
132319
|
var PageDetail = function PageDetail(props) {
|
|
132320
132320
|
var routeMatch = ReactRouterDom.useRouteMatch();
|
|
@@ -132347,7 +132347,7 @@
|
|
|
132347
132347
|
return null;
|
|
132348
132348
|
}
|
|
132349
132349
|
|
|
132350
|
-
return jsxRuntime.jsx(Host$
|
|
132350
|
+
return jsxRuntime.jsx(Host$f, __assign$g({
|
|
132351
132351
|
className: className
|
|
132352
132352
|
}, {
|
|
132353
132353
|
children: jsxRuntime.jsx(DetailViewContextProvider, __assign$g({
|
|
@@ -132405,15 +132405,15 @@
|
|
|
132405
132405
|
}, void 0);
|
|
132406
132406
|
};
|
|
132407
132407
|
|
|
132408
|
-
var Host$
|
|
132408
|
+
var Host$f = _styled__default["default"].div.withConfig({
|
|
132409
132409
|
displayName: "PageDetail__Host",
|
|
132410
132410
|
componentId: "sc-22rpk8-0"
|
|
132411
|
-
})(templateObject_1$
|
|
132411
|
+
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject$l([""], [""])));
|
|
132412
132412
|
|
|
132413
132413
|
var PageHeader = _styled__default["default"].div.withConfig({
|
|
132414
132414
|
displayName: "PageDetail__PageHeader",
|
|
132415
132415
|
componentId: "sc-22rpk8-1"
|
|
132416
|
-
})(templateObject_2$
|
|
132416
|
+
})(templateObject_2$e || (templateObject_2$e = __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);
|
|
132417
132417
|
|
|
132418
132418
|
var ConsumerBreadcrumbWrapper = function ConsumerBreadcrumbWrapper() {
|
|
132419
132419
|
var item = useDetailViewContext().item;
|
|
@@ -132428,7 +132428,7 @@
|
|
|
132428
132428
|
var StyledPageBreadcrumb = _styled__default["default"](PageBreadcrumb).withConfig({
|
|
132429
132429
|
displayName: "PageDetail__StyledPageBreadcrumb",
|
|
132430
132430
|
componentId: "sc-22rpk8-2"
|
|
132431
|
-
})(templateObject_3$
|
|
132431
|
+
})(templateObject_3$e || (templateObject_3$e = __makeTemplateObject$l(["\n flex-grow: 1;\n box-sizing: border-box;\n max-width: calc(100% - 22px); /* 22px is for the ToC button */\n padding-right: ", "px;\n"], ["\n flex-grow: 1;\n box-sizing: border-box;\n max-width: calc(100% - 22px); /* 22px is for the ToC button */\n padding-right: ", "px;\n"])), spacingS);
|
|
132432
132432
|
|
|
132433
132433
|
var PageTableOfContentsWrapper = function PageTableOfContentsWrapper() {
|
|
132434
132434
|
var item = useDetailViewContext().item;
|
|
@@ -132468,7 +132468,7 @@
|
|
|
132468
132468
|
displayName: "PageDetail__StyledPagesDetailViewNavigation",
|
|
132469
132469
|
componentId: "sc-22rpk8-3"
|
|
132470
132470
|
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), function (p) {
|
|
132471
|
-
return p.applyMarginTop && _styled.css(templateObject_4$
|
|
132471
|
+
return p.applyMarginTop && _styled.css(templateObject_4$d || (templateObject_4$d = __makeTemplateObject$l(["\n margin-top: ", "px;\n "], ["\n margin-top: ", "px;\n "])), spacingL);
|
|
132472
132472
|
});
|
|
132473
132473
|
|
|
132474
132474
|
var InlinePageListWrapper = function InlinePageListWrapper() {
|
|
@@ -132485,7 +132485,7 @@
|
|
|
132485
132485
|
return jsxRuntime.jsx(InlinePageList, {}, void 0);
|
|
132486
132486
|
};
|
|
132487
132487
|
|
|
132488
|
-
var templateObject_1$
|
|
132488
|
+
var templateObject_1$n, templateObject_2$e, templateObject_3$e, templateObject_4$d, templateObject_5$a;
|
|
132489
132489
|
|
|
132490
132490
|
var EventDetail = function EventDetail(_a) {
|
|
132491
132491
|
var itemId = _a.itemId,
|
|
@@ -132500,7 +132500,7 @@
|
|
|
132500
132500
|
return null;
|
|
132501
132501
|
}
|
|
132502
132502
|
|
|
132503
|
-
return jsxRuntime.jsx(Host$
|
|
132503
|
+
return jsxRuntime.jsx(Host$e, __assign$g({
|
|
132504
132504
|
className: className
|
|
132505
132505
|
}, {
|
|
132506
132506
|
children: jsxRuntime.jsx(DetailViewContextProvider, __assign$g({
|
|
@@ -132550,29 +132550,29 @@
|
|
|
132550
132550
|
}), void 0);
|
|
132551
132551
|
};
|
|
132552
132552
|
|
|
132553
|
-
var Host$
|
|
132553
|
+
var Host$e = _styled__default["default"].div.withConfig({
|
|
132554
132554
|
displayName: "EventDetail__Host",
|
|
132555
132555
|
componentId: "sc-hrm4yl-0"
|
|
132556
|
-
})(templateObject_1$
|
|
132556
|
+
})(templateObject_1$m || (templateObject_1$m = __makeTemplateObject$l([""], [""])));
|
|
132557
132557
|
|
|
132558
132558
|
var EventDateAndRecurrenceInfo = _styled__default["default"].div.withConfig({
|
|
132559
132559
|
displayName: "EventDetail__EventDateAndRecurrenceInfo",
|
|
132560
132560
|
componentId: "sc-hrm4yl-1"
|
|
132561
|
-
})(templateObject_2$
|
|
132561
|
+
})(templateObject_2$d || (templateObject_2$d = __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"])));
|
|
132562
132562
|
|
|
132563
132563
|
var DatesInfo = _styled__default["default"](EventDetailViewDatesInfo).withConfig({
|
|
132564
132564
|
displayName: "EventDetail__DatesInfo",
|
|
132565
132565
|
componentId: "sc-hrm4yl-2"
|
|
132566
|
-
})(templateObject_3$
|
|
132566
|
+
})(templateObject_3$d || (templateObject_3$d = __makeTemplateObject$l(["\n margin-right: ", "px;\n"], ["\n margin-right: ", "px;\n"])), spacingM);
|
|
132567
132567
|
|
|
132568
132568
|
var EventRecurrenceSeriesInfoLink = _styled__default["default"].a.withConfig({
|
|
132569
132569
|
displayName: "EventDetail__EventRecurrenceSeriesInfoLink",
|
|
132570
132570
|
componentId: "sc-hrm4yl-3"
|
|
132571
|
-
})(templateObject_4$
|
|
132571
|
+
})(templateObject_4$c || (templateObject_4$c = __makeTemplateObject$l(["\n color: ", ";\n margin-bottom: ", "px;\n"], ["\n color: ", ";\n margin-bottom: ", "px;\n"])), function (p) {
|
|
132572
132572
|
return p.theme.textColors.default;
|
|
132573
132573
|
}, spacingM);
|
|
132574
132574
|
|
|
132575
|
-
var templateObject_1$
|
|
132575
|
+
var templateObject_1$m, templateObject_2$d, templateObject_3$d, templateObject_4$c;
|
|
132576
132576
|
|
|
132577
132577
|
function useNewsItemClickHandler() {
|
|
132578
132578
|
var user = useCurrentUserContext().user;
|
|
@@ -132717,7 +132717,7 @@
|
|
|
132717
132717
|
var icon = getNewsCardIcon(item, intl);
|
|
132718
132718
|
var preferredContentLanguage = getPreferredContentLanguage(user);
|
|
132719
132719
|
var url = getExternalContentUrl(item, preferredContentLanguage);
|
|
132720
|
-
return jsxRuntime.jsxs(Host$
|
|
132720
|
+
return jsxRuntime.jsxs(Host$d, __assign$g({
|
|
132721
132721
|
className: className
|
|
132722
132722
|
}, {
|
|
132723
132723
|
children: [jsxRuntime.jsx(Overlay, {
|
|
@@ -132780,24 +132780,24 @@
|
|
|
132780
132780
|
return NewsService.getNewsRoute(baseRoute, item.id, title, item.useExternalContent);
|
|
132781
132781
|
}
|
|
132782
132782
|
};
|
|
132783
|
-
var Host$
|
|
132783
|
+
var Host$d = _styled__default["default"].div.withConfig({
|
|
132784
132784
|
displayName: "NewsCompactCard__Host",
|
|
132785
132785
|
componentId: "sc-16ovog0-0"
|
|
132786
|
-
})(templateObject_1$
|
|
132786
|
+
})(templateObject_1$l || (templateObject_1$l = __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) {
|
|
132787
132787
|
return p.theme.palette.white;
|
|
132788
132788
|
});
|
|
132789
132789
|
|
|
132790
|
-
var TextStyle = _styled.css(templateObject_2$
|
|
132790
|
+
var TextStyle = _styled.css(templateObject_2$c || (templateObject_2$c = __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);
|
|
132791
132791
|
|
|
132792
132792
|
var Inner$2 = _styled__default["default"].div.withConfig({
|
|
132793
132793
|
displayName: "NewsCompactCard__Inner",
|
|
132794
132794
|
componentId: "sc-16ovog0-1"
|
|
132795
|
-
})(templateObject_3$
|
|
132795
|
+
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject$l(["\n max-width: calc(100% - ", "px);\n width: 100%;\n display: flex;\n align-items: center;\n"], ["\n max-width: calc(100% - ", "px);\n width: 100%;\n display: flex;\n align-items: center;\n"])), BannerSize);
|
|
132796
132796
|
|
|
132797
132797
|
var Content$2 = _styled__default["default"].div.withConfig({
|
|
132798
132798
|
displayName: "NewsCompactCard__Content",
|
|
132799
132799
|
componentId: "sc-16ovog0-2"
|
|
132800
|
-
})(templateObject_4$
|
|
132800
|
+
})(templateObject_4$b || (templateObject_4$b = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n box-sizing: border-box;\n padding: ", "px ", "px;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n box-sizing: border-box;\n padding: ", "px ", "px;\n\n ", "\n"])), spacingXs, spacingS + 5, TextStyle);
|
|
132801
132801
|
|
|
132802
132802
|
var Date$1 = _styled__default["default"](DateTime).withConfig({
|
|
132803
132803
|
displayName: "NewsCompactCard__Date",
|
|
@@ -132881,10 +132881,10 @@
|
|
|
132881
132881
|
});
|
|
132882
132882
|
});
|
|
132883
132883
|
|
|
132884
|
-
var templateObject_1$
|
|
132884
|
+
var templateObject_1$l, templateObject_2$c, templateObject_3$c, templateObject_4$b, templateObject_5$9, templateObject_6$8, templateObject_7$5, templateObject_8$4, templateObject_9$2, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$2, templateObject_15$2, templateObject_16$1;
|
|
132885
132885
|
|
|
132886
132886
|
var EmptyNewsList = function EmptyNewsList() {
|
|
132887
|
-
return jsxRuntime.jsxs(Host$
|
|
132887
|
+
return jsxRuntime.jsxs(Host$c, {
|
|
132888
132888
|
children: [jsxRuntime.jsx(StyledIcon$3, {
|
|
132889
132889
|
iconName: "News"
|
|
132890
132890
|
}, void 0), jsxRuntime.jsx(Message, {
|
|
@@ -132895,22 +132895,22 @@
|
|
|
132895
132895
|
}, void 0);
|
|
132896
132896
|
};
|
|
132897
132897
|
|
|
132898
|
-
var Host$
|
|
132898
|
+
var Host$c = _styled__default["default"].div.withConfig({
|
|
132899
132899
|
displayName: "EmptyNewsList__Host",
|
|
132900
132900
|
componentId: "sc-11ktr8s-0"
|
|
132901
|
-
})(templateObject_1$
|
|
132901
|
+
})(templateObject_1$k || (templateObject_1$k = __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);
|
|
132902
132902
|
|
|
132903
132903
|
var StyledIcon$3 = _styled__default["default"](officeUiFabricReact.Icon).withConfig({
|
|
132904
132904
|
displayName: "EmptyNewsList__StyledIcon",
|
|
132905
132905
|
componentId: "sc-11ktr8s-1"
|
|
132906
|
-
})(templateObject_2$
|
|
132906
|
+
})(templateObject_2$b || (templateObject_2$b = __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);
|
|
132907
132907
|
|
|
132908
132908
|
var Message = _styled__default["default"].p.withConfig({
|
|
132909
132909
|
displayName: "EmptyNewsList__Message",
|
|
132910
132910
|
componentId: "sc-11ktr8s-2"
|
|
132911
|
-
})(templateObject_3$
|
|
132911
|
+
})(templateObject_3$b || (templateObject_3$b = __makeTemplateObject$l(["\n text-align: center;\n padding: 0;\n margin: 0;\n"], ["\n text-align: center;\n padding: 0;\n margin: 0;\n"])));
|
|
132912
132912
|
|
|
132913
|
-
var templateObject_1$
|
|
132913
|
+
var templateObject_1$k, templateObject_2$b, templateObject_3$b;
|
|
132914
132914
|
|
|
132915
132915
|
exports.ItemLayoutMode = void 0;
|
|
132916
132916
|
|
|
@@ -133008,7 +133008,7 @@
|
|
|
133008
133008
|
var formatMessage = useIntl().formatMessage;
|
|
133009
133009
|
var webAppUrl = useSubscriptionWebAppUrl();
|
|
133010
133010
|
var handleClick = useNewsItemClickHandler();
|
|
133011
|
-
return jsxRuntime.jsx(Host$
|
|
133011
|
+
return jsxRuntime.jsx(Host$b, __assign$g({
|
|
133012
133012
|
className: className
|
|
133013
133013
|
}, {
|
|
133014
133014
|
children: items.map(function (item) {
|
|
@@ -133073,21 +133073,21 @@
|
|
|
133073
133073
|
}), void 0);
|
|
133074
133074
|
};
|
|
133075
133075
|
|
|
133076
|
-
var Host$
|
|
133076
|
+
var Host$b = _styled__default["default"].div.withConfig({
|
|
133077
133077
|
displayName: "NewsList__Host",
|
|
133078
133078
|
componentId: "sc-1d0bzx1-0"
|
|
133079
|
-
})(templateObject_1$
|
|
133079
|
+
})(templateObject_1$j || (templateObject_1$j = __makeTemplateObject$l([""], [""])));
|
|
133080
133080
|
|
|
133081
133081
|
var CompactList = _styled__default["default"].ul.withConfig({
|
|
133082
133082
|
displayName: "NewsList__CompactList",
|
|
133083
133083
|
componentId: "sc-1d0bzx1-1"
|
|
133084
|
-
})(templateObject_2$
|
|
133084
|
+
})(templateObject_2$a || (templateObject_2$a = __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);
|
|
133085
133085
|
|
|
133086
133086
|
var StyledNewsItemTile = _styled__default["default"](NewsItemTile).withConfig({
|
|
133087
133087
|
displayName: "NewsList__StyledNewsItemTile",
|
|
133088
133088
|
componentId: "sc-1d0bzx1-2"
|
|
133089
|
-
})(templateObject_4$
|
|
133090
|
-
return p.showHighlight && _styled.css(templateObject_3$
|
|
133089
|
+
})(templateObject_4$a || (templateObject_4$a = __makeTemplateObject$l(["\n :not(:last-child) {\n margin-bottom: ", "px;\n }\n\n ", ";\n"], ["\n :not(:last-child) {\n margin-bottom: ", "px;\n }\n\n ", ";\n"])), spacingM, function (p) {
|
|
133090
|
+
return p.showHighlight && _styled.css(templateObject_3$a || (templateObject_3$a = __makeTemplateObject$l(["\n position: relative;\n\n &::after {\n content: '';\n border-right-width: 6px;\n border-right-color: ", ";\n border-right-style: solid;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n }\n "], ["\n position: relative;\n\n &::after {\n content: '';\n border-right-width: 6px;\n border-right-color: ", ";\n border-right-style: solid;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n }\n "])), p.theme.palette.accent);
|
|
133091
133091
|
});
|
|
133092
133092
|
|
|
133093
133093
|
var Comments = _styled__default["default"].a.withConfig({
|
|
@@ -133116,7 +133116,7 @@
|
|
|
133116
133116
|
return p.theme.palette.red;
|
|
133117
133117
|
}, spacingM);
|
|
133118
133118
|
|
|
133119
|
-
var templateObject_1$
|
|
133119
|
+
var templateObject_1$j, templateObject_2$a, templateObject_3$a, templateObject_4$a, templateObject_5$8, templateObject_6$7, templateObject_7$4, templateObject_8$3;
|
|
133120
133120
|
|
|
133121
133121
|
var ManageChannels = function ManageChannels(_a) {
|
|
133122
133122
|
var className = _a.className;
|
|
@@ -133140,7 +133140,7 @@
|
|
|
133140
133140
|
}, void 0);
|
|
133141
133141
|
}
|
|
133142
133142
|
|
|
133143
|
-
return jsxRuntime.jsxs(Host$
|
|
133143
|
+
return jsxRuntime.jsxs(Host$a, __assign$g({
|
|
133144
133144
|
className: className
|
|
133145
133145
|
}, {
|
|
133146
133146
|
children: [jsxRuntime.jsx(Title$2, {
|
|
@@ -133279,25 +133279,25 @@
|
|
|
133279
133279
|
}
|
|
133280
133280
|
};
|
|
133281
133281
|
|
|
133282
|
-
var Host$
|
|
133282
|
+
var Host$a = _styled__default["default"].div.withConfig({
|
|
133283
133283
|
displayName: "ManageChannels__Host",
|
|
133284
133284
|
componentId: "sc-yyoxfw-0"
|
|
133285
|
-
})(templateObject_1$
|
|
133285
|
+
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject$l(["\n padding: ", "px ", "px;\n"], ["\n padding: ", "px ", "px;\n"])), spacingX, spacingM);
|
|
133286
133286
|
|
|
133287
133287
|
var Title$2 = _styled__default["default"].h3.withConfig({
|
|
133288
133288
|
displayName: "ManageChannels__Title",
|
|
133289
133289
|
componentId: "sc-yyoxfw-1"
|
|
133290
|
-
})(templateObject_2$
|
|
133290
|
+
})(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject$l(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
133291
133291
|
|
|
133292
133292
|
var Description = _styled__default["default"].span.withConfig({
|
|
133293
133293
|
displayName: "ManageChannels__Description",
|
|
133294
133294
|
componentId: "sc-yyoxfw-2"
|
|
133295
|
-
})(templateObject_3$
|
|
133295
|
+
})(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject$l(["\n font-size: ", "px;\n"], ["\n font-size: ", "px;\n"])), fontSizeSmall);
|
|
133296
133296
|
|
|
133297
133297
|
var ChannelList = _styled__default["default"].ul.withConfig({
|
|
133298
133298
|
displayName: "ManageChannels__ChannelList",
|
|
133299
133299
|
componentId: "sc-yyoxfw-3"
|
|
133300
|
-
})(templateObject_4$
|
|
133300
|
+
})(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject$l(["\n list-style: none;\n\n && {\n margin-top: ", "px;\n padding-left: 0;\n }\n"], ["\n list-style: none;\n\n && {\n margin-top: ", "px;\n padding-left: 0;\n }\n"])), spacingS);
|
|
133301
133301
|
|
|
133302
133302
|
var ChannelItem = function ChannelItem(_a) {
|
|
133303
133303
|
var channel = _a.channel,
|
|
@@ -133355,7 +133355,7 @@
|
|
|
133355
133355
|
return p.theme.textColors.default;
|
|
133356
133356
|
});
|
|
133357
133357
|
|
|
133358
|
-
var templateObject_1$
|
|
133358
|
+
var templateObject_1$i, templateObject_2$9, templateObject_3$9, templateObject_4$9, templateObject_5$7, templateObject_6$6, templateObject_7$3, templateObject_8$2;
|
|
133359
133359
|
|
|
133360
133360
|
var NewsGridCard = function NewsGridCard(_a) {
|
|
133361
133361
|
var _b;
|
|
@@ -133386,7 +133386,7 @@
|
|
|
133386
133386
|
var channels = newsItem.channels;
|
|
133387
133387
|
var userLanguage = getPreferredContentLanguage(user);
|
|
133388
133388
|
var icon = getNewsCardIcon(item, intl);
|
|
133389
|
-
return jsxRuntime.jsxs(Host$
|
|
133389
|
+
return jsxRuntime.jsxs(Host$9, __assign$g({
|
|
133390
133390
|
className: className,
|
|
133391
133391
|
showHighlight: !!user.unreadNews.find(function (n) {
|
|
133392
133392
|
return n.itemId === item.id;
|
|
@@ -133462,13 +133462,13 @@
|
|
|
133462
133462
|
return NewsService.getNewsRoute(baseRoute, item.id, title);
|
|
133463
133463
|
}
|
|
133464
133464
|
};
|
|
133465
|
-
var Host$
|
|
133466
|
-
return p.showHighlight && _styled.css(templateObject_1$
|
|
133465
|
+
var Host$9 = _styled__default["default"].div(templateObject_2$8 || (templateObject_2$8 = __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) {
|
|
133466
|
+
return p.showHighlight && _styled.css(templateObject_1$h || (templateObject_1$h = __makeTemplateObject$l(["\n position: relative;\n &::after {\n ", ";\n }\n "], ["\n position: relative;\n &::after {\n ", ";\n }\n "])), BannerHighlightStyle);
|
|
133467
133467
|
});
|
|
133468
|
-
var BannerHighlightStyle = _styled.css(templateObject_3$
|
|
133468
|
+
var BannerHighlightStyle = _styled.css(templateObject_3$8 || (templateObject_3$8 = __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) {
|
|
133469
133469
|
return p.theme.palette.accent;
|
|
133470
133470
|
});
|
|
133471
|
-
var Content$1 = _styled__default["default"].div(templateObject_4$
|
|
133471
|
+
var Content$1 = _styled__default["default"].div(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject$l(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: auto;\n min-height: ", "px;\n padding: ", "px;\n box-sizing: border-box;\n background-color: ", ";\n"], ["\n position: relative;\n display: flex;\n flex-direction: column;\n width: auto;\n min-height: ", "px;\n padding: ", "px;\n box-sizing: border-box;\n background-color: ", ";\n"])), function (p) {
|
|
133472
133472
|
return p.contentHeight;
|
|
133473
133473
|
}, spacingM, function (p) {
|
|
133474
133474
|
return p.theme.palette.white;
|
|
@@ -133490,24 +133490,24 @@
|
|
|
133490
133490
|
return p.theme.palette.neutralTertiary;
|
|
133491
133491
|
});
|
|
133492
133492
|
var StyledChannels$1 = _styled__default["default"](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);
|
|
133493
|
-
var templateObject_1$
|
|
133493
|
+
var templateObject_1$h, templateObject_2$8, templateObject_3$8, templateObject_4$8, templateObject_5$6, templateObject_6$5, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1;
|
|
133494
133494
|
|
|
133495
133495
|
var ErrorContainer = function ErrorContainer() {
|
|
133496
|
-
return jsxRuntime.jsx(Host$
|
|
133496
|
+
return jsxRuntime.jsx(Host$8, {
|
|
133497
133497
|
children: jsxRuntime.jsx(FormattedMessage$1, {
|
|
133498
133498
|
id: "NewsList.error"
|
|
133499
133499
|
}, void 0)
|
|
133500
133500
|
}, void 0);
|
|
133501
133501
|
};
|
|
133502
133502
|
|
|
133503
|
-
var Host$
|
|
133503
|
+
var Host$8 = _styled__default["default"].p.withConfig({
|
|
133504
133504
|
displayName: "ErrorContainer__Host",
|
|
133505
133505
|
componentId: "sc-499uwc-0"
|
|
133506
|
-
})(templateObject_1$
|
|
133506
|
+
})(templateObject_1$g || (templateObject_1$g = __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) {
|
|
133507
133507
|
return p.theme.palette.red;
|
|
133508
133508
|
}, spacingM);
|
|
133509
133509
|
|
|
133510
|
-
var templateObject_1$
|
|
133510
|
+
var templateObject_1$g;
|
|
133511
133511
|
|
|
133512
133512
|
var NewsGrid = function NewsGrid(_a) {
|
|
133513
133513
|
var filter = _a.filter,
|
|
@@ -133550,7 +133550,7 @@
|
|
|
133550
133550
|
return jsxRuntime.jsx(EmptyNewsList, {}, void 0);
|
|
133551
133551
|
}
|
|
133552
133552
|
|
|
133553
|
-
return jsxRuntime.jsxs(Host$
|
|
133553
|
+
return jsxRuntime.jsxs(Host$7, {
|
|
133554
133554
|
children: [jsxRuntime.jsx(Inner$1, __assign$g({
|
|
133555
133555
|
className: className,
|
|
133556
133556
|
columnCount: columnCount
|
|
@@ -133591,26 +133591,26 @@
|
|
|
133591
133591
|
}
|
|
133592
133592
|
};
|
|
133593
133593
|
|
|
133594
|
-
var Host$
|
|
133594
|
+
var Host$7 = _styled__default["default"].div.withConfig({
|
|
133595
133595
|
displayName: "NewsGrid__Host",
|
|
133596
133596
|
componentId: "sc-8ugpfz-0"
|
|
133597
|
-
})(templateObject_1$
|
|
133597
|
+
})(templateObject_1$f || (templateObject_1$f = __makeTemplateObject$l([""], [""])));
|
|
133598
133598
|
|
|
133599
133599
|
var Inner$1 = _styled__default["default"].div.withConfig({
|
|
133600
133600
|
displayName: "NewsGrid__Inner",
|
|
133601
133601
|
componentId: "sc-8ugpfz-1"
|
|
133602
|
-
})(templateObject_3$
|
|
133603
|
-
return _styled.css(templateObject_2$
|
|
133602
|
+
})(templateObject_3$7 || (templateObject_3$7 = __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) {
|
|
133603
|
+
return _styled.css(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject$l(["\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n "], ["\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n "])), p.columnCount);
|
|
133604
133604
|
});
|
|
133605
133605
|
|
|
133606
133606
|
_styled__default["default"](NewsGridCard).withConfig({
|
|
133607
133607
|
displayName: "NewsGrid__IELegacyGridCard",
|
|
133608
133608
|
componentId: "sc-8ugpfz-2"
|
|
133609
133609
|
})(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject$l(["\n margin: ", "px;\n ", ";\n"], ["\n margin: ", "px;\n ", ";\n"])), spacingM / 2, function (p) {
|
|
133610
|
-
return _styled.css(templateObject_4$
|
|
133610
|
+
return _styled.css(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject$l(["\n width: calc(100% / ", " - ", "px);\n "], ["\n width: calc(100% / ", " - ", "px);\n "])), p.columnCount, spacingM);
|
|
133611
133611
|
});
|
|
133612
133612
|
|
|
133613
|
-
var templateObject_1$
|
|
133613
|
+
var templateObject_1$f, templateObject_2$7, templateObject_3$7, templateObject_4$7, templateObject_5$5;
|
|
133614
133614
|
|
|
133615
133615
|
var HeroSlide = function HeroSlide(_a) {
|
|
133616
133616
|
var item = _a.item,
|
|
@@ -133646,7 +133646,7 @@
|
|
|
133646
133646
|
var showHeadline = features.contentHeadline && headline != null;
|
|
133647
133647
|
var hostWidth = typeof width === 'number' ? width + "px" : width;
|
|
133648
133648
|
var hostHeight = typeof height === 'number' ? height + "px" : height;
|
|
133649
|
-
return jsxRuntime.jsxs(Host$
|
|
133649
|
+
return jsxRuntime.jsxs(Host$6, __assign$g({
|
|
133650
133650
|
showBorder: !hasBanner,
|
|
133651
133651
|
applyOverlay: hasImageBanner,
|
|
133652
133652
|
width: hostWidth,
|
|
@@ -133751,13 +133751,13 @@
|
|
|
133751
133751
|
}
|
|
133752
133752
|
};
|
|
133753
133753
|
|
|
133754
|
-
var Host$
|
|
133754
|
+
var Host$6 = _styled__default["default"].div.withConfig({
|
|
133755
133755
|
displayName: "HeroSlide__Host",
|
|
133756
133756
|
componentId: "sc-3yofth-0"
|
|
133757
133757
|
})(templateObject_7$1 || (templateObject_7$1 = __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) {
|
|
133758
|
-
return p.width ? _styled.css(templateObject_1$
|
|
133758
|
+
return p.width ? _styled.css(templateObject_1$e || (templateObject_1$e = __makeTemplateObject$l(["\n width: ", ";\n "], ["\n width: ", ";\n "])), p.width) : _styled.css(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject$l(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
|
|
133759
133759
|
}, function (p) {
|
|
133760
|
-
return p.height ? _styled.css(templateObject_3$
|
|
133760
|
+
return p.height ? _styled.css(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject$l(["\n height: ", ";\n "], ["\n height: ", ";\n "])), p.height) : _styled.css(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject$l(["\n height: 100%;\n "], ["\n height: 100%;\n "])));
|
|
133761
133761
|
}, function (p) {
|
|
133762
133762
|
return p.showBorder && _styled.css(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject$l(["\n border: 1px solid ", ";\n box-sizing: border-box;\n "], ["\n border: 1px solid ", ";\n box-sizing: border-box;\n "])), p.theme.palette.neutralTertiaryAlt);
|
|
133763
133763
|
}, function (p) {
|
|
@@ -133875,7 +133875,7 @@
|
|
|
133875
133875
|
return p.color ? _styled.css(templateObject_31 || (templateObject_31 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.color) : _styled.css(templateObject_32 || (templateObject_32 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.default);
|
|
133876
133876
|
});
|
|
133877
133877
|
|
|
133878
|
-
var templateObject_1$
|
|
133878
|
+
var templateObject_1$e, templateObject_2$6, templateObject_3$6, templateObject_4$6, templateObject_5$4, templateObject_6$4, templateObject_7$1, templateObject_8, templateObject_9, templateObject_10, 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;
|
|
133879
133879
|
|
|
133880
133880
|
var HeroPaging = function HeroPaging(_a) {
|
|
133881
133881
|
var items = _a.items,
|
|
@@ -133999,18 +133999,18 @@
|
|
|
133999
133999
|
var PagingHost = _styled__default["default"].div.withConfig({
|
|
134000
134000
|
displayName: "HeroPaging__PagingHost",
|
|
134001
134001
|
componentId: "sc-1y3j8qb-0"
|
|
134002
|
-
})(templateObject_1$
|
|
134002
|
+
})(templateObject_1$d || (templateObject_1$d = __makeTemplateObject$l(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
134003
134003
|
|
|
134004
134004
|
var Paging = _styled__default["default"].ul.withConfig({
|
|
134005
134005
|
displayName: "HeroPaging__Paging",
|
|
134006
134006
|
componentId: "sc-1y3j8qb-1"
|
|
134007
|
-
})(templateObject_2$
|
|
134007
|
+
})(templateObject_2$5 || (templateObject_2$5 = __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);
|
|
134008
134008
|
|
|
134009
134009
|
var PagingItem = _styled__default["default"].li.withConfig({
|
|
134010
134010
|
displayName: "HeroPaging__PagingItem",
|
|
134011
134011
|
componentId: "sc-1y3j8qb-2"
|
|
134012
|
-
})(templateObject_4$
|
|
134013
|
-
return p.visibleItemsLength && _styled.css(templateObject_3$
|
|
134012
|
+
})(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject$l(["\n display: none;\n flex: 1;\n min-width: 140px;\n margin: 0 5px;\n\n ", "\n\n &:not(.paging-item--active) {\n opacity: 0.6;\n }\n\n &.paging-item--visible {\n display: block;\n }\n"], ["\n display: none;\n flex: 1;\n min-width: 140px;\n margin: 0 5px;\n\n ", "\n\n &:not(.paging-item--active) {\n opacity: 0.6;\n }\n\n &.paging-item--visible {\n display: block;\n }\n"])), function (p) {
|
|
134013
|
+
return p.visibleItemsLength && _styled.css(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject$l(["\n max-width: calc(100% / ", " - 10px);\n "], ["\n max-width: calc(100% / ", " - 10px);\n "])), p.visibleItemsLength);
|
|
134014
134014
|
});
|
|
134015
134015
|
|
|
134016
134016
|
var PagingButton = _styled__default["default"](ActionButton).withConfig({
|
|
@@ -134025,7 +134025,7 @@
|
|
|
134025
134025
|
componentId: "sc-1y3j8qb-4"
|
|
134026
134026
|
})(templateObject_6$3 || (templateObject_6$3 = __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"])));
|
|
134027
134027
|
|
|
134028
|
-
var templateObject_1$
|
|
134028
|
+
var templateObject_1$d, templateObject_2$5, templateObject_3$5, templateObject_4$5, templateObject_5$3, templateObject_6$3;
|
|
134029
134029
|
|
|
134030
134030
|
var Hero = function Hero(_a) {
|
|
134031
134031
|
var items = _a.items,
|
|
@@ -134092,9 +134092,9 @@
|
|
|
134092
134092
|
var StyledCarousel = _styled__default["default"](Carousel).withConfig({
|
|
134093
134093
|
displayName: "Hero__StyledCarousel",
|
|
134094
134094
|
componentId: "sc-55ys37-0"
|
|
134095
|
-
})(templateObject_1$
|
|
134095
|
+
})(templateObject_1$c || (templateObject_1$c = __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);
|
|
134096
134096
|
|
|
134097
|
-
var templateObject_1$
|
|
134097
|
+
var templateObject_1$c;
|
|
134098
134098
|
|
|
134099
134099
|
var NewsHero = function NewsHero(_a) {
|
|
134100
134100
|
var _b;
|
|
@@ -134219,9 +134219,9 @@
|
|
|
134219
134219
|
var StyledChannels = _styled__default["default"](ChannelList$1).withConfig({
|
|
134220
134220
|
displayName: "NewsHero__StyledChannels",
|
|
134221
134221
|
componentId: "sc-i9ar0j-0"
|
|
134222
|
-
})(templateObject_1$
|
|
134222
|
+
})(templateObject_1$b || (templateObject_1$b = __makeTemplateObject$l(["\n [data-channels] {\n justify-content: flex-end;\n }\n"], ["\n [data-channels] {\n justify-content: flex-end;\n }\n"])));
|
|
134223
134223
|
|
|
134224
|
-
var templateObject_1$
|
|
134224
|
+
var templateObject_1$b;
|
|
134225
134225
|
|
|
134226
134226
|
// a string of all valid unicode whitespaces
|
|
134227
134227
|
// eslint-disable-next-line max-len
|
|
@@ -134389,7 +134389,7 @@
|
|
|
134389
134389
|
var StyledDropdown = _styled__default["default"](Dropdown).withConfig({
|
|
134390
134390
|
displayName: "GroupsDropdown__StyledDropdown",
|
|
134391
134391
|
componentId: "sc-cmsnyu-0"
|
|
134392
|
-
})(templateObject_1$
|
|
134392
|
+
})(templateObject_1$a || (templateObject_1$a = __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) {
|
|
134393
134393
|
return p.theme.textColors.onAccent;
|
|
134394
134394
|
}, function (p) {
|
|
134395
134395
|
return p.theme.palette.accent;
|
|
@@ -134400,16 +134400,16 @@
|
|
|
134400
134400
|
var DropdownOption = _styled__default["default"].div.withConfig({
|
|
134401
134401
|
displayName: "GroupsDropdown__DropdownOption",
|
|
134402
134402
|
componentId: "sc-cmsnyu-1"
|
|
134403
|
-
})(templateObject_2$
|
|
134403
|
+
})(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), ToolbarOptionStyles);
|
|
134404
134404
|
|
|
134405
134405
|
var Title = _styled__default["default"].div.withConfig({
|
|
134406
134406
|
displayName: "GroupsDropdown__Title",
|
|
134407
134407
|
componentId: "sc-cmsnyu-2"
|
|
134408
|
-
})(templateObject_3$
|
|
134408
|
+
})(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject$l(["\n display: inline-flex;\n width: 100%;\n\n > i {\n margin-left: ", "px;\n margin-right: ", "px;\n }\n\n > span {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n"], ["\n display: inline-flex;\n width: 100%;\n\n > i {\n margin-left: ", "px;\n margin-right: ", "px;\n }\n\n > span {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n"])), spacingS, spacingS + 8);
|
|
134409
134409
|
|
|
134410
|
-
var GlobalDropdownStyles = _styled.createGlobalStyle(templateObject_4$
|
|
134410
|
+
var GlobalDropdownStyles = _styled.createGlobalStyle(templateObject_4$4 || (templateObject_4$4 = __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);
|
|
134411
134411
|
|
|
134412
|
-
var templateObject_1$
|
|
134412
|
+
var templateObject_1$a, templateObject_2$4, templateObject_3$4, templateObject_4$4;
|
|
134413
134413
|
|
|
134414
134414
|
var TaskButton = function TaskButton(_a) {
|
|
134415
134415
|
var count = _a.count,
|
|
@@ -134451,9 +134451,9 @@
|
|
|
134451
134451
|
var ToggleButton = _styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({
|
|
134452
134452
|
displayName: "TaskButton__ToggleButton",
|
|
134453
134453
|
componentId: "sc-8eylsw-0"
|
|
134454
|
-
})(templateObject_1$
|
|
134454
|
+
})(templateObject_1$9 || (templateObject_1$9 = __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);
|
|
134455
134455
|
|
|
134456
|
-
var templateObject_1$
|
|
134456
|
+
var templateObject_1$9;
|
|
134457
134457
|
|
|
134458
134458
|
var TaskButtons = function TaskButtons(_a) {
|
|
134459
134459
|
var type = _a.type,
|
|
@@ -134471,7 +134471,7 @@
|
|
|
134471
134471
|
return null;
|
|
134472
134472
|
}
|
|
134473
134473
|
|
|
134474
|
-
return jsxRuntime.jsxs(Host$
|
|
134474
|
+
return jsxRuntime.jsxs(Host$5, __assign$g({
|
|
134475
134475
|
className: className
|
|
134476
134476
|
}, {
|
|
134477
134477
|
children: [jsxRuntime.jsx(TaskButton, {
|
|
@@ -134516,12 +134516,12 @@
|
|
|
134516
134516
|
}), void 0);
|
|
134517
134517
|
};
|
|
134518
134518
|
|
|
134519
|
-
var Host$
|
|
134519
|
+
var Host$5 = _styled__default["default"].div.withConfig({
|
|
134520
134520
|
displayName: "TaskButtons__Host",
|
|
134521
134521
|
componentId: "sc-sw0zei-0"
|
|
134522
|
-
})(templateObject_1$
|
|
134522
|
+
})(templateObject_1$8 || (templateObject_1$8 = __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"])));
|
|
134523
134523
|
|
|
134524
|
-
var templateObject_1$
|
|
134524
|
+
var templateObject_1$8;
|
|
134525
134525
|
|
|
134526
134526
|
var NewArticleButton = function NewArticleButton(_a) {
|
|
134527
134527
|
var groupId = _a.groupId,
|
|
@@ -134663,22 +134663,22 @@
|
|
|
134663
134663
|
}).length;
|
|
134664
134664
|
}
|
|
134665
134665
|
};
|
|
134666
|
-
var MessageBarStyle = _styled.createGlobalStyle(templateObject_1$
|
|
134666
|
+
var MessageBarStyle = _styled.createGlobalStyle(templateObject_1$7 || (templateObject_1$7 = __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);
|
|
134667
134667
|
|
|
134668
134668
|
var StyledEditorListItem = _styled__default["default"](EditorListItem).withConfig({
|
|
134669
134669
|
displayName: "NewsEditorDashboard__StyledEditorListItem",
|
|
134670
134670
|
componentId: "sc-vv9dzu-0"
|
|
134671
|
-
})(templateObject_2$
|
|
134671
|
+
})(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject$l(["\n :not(:first-child) {\n margin-top: ", "px;\n }\n"], ["\n :not(:first-child) {\n margin-top: ", "px;\n }\n"])), spacingS + 5);
|
|
134672
134672
|
|
|
134673
134673
|
var FiltersAndButtons = _styled__default["default"].div.withConfig({
|
|
134674
134674
|
displayName: "NewsEditorDashboard__FiltersAndButtons",
|
|
134675
134675
|
componentId: "sc-vv9dzu-1"
|
|
134676
|
-
})(templateObject_3$
|
|
134676
|
+
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"], ["\n margin-bottom: ", "px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])), spacingX);
|
|
134677
134677
|
|
|
134678
134678
|
var EditorList = _styled__default["default"].div.withConfig({
|
|
134679
134679
|
displayName: "NewsEditorDashboard__EditorList",
|
|
134680
134680
|
componentId: "sc-vv9dzu-2"
|
|
134681
|
-
})(templateObject_4$
|
|
134681
|
+
})(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject$l([""], [""])));
|
|
134682
134682
|
|
|
134683
134683
|
var Filters = _styled__default["default"].div.withConfig({
|
|
134684
134684
|
displayName: "NewsEditorDashboard__Filters",
|
|
@@ -134690,7 +134690,7 @@
|
|
|
134690
134690
|
componentId: "sc-vv9dzu-4"
|
|
134691
134691
|
})(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n align-self: flex-start;\n"], ["\n margin-bottom: ", "px;\n align-self: flex-start;\n"])), spacingXs);
|
|
134692
134692
|
|
|
134693
|
-
var templateObject_1$
|
|
134693
|
+
var templateObject_1$7, templateObject_2$3, templateObject_3$3, templateObject_4$3, templateObject_5$2, templateObject_6$2;
|
|
134694
134694
|
|
|
134695
134695
|
// NOTE: This component exists in this project and not in the ui/common/toolbar because it uses DetailViewContext placed in feature/content/
|
|
134696
134696
|
// Also a generic component `ToolbarLanguageSelector` in ui/common/toolbar complicates the flow and requires some code duplication
|
|
@@ -134731,9 +134731,9 @@
|
|
|
134731
134731
|
var LanguageMenuButton = _styled__default["default"](LanguageSelector).withConfig({
|
|
134732
134732
|
displayName: "ToolbarNewsLanguageSelector__LanguageMenuButton",
|
|
134733
134733
|
componentId: "sc-1xe5l19-0"
|
|
134734
|
-
})(templateObject_1$
|
|
134734
|
+
})(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject$l(["\n && {\n i {\n font-size: ", "px;\n }\n }\n"], ["\n && {\n i {\n font-size: ", "px;\n }\n }\n"])), fontSizeNormal);
|
|
134735
134735
|
|
|
134736
|
-
var templateObject_1$
|
|
134736
|
+
var templateObject_1$6;
|
|
134737
134737
|
|
|
134738
134738
|
var ToolbarManageNewsItemButton = function ToolbarManageNewsItemButton(_a) {
|
|
134739
134739
|
var onClick = _a.onClick;
|
|
@@ -134829,7 +134829,7 @@
|
|
|
134829
134829
|
}
|
|
134830
134830
|
|
|
134831
134831
|
if (!itemContext) {
|
|
134832
|
-
return jsxRuntime.jsx(Host$
|
|
134832
|
+
return jsxRuntime.jsx(Host$4, __assign$g({
|
|
134833
134833
|
className: className
|
|
134834
134834
|
}, {
|
|
134835
134835
|
children: jsxRuntime.jsx(NewsItemPreviewContextProvider, __assign$g({
|
|
@@ -134841,7 +134841,7 @@
|
|
|
134841
134841
|
}), void 0);
|
|
134842
134842
|
}
|
|
134843
134843
|
|
|
134844
|
-
return jsxRuntime.jsx(Host$
|
|
134844
|
+
return jsxRuntime.jsx(Host$4, __assign$g({
|
|
134845
134845
|
className: className
|
|
134846
134846
|
}, {
|
|
134847
134847
|
children: jsxRuntime.jsx(NewsDetailPreviewInternal, {}, void 0)
|
|
@@ -134856,12 +134856,12 @@
|
|
|
134856
134856
|
}), void 0);
|
|
134857
134857
|
};
|
|
134858
134858
|
|
|
134859
|
-
var Host$
|
|
134859
|
+
var Host$4 = _styled__default["default"].div.withConfig({
|
|
134860
134860
|
displayName: "NewsDetailPreview__Host",
|
|
134861
134861
|
componentId: "sc-17gmqax-0"
|
|
134862
|
-
})(templateObject_1$
|
|
134862
|
+
})(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject$l([""], [""])));
|
|
134863
134863
|
|
|
134864
|
-
var templateObject_1$
|
|
134864
|
+
var templateObject_1$5;
|
|
134865
134865
|
|
|
134866
134866
|
var FilterContext = /*#__PURE__*/React$d.createContext(null);
|
|
134867
134867
|
var FilterContextProvider = function FilterContextProvider(_a) {
|
|
@@ -134886,18 +134886,18 @@
|
|
|
134886
134886
|
filter: filter,
|
|
134887
134887
|
onChange: onChange
|
|
134888
134888
|
}, {
|
|
134889
|
-
children: jsxRuntime.jsx(Host$
|
|
134889
|
+
children: jsxRuntime.jsx(Host$3, {
|
|
134890
134890
|
children: children
|
|
134891
134891
|
}, void 0)
|
|
134892
134892
|
}), void 0);
|
|
134893
134893
|
};
|
|
134894
134894
|
|
|
134895
|
-
var Host$
|
|
134895
|
+
var Host$3 = _styled__default["default"].div.withConfig({
|
|
134896
134896
|
displayName: "ToolbarFilterPanel__Host",
|
|
134897
134897
|
componentId: "sc-118p488-0"
|
|
134898
|
-
})(templateObject_1$
|
|
134898
|
+
})(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
134899
134899
|
|
|
134900
|
-
var templateObject_1$
|
|
134900
|
+
var templateObject_1$4;
|
|
134901
134901
|
|
|
134902
134902
|
var ChannelFilter = function ChannelFilter(_a) {
|
|
134903
134903
|
var _b, _c;
|
|
@@ -134961,7 +134961,7 @@
|
|
|
134961
134961
|
}
|
|
134962
134962
|
}
|
|
134963
134963
|
}, {
|
|
134964
|
-
children: jsxRuntime.jsxs(Host$
|
|
134964
|
+
children: jsxRuntime.jsxs(Host$2, {
|
|
134965
134965
|
children: [jsxRuntime.jsx(StyledTextField, {
|
|
134966
134966
|
placeholder: formatMessage({
|
|
134967
134967
|
id: 'Generic.search'
|
|
@@ -134992,7 +134992,7 @@
|
|
|
134992
134992
|
checked: checked
|
|
134993
134993
|
}, c.id);
|
|
134994
134994
|
})
|
|
134995
|
-
}, void 0), jsxRuntime.jsx(ClearFilterButton$
|
|
134995
|
+
}, void 0), jsxRuntime.jsx(ClearFilterButton$2, {
|
|
134996
134996
|
text: "Clear filter",
|
|
134997
134997
|
iconProps: {
|
|
134998
134998
|
iconName: 'ClearFilter'
|
|
@@ -135025,20 +135025,20 @@
|
|
|
135025
135025
|
}
|
|
135026
135026
|
};
|
|
135027
135027
|
|
|
135028
|
-
var Host$
|
|
135028
|
+
var Host$2 = _styled__default["default"].div.withConfig({
|
|
135029
135029
|
displayName: "ChannelFilter__Host",
|
|
135030
135030
|
componentId: "sc-1ju8xwz-0"
|
|
135031
|
-
})(templateObject_1$
|
|
135031
|
+
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
135032
135032
|
|
|
135033
135033
|
var ChannelsButton = _styled__default["default"](ActionButton).withConfig({
|
|
135034
135034
|
displayName: "ChannelFilter__ChannelsButton",
|
|
135035
135035
|
componentId: "sc-1ju8xwz-1"
|
|
135036
|
-
})(templateObject_2$
|
|
135036
|
+
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject$l(["\n i {\n order: 1;\n }\n"], ["\n i {\n order: 1;\n }\n"])));
|
|
135037
135037
|
|
|
135038
135038
|
var SelectedChannelsLabel = _styled__default["default"].span.withConfig({
|
|
135039
135039
|
displayName: "ChannelFilter__SelectedChannelsLabel",
|
|
135040
135040
|
componentId: "sc-1ju8xwz-2"
|
|
135041
|
-
})(templateObject_3$
|
|
135041
|
+
})(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject$l(["\n font-weight: bold;\n"], ["\n font-weight: bold;\n"])));
|
|
135042
135042
|
|
|
135043
135043
|
var channelRowHeight = 36;
|
|
135044
135044
|
var visibleChannels = 8;
|
|
@@ -135046,14 +135046,14 @@
|
|
|
135046
135046
|
var Channels = _styled__default["default"].div.withConfig({
|
|
135047
135047
|
displayName: "ChannelFilter__Channels",
|
|
135048
135048
|
componentId: "sc-1ju8xwz-3"
|
|
135049
|
-
})(templateObject_4$
|
|
135049
|
+
})(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n max-height: ", "px;\n overflow-y: auto;\n"], ["\n margin-bottom: ", "px;\n max-height: ", "px;\n overflow-y: auto;\n"])), spacingM, channelRowHeight * visibleChannels);
|
|
135050
135050
|
|
|
135051
135051
|
var StyledCheckbox = _styled__default["default"](officeUiFabricReact.Checkbox).withConfig({
|
|
135052
135052
|
displayName: "ChannelFilter__StyledCheckbox",
|
|
135053
135053
|
componentId: "sc-1ju8xwz-4"
|
|
135054
135054
|
})(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject$l(["\n padding: ", "px 0;\n\n &:first-child {\n padding-top: 0;\n }\n\n &:last-child {\n padding-bottom: 0;\n }\n"], ["\n padding: ", "px 0;\n\n &:first-child {\n padding-top: 0;\n }\n\n &:last-child {\n padding-bottom: 0;\n }\n"])), spacingS - 2);
|
|
135055
135055
|
|
|
135056
|
-
var ClearFilterButton$
|
|
135056
|
+
var ClearFilterButton$2 = _styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({
|
|
135057
135057
|
displayName: "ChannelFilter__ClearFilterButton",
|
|
135058
135058
|
componentId: "sc-1ju8xwz-5"
|
|
135059
135059
|
})(templateObject_6$1 || (templateObject_6$1 = __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"])));
|
|
@@ -135063,7 +135063,7 @@
|
|
|
135063
135063
|
componentId: "sc-1ju8xwz-6"
|
|
135064
135064
|
})(templateObject_7 || (templateObject_7 = __makeTemplateObject$l(["\n padding-bottom: ", "px;\n"], ["\n padding-bottom: ", "px;\n"])), spacingS);
|
|
135065
135065
|
|
|
135066
|
-
var templateObject_1$
|
|
135066
|
+
var templateObject_1$3, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7;
|
|
135067
135067
|
|
|
135068
135068
|
function toInteger(dirtyNumber) {
|
|
135069
135069
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
@@ -135245,6 +135245,36 @@
|
|
|
135245
135245
|
}
|
|
135246
135246
|
}
|
|
135247
135247
|
|
|
135248
|
+
/**
|
|
135249
|
+
* @name addMilliseconds
|
|
135250
|
+
* @category Millisecond Helpers
|
|
135251
|
+
* @summary Add the specified number of milliseconds to the given date.
|
|
135252
|
+
*
|
|
135253
|
+
* @description
|
|
135254
|
+
* Add the specified number of milliseconds to the given date.
|
|
135255
|
+
*
|
|
135256
|
+
* ### v2.0.0 breaking changes:
|
|
135257
|
+
*
|
|
135258
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
135259
|
+
*
|
|
135260
|
+
* @param {Date|Number} date - the date to be changed
|
|
135261
|
+
* @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
135262
|
+
* @returns {Date} the new date with the milliseconds added
|
|
135263
|
+
* @throws {TypeError} 2 arguments required
|
|
135264
|
+
*
|
|
135265
|
+
* @example
|
|
135266
|
+
* // Add 750 milliseconds to 10 July 2014 12:45:30.000:
|
|
135267
|
+
* const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
135268
|
+
* //=> Thu Jul 10 2014 12:45:30.750
|
|
135269
|
+
*/
|
|
135270
|
+
|
|
135271
|
+
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
135272
|
+
requiredArgs(2, arguments);
|
|
135273
|
+
var timestamp = toDate(dirtyDate).getTime();
|
|
135274
|
+
var amount = toInteger(dirtyAmount);
|
|
135275
|
+
return new Date(timestamp + amount);
|
|
135276
|
+
}
|
|
135277
|
+
|
|
135248
135278
|
/**
|
|
135249
135279
|
* @name startOfWeek
|
|
135250
135280
|
* @category Week Helpers
|
|
@@ -135297,6 +135327,23 @@
|
|
|
135297
135327
|
return date;
|
|
135298
135328
|
}
|
|
135299
135329
|
|
|
135330
|
+
/**
|
|
135331
|
+
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
135332
|
+
* They usually appear for dates that denote time before the timezones were introduced
|
|
135333
|
+
* (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
|
|
135334
|
+
* and GMT+01:00:00 after that date)
|
|
135335
|
+
*
|
|
135336
|
+
* Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
|
|
135337
|
+
* which would lead to incorrect calculations.
|
|
135338
|
+
*
|
|
135339
|
+
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
135340
|
+
*/
|
|
135341
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
135342
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
135343
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
|
135344
|
+
return date.getTime() - utcDate.getTime();
|
|
135345
|
+
}
|
|
135346
|
+
|
|
135300
135347
|
/**
|
|
135301
135348
|
* @name startOfDay
|
|
135302
135349
|
* @category Day Helpers
|
|
@@ -135327,6 +135374,117 @@
|
|
|
135327
135374
|
return date;
|
|
135328
135375
|
}
|
|
135329
135376
|
|
|
135377
|
+
/**
|
|
135378
|
+
* @name isDate
|
|
135379
|
+
* @category Common Helpers
|
|
135380
|
+
* @summary Is the given value a date?
|
|
135381
|
+
*
|
|
135382
|
+
* @description
|
|
135383
|
+
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
|
|
135384
|
+
*
|
|
135385
|
+
* ### v2.0.0 breaking changes:
|
|
135386
|
+
*
|
|
135387
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
135388
|
+
*
|
|
135389
|
+
* @param {*} value - the value to check
|
|
135390
|
+
* @returns {boolean} true if the given value is a date
|
|
135391
|
+
* @throws {TypeError} 1 arguments required
|
|
135392
|
+
*
|
|
135393
|
+
* @example
|
|
135394
|
+
* // For a valid date:
|
|
135395
|
+
* const result = isDate(new Date())
|
|
135396
|
+
* //=> true
|
|
135397
|
+
*
|
|
135398
|
+
* @example
|
|
135399
|
+
* // For an invalid date:
|
|
135400
|
+
* const result = isDate(new Date(NaN))
|
|
135401
|
+
* //=> true
|
|
135402
|
+
*
|
|
135403
|
+
* @example
|
|
135404
|
+
* // For some value:
|
|
135405
|
+
* const result = isDate('2014-02-31')
|
|
135406
|
+
* //=> false
|
|
135407
|
+
*
|
|
135408
|
+
* @example
|
|
135409
|
+
* // For an object:
|
|
135410
|
+
* const result = isDate({})
|
|
135411
|
+
* //=> false
|
|
135412
|
+
*/
|
|
135413
|
+
|
|
135414
|
+
function isDate(value) {
|
|
135415
|
+
requiredArgs(1, arguments);
|
|
135416
|
+
return value instanceof Date || typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
135417
|
+
}
|
|
135418
|
+
|
|
135419
|
+
/**
|
|
135420
|
+
* @name isValid
|
|
135421
|
+
* @category Common Helpers
|
|
135422
|
+
* @summary Is the given date valid?
|
|
135423
|
+
*
|
|
135424
|
+
* @description
|
|
135425
|
+
* Returns false if argument is Invalid Date and true otherwise.
|
|
135426
|
+
* Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
|
|
135427
|
+
* Invalid Date is a Date, whose time value is NaN.
|
|
135428
|
+
*
|
|
135429
|
+
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
135430
|
+
*
|
|
135431
|
+
* ### v2.0.0 breaking changes:
|
|
135432
|
+
*
|
|
135433
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
135434
|
+
*
|
|
135435
|
+
* - Now `isValid` doesn't throw an exception
|
|
135436
|
+
* if the first argument is not an instance of Date.
|
|
135437
|
+
* Instead, argument is converted beforehand using `toDate`.
|
|
135438
|
+
*
|
|
135439
|
+
* Examples:
|
|
135440
|
+
*
|
|
135441
|
+
* | `isValid` argument | Before v2.0.0 | v2.0.0 onward |
|
|
135442
|
+
* |---------------------------|---------------|---------------|
|
|
135443
|
+
* | `new Date()` | `true` | `true` |
|
|
135444
|
+
* | `new Date('2016-01-01')` | `true` | `true` |
|
|
135445
|
+
* | `new Date('')` | `false` | `false` |
|
|
135446
|
+
* | `new Date(1488370835081)` | `true` | `true` |
|
|
135447
|
+
* | `new Date(NaN)` | `false` | `false` |
|
|
135448
|
+
* | `'2016-01-01'` | `TypeError` | `false` |
|
|
135449
|
+
* | `''` | `TypeError` | `false` |
|
|
135450
|
+
* | `1488370835081` | `TypeError` | `true` |
|
|
135451
|
+
* | `NaN` | `TypeError` | `false` |
|
|
135452
|
+
*
|
|
135453
|
+
* We introduce this change to make *date-fns* consistent with ECMAScript behavior
|
|
135454
|
+
* that try to coerce arguments to the expected type
|
|
135455
|
+
* (which is also the case with other *date-fns* functions).
|
|
135456
|
+
*
|
|
135457
|
+
* @param {*} date - the date to check
|
|
135458
|
+
* @returns {Boolean} the date is valid
|
|
135459
|
+
* @throws {TypeError} 1 argument required
|
|
135460
|
+
*
|
|
135461
|
+
* @example
|
|
135462
|
+
* // For the valid date:
|
|
135463
|
+
* const result = isValid(new Date(2014, 1, 31))
|
|
135464
|
+
* //=> true
|
|
135465
|
+
*
|
|
135466
|
+
* @example
|
|
135467
|
+
* // For the value, convertable into a date:
|
|
135468
|
+
* const result = isValid(1393804800000)
|
|
135469
|
+
* //=> true
|
|
135470
|
+
*
|
|
135471
|
+
* @example
|
|
135472
|
+
* // For the invalid date:
|
|
135473
|
+
* const result = isValid(new Date(''))
|
|
135474
|
+
* //=> false
|
|
135475
|
+
*/
|
|
135476
|
+
|
|
135477
|
+
function isValid(dirtyDate) {
|
|
135478
|
+
requiredArgs(1, arguments);
|
|
135479
|
+
|
|
135480
|
+
if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
135481
|
+
return false;
|
|
135482
|
+
}
|
|
135483
|
+
|
|
135484
|
+
var date = toDate(dirtyDate);
|
|
135485
|
+
return !isNaN(Number(date));
|
|
135486
|
+
}
|
|
135487
|
+
|
|
135330
135488
|
/**
|
|
135331
135489
|
* @name endOfDay
|
|
135332
135490
|
* @category Day Helpers
|
|
@@ -135471,6 +135629,2200 @@
|
|
|
135471
135629
|
return date;
|
|
135472
135630
|
}
|
|
135473
135631
|
|
|
135632
|
+
var formatDistanceLocale = {
|
|
135633
|
+
lessThanXSeconds: {
|
|
135634
|
+
one: 'less than a second',
|
|
135635
|
+
other: 'less than {{count}} seconds'
|
|
135636
|
+
},
|
|
135637
|
+
xSeconds: {
|
|
135638
|
+
one: '1 second',
|
|
135639
|
+
other: '{{count}} seconds'
|
|
135640
|
+
},
|
|
135641
|
+
halfAMinute: 'half a minute',
|
|
135642
|
+
lessThanXMinutes: {
|
|
135643
|
+
one: 'less than a minute',
|
|
135644
|
+
other: 'less than {{count}} minutes'
|
|
135645
|
+
},
|
|
135646
|
+
xMinutes: {
|
|
135647
|
+
one: '1 minute',
|
|
135648
|
+
other: '{{count}} minutes'
|
|
135649
|
+
},
|
|
135650
|
+
aboutXHours: {
|
|
135651
|
+
one: 'about 1 hour',
|
|
135652
|
+
other: 'about {{count}} hours'
|
|
135653
|
+
},
|
|
135654
|
+
xHours: {
|
|
135655
|
+
one: '1 hour',
|
|
135656
|
+
other: '{{count}} hours'
|
|
135657
|
+
},
|
|
135658
|
+
xDays: {
|
|
135659
|
+
one: '1 day',
|
|
135660
|
+
other: '{{count}} days'
|
|
135661
|
+
},
|
|
135662
|
+
aboutXWeeks: {
|
|
135663
|
+
one: 'about 1 week',
|
|
135664
|
+
other: 'about {{count}} weeks'
|
|
135665
|
+
},
|
|
135666
|
+
xWeeks: {
|
|
135667
|
+
one: '1 week',
|
|
135668
|
+
other: '{{count}} weeks'
|
|
135669
|
+
},
|
|
135670
|
+
aboutXMonths: {
|
|
135671
|
+
one: 'about 1 month',
|
|
135672
|
+
other: 'about {{count}} months'
|
|
135673
|
+
},
|
|
135674
|
+
xMonths: {
|
|
135675
|
+
one: '1 month',
|
|
135676
|
+
other: '{{count}} months'
|
|
135677
|
+
},
|
|
135678
|
+
aboutXYears: {
|
|
135679
|
+
one: 'about 1 year',
|
|
135680
|
+
other: 'about {{count}} years'
|
|
135681
|
+
},
|
|
135682
|
+
xYears: {
|
|
135683
|
+
one: '1 year',
|
|
135684
|
+
other: '{{count}} years'
|
|
135685
|
+
},
|
|
135686
|
+
overXYears: {
|
|
135687
|
+
one: 'over 1 year',
|
|
135688
|
+
other: 'over {{count}} years'
|
|
135689
|
+
},
|
|
135690
|
+
almostXYears: {
|
|
135691
|
+
one: 'almost 1 year',
|
|
135692
|
+
other: 'almost {{count}} years'
|
|
135693
|
+
}
|
|
135694
|
+
};
|
|
135695
|
+
|
|
135696
|
+
var formatDistance = function (token, count, options) {
|
|
135697
|
+
var result;
|
|
135698
|
+
var tokenValue = formatDistanceLocale[token];
|
|
135699
|
+
|
|
135700
|
+
if (typeof tokenValue === 'string') {
|
|
135701
|
+
result = tokenValue;
|
|
135702
|
+
} else if (count === 1) {
|
|
135703
|
+
result = tokenValue.one;
|
|
135704
|
+
} else {
|
|
135705
|
+
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
135706
|
+
}
|
|
135707
|
+
|
|
135708
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
135709
|
+
if (options.comparison && options.comparison > 0) {
|
|
135710
|
+
return 'in ' + result;
|
|
135711
|
+
} else {
|
|
135712
|
+
return result + ' ago';
|
|
135713
|
+
}
|
|
135714
|
+
}
|
|
135715
|
+
|
|
135716
|
+
return result;
|
|
135717
|
+
};
|
|
135718
|
+
|
|
135719
|
+
var formatDistance$1 = formatDistance;
|
|
135720
|
+
|
|
135721
|
+
function buildFormatLongFn(args) {
|
|
135722
|
+
return function () {
|
|
135723
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
135724
|
+
// TODO: Remove String()
|
|
135725
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
135726
|
+
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
135727
|
+
return format;
|
|
135728
|
+
};
|
|
135729
|
+
}
|
|
135730
|
+
|
|
135731
|
+
var dateFormats = {
|
|
135732
|
+
full: 'EEEE, MMMM do, y',
|
|
135733
|
+
long: 'MMMM do, y',
|
|
135734
|
+
medium: 'MMM d, y',
|
|
135735
|
+
short: 'MM/dd/yyyy'
|
|
135736
|
+
};
|
|
135737
|
+
var timeFormats = {
|
|
135738
|
+
full: 'h:mm:ss a zzzz',
|
|
135739
|
+
long: 'h:mm:ss a z',
|
|
135740
|
+
medium: 'h:mm:ss a',
|
|
135741
|
+
short: 'h:mm a'
|
|
135742
|
+
};
|
|
135743
|
+
var dateTimeFormats = {
|
|
135744
|
+
full: "{{date}} 'at' {{time}}",
|
|
135745
|
+
long: "{{date}} 'at' {{time}}",
|
|
135746
|
+
medium: '{{date}}, {{time}}',
|
|
135747
|
+
short: '{{date}}, {{time}}'
|
|
135748
|
+
};
|
|
135749
|
+
var formatLong = {
|
|
135750
|
+
date: buildFormatLongFn({
|
|
135751
|
+
formats: dateFormats,
|
|
135752
|
+
defaultWidth: 'full'
|
|
135753
|
+
}),
|
|
135754
|
+
time: buildFormatLongFn({
|
|
135755
|
+
formats: timeFormats,
|
|
135756
|
+
defaultWidth: 'full'
|
|
135757
|
+
}),
|
|
135758
|
+
dateTime: buildFormatLongFn({
|
|
135759
|
+
formats: dateTimeFormats,
|
|
135760
|
+
defaultWidth: 'full'
|
|
135761
|
+
})
|
|
135762
|
+
};
|
|
135763
|
+
var formatLong$1 = formatLong;
|
|
135764
|
+
|
|
135765
|
+
var formatRelativeLocale = {
|
|
135766
|
+
lastWeek: "'last' eeee 'at' p",
|
|
135767
|
+
yesterday: "'yesterday at' p",
|
|
135768
|
+
today: "'today at' p",
|
|
135769
|
+
tomorrow: "'tomorrow at' p",
|
|
135770
|
+
nextWeek: "eeee 'at' p",
|
|
135771
|
+
other: 'P'
|
|
135772
|
+
};
|
|
135773
|
+
|
|
135774
|
+
var formatRelative = function (token, _date, _baseDate, _options) {
|
|
135775
|
+
return formatRelativeLocale[token];
|
|
135776
|
+
};
|
|
135777
|
+
|
|
135778
|
+
var formatRelative$1 = formatRelative;
|
|
135779
|
+
|
|
135780
|
+
function buildLocalizeFn(args) {
|
|
135781
|
+
return function (dirtyIndex, dirtyOptions) {
|
|
135782
|
+
var options = dirtyOptions || {};
|
|
135783
|
+
var context = options.context ? String(options.context) : 'standalone';
|
|
135784
|
+
var valuesArray;
|
|
135785
|
+
|
|
135786
|
+
if (context === 'formatting' && args.formattingValues) {
|
|
135787
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
135788
|
+
var width = options.width ? String(options.width) : defaultWidth;
|
|
135789
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
135790
|
+
} else {
|
|
135791
|
+
var _defaultWidth = args.defaultWidth;
|
|
135792
|
+
|
|
135793
|
+
var _width = options.width ? String(options.width) : args.defaultWidth;
|
|
135794
|
+
|
|
135795
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
135796
|
+
}
|
|
135797
|
+
|
|
135798
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challange you to try to remove it!
|
|
135799
|
+
|
|
135800
|
+
return valuesArray[index];
|
|
135801
|
+
};
|
|
135802
|
+
}
|
|
135803
|
+
|
|
135804
|
+
var eraValues = {
|
|
135805
|
+
narrow: ['B', 'A'],
|
|
135806
|
+
abbreviated: ['BC', 'AD'],
|
|
135807
|
+
wide: ['Before Christ', 'Anno Domini']
|
|
135808
|
+
};
|
|
135809
|
+
var quarterValues = {
|
|
135810
|
+
narrow: ['1', '2', '3', '4'],
|
|
135811
|
+
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
135812
|
+
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
135813
|
+
}; // Note: in English, the names of days of the week and months are capitalized.
|
|
135814
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
135815
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
135816
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
135817
|
+
|
|
135818
|
+
var monthValues = {
|
|
135819
|
+
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
135820
|
+
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
135821
|
+
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
135822
|
+
};
|
|
135823
|
+
var dayValues = {
|
|
135824
|
+
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
135825
|
+
short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
135826
|
+
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
135827
|
+
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
135828
|
+
};
|
|
135829
|
+
var dayPeriodValues = {
|
|
135830
|
+
narrow: {
|
|
135831
|
+
am: 'a',
|
|
135832
|
+
pm: 'p',
|
|
135833
|
+
midnight: 'mi',
|
|
135834
|
+
noon: 'n',
|
|
135835
|
+
morning: 'morning',
|
|
135836
|
+
afternoon: 'afternoon',
|
|
135837
|
+
evening: 'evening',
|
|
135838
|
+
night: 'night'
|
|
135839
|
+
},
|
|
135840
|
+
abbreviated: {
|
|
135841
|
+
am: 'AM',
|
|
135842
|
+
pm: 'PM',
|
|
135843
|
+
midnight: 'midnight',
|
|
135844
|
+
noon: 'noon',
|
|
135845
|
+
morning: 'morning',
|
|
135846
|
+
afternoon: 'afternoon',
|
|
135847
|
+
evening: 'evening',
|
|
135848
|
+
night: 'night'
|
|
135849
|
+
},
|
|
135850
|
+
wide: {
|
|
135851
|
+
am: 'a.m.',
|
|
135852
|
+
pm: 'p.m.',
|
|
135853
|
+
midnight: 'midnight',
|
|
135854
|
+
noon: 'noon',
|
|
135855
|
+
morning: 'morning',
|
|
135856
|
+
afternoon: 'afternoon',
|
|
135857
|
+
evening: 'evening',
|
|
135858
|
+
night: 'night'
|
|
135859
|
+
}
|
|
135860
|
+
};
|
|
135861
|
+
var formattingDayPeriodValues = {
|
|
135862
|
+
narrow: {
|
|
135863
|
+
am: 'a',
|
|
135864
|
+
pm: 'p',
|
|
135865
|
+
midnight: 'mi',
|
|
135866
|
+
noon: 'n',
|
|
135867
|
+
morning: 'in the morning',
|
|
135868
|
+
afternoon: 'in the afternoon',
|
|
135869
|
+
evening: 'in the evening',
|
|
135870
|
+
night: 'at night'
|
|
135871
|
+
},
|
|
135872
|
+
abbreviated: {
|
|
135873
|
+
am: 'AM',
|
|
135874
|
+
pm: 'PM',
|
|
135875
|
+
midnight: 'midnight',
|
|
135876
|
+
noon: 'noon',
|
|
135877
|
+
morning: 'in the morning',
|
|
135878
|
+
afternoon: 'in the afternoon',
|
|
135879
|
+
evening: 'in the evening',
|
|
135880
|
+
night: 'at night'
|
|
135881
|
+
},
|
|
135882
|
+
wide: {
|
|
135883
|
+
am: 'a.m.',
|
|
135884
|
+
pm: 'p.m.',
|
|
135885
|
+
midnight: 'midnight',
|
|
135886
|
+
noon: 'noon',
|
|
135887
|
+
morning: 'in the morning',
|
|
135888
|
+
afternoon: 'in the afternoon',
|
|
135889
|
+
evening: 'in the evening',
|
|
135890
|
+
night: 'at night'
|
|
135891
|
+
}
|
|
135892
|
+
};
|
|
135893
|
+
|
|
135894
|
+
var ordinalNumber = function (dirtyNumber, _options) {
|
|
135895
|
+
var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
|
|
135896
|
+
// if they are different for different grammatical genders,
|
|
135897
|
+
// use `options.unit`.
|
|
135898
|
+
//
|
|
135899
|
+
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
135900
|
+
// 'day', 'hour', 'minute', 'second'.
|
|
135901
|
+
|
|
135902
|
+
var rem100 = number % 100;
|
|
135903
|
+
|
|
135904
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
135905
|
+
switch (rem100 % 10) {
|
|
135906
|
+
case 1:
|
|
135907
|
+
return number + 'st';
|
|
135908
|
+
|
|
135909
|
+
case 2:
|
|
135910
|
+
return number + 'nd';
|
|
135911
|
+
|
|
135912
|
+
case 3:
|
|
135913
|
+
return number + 'rd';
|
|
135914
|
+
}
|
|
135915
|
+
}
|
|
135916
|
+
|
|
135917
|
+
return number + 'th';
|
|
135918
|
+
};
|
|
135919
|
+
|
|
135920
|
+
var localize = {
|
|
135921
|
+
ordinalNumber: ordinalNumber,
|
|
135922
|
+
era: buildLocalizeFn({
|
|
135923
|
+
values: eraValues,
|
|
135924
|
+
defaultWidth: 'wide'
|
|
135925
|
+
}),
|
|
135926
|
+
quarter: buildLocalizeFn({
|
|
135927
|
+
values: quarterValues,
|
|
135928
|
+
defaultWidth: 'wide',
|
|
135929
|
+
argumentCallback: function (quarter) {
|
|
135930
|
+
return quarter - 1;
|
|
135931
|
+
}
|
|
135932
|
+
}),
|
|
135933
|
+
month: buildLocalizeFn({
|
|
135934
|
+
values: monthValues,
|
|
135935
|
+
defaultWidth: 'wide'
|
|
135936
|
+
}),
|
|
135937
|
+
day: buildLocalizeFn({
|
|
135938
|
+
values: dayValues,
|
|
135939
|
+
defaultWidth: 'wide'
|
|
135940
|
+
}),
|
|
135941
|
+
dayPeriod: buildLocalizeFn({
|
|
135942
|
+
values: dayPeriodValues,
|
|
135943
|
+
defaultWidth: 'wide',
|
|
135944
|
+
formattingValues: formattingDayPeriodValues,
|
|
135945
|
+
defaultFormattingWidth: 'wide'
|
|
135946
|
+
})
|
|
135947
|
+
};
|
|
135948
|
+
var localize$1 = localize;
|
|
135949
|
+
|
|
135950
|
+
function buildMatchFn(args) {
|
|
135951
|
+
return function (string) {
|
|
135952
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
135953
|
+
var width = options.width;
|
|
135954
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
135955
|
+
var matchResult = string.match(matchPattern);
|
|
135956
|
+
|
|
135957
|
+
if (!matchResult) {
|
|
135958
|
+
return null;
|
|
135959
|
+
}
|
|
135960
|
+
|
|
135961
|
+
var matchedString = matchResult[0];
|
|
135962
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
135963
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
135964
|
+
return pattern.test(matchedString);
|
|
135965
|
+
}) : findKey(parsePatterns, function (pattern) {
|
|
135966
|
+
return pattern.test(matchedString);
|
|
135967
|
+
});
|
|
135968
|
+
var value;
|
|
135969
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
135970
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
135971
|
+
var rest = string.slice(matchedString.length);
|
|
135972
|
+
return {
|
|
135973
|
+
value: value,
|
|
135974
|
+
rest: rest
|
|
135975
|
+
};
|
|
135976
|
+
};
|
|
135977
|
+
}
|
|
135978
|
+
|
|
135979
|
+
function findKey(object, predicate) {
|
|
135980
|
+
for (var key in object) {
|
|
135981
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
135982
|
+
return key;
|
|
135983
|
+
}
|
|
135984
|
+
}
|
|
135985
|
+
|
|
135986
|
+
return undefined;
|
|
135987
|
+
}
|
|
135988
|
+
|
|
135989
|
+
function findIndex(array, predicate) {
|
|
135990
|
+
for (var key = 0; key < array.length; key++) {
|
|
135991
|
+
if (predicate(array[key])) {
|
|
135992
|
+
return key;
|
|
135993
|
+
}
|
|
135994
|
+
}
|
|
135995
|
+
|
|
135996
|
+
return undefined;
|
|
135997
|
+
}
|
|
135998
|
+
|
|
135999
|
+
function buildMatchPatternFn(args) {
|
|
136000
|
+
return function (string) {
|
|
136001
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
136002
|
+
var matchResult = string.match(args.matchPattern);
|
|
136003
|
+
if (!matchResult) return null;
|
|
136004
|
+
var matchedString = matchResult[0];
|
|
136005
|
+
var parseResult = string.match(args.parsePattern);
|
|
136006
|
+
if (!parseResult) return null;
|
|
136007
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
136008
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
136009
|
+
var rest = string.slice(matchedString.length);
|
|
136010
|
+
return {
|
|
136011
|
+
value: value,
|
|
136012
|
+
rest: rest
|
|
136013
|
+
};
|
|
136014
|
+
};
|
|
136015
|
+
}
|
|
136016
|
+
|
|
136017
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
136018
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
136019
|
+
var matchEraPatterns = {
|
|
136020
|
+
narrow: /^(b|a)/i,
|
|
136021
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
136022
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
136023
|
+
};
|
|
136024
|
+
var parseEraPatterns = {
|
|
136025
|
+
any: [/^b/i, /^(a|c)/i]
|
|
136026
|
+
};
|
|
136027
|
+
var matchQuarterPatterns = {
|
|
136028
|
+
narrow: /^[1234]/i,
|
|
136029
|
+
abbreviated: /^q[1234]/i,
|
|
136030
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
136031
|
+
};
|
|
136032
|
+
var parseQuarterPatterns = {
|
|
136033
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
136034
|
+
};
|
|
136035
|
+
var matchMonthPatterns = {
|
|
136036
|
+
narrow: /^[jfmasond]/i,
|
|
136037
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
136038
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
136039
|
+
};
|
|
136040
|
+
var parseMonthPatterns = {
|
|
136041
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
136042
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
136043
|
+
};
|
|
136044
|
+
var matchDayPatterns = {
|
|
136045
|
+
narrow: /^[smtwf]/i,
|
|
136046
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
136047
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
136048
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
136049
|
+
};
|
|
136050
|
+
var parseDayPatterns = {
|
|
136051
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
136052
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
136053
|
+
};
|
|
136054
|
+
var matchDayPeriodPatterns = {
|
|
136055
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
136056
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
136057
|
+
};
|
|
136058
|
+
var parseDayPeriodPatterns = {
|
|
136059
|
+
any: {
|
|
136060
|
+
am: /^a/i,
|
|
136061
|
+
pm: /^p/i,
|
|
136062
|
+
midnight: /^mi/i,
|
|
136063
|
+
noon: /^no/i,
|
|
136064
|
+
morning: /morning/i,
|
|
136065
|
+
afternoon: /afternoon/i,
|
|
136066
|
+
evening: /evening/i,
|
|
136067
|
+
night: /night/i
|
|
136068
|
+
}
|
|
136069
|
+
};
|
|
136070
|
+
var match = {
|
|
136071
|
+
ordinalNumber: buildMatchPatternFn({
|
|
136072
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
136073
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
136074
|
+
valueCallback: function (value) {
|
|
136075
|
+
return parseInt(value, 10);
|
|
136076
|
+
}
|
|
136077
|
+
}),
|
|
136078
|
+
era: buildMatchFn({
|
|
136079
|
+
matchPatterns: matchEraPatterns,
|
|
136080
|
+
defaultMatchWidth: 'wide',
|
|
136081
|
+
parsePatterns: parseEraPatterns,
|
|
136082
|
+
defaultParseWidth: 'any'
|
|
136083
|
+
}),
|
|
136084
|
+
quarter: buildMatchFn({
|
|
136085
|
+
matchPatterns: matchQuarterPatterns,
|
|
136086
|
+
defaultMatchWidth: 'wide',
|
|
136087
|
+
parsePatterns: parseQuarterPatterns,
|
|
136088
|
+
defaultParseWidth: 'any',
|
|
136089
|
+
valueCallback: function (index) {
|
|
136090
|
+
return index + 1;
|
|
136091
|
+
}
|
|
136092
|
+
}),
|
|
136093
|
+
month: buildMatchFn({
|
|
136094
|
+
matchPatterns: matchMonthPatterns,
|
|
136095
|
+
defaultMatchWidth: 'wide',
|
|
136096
|
+
parsePatterns: parseMonthPatterns,
|
|
136097
|
+
defaultParseWidth: 'any'
|
|
136098
|
+
}),
|
|
136099
|
+
day: buildMatchFn({
|
|
136100
|
+
matchPatterns: matchDayPatterns,
|
|
136101
|
+
defaultMatchWidth: 'wide',
|
|
136102
|
+
parsePatterns: parseDayPatterns,
|
|
136103
|
+
defaultParseWidth: 'any'
|
|
136104
|
+
}),
|
|
136105
|
+
dayPeriod: buildMatchFn({
|
|
136106
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
136107
|
+
defaultMatchWidth: 'any',
|
|
136108
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
136109
|
+
defaultParseWidth: 'any'
|
|
136110
|
+
})
|
|
136111
|
+
};
|
|
136112
|
+
var match$1 = match;
|
|
136113
|
+
|
|
136114
|
+
/**
|
|
136115
|
+
* @type {Locale}
|
|
136116
|
+
* @category Locales
|
|
136117
|
+
* @summary English locale (United States).
|
|
136118
|
+
* @language English
|
|
136119
|
+
* @iso-639-2 eng
|
|
136120
|
+
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
136121
|
+
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
136122
|
+
*/
|
|
136123
|
+
var locale = {
|
|
136124
|
+
code: 'en-US',
|
|
136125
|
+
formatDistance: formatDistance$1,
|
|
136126
|
+
formatLong: formatLong$1,
|
|
136127
|
+
formatRelative: formatRelative$1,
|
|
136128
|
+
localize: localize$1,
|
|
136129
|
+
match: match$1,
|
|
136130
|
+
options: {
|
|
136131
|
+
weekStartsOn: 0
|
|
136132
|
+
/* Sunday */
|
|
136133
|
+
,
|
|
136134
|
+
firstWeekContainsDate: 1
|
|
136135
|
+
}
|
|
136136
|
+
};
|
|
136137
|
+
var defaultLocale = locale;
|
|
136138
|
+
|
|
136139
|
+
/**
|
|
136140
|
+
* @name subMilliseconds
|
|
136141
|
+
* @category Millisecond Helpers
|
|
136142
|
+
* @summary Subtract the specified number of milliseconds from the given date.
|
|
136143
|
+
*
|
|
136144
|
+
* @description
|
|
136145
|
+
* Subtract the specified number of milliseconds from the given date.
|
|
136146
|
+
*
|
|
136147
|
+
* ### v2.0.0 breaking changes:
|
|
136148
|
+
*
|
|
136149
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
136150
|
+
*
|
|
136151
|
+
* @param {Date|Number} date - the date to be changed
|
|
136152
|
+
* @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
136153
|
+
* @returns {Date} the new date with the milliseconds subtracted
|
|
136154
|
+
* @throws {TypeError} 2 arguments required
|
|
136155
|
+
*
|
|
136156
|
+
* @example
|
|
136157
|
+
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
|
136158
|
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
136159
|
+
* //=> Thu Jul 10 2014 12:45:29.250
|
|
136160
|
+
*/
|
|
136161
|
+
|
|
136162
|
+
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
136163
|
+
requiredArgs(2, arguments);
|
|
136164
|
+
var amount = toInteger(dirtyAmount);
|
|
136165
|
+
return addMilliseconds(dirtyDate, -amount);
|
|
136166
|
+
}
|
|
136167
|
+
|
|
136168
|
+
function addLeadingZeros(number, targetLength) {
|
|
136169
|
+
var sign = number < 0 ? '-' : '';
|
|
136170
|
+
var output = Math.abs(number).toString();
|
|
136171
|
+
|
|
136172
|
+
while (output.length < targetLength) {
|
|
136173
|
+
output = '0' + output;
|
|
136174
|
+
}
|
|
136175
|
+
|
|
136176
|
+
return sign + output;
|
|
136177
|
+
}
|
|
136178
|
+
|
|
136179
|
+
/*
|
|
136180
|
+
* | | Unit | | Unit |
|
|
136181
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
136182
|
+
* | a | AM, PM | A* | |
|
|
136183
|
+
* | d | Day of month | D | |
|
|
136184
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
136185
|
+
* | m | Minute | M | Month |
|
|
136186
|
+
* | s | Second | S | Fraction of second |
|
|
136187
|
+
* | y | Year (abs) | Y | |
|
|
136188
|
+
*
|
|
136189
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
136190
|
+
*/
|
|
136191
|
+
|
|
136192
|
+
var formatters$2 = {
|
|
136193
|
+
// Year
|
|
136194
|
+
y: function (date, token) {
|
|
136195
|
+
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
136196
|
+
// | Year | y | yy | yyy | yyyy | yyyyy |
|
|
136197
|
+
// |----------|-------|----|-------|-------|-------|
|
|
136198
|
+
// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
|
|
136199
|
+
// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
|
|
136200
|
+
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
|
|
136201
|
+
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
136202
|
+
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
136203
|
+
var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
136204
|
+
|
|
136205
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
136206
|
+
return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
|
|
136207
|
+
},
|
|
136208
|
+
// Month
|
|
136209
|
+
M: function (date, token) {
|
|
136210
|
+
var month = date.getUTCMonth();
|
|
136211
|
+
return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
136212
|
+
},
|
|
136213
|
+
// Day of the month
|
|
136214
|
+
d: function (date, token) {
|
|
136215
|
+
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
136216
|
+
},
|
|
136217
|
+
// AM or PM
|
|
136218
|
+
a: function (date, token) {
|
|
136219
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
|
|
136220
|
+
|
|
136221
|
+
switch (token) {
|
|
136222
|
+
case 'a':
|
|
136223
|
+
case 'aa':
|
|
136224
|
+
return dayPeriodEnumValue.toUpperCase();
|
|
136225
|
+
|
|
136226
|
+
case 'aaa':
|
|
136227
|
+
return dayPeriodEnumValue;
|
|
136228
|
+
|
|
136229
|
+
case 'aaaaa':
|
|
136230
|
+
return dayPeriodEnumValue[0];
|
|
136231
|
+
|
|
136232
|
+
case 'aaaa':
|
|
136233
|
+
default:
|
|
136234
|
+
return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
|
|
136235
|
+
}
|
|
136236
|
+
},
|
|
136237
|
+
// Hour [1-12]
|
|
136238
|
+
h: function (date, token) {
|
|
136239
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
136240
|
+
},
|
|
136241
|
+
// Hour [0-23]
|
|
136242
|
+
H: function (date, token) {
|
|
136243
|
+
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
136244
|
+
},
|
|
136245
|
+
// Minute
|
|
136246
|
+
m: function (date, token) {
|
|
136247
|
+
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
136248
|
+
},
|
|
136249
|
+
// Second
|
|
136250
|
+
s: function (date, token) {
|
|
136251
|
+
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
136252
|
+
},
|
|
136253
|
+
// Fraction of second
|
|
136254
|
+
S: function (date, token) {
|
|
136255
|
+
var numberOfDigits = token.length;
|
|
136256
|
+
var milliseconds = date.getUTCMilliseconds();
|
|
136257
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
136258
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
|
136259
|
+
}
|
|
136260
|
+
};
|
|
136261
|
+
var formatters$3 = formatters$2;
|
|
136262
|
+
|
|
136263
|
+
var MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented.
|
|
136264
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136265
|
+
|
|
136266
|
+
function getUTCDayOfYear(dirtyDate) {
|
|
136267
|
+
requiredArgs(1, arguments);
|
|
136268
|
+
var date = toDate(dirtyDate);
|
|
136269
|
+
var timestamp = date.getTime();
|
|
136270
|
+
date.setUTCMonth(0, 1);
|
|
136271
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
136272
|
+
var startOfYearTimestamp = date.getTime();
|
|
136273
|
+
var difference = timestamp - startOfYearTimestamp;
|
|
136274
|
+
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
136275
|
+
}
|
|
136276
|
+
|
|
136277
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136278
|
+
|
|
136279
|
+
function startOfUTCISOWeek(dirtyDate) {
|
|
136280
|
+
requiredArgs(1, arguments);
|
|
136281
|
+
var weekStartsOn = 1;
|
|
136282
|
+
var date = toDate(dirtyDate);
|
|
136283
|
+
var day = date.getUTCDay();
|
|
136284
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
136285
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
136286
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
136287
|
+
return date;
|
|
136288
|
+
}
|
|
136289
|
+
|
|
136290
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136291
|
+
|
|
136292
|
+
function getUTCISOWeekYear(dirtyDate) {
|
|
136293
|
+
requiredArgs(1, arguments);
|
|
136294
|
+
var date = toDate(dirtyDate);
|
|
136295
|
+
var year = date.getUTCFullYear();
|
|
136296
|
+
var fourthOfJanuaryOfNextYear = new Date(0);
|
|
136297
|
+
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
136298
|
+
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
136299
|
+
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
136300
|
+
var fourthOfJanuaryOfThisYear = new Date(0);
|
|
136301
|
+
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
136302
|
+
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
136303
|
+
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
136304
|
+
|
|
136305
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
136306
|
+
return year + 1;
|
|
136307
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
136308
|
+
return year;
|
|
136309
|
+
} else {
|
|
136310
|
+
return year - 1;
|
|
136311
|
+
}
|
|
136312
|
+
}
|
|
136313
|
+
|
|
136314
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136315
|
+
|
|
136316
|
+
function startOfUTCISOWeekYear(dirtyDate) {
|
|
136317
|
+
requiredArgs(1, arguments);
|
|
136318
|
+
var year = getUTCISOWeekYear(dirtyDate);
|
|
136319
|
+
var fourthOfJanuary = new Date(0);
|
|
136320
|
+
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
136321
|
+
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
136322
|
+
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
136323
|
+
return date;
|
|
136324
|
+
}
|
|
136325
|
+
|
|
136326
|
+
var MILLISECONDS_IN_WEEK$1 = 604800000; // This function will be a part of public API when UTC function will be implemented.
|
|
136327
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136328
|
+
|
|
136329
|
+
function getUTCISOWeek(dirtyDate) {
|
|
136330
|
+
requiredArgs(1, arguments);
|
|
136331
|
+
var date = toDate(dirtyDate);
|
|
136332
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer
|
|
136333
|
+
// because the number of milliseconds in a week is not constant
|
|
136334
|
+
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
136335
|
+
|
|
136336
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
136337
|
+
}
|
|
136338
|
+
|
|
136339
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136340
|
+
|
|
136341
|
+
function startOfUTCWeek(dirtyDate, dirtyOptions) {
|
|
136342
|
+
requiredArgs(1, arguments);
|
|
136343
|
+
var options = dirtyOptions || {};
|
|
136344
|
+
var locale = options.locale;
|
|
136345
|
+
var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;
|
|
136346
|
+
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
|
136347
|
+
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
136348
|
+
|
|
136349
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
136350
|
+
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
136351
|
+
}
|
|
136352
|
+
|
|
136353
|
+
var date = toDate(dirtyDate);
|
|
136354
|
+
var day = date.getUTCDay();
|
|
136355
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
136356
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
136357
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
136358
|
+
return date;
|
|
136359
|
+
}
|
|
136360
|
+
|
|
136361
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136362
|
+
|
|
136363
|
+
function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
136364
|
+
requiredArgs(1, arguments);
|
|
136365
|
+
var date = toDate(dirtyDate, dirtyOptions);
|
|
136366
|
+
var year = date.getUTCFullYear();
|
|
136367
|
+
var options = dirtyOptions || {};
|
|
136368
|
+
var locale = options.locale;
|
|
136369
|
+
var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;
|
|
136370
|
+
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
136371
|
+
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
136372
|
+
|
|
136373
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
136374
|
+
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
136375
|
+
}
|
|
136376
|
+
|
|
136377
|
+
var firstWeekOfNextYear = new Date(0);
|
|
136378
|
+
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
136379
|
+
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
136380
|
+
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);
|
|
136381
|
+
var firstWeekOfThisYear = new Date(0);
|
|
136382
|
+
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
136383
|
+
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
136384
|
+
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions);
|
|
136385
|
+
|
|
136386
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
136387
|
+
return year + 1;
|
|
136388
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
136389
|
+
return year;
|
|
136390
|
+
} else {
|
|
136391
|
+
return year - 1;
|
|
136392
|
+
}
|
|
136393
|
+
}
|
|
136394
|
+
|
|
136395
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136396
|
+
|
|
136397
|
+
function startOfUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
136398
|
+
requiredArgs(1, arguments);
|
|
136399
|
+
var options = dirtyOptions || {};
|
|
136400
|
+
var locale = options.locale;
|
|
136401
|
+
var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;
|
|
136402
|
+
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
136403
|
+
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
|
|
136404
|
+
var year = getUTCWeekYear(dirtyDate, dirtyOptions);
|
|
136405
|
+
var firstWeek = new Date(0);
|
|
136406
|
+
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
136407
|
+
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
136408
|
+
var date = startOfUTCWeek(firstWeek, dirtyOptions);
|
|
136409
|
+
return date;
|
|
136410
|
+
}
|
|
136411
|
+
|
|
136412
|
+
var MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.
|
|
136413
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136414
|
+
|
|
136415
|
+
function getUTCWeek(dirtyDate, options) {
|
|
136416
|
+
requiredArgs(1, arguments);
|
|
136417
|
+
var date = toDate(dirtyDate);
|
|
136418
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer
|
|
136419
|
+
// because the number of milliseconds in a week is not constant
|
|
136420
|
+
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
136421
|
+
|
|
136422
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
136423
|
+
}
|
|
136424
|
+
|
|
136425
|
+
var dayPeriodEnum = {
|
|
136426
|
+
am: 'am',
|
|
136427
|
+
pm: 'pm',
|
|
136428
|
+
midnight: 'midnight',
|
|
136429
|
+
noon: 'noon',
|
|
136430
|
+
morning: 'morning',
|
|
136431
|
+
afternoon: 'afternoon',
|
|
136432
|
+
evening: 'evening',
|
|
136433
|
+
night: 'night'
|
|
136434
|
+
};
|
|
136435
|
+
/*
|
|
136436
|
+
* | | Unit | | Unit |
|
|
136437
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
136438
|
+
* | a | AM, PM | A* | Milliseconds in day |
|
|
136439
|
+
* | b | AM, PM, noon, midnight | B | Flexible day period |
|
|
136440
|
+
* | c | Stand-alone local day of week | C* | Localized hour w/ day period |
|
|
136441
|
+
* | d | Day of month | D | Day of year |
|
|
136442
|
+
* | e | Local day of week | E | Day of week |
|
|
136443
|
+
* | f | | F* | Day of week in month |
|
|
136444
|
+
* | g* | Modified Julian day | G | Era |
|
|
136445
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
136446
|
+
* | i! | ISO day of week | I! | ISO week of year |
|
|
136447
|
+
* | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
|
|
136448
|
+
* | k | Hour [1-24] | K | Hour [0-11] |
|
|
136449
|
+
* | l* | (deprecated) | L | Stand-alone month |
|
|
136450
|
+
* | m | Minute | M | Month |
|
|
136451
|
+
* | n | | N | |
|
|
136452
|
+
* | o! | Ordinal number modifier | O | Timezone (GMT) |
|
|
136453
|
+
* | p! | Long localized time | P! | Long localized date |
|
|
136454
|
+
* | q | Stand-alone quarter | Q | Quarter |
|
|
136455
|
+
* | r* | Related Gregorian year | R! | ISO week-numbering year |
|
|
136456
|
+
* | s | Second | S | Fraction of second |
|
|
136457
|
+
* | t! | Seconds timestamp | T! | Milliseconds timestamp |
|
|
136458
|
+
* | u | Extended year | U* | Cyclic year |
|
|
136459
|
+
* | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
|
|
136460
|
+
* | w | Local week of year | W* | Week of month |
|
|
136461
|
+
* | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
|
|
136462
|
+
* | y | Year (abs) | Y | Local week-numbering year |
|
|
136463
|
+
* | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
|
|
136464
|
+
*
|
|
136465
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
136466
|
+
*
|
|
136467
|
+
* Letters marked by ! are non-standard, but implemented by date-fns:
|
|
136468
|
+
* - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
|
|
136469
|
+
* - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
|
|
136470
|
+
* i.e. 7 for Sunday, 1 for Monday, etc.
|
|
136471
|
+
* - `I` is ISO week of year, as opposed to `w` which is local week of year.
|
|
136472
|
+
* - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
|
|
136473
|
+
* `R` is supposed to be used in conjunction with `I` and `i`
|
|
136474
|
+
* for universal ISO week-numbering date, whereas
|
|
136475
|
+
* `Y` is supposed to be used in conjunction with `w` and `e`
|
|
136476
|
+
* for week-numbering date specific to the locale.
|
|
136477
|
+
* - `P` is long localized date format
|
|
136478
|
+
* - `p` is long localized time format
|
|
136479
|
+
*/
|
|
136480
|
+
|
|
136481
|
+
var formatters = {
|
|
136482
|
+
// Era
|
|
136483
|
+
G: function (date, token, localize) {
|
|
136484
|
+
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
136485
|
+
|
|
136486
|
+
switch (token) {
|
|
136487
|
+
// AD, BC
|
|
136488
|
+
case 'G':
|
|
136489
|
+
case 'GG':
|
|
136490
|
+
case 'GGG':
|
|
136491
|
+
return localize.era(era, {
|
|
136492
|
+
width: 'abbreviated'
|
|
136493
|
+
});
|
|
136494
|
+
// A, B
|
|
136495
|
+
|
|
136496
|
+
case 'GGGGG':
|
|
136497
|
+
return localize.era(era, {
|
|
136498
|
+
width: 'narrow'
|
|
136499
|
+
});
|
|
136500
|
+
// Anno Domini, Before Christ
|
|
136501
|
+
|
|
136502
|
+
case 'GGGG':
|
|
136503
|
+
default:
|
|
136504
|
+
return localize.era(era, {
|
|
136505
|
+
width: 'wide'
|
|
136506
|
+
});
|
|
136507
|
+
}
|
|
136508
|
+
},
|
|
136509
|
+
// Year
|
|
136510
|
+
y: function (date, token, localize) {
|
|
136511
|
+
// Ordinal number
|
|
136512
|
+
if (token === 'yo') {
|
|
136513
|
+
var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
136514
|
+
|
|
136515
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
136516
|
+
return localize.ordinalNumber(year, {
|
|
136517
|
+
unit: 'year'
|
|
136518
|
+
});
|
|
136519
|
+
}
|
|
136520
|
+
|
|
136521
|
+
return formatters$3.y(date, token);
|
|
136522
|
+
},
|
|
136523
|
+
// Local week-numbering year
|
|
136524
|
+
Y: function (date, token, localize, options) {
|
|
136525
|
+
var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
136526
|
+
|
|
136527
|
+
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year
|
|
136528
|
+
|
|
136529
|
+
if (token === 'YY') {
|
|
136530
|
+
var twoDigitYear = weekYear % 100;
|
|
136531
|
+
return addLeadingZeros(twoDigitYear, 2);
|
|
136532
|
+
} // Ordinal number
|
|
136533
|
+
|
|
136534
|
+
|
|
136535
|
+
if (token === 'Yo') {
|
|
136536
|
+
return localize.ordinalNumber(weekYear, {
|
|
136537
|
+
unit: 'year'
|
|
136538
|
+
});
|
|
136539
|
+
} // Padding
|
|
136540
|
+
|
|
136541
|
+
|
|
136542
|
+
return addLeadingZeros(weekYear, token.length);
|
|
136543
|
+
},
|
|
136544
|
+
// ISO week-numbering year
|
|
136545
|
+
R: function (date, token) {
|
|
136546
|
+
var isoWeekYear = getUTCISOWeekYear(date); // Padding
|
|
136547
|
+
|
|
136548
|
+
return addLeadingZeros(isoWeekYear, token.length);
|
|
136549
|
+
},
|
|
136550
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
136551
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
136552
|
+
// | Year | `y` | `u` |
|
|
136553
|
+
// |------|-----|-----|
|
|
136554
|
+
// | AC 1 | 1 | 1 |
|
|
136555
|
+
// | BC 1 | 1 | 0 |
|
|
136556
|
+
// | BC 2 | 2 | -1 |
|
|
136557
|
+
// Also `yy` always returns the last two digits of a year,
|
|
136558
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
136559
|
+
u: function (date, token) {
|
|
136560
|
+
var year = date.getUTCFullYear();
|
|
136561
|
+
return addLeadingZeros(year, token.length);
|
|
136562
|
+
},
|
|
136563
|
+
// Quarter
|
|
136564
|
+
Q: function (date, token, localize) {
|
|
136565
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
136566
|
+
|
|
136567
|
+
switch (token) {
|
|
136568
|
+
// 1, 2, 3, 4
|
|
136569
|
+
case 'Q':
|
|
136570
|
+
return String(quarter);
|
|
136571
|
+
// 01, 02, 03, 04
|
|
136572
|
+
|
|
136573
|
+
case 'QQ':
|
|
136574
|
+
return addLeadingZeros(quarter, 2);
|
|
136575
|
+
// 1st, 2nd, 3rd, 4th
|
|
136576
|
+
|
|
136577
|
+
case 'Qo':
|
|
136578
|
+
return localize.ordinalNumber(quarter, {
|
|
136579
|
+
unit: 'quarter'
|
|
136580
|
+
});
|
|
136581
|
+
// Q1, Q2, Q3, Q4
|
|
136582
|
+
|
|
136583
|
+
case 'QQQ':
|
|
136584
|
+
return localize.quarter(quarter, {
|
|
136585
|
+
width: 'abbreviated',
|
|
136586
|
+
context: 'formatting'
|
|
136587
|
+
});
|
|
136588
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
136589
|
+
|
|
136590
|
+
case 'QQQQQ':
|
|
136591
|
+
return localize.quarter(quarter, {
|
|
136592
|
+
width: 'narrow',
|
|
136593
|
+
context: 'formatting'
|
|
136594
|
+
});
|
|
136595
|
+
// 1st quarter, 2nd quarter, ...
|
|
136596
|
+
|
|
136597
|
+
case 'QQQQ':
|
|
136598
|
+
default:
|
|
136599
|
+
return localize.quarter(quarter, {
|
|
136600
|
+
width: 'wide',
|
|
136601
|
+
context: 'formatting'
|
|
136602
|
+
});
|
|
136603
|
+
}
|
|
136604
|
+
},
|
|
136605
|
+
// Stand-alone quarter
|
|
136606
|
+
q: function (date, token, localize) {
|
|
136607
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
136608
|
+
|
|
136609
|
+
switch (token) {
|
|
136610
|
+
// 1, 2, 3, 4
|
|
136611
|
+
case 'q':
|
|
136612
|
+
return String(quarter);
|
|
136613
|
+
// 01, 02, 03, 04
|
|
136614
|
+
|
|
136615
|
+
case 'qq':
|
|
136616
|
+
return addLeadingZeros(quarter, 2);
|
|
136617
|
+
// 1st, 2nd, 3rd, 4th
|
|
136618
|
+
|
|
136619
|
+
case 'qo':
|
|
136620
|
+
return localize.ordinalNumber(quarter, {
|
|
136621
|
+
unit: 'quarter'
|
|
136622
|
+
});
|
|
136623
|
+
// Q1, Q2, Q3, Q4
|
|
136624
|
+
|
|
136625
|
+
case 'qqq':
|
|
136626
|
+
return localize.quarter(quarter, {
|
|
136627
|
+
width: 'abbreviated',
|
|
136628
|
+
context: 'standalone'
|
|
136629
|
+
});
|
|
136630
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
136631
|
+
|
|
136632
|
+
case 'qqqqq':
|
|
136633
|
+
return localize.quarter(quarter, {
|
|
136634
|
+
width: 'narrow',
|
|
136635
|
+
context: 'standalone'
|
|
136636
|
+
});
|
|
136637
|
+
// 1st quarter, 2nd quarter, ...
|
|
136638
|
+
|
|
136639
|
+
case 'qqqq':
|
|
136640
|
+
default:
|
|
136641
|
+
return localize.quarter(quarter, {
|
|
136642
|
+
width: 'wide',
|
|
136643
|
+
context: 'standalone'
|
|
136644
|
+
});
|
|
136645
|
+
}
|
|
136646
|
+
},
|
|
136647
|
+
// Month
|
|
136648
|
+
M: function (date, token, localize) {
|
|
136649
|
+
var month = date.getUTCMonth();
|
|
136650
|
+
|
|
136651
|
+
switch (token) {
|
|
136652
|
+
case 'M':
|
|
136653
|
+
case 'MM':
|
|
136654
|
+
return formatters$3.M(date, token);
|
|
136655
|
+
// 1st, 2nd, ..., 12th
|
|
136656
|
+
|
|
136657
|
+
case 'Mo':
|
|
136658
|
+
return localize.ordinalNumber(month + 1, {
|
|
136659
|
+
unit: 'month'
|
|
136660
|
+
});
|
|
136661
|
+
// Jan, Feb, ..., Dec
|
|
136662
|
+
|
|
136663
|
+
case 'MMM':
|
|
136664
|
+
return localize.month(month, {
|
|
136665
|
+
width: 'abbreviated',
|
|
136666
|
+
context: 'formatting'
|
|
136667
|
+
});
|
|
136668
|
+
// J, F, ..., D
|
|
136669
|
+
|
|
136670
|
+
case 'MMMMM':
|
|
136671
|
+
return localize.month(month, {
|
|
136672
|
+
width: 'narrow',
|
|
136673
|
+
context: 'formatting'
|
|
136674
|
+
});
|
|
136675
|
+
// January, February, ..., December
|
|
136676
|
+
|
|
136677
|
+
case 'MMMM':
|
|
136678
|
+
default:
|
|
136679
|
+
return localize.month(month, {
|
|
136680
|
+
width: 'wide',
|
|
136681
|
+
context: 'formatting'
|
|
136682
|
+
});
|
|
136683
|
+
}
|
|
136684
|
+
},
|
|
136685
|
+
// Stand-alone month
|
|
136686
|
+
L: function (date, token, localize) {
|
|
136687
|
+
var month = date.getUTCMonth();
|
|
136688
|
+
|
|
136689
|
+
switch (token) {
|
|
136690
|
+
// 1, 2, ..., 12
|
|
136691
|
+
case 'L':
|
|
136692
|
+
return String(month + 1);
|
|
136693
|
+
// 01, 02, ..., 12
|
|
136694
|
+
|
|
136695
|
+
case 'LL':
|
|
136696
|
+
return addLeadingZeros(month + 1, 2);
|
|
136697
|
+
// 1st, 2nd, ..., 12th
|
|
136698
|
+
|
|
136699
|
+
case 'Lo':
|
|
136700
|
+
return localize.ordinalNumber(month + 1, {
|
|
136701
|
+
unit: 'month'
|
|
136702
|
+
});
|
|
136703
|
+
// Jan, Feb, ..., Dec
|
|
136704
|
+
|
|
136705
|
+
case 'LLL':
|
|
136706
|
+
return localize.month(month, {
|
|
136707
|
+
width: 'abbreviated',
|
|
136708
|
+
context: 'standalone'
|
|
136709
|
+
});
|
|
136710
|
+
// J, F, ..., D
|
|
136711
|
+
|
|
136712
|
+
case 'LLLLL':
|
|
136713
|
+
return localize.month(month, {
|
|
136714
|
+
width: 'narrow',
|
|
136715
|
+
context: 'standalone'
|
|
136716
|
+
});
|
|
136717
|
+
// January, February, ..., December
|
|
136718
|
+
|
|
136719
|
+
case 'LLLL':
|
|
136720
|
+
default:
|
|
136721
|
+
return localize.month(month, {
|
|
136722
|
+
width: 'wide',
|
|
136723
|
+
context: 'standalone'
|
|
136724
|
+
});
|
|
136725
|
+
}
|
|
136726
|
+
},
|
|
136727
|
+
// Local week of year
|
|
136728
|
+
w: function (date, token, localize, options) {
|
|
136729
|
+
var week = getUTCWeek(date, options);
|
|
136730
|
+
|
|
136731
|
+
if (token === 'wo') {
|
|
136732
|
+
return localize.ordinalNumber(week, {
|
|
136733
|
+
unit: 'week'
|
|
136734
|
+
});
|
|
136735
|
+
}
|
|
136736
|
+
|
|
136737
|
+
return addLeadingZeros(week, token.length);
|
|
136738
|
+
},
|
|
136739
|
+
// ISO week of year
|
|
136740
|
+
I: function (date, token, localize) {
|
|
136741
|
+
var isoWeek = getUTCISOWeek(date);
|
|
136742
|
+
|
|
136743
|
+
if (token === 'Io') {
|
|
136744
|
+
return localize.ordinalNumber(isoWeek, {
|
|
136745
|
+
unit: 'week'
|
|
136746
|
+
});
|
|
136747
|
+
}
|
|
136748
|
+
|
|
136749
|
+
return addLeadingZeros(isoWeek, token.length);
|
|
136750
|
+
},
|
|
136751
|
+
// Day of the month
|
|
136752
|
+
d: function (date, token, localize) {
|
|
136753
|
+
if (token === 'do') {
|
|
136754
|
+
return localize.ordinalNumber(date.getUTCDate(), {
|
|
136755
|
+
unit: 'date'
|
|
136756
|
+
});
|
|
136757
|
+
}
|
|
136758
|
+
|
|
136759
|
+
return formatters$3.d(date, token);
|
|
136760
|
+
},
|
|
136761
|
+
// Day of year
|
|
136762
|
+
D: function (date, token, localize) {
|
|
136763
|
+
var dayOfYear = getUTCDayOfYear(date);
|
|
136764
|
+
|
|
136765
|
+
if (token === 'Do') {
|
|
136766
|
+
return localize.ordinalNumber(dayOfYear, {
|
|
136767
|
+
unit: 'dayOfYear'
|
|
136768
|
+
});
|
|
136769
|
+
}
|
|
136770
|
+
|
|
136771
|
+
return addLeadingZeros(dayOfYear, token.length);
|
|
136772
|
+
},
|
|
136773
|
+
// Day of week
|
|
136774
|
+
E: function (date, token, localize) {
|
|
136775
|
+
var dayOfWeek = date.getUTCDay();
|
|
136776
|
+
|
|
136777
|
+
switch (token) {
|
|
136778
|
+
// Tue
|
|
136779
|
+
case 'E':
|
|
136780
|
+
case 'EE':
|
|
136781
|
+
case 'EEE':
|
|
136782
|
+
return localize.day(dayOfWeek, {
|
|
136783
|
+
width: 'abbreviated',
|
|
136784
|
+
context: 'formatting'
|
|
136785
|
+
});
|
|
136786
|
+
// T
|
|
136787
|
+
|
|
136788
|
+
case 'EEEEE':
|
|
136789
|
+
return localize.day(dayOfWeek, {
|
|
136790
|
+
width: 'narrow',
|
|
136791
|
+
context: 'formatting'
|
|
136792
|
+
});
|
|
136793
|
+
// Tu
|
|
136794
|
+
|
|
136795
|
+
case 'EEEEEE':
|
|
136796
|
+
return localize.day(dayOfWeek, {
|
|
136797
|
+
width: 'short',
|
|
136798
|
+
context: 'formatting'
|
|
136799
|
+
});
|
|
136800
|
+
// Tuesday
|
|
136801
|
+
|
|
136802
|
+
case 'EEEE':
|
|
136803
|
+
default:
|
|
136804
|
+
return localize.day(dayOfWeek, {
|
|
136805
|
+
width: 'wide',
|
|
136806
|
+
context: 'formatting'
|
|
136807
|
+
});
|
|
136808
|
+
}
|
|
136809
|
+
},
|
|
136810
|
+
// Local day of week
|
|
136811
|
+
e: function (date, token, localize, options) {
|
|
136812
|
+
var dayOfWeek = date.getUTCDay();
|
|
136813
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
136814
|
+
|
|
136815
|
+
switch (token) {
|
|
136816
|
+
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
136817
|
+
case 'e':
|
|
136818
|
+
return String(localDayOfWeek);
|
|
136819
|
+
// Padded numerical value
|
|
136820
|
+
|
|
136821
|
+
case 'ee':
|
|
136822
|
+
return addLeadingZeros(localDayOfWeek, 2);
|
|
136823
|
+
// 1st, 2nd, ..., 7th
|
|
136824
|
+
|
|
136825
|
+
case 'eo':
|
|
136826
|
+
return localize.ordinalNumber(localDayOfWeek, {
|
|
136827
|
+
unit: 'day'
|
|
136828
|
+
});
|
|
136829
|
+
|
|
136830
|
+
case 'eee':
|
|
136831
|
+
return localize.day(dayOfWeek, {
|
|
136832
|
+
width: 'abbreviated',
|
|
136833
|
+
context: 'formatting'
|
|
136834
|
+
});
|
|
136835
|
+
// T
|
|
136836
|
+
|
|
136837
|
+
case 'eeeee':
|
|
136838
|
+
return localize.day(dayOfWeek, {
|
|
136839
|
+
width: 'narrow',
|
|
136840
|
+
context: 'formatting'
|
|
136841
|
+
});
|
|
136842
|
+
// Tu
|
|
136843
|
+
|
|
136844
|
+
case 'eeeeee':
|
|
136845
|
+
return localize.day(dayOfWeek, {
|
|
136846
|
+
width: 'short',
|
|
136847
|
+
context: 'formatting'
|
|
136848
|
+
});
|
|
136849
|
+
// Tuesday
|
|
136850
|
+
|
|
136851
|
+
case 'eeee':
|
|
136852
|
+
default:
|
|
136853
|
+
return localize.day(dayOfWeek, {
|
|
136854
|
+
width: 'wide',
|
|
136855
|
+
context: 'formatting'
|
|
136856
|
+
});
|
|
136857
|
+
}
|
|
136858
|
+
},
|
|
136859
|
+
// Stand-alone local day of week
|
|
136860
|
+
c: function (date, token, localize, options) {
|
|
136861
|
+
var dayOfWeek = date.getUTCDay();
|
|
136862
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
136863
|
+
|
|
136864
|
+
switch (token) {
|
|
136865
|
+
// Numerical value (same as in `e`)
|
|
136866
|
+
case 'c':
|
|
136867
|
+
return String(localDayOfWeek);
|
|
136868
|
+
// Padded numerical value
|
|
136869
|
+
|
|
136870
|
+
case 'cc':
|
|
136871
|
+
return addLeadingZeros(localDayOfWeek, token.length);
|
|
136872
|
+
// 1st, 2nd, ..., 7th
|
|
136873
|
+
|
|
136874
|
+
case 'co':
|
|
136875
|
+
return localize.ordinalNumber(localDayOfWeek, {
|
|
136876
|
+
unit: 'day'
|
|
136877
|
+
});
|
|
136878
|
+
|
|
136879
|
+
case 'ccc':
|
|
136880
|
+
return localize.day(dayOfWeek, {
|
|
136881
|
+
width: 'abbreviated',
|
|
136882
|
+
context: 'standalone'
|
|
136883
|
+
});
|
|
136884
|
+
// T
|
|
136885
|
+
|
|
136886
|
+
case 'ccccc':
|
|
136887
|
+
return localize.day(dayOfWeek, {
|
|
136888
|
+
width: 'narrow',
|
|
136889
|
+
context: 'standalone'
|
|
136890
|
+
});
|
|
136891
|
+
// Tu
|
|
136892
|
+
|
|
136893
|
+
case 'cccccc':
|
|
136894
|
+
return localize.day(dayOfWeek, {
|
|
136895
|
+
width: 'short',
|
|
136896
|
+
context: 'standalone'
|
|
136897
|
+
});
|
|
136898
|
+
// Tuesday
|
|
136899
|
+
|
|
136900
|
+
case 'cccc':
|
|
136901
|
+
default:
|
|
136902
|
+
return localize.day(dayOfWeek, {
|
|
136903
|
+
width: 'wide',
|
|
136904
|
+
context: 'standalone'
|
|
136905
|
+
});
|
|
136906
|
+
}
|
|
136907
|
+
},
|
|
136908
|
+
// ISO day of week
|
|
136909
|
+
i: function (date, token, localize) {
|
|
136910
|
+
var dayOfWeek = date.getUTCDay();
|
|
136911
|
+
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
136912
|
+
|
|
136913
|
+
switch (token) {
|
|
136914
|
+
// 2
|
|
136915
|
+
case 'i':
|
|
136916
|
+
return String(isoDayOfWeek);
|
|
136917
|
+
// 02
|
|
136918
|
+
|
|
136919
|
+
case 'ii':
|
|
136920
|
+
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
136921
|
+
// 2nd
|
|
136922
|
+
|
|
136923
|
+
case 'io':
|
|
136924
|
+
return localize.ordinalNumber(isoDayOfWeek, {
|
|
136925
|
+
unit: 'day'
|
|
136926
|
+
});
|
|
136927
|
+
// Tue
|
|
136928
|
+
|
|
136929
|
+
case 'iii':
|
|
136930
|
+
return localize.day(dayOfWeek, {
|
|
136931
|
+
width: 'abbreviated',
|
|
136932
|
+
context: 'formatting'
|
|
136933
|
+
});
|
|
136934
|
+
// T
|
|
136935
|
+
|
|
136936
|
+
case 'iiiii':
|
|
136937
|
+
return localize.day(dayOfWeek, {
|
|
136938
|
+
width: 'narrow',
|
|
136939
|
+
context: 'formatting'
|
|
136940
|
+
});
|
|
136941
|
+
// Tu
|
|
136942
|
+
|
|
136943
|
+
case 'iiiiii':
|
|
136944
|
+
return localize.day(dayOfWeek, {
|
|
136945
|
+
width: 'short',
|
|
136946
|
+
context: 'formatting'
|
|
136947
|
+
});
|
|
136948
|
+
// Tuesday
|
|
136949
|
+
|
|
136950
|
+
case 'iiii':
|
|
136951
|
+
default:
|
|
136952
|
+
return localize.day(dayOfWeek, {
|
|
136953
|
+
width: 'wide',
|
|
136954
|
+
context: 'formatting'
|
|
136955
|
+
});
|
|
136956
|
+
}
|
|
136957
|
+
},
|
|
136958
|
+
// AM or PM
|
|
136959
|
+
a: function (date, token, localize) {
|
|
136960
|
+
var hours = date.getUTCHours();
|
|
136961
|
+
var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
136962
|
+
|
|
136963
|
+
switch (token) {
|
|
136964
|
+
case 'a':
|
|
136965
|
+
case 'aa':
|
|
136966
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
136967
|
+
width: 'abbreviated',
|
|
136968
|
+
context: 'formatting'
|
|
136969
|
+
});
|
|
136970
|
+
|
|
136971
|
+
case 'aaa':
|
|
136972
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
136973
|
+
width: 'abbreviated',
|
|
136974
|
+
context: 'formatting'
|
|
136975
|
+
}).toLowerCase();
|
|
136976
|
+
|
|
136977
|
+
case 'aaaaa':
|
|
136978
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
136979
|
+
width: 'narrow',
|
|
136980
|
+
context: 'formatting'
|
|
136981
|
+
});
|
|
136982
|
+
|
|
136983
|
+
case 'aaaa':
|
|
136984
|
+
default:
|
|
136985
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
136986
|
+
width: 'wide',
|
|
136987
|
+
context: 'formatting'
|
|
136988
|
+
});
|
|
136989
|
+
}
|
|
136990
|
+
},
|
|
136991
|
+
// AM, PM, midnight, noon
|
|
136992
|
+
b: function (date, token, localize) {
|
|
136993
|
+
var hours = date.getUTCHours();
|
|
136994
|
+
var dayPeriodEnumValue;
|
|
136995
|
+
|
|
136996
|
+
if (hours === 12) {
|
|
136997
|
+
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
136998
|
+
} else if (hours === 0) {
|
|
136999
|
+
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
137000
|
+
} else {
|
|
137001
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
137002
|
+
}
|
|
137003
|
+
|
|
137004
|
+
switch (token) {
|
|
137005
|
+
case 'b':
|
|
137006
|
+
case 'bb':
|
|
137007
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137008
|
+
width: 'abbreviated',
|
|
137009
|
+
context: 'formatting'
|
|
137010
|
+
});
|
|
137011
|
+
|
|
137012
|
+
case 'bbb':
|
|
137013
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137014
|
+
width: 'abbreviated',
|
|
137015
|
+
context: 'formatting'
|
|
137016
|
+
}).toLowerCase();
|
|
137017
|
+
|
|
137018
|
+
case 'bbbbb':
|
|
137019
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137020
|
+
width: 'narrow',
|
|
137021
|
+
context: 'formatting'
|
|
137022
|
+
});
|
|
137023
|
+
|
|
137024
|
+
case 'bbbb':
|
|
137025
|
+
default:
|
|
137026
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137027
|
+
width: 'wide',
|
|
137028
|
+
context: 'formatting'
|
|
137029
|
+
});
|
|
137030
|
+
}
|
|
137031
|
+
},
|
|
137032
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
137033
|
+
B: function (date, token, localize) {
|
|
137034
|
+
var hours = date.getUTCHours();
|
|
137035
|
+
var dayPeriodEnumValue;
|
|
137036
|
+
|
|
137037
|
+
if (hours >= 17) {
|
|
137038
|
+
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
137039
|
+
} else if (hours >= 12) {
|
|
137040
|
+
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
137041
|
+
} else if (hours >= 4) {
|
|
137042
|
+
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
137043
|
+
} else {
|
|
137044
|
+
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
137045
|
+
}
|
|
137046
|
+
|
|
137047
|
+
switch (token) {
|
|
137048
|
+
case 'B':
|
|
137049
|
+
case 'BB':
|
|
137050
|
+
case 'BBB':
|
|
137051
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137052
|
+
width: 'abbreviated',
|
|
137053
|
+
context: 'formatting'
|
|
137054
|
+
});
|
|
137055
|
+
|
|
137056
|
+
case 'BBBBB':
|
|
137057
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137058
|
+
width: 'narrow',
|
|
137059
|
+
context: 'formatting'
|
|
137060
|
+
});
|
|
137061
|
+
|
|
137062
|
+
case 'BBBB':
|
|
137063
|
+
default:
|
|
137064
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137065
|
+
width: 'wide',
|
|
137066
|
+
context: 'formatting'
|
|
137067
|
+
});
|
|
137068
|
+
}
|
|
137069
|
+
},
|
|
137070
|
+
// Hour [1-12]
|
|
137071
|
+
h: function (date, token, localize) {
|
|
137072
|
+
if (token === 'ho') {
|
|
137073
|
+
var hours = date.getUTCHours() % 12;
|
|
137074
|
+
if (hours === 0) hours = 12;
|
|
137075
|
+
return localize.ordinalNumber(hours, {
|
|
137076
|
+
unit: 'hour'
|
|
137077
|
+
});
|
|
137078
|
+
}
|
|
137079
|
+
|
|
137080
|
+
return formatters$3.h(date, token);
|
|
137081
|
+
},
|
|
137082
|
+
// Hour [0-23]
|
|
137083
|
+
H: function (date, token, localize) {
|
|
137084
|
+
if (token === 'Ho') {
|
|
137085
|
+
return localize.ordinalNumber(date.getUTCHours(), {
|
|
137086
|
+
unit: 'hour'
|
|
137087
|
+
});
|
|
137088
|
+
}
|
|
137089
|
+
|
|
137090
|
+
return formatters$3.H(date, token);
|
|
137091
|
+
},
|
|
137092
|
+
// Hour [0-11]
|
|
137093
|
+
K: function (date, token, localize) {
|
|
137094
|
+
var hours = date.getUTCHours() % 12;
|
|
137095
|
+
|
|
137096
|
+
if (token === 'Ko') {
|
|
137097
|
+
return localize.ordinalNumber(hours, {
|
|
137098
|
+
unit: 'hour'
|
|
137099
|
+
});
|
|
137100
|
+
}
|
|
137101
|
+
|
|
137102
|
+
return addLeadingZeros(hours, token.length);
|
|
137103
|
+
},
|
|
137104
|
+
// Hour [1-24]
|
|
137105
|
+
k: function (date, token, localize) {
|
|
137106
|
+
var hours = date.getUTCHours();
|
|
137107
|
+
if (hours === 0) hours = 24;
|
|
137108
|
+
|
|
137109
|
+
if (token === 'ko') {
|
|
137110
|
+
return localize.ordinalNumber(hours, {
|
|
137111
|
+
unit: 'hour'
|
|
137112
|
+
});
|
|
137113
|
+
}
|
|
137114
|
+
|
|
137115
|
+
return addLeadingZeros(hours, token.length);
|
|
137116
|
+
},
|
|
137117
|
+
// Minute
|
|
137118
|
+
m: function (date, token, localize) {
|
|
137119
|
+
if (token === 'mo') {
|
|
137120
|
+
return localize.ordinalNumber(date.getUTCMinutes(), {
|
|
137121
|
+
unit: 'minute'
|
|
137122
|
+
});
|
|
137123
|
+
}
|
|
137124
|
+
|
|
137125
|
+
return formatters$3.m(date, token);
|
|
137126
|
+
},
|
|
137127
|
+
// Second
|
|
137128
|
+
s: function (date, token, localize) {
|
|
137129
|
+
if (token === 'so') {
|
|
137130
|
+
return localize.ordinalNumber(date.getUTCSeconds(), {
|
|
137131
|
+
unit: 'second'
|
|
137132
|
+
});
|
|
137133
|
+
}
|
|
137134
|
+
|
|
137135
|
+
return formatters$3.s(date, token);
|
|
137136
|
+
},
|
|
137137
|
+
// Fraction of second
|
|
137138
|
+
S: function (date, token) {
|
|
137139
|
+
return formatters$3.S(date, token);
|
|
137140
|
+
},
|
|
137141
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
137142
|
+
X: function (date, token, _localize, options) {
|
|
137143
|
+
var originalDate = options._originalDate || date;
|
|
137144
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
137145
|
+
|
|
137146
|
+
if (timezoneOffset === 0) {
|
|
137147
|
+
return 'Z';
|
|
137148
|
+
}
|
|
137149
|
+
|
|
137150
|
+
switch (token) {
|
|
137151
|
+
// Hours and optional minutes
|
|
137152
|
+
case 'X':
|
|
137153
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
137154
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
137155
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
137156
|
+
// so this token always has the same output as `XX`
|
|
137157
|
+
|
|
137158
|
+
case 'XXXX':
|
|
137159
|
+
case 'XX':
|
|
137160
|
+
// Hours and minutes without `:` delimiter
|
|
137161
|
+
return formatTimezone(timezoneOffset);
|
|
137162
|
+
// Hours, minutes and optional seconds with `:` delimiter
|
|
137163
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
137164
|
+
// so this token always has the same output as `XXX`
|
|
137165
|
+
|
|
137166
|
+
case 'XXXXX':
|
|
137167
|
+
case 'XXX': // Hours and minutes with `:` delimiter
|
|
137168
|
+
|
|
137169
|
+
default:
|
|
137170
|
+
return formatTimezone(timezoneOffset, ':');
|
|
137171
|
+
}
|
|
137172
|
+
},
|
|
137173
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
137174
|
+
x: function (date, token, _localize, options) {
|
|
137175
|
+
var originalDate = options._originalDate || date;
|
|
137176
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
137177
|
+
|
|
137178
|
+
switch (token) {
|
|
137179
|
+
// Hours and optional minutes
|
|
137180
|
+
case 'x':
|
|
137181
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
137182
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
137183
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
137184
|
+
// so this token always has the same output as `xx`
|
|
137185
|
+
|
|
137186
|
+
case 'xxxx':
|
|
137187
|
+
case 'xx':
|
|
137188
|
+
// Hours and minutes without `:` delimiter
|
|
137189
|
+
return formatTimezone(timezoneOffset);
|
|
137190
|
+
// Hours, minutes and optional seconds with `:` delimiter
|
|
137191
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
137192
|
+
// so this token always has the same output as `xxx`
|
|
137193
|
+
|
|
137194
|
+
case 'xxxxx':
|
|
137195
|
+
case 'xxx': // Hours and minutes with `:` delimiter
|
|
137196
|
+
|
|
137197
|
+
default:
|
|
137198
|
+
return formatTimezone(timezoneOffset, ':');
|
|
137199
|
+
}
|
|
137200
|
+
},
|
|
137201
|
+
// Timezone (GMT)
|
|
137202
|
+
O: function (date, token, _localize, options) {
|
|
137203
|
+
var originalDate = options._originalDate || date;
|
|
137204
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
137205
|
+
|
|
137206
|
+
switch (token) {
|
|
137207
|
+
// Short
|
|
137208
|
+
case 'O':
|
|
137209
|
+
case 'OO':
|
|
137210
|
+
case 'OOO':
|
|
137211
|
+
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
137212
|
+
// Long
|
|
137213
|
+
|
|
137214
|
+
case 'OOOO':
|
|
137215
|
+
default:
|
|
137216
|
+
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
137217
|
+
}
|
|
137218
|
+
},
|
|
137219
|
+
// Timezone (specific non-location)
|
|
137220
|
+
z: function (date, token, _localize, options) {
|
|
137221
|
+
var originalDate = options._originalDate || date;
|
|
137222
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
137223
|
+
|
|
137224
|
+
switch (token) {
|
|
137225
|
+
// Short
|
|
137226
|
+
case 'z':
|
|
137227
|
+
case 'zz':
|
|
137228
|
+
case 'zzz':
|
|
137229
|
+
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
137230
|
+
// Long
|
|
137231
|
+
|
|
137232
|
+
case 'zzzz':
|
|
137233
|
+
default:
|
|
137234
|
+
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
137235
|
+
}
|
|
137236
|
+
},
|
|
137237
|
+
// Seconds timestamp
|
|
137238
|
+
t: function (date, token, _localize, options) {
|
|
137239
|
+
var originalDate = options._originalDate || date;
|
|
137240
|
+
var timestamp = Math.floor(originalDate.getTime() / 1000);
|
|
137241
|
+
return addLeadingZeros(timestamp, token.length);
|
|
137242
|
+
},
|
|
137243
|
+
// Milliseconds timestamp
|
|
137244
|
+
T: function (date, token, _localize, options) {
|
|
137245
|
+
var originalDate = options._originalDate || date;
|
|
137246
|
+
var timestamp = originalDate.getTime();
|
|
137247
|
+
return addLeadingZeros(timestamp, token.length);
|
|
137248
|
+
}
|
|
137249
|
+
};
|
|
137250
|
+
|
|
137251
|
+
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
137252
|
+
var sign = offset > 0 ? '-' : '+';
|
|
137253
|
+
var absOffset = Math.abs(offset);
|
|
137254
|
+
var hours = Math.floor(absOffset / 60);
|
|
137255
|
+
var minutes = absOffset % 60;
|
|
137256
|
+
|
|
137257
|
+
if (minutes === 0) {
|
|
137258
|
+
return sign + String(hours);
|
|
137259
|
+
}
|
|
137260
|
+
|
|
137261
|
+
var delimiter = dirtyDelimiter || '';
|
|
137262
|
+
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
137263
|
+
}
|
|
137264
|
+
|
|
137265
|
+
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
137266
|
+
if (offset % 60 === 0) {
|
|
137267
|
+
var sign = offset > 0 ? '-' : '+';
|
|
137268
|
+
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
137269
|
+
}
|
|
137270
|
+
|
|
137271
|
+
return formatTimezone(offset, dirtyDelimiter);
|
|
137272
|
+
}
|
|
137273
|
+
|
|
137274
|
+
function formatTimezone(offset, dirtyDelimiter) {
|
|
137275
|
+
var delimiter = dirtyDelimiter || '';
|
|
137276
|
+
var sign = offset > 0 ? '-' : '+';
|
|
137277
|
+
var absOffset = Math.abs(offset);
|
|
137278
|
+
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
137279
|
+
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
137280
|
+
return sign + hours + delimiter + minutes;
|
|
137281
|
+
}
|
|
137282
|
+
|
|
137283
|
+
var formatters$1 = formatters;
|
|
137284
|
+
|
|
137285
|
+
function dateLongFormatter(pattern, formatLong) {
|
|
137286
|
+
switch (pattern) {
|
|
137287
|
+
case 'P':
|
|
137288
|
+
return formatLong.date({
|
|
137289
|
+
width: 'short'
|
|
137290
|
+
});
|
|
137291
|
+
|
|
137292
|
+
case 'PP':
|
|
137293
|
+
return formatLong.date({
|
|
137294
|
+
width: 'medium'
|
|
137295
|
+
});
|
|
137296
|
+
|
|
137297
|
+
case 'PPP':
|
|
137298
|
+
return formatLong.date({
|
|
137299
|
+
width: 'long'
|
|
137300
|
+
});
|
|
137301
|
+
|
|
137302
|
+
case 'PPPP':
|
|
137303
|
+
default:
|
|
137304
|
+
return formatLong.date({
|
|
137305
|
+
width: 'full'
|
|
137306
|
+
});
|
|
137307
|
+
}
|
|
137308
|
+
}
|
|
137309
|
+
|
|
137310
|
+
function timeLongFormatter(pattern, formatLong) {
|
|
137311
|
+
switch (pattern) {
|
|
137312
|
+
case 'p':
|
|
137313
|
+
return formatLong.time({
|
|
137314
|
+
width: 'short'
|
|
137315
|
+
});
|
|
137316
|
+
|
|
137317
|
+
case 'pp':
|
|
137318
|
+
return formatLong.time({
|
|
137319
|
+
width: 'medium'
|
|
137320
|
+
});
|
|
137321
|
+
|
|
137322
|
+
case 'ppp':
|
|
137323
|
+
return formatLong.time({
|
|
137324
|
+
width: 'long'
|
|
137325
|
+
});
|
|
137326
|
+
|
|
137327
|
+
case 'pppp':
|
|
137328
|
+
default:
|
|
137329
|
+
return formatLong.time({
|
|
137330
|
+
width: 'full'
|
|
137331
|
+
});
|
|
137332
|
+
}
|
|
137333
|
+
}
|
|
137334
|
+
|
|
137335
|
+
function dateTimeLongFormatter(pattern, formatLong) {
|
|
137336
|
+
var matchResult = pattern.match(/(P+)(p+)?/);
|
|
137337
|
+
var datePattern = matchResult[1];
|
|
137338
|
+
var timePattern = matchResult[2];
|
|
137339
|
+
|
|
137340
|
+
if (!timePattern) {
|
|
137341
|
+
return dateLongFormatter(pattern, formatLong);
|
|
137342
|
+
}
|
|
137343
|
+
|
|
137344
|
+
var dateTimeFormat;
|
|
137345
|
+
|
|
137346
|
+
switch (datePattern) {
|
|
137347
|
+
case 'P':
|
|
137348
|
+
dateTimeFormat = formatLong.dateTime({
|
|
137349
|
+
width: 'short'
|
|
137350
|
+
});
|
|
137351
|
+
break;
|
|
137352
|
+
|
|
137353
|
+
case 'PP':
|
|
137354
|
+
dateTimeFormat = formatLong.dateTime({
|
|
137355
|
+
width: 'medium'
|
|
137356
|
+
});
|
|
137357
|
+
break;
|
|
137358
|
+
|
|
137359
|
+
case 'PPP':
|
|
137360
|
+
dateTimeFormat = formatLong.dateTime({
|
|
137361
|
+
width: 'long'
|
|
137362
|
+
});
|
|
137363
|
+
break;
|
|
137364
|
+
|
|
137365
|
+
case 'PPPP':
|
|
137366
|
+
default:
|
|
137367
|
+
dateTimeFormat = formatLong.dateTime({
|
|
137368
|
+
width: 'full'
|
|
137369
|
+
});
|
|
137370
|
+
break;
|
|
137371
|
+
}
|
|
137372
|
+
|
|
137373
|
+
return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
|
|
137374
|
+
}
|
|
137375
|
+
|
|
137376
|
+
var longFormatters = {
|
|
137377
|
+
p: timeLongFormatter,
|
|
137378
|
+
P: dateTimeLongFormatter
|
|
137379
|
+
};
|
|
137380
|
+
var longFormatters$1 = longFormatters;
|
|
137381
|
+
|
|
137382
|
+
var protectedDayOfYearTokens = ['D', 'DD'];
|
|
137383
|
+
var protectedWeekYearTokens = ['YY', 'YYYY'];
|
|
137384
|
+
function isProtectedDayOfYearToken(token) {
|
|
137385
|
+
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
|
137386
|
+
}
|
|
137387
|
+
function isProtectedWeekYearToken(token) {
|
|
137388
|
+
return protectedWeekYearTokens.indexOf(token) !== -1;
|
|
137389
|
+
}
|
|
137390
|
+
function throwProtectedError(token, format, input) {
|
|
137391
|
+
if (token === 'YYYY') {
|
|
137392
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
137393
|
+
} else if (token === 'YY') {
|
|
137394
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
137395
|
+
} else if (token === 'D') {
|
|
137396
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
137397
|
+
} else if (token === 'DD') {
|
|
137398
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
137399
|
+
}
|
|
137400
|
+
}
|
|
137401
|
+
|
|
137402
|
+
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
|
|
137403
|
+
// (one of the certain letters followed by `o`)
|
|
137404
|
+
// - (\w)\1* matches any sequences of the same letter
|
|
137405
|
+
// - '' matches two quote characters in a row
|
|
137406
|
+
// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
|
|
137407
|
+
// except a single quote symbol, which ends the sequence.
|
|
137408
|
+
// Two quote characters do not end the sequence.
|
|
137409
|
+
// If there is no matching single quote
|
|
137410
|
+
// then the sequence will continue until the end of the string.
|
|
137411
|
+
// - . matches any single character unmatched by previous parts of the RegExps
|
|
137412
|
+
|
|
137413
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also
|
|
137414
|
+
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
|
|
137415
|
+
|
|
137416
|
+
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
137417
|
+
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
137418
|
+
var doubleQuoteRegExp = /''/g;
|
|
137419
|
+
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
137420
|
+
/**
|
|
137421
|
+
* @name format
|
|
137422
|
+
* @category Common Helpers
|
|
137423
|
+
* @summary Format the date.
|
|
137424
|
+
*
|
|
137425
|
+
* @description
|
|
137426
|
+
* Return the formatted date string in the given format. The result may vary by locale.
|
|
137427
|
+
*
|
|
137428
|
+
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
|
|
137429
|
+
* > See: https://git.io/fxCyr
|
|
137430
|
+
*
|
|
137431
|
+
* The characters wrapped between two single quotes characters (') are escaped.
|
|
137432
|
+
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
|
|
137433
|
+
* (see the last example)
|
|
137434
|
+
*
|
|
137435
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
137436
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
137437
|
+
* with a few additions (see note 7 below the table).
|
|
137438
|
+
*
|
|
137439
|
+
* Accepted patterns:
|
|
137440
|
+
* | Unit | Pattern | Result examples | Notes |
|
|
137441
|
+
* |---------------------------------|---------|-----------------------------------|-------|
|
|
137442
|
+
* | Era | G..GGG | AD, BC | |
|
|
137443
|
+
* | | GGGG | Anno Domini, Before Christ | 2 |
|
|
137444
|
+
* | | GGGGG | A, B | |
|
|
137445
|
+
* | Calendar year | y | 44, 1, 1900, 2017 | 5 |
|
|
137446
|
+
* | | yo | 44th, 1st, 0th, 17th | 5,7 |
|
|
137447
|
+
* | | yy | 44, 01, 00, 17 | 5 |
|
|
137448
|
+
* | | yyy | 044, 001, 1900, 2017 | 5 |
|
|
137449
|
+
* | | yyyy | 0044, 0001, 1900, 2017 | 5 |
|
|
137450
|
+
* | | yyyyy | ... | 3,5 |
|
|
137451
|
+
* | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
|
|
137452
|
+
* | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
|
|
137453
|
+
* | | YY | 44, 01, 00, 17 | 5,8 |
|
|
137454
|
+
* | | YYY | 044, 001, 1900, 2017 | 5 |
|
|
137455
|
+
* | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
|
|
137456
|
+
* | | YYYYY | ... | 3,5 |
|
|
137457
|
+
* | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
|
|
137458
|
+
* | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
|
|
137459
|
+
* | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
|
|
137460
|
+
* | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
|
|
137461
|
+
* | | RRRRR | ... | 3,5,7 |
|
|
137462
|
+
* | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
|
|
137463
|
+
* | | uu | -43, 01, 1900, 2017 | 5 |
|
|
137464
|
+
* | | uuu | -043, 001, 1900, 2017 | 5 |
|
|
137465
|
+
* | | uuuu | -0043, 0001, 1900, 2017 | 5 |
|
|
137466
|
+
* | | uuuuu | ... | 3,5 |
|
|
137467
|
+
* | Quarter (formatting) | Q | 1, 2, 3, 4 | |
|
|
137468
|
+
* | | Qo | 1st, 2nd, 3rd, 4th | 7 |
|
|
137469
|
+
* | | QQ | 01, 02, 03, 04 | |
|
|
137470
|
+
* | | QQQ | Q1, Q2, Q3, Q4 | |
|
|
137471
|
+
* | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
|
|
137472
|
+
* | | QQQQQ | 1, 2, 3, 4 | 4 |
|
|
137473
|
+
* | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
|
|
137474
|
+
* | | qo | 1st, 2nd, 3rd, 4th | 7 |
|
|
137475
|
+
* | | qq | 01, 02, 03, 04 | |
|
|
137476
|
+
* | | qqq | Q1, Q2, Q3, Q4 | |
|
|
137477
|
+
* | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
|
|
137478
|
+
* | | qqqqq | 1, 2, 3, 4 | 4 |
|
|
137479
|
+
* | Month (formatting) | M | 1, 2, ..., 12 | |
|
|
137480
|
+
* | | Mo | 1st, 2nd, ..., 12th | 7 |
|
|
137481
|
+
* | | MM | 01, 02, ..., 12 | |
|
|
137482
|
+
* | | MMM | Jan, Feb, ..., Dec | |
|
|
137483
|
+
* | | MMMM | January, February, ..., December | 2 |
|
|
137484
|
+
* | | MMMMM | J, F, ..., D | |
|
|
137485
|
+
* | Month (stand-alone) | L | 1, 2, ..., 12 | |
|
|
137486
|
+
* | | Lo | 1st, 2nd, ..., 12th | 7 |
|
|
137487
|
+
* | | LL | 01, 02, ..., 12 | |
|
|
137488
|
+
* | | LLL | Jan, Feb, ..., Dec | |
|
|
137489
|
+
* | | LLLL | January, February, ..., December | 2 |
|
|
137490
|
+
* | | LLLLL | J, F, ..., D | |
|
|
137491
|
+
* | Local week of year | w | 1, 2, ..., 53 | |
|
|
137492
|
+
* | | wo | 1st, 2nd, ..., 53th | 7 |
|
|
137493
|
+
* | | ww | 01, 02, ..., 53 | |
|
|
137494
|
+
* | ISO week of year | I | 1, 2, ..., 53 | 7 |
|
|
137495
|
+
* | | Io | 1st, 2nd, ..., 53th | 7 |
|
|
137496
|
+
* | | II | 01, 02, ..., 53 | 7 |
|
|
137497
|
+
* | Day of month | d | 1, 2, ..., 31 | |
|
|
137498
|
+
* | | do | 1st, 2nd, ..., 31st | 7 |
|
|
137499
|
+
* | | dd | 01, 02, ..., 31 | |
|
|
137500
|
+
* | Day of year | D | 1, 2, ..., 365, 366 | 9 |
|
|
137501
|
+
* | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
|
|
137502
|
+
* | | DD | 01, 02, ..., 365, 366 | 9 |
|
|
137503
|
+
* | | DDD | 001, 002, ..., 365, 366 | |
|
|
137504
|
+
* | | DDDD | ... | 3 |
|
|
137505
|
+
* | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
|
|
137506
|
+
* | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
|
|
137507
|
+
* | | EEEEE | M, T, W, T, F, S, S | |
|
|
137508
|
+
* | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
137509
|
+
* | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
|
|
137510
|
+
* | | io | 1st, 2nd, ..., 7th | 7 |
|
|
137511
|
+
* | | ii | 01, 02, ..., 07 | 7 |
|
|
137512
|
+
* | | iii | Mon, Tue, Wed, ..., Sun | 7 |
|
|
137513
|
+
* | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
|
|
137514
|
+
* | | iiiii | M, T, W, T, F, S, S | 7 |
|
|
137515
|
+
* | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
|
|
137516
|
+
* | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
|
|
137517
|
+
* | | eo | 2nd, 3rd, ..., 1st | 7 |
|
|
137518
|
+
* | | ee | 02, 03, ..., 01 | |
|
|
137519
|
+
* | | eee | Mon, Tue, Wed, ..., Sun | |
|
|
137520
|
+
* | | eeee | Monday, Tuesday, ..., Sunday | 2 |
|
|
137521
|
+
* | | eeeee | M, T, W, T, F, S, S | |
|
|
137522
|
+
* | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
137523
|
+
* | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
|
|
137524
|
+
* | | co | 2nd, 3rd, ..., 1st | 7 |
|
|
137525
|
+
* | | cc | 02, 03, ..., 01 | |
|
|
137526
|
+
* | | ccc | Mon, Tue, Wed, ..., Sun | |
|
|
137527
|
+
* | | cccc | Monday, Tuesday, ..., Sunday | 2 |
|
|
137528
|
+
* | | ccccc | M, T, W, T, F, S, S | |
|
|
137529
|
+
* | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
137530
|
+
* | AM, PM | a..aa | AM, PM | |
|
|
137531
|
+
* | | aaa | am, pm | |
|
|
137532
|
+
* | | aaaa | a.m., p.m. | 2 |
|
|
137533
|
+
* | | aaaaa | a, p | |
|
|
137534
|
+
* | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
|
|
137535
|
+
* | | bbb | am, pm, noon, midnight | |
|
|
137536
|
+
* | | bbbb | a.m., p.m., noon, midnight | 2 |
|
|
137537
|
+
* | | bbbbb | a, p, n, mi | |
|
|
137538
|
+
* | Flexible day period | B..BBB | at night, in the morning, ... | |
|
|
137539
|
+
* | | BBBB | at night, in the morning, ... | 2 |
|
|
137540
|
+
* | | BBBBB | at night, in the morning, ... | |
|
|
137541
|
+
* | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
|
|
137542
|
+
* | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
|
|
137543
|
+
* | | hh | 01, 02, ..., 11, 12 | |
|
|
137544
|
+
* | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
|
|
137545
|
+
* | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
|
|
137546
|
+
* | | HH | 00, 01, 02, ..., 23 | |
|
|
137547
|
+
* | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
|
|
137548
|
+
* | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
|
|
137549
|
+
* | | KK | 01, 02, ..., 11, 00 | |
|
|
137550
|
+
* | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
|
|
137551
|
+
* | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
|
|
137552
|
+
* | | kk | 24, 01, 02, ..., 23 | |
|
|
137553
|
+
* | Minute | m | 0, 1, ..., 59 | |
|
|
137554
|
+
* | | mo | 0th, 1st, ..., 59th | 7 |
|
|
137555
|
+
* | | mm | 00, 01, ..., 59 | |
|
|
137556
|
+
* | Second | s | 0, 1, ..., 59 | |
|
|
137557
|
+
* | | so | 0th, 1st, ..., 59th | 7 |
|
|
137558
|
+
* | | ss | 00, 01, ..., 59 | |
|
|
137559
|
+
* | Fraction of second | S | 0, 1, ..., 9 | |
|
|
137560
|
+
* | | SS | 00, 01, ..., 99 | |
|
|
137561
|
+
* | | SSS | 000, 001, ..., 999 | |
|
|
137562
|
+
* | | SSSS | ... | 3 |
|
|
137563
|
+
* | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
|
|
137564
|
+
* | | XX | -0800, +0530, Z | |
|
|
137565
|
+
* | | XXX | -08:00, +05:30, Z | |
|
|
137566
|
+
* | | XXXX | -0800, +0530, Z, +123456 | 2 |
|
|
137567
|
+
* | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
|
|
137568
|
+
* | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
|
|
137569
|
+
* | | xx | -0800, +0530, +0000 | |
|
|
137570
|
+
* | | xxx | -08:00, +05:30, +00:00 | 2 |
|
|
137571
|
+
* | | xxxx | -0800, +0530, +0000, +123456 | |
|
|
137572
|
+
* | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
|
|
137573
|
+
* | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
|
|
137574
|
+
* | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
|
|
137575
|
+
* | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
|
|
137576
|
+
* | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
|
|
137577
|
+
* | Seconds timestamp | t | 512969520 | 7 |
|
|
137578
|
+
* | | tt | ... | 3,7 |
|
|
137579
|
+
* | Milliseconds timestamp | T | 512969520900 | 7 |
|
|
137580
|
+
* | | TT | ... | 3,7 |
|
|
137581
|
+
* | Long localized date | P | 04/29/1453 | 7 |
|
|
137582
|
+
* | | PP | Apr 29, 1453 | 7 |
|
|
137583
|
+
* | | PPP | April 29th, 1453 | 7 |
|
|
137584
|
+
* | | PPPP | Friday, April 29th, 1453 | 2,7 |
|
|
137585
|
+
* | Long localized time | p | 12:00 AM | 7 |
|
|
137586
|
+
* | | pp | 12:00:00 AM | 7 |
|
|
137587
|
+
* | | ppp | 12:00:00 AM GMT+2 | 7 |
|
|
137588
|
+
* | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
|
|
137589
|
+
* | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
|
|
137590
|
+
* | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
|
|
137591
|
+
* | | PPPppp | April 29th, 1453 at ... | 7 |
|
|
137592
|
+
* | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
|
|
137593
|
+
* Notes:
|
|
137594
|
+
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
|
|
137595
|
+
* are the same as "stand-alone" units, but are different in some languages.
|
|
137596
|
+
* "Formatting" units are declined according to the rules of the language
|
|
137597
|
+
* in the context of a date. "Stand-alone" units are always nominative singular:
|
|
137598
|
+
*
|
|
137599
|
+
* `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
|
|
137600
|
+
*
|
|
137601
|
+
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
|
|
137602
|
+
*
|
|
137603
|
+
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
|
|
137604
|
+
* the single quote characters (see below).
|
|
137605
|
+
* If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
|
|
137606
|
+
* the output will be the same as default pattern for this unit, usually
|
|
137607
|
+
* the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
|
|
137608
|
+
* are marked with "2" in the last column of the table.
|
|
137609
|
+
*
|
|
137610
|
+
* `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
|
|
137611
|
+
*
|
|
137612
|
+
* `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
|
|
137613
|
+
*
|
|
137614
|
+
* `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
|
|
137615
|
+
*
|
|
137616
|
+
* `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
|
|
137617
|
+
*
|
|
137618
|
+
* `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
|
|
137619
|
+
*
|
|
137620
|
+
* 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
|
|
137621
|
+
* The output will be padded with zeros to match the length of the pattern.
|
|
137622
|
+
*
|
|
137623
|
+
* `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
|
|
137624
|
+
*
|
|
137625
|
+
* 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
|
|
137626
|
+
* These tokens represent the shortest form of the quarter.
|
|
137627
|
+
*
|
|
137628
|
+
* 5. The main difference between `y` and `u` patterns are B.C. years:
|
|
137629
|
+
*
|
|
137630
|
+
* | Year | `y` | `u` |
|
|
137631
|
+
* |------|-----|-----|
|
|
137632
|
+
* | AC 1 | 1 | 1 |
|
|
137633
|
+
* | BC 1 | 1 | 0 |
|
|
137634
|
+
* | BC 2 | 2 | -1 |
|
|
137635
|
+
*
|
|
137636
|
+
* Also `yy` always returns the last two digits of a year,
|
|
137637
|
+
* while `uu` pads single digit years to 2 characters and returns other years unchanged:
|
|
137638
|
+
*
|
|
137639
|
+
* | Year | `yy` | `uu` |
|
|
137640
|
+
* |------|------|------|
|
|
137641
|
+
* | 1 | 01 | 01 |
|
|
137642
|
+
* | 14 | 14 | 14 |
|
|
137643
|
+
* | 376 | 76 | 376 |
|
|
137644
|
+
* | 1453 | 53 | 1453 |
|
|
137645
|
+
*
|
|
137646
|
+
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
|
|
137647
|
+
* except local week-numbering years are dependent on `options.weekStartsOn`
|
|
137648
|
+
* and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
|
|
137649
|
+
* and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
|
|
137650
|
+
*
|
|
137651
|
+
* 6. Specific non-location timezones are currently unavailable in `date-fns`,
|
|
137652
|
+
* so right now these tokens fall back to GMT timezones.
|
|
137653
|
+
*
|
|
137654
|
+
* 7. These patterns are not in the Unicode Technical Standard #35:
|
|
137655
|
+
* - `i`: ISO day of week
|
|
137656
|
+
* - `I`: ISO week of year
|
|
137657
|
+
* - `R`: ISO week-numbering year
|
|
137658
|
+
* - `t`: seconds timestamp
|
|
137659
|
+
* - `T`: milliseconds timestamp
|
|
137660
|
+
* - `o`: ordinal number modifier
|
|
137661
|
+
* - `P`: long localized date
|
|
137662
|
+
* - `p`: long localized time
|
|
137663
|
+
*
|
|
137664
|
+
* 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
|
|
137665
|
+
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr
|
|
137666
|
+
*
|
|
137667
|
+
* 9. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.
|
|
137668
|
+
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr
|
|
137669
|
+
*
|
|
137670
|
+
* ### v2.0.0 breaking changes:
|
|
137671
|
+
*
|
|
137672
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
137673
|
+
*
|
|
137674
|
+
* - The second argument is now required for the sake of explicitness.
|
|
137675
|
+
*
|
|
137676
|
+
* ```javascript
|
|
137677
|
+
* // Before v2.0.0
|
|
137678
|
+
* format(new Date(2016, 0, 1))
|
|
137679
|
+
*
|
|
137680
|
+
* // v2.0.0 onward
|
|
137681
|
+
* format(new Date(2016, 0, 1), "yyyy-MM-dd'T'HH:mm:ss.SSSxxx")
|
|
137682
|
+
* ```
|
|
137683
|
+
*
|
|
137684
|
+
* - New format string API for `format` function
|
|
137685
|
+
* which is based on [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).
|
|
137686
|
+
* See [this post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.
|
|
137687
|
+
*
|
|
137688
|
+
* - Characters are now escaped using single quote symbols (`'`) instead of square brackets.
|
|
137689
|
+
*
|
|
137690
|
+
* @param {Date|Number} date - the original date
|
|
137691
|
+
* @param {String} format - the string of tokens
|
|
137692
|
+
* @param {Object} [options] - an object with options.
|
|
137693
|
+
* @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
|
|
137694
|
+
* @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
|
|
137695
|
+
* @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
|
|
137696
|
+
* @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
|
|
137697
|
+
* see: https://git.io/fxCyr
|
|
137698
|
+
* @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
|
|
137699
|
+
* see: https://git.io/fxCyr
|
|
137700
|
+
* @returns {String} the formatted date string
|
|
137701
|
+
* @throws {TypeError} 2 arguments required
|
|
137702
|
+
* @throws {RangeError} `date` must not be Invalid Date
|
|
137703
|
+
* @throws {RangeError} `options.locale` must contain `localize` property
|
|
137704
|
+
* @throws {RangeError} `options.locale` must contain `formatLong` property
|
|
137705
|
+
* @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
|
|
137706
|
+
* @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
|
|
137707
|
+
* @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
137708
|
+
* @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
137709
|
+
* @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
137710
|
+
* @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
137711
|
+
* @throws {RangeError} format string contains an unescaped latin alphabet character
|
|
137712
|
+
*
|
|
137713
|
+
* @example
|
|
137714
|
+
* // Represent 11 February 2014 in middle-endian format:
|
|
137715
|
+
* var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
|
|
137716
|
+
* //=> '02/11/2014'
|
|
137717
|
+
*
|
|
137718
|
+
* @example
|
|
137719
|
+
* // Represent 2 July 2014 in Esperanto:
|
|
137720
|
+
* import { eoLocale } from 'date-fns/locale/eo'
|
|
137721
|
+
* var result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
|
|
137722
|
+
* locale: eoLocale
|
|
137723
|
+
* })
|
|
137724
|
+
* //=> '2-a de julio 2014'
|
|
137725
|
+
*
|
|
137726
|
+
* @example
|
|
137727
|
+
* // Escape string by single quote characters:
|
|
137728
|
+
* var result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
|
|
137729
|
+
* //=> "3 o'clock"
|
|
137730
|
+
*/
|
|
137731
|
+
|
|
137732
|
+
function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
137733
|
+
requiredArgs(2, arguments);
|
|
137734
|
+
var formatStr = String(dirtyFormatStr);
|
|
137735
|
+
var options = dirtyOptions || {};
|
|
137736
|
+
var locale = options.locale || defaultLocale;
|
|
137737
|
+
var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;
|
|
137738
|
+
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
137739
|
+
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
137740
|
+
|
|
137741
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
137742
|
+
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
137743
|
+
}
|
|
137744
|
+
|
|
137745
|
+
var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;
|
|
137746
|
+
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
|
137747
|
+
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
137748
|
+
|
|
137749
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
137750
|
+
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
137751
|
+
}
|
|
137752
|
+
|
|
137753
|
+
if (!locale.localize) {
|
|
137754
|
+
throw new RangeError('locale must contain localize property');
|
|
137755
|
+
}
|
|
137756
|
+
|
|
137757
|
+
if (!locale.formatLong) {
|
|
137758
|
+
throw new RangeError('locale must contain formatLong property');
|
|
137759
|
+
}
|
|
137760
|
+
|
|
137761
|
+
var originalDate = toDate(dirtyDate);
|
|
137762
|
+
|
|
137763
|
+
if (!isValid(originalDate)) {
|
|
137764
|
+
throw new RangeError('Invalid time value');
|
|
137765
|
+
} // Convert the date in system timezone to the same date in UTC+00:00 timezone.
|
|
137766
|
+
// This ensures that when UTC functions will be implemented, locales will be compatible with them.
|
|
137767
|
+
// See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
|
|
137768
|
+
|
|
137769
|
+
|
|
137770
|
+
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
137771
|
+
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
137772
|
+
var formatterOptions = {
|
|
137773
|
+
firstWeekContainsDate: firstWeekContainsDate,
|
|
137774
|
+
weekStartsOn: weekStartsOn,
|
|
137775
|
+
locale: locale,
|
|
137776
|
+
_originalDate: originalDate
|
|
137777
|
+
};
|
|
137778
|
+
var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
137779
|
+
var firstCharacter = substring[0];
|
|
137780
|
+
|
|
137781
|
+
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
137782
|
+
var longFormatter = longFormatters$1[firstCharacter];
|
|
137783
|
+
return longFormatter(substring, locale.formatLong, formatterOptions);
|
|
137784
|
+
}
|
|
137785
|
+
|
|
137786
|
+
return substring;
|
|
137787
|
+
}).join('').match(formattingTokensRegExp).map(function (substring) {
|
|
137788
|
+
// Replace two single quote characters with one single quote character
|
|
137789
|
+
if (substring === "''") {
|
|
137790
|
+
return "'";
|
|
137791
|
+
}
|
|
137792
|
+
|
|
137793
|
+
var firstCharacter = substring[0];
|
|
137794
|
+
|
|
137795
|
+
if (firstCharacter === "'") {
|
|
137796
|
+
return cleanEscapedString(substring);
|
|
137797
|
+
}
|
|
137798
|
+
|
|
137799
|
+
var formatter = formatters$1[firstCharacter];
|
|
137800
|
+
|
|
137801
|
+
if (formatter) {
|
|
137802
|
+
if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {
|
|
137803
|
+
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
|
137804
|
+
}
|
|
137805
|
+
|
|
137806
|
+
if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {
|
|
137807
|
+
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
|
137808
|
+
}
|
|
137809
|
+
|
|
137810
|
+
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
137811
|
+
}
|
|
137812
|
+
|
|
137813
|
+
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
137814
|
+
throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
|
|
137815
|
+
}
|
|
137816
|
+
|
|
137817
|
+
return substring;
|
|
137818
|
+
}).join('');
|
|
137819
|
+
return result;
|
|
137820
|
+
}
|
|
137821
|
+
|
|
137822
|
+
function cleanEscapedString(input) {
|
|
137823
|
+
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
137824
|
+
}
|
|
137825
|
+
|
|
135474
137826
|
var PublishingDateFilter = function PublishingDateFilter() {
|
|
135475
137827
|
var publishingDateRef = React$d.useRef();
|
|
135476
137828
|
var formatMessage = useIntl().formatMessage;
|
|
@@ -135486,6 +137838,7 @@
|
|
|
135486
137838
|
var today = new Date();
|
|
135487
137839
|
var startOfToday = startOfDay(today);
|
|
135488
137840
|
var endOfToday = endOfDay(today);
|
|
137841
|
+
var isActive = (filter === null || filter === void 0 ? void 0 : filter.beforeDate) || (filter === null || filter === void 0 ? void 0 : filter.afterDate);
|
|
135489
137842
|
return jsxRuntime.jsxs("div", __assign$g({
|
|
135490
137843
|
ref: publishingDateRef
|
|
135491
137844
|
}, {
|
|
@@ -135493,13 +137846,13 @@
|
|
|
135493
137846
|
iconProps: {
|
|
135494
137847
|
iconName: showDates ? 'ChevronUp' : 'ChevronDown'
|
|
135495
137848
|
},
|
|
135496
|
-
text: formatMessage({
|
|
137849
|
+
text: isActive ? getButtonText() : formatMessage({
|
|
135497
137850
|
id: 'FilterPanel.publishingDate'
|
|
135498
137851
|
}),
|
|
135499
137852
|
onClick: function () {
|
|
135500
137853
|
return setShowDates(!showDates);
|
|
135501
137854
|
},
|
|
135502
|
-
isActive:
|
|
137855
|
+
isActive: isActive
|
|
135503
137856
|
}, void 0), showDates && jsxRuntime.jsx(Callout, __assign$g({
|
|
135504
137857
|
target: publishingDateRef.current,
|
|
135505
137858
|
onDismiss: function () {
|
|
@@ -135513,7 +137866,7 @@
|
|
|
135513
137866
|
}
|
|
135514
137867
|
}
|
|
135515
137868
|
}, {
|
|
135516
|
-
children: jsxRuntime.jsxs(Host, {
|
|
137869
|
+
children: jsxRuntime.jsxs(Host$1, {
|
|
135517
137870
|
children: [jsxRuntime.jsx(StyledDateTimePicker, {
|
|
135518
137871
|
label: formatMessage({
|
|
135519
137872
|
id: 'FilterPanel.publishingDateFrom'
|
|
@@ -135533,8 +137886,7 @@
|
|
|
135533
137886
|
noDateResourceKey: "MetadataEditor.noDate",
|
|
135534
137887
|
selectDateResourceKey: "FilterPanel.publishingDatePlaceholder",
|
|
135535
137888
|
onChanged: handleEndDateChange,
|
|
135536
|
-
minDate: filter === null || filter === void 0 ? void 0 : filter.afterDate
|
|
135537
|
-
maxDate: today.toString()
|
|
137889
|
+
minDate: filter === null || filter === void 0 ? void 0 : filter.afterDate
|
|
135538
137890
|
}, void 0), jsxRuntime.jsxs(DateShortcuts, {
|
|
135539
137891
|
children: [jsxRuntime.jsx(FormattedMessage$1, {
|
|
135540
137892
|
id: "FilterPanel.publishingDateShortcuts"
|
|
@@ -135579,7 +137931,7 @@
|
|
|
135579
137931
|
},
|
|
135580
137932
|
label: "FilterPanel.publishingDateShortcuts.lastMonth"
|
|
135581
137933
|
}, void 0)]
|
|
135582
|
-
}, void 0), jsxRuntime.jsx(ClearFilterButton, {
|
|
137934
|
+
}, void 0), jsxRuntime.jsx(ClearFilterButton$1, {
|
|
135583
137935
|
text: "Clear filter",
|
|
135584
137936
|
iconProps: {
|
|
135585
137937
|
iconName: 'ClearFilter'
|
|
@@ -135608,6 +137960,25 @@
|
|
|
135608
137960
|
afterDate: null
|
|
135609
137961
|
}));
|
|
135610
137962
|
}
|
|
137963
|
+
|
|
137964
|
+
function getButtonText() {
|
|
137965
|
+
var start = format(new Date(filter.afterDate), 'P');
|
|
137966
|
+
var end = format(new Date(filter.beforeDate), 'P');
|
|
137967
|
+
|
|
137968
|
+
if (!filter.afterDate) {
|
|
137969
|
+
return formatMessage({
|
|
137970
|
+
id: 'FilterPanel.publishingDateBefore'
|
|
137971
|
+
}) + " " + end;
|
|
137972
|
+
}
|
|
137973
|
+
|
|
137974
|
+
if (!filter.beforeDate) {
|
|
137975
|
+
return formatMessage({
|
|
137976
|
+
id: 'FilterPanel.publishingDateAfter'
|
|
137977
|
+
}) + " " + start;
|
|
137978
|
+
}
|
|
137979
|
+
|
|
137980
|
+
return start + " - " + end;
|
|
137981
|
+
}
|
|
135611
137982
|
};
|
|
135612
137983
|
|
|
135613
137984
|
var DateShortcutButton = function DateShortcutButton(_a) {
|
|
@@ -135626,22 +137997,22 @@
|
|
|
135626
137997
|
}), void 0);
|
|
135627
137998
|
};
|
|
135628
137999
|
|
|
135629
|
-
var Host = _styled__default["default"].div.withConfig({
|
|
138000
|
+
var Host$1 = _styled__default["default"].div.withConfig({
|
|
135630
138001
|
displayName: "PublishingDateFilter__Host",
|
|
135631
138002
|
componentId: "sc-zv88cu-0"
|
|
135632
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
138003
|
+
})(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
135633
138004
|
|
|
135634
138005
|
var DateButton = _styled__default["default"](ActionButton).withConfig({
|
|
135635
138006
|
displayName: "PublishingDateFilter__DateButton",
|
|
135636
138007
|
componentId: "sc-zv88cu-1"
|
|
135637
|
-
})(templateObject_3 || (templateObject_3 = __makeTemplateObject$l(["\n ", "\n i {\n order: 1;\n }\n"], ["\n ", "\n i {\n order: 1;\n }\n"])), function (p) {
|
|
135638
|
-
return p.isActive && _styled.css(templateObject_2 || (templateObject_2 = __makeTemplateObject$l(["\n font-weight: bold;\n "], ["\n font-weight: bold;\n "])));
|
|
138008
|
+
})(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject$l(["\n ", "\n i {\n order: 1;\n }\n"], ["\n ", "\n i {\n order: 1;\n }\n"])), function (p) {
|
|
138009
|
+
return p.isActive && _styled.css(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject$l(["\n font-weight: bold;\n "], ["\n font-weight: bold;\n "])));
|
|
135639
138010
|
});
|
|
135640
138011
|
|
|
135641
|
-
var ClearFilterButton = _styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({
|
|
138012
|
+
var ClearFilterButton$1 = _styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({
|
|
135642
138013
|
displayName: "PublishingDateFilter__ClearFilterButton",
|
|
135643
138014
|
componentId: "sc-zv88cu-2"
|
|
135644
|
-
})(templateObject_4 || (templateObject_4 = __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"])));
|
|
138015
|
+
})(templateObject_4$1 || (templateObject_4$1 = __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"])));
|
|
135645
138016
|
|
|
135646
138017
|
var StyledDateTimePicker = _styled__default["default"](DateTimePicker).withConfig({
|
|
135647
138018
|
displayName: "PublishingDateFilter__StyledDateTimePicker",
|
|
@@ -135655,7 +138026,7 @@
|
|
|
135655
138026
|
return p.theme.palette.themePrimary;
|
|
135656
138027
|
});
|
|
135657
138028
|
|
|
135658
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
138029
|
+
var templateObject_1$2, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5, templateObject_6;
|
|
135659
138030
|
|
|
135660
138031
|
var ClearAllFiltersButton = function ClearAllFiltersButton(_a) {
|
|
135661
138032
|
var onClick = _a.onClick;
|
|
@@ -135668,6 +138039,137 @@
|
|
|
135668
138039
|
}, void 0);
|
|
135669
138040
|
};
|
|
135670
138041
|
|
|
138042
|
+
var ToolbarFilterCalloutButton = function ToolbarFilterCalloutButton(_a) {
|
|
138043
|
+
var buttonText = _a.buttonText,
|
|
138044
|
+
buttonContent = _a.buttonContent,
|
|
138045
|
+
isActive = _a.isActive,
|
|
138046
|
+
handleClearFilter = _a.handleClearFilter,
|
|
138047
|
+
className = _a.className,
|
|
138048
|
+
children = _a.children;
|
|
138049
|
+
var hostRef = React$d.useRef();
|
|
138050
|
+
|
|
138051
|
+
var _b = React$d.useState(false),
|
|
138052
|
+
showCallout = _b[0],
|
|
138053
|
+
setShowCallout = _b[1];
|
|
138054
|
+
|
|
138055
|
+
return jsxRuntime.jsxs("div", __assign$g({
|
|
138056
|
+
ref: hostRef,
|
|
138057
|
+
className: className
|
|
138058
|
+
}, {
|
|
138059
|
+
children: [jsxRuntime.jsx(Button, __assign$g({
|
|
138060
|
+
iconProps: {
|
|
138061
|
+
iconName: showCallout ? 'ChevronUp' : 'ChevronDown'
|
|
138062
|
+
},
|
|
138063
|
+
text: !buttonContent ? buttonText : undefined,
|
|
138064
|
+
onClick: function () {
|
|
138065
|
+
return setShowCallout(!showCallout);
|
|
138066
|
+
},
|
|
138067
|
+
isActive: isActive
|
|
138068
|
+
}, {
|
|
138069
|
+
children: buttonContent
|
|
138070
|
+
}), void 0), showCallout && jsxRuntime.jsx(Callout, __assign$g({
|
|
138071
|
+
target: hostRef.current,
|
|
138072
|
+
onDismiss: function () {
|
|
138073
|
+
return setShowCallout(false);
|
|
138074
|
+
},
|
|
138075
|
+
isBeakVisible: false,
|
|
138076
|
+
calloutWidth: 240,
|
|
138077
|
+
styles: {
|
|
138078
|
+
calloutMain: {
|
|
138079
|
+
padding: spacingM
|
|
138080
|
+
}
|
|
138081
|
+
}
|
|
138082
|
+
}, {
|
|
138083
|
+
children: jsxRuntime.jsxs(Host, {
|
|
138084
|
+
children: [children, jsxRuntime.jsx(ClearFilterButton, {
|
|
138085
|
+
text: "Clear filter",
|
|
138086
|
+
iconProps: {
|
|
138087
|
+
iconName: 'ClearFilter'
|
|
138088
|
+
},
|
|
138089
|
+
onClick: handleClearFilter
|
|
138090
|
+
}, void 0)]
|
|
138091
|
+
}, void 0)
|
|
138092
|
+
}), void 0)]
|
|
138093
|
+
}), void 0);
|
|
138094
|
+
};
|
|
138095
|
+
|
|
138096
|
+
var Host = _styled__default["default"].div.withConfig({
|
|
138097
|
+
displayName: "ToolbarFilterCalloutButton__Host",
|
|
138098
|
+
componentId: "sc-fu36ma-0"
|
|
138099
|
+
})(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
138100
|
+
|
|
138101
|
+
var Button = _styled__default["default"](ActionButton).withConfig({
|
|
138102
|
+
displayName: "ToolbarFilterCalloutButton__Button",
|
|
138103
|
+
componentId: "sc-fu36ma-1"
|
|
138104
|
+
})(templateObject_3 || (templateObject_3 = __makeTemplateObject$l(["\n ", "\n i {\n order: 1;\n }\n"], ["\n ", "\n i {\n order: 1;\n }\n"])), function (p) {
|
|
138105
|
+
return p.isActive && _styled.css(templateObject_2 || (templateObject_2 = __makeTemplateObject$l(["\n font-weight: bold;\n "], ["\n font-weight: bold;\n "])));
|
|
138106
|
+
});
|
|
138107
|
+
|
|
138108
|
+
var ClearFilterButton = _styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({
|
|
138109
|
+
displayName: "ToolbarFilterCalloutButton__ClearFilterButton",
|
|
138110
|
+
componentId: "sc-fu36ma-2"
|
|
138111
|
+
})(templateObject_4 || (templateObject_4 = __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"])));
|
|
138112
|
+
|
|
138113
|
+
var templateObject_1$1, templateObject_2, templateObject_3, templateObject_4;
|
|
138114
|
+
|
|
138115
|
+
var KeywordsFilter = function KeywordsFilter() {
|
|
138116
|
+
var _a;
|
|
138117
|
+
|
|
138118
|
+
var formatMessage = useIntl().formatMessage;
|
|
138119
|
+
|
|
138120
|
+
var _b = React$d.useContext(FilterContext),
|
|
138121
|
+
filter = _b.filter,
|
|
138122
|
+
onChange = _b.onChange;
|
|
138123
|
+
|
|
138124
|
+
return jsxRuntime.jsx(ToolbarFilterCalloutButton, __assign$g({
|
|
138125
|
+
buttonText: formatMessage({
|
|
138126
|
+
id: 'FilterPanel.keywordFilter'
|
|
138127
|
+
}),
|
|
138128
|
+
buttonContent: getButtonContent(),
|
|
138129
|
+
handleClearFilter: function () {
|
|
138130
|
+
return onChange(__assign$g(__assign$g({}, filter), {
|
|
138131
|
+
keywords: null
|
|
138132
|
+
}));
|
|
138133
|
+
},
|
|
138134
|
+
isActive: ((_a = filter === null || filter === void 0 ? void 0 : filter.keywords) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
138135
|
+
}, {
|
|
138136
|
+
children: jsxRuntime.jsx(StyledKeywordPicker, {
|
|
138137
|
+
value: (filter === null || filter === void 0 ? void 0 : filter.keywords) || [],
|
|
138138
|
+
onChange: function (keywords) {
|
|
138139
|
+
return onChange(__assign$g(__assign$g({}, filter), {
|
|
138140
|
+
keywords: keywords
|
|
138141
|
+
}));
|
|
138142
|
+
},
|
|
138143
|
+
showSelectionToggle: true
|
|
138144
|
+
}, void 0)
|
|
138145
|
+
}), void 0);
|
|
138146
|
+
|
|
138147
|
+
function getButtonContent() {
|
|
138148
|
+
var _a;
|
|
138149
|
+
|
|
138150
|
+
var keywordsLength = (_a = filter === null || filter === void 0 ? void 0 : filter.keywords) === null || _a === void 0 ? void 0 : _a.length;
|
|
138151
|
+
|
|
138152
|
+
if (!keywordsLength) {
|
|
138153
|
+
return undefined;
|
|
138154
|
+
}
|
|
138155
|
+
|
|
138156
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
138157
|
+
children: [jsxRuntime.jsx(KeywordTitle, {
|
|
138158
|
+
keywordName: filter.keywords[0].name
|
|
138159
|
+
}, void 0), "\u00A0", keywordsLength > 1 && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
138160
|
+
children: ["(+", keywordsLength - 1, ")\u00A0"]
|
|
138161
|
+
}, void 0)]
|
|
138162
|
+
}, void 0);
|
|
138163
|
+
}
|
|
138164
|
+
};
|
|
138165
|
+
|
|
138166
|
+
var StyledKeywordPicker = _styled__default["default"](KeywordPicker).withConfig({
|
|
138167
|
+
displayName: "KeywordsFilter__StyledKeywordPicker",
|
|
138168
|
+
componentId: "sc-1aoeg5i-0"
|
|
138169
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject$l(["\n margin-bottom: 20px;\n\n .keyword-picker-tree div:last-child {\n margin-bottom: 0;\n }\n"], ["\n margin-bottom: 20px;\n\n .keyword-picker-tree div:last-child {\n margin-bottom: 0;\n }\n"])));
|
|
138170
|
+
|
|
138171
|
+
var templateObject_1;
|
|
138172
|
+
|
|
135671
138173
|
/* @generated */
|
|
135672
138174
|
// prettier-ignore
|
|
135673
138175
|
if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
|
|
@@ -152450,12 +154952,15 @@
|
|
|
152450
154952
|
"FilterPanel.publishingDate": "Publishing date",
|
|
152451
154953
|
"FilterPanel.publishingDateFrom": "From",
|
|
152452
154954
|
"FilterPanel.publishingDateTo": "To",
|
|
154955
|
+
"FilterPanel.publishingDateBefore": "Before",
|
|
154956
|
+
"FilterPanel.publishingDateAfter": "After",
|
|
152453
154957
|
"FilterPanel.publishingDatePlaceholder": "Date",
|
|
152454
154958
|
"FilterPanel.publishingDateShortcuts": "Date range shortcuts",
|
|
152455
154959
|
"FilterPanel.publishingDateShortcuts.yesterday": "Yesterday",
|
|
152456
154960
|
"FilterPanel.publishingDateShortcuts.thisWeek": "This week",
|
|
152457
154961
|
"FilterPanel.publishingDateShortcuts.lastWeek": "Last week",
|
|
152458
154962
|
"FilterPanel.publishingDateShortcuts.lastMonth": "Last month",
|
|
154963
|
+
"FilterPanel.keywordFilter": "Keywords",
|
|
152459
154964
|
"FilterPanel.itemType": "Items",
|
|
152460
154965
|
"Themes.title": "Color Theme",
|
|
152461
154966
|
"Themes.selectorDescription": "Select a color theme for LiveTiles Reach.",
|
|
@@ -212935,6 +215440,7 @@
|
|
|
212935
215440
|
exports.ChannelFilter = ChannelFilter;
|
|
212936
215441
|
exports.ClearAllFiltersButton = ClearAllFiltersButton;
|
|
212937
215442
|
exports.EventDetail = EventDetail;
|
|
215443
|
+
exports.KeywordsFilter = KeywordsFilter;
|
|
212938
215444
|
exports.ManageChannels = ManageChannels;
|
|
212939
215445
|
exports.NewsDetail = NewsDetail;
|
|
212940
215446
|
exports.NewsDetailPreview = NewsDetailPreview;
|