gwchq-textjam 0.1.5 → 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/index.js CHANGED
@@ -331814,13 +331814,15 @@ var Button = props => {
331814
331814
  text,
331815
331815
  title,
331816
331816
  label,
331817
- buttonIconPosition = "left"
331817
+ buttonIconPosition = "left",
331818
+ isUser
331818
331819
  } = props;
331819
331820
  var {
331820
331821
  t
331821
331822
  } = useTranslation_useTranslation();
331822
331823
  var buttonClass = classnames_default()("btn", className, {
331823
- "btn--svg-only": !buttonText
331824
+ "btn--svg-only": !buttonText,
331825
+ "btn--user": isUser
331824
331826
  });
331825
331827
  var onButtonClick = e => {
331826
331828
  if (!confirmText) {
@@ -338372,6 +338374,8 @@ function SvgDownload(props) {
338372
338374
  })));
338373
338375
  }
338374
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";
338375
338379
  ;// ./src/assets/icons/pencil.svg
338376
338380
  var pencil_path;
338377
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); }
@@ -339971,6 +339975,7 @@ var SaveButton = _ref => {
339971
339975
 
339972
339976
 
339973
339977
 
339978
+
339974
339979
  var ProjectBar = _ref => {
339975
339980
  var {
339976
339981
  nameEditable = true
@@ -339984,7 +339989,11 @@ var ProjectBar = _ref => {
339984
339989
  var readOnly = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.readOnly);
339985
339990
  return loading === "success" && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
339986
339991
  className: "project-bar",
339987
- children: [loading === "success" && /*#__PURE__*/(0,jsx_runtime.jsx)(ProjectName_ProjectName, {
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, {
339988
339997
  editable: !readOnly && nameEditable,
339989
339998
  isHeading: true
339990
339999
  }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@@ -340010,1651 +340019,86 @@ var ProjectBar = _ref => {
340010
340019
  });
340011
340020
  };
340012
340021
  /* harmony default export */ const ProjectBar_ProjectBar = (ProjectBar);
340013
- ;// ./src/assets/icons/ellipsis_vertical.svg
340014
- var ellipsis_vertical_path;
340015
- function ellipsis_vertical_extends() { return ellipsis_vertical_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; }, ellipsis_vertical_extends.apply(null, arguments); }
340016
-
340017
- function SvgEllipsisVertical(props) {
340018
- return /*#__PURE__*/external_react_.createElement("svg", ellipsis_vertical_extends({
340019
- width: 4,
340020
- height: 16,
340021
- fill: "none",
340022
- xmlns: "http://www.w3.org/2000/svg"
340023
- }, props), ellipsis_vertical_path || (ellipsis_vertical_path = /*#__PURE__*/external_react_.createElement("path", {
340024
- d: "M2 16c-.55 0-1.02-.196-1.412-.587A1.927 1.927 0 010 14c0-.55.196-1.021.588-1.413A1.925 1.925 0 012 12c.55 0 1.021.196 1.413.587.391.392.587.863.587 1.413s-.196 1.021-.587 1.413A1.928 1.928 0 012 16zm0-6c-.55 0-1.02-.196-1.412-.588A1.923 1.923 0 010 8c0-.55.196-1.021.588-1.413A1.925 1.925 0 012 6c.55 0 1.021.196 1.413.587C3.804 6.979 4 7.45 4 8s-.196 1.02-.587 1.412A1.927 1.927 0 012 10zm0-6C1.45 4 .98 3.804.588 3.412A1.923 1.923 0 010 2C0 1.45.196.98.588.588A1.923 1.923 0 012 0c.55 0 1.021.196 1.413.588C3.804.979 4 1.45 4 2c0 .55-.196 1.02-.587 1.412A1.927 1.927 0 012 4z"
340025
- })));
340026
- }
340027
- /* harmony default export */ const ellipsis_vertical = (SvgEllipsisVertical);
340028
- ;// ./node_modules/@szhsin/react-menu/dist/es/_virtual/_rollupPluginBabelHelpers.js
340029
- function _rollupPluginBabelHelpers_extends() {
340030
- _rollupPluginBabelHelpers_extends = Object.assign ? Object.assign.bind() : function (target) {
340031
- for (var i = 1; i < arguments.length; i++) {
340032
- var source = arguments[i];
340033
- for (var key in source) {
340034
- if (Object.prototype.hasOwnProperty.call(source, key)) {
340035
- target[key] = source[key];
340036
- }
340037
- }
340038
- }
340039
- return target;
340040
- };
340041
- return _rollupPluginBabelHelpers_extends.apply(this, arguments);
340042
- }
340043
- function _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(source, excluded) {
340044
- if (source == null) return {};
340045
- var target = {};
340046
- var sourceKeys = Object.keys(source);
340047
- var key, i;
340048
- for (i = 0; i < sourceKeys.length; i++) {
340049
- key = sourceKeys[i];
340050
- if (excluded.indexOf(key) >= 0) continue;
340051
- target[key] = source[key];
340052
- }
340053
- return target;
340054
- }
340055
-
340056
-
340057
-
340058
- ;// ./node_modules/@szhsin/react-menu/dist/es/utils/utils.js
340059
-
340060
-
340061
- var isMenuOpen = function isMenuOpen(state) {
340062
- return !!state && state[0] === 'o';
340063
- };
340064
- var batchedUpdates = external_react_dom_.unstable_batchedUpdates || function (callback) {
340065
- return callback();
340066
- };
340067
- var values = Object.values || function (obj) {
340068
- return Object.keys(obj).map(function (key) {
340069
- return obj[key];
340070
- });
340071
- };
340072
- var floatEqual = function floatEqual(a, b, diff) {
340073
- if (diff === void 0) {
340074
- diff = 0.0001;
340075
- }
340076
- return Math.abs(a - b) < diff;
340077
- };
340078
- var getTransition = function getTransition(transition, name) {
340079
- return transition === true || !!(transition && transition[name]);
340080
- };
340081
- var safeCall = function safeCall(fn, arg) {
340082
- return typeof fn === 'function' ? fn(arg) : fn;
340083
- };
340084
- var internalKey = '_szhsinMenu';
340085
- var getName = function getName(component) {
340086
- return component[internalKey];
340087
- };
340088
- var defineName = function defineName(name, component) {
340089
- return Object.defineProperty(component, internalKey, {
340090
- value: name
340091
- });
340092
- };
340093
- var utils_mergeProps = function mergeProps(target, source) {
340094
- source && Object.keys(source).forEach(function (key) {
340095
- var targetProp = target[key];
340096
- var sourceProp = source[key];
340097
- if (typeof sourceProp === 'function' && targetProp) {
340098
- target[key] = function () {
340099
- sourceProp.apply(void 0, arguments);
340100
- targetProp.apply(void 0, arguments);
340101
- };
340102
- } else {
340103
- target[key] = sourceProp;
340104
- }
340105
- });
340106
- return target;
340107
- };
340108
- var parsePadding = function parsePadding(paddingStr) {
340109
- if (typeof paddingStr !== 'string') return {
340110
- top: 0,
340111
- right: 0,
340112
- bottom: 0,
340113
- left: 0
340114
- };
340115
- var padding = paddingStr.trim().split(/\s+/, 4).map(parseFloat);
340116
- var top = !isNaN(padding[0]) ? padding[0] : 0;
340117
- var right = !isNaN(padding[1]) ? padding[1] : top;
340118
- return {
340119
- top: top,
340120
- right: right,
340121
- bottom: !isNaN(padding[2]) ? padding[2] : top,
340122
- left: !isNaN(padding[3]) ? padding[3] : right
340123
- };
340124
- };
340125
- var getScrollAncestor = function getScrollAncestor(node) {
340126
- while (node) {
340127
- node = node.parentNode;
340128
- if (!node || node === document.body || !node.parentNode) return;
340129
- var _getComputedStyle = getComputedStyle(node),
340130
- overflow = _getComputedStyle.overflow,
340131
- overflowX = _getComputedStyle.overflowX,
340132
- overflowY = _getComputedStyle.overflowY;
340133
- if (/auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX)) return node;
340134
- }
340135
- };
340136
- function commonProps(isDisabled, isHovering) {
340137
- return {
340138
- 'aria-disabled': isDisabled || undefined,
340139
- tabIndex: isHovering ? 0 : -1
340140
- };
340141
- }
340142
- function indexOfNode(nodeList, node) {
340143
- for (var i = 0; i < nodeList.length; i++) {
340144
- if (nodeList[i] === node) return i;
340145
- }
340146
- return -1;
340147
- }
340148
-
340149
-
340150
-
340151
- ;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useBEM.js
340152
-
340153
-
340154
- var useBEM = function useBEM(_ref) {
340155
- var block = _ref.block,
340156
- element = _ref.element,
340157
- modifiers = _ref.modifiers,
340158
- className = _ref.className;
340159
- return (0,external_react_.useMemo)(function () {
340160
- var blockElement = element ? block + "__" + element : block;
340161
- var classString = blockElement;
340162
- modifiers && Object.keys(modifiers).forEach(function (name) {
340163
- var value = modifiers[name];
340164
- if (value) classString += " " + blockElement + "--" + (value === true ? name : name + "-" + value);
340165
- });
340166
- var expandedClassName = typeof className === 'function' ? className(modifiers) : className;
340167
- if (typeof expandedClassName === 'string') {
340168
- expandedClassName = expandedClassName.trim();
340169
- if (expandedClassName) classString += " " + expandedClassName;
340170
- }
340171
- return classString;
340172
- }, [block, element, modifiers, className]);
340173
- };
340174
-
340175
-
340176
-
340177
- ;// ./node_modules/@szhsin/react-menu/dist/es/utils/constants.js
340178
-
340179
-
340180
- var menuContainerClass = 'szh-menu-container';
340181
- var menuClass = 'szh-menu';
340182
- var menuButtonClass = 'szh-menu-button';
340183
- var menuArrowClass = 'arrow';
340184
- var menuItemClass = 'item';
340185
- var menuDividerClass = 'divider';
340186
- var menuHeaderClass = 'header';
340187
- var menuGroupClass = 'group';
340188
- var subMenuClass = 'submenu';
340189
- var radioGroupClass = 'radio-group';
340190
- var HoverItemContext = /*#__PURE__*/(0,external_react_.createContext)();
340191
- var MenuListItemContext = /*#__PURE__*/(0,external_react_.createContext)({});
340192
- var MenuListContext = /*#__PURE__*/(0,external_react_.createContext)({});
340193
- var EventHandlersContext = /*#__PURE__*/(0,external_react_.createContext)({});
340194
- var RadioGroupContext = /*#__PURE__*/(0,external_react_.createContext)({});
340195
- var constants_SettingsContext = /*#__PURE__*/(0,external_react_.createContext)({});
340196
- var Keys = /*#__PURE__*/Object.freeze({
340197
- ENTER: 'Enter',
340198
- ESC: 'Escape',
340199
- SPACE: ' ',
340200
- HOME: 'Home',
340201
- END: 'End',
340202
- LEFT: 'ArrowLeft',
340203
- RIGHT: 'ArrowRight',
340204
- UP: 'ArrowUp',
340205
- DOWN: 'ArrowDown'
340206
- });
340207
- var HoverActionTypes = /*#__PURE__*/Object.freeze({
340208
- RESET: 0,
340209
- SET: 1,
340210
- UNSET: 2,
340211
- INCREASE: 3,
340212
- DECREASE: 4,
340213
- FIRST: 5,
340214
- LAST: 6,
340215
- SET_INDEX: 7
340216
- });
340217
- var CloseReason = /*#__PURE__*/Object.freeze({
340218
- CLICK: 'click',
340219
- CANCEL: 'cancel',
340220
- BLUR: 'blur',
340221
- SCROLL: 'scroll'
340222
- });
340223
- var FocusPositions = /*#__PURE__*/Object.freeze({
340224
- FIRST: 'first',
340225
- LAST: 'last'
340226
- });
340227
- var MenuStateMap = /*#__PURE__*/Object.freeze({
340228
- entering: 'opening',
340229
- entered: 'open',
340230
- exiting: 'closing',
340231
- exited: 'closed'
340232
- });
340233
- var positionAbsolute = 'absolute';
340234
- var roleNone = 'presentation';
340235
- var roleMenuitem = 'menuitem';
340236
- var dummyItemProps = {
340237
- 'aria-hidden': true,
340238
- role: roleMenuitem
340239
- };
340240
-
340241
-
340242
-
340243
- ;// ./node_modules/@szhsin/react-menu/dist/es/components/MenuContainer.js
340244
-
340245
-
340246
-
340247
-
340248
-
340249
-
340250
-
340251
- var MenuContainer = function MenuContainer(_ref) {
340252
- var className = _ref.className,
340253
- containerRef = _ref.containerRef,
340254
- containerProps = _ref.containerProps,
340255
- children = _ref.children,
340256
- isOpen = _ref.isOpen,
340257
- skipOpen = _ref.skipOpen,
340258
- theming = _ref.theming,
340259
- transition = _ref.transition,
340260
- onClose = _ref.onClose;
340261
- var itemTransition = getTransition(transition, 'item');
340262
- var onKeyDown = function onKeyDown(_ref2) {
340263
- var key = _ref2.key;
340264
- switch (key) {
340265
- case Keys.ESC:
340266
- safeCall(onClose, {
340267
- key: key,
340268
- reason: CloseReason.CANCEL
340269
- });
340270
- break;
340271
- }
340272
- };
340273
- var onBlur = function onBlur(e) {
340274
- if (isOpen && !e.currentTarget.contains(e.relatedTarget || document.activeElement)) {
340275
- safeCall(onClose, {
340276
- reason: CloseReason.BLUR
340277
- });
340278
- if (skipOpen) {
340279
- skipOpen.current = true;
340280
- setTimeout(function () {
340281
- return skipOpen.current = false;
340282
- }, 300);
340283
- }
340284
- }
340285
- };
340286
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _rollupPluginBabelHelpers_extends({}, utils_mergeProps({
340287
- onKeyDown: onKeyDown,
340288
- onBlur: onBlur
340289
- }, containerProps), {
340290
- className: useBEM({
340291
- block: menuContainerClass,
340292
- modifiers: (0,external_react_.useMemo)(function () {
340293
- return {
340294
- theme: theming,
340295
- itemTransition: itemTransition
340296
- };
340297
- }, [theming, itemTransition]),
340298
- className: className
340299
- }),
340300
- style: _rollupPluginBabelHelpers_extends({
340301
- position: 'absolute'
340302
- }, containerProps == null ? void 0 : containerProps.style),
340303
- ref: containerRef,
340304
- children: children
340305
- }));
340306
- };
340307
-
340308
-
340309
-
340310
- ;// ./node_modules/@szhsin/react-menu/dist/es/utils/submenuCtx.js
340311
- var createSubmenuCtx = function createSubmenuCtx() {
340312
- var timer,
340313
- count = 0;
340314
- return {
340315
- toggle: function toggle(isOpen) {
340316
- isOpen ? count++ : count--;
340317
- count = Math.max(count, 0);
340318
- },
340319
- on: function on(closeDelay, pending, settled) {
340320
- if (count) {
340321
- if (!timer) timer = setTimeout(function () {
340322
- timer = 0;
340323
- pending();
340324
- }, closeDelay);
340325
- } else {
340326
- settled == null ? void 0 : settled();
340327
- }
340328
- },
340329
- off: function off() {
340330
- if (timer) {
340331
- clearTimeout(timer);
340332
- timer = 0;
340333
- }
340334
- }
340335
- };
340336
- };
340337
-
340338
-
340339
-
340340
- ;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useItems.js
340341
-
340342
-
340343
-
340344
-
340345
- var useItems = function useItems(menuRef, focusRef) {
340346
- var _useState = (0,external_react_.useState)(),
340347
- hoverItem = _useState[0],
340348
- setHoverItem = _useState[1];
340349
- var stateRef = (0,external_react_.useRef)({
340350
- items: [],
340351
- hoverIndex: -1,
340352
- sorted: false
340353
- });
340354
- var mutableState = stateRef.current;
340355
- var updateItems = (0,external_react_.useCallback)(function (item, isMounted) {
340356
- var items = mutableState.items;
340357
- if (!item) {
340358
- mutableState.items = [];
340359
- } else if (isMounted) {
340360
- items.push(item);
340361
- } else {
340362
- var index = items.indexOf(item);
340363
- if (index > -1) {
340364
- items.splice(index, 1);
340365
- if (item.contains(document.activeElement)) {
340366
- focusRef.current.focus();
340367
- setHoverItem();
340368
- }
340369
- }
340370
- }
340371
- mutableState.hoverIndex = -1;
340372
- mutableState.sorted = false;
340373
- }, [mutableState, focusRef]);
340374
- var dispatch = (0,external_react_.useCallback)(function (actionType, item, nextIndex) {
340375
- var items = mutableState.items,
340376
- hoverIndex = mutableState.hoverIndex;
340377
- var sortItems = function sortItems() {
340378
- if (mutableState.sorted) return;
340379
- var orderedNodes = menuRef.current.querySelectorAll('.szh-menu__item');
340380
- items.sort(function (a, b) {
340381
- return indexOfNode(orderedNodes, a) - indexOfNode(orderedNodes, b);
340382
- });
340383
- mutableState.sorted = true;
340384
- };
340385
- var index = -1,
340386
- newItem = undefined;
340387
- switch (actionType) {
340388
- case HoverActionTypes.RESET:
340389
- break;
340390
- case HoverActionTypes.SET:
340391
- newItem = item;
340392
- break;
340393
- case HoverActionTypes.UNSET:
340394
- newItem = function newItem(prevItem) {
340395
- return prevItem === item ? undefined : prevItem;
340396
- };
340397
- break;
340398
- case HoverActionTypes.FIRST:
340399
- sortItems();
340400
- index = 0;
340401
- newItem = items[index];
340402
- break;
340403
- case HoverActionTypes.LAST:
340404
- sortItems();
340405
- index = items.length - 1;
340406
- newItem = items[index];
340407
- break;
340408
- case HoverActionTypes.SET_INDEX:
340409
- sortItems();
340410
- index = nextIndex;
340411
- newItem = items[index];
340412
- break;
340413
- case HoverActionTypes.INCREASE:
340414
- sortItems();
340415
- index = hoverIndex;
340416
- if (index < 0) index = items.indexOf(item);
340417
- index++;
340418
- if (index >= items.length) index = 0;
340419
- newItem = items[index];
340420
- break;
340421
- case HoverActionTypes.DECREASE:
340422
- sortItems();
340423
- index = hoverIndex;
340424
- if (index < 0) index = items.indexOf(item);
340425
- index--;
340426
- if (index < 0) index = items.length - 1;
340427
- newItem = items[index];
340428
- break;
340429
- default:
340430
- if (false) {}
340431
- }
340432
- if (!newItem) index = -1;
340433
- setHoverItem(newItem);
340434
- mutableState.hoverIndex = index;
340435
- }, [menuRef, mutableState]);
340436
- return {
340437
- hoverItem: hoverItem,
340438
- dispatch: dispatch,
340439
- updateItems: updateItems
340440
- };
340441
- };
340442
-
340443
-
340444
-
340445
- ;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/getPositionHelpers.js
340446
-
340447
-
340448
- var getPositionHelpers = function getPositionHelpers(containerRef, menuRef, menuScroll, boundingBoxPadding) {
340449
- var menuRect = menuRef.current.getBoundingClientRect();
340450
- var containerRect = containerRef.current.getBoundingClientRect();
340451
- var boundingRect = menuScroll === window ? {
340452
- left: 0,
340453
- top: 0,
340454
- right: document.documentElement.clientWidth,
340455
- bottom: window.innerHeight
340456
- } : menuScroll.getBoundingClientRect();
340457
- var padding = parsePadding(boundingBoxPadding);
340458
- var getLeftOverflow = function getLeftOverflow(x) {
340459
- return x + containerRect.left - boundingRect.left - padding.left;
340460
- };
340461
- var getRightOverflow = function getRightOverflow(x) {
340462
- return x + containerRect.left + menuRect.width - boundingRect.right + padding.right;
340463
- };
340464
- var getTopOverflow = function getTopOverflow(y) {
340465
- return y + containerRect.top - boundingRect.top - padding.top;
340466
- };
340467
- var getBottomOverflow = function getBottomOverflow(y) {
340468
- return y + containerRect.top + menuRect.height - boundingRect.bottom + padding.bottom;
340469
- };
340470
- var confineHorizontally = function confineHorizontally(x) {
340471
- var leftOverflow = getLeftOverflow(x);
340472
- if (leftOverflow < 0) {
340473
- x -= leftOverflow;
340474
- } else {
340475
- var rightOverflow = getRightOverflow(x);
340476
- if (rightOverflow > 0) {
340477
- x -= rightOverflow;
340478
- leftOverflow = getLeftOverflow(x);
340479
- if (leftOverflow < 0) x -= leftOverflow;
340480
- }
340481
- }
340482
- return x;
340483
- };
340484
- var confineVertically = function confineVertically(y) {
340485
- var topOverflow = getTopOverflow(y);
340486
- if (topOverflow < 0) {
340487
- y -= topOverflow;
340488
- } else {
340489
- var bottomOverflow = getBottomOverflow(y);
340490
- if (bottomOverflow > 0) {
340491
- y -= bottomOverflow;
340492
- topOverflow = getTopOverflow(y);
340493
- if (topOverflow < 0) y -= topOverflow;
340494
- }
340495
- }
340496
- return y;
340497
- };
340498
- return {
340499
- menuRect: menuRect,
340500
- containerRect: containerRect,
340501
- getLeftOverflow: getLeftOverflow,
340502
- getRightOverflow: getRightOverflow,
340503
- getTopOverflow: getTopOverflow,
340504
- getBottomOverflow: getBottomOverflow,
340505
- confineHorizontally: confineHorizontally,
340506
- confineVertically: confineVertically
340507
- };
340508
- };
340509
-
340510
-
340511
-
340512
- ;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/placeArrowVertical.js
340513
- var placeArrowVertical = function placeArrowVertical(_ref) {
340514
- var arrowRef = _ref.arrowRef,
340515
- menuY = _ref.menuY,
340516
- anchorRect = _ref.anchorRect,
340517
- containerRect = _ref.containerRect,
340518
- menuRect = _ref.menuRect;
340519
- var y = anchorRect.top - containerRect.top - menuY + anchorRect.height / 2;
340520
- var offset = arrowRef.current.offsetHeight * 1.25;
340521
- y = Math.max(offset, y);
340522
- y = Math.min(y, menuRect.height - offset);
340523
- return y;
340524
- };
340525
-
340526
-
340527
-
340528
- ;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/placeLeftorRight.js
340529
-
340530
-
340531
- var placeLeftorRight = function placeLeftorRight(_ref) {
340532
- var anchorRect = _ref.anchorRect,
340533
- containerRect = _ref.containerRect,
340534
- menuRect = _ref.menuRect,
340535
- placeLeftorRightY = _ref.placeLeftorRightY,
340536
- placeLeftX = _ref.placeLeftX,
340537
- placeRightX = _ref.placeRightX,
340538
- getLeftOverflow = _ref.getLeftOverflow,
340539
- getRightOverflow = _ref.getRightOverflow,
340540
- confineHorizontally = _ref.confineHorizontally,
340541
- confineVertically = _ref.confineVertically,
340542
- arrowRef = _ref.arrowRef,
340543
- arrow = _ref.arrow,
340544
- direction = _ref.direction,
340545
- position = _ref.position;
340546
- var computedDirection = direction;
340547
- var y = placeLeftorRightY;
340548
- if (position !== 'initial') {
340549
- y = confineVertically(y);
340550
- if (position === 'anchor') {
340551
- y = Math.min(y, anchorRect.bottom - containerRect.top);
340552
- y = Math.max(y, anchorRect.top - containerRect.top - menuRect.height);
340553
- }
340554
- }
340555
- var x, leftOverflow, rightOverflow;
340556
- if (computedDirection === 'left') {
340557
- x = placeLeftX;
340558
- if (position !== 'initial') {
340559
- leftOverflow = getLeftOverflow(x);
340560
- if (leftOverflow < 0) {
340561
- rightOverflow = getRightOverflow(placeRightX);
340562
- if (rightOverflow <= 0 || -leftOverflow > rightOverflow) {
340563
- x = placeRightX;
340564
- computedDirection = 'right';
340565
- }
340566
- }
340567
- }
340568
- } else {
340569
- x = placeRightX;
340570
- if (position !== 'initial') {
340571
- rightOverflow = getRightOverflow(x);
340572
- if (rightOverflow > 0) {
340573
- leftOverflow = getLeftOverflow(placeLeftX);
340574
- if (leftOverflow >= 0 || -leftOverflow < rightOverflow) {
340575
- x = placeLeftX;
340576
- computedDirection = 'left';
340577
- }
340578
- }
340579
- }
340580
- }
340581
- if (position === 'auto') x = confineHorizontally(x);
340582
- var arrowY = arrow ? placeArrowVertical({
340583
- menuY: y,
340584
- arrowRef: arrowRef,
340585
- anchorRect: anchorRect,
340586
- containerRect: containerRect,
340587
- menuRect: menuRect
340588
- }) : undefined;
340589
- return {
340590
- arrowY: arrowY,
340591
- x: x,
340592
- y: y,
340593
- computedDirection: computedDirection
340594
- };
340595
- };
340596
-
340597
-
340598
-
340599
- ;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/placeArrowHorizontal.js
340600
- var placeArrowHorizontal = function placeArrowHorizontal(_ref) {
340601
- var arrowRef = _ref.arrowRef,
340602
- menuX = _ref.menuX,
340603
- anchorRect = _ref.anchorRect,
340604
- containerRect = _ref.containerRect,
340605
- menuRect = _ref.menuRect;
340606
- var x = anchorRect.left - containerRect.left - menuX + anchorRect.width / 2;
340607
- var offset = arrowRef.current.offsetWidth * 1.25;
340608
- x = Math.max(offset, x);
340609
- x = Math.min(x, menuRect.width - offset);
340610
- return x;
340611
- };
340612
-
340613
-
340614
-
340615
- ;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/placeToporBottom.js
340616
-
340617
-
340618
- var placeToporBottom = function placeToporBottom(_ref) {
340619
- var anchorRect = _ref.anchorRect,
340620
- containerRect = _ref.containerRect,
340621
- menuRect = _ref.menuRect,
340622
- placeToporBottomX = _ref.placeToporBottomX,
340623
- placeTopY = _ref.placeTopY,
340624
- placeBottomY = _ref.placeBottomY,
340625
- getTopOverflow = _ref.getTopOverflow,
340626
- getBottomOverflow = _ref.getBottomOverflow,
340627
- confineHorizontally = _ref.confineHorizontally,
340628
- confineVertically = _ref.confineVertically,
340629
- arrowRef = _ref.arrowRef,
340630
- arrow = _ref.arrow,
340631
- direction = _ref.direction,
340632
- position = _ref.position;
340633
- var computedDirection = direction === 'top' ? 'top' : 'bottom';
340634
- var x = placeToporBottomX;
340635
- if (position !== 'initial') {
340636
- x = confineHorizontally(x);
340637
- if (position === 'anchor') {
340638
- x = Math.min(x, anchorRect.right - containerRect.left);
340639
- x = Math.max(x, anchorRect.left - containerRect.left - menuRect.width);
340640
- }
340641
- }
340642
- var y, topOverflow, bottomOverflow;
340643
- if (computedDirection === 'top') {
340644
- y = placeTopY;
340645
- if (position !== 'initial') {
340646
- topOverflow = getTopOverflow(y);
340647
- if (topOverflow < 0) {
340648
- bottomOverflow = getBottomOverflow(placeBottomY);
340649
- if (bottomOverflow <= 0 || -topOverflow > bottomOverflow) {
340650
- y = placeBottomY;
340651
- computedDirection = 'bottom';
340652
- }
340653
- }
340654
- }
340655
- } else {
340656
- y = placeBottomY;
340657
- if (position !== 'initial') {
340658
- bottomOverflow = getBottomOverflow(y);
340659
- if (bottomOverflow > 0) {
340660
- topOverflow = getTopOverflow(placeTopY);
340661
- if (topOverflow >= 0 || -topOverflow < bottomOverflow) {
340662
- y = placeTopY;
340663
- computedDirection = 'top';
340664
- }
340665
- }
340666
- }
340667
- }
340668
- if (position === 'auto') y = confineVertically(y);
340669
- var arrowX = arrow ? placeArrowHorizontal({
340670
- menuX: x,
340671
- arrowRef: arrowRef,
340672
- anchorRect: anchorRect,
340673
- containerRect: containerRect,
340674
- menuRect: menuRect
340675
- }) : undefined;
340676
- return {
340677
- arrowX: arrowX,
340678
- x: x,
340679
- y: y,
340680
- computedDirection: computedDirection
340681
- };
340682
- };
340683
-
340684
-
340685
-
340686
- ;// ./node_modules/@szhsin/react-menu/dist/es/positionUtils/positionMenu.js
340687
-
340688
-
340689
-
340690
-
340691
- var positionMenu = function positionMenu(_ref) {
340692
- var arrow = _ref.arrow,
340693
- align = _ref.align,
340694
- direction = _ref.direction,
340695
- offsetX = _ref.offsetX,
340696
- offsetY = _ref.offsetY,
340697
- position = _ref.position,
340698
- anchorRect = _ref.anchorRect,
340699
- arrowRef = _ref.arrowRef,
340700
- positionHelpers = _ref.positionHelpers;
340701
- var menuRect = positionHelpers.menuRect,
340702
- containerRect = positionHelpers.containerRect;
340703
- var horizontalOffset = offsetX;
340704
- var verticalOffset = offsetY;
340705
- if (arrow) {
340706
- if (direction === 'left' || direction === 'right') {
340707
- horizontalOffset += arrowRef.current.offsetWidth;
340708
- } else {
340709
- verticalOffset += arrowRef.current.offsetHeight;
340710
- }
340711
- }
340712
- var placeLeftX = anchorRect.left - containerRect.left - menuRect.width - horizontalOffset;
340713
- var placeRightX = anchorRect.right - containerRect.left + horizontalOffset;
340714
- var placeTopY = anchorRect.top - containerRect.top - menuRect.height - verticalOffset;
340715
- var placeBottomY = anchorRect.bottom - containerRect.top + verticalOffset;
340716
- var placeToporBottomX, placeLeftorRightY;
340717
- if (align === 'end') {
340718
- placeToporBottomX = anchorRect.right - containerRect.left - menuRect.width;
340719
- placeLeftorRightY = anchorRect.bottom - containerRect.top - menuRect.height;
340720
- } else if (align === 'center') {
340721
- placeToporBottomX = anchorRect.left - containerRect.left - (menuRect.width - anchorRect.width) / 2;
340722
- placeLeftorRightY = anchorRect.top - containerRect.top - (menuRect.height - anchorRect.height) / 2;
340723
- } else {
340724
- placeToporBottomX = anchorRect.left - containerRect.left;
340725
- placeLeftorRightY = anchorRect.top - containerRect.top;
340726
- }
340727
- placeToporBottomX += horizontalOffset;
340728
- placeLeftorRightY += verticalOffset;
340729
- var options = _rollupPluginBabelHelpers_extends({}, positionHelpers, {
340730
- anchorRect: anchorRect,
340731
- placeLeftX: placeLeftX,
340732
- placeRightX: placeRightX,
340733
- placeLeftorRightY: placeLeftorRightY,
340734
- placeTopY: placeTopY,
340735
- placeBottomY: placeBottomY,
340736
- placeToporBottomX: placeToporBottomX,
340737
- arrowRef: arrowRef,
340738
- arrow: arrow,
340739
- direction: direction,
340740
- position: position
340741
- });
340742
- switch (direction) {
340743
- case 'left':
340744
- case 'right':
340745
- return placeLeftorRight(options);
340746
- case 'top':
340747
- case 'bottom':
340748
- default:
340749
- return placeToporBottom(options);
340750
- }
340751
- };
340752
-
340753
-
340754
-
340755
- ;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useIsomorphicLayoutEffect.js
340756
-
340757
-
340758
- var useIsomorphicLayoutEffect_useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? external_react_.useLayoutEffect : external_react_.useEffect;
340759
-
340760
-
340761
-
340762
- ;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useCombinedRef.js
340763
-
340764
-
340765
- function setRef(ref, instance) {
340766
- typeof ref === 'function' ? ref(instance) : ref.current = instance;
340767
- }
340768
- var useCombinedRef = function useCombinedRef(refA, refB) {
340769
- return (0,external_react_.useMemo)(function () {
340770
- if (!refA) return refB;
340771
- if (!refB) return refA;
340772
- return function (instance) {
340773
- setRef(refA, instance);
340774
- setRef(refB, instance);
340775
- };
340776
- }, [refA, refB]);
340777
- };
340778
-
340779
-
340780
-
340781
- ;// ./node_modules/@szhsin/react-menu/dist/es/components/MenuList.js
340782
-
340783
-
340784
-
340785
-
340786
-
340787
-
340788
-
340789
-
340790
-
340791
-
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
340792
340026
 
340793
340027
 
340794
340028
 
340795
340029
 
340796
340030
 
340797
- var MenuList_excluded = ["ariaLabel", "menuClassName", "menuStyle", "arrowClassName", "arrowStyle", "anchorPoint", "anchorRef", "containerRef", "containerProps", "focusProps", "externalRef", "parentScrollingRef", "arrow", "align", "direction", "position", "overflow", "setDownOverflow", "repositionFlag", "captureFocus", "state", "endTransition", "isDisabled", "menuItemFocus", "offsetX", "offsetY", "children", "onClose"];
340798
- var MenuList = function MenuList(_ref) {
340799
- var ariaLabel = _ref.ariaLabel,
340800
- menuClassName = _ref.menuClassName,
340801
- menuStyle = _ref.menuStyle,
340802
- arrowClassName = _ref.arrowClassName,
340803
- arrowStyle = _ref.arrowStyle,
340804
- anchorPoint = _ref.anchorPoint,
340805
- anchorRef = _ref.anchorRef,
340806
- containerRef = _ref.containerRef,
340807
- containerProps = _ref.containerProps,
340808
- focusProps = _ref.focusProps,
340809
- externalRef = _ref.externalRef,
340810
- parentScrollingRef = _ref.parentScrollingRef,
340811
- arrow = _ref.arrow,
340812
- _ref$align = _ref.align,
340813
- align = _ref$align === void 0 ? 'start' : _ref$align,
340814
- _ref$direction = _ref.direction,
340815
- direction = _ref$direction === void 0 ? 'bottom' : _ref$direction,
340816
- _ref$position = _ref.position,
340817
- position = _ref$position === void 0 ? 'auto' : _ref$position,
340818
- _ref$overflow = _ref.overflow,
340819
- overflow = _ref$overflow === void 0 ? 'visible' : _ref$overflow,
340820
- setDownOverflow = _ref.setDownOverflow,
340821
- repositionFlag = _ref.repositionFlag,
340822
- _ref$captureFocus = _ref.captureFocus,
340823
- captureFocus = _ref$captureFocus === void 0 ? true : _ref$captureFocus,
340824
- state = _ref.state,
340825
- endTransition = _ref.endTransition,
340826
- isDisabled = _ref.isDisabled,
340827
- menuItemFocus = _ref.menuItemFocus,
340828
- _ref$offsetX = _ref.offsetX,
340829
- offsetX = _ref$offsetX === void 0 ? 0 : _ref$offsetX,
340830
- _ref$offsetY = _ref.offsetY,
340831
- offsetY = _ref$offsetY === void 0 ? 0 : _ref$offsetY,
340832
- children = _ref.children,
340833
- onClose = _ref.onClose,
340834
- restProps = _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(_ref, MenuList_excluded);
340835
- var _useState = (0,external_react_.useState)({
340836
- x: 0,
340837
- y: 0
340838
- }),
340839
- menuPosition = _useState[0],
340840
- setMenuPosition = _useState[1];
340841
- var _useState2 = (0,external_react_.useState)({}),
340842
- arrowPosition = _useState2[0],
340843
- setArrowPosition = _useState2[1];
340844
- var _useState3 = (0,external_react_.useState)(),
340845
- overflowData = _useState3[0],
340846
- setOverflowData = _useState3[1];
340847
- var _useState4 = (0,external_react_.useState)(direction),
340848
- expandedDirection = _useState4[0],
340849
- setExpandedDirection = _useState4[1];
340850
- var _useState5 = (0,external_react_.useState)(createSubmenuCtx),
340851
- submenuCtx = _useState5[0];
340852
- var _useReducer = (0,external_react_.useReducer)(function (c) {
340853
- return c + 1;
340854
- }, 1),
340855
- reposSubmenu = _useReducer[0],
340856
- forceReposSubmenu = _useReducer[1];
340857
- var _useContext = (0,external_react_.useContext)(constants_SettingsContext),
340858
- transition = _useContext.transition,
340859
- boundingBoxRef = _useContext.boundingBoxRef,
340860
- boundingBoxPadding = _useContext.boundingBoxPadding,
340861
- rootMenuRef = _useContext.rootMenuRef,
340862
- rootAnchorRef = _useContext.rootAnchorRef,
340863
- scrollNodesRef = _useContext.scrollNodesRef,
340864
- reposition = _useContext.reposition,
340865
- viewScroll = _useContext.viewScroll,
340866
- submenuCloseDelay = _useContext.submenuCloseDelay;
340867
- var _useContext2 = (0,external_react_.useContext)(MenuListContext),
340868
- parentSubmenuCtx = _useContext2.submenuCtx,
340869
- _useContext2$reposSub = _useContext2.reposSubmenu,
340870
- reposFlag = _useContext2$reposSub === void 0 ? repositionFlag : _useContext2$reposSub;
340871
- var menuRef = (0,external_react_.useRef)(null);
340872
- var focusRef = (0,external_react_.useRef)();
340873
- var arrowRef = (0,external_react_.useRef)();
340874
- var prevOpen = (0,external_react_.useRef)(false);
340875
- var latestMenuSize = (0,external_react_.useRef)({
340876
- width: 0,
340877
- height: 0
340878
- });
340879
- var latestHandlePosition = (0,external_react_.useRef)(function () {});
340880
- var _useItems = useItems(menuRef, focusRef),
340881
- hoverItem = _useItems.hoverItem,
340882
- dispatch = _useItems.dispatch,
340883
- updateItems = _useItems.updateItems;
340884
- var isOpen = isMenuOpen(state);
340885
- var openTransition = getTransition(transition, 'open');
340886
- var closeTransition = getTransition(transition, 'close');
340887
- var scrollNodes = scrollNodesRef.current;
340888
- var onKeyDown = function onKeyDown(e) {
340889
- switch (e.key) {
340890
- case Keys.HOME:
340891
- dispatch(HoverActionTypes.FIRST);
340892
- break;
340893
- case Keys.END:
340894
- dispatch(HoverActionTypes.LAST);
340895
- break;
340896
- case Keys.UP:
340897
- dispatch(HoverActionTypes.DECREASE, hoverItem);
340898
- break;
340899
- case Keys.DOWN:
340900
- dispatch(HoverActionTypes.INCREASE, hoverItem);
340901
- break;
340902
- case Keys.SPACE:
340903
- if (e.target && e.target.className.indexOf(menuClass) !== -1) {
340904
- e.preventDefault();
340905
- }
340906
- return;
340907
- default:
340908
- return;
340909
- }
340910
- e.preventDefault();
340911
- e.stopPropagation();
340912
- };
340913
- var onAnimationEnd = function onAnimationEnd() {
340914
- if (state === 'closing') {
340915
- setOverflowData();
340916
- }
340917
- safeCall(endTransition);
340918
- };
340919
- var onPointerMove = function onPointerMove(e) {
340920
- e.stopPropagation();
340921
- submenuCtx.on(submenuCloseDelay, function () {
340922
- dispatch(HoverActionTypes.RESET);
340923
- focusRef.current.focus();
340924
- });
340925
- };
340926
- var onPointerLeave = function onPointerLeave(e) {
340927
- 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);
340928
340043
  };
340929
- var handlePosition = (0,external_react_.useCallback)(function (noOverflowCheck) {
340930
- var _anchorRef$current;
340931
- var anchorRect = anchorRef ? (_anchorRef$current = anchorRef.current) == null ? void 0 : _anchorRef$current.getBoundingClientRect() : anchorPoint ? {
340932
- left: anchorPoint.x,
340933
- right: anchorPoint.x,
340934
- top: anchorPoint.y,
340935
- bottom: anchorPoint.y,
340936
- width: 0,
340937
- height: 0
340938
- } : null;
340939
- if (!anchorRect) {
340940
- if (false) {}
340941
- return;
340942
- }
340943
- if (!scrollNodes.menu) {
340944
- scrollNodes.menu = (boundingBoxRef ? boundingBoxRef.current : getScrollAncestor(rootMenuRef.current)) || window;
340945
- }
340946
- var positionHelpers = getPositionHelpers(containerRef, menuRef, scrollNodes.menu, boundingBoxPadding);
340947
- var _positionMenu = positionMenu({
340948
- arrow: arrow,
340949
- align: align,
340950
- direction: direction,
340951
- offsetX: offsetX,
340952
- offsetY: offsetY,
340953
- position: position,
340954
- anchorRect: anchorRect,
340955
- arrowRef: arrowRef,
340956
- positionHelpers: positionHelpers
340957
- }),
340958
- arrowX = _positionMenu.arrowX,
340959
- arrowY = _positionMenu.arrowY,
340960
- x = _positionMenu.x,
340961
- y = _positionMenu.y,
340962
- computedDirection = _positionMenu.computedDirection;
340963
- var menuRect = positionHelpers.menuRect;
340964
- var menuHeight = menuRect.height;
340965
- if (!noOverflowCheck && overflow !== 'visible') {
340966
- var getTopOverflow = positionHelpers.getTopOverflow,
340967
- getBottomOverflow = positionHelpers.getBottomOverflow;
340968
- var height, _overflowAmt;
340969
- var prevHeight = latestMenuSize.current.height;
340970
- var bottomOverflow = getBottomOverflow(y);
340971
- if (bottomOverflow > 0 || floatEqual(bottomOverflow, 0) && floatEqual(menuHeight, prevHeight)) {
340972
- height = menuHeight - bottomOverflow;
340973
- _overflowAmt = bottomOverflow;
340974
- } else {
340975
- var topOverflow = getTopOverflow(y);
340976
- if (topOverflow < 0 || floatEqual(topOverflow, 0) && floatEqual(menuHeight, prevHeight)) {
340977
- height = menuHeight + topOverflow;
340978
- _overflowAmt = 0 - topOverflow;
340979
- if (height >= 0) y -= topOverflow;
340980
- }
340981
- }
340982
- if (height >= 0) {
340983
- menuHeight = height;
340984
- setOverflowData({
340985
- height: height,
340986
- overflowAmt: _overflowAmt
340987
- });
340988
- } else {
340989
- setOverflowData();
340990
- }
340991
- }
340992
- if (arrow) setArrowPosition({
340993
- x: arrowX,
340994
- y: arrowY
340995
- });
340996
- setMenuPosition({
340997
- x: x,
340998
- y: y
340999
- });
341000
- setExpandedDirection(computedDirection);
341001
- latestMenuSize.current = {
341002
- width: menuRect.width,
341003
- height: menuHeight
341004
- };
341005
- }, [arrow, align, boundingBoxPadding, direction, offsetX, offsetY, position, overflow, anchorPoint, anchorRef, containerRef, boundingBoxRef, rootMenuRef, scrollNodes]);
341006
- useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function () {
341007
- if (isOpen) {
341008
- handlePosition();
341009
- if (prevOpen.current) forceReposSubmenu();
341010
- }
341011
- prevOpen.current = isOpen;
341012
- latestHandlePosition.current = handlePosition;
341013
- }, [isOpen, handlePosition, reposFlag]);
341014
- useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function () {
341015
- if (overflowData && !setDownOverflow) menuRef.current.scrollTop = 0;
341016
- }, [overflowData, setDownOverflow]);
341017
- useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function () {
341018
- return updateItems;
341019
- }, [updateItems]);
341020
- (0,external_react_.useEffect)(function () {
341021
- var menuScroll = scrollNodes.menu;
341022
- if (!isOpen || !menuScroll) return;
341023
- menuScroll = menuScroll.addEventListener ? menuScroll : window;
341024
- if (!scrollNodes.anchors) {
341025
- scrollNodes.anchors = [];
341026
- var anchorScroll = getScrollAncestor(rootAnchorRef && rootAnchorRef.current);
341027
- while (anchorScroll && anchorScroll !== menuScroll) {
341028
- scrollNodes.anchors.push(anchorScroll);
341029
- anchorScroll = getScrollAncestor(anchorScroll);
341030
- }
341031
- }
341032
- var scroll = viewScroll;
341033
- if (scrollNodes.anchors.length && scroll === 'initial') scroll = 'auto';
341034
- if (scroll === 'initial') return;
341035
- var handleScroll = function handleScroll() {
341036
- if (scroll === 'auto') {
341037
- batchedUpdates(function () {
341038
- return handlePosition(true);
341039
- });
341040
- } else {
341041
- safeCall(onClose, {
341042
- reason: CloseReason.SCROLL
341043
- });
341044
- }
341045
- };
341046
- var scrollObservers = scrollNodes.anchors.concat(viewScroll !== 'initial' ? menuScroll : []);
341047
- scrollObservers.forEach(function (o) {
341048
- return o.addEventListener('scroll', handleScroll);
341049
- });
341050
- return function () {
341051
- return scrollObservers.forEach(function (o) {
341052
- return o.removeEventListener('scroll', handleScroll);
341053
- });
341054
- };
341055
- }, [rootAnchorRef, scrollNodes, isOpen, onClose, viewScroll, handlePosition]);
341056
- var hasOverflow = !!overflowData && overflowData.overflowAmt > 0;
341057
- (0,external_react_.useEffect)(function () {
341058
- if (hasOverflow || !isOpen || !parentScrollingRef) return;
341059
- var handleScroll = function handleScroll() {
341060
- return batchedUpdates(handlePosition);
341061
- };
341062
- var parentScroll = parentScrollingRef.current;
341063
- parentScroll.addEventListener('scroll', handleScroll);
341064
- return function () {
341065
- return parentScroll.removeEventListener('scroll', handleScroll);
341066
- };
341067
- }, [isOpen, hasOverflow, parentScrollingRef, handlePosition]);
341068
- (0,external_react_.useEffect)(function () {
341069
- if (typeof ResizeObserver !== 'function' || reposition === 'initial') return;
341070
- var resizeObserver = new ResizeObserver(function (_ref2) {
341071
- var entry = _ref2[0];
341072
- var borderBoxSize = entry.borderBoxSize,
341073
- target = entry.target;
341074
- var width, height;
341075
- if (borderBoxSize) {
341076
- var _ref3 = borderBoxSize[0] || borderBoxSize,
341077
- inlineSize = _ref3.inlineSize,
341078
- blockSize = _ref3.blockSize;
341079
- width = inlineSize;
341080
- height = blockSize;
341081
- } else {
341082
- var borderRect = target.getBoundingClientRect();
341083
- width = borderRect.width;
341084
- height = borderRect.height;
341085
- }
341086
- if (width === 0 || height === 0) return;
341087
- if (floatEqual(width, latestMenuSize.current.width, 1) && floatEqual(height, latestMenuSize.current.height, 1)) return;
341088
- (0,external_react_dom_.flushSync)(function () {
341089
- latestHandlePosition.current();
341090
- forceReposSubmenu();
341091
- });
341092
- });
341093
- var observeTarget = menuRef.current;
341094
- resizeObserver.observe(observeTarget, {
341095
- box: 'border-box'
341096
- });
341097
- return function () {
341098
- return resizeObserver.unobserve(observeTarget);
341099
- };
341100
- }, [reposition]);
341101
- (0,external_react_.useEffect)(function () {
341102
- if (!isOpen) {
341103
- dispatch(HoverActionTypes.RESET);
341104
- if (!closeTransition) setOverflowData();
341105
- return;
341106
- }
341107
- var _ref4 = menuItemFocus || {},
341108
- position = _ref4.position,
341109
- alwaysUpdate = _ref4.alwaysUpdate;
341110
- var setItemFocus = function setItemFocus() {
341111
- if (position === FocusPositions.FIRST) {
341112
- dispatch(HoverActionTypes.FIRST);
341113
- } else if (position === FocusPositions.LAST) {
341114
- dispatch(HoverActionTypes.LAST);
341115
- } else if (position >= -1) {
341116
- dispatch(HoverActionTypes.SET_INDEX, undefined, position);
341117
- }
341118
- };
341119
- if (alwaysUpdate) {
341120
- setItemFocus();
341121
- } else if (captureFocus) {
341122
- var id = setTimeout(function () {
341123
- if (!menuRef.current.contains(document.activeElement)) {
341124
- focusRef.current.focus();
341125
- setItemFocus();
341126
- }
341127
- }, openTransition ? 170 : 100);
341128
- return function () {
341129
- return clearTimeout(id);
341130
- };
341131
- }
341132
- }, [isOpen, openTransition, closeTransition, captureFocus, menuItemFocus, dispatch]);
341133
- var itemContext = (0,external_react_.useMemo)(function () {
341134
- return {
341135
- isParentOpen: isOpen,
341136
- submenuCtx: submenuCtx,
341137
- dispatch: dispatch,
341138
- updateItems: updateItems
341139
- };
341140
- }, [isOpen, submenuCtx, dispatch, updateItems]);
341141
- var maxHeight, overflowAmt;
341142
- if (overflowData) {
341143
- setDownOverflow ? overflowAmt = overflowData.overflowAmt : maxHeight = overflowData.height;
341144
- }
341145
- var listContext = (0,external_react_.useMemo)(function () {
341146
- return {
341147
- reposSubmenu: reposSubmenu,
341148
- submenuCtx: submenuCtx,
341149
- overflow: overflow,
341150
- overflowAmt: overflowAmt,
341151
- parentMenuRef: menuRef,
341152
- parentDir: expandedDirection
341153
- };
341154
- }, [reposSubmenu, submenuCtx, overflow, overflowAmt, expandedDirection]);
341155
- var overflowStyle = maxHeight >= 0 ? {
341156
- maxHeight: maxHeight,
341157
- overflow: overflow
341158
- } : undefined;
341159
- var modifiers = (0,external_react_.useMemo)(function () {
341160
- return {
341161
- state: state,
341162
- dir: expandedDirection
341163
- };
341164
- }, [state, expandedDirection]);
341165
- var arrowModifiers = (0,external_react_.useMemo)(function () {
341166
- return {
341167
- dir: expandedDirection
341168
- };
341169
- }, [expandedDirection]);
341170
- var _arrowClass = useBEM({
341171
- block: menuClass,
341172
- element: menuArrowClass,
341173
- modifiers: arrowModifiers,
341174
- className: arrowClassName
341175
- });
341176
- var menu = /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", _rollupPluginBabelHelpers_extends({
341177
- role: "menu",
341178
- "aria-label": ariaLabel
341179
- }, commonProps(isDisabled), utils_mergeProps({
341180
- onPointerEnter: parentSubmenuCtx == null ? void 0 : parentSubmenuCtx.off,
341181
- onPointerMove: onPointerMove,
341182
- onPointerLeave: onPointerLeave,
341183
- onKeyDown: onKeyDown,
341184
- onAnimationEnd: onAnimationEnd
341185
- }, restProps), {
341186
- ref: useCombinedRef(externalRef, menuRef),
341187
- className: useBEM({
341188
- block: menuClass,
341189
- modifiers: modifiers,
341190
- className: menuClassName
341191
- }),
341192
- style: _rollupPluginBabelHelpers_extends({}, menuStyle, overflowStyle, {
341193
- margin: 0,
341194
- display: state === 'closed' ? 'none' : undefined,
341195
- position: positionAbsolute,
341196
- left: menuPosition.x,
341197
- 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
341198
340047
  }),
341199
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", _rollupPluginBabelHelpers_extends({
341200
- tabIndex: -1,
341201
- style: {
341202
- position: positionAbsolute,
341203
- left: 0,
341204
- top: 0,
341205
- display: 'block',
341206
- outline: 'none'
341207
- },
341208
- ref: focusRef
341209
- }, dummyItemProps, focusProps)), arrow && /*#__PURE__*/(0,jsx_runtime.jsx)("li", _rollupPluginBabelHelpers_extends({
341210
- className: _arrowClass,
341211
- style: _rollupPluginBabelHelpers_extends({
341212
- display: 'block',
341213
- position: positionAbsolute,
341214
- left: arrowPosition.x,
341215
- top: arrowPosition.y
341216
- }, arrowStyle),
341217
- ref: arrowRef
341218
- }, dummyItemProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(MenuListContext.Provider, {
341219
- value: listContext,
341220
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuListItemContext.Provider, {
341221
- value: itemContext,
341222
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(HoverItemContext.Provider, {
341223
- value: hoverItem,
341224
- children: safeCall(children, modifiers)
341225
- })
341226
- })
341227
- })]
341228
- }));
341229
- return containerProps ? /*#__PURE__*/(0,jsx_runtime.jsx)(MenuContainer, _rollupPluginBabelHelpers_extends({}, containerProps, {
341230
- isOpen: isOpen,
341231
- children: menu
341232
- })) : menu;
341233
- };
341234
-
341235
-
341236
-
341237
- ;// ./node_modules/@szhsin/react-menu/dist/es/components/ControlledMenu.js
341238
-
341239
-
341240
-
341241
-
341242
-
341243
-
341244
-
341245
-
341246
-
341247
-
341248
- var ControlledMenu_excluded = ["aria-label", "className", "containerProps", "initialMounted", "unmountOnClose", "transition", "transitionTimeout", "boundingBoxRef", "boundingBoxPadding", "reposition", "submenuOpenDelay", "submenuCloseDelay", "skipOpen", "viewScroll", "portal", "theming", "onItemClick"];
341249
- var ControlledMenu = /*#__PURE__*/(0,external_react_.forwardRef)(function ControlledMenu(_ref, externalRef) {
341250
- var ariaLabel = _ref['aria-label'],
341251
- className = _ref.className,
341252
- containerProps = _ref.containerProps,
341253
- initialMounted = _ref.initialMounted,
341254
- unmountOnClose = _ref.unmountOnClose,
341255
- transition = _ref.transition,
341256
- transitionTimeout = _ref.transitionTimeout,
341257
- boundingBoxRef = _ref.boundingBoxRef,
341258
- boundingBoxPadding = _ref.boundingBoxPadding,
341259
- _ref$reposition = _ref.reposition,
341260
- reposition = _ref$reposition === void 0 ? 'auto' : _ref$reposition,
341261
- _ref$submenuOpenDelay = _ref.submenuOpenDelay,
341262
- submenuOpenDelay = _ref$submenuOpenDelay === void 0 ? 300 : _ref$submenuOpenDelay,
341263
- _ref$submenuCloseDela = _ref.submenuCloseDelay,
341264
- submenuCloseDelay = _ref$submenuCloseDela === void 0 ? 150 : _ref$submenuCloseDela,
341265
- skipOpen = _ref.skipOpen,
341266
- _ref$viewScroll = _ref.viewScroll,
341267
- viewScroll = _ref$viewScroll === void 0 ? 'initial' : _ref$viewScroll,
341268
- portal = _ref.portal,
341269
- theming = _ref.theming,
341270
- onItemClick = _ref.onItemClick,
341271
- restProps = _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(_ref, ControlledMenu_excluded);
341272
- var containerRef = (0,external_react_.useRef)(null);
341273
- var scrollNodesRef = (0,external_react_.useRef)({});
341274
- var anchorRef = restProps.anchorRef,
341275
- state = restProps.state,
341276
- onClose = restProps.onClose;
341277
- var settings = (0,external_react_.useMemo)(function () {
341278
- return {
341279
- initialMounted: initialMounted,
341280
- unmountOnClose: unmountOnClose,
341281
- transition: transition,
341282
- transitionTimeout: transitionTimeout,
341283
- boundingBoxRef: boundingBoxRef,
341284
- boundingBoxPadding: boundingBoxPadding,
341285
- rootMenuRef: containerRef,
341286
- rootAnchorRef: anchorRef,
341287
- scrollNodesRef: scrollNodesRef,
341288
- reposition: reposition,
341289
- viewScroll: viewScroll,
341290
- submenuOpenDelay: submenuOpenDelay,
341291
- submenuCloseDelay: submenuCloseDelay
341292
- };
341293
- }, [initialMounted, unmountOnClose, transition, transitionTimeout, anchorRef, boundingBoxRef, boundingBoxPadding, reposition, viewScroll, submenuOpenDelay, submenuCloseDelay]);
341294
- var eventHandlers = (0,external_react_.useMemo)(function () {
341295
- return {
341296
- handleClick: function handleClick(event, isCheckorRadio) {
341297
- if (!event.stopPropagation) safeCall(onItemClick, event);
341298
- var keepOpen = event.keepOpen;
341299
- if (keepOpen === undefined) {
341300
- keepOpen = isCheckorRadio && event.key === Keys.SPACE;
341301
- }
341302
- if (!keepOpen) {
341303
- safeCall(onClose, {
341304
- value: event.value,
341305
- key: event.key,
341306
- reason: CloseReason.CLICK
341307
- });
341308
- }
341309
- },
341310
- handleClose: function handleClose(key) {
341311
- safeCall(onClose, {
341312
- key: key,
341313
- reason: CloseReason.CLICK
341314
- });
341315
- }
341316
- };
341317
- }, [onItemClick, onClose]);
341318
- if (!state) return null;
341319
- var menuList = /*#__PURE__*/(0,jsx_runtime.jsx)(constants_SettingsContext.Provider, {
341320
- value: settings,
341321
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(EventHandlersContext.Provider, {
341322
- value: eventHandlers,
341323
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuList, _rollupPluginBabelHelpers_extends({}, restProps, {
341324
- ariaLabel: ariaLabel || 'Menu',
341325
- externalRef: externalRef,
341326
- containerRef: containerRef,
341327
- containerProps: {
341328
- className: className,
341329
- containerRef: containerRef,
341330
- containerProps: containerProps,
341331
- skipOpen: skipOpen,
341332
- theming: theming,
341333
- transition: transition,
341334
- onClose: onClose
341335
- }
341336
- }))
341337
- })
341338
- });
341339
- if (portal === true && typeof document !== 'undefined') {
341340
- return /*#__PURE__*/(0,external_react_dom_.createPortal)(menuList, document.body);
341341
- } else if (portal) {
341342
- return portal.target ? /*#__PURE__*/(0,external_react_dom_.createPortal)(menuList, portal.target) : portal.stablePosition ? null : menuList;
341343
- }
341344
- return menuList;
341345
- });
341346
- false ? 0 : void 0;
341347
-
341348
-
341349
-
341350
- ;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useItemEffect.js
341351
-
341352
-
341353
- var useItemEffect = function useItemEffect(isDisabled, itemRef, updateItems) {
341354
- useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function () {
341355
- if (false) {}
341356
- if (isDisabled) return;
341357
- var item = itemRef.current;
341358
- updateItems(item, true);
341359
- return function () {
341360
- updateItems(item);
341361
- };
341362
- }, [isDisabled, itemRef, updateItems]);
341363
- };
341364
-
341365
-
341366
-
341367
- ;// ./node_modules/@szhsin/react-menu/dist/es/hooks/useItemState.js
341368
-
341369
-
341370
-
341371
-
341372
- var useItemState = function useItemState(itemRef, focusRef, isHovering, isDisabled) {
341373
- var _useContext = (0,external_react_.useContext)(constants_SettingsContext),
341374
- submenuCloseDelay = _useContext.submenuCloseDelay;
341375
- var _useContext2 = (0,external_react_.useContext)(MenuListItemContext),
341376
- isParentOpen = _useContext2.isParentOpen,
341377
- submenuCtx = _useContext2.submenuCtx,
341378
- dispatch = _useContext2.dispatch,
341379
- updateItems = _useContext2.updateItems;
341380
- var setHover = function setHover() {
341381
- !isHovering && !isDisabled && dispatch(HoverActionTypes.SET, itemRef.current);
341382
- };
341383
- var unsetHover = function unsetHover() {
341384
- !isDisabled && dispatch(HoverActionTypes.UNSET, itemRef.current);
341385
- };
341386
- var onBlur = function onBlur(e) {
341387
- if (isHovering && !e.currentTarget.contains(e.relatedTarget)) unsetHover();
341388
- };
341389
- var onPointerMove = function onPointerMove(e) {
341390
- if (!isDisabled) {
341391
- e.stopPropagation();
341392
- submenuCtx.on(submenuCloseDelay, setHover, setHover);
341393
- }
341394
- };
341395
- var onPointerLeave = function onPointerLeave(_, keepHover) {
341396
- submenuCtx.off();
341397
- !keepHover && unsetHover();
341398
- };
341399
- useItemEffect(isDisabled, itemRef, updateItems);
341400
- (0,external_react_.useEffect)(function () {
341401
- if (isHovering && isParentOpen) {
341402
- focusRef.current && focusRef.current.focus();
341403
- }
341404
- }, [focusRef, isHovering, isParentOpen]);
341405
- return {
341406
- setHover: setHover,
341407
- onBlur: onBlur,
341408
- onPointerMove: onPointerMove,
341409
- onPointerLeave: onPointerLeave
341410
- };
341411
- };
341412
-
341413
-
341414
-
341415
- ;// ./node_modules/@szhsin/react-menu/dist/es/utils/withHovering.js
341416
-
341417
-
341418
-
341419
-
341420
-
341421
- var withHovering = function withHovering(name, WrappedComponent) {
341422
- var Component = /*#__PURE__*/(0,external_react_.memo)(WrappedComponent);
341423
- var WithHovering = /*#__PURE__*/(0,external_react_.forwardRef)(function (props, ref) {
341424
- var itemRef = (0,external_react_.useRef)(null);
341425
- return /*#__PURE__*/(0,jsx_runtime.jsx)(Component, _rollupPluginBabelHelpers_extends({}, props, {
341426
- itemRef: itemRef,
341427
- externalRef: ref,
341428
- isHovering: (0,external_react_.useContext)(HoverItemContext) === itemRef.current
341429
- }));
340048
+ isUser: isUser,
340049
+ ButtonIcon: Icon,
340050
+ title: title,
340051
+ buttonText: buttonText,
340052
+ onClickHandler: onClickHandler
341430
340053
  });
341431
- WithHovering.displayName = "WithHovering(" + name + ")";
341432
- return WithHovering;
341433
340054
  };
