grep-components 2.7.0-GREPF-2633.1 → 2.8.0-GREPF-2633.1

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.
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { GridSpacing } from '@mui/material/Grid';
3
2
  import { DateRangeValue } from '../../utils/dateHelper';
4
3
  import { GrepDatePickerProps } from '../GrepDatePicker';
5
4
  import { Dayjs } from 'dayjs';
5
+ import { GridSpacing } from '@mui/material/Grid2';
6
6
  type CommonProperties = Pick<GrepDatePickerProps, 'variant' | 'margin' | 'sx'>;
7
7
  interface Props extends CommonProperties {
8
8
  from: Omit<GrepDatePickerProps, 'onChange'>;
@@ -1,5 +1,4 @@
1
- import DateTime from '../utils/dateHelper';
2
- import { ParseableDate } from '../utils/dateHelper';
1
+ import DateTime, { ParseableDate } from '../utils/dateHelper';
3
2
  export type DateInput = ParseableDate | null;
4
3
  export type DateState = DateTime.Dayjs | null;
5
4
  export declare const defaultOptions: {
package/dist/index.d.ts CHANGED
@@ -28,7 +28,7 @@ export { default as ServiceMessage } from './components/ServiceMessage';
28
28
  export { default as SortableTable } from './components/SortableTable';
29
29
  export { default as GrepEditor } from './components/GrepEditor';
30
30
  export { default as AppBar } from './components/AppBar/AppBar';
31
- export { ParseableDate } from './utils/dateHelper';
31
+ export type { ParseableDate } from './utils/dateHelper';
32
32
  export { Utils };
33
33
  export * from './components';
34
34
  export * from './hooks';
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import dayjs from 'dayjs';
2
2
  import LocalizedFormatPlugin from 'dayjs/plugin/localizedFormat';
3
3
  import isBetweenPlugin from 'dayjs/plugin/isBetween';
4
- import { red, pink, purple, deepPurple, indigo, blue, lightBlue, cyan, teal, green, lightGreen, lime, yellow, amber, orange, deepOrange, brown, grey, blueGrey } from '@mui/material/colors';
4
+ import { blueGrey, grey, brown, deepOrange, orange, amber, yellow, lime, lightGreen, green, teal, cyan, lightBlue, blue, indigo, deepPurple, purple, pink, red } from '@mui/material/colors';
5
5
  import * as React from 'react';
6
6
  import React__default, { useRef, useMemo as useMemo$1, createContext, useContext, forwardRef, createElement, useState, useCallback as useCallback$1, useEffect, useLayoutEffect } from 'react';
7
7
  import AccountCircle from '@mui/icons-material/AccountCircle';
@@ -39,15 +39,15 @@ import Close from '@mui/icons-material/Close';
39
39
  import Search from '@mui/icons-material/Search';
40
40
  import CircularProgress$1 from '@mui/material/CircularProgress';
41
41
  import Info from '@mui/icons-material/Info';
42
- import Grid from '@mui/material/Grid';
43
42
  import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
44
43
  import { LocalizationProvider, DesktopDatePicker } from '@mui/x-date-pickers';
44
+ import Grid2 from '@mui/material/Grid2';
45
45
  import ListItem$1 from '@mui/material/ListItem';
46
46
  import Collapse$1 from '@mui/material/Collapse';
47
47
  import ExpandLess from '@mui/icons-material/ExpandLess';
48
48
  import Warning from '@mui/icons-material/Warning';
49
49
  import ReactDOM, { flushSync, createPortal } from 'react-dom';
50
- import { compose, bindActionCreators, createStore as createStore$1, applyMiddleware } from 'redux';
50
+ import { bindActionCreators, createStore as createStore$1, compose, applyMiddleware } from 'redux';
51
51
  import { connect, Provider } from 'react-redux';
52
52
  import DragIndicator from '@mui/icons-material/DragIndicator';
53
53
  import { LexicalComposer } from '@lexical/react/LexicalComposer';
@@ -57,7 +57,7 @@ import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
57
57
  import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary';
58
58
  import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin';
59
59
  import { EditorRefPlugin } from '@lexical/react/LexicalEditorRefPlugin';
60
- import { $isElementNode, ArtificialNode__DO_NOT_USE, $createLineBreakNode, $isRootOrShadowRoot, $isBlockElementNode, isBlockDomNode, isInlineDomNode, $createParagraphNode, createCommand, ElementNode, isHTMLElement, setNodeIndentFromDOM, $applyNodeReplacement, FOCUS_COMMAND, COMMAND_PRIORITY_EDITOR, BLUR_COMMAND, TextNode, ParagraphNode, PASTE_COMMAND, $createTextNode, $insertNodes, LineBreakNode, RootNode, $getSelection, $isRangeSelection, $isTextNode, $isParagraphNode, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_LOW, FORMAT_TEXT_COMMAND } from 'lexical';
60
+ import { $isElementNode, ArtificialNode__DO_NOT_USE, $createLineBreakNode, $isRootOrShadowRoot, $isBlockElementNode, isBlockDomNode, isInlineDomNode, $createParagraphNode, ElementNode, isHTMLElement, $applyNodeReplacement, setNodeIndentFromDOM, createCommand, FOCUS_COMMAND, COMMAND_PRIORITY_EDITOR, BLUR_COMMAND, TextNode, ParagraphNode, PASTE_COMMAND, $createTextNode, $insertNodes, LineBreakNode, RootNode, $getSelection, $isRangeSelection, $isTextNode, $isParagraphNode, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_LOW, FORMAT_TEXT_COMMAND } from 'lexical';
61
61
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
62
62
  import FormatBold from '@mui/icons-material/FormatBold';
63
63
  import FormatItalic from '@mui/icons-material/FormatItalic';
@@ -550,8 +550,6 @@ function memoize(fn) {
550
550
  };
551
551
  }
552
552
 
553
- var isDevelopment = false;
554
-
555
553
  var hyphenateRegex = /[A-Z]|^ms/g;
556
554
  var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
557
555
 
@@ -592,8 +590,6 @@ var processStyleValue = function processStyleValue(key, value) {
592
590
  return value;
593
591
  };
594
592
 
595
- var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
596
-
597
593
  function handleInterpolation(mergedProps, registered, interpolation) {
598
594
  if (interpolation == null) {
599
595
  return '';
@@ -644,7 +640,6 @@ function handleInterpolation(mergedProps, registered, interpolation) {
644
640
  }
645
641
 
646
642
  var styles = serializedStyles.styles + ";";
647
-
648
643
  return styles;
649
644
  }
650
645
 
@@ -683,9 +678,6 @@ function createStringFromObject(mergedProps, registered, obj) {
683
678
  string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
684
679
  }
685
680
  } else {
686
- if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {
687
- throw new Error(noComponentSelectorMessage);
688
- }
689
681
 
690
682
  if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
691
683
  for (var _i = 0; _i < value.length; _i++) {
@@ -718,10 +710,9 @@ function createStringFromObject(mergedProps, registered, obj) {
718
710
  return string;
719
711
  }
720
712
 
721
- var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
713
+ var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g; // this is the cursor for keyframes
722
714
  // keyframes are stored on the SerializedStyles object as a linked list
723
715
 
724
-
725
716
  var cursor;
726
717
  function serializeStyles(args, registered, mergedProps) {
727
718
  if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
@@ -751,7 +742,7 @@ function serializeStyles(args, registered, mergedProps) {
751
742
 
752
743
  styles += templateStringsArr[i];
753
744
  }
754
- }
745
+ } // using a global regex with .exec is stateful so lastIndex has to be reset each time
755
746
 
756
747
 
757
748
  labelPattern.lastIndex = 0;
@@ -778,7 +769,7 @@ function getRegisteredStyles(registered, registeredStyles, classNames) {
778
769
  classNames.split(' ').forEach(function (className) {
779
770
  if (registered[className] !== undefined) {
780
771
  registeredStyles.push(registered[className] + ";");
781
- } else {
772
+ } else if (className) {
782
773
  rawClassName += className + " ";
783
774
  }
784
775
  });
@@ -1113,7 +1104,6 @@ function createMakeStyles(params) {
1113
1104
  css,
1114
1105
  cx,
1115
1106
  "name": name !== null && name !== void 0 ? name : "makeStyle no name",
1116
- "idOfUseStyles": uniqId,
1117
1107
  muiStyleOverridesParams,
1118
1108
  // NOTE: If it's not a Mui Theme the plugin is resilient, it will not crash
1119
1109
  "theme": theme
@@ -1987,10 +1977,12 @@ const useFooterStyles = makeStyles()((theme) => ({
1987
1977
 
1988
1978
  const Footer = ({ items, serviceNameText, udirLink, udirLogo, }) => {
1989
1979
  const { classes } = useFooterStyles();
1990
- const renderItem = (item) => item.onClickItem ? (React__default.createElement(Button, { className: classes.itemBtn.concat(' ' + classes.itemText), onClick: item.onClickItem }, item.label)) : (React__default.createElement(ListItemText, { className: classes.itemText, primary: item.label, primaryTypographyProps: {
1991
- style: { fontSize: 14, fontFamily: 'Montserrat', fontWeight: 400 },
1980
+ const renderItem = (item) => item.onClickItem ? (React__default.createElement(Button, { className: classes.itemBtn.concat(' ' + classes.itemText), onClick: item.onClickItem }, item.label)) : (React__default.createElement(ListItemText, { className: classes.itemText, primary: item.label, slotProps: {
1981
+ primary: {
1982
+ style: { fontSize: 14, fontFamily: 'Montserrat', fontWeight: 400 },
1983
+ },
1992
1984
  } }));
1993
- return (React__default.createElement(Box, { className: classes.footer, role: "contentinfo" },
1985
+ return (React__default.createElement("footer", { className: classes.footer },
1994
1986
  React__default.createElement(Box, { className: classes.content },
1995
1987
  React__default.createElement("a", { href: udirLink },
1996
1988
  React__default.createElement("img", { src: udirLogo, alt: "Utdanningsdirektoratet logo", style: { height: '43px', width: '150px' } })),
@@ -2000,9 +1992,8 @@ const Footer = ({ items, serviceNameText, udirLink, udirLogo, }) => {
2000
1992
  paddingRight: '16px !important',
2001
1993
  } },
2002
1994
  React__default.createElement("span", { className: classes.serviceNameText }, serviceNameText),
2003
- React__default.createElement(List, { className: classes.list }, items.map((item, i) => (React__default.createElement(ListItem, { key: i, classes: {
1995
+ React__default.createElement(List, { className: classes.list }, items.map((item, i) => (React__default.createElement(ListItem, { key: i + item.label, classes: {
2004
1996
  root: classes.item,
2005
- //button: onClickItem ? classes.itemBtn : undefined,
2006
1997
  } }, item.render
2007
1998
  ? item.render(() => renderItem(item))
2008
1999
  : renderItem(item)))))))));
@@ -2012,9 +2003,11 @@ const LinkList = (props) => (React__default.createElement(Box$1, { width: "100%"
2012
2003
  React__default.createElement(Typography$1, { style: { fontSize: 24, color: Colors.black, marginBottom: 20 } }, props.title),
2013
2004
  React__default.createElement(List$1, null, props.pages.map((page) => (React__default.createElement(Box$1, { key: page.id },
2014
2005
  React__default.createElement(ListItemButton, { onClick: () => props.onPageClick(page), style: { padding: '12px 4px' } },
2015
- React__default.createElement(ListItemText$1, { primary: page.label, primaryTypographyProps: {
2016
- color: 'primary',
2017
- style: { fontSize: 18 },
2006
+ React__default.createElement(ListItemText$1, { primary: page.label, slotProps: {
2007
+ primary: {
2008
+ color: 'primary',
2009
+ style: { fontSize: 18 },
2010
+ }
2018
2011
  } }),
2019
2012
  React__default.createElement(ListItemIcon, { style: { justifyContent: 'flex-end' } },
2020
2013
  React__default.createElement(ArrowForward, { color: "primary" }))),
@@ -2199,13 +2192,15 @@ const PaginationActions = ({ count, page, rowsPerPage, onPageChange }) => {
2199
2192
 
2200
2193
  const GrepTablePagination = (props) => {
2201
2194
  const { classes } = usePaginationStyles();
2202
- return (React__default.createElement(TablePagination, { classes: classes, rowsPerPageOptions: props.rowsPerPageOptions, SelectProps: {
2203
- inputProps: {
2204
- title: 'Velg antall elementer',
2205
- },
2206
- style: {
2207
- gridArea: 'left',
2208
- justifySelf: 'start',
2195
+ return (React__default.createElement(TablePagination, { classes: classes, rowsPerPageOptions: props.rowsPerPageOptions, slotProps: {
2196
+ select: {
2197
+ inputProps: {
2198
+ title: 'Velg antall elementer',
2199
+ },
2200
+ style: {
2201
+ gridArea: 'left',
2202
+ justifySelf: 'start',
2203
+ },
2209
2204
  },
2210
2205
  }, ActionsComponent: (actions) => (React__default.createElement(PaginationActions, { ...actions })), ...props }));
2211
2206
  };
@@ -2532,7 +2527,7 @@ const useStyles$a = makeStyles()({
2532
2527
 
2533
2528
  const SearchBar = (props) => {
2534
2529
  const inputRef = React.useRef(null);
2535
- const [value, setValue] = React.useState(props.initValue || '');
2530
+ const [value, setValue] = React.useState(props.initValue ?? '');
2536
2531
  const { classes } = useStyles$a();
2537
2532
  React.useEffect(() => {
2538
2533
  if (props.autoFocus && inputRef.current) {
@@ -2554,14 +2549,16 @@ const SearchBar = (props) => {
2554
2549
  } },
2555
2550
  React.createElement(Box, { className: classes.icon },
2556
2551
  React.createElement(Search, null)),
2557
- React.createElement(TextField, { id: props.id, role: "search", className: classes.input, value: value, variant: "standard", inputRef: inputRef, onChange: _handleChange, autoFocus: props.autoFocus, placeholder: props.placeholder, InputProps: {
2558
- disableUnderline: true,
2559
- fullWidth: true,
2560
- inputProps: {
2561
- title: props.title,
2552
+ React.createElement(TextField, { id: props.id, role: "search", className: classes.input, value: value, variant: "standard", inputRef: inputRef, onChange: _handleChange, autoFocus: props.autoFocus, placeholder: props.placeholder, slotProps: {
2553
+ input: {
2554
+ disableUnderline: true,
2555
+ fullWidth: true,
2556
+ inputProps: {
2557
+ title: props.title,
2558
+ },
2562
2559
  },
2563
2560
  } }),
2564
- React.createElement(Box, { className: classes.icon, style: { cursor: 'pointer' } }, !!value.length && (React.createElement(Close, { "data-testid": "searchBarClearBtn", tabIndex: 0, onClick: _handleClear, onKeyPress: keyboard.onActivation(_handleClear) })))),
2561
+ React.createElement(Box, { className: classes.icon, style: { cursor: 'pointer' } }, !!value.length && (React.createElement(Close, { "data-testid": "searchBarClearBtn", tabIndex: 0, onClick: _handleClear, onKeyDown: keyboard.onActivation(_handleClear) })))),
2565
2562
  React.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
2566
2563
  props.helpText && (React.createElement(Typography, { className: classes.helptext }, props.helpText)),
2567
2564
  props.searchAllText && props.onSearchAll && (React.createElement(Button, { color: "primary", onClick: props.onSearchAll }, props.searchAllText)))));
@@ -2600,7 +2597,9 @@ const useStyles$8 = makeStyles()((theme) => ({
2600
2597
  },
2601
2598
  }));
2602
2599
 
2603
- const renderField$1 = (id, label, value) => (React.createElement(TextField, { id: id, disabled: true, label: label, value: value, variant: "outlined", style: { margin: '10px 0' }, InputProps: { style: { color: 'rgb(84, 84, 84)' } } }));
2600
+ const renderField$1 = (id, label, value) => (React.createElement(TextField, { id: id, disabled: true, label: label, value: value, variant: "outlined", style: { margin: '10px 0' }, slotProps: {
2601
+ input: { style: { color: 'rgb(84, 84, 84)' } }
2602
+ } }));
2604
2603
  const ProfileInfo = (props) => {
2605
2604
  const { classes } = useStyles$8();
2606
2605
  return (React.createElement(Box, { className: classes.container },
@@ -2658,7 +2657,9 @@ const GDPR = ({ children }) => {
2658
2657
  const GrepInput = ({ variant = 'standard', ...props }) => {
2659
2658
  const { errorMessage, helperText, shrink, value, ...rest } = props;
2660
2659
  const error = errorMessage ? errorMessage.length > 0 : false;
2661
- return (React.createElement(TextField, { ...rest, variant: variant, helperText: errorMessage || helperText, value: value === null ? '' : value, InputLabelProps: { shrink }, error: error || rest.error }));
2660
+ return (React.createElement(TextField, { ...rest, variant: variant, helperText: errorMessage ?? helperText, value: value === null ? '' : value, error: error || rest.error, slotProps: {
2661
+ inputLabel: { shrink },
2662
+ } }));
2662
2663
  };
2663
2664
 
2664
2665
  const GrepSelect = (props) => {
@@ -3229,10 +3230,10 @@ const GrepDateRange = ({ onChange, spacing = 3, style, fullWidth, from: fromProp
3229
3230
  const [to, setTo] = useDate(toProperties.value);
3230
3231
  const { minDate, maxDate, ...commonProperties } = properties;
3231
3232
  useEffect(() => onChange(new DateRangeValue(from, to)), [String(from), String(to)]);
3232
- return (React__default.createElement(Grid, { container: true, spacing: spacing, style: style },
3233
- React__default.createElement(Grid, { item: true, xs: 12, sm: fullWidth ? 12 : 6 },
3233
+ return (React__default.createElement(Grid2, { container: true, spacing: spacing, style: style },
3234
+ React__default.createElement(Grid2, { size: { xs: 12, sm: fullWidth ? 12 : 6 } },
3234
3235
  React__default.createElement(DatePicker, { id: String(fromProperties.label), fullWidth: true, minDate: minDate, ...commonProperties, ...fromProperties, value: from, maxDate: to?.subtract(1, 'day') || undefined, onChange: setFrom })),
3235
- React__default.createElement(Grid, { item: true, xs: 12, sm: fullWidth ? 12 : 6 },
3236
+ React__default.createElement(Grid2, { size: { xs: 12, sm: fullWidth ? 12 : 6 } },
3236
3237
  React__default.createElement(DatePicker, { id: String(toProperties.label), fullWidth: true, maxDate: maxDate, ...commonProperties, ...toProperties, value: to, minDate: from?.add(1, 'day') || undefined, onChange: setTo }))));
3237
3238
  };
3238
3239
 
@@ -11231,7 +11232,7 @@ const N="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.do
11231
11232
  *
11232
11233
  */
11233
11234
 
11234
- function h(e,n){const t=n.body?n.body.childNodes:[];let o=[];const l=[];for(let n=0;n<t.length;n++){const r=t[n];if(!x.has(r.nodeName)){const n=y(r,e,l,!1);null!==n&&(o=o.concat(n));}}return function(e){for(const n of e)n.getNextSibling()instanceof ArtificialNode__DO_NOT_USE&&n.insertAfter($createLineBreakNode());for(const n of e){const e=n.getChildren();for(const t of e)n.insertBefore(t);n.remove();}}(l),o}const x=new Set(["STYLE","SCRIPT"]);function y(e,n,o,r,i=new Map,s){let h=[];if(x.has(e.nodeName))return h;let m=null;const g=function(e,n){const{nodeName:t}=e,o=n._htmlConversions.get(t.toLowerCase());let l=null;if(void 0!==o)for(const n of o){const t=n(e);null!==t&&(null===l||(l.priority||0)<=(t.priority||0))&&(l=t);}return null!==l?l.conversion:null}(e,n),b=g?g(e):null;let C=null;if(null!==b){C=b.after;const n=b.node;if(m=Array.isArray(n)?n[n.length-1]:n,null!==m){for(const[,e]of i)if(m=e(m,s),!m)break;m&&h.push(...Array.isArray(n)?n:[m]);}null!=b.forChild&&i.set(e.nodeName,b.forChild);}const S=e.childNodes;let v=[];const N=(null==m||!$isRootOrShadowRoot(m))&&(null!=m&&$isBlockElementNode(m)||r);for(let e=0;e<S.length;e++)v.push(...y(S[e],n,o,N,new Map(i),m));return null!=C&&(v=C(v)),isBlockDomNode(e)&&(v=w(e,v,N?()=>{const e=new ArtificialNode__DO_NOT_USE;return o.push(e),e}:$createParagraphNode)),null==m?v.length>0?h=h.concat(v):isBlockDomNode(e)&&function(e){if(null==e.nextSibling||null==e.previousSibling)return !1;return isInlineDomNode(e.nextSibling)&&isInlineDomNode(e.previousSibling)}(e)&&(h=h.concat($createLineBreakNode())):$isElementNode(m)&&m.append(...v),h}function w(e,n,t){const o=e.style.textAlign,l=[];let r=[];for(let e=0;e<n.length;e++){const i=n[e];if($isBlockElementNode(i))o&&!i.getFormat()&&i.setFormat(o),l.push(i);else if(r.push(i),e===n.length-1||e<n.length-1&&$isBlockElementNode(n[e+1])){const e=t();e.setFormat(o),e.append(...r),l.push(e),r=[];}}return l}
11235
+ function h(e,n){const t=n.body?n.body.childNodes:[];let o=[];const l=[];for(let n=0;n<t.length;n++){const r=t[n];if(!x.has(r.nodeName)){const n=y(r,e,l,false);null!==n&&(o=o.concat(n));}}return function(e){for(const n of e)n.getNextSibling()instanceof ArtificialNode__DO_NOT_USE&&n.insertAfter($createLineBreakNode());for(const n of e){const e=n.getChildren();for(const t of e)n.insertBefore(t);n.remove();}}(l),o}const x=new Set(["STYLE","SCRIPT"]);function y(e,n,o,r,i=new Map,s){let h=[];if(x.has(e.nodeName))return h;let m=null;const g=function(e,n){const{nodeName:t}=e,o=n._htmlConversions.get(t.toLowerCase());let l=null;if(void 0!==o)for(const n of o){const t=n(e);null!==t&&(null===l||(l.priority||0)<=(t.priority||0))&&(l=t);}return null!==l?l.conversion:null}(e,n),b=g?g(e):null;let C=null;if(null!==b){C=b.after;const n=b.node;if(m=Array.isArray(n)?n[n.length-1]:n,null!==m){for(const[,e]of i)if(m=e(m,s),!m)break;m&&h.push(...Array.isArray(n)?n:[m]);}null!=b.forChild&&i.set(e.nodeName,b.forChild);}const S=e.childNodes;let v=[];const N=(null==m||!$isRootOrShadowRoot(m))&&(null!=m&&$isBlockElementNode(m)||r);for(let e=0;e<S.length;e++)v.push(...y(S[e],n,o,N,new Map(i),m));return null!=C&&(v=C(v)),isBlockDomNode(e)&&(v=w(e,v,N?()=>{const e=new ArtificialNode__DO_NOT_USE;return o.push(e),e}:$createParagraphNode)),null==m?v.length>0?h=h.concat(v):isBlockDomNode(e)&&function(e){if(null==e.nextSibling||null==e.previousSibling)return false;return isInlineDomNode(e.nextSibling)&&isInlineDomNode(e.previousSibling)}(e)&&(h=h.concat($createLineBreakNode())):$isElementNode(m)&&m.append(...v),h}function w(e,n,t){const o=e.style.textAlign,l=[];let r=[];for(let e=0;e<n.length;e++){const i=n[e];if($isBlockElementNode(i))o&&!i.getFormat()&&i.setFormat(o),l.push(i);else if(r.push(i),e===n.length-1||e<n.length-1&&$isBlockElementNode(n[e+1])){const e=t();e.setFormat(o),e.append(...r),l.push(e),r=[];}}return l}
11235
11236
 
11236
11237
  /**
11237
11238
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -11241,7 +11242,7 @@ function h(e,n){const t=n.body?n.body.childNodes:[];let o=[];const l=[];for(let
11241
11242
  *
11242
11243
  */
11243
11244
 
11244
- const dt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,mt=dt&&"documentMode"in document?document.documentMode:null;!(!dt||!("InputEvent"in window)||mt)&&"getTargetRanges"in new window.InputEvent("input");createCommand("DRAG_DROP_PASTE_FILE");class wt extends ElementNode{static getType(){return "heading"}static clone(t){return new wt(t.__tag,t.__key)}constructor(t,e){super(e),this.__tag=t;}getTag(){return this.__tag}setTag(t){const e=this.getWritable();return this.__tag=t,e}createDOM(t){const e=this.__tag,n=document.createElement(e),r=t.theme.heading;if(void 0!==r){const t=r[e];et(n,t);}return n}updateDOM(t,e,n){return t.__tag!==this.__tag}static importDOM(){return {h1:t=>({conversion:Et,priority:0}),h2:t=>({conversion:Et,priority:0}),h3:t=>({conversion:Et,priority:0}),h4:t=>({conversion:Et,priority:0}),h5:t=>({conversion:Et,priority:0}),h6:t=>({conversion:Et,priority:0}),p:t=>{const e=t.firstChild;return null!==e&&Nt(e)?{conversion:()=>({node:null}),priority:3}:null},span:t=>Nt(t)?{conversion:t=>({node:Tt("h1")}),priority:3}:null}}exportDOM(t){const{element:e}=super.exportDOM(t);if(isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));const t=this.getFormatType();e.style.textAlign=t;const n=this.getDirection();n&&(e.dir=n);}return {element:e}}static importJSON(t){return Tt(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return {...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,e=!0){const n=t?t.anchor.offset:0,r=this.getLastDescendant(),o=!r||t&&t.anchor.key===r.getKey()&&n===r.getTextContentSize()||!t?$createParagraphNode():Tt(this.getTag()),i=this.getDirection();if(o.setDirection(i),this.insertAfter(o,e),0===n&&!this.isEmpty()&&t){const t=$createParagraphNode();t.select(),this.replace(t,!0);}return o}collapseAtStart(){const t=this.isEmpty()?$createParagraphNode():Tt(this.getTag());return this.getChildren().forEach((e=>t.append(e))),this.replace(t),!0}extractWithChild(){return !0}}function Nt(t){return "span"===t.nodeName.toLowerCase()&&"26pt"===t.style.fontSize}function Et(t){const e=t.nodeName.toLowerCase();let n=null;return "h1"!==e&&"h2"!==e&&"h3"!==e&&"h4"!==e&&"h5"!==e&&"h6"!==e||(n=Tt(e),null!==t.style&&(setNodeIndentFromDOM(t,n),n.setFormat(t.style.textAlign))),{node:n}}function Tt(t="h1"){return $applyNodeReplacement(new wt(t))}
11245
+ const dt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,mt=dt&&"documentMode"in document?document.documentMode:null;!(!dt||!("InputEvent"in window)||mt)&&"getTargetRanges"in new window.InputEvent("input");createCommand("DRAG_DROP_PASTE_FILE");class wt extends ElementNode{static getType(){return "heading"}static clone(t){return new wt(t.__tag,t.__key)}constructor(t,e){super(e),this.__tag=t;}getTag(){return this.__tag}setTag(t){const e=this.getWritable();return this.__tag=t,e}createDOM(t){const e=this.__tag,n=document.createElement(e),r=t.theme.heading;if(void 0!==r){const t=r[e];et(n,t);}return n}updateDOM(t,e,n){return t.__tag!==this.__tag}static importDOM(){return {h1:t=>({conversion:Et,priority:0}),h2:t=>({conversion:Et,priority:0}),h3:t=>({conversion:Et,priority:0}),h4:t=>({conversion:Et,priority:0}),h5:t=>({conversion:Et,priority:0}),h6:t=>({conversion:Et,priority:0}),p:t=>{const e=t.firstChild;return null!==e&&Nt(e)?{conversion:()=>({node:null}),priority:3}:null},span:t=>Nt(t)?{conversion:t=>({node:Tt("h1")}),priority:3}:null}}exportDOM(t){const{element:e}=super.exportDOM(t);if(isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));const t=this.getFormatType();e.style.textAlign=t;const n=this.getDirection();n&&(e.dir=n);}return {element:e}}static importJSON(t){return Tt(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return {...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,e=true){const n=t?t.anchor.offset:0,r=this.getLastDescendant(),o=!r||t&&t.anchor.key===r.getKey()&&n===r.getTextContentSize()||!t?$createParagraphNode():Tt(this.getTag()),i=this.getDirection();if(o.setDirection(i),this.insertAfter(o,e),0===n&&!this.isEmpty()&&t){const t=$createParagraphNode();t.select(),this.replace(t,true);}return o}collapseAtStart(){const t=this.isEmpty()?$createParagraphNode():Tt(this.getTag());return this.getChildren().forEach((e=>t.append(e))),this.replace(t),true}extractWithChild(){return true}}function Nt(t){return "span"===t.nodeName.toLowerCase()&&"26pt"===t.style.fontSize}function Et(t){const e=t.nodeName.toLowerCase();let n=null;return "h1"!==e&&"h2"!==e&&"h3"!==e&&"h4"!==e&&"h5"!==e&&"h6"!==e||(n=Tt(e),null!==t.style&&(setNodeIndentFromDOM(t,n),n.setFormat(t.style.textAlign))),{node:n}}function Tt(t="h1"){return $applyNodeReplacement(new wt(t))}
11245
11246
 
11246
11247
  const useEditorStyles = makeStyles()((theme, { hasFocus, hasContent, readOnly, hasCustomToolbar }) => ({
11247
11248
  root: {
@@ -12003,13 +12004,8 @@ const GrepEditor = ({ ...props }) => {
12003
12004
  };
12004
12005
 
12005
12006
  const dimensions = {
12006
- breadcrumbsFontSize: 16,
12007
- contentWidth: 1028,
12008
- footerHeight: 50,
12009
- inputBoxHeight: 61,
12010
12007
  toolbarHeight: 80,
12011
12008
  toolbarHeightMobile: 40,
12012
- toolbarWidth: 1260,
12013
12009
  toolbarMenuWidth: 1028,
12014
12010
  toolbarMenuHeight: 50,
12015
12011
  };
@@ -12387,7 +12383,7 @@ const ConfirmationDialog = ({ open, title, description, warning, onSubmit, onCan
12387
12383
  React__default.createElement(DialogContent$1, null,
12388
12384
  React__default.createElement(DialogContentText$1, null, description)),
12389
12385
  React__default.createElement(DialogActions$1, null,
12390
- React__default.createElement(Button, { color: "primary", onClick: onCancel }, cancelText),
12386
+ React__default.createElement(Button, { color: "inherit", onClick: onCancel }, cancelText),
12391
12387
  React__default.createElement(Button, { className: warning ? classes.discard : '', onClick: onSubmit }, confirmText))));
12392
12388
  };
12393
12389