blue-react 10.1.3 → 11.0.0
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 +41 -84
- package/dist/components/A.js +13 -6
- package/dist/components/ActionMenu.d.ts +1 -0
- package/dist/components/ActionMenu.js +28 -22
- package/dist/components/Actions.d.ts +16 -0
- package/dist/components/Actions.js +68 -0
- package/dist/components/Button.d.ts +31 -0
- package/dist/components/Button.js +119 -0
- package/dist/components/Chevron.js +11 -9
- package/dist/components/HashRouter.js +9 -6
- package/dist/components/Header.js +5 -3
- package/dist/components/HeaderTitle.js +31 -26
- package/dist/components/IconMenuItem.d.ts +2 -2
- package/dist/components/IconMenuItem.js +17 -10
- package/dist/components/Intro.js +23 -17
- package/dist/components/Layout.d.ts +4 -2
- package/dist/components/Layout.js +83 -74
- package/dist/components/LegacyMenuItem.d.ts +150 -0
- package/dist/components/LegacyMenuItem.js +170 -0
- package/dist/components/MenuItem.d.ts +13 -149
- package/dist/components/MenuItem.js +168 -153
- package/dist/components/Modal.js +62 -49
- package/dist/components/ModalProvider.js +43 -35
- package/dist/components/Outside.js +5 -3
- package/dist/components/Search.js +69 -60
- package/dist/components/SidebarMenu.js +9 -6
- package/dist/components/SimpleLayout.d.ts +4 -2
- package/dist/components/SimpleLayout.js +20 -13
- package/dist/components/SlimContainer.js +8 -5
- package/dist/components/Status.js +56 -40
- package/dist/components/StatusProvider.js +22 -14
- package/dist/components/Tab.js +28 -19
- package/dist/components/Tabs.js +8 -5
- package/dist/components/ToastProvider.js +55 -44
- package/dist/components/shared.js +5 -1
- package/dist/style.css +16286 -0
- package/dist/style.min.css +12 -0
- package/index.d.ts +5 -5
- package/index.js +4 -2
- package/package.json +14 -12
- package/dist/components/Body.d.ts +0 -21
- package/dist/components/Body.js +0 -25
- package/dist/components/Layout/LayoutHeader.d.ts +0 -4
- package/dist/components/Layout/LayoutHeader.js +0 -25
- package/dist/components/Layout/LayoutMain.d.ts +0 -5
- package/dist/components/Layout/LayoutMain.js +0 -17
- package/dist/components/Page.d.ts +0 -13
- package/dist/components/Page.js +0 -39
- package/dist/components/SidebarToggler.d.ts +0 -11
- package/dist/components/SidebarToggler.js +0 -24
|
@@ -1,15 +1,21 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
var _excluded = ["children", "successIcon", "infoIcon", "warningIcon", "dangerIcon"];
|
|
2
|
-
function
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
3
8
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
10
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
11
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
12
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
13
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
10
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
14
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
11
16
|
import React, { createContext, useContext, useState } from "react";
|
|
12
17
|
import Status from "./Status.js";
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
19
|
var StatusContext = /*#__PURE__*/createContext({
|
|
14
20
|
setAlert: undefined,
|
|
15
21
|
setStatus: undefined
|
|
@@ -29,21 +35,23 @@ var StatusProvider = function StatusProvider(_ref) {
|
|
|
29
35
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
30
36
|
status = _useState4[0],
|
|
31
37
|
setStatus = _useState4[1];
|
|
32
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/_jsxs(StatusContext.Provider, _objectSpread(_objectSpread({
|
|
33
39
|
value: {
|
|
34
40
|
setAlert: setAlert,
|
|
35
41
|
setStatus: setStatus
|
|
36
42
|
}
|
|
37
|
-
}, rest),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
}, rest), {}, {
|
|
44
|
+
children: [children, /*#__PURE__*/_jsx(Status, {
|
|
45
|
+
alert: alert || undefined,
|
|
46
|
+
onUnsetAlert: function onUnsetAlert() {
|
|
47
|
+
return setAlert(null);
|
|
48
|
+
},
|
|
49
|
+
successIcon: successIcon,
|
|
50
|
+
infoIcon: infoIcon,
|
|
51
|
+
warningIcon: warningIcon,
|
|
52
|
+
dangerIcon: dangerIcon,
|
|
53
|
+
status: status
|
|
54
|
+
})]
|
|
47
55
|
}));
|
|
48
56
|
};
|
|
49
57
|
var useStatus = function useStatus() {
|
package/dist/components/Tab.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
var _excluded = ["label", "children", "className", "contentClassName", "active"];
|
|
2
|
-
function
|
|
3
|
-
function
|
|
4
|
-
function
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
10
|
import { useContext, useId } from "react";
|
|
6
11
|
import { TabsNameContext } from "./Tabs.js";
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
13
|
/**
|
|
8
14
|
* Always use together with `Tabs`.
|
|
9
15
|
*/
|
|
@@ -17,20 +23,23 @@ export default function Tab(_ref) {
|
|
|
17
23
|
var tabsName = useContext(TabsNameContext);
|
|
18
24
|
var tabId = "Tab_" + useId();
|
|
19
25
|
var tabPanelId = "Tab_Panel_" + useId();
|
|
20
|
-
return /*#__PURE__*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
27
|
+
children: [/*#__PURE__*/_jsx("input", _objectSpread({
|
|
28
|
+
type: "radio",
|
|
29
|
+
name: tabsName,
|
|
30
|
+
role: "tab",
|
|
31
|
+
id: tabId,
|
|
32
|
+
"aria-label": label,
|
|
33
|
+
"aria-controls": tabPanelId,
|
|
34
|
+
className: "blue-tab nav-link ".concat(className),
|
|
35
|
+
defaultChecked: active
|
|
36
|
+
}, rest)), /*#__PURE__*/_jsx("div", {
|
|
37
|
+
role: "tabpanel",
|
|
38
|
+
id: tabPanelId,
|
|
39
|
+
"aria-labelledby": tabId,
|
|
40
|
+
tabIndex: 0,
|
|
41
|
+
className: "blue-tab-content ".concat(contentClassName),
|
|
42
|
+
children: children
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
36
45
|
}
|
package/dist/components/Tabs.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useId, createContext } from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
export var TabsNameContext = /*#__PURE__*/createContext("");
|
|
3
4
|
/**
|
|
4
5
|
* Implementation of Blue Web Tabs. Allows to use tabs without JavaScript.
|
|
@@ -9,10 +10,12 @@ export default function Tabs(_ref) {
|
|
|
9
10
|
className = _ref.className,
|
|
10
11
|
underline = _ref.underline;
|
|
11
12
|
var tabsName = "TabList-" + useId();
|
|
12
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/_jsx("div", {
|
|
13
14
|
role: "tablist",
|
|
14
|
-
className: "blue-tabs nav nav-".concat(underline ? "underline" : "tabs", " ").concat(className)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
className: "blue-tabs nav nav-".concat(underline ? "underline" : "tabs", " ").concat(className),
|
|
16
|
+
children: /*#__PURE__*/_jsx(TabsNameContext.Provider, {
|
|
17
|
+
value: tabsName,
|
|
18
|
+
children: children
|
|
19
|
+
})
|
|
20
|
+
});
|
|
18
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["type"];
|
|
2
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
2
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
5
5
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
6
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
@@ -13,6 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
14
14
|
import React, { createContext, useContext, useState } from "react";
|
|
15
15
|
import { getPhrase } from "./shared.js";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
var ToastContext = /*#__PURE__*/createContext({
|
|
17
18
|
addToast: undefined,
|
|
18
19
|
clearToasts: undefined
|
|
@@ -42,51 +43,61 @@ export function ToastProvider(_ref) {
|
|
|
42
43
|
var clearToasts = function clearToasts() {
|
|
43
44
|
setToastItems([]);
|
|
44
45
|
};
|
|
45
|
-
return /*#__PURE__*/
|
|
46
|
+
return /*#__PURE__*/_jsxs(ToastContext.Provider, {
|
|
46
47
|
value: {
|
|
47
48
|
addToast: addToast,
|
|
48
49
|
clearToasts: clearToasts
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
50
|
+
},
|
|
51
|
+
children: [children, /*#__PURE__*/_jsx("div", {
|
|
52
|
+
className: "blue-normal-scrollbar",
|
|
53
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
54
|
+
className: "toast-container position-fixed bottom-0 end-0 p-3 mh-100 pe-auto overflow-auto me-3",
|
|
55
|
+
children: [toastItems.length > 1 && /*#__PURE__*/_jsx("div", {
|
|
56
|
+
className: "toast align-items-center fade show position-sticky top-0",
|
|
57
|
+
role: "alert",
|
|
58
|
+
"aria-live": "assertive",
|
|
59
|
+
"aria-atomic": "true",
|
|
60
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
61
|
+
className: "toast-header",
|
|
62
|
+
children: /*#__PURE__*/_jsx("button", {
|
|
63
|
+
className: "btn btn-outline-light blue-btn-silent btn-sm w-100",
|
|
64
|
+
onClick: clearToasts,
|
|
65
|
+
children: getPhrase("Close all")
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
}), toastItems.map(function (_ref2, i) {
|
|
69
|
+
var type = _ref2.type,
|
|
70
|
+
toastItem = _objectWithoutProperties(_ref2, _excluded);
|
|
71
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
72
|
+
className: "toast fade show",
|
|
73
|
+
role: "alert",
|
|
74
|
+
"aria-live": "assertive",
|
|
75
|
+
"aria-atomic": "true",
|
|
76
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
77
|
+
className: "toast-header",
|
|
78
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
79
|
+
className: "rounded me-2 text-".concat(type || "info"),
|
|
80
|
+
children: type === "danger" ? dangerIcon : type === "success" ? successIcon : type === "warning" ? warningIcon : infoIcon
|
|
81
|
+
}), /*#__PURE__*/_jsx("strong", {
|
|
82
|
+
className: "me-auto",
|
|
83
|
+
children: toastItem.title || (type === "danger" ? getPhrase("Error") : getPhrase("Information"))
|
|
84
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
85
|
+
type: "button",
|
|
86
|
+
className: "btn-close",
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
toastItems.splice(i, 1);
|
|
89
|
+
setToastItems(_toConsumableArray(toastItems));
|
|
90
|
+
}
|
|
91
|
+
})]
|
|
92
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
93
|
+
className: "toast-body",
|
|
94
|
+
children: toastItem.message
|
|
95
|
+
})]
|
|
96
|
+
}, i);
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
90
101
|
}
|
|
91
102
|
export var useToast = function useToast() {
|
|
92
103
|
var context = useContext(ToastContext);
|
|
@@ -4,10 +4,14 @@ var phrases = {
|
|
|
4
4
|
No: ["No", "Nein"],
|
|
5
5
|
Message: ["Message", "Nachricht"],
|
|
6
6
|
"Toggle menu": ["Toggle menu", "Menü umschalten"],
|
|
7
|
+
"Toggle details": ["Toggle details", "Details umschalten"],
|
|
7
8
|
"Close all": ["Close all", "Alle schließen"],
|
|
8
9
|
Error: ["Error", "Fehler"],
|
|
9
10
|
Information: ["Information", "Information"],
|
|
10
|
-
Search: ["Search", "Suche"]
|
|
11
|
+
Search: ["Search", "Suche"],
|
|
12
|
+
"Toolbar with buttons and button groups": ["Toolbar with buttons and button groups", "Toolbar mit Buttons und Button-Gruppen"],
|
|
13
|
+
Loading: ["Loading", "Laden"],
|
|
14
|
+
Successful: ["Successful", "Erfolgreich"]
|
|
11
15
|
};
|
|
12
16
|
export function getPhrase(keyword) {
|
|
13
17
|
var countryCode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|