341434
-
341435
-
341436
-
341437
- ;// ./node_modules/@szhsin/react-menu/dist/es/components/MenuItem.js
341438
-
341439
-
341440
-
341441
-
341442
-
341443
-
341444
-
341445
-
341446
-
341447
-
341448
-
341449
-
341450
- var MenuItem_excluded = ["className", "value", "href", "type", "checked", "disabled", "children", "onClick", "isHovering", "itemRef", "externalRef"],
341451
- MenuItem_excluded2 = ["setHover"];
341452
- var MenuItem = /*#__PURE__*/withHovering('MenuItem', function MenuItem(_ref) {
341453
- var className = _ref.className,
341454
- value = _ref.value,
341455
- href = _ref.href,
341456
- type = _ref.type,
341457
- checked = _ref.checked,
341458
- disabled = _ref.disabled,
341459
- children = _ref.children,
341460
- onClick = _ref.onClick,
341461
- isHovering = _ref.isHovering,
341462
- itemRef = _ref.itemRef,
341463
- externalRef = _ref.externalRef,
341464
- restProps = _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(_ref, MenuItem_excluded);
341465
- var isDisabled = !!disabled;
341466
- var _useItemState = useItemState(itemRef, itemRef, isHovering, isDisabled),
341467
- setHover = _useItemState.setHover,
341468
- restStateProps = _rollupPluginBabelHelpers_objectWithoutPropertiesLoose(_useItemState, MenuItem_excluded2);
341469
- var eventHandlers = (0,external_react_.useContext)(EventHandlersContext);
341470
- var radioGroup = (0,external_react_.useContext)(RadioGroupContext);
341471
- var isRadio = type === 'radio';
341472
- var isCheckBox = type === 'checkbox';
341473
- var isAnchor = !!href && !isDisabled && !isRadio && !isCheckBox;
341474
- var isChecked = isRadio ? radioGroup.value === value : isCheckBox ? !!checked : false;
341475
- var handleClick = function handleClick(e) {
341476
- if (isDisabled) {
341477
- e.stopPropagation();
341478
- e.preventDefault();
341479
- return;
341480
- }
341481
- var event = {
341482
- value: value,
341483
- syntheticEvent: e
341484
- };
341485
- if (e.key !== undefined) event.key = e.key;
341486
- if (isCheckBox) event.checked = !isChecked;
341487
- if (isRadio) event.name = radioGroup.name;
341488
- safeCall(onClick, event);
341489
- if (isRadio) safeCall(radioGroup.onRadioChange, event);
341490
- eventHandlers.handleClick(event, isCheckBox || isRadio);
341491
- };
341492
- var handleKeyDown = function handleKeyDown(e) {
341493
- if (!isHovering) return;
341494
- switch (e.key) {
341495
- case Keys.ENTER:
341496
- case Keys.SPACE:
341497
- isAnchor ? e.key === Keys.SPACE && itemRef.current.click() : handleClick(e);
341498
- }
341499
- };
341500
- var modifiers = (0,external_react_.useMemo)(function () {
341501
- return {
341502
- type: type,
341503
- disabled: isDisabled,
341504
- hover: isHovering,
341505
- checked: isChecked,
341506
- anchor: isAnchor
341507
- };
341508
- }, [type, isDisabled, isHovering, isChecked, isAnchor]);
341509
- var mergedProps = utils_mergeProps(_rollupPluginBabelHelpers_extends({}, restStateProps, {
341510
- onPointerDown: setHover,
341511
- onKeyDown: handleKeyDown,
341512
- onClick: handleClick
341513
- }), restProps);
341514
- var menuItemProps = _rollupPluginBabelHelpers_extends({
341515
- role: isRadio ? 'menuitemradio' : isCheckBox ? 'menuitemcheckbox' : roleMenuitem,
341516
- 'aria-checked': isRadio || isCheckBox ? isChecked : undefined
341517
- }, commonProps(isDisabled, isHovering), mergedProps, {
341518
- ref: useCombinedRef(externalRef, itemRef),
341519
- className: useBEM({
341520
- block: menuClass,
341521
- element: menuItemClass,
341522
- modifiers: modifiers,
341523
- className: className
341524
- }),
341525
- children: (0,external_react_.useMemo)(function () {
341526
- return safeCall(children, modifiers);
341527
- }, [children, modifiers])
341528
- });
341529
- return isAnchor ? /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
341530
- role: roleNone,
341531
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", _rollupPluginBabelHelpers_extends({
341532
- href: href
341533
- }, menuItemProps))
341534
- }) : /*#__PURE__*/(0,jsx_runtime.jsx)("li", _rollupPluginBabelHelpers_extends({}, menuItemProps));
341535
- });
341536
- false ? 0 : void 0;
341537
-
341538
-
341539
-
341540
- ;// ./src/assets/stylesheets/ContextMenu.scss
341541
- // extracted by mini-css-extract-plugin
341542
-
341543
- ;// ./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
341544
340059
 
