gwchq-textjam 0.1.4 → 0.1.6
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/dist/assets/gwc-logoa61b092912e3c38825d3.svg +33 -0
- package/dist/index.js +483 -2120
- package/dist/style.css +6 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -323909,9 +323909,37 @@ var elementFromProps = map => {
|
|
|
323909
323909
|
};
|
|
323910
323910
|
/* harmony default export */ const PyodideRunner_VisualOutputPane = (VisualOutputPane);
|
|
323911
323911
|
;// ./src/assets/icons/split_view.svg
|
|
323912
|
-
|
|
323912
|
+
var _path;
|
|
323913
|
+
function split_view_extends() { return split_view_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, split_view_extends.apply(null, arguments); }
|
|
323914
|
+
|
|
323915
|
+
function SvgSplitView(props) {
|
|
323916
|
+
return /*#__PURE__*/external_react_.createElement("svg", split_view_extends({
|
|
323917
|
+
width: 20,
|
|
323918
|
+
height: 20,
|
|
323919
|
+
fill: "none",
|
|
323920
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
323921
|
+
}, props), _path || (_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
323922
|
+
d: "M2.5 17.5V9.167h15V17.5h-15zm1.667-1.667h11.666v-5H4.167v5zM2.5 9.167V2.5h15v6.667h-15zm1.667 0h11.666v-5H4.167v5z"
|
|
323923
|
+
})));
|
|
323924
|
+
}
|
|
323925
|
+
/* harmony default export */ const split_view = (SvgSplitView);
|
|
323913
323926
|
;// ./src/assets/icons/tabbed_view.svg
|
|
323914
|
-
|
|
323927
|
+
var tabbed_view_path, _path2;
|
|
323928
|
+
function tabbed_view_extends() { return tabbed_view_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, tabbed_view_extends.apply(null, arguments); }
|
|
323929
|
+
|
|
323930
|
+
function SvgTabbedView(props) {
|
|
323931
|
+
return /*#__PURE__*/external_react_.createElement("svg", tabbed_view_extends({
|
|
323932
|
+
width: 20,
|
|
323933
|
+
height: 20,
|
|
323934
|
+
fill: "none",
|
|
323935
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
323936
|
+
}, props), tabbed_view_path || (tabbed_view_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
323937
|
+
d: "M17.5 17.5v-15h-15v15h15zm-1.667-1.667H4.167V9.167h11.666v6.666zm0-8.333H4.167V4.167h11.666V7.5zm-7.5-.833H5V5h3.333v1.667z"
|
|
323938
|
+
})), _path2 || (_path2 = /*#__PURE__*/external_react_.createElement("path", {
|
|
323939
|
+
d: "M9.167 6.667H12.5V5H9.167v1.667z"
|
|
323940
|
+
})));
|
|
323941
|
+
}
|
|
323942
|
+
/* harmony default export */ const tabbed_view = (SvgTabbedView);
|
|
323915
323943
|
// EXTERNAL MODULE: ./node_modules/react-confirm-alert/lib/index.js
|
|
323916
323944
|
var react_confirm_alert_lib = __webpack_require__(23350);
|
|
323917
323945
|
;// ./node_modules/@remix-run/router/dist/router.js
|
|
@@ -331786,13 +331814,15 @@ var Button = props => {
|
|
|
331786
331814
|
text,
|
|
331787
331815
|
title,
|
|
331788
331816
|
label,
|
|
331789
|
-
buttonIconPosition = "left"
|
|
331817
|
+
buttonIconPosition = "left",
|
|
331818
|
+
isUser
|
|
331790
331819
|
} = props;
|
|
331791
331820
|
var {
|
|
331792
331821
|
t
|
|
331793
331822
|
} = useTranslation_useTranslation();
|
|
331794
331823
|
var buttonClass = classnames_default()("btn", className, {
|
|
331795
|
-
"btn--svg-only": !buttonText
|
|
331824
|
+
"btn--svg-only": !buttonText,
|
|
331825
|
+
"btn--user": isUser
|
|
331796
331826
|
});
|
|
331797
331827
|
var onButtonClick = e => {
|
|
331798
331828
|
if (!confirmText) {
|
|
@@ -331897,7 +331927,7 @@ var OutputViewToggle = () => {
|
|
|
331897
331927
|
disabled: codeRunTriggered || drawTriggered,
|
|
331898
331928
|
label: isSplitView ? t("outputViewToggle.buttonTabLabel") : t("outputViewToggle.buttonSplitLabel"),
|
|
331899
331929
|
title: isSplitView ? t("outputViewToggle.buttonTabTitle") : t("outputViewToggle.buttonSplitTitle"),
|
|
331900
|
-
ButtonIcon: isSplitView ?
|
|
331930
|
+
ButtonIcon: isSplitView ? tabbed_view : split_view,
|
|
331901
331931
|
buttonIconPosition: "right",
|
|
331902
331932
|
onClickHandler: isSplitView ? switchToTabbedView : switchToSplitView
|
|
331903
331933
|
})
|
|
@@ -331988,9 +332018,35 @@ var StopButton = _ref => {
|
|
|
331988
332018
|
};
|
|
331989
332019
|
/* harmony default export */ const RunButton_StopButton = (StopButton);
|
|
331990
332020
|
;// ./src/assets/icons/run.svg
|
|
331991
|
-
|
|
332021
|
+
var run_path;
|
|
332022
|
+
function run_extends() { return run_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, run_extends.apply(null, arguments); }
|
|
332023
|
+
|
|
332024
|
+
function SvgRun(props) {
|
|
332025
|
+
return /*#__PURE__*/external_react_.createElement("svg", run_extends({
|
|
332026
|
+
width: 11,
|
|
332027
|
+
height: 14,
|
|
332028
|
+
fill: "none",
|
|
332029
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
332030
|
+
}, props), run_path || (run_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
332031
|
+
d: "M0 14V0l11 7-11 7z"
|
|
332032
|
+
})));
|
|
332033
|
+
}
|
|
332034
|
+
/* harmony default export */ const run = (SvgRun);
|
|
331992
332035
|
;// ./src/assets/icons/stop.svg
|
|
331993
|
-
|
|
332036
|
+
var stop_path;
|
|
332037
|
+
function stop_extends() { return stop_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, stop_extends.apply(null, arguments); }
|
|
332038
|
+
|
|
332039
|
+
function SvgStop(props) {
|
|
332040
|
+
return /*#__PURE__*/external_react_.createElement("svg", stop_extends({
|
|
332041
|
+
width: 12,
|
|
332042
|
+
height: 12,
|
|
332043
|
+
fill: "none",
|
|
332044
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
332045
|
+
}, props), stop_path || (stop_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
332046
|
+
d: "M0 12V0h12v12H0z"
|
|
332047
|
+
})));
|
|
332048
|
+
}
|
|
332049
|
+
/* harmony default export */ const stop = (SvgStop);
|
|
331994
332050
|
;// ./src/components/RunButton/RunnerControls.jsx
|
|
331995
332051
|
|
|
331996
332052
|
|
|
@@ -332013,14 +332069,14 @@ var RunnerControls = _ref => {
|
|
|
332013
332069
|
return codeRunTriggered || drawTriggered ? /*#__PURE__*/(0,jsx_runtime.jsx)(RunButton_StopButton, {
|
|
332014
332070
|
embedded: embedded,
|
|
332015
332071
|
buttonText: t("runButton.stop"),
|
|
332016
|
-
ButtonIcon:
|
|
332072
|
+
ButtonIcon: stop,
|
|
332017
332073
|
buttonIconPosition: "right",
|
|
332018
332074
|
buttonOuter: skinny,
|
|
332019
332075
|
className: "btn--stop btn--primary".concat(skinny ? " btn--small" : "")
|
|
332020
332076
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(RunButton_RunButton, {
|
|
332021
332077
|
embedded: embedded,
|
|
332022
332078
|
buttonText: t("runButton.run"),
|
|
332023
|
-
ButtonIcon:
|
|
332079
|
+
ButtonIcon: run,
|
|
332024
332080
|
buttonIconPosition: "right",
|
|
332025
332081
|
buttonOuter: skinny,
|
|
332026
332082
|
className: skinny ? "btn--small" : ""
|
|
@@ -332539,7 +332595,20 @@ var matchingRegexes = (regexArray, testString) => {
|
|
|
332539
332595
|
};
|
|
332540
332596
|
|
|
332541
332597
|
;// ./src/assets/icons/open_in_new_tab.svg
|
|
332542
|
-
|
|
332598
|
+
var open_in_new_tab_path;
|
|
332599
|
+
function open_in_new_tab_extends() { return open_in_new_tab_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, open_in_new_tab_extends.apply(null, arguments); }
|
|
332600
|
+
|
|
332601
|
+
function SvgOpenInNewTab(props) {
|
|
332602
|
+
return /*#__PURE__*/external_react_.createElement("svg", open_in_new_tab_extends({
|
|
332603
|
+
width: 16,
|
|
332604
|
+
height: 16,
|
|
332605
|
+
fill: "none",
|
|
332606
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
332607
|
+
}, props), open_in_new_tab_path || (open_in_new_tab_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
332608
|
+
d: "M2.167.5A1.68 1.68 0 00.5 2.167v11.666c0 .911.756 1.667 1.667 1.667h11.666a1.68 1.68 0 001.667-1.667V8h-1.667v5.833H2.167V2.167H8V.5H2.167zm7.5 0v1.667h2.988L4.91 9.91l1.178 1.178 7.744-7.744v2.988H15.5V.5H9.667z"
|
|
332609
|
+
})));
|
|
332610
|
+
}
|
|
332611
|
+
/* harmony default export */ const open_in_new_tab = (SvgOpenInNewTab);
|
|
332543
332612
|
;// ./src/components/Editor/Runners/HtmlRunner/HtmlRunner.jsx
|
|
332544
332613
|
|
|
332545
332614
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
@@ -332801,7 +332870,7 @@ function HtmlRunner() {
|
|
|
332801
332870
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
332802
332871
|
className: "htmlrunner-link__text",
|
|
332803
332872
|
children: t("output.newTab")
|
|
332804
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
332873
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(open_in_new_tab, {})]
|
|
332805
332874
|
})]
|
|
332806
332875
|
}), !isEmbedded && isMobile ? /*#__PURE__*/(0,jsx_runtime.jsx)(RunButton_RunnerControls, {
|
|
332807
332876
|
skinny: true
|
|
@@ -334312,9 +334381,35 @@ eventManager.on(2
|
|
|
334312
334381
|
//# sourceMappingURL=react-toastify.esm.js.map
|
|
334313
334382
|
|
|
334314
334383
|
;// ./src/assets/icons/info.svg
|
|
334315
|
-
|
|
334384
|
+
var info_path;
|
|
334385
|
+
function info_extends() { return info_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, info_extends.apply(null, arguments); }
|
|
334386
|
+
|
|
334387
|
+
function SvgInfo(props) {
|
|
334388
|
+
return /*#__PURE__*/external_react_.createElement("svg", info_extends({
|
|
334389
|
+
width: 24,
|
|
334390
|
+
height: 24,
|
|
334391
|
+
fill: "none",
|
|
334392
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
334393
|
+
}, props), info_path || (info_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
334394
|
+
d: "M11 17h2v-6h-2v6zm1-8a.968.968 0 00.713-.288A.967.967 0 0013 8a.97.97 0 00-.287-.713A.97.97 0 0012 7a.967.967 0 00-.712.287A.968.968 0 0011 8c0 .283.096.52.288.712A.965.965 0 0012 9zm0 13a9.733 9.733 0 01-3.9-.788 10.092 10.092 0 01-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.733 9.733 0 012 12c0-1.383.263-2.683.788-3.9a10.092 10.092 0 012.137-3.175c.9-.9 1.958-1.613 3.175-2.138A9.743 9.743 0 0112 2c1.383 0 2.683.262 3.9.787a10.105 10.105 0 013.175 2.138c.9.9 1.612 1.958 2.137 3.175A9.733 9.733 0 0122 12a9.733 9.733 0 01-.788 3.9 10.092 10.092 0 01-2.137 3.175c-.9.9-1.958 1.612-3.175 2.137A9.733 9.733 0 0112 22zm0-2c2.217 0 4.104-.779 5.663-2.337C19.221 16.104 20 14.217 20 12s-.779-4.104-2.337-5.663C16.104 4.779 14.217 4 12 4s-4.104.779-5.662 2.337C4.779 7.896 4 9.783 4 12s.78 4.104 2.338 5.663C7.896 19.221 9.783 20 12 20z"
|
|
334395
|
+
})));
|
|
334396
|
+
}
|
|
334397
|
+
/* harmony default export */ const info = (SvgInfo);
|
|
334316
334398
|
;// ./src/assets/icons/tick.svg
|
|
334317
|
-
|
|
334399
|
+
var tick_path;
|
|
334400
|
+
function tick_extends() { return tick_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, tick_extends.apply(null, arguments); }
|
|
334401
|
+
|
|
334402
|
+
function SvgTick(props) {
|
|
334403
|
+
return /*#__PURE__*/external_react_.createElement("svg", tick_extends({
|
|
334404
|
+
width: 18,
|
|
334405
|
+
height: 13,
|
|
334406
|
+
fill: "none",
|
|
334407
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
334408
|
+
}, props), tick_path || (tick_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
334409
|
+
d: "M6.55 13L.85 7.3l1.425-1.425L6.55 10.15 15.725.975 17.15 2.4 6.55 13z"
|
|
334410
|
+
})));
|
|
334411
|
+
}
|
|
334412
|
+
/* harmony default export */ const tick = (SvgTick);
|
|
334318
334413
|
;// ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
334319
334414
|
function _assertThisInitialized(e) {
|
|
334320
334415
|
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -337007,7 +337102,7 @@ var topCenterSettings = {
|
|
|
337007
337102
|
var showSavePrompt = () => {
|
|
337008
337103
|
react_toastify_esm_toast(src_i18n.t("notifications.savePrompt"), _objectSpread2(_objectSpread2({}, topCenterSettings), {}, {
|
|
337009
337104
|
className: "".concat(topCenterSettings.className, " toast--info"),
|
|
337010
|
-
icon:
|
|
337105
|
+
icon: info
|
|
337011
337106
|
}));
|
|
337012
337107
|
};
|
|
337013
337108
|
var showLoginPrompt = () => {
|
|
@@ -337018,7 +337113,7 @@ var showLoginPrompt = () => {
|
|
|
337018
337113
|
};
|
|
337019
337114
|
var showSavedMessage = () => {
|
|
337020
337115
|
react_toastify_esm_toast(src_i18n.t("notifications.projectSaved"), _objectSpread2(_objectSpread2({}, bottomCenterSettings), {}, {
|
|
337021
|
-
icon:
|
|
337116
|
+
icon: tick
|
|
337022
337117
|
}));
|
|
337023
337118
|
};
|
|
337024
337119
|
var showRenamedMessage = () => {
|
|
@@ -337027,9 +337122,35 @@ var showRenamedMessage = () => {
|
|
|
337027
337122
|
}));
|
|
337028
337123
|
};
|
|
337029
337124
|
;// ./src/assets/icons/cloud_tick.svg
|
|
337030
|
-
|
|
337125
|
+
var cloud_tick_path;
|
|
337126
|
+
function cloud_tick_extends() { return cloud_tick_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, cloud_tick_extends.apply(null, arguments); }
|
|
337127
|
+
|
|
337128
|
+
function SvgCloudTick(props) {
|
|
337129
|
+
return /*#__PURE__*/external_react_.createElement("svg", cloud_tick_extends({
|
|
337130
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
337131
|
+
height: 24,
|
|
337132
|
+
viewBox: "0 -960 960 960",
|
|
337133
|
+
width: 24
|
|
337134
|
+
}, props), cloud_tick_path || (cloud_tick_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
337135
|
+
d: "M414-280l226-226-58-58-169 169-84-84-57 57 142 142zM260-160q-91 0-155.5-63T40-377q0-78 47-139t123-78q25-92 100-149t170-57q117 0 198.5 81.5T760-520q69 8 114.5 59.5T920-340q0 75-52.5 127.5T740-160H260zm0-80h480q42 0 71-29t29-71q0-42-29-71t-71-29h-60v-80q0-83-58.5-141.5T480-720q-83 0-141.5 58.5T280-520h-20q-58 0-99 41t-41 99q0 58 41 99t99 41zm220-240z"
|
|
337136
|
+
})));
|
|
337137
|
+
}
|
|
337138
|
+
/* harmony default export */ const cloud_tick = (SvgCloudTick);
|
|
337031
337139
|
;// ./src/assets/icons/cloud_upload.svg
|
|
337032
|
-
|
|
337140
|
+
var cloud_upload_path;
|
|
337141
|
+
function cloud_upload_extends() { return cloud_upload_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, cloud_upload_extends.apply(null, arguments); }
|
|
337142
|
+
|
|
337143
|
+
function SvgCloudUpload(props) {
|
|
337144
|
+
return /*#__PURE__*/external_react_.createElement("svg", cloud_upload_extends({
|
|
337145
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
337146
|
+
height: 24,
|
|
337147
|
+
viewBox: "0 -960 960 960",
|
|
337148
|
+
width: 24
|
|
337149
|
+
}, props), cloud_upload_path || (cloud_upload_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
337150
|
+
d: "M260-160q-91 0-155.5-63T40-377q0-78 47-139t123-78q25-92 100-149t170-57q117 0 198.5 81.5T760-520q69 8 114.5 59.5T920-340q0 75-52.5 127.5T740-160H520q-33 0-56.5-23.5T440-240v-206l-64 62-56-56 160-160 160 160-56 56-64-62v206h220q42 0 71-29t29-71q0-42-29-71t-71-29h-60v-80q0-83-58.5-141.5T480-720q-83 0-141.5 58.5T280-520h-20q-58 0-99 41t-41 99q0 58 41 99t99 41h100v80H260zm220-280z"
|
|
337151
|
+
})));
|
|
337152
|
+
}
|
|
337153
|
+
/* harmony default export */ const cloud_upload = (SvgCloudUpload);
|
|
337033
337154
|
;// ./src/assets/stylesheets/SaveStatus.scss
|
|
337034
337155
|
// extracted by mini-css-extract-plugin
|
|
337035
337156
|
|
|
@@ -338221,7 +338342,7 @@ var SaveStatus = _ref => {
|
|
|
338221
338342
|
children: isPending ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
338222
338343
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
338223
338344
|
className: "save-status__icon",
|
|
338224
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
338345
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(cloud_upload, {})
|
|
338225
338346
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
338226
338347
|
className: "save-status__text",
|
|
338227
338348
|
children: [t("saveStatus.saving"), "\u2026"]
|
|
@@ -338229,7 +338350,7 @@ var SaveStatus = _ref => {
|
|
|
338229
338350
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
338230
338351
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
338231
338352
|
className: "save-status__icon",
|
|
338232
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
338353
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(cloud_tick, {})
|
|
338233
338354
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
338234
338355
|
className: "save-status__text",
|
|
338235
338356
|
children: [t("saveStatus.saved"), " ", formatRelativeTime(lastSavedTime, time, locale, fallbackLng)]
|
|
@@ -338239,9 +338360,37 @@ var SaveStatus = _ref => {
|
|
|
338239
338360
|
};
|
|
338240
338361
|
/* harmony default export */ const SaveStatus_SaveStatus = (SaveStatus);
|
|
338241
338362
|
;// ./src/assets/icons/download.svg
|
|
338242
|
-
|
|
338363
|
+
var download_path;
|
|
338364
|
+
function download_extends() { return download_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, download_extends.apply(null, arguments); }
|
|
338365
|
+
|
|
338366
|
+
function SvgDownload(props) {
|
|
338367
|
+
return /*#__PURE__*/external_react_.createElement("svg", download_extends({
|
|
338368
|
+
width: 24,
|
|
338369
|
+
height: 24,
|
|
338370
|
+
fill: "none",
|
|
338371
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
338372
|
+
}, props), download_path || (download_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
338373
|
+
d: "M12 16l-5-5 1.4-1.45 2.6 2.6V4h2v8.15l2.6-2.6L17 11l-5 5zm-8 4v-5h2v3h12v-3h2v5H4z"
|
|
338374
|
+
})));
|
|
338375
|
+
}
|
|
338376
|
+
/* harmony default export */ const download = (SvgDownload);
|
|
338377
|
+
;// ./src/assets/text_jam_logo.svg
|
|
338378
|
+
const text_jam_logo_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTU1IiBoZWlnaHQ9IjM2IiB2aWV3Qm94PSIwIDAgMTU1IDM2IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KPHBhdGggZD0iTTEwOC44NzEgNi44NjIwNkgxMTMuODkyVjIxLjE5ODNDMTEzLjg5MiAyMi41MjcgMTEzLjU4NiAyMy43MTI2IDExMi45NjYgMjQuNzU1MUMxMTIuMzQ2IDI1Ljc5NzYgMTExLjQ4NyAyNi42MDg0IDExMC4zODMgMjcuMTgwOEMxMDkuMjc5IDI3Ljc1MzEgMTA4LjA0NiAyOC4wMzkzIDEwNi42OSAyOC4wMzkzQzEwNC40MTQgMjguMDM5MyAxMDIuNjQzIDI3LjQ2NyAxMDEuMzgyIDI2LjMxNTRDMTAwLjEyMiAyNS4xNjM5IDk5LjQ4OCAyMy41NDIyIDk5LjQ4OCAyMS40MzY4SDEwNC41MzdDMTA0LjUzNyAyMi4zOTA3IDEwNC43MDEgMjMuMDg1NyAxMDUuMDM0IDIzLjUxNUMxMDUuMzY4IDIzLjk0NDIgMTA1LjkyIDI0LjE2MjMgMTA2LjY5IDI0LjE2MjNDMTA3LjM5MiAyNC4xNjIzIDEwNy45MjQgMjMuOTAzMyAxMDguMzA1IDIzLjM3ODdDMTA4LjY4NyAyMi44NTQgMTA4Ljg3MSAyMi4xMjQ5IDEwOC44NzEgMjEuMTkxNVY2Ljg2MjA2WiIgZmlsbD0iI0EzMTc0NiIvPg0KPHBhdGggZD0iTTEyNS41OTIgMjcuNzYwNkMxMjUuNDIxIDI3LjQ0NzIgMTI1LjI2NSAyNi45ODM4IDEyNS4xMzUgMjYuMzcwNkMxMjQuMjQzIDI3LjQ4ODEgMTIzLjAwMyAyOC4wNDY4IDEyMS40MDEgMjguMDQ2OEMxMTkuOTM2IDI4LjA0NjggMTE4LjY5NiAyNy42MDM5IDExNy42NjcgMjYuNzE4MUMxMTYuNjM4IDI1LjgzMjMgMTE2LjEzNCAyNC43MjE3IDExNi4xMzQgMjMuMzc5M0MxMTYuMTM0IDIxLjY5NjMgMTE2Ljc1NCAyMC40MjIyIDExOC4wMDEgMTkuNTYzNkMxMTkuMjQ4IDE4LjcwNTEgMTIxLjA1NCAxOC4yNjkgMTIzLjQyNSAxOC4yNjlIMTI0LjkxN1YxNy40NDQ1QzEyNC45MTcgMTYuMDEzNiAxMjQuMjk3IDE1LjI5ODIgMTIzLjA2NCAxNS4yOTgyQzEyMS45MTkgMTUuMjk4MiAxMjEuMzQgMTUuODYzNyAxMjEuMzQgMTcuMDAxNkgxMTYuNTAyQzExNi41MDIgMTUuNTAyNiAxMTcuMTQzIDE0LjI4MjkgMTE4LjQxNyAxMy4zNDk0QzExOS42OTEgMTIuNDE2IDEyMS4zMiAxMS45NDU4IDEyMy4zMDIgMTEuOTQ1OEMxMjUuMjg1IDExLjk0NTggMTI2Ljg0NiAxMi40Mjk2IDEyNy45OTcgMTMuMzk3MUMxMjkuMTQ5IDE0LjM2NDcgMTI5LjczNSAxNS42ODY2IDEyOS43NjIgMTcuMzY5NlYyNC4yNDQ3QzEyOS43ODIgMjUuNjY4OCAxMzAgMjYuNzU5IDEzMC40MjMgMjcuNTE1M1YyNy43NjA2SDEyNS41ODVIMTI1LjU5MlpNMTIyLjU2NiAyNC41OTlDMTIzLjE2NiAyNC41OTkgMTIzLjY3IDI0LjQ2OTUgMTI0LjA2NiAyNC4yMTA2QzEyNC40NjEgMjMuOTUxNyAxMjQuNzQ3IDIzLjY1ODcgMTI0LjkxNyAyMy4zMzg1VjIwLjg1ODJIMTIzLjUxNEMxMjEuODMxIDIwLjg1ODIgMTIwLjk4NiAyMS42MTQ2IDEyMC45ODYgMjMuMTI3MkMxMjAuOTg2IDIzLjU3MDEgMTIxLjEzNiAyMy45MjQ0IDEyMS40MjkgMjQuMTk3QzEyMS43MjIgMjQuNDY5NSAxMjIuMTAzIDI0LjYwNTggMTIyLjU2IDI0LjYwNThMMTIyLjU2NiAyNC41OTlaIiBmaWxsPSIjQTMxNzQ2Ii8+DQo8cGF0aCBkPSJNMTM3LjAxOSAxMi4yMzA4TDEzNy4xNzUgMTQuMDUwMUMxMzguMjcyIDEyLjY0NjQgMTM5Ljc1MSAxMS45Mzc4IDE0MS42MTEgMTEuOTM3OEMxNDMuNTczIDExLjkzNzggMTQ0Ljg5NSAxMi43MTQ2IDE0NS41ODMgMTQuMjc0OUMxNDYuNjMzIDEyLjcxNDYgMTQ4LjE1OSAxMS45Mzc4IDE1MC4xNDkgMTEuOTM3OEMxNTMuMjk3IDExLjkzNzggMTU0LjkxMiAxMy44Mzg5IDE1NSAxNy42NDc4VjI3Ljc1MjZIMTUwLjE0OVYxNy45NDc2QzE1MC4xNDkgMTcuMTUwNCAxNTAuMDEyIDE2LjU3OCAxNDkuNzQ3IDE2LjIxMDFDMTQ5LjQ4MSAxNS44NDIxIDE0OC45OSAxNS42NjQ5IDE0OC4yODIgMTUuNjY0OUMxNDcuMzI4IDE1LjY2NDkgMTQ2LjYxMiAxNi4wODc0IDE0Ni4xNDIgMTYuOTM5MUwxNDYuMTU2IDE3LjEzNjdWMjcuNzM5SDE0MS4zMDRWMTcuOTY4QzE0MS4zMDQgMTcuMTU3MiAxNDEuMTc1IDE2LjU2NDQgMTQwLjkxNiAxNi4yMDMyQzE0MC42NTcgMTUuODQyMSAxNDAuMTY3IDE1LjY1ODEgMTM5LjQzNyAxNS42NTgxQzEzOC41MTEgMTUuNjU4MSAxMzcuODAyIDE2LjA4MDYgMTM3LjMxMiAxNi45MzIzVjI3LjczOUgxMzIuNDc0VjEyLjIxMDRIMTM3LjAxMkwxMzcuMDE5IDEyLjIzMDhaIiBmaWxsPSIjQTMxNzQ2Ii8+DQo8cGF0aCBkPSJNOTMuMzIxNyAzMi4xNDc1SDMuNDYxNDlWMEg5My4zMjE3VjMyLjE0NzVaTTQuODI0MjQgMzAuNzg0N0g5MS45NTlWMS4zNjI3Nkg0LjgyNDI0VjMwLjc4NDdaIiBmaWxsPSIjQTMxNzQ2Ii8+DQo8cGF0aCBkPSJNMTQuMzQzIDEwLjA5MjRIMTcuOTI3MVYyNC40MjE4SDIxLjUxMTFWMTAuMDkyNEgyNS4wOTUyVjYuNTA4MzlIMTQuMzQzVjEwLjA5MjRaIiBmaWxsPSIjQTMxNzQ2Ii8+DQo8cGF0aCBkPSJNMzIuMjcwMSAyNC40MjE4SDQzLjAxNTVWMjAuODM3OEgzNS44NDc0VjE3LjI1MzdINDMuMDE1NVYxMy42Njk3SDM1Ljg0NzRWMTAuMDkyNEg0My4wMTU1VjYuNTA4MzlIMzIuMjcwMVYyNC40MjE4WiIgZmlsbD0iI0EzMTc0NiIvPg0KPHBhdGggZD0iTTcxLjY5NDYgNi41MDgzOVYxMC4wOTI0SDc1LjI3ODdWMjQuNDIxOEg3OC44NjI3VjEwLjA5MjRIODIuNDQ2OFY2LjUwODM5SDcxLjY5NDZaIiBmaWxsPSIjQTMxNzQ2Ii8+DQo8cGF0aCBkPSJNNjQuNTE5NyAyMC42OTM2SDYwLjkzNTZWMjQuMjc3N0g2NC41MTk3VjIwLjY5MzZaIiBmaWxsPSIjQTMxNzQ2Ii8+DQo8cGF0aCBkPSJNNTMuNzc0NSAxMy42MjEySDU2LjA0MzVWMTcuMDE0NUg1My43NzQ1VjIwLjY5MzlINjAuOTM1OFYxNy4wMTQ1SDU4LjUxNjlWMTMuNjIxMkg2MC45MzU4VjkuOTQ4NThINTMuNzc0NVYxMy42MjEyWiIgZmlsbD0iI0EzMTc0NiIvPg0KPHBhdGggZD0iTTUzLjc3NDMgMjAuNjkzNkg1MC4xOTAyVjI0LjI3NzdINTMuNzc0M1YyMC42OTM2WiIgZmlsbD0iI0EzMTc0NiIvPg0KPHBhdGggZD0iTTUzLjc3NDMgNi4zNjQ2OUg1MC4xOTAyVjkuOTQ4NzRINTMuNzc0M1Y2LjM2NDY5WiIgZmlsbD0iI0EzMTc0NiIvPg0KPHBhdGggZD0iTTY0LjUxOTcgNi4zNjQ2OUg2MC45MzU2VjkuOTQ4NzRINjQuNTE5N1Y2LjM2NDY5WiIgZmlsbD0iI0EzMTc0NiIvPg0KPHBhdGggZD0iTTg4LjQ5NzUgMzAuNzg1VjM0LjYyNzlIMS4zNjI3NlY1LjIxMjgySDQuMDI2OTVWMy44NTAwN0gwVjM1Ljk5MDdIODkuODYwMlYzMC43ODVIODguNDk3NVoiIGZpbGw9IiNBMzE3NDYiLz4NCjwvc3ZnPg0K";
|
|
338243
338379
|
;// ./src/assets/icons/pencil.svg
|
|
338244
|
-
|
|
338380
|
+
var pencil_path;
|
|
338381
|
+
function pencil_extends() { return pencil_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, pencil_extends.apply(null, arguments); }
|
|
338382
|
+
|
|
338383
|
+
function SvgPencil(props) {
|
|
338384
|
+
return /*#__PURE__*/external_react_.createElement("svg", pencil_extends({
|
|
338385
|
+
width: 24,
|
|
338386
|
+
height: 24,
|
|
338387
|
+
fill: "none",
|
|
338388
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
338389
|
+
}, props), pencil_path || (pencil_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
338390
|
+
d: "M5 19h1.4l8.625-8.625-1.4-1.4L5 17.6V19zM19.3 8.925l-4.25-4.2 1.4-1.4a1.92 1.92 0 011.413-.575 1.92 1.92 0 011.412.575l1.4 1.4c.383.383.583.846.6 1.388a1.806 1.806 0 01-.55 1.387L19.3 8.925zM17.85 10.4L7.25 21H3v-4.25l10.6-10.6 4.25 4.25zm-3.525-.725l-.7-.7 1.4 1.4-.7-.7z"
|
|
338391
|
+
})));
|
|
338392
|
+
}
|
|
338393
|
+
/* harmony default export */ const pencil = (SvgPencil);
|
|
338245
338394
|
;// ./node_modules/@raspberrypifoundation/design-system-react/dist/design-system-react.js
|
|
338246
338395
|
|
|
338247
338396
|
|
|
@@ -339641,7 +339790,7 @@ var ProjectName = _ref => {
|
|
|
339641
339790
|
className: "project-name__button",
|
|
339642
339791
|
"aria-label": t(isEditing ? "header.renameSave" : "header.renameProject"),
|
|
339643
339792
|
title: t(isEditing ? "header.renameSave" : "header.renameProject"),
|
|
339644
|
-
icon: isEditing ? /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
339793
|
+
icon: isEditing ? /*#__PURE__*/(0,jsx_runtime.jsx)(tick, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(pencil, {}),
|
|
339645
339794
|
onClick: isEditing ? updateName : onEditNameButtonClick,
|
|
339646
339795
|
type: isEditing ? "primary" : "tertiary"
|
|
339647
339796
|
})
|
|
@@ -339752,7 +339901,20 @@ var signUpEvent = webComponentCustomEvent("editor-signUp");
|
|
|
339752
339901
|
var quizReadyEvent = webComponentCustomEvent("editor-quizReady");
|
|
339753
339902
|
var themeUpdatedEvent = detail => webComponentCustomEvent("editor-themeUpdated", detail);
|
|
339754
339903
|
;// ./src/assets/icons/save.svg
|
|
339755
|
-
|
|
339904
|
+
var save_path;
|
|
339905
|
+
function save_extends() { return save_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, save_extends.apply(null, arguments); }
|
|
339906
|
+
|
|
339907
|
+
function SvgSave(props) {
|
|
339908
|
+
return /*#__PURE__*/external_react_.createElement("svg", save_extends({
|
|
339909
|
+
width: 24,
|
|
339910
|
+
height: 24,
|
|
339911
|
+
fill: "none",
|
|
339912
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
339913
|
+
}, props), save_path || (save_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
339914
|
+
d: "M3 21V3h14l4 4v14H3zm2-2h14V7.85L16.15 5H5v14zm7-1c.833 0 1.542-.292 2.125-.875A2.893 2.893 0 0015 15c0-.833-.292-1.542-.875-2.125A2.893 2.893 0 0012 12c-.833 0-1.542.292-2.125.875A2.893 2.893 0 009 15c0 .833.292 1.542.875 2.125A2.893 2.893 0 0012 18zm-6-8h9V6H6v4zm-1 9V5v14z"
|
|
339915
|
+
})));
|
|
339916
|
+
}
|
|
339917
|
+
/* harmony default export */ const save = (SvgSave);
|
|
339756
339918
|
;// ./src/components/SaveButton/SaveButton.jsx
|
|
339757
339919
|
|
|
339758
339920
|
|
|
@@ -339793,7 +339955,7 @@ var SaveButton = _ref => {
|
|
|
339793
339955
|
onClick: onClickSave,
|
|
339794
339956
|
text: t("header.save"),
|
|
339795
339957
|
textAlways: true,
|
|
339796
|
-
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
339958
|
+
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(save, {}),
|
|
339797
339959
|
type: buttonType,
|
|
339798
339960
|
fill: fill
|
|
339799
339961
|
});
|
|
@@ -339813,6 +339975,7 @@ var SaveButton = _ref => {
|
|
|
339813
339975
|
|
|
339814
339976
|
|
|
339815
339977
|
|
|
339978
|
+
|
|
339816
339979
|
var ProjectBar = _ref => {
|
|
339817
339980
|
var {
|
|
339818
339981
|
nameEditable = true
|
|
@@ -339826,7 +339989,11 @@ var ProjectBar = _ref => {
|
|
|
339826
339989
|
var readOnly = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.readOnly);
|
|
339827
339990
|
return loading === "success" && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
339828
339991
|
className: "project-bar",
|
|
339829
|
-
children: [
|
|
339992
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
339993
|
+
className: "textJam-logo",
|
|
339994
|
+
src: text_jam_logo_namespaceObject,
|
|
339995
|
+
alt: "TextJam logo"
|
|
339996
|
+
}), loading === "success" && /*#__PURE__*/(0,jsx_runtime.jsx)(ProjectName_ProjectName, {
|
|
339830
339997
|
editable: !readOnly && nameEditable,
|
|
339831
339998
|
isHeading: true
|
|
339832
339999
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
@@ -339836,7 +340003,7 @@ var ProjectBar = _ref => {
|
|
|
339836
340003
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton_DownloadButton, {
|
|
339837
340004
|
buttonText: t("header.download"),
|
|
339838
340005
|
className: "btn btn--tertiary project-bar__btn",
|
|
339839
|
-
Icon:
|
|
340006
|
+
Icon: download,
|
|
339840
340007
|
type: "tertiary"
|
|
339841
340008
|
})
|
|
339842
340009
|
}), loading === "success" && !readOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -339852,1638 +340019,86 @@ var ProjectBar = _ref => {
|
|
|
339852
340019
|
});
|
|
339853
340020
|
};
|
|
339854
340021
|
/* harmony default export */ const ProjectBar_ProjectBar = (ProjectBar);
|
|
339855
|
-
;// ./src/
|
|
339856
|
-
|
|
339857
|
-
|
|
339858
|
-
|
|
339859
|
-
_rollupPluginBabelHelpers_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
339860
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
339861
|
-
var source = arguments[i];
|
|
339862
|
-
for (var key in source) {
|
|
339863
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
339864
|
-
target[key] = source[key];
|
|
339865
|
-
}
|
|
339866
|
-
}
|
|
339867
|
-
}
|
|
339868
|
-
return target;
|
|
339869
|
-
};
|
|
339870
|
-
return _rollupPluginBabelHelpers_extends.apply(this, arguments);
|
|
339871
|
-
}
|
|
339872
|
-
function _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(source, excluded) {
|
|
339873
|
-
if (source == null) return {};
|
|
339874
|
-
var target = {};
|
|
339875
|
-
var sourceKeys = Object.keys(source);
|
|
339876
|
-
var key, i;
|
|
339877
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
339878
|
-
key = sourceKeys[i];
|
|
339879
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
339880
|
-
target[key] = source[key];
|
|
339881
|
-
}
|
|
339882
|
-
return target;
|
|
339883
|
-
}
|
|
339884
|
-
|
|
339885
|
-
|
|
339886
|
-
|
|
339887
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/utils/utils.js
|
|
339888
|
-
|
|
339889
|
-
|
|
339890
|
-
var isMenuOpen = function isMenuOpen(state) {
|
|
339891
|
-
return !!state && state[0] === 'o';
|
|
339892
|
-
};
|
|
339893
|
-
var batchedUpdates = external_react_dom_.unstable_batchedUpdates || function (callback) {
|
|
339894
|
-
return callback();
|
|
339895
|
-
};
|
|
339896
|
-
var values = Object.values || function (obj) {
|
|
339897
|
-
return Object.keys(obj).map(function (key) {
|
|
339898
|
-
return obj[key];
|
|
339899
|
-
});
|
|
339900
|
-
};
|
|
339901
|
-
var floatEqual = function floatEqual(a, b, diff) {
|
|
339902
|
-
if (diff === void 0) {
|
|
339903
|
-
diff = 0.0001;
|
|
339904
|
-
}
|
|
339905
|
-
return Math.abs(a - b) < diff;
|
|
339906
|
-
};
|
|
339907
|
-
var getTransition = function getTransition(transition, name) {
|
|
339908
|
-
return transition === true || !!(transition && transition[name]);
|
|
339909
|
-
};
|
|
339910
|
-
var safeCall = function safeCall(fn, arg) {
|
|
339911
|
-
return typeof fn === 'function' ? fn(arg) : fn;
|
|
339912
|
-
};
|
|
339913
|
-
var internalKey = '_szhsinMenu';
|
|
339914
|
-
var getName = function getName(component) {
|
|
339915
|
-
return component[internalKey];
|
|
339916
|
-
};
|
|
339917
|
-
var defineName = function defineName(name, component) {
|
|
339918
|
-
return Object.defineProperty(component, internalKey, {
|
|
339919
|
-
value: name
|
|
339920
|
-
});
|
|
339921
|
-
};
|
|
339922
|
-
var utils_mergeProps = function mergeProps(target, source) {
|
|
339923
|
-
source && Object.keys(source).forEach(function (key) {
|
|
339924
|
-
var targetProp = target[key];
|
|
339925
|
-
var sourceProp = source[key];
|
|
339926
|
-
if (typeof sourceProp === 'function' && targetProp) {
|
|
339927
|
-
target[key] = function () {
|
|
339928
|
-
sourceProp.apply(void 0, arguments);
|
|
339929
|
-
targetProp.apply(void 0, arguments);
|
|
339930
|
-
};
|
|
339931
|
-
} else {
|
|
339932
|
-
target[key] = sourceProp;
|
|
339933
|
-
}
|
|
339934
|
-
});
|
|
339935
|
-
return target;
|
|
339936
|
-
};
|
|
339937
|
-
var parsePadding = function parsePadding(paddingStr) {
|
|
339938
|
-
if (typeof paddingStr !== 'string') return {
|
|
339939
|
-
top: 0,
|
|
339940
|
-
right: 0,
|
|
339941
|
-
bottom: 0,
|
|
339942
|
-
left: 0
|
|
339943
|
-
};
|
|
339944
|
-
var padding = paddingStr.trim().split(/\s+/, 4).map(parseFloat);
|
|
339945
|
-
var top = !isNaN(padding[0]) ? padding[0] : 0;
|
|
339946
|
-
var right = !isNaN(padding[1]) ? padding[1] : top;
|
|
339947
|
-
return {
|
|
339948
|
-
top: top,
|
|
339949
|
-
right: right,
|
|
339950
|
-
bottom: !isNaN(padding[2]) ? padding[2] : top,
|
|
339951
|
-
left: !isNaN(padding[3]) ? padding[3] : right
|
|
339952
|
-
};
|
|
339953
|
-
};
|
|
339954
|
-
var getScrollAncestor = function getScrollAncestor(node) {
|
|
339955
|
-
while (node) {
|
|
339956
|
-
node = node.parentNode;
|
|
339957
|
-
if (!node || node === document.body || !node.parentNode) return;
|
|
339958
|
-
var _getComputedStyle = getComputedStyle(node),
|
|
339959
|
-
overflow = _getComputedStyle.overflow,
|
|
339960
|
-
overflowX = _getComputedStyle.overflowX,
|
|
339961
|
-
overflowY = _getComputedStyle.overflowY;
|
|
339962
|
-
if (/auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX)) return node;
|
|
339963
|
-
}
|
|
339964
|
-
};
|
|
339965
|
-
function commonProps(isDisabled, isHovering) {
|
|
339966
|
-
return {
|
|
339967
|
-
'aria-disabled': isDisabled || undefined,
|
|
339968
|
-
tabIndex: isHovering ? 0 : -1
|
|
339969
|
-
};
|
|
339970
|
-
}
|
|
339971
|
-
function indexOfNode(nodeList, node) {
|
|
339972
|
-
for (var i = 0; i < nodeList.length; i++) {
|
|
339973
|
-
if (nodeList[i] === node) return i;
|
|
339974
|
-
}
|
|
339975
|
-
return -1;
|
|
339976
|
-
}
|
|
339977
|
-
|
|
339978
|
-
|
|
339979
|
-
|
|
339980
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useBEM.js
|
|
339981
|
-
|
|
339982
|
-
|
|
339983
|
-
var useBEM = function useBEM(_ref) {
|
|
339984
|
-
var block = _ref.block,
|
|
339985
|
-
element = _ref.element,
|
|
339986
|
-
modifiers = _ref.modifiers,
|
|
339987
|
-
className = _ref.className;
|
|
339988
|
-
return (0,external_react_.useMemo)(function () {
|
|
339989
|
-
var blockElement = element ? block + "__" + element : block;
|
|
339990
|
-
var classString = blockElement;
|
|
339991
|
-
modifiers && Object.keys(modifiers).forEach(function (name) {
|
|
339992
|
-
var value = modifiers[name];
|
|
339993
|
-
if (value) classString += " " + blockElement + "--" + (value === true ? name : name + "-" + value);
|
|
339994
|
-
});
|
|
339995
|
-
var expandedClassName = typeof className === 'function' ? className(modifiers) : className;
|
|
339996
|
-
if (typeof expandedClassName === 'string') {
|
|
339997
|
-
expandedClassName = expandedClassName.trim();
|
|
339998
|
-
if (expandedClassName) classString += " " + expandedClassName;
|
|
339999
|
-
}
|
|
340000
|
-
return classString;
|
|
340001
|
-
}, [block, element, modifiers, className]);
|
|
340002
|
-
};
|
|
340003
|
-
|
|
340004
|
-
|
|
340005
|
-
|
|
340006
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/utils/constants.js
|
|
340007
|
-
|
|
340008
|
-
|
|
340009
|
-
var menuContainerClass = 'szh-menu-container';
|
|
340010
|
-
var menuClass = 'szh-menu';
|
|
340011
|
-
var menuButtonClass = 'szh-menu-button';
|
|
340012
|
-
var menuArrowClass = 'arrow';
|
|
340013
|
-
var menuItemClass = 'item';
|
|
340014
|
-
var menuDividerClass = 'divider';
|
|
340015
|
-
var menuHeaderClass = 'header';
|
|
340016
|
-
var menuGroupClass = 'group';
|
|
340017
|
-
var subMenuClass = 'submenu';
|
|
340018
|
-
var radioGroupClass = 'radio-group';
|
|
340019
|
-
var HoverItemContext = /*#__PURE__*/(0,external_react_.createContext)();
|
|
340020
|
-
var MenuListItemContext = /*#__PURE__*/(0,external_react_.createContext)({});
|
|
340021
|
-
var MenuListContext = /*#__PURE__*/(0,external_react_.createContext)({});
|
|
340022
|
-
var EventHandlersContext = /*#__PURE__*/(0,external_react_.createContext)({});
|
|
340023
|
-
var RadioGroupContext = /*#__PURE__*/(0,external_react_.createContext)({});
|
|
340024
|
-
var constants_SettingsContext = /*#__PURE__*/(0,external_react_.createContext)({});
|
|
340025
|
-
var Keys = /*#__PURE__*/Object.freeze({
|
|
340026
|
-
ENTER: 'Enter',
|
|
340027
|
-
ESC: 'Escape',
|
|
340028
|
-
SPACE: ' ',
|
|
340029
|
-
HOME: 'Home',
|
|
340030
|
-
END: 'End',
|
|
340031
|
-
LEFT: 'ArrowLeft',
|
|
340032
|
-
RIGHT: 'ArrowRight',
|
|
340033
|
-
UP: 'ArrowUp',
|
|
340034
|
-
DOWN: 'ArrowDown'
|
|
340035
|
-
});
|
|
340036
|
-
var HoverActionTypes = /*#__PURE__*/Object.freeze({
|
|
340037
|
-
RESET: 0,
|
|
340038
|
-
SET: 1,
|
|
340039
|
-
UNSET: 2,
|
|
340040
|
-
INCREASE: 3,
|
|
340041
|
-
DECREASE: 4,
|
|
340042
|
-
FIRST: 5,
|
|
340043
|
-
LAST: 6,
|
|
340044
|
-
SET_INDEX: 7
|
|
340045
|
-
});
|
|
340046
|
-
var CloseReason = /*#__PURE__*/Object.freeze({
|
|
340047
|
-
CLICK: 'click',
|
|
340048
|
-
CANCEL: 'cancel',
|
|
340049
|
-
BLUR: 'blur',
|
|
340050
|
-
SCROLL: 'scroll'
|
|
340051
|
-
});
|
|
340052
|
-
var FocusPositions = /*#__PURE__*/Object.freeze({
|
|
340053
|
-
FIRST: 'first',
|
|
340054
|
-
LAST: 'last'
|
|
340055
|
-
});
|
|
340056
|
-
var MenuStateMap = /*#__PURE__*/Object.freeze({
|
|
340057
|
-
entering: 'opening',
|
|
340058
|
-
entered: 'open',
|
|
340059
|
-
exiting: 'closing',
|
|
340060
|
-
exited: 'closed'
|
|
340061
|
-
});
|
|
340062
|
-
var positionAbsolute = 'absolute';
|
|
340063
|
-
var roleNone = 'presentation';
|
|
340064
|
-
var roleMenuitem = 'menuitem';
|
|
340065
|
-
var dummyItemProps = {
|
|
340066
|
-
'aria-hidden': true,
|
|
340067
|
-
role: roleMenuitem
|
|
340068
|
-
};
|
|
340069
|
-
|
|
340070
|
-
|
|
340071
|
-
|
|
340072
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/components/MenuContainer.js
|
|
340073
|
-
|
|
340074
|
-
|
|
340075
|
-
|
|
340076
|
-
|
|
340077
|
-
|
|
340078
|
-
|
|
340079
|
-
|
|
340080
|
-
var MenuContainer = function MenuContainer(_ref) {
|
|
340081
|
-
var className = _ref.className,
|
|
340082
|
-
containerRef = _ref.containerRef,
|
|
340083
|
-
containerProps = _ref.containerProps,
|
|
340084
|
-
children = _ref.children,
|
|
340085
|
-
isOpen = _ref.isOpen,
|
|
340086
|
-
skipOpen = _ref.skipOpen,
|
|
340087
|
-
theming = _ref.theming,
|
|
340088
|
-
transition = _ref.transition,
|
|
340089
|
-
onClose = _ref.onClose;
|
|
340090
|
-
var itemTransition = getTransition(transition, 'item');
|
|
340091
|
-
var onKeyDown = function onKeyDown(_ref2) {
|
|
340092
|
-
var key = _ref2.key;
|
|
340093
|
-
switch (key) {
|
|
340094
|
-
case Keys.ESC:
|
|
340095
|
-
safeCall(onClose, {
|
|
340096
|
-
key: key,
|
|
340097
|
-
reason: CloseReason.CANCEL
|
|
340098
|
-
});
|
|
340099
|
-
break;
|
|
340100
|
-
}
|
|
340101
|
-
};
|
|
340102
|
-
var onBlur = function onBlur(e) {
|
|
340103
|
-
if (isOpen && !e.currentTarget.contains(e.relatedTarget || document.activeElement)) {
|
|
340104
|
-
safeCall(onClose, {
|
|
340105
|
-
reason: CloseReason.BLUR
|
|
340106
|
-
});
|
|
340107
|
-
if (skipOpen) {
|
|
340108
|
-
skipOpen.current = true;
|
|
340109
|
-
setTimeout(function () {
|
|
340110
|
-
return skipOpen.current = false;
|
|
340111
|
-
}, 300);
|
|
340112
|
-
}
|
|
340113
|
-
}
|
|
340114
|
-
};
|
|
340115
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _rollupPluginBabelHelpers_extends({}, utils_mergeProps({
|
|
340116
|
-
onKeyDown: onKeyDown,
|
|
340117
|
-
onBlur: onBlur
|
|
340118
|
-
}, containerProps), {
|
|
340119
|
-
className: useBEM({
|
|
340120
|
-
block: menuContainerClass,
|
|
340121
|
-
modifiers: (0,external_react_.useMemo)(function () {
|
|
340122
|
-
return {
|
|
340123
|
-
theme: theming,
|
|
340124
|
-
itemTransition: itemTransition
|
|
340125
|
-
};
|
|
340126
|
-
}, [theming, itemTransition]),
|
|
340127
|
-
className: className
|
|
340128
|
-
}),
|
|
340129
|
-
style: _rollupPluginBabelHelpers_extends({
|
|
340130
|
-
position: 'absolute'
|
|
340131
|
-
}, containerProps == null ? void 0 : containerProps.style),
|
|
340132
|
-
ref: containerRef,
|
|
340133
|
-
children: children
|
|
340134
|
-
}));
|
|
340135
|
-
};
|
|
340136
|
-
|
|
340137
|
-
|
|
340138
|
-
|
|
340139
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/utils/submenuCtx.js
|
|
340140
|
-
var createSubmenuCtx = function createSubmenuCtx() {
|
|
340141
|
-
var timer,
|
|
340142
|
-
count = 0;
|
|
340143
|
-
return {
|
|
340144
|
-
toggle: function toggle(isOpen) {
|
|
340145
|
-
isOpen ? count++ : count--;
|
|
340146
|
-
count = Math.max(count, 0);
|
|
340147
|
-
},
|
|
340148
|
-
on: function on(closeDelay, pending, settled) {
|
|
340149
|
-
if (count) {
|
|
340150
|
-
if (!timer) timer = setTimeout(function () {
|
|
340151
|
-
timer = 0;
|
|
340152
|
-
pending();
|
|
340153
|
-
}, closeDelay);
|
|
340154
|
-
} else {
|
|
340155
|
-
settled == null ? void 0 : settled();
|
|
340156
|
-
}
|
|
340157
|
-
},
|
|
340158
|
-
off: function off() {
|
|
340159
|
-
if (timer) {
|
|
340160
|
-
clearTimeout(timer);
|
|
340161
|
-
timer = 0;
|
|
340162
|
-
}
|
|
340163
|
-
}
|
|
340164
|
-
};
|
|
340165
|
-
};
|
|
340166
|
-
|
|
340167
|
-
|
|
340168
|
-
|
|
340169
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useItems.js
|
|
340170
|
-
|
|
340171
|
-
|
|
340172
|
-
|
|
340173
|
-
|
|
340174
|
-
var useItems = function useItems(menuRef, focusRef) {
|
|
340175
|
-
var _useState = (0,external_react_.useState)(),
|
|
340176
|
-
hoverItem = _useState[0],
|
|
340177
|
-
setHoverItem = _useState[1];
|
|
340178
|
-
var stateRef = (0,external_react_.useRef)({
|
|
340179
|
-
items: [],
|
|
340180
|
-
hoverIndex: -1,
|
|
340181
|
-
sorted: false
|
|
340182
|
-
});
|
|
340183
|
-
var mutableState = stateRef.current;
|
|
340184
|
-
var updateItems = (0,external_react_.useCallback)(function (item, isMounted) {
|
|
340185
|
-
var items = mutableState.items;
|
|
340186
|
-
if (!item) {
|
|
340187
|
-
mutableState.items = [];
|
|
340188
|
-
} else if (isMounted) {
|
|
340189
|
-
items.push(item);
|
|
340190
|
-
} else {
|
|
340191
|
-
var index = items.indexOf(item);
|
|
340192
|
-
if (index > -1) {
|
|
340193
|
-
items.splice(index, 1);
|
|
340194
|
-
if (item.contains(document.activeElement)) {
|
|
340195
|
-
focusRef.current.focus();
|
|
340196
|
-
setHoverItem();
|
|
340197
|
-
}
|
|
340198
|
-
}
|
|
340199
|
-
}
|
|
340200
|
-
mutableState.hoverIndex = -1;
|
|
340201
|
-
mutableState.sorted = false;
|
|
340202
|
-
}, [mutableState, focusRef]);
|
|
340203
|
-
var dispatch = (0,external_react_.useCallback)(function (actionType, item, nextIndex) {
|
|
340204
|
-
var items = mutableState.items,
|
|
340205
|
-
hoverIndex = mutableState.hoverIndex;
|
|
340206
|
-
var sortItems = function sortItems() {
|
|
340207
|
-
if (mutableState.sorted) return;
|
|
340208
|
-
var orderedNodes = menuRef.current.querySelectorAll('.szh-menu__item');
|
|
340209
|
-
items.sort(function (a, b) {
|
|
340210
|
-
return indexOfNode(orderedNodes, a) - indexOfNode(orderedNodes, b);
|
|
340211
|
-
});
|
|
340212
|
-
mutableState.sorted = true;
|
|
340213
|
-
};
|
|
340214
|
-
var index = -1,
|
|
340215
|
-
newItem = undefined;
|
|
340216
|
-
switch (actionType) {
|
|
340217
|
-
case HoverActionTypes.RESET:
|
|
340218
|
-
break;
|
|
340219
|
-
case HoverActionTypes.SET:
|
|
340220
|
-
newItem = item;
|
|
340221
|
-
break;
|
|
340222
|
-
case HoverActionTypes.UNSET:
|
|
340223
|
-
newItem = function newItem(prevItem) {
|
|
340224
|
-
return prevItem === item ? undefined : prevItem;
|
|
340225
|
-
};
|
|
340226
|
-
break;
|
|
340227
|
-
case HoverActionTypes.FIRST:
|
|
340228
|
-
sortItems();
|
|
340229
|
-
index = 0;
|
|
340230
|
-
newItem = items[index];
|
|
340231
|
-
break;
|
|
340232
|
-
case HoverActionTypes.LAST:
|
|
340233
|
-
sortItems();
|
|
340234
|
-
index = items.length - 1;
|
|
340235
|
-
newItem = items[index];
|
|
340236
|
-
break;
|
|
340237
|
-
case HoverActionTypes.SET_INDEX:
|
|
340238
|
-
sortItems();
|
|
340239
|
-
index = nextIndex;
|
|
340240
|
-
newItem = items[index];
|
|
340241
|
-
break;
|
|
340242
|
-
case HoverActionTypes.INCREASE:
|
|
340243
|
-
sortItems();
|
|
340244
|
-
index = hoverIndex;
|
|
340245
|
-
if (index < 0) index = items.indexOf(item);
|
|
340246
|
-
index++;
|
|
340247
|
-
if (index >= items.length) index = 0;
|
|
340248
|
-
newItem = items[index];
|
|
340249
|
-
break;
|
|
340250
|
-
case HoverActionTypes.DECREASE:
|
|
340251
|
-
sortItems();
|
|
340252
|
-
index = hoverIndex;
|
|
340253
|
-
if (index < 0) index = items.indexOf(item);
|
|
340254
|
-
index--;
|
|
340255
|
-
if (index < 0) index = items.length - 1;
|
|
340256
|
-
newItem = items[index];
|
|
340257
|
-
break;
|
|
340258
|
-
default:
|
|
340259
|
-
if (false) {}
|
|
340260
|
-
}
|
|
340261
|
-
if (!newItem) index = -1;
|
|
340262
|
-
setHoverItem(newItem);
|
|
340263
|
-
mutableState.hoverIndex = index;
|
|
340264
|
-
}, [menuRef, mutableState]);
|
|
340265
|
-
return {
|
|
340266
|
-
hoverItem: hoverItem,
|
|
340267
|
-
dispatch: dispatch,
|
|
340268
|
-
updateItems: updateItems
|
|
340269
|
-
};
|
|
340270
|
-
};
|
|
340271
|
-
|
|
340272
|
-
|
|
340273
|
-
|
|
340274
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/getPositionHelpers.js
|
|
340275
|
-
|
|
340276
|
-
|
|
340277
|
-
var getPositionHelpers = function getPositionHelpers(containerRef, menuRef, menuScroll, boundingBoxPadding) {
|
|
340278
|
-
var menuRect = menuRef.current.getBoundingClientRect();
|
|
340279
|
-
var containerRect = containerRef.current.getBoundingClientRect();
|
|
340280
|
-
var boundingRect = menuScroll === window ? {
|
|
340281
|
-
left: 0,
|
|
340282
|
-
top: 0,
|
|
340283
|
-
right: document.documentElement.clientWidth,
|
|
340284
|
-
bottom: window.innerHeight
|
|
340285
|
-
} : menuScroll.getBoundingClientRect();
|
|
340286
|
-
var padding = parsePadding(boundingBoxPadding);
|
|
340287
|
-
var getLeftOverflow = function getLeftOverflow(x) {
|
|
340288
|
-
return x + containerRect.left - boundingRect.left - padding.left;
|
|
340289
|
-
};
|
|
340290
|
-
var getRightOverflow = function getRightOverflow(x) {
|
|
340291
|
-
return x + containerRect.left + menuRect.width - boundingRect.right + padding.right;
|
|
340292
|
-
};
|
|
340293
|
-
var getTopOverflow = function getTopOverflow(y) {
|
|
340294
|
-
return y + containerRect.top - boundingRect.top - padding.top;
|
|
340295
|
-
};
|
|
340296
|
-
var getBottomOverflow = function getBottomOverflow(y) {
|
|
340297
|
-
return y + containerRect.top + menuRect.height - boundingRect.bottom + padding.bottom;
|
|
340298
|
-
};
|
|
340299
|
-
var confineHorizontally = function confineHorizontally(x) {
|
|
340300
|
-
var leftOverflow = getLeftOverflow(x);
|
|
340301
|
-
if (leftOverflow < 0) {
|
|
340302
|
-
x -= leftOverflow;
|
|
340303
|
-
} else {
|
|
340304
|
-
var rightOverflow = getRightOverflow(x);
|
|
340305
|
-
if (rightOverflow > 0) {
|
|
340306
|
-
x -= rightOverflow;
|
|
340307
|
-
leftOverflow = getLeftOverflow(x);
|
|
340308
|
-
if (leftOverflow < 0) x -= leftOverflow;
|
|
340309
|
-
}
|
|
340310
|
-
}
|
|
340311
|
-
return x;
|
|
340312
|
-
};
|
|
340313
|
-
var confineVertically = function confineVertically(y) {
|
|
340314
|
-
var topOverflow = getTopOverflow(y);
|
|
340315
|
-
if (topOverflow < 0) {
|
|
340316
|
-
y -= topOverflow;
|
|
340317
|
-
} else {
|
|
340318
|
-
var bottomOverflow = getBottomOverflow(y);
|
|
340319
|
-
if (bottomOverflow > 0) {
|
|
340320
|
-
y -= bottomOverflow;
|
|
340321
|
-
topOverflow = getTopOverflow(y);
|
|
340322
|
-
if (topOverflow < 0) y -= topOverflow;
|
|
340323
|
-
}
|
|
340324
|
-
}
|
|
340325
|
-
return y;
|
|
340326
|
-
};
|
|
340327
|
-
return {
|
|
340328
|
-
menuRect: menuRect,
|
|
340329
|
-
containerRect: containerRect,
|
|
340330
|
-
getLeftOverflow: getLeftOverflow,
|
|
340331
|
-
getRightOverflow: getRightOverflow,
|
|
340332
|
-
getTopOverflow: getTopOverflow,
|
|
340333
|
-
getBottomOverflow: getBottomOverflow,
|
|
340334
|
-
confineHorizontally: confineHorizontally,
|
|
340335
|
-
confineVertically: confineVertically
|
|
340336
|
-
};
|
|
340337
|
-
};
|
|
340338
|
-
|
|
340339
|
-
|
|
340340
|
-
|
|
340341
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/placeArrowVertical.js
|
|
340342
|
-
var placeArrowVertical = function placeArrowVertical(_ref) {
|
|
340343
|
-
var arrowRef = _ref.arrowRef,
|
|
340344
|
-
menuY = _ref.menuY,
|
|
340345
|
-
anchorRect = _ref.anchorRect,
|
|
340346
|
-
containerRect = _ref.containerRect,
|
|
340347
|
-
menuRect = _ref.menuRect;
|
|
340348
|
-
var y = anchorRect.top - containerRect.top - menuY + anchorRect.height / 2;
|
|
340349
|
-
var offset = arrowRef.current.offsetHeight * 1.25;
|
|
340350
|
-
y = Math.max(offset, y);
|
|
340351
|
-
y = Math.min(y, menuRect.height - offset);
|
|
340352
|
-
return y;
|
|
340353
|
-
};
|
|
340354
|
-
|
|
340355
|
-
|
|
340356
|
-
|
|
340357
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/placeLeftorRight.js
|
|
340358
|
-
|
|
340359
|
-
|
|
340360
|
-
var placeLeftorRight = function placeLeftorRight(_ref) {
|
|
340361
|
-
var anchorRect = _ref.anchorRect,
|
|
340362
|
-
containerRect = _ref.containerRect,
|
|
340363
|
-
menuRect = _ref.menuRect,
|
|
340364
|
-
placeLeftorRightY = _ref.placeLeftorRightY,
|
|
340365
|
-
placeLeftX = _ref.placeLeftX,
|
|
340366
|
-
placeRightX = _ref.placeRightX,
|
|
340367
|
-
getLeftOverflow = _ref.getLeftOverflow,
|
|
340368
|
-
getRightOverflow = _ref.getRightOverflow,
|
|
340369
|
-
confineHorizontally = _ref.confineHorizontally,
|
|
340370
|
-
confineVertically = _ref.confineVertically,
|
|
340371
|
-
arrowRef = _ref.arrowRef,
|
|
340372
|
-
arrow = _ref.arrow,
|
|
340373
|
-
direction = _ref.direction,
|
|
340374
|
-
position = _ref.position;
|
|
340375
|
-
var computedDirection = direction;
|
|
340376
|
-
var y = placeLeftorRightY;
|
|
340377
|
-
if (position !== 'initial') {
|
|
340378
|
-
y = confineVertically(y);
|
|
340379
|
-
if (position === 'anchor') {
|
|
340380
|
-
y = Math.min(y, anchorRect.bottom - containerRect.top);
|
|
340381
|
-
y = Math.max(y, anchorRect.top - containerRect.top - menuRect.height);
|
|
340382
|
-
}
|
|
340383
|
-
}
|
|
340384
|
-
var x, leftOverflow, rightOverflow;
|
|
340385
|
-
if (computedDirection === 'left') {
|
|
340386
|
-
x = placeLeftX;
|
|
340387
|
-
if (position !== 'initial') {
|
|
340388
|
-
leftOverflow = getLeftOverflow(x);
|
|
340389
|
-
if (leftOverflow < 0) {
|
|
340390
|
-
rightOverflow = getRightOverflow(placeRightX);
|
|
340391
|
-
if (rightOverflow <= 0 || -leftOverflow > rightOverflow) {
|
|
340392
|
-
x = placeRightX;
|
|
340393
|
-
computedDirection = 'right';
|
|
340394
|
-
}
|
|
340395
|
-
}
|
|
340396
|
-
}
|
|
340397
|
-
} else {
|
|
340398
|
-
x = placeRightX;
|
|
340399
|
-
if (position !== 'initial') {
|
|
340400
|
-
rightOverflow = getRightOverflow(x);
|
|
340401
|
-
if (rightOverflow > 0) {
|
|
340402
|
-
leftOverflow = getLeftOverflow(placeLeftX);
|
|
340403
|
-
if (leftOverflow >= 0 || -leftOverflow < rightOverflow) {
|
|
340404
|
-
x = placeLeftX;
|
|
340405
|
-
computedDirection = 'left';
|
|
340406
|
-
}
|
|
340407
|
-
}
|
|
340408
|
-
}
|
|
340409
|
-
}
|
|
340410
|
-
if (position === 'auto') x = confineHorizontally(x);
|
|
340411
|
-
var arrowY = arrow ? placeArrowVertical({
|
|
340412
|
-
menuY: y,
|
|
340413
|
-
arrowRef: arrowRef,
|
|
340414
|
-
anchorRect: anchorRect,
|
|
340415
|
-
containerRect: containerRect,
|
|
340416
|
-
menuRect: menuRect
|
|
340417
|
-
}) : undefined;
|
|
340418
|
-
return {
|
|
340419
|
-
arrowY: arrowY,
|
|
340420
|
-
x: x,
|
|
340421
|
-
y: y,
|
|
340422
|
-
computedDirection: computedDirection
|
|
340423
|
-
};
|
|
340424
|
-
};
|
|
340425
|
-
|
|
340426
|
-
|
|
340427
|
-
|
|
340428
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/placeArrowHorizontal.js
|
|
340429
|
-
var placeArrowHorizontal = function placeArrowHorizontal(_ref) {
|
|
340430
|
-
var arrowRef = _ref.arrowRef,
|
|
340431
|
-
menuX = _ref.menuX,
|
|
340432
|
-
anchorRect = _ref.anchorRect,
|
|
340433
|
-
containerRect = _ref.containerRect,
|
|
340434
|
-
menuRect = _ref.menuRect;
|
|
340435
|
-
var x = anchorRect.left - containerRect.left - menuX + anchorRect.width / 2;
|
|
340436
|
-
var offset = arrowRef.current.offsetWidth * 1.25;
|
|
340437
|
-
x = Math.max(offset, x);
|
|
340438
|
-
x = Math.min(x, menuRect.width - offset);
|
|
340439
|
-
return x;
|
|
340440
|
-
};
|
|
340441
|
-
|
|
340442
|
-
|
|
340443
|
-
|
|
340444
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/placeToporBottom.js
|
|
340445
|
-
|
|
340446
|
-
|
|
340447
|
-
var placeToporBottom = function placeToporBottom(_ref) {
|
|
340448
|
-
var anchorRect = _ref.anchorRect,
|
|
340449
|
-
containerRect = _ref.containerRect,
|
|
340450
|
-
menuRect = _ref.menuRect,
|
|
340451
|
-
placeToporBottomX = _ref.placeToporBottomX,
|
|
340452
|
-
placeTopY = _ref.placeTopY,
|
|
340453
|
-
placeBottomY = _ref.placeBottomY,
|
|
340454
|
-
getTopOverflow = _ref.getTopOverflow,
|
|
340455
|
-
getBottomOverflow = _ref.getBottomOverflow,
|
|
340456
|
-
confineHorizontally = _ref.confineHorizontally,
|
|
340457
|
-
confineVertically = _ref.confineVertically,
|
|
340458
|
-
arrowRef = _ref.arrowRef,
|
|
340459
|
-
arrow = _ref.arrow,
|
|
340460
|
-
direction = _ref.direction,
|
|
340461
|
-
position = _ref.position;
|
|
340462
|
-
var computedDirection = direction === 'top' ? 'top' : 'bottom';
|
|
340463
|
-
var x = placeToporBottomX;
|
|
340464
|
-
if (position !== 'initial') {
|
|
340465
|
-
x = confineHorizontally(x);
|
|
340466
|
-
if (position === 'anchor') {
|
|
340467
|
-
x = Math.min(x, anchorRect.right - containerRect.left);
|
|
340468
|
-
x = Math.max(x, anchorRect.left - containerRect.left - menuRect.width);
|
|
340469
|
-
}
|
|
340470
|
-
}
|
|
340471
|
-
var y, topOverflow, bottomOverflow;
|
|
340472
|
-
if (computedDirection === 'top') {
|
|
340473
|
-
y = placeTopY;
|
|
340474
|
-
if (position !== 'initial') {
|
|
340475
|
-
topOverflow = getTopOverflow(y);
|
|
340476
|
-
if (topOverflow < 0) {
|
|
340477
|
-
bottomOverflow = getBottomOverflow(placeBottomY);
|
|
340478
|
-
if (bottomOverflow <= 0 || -topOverflow > bottomOverflow) {
|
|
340479
|
-
y = placeBottomY;
|
|
340480
|
-
computedDirection = 'bottom';
|
|
340481
|
-
}
|
|
340482
|
-
}
|
|
340483
|
-
}
|
|
340484
|
-
} else {
|
|
340485
|
-
y = placeBottomY;
|
|
340486
|
-
if (position !== 'initial') {
|
|
340487
|
-
bottomOverflow = getBottomOverflow(y);
|
|
340488
|
-
if (bottomOverflow > 0) {
|
|
340489
|
-
topOverflow = getTopOverflow(placeTopY);
|
|
340490
|
-
if (topOverflow >= 0 || -topOverflow < bottomOverflow) {
|
|
340491
|
-
y = placeTopY;
|
|
340492
|
-
computedDirection = 'top';
|
|
340493
|
-
}
|
|
340494
|
-
}
|
|
340495
|
-
}
|
|
340496
|
-
}
|
|
340497
|
-
if (position === 'auto') y = confineVertically(y);
|
|
340498
|
-
var arrowX = arrow ? placeArrowHorizontal({
|
|
340499
|
-
menuX: x,
|
|
340500
|
-
arrowRef: arrowRef,
|
|
340501
|
-
anchorRect: anchorRect,
|
|
340502
|
-
containerRect: containerRect,
|
|
340503
|
-
menuRect: menuRect
|
|
340504
|
-
}) : undefined;
|
|
340505
|
-
return {
|
|
340506
|
-
arrowX: arrowX,
|
|
340507
|
-
x: x,
|
|
340508
|
-
y: y,
|
|
340509
|
-
computedDirection: computedDirection
|
|
340510
|
-
};
|
|
340511
|
-
};
|
|
340512
|
-
|
|
340513
|
-
|
|
340514
|
-
|
|
340515
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/positionMenu.js
|
|
340516
|
-
|
|
340517
|
-
|
|
340518
|
-
|
|
340519
|
-
|
|
340520
|
-
var positionMenu = function positionMenu(_ref) {
|
|
340521
|
-
var arrow = _ref.arrow,
|
|
340522
|
-
align = _ref.align,
|
|
340523
|
-
direction = _ref.direction,
|
|
340524
|
-
offsetX = _ref.offsetX,
|
|
340525
|
-
offsetY = _ref.offsetY,
|
|
340526
|
-
position = _ref.position,
|
|
340527
|
-
anchorRect = _ref.anchorRect,
|
|
340528
|
-
arrowRef = _ref.arrowRef,
|
|
340529
|
-
positionHelpers = _ref.positionHelpers;
|
|
340530
|
-
var menuRect = positionHelpers.menuRect,
|
|
340531
|
-
containerRect = positionHelpers.containerRect;
|
|
340532
|
-
var horizontalOffset = offsetX;
|
|
340533
|
-
var verticalOffset = offsetY;
|
|
340534
|
-
if (arrow) {
|
|
340535
|
-
if (direction === 'left' || direction === 'right') {
|
|
340536
|
-
horizontalOffset += arrowRef.current.offsetWidth;
|
|
340537
|
-
} else {
|
|
340538
|
-
verticalOffset += arrowRef.current.offsetHeight;
|
|
340539
|
-
}
|
|
340540
|
-
}
|
|
340541
|
-
var placeLeftX = anchorRect.left - containerRect.left - menuRect.width - horizontalOffset;
|
|
340542
|
-
var placeRightX = anchorRect.right - containerRect.left + horizontalOffset;
|
|
340543
|
-
var placeTopY = anchorRect.top - containerRect.top - menuRect.height - verticalOffset;
|
|
340544
|
-
var placeBottomY = anchorRect.bottom - containerRect.top + verticalOffset;
|
|
340545
|
-
var placeToporBottomX, placeLeftorRightY;
|
|
340546
|
-
if (align === 'end') {
|
|
340547
|
-
placeToporBottomX = anchorRect.right - containerRect.left - menuRect.width;
|
|
340548
|
-
placeLeftorRightY = anchorRect.bottom - containerRect.top - menuRect.height;
|
|
340549
|
-
} else if (align === 'center') {
|
|
340550
|
-
placeToporBottomX = anchorRect.left - containerRect.left - (menuRect.width - anchorRect.width) / 2;
|
|
340551
|
-
placeLeftorRightY = anchorRect.top - containerRect.top - (menuRect.height - anchorRect.height) / 2;
|
|
340552
|
-
} else {
|
|
340553
|
-
placeToporBottomX = anchorRect.left - containerRect.left;
|
|
340554
|
-
placeLeftorRightY = anchorRect.top - containerRect.top;
|
|
340555
|
-
}
|
|
340556
|
-
placeToporBottomX += horizontalOffset;
|
|
340557
|
-
placeLeftorRightY += verticalOffset;
|
|
340558
|
-
var options = _rollupPluginBabelHelpers_extends({}, positionHelpers, {
|
|
340559
|
-
anchorRect: anchorRect,
|
|
340560
|
-
placeLeftX: placeLeftX,
|
|
340561
|
-
placeRightX: placeRightX,
|
|
340562
|
-
placeLeftorRightY: placeLeftorRightY,
|
|
340563
|
-
placeTopY: placeTopY,
|
|
340564
|
-
placeBottomY: placeBottomY,
|
|
340565
|
-
placeToporBottomX: placeToporBottomX,
|
|
340566
|
-
arrowRef: arrowRef,
|
|
340567
|
-
arrow: arrow,
|
|
340568
|
-
direction: direction,
|
|
340569
|
-
position: position
|
|
340570
|
-
});
|
|
340571
|
-
switch (direction) {
|
|
340572
|
-
case 'left':
|
|
340573
|
-
case 'right':
|
|
340574
|
-
return placeLeftorRight(options);
|
|
340575
|
-
case 'top':
|
|
340576
|
-
case 'bottom':
|
|
340577
|
-
default:
|
|
340578
|
-
return placeToporBottom(options);
|
|
340579
|
-
}
|
|
340580
|
-
};
|
|
340581
|
-
|
|
340582
|
-
|
|
340583
|
-
|
|
340584
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useIsomorphicLayoutEffect.js
|
|
340585
|
-
|
|
340586
|
-
|
|
340587
|
-
var useIsomorphicLayoutEffect_useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? external_react_.useLayoutEffect : external_react_.useEffect;
|
|
340588
|
-
|
|
340589
|
-
|
|
340590
|
-
|
|
340591
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useCombinedRef.js
|
|
340592
|
-
|
|
340593
|
-
|
|
340594
|
-
function setRef(ref, instance) {
|
|
340595
|
-
typeof ref === 'function' ? ref(instance) : ref.current = instance;
|
|
340596
|
-
}
|
|
340597
|
-
var useCombinedRef = function useCombinedRef(refA, refB) {
|
|
340598
|
-
return (0,external_react_.useMemo)(function () {
|
|
340599
|
-
if (!refA) return refB;
|
|
340600
|
-
if (!refB) return refA;
|
|
340601
|
-
return function (instance) {
|
|
340602
|
-
setRef(refA, instance);
|
|
340603
|
-
setRef(refB, instance);
|
|
340604
|
-
};
|
|
340605
|
-
}, [refA, refB]);
|
|
340606
|
-
};
|
|
340607
|
-
|
|
340608
|
-
|
|
340609
|
-
|
|
340610
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/components/MenuList.js
|
|
340611
|
-
|
|
340612
|
-
|
|
340613
|
-
|
|
340614
|
-
|
|
340615
|
-
|
|
340616
|
-
|
|
340617
|
-
|
|
340618
|
-
|
|
340619
|
-
|
|
340620
|
-
|
|
340022
|
+
;// ./src/components/Menus/Sidebar/styles.module.scss
|
|
340023
|
+
// extracted by mini-css-extract-plugin
|
|
340024
|
+
/* harmony default export */ const Sidebar_styles_module = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","sidebar":"styles-module__sidebar--Fu5Qi","mobile":"styles-module__mobile--WIsuV","react-tabs":"styles-module__react-tabs--MIiIF","react-tabs__tab-list":"styles-module__react-tabs__tab-list--h1azo","gwcLogo":"styles-module__gwcLogo--o2p4A","bar":"styles-module__bar--fOlLf","optionsTop":"styles-module__optionsTop--2jNbs","optionsBottom":"styles-module__optionsBottom--PtwF4","option":"styles-module__option--MOGCu","selected":"styles-module__selected--avjSK","panel":"styles-module__panel--bHhSv","panelWithFooter":"styles-module__panelWithFooter--5ItsY","panelHeading":"styles-module__panelHeading--GRNt0","panelHeader":"styles-module__panelHeader--bAHfN","panelContent":"styles-module__panelContent--X7kot","panelButtons":"styles-module__panelButtons---y4S-","panelFooter":"styles-module__panelFooter--T1y-s"});
|
|
340025
|
+
;// ./src/components/Menus/Sidebar/SidebarBarOption.jsx
|
|
340621
340026
|
|
|
340622
340027
|
|
|
340623
340028
|
|
|
340624
340029
|
|
|
340625
340030
|
|
|
340626
|
-
var
|
|
340627
|
-
var
|
|
340628
|
-
|
|
340629
|
-
|
|
340630
|
-
|
|
340631
|
-
|
|
340632
|
-
|
|
340633
|
-
|
|
340634
|
-
|
|
340635
|
-
|
|
340636
|
-
|
|
340637
|
-
|
|
340638
|
-
externalRef = _ref.externalRef,
|
|
340639
|
-
parentScrollingRef = _ref.parentScrollingRef,
|
|
340640
|
-
arrow = _ref.arrow,
|
|
340641
|
-
_ref$align = _ref.align,
|
|
340642
|
-
align = _ref$align === void 0 ? 'start' : _ref$align,
|
|
340643
|
-
_ref$direction = _ref.direction,
|
|
340644
|
-
direction = _ref$direction === void 0 ? 'bottom' : _ref$direction,
|
|
340645
|
-
_ref$position = _ref.position,
|
|
340646
|
-
position = _ref$position === void 0 ? 'auto' : _ref$position,
|
|
340647
|
-
_ref$overflow = _ref.overflow,
|
|
340648
|
-
overflow = _ref$overflow === void 0 ? 'visible' : _ref$overflow,
|
|
340649
|
-
setDownOverflow = _ref.setDownOverflow,
|
|
340650
|
-
repositionFlag = _ref.repositionFlag,
|
|
340651
|
-
_ref$captureFocus = _ref.captureFocus,
|
|
340652
|
-
captureFocus = _ref$captureFocus === void 0 ? true : _ref$captureFocus,
|
|
340653
|
-
state = _ref.state,
|
|
340654
|
-
endTransition = _ref.endTransition,
|
|
340655
|
-
isDisabled = _ref.isDisabled,
|
|
340656
|
-
menuItemFocus = _ref.menuItemFocus,
|
|
340657
|
-
_ref$offsetX = _ref.offsetX,
|
|
340658
|
-
offsetX = _ref$offsetX === void 0 ? 0 : _ref$offsetX,
|
|
340659
|
-
_ref$offsetY = _ref.offsetY,
|
|
340660
|
-
offsetY = _ref$offsetY === void 0 ? 0 : _ref$offsetY,
|
|
340661
|
-
children = _ref.children,
|
|
340662
|
-
onClose = _ref.onClose,
|
|
340663
|
-
restProps = _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(_ref, MenuList_excluded);
|
|
340664
|
-
var _useState = (0,external_react_.useState)({
|
|
340665
|
-
x: 0,
|
|
340666
|
-
y: 0
|
|
340667
|
-
}),
|
|
340668
|
-
menuPosition = _useState[0],
|
|
340669
|
-
setMenuPosition = _useState[1];
|
|
340670
|
-
var _useState2 = (0,external_react_.useState)({}),
|
|
340671
|
-
arrowPosition = _useState2[0],
|
|
340672
|
-
setArrowPosition = _useState2[1];
|
|
340673
|
-
var _useState3 = (0,external_react_.useState)(),
|
|
340674
|
-
overflowData = _useState3[0],
|
|
340675
|
-
setOverflowData = _useState3[1];
|
|
340676
|
-
var _useState4 = (0,external_react_.useState)(direction),
|
|
340677
|
-
expandedDirection = _useState4[0],
|
|
340678
|
-
setExpandedDirection = _useState4[1];
|
|
340679
|
-
var _useState5 = (0,external_react_.useState)(createSubmenuCtx),
|
|
340680
|
-
submenuCtx = _useState5[0];
|
|
340681
|
-
var _useReducer = (0,external_react_.useReducer)(function (c) {
|
|
340682
|
-
return c + 1;
|
|
340683
|
-
}, 1),
|
|
340684
|
-
reposSubmenu = _useReducer[0],
|
|
340685
|
-
forceReposSubmenu = _useReducer[1];
|
|
340686
|
-
var _useContext = (0,external_react_.useContext)(constants_SettingsContext),
|
|
340687
|
-
transition = _useContext.transition,
|
|
340688
|
-
boundingBoxRef = _useContext.boundingBoxRef,
|
|
340689
|
-
boundingBoxPadding = _useContext.boundingBoxPadding,
|
|
340690
|
-
rootMenuRef = _useContext.rootMenuRef,
|
|
340691
|
-
rootAnchorRef = _useContext.rootAnchorRef,
|
|
340692
|
-
scrollNodesRef = _useContext.scrollNodesRef,
|
|
340693
|
-
reposition = _useContext.reposition,
|
|
340694
|
-
viewScroll = _useContext.viewScroll,
|
|
340695
|
-
submenuCloseDelay = _useContext.submenuCloseDelay;
|
|
340696
|
-
var _useContext2 = (0,external_react_.useContext)(MenuListContext),
|
|
340697
|
-
parentSubmenuCtx = _useContext2.submenuCtx,
|
|
340698
|
-
_useContext2$reposSub = _useContext2.reposSubmenu,
|
|
340699
|
-
reposFlag = _useContext2$reposSub === void 0 ? repositionFlag : _useContext2$reposSub;
|
|
340700
|
-
var menuRef = (0,external_react_.useRef)(null);
|
|
340701
|
-
var focusRef = (0,external_react_.useRef)();
|
|
340702
|
-
var arrowRef = (0,external_react_.useRef)();
|
|
340703
|
-
var prevOpen = (0,external_react_.useRef)(false);
|
|
340704
|
-
var latestMenuSize = (0,external_react_.useRef)({
|
|
340705
|
-
width: 0,
|
|
340706
|
-
height: 0
|
|
340707
|
-
});
|
|
340708
|
-
var latestHandlePosition = (0,external_react_.useRef)(function () {});
|
|
340709
|
-
var _useItems = useItems(menuRef, focusRef),
|
|
340710
|
-
hoverItem = _useItems.hoverItem,
|
|
340711
|
-
dispatch = _useItems.dispatch,
|
|
340712
|
-
updateItems = _useItems.updateItems;
|
|
340713
|
-
var isOpen = isMenuOpen(state);
|
|
340714
|
-
var openTransition = getTransition(transition, 'open');
|
|
340715
|
-
var closeTransition = getTransition(transition, 'close');
|
|
340716
|
-
var scrollNodes = scrollNodesRef.current;
|
|
340717
|
-
var onKeyDown = function onKeyDown(e) {
|
|
340718
|
-
switch (e.key) {
|
|
340719
|
-
case Keys.HOME:
|
|
340720
|
-
dispatch(HoverActionTypes.FIRST);
|
|
340721
|
-
break;
|
|
340722
|
-
case Keys.END:
|
|
340723
|
-
dispatch(HoverActionTypes.LAST);
|
|
340724
|
-
break;
|
|
340725
|
-
case Keys.UP:
|
|
340726
|
-
dispatch(HoverActionTypes.DECREASE, hoverItem);
|
|
340727
|
-
break;
|
|
340728
|
-
case Keys.DOWN:
|
|
340729
|
-
dispatch(HoverActionTypes.INCREASE, hoverItem);
|
|
340730
|
-
break;
|
|
340731
|
-
case Keys.SPACE:
|
|
340732
|
-
if (e.target && e.target.className.indexOf(menuClass) !== -1) {
|
|
340733
|
-
e.preventDefault();
|
|
340734
|
-
}
|
|
340735
|
-
return;
|
|
340736
|
-
default:
|
|
340737
|
-
return;
|
|
340738
|
-
}
|
|
340739
|
-
e.preventDefault();
|
|
340740
|
-
e.stopPropagation();
|
|
340741
|
-
};
|
|
340742
|
-
var onAnimationEnd = function onAnimationEnd() {
|
|
340743
|
-
if (state === 'closing') {
|
|
340744
|
-
setOverflowData();
|
|
340745
|
-
}
|
|
340746
|
-
safeCall(endTransition);
|
|
340747
|
-
};
|
|
340748
|
-
var onPointerMove = function onPointerMove(e) {
|
|
340749
|
-
e.stopPropagation();
|
|
340750
|
-
submenuCtx.on(submenuCloseDelay, function () {
|
|
340751
|
-
dispatch(HoverActionTypes.RESET);
|
|
340752
|
-
focusRef.current.focus();
|
|
340753
|
-
});
|
|
340754
|
-
};
|
|
340755
|
-
var onPointerLeave = function onPointerLeave(e) {
|
|
340756
|
-
if (e.target === e.currentTarget) submenuCtx.off();
|
|
340031
|
+
var SidebarBarOption = props => {
|
|
340032
|
+
var {
|
|
340033
|
+
Icon,
|
|
340034
|
+
isActive,
|
|
340035
|
+
name,
|
|
340036
|
+
title,
|
|
340037
|
+
toggleOption,
|
|
340038
|
+
buttonText,
|
|
340039
|
+
isUser
|
|
340040
|
+
} = props;
|
|
340041
|
+
var onClickHandler = () => {
|
|
340042
|
+
toggleOption(name);
|
|
340757
340043
|
};
|
|
340758
|
-
|
|
340759
|
-
|
|
340760
|
-
|
|
340761
|
-
left: anchorPoint.x,
|
|
340762
|
-
right: anchorPoint.x,
|
|
340763
|
-
top: anchorPoint.y,
|
|
340764
|
-
bottom: anchorPoint.y,
|
|
340765
|
-
width: 0,
|
|
340766
|
-
height: 0
|
|
340767
|
-
} : null;
|
|
340768
|
-
if (!anchorRect) {
|
|
340769
|
-
if (false) {}
|
|
340770
|
-
return;
|
|
340771
|
-
}
|
|
340772
|
-
if (!scrollNodes.menu) {
|
|
340773
|
-
scrollNodes.menu = (boundingBoxRef ? boundingBoxRef.current : getScrollAncestor(rootMenuRef.current)) || window;
|
|
340774
|
-
}
|
|
340775
|
-
var positionHelpers = getPositionHelpers(containerRef, menuRef, scrollNodes.menu, boundingBoxPadding);
|
|
340776
|
-
var _positionMenu = positionMenu({
|
|
340777
|
-
arrow: arrow,
|
|
340778
|
-
align: align,
|
|
340779
|
-
direction: direction,
|
|
340780
|
-
offsetX: offsetX,
|
|
340781
|
-
offsetY: offsetY,
|
|
340782
|
-
position: position,
|
|
340783
|
-
anchorRect: anchorRect,
|
|
340784
|
-
arrowRef: arrowRef,
|
|
340785
|
-
positionHelpers: positionHelpers
|
|
340786
|
-
}),
|
|
340787
|
-
arrowX = _positionMenu.arrowX,
|
|
340788
|
-
arrowY = _positionMenu.arrowY,
|
|
340789
|
-
x = _positionMenu.x,
|
|
340790
|
-
y = _positionMenu.y,
|
|
340791
|
-
computedDirection = _positionMenu.computedDirection;
|
|
340792
|
-
var menuRect = positionHelpers.menuRect;
|
|
340793
|
-
var menuHeight = menuRect.height;
|
|
340794
|
-
if (!noOverflowCheck && overflow !== 'visible') {
|
|
340795
|
-
var getTopOverflow = positionHelpers.getTopOverflow,
|
|
340796
|
-
getBottomOverflow = positionHelpers.getBottomOverflow;
|
|
340797
|
-
var height, _overflowAmt;
|
|
340798
|
-
var prevHeight = latestMenuSize.current.height;
|
|
340799
|
-
var bottomOverflow = getBottomOverflow(y);
|
|
340800
|
-
if (bottomOverflow > 0 || floatEqual(bottomOverflow, 0) && floatEqual(menuHeight, prevHeight)) {
|
|
340801
|
-
height = menuHeight - bottomOverflow;
|
|
340802
|
-
_overflowAmt = bottomOverflow;
|
|
340803
|
-
} else {
|
|
340804
|
-
var topOverflow = getTopOverflow(y);
|
|
340805
|
-
if (topOverflow < 0 || floatEqual(topOverflow, 0) && floatEqual(menuHeight, prevHeight)) {
|
|
340806
|
-
height = menuHeight + topOverflow;
|
|
340807
|
-
_overflowAmt = 0 - topOverflow;
|
|
340808
|
-
if (height >= 0) y -= topOverflow;
|
|
340809
|
-
}
|
|
340810
|
-
}
|
|
340811
|
-
if (height >= 0) {
|
|
340812
|
-
menuHeight = height;
|
|
340813
|
-
setOverflowData({
|
|
340814
|
-
height: height,
|
|
340815
|
-
overflowAmt: _overflowAmt
|
|
340816
|
-
});
|
|
340817
|
-
} else {
|
|
340818
|
-
setOverflowData();
|
|
340819
|
-
}
|
|
340820
|
-
}
|
|
340821
|
-
if (arrow) setArrowPosition({
|
|
340822
|
-
x: arrowX,
|
|
340823
|
-
y: arrowY
|
|
340824
|
-
});
|
|
340825
|
-
setMenuPosition({
|
|
340826
|
-
x: x,
|
|
340827
|
-
y: y
|
|
340828
|
-
});
|
|
340829
|
-
setExpandedDirection(computedDirection);
|
|
340830
|
-
latestMenuSize.current = {
|
|
340831
|
-
width: menuRect.width,
|
|
340832
|
-
height: menuHeight
|
|
340833
|
-
};
|
|
340834
|
-
}, [arrow, align, boundingBoxPadding, direction, offsetX, offsetY, position, overflow, anchorPoint, anchorRef, containerRef, boundingBoxRef, rootMenuRef, scrollNodes]);
|
|
340835
|
-
useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function () {
|
|
340836
|
-
if (isOpen) {
|
|
340837
|
-
handlePosition();
|
|
340838
|
-
if (prevOpen.current) forceReposSubmenu();
|
|
340839
|
-
}
|
|
340840
|
-
prevOpen.current = isOpen;
|
|
340841
|
-
latestHandlePosition.current = handlePosition;
|
|
340842
|
-
}, [isOpen, handlePosition, reposFlag]);
|
|
340843
|
-
useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function () {
|
|
340844
|
-
if (overflowData && !setDownOverflow) menuRef.current.scrollTop = 0;
|
|
340845
|
-
}, [overflowData, setDownOverflow]);
|
|
340846
|
-
useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function () {
|
|
340847
|
-
return updateItems;
|
|
340848
|
-
}, [updateItems]);
|
|
340849
|
-
(0,external_react_.useEffect)(function () {
|
|
340850
|
-
var menuScroll = scrollNodes.menu;
|
|
340851
|
-
if (!isOpen || !menuScroll) return;
|
|
340852
|
-
menuScroll = menuScroll.addEventListener ? menuScroll : window;
|
|
340853
|
-
if (!scrollNodes.anchors) {
|
|
340854
|
-
scrollNodes.anchors = [];
|
|
340855
|
-
var anchorScroll = getScrollAncestor(rootAnchorRef && rootAnchorRef.current);
|
|
340856
|
-
while (anchorScroll && anchorScroll !== menuScroll) {
|
|
340857
|
-
scrollNodes.anchors.push(anchorScroll);
|
|
340858
|
-
anchorScroll = getScrollAncestor(anchorScroll);
|
|
340859
|
-
}
|
|
340860
|
-
}
|
|
340861
|
-
var scroll = viewScroll;
|
|
340862
|
-
if (scrollNodes.anchors.length && scroll === 'initial') scroll = 'auto';
|
|
340863
|
-
if (scroll === 'initial') return;
|
|
340864
|
-
var handleScroll = function handleScroll() {
|
|
340865
|
-
if (scroll === 'auto') {
|
|
340866
|
-
batchedUpdates(function () {
|
|
340867
|
-
return handlePosition(true);
|
|
340868
|
-
});
|
|
340869
|
-
} else {
|
|
340870
|
-
safeCall(onClose, {
|
|
340871
|
-
reason: CloseReason.SCROLL
|
|
340872
|
-
});
|
|
340873
|
-
}
|
|
340874
|
-
};
|
|
340875
|
-
var scrollObservers = scrollNodes.anchors.concat(viewScroll !== 'initial' ? menuScroll : []);
|
|
340876
|
-
scrollObservers.forEach(function (o) {
|
|
340877
|
-
return o.addEventListener('scroll', handleScroll);
|
|
340878
|
-
});
|
|
340879
|
-
return function () {
|
|
340880
|
-
return scrollObservers.forEach(function (o) {
|
|
340881
|
-
return o.removeEventListener('scroll', handleScroll);
|
|
340882
|
-
});
|
|
340883
|
-
};
|
|
340884
|
-
}, [rootAnchorRef, scrollNodes, isOpen, onClose, viewScroll, handlePosition]);
|
|
340885
|
-
var hasOverflow = !!overflowData && overflowData.overflowAmt > 0;
|
|
340886
|
-
(0,external_react_.useEffect)(function () {
|
|
340887
|
-
if (hasOverflow || !isOpen || !parentScrollingRef) return;
|
|
340888
|
-
var handleScroll = function handleScroll() {
|
|
340889
|
-
return batchedUpdates(handlePosition);
|
|
340890
|
-
};
|
|
340891
|
-
var parentScroll = parentScrollingRef.current;
|
|
340892
|
-
parentScroll.addEventListener('scroll', handleScroll);
|
|
340893
|
-
return function () {
|
|
340894
|
-
return parentScroll.removeEventListener('scroll', handleScroll);
|
|
340895
|
-
};
|
|
340896
|
-
}, [isOpen, hasOverflow, parentScrollingRef, handlePosition]);
|
|
340897
|
-
(0,external_react_.useEffect)(function () {
|
|
340898
|
-
if (typeof ResizeObserver !== 'function' || reposition === 'initial') return;
|
|
340899
|
-
var resizeObserver = new ResizeObserver(function (_ref2) {
|
|
340900
|
-
var entry = _ref2[0];
|
|
340901
|
-
var borderBoxSize = entry.borderBoxSize,
|
|
340902
|
-
target = entry.target;
|
|
340903
|
-
var width, height;
|
|
340904
|
-
if (borderBoxSize) {
|
|
340905
|
-
var _ref3 = borderBoxSize[0] || borderBoxSize,
|
|
340906
|
-
inlineSize = _ref3.inlineSize,
|
|
340907
|
-
blockSize = _ref3.blockSize;
|
|
340908
|
-
width = inlineSize;
|
|
340909
|
-
height = blockSize;
|
|
340910
|
-
} else {
|
|
340911
|
-
var borderRect = target.getBoundingClientRect();
|
|
340912
|
-
width = borderRect.width;
|
|
340913
|
-
height = borderRect.height;
|
|
340914
|
-
}
|
|
340915
|
-
if (width === 0 || height === 0) return;
|
|
340916
|
-
if (floatEqual(width, latestMenuSize.current.width, 1) && floatEqual(height, latestMenuSize.current.height, 1)) return;
|
|
340917
|
-
(0,external_react_dom_.flushSync)(function () {
|
|
340918
|
-
latestHandlePosition.current();
|
|
340919
|
-
forceReposSubmenu();
|
|
340920
|
-
});
|
|
340921
|
-
});
|
|
340922
|
-
var observeTarget = menuRef.current;
|
|
340923
|
-
resizeObserver.observe(observeTarget, {
|
|
340924
|
-
box: 'border-box'
|
|
340925
|
-
});
|
|
340926
|
-
return function () {
|
|
340927
|
-
return resizeObserver.unobserve(observeTarget);
|
|
340928
|
-
};
|
|
340929
|
-
}, [reposition]);
|
|
340930
|
-
(0,external_react_.useEffect)(function () {
|
|
340931
|
-
if (!isOpen) {
|
|
340932
|
-
dispatch(HoverActionTypes.RESET);
|
|
340933
|
-
if (!closeTransition) setOverflowData();
|
|
340934
|
-
return;
|
|
340935
|
-
}
|
|
340936
|
-
var _ref4 = menuItemFocus || {},
|
|
340937
|
-
position = _ref4.position,
|
|
340938
|
-
alwaysUpdate = _ref4.alwaysUpdate;
|
|
340939
|
-
var setItemFocus = function setItemFocus() {
|
|
340940
|
-
if (position === FocusPositions.FIRST) {
|
|
340941
|
-
dispatch(HoverActionTypes.FIRST);
|
|
340942
|
-
} else if (position === FocusPositions.LAST) {
|
|
340943
|
-
dispatch(HoverActionTypes.LAST);
|
|
340944
|
-
} else if (position >= -1) {
|
|
340945
|
-
dispatch(HoverActionTypes.SET_INDEX, undefined, position);
|
|
340946
|
-
}
|
|
340947
|
-
};
|
|
340948
|
-
if (alwaysUpdate) {
|
|
340949
|
-
setItemFocus();
|
|
340950
|
-
} else if (captureFocus) {
|
|
340951
|
-
var id = setTimeout(function () {
|
|
340952
|
-
if (!menuRef.current.contains(document.activeElement)) {
|
|
340953
|
-
focusRef.current.focus();
|
|
340954
|
-
setItemFocus();
|
|
340955
|
-
}
|
|
340956
|
-
}, openTransition ? 170 : 100);
|
|
340957
|
-
return function () {
|
|
340958
|
-
return clearTimeout(id);
|
|
340959
|
-
};
|
|
340960
|
-
}
|
|
340961
|
-
}, [isOpen, openTransition, closeTransition, captureFocus, menuItemFocus, dispatch]);
|
|
340962
|
-
var itemContext = (0,external_react_.useMemo)(function () {
|
|
340963
|
-
return {
|
|
340964
|
-
isParentOpen: isOpen,
|
|
340965
|
-
submenuCtx: submenuCtx,
|
|
340966
|
-
dispatch: dispatch,
|
|
340967
|
-
updateItems: updateItems
|
|
340968
|
-
};
|
|
340969
|
-
}, [isOpen, submenuCtx, dispatch, updateItems]);
|
|
340970
|
-
var maxHeight, overflowAmt;
|
|
340971
|
-
if (overflowData) {
|
|
340972
|
-
setDownOverflow ? overflowAmt = overflowData.overflowAmt : maxHeight = overflowData.height;
|
|
340973
|
-
}
|
|
340974
|
-
var listContext = (0,external_react_.useMemo)(function () {
|
|
340975
|
-
return {
|
|
340976
|
-
reposSubmenu: reposSubmenu,
|
|
340977
|
-
submenuCtx: submenuCtx,
|
|
340978
|
-
overflow: overflow,
|
|
340979
|
-
overflowAmt: overflowAmt,
|
|
340980
|
-
parentMenuRef: menuRef,
|
|
340981
|
-
parentDir: expandedDirection
|
|
340982
|
-
};
|
|
340983
|
-
}, [reposSubmenu, submenuCtx, overflow, overflowAmt, expandedDirection]);
|
|
340984
|
-
var overflowStyle = maxHeight >= 0 ? {
|
|
340985
|
-
maxHeight: maxHeight,
|
|
340986
|
-
overflow: overflow
|
|
340987
|
-
} : undefined;
|
|
340988
|
-
var modifiers = (0,external_react_.useMemo)(function () {
|
|
340989
|
-
return {
|
|
340990
|
-
state: state,
|
|
340991
|
-
dir: expandedDirection
|
|
340992
|
-
};
|
|
340993
|
-
}, [state, expandedDirection]);
|
|
340994
|
-
var arrowModifiers = (0,external_react_.useMemo)(function () {
|
|
340995
|
-
return {
|
|
340996
|
-
dir: expandedDirection
|
|
340997
|
-
};
|
|
340998
|
-
}, [expandedDirection]);
|
|
340999
|
-
var _arrowClass = useBEM({
|
|
341000
|
-
block: menuClass,
|
|
341001
|
-
element: menuArrowClass,
|
|
341002
|
-
modifiers: arrowModifiers,
|
|
341003
|
-
className: arrowClassName
|
|
341004
|
-
});
|
|
341005
|
-
var menu = /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", _rollupPluginBabelHelpers_extends({
|
|
341006
|
-
role: "menu",
|
|
341007
|
-
"aria-label": ariaLabel
|
|
341008
|
-
}, commonProps(isDisabled), utils_mergeProps({
|
|
341009
|
-
onPointerEnter: parentSubmenuCtx == null ? void 0 : parentSubmenuCtx.off,
|
|
341010
|
-
onPointerMove: onPointerMove,
|
|
341011
|
-
onPointerLeave: onPointerLeave,
|
|
341012
|
-
onKeyDown: onKeyDown,
|
|
341013
|
-
onAnimationEnd: onAnimationEnd
|
|
341014
|
-
}, restProps), {
|
|
341015
|
-
ref: useCombinedRef(externalRef, menuRef),
|
|
341016
|
-
className: useBEM({
|
|
341017
|
-
block: menuClass,
|
|
341018
|
-
modifiers: modifiers,
|
|
341019
|
-
className: menuClassName
|
|
341020
|
-
}),
|
|
341021
|
-
style: _rollupPluginBabelHelpers_extends({}, menuStyle, overflowStyle, {
|
|
341022
|
-
margin: 0,
|
|
341023
|
-
display: state === 'closed' ? 'none' : undefined,
|
|
341024
|
-
position: positionAbsolute,
|
|
341025
|
-
left: menuPosition.x,
|
|
341026
|
-
top: menuPosition.y
|
|
340044
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button, {
|
|
340045
|
+
className: classnames_default()(Sidebar_styles_module.option, {
|
|
340046
|
+
[Sidebar_styles_module.selected]: isActive
|
|
341027
340047
|
}),
|
|
341028
|
-
|
|
341029
|
-
|
|
341030
|
-
|
|
341031
|
-
|
|
341032
|
-
|
|
341033
|
-
top: 0,
|
|
341034
|
-
display: 'block',
|
|
341035
|
-
outline: 'none'
|
|
341036
|
-
},
|
|
341037
|
-
ref: focusRef
|
|
341038
|
-
}, dummyItemProps, focusProps)), arrow && /*#__PURE__*/(0,jsx_runtime.jsx)("li", _rollupPluginBabelHelpers_extends({
|
|
341039
|
-
className: _arrowClass,
|
|
341040
|
-
style: _rollupPluginBabelHelpers_extends({
|
|
341041
|
-
display: 'block',
|
|
341042
|
-
position: positionAbsolute,
|
|
341043
|
-
left: arrowPosition.x,
|
|
341044
|
-
top: arrowPosition.y
|
|
341045
|
-
}, arrowStyle),
|
|
341046
|
-
ref: arrowRef
|
|
341047
|
-
}, dummyItemProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(MenuListContext.Provider, {
|
|
341048
|
-
value: listContext,
|
|
341049
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuListItemContext.Provider, {
|
|
341050
|
-
value: itemContext,
|
|
341051
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(HoverItemContext.Provider, {
|
|
341052
|
-
value: hoverItem,
|
|
341053
|
-
children: safeCall(children, modifiers)
|
|
341054
|
-
})
|
|
341055
|
-
})
|
|
341056
|
-
})]
|
|
341057
|
-
}));
|
|
341058
|
-
return containerProps ? /*#__PURE__*/(0,jsx_runtime.jsx)(MenuContainer, _rollupPluginBabelHelpers_extends({}, containerProps, {
|
|
341059
|
-
isOpen: isOpen,
|
|
341060
|
-
children: menu
|
|
341061
|
-
})) : menu;
|
|
341062
|
-
};
|
|
341063
|
-
|
|
341064
|
-
|
|
341065
|
-
|
|
341066
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/components/ControlledMenu.js
|
|
341067
|
-
|
|
341068
|
-
|
|
341069
|
-
|
|
341070
|
-
|
|
341071
|
-
|
|
341072
|
-
|
|
341073
|
-
|
|
341074
|
-
|
|
341075
|
-
|
|
341076
|
-
|
|
341077
|
-
var ControlledMenu_excluded = ["aria-label", "className", "containerProps", "initialMounted", "unmountOnClose", "transition", "transitionTimeout", "boundingBoxRef", "boundingBoxPadding", "reposition", "submenuOpenDelay", "submenuCloseDelay", "skipOpen", "viewScroll", "portal", "theming", "onItemClick"];
|
|
341078
|
-
var ControlledMenu = /*#__PURE__*/(0,external_react_.forwardRef)(function ControlledMenu(_ref, externalRef) {
|
|
341079
|
-
var ariaLabel = _ref['aria-label'],
|
|
341080
|
-
className = _ref.className,
|
|
341081
|
-
containerProps = _ref.containerProps,
|
|
341082
|
-
initialMounted = _ref.initialMounted,
|
|
341083
|
-
unmountOnClose = _ref.unmountOnClose,
|
|
341084
|
-
transition = _ref.transition,
|
|
341085
|
-
transitionTimeout = _ref.transitionTimeout,
|
|
341086
|
-
boundingBoxRef = _ref.boundingBoxRef,
|
|
341087
|
-
boundingBoxPadding = _ref.boundingBoxPadding,
|
|
341088
|
-
_ref$reposition = _ref.reposition,
|
|
341089
|
-
reposition = _ref$reposition === void 0 ? 'auto' : _ref$reposition,
|
|
341090
|
-
_ref$submenuOpenDelay = _ref.submenuOpenDelay,
|
|
341091
|
-
submenuOpenDelay = _ref$submenuOpenDelay === void 0 ? 300 : _ref$submenuOpenDelay,
|
|
341092
|
-
_ref$submenuCloseDela = _ref.submenuCloseDelay,
|
|
341093
|
-
submenuCloseDelay = _ref$submenuCloseDela === void 0 ? 150 : _ref$submenuCloseDela,
|
|
341094
|
-
skipOpen = _ref.skipOpen,
|
|
341095
|
-
_ref$viewScroll = _ref.viewScroll,
|
|
341096
|
-
viewScroll = _ref$viewScroll === void 0 ? 'initial' : _ref$viewScroll,
|
|
341097
|
-
portal = _ref.portal,
|
|
341098
|
-
theming = _ref.theming,
|
|
341099
|
-
onItemClick = _ref.onItemClick,
|
|
341100
|
-
restProps = _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(_ref, ControlledMenu_excluded);
|
|
341101
|
-
var containerRef = (0,external_react_.useRef)(null);
|
|
341102
|
-
var scrollNodesRef = (0,external_react_.useRef)({});
|
|
341103
|
-
var anchorRef = restProps.anchorRef,
|
|
341104
|
-
state = restProps.state,
|
|
341105
|
-
onClose = restProps.onClose;
|
|
341106
|
-
var settings = (0,external_react_.useMemo)(function () {
|
|
341107
|
-
return {
|
|
341108
|
-
initialMounted: initialMounted,
|
|
341109
|
-
unmountOnClose: unmountOnClose,
|
|
341110
|
-
transition: transition,
|
|
341111
|
-
transitionTimeout: transitionTimeout,
|
|
341112
|
-
boundingBoxRef: boundingBoxRef,
|
|
341113
|
-
boundingBoxPadding: boundingBoxPadding,
|
|
341114
|
-
rootMenuRef: containerRef,
|
|
341115
|
-
rootAnchorRef: anchorRef,
|
|
341116
|
-
scrollNodesRef: scrollNodesRef,
|
|
341117
|
-
reposition: reposition,
|
|
341118
|
-
viewScroll: viewScroll,
|
|
341119
|
-
submenuOpenDelay: submenuOpenDelay,
|
|
341120
|
-
submenuCloseDelay: submenuCloseDelay
|
|
341121
|
-
};
|
|
341122
|
-
}, [initialMounted, unmountOnClose, transition, transitionTimeout, anchorRef, boundingBoxRef, boundingBoxPadding, reposition, viewScroll, submenuOpenDelay, submenuCloseDelay]);
|
|
341123
|
-
var eventHandlers = (0,external_react_.useMemo)(function () {
|
|
341124
|
-
return {
|
|
341125
|
-
handleClick: function handleClick(event, isCheckorRadio) {
|
|
341126
|
-
if (!event.stopPropagation) safeCall(onItemClick, event);
|
|
341127
|
-
var keepOpen = event.keepOpen;
|
|
341128
|
-
if (keepOpen === undefined) {
|
|
341129
|
-
keepOpen = isCheckorRadio && event.key === Keys.SPACE;
|
|
341130
|
-
}
|
|
341131
|
-
if (!keepOpen) {
|
|
341132
|
-
safeCall(onClose, {
|
|
341133
|
-
value: event.value,
|
|
341134
|
-
key: event.key,
|
|
341135
|
-
reason: CloseReason.CLICK
|
|
341136
|
-
});
|
|
341137
|
-
}
|
|
341138
|
-
},
|
|
341139
|
-
handleClose: function handleClose(key) {
|
|
341140
|
-
safeCall(onClose, {
|
|
341141
|
-
key: key,
|
|
341142
|
-
reason: CloseReason.CLICK
|
|
341143
|
-
});
|
|
341144
|
-
}
|
|
341145
|
-
};
|
|
341146
|
-
}, [onItemClick, onClose]);
|
|
341147
|
-
if (!state) return null;
|
|
341148
|
-
var menuList = /*#__PURE__*/(0,jsx_runtime.jsx)(constants_SettingsContext.Provider, {
|
|
341149
|
-
value: settings,
|
|
341150
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(EventHandlersContext.Provider, {
|
|
341151
|
-
value: eventHandlers,
|
|
341152
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuList, _rollupPluginBabelHelpers_extends({}, restProps, {
|
|
341153
|
-
ariaLabel: ariaLabel || 'Menu',
|
|
341154
|
-
externalRef: externalRef,
|
|
341155
|
-
containerRef: containerRef,
|
|
341156
|
-
containerProps: {
|
|
341157
|
-
className: className,
|
|
341158
|
-
containerRef: containerRef,
|
|
341159
|
-
containerProps: containerProps,
|
|
341160
|
-
skipOpen: skipOpen,
|
|
341161
|
-
theming: theming,
|
|
341162
|
-
transition: transition,
|
|
341163
|
-
onClose: onClose
|
|
341164
|
-
}
|
|
341165
|
-
}))
|
|
341166
|
-
})
|
|
341167
|
-
});
|
|
341168
|
-
if (portal === true && typeof document !== 'undefined') {
|
|
341169
|
-
return /*#__PURE__*/(0,external_react_dom_.createPortal)(menuList, document.body);
|
|
341170
|
-
} else if (portal) {
|
|
341171
|
-
return portal.target ? /*#__PURE__*/(0,external_react_dom_.createPortal)(menuList, portal.target) : portal.stablePosition ? null : menuList;
|
|
341172
|
-
}
|
|
341173
|
-
return menuList;
|
|
341174
|
-
});
|
|
341175
|
-
false ? 0 : void 0;
|
|
341176
|
-
|
|
341177
|
-
|
|
341178
|
-
|
|
341179
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useItemEffect.js
|
|
341180
|
-
|
|
341181
|
-
|
|
341182
|
-
var useItemEffect = function useItemEffect(isDisabled, itemRef, updateItems) {
|
|
341183
|
-
useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function () {
|
|
341184
|
-
if (false) {}
|
|
341185
|
-
if (isDisabled) return;
|
|
341186
|
-
var item = itemRef.current;
|
|
341187
|
-
updateItems(item, true);
|
|
341188
|
-
return function () {
|
|
341189
|
-
updateItems(item);
|
|
341190
|
-
};
|
|
341191
|
-
}, [isDisabled, itemRef, updateItems]);
|
|
341192
|
-
};
|
|
341193
|
-
|
|
341194
|
-
|
|
341195
|
-
|
|
341196
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useItemState.js
|
|
341197
|
-
|
|
341198
|
-
|
|
341199
|
-
|
|
341200
|
-
|
|
341201
|
-
var useItemState = function useItemState(itemRef, focusRef, isHovering, isDisabled) {
|
|
341202
|
-
var _useContext = (0,external_react_.useContext)(constants_SettingsContext),
|
|
341203
|
-
submenuCloseDelay = _useContext.submenuCloseDelay;
|
|
341204
|
-
var _useContext2 = (0,external_react_.useContext)(MenuListItemContext),
|
|
341205
|
-
isParentOpen = _useContext2.isParentOpen,
|
|
341206
|
-
submenuCtx = _useContext2.submenuCtx,
|
|
341207
|
-
dispatch = _useContext2.dispatch,
|
|
341208
|
-
updateItems = _useContext2.updateItems;
|
|
341209
|
-
var setHover = function setHover() {
|
|
341210
|
-
!isHovering && !isDisabled && dispatch(HoverActionTypes.SET, itemRef.current);
|
|
341211
|
-
};
|
|
341212
|
-
var unsetHover = function unsetHover() {
|
|
341213
|
-
!isDisabled && dispatch(HoverActionTypes.UNSET, itemRef.current);
|
|
341214
|
-
};
|
|
341215
|
-
var onBlur = function onBlur(e) {
|
|
341216
|
-
if (isHovering && !e.currentTarget.contains(e.relatedTarget)) unsetHover();
|
|
341217
|
-
};
|
|
341218
|
-
var onPointerMove = function onPointerMove(e) {
|
|
341219
|
-
if (!isDisabled) {
|
|
341220
|
-
e.stopPropagation();
|
|
341221
|
-
submenuCtx.on(submenuCloseDelay, setHover, setHover);
|
|
341222
|
-
}
|
|
341223
|
-
};
|
|
341224
|
-
var onPointerLeave = function onPointerLeave(_, keepHover) {
|
|
341225
|
-
submenuCtx.off();
|
|
341226
|
-
!keepHover && unsetHover();
|
|
341227
|
-
};
|
|
341228
|
-
useItemEffect(isDisabled, itemRef, updateItems);
|
|
341229
|
-
(0,external_react_.useEffect)(function () {
|
|
341230
|
-
if (isHovering && isParentOpen) {
|
|
341231
|
-
focusRef.current && focusRef.current.focus();
|
|
341232
|
-
}
|
|
341233
|
-
}, [focusRef, isHovering, isParentOpen]);
|
|
341234
|
-
return {
|
|
341235
|
-
setHover: setHover,
|
|
341236
|
-
onBlur: onBlur,
|
|
341237
|
-
onPointerMove: onPointerMove,
|
|
341238
|
-
onPointerLeave: onPointerLeave
|
|
341239
|
-
};
|
|
341240
|
-
};
|
|
341241
|
-
|
|
341242
|
-
|
|
341243
|
-
|
|
341244
|
-
;// ./node_modules/@szhsin/react-menu/dist/es/utils/withHovering.js
|
|
341245
|
-
|
|
341246
|
-
|
|
341247
|
-
|
|
341248
|
-
|
|
341249
|
-
|
|
341250
|
-
var withHovering = function withHovering(name, WrappedComponent) {
|
|
341251
|
-
var Component = /*#__PURE__*/(0,external_react_.memo)(WrappedComponent);
|
|
341252
|
-
var WithHovering = /*#__PURE__*/(0,external_react_.forwardRef)(function (props, ref) {
|
|
341253
|
-
var itemRef = (0,external_react_.useRef)(null);
|
|
341254
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(Component, _rollupPluginBabelHelpers_extends({}, props, {
|
|
341255
|
-
itemRef: itemRef,
|
|
341256
|
-
externalRef: ref,
|
|
341257
|
-
isHovering: (0,external_react_.useContext)(HoverItemContext) === itemRef.current
|
|
341258
|
-
}));
|
|
340048
|
+
isUser: isUser,
|
|
340049
|
+
ButtonIcon: Icon,
|
|
340050
|
+
title: title,
|
|
340051
|
+
buttonText: buttonText,
|
|
340052
|
+
onClickHandler: onClickHandler
|
|
341259
340053
|
});
|
|
341260
|
-
WithHovering.displayName = "WithHovering(" + name + ")";
|
|
341261
|
-
return WithHovering;
|
|
341262
340054
|
};
|
|
341263
|
-
|
|
341264
|
-
|
|
341265
|
-
|
|
341266
|
-
;// ./
|
|
341267
|
-
|
|
341268
|
-
|
|
341269
|
-
|
|
341270
|
-
|
|
341271
|
-
|
|
341272
|
-
|
|
341273
|
-
|
|
341274
|
-
|
|
341275
|
-
|
|
341276
|
-
|
|
341277
|
-
|
|
341278
|
-
|
|
341279
|
-
var MenuItem_excluded = ["className", "value", "href", "type", "checked", "disabled", "children", "onClick", "isHovering", "itemRef", "externalRef"],
|
|
341280
|
-
MenuItem_excluded2 = ["setHover"];
|
|
341281
|
-
var MenuItem = /*#__PURE__*/withHovering('MenuItem', function MenuItem(_ref) {
|
|
341282
|
-
var className = _ref.className,
|
|
341283
|
-
value = _ref.value,
|
|
341284
|
-
href = _ref.href,
|
|
341285
|
-
type = _ref.type,
|
|
341286
|
-
checked = _ref.checked,
|
|
341287
|
-
disabled = _ref.disabled,
|
|
341288
|
-
children = _ref.children,
|
|
341289
|
-
onClick = _ref.onClick,
|
|
341290
|
-
isHovering = _ref.isHovering,
|
|
341291
|
-
itemRef = _ref.itemRef,
|
|
341292
|
-
externalRef = _ref.externalRef,
|
|
341293
|
-
restProps = _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(_ref, MenuItem_excluded);
|
|
341294
|
-
var isDisabled = !!disabled;
|
|
341295
|
-
var _useItemState = useItemState(itemRef, itemRef, isHovering, isDisabled),
|
|
341296
|
-
setHover = _useItemState.setHover,
|
|
341297
|
-
restStateProps = _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(_useItemState, MenuItem_excluded2);
|
|
341298
|
-
var eventHandlers = (0,external_react_.useContext)(EventHandlersContext);
|
|
341299
|
-
var radioGroup = (0,external_react_.useContext)(RadioGroupContext);
|
|
341300
|
-
var isRadio = type === 'radio';
|
|
341301
|
-
var isCheckBox = type === 'checkbox';
|
|
341302
|
-
var isAnchor = !!href && !isDisabled && !isRadio && !isCheckBox;
|
|
341303
|
-
var isChecked = isRadio ? radioGroup.value === value : isCheckBox ? !!checked : false;
|
|
341304
|
-
var handleClick = function handleClick(e) {
|
|
341305
|
-
if (isDisabled) {
|
|
341306
|
-
e.stopPropagation();
|
|
341307
|
-
e.preventDefault();
|
|
341308
|
-
return;
|
|
341309
|
-
}
|
|
341310
|
-
var event = {
|
|
341311
|
-
value: value,
|
|
341312
|
-
syntheticEvent: e
|
|
341313
|
-
};
|
|
341314
|
-
if (e.key !== undefined) event.key = e.key;
|
|
341315
|
-
if (isCheckBox) event.checked = !isChecked;
|
|
341316
|
-
if (isRadio) event.name = radioGroup.name;
|
|
341317
|
-
safeCall(onClick, event);
|
|
341318
|
-
if (isRadio) safeCall(radioGroup.onRadioChange, event);
|
|
341319
|
-
eventHandlers.handleClick(event, isCheckBox || isRadio);
|
|
341320
|
-
};
|
|
341321
|
-
var handleKeyDown = function handleKeyDown(e) {
|
|
341322
|
-
if (!isHovering) return;
|
|
341323
|
-
switch (e.key) {
|
|
341324
|
-
case Keys.ENTER:
|
|
341325
|
-
case Keys.SPACE:
|
|
341326
|
-
isAnchor ? e.key === Keys.SPACE && itemRef.current.click() : handleClick(e);
|
|
341327
|
-
}
|
|
341328
|
-
};
|
|
341329
|
-
var modifiers = (0,external_react_.useMemo)(function () {
|
|
341330
|
-
return {
|
|
341331
|
-
type: type,
|
|
341332
|
-
disabled: isDisabled,
|
|
341333
|
-
hover: isHovering,
|
|
341334
|
-
checked: isChecked,
|
|
341335
|
-
anchor: isAnchor
|
|
341336
|
-
};
|
|
341337
|
-
}, [type, isDisabled, isHovering, isChecked, isAnchor]);
|
|
341338
|
-
var mergedProps = utils_mergeProps(_rollupPluginBabelHelpers_extends({}, restStateProps, {
|
|
341339
|
-
onPointerDown: setHover,
|
|
341340
|
-
onKeyDown: handleKeyDown,
|
|
341341
|
-
onClick: handleClick
|
|
341342
|
-
}), restProps);
|
|
341343
|
-
var menuItemProps = _rollupPluginBabelHelpers_extends({
|
|
341344
|
-
role: isRadio ? 'menuitemradio' : isCheckBox ? 'menuitemcheckbox' : roleMenuitem,
|
|
341345
|
-
'aria-checked': isRadio || isCheckBox ? isChecked : undefined
|
|
341346
|
-
}, commonProps(isDisabled, isHovering), mergedProps, {
|
|
341347
|
-
ref: useCombinedRef(externalRef, itemRef),
|
|
341348
|
-
className: useBEM({
|
|
341349
|
-
block: menuClass,
|
|
341350
|
-
element: menuItemClass,
|
|
341351
|
-
modifiers: modifiers,
|
|
341352
|
-
className: className
|
|
341353
|
-
}),
|
|
341354
|
-
children: (0,external_react_.useMemo)(function () {
|
|
341355
|
-
return safeCall(children, modifiers);
|
|
341356
|
-
}, [children, modifiers])
|
|
341357
|
-
});
|
|
341358
|
-
return isAnchor ? /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
341359
|
-
role: roleNone,
|
|
341360
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", _rollupPluginBabelHelpers_extends({
|
|
341361
|
-
href: href
|
|
341362
|
-
}, menuItemProps))
|
|
341363
|
-
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("li", _rollupPluginBabelHelpers_extends({}, menuItemProps));
|
|
341364
|
-
});
|
|
341365
|
-
false ? 0 : void 0;
|
|
341366
|
-
|
|
341367
|
-
|
|
341368
|
-
|
|
341369
|
-
;// ./src/assets/stylesheets/ContextMenu.scss
|
|
341370
|
-
// extracted by mini-css-extract-plugin
|
|
341371
|
-
|
|
341372
|
-
;// ./src/components/Menus/ContextMenu/ContextMenu.jsx
|
|
340055
|
+
/* harmony default export */ const Sidebar_SidebarBarOption = (SidebarBarOption);
|
|
340056
|
+
;// ./src/assets/gwc-logo.svg
|
|
340057
|
+
const gwc_logo_namespaceObject = __webpack_require__.p + "assets/gwc-logoa61b092912e3c38825d3.svg";
|
|
340058
|
+
;// ./src/components/Menus/Sidebar/SidebarBar.jsx
|
|
341373
340059
|
|
|
341374
340060
|
|
|
341375
340061
|
|
|
341376
340062
|
|
|
341377
340063
|
|
|
341378
|
-
var
|
|
340064
|
+
var SidebarBar = props => {
|
|
341379
340065
|
var {
|
|
341380
|
-
align,
|
|
341381
|
-
direction,
|
|
341382
|
-
menuButtonLabel,
|
|
341383
|
-
menuButtonClassName,
|
|
341384
|
-
MenuButtonIcon,
|
|
341385
340066
|
menuOptions,
|
|
341386
|
-
|
|
341387
|
-
|
|
340067
|
+
option,
|
|
340068
|
+
toggleOption
|
|
341388
340069
|
} = props;
|
|
341389
|
-
var
|
|
341390
|
-
var
|
|
341391
|
-
|
|
341392
|
-
|
|
341393
|
-
|
|
341394
|
-
|
|
341395
|
-
|
|
341396
|
-
|
|
341397
|
-
|
|
341398
|
-
|
|
341399
|
-
|
|
341400
|
-
|
|
341401
|
-
|
|
341402
|
-
|
|
341403
|
-
|
|
341404
|
-
|
|
341405
|
-
|
|
341406
|
-
|
|
341407
|
-
|
|
341408
|
-
|
|
341409
|
-
|
|
341410
|
-
|
|
341411
|
-
|
|
341412
|
-
|
|
341413
|
-
|
|
341414
|
-
|
|
341415
|
-
|
|
341416
|
-
transition: true,
|
|
341417
|
-
align: align,
|
|
341418
|
-
direction: direction,
|
|
341419
|
-
menuStyle: {
|
|
341420
|
-
padding: "5px"
|
|
341421
|
-
},
|
|
341422
|
-
offsetX: offsetX,
|
|
341423
|
-
offsetY: offsetY,
|
|
341424
|
-
position: "anchor",
|
|
341425
|
-
viewScroll: "initial",
|
|
341426
|
-
portal: {
|
|
341427
|
-
target: portalTarget
|
|
341428
|
-
},
|
|
341429
|
-
menuClassName: "context-menu context-menu--".concat(settings.theme),
|
|
341430
|
-
menuItemFocus: {
|
|
341431
|
-
position: "first"
|
|
341432
|
-
},
|
|
341433
|
-
state: isOpen ? "open" : "closed",
|
|
341434
|
-
anchorRef: menuButton,
|
|
341435
|
-
ref: contextMenu,
|
|
341436
|
-
onClose: () => setMenuOpenState(false),
|
|
341437
|
-
children: menuOptions.map((option, i) => /*#__PURE__*/(0,jsx_runtime.jsxs)(MenuItem, {
|
|
341438
|
-
className: "btn context-menu__item",
|
|
341439
|
-
onClick: option.action,
|
|
341440
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(option.icon, {}), "\xA0", option.text]
|
|
340070
|
+
var topMenuOptions = menuOptions.filter(menuOption => menuOption.position === "top");
|
|
340071
|
+
var bottomMenuOptions = menuOptions.filter(menuOption => menuOption.position === "bottom");
|
|
340072
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
340073
|
+
className: Sidebar_styles_module.bar,
|
|
340074
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
340075
|
+
className: Sidebar_styles_module.optionsTop,
|
|
340076
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
340077
|
+
className: Sidebar_styles_module.gwcLogo,
|
|
340078
|
+
src: gwc_logo_namespaceObject,
|
|
340079
|
+
alt: "GWC Logo"
|
|
340080
|
+
}), topMenuOptions.map((menuOption, i) => /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarBarOption, {
|
|
340081
|
+
Icon: menuOption.icon,
|
|
340082
|
+
title: menuOption.title,
|
|
340083
|
+
isActive: option === menuOption.name,
|
|
340084
|
+
toggleOption: toggleOption,
|
|
340085
|
+
name: menuOption.name
|
|
340086
|
+
}, i))]
|
|
340087
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
340088
|
+
className: Sidebar_styles_module.optionsBottom,
|
|
340089
|
+
children: bottomMenuOptions.map((menuOption, i) => /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarBarOption, {
|
|
340090
|
+
Icon: menuOption.icon,
|
|
340091
|
+
title: menuOption.title,
|
|
340092
|
+
isActive: option === menuOption.name,
|
|
340093
|
+
toggleOption: toggleOption,
|
|
340094
|
+
name: menuOption.name,
|
|
340095
|
+
buttonText: menuOption.buttonText,
|
|
340096
|
+
isUser: menuOption.name === "user"
|
|
341441
340097
|
}, i))
|
|
341442
340098
|
})]
|
|
341443
340099
|
});
|
|
341444
340100
|
};
|
|
341445
|
-
/* harmony default export */ const
|
|
341446
|
-
;// ./src/components/Menus/FileMenu/FileMenu.jsx
|
|
341447
|
-
|
|
341448
|
-
|
|
341449
|
-
|
|
341450
|
-
|
|
341451
|
-
|
|
341452
|
-
|
|
341453
|
-
|
|
341454
|
-
|
|
341455
|
-
var FileMenu = props => {
|
|
341456
|
-
var dispatch = (0,external_react_redux_namespaceObject.useDispatch)();
|
|
341457
|
-
var {
|
|
341458
|
-
t
|
|
341459
|
-
} = useTranslation_useTranslation();
|
|
341460
|
-
var onClickRenameFile = () => {
|
|
341461
|
-
dispatch(showRenameFileModal(props));
|
|
341462
|
-
};
|
|
341463
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
341464
|
-
onClick: e => e.stopPropagation(),
|
|
341465
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ContextMenu_ContextMenu, {
|
|
341466
|
-
align: "start",
|
|
341467
|
-
direction: "right",
|
|
341468
|
-
menuButtonLabel: t("filePanel.fileMenu.label"),
|
|
341469
|
-
MenuButtonIcon: ellipsis_vertical_namespaceObject,
|
|
341470
|
-
menuOptions: [{
|
|
341471
|
-
icon: pencil_namespaceObject,
|
|
341472
|
-
text: t("filePanel.fileMenu.renameItem"),
|
|
341473
|
-
action: onClickRenameFile
|
|
341474
|
-
}],
|
|
341475
|
-
offsetX: 16,
|
|
341476
|
-
offsetY: -8
|
|
341477
|
-
})
|
|
341478
|
-
});
|
|
341479
|
-
};
|
|
341480
|
-
/* harmony default export */ const FileMenu_FileMenu = (FileMenu);
|
|
341481
|
-
;// ./src/assets/stylesheets/FilePanel.scss
|
|
341482
|
-
// extracted by mini-css-extract-plugin
|
|
341483
|
-
|
|
341484
|
-
;// ./src/assets/stylesheets/Sidebar.scss
|
|
341485
|
-
// extracted by mini-css-extract-plugin
|
|
341486
|
-
|
|
340101
|
+
/* harmony default export */ const Sidebar_SidebarBar = (SidebarBar);
|
|
341487
340102
|
;// ./node_modules/re-resizable/lib/resizer.js
|
|
341488
340103
|
var resizer_extends = (undefined && undefined.__extends) || (function () {
|
|
341489
340104
|
var extendStatics = function (d, b) {
|
|
@@ -342419,6 +341034,7 @@ var ResizableWithHandle = props => {
|
|
|
342419
341034
|
|
|
342420
341035
|
|
|
342421
341036
|
|
|
341037
|
+
|
|
342422
341038
|
var SidebarPanel = props => {
|
|
342423
341039
|
var {
|
|
342424
341040
|
children,
|
|
@@ -342433,29 +341049,29 @@ var SidebarPanel = props => {
|
|
|
342433
341049
|
});
|
|
342434
341050
|
var panelContent = /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
342435
341051
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
342436
|
-
className:
|
|
341052
|
+
className: Sidebar_styles_module.panelHeader,
|
|
342437
341053
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h2", {
|
|
342438
|
-
className:
|
|
341054
|
+
className: Sidebar_styles_module.panelHeading,
|
|
342439
341055
|
children: heading
|
|
342440
341056
|
}), (buttons === null || buttons === void 0 ? void 0 : buttons.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
342441
|
-
className:
|
|
341057
|
+
className: Sidebar_styles_module.panelButtons,
|
|
342442
341058
|
children: buttons
|
|
342443
341059
|
})]
|
|
342444
341060
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
342445
|
-
className:
|
|
341061
|
+
className: Sidebar_styles_module.panelContent,
|
|
342446
341062
|
children: children
|
|
342447
341063
|
}), Footer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
342448
|
-
className:
|
|
341064
|
+
className: Sidebar_styles_module.panelFooter,
|
|
342449
341065
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Footer, {})
|
|
342450
341066
|
})]
|
|
342451
341067
|
});
|
|
342452
341068
|
return isMobile ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
342453
341069
|
"data-testid": "sidebar__panel",
|
|
342454
|
-
className: classnames_default()(
|
|
341070
|
+
className: classnames_default()(Sidebar_styles_module.panel, className, Footer && Sidebar_styles_module.panelWithFooter),
|
|
342455
341071
|
children: panelContent
|
|
342456
341072
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(utils_ResizableWithHandle, {
|
|
342457
341073
|
"data-testid": "sidebar__panel",
|
|
342458
|
-
className: classnames_default()(
|
|
341074
|
+
className: classnames_default()(Sidebar_styles_module.panel, className, Footer && Sidebar_styles_module.panelWithFooter),
|
|
342459
341075
|
defaultWidth: defaultWidth,
|
|
342460
341076
|
defaultHeight: "100%",
|
|
342461
341077
|
handleDirection: "right",
|
|
@@ -342465,271 +341081,6 @@ var SidebarPanel = props => {
|
|
|
342465
341081
|
});
|
|
342466
341082
|
};
|
|
342467
341083
|
/* harmony default export */ const Sidebar_SidebarPanel = (SidebarPanel);
|
|
342468
|
-
;// ./src/assets/icons/file.svg
|
|
342469
|
-
const file_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik04IDE4SDE2VjE2SDhWMThaTTggMTRIMTZWMTJIOFYxNFpNNCAyMlYySDE0TDIwIDhWMjJINFpNMTMgOVY0SDZWMjBIMThWOUgxM1pNNiA0VjlWNFYyMFY0WiIvPg0KPC9zdmc+DQo=";
|
|
342470
|
-
;// ./src/assets/icons/python_file.svg
|
|
342471
|
-
const python_file_namespaceObject = "data:image/svg+xml;base64,PHN2Zw0KICB0aXRsZT0icHl0aG9uIGZpbGUiDQogIGRhdGEtdGVzdGlkPSJweXRob25JY29uIg0KICB3aWR0aD0iMjQiDQogIGhlaWdodD0iMjQiDQogIHZpZXdCb3g9IjAgMCAyNCAyNCINCiAgZmlsbD0ibm9uZSINCiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KPg0KICA8cGF0aCBkPSJNMTEuNTI2OSAxMS42MjYxSDkuMTYxNjNDNy41MDU5MSAxMS42MjYxIDYuNDQxNTIgMTIuNjkwNSA2LjQ0MTUyIDE0LjM0NjJWMTYuNDc1QzYuNDQxNTIgMTYuNzExNSA2LjMyMzI2IDE2LjgyOTggNi4wODY3MyAxNi44Mjk4SDUuMDIyMzRDMy45NTc5NSAxNi44Mjk4IDMuMTMwMDkgMTYuMzU2NyAyLjY1NzAzIDE1LjQxMDZDMi4zMDIyMyAxNC43MDEgMi4wNjU3IDEzLjk5MTQgMi4wNjU3IDEzLjI4MThDMS45NDc0NCAxMS45ODA5IDEuOTQ3NDQgMTAuNjggMi40MjA1IDkuMzc5MDRDMi43NzUzIDguMzE0NjUgMy40ODQ4OSA3LjQ4Njc5IDQuNjY3NTQgNy4yNTAyNkgxMS41MjY5QzExLjY0NTIgNy4yNTAyNiAxMS44ODE3IDcuMjUwMjYgMTEuODgxNyA3LjEzMlY2LjU0MDY3QzExLjg4MTcgNi41NDA2NyAxMS42NDUyIDYuNDIyNCAxMS41MjY5IDYuNDIyNEg3LjUwNTkxQzcuMTUxMTIgNi40MjI0IDcuMDMyODUgNi4zMDQxNCA3LjAzMjg1IDUuOTQ5MzRWNC40MTE4OUM3LjAzMjg1IDMuNTg0MDMgNy4zODc2NSAyLjk5MjcxIDguMDk3MjQgMi43NTYxN0M4LjY4ODU3IDIuNTE5NjQgOS4yNzk4OSAyLjI4MzExIDkuODcxMjIgMi4xNjQ4NUMxMS4yOTA0IDEuOTI4MzIgMTIuNzA5NiAxLjkyODMyIDE0LjEyODggMi4yODMxMUMxNC43MjAxIDIuNDAxMzggMTUuMzExNCAyLjYzNzkxIDE1Ljc4NDUgMi45OTI3MUMxNi4yNTc2IDMuNDY1NzcgMTYuNjEyNCAzLjkzODgzIDE2LjQ5NDEgNC42NDg0MlY4LjkwNTk4QzE2LjQ5NDEgMTAuNTYxNyAxNS41NDggMTEuNTA3OCAxMy44OTIyIDExLjUwNzhDMTMuMDY0NCAxMS42MjYxIDEyLjIzNjUgMTEuNjI2MSAxMS41MjY5IDExLjYyNjFaTTguMjE1NTEgNC41MzAxNkM4LjIxNTUxIDUuMDAzMjIgOC41NzAzIDUuNDc2MjggOS4xNjE2MyA1LjQ3NjI4QzkuNjM0NjkgNS40NzYyOCAxMC4xMDc4IDUuMDAzMjIgMTAuMTA3OCA0LjUzMDE2QzEwLjEwNzggNC4wNTcwOSA5LjYzNDY5IDMuNzAyMyA5LjE2MTYzIDMuNTg0MDNDOC41NzAzIDMuNTg0MDMgOC4yMTU1MSA0LjA1NzA5IDguMjE1NTEgNC41MzAxNlpNMTIuNDczMSAxMi44MDg3SDE0LjgzODRDMTYuNDk0MSAxMi44MDg3IDE3LjU1ODUgMTEuNzQ0MyAxNy41NTg1IDEwLjA4ODZWNy45NTk4NUMxNy41NTg1IDcuNzIzMzIgMTcuNjc2NyA3LjYwNTA2IDE3LjkxMzMgNy42MDUwNkgxOC45Nzc3QzIwLjA0MiA3LjYwNTA2IDIwLjg2OTkgOC4wNzgxMiAyMS4zNDMgOS4wMjQyNEMyMS42OTc4IDkuNzMzODMgMjEuOTM0MyAxMC40NDM0IDIxLjkzNDMgMTEuMTUzQzIyLjA1MjYgMTIuNDUzOSAyMi4wNTI2IDEzLjc1NDkgMjEuNTc5NSAxNS4wNTU4QzIxLjIyNDcgMTYuMTIwMiAyMC41MTUxIDE2Ljk0OCAxOS4zMzI1IDE3LjE4NDZIMTIuNDczMUMxMi4zNTQ4IDE3LjE4NDYgMTIuMTE4MyAxNy4xODQ2IDEyLjExODMgMTcuMzAyOFYxNy44OTQxQzEyLjExODMgMTcuODk0MSAxMi4zNTQ4IDE4LjAxMjQgMTIuNDczMSAxOC4wMTI0SDE2LjQ5NDFDMTYuODQ4OSAxOC4wMTI0IDE2Ljk2NzEgMTguMTMwNyAxNi45NjcxIDE4LjQ4NTVWMjAuMDIyOUMxNi45NjcxIDIwLjg1MDggMTYuNjEyNCAyMS40NDIxIDE1LjkwMjggMjEuNjc4NkMxNS4zMTE0IDIxLjkxNTIgMTQuNzIwMSAyMi4xNTE3IDE0LjEyODggMjIuMjdDMTIuNzA5NiAyMi41MDY1IDExLjI5MDQgMjIuNTA2NSA5Ljg3MTIyIDIyLjE1MTdDOS4yNzk4OSAyMi4wMzM0IDguNjg4NTcgMjEuNzk2OSA4LjIxNTUxIDIxLjQ0MjFDNy43NDI0NCAyMC45NjkgNy4zODc2NSAyMC40OTYgNy41MDU5MSAxOS43ODY0VjE1LjUyODhDNy41MDU5MSAxMy44NzMxIDguNDUyMDQgMTIuOTI3IDEwLjEwNzggMTIuOTI3QzEwLjkzNTYgMTIuODA4NyAxMS43NjM1IDEyLjgwODcgMTIuNDczMSAxMi44MDg3Wk0xNS43ODQ1IDE5LjkwNDdDMTUuNzg0NSAxOS40MzE2IDE1LjQyOTcgMTguOTU4NSAxNC44Mzg0IDE4Ljk1ODVDMTQuMzY1MyAxOC45NTg1IDEzLjg5MjIgMTkuNDMxNiAxMy44OTIyIDE5LjkwNDdDMTMuODkyMiAyMC4zNzc3IDE0LjM2NTMgMjAuNzMyNSAxNC44Mzg0IDIwLjg1MDhDMTUuNDI5NyAyMC44NTA4IDE1Ljc4NDUgMjAuMzc3NyAxNS43ODQ1IDE5LjkwNDdaIiAvPg0KPC9zdmc+DQo=";
|
|
342472
|
-
;// ./src/assets/icons/html_file.svg
|
|
342473
|
-
const html_file_namespaceObject = "data:image/svg+xml;base64,PHN2Zw0KICBkYXRhLXRlc3RpZD0iaHRtbEljb24iDQogIHdpZHRoPSIyNCINCiAgaGVpZ2h0PSIyNCINCiAgdmlld0JveD0iMCAwIDI0IDI0Ig0KICBmaWxsPSJub25lIg0KICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQo+DQogIDxwYXRoIGQ9Ik0yIDExLjEyNUw5LjUgNC4xMjVWNy4zNzVMMy44NzUgMTIuMzc1TDkuNSAxNy4zNzVWMjAuNjI1TDIgMTMuNjI1VjExLjEyNVpNMjIgMTMuNzVMMTQuNSAyMC43NVYxNy4zNzVMMjAuMjUgMTIuMzc1TDE0LjUgNy4zNzVWNEwyMiAxMVYxMy43NVoiIC8+DQo8L3N2Zz4NCg==";
|
|
342474
|
-
;// ./src/assets/icons/css_file.svg
|
|
342475
|
-
const css_file_namespaceObject = "data:image/svg+xml;base64,PHN2Zw0KICBkYXRhLXRlc3RpZD0iY3NzSWNvbiINCiAgd2lkdGg9IjE4Ig0KICBoZWlnaHQ9IjE4Ig0KICB2aWV3Qm94PSIwIDAgMjAgMTgiDQogIGZpbGw9Im5vbmUiDQogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCj4NCiAgPHBhdGggZD0iTTIuMDUzNDkgMTcuNjM3NkwzLjAxOTk0IDEyLjgwNTRILTAuMDAwMTk4MzY0VjEwLjI2ODVIMy42MjM5Nkw0LjIyNzk5IDcuMjQ4MzJIMS4wODcwNVY0LjcxMTQxSDQuODMyMDJMNS43OTg0NiAwSDkuMTgxMDFMOC4yMTQ1NyA0LjcxMTQxSDExLjU5NzFMMTIuNTYzNiAwSDE1Ljk0NjFMMTQuOTc5NyA0LjcxMTQxSDE3Ljk5OThWNy4yNDgzMkgxNC40OTY0TDEzLjc3MTYgMTAuMjY4NUgxNi45MTI2VjEyLjgwNTRIMTMuMjg4NEwxMi4zMjE5IDE3LjYzNzZIOC45Mzk0TDkuOTA1ODQgMTIuODA1NEg2LjUyMzI5TDUuNTU2ODUgMTcuNjM3NkgyLjA1MzQ5Wk0xMC4zODkxIDEwLjI2ODVMMTAuOTkzMSA3LjI0ODMySDcuNjEwNTRMNy4wMDY1MSAxMC4yNjg1SDEwLjM4OTFaIiAvPg0KPC9zdmc+DQo=";
|
|
342476
|
-
;// ./src/assets/icons/csv_file.svg
|
|
342477
|
-
const csv_file_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik0zIDNWMjAuOEgyMVYzSDNaTTUuOSA2LjdIMTFWOEg1LjlWNi43Wk0xMi45IDYuN0gxOFY4SDEyLjlWNi43Wk01LjkgOS43SDExVjExSDUuOVY5LjdaTTEyLjkgOS43SDE4VjExSDEyLjlWOS43Wk01LjkgMTIuN0gxMVYxNEg1LjlWMTIuN1pNMTIuOSAxMi43SDE4VjE0SDEyLjlWMTIuN1pNNS45IDE1LjdIMTFWMTdINS45VjE1LjdaTTEyLjkgMTUuN0gxOFYxN0gxMi45VjE1LjdaIi8+DQo8L3N2Zz4NCg==";
|
|
342478
|
-
;// ./src/utils/FileIcon.jsx
|
|
342479
|
-
|
|
342480
|
-
|
|
342481
|
-
|
|
342482
|
-
|
|
342483
|
-
|
|
342484
|
-
|
|
342485
|
-
|
|
342486
|
-
var FileIcon = _ref => {
|
|
342487
|
-
var {
|
|
342488
|
-
ext
|
|
342489
|
-
} = _ref;
|
|
342490
|
-
switch (ext) {
|
|
342491
|
-
case FILE_EXTENSIONS.py:
|
|
342492
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(python_file_namespaceObject, {
|
|
342493
|
-
"data-testid": "pythonIcon"
|
|
342494
|
-
});
|
|
342495
|
-
case FILE_EXTENSIONS.html:
|
|
342496
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(html_file_namespaceObject, {
|
|
342497
|
-
"data-testid": "htmlIcon"
|
|
342498
|
-
});
|
|
342499
|
-
case FILE_EXTENSIONS.css:
|
|
342500
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(css_file_namespaceObject, {
|
|
342501
|
-
"data-testid": "cssIcon"
|
|
342502
|
-
});
|
|
342503
|
-
case FILE_EXTENSIONS.csv:
|
|
342504
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(csv_file_namespaceObject, {
|
|
342505
|
-
"data-testid": "csvIcon"
|
|
342506
|
-
});
|
|
342507
|
-
default:
|
|
342508
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(file_namespaceObject, {
|
|
342509
|
-
"data-testid": "defaultFileIcon"
|
|
342510
|
-
});
|
|
342511
|
-
}
|
|
342512
|
-
};
|
|
342513
|
-
/* harmony default export */ const utils_FileIcon = (FileIcon);
|
|
342514
|
-
;// ./src/assets/icons/plus.svg
|
|
342515
|
-
const plus_namespaceObject = "data:image/svg+xml;base64,PHN2Zw0KICB3aWR0aD0iMTQiDQogIGhlaWdodD0iMTQiDQogIHZpZXdCb3g9IjAgMCAxNCAxNCINCiAgZmlsbD0ibm9uZSINCiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KPg0KICA8cGF0aCBkPSJNNiAxNFY4SDBWNkg2VjBIOFY2SDE0VjhIOFYxNEg2WiIgLz4NCjwvc3ZnPg0K";
|
|
342516
|
-
;// ./src/components/Menus/Sidebar/FilePanel/FilePanel.jsx
|
|
342517
|
-
|
|
342518
|
-
|
|
342519
|
-
|
|
342520
|
-
|
|
342521
|
-
|
|
342522
|
-
|
|
342523
|
-
|
|
342524
|
-
|
|
342525
|
-
|
|
342526
|
-
|
|
342527
|
-
|
|
342528
|
-
|
|
342529
|
-
|
|
342530
|
-
var FilePanel = _ref => {
|
|
342531
|
-
var {
|
|
342532
|
-
isMobile
|
|
342533
|
-
} = _ref;
|
|
342534
|
-
var project = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.project);
|
|
342535
|
-
var openFiles = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.openFiles);
|
|
342536
|
-
var readOnly = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.readOnly);
|
|
342537
|
-
var {
|
|
342538
|
-
t
|
|
342539
|
-
} = useTranslation_useTranslation();
|
|
342540
|
-
var dispatch = (0,external_react_redux_namespaceObject.useDispatch)();
|
|
342541
|
-
var switchToFileTab = (panelIndex, fileIndex) => {
|
|
342542
|
-
dispatch(setFocussedFileIndex({
|
|
342543
|
-
panelIndex,
|
|
342544
|
-
fileIndex
|
|
342545
|
-
}));
|
|
342546
|
-
};
|
|
342547
|
-
var openFileTab = fileName => {
|
|
342548
|
-
if (openFiles.flat().includes(fileName)) {
|
|
342549
|
-
var panelIndex = openFiles.map(fileNames => fileNames.includes(fileName)).indexOf(true);
|
|
342550
|
-
var fileIndex = openFiles[panelIndex].indexOf(fileName);
|
|
342551
|
-
switchToFileTab(panelIndex, fileIndex);
|
|
342552
|
-
} else {
|
|
342553
|
-
dispatch(openFile(fileName));
|
|
342554
|
-
switchToFileTab(0, openFiles[0].length);
|
|
342555
|
-
}
|
|
342556
|
-
if (isMobile) {
|
|
342557
|
-
dispatch(hideSidebar());
|
|
342558
|
-
}
|
|
342559
|
-
};
|
|
342560
|
-
var openNewFileModal = () => {
|
|
342561
|
-
dispatch(showNewFileModal());
|
|
342562
|
-
};
|
|
342563
|
-
var buttons = readOnly ? [] : [/*#__PURE__*/(0,jsx_runtime.jsx)(DesignSystemButton_DesignSystemButton, {
|
|
342564
|
-
text: t("filePanel.newFileButton"),
|
|
342565
|
-
textAways: true,
|
|
342566
|
-
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(plus_namespaceObject, {}),
|
|
342567
|
-
onClick: openNewFileModal,
|
|
342568
|
-
className: "btn--primary",
|
|
342569
|
-
fill: true
|
|
342570
|
-
})];
|
|
342571
|
-
if (!project || !project.components) {
|
|
342572
|
-
return null;
|
|
342573
|
-
}
|
|
342574
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarPanel, {
|
|
342575
|
-
heading: t("filePanel.files"),
|
|
342576
|
-
buttons: buttons,
|
|
342577
|
-
children: project.components.map((file, i) => /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
342578
|
-
className: "files-list-item-wrapper",
|
|
342579
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DesignSystemButton_DesignSystemButton, {
|
|
342580
|
-
className: "files-list-item",
|
|
342581
|
-
onClick: () => openFileTab("".concat(file.name, ".").concat(file.extension)),
|
|
342582
|
-
text: "".concat(file.name, ".").concat(file.extension),
|
|
342583
|
-
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(utils_FileIcon, {
|
|
342584
|
-
ext: file.extension
|
|
342585
|
-
}),
|
|
342586
|
-
type: "tertiary",
|
|
342587
|
-
textAlways: true,
|
|
342588
|
-
small: true
|
|
342589
|
-
}), readOnly || file.name === "main" && file.extension === FILE_EXTENSIONS.py || file.name === "index" && file.extension === FILE_EXTENSIONS.html ? null : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
342590
|
-
className: "files-list-item__menu",
|
|
342591
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(FileMenu_FileMenu, {
|
|
342592
|
-
fileKey: i,
|
|
342593
|
-
name: file.name,
|
|
342594
|
-
ext: file.extension
|
|
342595
|
-
})
|
|
342596
|
-
})]
|
|
342597
|
-
}, i))
|
|
342598
|
-
});
|
|
342599
|
-
};
|
|
342600
|
-
/* harmony default export */ const FilePanel_FilePanel = (FilePanel);
|
|
342601
|
-
;// ./src/assets/icons/double_arrow_left.svg
|
|
342602
|
-
const double_arrow_left_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik0xMSAxOEw1IDEyTDExIDZMMTIuNCA3LjRMNy44MjUgMTJMMTIuNCAxNi42TDExIDE4Wk0xNy42IDE4TDExLjYgMTJMMTcuNiA2TDE5IDcuNEwxNC40MjUgMTJMMTkgMTYuNkwxNy42IDE4WiIvPg0KPC9zdmc+DQo=";
|
|
342603
|
-
;// ./src/assets/icons/double_arrow_right.svg
|
|
342604
|
-
const double_arrow_right_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik02LjQgMThMNSAxNi42TDkuNTc1IDEyTDUgNy40TDYuNCA2TDEyLjQgMTJMNi40IDE4Wk0xMyAxOEwxMS42IDE2LjZMMTYuMTc1IDEyTDExLjYgNy40TDEzIDZMMTkgMTJMMTMgMThaIi8+DQo8L3N2Zz4NCg==";
|
|
342605
|
-
;// ./src/components/Menus/Sidebar/SidebarBarOption.jsx
|
|
342606
|
-
|
|
342607
|
-
|
|
342608
|
-
|
|
342609
|
-
|
|
342610
|
-
var SidebarBarOption = props => {
|
|
342611
|
-
var {
|
|
342612
|
-
Icon,
|
|
342613
|
-
isActive,
|
|
342614
|
-
name,
|
|
342615
|
-
title,
|
|
342616
|
-
toggleOption
|
|
342617
|
-
} = props;
|
|
342618
|
-
var onClickHandler = () => {
|
|
342619
|
-
toggleOption(name);
|
|
342620
|
-
if (name === "file" && window.plausible) {
|
|
342621
|
-
window.plausible("Side menu open project files");
|
|
342622
|
-
}
|
|
342623
|
-
};
|
|
342624
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
342625
|
-
className: classnames_default()("sidebar__bar-option-wrapper", {
|
|
342626
|
-
"sidebar__bar-option-wrapper--selected": isActive
|
|
342627
|
-
}),
|
|
342628
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button, {
|
|
342629
|
-
className: classnames_default()("sidebar__bar-option", {
|
|
342630
|
-
"sidebar__bar-option--selected": isActive
|
|
342631
|
-
}),
|
|
342632
|
-
ButtonIcon: Icon,
|
|
342633
|
-
title: title,
|
|
342634
|
-
onClickHandler: onClickHandler
|
|
342635
|
-
})
|
|
342636
|
-
});
|
|
342637
|
-
};
|
|
342638
|
-
/* harmony default export */ const Sidebar_SidebarBarOption = (SidebarBarOption);
|
|
342639
|
-
;// ./src/assets/html_icon.svg
|
|
342640
|
-
const html_icon_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxyZWN0IHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcng9IjQiIGZpbGw9IiMxMDFCMjkiLz4NCjxwYXRoIGQ9Ik0xMCAxOC43NUwxNy41IDExLjc1VjE1TDExLjg3NSAyMEwxNy41IDI1VjI4LjI1TDEwIDIxLjI1VjE4Ljc1Wk0zMCAyMS4zNzVMMjIuNSAyOC4zNzVWMjVMMjguMjUgMjBMMjIuNSAxNVYxMS42MjVMMzAgMTguNjI1VjIxLjM3NVoiIGZpbGw9IiM4OERERDQiLz4NCjwvc3ZnPg0K";
|
|
342641
|
-
;// ./src/assets/python_icon.svg
|
|
342642
|
-
const python_icon_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxyZWN0IHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcng9IjQiIGZpbGw9IiMxMDFCMjkiLz4NCjxwYXRoIGQ9Ik0xOS41MDAxIDE5LjM3NUgxNy4wMDAxQzE1LjI1MDEgMTkuMzc1IDE0LjEyNTEgMjAuNSAxNC4xMjUxIDIyLjI1VjI0LjVDMTQuMTI1MSAyNC43NSAxNC4wMDAxIDI0Ljg3NSAxMy43NTAxIDI0Ljg3NUgxMi42MjUxQzExLjUwMDEgMjQuODc1IDEwLjYyNTEgMjQuMzc1IDEwLjEyNTEgMjMuMzc1QzkuNzUwMTEgMjIuNjI1IDkuNTAwMTEgMjEuODc1IDkuNTAwMTEgMjEuMTI1QzkuMzc1MTEgMTkuNzUgOS4zNzUxMSAxOC4zNzUgOS44NzUxMSAxN0MxMC4yNTAxIDE1Ljg3NSAxMS4wMDAxIDE1IDEyLjI1MDEgMTQuNzVIMTkuNTAwMUMxOS42MjUxIDE0Ljc1IDE5Ljg3NTEgMTQuNzUgMTkuODc1MSAxNC42MjVWMTRDMTkuODc1MSAxNCAxOS42MjUxIDEzLjg3NSAxOS41MDAxIDEzLjg3NUgxNS4yNTAxQzE0Ljg3NTEgMTMuODc1IDE0Ljc1MDEgMTMuNzUgMTQuNzUwMSAxMy4zNzVWMTEuNzVDMTQuNzUwMSAxMC44NzUgMTUuMTI1MSAxMC4yNSAxNS44NzUxIDkuOTk5OThDMTYuNTAwMSA5Ljc0OTk4IDE3LjEyNTEgOS40OTk5OCAxNy43NTAxIDkuMzc0OThDMTkuMjUwMSA5LjEyNDk4IDIwLjc1MDEgOS4xMjQ5OCAyMi4yNTAxIDkuNDk5OThDMjIuODc1MSA5LjYyNDk4IDIzLjUwMDEgOS44NzQ5OCAyNC4wMDAxIDEwLjI1QzI0LjUwMDEgMTAuNzUgMjQuODc1MSAxMS4yNSAyNC43NTAxIDEyVjE2LjVDMjQuNzUwMSAxOC4yNSAyMy43NTAxIDE5LjI1IDIyLjAwMDEgMTkuMjVDMjEuMTI1MSAxOS4zNzUgMjAuMjUwMSAxOS4zNzUgMTkuNTAwMSAxOS4zNzVaTTE2LjAwMDEgMTEuODc1QzE2LjAwMDEgMTIuMzc1IDE2LjM3NTEgMTIuODc1IDE3LjAwMDEgMTIuODc1QzE3LjUwMDEgMTIuODc1IDE4LjAwMDEgMTIuMzc1IDE4LjAwMDEgMTEuODc1QzE4LjAwMDEgMTEuMzc1IDE3LjUwMDEgMTEgMTcuMDAwMSAxMC44NzVDMTYuMzc1MSAxMC44NzUgMTYuMDAwMSAxMS4zNzUgMTYuMDAwMSAxMS44NzVaTTIwLjUwMDEgMjAuNjI1SDIzLjAwMDFDMjQuNzUwMSAyMC42MjUgMjUuODc1MSAxOS41IDI1Ljg3NTEgMTcuNzVWMTUuNUMyNS44NzUxIDE1LjI1IDI2LjAwMDEgMTUuMTI1IDI2LjI1MDEgMTUuMTI1SDI3LjM3NTFDMjguNTAwMSAxNS4xMjUgMjkuMzc1MSAxNS42MjUgMjkuODc1MSAxNi42MjVDMzAuMjUwMSAxNy4zNzUgMzAuNTAwMSAxOC4xMjUgMzAuNTAwMSAxOC44NzVDMzAuNjI1MSAyMC4yNSAzMC42MjUxIDIxLjYyNSAzMC4xMjUxIDIzQzI5Ljc1MDEgMjQuMTI1IDI5LjAwMDEgMjUgMjcuNzUwMSAyNS4yNUgyMC41MDAxQzIwLjM3NTEgMjUuMjUgMjAuMTI1MSAyNS4yNSAyMC4xMjUxIDI1LjM3NVYyNkMyMC4xMjUxIDI2IDIwLjM3NTEgMjYuMTI1IDIwLjUwMDEgMjYuMTI1SDI0Ljc1MDFDMjUuMTI1MSAyNi4xMjUgMjUuMjUwMSAyNi4yNSAyNS4yNTAxIDI2LjYyNVYyOC4yNUMyNS4yNTAxIDI5LjEyNSAyNC44NzUxIDI5Ljc1IDI0LjEyNTEgMzBDMjMuNTAwMSAzMC4yNSAyMi44NzUxIDMwLjUgMjIuMjUwMSAzMC42MjVDMjAuNzUwMSAzMC44NzUgMTkuMjUwMSAzMC44NzUgMTcuNzUwMSAzMC41QzE3LjEyNTEgMzAuMzc1IDE2LjUwMDEgMzAuMTI1IDE2LjAwMDEgMjkuNzVDMTUuNTAwMSAyOS4yNSAxNS4xMjUxIDI4Ljc1IDE1LjI1MDEgMjhWMjMuNUMxNS4yNTAxIDIxLjc1IDE2LjI1MDEgMjAuNzUgMTguMDAwMSAyMC43NUMxOC44NzUxIDIwLjYyNSAxOS43NTAxIDIwLjYyNSAyMC41MDAxIDIwLjYyNVpNMjQuMDAwMSAyOC4xMjVDMjQuMDAwMSAyNy42MjUgMjMuNjI1MSAyNy4xMjUgMjMuMDAwMSAyNy4xMjVDMjIuNTAwMSAyNy4xMjUgMjIuMDAwMSAyNy42MjUgMjIuMDAwMSAyOC4xMjVDMjIuMDAwMSAyOC42MjUgMjIuNTAwMSAyOSAyMy4wMDAxIDI5LjEyNUMyMy42MjUxIDI5LjEyNSAyNC4wMDAxIDI4LjYyNSAyNC4wMDAxIDI4LjEyNVoiIGZpbGw9IiM4OURERDUiLz4NCjwvc3ZnPg0K";
|
|
342643
|
-
;// ./src/components/Menus/Sidebar/SidebarBar.jsx
|
|
342644
|
-
|
|
342645
|
-
|
|
342646
|
-
|
|
342647
|
-
|
|
342648
|
-
|
|
342649
|
-
|
|
342650
|
-
|
|
342651
|
-
|
|
342652
|
-
|
|
342653
|
-
|
|
342654
|
-
|
|
342655
|
-
|
|
342656
|
-
|
|
342657
|
-
|
|
342658
|
-
var SidebarBar = props => {
|
|
342659
|
-
var {
|
|
342660
|
-
menuOptions,
|
|
342661
|
-
option,
|
|
342662
|
-
toggleOption
|
|
342663
|
-
} = props;
|
|
342664
|
-
var project = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.project);
|
|
342665
|
-
var {
|
|
342666
|
-
t
|
|
342667
|
-
} = useTranslation_useTranslation();
|
|
342668
|
-
var topMenuOptions = menuOptions.filter(menuOption => menuOption.position === "top");
|
|
342669
|
-
var bottomMenuOptions = menuOptions.filter(menuOption => menuOption.position === "bottom");
|
|
342670
|
-
var isMobile = (0,react_responsive.useMediaQuery)({
|
|
342671
|
-
query: MOBILE_MEDIA_QUERY
|
|
342672
|
-
});
|
|
342673
|
-
var expandPopOut = () => {
|
|
342674
|
-
var option = "file";
|
|
342675
|
-
toggleOption(option);
|
|
342676
|
-
if (window.plausible) {
|
|
342677
|
-
// TODO: Make dynamic events for each option or rename this event
|
|
342678
|
-
window.plausible("Expand file pane");
|
|
342679
|
-
}
|
|
342680
|
-
};
|
|
342681
|
-
var collapsePopOut = () => {
|
|
342682
|
-
toggleOption(option);
|
|
342683
|
-
if (window.plausible) {
|
|
342684
|
-
window.plausible("Collapse file pane");
|
|
342685
|
-
}
|
|
342686
|
-
};
|
|
342687
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
342688
|
-
className: classnames_default()("sidebar__bar", {
|
|
342689
|
-
"sidebar__bar--selected": option
|
|
342690
|
-
}),
|
|
342691
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
342692
|
-
className: "sidebar__bar-options--top",
|
|
342693
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
342694
|
-
className: "editor-logo",
|
|
342695
|
-
src: project.project_type === PROJECT_TYPES.python ? python_icon_namespaceObject : html_icon_namespaceObject,
|
|
342696
|
-
alt: t("header.editorLogoAltText")
|
|
342697
|
-
}), topMenuOptions.map((menuOption, i) => /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarBarOption, {
|
|
342698
|
-
Icon: menuOption.icon,
|
|
342699
|
-
title: menuOption.title,
|
|
342700
|
-
isActive: option === menuOption.name,
|
|
342701
|
-
toggleOption: toggleOption,
|
|
342702
|
-
name: menuOption.name
|
|
342703
|
-
}, i))]
|
|
342704
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
342705
|
-
className: "sidebar__bar-options--bottom",
|
|
342706
|
-
children: [bottomMenuOptions.map((menuOption, i) => /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarBarOption, {
|
|
342707
|
-
Icon: menuOption.icon,
|
|
342708
|
-
title: menuOption.title,
|
|
342709
|
-
isActive: option === menuOption.name,
|
|
342710
|
-
toggleOption: toggleOption,
|
|
342711
|
-
name: menuOption.name
|
|
342712
|
-
}, i)), !isMobile && (option ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
342713
|
-
className: "sidebar__bar-option-wrapper",
|
|
342714
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button, {
|
|
342715
|
-
className: "sidebar__bar-option",
|
|
342716
|
-
ButtonIcon: double_arrow_left_namespaceObject,
|
|
342717
|
-
title: t("sidebar.collapse"),
|
|
342718
|
-
onClickHandler: collapsePopOut
|
|
342719
|
-
})
|
|
342720
|
-
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
342721
|
-
className: "sidebar__bar-option-wrapper",
|
|
342722
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button, {
|
|
342723
|
-
className: "sidebar__bar-option",
|
|
342724
|
-
ButtonIcon: double_arrow_right_namespaceObject,
|
|
342725
|
-
title: t("sidebar.expand"),
|
|
342726
|
-
onClickHandler: expandPopOut
|
|
342727
|
-
})
|
|
342728
|
-
}))]
|
|
342729
|
-
})]
|
|
342730
|
-
});
|
|
342731
|
-
};
|
|
342732
|
-
/* harmony default export */ const Sidebar_SidebarBar = (SidebarBar);
|
|
342733
341084
|
// EXTERNAL MODULE: ./node_modules/cookie/index.js
|
|
342734
341085
|
var cookie = __webpack_require__(57427);
|
|
342735
341086
|
;// ./node_modules/universal-cookie/es6/utils.js
|
|
@@ -342939,7 +341290,24 @@ function shouldUpdate(dependencies, newCookies, oldCookies) {
|
|
|
342939
341290
|
// extracted by mini-css-extract-plugin
|
|
342940
341291
|
|
|
342941
341292
|
;// ./src/assets/icons/select_buttons_tick.svg
|
|
342942
|
-
|
|
341293
|
+
var _rect, select_buttons_tick_path;
|
|
341294
|
+
function select_buttons_tick_extends() { return select_buttons_tick_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, select_buttons_tick_extends.apply(null, arguments); }
|
|
341295
|
+
|
|
341296
|
+
function SvgSelectButtonsTick(props) {
|
|
341297
|
+
return /*#__PURE__*/external_react_.createElement("svg", select_buttons_tick_extends({
|
|
341298
|
+
width: 24,
|
|
341299
|
+
height: 24,
|
|
341300
|
+
fill: "none",
|
|
341301
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
341302
|
+
}, props), _rect || (_rect = /*#__PURE__*/external_react_.createElement("rect", {
|
|
341303
|
+
width: 24,
|
|
341304
|
+
height: 24,
|
|
341305
|
+
rx: 12
|
|
341306
|
+
})), select_buttons_tick_path || (select_buttons_tick_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
341307
|
+
d: "M9.958 17l-4.75-4.75 1.188-1.187 3.562 3.562 7.646-7.646 1.188 1.188L9.958 17z"
|
|
341308
|
+
})));
|
|
341309
|
+
}
|
|
341310
|
+
/* harmony default export */ const select_buttons_tick = (SvgSelectButtonsTick);
|
|
342943
341311
|
;// ./src/utils/SelectButtons.jsx
|
|
342944
341312
|
|
|
342945
341313
|
|
|
@@ -342973,7 +341341,7 @@ var SelectButtons = _ref => {
|
|
|
342973
341341
|
htmlFor: "".concat(label, "-option").concat(i),
|
|
342974
341342
|
children: [option.Icon ? /*#__PURE__*/(0,jsx_runtime.jsx)(option.Icon, {}) : null, option.label, /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
342975
341343
|
className: "select-buttons__tick".concat(option.value === value ? " select-buttons__tick--selected" : ""),
|
|
342976
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
341344
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(select_buttons_tick, {})
|
|
342977
341345
|
})]
|
|
342978
341346
|
})]
|
|
342979
341347
|
}, i))
|
|
@@ -343026,11 +341394,50 @@ var ThemeToggle = () => {
|
|
|
343026
341394
|
};
|
|
343027
341395
|
/* harmony default export */ const ThemeToggle_ThemeToggle = (ThemeToggle);
|
|
343028
341396
|
;// ./src/assets/icons/font_icon_lg.svg
|
|
343029
|
-
|
|
341397
|
+
var font_icon_lg_path;
|
|
341398
|
+
function font_icon_lg_extends() { return font_icon_lg_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, font_icon_lg_extends.apply(null, arguments); }
|
|
341399
|
+
|
|
341400
|
+
function SvgFontIconLg(props) {
|
|
341401
|
+
return /*#__PURE__*/external_react_.createElement("svg", font_icon_lg_extends({
|
|
341402
|
+
width: 24,
|
|
341403
|
+
height: 24,
|
|
341404
|
+
fill: "none",
|
|
341405
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
341406
|
+
}, props), font_icon_lg_path || (font_icon_lg_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
341407
|
+
d: "M7.307 3c.465 0 .882.285 1.05.72l2.34 6.079-1.205 3.108a1.132 1.132 0 01-.052-.116l-.456-1.183H5.63l-.456 1.183a1.126 1.126 0 11-2.1-.81L6.26 3.72A1.126 1.126 0 017.309 3h-.002zm-.81 6.356h1.62l-.81-2.102-.81 2.102zm8.791-2.649a1.125 1.125 0 00-2.1 0L8.59 18.74a1.124 1.124 0 00-1.111 1.14 1.127 1.127 0 001.138 1.113h.68c.047.002.093.002.139 0l1.432-.005a1.124 1.124 0 001.123-1.06A1.127 1.127 0 0011 18.742l.574-1.501h5.332l.578 1.513a1.124 1.124 0 00-.993 1.185A1.127 1.127 0 0017.615 21l2.25-.006A1.124 1.124 0 0021 19.878a1.128 1.128 0 00-1.114-1.136l-1.122-2.936a1.14 1.14 0 00-.07-.184L15.29 6.709l-.002-.002zm.756 8.28h-3.611l1.805-4.726 1.806 4.726z"
|
|
341408
|
+
})));
|
|
341409
|
+
}
|
|
341410
|
+
/* harmony default export */ const font_icon_lg = (SvgFontIconLg);
|
|
343030
341411
|
;// ./src/assets/icons/font_icon_rg.svg
|
|
343031
|
-
|
|
341412
|
+
var font_icon_rg_path;
|
|
341413
|
+
function font_icon_rg_extends() { return font_icon_rg_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, font_icon_rg_extends.apply(null, arguments); }
|
|
341414
|
+
|
|
341415
|
+
function SvgFontIconRg(props) {
|
|
341416
|
+
return /*#__PURE__*/external_react_.createElement("svg", font_icon_rg_extends({
|
|
341417
|
+
width: 24,
|
|
341418
|
+
height: 24,
|
|
341419
|
+
fill: "none",
|
|
341420
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
341421
|
+
}, props), font_icon_rg_path || (font_icon_rg_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
341422
|
+
d: "M8.35 5c.362 0 .686.222.816.56l1.821 4.728-.938 2.417a.888.888 0 01-.04-.09l-.355-.92H7.046l-.354.92a.875.875 0 11-1.633-.63L7.535 5.56A.876.876 0 018.35 5zm-.63 4.943h1.26l-.63-1.635-.63 1.635zm6.837-2.06a.876.876 0 00-1.634 0l-3.575 9.36a.874.874 0 00-.864.886.877.877 0 00.885.865h.53a.874.874 0 00.107 0l1.114-.003a.874.874 0 00.67-1.44.875.875 0 00-.568-.306l.446-1.168h4.147l.45 1.177a.875.875 0 00-.499 1.508.874.874 0 00.601.238l1.75-.005a.874.874 0 00.633-1.49.874.874 0 00-.617-.261l-.872-2.284a.87.87 0 00-.055-.143L14.56 7.885l-.002-.002zm.588 6.44h-2.808l1.404-3.675 1.404 3.675z"
|
|
341423
|
+
})));
|
|
341424
|
+
}
|
|
341425
|
+
/* harmony default export */ const font_icon_rg = (SvgFontIconRg);
|
|
343032
341426
|
;// ./src/assets/icons/font_icon_sm.svg
|
|
343033
|
-
|
|
341427
|
+
var font_icon_sm_path;
|
|
341428
|
+
function font_icon_sm_extends() { return font_icon_sm_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, font_icon_sm_extends.apply(null, arguments); }
|
|
341429
|
+
|
|
341430
|
+
function SvgFontIconSm(props) {
|
|
341431
|
+
return /*#__PURE__*/external_react_.createElement("svg", font_icon_sm_extends({
|
|
341432
|
+
width: 24,
|
|
341433
|
+
height: 24,
|
|
341434
|
+
fill: "none",
|
|
341435
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
341436
|
+
}, props), font_icon_sm_path || (font_icon_sm_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
341437
|
+
d: "M9.393 7c.258 0 .49.158.583.4l1.3 3.377-.67 1.727a.628.628 0 01-.028-.064l-.254-.658H8.461l-.253.658a.625.625 0 11-1.166-.45L8.81 7.4a.626.626 0 01.583-.4h-.001zm-.45 3.531h.9l-.45-1.168-.45 1.168zm4.884-1.471a.626.626 0 00-1.168 0l-2.553 6.685a.625.625 0 00.015 1.25h.378a.612.612 0 00.077 0l.795-.002a.624.624 0 00.073-1.247l.32-.834h2.96l.322.84A.624.624 0 0015.12 17l1.25-.003a.624.624 0 00.451-1.064.625.625 0 00-.44-.188l-.623-1.63a.627.627 0 00-.04-.103l-1.89-4.952h-.001zm.42 4.6H12.24l1.003-2.626 1.004 2.625z"
|
|
341438
|
+
})));
|
|
341439
|
+
}
|
|
341440
|
+
/* harmony default export */ const font_icon_sm = (SvgFontIconSm);
|
|
343034
341441
|
;// ./src/components/Menus/Sidebar/SettingsPanel/FontSizeSelector/FontSizeSelector.jsx
|
|
343035
341442
|
|
|
343036
341443
|
|
|
@@ -343064,15 +341471,15 @@ var FontSizeSelector = () => {
|
|
|
343064
341471
|
options: [{
|
|
343065
341472
|
value: "small",
|
|
343066
341473
|
label: t("sidebar.settingsMenu.textSizeOptions.small"),
|
|
343067
|
-
Icon:
|
|
341474
|
+
Icon: font_icon_sm
|
|
343068
341475
|
}, {
|
|
343069
341476
|
value: "medium",
|
|
343070
341477
|
label: t("sidebar.settingsMenu.textSizeOptions.medium"),
|
|
343071
|
-
Icon:
|
|
341478
|
+
Icon: font_icon_rg
|
|
343072
341479
|
}, {
|
|
343073
341480
|
value: "large",
|
|
343074
341481
|
label: t("sidebar.settingsMenu.textSizeOptions.large"),
|
|
343075
|
-
Icon:
|
|
341482
|
+
Icon: font_icon_lg
|
|
343076
341483
|
}],
|
|
343077
341484
|
value: fontSize,
|
|
343078
341485
|
setValue: setFontSize
|
|
@@ -343105,158 +341512,118 @@ var SettingsPanel = () => {
|
|
|
343105
341512
|
});
|
|
343106
341513
|
};
|
|
343107
341514
|
/* harmony default export */ const SettingsPanel_SettingsPanel = (SettingsPanel);
|
|
343108
|
-
;// ./src/assets/icons/
|
|
343109
|
-
|
|
343110
|
-
|
|
343111
|
-
|
|
343112
|
-
|
|
343113
|
-
|
|
343114
|
-
|
|
343115
|
-
|
|
343116
|
-
|
|
343117
|
-
|
|
343118
|
-
|
|
343119
|
-
|
|
343120
|
-
|
|
343121
|
-
|
|
343122
|
-
|
|
343123
|
-
|
|
343124
|
-
|
|
343125
|
-
|
|
343126
|
-
|
|
343127
|
-
|
|
343128
|
-
|
|
343129
|
-
|
|
343130
|
-
var {
|
|
343131
|
-
t
|
|
343132
|
-
} = useTranslation_useTranslation();
|
|
343133
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
343134
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
343135
|
-
className: classnames_default()("project-info", className),
|
|
343136
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("label", {
|
|
343137
|
-
htmlFor: "project_type",
|
|
343138
|
-
className: "project-type__label",
|
|
343139
|
-
children: t("projectsPanel.projectTypeLabel")
|
|
343140
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
343141
|
-
className: "project-type__text",
|
|
343142
|
-
children: t("projectTypes.".concat(project_type))
|
|
343143
|
-
})]
|
|
343144
|
-
})
|
|
343145
|
-
});
|
|
343146
|
-
};
|
|
343147
|
-
/* harmony default export */ const ProjectInfo_ProjectInfo = (ProjectInfo);
|
|
343148
|
-
;// ./src/components/Menus/Sidebar/ProjectsPanel/ProjectsPanel.jsx
|
|
343149
|
-
|
|
343150
|
-
|
|
343151
|
-
|
|
343152
|
-
|
|
343153
|
-
|
|
343154
|
-
|
|
343155
|
-
|
|
343156
|
-
|
|
343157
|
-
|
|
343158
|
-
|
|
343159
|
-
|
|
343160
|
-
|
|
343161
|
-
|
|
343162
|
-
|
|
343163
|
-
|
|
343164
|
-
|
|
343165
|
-
var ProjectsPanel = () => {
|
|
343166
|
-
var {
|
|
343167
|
-
t
|
|
343168
|
-
} = useTranslation_useTranslation();
|
|
343169
|
-
var isLoggedIn = (0,external_react_redux_namespaceObject.useSelector)(state => {
|
|
343170
|
-
var _state$auth;
|
|
343171
|
-
return state === null || state === void 0 || (_state$auth = state.auth) === null || _state$auth === void 0 ? void 0 : _state$auth.user;
|
|
343172
|
-
});
|
|
343173
|
-
var isMobile = (0,react_responsive.useMediaQuery)({
|
|
343174
|
-
query: MOBILE_MEDIA_QUERY
|
|
343175
|
-
});
|
|
343176
|
-
var readOnly = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.readOnly);
|
|
343177
|
-
var saveOptions = /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
343178
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
343179
|
-
className: "projects-panel__save",
|
|
343180
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(SaveButton_SaveButton, {
|
|
343181
|
-
className: "projects-panel__save-button"
|
|
343182
|
-
})
|
|
343183
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
343184
|
-
className: "projects-panel__save-status",
|
|
343185
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(SaveStatus_SaveStatus, {
|
|
343186
|
-
isMobile: isMobile
|
|
343187
|
-
})
|
|
343188
|
-
})]
|
|
343189
|
-
});
|
|
343190
|
-
var navigateToProjectsPage = () => {
|
|
343191
|
-
document.dispatchEvent(navigateToProjectsPageEvent);
|
|
343192
|
-
};
|
|
343193
|
-
var buttons = isLoggedIn ? [/*#__PURE__*/(0,jsx_runtime.jsx)(DesignSystemButton_DesignSystemButton, {
|
|
343194
|
-
className: "btn--primary projects-panel__your-projects-button",
|
|
343195
|
-
onClick: navigateToProjectsPage,
|
|
343196
|
-
text: t("projectsPanel.yourProjectsButton"),
|
|
343197
|
-
textAlways: true
|
|
343198
|
-
}, "your-projects")] : [];
|
|
343199
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)(Sidebar_SidebarPanel, {
|
|
343200
|
-
heading: t("projectsPanel.projects"),
|
|
343201
|
-
buttons: buttons,
|
|
343202
|
-
className: "projects-panel-wrapper",
|
|
343203
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ProjectName_ProjectName, {
|
|
343204
|
-
showLabel: true,
|
|
343205
|
-
className: "projects-panel__item",
|
|
343206
|
-
editable: !readOnly
|
|
343207
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProjectInfo_ProjectInfo, {
|
|
343208
|
-
className: "projects-panel__item"
|
|
343209
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
343210
|
-
className: "projects-panel__button",
|
|
343211
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton_DownloadButton, {
|
|
343212
|
-
buttonText: t("header.download"),
|
|
343213
|
-
className: "projects-panel__download-button",
|
|
343214
|
-
Icon: download_namespaceObject
|
|
343215
|
-
})
|
|
343216
|
-
}), isMobile && saveOptions]
|
|
343217
|
-
});
|
|
343218
|
-
};
|
|
343219
|
-
/* harmony default export */ const ProjectsPanel_ProjectsPanel = (ProjectsPanel);
|
|
343220
|
-
;// ./src/assets/stylesheets/DownloadPanel.scss
|
|
343221
|
-
// extracted by mini-css-extract-plugin
|
|
343222
|
-
|
|
343223
|
-
;// ./src/components/Menus/Sidebar/DownloadPanel/DownloadPanel.jsx
|
|
343224
|
-
|
|
343225
|
-
|
|
343226
|
-
|
|
343227
|
-
|
|
343228
|
-
|
|
343229
|
-
|
|
343230
|
-
|
|
343231
|
-
|
|
341515
|
+
;// ./src/assets/icons/tj-file.svg
|
|
341516
|
+
var tj_file_path;
|
|
341517
|
+
function tj_file_extends() { return tj_file_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, tj_file_extends.apply(null, arguments); }
|
|
341518
|
+
|
|
341519
|
+
function SvgTjFile(props) {
|
|
341520
|
+
return /*#__PURE__*/external_react_.createElement("svg", tj_file_extends({
|
|
341521
|
+
width: 22,
|
|
341522
|
+
height: 20,
|
|
341523
|
+
fill: "none",
|
|
341524
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
341525
|
+
}, props), tj_file_path || (tj_file_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
341526
|
+
d: "M10.75 8.75v6m-3-3h6m7 5a2 2 0 01-2 2h-16a2 2 0 01-2-2v-14a2 2 0 012-2h5l2 3h9a2 2 0 012 2v11z",
|
|
341527
|
+
stroke: "#33625E",
|
|
341528
|
+
strokeWidth: 1.5,
|
|
341529
|
+
strokeLinecap: "round",
|
|
341530
|
+
strokeLinejoin: "round"
|
|
341531
|
+
})));
|
|
341532
|
+
}
|
|
341533
|
+
/* harmony default export */ const tj_file = (SvgTjFile);
|
|
341534
|
+
;// ./src/assets/icons/tj-activity.svg
|
|
341535
|
+
var tj_activity_path;
|
|
341536
|
+
function tj_activity_extends() { return tj_activity_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, tj_activity_extends.apply(null, arguments); }
|
|
343232
341537
|
|
|
341538
|
+
function SvgTjActivity(props) {
|
|
341539
|
+
return /*#__PURE__*/external_react_.createElement("svg", tj_activity_extends({
|
|
341540
|
+
width: 24,
|
|
341541
|
+
height: 24,
|
|
341542
|
+
fill: "none",
|
|
341543
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
341544
|
+
}, props), tj_activity_path || (tj_activity_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
341545
|
+
d: "M12 7a4 4 0 014-4h5a1 1 0 011 1v13a1 1 0 01-1 1h-6a3 3 0 00-3 3m0-14v14m0-14a4 4 0 00-4-4H3a1 1 0 00-1 1v13a1 1 0 001 1h6a3 3 0 013 3m0-14v14",
|
|
341546
|
+
stroke: "#33625E",
|
|
341547
|
+
strokeWidth: 1.5,
|
|
341548
|
+
strokeLinecap: "round",
|
|
341549
|
+
strokeLinejoin: "round"
|
|
341550
|
+
})));
|
|
341551
|
+
}
|
|
341552
|
+
/* harmony default export */ const tj_activity = (SvgTjActivity);
|
|
341553
|
+
;// ./src/assets/icons/tj-font.svg
|
|
341554
|
+
var tj_font_path, tj_font_path2, _g;
|
|
341555
|
+
function tj_font_extends() { return tj_font_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, tj_font_extends.apply(null, arguments); }
|
|
343233
341556
|
|
|
341557
|
+
function SvgTjFont(props) {
|
|
341558
|
+
return /*#__PURE__*/external_react_.createElement("svg", tj_font_extends({
|
|
341559
|
+
width: 27,
|
|
341560
|
+
height: 25,
|
|
341561
|
+
fill: "none",
|
|
341562
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
341563
|
+
}, props), tj_font_path || (tj_font_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
341564
|
+
d: "M19.46 6.359L14.505 20H12.48l5.706-14.967h1.305l-.03 1.326zM23.613 20L18.648 6.359l-.03-1.326h1.305L25.649 20h-2.036zm-.257-5.54v1.623h-8.409V14.46h8.41z",
|
|
341565
|
+
fill: "#33625E"
|
|
341566
|
+
})), /*#__PURE__*/external_react_.createElement("mask", {
|
|
341567
|
+
id: "tj-font_svg__a",
|
|
341568
|
+
style: {
|
|
341569
|
+
maskType: "alpha"
|
|
341570
|
+
},
|
|
341571
|
+
maskUnits: "userSpaceOnUse",
|
|
341572
|
+
x: 0,
|
|
341573
|
+
y: 9,
|
|
341574
|
+
width: 15,
|
|
341575
|
+
height: 13
|
|
341576
|
+
}, tj_font_path2 || (tj_font_path2 = /*#__PURE__*/external_react_.createElement("path", {
|
|
341577
|
+
fillRule: "evenodd",
|
|
341578
|
+
clipRule: "evenodd",
|
|
341579
|
+
d: "M10.366 21.061l3.828-11.483-10.366.545L0 21.606l10.366-.545z",
|
|
341580
|
+
fill: "#fff"
|
|
341581
|
+
}))), _g || (_g = /*#__PURE__*/external_react_.createElement("g", {
|
|
341582
|
+
mask: "url(#tj-font_svg__a)"
|
|
341583
|
+
}, /*#__PURE__*/external_react_.createElement("path", {
|
|
341584
|
+
d: "M10.062 11.574l-2.785 8.082H5.593l3.509-9.324h1.076l-.116 1.242zm2.331 8.082l-2.792-8.082-.121-1.242h1.082l3.522 9.324h-1.69zm-.134-3.458v1.274H7.187v-1.274h5.072z",
|
|
341585
|
+
fill: "#33625E"
|
|
341586
|
+
}))));
|
|
341587
|
+
}
|
|
341588
|
+
/* harmony default export */ const tj_font = (SvgTjFont);
|
|
341589
|
+
;// ./src/assets/icons/tj-home.svg
|
|
341590
|
+
var tj_home_path;
|
|
341591
|
+
function tj_home_extends() { return tj_home_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, tj_home_extends.apply(null, arguments); }
|
|
343234
341592
|
|
|
341593
|
+
function SvgTjHome(props) {
|
|
341594
|
+
return /*#__PURE__*/external_react_.createElement("svg", tj_home_extends({
|
|
341595
|
+
width: 20,
|
|
341596
|
+
height: 22,
|
|
341597
|
+
fill: "none",
|
|
341598
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
341599
|
+
}, props), tj_home_path || (tj_home_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
341600
|
+
d: "M6.75 20.75v-10h6v10m-12-13l9-7 9 7v11a2 2 0 01-2 2h-14a2 2 0 01-2-2v-11z",
|
|
341601
|
+
stroke: "#33625E",
|
|
341602
|
+
strokeWidth: 1.5,
|
|
341603
|
+
strokeLinecap: "round",
|
|
341604
|
+
strokeLinejoin: "round"
|
|
341605
|
+
})));
|
|
341606
|
+
}
|
|
341607
|
+
/* harmony default export */ const tj_home = (SvgTjHome);
|
|
341608
|
+
;// ./src/assets/icons/tj-playground.svg
|
|
341609
|
+
var tj_playground_path;
|
|
341610
|
+
function tj_playground_extends() { return tj_playground_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, tj_playground_extends.apply(null, arguments); }
|
|
343235
341611
|
|
|
343236
|
-
|
|
343237
|
-
|
|
343238
|
-
|
|
343239
|
-
|
|
343240
|
-
|
|
343241
|
-
|
|
343242
|
-
|
|
343243
|
-
|
|
343244
|
-
|
|
343245
|
-
|
|
343246
|
-
|
|
343247
|
-
|
|
343248
|
-
|
|
343249
|
-
|
|
343250
|
-
|
|
343251
|
-
Icon: download_namespaceObject,
|
|
343252
|
-
fill: true
|
|
343253
|
-
})]
|
|
343254
|
-
}), !projectOwner && /*#__PURE__*/(0,jsx_runtime.jsx)(SaveButton_SaveButton, {
|
|
343255
|
-
fill: true
|
|
343256
|
-
})]
|
|
343257
|
-
});
|
|
343258
|
-
};
|
|
343259
|
-
/* harmony default export */ const DownloadPanel_DownloadPanel = (DownloadPanel);
|
|
341612
|
+
function SvgTjPlayground(props) {
|
|
341613
|
+
return /*#__PURE__*/external_react_.createElement("svg", tj_playground_extends({
|
|
341614
|
+
width: 20,
|
|
341615
|
+
height: 19,
|
|
341616
|
+
fill: "none",
|
|
341617
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
341618
|
+
}, props), tj_playground_path || (tj_playground_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
341619
|
+
d: "M8.707 1.307a1 1 0 011.793 0l1.961 3.973a1 1 0 00.752.547l4.387.64a1 1 0 01.553 1.707l-3.173 3.09a1 1 0 00-.288.885l.749 4.364a1 1 0 01-1.451 1.054l-3.921-2.062a1 1 0 00-.93 0l-3.922 2.062a1 1 0 01-1.45-1.054l.748-4.364a1 1 0 00-.288-.885l-3.173-3.09a1 1 0 01.553-1.706l4.387-.641a1 1 0 00.752-.547l1.96-3.973z",
|
|
341620
|
+
stroke: "#33625E",
|
|
341621
|
+
strokeWidth: 1.5,
|
|
341622
|
+
strokeLinecap: "round",
|
|
341623
|
+
strokeLinejoin: "round"
|
|
341624
|
+
})));
|
|
341625
|
+
}
|
|
341626
|
+
/* harmony default export */ const tj_playground = (SvgTjPlayground);
|
|
343260
341627
|
;// ./src/components/Menus/Sidebar/Sidebar.jsx
|
|
343261
341628
|
|
|
343262
341629
|
|
|
@@ -343273,60 +341640,60 @@ var DownloadPanel = () => {
|
|
|
343273
341640
|
|
|
343274
341641
|
|
|
343275
341642
|
|
|
343276
|
-
|
|
343277
|
-
|
|
343278
341643
|
var Sidebar = _ref => {
|
|
343279
341644
|
var {
|
|
343280
|
-
options = []
|
|
343281
|
-
plugins = []
|
|
341645
|
+
options = []
|
|
343282
341646
|
} = _ref;
|
|
343283
|
-
var {
|
|
343284
|
-
t
|
|
343285
|
-
} = useTranslation_useTranslation();
|
|
343286
341647
|
var menuOptions = [{
|
|
343287
|
-
name: "
|
|
343288
|
-
icon:
|
|
343289
|
-
title:
|
|
343290
|
-
position: "top"
|
|
343291
|
-
panel:
|
|
341648
|
+
name: "files",
|
|
341649
|
+
icon: tj_file,
|
|
341650
|
+
title: "Files",
|
|
341651
|
+
position: "top"
|
|
341652
|
+
// panel: FilePanel,
|
|
341653
|
+
}, {
|
|
341654
|
+
name: "activity",
|
|
341655
|
+
icon: tj_activity,
|
|
341656
|
+
title: "Activity",
|
|
341657
|
+
position: "top"
|
|
343292
341658
|
}, {
|
|
343293
|
-
name: "
|
|
343294
|
-
icon:
|
|
343295
|
-
title:
|
|
343296
|
-
position: "top"
|
|
343297
|
-
panel: FilePanel_FilePanel
|
|
341659
|
+
name: "playground",
|
|
341660
|
+
icon: tj_playground,
|
|
341661
|
+
title: "Playground",
|
|
341662
|
+
position: "top"
|
|
343298
341663
|
}, {
|
|
343299
|
-
name: "
|
|
343300
|
-
icon:
|
|
343301
|
-
title:
|
|
343302
|
-
position: "top"
|
|
343303
|
-
panel: DownloadPanel_DownloadPanel
|
|
341664
|
+
name: "home",
|
|
341665
|
+
icon: tj_home,
|
|
341666
|
+
title: "Home",
|
|
341667
|
+
position: "top"
|
|
343304
341668
|
}, {
|
|
343305
|
-
name: "
|
|
343306
|
-
icon:
|
|
343307
|
-
title:
|
|
341669
|
+
name: "fonts",
|
|
341670
|
+
icon: tj_font,
|
|
341671
|
+
title: "Fonts",
|
|
343308
341672
|
position: "bottom",
|
|
343309
341673
|
panel: SettingsPanel_SettingsPanel
|
|
341674
|
+
},
|
|
341675
|
+
//should be introduced in the later phases
|
|
341676
|
+
// {
|
|
341677
|
+
// name: "theme",
|
|
341678
|
+
// icon: ThemeIcon,
|
|
341679
|
+
// title: "Theme",
|
|
341680
|
+
// position: "bottom",
|
|
341681
|
+
// panel: SettingsPanel,
|
|
341682
|
+
// },
|
|
341683
|
+
{
|
|
341684
|
+
name: "user",
|
|
341685
|
+
buttonText: "MF",
|
|
341686
|
+
title: "User account",
|
|
341687
|
+
position: "bottom"
|
|
343310
341688
|
}].filter(option => options.includes(option.name));
|
|
343311
|
-
var pluginMenuOptions = plugins.map(plugin => {
|
|
343312
|
-
return {
|
|
343313
|
-
name: plugin.name,
|
|
343314
|
-
icon: plugin.icon,
|
|
343315
|
-
title: plugin.title,
|
|
343316
|
-
position: plugin.position || "top",
|
|
343317
|
-
panel: () => /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarPanel, {
|
|
343318
|
-
heading: plugin.heading,
|
|
343319
|
-
buttons: plugin.buttons || [],
|
|
343320
|
-
children: plugin.panel()
|
|
343321
|
-
})
|
|
343322
|
-
};
|
|
343323
|
-
});
|
|
343324
|
-
menuOptions = [...menuOptions, ...pluginMenuOptions];
|
|
343325
341689
|
var isMobile = (0,react_responsive.useMediaQuery)({
|
|
343326
341690
|
query: MOBILE_MEDIA_QUERY
|
|
343327
341691
|
});
|
|
343328
|
-
var
|
|
343329
|
-
|
|
341692
|
+
var [option, setOption] = (0,external_react_.useState)(() => {
|
|
341693
|
+
var _menuOptions$find;
|
|
341694
|
+
var defaultOption = ((_menuOptions$find = menuOptions.find(o => o.position === "top")) === null || _menuOptions$find === void 0 ? void 0 : _menuOptions$find.name) || "files";
|
|
341695
|
+
return menuOptions.length > 0 ? defaultOption : null;
|
|
341696
|
+
});
|
|
343330
341697
|
var toggleOption = newOption => {
|
|
343331
341698
|
if (option !== newOption) {
|
|
343332
341699
|
setOption(newOption);
|
|
@@ -343334,13 +341701,11 @@ var Sidebar = _ref => {
|
|
|
343334
341701
|
setOption(null);
|
|
343335
341702
|
}
|
|
343336
341703
|
};
|
|
343337
|
-
var
|
|
343338
|
-
|
|
343339
|
-
});
|
|
343340
|
-
var CustomSidebarPanel = optionDict && optionDict.panel ? optionDict.panel : () => {};
|
|
341704
|
+
var activeOption = menuOptions.find(opt => opt.name === option);
|
|
341705
|
+
var CustomSidebarPanel = (activeOption === null || activeOption === void 0 ? void 0 : activeOption.panel) || (() => null);
|
|
343341
341706
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
343342
|
-
className: classnames_default()(
|
|
343343
|
-
|
|
341707
|
+
className: classnames_default()(Sidebar_styles_module.sidebar, {
|
|
341708
|
+
[Sidebar_styles_module.mobile]: isMobile
|
|
343344
341709
|
}),
|
|
343345
341710
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarBar, {
|
|
343346
341711
|
menuOptions: menuOptions,
|
|
@@ -380864,7 +379229,7 @@ const pseudoClasses = /*@__PURE__*/[
|
|
|
380864
379229
|
"required", "right", "root", "scope", "selection", "slotted", "target",
|
|
380865
379230
|
"target-text", "valid", "visited", "where"
|
|
380866
379231
|
].map(name => ({ type: "class", label: name }));
|
|
380867
|
-
const
|
|
379232
|
+
const values = /*@__PURE__*/[
|
|
380868
379233
|
"above", "absolute", "activeborder", "additive", "activecaption", "after-white-space",
|
|
380869
379234
|
"ahead", "alias", "all", "all-scroll", "alphabetic", "alternate", "always",
|
|
380870
379235
|
"antialiased", "appworkspace", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column",
|
|
@@ -381029,7 +379394,7 @@ const defineCSSCompletionSource = (isVariable) => context => {
|
|
|
381029
379394
|
(isDash || node.name == "TagName") && /^(Block|Styles)$/.test(node.resolve(node.to).name))
|
|
381030
379395
|
return { from: node.from, options: properties(), validFor: dist_identifier };
|
|
381031
379396
|
if (node.name == "ValueName")
|
|
381032
|
-
return { from: node.from, options:
|
|
379397
|
+
return { from: node.from, options: values, validFor: dist_identifier };
|
|
381033
379398
|
if (node.name == "PseudoClassName")
|
|
381034
379399
|
return { from: node.from, options: pseudoClasses, validFor: dist_identifier };
|
|
381035
379400
|
if (isVariable(node) || (context.explicit || isDash) && isVarArg(node, state.doc))
|
|
@@ -381050,7 +379415,7 @@ const defineCSSCompletionSource = (isVariable) => context => {
|
|
|
381050
379415
|
if (before && before.name == ":" && above.name == "PseudoClassSelector")
|
|
381051
379416
|
return { from: pos, options: pseudoClasses, validFor: dist_identifier };
|
|
381052
379417
|
if (before && before.name == ":" && above.name == "Declaration" || above.name == "ArgList")
|
|
381053
|
-
return { from: pos, options:
|
|
379418
|
+
return { from: pos, options: values, validFor: dist_identifier };
|
|
381054
379419
|
if (above.name == "Block" || above.name == "Styles")
|
|
381055
379420
|
return { from: pos, options: properties(), validFor: dist_identifier };
|
|
381056
379421
|
return null;
|
|
@@ -383593,8 +381958,7 @@ var Project = props => {
|
|
|
383593
381958
|
nameEditable = true,
|
|
383594
381959
|
withProjectbar = true,
|
|
383595
381960
|
withSidebar = true,
|
|
383596
|
-
sidebarOptions = []
|
|
383597
|
-
sidebarPlugins = []
|
|
381961
|
+
sidebarOptions = []
|
|
383598
381962
|
} = props;
|
|
383599
381963
|
var saving = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.saving);
|
|
383600
381964
|
var autosave = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.lastSaveAutosave);
|
|
@@ -383625,8 +381989,7 @@ var Project = props => {
|
|
|
383625
381989
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
383626
381990
|
className: "proj-container",
|
|
383627
381991
|
children: [withSidebar && /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_Sidebar, {
|
|
383628
|
-
options: sidebarOptions
|
|
383629
|
-
plugins: sidebarPlugins
|
|
381992
|
+
options: sidebarOptions
|
|
383630
381993
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
383631
381994
|
className: "project-wrapper",
|
|
383632
381995
|
ref: containerRef,
|
|
@@ -384549,7 +382912,7 @@ var TextJamEditor = function TextJamEditor() {
|
|
|
384549
382912
|
var defaultProps = {
|
|
384550
382913
|
withProjectbar: true,
|
|
384551
382914
|
withSidebar: true,
|
|
384552
|
-
sidebarOptions: ["
|
|
382915
|
+
sidebarOptions: ["files", "activity", "playground", "home", "fonts", "theme", "user"],
|
|
384553
382916
|
code: "",
|
|
384554
382917
|
sidebarPlugins: []
|
|
384555
382918
|
};
|