@bigbinary/neeto-commons-frontend 2.0.22 → 2.0.23
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/README.md +1 -1
- package/initializers.cjs.js +2 -1
- package/initializers.js +2 -1
- package/package.json +2 -1
- package/react-utils.cjs.js +810 -1978
- package/react-utils.d.ts +5 -0
- package/react-utils.js +799 -1968
package/react-utils.cjs.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var React
|
|
5
|
+
var React = require('react');
|
|
6
6
|
var neetoui = require('@bigbinary/neetoui');
|
|
7
|
+
var i18next = require('i18next');
|
|
7
8
|
var ramda = require('ramda');
|
|
8
9
|
var reactI18next = require('react-i18next');
|
|
9
|
-
var i18next = require('i18next');
|
|
10
10
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
11
11
|
var layouts = require('@bigbinary/neetoui/layouts');
|
|
12
12
|
var formik$1 = require('@bigbinary/neetoui/formik');
|
|
@@ -23,6 +23,7 @@ var customParseFormat = require('dayjs/plugin/customParseFormat');
|
|
|
23
23
|
var timezone = require('dayjs/plugin/timezone');
|
|
24
24
|
var utc = require('dayjs/plugin/utc');
|
|
25
25
|
var weekday = require('dayjs/plugin/weekday');
|
|
26
|
+
var reactHelmet = require('react-helmet');
|
|
26
27
|
|
|
27
28
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
28
29
|
|
|
@@ -59,8 +60,8 @@ function _mergeNamespaces(n, m) {
|
|
|
59
60
|
return Object.freeze(n);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
var React__default
|
|
63
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React
|
|
63
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
64
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
64
65
|
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
65
66
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
66
67
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
@@ -1354,10 +1355,10 @@ var BROWSER_UPGRADE_PAGE_LINKS = {
|
|
|
1354
1355
|
};
|
|
1355
1356
|
|
|
1356
1357
|
var ContactUs = function ContactUs() {
|
|
1357
|
-
return /*#__PURE__*/React__default
|
|
1358
|
+
return /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
1358
1359
|
i18nKey: "neetoCommons.browserSupport.contactUs.main",
|
|
1359
1360
|
components: {
|
|
1360
|
-
button: /*#__PURE__*/React__default
|
|
1361
|
+
button: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1361
1362
|
className: "ml-1",
|
|
1362
1363
|
label: i18next.t("neetoCommons.browserSupport.contactUs.buttonLabel"),
|
|
1363
1364
|
style: "link",
|
|
@@ -1463,10 +1464,10 @@ var getBrowserMajorVersion = function getBrowserMajorVersion(browserVersion) {
|
|
|
1463
1464
|
var UnsupportedBrowser = function UnsupportedBrowser(_ref) {
|
|
1464
1465
|
var browserName = _ref.browserName,
|
|
1465
1466
|
browserVersion = _ref.browserVersion;
|
|
1466
|
-
return /*#__PURE__*/React__default
|
|
1467
|
+
return /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
1467
1468
|
i18nKey: "neetoCommons.browserSupport.unsupportedBrowser",
|
|
1468
1469
|
components: {
|
|
1469
|
-
contactUs: /*#__PURE__*/React__default
|
|
1470
|
+
contactUs: /*#__PURE__*/React__default["default"].createElement(ContactUs, null)
|
|
1470
1471
|
},
|
|
1471
1472
|
values: {
|
|
1472
1473
|
browserName: browserName,
|
|
@@ -1477,10 +1478,10 @@ var UnsupportedBrowser = function UnsupportedBrowser(_ref) {
|
|
|
1477
1478
|
|
|
1478
1479
|
var DownloadLink = function DownloadLink(_ref) {
|
|
1479
1480
|
var link = _ref.link;
|
|
1480
|
-
return /*#__PURE__*/React__default
|
|
1481
|
+
return /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
1481
1482
|
i18nKey: "neetoCommons.browserSupport.downloadLink.main",
|
|
1482
1483
|
components: {
|
|
1483
|
-
button: /*#__PURE__*/React__default
|
|
1484
|
+
button: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1484
1485
|
label: i18next.t("neetoCommons.browserSupport.downloadLink.buttonLabel"),
|
|
1485
1486
|
style: "link",
|
|
1486
1487
|
href: link
|
|
@@ -1494,13 +1495,13 @@ var UnsupportedBrowserVersion = function UnsupportedBrowserVersion(_ref) {
|
|
|
1494
1495
|
browserVersion = _ref.browserVersion,
|
|
1495
1496
|
requiredMinBrowserVersion = _ref.requiredMinBrowserVersion,
|
|
1496
1497
|
downloadPageLink = _ref.downloadPageLink;
|
|
1497
|
-
return /*#__PURE__*/React__default
|
|
1498
|
+
return /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
1498
1499
|
i18nKey: "neetoCommons.browserSupport.unsupportedBrowserVersion",
|
|
1499
1500
|
components: {
|
|
1500
|
-
downloadLink: /*#__PURE__*/React__default
|
|
1501
|
+
downloadLink: /*#__PURE__*/React__default["default"].createElement(DownloadLink, {
|
|
1501
1502
|
link: downloadPageLink
|
|
1502
1503
|
}),
|
|
1503
|
-
contactUs: /*#__PURE__*/React__default
|
|
1504
|
+
contactUs: /*#__PURE__*/React__default["default"].createElement(ContactUs, null)
|
|
1504
1505
|
},
|
|
1505
1506
|
values: {
|
|
1506
1507
|
browserName: browserName,
|
|
@@ -1514,33 +1515,33 @@ var BrowserSupport = function BrowserSupport(_ref) {
|
|
|
1514
1515
|
var _ref$overrides = _ref.overrides,
|
|
1515
1516
|
overrides = _ref$overrides === void 0 ? {} : _ref$overrides;
|
|
1516
1517
|
var platformInfo = platform.parse(navigator.userAgent);
|
|
1517
|
-
var browserName = platformInfo.name;
|
|
1518
|
-
var browserVersion = platformInfo.version;
|
|
1518
|
+
var browserName = platformInfo.name || i18next.t("neetoCommons.browserSupport.unknownBrowserMsg");
|
|
1519
|
+
var browserVersion = platformInfo.version || "";
|
|
1519
1520
|
var supportedBrowserVersionsMap = ramda.mergeLeft(overrides, DEFAULT_MINIMUM_SUPPORTED_BROWSER_VERSIONS);
|
|
1520
1521
|
var requiredMinBrowserVersion = getRequiredMinBrowserVersion(browserName, supportedBrowserVersionsMap);
|
|
1521
1522
|
var isUsersBrowserSupported = isVersionSupported(browserVersion, requiredMinBrowserVersion);
|
|
1522
1523
|
var downloadPageLink = buildDownloadPageLink(browserName);
|
|
1523
1524
|
var isUnsupportedBrowserVersion = isBrowserNameInTheSupportedList(browserName, supportedBrowserVersionsMap);
|
|
1524
1525
|
if (isUsersBrowserSupported) return null;
|
|
1525
|
-
return /*#__PURE__*/React__default
|
|
1526
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Callout, {
|
|
1526
1527
|
className: "justify-center gap-0 rounded-none",
|
|
1527
1528
|
"data-testid": "browser-support-callout",
|
|
1528
1529
|
style: "danger"
|
|
1529
|
-
}, /*#__PURE__*/React__default
|
|
1530
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1530
1531
|
style: "body2"
|
|
1531
|
-
}, isUnsupportedBrowserVersion ? /*#__PURE__*/React__default
|
|
1532
|
+
}, isUnsupportedBrowserVersion ? /*#__PURE__*/React__default["default"].createElement(UnsupportedBrowserVersion, {
|
|
1532
1533
|
browserName: browserName,
|
|
1533
1534
|
browserVersion: browserVersion,
|
|
1534
1535
|
requiredMinBrowserVersion: requiredMinBrowserVersion,
|
|
1535
1536
|
downloadPageLink: downloadPageLink
|
|
1536
|
-
}) : /*#__PURE__*/React__default
|
|
1537
|
+
}) : /*#__PURE__*/React__default["default"].createElement(UnsupportedBrowser, {
|
|
1537
1538
|
browserName: browserName,
|
|
1538
1539
|
browserVersion: browserVersion
|
|
1539
1540
|
})));
|
|
1540
1541
|
};
|
|
1541
1542
|
|
|
1542
|
-
function _extends$
|
|
1543
|
-
_extends$
|
|
1543
|
+
function _extends$5() {
|
|
1544
|
+
_extends$5 = Object.assign ? Object.assign.bind() : function (target) {
|
|
1544
1545
|
for (var i = 1; i < arguments.length; i++) {
|
|
1545
1546
|
var source = arguments[i];
|
|
1546
1547
|
|
|
@@ -1553,17 +1554,17 @@ function _extends$6() {
|
|
|
1553
1554
|
|
|
1554
1555
|
return target;
|
|
1555
1556
|
};
|
|
1556
|
-
return _extends$
|
|
1557
|
+
return _extends$5.apply(this, arguments);
|
|
1557
1558
|
}
|
|
1558
1559
|
|
|
1559
|
-
function _typeof$
|
|
1560
|
+
function _typeof$3(obj) {
|
|
1560
1561
|
"@babel/helpers - typeof";
|
|
1561
1562
|
|
|
1562
|
-
return _typeof$
|
|
1563
|
+
return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1563
1564
|
return typeof obj;
|
|
1564
1565
|
} : function (obj) {
|
|
1565
1566
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1566
|
-
}, _typeof$
|
|
1567
|
+
}, _typeof$3(obj);
|
|
1567
1568
|
}
|
|
1568
1569
|
|
|
1569
1570
|
/**
|
|
@@ -1632,7 +1633,7 @@ var matchesImpl = function matchesImpl(pattern, object) {
|
|
|
1632
1633
|
if (object === pattern) return true;
|
|
1633
1634
|
if (typeof pattern === "function" && pattern(object, __parent)) return true;
|
|
1634
1635
|
if (ramda.isNil(pattern) || ramda.isNil(object)) return false;
|
|
1635
|
-
if (_typeof$
|
|
1636
|
+
if (_typeof$3(pattern) !== "object") return false;
|
|
1636
1637
|
return Object.entries(pattern).every(function (_ref) {
|
|
1637
1638
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
1638
1639
|
key = _ref2[0],
|
|
@@ -1655,12 +1656,12 @@ var filterNonNull = function filterNonNull(object) {
|
|
|
1655
1656
|
k = _ref8[0],
|
|
1656
1657
|
v = _ref8[1];
|
|
1657
1658
|
|
|
1658
|
-
return [k, _typeof$
|
|
1659
|
+
return [k, _typeof$3(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
|
|
1659
1660
|
}));
|
|
1660
1661
|
};
|
|
1661
1662
|
nullSafe(filterNonNull);
|
|
1662
1663
|
|
|
1663
|
-
function _defineProperty$
|
|
1664
|
+
function _defineProperty$1(obj, key, value) {
|
|
1664
1665
|
if (key in obj) {
|
|
1665
1666
|
Object.defineProperty(obj, key, {
|
|
1666
1667
|
value: value,
|
|
@@ -1688,7 +1689,7 @@ var getStorageValue = function getStorageValue(key, defaultValue) {
|
|
|
1688
1689
|
};
|
|
1689
1690
|
|
|
1690
1691
|
var useLocalStorage = function useLocalStorage(key, defaultValue) {
|
|
1691
|
-
var _useState = React
|
|
1692
|
+
var _useState = React.useState(function () {
|
|
1692
1693
|
return getStorageValue(key, defaultValue);
|
|
1693
1694
|
}),
|
|
1694
1695
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1749,7 +1750,7 @@ var Columns = function Columns(_ref) {
|
|
|
1749
1750
|
hiddenColumns = _useLocalStorage2[0],
|
|
1750
1751
|
setHiddenColumns = _useLocalStorage2[1];
|
|
1751
1752
|
|
|
1752
|
-
var _useState = React
|
|
1753
|
+
var _useState = React.useState(""),
|
|
1753
1754
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1754
1755
|
searchTerm = _useState2[0],
|
|
1755
1756
|
setSearchTerm = _useState2[1];
|
|
@@ -1769,12 +1770,12 @@ var Columns = function Columns(_ref) {
|
|
|
1769
1770
|
return setSearchTerm(value);
|
|
1770
1771
|
};
|
|
1771
1772
|
|
|
1772
|
-
React
|
|
1773
|
+
React.useEffect(function () {
|
|
1773
1774
|
onChange(removeBy({
|
|
1774
1775
|
dataIndex: ramda.includes(ramda.__, hiddenColumns)
|
|
1775
1776
|
}, columnData));
|
|
1776
1777
|
}, [columnData, hiddenColumns]);
|
|
1777
|
-
return /*#__PURE__*/React__default
|
|
1778
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, _extends$5({
|
|
1778
1779
|
buttonSize: "medium",
|
|
1779
1780
|
buttonStyle: "secondary",
|
|
1780
1781
|
closeOnSelect: false,
|
|
@@ -1783,24 +1784,24 @@ var Columns = function Columns(_ref) {
|
|
|
1783
1784
|
return setSearchTerm("");
|
|
1784
1785
|
},
|
|
1785
1786
|
position: "bottom-end"
|
|
1786
|
-
}, dropdownProps), /*#__PURE__*/React__default
|
|
1787
|
+
}, dropdownProps), /*#__PURE__*/React__default["default"].createElement(Menu, null, /*#__PURE__*/React__default["default"].createElement("div", null, isSearchable && /*#__PURE__*/React__default["default"].createElement(neetoui.Input, _extends$5({
|
|
1787
1788
|
className: "neeto-ui-px-3 neeto-ui-py-2",
|
|
1788
1789
|
"data-cy": "neeto-ui-columns-search",
|
|
1789
1790
|
onChange: handleSearch,
|
|
1790
1791
|
placeholder: "Search columns",
|
|
1791
|
-
prefix: /*#__PURE__*/React__default
|
|
1792
|
+
prefix: /*#__PURE__*/React__default["default"].createElement(neetoIcons.Search, null),
|
|
1792
1793
|
type: "search",
|
|
1793
1794
|
value: searchTerm
|
|
1794
1795
|
}, searchProps)), isNotEmpty(filteredColumns) ? filteredColumns.map(function (_ref4) {
|
|
1795
1796
|
var dataIndex = _ref4.dataIndex,
|
|
1796
1797
|
key = _ref4.key,
|
|
1797
1798
|
title = _ref4.title;
|
|
1798
|
-
return /*#__PURE__*/React__default
|
|
1799
|
+
return /*#__PURE__*/React__default["default"].createElement(MenuItem, {
|
|
1799
1800
|
key: key
|
|
1800
|
-
}, /*#__PURE__*/React__default
|
|
1801
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, {
|
|
1801
1802
|
className: "neeto-ui-w-full neeto-ui-px-3 neeto-ui-py-2 hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer",
|
|
1802
1803
|
htmlFor: dataIndex
|
|
1803
|
-
}, /*#__PURE__*/React__default
|
|
1804
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Checkbox, _extends$5({
|
|
1804
1805
|
id: dataIndex,
|
|
1805
1806
|
name: dataIndex,
|
|
1806
1807
|
checked: !hiddenColumns.includes(dataIndex),
|
|
@@ -1808,9 +1809,9 @@ var Columns = function Columns(_ref) {
|
|
|
1808
1809
|
label: title,
|
|
1809
1810
|
onChange: handleChange
|
|
1810
1811
|
}, checkboxProps))));
|
|
1811
|
-
}) : /*#__PURE__*/React__default
|
|
1812
|
+
}) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1812
1813
|
className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2"
|
|
1813
|
-
}, noColumnMessage), !!actionBlock && /*#__PURE__*/React__default
|
|
1814
|
+
}, noColumnMessage), !!actionBlock && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Divider, null), actionBlock))));
|
|
1814
1815
|
};
|
|
1815
1816
|
|
|
1816
1817
|
const createStoreImpl = (createState) => {
|
|
@@ -1863,7 +1864,7 @@ var hasRequiredUseSyncExternalStoreShim_production_min;
|
|
|
1863
1864
|
function requireUseSyncExternalStoreShim_production_min () {
|
|
1864
1865
|
if (hasRequiredUseSyncExternalStoreShim_production_min) return useSyncExternalStoreShim_production_min;
|
|
1865
1866
|
hasRequiredUseSyncExternalStoreShim_production_min = 1;
|
|
1866
|
-
var e=React__default
|
|
1867
|
+
var e=React__default["default"];function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c});},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c});})},[a]);p(d);return d}
|
|
1867
1868
|
function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return !k(a,d)}catch(f){return !0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;useSyncExternalStoreShim_production_min.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;
|
|
1868
1869
|
return useSyncExternalStoreShim_production_min;
|
|
1869
1870
|
}
|
|
@@ -1897,7 +1898,7 @@ function requireUseSyncExternalStoreShim_development () {
|
|
|
1897
1898
|
) {
|
|
1898
1899
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
1899
1900
|
}
|
|
1900
|
-
var React = React__default
|
|
1901
|
+
var React = React__default["default"];
|
|
1901
1902
|
|
|
1902
1903
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1903
1904
|
|
|
@@ -2145,7 +2146,7 @@ var hasRequiredWithSelector_production_min;
|
|
|
2145
2146
|
function requireWithSelector_production_min () {
|
|
2146
2147
|
if (hasRequiredWithSelector_production_min) return withSelector_production_min;
|
|
2147
2148
|
hasRequiredWithSelector_production_min = 1;
|
|
2148
|
-
var h=React__default
|
|
2149
|
+
var h=React__default["default"],n=requireShim();function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
|
|
2149
2150
|
withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f;}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return [function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
|
|
2150
2151
|
u(function(){f.hasValue=!0;f.value=d;},[d]);w(d);return d};
|
|
2151
2152
|
return withSelector_production_min;
|
|
@@ -2180,7 +2181,7 @@ function requireWithSelector_development () {
|
|
|
2180
2181
|
) {
|
|
2181
2182
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
2182
2183
|
}
|
|
2183
|
-
var React = React__default
|
|
2184
|
+
var React = React__default["default"];
|
|
2184
2185
|
var shim = requireShim();
|
|
2185
2186
|
|
|
2186
2187
|
/**
|
|
@@ -2343,7 +2344,7 @@ function useStore(api, selector = api.getState, equalityFn) {
|
|
|
2343
2344
|
selector,
|
|
2344
2345
|
equalityFn
|
|
2345
2346
|
);
|
|
2346
|
-
React
|
|
2347
|
+
React.useDebugValue(slice);
|
|
2347
2348
|
return slice;
|
|
2348
2349
|
}
|
|
2349
2350
|
const createImpl = (createState) => {
|
|
@@ -2367,12 +2368,12 @@ var useErrorDisplayStore = create$7(function () {
|
|
|
2367
2368
|
function useDebounce(value) {
|
|
2368
2369
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
2369
2370
|
|
|
2370
|
-
var _useState = React
|
|
2371
|
+
var _useState = React.useState(value),
|
|
2371
2372
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2372
2373
|
debouncedValue = _useState2[0],
|
|
2373
2374
|
setDebouncedValue = _useState2[1];
|
|
2374
2375
|
|
|
2375
|
-
React
|
|
2376
|
+
React.useEffect(function () {
|
|
2376
2377
|
var handler = setTimeout(function () {
|
|
2377
2378
|
setDebouncedValue(value);
|
|
2378
2379
|
}, delay);
|
|
@@ -2385,7 +2386,7 @@ function useDebounce(value) {
|
|
|
2385
2386
|
|
|
2386
2387
|
var useFuncDebounce = function useFuncDebounce(func) {
|
|
2387
2388
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
2388
|
-
var timer = React
|
|
2389
|
+
var timer = React.useRef(null);
|
|
2389
2390
|
|
|
2390
2391
|
var debouncedFunc = function debouncedFunc() {
|
|
2391
2392
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -2406,7 +2407,7 @@ var useFuncDebounce = function useFuncDebounce(func) {
|
|
|
2406
2407
|
};
|
|
2407
2408
|
|
|
2408
2409
|
var useForceUpdate = function useForceUpdate() {
|
|
2409
|
-
var _useState = React
|
|
2410
|
+
var _useState = React.useState(0),
|
|
2410
2411
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2411
2412
|
setValue = _useState2[1];
|
|
2412
2413
|
|
|
@@ -2420,13 +2421,13 @@ var useForceUpdate = function useForceUpdate() {
|
|
|
2420
2421
|
var useIsElementVisibleInDom = function useIsElementVisibleInDom(target) {
|
|
2421
2422
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
2422
2423
|
|
|
2423
|
-
var _useState = React
|
|
2424
|
+
var _useState = React.useState(false),
|
|
2424
2425
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2425
2426
|
isIntersecting = _useState2[0],
|
|
2426
2427
|
setIntersecting = _useState2[1];
|
|
2427
2428
|
|
|
2428
2429
|
var forceUpdate = useForceUpdate();
|
|
2429
|
-
React
|
|
2430
|
+
React.useEffect(function () {
|
|
2430
2431
|
if (!target) return forceUpdate();
|
|
2431
2432
|
var observer = new IntersectionObserver(function (_ref) {
|
|
2432
2433
|
var _ref2 = _slicedToArray(_ref, 1),
|
|
@@ -2443,7 +2444,7 @@ var useIsElementVisibleInDom = function useIsElementVisibleInDom(target) {
|
|
|
2443
2444
|
};
|
|
2444
2445
|
|
|
2445
2446
|
var useOnClickOutside = function useOnClickOutside(ref, handler) {
|
|
2446
|
-
React
|
|
2447
|
+
React.useEffect(function () {
|
|
2447
2448
|
var listener = function listener(event) {
|
|
2448
2449
|
// Do nothing if clicking ref's element or descendent elements
|
|
2449
2450
|
if (!ref.current || ref.current.contains(event.target)) {
|
|
@@ -2463,8 +2464,8 @@ var useOnClickOutside = function useOnClickOutside(ref, handler) {
|
|
|
2463
2464
|
};
|
|
2464
2465
|
|
|
2465
2466
|
var usePrevious = function usePrevious(value) {
|
|
2466
|
-
var ref = React
|
|
2467
|
-
React
|
|
2467
|
+
var ref = React.useRef(value);
|
|
2468
|
+
React.useEffect(function () {
|
|
2468
2469
|
ref.current = value;
|
|
2469
2470
|
}, [value]);
|
|
2470
2471
|
return ref.current;
|
|
@@ -2472,8 +2473,8 @@ var usePrevious = function usePrevious(value) {
|
|
|
2472
2473
|
|
|
2473
2474
|
var useUpdateEffect = function useUpdateEffect(callback) {
|
|
2474
2475
|
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
2475
|
-
var isInitialMount = React
|
|
2476
|
-
React
|
|
2476
|
+
var isInitialMount = React.useRef(true);
|
|
2477
|
+
React.useEffect(function () {
|
|
2477
2478
|
if (isInitialMount.current) {
|
|
2478
2479
|
isInitialMount.current = false;
|
|
2479
2480
|
return;
|
|
@@ -2536,7 +2537,7 @@ function _asyncToGenerator$1(fn) {
|
|
|
2536
2537
|
|
|
2537
2538
|
var regeneratorRuntime$2 = {exports: {}};
|
|
2538
2539
|
|
|
2539
|
-
var _typeof$
|
|
2540
|
+
var _typeof$2 = {exports: {}};
|
|
2540
2541
|
|
|
2541
2542
|
(function (module) {
|
|
2542
2543
|
function _typeof(obj) {
|
|
@@ -2550,10 +2551,10 @@ var _typeof$3 = {exports: {}};
|
|
|
2550
2551
|
}
|
|
2551
2552
|
|
|
2552
2553
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
2553
|
-
} (_typeof$
|
|
2554
|
+
} (_typeof$2));
|
|
2554
2555
|
|
|
2555
2556
|
(function (module) {
|
|
2556
|
-
var _typeof = _typeof$
|
|
2557
|
+
var _typeof = _typeof$2.exports["default"];
|
|
2557
2558
|
|
|
2558
2559
|
function _regeneratorRuntime() {
|
|
2559
2560
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
@@ -3594,27 +3595,27 @@ var TagBlock = function TagBlock(_ref) {
|
|
|
3594
3595
|
|
|
3595
3596
|
var isTxtValidated = status === "active" || status === "pending_cname_validation";
|
|
3596
3597
|
var camelCasedStatus = snakeToCamelCase(status || "");
|
|
3597
|
-
return /*#__PURE__*/React__default
|
|
3598
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3598
3599
|
className: classnames("flex gap-2", {
|
|
3599
3600
|
"flex-col items-start": stacked
|
|
3600
3601
|
})
|
|
3601
|
-
}, status === "failed" ? /*#__PURE__*/React__default
|
|
3602
|
+
}, status === "failed" ? /*#__PURE__*/React__default["default"].createElement(neetoui.Tag, {
|
|
3602
3603
|
label: t("neetoCommons.customDomain.status.".concat(camelCasedStatus)),
|
|
3603
3604
|
style: "secondary",
|
|
3604
3605
|
indicatorStyle: "danger"
|
|
3605
|
-
}) : /*#__PURE__*/React__default
|
|
3606
|
+
}) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Tag, {
|
|
3606
3607
|
label: t("neetoCommons.customDomain.status.txt.".concat(camelCasedStatus)),
|
|
3607
3608
|
style: "secondary",
|
|
3608
3609
|
indicatorStyle: isTxtValidated ? "success" : "warning"
|
|
3609
|
-
}), isTxtValidated && /*#__PURE__*/React__default
|
|
3610
|
+
}), isTxtValidated && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3610
3611
|
className: classnames("flex items-center justify-between gap-2", {
|
|
3611
3612
|
"w-full": stacked
|
|
3612
3613
|
})
|
|
3613
|
-
}, /*#__PURE__*/React__default
|
|
3614
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Tag, {
|
|
3614
3615
|
label: t("neetoCommons.customDomain.status.cname.".concat(camelCasedStatus)),
|
|
3615
3616
|
style: "secondary",
|
|
3616
3617
|
indicatorStyle: status === "active" ? "success" : "warning"
|
|
3617
|
-
}), isCnameRecordsAdded && status === "pending_cname_validation" && /*#__PURE__*/React__default
|
|
3618
|
+
}), isCnameRecordsAdded && status === "pending_cname_validation" && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3618
3619
|
label: t("neetoCommons.customDomain.validation.buttonLabel.cnameCheck"),
|
|
3619
3620
|
className: "text-xs",
|
|
3620
3621
|
style: "link",
|
|
@@ -3636,7 +3637,7 @@ var renderColumnData = function renderColumnData(enableManagePane, enableDeleteA
|
|
|
3636
3637
|
dataIndex: "status",
|
|
3637
3638
|
key: "status",
|
|
3638
3639
|
render: function render(status) {
|
|
3639
|
-
return /*#__PURE__*/React__default
|
|
3640
|
+
return /*#__PURE__*/React__default["default"].createElement(TagBlock, {
|
|
3640
3641
|
status: status
|
|
3641
3642
|
});
|
|
3642
3643
|
},
|
|
@@ -3645,11 +3646,11 @@ var renderColumnData = function renderColumnData(enableManagePane, enableDeleteA
|
|
|
3645
3646
|
id: "actions",
|
|
3646
3647
|
width: "10%",
|
|
3647
3648
|
render: function render(_, customDomain) {
|
|
3648
|
-
return /*#__PURE__*/React__default
|
|
3649
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3649
3650
|
onClick: function onClick(e) {
|
|
3650
3651
|
return e.stopPropagation();
|
|
3651
3652
|
}
|
|
3652
|
-
}, /*#__PURE__*/React__default
|
|
3653
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
|
|
3653
3654
|
autoWidth: true,
|
|
3654
3655
|
icon: neetoIcons.MenuHorizontal,
|
|
3655
3656
|
buttonProps: {
|
|
@@ -3657,11 +3658,11 @@ var renderColumnData = function renderColumnData(enableManagePane, enableDeleteA
|
|
|
3657
3658
|
},
|
|
3658
3659
|
position: "bottom-end",
|
|
3659
3660
|
strategy: "fixed"
|
|
3660
|
-
}, /*#__PURE__*/React__default
|
|
3661
|
+
}, /*#__PURE__*/React__default["default"].createElement(Menu, null, /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
|
|
3661
3662
|
onClick: function onClick() {
|
|
3662
3663
|
return enableManagePane(customDomain);
|
|
3663
3664
|
}
|
|
3664
|
-
}, i18next.t("neetoCommons.common.actions.edit")), /*#__PURE__*/React__default
|
|
3665
|
+
}, i18next.t("neetoCommons.common.actions.edit")), /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
|
|
3665
3666
|
onClick: function onClick() {
|
|
3666
3667
|
return enableDeleteAlert(customDomain);
|
|
3667
3668
|
}
|
|
@@ -3708,27 +3709,27 @@ var Record = function Record(_ref) {
|
|
|
3708
3709
|
recordNameLabel = _recordData.recordNameLabel,
|
|
3709
3710
|
recordValueLabel = _recordData.recordValueLabel;
|
|
3710
3711
|
|
|
3711
|
-
return /*#__PURE__*/React__default
|
|
3712
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3712
3713
|
className: "grid gap-4 mt-6"
|
|
3713
|
-
}, customDomain.status !== "active" && /*#__PURE__*/React__default
|
|
3714
|
+
}, customDomain.status !== "active" && /*#__PURE__*/React__default["default"].createElement(neetoui.Callout, {
|
|
3714
3715
|
style: "info",
|
|
3715
3716
|
icon: neetoIcons.Info
|
|
3716
|
-
}, recordDescription), /*#__PURE__*/React__default
|
|
3717
|
+
}, recordDescription), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
|
|
3717
3718
|
disabled: true,
|
|
3718
3719
|
label: recordNameLabel,
|
|
3719
3720
|
value: recordName,
|
|
3720
|
-
suffix: /*#__PURE__*/React__default
|
|
3721
|
+
suffix: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3721
3722
|
icon: neetoIcons.Copy,
|
|
3722
3723
|
style: "text",
|
|
3723
3724
|
onClick: function onClick() {
|
|
3724
3725
|
return copyToClipboard(recordName);
|
|
3725
3726
|
}
|
|
3726
3727
|
})
|
|
3727
|
-
}), /*#__PURE__*/React__default
|
|
3728
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
|
|
3728
3729
|
disabled: true,
|
|
3729
3730
|
label: recordValueLabel,
|
|
3730
3731
|
value: recordValue,
|
|
3731
|
-
suffix: /*#__PURE__*/React__default
|
|
3732
|
+
suffix: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3732
3733
|
icon: neetoIcons.Copy,
|
|
3733
3734
|
style: "text",
|
|
3734
3735
|
onClick: function onClick() {
|
|
@@ -3775,17 +3776,17 @@ var CustomDomainInfo = function CustomDomainInfo(_ref) {
|
|
|
3775
3776
|
var _useTranslation = reactI18next.useTranslation(),
|
|
3776
3777
|
t = _useTranslation.t;
|
|
3777
3778
|
|
|
3778
|
-
return /*#__PURE__*/React__default
|
|
3779
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3779
3780
|
className: "space-y-6"
|
|
3780
|
-
}, /*#__PURE__*/React__default
|
|
3781
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3781
3782
|
className: "p-4 neeto-ui-rounded neeto-ui-bg-gray-100 space-y-3 neeto-ui-text-gray-700"
|
|
3782
|
-
}, /*#__PURE__*/React__default
|
|
3783
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
3783
3784
|
i18nKey: "neetoCommons.customDomain.messageBlock.dnsStatus"
|
|
3784
|
-
}), /*#__PURE__*/React__default
|
|
3785
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
3785
3786
|
style: "link",
|
|
3786
3787
|
href: "mailto:support@neeto.com",
|
|
3787
3788
|
label: "support@neeto.com"
|
|
3788
|
-
})), /*#__PURE__*/React__default
|
|
3789
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Callout, {
|
|
3789
3790
|
style: "info",
|
|
3790
3791
|
icon: neetoIcons.Info
|
|
3791
3792
|
}, t("neetoCommons.customDomain.messageBlock.cnameAddedTime", {
|
|
@@ -3832,7 +3833,7 @@ var customDomainApi = {
|
|
|
3832
3833
|
|
|
3833
3834
|
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3834
3835
|
|
|
3835
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty$
|
|
3836
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3836
3837
|
|
|
3837
3838
|
var useCreateCustomDomain = function useCreateCustomDomain() {
|
|
3838
3839
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -3962,10 +3963,10 @@ var Manage = function Manage(_ref) {
|
|
|
3962
3963
|
});
|
|
3963
3964
|
};
|
|
3964
3965
|
|
|
3965
|
-
return /*#__PURE__*/React__default
|
|
3966
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Pane, {
|
|
3966
3967
|
isOpen: isOpen,
|
|
3967
3968
|
onClose: onClose
|
|
3968
|
-
}, /*#__PURE__*/React__default
|
|
3969
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik.Formik, {
|
|
3969
3970
|
enableReinitialize: true,
|
|
3970
3971
|
initialValues: customDomain || INITIAL_VALUES,
|
|
3971
3972
|
validationSchema: CUSTOM_DOMAIN_VALIDATION_SCHEMA,
|
|
@@ -3974,23 +3975,23 @@ var Manage = function Manage(_ref) {
|
|
|
3974
3975
|
onSubmit: handleSubmit
|
|
3975
3976
|
}, function (_ref2) {
|
|
3976
3977
|
var dirty = _ref2.dirty;
|
|
3977
|
-
return /*#__PURE__*/React__default
|
|
3978
|
+
return /*#__PURE__*/React__default["default"].createElement(formik.Form, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
3978
3979
|
style: "h2",
|
|
3979
3980
|
weight: "semibold"
|
|
3980
3981
|
}, capitalize(t("neetoCommons.customDomain.customDomain", {
|
|
3981
3982
|
count: ENTITY_COUNT.singular
|
|
3982
|
-
})))), /*#__PURE__*/React__default
|
|
3983
|
+
})))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3983
3984
|
className: "space-y-6 w-full"
|
|
3984
|
-
}, !!customDomain && /*#__PURE__*/React__default
|
|
3985
|
+
}, !!customDomain && /*#__PURE__*/React__default["default"].createElement(TagBlock, {
|
|
3985
3986
|
status: customDomain.status,
|
|
3986
3987
|
isCnameRecordsAdded: customDomain.addedCnameAt,
|
|
3987
3988
|
handleValidateCname: handleValidateCname,
|
|
3988
3989
|
stacked: true
|
|
3989
|
-
}), /*#__PURE__*/React__default
|
|
3990
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3990
3991
|
className: "space-y-2"
|
|
3991
|
-
}, /*#__PURE__*/React__default
|
|
3992
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3992
3993
|
className: "flex items-end gap-2 align"
|
|
3993
|
-
}, /*#__PURE__*/React__default
|
|
3994
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik$1.Input, {
|
|
3994
3995
|
label: customDomain ? t("neetoCommons.customDomain.customDomain", {
|
|
3995
3996
|
count: ENTITY_COUNT.singular
|
|
3996
3997
|
}) : t("neetoCommons.customDomain.label"),
|
|
@@ -3998,24 +3999,24 @@ var Manage = function Manage(_ref) {
|
|
|
3998
3999
|
autoFocus: true,
|
|
3999
4000
|
name: "hostname",
|
|
4000
4001
|
placeholder: t("neetoCommons.customDomain.placeholder")
|
|
4001
|
-
}), !customDomain && /*#__PURE__*/React__default
|
|
4002
|
+
}), !customDomain && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
4002
4003
|
disabled: !dirty || isCreating,
|
|
4003
4004
|
loading: isCreating,
|
|
4004
4005
|
style: "primary",
|
|
4005
4006
|
type: "submit",
|
|
4006
4007
|
icon: neetoIcons.Check
|
|
4007
|
-
}))), !!customDomain && /*#__PURE__*/React__default
|
|
4008
|
+
}))), !!customDomain && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Record, {
|
|
4008
4009
|
customDomain: customDomain
|
|
4009
|
-
}), customDomain.status === "pending_txt_validation" && /*#__PURE__*/React__default
|
|
4010
|
+
}), customDomain.status === "pending_txt_validation" && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
4010
4011
|
label: t("neetoCommons.customDomain.validation.buttonLabel.txt"),
|
|
4011
4012
|
onClick: handleValidateTxt,
|
|
4012
4013
|
disabled: isValidating,
|
|
4013
4014
|
loading: isValidating
|
|
4014
|
-
}), customDomain.status === "pending_cname_validation" && !customDomain.addedCnameAt && /*#__PURE__*/React__default
|
|
4015
|
+
}), customDomain.status === "pending_cname_validation" && !customDomain.addedCnameAt && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
4015
4016
|
label: t("neetoCommons.customDomain.validation.buttonLabel.cnameAdded"),
|
|
4016
4017
|
onClick: handleUpdateCname,
|
|
4017
4018
|
loading: isCnameValidating || isUpdating
|
|
4018
|
-
}), customDomain.status === "pending_cname_validation" && customDomain.addedCnameAt && /*#__PURE__*/React__default
|
|
4019
|
+
}), customDomain.status === "pending_cname_validation" && customDomain.addedCnameAt && /*#__PURE__*/React__default["default"].createElement(CustomDomainInfo, {
|
|
4019
4020
|
time: customDomain.addedCnameAt
|
|
4020
4021
|
})))));
|
|
4021
4022
|
}));
|
|
@@ -4023,10 +4024,10 @@ var Manage = function Manage(_ref) {
|
|
|
4023
4024
|
|
|
4024
4025
|
var _path$3, _path2$2, _path3$2, _path4$2, _path5$2, _path6$2, _path7$1;
|
|
4025
4026
|
|
|
4026
|
-
function _extends$
|
|
4027
|
+
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
4027
4028
|
|
|
4028
4029
|
var SvgNoData = function SvgNoData(props) {
|
|
4029
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
4030
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
4030
4031
|
width: 241,
|
|
4031
4032
|
height: 202,
|
|
4032
4033
|
fill: "none",
|
|
@@ -4067,23 +4068,23 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
4067
4068
|
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? null : _ref$secondaryButtonP,
|
|
4068
4069
|
_ref$className = _ref.className,
|
|
4069
4070
|
className = _ref$className === void 0 ? "" : _ref$className;
|
|
4070
|
-
return /*#__PURE__*/React__default
|
|
4071
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4071
4072
|
"data-cy": "empty-state-container",
|
|
4072
4073
|
className: classnames(["m-auto flex h-full max-w-md flex-col items-center justify-center", className])
|
|
4073
|
-
}, /*#__PURE__*/React__default
|
|
4074
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4074
4075
|
className: "mx-auto mb-4 flex items-center justify-center",
|
|
4075
4076
|
"data-cy": "empty-state-image-container"
|
|
4076
|
-
}, /*#__PURE__*/React__default
|
|
4077
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgNoData, null)), /*#__PURE__*/React__default["default"].createElement("h3", {
|
|
4077
4078
|
className: "mb-1 text-center text-xl font-semibold",
|
|
4078
4079
|
"data-cy": "empty-state-title"
|
|
4079
|
-
}, title), /*#__PURE__*/React__default
|
|
4080
|
+
}, title), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
4080
4081
|
className: "mb-6 text-center text-sm font-normal leading-relaxed text-gray-600",
|
|
4081
4082
|
"data-cy": "empty-state-subtitle"
|
|
4082
|
-
}, description), /*#__PURE__*/React__default
|
|
4083
|
+
}, description), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4083
4084
|
className: "flex flex-row items-center justify-center space-x-2"
|
|
4084
|
-
}, primaryButtonProps && /*#__PURE__*/React__default
|
|
4085
|
+
}, primaryButtonProps && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends$5({}, primaryButtonProps, {
|
|
4085
4086
|
"data-cy": "empty-state-primary-button"
|
|
4086
|
-
})), secondaryButtonProps && /*#__PURE__*/React__default
|
|
4087
|
+
})), secondaryButtonProps && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends$5({
|
|
4087
4088
|
style: "secondary"
|
|
4088
4089
|
}, secondaryButtonProps, {
|
|
4089
4090
|
"data-cy": "empty-state-secondary-button"
|
|
@@ -4093,22 +4094,22 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
4093
4094
|
var CustomDomain = function CustomDomain() {
|
|
4094
4095
|
var _data$customDomains;
|
|
4095
4096
|
|
|
4096
|
-
var _useState = React
|
|
4097
|
+
var _useState = React.useState(""),
|
|
4097
4098
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4098
4099
|
searchTerm = _useState2[0],
|
|
4099
4100
|
setSearchTerm = _useState2[1];
|
|
4100
4101
|
|
|
4101
|
-
var _useState3 = React
|
|
4102
|
+
var _useState3 = React.useState(false),
|
|
4102
4103
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
4103
4104
|
isPaneOpen = _useState4[0],
|
|
4104
4105
|
setIsPaneOpen = _useState4[1];
|
|
4105
4106
|
|
|
4106
|
-
var _useState5 = React
|
|
4107
|
+
var _useState5 = React.useState(null),
|
|
4107
4108
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
4108
4109
|
customDomain = _useState6[0],
|
|
4109
4110
|
setCustomDomain = _useState6[1];
|
|
4110
4111
|
|
|
4111
|
-
var _useState7 = React
|
|
4112
|
+
var _useState7 = React.useState(false),
|
|
4112
4113
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
4113
4114
|
isAlertOpen = _useState8[0],
|
|
4114
4115
|
setIsAlertOpen = _useState8[1];
|
|
@@ -4142,7 +4143,7 @@ var CustomDomain = function CustomDomain() {
|
|
|
4142
4143
|
setIsAlertOpen(true);
|
|
4143
4144
|
};
|
|
4144
4145
|
|
|
4145
|
-
return /*#__PURE__*/React__default
|
|
4146
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(layouts.Container, null, /*#__PURE__*/React__default["default"].createElement(layouts.Header, {
|
|
4146
4147
|
title: capitalize(t("neetoCommons.customDomain.customDomain", {
|
|
4147
4148
|
count: ENTITY_COUNT.plural
|
|
4148
4149
|
})),
|
|
@@ -4157,7 +4158,7 @@ var CustomDomain = function CustomDomain() {
|
|
|
4157
4158
|
})
|
|
4158
4159
|
})
|
|
4159
4160
|
},
|
|
4160
|
-
actionBlock: /*#__PURE__*/React__default
|
|
4161
|
+
actionBlock: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
4161
4162
|
label: t("neetoCommons.common.actions.add", {
|
|
4162
4163
|
entity: t("neetoCommons.customDomain.customDomain", {
|
|
4163
4164
|
count: ENTITY_COUNT.singular
|
|
@@ -4167,23 +4168,23 @@ var CustomDomain = function CustomDomain() {
|
|
|
4167
4168
|
return enableManagePane(null);
|
|
4168
4169
|
}
|
|
4169
4170
|
})
|
|
4170
|
-
}), isLoading && /*#__PURE__*/React__default
|
|
4171
|
+
}), isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4171
4172
|
className: "w-full h-screen"
|
|
4172
|
-
}, /*#__PURE__*/React__default
|
|
4173
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.PageLoader, null)), !isLoading && (isNotEmpty(data === null || data === void 0 ? void 0 : data.customDomains) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4173
4174
|
className: "w-full flex-grow"
|
|
4174
|
-
}, /*#__PURE__*/React__default
|
|
4175
|
-
leftActionBlock: /*#__PURE__*/React__default
|
|
4175
|
+
}, /*#__PURE__*/React__default["default"].createElement(layouts.SubHeader, {
|
|
4176
|
+
leftActionBlock: /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
4176
4177
|
component: "h4",
|
|
4177
4178
|
className: "neeto-ui-gray-800 font-semibold"
|
|
4178
4179
|
}, t("neetoCommons.customDomain.customDomainWithCount", {
|
|
4179
4180
|
count: data === null || data === void 0 ? void 0 : (_data$customDomains = data.customDomains) === null || _data$customDomains === void 0 ? void 0 : _data$customDomains.length
|
|
4180
4181
|
}))
|
|
4181
|
-
}), /*#__PURE__*/React__default
|
|
4182
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Table, {
|
|
4182
4183
|
rowData: data === null || data === void 0 ? void 0 : data.customDomains,
|
|
4183
4184
|
columnData: renderColumnData(enableManagePane, enableDeleteAlert),
|
|
4184
4185
|
allowRowClick: false,
|
|
4185
4186
|
rowSelection: false
|
|
4186
|
-
}))) : /*#__PURE__*/React__default
|
|
4187
|
+
}))) : /*#__PURE__*/React__default["default"].createElement(EmptyState, {
|
|
4187
4188
|
title: t("neetoCommons.common.notFound.title", {
|
|
4188
4189
|
entity: t("neetoCommons.customDomain.customDomain", {
|
|
4189
4190
|
count: ENTITY_COUNT.singular
|
|
@@ -4204,14 +4205,14 @@ var CustomDomain = function CustomDomain() {
|
|
|
4204
4205
|
return enableManagePane(null);
|
|
4205
4206
|
}
|
|
4206
4207
|
}
|
|
4207
|
-
}))), /*#__PURE__*/React__default
|
|
4208
|
+
}))), /*#__PURE__*/React__default["default"].createElement(Manage, {
|
|
4208
4209
|
customDomain: customDomain,
|
|
4209
4210
|
isOpen: isPaneOpen,
|
|
4210
4211
|
onClose: function onClose() {
|
|
4211
4212
|
return setIsPaneOpen(false);
|
|
4212
4213
|
},
|
|
4213
4214
|
setCustomDomain: setCustomDomain
|
|
4214
|
-
}), /*#__PURE__*/React__default
|
|
4215
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Alert, {
|
|
4215
4216
|
isOpen: isAlertOpen,
|
|
4216
4217
|
submitButtonLabel: t("neetoCommons.common.deleteAlert.yes"),
|
|
4217
4218
|
cancelButtonLabel: t("neetoCommons.common.deleteAlert.no"),
|
|
@@ -4220,7 +4221,7 @@ var CustomDomain = function CustomDomain() {
|
|
|
4220
4221
|
count: ENTITY_COUNT.singular
|
|
4221
4222
|
})
|
|
4222
4223
|
}),
|
|
4223
|
-
message: /*#__PURE__*/React__default
|
|
4224
|
+
message: /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
4224
4225
|
i18nKey: "neetoCommons.customDomain.alertMessage",
|
|
4225
4226
|
values: {
|
|
4226
4227
|
hostname: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname
|
|
@@ -4243,11 +4244,11 @@ var DateFormat = ramda.fromPairs(ramda.keys(timeFormat).map(function (key) {
|
|
|
4243
4244
|
tooltipProps = _ref$tooltipProps === void 0 ? {} : _ref$tooltipProps,
|
|
4244
4245
|
_ref$typographyProps = _ref.typographyProps,
|
|
4245
4246
|
typographyProps = _ref$typographyProps === void 0 ? {} : _ref$typographyProps;
|
|
4246
|
-
var dateDisplay = /*#__PURE__*/React__default
|
|
4247
|
+
var dateDisplay = /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, _extends$5({
|
|
4247
4248
|
component: "span",
|
|
4248
4249
|
style: "body2"
|
|
4249
4250
|
}, typographyProps), timeFormat[key](date));
|
|
4250
|
-
return key === "extended" ? dateDisplay : /*#__PURE__*/React__default
|
|
4251
|
+
return key === "extended" ? dateDisplay : /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends$5({
|
|
4251
4252
|
position: "top",
|
|
4252
4253
|
content: timeFormat.extended(date)
|
|
4253
4254
|
}, tooltipProps), dateDisplay);
|
|
@@ -4257,10 +4258,10 @@ var TimeFormat = DateFormat;
|
|
|
4257
4258
|
|
|
4258
4259
|
var _path$2, _path2$1, _path3$1, _path4$1, _path5$1, _path6$1;
|
|
4259
4260
|
|
|
4260
|
-
function _extends$
|
|
4261
|
+
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
4261
4262
|
|
|
4262
4263
|
var SvgFallbackComponent = function SvgFallbackComponent(props) {
|
|
4263
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
4264
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
4264
4265
|
width: 230,
|
|
4265
4266
|
height: 230,
|
|
4266
4267
|
viewBox: "0 0 317 320",
|
|
@@ -4292,7 +4293,7 @@ var FallbackComponent = function FallbackComponent() {
|
|
|
4292
4293
|
var _useTranslation = reactI18next.useTranslation(),
|
|
4293
4294
|
t = _useTranslation.t;
|
|
4294
4295
|
|
|
4295
|
-
React
|
|
4296
|
+
React.useEffect(function () {
|
|
4296
4297
|
var listener = function listener(e) {
|
|
4297
4298
|
var _e$target;
|
|
4298
4299
|
|
|
@@ -4305,25 +4306,25 @@ var FallbackComponent = function FallbackComponent() {
|
|
|
4305
4306
|
return window.removeEventListener("popstate", listener);
|
|
4306
4307
|
};
|
|
4307
4308
|
}, []);
|
|
4308
|
-
return /*#__PURE__*/React__default
|
|
4309
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4309
4310
|
className: "flex h-screen w-full flex-row items-start justify-start"
|
|
4310
|
-
}, /*#__PURE__*/React__default
|
|
4311
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4311
4312
|
className: "m-auto text-center"
|
|
4312
|
-
}, /*#__PURE__*/React__default
|
|
4313
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4313
4314
|
className: "m-auto mb-8 flex items-center justify-center"
|
|
4314
|
-
}, /*#__PURE__*/React__default
|
|
4315
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgFallbackComponent, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
4315
4316
|
component: "h2",
|
|
4316
4317
|
style: "h2",
|
|
4317
4318
|
weight: "semibold",
|
|
4318
4319
|
className: "mb-4"
|
|
4319
|
-
}, t("neetoCommons.fallbackComponent.somethingWentWrong")), /*#__PURE__*/React__default
|
|
4320
|
+
}, t("neetoCommons.fallbackComponent.somethingWentWrong")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
4320
4321
|
component: "p",
|
|
4321
4322
|
style: "body1",
|
|
4322
4323
|
weight: "normal",
|
|
4323
4324
|
className: "mb-8 text-gray-600"
|
|
4324
|
-
}, t("neetoCommons.fallbackComponent.tryReloading")), /*#__PURE__*/React__default
|
|
4325
|
+
}, t("neetoCommons.fallbackComponent.tryReloading")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4325
4326
|
className: "flex flex-row items-center justify-center"
|
|
4326
|
-
}, /*#__PURE__*/React__default
|
|
4327
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
4327
4328
|
style: "primary",
|
|
4328
4329
|
size: "large",
|
|
4329
4330
|
onClick: function onClick() {
|
|
@@ -4353,7 +4354,7 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
4353
4354
|
return (
|
|
4354
4355
|
/*#__PURE__*/
|
|
4355
4356
|
// @ts-ignore
|
|
4356
|
-
React__default
|
|
4357
|
+
React__default["default"].createElement(react.HoneybadgerErrorBoundary, {
|
|
4357
4358
|
honeybadger: honeybadger,
|
|
4358
4359
|
ErrorComponent: ErrorComponent
|
|
4359
4360
|
}, children)
|
|
@@ -5646,7 +5647,7 @@ function _toConsumableArray$1(arr) {
|
|
|
5646
5647
|
return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1();
|
|
5647
5648
|
}
|
|
5648
5649
|
|
|
5649
|
-
function _defineProperty
|
|
5650
|
+
function _defineProperty(obj, key, value) {
|
|
5650
5651
|
if (key in obj) {
|
|
5651
5652
|
Object.defineProperty(obj, key, {
|
|
5652
5653
|
value: value,
|
|
@@ -5660,8 +5661,8 @@ function _defineProperty$1(obj, key, value) {
|
|
|
5660
5661
|
return obj;
|
|
5661
5662
|
}
|
|
5662
5663
|
|
|
5663
|
-
function _extends$
|
|
5664
|
-
_extends$
|
|
5664
|
+
function _extends$2() {
|
|
5665
|
+
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
5665
5666
|
for (var i = 1; i < arguments.length; i++) {
|
|
5666
5667
|
var source = arguments[i];
|
|
5667
5668
|
for (var key in source) {
|
|
@@ -5672,12 +5673,12 @@ function _extends$3() {
|
|
|
5672
5673
|
}
|
|
5673
5674
|
return target;
|
|
5674
5675
|
};
|
|
5675
|
-
return _extends$
|
|
5676
|
+
return _extends$2.apply(this, arguments);
|
|
5676
5677
|
}
|
|
5677
5678
|
|
|
5678
5679
|
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5679
5680
|
|
|
5680
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty
|
|
5681
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5681
5682
|
//
|
|
5682
5683
|
// Super simple, non-algorithmic solution since the
|
|
5683
5684
|
// number of class names will not be greater than 4
|
|
@@ -5784,7 +5785,7 @@ function createElement(_ref) {
|
|
|
5784
5785
|
}
|
|
5785
5786
|
|
|
5786
5787
|
var children = childrenCreator(node.children);
|
|
5787
|
-
return /*#__PURE__*/React__default
|
|
5788
|
+
return /*#__PURE__*/React__default["default"].createElement(TagName, _extends$2({
|
|
5788
5789
|
key: key
|
|
5789
5790
|
}, props), children);
|
|
5790
5791
|
}
|
|
@@ -5799,7 +5800,7 @@ var _excluded$1 = ["language", "children", "style", "customStyle", "codeTagProps
|
|
|
5799
5800
|
|
|
5800
5801
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5801
5802
|
|
|
5802
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty
|
|
5803
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5803
5804
|
var newLineRegex = /\n/g;
|
|
5804
5805
|
|
|
5805
5806
|
function getNewLines(str) {
|
|
@@ -5812,7 +5813,7 @@ function getAllLineNumbers(_ref) {
|
|
|
5812
5813
|
style = _ref.style;
|
|
5813
5814
|
return lines.map(function (_, i) {
|
|
5814
5815
|
var number = i + startingLineNumber;
|
|
5815
|
-
return /*#__PURE__*/React__default
|
|
5816
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5816
5817
|
key: "line-".concat(i),
|
|
5817
5818
|
className: "react-syntax-highlighter-line-number",
|
|
5818
5819
|
style: typeof style === 'function' ? style(number) : style
|
|
@@ -5831,7 +5832,7 @@ function AllLineNumbers(_ref2) {
|
|
|
5831
5832
|
_ref2$numberStyle = _ref2.numberStyle,
|
|
5832
5833
|
numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle,
|
|
5833
5834
|
startingLineNumber = _ref2.startingLineNumber;
|
|
5834
|
-
return /*#__PURE__*/React__default
|
|
5835
|
+
return /*#__PURE__*/React__default["default"].createElement("code", {
|
|
5835
5836
|
style: Object.assign({}, codeStyle, containerStyle)
|
|
5836
5837
|
}, getAllLineNumbers({
|
|
5837
5838
|
lines: codeString.replace(/\n$/, '').split('\n'),
|
|
@@ -6143,7 +6144,7 @@ function highlight$3 (defaultAstGenerator, defaultStyle) {
|
|
|
6143
6144
|
rest = _objectWithoutProperties$1(_ref7, _excluded$1);
|
|
6144
6145
|
|
|
6145
6146
|
astGenerator = astGenerator || defaultAstGenerator;
|
|
6146
|
-
var allLineNumbers = showLineNumbers ? /*#__PURE__*/React__default
|
|
6147
|
+
var allLineNumbers = showLineNumbers ? /*#__PURE__*/React__default["default"].createElement(AllLineNumbers, {
|
|
6147
6148
|
containerStyle: lineNumberContainerStyle,
|
|
6148
6149
|
codeStyle: codeTagProps.style || {},
|
|
6149
6150
|
numberStyle: lineNumberStyle,
|
|
@@ -6172,7 +6173,7 @@ function highlight$3 (defaultAstGenerator, defaultStyle) {
|
|
|
6172
6173
|
}
|
|
6173
6174
|
|
|
6174
6175
|
if (!astGenerator) {
|
|
6175
|
-
return /*#__PURE__*/React__default
|
|
6176
|
+
return /*#__PURE__*/React__default["default"].createElement(PreTag, preProps, allLineNumbers, /*#__PURE__*/React__default["default"].createElement(CodeTag, codeTagProps, code));
|
|
6176
6177
|
}
|
|
6177
6178
|
/*
|
|
6178
6179
|
* Some custom renderers rely on individual row elements so we need to turn wrapLines on
|
|
@@ -6200,7 +6201,7 @@ function highlight$3 (defaultAstGenerator, defaultStyle) {
|
|
|
6200
6201
|
|
|
6201
6202
|
var largestLineNumber = codeTree.value.length + startingLineNumber;
|
|
6202
6203
|
var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
|
|
6203
|
-
return /*#__PURE__*/React__default
|
|
6204
|
+
return /*#__PURE__*/React__default["default"].createElement(PreTag, preProps, /*#__PURE__*/React__default["default"].createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
|
|
6204
6205
|
rows: rows,
|
|
6205
6206
|
stylesheet: style,
|
|
6206
6207
|
useInlineStyles: useInlineStyles
|
|
@@ -7802,7 +7803,7 @@ const error = (message) => {
|
|
|
7802
7803
|
* @param {string} message
|
|
7803
7804
|
* @param {any} args
|
|
7804
7805
|
*/
|
|
7805
|
-
const warn
|
|
7806
|
+
const warn = (message, ...args) => {
|
|
7806
7807
|
console.log(`WARN: ${message}`, ...args);
|
|
7807
7808
|
};
|
|
7808
7809
|
|
|
@@ -7885,8 +7886,8 @@ const HLJS = function(hljs) {
|
|
|
7885
7886
|
if (match) {
|
|
7886
7887
|
const language = getLanguage(match[1]);
|
|
7887
7888
|
if (!language) {
|
|
7888
|
-
warn
|
|
7889
|
-
warn
|
|
7889
|
+
warn(LANGUAGE_NOT_FOUND.replace("{}", match[1]));
|
|
7890
|
+
warn("Falling back to no-highlight mode for this block.", block);
|
|
7890
7891
|
}
|
|
7891
7892
|
return language ? match[1] : 'no-highlight';
|
|
7892
7893
|
}
|
|
@@ -11932,11 +11933,11 @@ function requireXml () {
|
|
|
11932
11933
|
* */
|
|
11933
11934
|
|
|
11934
11935
|
var asciidoc_1$1;
|
|
11935
|
-
var hasRequiredAsciidoc
|
|
11936
|
+
var hasRequiredAsciidoc;
|
|
11936
11937
|
|
|
11937
|
-
function requireAsciidoc
|
|
11938
|
-
if (hasRequiredAsciidoc
|
|
11939
|
-
hasRequiredAsciidoc
|
|
11938
|
+
function requireAsciidoc () {
|
|
11939
|
+
if (hasRequiredAsciidoc) return asciidoc_1$1;
|
|
11940
|
+
hasRequiredAsciidoc = 1;
|
|
11940
11941
|
/**
|
|
11941
11942
|
* @param {RegExp | string } re
|
|
11942
11943
|
* @returns {string}
|
|
@@ -53813,7 +53814,7 @@ low.registerLanguage('arcade', requireArcade());
|
|
|
53813
53814
|
low.registerLanguage('arduino', requireArduino());
|
|
53814
53815
|
low.registerLanguage('armasm', requireArmasm());
|
|
53815
53816
|
low.registerLanguage('xml', requireXml());
|
|
53816
|
-
low.registerLanguage('asciidoc', requireAsciidoc
|
|
53817
|
+
low.registerLanguage('asciidoc', requireAsciidoc());
|
|
53817
53818
|
low.registerLanguage('aspectj', requireAspectj());
|
|
53818
53819
|
low.registerLanguage(
|
|
53819
53820
|
'autohotkey',
|
|
@@ -54171,14 +54172,14 @@ function _inherits(subClass, superClass) {
|
|
|
54171
54172
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
54172
54173
|
}
|
|
54173
54174
|
|
|
54174
|
-
function _typeof$
|
|
54175
|
+
function _typeof$1(obj) {
|
|
54175
54176
|
"@babel/helpers - typeof";
|
|
54176
54177
|
|
|
54177
|
-
return _typeof$
|
|
54178
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
54178
54179
|
return typeof obj;
|
|
54179
54180
|
} : function (obj) {
|
|
54180
54181
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
54181
|
-
}, _typeof$
|
|
54182
|
+
}, _typeof$1(obj);
|
|
54182
54183
|
}
|
|
54183
54184
|
|
|
54184
54185
|
function _assertThisInitialized(self) {
|
|
@@ -54189,7 +54190,7 @@ function _assertThisInitialized(self) {
|
|
|
54189
54190
|
}
|
|
54190
54191
|
|
|
54191
54192
|
function _possibleConstructorReturn(self, call) {
|
|
54192
|
-
if (call && (_typeof$
|
|
54193
|
+
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
54193
54194
|
return call;
|
|
54194
54195
|
} else if (call !== void 0) {
|
|
54195
54196
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
@@ -54206,7 +54207,7 @@ function _getPrototypeOf(o) {
|
|
|
54206
54207
|
|
|
54207
54208
|
var regeneratorRuntime$1 = {exports: {}};
|
|
54208
54209
|
|
|
54209
|
-
var _typeof
|
|
54210
|
+
var _typeof = {exports: {}};
|
|
54210
54211
|
|
|
54211
54212
|
(function (module) {
|
|
54212
54213
|
function _typeof(obj) {
|
|
@@ -54219,10 +54220,10 @@ var _typeof$1 = {exports: {}};
|
|
|
54219
54220
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
54220
54221
|
}
|
|
54221
54222
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
54222
|
-
} (_typeof
|
|
54223
|
+
} (_typeof));
|
|
54223
54224
|
|
|
54224
54225
|
(function (module) {
|
|
54225
|
-
var _typeof = _typeof
|
|
54226
|
+
var _typeof$1 = _typeof.exports["default"];
|
|
54226
54227
|
function _regeneratorRuntime() {
|
|
54227
54228
|
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
54228
54229
|
return exports;
|
|
@@ -54327,7 +54328,7 @@ var _typeof$1 = {exports: {}};
|
|
|
54327
54328
|
if ("throw" !== record.type) {
|
|
54328
54329
|
var result = record.arg,
|
|
54329
54330
|
value = result.value;
|
|
54330
|
-
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
54331
|
+
return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
54331
54332
|
invoke("next", value, resolve, reject);
|
|
54332
54333
|
}, function (err) {
|
|
54333
54334
|
invoke("throw", err, resolve, reject);
|
|
@@ -54609,7 +54610,7 @@ var createAsyncLoadingHighlighter = (function (options) {
|
|
|
54609
54610
|
}, {
|
|
54610
54611
|
key: "render",
|
|
54611
54612
|
value: function render() {
|
|
54612
|
-
return /*#__PURE__*/React__default
|
|
54613
|
+
return /*#__PURE__*/React__default["default"].createElement(ReactAsyncHighlighter.highlightInstance, _extends$2({}, this.props, {
|
|
54613
54614
|
language: this.normalizeLanguage(this.props.language),
|
|
54614
54615
|
astGenerator: ReactAsyncHighlighter.astGenerator
|
|
54615
54616
|
}));
|
|
@@ -54676,19 +54677,19 @@ var createAsyncLoadingHighlighter = (function (options) {
|
|
|
54676
54677
|
}]);
|
|
54677
54678
|
|
|
54678
54679
|
return ReactAsyncHighlighter;
|
|
54679
|
-
}(React__default
|
|
54680
|
+
}(React__default["default"].PureComponent);
|
|
54680
54681
|
|
|
54681
|
-
_defineProperty
|
|
54682
|
+
_defineProperty(ReactAsyncHighlighter, "astGenerator", null);
|
|
54682
54683
|
|
|
54683
|
-
_defineProperty
|
|
54684
|
+
_defineProperty(ReactAsyncHighlighter, "highlightInstance", highlight$3(null, {}));
|
|
54684
54685
|
|
|
54685
|
-
_defineProperty
|
|
54686
|
+
_defineProperty(ReactAsyncHighlighter, "astGeneratorPromise", null);
|
|
54686
54687
|
|
|
54687
|
-
_defineProperty
|
|
54688
|
+
_defineProperty(ReactAsyncHighlighter, "languages", new Map());
|
|
54688
54689
|
|
|
54689
|
-
_defineProperty
|
|
54690
|
+
_defineProperty(ReactAsyncHighlighter, "supportedLanguages", options.supportedLanguages || Object.keys(languageLoaders || {}));
|
|
54690
54691
|
|
|
54691
|
-
_defineProperty
|
|
54692
|
+
_defineProperty(ReactAsyncHighlighter, "isRegistered", function (language) {
|
|
54692
54693
|
if (noAsyncLoadingLanguages) {
|
|
54693
54694
|
return true;
|
|
54694
54695
|
}
|
|
@@ -54705,7 +54706,7 @@ var createAsyncLoadingHighlighter = (function (options) {
|
|
|
54705
54706
|
return isLanguageRegistered(ReactAsyncHighlighter.astGenerator, language);
|
|
54706
54707
|
});
|
|
54707
54708
|
|
|
54708
|
-
_defineProperty
|
|
54709
|
+
_defineProperty(ReactAsyncHighlighter, "registerLanguage", function (name, language) {
|
|
54709
54710
|
if (!registerLanguage) {
|
|
54710
54711
|
throw new Error("Current syntax highlighter doesn't support registration of languages");
|
|
54711
54712
|
}
|
|
@@ -54784,7 +54785,7 @@ var languageLoaders$1 = {
|
|
|
54784
54785
|
return Promise.resolve().then(function () { return armasm; });
|
|
54785
54786
|
}),
|
|
54786
54787
|
asciidoc: createLanguageAsyncLoader("asciidoc", function () {
|
|
54787
|
-
return Promise.resolve().then(function () { return asciidoc
|
|
54788
|
+
return Promise.resolve().then(function () { return asciidoc; });
|
|
54788
54789
|
}),
|
|
54789
54790
|
aspectj: createLanguageAsyncLoader("aspectj", function () {
|
|
54790
54791
|
return Promise.resolve().then(function () { return aspectj; });
|
|
@@ -55388,7 +55389,7 @@ var languageLoaders = {
|
|
|
55388
55389
|
return Promise.resolve().then(function () { return arff$1; });
|
|
55389
55390
|
}),
|
|
55390
55391
|
asciidoc: createLanguageAsyncLoader("asciidoc", function () {
|
|
55391
|
-
return Promise.resolve().then(function () { return asciidoc; });
|
|
55392
|
+
return Promise.resolve().then(function () { return asciidoc$2; });
|
|
55392
55393
|
}),
|
|
55393
55394
|
asm6502: createLanguageAsyncLoader("asm6502", function () {
|
|
55394
55395
|
return Promise.resolve().then(function () { return asm6502$1; });
|
|
@@ -55406,7 +55407,7 @@ var languageLoaders = {
|
|
|
55406
55407
|
return Promise.resolve().then(function () { return autoit$2; });
|
|
55407
55408
|
}),
|
|
55408
55409
|
avisynth: createLanguageAsyncLoader("avisynth", function () {
|
|
55409
|
-
return Promise.resolve().then(function () { return avisynth
|
|
55410
|
+
return Promise.resolve().then(function () { return avisynth; });
|
|
55410
55411
|
}),
|
|
55411
55412
|
avroIdl: createLanguageAsyncLoader("avroIdl", function () {
|
|
55412
55413
|
return Promise.resolve().then(function () { return avroIdl; });
|
|
@@ -55430,7 +55431,7 @@ var languageLoaders = {
|
|
|
55430
55431
|
return Promise.resolve().then(function () { return birb; });
|
|
55431
55432
|
}),
|
|
55432
55433
|
bison: createLanguageAsyncLoader("bison", function () {
|
|
55433
|
-
return Promise.resolve().then(function () { return bison; });
|
|
55434
|
+
return Promise.resolve().then(function () { return bison$1; });
|
|
55434
55435
|
}),
|
|
55435
55436
|
bnf: createLanguageAsyncLoader("bnf", function () {
|
|
55436
55437
|
return Promise.resolve().then(function () { return bnf; });
|
|
@@ -57682,7 +57683,7 @@ var Edot = "Ė";
|
|
|
57682
57683
|
var Efr = "𝔈";
|
|
57683
57684
|
var Egrav = "È";
|
|
57684
57685
|
var Egrave = "È";
|
|
57685
|
-
var Element
|
|
57686
|
+
var Element = "∈";
|
|
57686
57687
|
var Emacr = "Ē";
|
|
57687
57688
|
var EmptySmallSquare = "◻";
|
|
57688
57689
|
var EmptyVerySmallSquare = "▫";
|
|
@@ -59903,7 +59904,7 @@ var require$$0 = {
|
|
|
59903
59904
|
Efr: Efr,
|
|
59904
59905
|
Egrav: Egrav,
|
|
59905
59906
|
Egrave: Egrave,
|
|
59906
|
-
Element: Element
|
|
59907
|
+
Element: Element,
|
|
59907
59908
|
Emacr: Emacr,
|
|
59908
59909
|
EmptySmallSquare: EmptySmallSquare,
|
|
59909
59910
|
EmptyVerySmallSquare: EmptyVerySmallSquare,
|
|
@@ -65591,242 +65592,238 @@ var arff$1 = /*#__PURE__*/_mergeNamespaces({
|
|
|
65591
65592
|
'default': arff_1
|
|
65592
65593
|
}, [arff_1]);
|
|
65593
65594
|
|
|
65594
|
-
var asciidoc_1;
|
|
65595
|
-
|
|
65596
|
-
|
|
65597
|
-
function
|
|
65598
|
-
if (hasRequiredAsciidoc) return asciidoc_1;
|
|
65599
|
-
hasRequiredAsciidoc = 1;
|
|
65600
|
-
|
|
65601
|
-
asciidoc_1 = asciidoc;
|
|
65602
|
-
asciidoc.displayName = 'asciidoc';
|
|
65603
|
-
asciidoc.aliases = ['adoc'];
|
|
65604
|
-
function asciidoc(Prism) {
|
|
65595
|
+
var asciidoc_1 = asciidoc$1;
|
|
65596
|
+
asciidoc$1.displayName = 'asciidoc';
|
|
65597
|
+
asciidoc$1.aliases = ['adoc'];
|
|
65598
|
+
function asciidoc$1(Prism) {
|
|
65605
65599
|
(function (Prism) {
|
|
65606
|
-
|
|
65607
|
-
|
|
65608
|
-
|
|
65609
|
-
|
|
65610
|
-
|
|
65611
|
-
|
|
65612
|
-
|
|
65613
|
-
|
|
65614
|
-
|
|
65615
|
-
|
|
65616
|
-
|
|
65617
|
-
|
|
65618
|
-
|
|
65619
|
-
|
|
65620
|
-
|
|
65621
|
-
|
|
65622
|
-
|
|
65623
|
-
|
|
65624
|
-
|
|
65625
|
-
|
|
65626
|
-
|
|
65627
|
-
|
|
65628
|
-
|
|
65629
|
-
|
|
65630
|
-
|
|
65631
|
-
|
|
65632
|
-
|
|
65633
|
-
|
|
65634
|
-
|
|
65635
|
-
|
|
65636
|
-
|
|
65637
|
-
|
|
65638
|
-
|
|
65639
|
-
|
|
65640
|
-
|
|
65641
|
-
|
|
65642
|
-
|
|
65643
|
-
|
|
65644
|
-
|
|
65645
|
-
|
|
65646
|
-
|
|
65647
|
-
|
|
65648
|
-
|
|
65649
|
-
|
|
65650
|
-
|
|
65651
|
-
|
|
65652
|
-
|
|
65653
|
-
|
|
65654
|
-
|
|
65655
|
-
|
|
65656
|
-
|
|
65657
|
-
|
|
65658
|
-
|
|
65659
|
-
|
|
65660
|
-
|
|
65661
|
-
|
|
65662
|
-
|
|
65663
|
-
|
|
65664
|
-
|
|
65665
|
-
|
|
65666
|
-
|
|
65667
|
-
|
|
65668
|
-
|
|
65669
|
-
|
|
65670
|
-
|
|
65671
|
-
|
|
65672
|
-
|
|
65673
|
-
|
|
65674
|
-
|
|
65675
|
-
|
|
65676
|
-
|
|
65677
|
-
|
|
65678
|
-
|
|
65679
|
-
|
|
65680
|
-
|
|
65681
|
-
|
|
65682
|
-
|
|
65683
|
-
|
|
65684
|
-
|
|
65685
|
-
|
|
65686
|
-
|
|
65687
|
-
|
|
65688
|
-
|
|
65689
|
-
|
|
65690
|
-
|
|
65691
|
-
|
|
65692
|
-
|
|
65693
|
-
|
|
65694
|
-
|
|
65695
|
-
|
|
65696
|
-
|
|
65697
|
-
|
|
65698
|
-
|
|
65699
|
-
|
|
65700
|
-
|
|
65701
|
-
|
|
65702
|
-
|
|
65703
|
-
|
|
65704
|
-
|
|
65705
|
-
|
|
65706
|
-
|
|
65707
|
-
|
|
65708
|
-
|
|
65709
|
-
|
|
65710
|
-
|
|
65711
|
-
|
|
65712
|
-
|
|
65713
|
-
|
|
65714
|
-
|
|
65715
|
-
|
|
65716
|
-
|
|
65717
|
-
|
|
65718
|
-
|
|
65719
|
-
|
|
65720
|
-
|
|
65721
|
-
|
|
65722
|
-
|
|
65723
|
-
|
|
65724
|
-
|
|
65725
|
-
|
|
65726
|
-
|
|
65727
|
-
|
|
65728
|
-
|
|
65729
|
-
|
|
65730
|
-
|
|
65731
|
-
|
|
65732
|
-
|
|
65733
|
-
|
|
65734
|
-
|
|
65735
|
-
|
|
65736
|
-
|
|
65737
|
-
|
|
65738
|
-
|
|
65739
|
-
|
|
65740
|
-
|
|
65741
|
-
|
|
65742
|
-
|
|
65743
|
-
|
|
65744
|
-
|
|
65745
|
-
|
|
65746
|
-
|
|
65747
|
-
|
|
65748
|
-
|
|
65749
|
-
|
|
65750
|
-
|
|
65751
|
-
|
|
65752
|
-
|
|
65753
|
-
|
|
65754
|
-
|
|
65755
|
-
|
|
65756
|
-
|
|
65757
|
-
|
|
65758
|
-
|
|
65759
|
-
|
|
65760
|
-
|
|
65761
|
-
|
|
65762
|
-
|
|
65763
|
-
|
|
65764
|
-
|
|
65765
|
-
|
|
65766
|
-
|
|
65767
|
-
|
|
65768
|
-
|
|
65769
|
-
|
|
65770
|
-
|
|
65771
|
-
|
|
65772
|
-
|
|
65773
|
-
|
|
65774
|
-
|
|
65775
|
-
|
|
65776
|
-
|
|
65777
|
-
|
|
65778
|
-
|
|
65779
|
-
|
|
65780
|
-
|
|
65781
|
-
|
|
65782
|
-
|
|
65783
|
-
|
|
65784
|
-
|
|
65785
|
-
|
|
65786
|
-
|
|
65787
|
-
|
|
65788
|
-
|
|
65789
|
-
|
|
65790
|
-
|
|
65791
|
-
|
|
65792
|
-
|
|
65793
|
-
|
|
65794
|
-
|
|
65795
|
-
|
|
65796
|
-
|
|
65797
|
-
|
|
65798
|
-
|
|
65799
|
-
|
|
65800
|
-
|
|
65801
|
-
|
|
65802
|
-
|
|
65803
|
-
|
|
65804
|
-
|
|
65805
|
-
|
|
65806
|
-
|
|
65807
|
-
|
|
65808
|
-
|
|
65809
|
-
|
|
65810
|
-
|
|
65811
|
-
|
|
65812
|
-
|
|
65813
|
-
|
|
65814
|
-
|
|
65815
|
-
|
|
65816
|
-
|
|
65817
|
-
|
|
65818
|
-
|
|
65819
|
-
|
|
65820
|
-
|
|
65821
|
-
|
|
65822
|
-
|
|
65823
|
-
|
|
65824
|
-
|
|
65825
|
-
|
|
65826
|
-
}
|
|
65827
|
-
return asciidoc_1;
|
|
65600
|
+
var attributes = {
|
|
65601
|
+
pattern:
|
|
65602
|
+
/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,
|
|
65603
|
+
lookbehind: true,
|
|
65604
|
+
inside: {
|
|
65605
|
+
quoted: {
|
|
65606
|
+
pattern: /([$`])(?:(?!\1)[^\\]|\\.)*\1/,
|
|
65607
|
+
inside: {
|
|
65608
|
+
punctuation: /^[$`]|[$`]$/
|
|
65609
|
+
}
|
|
65610
|
+
},
|
|
65611
|
+
interpreted: {
|
|
65612
|
+
pattern: /'(?:[^'\\]|\\.)*'/,
|
|
65613
|
+
inside: {
|
|
65614
|
+
punctuation: /^'|'$/ // See rest below
|
|
65615
|
+
}
|
|
65616
|
+
},
|
|
65617
|
+
string: /"(?:[^"\\]|\\.)*"/,
|
|
65618
|
+
variable: /\w+(?==)/,
|
|
65619
|
+
punctuation: /^\[|\]$|,/,
|
|
65620
|
+
operator: /=/,
|
|
65621
|
+
// The negative look-ahead prevents blank matches
|
|
65622
|
+
'attr-value': /(?!^\s+$).+/
|
|
65623
|
+
}
|
|
65624
|
+
};
|
|
65625
|
+
var asciidoc = (Prism.languages.asciidoc = {
|
|
65626
|
+
'comment-block': {
|
|
65627
|
+
pattern: /^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,
|
|
65628
|
+
alias: 'comment'
|
|
65629
|
+
},
|
|
65630
|
+
table: {
|
|
65631
|
+
pattern: /^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,
|
|
65632
|
+
inside: {
|
|
65633
|
+
specifiers: {
|
|
65634
|
+
pattern:
|
|
65635
|
+
/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,
|
|
65636
|
+
alias: 'attr-value'
|
|
65637
|
+
},
|
|
65638
|
+
punctuation: {
|
|
65639
|
+
pattern: /(^|[^\\])[|!]=*/,
|
|
65640
|
+
lookbehind: true
|
|
65641
|
+
} // See rest below
|
|
65642
|
+
}
|
|
65643
|
+
},
|
|
65644
|
+
'passthrough-block': {
|
|
65645
|
+
pattern: /^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
|
|
65646
|
+
inside: {
|
|
65647
|
+
punctuation: /^\++|\++$/ // See rest below
|
|
65648
|
+
}
|
|
65649
|
+
},
|
|
65650
|
+
// Literal blocks and listing blocks
|
|
65651
|
+
'literal-block': {
|
|
65652
|
+
pattern: /^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
|
|
65653
|
+
inside: {
|
|
65654
|
+
punctuation: /^(?:-+|\.+)|(?:-+|\.+)$/ // See rest below
|
|
65655
|
+
}
|
|
65656
|
+
},
|
|
65657
|
+
// Sidebar blocks, quote blocks, example blocks and open blocks
|
|
65658
|
+
'other-block': {
|
|
65659
|
+
pattern:
|
|
65660
|
+
/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
|
|
65661
|
+
inside: {
|
|
65662
|
+
punctuation: /^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/ // See rest below
|
|
65663
|
+
}
|
|
65664
|
+
},
|
|
65665
|
+
// list-punctuation and list-label must appear before indented-block
|
|
65666
|
+
'list-punctuation': {
|
|
65667
|
+
pattern:
|
|
65668
|
+
/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,
|
|
65669
|
+
lookbehind: true,
|
|
65670
|
+
alias: 'punctuation'
|
|
65671
|
+
},
|
|
65672
|
+
'list-label': {
|
|
65673
|
+
pattern: /(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,
|
|
65674
|
+
lookbehind: true,
|
|
65675
|
+
alias: 'symbol'
|
|
65676
|
+
},
|
|
65677
|
+
'indented-block': {
|
|
65678
|
+
pattern: /((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,
|
|
65679
|
+
lookbehind: true
|
|
65680
|
+
},
|
|
65681
|
+
comment: /^\/\/.*/m,
|
|
65682
|
+
title: {
|
|
65683
|
+
pattern:
|
|
65684
|
+
/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,
|
|
65685
|
+
alias: 'important',
|
|
65686
|
+
inside: {
|
|
65687
|
+
punctuation: /^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/ // See rest below
|
|
65688
|
+
}
|
|
65689
|
+
},
|
|
65690
|
+
'attribute-entry': {
|
|
65691
|
+
pattern: /^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,
|
|
65692
|
+
alias: 'tag'
|
|
65693
|
+
},
|
|
65694
|
+
attributes: attributes,
|
|
65695
|
+
hr: {
|
|
65696
|
+
pattern: /^'{3,}$/m,
|
|
65697
|
+
alias: 'punctuation'
|
|
65698
|
+
},
|
|
65699
|
+
'page-break': {
|
|
65700
|
+
pattern: /^<{3,}$/m,
|
|
65701
|
+
alias: 'punctuation'
|
|
65702
|
+
},
|
|
65703
|
+
admonition: {
|
|
65704
|
+
pattern: /^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,
|
|
65705
|
+
alias: 'keyword'
|
|
65706
|
+
},
|
|
65707
|
+
callout: [
|
|
65708
|
+
{
|
|
65709
|
+
pattern: /(^[ \t]*)<?\d*>/m,
|
|
65710
|
+
lookbehind: true,
|
|
65711
|
+
alias: 'symbol'
|
|
65712
|
+
},
|
|
65713
|
+
{
|
|
65714
|
+
pattern: /<\d+>/,
|
|
65715
|
+
alias: 'symbol'
|
|
65716
|
+
}
|
|
65717
|
+
],
|
|
65718
|
+
macro: {
|
|
65719
|
+
pattern:
|
|
65720
|
+
/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,
|
|
65721
|
+
inside: {
|
|
65722
|
+
function: /^[a-z\d-]+(?=:)/,
|
|
65723
|
+
punctuation: /^::?/,
|
|
65724
|
+
attributes: {
|
|
65725
|
+
pattern: /(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,
|
|
65726
|
+
inside: attributes.inside
|
|
65727
|
+
}
|
|
65728
|
+
}
|
|
65729
|
+
},
|
|
65730
|
+
inline: {
|
|
65731
|
+
/*
|
|
65732
|
+
The initial look-behind prevents the highlighting of escaped quoted text.
|
|
65733
|
+
Quoted text can be multi-line but cannot span an empty line.
|
|
65734
|
+
All quoted text can have attributes before [foobar, 'foobar', baz="bar"].
|
|
65735
|
+
First, we handle the constrained quotes.
|
|
65736
|
+
Those must be bounded by non-word chars and cannot have spaces between the delimiter and the first char.
|
|
65737
|
+
They are, in order: _emphasis_, ``double quotes'', `single quotes', `monospace`, 'emphasis', *strong*, +monospace+ and #unquoted#
|
|
65738
|
+
Then we handle the unconstrained quotes.
|
|
65739
|
+
Those do not have the restrictions of the constrained quotes.
|
|
65740
|
+
They are, in order: __emphasis__, **strong**, ++monospace++, +++passthrough+++, ##unquoted##, $$passthrough$$, ~subscript~, ^superscript^, {attribute-reference}, [[anchor]], [[[bibliography anchor]]], <<xref>>, (((indexes))) and ((indexes))
|
|
65741
|
+
*/
|
|
65742
|
+
pattern:
|
|
65743
|
+
/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,
|
|
65744
|
+
lookbehind: true,
|
|
65745
|
+
inside: {
|
|
65746
|
+
attributes: attributes,
|
|
65747
|
+
url: {
|
|
65748
|
+
pattern: /^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,
|
|
65749
|
+
inside: {
|
|
65750
|
+
punctuation: /^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/
|
|
65751
|
+
}
|
|
65752
|
+
},
|
|
65753
|
+
'attribute-ref': {
|
|
65754
|
+
pattern: /^\{.+\}$/,
|
|
65755
|
+
inside: {
|
|
65756
|
+
variable: {
|
|
65757
|
+
pattern: /(^\{)[a-z\d,+_-]+/,
|
|
65758
|
+
lookbehind: true
|
|
65759
|
+
},
|
|
65760
|
+
operator: /^[=?!#%@$]|!(?=[:}])/,
|
|
65761
|
+
punctuation: /^\{|\}$|::?/
|
|
65762
|
+
}
|
|
65763
|
+
},
|
|
65764
|
+
italic: {
|
|
65765
|
+
pattern: /^(['_])[\s\S]+\1$/,
|
|
65766
|
+
inside: {
|
|
65767
|
+
punctuation: /^(?:''?|__?)|(?:''?|__?)$/
|
|
65768
|
+
}
|
|
65769
|
+
},
|
|
65770
|
+
bold: {
|
|
65771
|
+
pattern: /^\*[\s\S]+\*$/,
|
|
65772
|
+
inside: {
|
|
65773
|
+
punctuation: /^\*\*?|\*\*?$/
|
|
65774
|
+
}
|
|
65775
|
+
},
|
|
65776
|
+
punctuation:
|
|
65777
|
+
/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/
|
|
65778
|
+
}
|
|
65779
|
+
},
|
|
65780
|
+
replacement: {
|
|
65781
|
+
pattern: /\((?:C|R|TM)\)/,
|
|
65782
|
+
alias: 'builtin'
|
|
65783
|
+
},
|
|
65784
|
+
entity: /&#?[\da-z]{1,8};/i,
|
|
65785
|
+
'line-continuation': {
|
|
65786
|
+
pattern: /(^| )\+$/m,
|
|
65787
|
+
lookbehind: true,
|
|
65788
|
+
alias: 'punctuation'
|
|
65789
|
+
}
|
|
65790
|
+
}); // Allow some nesting. There is no recursion though, so cloning should not be needed.
|
|
65791
|
+
function copyFromAsciiDoc(keys) {
|
|
65792
|
+
keys = keys.split(' ');
|
|
65793
|
+
var o = {};
|
|
65794
|
+
for (var i = 0, l = keys.length; i < l; i++) {
|
|
65795
|
+
o[keys[i]] = asciidoc[keys[i]];
|
|
65796
|
+
}
|
|
65797
|
+
return o
|
|
65798
|
+
}
|
|
65799
|
+
attributes.inside['interpreted'].inside.rest = copyFromAsciiDoc(
|
|
65800
|
+
'macro inline replacement entity'
|
|
65801
|
+
);
|
|
65802
|
+
asciidoc['passthrough-block'].inside.rest = copyFromAsciiDoc('macro');
|
|
65803
|
+
asciidoc['literal-block'].inside.rest = copyFromAsciiDoc('callout');
|
|
65804
|
+
asciidoc['table'].inside.rest = copyFromAsciiDoc(
|
|
65805
|
+
'comment-block passthrough-block literal-block other-block list-punctuation indented-block comment title attribute-entry attributes hr page-break admonition list-label callout macro inline replacement entity line-continuation'
|
|
65806
|
+
);
|
|
65807
|
+
asciidoc['other-block'].inside.rest = copyFromAsciiDoc(
|
|
65808
|
+
'table list-punctuation indented-block comment attribute-entry attributes hr page-break admonition list-label macro inline replacement entity line-continuation'
|
|
65809
|
+
);
|
|
65810
|
+
asciidoc['title'].inside.rest = copyFromAsciiDoc(
|
|
65811
|
+
'macro inline replacement entity'
|
|
65812
|
+
); // Plugin to make entity title show the real entity, idea by Roman Komarov
|
|
65813
|
+
Prism.hooks.add('wrap', function (env) {
|
|
65814
|
+
if (env.type === 'entity') {
|
|
65815
|
+
env.attributes['title'] = env.content.value.replace(/&/, '&');
|
|
65816
|
+
}
|
|
65817
|
+
});
|
|
65818
|
+
Prism.languages.adoc = Prism.languages.asciidoc;
|
|
65819
|
+
})(Prism);
|
|
65828
65820
|
}
|
|
65829
65821
|
|
|
65822
|
+
var asciidoc$2 = /*#__PURE__*/_mergeNamespaces({
|
|
65823
|
+
__proto__: null,
|
|
65824
|
+
'default': asciidoc_1
|
|
65825
|
+
}, [asciidoc_1]);
|
|
65826
|
+
|
|
65830
65827
|
var asm6502_1 = asm6502;
|
|
65831
65828
|
asm6502.displayName = 'asm6502';
|
|
65832
65829
|
asm6502.aliases = [];
|
|
@@ -66558,179 +66555,183 @@ var autoit$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
66558
66555
|
'default': autoit_1
|
|
66559
66556
|
}, [autoit_1]);
|
|
66560
66557
|
|
|
66561
|
-
var avisynth_1
|
|
66562
|
-
|
|
66563
|
-
|
|
66564
|
-
function
|
|
66558
|
+
var avisynth_1;
|
|
66559
|
+
var hasRequiredAvisynth;
|
|
66560
|
+
|
|
66561
|
+
function requireAvisynth () {
|
|
66562
|
+
if (hasRequiredAvisynth) return avisynth_1;
|
|
66563
|
+
hasRequiredAvisynth = 1;
|
|
66564
|
+
|
|
66565
|
+
avisynth_1 = avisynth;
|
|
66566
|
+
avisynth.displayName = 'avisynth';
|
|
66567
|
+
avisynth.aliases = ['avs'];
|
|
66568
|
+
function avisynth(Prism) {
|
|
66565
66569
|
(function (Prism) {
|
|
66566
|
-
|
|
66567
|
-
|
|
66568
|
-
|
|
66569
|
-
|
|
66570
|
-
|
|
66571
|
-
|
|
66572
|
-
|
|
66573
|
-
|
|
66574
|
-
|
|
66575
|
-
|
|
66576
|
-
|
|
66577
|
-
|
|
66578
|
-
|
|
66579
|
-
|
|
66580
|
-
|
|
66581
|
-
|
|
66582
|
-
|
|
66583
|
-
|
|
66584
|
-
|
|
66585
|
-
|
|
66586
|
-
|
|
66587
|
-
|
|
66588
|
-
|
|
66589
|
-
|
|
66590
|
-
|
|
66591
|
-
|
|
66592
|
-
|
|
66593
|
-
|
|
66594
|
-
|
|
66595
|
-
|
|
66596
|
-
|
|
66597
|
-
|
|
66598
|
-
|
|
66599
|
-
|
|
66600
|
-
|
|
66601
|
-
|
|
66602
|
-
|
|
66603
|
-
|
|
66604
|
-
|
|
66605
|
-
|
|
66606
|
-
|
|
66607
|
-
|
|
66608
|
-
|
|
66609
|
-
|
|
66610
|
-
|
|
66611
|
-
|
|
66612
|
-
|
|
66613
|
-
|
|
66614
|
-
|
|
66615
|
-
|
|
66616
|
-
|
|
66617
|
-
|
|
66618
|
-
|
|
66619
|
-
|
|
66620
|
-
|
|
66621
|
-
|
|
66622
|
-
|
|
66623
|
-
|
|
66624
|
-
|
|
66625
|
-
|
|
66626
|
-
|
|
66627
|
-
|
|
66628
|
-
|
|
66629
|
-
|
|
66630
|
-
|
|
66631
|
-
|
|
66632
|
-
|
|
66633
|
-
|
|
66634
|
-
|
|
66635
|
-
|
|
66636
|
-
|
|
66637
|
-
|
|
66638
|
-
|
|
66639
|
-
|
|
66640
|
-
|
|
66641
|
-
|
|
66642
|
-
|
|
66643
|
-
|
|
66644
|
-
|
|
66645
|
-
|
|
66646
|
-
|
|
66647
|
-
|
|
66648
|
-
|
|
66649
|
-
|
|
66650
|
-
|
|
66651
|
-
|
|
66652
|
-
|
|
66653
|
-
|
|
66654
|
-
|
|
66655
|
-
|
|
66656
|
-
|
|
66657
|
-
|
|
66658
|
-
|
|
66659
|
-
|
|
66660
|
-
|
|
66661
|
-
|
|
66662
|
-
|
|
66663
|
-
|
|
66664
|
-
|
|
66665
|
-
|
|
66666
|
-
|
|
66667
|
-
|
|
66668
|
-
|
|
66669
|
-
|
|
66670
|
-
|
|
66671
|
-
|
|
66672
|
-
|
|
66673
|
-
|
|
66674
|
-
|
|
66675
|
-
|
|
66676
|
-
|
|
66677
|
-
|
|
66678
|
-
|
|
66679
|
-
|
|
66680
|
-
|
|
66681
|
-
|
|
66682
|
-
|
|
66683
|
-
|
|
66684
|
-
|
|
66685
|
-
|
|
66686
|
-
|
|
66687
|
-
|
|
66688
|
-
|
|
66689
|
-
|
|
66690
|
-
|
|
66691
|
-
|
|
66692
|
-
|
|
66693
|
-
|
|
66694
|
-
|
|
66695
|
-
|
|
66696
|
-
|
|
66697
|
-
|
|
66698
|
-
|
|
66699
|
-
|
|
66700
|
-
|
|
66701
|
-
|
|
66702
|
-
|
|
66703
|
-
|
|
66704
|
-
|
|
66705
|
-
|
|
66706
|
-
|
|
66707
|
-
|
|
66708
|
-
|
|
66709
|
-
|
|
66710
|
-
|
|
66711
|
-
|
|
66712
|
-
|
|
66713
|
-
|
|
66714
|
-
|
|
66715
|
-
|
|
66716
|
-
|
|
66717
|
-
|
|
66718
|
-
|
|
66719
|
-
|
|
66720
|
-
|
|
66721
|
-
|
|
66722
|
-
|
|
66723
|
-
|
|
66724
|
-
|
|
66725
|
-
|
|
66726
|
-
|
|
66570
|
+
function replace(pattern, replacements) {
|
|
66571
|
+
return pattern.replace(/<<(\d+)>>/g, function (m, index) {
|
|
66572
|
+
return replacements[+index]
|
|
66573
|
+
})
|
|
66574
|
+
}
|
|
66575
|
+
function re(pattern, replacements, flags) {
|
|
66576
|
+
return RegExp(replace(pattern, replacements), flags || '')
|
|
66577
|
+
}
|
|
66578
|
+
var types = /bool|clip|float|int|string|val/.source;
|
|
66579
|
+
var internals = [
|
|
66580
|
+
// bools
|
|
66581
|
+
/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/
|
|
66582
|
+
.source, // control
|
|
66583
|
+
/apply|assert|default|eval|import|nop|select|undefined/.source, // global
|
|
66584
|
+
/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/
|
|
66585
|
+
.source, // conv
|
|
66586
|
+
/hex(?:value)?|value/.source, // numeric
|
|
66587
|
+
/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/
|
|
66588
|
+
.source, // trig
|
|
66589
|
+
/a?sinh?|a?cosh?|a?tan[2h]?/.source, // bit
|
|
66590
|
+
/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/
|
|
66591
|
+
.source, // runtime
|
|
66592
|
+
/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/
|
|
66593
|
+
.source, // script
|
|
66594
|
+
/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/
|
|
66595
|
+
.source, // string
|
|
66596
|
+
/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/
|
|
66597
|
+
.source, // version
|
|
66598
|
+
/isversionorgreater|version(?:number|string)/.source, // helper
|
|
66599
|
+
/buildpixeltype|colorspacenametopixeltype/.source, // avsplus
|
|
66600
|
+
/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source
|
|
66601
|
+
].join('|');
|
|
66602
|
+
var properties = [
|
|
66603
|
+
// content
|
|
66604
|
+
/has(?:audio|video)/.source, // resolution
|
|
66605
|
+
/height|width/.source, // framerate
|
|
66606
|
+
/frame(?:count|rate)|framerate(?:denominator|numerator)/.source, // interlacing
|
|
66607
|
+
/getparity|is(?:field|frame)based/.source, // color format
|
|
66608
|
+
/bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/
|
|
66609
|
+
.source, // audio
|
|
66610
|
+
/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/
|
|
66611
|
+
.source
|
|
66612
|
+
].join('|');
|
|
66613
|
+
var filters = [
|
|
66614
|
+
// source
|
|
66615
|
+
/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/
|
|
66616
|
+
.source, // color
|
|
66617
|
+
/coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/
|
|
66618
|
+
.source, // overlay
|
|
66619
|
+
/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source, // geometry
|
|
66620
|
+
/addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/
|
|
66621
|
+
.source, // pixel
|
|
66622
|
+
/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/
|
|
66623
|
+
.source, // timeline
|
|
66624
|
+
/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/
|
|
66625
|
+
.source, // interlace
|
|
66626
|
+
/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/
|
|
66627
|
+
.source, // audio
|
|
66628
|
+
/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/
|
|
66629
|
+
.source, // conditional
|
|
66630
|
+
/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/
|
|
66631
|
+
.source, // export
|
|
66632
|
+
/imagewriter/.source, // debug
|
|
66633
|
+
/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/
|
|
66634
|
+
.source
|
|
66635
|
+
].join('|');
|
|
66636
|
+
var allinternals = [internals, properties, filters].join('|');
|
|
66637
|
+
Prism.languages.avisynth = {
|
|
66638
|
+
comment: [
|
|
66639
|
+
{
|
|
66640
|
+
// Matches [* *] nestable block comments, but only supports 1 level of nested comments
|
|
66641
|
+
// /\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|<self>)*\*\]/
|
|
66642
|
+
pattern:
|
|
66643
|
+
/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,
|
|
66644
|
+
lookbehind: true,
|
|
66645
|
+
greedy: true
|
|
66646
|
+
},
|
|
66647
|
+
{
|
|
66648
|
+
// Matches /* */ block comments
|
|
66649
|
+
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
66650
|
+
lookbehind: true,
|
|
66651
|
+
greedy: true
|
|
66652
|
+
},
|
|
66653
|
+
{
|
|
66654
|
+
// Matches # comments
|
|
66655
|
+
pattern: /(^|[^\\$])#.*/,
|
|
66656
|
+
lookbehind: true,
|
|
66657
|
+
greedy: true
|
|
66658
|
+
}
|
|
66659
|
+
],
|
|
66660
|
+
// Handle before strings because optional arguments are surrounded by double quotes
|
|
66661
|
+
argument: {
|
|
66662
|
+
pattern: re(/\b(?:<<0>>)\s+("?)\w+\1/.source, [types], 'i'),
|
|
66663
|
+
inside: {
|
|
66664
|
+
keyword: /^\w+/
|
|
66665
|
+
}
|
|
66666
|
+
},
|
|
66667
|
+
// Optional argument assignment
|
|
66668
|
+
'argument-label': {
|
|
66669
|
+
pattern: /([,(][\s\\]*)\w+\s*=(?!=)/,
|
|
66670
|
+
lookbehind: true,
|
|
66671
|
+
inside: {
|
|
66672
|
+
'argument-name': {
|
|
66673
|
+
pattern: /^\w+/,
|
|
66674
|
+
alias: 'punctuation'
|
|
66675
|
+
},
|
|
66676
|
+
punctuation: /=$/
|
|
66677
|
+
}
|
|
66678
|
+
},
|
|
66679
|
+
string: [
|
|
66680
|
+
{
|
|
66681
|
+
// triple double-quoted
|
|
66682
|
+
pattern: /"""[\s\S]*?"""/,
|
|
66683
|
+
greedy: true
|
|
66684
|
+
},
|
|
66685
|
+
{
|
|
66686
|
+
// single double-quoted
|
|
66687
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
66688
|
+
greedy: true,
|
|
66689
|
+
inside: {
|
|
66690
|
+
constant: {
|
|
66691
|
+
// These *are* case-sensitive!
|
|
66692
|
+
pattern:
|
|
66693
|
+
/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/
|
|
66694
|
+
}
|
|
66695
|
+
}
|
|
66696
|
+
}
|
|
66697
|
+
],
|
|
66698
|
+
// The special "last" variable that takes the value of the last implicitly returned clip
|
|
66699
|
+
variable: /\b(?:last)\b/i,
|
|
66700
|
+
boolean: /\b(?:false|no|true|yes)\b/i,
|
|
66701
|
+
keyword:
|
|
66702
|
+
/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,
|
|
66703
|
+
constant: /\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,
|
|
66704
|
+
// AviSynth's internal functions, filters, and properties
|
|
66705
|
+
'builtin-function': {
|
|
66706
|
+
pattern: re(/\b(?:<<0>>)\b/.source, [allinternals], 'i'),
|
|
66707
|
+
alias: 'function'
|
|
66708
|
+
},
|
|
66709
|
+
'type-cast': {
|
|
66710
|
+
pattern: re(/\b(?:<<0>>)(?=\s*\()/.source, [types], 'i'),
|
|
66711
|
+
alias: 'keyword'
|
|
66712
|
+
},
|
|
66713
|
+
// External/user-defined filters
|
|
66714
|
+
function: {
|
|
66715
|
+
pattern: /\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,
|
|
66716
|
+
lookbehind: true
|
|
66717
|
+
},
|
|
66718
|
+
// Matches a \ as the first or last character on a line
|
|
66719
|
+
'line-continuation': {
|
|
66720
|
+
pattern: /(^[ \t]*)\\|\\(?=[ \t]*$)/m,
|
|
66721
|
+
lookbehind: true,
|
|
66722
|
+
alias: 'punctuation'
|
|
66723
|
+
},
|
|
66724
|
+
number:
|
|
66725
|
+
/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,
|
|
66726
|
+
operator: /\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,
|
|
66727
|
+
punctuation: /[{}\[\]();,.]/
|
|
66728
|
+
};
|
|
66729
|
+
Prism.languages.avs = Prism.languages.avisynth;
|
|
66730
|
+
})(Prism);
|
|
66731
|
+
}
|
|
66732
|
+
return avisynth_1;
|
|
66727
66733
|
}
|
|
66728
66734
|
|
|
66729
|
-
var avisynth$1 = /*#__PURE__*/_mergeNamespaces({
|
|
66730
|
-
__proto__: null,
|
|
66731
|
-
'default': avisynth_1
|
|
66732
|
-
}, [avisynth_1]);
|
|
66733
|
-
|
|
66734
66735
|
var avroIdl_1;
|
|
66735
66736
|
var hasRequiredAvroIdl;
|
|
66736
66737
|
|
|
@@ -67353,60 +67354,57 @@ function requireBirb () {
|
|
|
67353
67354
|
return birb_1;
|
|
67354
67355
|
}
|
|
67355
67356
|
|
|
67356
|
-
var
|
|
67357
|
-
var
|
|
67358
|
-
|
|
67359
|
-
|
|
67360
|
-
|
|
67361
|
-
|
|
67362
|
-
|
|
67363
|
-
|
|
67364
|
-
|
|
67365
|
-
|
|
67366
|
-
|
|
67367
|
-
|
|
67368
|
-
|
|
67369
|
-
|
|
67370
|
-
|
|
67371
|
-
|
|
67372
|
-
|
|
67373
|
-
|
|
67374
|
-
|
|
67375
|
-
|
|
67376
|
-
|
|
67377
|
-
|
|
67378
|
-
|
|
67379
|
-
|
|
67380
|
-
|
|
67381
|
-
|
|
67382
|
-
|
|
67383
|
-
|
|
67384
|
-
|
|
67385
|
-
|
|
67386
|
-
|
|
67387
|
-
|
|
67388
|
-
|
|
67389
|
-
|
|
67390
|
-
|
|
67391
|
-
|
|
67392
|
-
|
|
67393
|
-
|
|
67394
|
-
|
|
67395
|
-
|
|
67396
|
-
|
|
67397
|
-
|
|
67398
|
-
|
|
67399
|
-
|
|
67400
|
-
lookbehind: true
|
|
67401
|
-
},
|
|
67402
|
-
punctuation: /%[%?]|[|:;\[\]<>]/
|
|
67403
|
-
}
|
|
67404
|
-
}
|
|
67405
|
-
});
|
|
67406
|
-
}
|
|
67407
|
-
return bison_1;
|
|
67357
|
+
var refractorC = requireC();
|
|
67358
|
+
var bison_1 = bison;
|
|
67359
|
+
bison.displayName = 'bison';
|
|
67360
|
+
bison.aliases = [];
|
|
67361
|
+
function bison(Prism) {
|
|
67362
|
+
Prism.register(refractorC);
|
|
67363
|
+
Prism.languages.bison = Prism.languages.extend('c', {});
|
|
67364
|
+
Prism.languages.insertBefore('bison', 'comment', {
|
|
67365
|
+
bison: {
|
|
67366
|
+
// This should match all the beginning of the file
|
|
67367
|
+
// including the prologue(s), the bison declarations and
|
|
67368
|
+
// the grammar rules.
|
|
67369
|
+
pattern: /^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,
|
|
67370
|
+
inside: {
|
|
67371
|
+
c: {
|
|
67372
|
+
// Allow for one level of nested braces
|
|
67373
|
+
pattern: /%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,
|
|
67374
|
+
inside: {
|
|
67375
|
+
delimiter: {
|
|
67376
|
+
pattern: /^%?\{|%?\}$/,
|
|
67377
|
+
alias: 'punctuation'
|
|
67378
|
+
},
|
|
67379
|
+
'bison-variable': {
|
|
67380
|
+
pattern: /[$@](?:<[^\s>]+>)?[\w$]+/,
|
|
67381
|
+
alias: 'variable',
|
|
67382
|
+
inside: {
|
|
67383
|
+
punctuation: /<|>/
|
|
67384
|
+
}
|
|
67385
|
+
},
|
|
67386
|
+
rest: Prism.languages.c
|
|
67387
|
+
}
|
|
67388
|
+
},
|
|
67389
|
+
comment: Prism.languages.c.comment,
|
|
67390
|
+
string: Prism.languages.c.string,
|
|
67391
|
+
property: /\S+(?=:)/,
|
|
67392
|
+
keyword: /%\w+/,
|
|
67393
|
+
number: {
|
|
67394
|
+
pattern: /(^|[^@])\b(?:0x[\da-f]+|\d+)/i,
|
|
67395
|
+
lookbehind: true
|
|
67396
|
+
},
|
|
67397
|
+
punctuation: /%[%?]|[|:;\[\]<>]/
|
|
67398
|
+
}
|
|
67399
|
+
}
|
|
67400
|
+
});
|
|
67408
67401
|
}
|
|
67409
67402
|
|
|
67403
|
+
var bison$1 = /*#__PURE__*/_mergeNamespaces({
|
|
67404
|
+
__proto__: null,
|
|
67405
|
+
'default': bison_1
|
|
67406
|
+
}, [bison_1]);
|
|
67407
|
+
|
|
67410
67408
|
var bnf_1;
|
|
67411
67409
|
var hasRequiredBnf;
|
|
67412
67410
|
|
|
@@ -87969,13 +87967,13 @@ refractor.register(applescript_1);
|
|
|
87969
87967
|
refractor.register(aql_1);
|
|
87970
87968
|
refractor.register(arduino_1);
|
|
87971
87969
|
refractor.register(arff_1);
|
|
87972
|
-
refractor.register(
|
|
87970
|
+
refractor.register(asciidoc_1);
|
|
87973
87971
|
refractor.register(asm6502_1);
|
|
87974
87972
|
refractor.register(asmatmel_1);
|
|
87975
87973
|
refractor.register(aspnet_1);
|
|
87976
87974
|
refractor.register(autohotkey_1);
|
|
87977
87975
|
refractor.register(autoit_1);
|
|
87978
|
-
refractor.register(
|
|
87976
|
+
refractor.register(requireAvisynth());
|
|
87979
87977
|
refractor.register(requireAvroIdl());
|
|
87980
87978
|
refractor.register(requireBash());
|
|
87981
87979
|
refractor.register(requireBasic());
|
|
@@ -87983,7 +87981,7 @@ refractor.register(requireBatch());
|
|
|
87983
87981
|
refractor.register(requireBbcode());
|
|
87984
87982
|
refractor.register(requireBicep());
|
|
87985
87983
|
refractor.register(requireBirb());
|
|
87986
|
-
refractor.register(
|
|
87984
|
+
refractor.register(bison_1);
|
|
87987
87985
|
refractor.register(requireBnf());
|
|
87988
87986
|
refractor.register(requireBrainfuck());
|
|
87989
87987
|
refractor.register(requireBrightscript());
|
|
@@ -88386,7 +88384,7 @@ var a11yDark = {
|
|
|
88386
88384
|
|
|
88387
88385
|
var CodeBlock = function CodeBlock(_ref) {
|
|
88388
88386
|
var _ref$title = _ref.title,
|
|
88389
|
-
title = _ref$title === void 0 ? /*#__PURE__*/React__default
|
|
88387
|
+
title = _ref$title === void 0 ? /*#__PURE__*/React__default["default"].createElement("div", null, "Code snippet") : _ref$title,
|
|
88390
88388
|
codeString = _ref.codeString,
|
|
88391
88389
|
_ref$showCopyButton = _ref.showCopyButton,
|
|
88392
88390
|
showCopyButton = _ref$showCopyButton === void 0 ? true : _ref$showCopyButton,
|
|
@@ -88396,11 +88394,11 @@ var CodeBlock = function CodeBlock(_ref) {
|
|
|
88396
88394
|
sendViaEmail = _ref$sendViaEmail === void 0 ? undefined : _ref$sendViaEmail,
|
|
88397
88395
|
_ref$codeStyles = _ref.codeStyles,
|
|
88398
88396
|
codeStyles = _ref$codeStyles === void 0 ? {} : _ref$codeStyles;
|
|
88399
|
-
React
|
|
88397
|
+
React.useEffect(function () {
|
|
88400
88398
|
SyntaxHighlighter.registerLanguage("javascript", javascript_1);
|
|
88401
88399
|
}, []);
|
|
88402
88400
|
|
|
88403
|
-
var _useState = React
|
|
88401
|
+
var _useState = React.useState(false),
|
|
88404
88402
|
_useState2 = _slicedToArray(_useState, 2),
|
|
88405
88403
|
isCopied = _useState2[0],
|
|
88406
88404
|
setIsCopied = _useState2[1];
|
|
@@ -88408,7 +88406,7 @@ var CodeBlock = function CodeBlock(_ref) {
|
|
|
88408
88406
|
var _useTranslation = reactI18next.useTranslation(),
|
|
88409
88407
|
t = _useTranslation.t;
|
|
88410
88408
|
|
|
88411
|
-
React
|
|
88409
|
+
React.useEffect(function () {
|
|
88412
88410
|
if (!isCopied) return undefined;
|
|
88413
88411
|
var timer = setTimeout(function () {
|
|
88414
88412
|
return setIsCopied(false);
|
|
@@ -88417,28 +88415,28 @@ var CodeBlock = function CodeBlock(_ref) {
|
|
|
88417
88415
|
return clearTimeout(timer);
|
|
88418
88416
|
};
|
|
88419
88417
|
}, [isCopied]);
|
|
88420
|
-
return /*#__PURE__*/React__default
|
|
88418
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88421
88419
|
className: classnames(["relative", className])
|
|
88422
|
-
}, /*#__PURE__*/React__default
|
|
88420
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88423
88421
|
className: "neeto-ui-bg-primary-100 flex w-full items-center justify-between gap-2 p-3"
|
|
88424
|
-
}, title && /*#__PURE__*/React__default
|
|
88422
|
+
}, title && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
88425
88423
|
style: "h4",
|
|
88426
88424
|
className: "m-0",
|
|
88427
88425
|
"data-cy": "code-block-title-text"
|
|
88428
|
-
}, title), /*#__PURE__*/React__default
|
|
88426
|
+
}, title), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88429
88427
|
className: "flex items-center justify-end gap-2"
|
|
88430
|
-
}, sendViaEmail ? /*#__PURE__*/React__default
|
|
88428
|
+
}, sendViaEmail ? /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
88431
88429
|
label: t("neetoCommons.widget.installation.snippet.sendViaEmail"),
|
|
88432
88430
|
style: "secondary",
|
|
88433
88431
|
onClick: sendViaEmail
|
|
88434
|
-
}) : null, showCopyButton && /*#__PURE__*/React__default
|
|
88432
|
+
}) : null, showCopyButton && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
88435
88433
|
style: "primary",
|
|
88436
88434
|
icon: isCopied ? neetoIcons.Check : neetoIcons.Copy,
|
|
88437
88435
|
label: isCopied ? t("neetoCommons.widget.installation.snippet.copied") : t("neetoCommons.widget.installation.snippet.copy"),
|
|
88438
88436
|
onClick: function onClick() {
|
|
88439
88437
|
return copyToClipboard(codeString);
|
|
88440
88438
|
}
|
|
88441
|
-
}))), /*#__PURE__*/React__default
|
|
88439
|
+
}))), /*#__PURE__*/React__default["default"].createElement(SyntaxHighlighter, {
|
|
88442
88440
|
language: "javascript",
|
|
88443
88441
|
style: a11yDark,
|
|
88444
88442
|
customStyle: codeStyles,
|
|
@@ -88645,50 +88643,50 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
88645
88643
|
};
|
|
88646
88644
|
}();
|
|
88647
88645
|
|
|
88648
|
-
return /*#__PURE__*/React__default
|
|
88646
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Modal, {
|
|
88649
88647
|
className: "rounded-lg w-1/2 mx-auto",
|
|
88650
88648
|
isOpen: isModalOpen,
|
|
88651
88649
|
size: "medium",
|
|
88652
88650
|
onClose: onClose
|
|
88653
|
-
}, /*#__PURE__*/React__default
|
|
88651
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik.Formik, {
|
|
88654
88652
|
initialValues: getEmailWidgetSnippetFormInitialValues(subject),
|
|
88655
88653
|
validationSchema: EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA,
|
|
88656
88654
|
onSubmit: handleSubmit
|
|
88657
|
-
}, /*#__PURE__*/React__default
|
|
88655
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik.Form, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
88658
88656
|
style: "h2"
|
|
88659
|
-
}, t("neetoCommons.widget.email.title"))), /*#__PURE__*/React__default
|
|
88657
|
+
}, t("neetoCommons.widget.email.title"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Body, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88660
88658
|
className: "flex flex-col gap-4 py-4"
|
|
88661
|
-
}, /*#__PURE__*/React__default
|
|
88659
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik$1.MultiEmailInput, {
|
|
88662
88660
|
label: "".concat(t("neetoCommons.widget.email.fields.emails.label"), "*"),
|
|
88663
88661
|
name: "emails",
|
|
88664
88662
|
placeholder: t("neetoCommons.widget.email.fields.emails.placeholder"),
|
|
88665
88663
|
required: true
|
|
88666
|
-
}), /*#__PURE__*/React__default
|
|
88664
|
+
}), /*#__PURE__*/React__default["default"].createElement(formik$1.Input, {
|
|
88667
88665
|
label: t("neetoCommons.widget.email.fields.subject.label"),
|
|
88668
88666
|
name: "subject",
|
|
88669
88667
|
size: "large",
|
|
88670
88668
|
type: "text",
|
|
88671
88669
|
required: true
|
|
88672
|
-
})), /*#__PURE__*/React__default
|
|
88670
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88673
88671
|
className: "w-full"
|
|
88674
|
-
}, /*#__PURE__*/React__default
|
|
88672
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
88675
88673
|
className: "mb-6",
|
|
88676
88674
|
style: "body1"
|
|
88677
|
-
}, body), /*#__PURE__*/React__default
|
|
88675
|
+
}, body), /*#__PURE__*/React__default["default"].createElement(CodeBlock, {
|
|
88678
88676
|
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
88679
88677
|
codeString: codeString,
|
|
88680
88678
|
showCopyButton: false,
|
|
88681
88679
|
codeStyles: {
|
|
88682
88680
|
maxHeight: 300
|
|
88683
88681
|
}
|
|
88684
|
-
}))), /*#__PURE__*/React__default
|
|
88682
|
+
}))), /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Footer, {
|
|
88685
88683
|
className: "flex gap-x-2"
|
|
88686
|
-
}, /*#__PURE__*/React__default
|
|
88684
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
88687
88685
|
disabled: emailMutation.isLoading,
|
|
88688
88686
|
label: t("neetoCommons.widget.email.actions.send"),
|
|
88689
88687
|
loading: emailMutation.isLoading,
|
|
88690
88688
|
type: "submit"
|
|
88691
|
-
}), /*#__PURE__*/React__default
|
|
88689
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
88692
88690
|
label: t("neetoCommons.widget.email.actions.cancel"),
|
|
88693
88691
|
style: "text",
|
|
88694
88692
|
onClick: onClose
|
|
@@ -88726,10 +88724,10 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
88726
88724
|
|
|
88727
88725
|
var renderSelectedTab = function renderSelectedTab() {
|
|
88728
88726
|
return WIDGET_TYPES_VALUES.map(function (widget) {
|
|
88729
|
-
return /*#__PURE__*/React__default
|
|
88727
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88730
88728
|
className: "mb-1",
|
|
88731
88729
|
key: widget
|
|
88732
|
-
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default
|
|
88730
|
+
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default["default"].createElement(neetoui.Switch, {
|
|
88733
88731
|
label: "neeto".concat(capitalize(widget)),
|
|
88734
88732
|
checked: selectedWidgets.includes(widget),
|
|
88735
88733
|
onChange: function onChange() {
|
|
@@ -88739,19 +88737,19 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
88739
88737
|
});
|
|
88740
88738
|
};
|
|
88741
88739
|
|
|
88742
|
-
return /*#__PURE__*/React__default
|
|
88740
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88743
88741
|
className: "mb-4 px-2 w-full flex items-center justify-between gap-2"
|
|
88744
|
-
}, /*#__PURE__*/React__default
|
|
88742
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88745
88743
|
className: "flex items-center justify-start gap-1"
|
|
88746
|
-
}, /*#__PURE__*/React__default
|
|
88744
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88747
88745
|
className: "font-semibold text-base"
|
|
88748
|
-
}, "neeto", formattedPrimaryWidget), /*#__PURE__*/React__default
|
|
88746
|
+
}, "neeto", formattedPrimaryWidget), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
88749
88747
|
href: primarySelectedWidget ? WIDGET_KB_HELP_URL[primarySelectedWidget] : WIDGET_KB_BASE_URL,
|
|
88750
88748
|
target: "_blank",
|
|
88751
88749
|
rel: "noreferrer"
|
|
88752
|
-
}, /*#__PURE__*/React__default
|
|
88750
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
88753
88751
|
size: 16
|
|
88754
|
-
}))), /*#__PURE__*/React__default
|
|
88752
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88755
88753
|
className: "flex items-center justify-end gap-2"
|
|
88756
88754
|
}, renderSelectedTab()));
|
|
88757
88755
|
};
|
|
@@ -88771,20 +88769,20 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
88771
88769
|
var _useTranslation = reactI18next.useTranslation(),
|
|
88772
88770
|
t = _useTranslation.t;
|
|
88773
88771
|
|
|
88774
|
-
var bodyRef = React
|
|
88772
|
+
var bodyRef = React.useRef();
|
|
88775
88773
|
var forceUpdate = useForceUpdate();
|
|
88776
|
-
React
|
|
88774
|
+
React.useEffect(function () {
|
|
88777
88775
|
forceUpdate();
|
|
88778
88776
|
}, []);
|
|
88779
88777
|
var apiKeyResult = useFetchApiKey();
|
|
88780
88778
|
var initialWidgets = ramda.uniq(ramda.intersection(ramda.append(primaryApp, initialSelectedWidgets), WIDGET_TYPES_VALUES));
|
|
88781
88779
|
|
|
88782
|
-
var _useState = React
|
|
88780
|
+
var _useState = React.useState(EMAIL_TYPES["null"]),
|
|
88783
88781
|
_useState2 = _slicedToArray(_useState, 2),
|
|
88784
88782
|
emailType = _useState2[0],
|
|
88785
88783
|
setEmailType = _useState2[1];
|
|
88786
88784
|
|
|
88787
|
-
var _useState3 = React
|
|
88785
|
+
var _useState3 = React.useState(ramda.intersection(initialWidgets, WIDGET_TYPES_VALUES)),
|
|
88788
88786
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
88789
88787
|
selectedWidgets = _useState4[0],
|
|
88790
88788
|
setSelectedWidgets = _useState4[1];
|
|
@@ -88821,9 +88819,9 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
88821
88819
|
subject: t("neetoCommons.widget.email.fields.subject.values.embedCode", {
|
|
88822
88820
|
selectedWidgets: getSelectedWidgetsCombinedText(selectedWidgets)
|
|
88823
88821
|
}),
|
|
88824
|
-
body: /*#__PURE__*/React__default
|
|
88822
|
+
body: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88825
88823
|
ref: bodyRef
|
|
88826
|
-
}, /*#__PURE__*/React__default
|
|
88824
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
88827
88825
|
i18nKey: "neetoCommons.widget.email.body.values.embedCode",
|
|
88828
88826
|
values: {
|
|
88829
88827
|
selectedWidgets: getSelectedWidgetsCombinedText(selectedWidgets),
|
|
@@ -88831,16 +88829,16 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
88831
88829
|
helpEmail: INSTALLATION_HELP_EMAIL
|
|
88832
88830
|
},
|
|
88833
88831
|
components: {
|
|
88834
|
-
p: /*#__PURE__*/React__default
|
|
88832
|
+
p: /*#__PURE__*/React__default["default"].createElement("p", {
|
|
88835
88833
|
style: {
|
|
88836
88834
|
paddingBottom: "10px"
|
|
88837
88835
|
}
|
|
88838
88836
|
}),
|
|
88839
|
-
configureLink: /*#__PURE__*/React__default
|
|
88837
|
+
configureLink: /*#__PURE__*/React__default["default"].createElement("a", {
|
|
88840
88838
|
href: NEETO_CHAT_CONFIGURE_URL,
|
|
88841
88839
|
className: "neeto-ui-text-primary-800"
|
|
88842
88840
|
}),
|
|
88843
|
-
mail: /*#__PURE__*/React__default
|
|
88841
|
+
mail: /*#__PURE__*/React__default["default"].createElement("a", {
|
|
88844
88842
|
href: "mailto:".concat(INSTALLATION_HELP_EMAIL),
|
|
88845
88843
|
className: "neeto-ui-text-primary-800"
|
|
88846
88844
|
})
|
|
@@ -88884,89 +88882,89 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
88884
88882
|
};
|
|
88885
88883
|
|
|
88886
88884
|
if (apiKeyResult.isLoading) {
|
|
88887
|
-
return /*#__PURE__*/React__default
|
|
88885
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88888
88886
|
className: "h-full w-full"
|
|
88889
|
-
}, /*#__PURE__*/React__default
|
|
88887
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.PageLoader, null));
|
|
88890
88888
|
}
|
|
88891
88889
|
|
|
88892
|
-
return /*#__PURE__*/React__default
|
|
88890
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88893
88891
|
className: "mx-auto w-full flex-col items-center justify-start mb-10"
|
|
88894
|
-
}, /*#__PURE__*/React__default
|
|
88892
|
+
}, /*#__PURE__*/React__default["default"].createElement(SelectionTabs, {
|
|
88895
88893
|
primarySelectedWidget: primaryApp,
|
|
88896
88894
|
selectedWidgets: selectedWidgets,
|
|
88897
88895
|
updateSelectedWidgets: updateSelectedWidgets
|
|
88898
|
-
}), /*#__PURE__*/React__default
|
|
88896
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88899
88897
|
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start mb-6"
|
|
88900
|
-
}, /*#__PURE__*/React__default
|
|
88898
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88901
88899
|
className: "mx-auto mb-4 w-full",
|
|
88902
88900
|
"data-testid": "embed-code-block"
|
|
88903
|
-
}, /*#__PURE__*/React__default
|
|
88901
|
+
}, /*#__PURE__*/React__default["default"].createElement(CodeBlock, {
|
|
88904
88902
|
codeString: getEmbedCodeString(),
|
|
88905
88903
|
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
88906
|
-
title: /*#__PURE__*/React__default
|
|
88904
|
+
title: /*#__PURE__*/React__default["default"].createElement("div", null, "Embed code"),
|
|
88907
88905
|
sendViaEmail: function sendViaEmail() {
|
|
88908
88906
|
return handleSendViaEmail(EMAIL_TYPES.embedCode);
|
|
88909
88907
|
}
|
|
88910
|
-
})), /*#__PURE__*/React__default
|
|
88908
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88911
88909
|
className: "w-full"
|
|
88912
|
-
}, /*#__PURE__*/React__default
|
|
88910
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
88913
88911
|
i18nKey: "neetoCommons.widget.installation.instructions.placement",
|
|
88914
88912
|
values: {
|
|
88915
88913
|
selectedWidgets: isNotEmpty(selectedWidgets) ? getSelectedWidgetsCombinedText(selectedWidgets, true) : "none of the widgets"
|
|
88916
88914
|
},
|
|
88917
88915
|
components: {
|
|
88918
|
-
fontBold: /*#__PURE__*/React__default
|
|
88916
|
+
fontBold: /*#__PURE__*/React__default["default"].createElement("span", {
|
|
88919
88917
|
className: "font-semibold"
|
|
88920
88918
|
}),
|
|
88921
|
-
fontNormal: /*#__PURE__*/React__default
|
|
88919
|
+
fontNormal: /*#__PURE__*/React__default["default"].createElement("span", {
|
|
88922
88920
|
className: "font-normal"
|
|
88923
88921
|
})
|
|
88924
88922
|
}
|
|
88925
|
-
}, "Place the embed code in your HTML file. This will embed the selected widgets in your website."))), enabledWidgets.chat || enabledWidgets.replay ? /*#__PURE__*/React__default
|
|
88923
|
+
}, "Place the embed code in your HTML file. This will embed the selected widgets in your website."))), enabledWidgets.chat || enabledWidgets.replay ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88926
88924
|
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start mb-6"
|
|
88927
|
-
}, /*#__PURE__*/React__default
|
|
88925
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88928
88926
|
className: "mx-auto mb-4 w-full"
|
|
88929
|
-
}, /*#__PURE__*/React__default
|
|
88927
|
+
}, /*#__PURE__*/React__default["default"].createElement(CodeBlock, {
|
|
88930
88928
|
codeString: getSampleUserIdentity(enabledWidgets),
|
|
88931
88929
|
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
88932
88930
|
sendViaEmail: function sendViaEmail() {
|
|
88933
88931
|
return handleSendViaEmail(EMAIL_TYPES.userIdentity);
|
|
88934
88932
|
},
|
|
88935
|
-
title: /*#__PURE__*/React__default
|
|
88933
|
+
title: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88936
88934
|
className: "flex items-center justify-start"
|
|
88937
|
-
}, /*#__PURE__*/React__default
|
|
88935
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, "User identity (Optional)"), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
88938
88936
|
href: enabledWidgets.chat ? NEETO_CHAT_USER_IDENTITY_URL : NEETO_REPLAY_CONFIGURE_URL,
|
|
88939
88937
|
target: "_blank",
|
|
88940
88938
|
rel: "noreferrer",
|
|
88941
88939
|
className: "ml-1"
|
|
88942
|
-
}, /*#__PURE__*/React__default
|
|
88940
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
88943
88941
|
size: 16
|
|
88944
88942
|
})))
|
|
88945
|
-
})), /*#__PURE__*/React__default
|
|
88943
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88946
88944
|
className: "w-full"
|
|
88947
|
-
}, t("neetoCommons.widget.installation.instructions.userIdentity"))) : null, enabledWidgets.replay ? /*#__PURE__*/React__default
|
|
88945
|
+
}, t("neetoCommons.widget.installation.instructions.userIdentity"))) : null, enabledWidgets.replay ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88948
88946
|
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start"
|
|
88949
|
-
}, /*#__PURE__*/React__default
|
|
88947
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88950
88948
|
className: "mx-auto mb-4 w-full"
|
|
88951
|
-
}, /*#__PURE__*/React__default
|
|
88949
|
+
}, /*#__PURE__*/React__default["default"].createElement(CodeBlock, {
|
|
88952
88950
|
codeString: SAMPLE_CONTEXT_CODE_STRING,
|
|
88953
88951
|
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
88954
88952
|
sendViaEmail: function sendViaEmail() {
|
|
88955
88953
|
return handleSendViaEmail(EMAIL_TYPES.sessionContext);
|
|
88956
88954
|
},
|
|
88957
|
-
title: /*#__PURE__*/React__default
|
|
88955
|
+
title: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88958
88956
|
className: "flex items-center justify-start"
|
|
88959
|
-
}, /*#__PURE__*/React__default
|
|
88957
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, "Session context (Optional)"), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
88960
88958
|
href: NEETO_REPLAY_CONFIGURE_URL,
|
|
88961
88959
|
target: "_blank",
|
|
88962
88960
|
rel: "noreferrer",
|
|
88963
88961
|
className: "ml-1"
|
|
88964
|
-
}, /*#__PURE__*/React__default
|
|
88962
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
88965
88963
|
size: 16
|
|
88966
88964
|
})))
|
|
88967
|
-
})), /*#__PURE__*/React__default
|
|
88965
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88968
88966
|
className: "w-full"
|
|
88969
|
-
}, t("neetoCommons.widget.installation.instructions.sessionContext"))) : null, /*#__PURE__*/React__default
|
|
88967
|
+
}, t("neetoCommons.widget.installation.instructions.sessionContext"))) : null, /*#__PURE__*/React__default["default"].createElement(CodeSnippet, _extends$5({
|
|
88970
88968
|
isModalOpen: !!emailType && isNotEmpty(selectedWidgets),
|
|
88971
88969
|
onClose: function onClose() {
|
|
88972
88970
|
return setEmailType(EMAIL_TYPES["null"]);
|
|
@@ -88982,9 +88980,9 @@ EmbedCode.propTypes = {
|
|
|
88982
88980
|
var queryClient = new reactQuery.QueryClient();
|
|
88983
88981
|
|
|
88984
88982
|
var EmbedCodeQueryClient = function EmbedCodeQueryClient(props) {
|
|
88985
|
-
return /*#__PURE__*/React__default
|
|
88983
|
+
return /*#__PURE__*/React__default["default"].createElement(reactQuery.QueryClientProvider, {
|
|
88986
88984
|
client: queryClient
|
|
88987
|
-
}, /*#__PURE__*/React__default
|
|
88985
|
+
}, /*#__PURE__*/React__default["default"].createElement(EmbedCode, props));
|
|
88988
88986
|
};
|
|
88989
88987
|
|
|
88990
88988
|
EmbedCodeQueryClient.propTypes = {
|
|
@@ -89034,7 +89032,7 @@ var PrivateRoute = function PrivateRoute(_ref) {
|
|
|
89034
89032
|
redirectRoute = _ref.redirectRoute,
|
|
89035
89033
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
89036
89034
|
|
|
89037
|
-
return condition ? /*#__PURE__*/React__default
|
|
89035
|
+
return condition ? /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Route, props) : /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Redirect, {
|
|
89038
89036
|
to: {
|
|
89039
89037
|
pathname: redirectRoute
|
|
89040
89038
|
}
|
|
@@ -89043,7 +89041,7 @@ var PrivateRoute = function PrivateRoute(_ref) {
|
|
|
89043
89041
|
|
|
89044
89042
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
89045
89043
|
|
|
89046
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty$
|
|
89044
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
89047
89045
|
|
|
89048
89046
|
var REMOVE_SELECT_DOWN_ARROW = {
|
|
89049
89047
|
DropdownIndicator: function DropdownIndicator() {
|
|
@@ -89342,46 +89340,46 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
|
|
|
89342
89340
|
var _useTranslation = reactI18next.useTranslation(),
|
|
89343
89341
|
t = _useTranslation.t;
|
|
89344
89342
|
|
|
89345
|
-
return /*#__PURE__*/React__default
|
|
89343
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89346
89344
|
className: "w-full space-y-4"
|
|
89347
89345
|
}, DAYS.map(function (day) {
|
|
89348
89346
|
var _sortPeriodsByKey;
|
|
89349
89347
|
|
|
89350
|
-
return /*#__PURE__*/React__default
|
|
89348
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89351
89349
|
className: "neeto-ui-rounded-md neeto-ui-shadow-s flex w-full items-start justify-start border border-gray-300 py-4 px-12",
|
|
89352
89350
|
key: day
|
|
89353
|
-
}, /*#__PURE__*/React__default
|
|
89351
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89354
89352
|
className: "mt-0.5 w-16 text-gray-700",
|
|
89355
89353
|
"data-cy": joinHyphenCase(day, "day-text"),
|
|
89356
89354
|
style: "h5",
|
|
89357
89355
|
weight: "semibold"
|
|
89358
|
-
}, t("neetoCommons.schedule.days.".concat(day))), /*#__PURE__*/React__default
|
|
89356
|
+
}, t("neetoCommons.schedule.days.".concat(day))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89359
89357
|
className: "flex w-9/12 flex-col items-center space-y-4"
|
|
89360
89358
|
}, isPresent(periods[day]) ? (_sortPeriodsByKey = sortPeriodsByKey({
|
|
89361
89359
|
periods: periods[day],
|
|
89362
89360
|
key: "startTime",
|
|
89363
89361
|
order: "asc"
|
|
89364
89362
|
})) === null || _sortPeriodsByKey === void 0 ? void 0 : _sortPeriodsByKey.map(function (period) {
|
|
89365
|
-
return /*#__PURE__*/React__default
|
|
89363
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89366
89364
|
className: "flex items-center space-x-4",
|
|
89367
89365
|
key: period.id
|
|
89368
|
-
}, /*#__PURE__*/React__default
|
|
89366
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89369
89367
|
className: "w-24 text-right text-gray-700",
|
|
89370
89368
|
lineHeight: "relaxed",
|
|
89371
89369
|
style: "h5",
|
|
89372
89370
|
weight: "semibold",
|
|
89373
89371
|
"data-cy": joinHyphenCase(day, period.startTime, "start-time-text")
|
|
89374
|
-
}, period.startTime), /*#__PURE__*/React__default
|
|
89372
|
+
}, period.startTime), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89375
89373
|
className: "text-gray-600",
|
|
89376
89374
|
component: "span"
|
|
89377
|
-
}, "-"), /*#__PURE__*/React__default
|
|
89375
|
+
}, "-"), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89378
89376
|
className: "w-24 text-left text-gray-700",
|
|
89379
89377
|
lineHeight: "relaxed",
|
|
89380
89378
|
style: "h5",
|
|
89381
89379
|
weight: "semibold",
|
|
89382
89380
|
"data-cy": joinHyphenCase(day, period.endTime, "start-time-text")
|
|
89383
89381
|
}, period.endTime));
|
|
89384
|
-
}) : /*#__PURE__*/React__default
|
|
89382
|
+
}) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89385
89383
|
className: "mx-8 mt-0.5 text-gray-700",
|
|
89386
89384
|
"data-cy": joinHyphenCase(day, "unavailable-time-text"),
|
|
89387
89385
|
lineHeight: "relaxed",
|
|
@@ -89488,28 +89486,28 @@ var ScheduleRow = function ScheduleRow(_ref) {
|
|
|
89488
89486
|
setFieldValue("wdays[".concat(wdayIndex, "].available"), !isLastRowDeleted);
|
|
89489
89487
|
};
|
|
89490
89488
|
|
|
89491
|
-
return /*#__PURE__*/React__default
|
|
89489
|
+
return /*#__PURE__*/React__default["default"].createElement(formik.FieldArray, {
|
|
89492
89490
|
name: "wdays[".concat(wdayIndex, "].periods"),
|
|
89493
89491
|
render: function render(arrayHelpers) {
|
|
89494
89492
|
var _values$wdays$wdayInd, _values$wdays$wdayInd2;
|
|
89495
89493
|
|
|
89496
|
-
return /*#__PURE__*/React__default
|
|
89494
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89497
89495
|
className: "flex w-full items-start justify-between"
|
|
89498
|
-
}, isNotPresent((_values$wdays$wdayInd = values.wdays[wdayIndex]) === null || _values$wdays$wdayInd === void 0 ? void 0 : _values$wdays$wdayInd.periods) ? /*#__PURE__*/React__default
|
|
89496
|
+
}, isNotPresent((_values$wdays$wdayInd = values.wdays[wdayIndex]) === null || _values$wdays$wdayInd === void 0 ? void 0 : _values$wdays$wdayInd.periods) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89499
89497
|
className: "mx-auto mt-1 flex w-80 items-center justify-center"
|
|
89500
|
-
}, /*#__PURE__*/React__default
|
|
89498
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89501
89499
|
className: "text-gray-700",
|
|
89502
89500
|
lineHeight: "relaxed",
|
|
89503
89501
|
style: "h5"
|
|
89504
|
-
}, t("neetoCommons.schedule.unavailable"))) : /*#__PURE__*/React__default
|
|
89502
|
+
}, t("neetoCommons.schedule.unavailable"))) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89505
89503
|
className: "w-full space-y-4"
|
|
89506
89504
|
}, (_values$wdays$wdayInd2 = values.wdays[wdayIndex].periods) === null || _values$wdays$wdayInd2 === void 0 ? void 0 : _values$wdays$wdayInd2.map(function (period, index) {
|
|
89507
|
-
return /*#__PURE__*/React__default
|
|
89505
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89508
89506
|
className: "mx-auto flex w-80 flex-col",
|
|
89509
89507
|
key: "wdays[".concat(wdayIndex, "].periods[").concat(index, "]")
|
|
89510
|
-
}, /*#__PURE__*/React__default
|
|
89508
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89511
89509
|
className: "flex min-w-full items-start space-x-3"
|
|
89512
|
-
}, /*#__PURE__*/React__default
|
|
89510
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik$1.Select, {
|
|
89513
89511
|
isClearable: true,
|
|
89514
89512
|
isSearchable: true,
|
|
89515
89513
|
className: "w-full",
|
|
@@ -89528,7 +89526,7 @@ var ScheduleRow = function ScheduleRow(_ref) {
|
|
|
89528
89526
|
onChange: function onChange(e) {
|
|
89529
89527
|
return setFieldValue("wdays[".concat(wdayIndex, "].periods[").concat(index, "].startTime"), (e === null || e === void 0 ? void 0 : e.value) || "");
|
|
89530
89528
|
}
|
|
89531
|
-
}), /*#__PURE__*/React__default
|
|
89529
|
+
}), /*#__PURE__*/React__default["default"].createElement(formik$1.Select, {
|
|
89532
89530
|
isClearable: true,
|
|
89533
89531
|
isSearchable: true,
|
|
89534
89532
|
className: "w-full",
|
|
@@ -89547,21 +89545,21 @@ var ScheduleRow = function ScheduleRow(_ref) {
|
|
|
89547
89545
|
onChange: function onChange(e) {
|
|
89548
89546
|
return setFieldValue("wdays[".concat(wdayIndex, "].periods[").concat(index, "].endTime"), (e === null || e === void 0 ? void 0 : e.value) || "");
|
|
89549
89547
|
}
|
|
89550
|
-
}), /*#__PURE__*/React__default
|
|
89548
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoIcons.Delete, {
|
|
89551
89549
|
className: "mt-2 w-16 cursor-pointer hover:text-red-700",
|
|
89552
89550
|
"data-cy": "delete-period-button",
|
|
89553
89551
|
size: 20,
|
|
89554
89552
|
onClick: function onClick() {
|
|
89555
89553
|
return handleDeleteRow(arrayHelpers, index);
|
|
89556
89554
|
}
|
|
89557
|
-
})), /*#__PURE__*/React__default
|
|
89555
|
+
})), /*#__PURE__*/React__default["default"].createElement(formik.ErrorMessage, {
|
|
89558
89556
|
name: "wdays[".concat(wdayIndex, "].periods[").concat(index, "]")
|
|
89559
89557
|
}, function (message) {
|
|
89560
|
-
return _typeof$
|
|
89558
|
+
return _typeof$3(message) !== "object" && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
89561
89559
|
className: "mt-1 w-11/12 px-2 text-xs text-red-500"
|
|
89562
89560
|
}, message);
|
|
89563
89561
|
}));
|
|
89564
|
-
}))), /*#__PURE__*/React__default
|
|
89562
|
+
}))), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
89565
89563
|
className: "flex-shrink-0",
|
|
89566
89564
|
"data-cy": "add-new-period-button",
|
|
89567
89565
|
icon: neetoIcons.Plus,
|
|
@@ -89586,12 +89584,12 @@ var Form = function Form(_ref) {
|
|
|
89586
89584
|
setFieldValue = _ref.setFieldValue,
|
|
89587
89585
|
index = _ref.index;
|
|
89588
89586
|
|
|
89589
|
-
var _useState = React
|
|
89587
|
+
var _useState = React.useState([]),
|
|
89590
89588
|
_useState2 = _slicedToArray(_useState, 2),
|
|
89591
89589
|
deletedPeriods = _useState2[0],
|
|
89592
89590
|
setDeletedPeriods = _useState2[1];
|
|
89593
89591
|
|
|
89594
|
-
var _useState3 = React
|
|
89592
|
+
var _useState3 = React.useState([]),
|
|
89595
89593
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
89596
89594
|
wdaysToCopy = _useState4[0],
|
|
89597
89595
|
setWdaysToCopy = _useState4[1];
|
|
@@ -89642,13 +89640,13 @@ var Form = function Form(_ref) {
|
|
|
89642
89640
|
return setWdaysToCopy(e.target.checked ? ramda.append(day) : ramda.without([day]));
|
|
89643
89641
|
};
|
|
89644
89642
|
|
|
89645
|
-
return /*#__PURE__*/React__default
|
|
89643
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89646
89644
|
className: "border neeto-ui-rounded-md neeto-ui-shadow-s w-full border-gray-300 px-6"
|
|
89647
|
-
}, /*#__PURE__*/React__default
|
|
89645
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89648
89646
|
className: "my-4 flex w-full items-start space-x-4"
|
|
89649
|
-
}, /*#__PURE__*/React__default
|
|
89647
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89650
89648
|
className: "mt-1 flex w-16 items-center justify-start"
|
|
89651
|
-
}, /*#__PURE__*/React__default
|
|
89649
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik$1.Checkbox, {
|
|
89652
89650
|
checked: values.wdays[index].available,
|
|
89653
89651
|
"data-cy": joinHyphenCase(day, "weekly-hours-checkbox"),
|
|
89654
89652
|
id: "day",
|
|
@@ -89657,18 +89655,18 @@ var Form = function Form(_ref) {
|
|
|
89657
89655
|
return handleCheckbox(setFieldValue, values);
|
|
89658
89656
|
},
|
|
89659
89657
|
"aria-label": "wdays[".concat(index, "].available")
|
|
89660
|
-
}), /*#__PURE__*/React__default
|
|
89658
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89661
89659
|
className: "ml-2 capitalize",
|
|
89662
89660
|
component: "span",
|
|
89663
89661
|
"data-cy": joinHyphenCase(day, "day-text"),
|
|
89664
89662
|
style: "body2",
|
|
89665
89663
|
weight: "semibold"
|
|
89666
|
-
}, t("neetoCommons.schedule.days.".concat(day)))), /*#__PURE__*/React__default
|
|
89664
|
+
}, t("neetoCommons.schedule.days.".concat(day)))), /*#__PURE__*/React__default["default"].createElement(ScheduleRow, {
|
|
89667
89665
|
setFieldValue: setFieldValue,
|
|
89668
89666
|
values: values,
|
|
89669
89667
|
wdayIndex: index,
|
|
89670
89668
|
day: day
|
|
89671
|
-
}), /*#__PURE__*/React__default
|
|
89669
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
|
|
89672
89670
|
closeOnSelect: true,
|
|
89673
89671
|
buttonSize: "small",
|
|
89674
89672
|
icon: neetoIcons.Copy,
|
|
@@ -89685,19 +89683,19 @@ var Form = function Form(_ref) {
|
|
|
89685
89683
|
onClose: function onClose() {
|
|
89686
89684
|
return setWdaysToCopy([]);
|
|
89687
89685
|
}
|
|
89688
|
-
}, /*#__PURE__*/React__default
|
|
89686
|
+
}, /*#__PURE__*/React__default["default"].createElement("li", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89689
89687
|
style: "h5"
|
|
89690
89688
|
}, t("neetoCommons.schedule.copySchedule"))), DAYS.filter(function (copyDay) {
|
|
89691
89689
|
return copyDay !== day;
|
|
89692
89690
|
}).map(function (day) {
|
|
89693
|
-
return /*#__PURE__*/React__default
|
|
89691
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
89694
89692
|
key: day,
|
|
89695
89693
|
onClick: function onClick(e) {
|
|
89696
89694
|
return e.stopPropagation();
|
|
89697
89695
|
}
|
|
89698
|
-
}, /*#__PURE__*/React__default
|
|
89696
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, {
|
|
89699
89697
|
className: "w-full cursor-pointer capitalize"
|
|
89700
|
-
}, /*#__PURE__*/React__default
|
|
89698
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Checkbox, {
|
|
89701
89699
|
id: day,
|
|
89702
89700
|
label: t("neetoCommons.schedule.days.".concat(day)),
|
|
89703
89701
|
checked: wdaysToCopy.includes(day),
|
|
@@ -89705,7 +89703,7 @@ var Form = function Form(_ref) {
|
|
|
89705
89703
|
return handleCopyChange(e, day);
|
|
89706
89704
|
}
|
|
89707
89705
|
})));
|
|
89708
|
-
}), /*#__PURE__*/React__default
|
|
89706
|
+
}), /*#__PURE__*/React__default["default"].createElement("li", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
89709
89707
|
disabled: isNotPresent(wdaysToCopy),
|
|
89710
89708
|
label: "Submit",
|
|
89711
89709
|
size: "small",
|
|
@@ -89732,22 +89730,22 @@ var Fields = function Fields(_ref) {
|
|
|
89732
89730
|
resetForm = _useFormikContext.resetForm,
|
|
89733
89731
|
errors = _useFormikContext.errors;
|
|
89734
89732
|
|
|
89735
|
-
React
|
|
89733
|
+
React.useEffect(function () {
|
|
89736
89734
|
return handleValuesChanged(values);
|
|
89737
89735
|
}, [values]);
|
|
89738
|
-
React
|
|
89736
|
+
React.useImperativeHandle(scheduleRef, function () {
|
|
89739
89737
|
return {
|
|
89740
89738
|
resetForm: resetForm,
|
|
89741
89739
|
errors: errors
|
|
89742
89740
|
};
|
|
89743
89741
|
});
|
|
89744
|
-
return /*#__PURE__*/React__default
|
|
89742
|
+
return /*#__PURE__*/React__default["default"].createElement(formik.FieldArray, {
|
|
89745
89743
|
name: "wdays",
|
|
89746
89744
|
render: function render() {
|
|
89747
|
-
return /*#__PURE__*/React__default
|
|
89745
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89748
89746
|
className: "space-y-4"
|
|
89749
89747
|
}, values.wdays.map(function (item, index) {
|
|
89750
|
-
return /*#__PURE__*/React__default
|
|
89748
|
+
return /*#__PURE__*/React__default["default"].createElement(Form, {
|
|
89751
89749
|
handleCopy: handleCopy,
|
|
89752
89750
|
index: index,
|
|
89753
89751
|
key: item.wday,
|
|
@@ -89775,7 +89773,7 @@ var Header = function Header(_ref) {
|
|
|
89775
89773
|
var _useTranslation = reactI18next.useTranslation(),
|
|
89776
89774
|
t = _useTranslation.t;
|
|
89777
89775
|
|
|
89778
|
-
var _useState = React
|
|
89776
|
+
var _useState = React.useState(getTimeZoneAndTime()),
|
|
89779
89777
|
_useState2 = _slicedToArray(_useState, 2),
|
|
89780
89778
|
timeZoneAndTime = _useState2[0],
|
|
89781
89779
|
setTimeZoneAndTime = _useState2[1];
|
|
@@ -89787,7 +89785,7 @@ var Header = function Header(_ref) {
|
|
|
89787
89785
|
if (dirty) resetForm();else setIsEditing(false);
|
|
89788
89786
|
};
|
|
89789
89787
|
|
|
89790
|
-
React
|
|
89788
|
+
React.useEffect(function () {
|
|
89791
89789
|
var time = setInterval(function () {
|
|
89792
89790
|
setTimeZoneAndTime(getTimeZoneAndTime());
|
|
89793
89791
|
}, 30000);
|
|
@@ -89795,58 +89793,58 @@ var Header = function Header(_ref) {
|
|
|
89795
89793
|
return clearInterval(time);
|
|
89796
89794
|
};
|
|
89797
89795
|
}, []);
|
|
89798
|
-
return /*#__PURE__*/React__default
|
|
89796
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89799
89797
|
className: "mb-4 flex justify-between"
|
|
89800
|
-
}, isEditing ? /*#__PURE__*/React__default
|
|
89798
|
+
}, isEditing ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89801
89799
|
className: "flex items-center space-x-4"
|
|
89802
|
-
}, /*#__PURE__*/React__default
|
|
89800
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
89803
89801
|
label: !dirty ? t("neetoCommons.common.actions.cancel") : t("neetoCommons.common.actions.reset"),
|
|
89804
89802
|
style: "secondary",
|
|
89805
89803
|
onClick: handleReset
|
|
89806
|
-
}), /*#__PURE__*/React__default
|
|
89804
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
89807
89805
|
"data-cy": "weekly-hours-save-changes-button",
|
|
89808
89806
|
disabled: !dirty || isSubmitting,
|
|
89809
89807
|
label: t("neetoCommons.common.actions.saveChanges"),
|
|
89810
89808
|
loading: isSubmitting,
|
|
89811
89809
|
onClick: submitForm
|
|
89812
|
-
})) : /*#__PURE__*/React__default
|
|
89810
|
+
})) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89813
89811
|
className: "flex items-center gap-x-2"
|
|
89814
|
-
}, /*#__PURE__*/React__default
|
|
89812
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89815
89813
|
className: "text-gray-800",
|
|
89816
89814
|
style: "h3",
|
|
89817
89815
|
weight: "semibold"
|
|
89818
|
-
}, t("neetoCommons.schedule.weeklyHours")), /*#__PURE__*/React__default
|
|
89816
|
+
}, t("neetoCommons.schedule.weeklyHours")), /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
|
|
89819
89817
|
buttonProps: {
|
|
89820
89818
|
style: "text",
|
|
89821
89819
|
"data-testid": "weekly-hours-edit-dropdown-icon"
|
|
89822
89820
|
},
|
|
89823
89821
|
icon: neetoIcons.MenuVertical
|
|
89824
|
-
}, /*#__PURE__*/React__default
|
|
89822
|
+
}, /*#__PURE__*/React__default["default"].createElement(Menu, null, /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
|
|
89825
89823
|
"data-cy": "weekly-hours-edit-link",
|
|
89826
89824
|
onClick: function onClick() {
|
|
89827
89825
|
return setIsEditing(true);
|
|
89828
89826
|
}
|
|
89829
|
-
}, t("neetoCommons.common.actions.edit"))))), /*#__PURE__*/React__default
|
|
89827
|
+
}, t("neetoCommons.common.actions.edit"))))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89830
89828
|
className: "flex items-center space-x-2"
|
|
89831
|
-
}, /*#__PURE__*/React__default
|
|
89829
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Clock, {
|
|
89832
89830
|
size: 20
|
|
89833
|
-
}), /*#__PURE__*/React__default
|
|
89831
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
89834
89832
|
style: "h4",
|
|
89835
89833
|
weight: "medium"
|
|
89836
|
-
}, timeZoneAndTime), /*#__PURE__*/React__default
|
|
89834
|
+
}, timeZoneAndTime), /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
|
|
89837
89835
|
icon: neetoIcons.MenuVertical,
|
|
89838
89836
|
buttonProps: {
|
|
89839
89837
|
style: "text",
|
|
89840
89838
|
className: "flex-shrink-0"
|
|
89841
89839
|
}
|
|
89842
|
-
}, /*#__PURE__*/React__default
|
|
89840
|
+
}, /*#__PURE__*/React__default["default"].createElement(Menu, null, /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
|
|
89843
89841
|
onClick: function onClick() {
|
|
89844
89842
|
return window.location.href = MY_PROFILE_URL$1;
|
|
89845
89843
|
}
|
|
89846
89844
|
}, t("neetoCommons.common.actions.edit"))))));
|
|
89847
89845
|
};
|
|
89848
89846
|
|
|
89849
|
-
var Schedule = /*#__PURE__*/React
|
|
89847
|
+
var Schedule = /*#__PURE__*/React.forwardRef(function (_ref, scheduleRef) {
|
|
89850
89848
|
var periods = _ref.periods,
|
|
89851
89849
|
_ref$handleSubmit = _ref.handleSubmit,
|
|
89852
89850
|
handleSubmit = _ref$handleSubmit === void 0 ? noop$2 : _ref$handleSubmit,
|
|
@@ -89891,9 +89889,9 @@ var Schedule = /*#__PURE__*/React$1.forwardRef(function (_ref, scheduleRef) {
|
|
|
89891
89889
|
});
|
|
89892
89890
|
};
|
|
89893
89891
|
|
|
89894
|
-
return /*#__PURE__*/React__default
|
|
89892
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
89895
89893
|
className: "neeto-ui-border-gray-200 w-41 flex-shrink-0"
|
|
89896
|
-
}, /*#__PURE__*/React__default
|
|
89894
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik.Formik, {
|
|
89897
89895
|
enableReinitialize: true,
|
|
89898
89896
|
initialValues: {
|
|
89899
89897
|
wdays: getInitialFormValues()
|
|
@@ -89902,14 +89900,14 @@ var Schedule = /*#__PURE__*/React$1.forwardRef(function (_ref, scheduleRef) {
|
|
|
89902
89900
|
onSubmit: function onSubmit(values) {
|
|
89903
89901
|
return handleSubmit(values, getInitialFormValues());
|
|
89904
89902
|
}
|
|
89905
|
-
}, /*#__PURE__*/React__default
|
|
89903
|
+
}, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showHeader && /*#__PURE__*/React__default["default"].createElement(Header, {
|
|
89906
89904
|
isEditing: isEditing,
|
|
89907
89905
|
setIsEditing: setIsEditing
|
|
89908
|
-
}), isEditing || !showHeader ? /*#__PURE__*/React__default
|
|
89906
|
+
}), isEditing || !showHeader ? /*#__PURE__*/React__default["default"].createElement(formik.Form, null, /*#__PURE__*/React__default["default"].createElement(Fields, {
|
|
89909
89907
|
scheduleRef: scheduleRef,
|
|
89910
89908
|
handleCopy: handleCopy,
|
|
89911
89909
|
handleValuesChanged: handleValuesChanged
|
|
89912
|
-
})) : /*#__PURE__*/React__default
|
|
89910
|
+
})) : /*#__PURE__*/React__default["default"].createElement(DisplayAvailability, {
|
|
89913
89911
|
periods: periods
|
|
89914
89912
|
}))));
|
|
89915
89913
|
});
|
|
@@ -89929,1176 +89927,8 @@ var resetAuthTokens = function resetAuthTokens() {
|
|
|
89929
89927
|
});
|
|
89930
89928
|
};
|
|
89931
89929
|
|
|
89932
|
-
function _interopDefault$1 (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
89933
|
-
|
|
89934
|
-
var React = React__default$1["default"];
|
|
89935
|
-
var React__default = _interopDefault$1(React);
|
|
89936
|
-
|
|
89937
|
-
function _defineProperty(obj, key, value) {
|
|
89938
|
-
if (key in obj) {
|
|
89939
|
-
Object.defineProperty(obj, key, {
|
|
89940
|
-
value: value,
|
|
89941
|
-
enumerable: true,
|
|
89942
|
-
configurable: true,
|
|
89943
|
-
writable: true
|
|
89944
|
-
});
|
|
89945
|
-
} else {
|
|
89946
|
-
obj[key] = value;
|
|
89947
|
-
}
|
|
89948
|
-
|
|
89949
|
-
return obj;
|
|
89950
|
-
}
|
|
89951
|
-
|
|
89952
|
-
function _inheritsLoose(subClass, superClass) {
|
|
89953
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
89954
|
-
subClass.prototype.constructor = subClass;
|
|
89955
|
-
subClass.__proto__ = superClass;
|
|
89956
|
-
}
|
|
89957
|
-
|
|
89958
|
-
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
89959
|
-
function withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {
|
|
89960
|
-
if (typeof reducePropsToState !== 'function') {
|
|
89961
|
-
throw new Error('Expected reducePropsToState to be a function.');
|
|
89962
|
-
}
|
|
89963
|
-
|
|
89964
|
-
if (typeof handleStateChangeOnClient !== 'function') {
|
|
89965
|
-
throw new Error('Expected handleStateChangeOnClient to be a function.');
|
|
89966
|
-
}
|
|
89967
|
-
|
|
89968
|
-
if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {
|
|
89969
|
-
throw new Error('Expected mapStateOnServer to either be undefined or a function.');
|
|
89970
|
-
}
|
|
89971
|
-
|
|
89972
|
-
function getDisplayName(WrappedComponent) {
|
|
89973
|
-
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
|
89974
|
-
}
|
|
89975
|
-
|
|
89976
|
-
return function wrap(WrappedComponent) {
|
|
89977
|
-
if (typeof WrappedComponent !== 'function') {
|
|
89978
|
-
throw new Error('Expected WrappedComponent to be a React component.');
|
|
89979
|
-
}
|
|
89980
|
-
|
|
89981
|
-
var mountedInstances = [];
|
|
89982
|
-
var state;
|
|
89983
|
-
|
|
89984
|
-
function emitChange() {
|
|
89985
|
-
state = reducePropsToState(mountedInstances.map(function (instance) {
|
|
89986
|
-
return instance.props;
|
|
89987
|
-
}));
|
|
89988
|
-
|
|
89989
|
-
if (SideEffect.canUseDOM) {
|
|
89990
|
-
handleStateChangeOnClient(state);
|
|
89991
|
-
} else if (mapStateOnServer) {
|
|
89992
|
-
state = mapStateOnServer(state);
|
|
89993
|
-
}
|
|
89994
|
-
}
|
|
89995
|
-
|
|
89996
|
-
var SideEffect =
|
|
89997
|
-
/*#__PURE__*/
|
|
89998
|
-
function (_PureComponent) {
|
|
89999
|
-
_inheritsLoose(SideEffect, _PureComponent);
|
|
90000
|
-
|
|
90001
|
-
function SideEffect() {
|
|
90002
|
-
return _PureComponent.apply(this, arguments) || this;
|
|
90003
|
-
}
|
|
90004
|
-
|
|
90005
|
-
// Try to use displayName of wrapped component
|
|
90006
|
-
// Expose canUseDOM so tests can monkeypatch it
|
|
90007
|
-
SideEffect.peek = function peek() {
|
|
90008
|
-
return state;
|
|
90009
|
-
};
|
|
90010
|
-
|
|
90011
|
-
SideEffect.rewind = function rewind() {
|
|
90012
|
-
if (SideEffect.canUseDOM) {
|
|
90013
|
-
throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');
|
|
90014
|
-
}
|
|
90015
|
-
|
|
90016
|
-
var recordedState = state;
|
|
90017
|
-
state = undefined;
|
|
90018
|
-
mountedInstances = [];
|
|
90019
|
-
return recordedState;
|
|
90020
|
-
};
|
|
90021
|
-
|
|
90022
|
-
var _proto = SideEffect.prototype;
|
|
90023
|
-
|
|
90024
|
-
_proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {
|
|
90025
|
-
mountedInstances.push(this);
|
|
90026
|
-
emitChange();
|
|
90027
|
-
};
|
|
90028
|
-
|
|
90029
|
-
_proto.componentDidUpdate = function componentDidUpdate() {
|
|
90030
|
-
emitChange();
|
|
90031
|
-
};
|
|
90032
|
-
|
|
90033
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
90034
|
-
var index = mountedInstances.indexOf(this);
|
|
90035
|
-
mountedInstances.splice(index, 1);
|
|
90036
|
-
emitChange();
|
|
90037
|
-
};
|
|
90038
|
-
|
|
90039
|
-
_proto.render = function render() {
|
|
90040
|
-
return React__default.createElement(WrappedComponent, this.props);
|
|
90041
|
-
};
|
|
90042
|
-
|
|
90043
|
-
return SideEffect;
|
|
90044
|
-
}(React.PureComponent);
|
|
90045
|
-
|
|
90046
|
-
_defineProperty(SideEffect, "displayName", "SideEffect(" + getDisplayName(WrappedComponent) + ")");
|
|
90047
|
-
|
|
90048
|
-
_defineProperty(SideEffect, "canUseDOM", canUseDOM);
|
|
90049
|
-
|
|
90050
|
-
return SideEffect;
|
|
90051
|
-
};
|
|
90052
|
-
}
|
|
90053
|
-
|
|
90054
|
-
var lib = withSideEffect;
|
|
90055
|
-
|
|
90056
|
-
/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
|
|
90057
|
-
|
|
90058
|
-
var hasElementType = typeof Element !== 'undefined';
|
|
90059
|
-
var hasMap = typeof Map === 'function';
|
|
90060
|
-
var hasSet = typeof Set === 'function';
|
|
90061
|
-
var hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;
|
|
90062
|
-
|
|
90063
|
-
// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js
|
|
90064
|
-
|
|
90065
|
-
function equal(a, b) {
|
|
90066
|
-
// START: fast-deep-equal es6/index.js 3.1.1
|
|
90067
|
-
if (a === b) return true;
|
|
90068
|
-
|
|
90069
|
-
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
90070
|
-
if (a.constructor !== b.constructor) return false;
|
|
90071
|
-
|
|
90072
|
-
var length, i, keys;
|
|
90073
|
-
if (Array.isArray(a)) {
|
|
90074
|
-
length = a.length;
|
|
90075
|
-
if (length != b.length) return false;
|
|
90076
|
-
for (i = length; i-- !== 0;)
|
|
90077
|
-
if (!equal(a[i], b[i])) return false;
|
|
90078
|
-
return true;
|
|
90079
|
-
}
|
|
90080
|
-
|
|
90081
|
-
// START: Modifications:
|
|
90082
|
-
// 1. Extra `has<Type> &&` helpers in initial condition allow es6 code
|
|
90083
|
-
// to co-exist with es5.
|
|
90084
|
-
// 2. Replace `for of` with es5 compliant iteration using `for`.
|
|
90085
|
-
// Basically, take:
|
|
90086
|
-
//
|
|
90087
|
-
// ```js
|
|
90088
|
-
// for (i of a.entries())
|
|
90089
|
-
// if (!b.has(i[0])) return false;
|
|
90090
|
-
// ```
|
|
90091
|
-
//
|
|
90092
|
-
// ... and convert to:
|
|
90093
|
-
//
|
|
90094
|
-
// ```js
|
|
90095
|
-
// it = a.entries();
|
|
90096
|
-
// while (!(i = it.next()).done)
|
|
90097
|
-
// if (!b.has(i.value[0])) return false;
|
|
90098
|
-
// ```
|
|
90099
|
-
//
|
|
90100
|
-
// **Note**: `i` access switches to `i.value`.
|
|
90101
|
-
var it;
|
|
90102
|
-
if (hasMap && (a instanceof Map) && (b instanceof Map)) {
|
|
90103
|
-
if (a.size !== b.size) return false;
|
|
90104
|
-
it = a.entries();
|
|
90105
|
-
while (!(i = it.next()).done)
|
|
90106
|
-
if (!b.has(i.value[0])) return false;
|
|
90107
|
-
it = a.entries();
|
|
90108
|
-
while (!(i = it.next()).done)
|
|
90109
|
-
if (!equal(i.value[1], b.get(i.value[0]))) return false;
|
|
90110
|
-
return true;
|
|
90111
|
-
}
|
|
90112
|
-
|
|
90113
|
-
if (hasSet && (a instanceof Set) && (b instanceof Set)) {
|
|
90114
|
-
if (a.size !== b.size) return false;
|
|
90115
|
-
it = a.entries();
|
|
90116
|
-
while (!(i = it.next()).done)
|
|
90117
|
-
if (!b.has(i.value[0])) return false;
|
|
90118
|
-
return true;
|
|
90119
|
-
}
|
|
90120
|
-
// END: Modifications
|
|
90121
|
-
|
|
90122
|
-
if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
90123
|
-
length = a.length;
|
|
90124
|
-
if (length != b.length) return false;
|
|
90125
|
-
for (i = length; i-- !== 0;)
|
|
90126
|
-
if (a[i] !== b[i]) return false;
|
|
90127
|
-
return true;
|
|
90128
|
-
}
|
|
90129
|
-
|
|
90130
|
-
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
90131
|
-
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
90132
|
-
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
90133
|
-
|
|
90134
|
-
keys = Object.keys(a);
|
|
90135
|
-
length = keys.length;
|
|
90136
|
-
if (length !== Object.keys(b).length) return false;
|
|
90137
|
-
|
|
90138
|
-
for (i = length; i-- !== 0;)
|
|
90139
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
90140
|
-
// END: fast-deep-equal
|
|
90141
|
-
|
|
90142
|
-
// START: react-fast-compare
|
|
90143
|
-
// custom handling for DOM elements
|
|
90144
|
-
if (hasElementType && a instanceof Element) return false;
|
|
90145
|
-
|
|
90146
|
-
// custom handling for React/Preact
|
|
90147
|
-
for (i = length; i-- !== 0;) {
|
|
90148
|
-
if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {
|
|
90149
|
-
// React-specific: avoid traversing React elements' _owner
|
|
90150
|
-
// Preact-specific: avoid traversing Preact elements' __v and __o
|
|
90151
|
-
// __v = $_original / $_vnode
|
|
90152
|
-
// __o = $_owner
|
|
90153
|
-
// These properties contain circular references and are not needed when
|
|
90154
|
-
// comparing the actual elements (and not their owners)
|
|
90155
|
-
// .$$typeof and ._store on just reasonable markers of elements
|
|
90156
|
-
|
|
90157
|
-
continue;
|
|
90158
|
-
}
|
|
90159
|
-
|
|
90160
|
-
// all other properties should be traversed as usual
|
|
90161
|
-
if (!equal(a[keys[i]], b[keys[i]])) return false;
|
|
90162
|
-
}
|
|
90163
|
-
// END: react-fast-compare
|
|
90164
|
-
|
|
90165
|
-
// START: fast-deep-equal
|
|
90166
|
-
return true;
|
|
90167
|
-
}
|
|
90168
|
-
|
|
90169
|
-
return a !== a && b !== b;
|
|
90170
|
-
}
|
|
90171
|
-
// end fast-deep-equal
|
|
90172
|
-
|
|
90173
|
-
var reactFastCompare = function isEqual(a, b) {
|
|
90174
|
-
try {
|
|
90175
|
-
return equal(a, b);
|
|
90176
|
-
} catch (error) {
|
|
90177
|
-
if (((error.message || '').match(/stack|recursion/i))) {
|
|
90178
|
-
// warn on circular references, don't crash
|
|
90179
|
-
// browsers give this different errors name and messages:
|
|
90180
|
-
// chrome/safari: "RangeError", "Maximum call stack size exceeded"
|
|
90181
|
-
// firefox: "InternalError", too much recursion"
|
|
90182
|
-
// edge: "Error", "Out of stack space"
|
|
90183
|
-
console.warn('react-fast-compare cannot handle circular refs');
|
|
90184
|
-
return false;
|
|
90185
|
-
}
|
|
90186
|
-
// some other error. we should definitely know about these
|
|
90187
|
-
throw error;
|
|
90188
|
-
}
|
|
90189
|
-
};
|
|
90190
|
-
|
|
90191
|
-
var objectAssignExports = requireObjectAssign();
|
|
90192
|
-
|
|
90193
|
-
var ATTRIBUTE_NAMES = {
|
|
90194
|
-
BODY: "bodyAttributes",
|
|
90195
|
-
HTML: "htmlAttributes",
|
|
90196
|
-
TITLE: "titleAttributes"
|
|
90197
|
-
};
|
|
90198
|
-
|
|
90199
|
-
var TAG_NAMES = {
|
|
90200
|
-
BASE: "base",
|
|
90201
|
-
BODY: "body",
|
|
90202
|
-
HEAD: "head",
|
|
90203
|
-
HTML: "html",
|
|
90204
|
-
LINK: "link",
|
|
90205
|
-
META: "meta",
|
|
90206
|
-
NOSCRIPT: "noscript",
|
|
90207
|
-
SCRIPT: "script",
|
|
90208
|
-
STYLE: "style",
|
|
90209
|
-
TITLE: "title"
|
|
90210
|
-
};
|
|
90211
|
-
|
|
90212
|
-
var VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {
|
|
90213
|
-
return TAG_NAMES[name];
|
|
90214
|
-
});
|
|
90215
|
-
|
|
90216
|
-
var TAG_PROPERTIES = {
|
|
90217
|
-
CHARSET: "charset",
|
|
90218
|
-
CSS_TEXT: "cssText",
|
|
90219
|
-
HREF: "href",
|
|
90220
|
-
HTTPEQUIV: "http-equiv",
|
|
90221
|
-
INNER_HTML: "innerHTML",
|
|
90222
|
-
ITEM_PROP: "itemprop",
|
|
90223
|
-
NAME: "name",
|
|
90224
|
-
PROPERTY: "property",
|
|
90225
|
-
REL: "rel",
|
|
90226
|
-
SRC: "src",
|
|
90227
|
-
TARGET: "target"
|
|
90228
|
-
};
|
|
90229
|
-
|
|
90230
|
-
var REACT_TAG_MAP = {
|
|
90231
|
-
accesskey: "accessKey",
|
|
90232
|
-
charset: "charSet",
|
|
90233
|
-
class: "className",
|
|
90234
|
-
contenteditable: "contentEditable",
|
|
90235
|
-
contextmenu: "contextMenu",
|
|
90236
|
-
"http-equiv": "httpEquiv",
|
|
90237
|
-
itemprop: "itemProp",
|
|
90238
|
-
tabindex: "tabIndex"
|
|
90239
|
-
};
|
|
90240
|
-
|
|
90241
|
-
var HELMET_PROPS = {
|
|
90242
|
-
DEFAULT_TITLE: "defaultTitle",
|
|
90243
|
-
DEFER: "defer",
|
|
90244
|
-
ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
|
|
90245
|
-
ON_CHANGE_CLIENT_STATE: "onChangeClientState",
|
|
90246
|
-
TITLE_TEMPLATE: "titleTemplate"
|
|
90247
|
-
};
|
|
90248
|
-
|
|
90249
|
-
var HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {
|
|
90250
|
-
obj[REACT_TAG_MAP[key]] = key;
|
|
90251
|
-
return obj;
|
|
90252
|
-
}, {});
|
|
90253
|
-
|
|
90254
|
-
var SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];
|
|
90255
|
-
|
|
90256
|
-
var HELMET_ATTRIBUTE = "data-react-helmet";
|
|
90257
|
-
|
|
90258
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
90259
|
-
return typeof obj;
|
|
90260
|
-
} : function (obj) {
|
|
90261
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
90262
|
-
};
|
|
90263
|
-
|
|
90264
|
-
var classCallCheck = function (instance, Constructor) {
|
|
90265
|
-
if (!(instance instanceof Constructor)) {
|
|
90266
|
-
throw new TypeError("Cannot call a class as a function");
|
|
90267
|
-
}
|
|
90268
|
-
};
|
|
90269
|
-
|
|
90270
|
-
var createClass = function () {
|
|
90271
|
-
function defineProperties(target, props) {
|
|
90272
|
-
for (var i = 0; i < props.length; i++) {
|
|
90273
|
-
var descriptor = props[i];
|
|
90274
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
90275
|
-
descriptor.configurable = true;
|
|
90276
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
90277
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
90278
|
-
}
|
|
90279
|
-
}
|
|
90280
|
-
|
|
90281
|
-
return function (Constructor, protoProps, staticProps) {
|
|
90282
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
90283
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
90284
|
-
return Constructor;
|
|
90285
|
-
};
|
|
90286
|
-
}();
|
|
90287
|
-
|
|
90288
|
-
var _extends$2 = Object.assign || function (target) {
|
|
90289
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
90290
|
-
var source = arguments[i];
|
|
90291
|
-
|
|
90292
|
-
for (var key in source) {
|
|
90293
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
90294
|
-
target[key] = source[key];
|
|
90295
|
-
}
|
|
90296
|
-
}
|
|
90297
|
-
}
|
|
90298
|
-
|
|
90299
|
-
return target;
|
|
90300
|
-
};
|
|
90301
|
-
|
|
90302
|
-
var inherits = function (subClass, superClass) {
|
|
90303
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
90304
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
90305
|
-
}
|
|
90306
|
-
|
|
90307
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
90308
|
-
constructor: {
|
|
90309
|
-
value: subClass,
|
|
90310
|
-
enumerable: false,
|
|
90311
|
-
writable: true,
|
|
90312
|
-
configurable: true
|
|
90313
|
-
}
|
|
90314
|
-
});
|
|
90315
|
-
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
90316
|
-
};
|
|
90317
|
-
|
|
90318
|
-
var objectWithoutProperties = function (obj, keys) {
|
|
90319
|
-
var target = {};
|
|
90320
|
-
|
|
90321
|
-
for (var i in obj) {
|
|
90322
|
-
if (keys.indexOf(i) >= 0) continue;
|
|
90323
|
-
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
|
|
90324
|
-
target[i] = obj[i];
|
|
90325
|
-
}
|
|
90326
|
-
|
|
90327
|
-
return target;
|
|
90328
|
-
};
|
|
90329
|
-
|
|
90330
|
-
var possibleConstructorReturn = function (self, call) {
|
|
90331
|
-
if (!self) {
|
|
90332
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
90333
|
-
}
|
|
90334
|
-
|
|
90335
|
-
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
90336
|
-
};
|
|
90337
|
-
|
|
90338
|
-
var encodeSpecialCharacters = function encodeSpecialCharacters(str) {
|
|
90339
|
-
var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
90340
|
-
|
|
90341
|
-
if (encode === false) {
|
|
90342
|
-
return String(str);
|
|
90343
|
-
}
|
|
90344
|
-
|
|
90345
|
-
return String(str).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
90346
|
-
};
|
|
90347
|
-
|
|
90348
|
-
var getTitleFromPropsList = function getTitleFromPropsList(propsList) {
|
|
90349
|
-
var innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE);
|
|
90350
|
-
var innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);
|
|
90351
|
-
|
|
90352
|
-
if (innermostTemplate && innermostTitle) {
|
|
90353
|
-
// use function arg to avoid need to escape $ characters
|
|
90354
|
-
return innermostTemplate.replace(/%s/g, function () {
|
|
90355
|
-
return Array.isArray(innermostTitle) ? innermostTitle.join("") : innermostTitle;
|
|
90356
|
-
});
|
|
90357
|
-
}
|
|
90358
|
-
|
|
90359
|
-
var innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);
|
|
90360
|
-
|
|
90361
|
-
return innermostTitle || innermostDefaultTitle || undefined;
|
|
90362
|
-
};
|
|
90363
|
-
|
|
90364
|
-
var getOnChangeClientState = function getOnChangeClientState(propsList) {
|
|
90365
|
-
return getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};
|
|
90366
|
-
};
|
|
90367
|
-
|
|
90368
|
-
var getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {
|
|
90369
|
-
return propsList.filter(function (props) {
|
|
90370
|
-
return typeof props[tagType] !== "undefined";
|
|
90371
|
-
}).map(function (props) {
|
|
90372
|
-
return props[tagType];
|
|
90373
|
-
}).reduce(function (tagAttrs, current) {
|
|
90374
|
-
return _extends$2({}, tagAttrs, current);
|
|
90375
|
-
}, {});
|
|
90376
|
-
};
|
|
90377
|
-
|
|
90378
|
-
var getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {
|
|
90379
|
-
return propsList.filter(function (props) {
|
|
90380
|
-
return typeof props[TAG_NAMES.BASE] !== "undefined";
|
|
90381
|
-
}).map(function (props) {
|
|
90382
|
-
return props[TAG_NAMES.BASE];
|
|
90383
|
-
}).reverse().reduce(function (innermostBaseTag, tag) {
|
|
90384
|
-
if (!innermostBaseTag.length) {
|
|
90385
|
-
var keys = Object.keys(tag);
|
|
90386
|
-
|
|
90387
|
-
for (var i = 0; i < keys.length; i++) {
|
|
90388
|
-
var attributeKey = keys[i];
|
|
90389
|
-
var lowerCaseAttributeKey = attributeKey.toLowerCase();
|
|
90390
|
-
|
|
90391
|
-
if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {
|
|
90392
|
-
return innermostBaseTag.concat(tag);
|
|
90393
|
-
}
|
|
90394
|
-
}
|
|
90395
|
-
}
|
|
90396
|
-
|
|
90397
|
-
return innermostBaseTag;
|
|
90398
|
-
}, []);
|
|
90399
|
-
};
|
|
90400
|
-
|
|
90401
|
-
var getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {
|
|
90402
|
-
// Calculate list of tags, giving priority innermost component (end of the propslist)
|
|
90403
|
-
var approvedSeenTags = {};
|
|
90404
|
-
|
|
90405
|
-
return propsList.filter(function (props) {
|
|
90406
|
-
if (Array.isArray(props[tagName])) {
|
|
90407
|
-
return true;
|
|
90408
|
-
}
|
|
90409
|
-
if (typeof props[tagName] !== "undefined") {
|
|
90410
|
-
warn("Helmet: " + tagName + " should be of type \"Array\". Instead found type \"" + _typeof(props[tagName]) + "\"");
|
|
90411
|
-
}
|
|
90412
|
-
return false;
|
|
90413
|
-
}).map(function (props) {
|
|
90414
|
-
return props[tagName];
|
|
90415
|
-
}).reverse().reduce(function (approvedTags, instanceTags) {
|
|
90416
|
-
var instanceSeenTags = {};
|
|
90417
|
-
|
|
90418
|
-
instanceTags.filter(function (tag) {
|
|
90419
|
-
var primaryAttributeKey = void 0;
|
|
90420
|
-
var keys = Object.keys(tag);
|
|
90421
|
-
for (var i = 0; i < keys.length; i++) {
|
|
90422
|
-
var attributeKey = keys[i];
|
|
90423
|
-
var lowerCaseAttributeKey = attributeKey.toLowerCase();
|
|
90424
|
-
|
|
90425
|
-
// Special rule with link tags, since rel and href are both primary tags, rel takes priority
|
|
90426
|
-
if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === "canonical") && !(lowerCaseAttributeKey === TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === "stylesheet")) {
|
|
90427
|
-
primaryAttributeKey = lowerCaseAttributeKey;
|
|
90428
|
-
}
|
|
90429
|
-
// Special case for innerHTML which doesn't work lowercased
|
|
90430
|
-
if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)) {
|
|
90431
|
-
primaryAttributeKey = attributeKey;
|
|
90432
|
-
}
|
|
90433
|
-
}
|
|
90434
|
-
|
|
90435
|
-
if (!primaryAttributeKey || !tag[primaryAttributeKey]) {
|
|
90436
|
-
return false;
|
|
90437
|
-
}
|
|
90438
|
-
|
|
90439
|
-
var value = tag[primaryAttributeKey].toLowerCase();
|
|
90440
|
-
|
|
90441
|
-
if (!approvedSeenTags[primaryAttributeKey]) {
|
|
90442
|
-
approvedSeenTags[primaryAttributeKey] = {};
|
|
90443
|
-
}
|
|
90444
|
-
|
|
90445
|
-
if (!instanceSeenTags[primaryAttributeKey]) {
|
|
90446
|
-
instanceSeenTags[primaryAttributeKey] = {};
|
|
90447
|
-
}
|
|
90448
|
-
|
|
90449
|
-
if (!approvedSeenTags[primaryAttributeKey][value]) {
|
|
90450
|
-
instanceSeenTags[primaryAttributeKey][value] = true;
|
|
90451
|
-
return true;
|
|
90452
|
-
}
|
|
90453
|
-
|
|
90454
|
-
return false;
|
|
90455
|
-
}).reverse().forEach(function (tag) {
|
|
90456
|
-
return approvedTags.push(tag);
|
|
90457
|
-
});
|
|
90458
|
-
|
|
90459
|
-
// Update seen tags with tags from this instance
|
|
90460
|
-
var keys = Object.keys(instanceSeenTags);
|
|
90461
|
-
for (var i = 0; i < keys.length; i++) {
|
|
90462
|
-
var attributeKey = keys[i];
|
|
90463
|
-
var tagUnion = objectAssignExports({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);
|
|
90464
|
-
|
|
90465
|
-
approvedSeenTags[attributeKey] = tagUnion;
|
|
90466
|
-
}
|
|
90467
|
-
|
|
90468
|
-
return approvedTags;
|
|
90469
|
-
}, []).reverse();
|
|
90470
|
-
};
|
|
90471
|
-
|
|
90472
|
-
var getInnermostProperty = function getInnermostProperty(propsList, property) {
|
|
90473
|
-
for (var i = propsList.length - 1; i >= 0; i--) {
|
|
90474
|
-
var props = propsList[i];
|
|
90475
|
-
|
|
90476
|
-
if (props.hasOwnProperty(property)) {
|
|
90477
|
-
return props[property];
|
|
90478
|
-
}
|
|
90479
|
-
}
|
|
90480
|
-
|
|
90481
|
-
return null;
|
|
90482
|
-
};
|
|
90483
|
-
|
|
90484
|
-
var reducePropsToState = function reducePropsToState(propsList) {
|
|
90485
|
-
return {
|
|
90486
|
-
baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF, TAG_PROPERTIES.TARGET], propsList),
|
|
90487
|
-
bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList),
|
|
90488
|
-
defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),
|
|
90489
|
-
encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),
|
|
90490
|
-
htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList),
|
|
90491
|
-
linkTags: getTagsFromPropsList(TAG_NAMES.LINK, [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF], propsList),
|
|
90492
|
-
metaTags: getTagsFromPropsList(TAG_NAMES.META, [TAG_PROPERTIES.NAME, TAG_PROPERTIES.CHARSET, TAG_PROPERTIES.HTTPEQUIV, TAG_PROPERTIES.PROPERTY, TAG_PROPERTIES.ITEM_PROP], propsList),
|
|
90493
|
-
noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList),
|
|
90494
|
-
onChangeClientState: getOnChangeClientState(propsList),
|
|
90495
|
-
scriptTags: getTagsFromPropsList(TAG_NAMES.SCRIPT, [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML], propsList),
|
|
90496
|
-
styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList),
|
|
90497
|
-
title: getTitleFromPropsList(propsList),
|
|
90498
|
-
titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList)
|
|
90499
|
-
};
|
|
90500
|
-
};
|
|
90501
|
-
|
|
90502
|
-
var rafPolyfill = function () {
|
|
90503
|
-
var clock = Date.now();
|
|
90504
|
-
|
|
90505
|
-
return function (callback) {
|
|
90506
|
-
var currentTime = Date.now();
|
|
90507
|
-
|
|
90508
|
-
if (currentTime - clock > 16) {
|
|
90509
|
-
clock = currentTime;
|
|
90510
|
-
callback(currentTime);
|
|
90511
|
-
} else {
|
|
90512
|
-
setTimeout(function () {
|
|
90513
|
-
rafPolyfill(callback);
|
|
90514
|
-
}, 0);
|
|
90515
|
-
}
|
|
90516
|
-
};
|
|
90517
|
-
}();
|
|
90518
|
-
|
|
90519
|
-
var cafPolyfill = function cafPolyfill(id) {
|
|
90520
|
-
return clearTimeout(id);
|
|
90521
|
-
};
|
|
90522
|
-
|
|
90523
|
-
var requestAnimationFrame = typeof window !== "undefined" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;
|
|
90524
|
-
|
|
90525
|
-
var cancelAnimationFrame = typeof window !== "undefined" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;
|
|
90526
|
-
|
|
90527
|
-
var warn = function warn(msg) {
|
|
90528
|
-
return console && typeof console.warn === "function" && console.warn(msg);
|
|
90529
|
-
};
|
|
90530
|
-
|
|
90531
|
-
var _helmetCallback = null;
|
|
90532
|
-
|
|
90533
|
-
var handleClientStateChange = function handleClientStateChange(newState) {
|
|
90534
|
-
if (_helmetCallback) {
|
|
90535
|
-
cancelAnimationFrame(_helmetCallback);
|
|
90536
|
-
}
|
|
90537
|
-
|
|
90538
|
-
if (newState.defer) {
|
|
90539
|
-
_helmetCallback = requestAnimationFrame(function () {
|
|
90540
|
-
commitTagChanges(newState, function () {
|
|
90541
|
-
_helmetCallback = null;
|
|
90542
|
-
});
|
|
90543
|
-
});
|
|
90544
|
-
} else {
|
|
90545
|
-
commitTagChanges(newState);
|
|
90546
|
-
_helmetCallback = null;
|
|
90547
|
-
}
|
|
90548
|
-
};
|
|
90549
|
-
|
|
90550
|
-
var commitTagChanges = function commitTagChanges(newState, cb) {
|
|
90551
|
-
var baseTag = newState.baseTag,
|
|
90552
|
-
bodyAttributes = newState.bodyAttributes,
|
|
90553
|
-
htmlAttributes = newState.htmlAttributes,
|
|
90554
|
-
linkTags = newState.linkTags,
|
|
90555
|
-
metaTags = newState.metaTags,
|
|
90556
|
-
noscriptTags = newState.noscriptTags,
|
|
90557
|
-
onChangeClientState = newState.onChangeClientState,
|
|
90558
|
-
scriptTags = newState.scriptTags,
|
|
90559
|
-
styleTags = newState.styleTags,
|
|
90560
|
-
title = newState.title,
|
|
90561
|
-
titleAttributes = newState.titleAttributes;
|
|
90562
|
-
|
|
90563
|
-
updateAttributes(TAG_NAMES.BODY, bodyAttributes);
|
|
90564
|
-
updateAttributes(TAG_NAMES.HTML, htmlAttributes);
|
|
90565
|
-
|
|
90566
|
-
updateTitle(title, titleAttributes);
|
|
90567
|
-
|
|
90568
|
-
var tagUpdates = {
|
|
90569
|
-
baseTag: updateTags(TAG_NAMES.BASE, baseTag),
|
|
90570
|
-
linkTags: updateTags(TAG_NAMES.LINK, linkTags),
|
|
90571
|
-
metaTags: updateTags(TAG_NAMES.META, metaTags),
|
|
90572
|
-
noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags),
|
|
90573
|
-
scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags),
|
|
90574
|
-
styleTags: updateTags(TAG_NAMES.STYLE, styleTags)
|
|
90575
|
-
};
|
|
90576
|
-
|
|
90577
|
-
var addedTags = {};
|
|
90578
|
-
var removedTags = {};
|
|
90579
|
-
|
|
90580
|
-
Object.keys(tagUpdates).forEach(function (tagType) {
|
|
90581
|
-
var _tagUpdates$tagType = tagUpdates[tagType],
|
|
90582
|
-
newTags = _tagUpdates$tagType.newTags,
|
|
90583
|
-
oldTags = _tagUpdates$tagType.oldTags;
|
|
90584
|
-
|
|
90585
|
-
|
|
90586
|
-
if (newTags.length) {
|
|
90587
|
-
addedTags[tagType] = newTags;
|
|
90588
|
-
}
|
|
90589
|
-
if (oldTags.length) {
|
|
90590
|
-
removedTags[tagType] = tagUpdates[tagType].oldTags;
|
|
90591
|
-
}
|
|
90592
|
-
});
|
|
90593
|
-
|
|
90594
|
-
cb && cb();
|
|
90595
|
-
|
|
90596
|
-
onChangeClientState(newState, addedTags, removedTags);
|
|
90597
|
-
};
|
|
90598
|
-
|
|
90599
|
-
var flattenArray = function flattenArray(possibleArray) {
|
|
90600
|
-
return Array.isArray(possibleArray) ? possibleArray.join("") : possibleArray;
|
|
90601
|
-
};
|
|
90602
|
-
|
|
90603
|
-
var updateTitle = function updateTitle(title, attributes) {
|
|
90604
|
-
if (typeof title !== "undefined" && document.title !== title) {
|
|
90605
|
-
document.title = flattenArray(title);
|
|
90606
|
-
}
|
|
90607
|
-
|
|
90608
|
-
updateAttributes(TAG_NAMES.TITLE, attributes);
|
|
90609
|
-
};
|
|
90610
|
-
|
|
90611
|
-
var updateAttributes = function updateAttributes(tagName, attributes) {
|
|
90612
|
-
var elementTag = document.getElementsByTagName(tagName)[0];
|
|
90613
|
-
|
|
90614
|
-
if (!elementTag) {
|
|
90615
|
-
return;
|
|
90616
|
-
}
|
|
90617
|
-
|
|
90618
|
-
var helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);
|
|
90619
|
-
var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(",") : [];
|
|
90620
|
-
var attributesToRemove = [].concat(helmetAttributes);
|
|
90621
|
-
var attributeKeys = Object.keys(attributes);
|
|
90622
|
-
|
|
90623
|
-
for (var i = 0; i < attributeKeys.length; i++) {
|
|
90624
|
-
var attribute = attributeKeys[i];
|
|
90625
|
-
var value = attributes[attribute] || "";
|
|
90626
|
-
|
|
90627
|
-
if (elementTag.getAttribute(attribute) !== value) {
|
|
90628
|
-
elementTag.setAttribute(attribute, value);
|
|
90629
|
-
}
|
|
90630
|
-
|
|
90631
|
-
if (helmetAttributes.indexOf(attribute) === -1) {
|
|
90632
|
-
helmetAttributes.push(attribute);
|
|
90633
|
-
}
|
|
90634
|
-
|
|
90635
|
-
var indexToSave = attributesToRemove.indexOf(attribute);
|
|
90636
|
-
if (indexToSave !== -1) {
|
|
90637
|
-
attributesToRemove.splice(indexToSave, 1);
|
|
90638
|
-
}
|
|
90639
|
-
}
|
|
90640
|
-
|
|
90641
|
-
for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {
|
|
90642
|
-
elementTag.removeAttribute(attributesToRemove[_i]);
|
|
90643
|
-
}
|
|
90644
|
-
|
|
90645
|
-
if (helmetAttributes.length === attributesToRemove.length) {
|
|
90646
|
-
elementTag.removeAttribute(HELMET_ATTRIBUTE);
|
|
90647
|
-
} else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(",")) {
|
|
90648
|
-
elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(","));
|
|
90649
|
-
}
|
|
90650
|
-
};
|
|
90651
|
-
|
|
90652
|
-
var updateTags = function updateTags(type, tags) {
|
|
90653
|
-
var headElement = document.head || document.querySelector(TAG_NAMES.HEAD);
|
|
90654
|
-
var tagNodes = headElement.querySelectorAll(type + "[" + HELMET_ATTRIBUTE + "]");
|
|
90655
|
-
var oldTags = Array.prototype.slice.call(tagNodes);
|
|
90656
|
-
var newTags = [];
|
|
90657
|
-
var indexToDelete = void 0;
|
|
90658
|
-
|
|
90659
|
-
if (tags && tags.length) {
|
|
90660
|
-
tags.forEach(function (tag) {
|
|
90661
|
-
var newElement = document.createElement(type);
|
|
90662
|
-
|
|
90663
|
-
for (var attribute in tag) {
|
|
90664
|
-
if (tag.hasOwnProperty(attribute)) {
|
|
90665
|
-
if (attribute === TAG_PROPERTIES.INNER_HTML) {
|
|
90666
|
-
newElement.innerHTML = tag.innerHTML;
|
|
90667
|
-
} else if (attribute === TAG_PROPERTIES.CSS_TEXT) {
|
|
90668
|
-
if (newElement.styleSheet) {
|
|
90669
|
-
newElement.styleSheet.cssText = tag.cssText;
|
|
90670
|
-
} else {
|
|
90671
|
-
newElement.appendChild(document.createTextNode(tag.cssText));
|
|
90672
|
-
}
|
|
90673
|
-
} else {
|
|
90674
|
-
var value = typeof tag[attribute] === "undefined" ? "" : tag[attribute];
|
|
90675
|
-
newElement.setAttribute(attribute, value);
|
|
90676
|
-
}
|
|
90677
|
-
}
|
|
90678
|
-
}
|
|
90679
|
-
|
|
90680
|
-
newElement.setAttribute(HELMET_ATTRIBUTE, "true");
|
|
90681
|
-
|
|
90682
|
-
// Remove a duplicate tag from domTagstoRemove, so it isn't cleared.
|
|
90683
|
-
if (oldTags.some(function (existingTag, index) {
|
|
90684
|
-
indexToDelete = index;
|
|
90685
|
-
return newElement.isEqualNode(existingTag);
|
|
90686
|
-
})) {
|
|
90687
|
-
oldTags.splice(indexToDelete, 1);
|
|
90688
|
-
} else {
|
|
90689
|
-
newTags.push(newElement);
|
|
90690
|
-
}
|
|
90691
|
-
});
|
|
90692
|
-
}
|
|
90693
|
-
|
|
90694
|
-
oldTags.forEach(function (tag) {
|
|
90695
|
-
return tag.parentNode.removeChild(tag);
|
|
90696
|
-
});
|
|
90697
|
-
newTags.forEach(function (tag) {
|
|
90698
|
-
return headElement.appendChild(tag);
|
|
90699
|
-
});
|
|
90700
|
-
|
|
90701
|
-
return {
|
|
90702
|
-
oldTags: oldTags,
|
|
90703
|
-
newTags: newTags
|
|
90704
|
-
};
|
|
90705
|
-
};
|
|
90706
|
-
|
|
90707
|
-
var generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {
|
|
90708
|
-
return Object.keys(attributes).reduce(function (str, key) {
|
|
90709
|
-
var attr = typeof attributes[key] !== "undefined" ? key + "=\"" + attributes[key] + "\"" : "" + key;
|
|
90710
|
-
return str ? str + " " + attr : attr;
|
|
90711
|
-
}, "");
|
|
90712
|
-
};
|
|
90713
|
-
|
|
90714
|
-
var generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {
|
|
90715
|
-
var attributeString = generateElementAttributesAsString(attributes);
|
|
90716
|
-
var flattenedTitle = flattenArray(title);
|
|
90717
|
-
return attributeString ? "<" + type + " " + HELMET_ATTRIBUTE + "=\"true\" " + attributeString + ">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">" : "<" + type + " " + HELMET_ATTRIBUTE + "=\"true\">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">";
|
|
90718
|
-
};
|
|
90719
|
-
|
|
90720
|
-
var generateTagsAsString = function generateTagsAsString(type, tags, encode) {
|
|
90721
|
-
return tags.reduce(function (str, tag) {
|
|
90722
|
-
var attributeHtml = Object.keys(tag).filter(function (attribute) {
|
|
90723
|
-
return !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT);
|
|
90724
|
-
}).reduce(function (string, attribute) {
|
|
90725
|
-
var attr = typeof tag[attribute] === "undefined" ? attribute : attribute + "=\"" + encodeSpecialCharacters(tag[attribute], encode) + "\"";
|
|
90726
|
-
return string ? string + " " + attr : attr;
|
|
90727
|
-
}, "");
|
|
90728
|
-
|
|
90729
|
-
var tagContent = tag.innerHTML || tag.cssText || "";
|
|
90730
|
-
|
|
90731
|
-
var isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;
|
|
90732
|
-
|
|
90733
|
-
return str + "<" + type + " " + HELMET_ATTRIBUTE + "=\"true\" " + attributeHtml + (isSelfClosing ? "/>" : ">" + tagContent + "</" + type + ">");
|
|
90734
|
-
}, "");
|
|
90735
|
-
};
|
|
90736
|
-
|
|
90737
|
-
var convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {
|
|
90738
|
-
var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
90739
|
-
|
|
90740
|
-
return Object.keys(attributes).reduce(function (obj, key) {
|
|
90741
|
-
obj[REACT_TAG_MAP[key] || key] = attributes[key];
|
|
90742
|
-
return obj;
|
|
90743
|
-
}, initProps);
|
|
90744
|
-
};
|
|
90745
|
-
|
|
90746
|
-
var convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {
|
|
90747
|
-
var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
90748
|
-
|
|
90749
|
-
return Object.keys(props).reduce(function (obj, key) {
|
|
90750
|
-
obj[HTML_TAG_MAP[key] || key] = props[key];
|
|
90751
|
-
return obj;
|
|
90752
|
-
}, initAttributes);
|
|
90753
|
-
};
|
|
90754
|
-
|
|
90755
|
-
var generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {
|
|
90756
|
-
var _initProps;
|
|
90757
|
-
|
|
90758
|
-
// assigning into an array to define toString function on it
|
|
90759
|
-
var initProps = (_initProps = {
|
|
90760
|
-
key: title
|
|
90761
|
-
}, _initProps[HELMET_ATTRIBUTE] = true, _initProps);
|
|
90762
|
-
var props = convertElementAttributestoReactProps(attributes, initProps);
|
|
90763
|
-
|
|
90764
|
-
return [React__default$1["default"].createElement(TAG_NAMES.TITLE, props, title)];
|
|
90765
|
-
};
|
|
90766
|
-
|
|
90767
|
-
var generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {
|
|
90768
|
-
return tags.map(function (tag, i) {
|
|
90769
|
-
var _mappedTag;
|
|
90770
|
-
|
|
90771
|
-
var mappedTag = (_mappedTag = {
|
|
90772
|
-
key: i
|
|
90773
|
-
}, _mappedTag[HELMET_ATTRIBUTE] = true, _mappedTag);
|
|
90774
|
-
|
|
90775
|
-
Object.keys(tag).forEach(function (attribute) {
|
|
90776
|
-
var mappedAttribute = REACT_TAG_MAP[attribute] || attribute;
|
|
90777
|
-
|
|
90778
|
-
if (mappedAttribute === TAG_PROPERTIES.INNER_HTML || mappedAttribute === TAG_PROPERTIES.CSS_TEXT) {
|
|
90779
|
-
var content = tag.innerHTML || tag.cssText;
|
|
90780
|
-
mappedTag.dangerouslySetInnerHTML = { __html: content };
|
|
90781
|
-
} else {
|
|
90782
|
-
mappedTag[mappedAttribute] = tag[attribute];
|
|
90783
|
-
}
|
|
90784
|
-
});
|
|
90785
|
-
|
|
90786
|
-
return React__default$1["default"].createElement(type, mappedTag);
|
|
90787
|
-
});
|
|
90788
|
-
};
|
|
90789
|
-
|
|
90790
|
-
var getMethodsForTag = function getMethodsForTag(type, tags, encode) {
|
|
90791
|
-
switch (type) {
|
|
90792
|
-
case TAG_NAMES.TITLE:
|
|
90793
|
-
return {
|
|
90794
|
-
toComponent: function toComponent() {
|
|
90795
|
-
return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes);
|
|
90796
|
-
},
|
|
90797
|
-
toString: function toString() {
|
|
90798
|
-
return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);
|
|
90799
|
-
}
|
|
90800
|
-
};
|
|
90801
|
-
case ATTRIBUTE_NAMES.BODY:
|
|
90802
|
-
case ATTRIBUTE_NAMES.HTML:
|
|
90803
|
-
return {
|
|
90804
|
-
toComponent: function toComponent() {
|
|
90805
|
-
return convertElementAttributestoReactProps(tags);
|
|
90806
|
-
},
|
|
90807
|
-
toString: function toString() {
|
|
90808
|
-
return generateElementAttributesAsString(tags);
|
|
90809
|
-
}
|
|
90810
|
-
};
|
|
90811
|
-
default:
|
|
90812
|
-
return {
|
|
90813
|
-
toComponent: function toComponent() {
|
|
90814
|
-
return generateTagsAsReactComponent(type, tags);
|
|
90815
|
-
},
|
|
90816
|
-
toString: function toString() {
|
|
90817
|
-
return generateTagsAsString(type, tags, encode);
|
|
90818
|
-
}
|
|
90819
|
-
};
|
|
90820
|
-
}
|
|
90821
|
-
};
|
|
90822
|
-
|
|
90823
|
-
var mapStateOnServer = function mapStateOnServer(_ref) {
|
|
90824
|
-
var baseTag = _ref.baseTag,
|
|
90825
|
-
bodyAttributes = _ref.bodyAttributes,
|
|
90826
|
-
encode = _ref.encode,
|
|
90827
|
-
htmlAttributes = _ref.htmlAttributes,
|
|
90828
|
-
linkTags = _ref.linkTags,
|
|
90829
|
-
metaTags = _ref.metaTags,
|
|
90830
|
-
noscriptTags = _ref.noscriptTags,
|
|
90831
|
-
scriptTags = _ref.scriptTags,
|
|
90832
|
-
styleTags = _ref.styleTags,
|
|
90833
|
-
_ref$title = _ref.title,
|
|
90834
|
-
title = _ref$title === undefined ? "" : _ref$title,
|
|
90835
|
-
titleAttributes = _ref.titleAttributes;
|
|
90836
|
-
return {
|
|
90837
|
-
base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),
|
|
90838
|
-
bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),
|
|
90839
|
-
htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),
|
|
90840
|
-
link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),
|
|
90841
|
-
meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),
|
|
90842
|
-
noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),
|
|
90843
|
-
script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),
|
|
90844
|
-
style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),
|
|
90845
|
-
title: getMethodsForTag(TAG_NAMES.TITLE, { title: title, titleAttributes: titleAttributes }, encode)
|
|
90846
|
-
};
|
|
90847
|
-
};
|
|
90848
|
-
|
|
90849
|
-
var Helmet = function Helmet(Component) {
|
|
90850
|
-
var _class, _temp;
|
|
90851
|
-
|
|
90852
|
-
return _temp = _class = function (_React$Component) {
|
|
90853
|
-
inherits(HelmetWrapper, _React$Component);
|
|
90854
|
-
|
|
90855
|
-
function HelmetWrapper() {
|
|
90856
|
-
classCallCheck(this, HelmetWrapper);
|
|
90857
|
-
return possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
90858
|
-
}
|
|
90859
|
-
|
|
90860
|
-
HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
|
|
90861
|
-
return !reactFastCompare(this.props, nextProps);
|
|
90862
|
-
};
|
|
90863
|
-
|
|
90864
|
-
HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {
|
|
90865
|
-
if (!nestedChildren) {
|
|
90866
|
-
return null;
|
|
90867
|
-
}
|
|
90868
|
-
|
|
90869
|
-
switch (child.type) {
|
|
90870
|
-
case TAG_NAMES.SCRIPT:
|
|
90871
|
-
case TAG_NAMES.NOSCRIPT:
|
|
90872
|
-
return {
|
|
90873
|
-
innerHTML: nestedChildren
|
|
90874
|
-
};
|
|
90875
|
-
|
|
90876
|
-
case TAG_NAMES.STYLE:
|
|
90877
|
-
return {
|
|
90878
|
-
cssText: nestedChildren
|
|
90879
|
-
};
|
|
90880
|
-
}
|
|
90881
|
-
|
|
90882
|
-
throw new Error("<" + child.type + " /> elements are self-closing and can not contain children. Refer to our API for more information.");
|
|
90883
|
-
};
|
|
90884
|
-
|
|
90885
|
-
HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {
|
|
90886
|
-
var _babelHelpers$extends;
|
|
90887
|
-
|
|
90888
|
-
var child = _ref.child,
|
|
90889
|
-
arrayTypeChildren = _ref.arrayTypeChildren,
|
|
90890
|
-
newChildProps = _ref.newChildProps,
|
|
90891
|
-
nestedChildren = _ref.nestedChildren;
|
|
90892
|
-
|
|
90893
|
-
return _extends$2({}, arrayTypeChildren, (_babelHelpers$extends = {}, _babelHelpers$extends[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends$2({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _babelHelpers$extends));
|
|
90894
|
-
};
|
|
90895
|
-
|
|
90896
|
-
HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {
|
|
90897
|
-
var _babelHelpers$extends2, _babelHelpers$extends3;
|
|
90898
|
-
|
|
90899
|
-
var child = _ref2.child,
|
|
90900
|
-
newProps = _ref2.newProps,
|
|
90901
|
-
newChildProps = _ref2.newChildProps,
|
|
90902
|
-
nestedChildren = _ref2.nestedChildren;
|
|
90903
|
-
|
|
90904
|
-
switch (child.type) {
|
|
90905
|
-
case TAG_NAMES.TITLE:
|
|
90906
|
-
return _extends$2({}, newProps, (_babelHelpers$extends2 = {}, _babelHelpers$extends2[child.type] = nestedChildren, _babelHelpers$extends2.titleAttributes = _extends$2({}, newChildProps), _babelHelpers$extends2));
|
|
90907
|
-
|
|
90908
|
-
case TAG_NAMES.BODY:
|
|
90909
|
-
return _extends$2({}, newProps, {
|
|
90910
|
-
bodyAttributes: _extends$2({}, newChildProps)
|
|
90911
|
-
});
|
|
90912
|
-
|
|
90913
|
-
case TAG_NAMES.HTML:
|
|
90914
|
-
return _extends$2({}, newProps, {
|
|
90915
|
-
htmlAttributes: _extends$2({}, newChildProps)
|
|
90916
|
-
});
|
|
90917
|
-
}
|
|
90918
|
-
|
|
90919
|
-
return _extends$2({}, newProps, (_babelHelpers$extends3 = {}, _babelHelpers$extends3[child.type] = _extends$2({}, newChildProps), _babelHelpers$extends3));
|
|
90920
|
-
};
|
|
90921
|
-
|
|
90922
|
-
HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {
|
|
90923
|
-
var newFlattenedProps = _extends$2({}, newProps);
|
|
90924
|
-
|
|
90925
|
-
Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {
|
|
90926
|
-
var _babelHelpers$extends4;
|
|
90927
|
-
|
|
90928
|
-
newFlattenedProps = _extends$2({}, newFlattenedProps, (_babelHelpers$extends4 = {}, _babelHelpers$extends4[arrayChildName] = arrayTypeChildren[arrayChildName], _babelHelpers$extends4));
|
|
90929
|
-
});
|
|
90930
|
-
|
|
90931
|
-
return newFlattenedProps;
|
|
90932
|
-
};
|
|
90933
|
-
|
|
90934
|
-
HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {
|
|
90935
|
-
if (process.env.NODE_ENV !== "production") {
|
|
90936
|
-
if (!VALID_TAG_NAMES.some(function (name) {
|
|
90937
|
-
return child.type === name;
|
|
90938
|
-
})) {
|
|
90939
|
-
if (typeof child.type === "function") {
|
|
90940
|
-
return warn("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.");
|
|
90941
|
-
}
|
|
90942
|
-
|
|
90943
|
-
return warn("Only elements types " + VALID_TAG_NAMES.join(", ") + " are allowed. Helmet does not support rendering <" + child.type + "> elements. Refer to our API for more information.");
|
|
90944
|
-
}
|
|
90945
|
-
|
|
90946
|
-
if (nestedChildren && typeof nestedChildren !== "string" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) {
|
|
90947
|
-
return typeof nestedChild !== "string";
|
|
90948
|
-
}))) {
|
|
90949
|
-
throw new Error("Helmet expects a string as a child of <" + child.type + ">. Did you forget to wrap your children in braces? ( <" + child.type + ">{``}</" + child.type + "> ) Refer to our API for more information.");
|
|
90950
|
-
}
|
|
90951
|
-
}
|
|
90952
|
-
|
|
90953
|
-
return true;
|
|
90954
|
-
};
|
|
90955
|
-
|
|
90956
|
-
HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {
|
|
90957
|
-
var _this2 = this;
|
|
90958
|
-
|
|
90959
|
-
var arrayTypeChildren = {};
|
|
90960
|
-
|
|
90961
|
-
React__default$1["default"].Children.forEach(children, function (child) {
|
|
90962
|
-
if (!child || !child.props) {
|
|
90963
|
-
return;
|
|
90964
|
-
}
|
|
90965
|
-
|
|
90966
|
-
var _child$props = child.props,
|
|
90967
|
-
nestedChildren = _child$props.children,
|
|
90968
|
-
childProps = objectWithoutProperties(_child$props, ["children"]);
|
|
90969
|
-
|
|
90970
|
-
var newChildProps = convertReactPropstoHtmlAttributes(childProps);
|
|
90971
|
-
|
|
90972
|
-
_this2.warnOnInvalidChildren(child, nestedChildren);
|
|
90973
|
-
|
|
90974
|
-
switch (child.type) {
|
|
90975
|
-
case TAG_NAMES.LINK:
|
|
90976
|
-
case TAG_NAMES.META:
|
|
90977
|
-
case TAG_NAMES.NOSCRIPT:
|
|
90978
|
-
case TAG_NAMES.SCRIPT:
|
|
90979
|
-
case TAG_NAMES.STYLE:
|
|
90980
|
-
arrayTypeChildren = _this2.flattenArrayTypeChildren({
|
|
90981
|
-
child: child,
|
|
90982
|
-
arrayTypeChildren: arrayTypeChildren,
|
|
90983
|
-
newChildProps: newChildProps,
|
|
90984
|
-
nestedChildren: nestedChildren
|
|
90985
|
-
});
|
|
90986
|
-
break;
|
|
90987
|
-
|
|
90988
|
-
default:
|
|
90989
|
-
newProps = _this2.mapObjectTypeChildren({
|
|
90990
|
-
child: child,
|
|
90991
|
-
newProps: newProps,
|
|
90992
|
-
newChildProps: newChildProps,
|
|
90993
|
-
nestedChildren: nestedChildren
|
|
90994
|
-
});
|
|
90995
|
-
break;
|
|
90996
|
-
}
|
|
90997
|
-
});
|
|
90998
|
-
|
|
90999
|
-
newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);
|
|
91000
|
-
return newProps;
|
|
91001
|
-
};
|
|
91002
|
-
|
|
91003
|
-
HelmetWrapper.prototype.render = function render() {
|
|
91004
|
-
var _props = this.props,
|
|
91005
|
-
children = _props.children,
|
|
91006
|
-
props = objectWithoutProperties(_props, ["children"]);
|
|
91007
|
-
|
|
91008
|
-
var newProps = _extends$2({}, props);
|
|
91009
|
-
|
|
91010
|
-
if (children) {
|
|
91011
|
-
newProps = this.mapChildrenToProps(children, newProps);
|
|
91012
|
-
}
|
|
91013
|
-
|
|
91014
|
-
return React__default$1["default"].createElement(Component, newProps);
|
|
91015
|
-
};
|
|
91016
|
-
|
|
91017
|
-
createClass(HelmetWrapper, null, [{
|
|
91018
|
-
key: "canUseDOM",
|
|
91019
|
-
|
|
91020
|
-
|
|
91021
|
-
// Component.peek comes from react-side-effect:
|
|
91022
|
-
// For testing, you may use a static peek() method available on the returned component.
|
|
91023
|
-
// It lets you get the current state without resetting the mounted instance stack.
|
|
91024
|
-
// Don’t use it for anything other than testing.
|
|
91025
|
-
|
|
91026
|
-
/**
|
|
91027
|
-
* @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"}
|
|
91028
|
-
* @param {Object} bodyAttributes: {"className": "root"}
|
|
91029
|
-
* @param {String} defaultTitle: "Default Title"
|
|
91030
|
-
* @param {Boolean} defer: true
|
|
91031
|
-
* @param {Boolean} encodeSpecialCharacters: true
|
|
91032
|
-
* @param {Object} htmlAttributes: {"lang": "en", "amp": undefined}
|
|
91033
|
-
* @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}]
|
|
91034
|
-
* @param {Array} meta: [{"name": "description", "content": "Test description"}]
|
|
91035
|
-
* @param {Array} noscript: [{"innerHTML": "<img src='http://mysite.com/js/test.js'"}]
|
|
91036
|
-
* @param {Function} onChangeClientState: "(newState) => console.log(newState)"
|
|
91037
|
-
* @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}]
|
|
91038
|
-
* @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}]
|
|
91039
|
-
* @param {String} title: "Title"
|
|
91040
|
-
* @param {Object} titleAttributes: {"itemprop": "name"}
|
|
91041
|
-
* @param {String} titleTemplate: "MySite.com - %s"
|
|
91042
|
-
*/
|
|
91043
|
-
set: function set$$1(canUseDOM) {
|
|
91044
|
-
Component.canUseDOM = canUseDOM;
|
|
91045
|
-
}
|
|
91046
|
-
}]);
|
|
91047
|
-
return HelmetWrapper;
|
|
91048
|
-
}(React__default$1["default"].Component), _class.propTypes = {
|
|
91049
|
-
base: propTypes.exports.object,
|
|
91050
|
-
bodyAttributes: propTypes.exports.object,
|
|
91051
|
-
children: propTypes.exports.oneOfType([propTypes.exports.arrayOf(propTypes.exports.node), propTypes.exports.node]),
|
|
91052
|
-
defaultTitle: propTypes.exports.string,
|
|
91053
|
-
defer: propTypes.exports.bool,
|
|
91054
|
-
encodeSpecialCharacters: propTypes.exports.bool,
|
|
91055
|
-
htmlAttributes: propTypes.exports.object,
|
|
91056
|
-
link: propTypes.exports.arrayOf(propTypes.exports.object),
|
|
91057
|
-
meta: propTypes.exports.arrayOf(propTypes.exports.object),
|
|
91058
|
-
noscript: propTypes.exports.arrayOf(propTypes.exports.object),
|
|
91059
|
-
onChangeClientState: propTypes.exports.func,
|
|
91060
|
-
script: propTypes.exports.arrayOf(propTypes.exports.object),
|
|
91061
|
-
style: propTypes.exports.arrayOf(propTypes.exports.object),
|
|
91062
|
-
title: propTypes.exports.string,
|
|
91063
|
-
titleAttributes: propTypes.exports.object,
|
|
91064
|
-
titleTemplate: propTypes.exports.string
|
|
91065
|
-
}, _class.defaultProps = {
|
|
91066
|
-
defer: true,
|
|
91067
|
-
encodeSpecialCharacters: true
|
|
91068
|
-
}, _class.peek = Component.peek, _class.rewind = function () {
|
|
91069
|
-
var mappedState = Component.rewind();
|
|
91070
|
-
if (!mappedState) {
|
|
91071
|
-
// provide fallback if mappedState is undefined
|
|
91072
|
-
mappedState = mapStateOnServer({
|
|
91073
|
-
baseTag: [],
|
|
91074
|
-
bodyAttributes: {},
|
|
91075
|
-
encodeSpecialCharacters: true,
|
|
91076
|
-
htmlAttributes: {},
|
|
91077
|
-
linkTags: [],
|
|
91078
|
-
metaTags: [],
|
|
91079
|
-
noscriptTags: [],
|
|
91080
|
-
scriptTags: [],
|
|
91081
|
-
styleTags: [],
|
|
91082
|
-
title: "",
|
|
91083
|
-
titleAttributes: {}
|
|
91084
|
-
});
|
|
91085
|
-
}
|
|
91086
|
-
|
|
91087
|
-
return mappedState;
|
|
91088
|
-
}, _temp;
|
|
91089
|
-
};
|
|
91090
|
-
|
|
91091
|
-
var NullComponent = function NullComponent() {
|
|
91092
|
-
return null;
|
|
91093
|
-
};
|
|
91094
|
-
|
|
91095
|
-
var HelmetSideEffects = lib(reducePropsToState, handleClientStateChange, mapStateOnServer)(NullComponent);
|
|
91096
|
-
|
|
91097
|
-
var HelmetExport = Helmet(HelmetSideEffects);
|
|
91098
|
-
HelmetExport.renderStatic = HelmetExport.rewind;
|
|
91099
|
-
|
|
91100
89930
|
var ChangelogWidget = function ChangelogWidget() {
|
|
91101
|
-
return /*#__PURE__*/React__default
|
|
89931
|
+
return /*#__PURE__*/React__default["default"].createElement(reactHelmet.Helmet, {
|
|
91102
89932
|
defer: false,
|
|
91103
89933
|
script: [{
|
|
91104
89934
|
type: "text/javascript",
|
|
@@ -91147,13 +89977,13 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
91147
89977
|
_ref$showAppSwitcher = _ref.showAppSwitcher,
|
|
91148
89978
|
showAppSwitcher = _ref$showAppSwitcher === void 0 ? true : _ref$showAppSwitcher;
|
|
91149
89979
|
|
|
91150
|
-
var _useState = React
|
|
89980
|
+
var _useState = React.useState(false),
|
|
91151
89981
|
_useState2 = _slicedToArray(_useState, 2),
|
|
91152
89982
|
isAppSwitcherOpen = _useState2[0],
|
|
91153
89983
|
setIsAppSwitcherOpen = _useState2[1];
|
|
91154
89984
|
|
|
91155
89985
|
var location = reactRouterDom.useLocation();
|
|
91156
|
-
React
|
|
89986
|
+
React.useEffect(function () {
|
|
91157
89987
|
isAppSwitcherOpen && setIsAppSwitcherOpen(false); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
91158
89988
|
}, [location]);
|
|
91159
89989
|
|
|
@@ -91187,7 +90017,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
91187
90017
|
id: CHANGELOG_WIDGET_TRIGGER_ID
|
|
91188
90018
|
} : undefined
|
|
91189
90019
|
});
|
|
91190
|
-
return /*#__PURE__*/React__default
|
|
90020
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showNeetoChangelog && /*#__PURE__*/React__default["default"].createElement(ChangelogWidget, null), /*#__PURE__*/React__default["default"].createElement(layouts.Sidebar, {
|
|
91191
90021
|
isCollapsed: true,
|
|
91192
90022
|
appName: "neeto".concat(capitalize(appName)),
|
|
91193
90023
|
navLinks: navLinks,
|
|
@@ -91197,7 +90027,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
91197
90027
|
return setIsAppSwitcherOpen(ramda.not);
|
|
91198
90028
|
},
|
|
91199
90029
|
showAppSwitcher: showAppSwitcher
|
|
91200
|
-
}), showAppSwitcher && /*#__PURE__*/React__default
|
|
90030
|
+
}), showAppSwitcher && /*#__PURE__*/React__default["default"].createElement(layouts.AppSwitcher, {
|
|
91201
90031
|
isOpen: isAppSwitcherOpen,
|
|
91202
90032
|
onClose: function onClose() {
|
|
91203
90033
|
return setIsAppSwitcherOpen(false);
|
|
@@ -91213,6 +90043,14 @@ var NeetoWidget = {
|
|
|
91213
90043
|
WIDGET_TYPES: WIDGET_TYPES
|
|
91214
90044
|
};
|
|
91215
90045
|
|
|
90046
|
+
var withTitle = function withTitle(Component) {
|
|
90047
|
+
var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
90048
|
+
return function PageTitle(props) {
|
|
90049
|
+
var pageTitle = title ? "".concat(title, " | ").concat(globalProps.appName) : globalProps.appName;
|
|
90050
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(reactHelmet.Helmet, null, /*#__PURE__*/React__default["default"].createElement("title", null, pageTitle)), /*#__PURE__*/React__default["default"].createElement(Component, props));
|
|
90051
|
+
};
|
|
90052
|
+
};
|
|
90053
|
+
|
|
91216
90054
|
var setWithoutModifyingActions = function setWithoutModifyingActions(set) {
|
|
91217
90055
|
return function (partial) {
|
|
91218
90056
|
return set(function (previous) {
|
|
@@ -91310,29 +90148,29 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
91310
90148
|
var _useTranslation = reactI18next.useTranslation(),
|
|
91311
90149
|
t = _useTranslation.t;
|
|
91312
90150
|
|
|
91313
|
-
return /*#__PURE__*/React__default
|
|
90151
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91314
90152
|
className: "flex min-h-screen w-full flex-col items-center"
|
|
91315
|
-
}, /*#__PURE__*/React__default
|
|
90153
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgNeetoLogo, {
|
|
91316
90154
|
className: "mt-20 scale-150 transform"
|
|
91317
|
-
}), /*#__PURE__*/React__default
|
|
90155
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91318
90156
|
className: "flex w-full flex-1 items-center justify-center"
|
|
91319
|
-
}, /*#__PURE__*/React__default
|
|
90157
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91320
90158
|
"data-cy": "empty-state-container",
|
|
91321
90159
|
className: "flex h-full flex-row items-start justify-start"
|
|
91322
|
-
}, /*#__PURE__*/React__default
|
|
90160
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91323
90161
|
className: "m-auto max-w-md text-center"
|
|
91324
|
-
}, /*#__PURE__*/React__default
|
|
90162
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91325
90163
|
"data-cy": "empty-state-image-container",
|
|
91326
90164
|
className: "m-auto mb-8 flex items-center justify-center"
|
|
91327
|
-
}, /*#__PURE__*/React__default
|
|
90165
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgErrorPage, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
91328
90166
|
component: "h2",
|
|
91329
90167
|
style: "h2",
|
|
91330
90168
|
weight: "semibold",
|
|
91331
90169
|
className: "mb-4",
|
|
91332
90170
|
"data-cy": "empty-state-title"
|
|
91333
|
-
}, t("neetoCommons.errorPage.pageDoesNotExist")), /*#__PURE__*/React__default
|
|
90171
|
+
}, t("neetoCommons.errorPage.pageDoesNotExist")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91334
90172
|
className: "flex flex-row items-center justify-center"
|
|
91335
|
-
}, /*#__PURE__*/React__default
|
|
90173
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
91336
90174
|
style: "primary",
|
|
91337
90175
|
href: homeUrl,
|
|
91338
90176
|
size: "large",
|
|
@@ -91363,33 +90201,33 @@ function SignInForm(_ref) {
|
|
|
91363
90201
|
};
|
|
91364
90202
|
|
|
91365
90203
|
if (formik$1.Button === undefined) {
|
|
91366
|
-
return /*#__PURE__*/React__default
|
|
90204
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, "You need to have @bigbinary/neetoui version ^3.5.11 installed to use the login form.", /*#__PURE__*/React__default["default"].createElement("br", null), "Run the command:", /*#__PURE__*/React__default["default"].createElement("br", null), /*#__PURE__*/React__default["default"].createElement("code", null, "yarn add @bigbinary/neetoui@^3.5.11"));
|
|
91367
90205
|
}
|
|
91368
90206
|
|
|
91369
|
-
return /*#__PURE__*/React__default
|
|
90207
|
+
return /*#__PURE__*/React__default["default"].createElement(formik.Formik, {
|
|
91370
90208
|
initialValues: emailPrefilledInitialValues(),
|
|
91371
90209
|
validationSchema: LOGIN_FORM_VALIDATION_SCHEMA,
|
|
91372
90210
|
onSubmit: handleFormSubmit
|
|
91373
|
-
}, /*#__PURE__*/React__default
|
|
90211
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik.Form, {
|
|
91374
90212
|
className: "w-full"
|
|
91375
|
-
}, /*#__PURE__*/React__default
|
|
90213
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91376
90214
|
className: "mb-6"
|
|
91377
|
-
}, /*#__PURE__*/React__default
|
|
90215
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik$1.Input, {
|
|
91378
90216
|
required: true,
|
|
91379
90217
|
label: "Email",
|
|
91380
90218
|
name: "email",
|
|
91381
90219
|
"data-test-id": "login-email",
|
|
91382
90220
|
"data-cy": "login-email-text-field"
|
|
91383
|
-
})), /*#__PURE__*/React__default
|
|
90221
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91384
90222
|
className: "mb-6"
|
|
91385
|
-
}, /*#__PURE__*/React__default
|
|
90223
|
+
}, /*#__PURE__*/React__default["default"].createElement(formik$1.Input, {
|
|
91386
90224
|
required: true,
|
|
91387
90225
|
type: "password",
|
|
91388
90226
|
label: "Password",
|
|
91389
90227
|
name: "password",
|
|
91390
90228
|
"data-test-id": "login-password",
|
|
91391
90229
|
"data-cy": "login-password-text-field"
|
|
91392
|
-
})), /*#__PURE__*/React__default
|
|
90230
|
+
})), /*#__PURE__*/React__default["default"].createElement(formik$1.Button, {
|
|
91393
90231
|
style: "secondary",
|
|
91394
90232
|
type: "submit",
|
|
91395
90233
|
"data-test-id": "login-submit-button",
|
|
@@ -91402,7 +90240,7 @@ function SignInForm(_ref) {
|
|
|
91402
90240
|
function SignIn(_ref) {
|
|
91403
90241
|
var handleSubmit = _ref.handleSubmit;
|
|
91404
90242
|
|
|
91405
|
-
var _useState = React
|
|
90243
|
+
var _useState = React.useState(null),
|
|
91406
90244
|
_useState2 = _slicedToArray(_useState, 2),
|
|
91407
90245
|
isSubmitting = _useState2[0],
|
|
91408
90246
|
setIsSubmitting = _useState2[1];
|
|
@@ -91477,15 +90315,15 @@ function SignIn(_ref) {
|
|
|
91477
90315
|
};
|
|
91478
90316
|
}();
|
|
91479
90317
|
|
|
91480
|
-
return /*#__PURE__*/React__default
|
|
90318
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91481
90319
|
className: "w-screen h-screen flex justify-center"
|
|
91482
|
-
}, /*#__PURE__*/React__default
|
|
90320
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91483
90321
|
className: "rounded-lg bg-white p-10 shadow self-center max-w-lg min-w-max w-2/3"
|
|
91484
|
-
}, /*#__PURE__*/React__default
|
|
90322
|
+
}, /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
91485
90323
|
className: "mb-6 text-xl font-medium text-gray-800"
|
|
91486
|
-
}, "Login to your", " ", /*#__PURE__*/React__default
|
|
90324
|
+
}, "Login to your", " ", /*#__PURE__*/React__default["default"].createElement("b", {
|
|
91487
90325
|
"data-test-id": "organization-name"
|
|
91488
|
-
}, globalProps.organization.name), " ", "account"), /*#__PURE__*/React__default
|
|
90326
|
+
}, globalProps.organization.name), " ", "account"), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
91489
90327
|
style: "primary",
|
|
91490
90328
|
size: "large",
|
|
91491
90329
|
label: "Login as Oliver",
|
|
@@ -91493,9 +90331,9 @@ function SignIn(_ref) {
|
|
|
91493
90331
|
loading: isSubmitting,
|
|
91494
90332
|
onClick: loginAsOliver,
|
|
91495
90333
|
fullWidth: true
|
|
91496
|
-
}), /*#__PURE__*/React__default
|
|
90334
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
91497
90335
|
className: "my-6 text-center text-lg font-semibold"
|
|
91498
|
-
}, "OR"), /*#__PURE__*/React__default
|
|
90336
|
+
}, "OR"), /*#__PURE__*/React__default["default"].createElement(SignInForm, {
|
|
91499
90337
|
handleFormSubmit: handleFormSubmit
|
|
91500
90338
|
})));
|
|
91501
90339
|
}
|
|
@@ -91577,12 +90415,12 @@ var armasm = /*#__PURE__*/_mergeNamespaces({
|
|
|
91577
90415
|
'default': armasmExports
|
|
91578
90416
|
}, [armasmExports]);
|
|
91579
90417
|
|
|
91580
|
-
var asciidocExports
|
|
90418
|
+
var asciidocExports = requireAsciidoc();
|
|
91581
90419
|
|
|
91582
|
-
var asciidoc
|
|
90420
|
+
var asciidoc = /*#__PURE__*/_mergeNamespaces({
|
|
91583
90421
|
__proto__: null,
|
|
91584
|
-
'default': asciidocExports
|
|
91585
|
-
}, [asciidocExports
|
|
90422
|
+
'default': asciidocExports
|
|
90423
|
+
}, [asciidocExports]);
|
|
91586
90424
|
|
|
91587
90425
|
var aspectjExports = requireAspectj();
|
|
91588
90426
|
|
|
@@ -92837,12 +91675,12 @@ var zephir = /*#__PURE__*/_mergeNamespaces({
|
|
|
92837
91675
|
'default': zephirExports
|
|
92838
91676
|
}, [zephirExports]);
|
|
92839
91677
|
|
|
92840
|
-
var
|
|
91678
|
+
var avisynthExports = requireAvisynth();
|
|
92841
91679
|
|
|
92842
|
-
var
|
|
91680
|
+
var avisynth = /*#__PURE__*/_mergeNamespaces({
|
|
92843
91681
|
__proto__: null,
|
|
92844
|
-
'default':
|
|
92845
|
-
}, [
|
|
91682
|
+
'default': avisynthExports
|
|
91683
|
+
}, [avisynthExports]);
|
|
92846
91684
|
|
|
92847
91685
|
var avroIdlExports = requireAvroIdl();
|
|
92848
91686
|
|
|
@@ -92893,13 +91731,6 @@ var birb = /*#__PURE__*/_mergeNamespaces({
|
|
|
92893
91731
|
'default': birbExports
|
|
92894
91732
|
}, [birbExports]);
|
|
92895
91733
|
|
|
92896
|
-
var bisonExports = requireBison();
|
|
92897
|
-
|
|
92898
|
-
var bison = /*#__PURE__*/_mergeNamespaces({
|
|
92899
|
-
__proto__: null,
|
|
92900
|
-
'default': bisonExports
|
|
92901
|
-
}, [bisonExports]);
|
|
92902
|
-
|
|
92903
91734
|
var bnfExports = requireBnf();
|
|
92904
91735
|
|
|
92905
91736
|
var bnf = /*#__PURE__*/_mergeNamespaces({
|
|
@@ -94622,3 +93453,4 @@ exports.useOnClickOutside = useOnClickOutside;
|
|
|
94622
93453
|
exports.usePrevious = usePrevious;
|
|
94623
93454
|
exports.useUpdateEffect = useUpdateEffect;
|
|
94624
93455
|
exports.withImmutableActions = withImmutableActions;
|
|
93456
|
+
exports.withTitle = withTitle;
|