341545
340060
 
341546
340061
 
341547
340062
 
341548
340063
 
341549
- var ContextMenu = props => {
340064
+ var SidebarBar = props => {
341550
340065
  var {
341551
- align,
341552
- direction,
341553
- menuButtonLabel,
341554
- menuButtonClassName,
341555
- MenuButtonIcon,
341556
340066
  menuOptions,
341557
- offsetX,
341558
- offsetY
340067
+ option,
340068
+ toggleOption
341559
340069
  } = props;
341560
- var settings = (0,external_react_.useContext)(SettingsContext);
341561
- var menuButton = (0,external_react_.useRef)(null);
341562
- var contextMenu = (0,external_react_.useRef)();
341563
- var [isOpen, setOpen] = (0,external_react_.useState)(false);
341564
- var setMenuOpenState = isMenuOpen => {
341565
- setOpen(isMenuOpen);
341566
- if (isMenuOpen) {
341567
- var hiddenDiv = contextMenu.current.firstChild;
341568
- hiddenDiv.setAttribute("role", "menuitem");
341569
- hiddenDiv.setAttribute("aria-hidden", "true");
341570
- } else {
341571
- menuButton.current.focus();
341572
- }
341573
- };
341574
- var portalTarget = document.getElementById("textjam-root");
341575
- document.body;
341576
- return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
341577
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("button", {
341578
- "aria-haspopup": "menu",
341579
- "aria-label": menuButtonLabel,
341580
- className: "btn context-menu__drop".concat(menuButtonClassName ? " ".concat(menuButtonClassName) : ""),
341581
- title: menuButtonLabel,
341582
- type: "button",
341583
- ref: menuButton,
341584
- onClick: () => setMenuOpenState(true),
341585
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuButtonIcon, {})
341586
- }), /*#__PURE__*/(0,jsx_runtime.jsx)(ControlledMenu, {
341587
- transition: true,
341588
- align: align,
341589
- direction: direction,
341590
- menuStyle: {
341591
- padding: "5px"
341592
- },
341593
- offsetX: offsetX,
341594
- offsetY: offsetY,
341595
- position: "anchor",
341596
- viewScroll: "initial",
341597
- portal: {
341598
- target: portalTarget
341599
- },
341600
- menuClassName: "context-menu context-menu--".concat(settings.theme),
341601
- menuItemFocus: {
341602
- position: "first"
341603
- },
341604
- state: isOpen ? "open" : "closed",
341605
- anchorRef: menuButton,
341606
- ref: contextMenu,
341607
- onClose: () => setMenuOpenState(false),
341608
- children: menuOptions.map((option, i) => /*#__PURE__*/(0,jsx_runtime.jsxs)(MenuItem, {
341609
- className: "btn context-menu__item",
341610
- onClick: option.action,
341611
- 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"
341612
340097
  }, i))
341613
340098
  })]
341614
340099
  });
341615
340100
  };
341616
- /* harmony default export */ const ContextMenu_ContextMenu = (ContextMenu);
341617
- ;// ./src/components/Menus/FileMenu/FileMenu.jsx
341618
-
341619
-
341620
-
341621
-
341622
-
341623
-
341624
-
341625
-
341626
- var FileMenu = props => {
341627
- var dispatch = (0,external_react_redux_namespaceObject.useDispatch)();
341628
- var {
341629
- t
341630
- } = useTranslation_useTranslation();
341631
- var onClickRenameFile = () => {
341632
- dispatch(showRenameFileModal(props));
341633
- };
341634
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
341635
- onClick: e => e.stopPropagation(),
341636
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(ContextMenu_ContextMenu, {
341637
- align: "start",
341638
- direction: "right",
341639
- menuButtonLabel: t("filePanel.fileMenu.label"),
341640
- MenuButtonIcon: ellipsis_vertical,
341641
- menuOptions: [{
341642
- icon: pencil,
341643
- text: t("filePanel.fileMenu.renameItem"),
341644
- action: onClickRenameFile
341645
- }],
341646
- offsetX: 16,
341647
- offsetY: -8
341648
- })
341649
- });
341650
- };
341651
- /* harmony default export */ const FileMenu_FileMenu = (FileMenu);
341652
- ;// ./src/assets/stylesheets/FilePanel.scss
341653
- // extracted by mini-css-extract-plugin
341654
-
341655
- ;// ./src/assets/stylesheets/Sidebar.scss
341656
- // extracted by mini-css-extract-plugin
341657
-
340101
+ /* harmony default export */ const Sidebar_SidebarBar = (SidebarBar);
341658
340102
  ;// ./node_modules/re-resizable/lib/resizer.js
341659
340103
  var resizer_extends = (undefined && undefined.__extends) || (function () {
341660
340104
  var extendStatics = function (d, b) {
@@ -342590,6 +341034,7 @@ var ResizableWithHandle = props => {
342590
341034
 
342591
341035
 
342592
341036
 
341037
+
342593
341038
  var SidebarPanel = props => {
342594
341039
  var {
342595
341040
  children,
@@ -342604,29 +341049,29 @@ var SidebarPanel = props => {
342604
341049
  });
342605
341050
  var panelContent = /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
342606
341051
  children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
342607
- className: "sidebar__panel-header",
341052
+ className: Sidebar_styles_module.panelHeader,
342608
341053
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h2", {
342609
- className: "sidebar__panel-heading",
341054
+ className: Sidebar_styles_module.panelHeading,
342610
341055
  children: heading
342611
341056
  }), (buttons === null || buttons === void 0 ? void 0 : buttons.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
342612
- className: "sidebar__panel-buttons",
341057
+ className: Sidebar_styles_module.panelButtons,
342613
341058
  children: buttons
342614
341059
  })]
342615
341060
  }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
342616
- className: "sidebar__panel-content",
341061
+ className: Sidebar_styles_module.panelContent,
342617
341062
  children: children
342618
341063
  }), Footer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
342619
- className: "sidebar__panel-footer",
341064
+ className: Sidebar_styles_module.panelFooter,
342620
341065
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(Footer, {})
342621
341066
  })]
342622
341067
  });
342623
341068
  return isMobile ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
342624
341069
  "data-testid": "sidebar__panel",
342625
- className: classnames_default()("sidebar__panel", className, Footer && "sidebar__panel--with-footer"),
341070
+ className: classnames_default()(Sidebar_styles_module.panel, className, Footer && Sidebar_styles_module.panelWithFooter),
342626
341071
  children: panelContent
342627
341072
  }) : /*#__PURE__*/(0,jsx_runtime.jsx)(utils_ResizableWithHandle, {
342628
341073
  "data-testid": "sidebar__panel",
342629
- className: classnames_default()("sidebar__panel", className, Footer && "sidebar__panel--with-footer"),
341074
+ className: classnames_default()(Sidebar_styles_module.panel, className, Footer && Sidebar_styles_module.panelWithFooter),
342630
341075
  defaultWidth: defaultWidth,
342631
341076
  defaultHeight: "100%",
342632
341077
  handleDirection: "right",
@@ -342636,379 +341081,6 @@ var SidebarPanel = props => {
342636
341081
  });
342637
341082
  };
342638
341083
  /* harmony default export */ const Sidebar_SidebarPanel = (SidebarPanel);
342639
- ;// ./src/assets/icons/file.svg
342640
- var file_path;
342641
- function file_extends() { return 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; }, file_extends.apply(null, arguments); }
342642
-
342643
- function SvgFile(props) {
342644
- return /*#__PURE__*/external_react_.createElement("svg", file_extends({
342645
- width: 24,
342646
- height: 24,
342647
- fill: "none",
342648
- xmlns: "http://www.w3.org/2000/svg"
342649
- }, props), file_path || (file_path = /*#__PURE__*/external_react_.createElement("path", {
342650
- d: "M8 18h8v-2H8v2zm0-4h8v-2H8v2zm-4 8V2h10l6 6v14H4zm9-13V4H6v16h12V9h-5zM6 4v5-5 16V4z"
342651
- })));
342652
- }
342653
- /* harmony default export */ const file = (SvgFile);
342654
- ;// ./src/assets/icons/python_file.svg
342655
- var python_file_path;
342656
- function python_file_extends() { return python_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; }, python_file_extends.apply(null, arguments); }
342657
-
342658
- function SvgPythonFile(props) {
342659
- return /*#__PURE__*/external_react_.createElement("svg", python_file_extends({
342660
- "data-testid": "pythonIcon",
342661
- width: 24,
342662
- height: 24,
342663
- fill: "none",
342664
- xmlns: "http://www.w3.org/2000/svg"
342665
- }, props), python_file_path || (python_file_path = /*#__PURE__*/external_react_.createElement("path", {
342666
- d: "M11.527 11.626H9.162c-1.656 0-2.72 1.065-2.72 2.72v2.129c0 .236-.119.355-.355.355H5.022c-1.064 0-1.892-.473-2.365-1.42-.355-.709-.591-1.419-.591-2.128-.119-1.301-.119-2.602.355-3.903.354-1.064 1.064-1.892 2.247-2.129h6.859c.118 0 .355 0 .355-.118v-.591s-.237-.119-.355-.119H7.506c-.355 0-.473-.118-.473-.473V4.412c0-.828.355-1.42 1.064-1.656.592-.236 1.183-.473 1.774-.591 1.42-.237 2.839-.237 4.258.118.591.118 1.182.355 1.655.71.474.473.828.946.71 1.655v4.258c0 1.656-.946 2.602-2.602 2.602-.828.118-1.655.118-2.365.118zM8.216 4.53c0 .473.354.946.946.946.473 0 .946-.473.946-.946s-.473-.828-.946-.946c-.592 0-.946.473-.946.946zm4.257 8.279h2.365c1.656 0 2.72-1.065 2.72-2.72v-2.13c0-.236.119-.354.355-.354h1.065c1.064 0 1.892.473 2.365 1.42.355.709.591 1.418.591 2.128.119 1.3.119 2.602-.355 3.903-.354 1.064-1.064 1.892-2.247 2.129h-6.859c-.118 0-.355 0-.355.118v.591s.237.118.355.118h4.021c.355 0 .473.119.473.473v1.538c0 .828-.355 1.42-1.064 1.656-.592.236-1.183.473-1.774.591-1.42.236-2.839.236-4.258-.118-.591-.119-1.182-.355-1.655-.71-.474-.473-.828-.946-.71-1.656V15.53c0-1.656.946-2.602 2.602-2.602.828-.118 1.655-.118 2.365-.118zm3.311 7.096c0-.473-.354-.947-.946-.947-.473 0-.946.474-.946.947s.473.828.946.946c.592 0 .947-.473.947-.946z"
342667
- })));
342668
- }
342669
- /* harmony default export */ const python_file = (SvgPythonFile);
342670
- ;// ./src/assets/icons/html_file.svg
342671
- var html_file_path;
342672
- function html_file_extends() { return html_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; }, html_file_extends.apply(null, arguments); }
342673
-
342674
- function SvgHtmlFile(props) {
342675
- return /*#__PURE__*/external_react_.createElement("svg", html_file_extends({
342676
- "data-testid": "htmlIcon",
342677
- width: 24,
342678
- height: 24,
342679
- fill: "none",
342680
- xmlns: "http://www.w3.org/2000/svg"
342681
- }, props), html_file_path || (html_file_path = /*#__PURE__*/external_react_.createElement("path", {
342682
- d: "M2 11.125l7.5-7v3.25l-5.625 5 5.625 5v3.25l-7.5-7v-2.5zm20 2.625l-7.5 7v-3.375l5.75-5-5.75-5V4l7.5 7v2.75z"
342683
- })));
342684
- }
342685
- /* harmony default export */ const html_file = (SvgHtmlFile);
342686
- ;// ./src/assets/icons/css_file.svg
342687
- var css_file_path;
342688
- function css_file_extends() { return css_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; }, css_file_extends.apply(null, arguments); }
342689
-
342690
- function SvgCssFile(props) {
342691
- return /*#__PURE__*/external_react_.createElement("svg", css_file_extends({
342692
- "data-testid": "cssIcon",
342693
- width: 18,
342694
- height: 18,
342695
- viewBox: "0 0 20 18",
342696
- fill: "none",
342697
- xmlns: "http://www.w3.org/2000/svg"
342698
- }, props), css_file_path || (css_file_path = /*#__PURE__*/external_react_.createElement("path", {
342699
- d: "M2.053 17.638l.967-4.833H0v-2.537h3.624l.604-3.02h-3.14V4.711h3.744L5.798 0h3.383l-.966 4.711h3.382L12.564 0h3.382l-.966 4.711H18v2.537h-3.504l-.724 3.02h3.14v2.537h-3.624l-.966 4.833H8.939l.967-4.833H6.523l-.966 4.833H2.053zm8.336-7.37l.604-3.02H7.611l-.604 3.02h3.382z"
342700
- })));
342701
- }
342702
- /* harmony default export */ const css_file = (SvgCssFile);
342703
- ;// ./src/assets/icons/csv_file.svg
342704
- var csv_file_path;
342705
- function csv_file_extends() { return csv_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; }, csv_file_extends.apply(null, arguments); }
342706
-
342707
- function SvgCsvFile(props) {
342708
- return /*#__PURE__*/external_react_.createElement("svg", csv_file_extends({
342709
- width: 24,
342710
- height: 24,
342711
- fill: "none",
342712
- xmlns: "http://www.w3.org/2000/svg"
342713
- }, props), csv_file_path || (csv_file_path = /*#__PURE__*/external_react_.createElement("path", {
342714
- d: "M3 3v17.8h18V3H3zm2.9 3.7H11V8H5.9V6.7zm7 0H18V8h-5.1V6.7zm-7 3H11V11H5.9V9.7zm7 0H18V11h-5.1V9.7zm-7 3H11V14H5.9v-1.3zm7 0H18V14h-5.1v-1.3zm-7 3H11V17H5.9v-1.3zm7 0H18V17h-5.1v-1.3z"
342715
- })));
342716
- }
342717
- /* harmony default export */ const csv_file = (SvgCsvFile);
342718
- ;// ./src/utils/FileIcon.jsx
342719
-
342720
-
342721
-
342722
-
342723
-
342724
-
342725
-
342726
- var FileIcon = _ref => {
342727
- var {
342728
- ext
342729
- } = _ref;
342730
- switch (ext) {
342731
- case FILE_EXTENSIONS.py:
342732
- return /*#__PURE__*/(0,jsx_runtime.jsx)(python_file, {
342733
- "data-testid": "pythonIcon"
342734
- });
342735
- case FILE_EXTENSIONS.html:
342736
- return /*#__PURE__*/(0,jsx_runtime.jsx)(html_file, {
342737
- "data-testid": "htmlIcon"
342738
- });
342739
- case FILE_EXTENSIONS.css:
342740
- return /*#__PURE__*/(0,jsx_runtime.jsx)(css_file, {
342741
- "data-testid": "cssIcon"
342742
- });
342743
- case FILE_EXTENSIONS.csv:
342744
- return /*#__PURE__*/(0,jsx_runtime.jsx)(csv_file, {
342745
- "data-testid": "csvIcon"
342746
- });
342747
- default:
342748
- return /*#__PURE__*/(0,jsx_runtime.jsx)(file, {
342749
- "data-testid": "defaultFileIcon"
342750
- });
342751
- }
342752
- };
342753
- /* harmony default export */ const utils_FileIcon = (FileIcon);
342754
- ;// ./src/assets/icons/plus.svg
342755
- var plus_path;
342756
- function plus_extends() { return plus_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; }, plus_extends.apply(null, arguments); }
342757
-
342758
- function SvgPlus(props) {
342759
- return /*#__PURE__*/external_react_.createElement("svg", plus_extends({
342760
- width: 14,
342761
- height: 14,
342762
- fill: "none",
342763
- xmlns: "http://www.w3.org/2000/svg"
342764
- }, props), plus_path || (plus_path = /*#__PURE__*/external_react_.createElement("path", {
342765
- d: "M6 14V8H0V6h6V0h2v6h6v2H8v6H6z"
342766
- })));
342767
- }
342768
- /* harmony default export */ const plus = (SvgPlus);
342769
- ;// ./src/components/Menus/Sidebar/FilePanel/FilePanel.jsx
342770
-
342771
-
342772
-
342773
-
342774
-
342775
-
342776
-
342777
-
342778
-
342779
-
342780
-
342781
-
342782
-
342783
- var FilePanel = _ref => {
342784
- var {
342785
- isMobile
342786
- } = _ref;
342787
- var project = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.project);
342788
- var openFiles = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.openFiles);
342789
- var readOnly = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.readOnly);
342790
- var {
342791
- t
342792
- } = useTranslation_useTranslation();
342793
- var dispatch = (0,external_react_redux_namespaceObject.useDispatch)();
342794
- var switchToFileTab = (panelIndex, fileIndex) => {
342795
- dispatch(setFocussedFileIndex({
342796
- panelIndex,
342797
- fileIndex
342798
- }));
342799
- };
342800
- var openFileTab = fileName => {
342801
- if (openFiles.flat().includes(fileName)) {
342802
- var panelIndex = openFiles.map(fileNames => fileNames.includes(fileName)).indexOf(true);
342803
- var fileIndex = openFiles[panelIndex].indexOf(fileName);
342804
- switchToFileTab(panelIndex, fileIndex);
342805
- } else {
342806
- dispatch(openFile(fileName));
342807
- switchToFileTab(0, openFiles[0].length);
342808
- }
342809
- if (isMobile) {
342810
- dispatch(hideSidebar());
342811
- }
342812
- };
342813
- var openNewFileModal = () => {
342814
- dispatch(showNewFileModal());
342815
- };
342816
- var buttons = readOnly ? [] : [/*#__PURE__*/(0,jsx_runtime.jsx)(DesignSystemButton_DesignSystemButton, {
342817
- text: t("filePanel.newFileButton"),
342818
- textAways: true,
342819
- icon: /*#__PURE__*/(0,jsx_runtime.jsx)(plus, {}),
342820
- onClick: openNewFileModal,
342821
- className: "btn--primary",
342822
- fill: true
342823
- })];
342824
- if (!project || !project.components) {
342825
- return null;
342826
- }
342827
- return /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarPanel, {
342828
- heading: t("filePanel.files"),
342829
- buttons: buttons,
342830
- children: project.components.map((file, i) => /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
342831
- className: "files-list-item-wrapper",
342832
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DesignSystemButton_DesignSystemButton, {
342833
- className: "files-list-item",
342834
- onClick: () => openFileTab("".concat(file.name, ".").concat(file.extension)),
342835
- text: "".concat(file.name, ".").concat(file.extension),
342836
- icon: /*#__PURE__*/(0,jsx_runtime.jsx)(utils_FileIcon, {
342837
- ext: file.extension
342838
- }),
342839
- type: "tertiary",
342840
- textAlways: true,
342841
- small: true
342842
- }), readOnly || file.name === "main" && file.extension === FILE_EXTENSIONS.py || file.name === "index" && file.extension === FILE_EXTENSIONS.html ? null : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
342843
- className: "files-list-item__menu",
342844
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(FileMenu_FileMenu, {
342845
- fileKey: i,
342846
- name: file.name,
342847
- ext: file.extension
342848
- })
342849
- })]
342850
- }, i))
342851
- });
342852
- };
342853
- /* harmony default export */ const FilePanel_FilePanel = (FilePanel);
342854
- ;// ./src/assets/icons/double_arrow_left.svg
342855
- var double_arrow_left_path;
342856
- function double_arrow_left_extends() { return double_arrow_left_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; }, double_arrow_left_extends.apply(null, arguments); }
342857
-
342858
- function SvgDoubleArrowLeft(props) {
342859
- return /*#__PURE__*/external_react_.createElement("svg", double_arrow_left_extends({
342860
- width: 24,
342861
- height: 24,
342862
- fill: "none",
342863
- xmlns: "http://www.w3.org/2000/svg"
342864
- }, props), double_arrow_left_path || (double_arrow_left_path = /*#__PURE__*/external_react_.createElement("path", {
342865
- d: "M11 18l-6-6 6-6 1.4 1.4L7.825 12l4.575 4.6L11 18zm6.6 0l-6-6 6-6L19 7.4 14.425 12 19 16.6 17.6 18z"
342866
- })));
342867
- }
342868
- /* harmony default export */ const double_arrow_left = (SvgDoubleArrowLeft);
342869
- ;// ./src/assets/icons/double_arrow_right.svg
342870
- var double_arrow_right_path;
342871
- function double_arrow_right_extends() { return double_arrow_right_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; }, double_arrow_right_extends.apply(null, arguments); }
342872
-
342873
- function SvgDoubleArrowRight(props) {
342874
- return /*#__PURE__*/external_react_.createElement("svg", double_arrow_right_extends({
342875
- width: 24,
342876
- height: 24,
342877
- fill: "none",
342878
- xmlns: "http://www.w3.org/2000/svg"
342879
- }, props), double_arrow_right_path || (double_arrow_right_path = /*#__PURE__*/external_react_.createElement("path", {
342880
- d: "M6.4 18L5 16.6 9.575 12 5 7.4 6.4 6l6 6-6 6zm6.6 0l-1.4-1.4 4.575-4.6L11.6 7.4 13 6l6 6-6 6z"
342881
- })));
342882
- }
342883
- /* harmony default export */ const double_arrow_right = (SvgDoubleArrowRight);
342884
- ;// ./src/components/Menus/Sidebar/SidebarBarOption.jsx
342885
-
342886
-
342887
-
342888
-
342889
- var SidebarBarOption = props => {
342890
- var {
342891
- Icon,
342892
- isActive,
342893
- name,
342894
- title,
342895
- toggleOption
342896
- } = props;
342897
- var onClickHandler = () => {
342898
- toggleOption(name);
342899
- if (name === "file" && window.plausible) {
342900
- window.plausible("Side menu open project files");
342901
- }
342902
- };
342903
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
342904
- className: classnames_default()("sidebar__bar-option-wrapper", {
342905
- "sidebar__bar-option-wrapper--selected": isActive
342906
- }),
342907
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button, {
342908
- className: classnames_default()("sidebar__bar-option", {
342909
- "sidebar__bar-option--selected": isActive
342910
- }),
342911
- ButtonIcon: Icon,
342912
- title: title,
342913
- onClickHandler: onClickHandler
342914
- })
342915
- });
342916
- };
342917
- /* harmony default export */ const Sidebar_SidebarBarOption = (SidebarBarOption);
342918
- ;// ./src/assets/html_icon.svg
342919
- const html_icon_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxyZWN0IHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcng9IjQiIGZpbGw9IiMxMDFCMjkiLz4NCjxwYXRoIGQ9Ik0xMCAxOC43NUwxNy41IDExLjc1VjE1TDExLjg3NSAyMEwxNy41IDI1VjI4LjI1TDEwIDIxLjI1VjE4Ljc1Wk0zMCAyMS4zNzVMMjIuNSAyOC4zNzVWMjVMMjguMjUgMjBMMjIuNSAxNVYxMS42MjVMMzAgMTguNjI1VjIxLjM3NVoiIGZpbGw9IiM4OERERDQiLz4NCjwvc3ZnPg0K";
342920
- ;// ./src/assets/python_icon.svg
342921
- const python_icon_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxyZWN0IHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcng9IjQiIGZpbGw9IiMxMDFCMjkiLz4NCjxwYXRoIGQ9Ik0xOS41MDAxIDE5LjM3NUgxNy4wMDAxQzE1LjI1MDEgMTkuMzc1IDE0LjEyNTEgMjAuNSAxNC4xMjUxIDIyLjI1VjI0LjVDMTQuMTI1MSAyNC43NSAxNC4wMDAxIDI0Ljg3NSAxMy43NTAxIDI0Ljg3NUgxMi42MjUxQzExLjUwMDEgMjQuODc1IDEwLjYyNTEgMjQuMzc1IDEwLjEyNTEgMjMuMzc1QzkuNzUwMTEgMjIuNjI1IDkuNTAwMTEgMjEuODc1IDkuNTAwMTEgMjEuMTI1QzkuMzc1MTEgMTkuNzUgOS4zNzUxMSAxOC4zNzUgOS44NzUxMSAxN0MxMC4yNTAxIDE1Ljg3NSAxMS4wMDAxIDE1IDEyLjI1MDEgMTQuNzVIMTkuNTAwMUMxOS42MjUxIDE0Ljc1IDE5Ljg3NTEgMTQuNzUgMTkuODc1MSAxNC42MjVWMTRDMTkuODc1MSAxNCAxOS42MjUxIDEzLjg3NSAxOS41MDAxIDEzLjg3NUgxNS4yNTAxQzE0Ljg3NTEgMTMuODc1IDE0Ljc1MDEgMTMuNzUgMTQuNzUwMSAxMy4zNzVWMTEuNzVDMTQuNzUwMSAxMC44NzUgMTUuMTI1MSAxMC4yNSAxNS44NzUxIDkuOTk5OThDMTYuNTAwMSA5Ljc0OTk4IDE3LjEyNTEgOS40OTk5OCAxNy43NTAxIDkuMzc0OThDMTkuMjUwMSA5LjEyNDk4IDIwLjc1MDEgOS4xMjQ5OCAyMi4yNTAxIDkuNDk5OThDMjIuODc1MSA5LjYyNDk4IDIzLjUwMDEgOS44NzQ5OCAyNC4wMDAxIDEwLjI1QzI0LjUwMDEgMTAuNzUgMjQuODc1MSAxMS4yNSAyNC43NTAxIDEyVjE2LjVDMjQuNzUwMSAxOC4yNSAyMy43NTAxIDE5LjI1IDIyLjAwMDEgMTkuMjVDMjEuMTI1MSAxOS4zNzUgMjAuMjUwMSAxOS4zNzUgMTkuNTAwMSAxOS4zNzVaTTE2LjAwMDEgMTEuODc1QzE2LjAwMDEgMTIuMzc1IDE2LjM3NTEgMTIuODc1IDE3LjAwMDEgMTIuODc1QzE3LjUwMDEgMTIuODc1IDE4LjAwMDEgMTIuMzc1IDE4LjAwMDEgMTEuODc1QzE4LjAwMDEgMTEuMzc1IDE3LjUwMDEgMTEgMTcuMDAwMSAxMC44NzVDMTYuMzc1MSAxMC44NzUgMTYuMDAwMSAxMS4zNzUgMTYuMDAwMSAxMS44NzVaTTIwLjUwMDEgMjAuNjI1SDIzLjAwMDFDMjQuNzUwMSAyMC42MjUgMjUuODc1MSAxOS41IDI1Ljg3NTEgMTcuNzVWMTUuNUMyNS44NzUxIDE1LjI1IDI2LjAwMDEgMTUuMTI1IDI2LjI1MDEgMTUuMTI1SDI3LjM3NTFDMjguNTAwMSAxNS4xMjUgMjkuMzc1MSAxNS42MjUgMjkuODc1MSAxNi42MjVDMzAuMjUwMSAxNy4zNzUgMzAuNTAwMSAxOC4xMjUgMzAuNTAwMSAxOC44NzVDMzAuNjI1MSAyMC4yNSAzMC42MjUxIDIxLjYyNSAzMC4xMjUxIDIzQzI5Ljc1MDEgMjQuMTI1IDI5LjAwMDEgMjUgMjcuNzUwMSAyNS4yNUgyMC41MDAxQzIwLjM3NTEgMjUuMjUgMjAuMTI1MSAyNS4yNSAyMC4xMjUxIDI1LjM3NVYyNkMyMC4xMjUxIDI2IDIwLjM3NTEgMjYuMTI1IDIwLjUwMDEgMjYuMTI1SDI0Ljc1MDFDMjUuMTI1MSAyNi4xMjUgMjUuMjUwMSAyNi4yNSAyNS4yNTAxIDI2LjYyNVYyOC4yNUMyNS4yNTAxIDI5LjEyNSAyNC44NzUxIDI5Ljc1IDI0LjEyNTEgMzBDMjMuNTAwMSAzMC4yNSAyMi44NzUxIDMwLjUgMjIuMjUwMSAzMC42MjVDMjAuNzUwMSAzMC44NzUgMTkuMjUwMSAzMC44NzUgMTcuNzUwMSAzMC41QzE3LjEyNTEgMzAuMzc1IDE2LjUwMDEgMzAuMTI1IDE2LjAwMDEgMjkuNzVDMTUuNTAwMSAyOS4yNSAxNS4xMjUxIDI4Ljc1IDE1LjI1MDEgMjhWMjMuNUMxNS4yNTAxIDIxLjc1IDE2LjI1MDEgMjAuNzUgMTguMDAwMSAyMC43NUMxOC44NzUxIDIwLjYyNSAxOS43NTAxIDIwLjYyNSAyMC41MDAxIDIwLjYyNVpNMjQuMDAwMSAyOC4xMjVDMjQuMDAwMSAyNy42MjUgMjMuNjI1MSAyNy4xMjUgMjMuMDAwMSAyNy4xMjVDMjIuNTAwMSAyNy4xMjUgMjIuMDAwMSAyNy42MjUgMjIuMDAwMSAyOC4xMjVDMjIuMDAwMSAyOC42MjUgMjIuNTAwMSAyOSAyMy4wMDAxIDI5LjEyNUMyMy42MjUxIDI5LjEyNSAyNC4wMDAxIDI4LjYyNSAyNC4wMDAxIDI4LjEyNVoiIGZpbGw9IiM4OURERDUiLz4NCjwvc3ZnPg0K";
342922
- ;// ./src/components/Menus/Sidebar/SidebarBar.jsx
342923
-
342924
-
342925
-
342926
-
342927
-
342928
-
342929
-
342930
-
342931
-
342932
-
342933
-
342934
-
342935
-
342936
-
342937
- var SidebarBar = props => {
342938
- var {
342939
- menuOptions,
342940
- option,
342941
- toggleOption
342942
- } = props;
342943
- var project = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.project);
342944
- var {
342945
- t
342946
- } = useTranslation_useTranslation();
342947
- var topMenuOptions = menuOptions.filter(menuOption => menuOption.position === "top");
342948
- var bottomMenuOptions = menuOptions.filter(menuOption => menuOption.position === "bottom");
342949
- var isMobile = (0,react_responsive.useMediaQuery)({
342950
- query: MOBILE_MEDIA_QUERY
342951
- });
342952
- var expandPopOut = () => {
342953
- var option = "file";
342954
- toggleOption(option);
342955
- if (window.plausible) {
342956
- // TODO: Make dynamic events for each option or rename this event
342957
- window.plausible("Expand file pane");
342958
- }
342959
- };
342960
- var collapsePopOut = () => {
342961
- toggleOption(option);
342962
- if (window.plausible) {
342963
- window.plausible("Collapse file pane");
342964
- }
342965
- };
342966
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
342967
- className: classnames_default()("sidebar__bar", {
342968
- "sidebar__bar--selected": option
342969
- }),
342970
- children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
342971
- className: "sidebar__bar-options--top",
342972
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
342973
- className: "editor-logo",
342974
- src: project.project_type === PROJECT_TYPES.python ? python_icon_namespaceObject : html_icon_namespaceObject,
342975
- alt: t("header.editorLogoAltText")
342976
- }), topMenuOptions.map((menuOption, i) => /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarBarOption, {
342977
- Icon: menuOption.icon,
342978
- title: menuOption.title,
342979
- isActive: option === menuOption.name,
342980
- toggleOption: toggleOption,
342981
- name: menuOption.name
342982
- }, i))]
342983
- }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
342984
- className: "sidebar__bar-options--bottom",
342985
- children: [bottomMenuOptions.map((menuOption, i) => /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarBarOption, {
342986
- Icon: menuOption.icon,
342987
- title: menuOption.title,
342988
- isActive: option === menuOption.name,
342989
- toggleOption: toggleOption,
342990
- name: menuOption.name
342991
- }, i)), !isMobile && (option ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
342992
- className: "sidebar__bar-option-wrapper",
342993
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button, {
342994
- className: "sidebar__bar-option",
342995
- ButtonIcon: double_arrow_left,
342996
- title: t("sidebar.collapse"),
342997
- onClickHandler: collapsePopOut
342998
- })
342999
- }) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
343000
- className: "sidebar__bar-option-wrapper",
343001
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button, {
343002
- className: "sidebar__bar-option",
343003
- ButtonIcon: double_arrow_right,
343004
- title: t("sidebar.expand"),
343005
- onClickHandler: expandPopOut
343006
- })
343007
- }))]
343008
- })]
343009
- });
343010
- };
343011
- /* harmony default export */ const Sidebar_SidebarBar = (SidebarBar);
343012
341084
  // EXTERNAL MODULE: ./node_modules/cookie/index.js
343013
341085
  var cookie = __webpack_require__(57427);
343014
341086
  ;// ./node_modules/universal-cookie/es6/utils.js
@@ -343440,184 +341512,118 @@ var SettingsPanel = () => {
343440
341512
  });
343441
341513
  };
343442
341514
  /* harmony default export */ const SettingsPanel_SettingsPanel = (SettingsPanel);
343443
- ;// ./src/assets/icons/home.svg
343444
- var home_path;
343445
- function home_extends() { return 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; }, home_extends.apply(null, arguments); }
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); }
343446
341518
 
343447
- function SvgHome(props) {
343448
- return /*#__PURE__*/external_react_.createElement("svg", home_extends({
343449
- width: 24,
343450
- height: 24,
341519
+ function SvgTjFile(props) {
341520
+ return /*#__PURE__*/external_react_.createElement("svg", tj_file_extends({
341521
+ width: 22,
341522
+ height: 20,
343451
341523
  fill: "none",
343452
341524
  xmlns: "http://www.w3.org/2000/svg"
343453
- }, props), home_path || (home_path = /*#__PURE__*/external_react_.createElement("path", {
343454
- d: "M6 19h3v-6h6v6h3v-9l-6-4.5L6 10v9zm-2 2V9l8-6 8 6v12h-7v-6h-2v6H4z"
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"
343455
341531
  })));
343456
341532
  }
343457
- /* harmony default export */ const home = (SvgHome);
343458
- ;// ./src/assets/icons/settings.svg
343459
- var settings_path;
343460
- function settings_extends() { return settings_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; }, settings_extends.apply(null, arguments); }
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); }
343461
341537
 
343462
- function SvgSettings(props) {
343463
- return /*#__PURE__*/external_react_.createElement("svg", settings_extends({
341538
+ function SvgTjActivity(props) {
341539
+ return /*#__PURE__*/external_react_.createElement("svg", tj_activity_extends({
343464
341540
  width: 24,
343465
341541
  height: 24,
343466
341542
  fill: "none",
343467
341543
  xmlns: "http://www.w3.org/2000/svg"
343468
- }, props), settings_path || (settings_path = /*#__PURE__*/external_react_.createElement("path", {
343469
- d: "M9.25 22l-.4-3.2a3.79 3.79 0 01-.613-.3 8.266 8.266 0 01-.562-.375L4.7 19.375l-2.75-4.75 2.575-1.95a2.387 2.387 0 01-.025-.338v-.675c0-.108.008-.22.025-.337L1.95 9.375l2.75-4.75 2.975 1.25c.183-.133.375-.258.575-.375.2-.117.4-.217.6-.3l.4-3.2h5.5l.4 3.2c.217.083.42.183.612.3.192.117.38.242.563.375l2.975-1.25 2.75 4.75-2.575 1.95c.017.117.025.23.025.338v.675c0 .108-.017.22-.05.337l2.575 1.95-2.75 4.75-2.95-1.25a6.842 6.842 0 01-.575.375c-.2.117-.4.217-.6.3l-.4 3.2h-5.5zm2.8-6.5c.967 0 1.792-.342 2.475-1.025A3.372 3.372 0 0015.55 12c0-.967-.342-1.792-1.025-2.475A3.373 3.373 0 0012.05 8.5c-.983 0-1.813.342-2.488 1.025A3.393 3.393 0 008.55 12c0 .967.337 1.792 1.012 2.475.676.683 1.505 1.025 2.488 1.025zm0-2c-.417 0-.77-.146-1.063-.438A1.446 1.446 0 0110.55 12c0-.417.146-.77.438-1.063a1.446 1.446 0 011.062-.437c.417 0 .77.146 1.063.438.291.291.437.645.437 1.062 0 .417-.146.77-.438 1.063a1.447 1.447 0 01-1.062.437zM11 20h1.975l.35-2.65c.517-.133.996-.33 1.438-.588.441-.258.845-.57 1.212-.937l2.475 1.025.975-1.7-2.15-1.625c.083-.233.142-.48.175-.738a6.153 6.153 0 000-1.575 3.535 3.535 0 00-.175-.737l2.15-1.625-.975-1.7-2.475 1.05a5.556 5.556 0 00-1.213-.962 5.607 5.607 0 00-1.437-.588L13 4h-1.975l-.35 2.65c-.517.133-.996.33-1.438.587-.441.259-.845.571-1.212.938L5.55 7.15l-.975 1.7 2.15 1.6c-.083.25-.142.5-.175.75s-.05.517-.05.8c0 .267.017.525.05.775s.092.5.175.75l-2.15 1.625.975 1.7 2.475-1.05c.367.383.77.704 1.212.962.442.259.921.455 1.438.588L11 20z"
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"
343470
341550
  })));
343471
341551
  }
343472
- /* harmony default export */ const settings = (SvgSettings);
343473
- ;// ./src/assets/stylesheets/ProjectsPanel.scss
343474
- // extracted by mini-css-extract-plugin
343475
-
343476
- ;// ./src/assets/stylesheets/ProjectInfo.scss
343477
- // extracted by mini-css-extract-plugin
343478
-
343479
- ;// ./src/components/Menus/Sidebar/ProjectsPanel/ProjectInfo/ProjectInfo.jsx
343480
-
343481
-
343482
-
343483
-
343484
-
343485
-
343486
- var ProjectInfo = _ref => {
343487
- var {
343488
- className
343489
- } = _ref;
343490
- var project_type = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.project.project_type);
343491
- var {
343492
- t
343493
- } = useTranslation_useTranslation();
343494
- return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
343495
- children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
343496
- className: classnames_default()("project-info", className),
343497
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("label", {
343498
- htmlFor: "project_type",
343499
- className: "project-type__label",
343500
- children: t("projectsPanel.projectTypeLabel")
343501
- }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
343502
- className: "project-type__text",
343503
- children: t("projectTypes.".concat(project_type))
343504
- })]
343505
- })
343506
- });
343507
- };
343508
- /* harmony default export */ const ProjectInfo_ProjectInfo = (ProjectInfo);
343509
- ;// ./src/components/Menus/Sidebar/ProjectsPanel/ProjectsPanel.jsx
343510
-
343511
-
343512
-
343513
-
343514
-
343515
-
343516
-
343517
-
343518
-
343519
-
343520
-
343521
-
343522
-
343523
-
343524
-
343525
-
343526
- var ProjectsPanel = () => {
343527
- var {
343528
- t
343529
- } = useTranslation_useTranslation();
343530
- var isLoggedIn = (0,external_react_redux_namespaceObject.useSelector)(state => {
343531
- var _state$auth;
343532
- return state === null || state === void 0 || (_state$auth = state.auth) === null || _state$auth === void 0 ? void 0 : _state$auth.user;
343533
- });
343534
- var isMobile = (0,react_responsive.useMediaQuery)({
343535
- query: MOBILE_MEDIA_QUERY
343536
- });
343537
- var readOnly = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.readOnly);
343538
- var saveOptions = /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
343539
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
343540
- className: "projects-panel__save",
343541
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(SaveButton_SaveButton, {
343542
- className: "projects-panel__save-button"
343543
- })
343544
- }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
343545
- className: "projects-panel__save-status",
343546
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(SaveStatus_SaveStatus, {
343547
- isMobile: isMobile
343548
- })
343549
- })]
343550
- });
343551
- var navigateToProjectsPage = () => {
343552
- document.dispatchEvent(navigateToProjectsPageEvent);
343553
- };
343554
- var buttons = isLoggedIn ? [/*#__PURE__*/(0,jsx_runtime.jsx)(DesignSystemButton_DesignSystemButton, {
343555
- className: "btn--primary projects-panel__your-projects-button",
343556
- onClick: navigateToProjectsPage,
343557
- text: t("projectsPanel.yourProjectsButton"),
343558
- textAlways: true
343559
- }, "your-projects")] : [];
343560
- return /*#__PURE__*/(0,jsx_runtime.jsxs)(Sidebar_SidebarPanel, {
343561
- heading: t("projectsPanel.projects"),
343562
- buttons: buttons,
343563
- className: "projects-panel-wrapper",
343564
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ProjectName_ProjectName, {
343565
- showLabel: true,
343566
- className: "projects-panel__item",
343567
- editable: !readOnly
343568
- }), /*#__PURE__*/(0,jsx_runtime.jsx)(ProjectInfo_ProjectInfo, {
343569
- className: "projects-panel__item"
343570
- }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
343571
- className: "projects-panel__button",
343572
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton_DownloadButton, {
343573
- buttonText: t("header.download"),
343574
- className: "projects-panel__download-button",
343575
- Icon: download
343576
- })
343577
- }), isMobile && saveOptions]
343578
- });
343579
- };
343580
- /* harmony default export */ const ProjectsPanel_ProjectsPanel = (ProjectsPanel);
343581
- ;// ./src/assets/stylesheets/DownloadPanel.scss
343582
- // extracted by mini-css-extract-plugin
343583
-
343584
- ;// ./src/components/Menus/Sidebar/DownloadPanel/DownloadPanel.jsx
343585
-
343586
-
343587
-
343588
-
343589
-
343590
-
343591
-
343592
-
343593
-
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); }
343594
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); }
343595
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); }
343596
341611
 
343597
- var DownloadPanel = () => {
343598
- var {
343599
- t
343600
- } = useTranslation_useTranslation();
343601
- var projectOwner = false;
343602
- return /*#__PURE__*/(0,jsx_runtime.jsxs)(Sidebar_SidebarPanel, {
343603
- heading: t("downloadPanel.heading"),
343604
- children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
343605
- className: "download-panel__download-section",
343606
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
343607
- className: "download-panel__hint",
343608
- children: t("downloadPanel.downloadHint")
343609
- }), /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton_DownloadButton, {
343610
- buttonText: t("downloadPanel.downloadButton"),
343611
- className: "btn btn--secondary download-panel__button",
343612
- Icon: download,
343613
- fill: true
343614
- })]
343615
- }), !projectOwner && /*#__PURE__*/(0,jsx_runtime.jsx)(SaveButton_SaveButton, {
343616
- fill: true
343617
- })]
343618
- });
343619
- };
343620
- /* 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);
343621
341627
  ;// ./src/components/Menus/Sidebar/Sidebar.jsx
343622
341628
 
343623
341629
 
@@ -343634,60 +341640,60 @@ var DownloadPanel = () => {
343634
341640
 
343635
341641
 
343636
341642
 
343637
-
343638
-
343639
341643
  var Sidebar = _ref => {
343640
341644
  var {
343641
- options = [],
343642
- plugins = []
341645
+ options = []
343643
341646
  } = _ref;
343644
- var {
343645
- t
343646
- } = useTranslation_useTranslation();
343647
341647
  var menuOptions = [{
343648
- name: "projects",
343649
- icon: home,
343650
- title: t("sidebar.projects"),
343651
- position: "top",
343652
- panel: ProjectsPanel_ProjectsPanel
341648
+ name: "files",
341649
+ icon: tj_file,
341650
+ title: "Files",
341651
+ position: "top"
341652
+ // panel: FilePanel,
343653
341653
  }, {
343654
- name: "file",
343655
- icon: utils_FileIcon,
343656
- title: t("sidebar.file"),
343657
- position: "top",
343658
- panel: FilePanel_FilePanel
341654
+ name: "activity",
341655
+ icon: tj_activity,
341656
+ title: "Activity",
341657
+ position: "top"
343659
341658
  }, {
343660
- name: "download",
343661
- icon: save,
343662
- title: t("sidebar.download"),
343663
- position: "top",
343664
- panel: DownloadPanel_DownloadPanel
341659
+ name: "playground",
341660
+ icon: tj_playground,
341661
+ title: "Playground",
341662
+ position: "top"
343665
341663
  }, {
343666
- name: "settings",
343667
- icon: settings,
343668
- title: t("sidebar.settings"),
341664
+ name: "home",
341665
+ icon: tj_home,
341666
+ title: "Home",
341667
+ position: "top"
341668
+ }, {
341669
+ name: "fonts",
341670
+ icon: tj_font,
341671
+ title: "Fonts",
343669
341672
  position: "bottom",
343670
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"
343671
341688
  }].filter(option => options.includes(option.name));
343672
- var pluginMenuOptions = plugins.map(plugin => {
343673
- return {
343674
- name: plugin.name,
343675
- icon: plugin.icon,
343676
- title: plugin.title,
343677
- position: plugin.position || "top",
343678
- panel: () => /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarPanel, {
343679
- heading: plugin.heading,
343680
- buttons: plugin.buttons || [],
343681
- children: plugin.panel()
343682
- })
343683
- };
343684
- });
343685
- menuOptions = [...menuOptions, ...pluginMenuOptions];
343686
341689
  var isMobile = (0,react_responsive.useMediaQuery)({
343687
341690
  query: MOBILE_MEDIA_QUERY
343688
341691
  });
343689
- var autoOpenPlugin = plugins === null || plugins === void 0 ? void 0 : plugins.find(plugin => plugin.autoOpen);
343690
- var [option, setOption] = (0,external_react_.useState)(autoOpenPlugin ? autoOpenPlugin.name : "file");
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
+ });
343691
341697
  var toggleOption = newOption => {
343692
341698
  if (option !== newOption) {
343693
341699
  setOption(newOption);
@@ -343695,13 +341701,11 @@ var Sidebar = _ref => {
343695
341701
  setOption(null);
343696
341702
  }
343697
341703
  };
343698
- var optionDict = menuOptions.find(menuOption => {
343699
- return menuOption.name === option;
343700
- });
343701
- 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);
343702
341706
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
343703
- className: classnames_default()("sidebar", {
343704
- "sidebar--mobile": isMobile
341707
+ className: classnames_default()(Sidebar_styles_module.sidebar, {
341708
+ [Sidebar_styles_module.mobile]: isMobile
343705
341709
  }),
343706
341710
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_SidebarBar, {
343707
341711
  menuOptions: menuOptions,
@@ -348874,7 +346878,7 @@ const space = 32;
348874
346878
  const pageUp = 33;
348875
346879
  const pageDown = 34;
348876
346880
  const end = 35;
348877
- const dnd_esm_home = 36;
346881
+ const home = 36;
348878
346882
  const arrowLeft = 37;
348879
346883
  const arrowUp = 38;
348880
346884
  const arrowRight = 39;
@@ -349136,7 +347140,7 @@ function noop$1() {}
349136
347140
  const scrollJumpKeys = {
349137
347141
  [pageDown]: true,
349138
347142
  [pageUp]: true,
349139
- [dnd_esm_home]: true,
347143
+ [home]: true,
349140
347144
  [end]: true
349141
347145
  };
349142
347146
  function getDraggingBindings(actions, stop) {
@@ -381225,7 +379229,7 @@ const pseudoClasses = /*@__PURE__*/[
381225
379229
  "required", "right", "root", "scope", "selection", "slotted", "target",
381226
379230
  "target-text", "valid", "visited", "where"
381227
379231
  ].map(name => ({ type: "class", label: name }));
381228
- const dist_values = /*@__PURE__*/[
379232
+ const values = /*@__PURE__*/[
381229
379233
  "above", "absolute", "activeborder", "additive", "activecaption", "after-white-space",
381230
379234
  "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate", "always",
381231
379235
  "antialiased", "appworkspace", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column",
@@ -381390,7 +379394,7 @@ const defineCSSCompletionSource = (isVariable) => context => {
381390
379394
  (isDash || node.name == "TagName") && /^(Block|Styles)$/.test(node.resolve(node.to).name))
381391
379395
  return { from: node.from, options: properties(), validFor: dist_identifier };
381392
379396
  if (node.name == "ValueName")
381393
- return { from: node.from, options: dist_values, validFor: dist_identifier };
379397
+ return { from: node.from, options: values, validFor: dist_identifier };
381394
379398
  if (node.name == "PseudoClassName")
381395
379399
  return { from: node.from, options: pseudoClasses, validFor: dist_identifier };
381396
379400
  if (isVariable(node) || (context.explicit || isDash) && isVarArg(node, state.doc))
@@ -381411,7 +379415,7 @@ const defineCSSCompletionSource = (isVariable) => context => {
381411
379415
  if (before && before.name == ":" && above.name == "PseudoClassSelector")
381412
379416
  return { from: pos, options: pseudoClasses, validFor: dist_identifier };
381413
379417
  if (before && before.name == ":" && above.name == "Declaration" || above.name == "ArgList")
381414
- return { from: pos, options: dist_values, validFor: dist_identifier };
379418
+ return { from: pos, options: values, validFor: dist_identifier };
381415
379419
  if (above.name == "Block" || above.name == "Styles")
381416
379420
  return { from: pos, options: properties(), validFor: dist_identifier };
381417
379421
  return null;
@@ -381477,7 +379481,7 @@ const noSemi = 312,
381477
379481
  const javascript_dist_space = [9, 10, 11, 12, 13, 32, 133, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200,
381478
379482
  8201, 8202, 8232, 8233, 8239, 8287, 12288];
381479
379483
 
381480
- const braceR = 125, semicolon = 59, dist_slash = 47, star = 42, dist_plus = 43, minus = 45, lt = 60, comma = 44,
379484
+ const braceR = 125, semicolon = 59, dist_slash = 47, star = 42, plus = 43, minus = 45, lt = 60, comma = 44,
381481
379485
  dist_question = 63, dot = 46, dist_bracketL = 91;
381482
379486
 
381483
379487
  const trackNewline = new ContextTracker({
@@ -381508,7 +379512,7 @@ const noSemicolonType = new ExternalTokenizer((input, stack) => {
381508
379512
 
381509
379513
  const operatorToken = new ExternalTokenizer((input, stack) => {
381510
379514
  let {next} = input;
381511
- if (next == dist_plus || next == minus) {
379515
+ if (next == plus || next == minus) {
381512
379516
  input.advance();
381513
379517
  if (next == input.next) {
381514
379518
  input.advance();
@@ -383954,8 +381958,7 @@ var Project = props => {
383954
381958
  nameEditable = true,
383955
381959
  withProjectbar = true,
383956
381960
  withSidebar = true,
383957
- sidebarOptions = [],
383958
- sidebarPlugins = []
381961
+ sidebarOptions = []
383959
381962
  } = props;
383960
381963
  var saving = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.saving);
383961
381964
  var autosave = (0,external_react_redux_namespaceObject.useSelector)(state => state.editor.lastSaveAutosave);
@@ -383986,8 +381989,7 @@ var Project = props => {
383986
381989
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
383987
381990
  className: "proj-container",
383988
381991
  children: [withSidebar && /*#__PURE__*/(0,jsx_runtime.jsx)(Sidebar_Sidebar, {
383989
- options: sidebarOptions,
383990
- plugins: sidebarPlugins
381992
+ options: sidebarOptions
383991
381993
  }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
383992
381994
  className: "project-wrapper",
383993
381995
  ref: containerRef,
@@ -384910,7 +382912,7 @@ var TextJamEditor = function TextJamEditor() {
384910
382912
  var defaultProps = {
384911
382913
  withProjectbar: true,
384912
382914
  withSidebar: true,
384913
- sidebarOptions: ["file", "download", "settings"],
382915
+ sidebarOptions: ["files", "activity", "playground", "home", "fonts", "theme", "user"],
384914
382916
  code: "",
384915
382917
  sidebarPlugins: []
384916
382918
  };