@equinor/ioc-common-frontend 20.0.1 → 20.0.2

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 +1 @@
1
- "use strict";require('./ImageComponent.css');var c=require("./index-DO831s_r.cjs"),d=require("react/jsx-runtime"),e=require("lexical"),a=require("react");function Y(r,M){return r.getEditorState().read(()=>{const f=e.$getNodeByKey(M);return f!==null&&f.isSelected()})}c.styleInject("");var p=new Set,$=e.createCommand("RIGHT_CLICK_IMAGE_COMMAND");function B(r){var M=r.altText,f=r.className,v=r.imageRef,N=r.src,R=r.width,A=r.height,O=r.maxWidth,m=r.onError;return(function(u){if(!p.has(u))throw new Promise(function(S){var _=new Image;_.src=u,_.onload=function(){p.add(u),S(null)},_.onerror=function(){p.add(u)}})})(N),d.jsx("img",{className:f||void 0,src:N,alt:M,ref:v,style:{height:A,maxWidth:O,width:R},onError:m,draggable:"false"})}function U(){return d.jsx("img",{src:"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22%203H2v18h20v-2h-2v-2h2v-2h-2v-2h2v-2h-2V9h2V7h-2V5h2V3zm-2%204v2h-2v2h2v2h-2v2h2v2h-2v2H4V5h14v2h2zm-6%202h-2v2h-2v2H8v2H6v2h2v-2h2v-2h2v-2h2v2h2v-2h-2V9zM6%207h2v2H6V7z'%20fill='%23000000'/%3e%3c/svg%3e",style:{height:200,opacity:.2,width:200},draggable:"false"})}exports.RIGHT_CLICK_IMAGE_COMMAND=$,exports.default=function(r){var M=r.src,f=r.altText,v=r.nodeKey,N=r.width,R=r.height,A=r.maxWidth,O=r.showCaption,m=r.caption,u=a.useRef(null),S=a.useRef(null),_=(function(n){const[t]=c.o(),[g,h]=a.useState(()=>Y(t,n));return a.useEffect(()=>{let o=!0;const s=t.registerUpdateListener(()=>{o&&h(Y(t,n))});return()=>{o=!1,s()}},[t,n]),[g,a.useCallback(o=>{t.update(()=>{let s=e.$getSelection();e.$isNodeSelection(s)||(s=e.$createNodeSelection(),e.$setSelection(s)),e.$isNodeSelection(s)&&(o?s.add(n):s.delete(n))})},[t,n]),a.useCallback(()=>{t.update(()=>{const o=e.$getSelection();e.$isNodeSelection(o)&&o.clear()})},[t])]})(v),E=c._slicedToArray(_,3),l=E[0],C=E[1],I=E[2],P=c.o(),i=c._slicedToArray(P,1)[0],G=a.useState(null),w=c._slicedToArray(G,2),L=w[0],j=w[1],y=a.useRef(null),V=a.useState(!1),b=c._slicedToArray(V,2),k=b[0],H=b[1],x=a.useCallback(function(n){if(l&&e.$isNodeSelection(e.$getSelection())){n.preventDefault();var t=e.$getNodeByKey(v);if(c.$isImageNode(t))return t?.remove(),!0}return!1},[l,v]),K=a.useCallback(function(n){var t=e.$getSelection(),g=S.current;if(l&&e.$isNodeSelection(t)&&t.getNodes().length===1){if(O)return e.$setSelection(null),n.preventDefault(),m.focus(),!0;if(g!==null&&g!==document.activeElement)return n.preventDefault(),g.focus(),!0}return!1},[m,l,O]),W=a.useCallback(function(n){return(y.current===m||S.current===n.target)&&(e.$setSelection(null),i.update(function(){C(!0);var t=i.getRootElement();t!==null&&t.focus()}),!0)},[m,i,C]),D=a.useCallback(function(n){var t=n;return t.target===u.current&&(t.shiftKey?C(!l):(I(),C(!0)),!0)},[l,C,I]),T=a.useCallback(function(n){i.getEditorState().read(function(){var t=e.$getSelection();n.target.tagName==="IMG"&&e.$isRangeSelection(t)&&t.getNodes().length===1&&i.dispatchCommand($,n)})},[i]);a.useEffect(function(){var n=!0,t=i.getRootElement(),g=c.U(i.registerUpdateListener(function(h){var o=h.editorState;n&&j(o.read(function(){return e.$getSelection()}))}),i.registerCommand(e.SELECTION_CHANGE_COMMAND,function(h,o){return y.current=o,!1},e.COMMAND_PRIORITY_LOW),i.registerCommand(e.CLICK_COMMAND,D,e.COMMAND_PRIORITY_LOW),i.registerCommand($,D,e.COMMAND_PRIORITY_LOW),i.registerCommand(e.DRAGSTART_COMMAND,function(h){return h.target===u.current&&(h.preventDefault(),!0)},e.COMMAND_PRIORITY_LOW),i.registerCommand(e.KEY_DELETE_COMMAND,x,e.COMMAND_PRIORITY_LOW),i.registerCommand(e.KEY_BACKSPACE_COMMAND,x,e.COMMAND_PRIORITY_LOW),i.registerCommand(e.KEY_ENTER_COMMAND,K,e.COMMAND_PRIORITY_LOW),i.registerCommand(e.KEY_ESCAPE_COMMAND,W,e.COMMAND_PRIORITY_LOW));return t?.addEventListener("contextmenu",T),function(){n=!1,g(),t?.removeEventListener("contextmenu",T)}},[I,i,l,v,x,K,W,D,T,C]);var q=l&&e.$isNodeSelection(L),z=l;return d.jsx(a.Suspense,{fallback:null,children:d.jsx(d.Fragment,{children:d.jsx("div",{draggable:q,children:k?d.jsx(U,{}):d.jsx(B,{className:z?"focused ".concat(e.$isNodeSelection(L)?"draggable":""):null,src:M,altText:f,imageRef:u,width:N,height:R,maxWidth:A,onError:function(){return H(!0)}})})})})};
1
+ "use strict";require('./ImageComponent.css');var c=require("./index-B39WK-Qz.cjs"),d=require("react/jsx-runtime"),e=require("lexical"),a=require("react");function Y(r,M){return r.getEditorState().read(()=>{const f=e.$getNodeByKey(M);return f!==null&&f.isSelected()})}c.styleInject("");var p=new Set,$=e.createCommand("RIGHT_CLICK_IMAGE_COMMAND");function B(r){var M=r.altText,f=r.className,v=r.imageRef,N=r.src,R=r.width,A=r.height,O=r.maxWidth,m=r.onError;return(function(u){if(!p.has(u))throw new Promise(function(S){var _=new Image;_.src=u,_.onload=function(){p.add(u),S(null)},_.onerror=function(){p.add(u)}})})(N),d.jsx("img",{className:f||void 0,src:N,alt:M,ref:v,style:{height:A,maxWidth:O,width:R},onError:m,draggable:"false"})}function U(){return d.jsx("img",{src:"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22%203H2v18h20v-2h-2v-2h2v-2h-2v-2h2v-2h-2V9h2V7h-2V5h2V3zm-2%204v2h-2v2h2v2h-2v2h2v2h-2v2H4V5h14v2h2zm-6%202h-2v2h-2v2H8v2H6v2h2v-2h2v-2h2v-2h2v2h2v-2h-2V9zM6%207h2v2H6V7z'%20fill='%23000000'/%3e%3c/svg%3e",style:{height:200,opacity:.2,width:200},draggable:"false"})}exports.RIGHT_CLICK_IMAGE_COMMAND=$,exports.default=function(r){var M=r.src,f=r.altText,v=r.nodeKey,N=r.width,R=r.height,A=r.maxWidth,O=r.showCaption,m=r.caption,u=a.useRef(null),S=a.useRef(null),_=(function(n){const[t]=c.o(),[g,h]=a.useState(()=>Y(t,n));return a.useEffect(()=>{let o=!0;const s=t.registerUpdateListener(()=>{o&&h(Y(t,n))});return()=>{o=!1,s()}},[t,n]),[g,a.useCallback(o=>{t.update(()=>{let s=e.$getSelection();e.$isNodeSelection(s)||(s=e.$createNodeSelection(),e.$setSelection(s)),e.$isNodeSelection(s)&&(o?s.add(n):s.delete(n))})},[t,n]),a.useCallback(()=>{t.update(()=>{const o=e.$getSelection();e.$isNodeSelection(o)&&o.clear()})},[t])]})(v),E=c._slicedToArray(_,3),l=E[0],C=E[1],I=E[2],P=c.o(),i=c._slicedToArray(P,1)[0],G=a.useState(null),w=c._slicedToArray(G,2),L=w[0],j=w[1],y=a.useRef(null),V=a.useState(!1),b=c._slicedToArray(V,2),k=b[0],H=b[1],x=a.useCallback(function(n){if(l&&e.$isNodeSelection(e.$getSelection())){n.preventDefault();var t=e.$getNodeByKey(v);if(c.$isImageNode(t))return t?.remove(),!0}return!1},[l,v]),K=a.useCallback(function(n){var t=e.$getSelection(),g=S.current;if(l&&e.$isNodeSelection(t)&&t.getNodes().length===1){if(O)return e.$setSelection(null),n.preventDefault(),m.focus(),!0;if(g!==null&&g!==document.activeElement)return n.preventDefault(),g.focus(),!0}return!1},[m,l,O]),W=a.useCallback(function(n){return(y.current===m||S.current===n.target)&&(e.$setSelection(null),i.update(function(){C(!0);var t=i.getRootElement();t!==null&&t.focus()}),!0)},[m,i,C]),D=a.useCallback(function(n){var t=n;return t.target===u.current&&(t.shiftKey?C(!l):(I(),C(!0)),!0)},[l,C,I]),T=a.useCallback(function(n){i.getEditorState().read(function(){var t=e.$getSelection();n.target.tagName==="IMG"&&e.$isRangeSelection(t)&&t.getNodes().length===1&&i.dispatchCommand($,n)})},[i]);a.useEffect(function(){var n=!0,t=i.getRootElement(),g=c.U(i.registerUpdateListener(function(h){var o=h.editorState;n&&j(o.read(function(){return e.$getSelection()}))}),i.registerCommand(e.SELECTION_CHANGE_COMMAND,function(h,o){return y.current=o,!1},e.COMMAND_PRIORITY_LOW),i.registerCommand(e.CLICK_COMMAND,D,e.COMMAND_PRIORITY_LOW),i.registerCommand($,D,e.COMMAND_PRIORITY_LOW),i.registerCommand(e.DRAGSTART_COMMAND,function(h){return h.target===u.current&&(h.preventDefault(),!0)},e.COMMAND_PRIORITY_LOW),i.registerCommand(e.KEY_DELETE_COMMAND,x,e.COMMAND_PRIORITY_LOW),i.registerCommand(e.KEY_BACKSPACE_COMMAND,x,e.COMMAND_PRIORITY_LOW),i.registerCommand(e.KEY_ENTER_COMMAND,K,e.COMMAND_PRIORITY_LOW),i.registerCommand(e.KEY_ESCAPE_COMMAND,W,e.COMMAND_PRIORITY_LOW));return t?.addEventListener("contextmenu",T),function(){n=!1,g(),t?.removeEventListener("contextmenu",T)}},[I,i,l,v,x,K,W,D,T,C]);var q=l&&e.$isNodeSelection(L),z=l;return d.jsx(a.Suspense,{fallback:null,children:d.jsx(d.Fragment,{children:d.jsx("div",{draggable:q,children:k?d.jsx(U,{}):d.jsx(B,{className:z?"focused ".concat(e.$isNodeSelection(L)?"draggable":""):null,src:M,altText:f,imageRef:u,width:N,height:R,maxWidth:A,onError:function(){return H(!0)}})})})})};
@@ -1,4 +1,4 @@
1
- import { s as te, o as z, _ as x, $ as re, U as ne } from "./index-2M5oetNI.js";
1
+ import { s as te, o as z, _ as x, $ as re, U as ne } from "./index-JpLVCGra.js";
2
2
  import { jsx as m, Fragment as ae } from "react/jsx-runtime";
3
3
  import { $getSelection as E, $isNodeSelection as d, $createNodeSelection as oe, $setSelection as K, $getNodeByKey as k, createCommand as ie, $isRangeSelection as se, KEY_ESCAPE_COMMAND as ue, COMMAND_PRIORITY_LOW as u, KEY_ENTER_COMMAND as le, KEY_BACKSPACE_COMMAND as ce, KEY_DELETE_COMMAND as de, DRAGSTART_COMMAND as he, CLICK_COMMAND as me, SELECTION_CHANGE_COMMAND as fe } from "lexical";
4
4
  import { useState as G, useEffect as P, useCallback as h, useRef as L, Suspense as ge } from "react";
@@ -3,6 +3,7 @@ type AllCheckboxType = {
3
3
  onChange: VoidFunction;
4
4
  checked: boolean;
5
5
  count?: number;
6
+ isCountLoading?: boolean;
6
7
  showExpandAll?: boolean;
7
8
  selectAllText?: string;
8
9
  handleClickExpandOrCollapseAll: (event: React.MouseEvent) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"AllCheckBox.d.ts","sourceRoot":"","sources":["../../../../src/components/Filter/Filters/AllCheckBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAWrC,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8BAA8B,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACnE,CAAC;AACF,QAAA,MAAM,WAAW,GAAI,OAAO,eAAe,KAAG,YAiC7C,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"AllCheckBox.d.ts","sourceRoot":"","sources":["../../../../src/components/Filter/Filters/AllCheckBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAYrC,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8BAA8B,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACnE,CAAC;AACF,QAAA,MAAM,WAAW,GAAI,OAAO,eAAe,KAAG,YAuC7C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/Filter/Filters/CheckboxFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAA6C,MAAM,OAAO,CAAC;AAUhF,OAAO,EAAuB,eAAe,EAAE,MAAM,UAAU,CAAC;AAyBhE,eAAO,MAAM,cAAc,GAEzB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEvD,OAAO,eAAe,KACrB,YAocF,CAAC"}
1
+ {"version":3,"file":"CheckboxFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/Filter/Filters/CheckboxFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EAOb,MAAM,OAAO,CAAC;AAUf,OAAO,EAAuB,eAAe,EAAE,MAAM,UAAU,CAAC;AA0BhE,eAAO,MAAM,cAAc,GAEzB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEvD,OAAO,eAAe,KACrB,YAqiBF,CAAC"}
@@ -10,4 +10,5 @@ export declare const StickyTableHeader: import("storybook/internal/csf").Annotat
10
10
  export declare const VirtualizedTable: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/react").Args>;
11
11
  export declare const RowMenu: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/react").Args>;
12
12
  export declare const WithNorwegianText: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/react").Args>;
13
+ export declare const LargeDataset100k: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/react").Args>;
13
14
  //# sourceMappingURL=TabbedTable.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabbedTable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TabbedTable/TabbedTable.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,YAAY,EAAE,MAAM,OAAO,CAAC;;qBA0nBT,YAAY;;;AAE7C,wBAGE;AAEF,eAAO,MAAM,OAAO,8HAAoB,CAAC;AAkBzC,eAAO,MAAM,mBAAmB,8HAAoB,CAAC;AA2CrD,eAAO,MAAM,iBAAiB,8HAAoB,CAAC;AAuCnD,eAAO,MAAM,gBAAgB,8HAAoB,CAAC;AAyClD,eAAO,MAAM,OAAO,8HAAoB,CAAC;AA0CzC,eAAO,MAAM,iBAAiB,8HAAoB,CAAC"}
1
+ {"version":3,"file":"TabbedTable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TabbedTable/TabbedTable.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,YAAY,EAAE,MAAM,OAAO,CAAC;;qBA0nBT,YAAY;;;AAE7C,wBAGE;AAEF,eAAO,MAAM,OAAO,8HAAoB,CAAC;AAkBzC,eAAO,MAAM,mBAAmB,8HAAoB,CAAC;AA2CrD,eAAO,MAAM,iBAAiB,8HAAoB,CAAC;AAuCnD,eAAO,MAAM,gBAAgB,8HAAoB,CAAC;AAyClD,eAAO,MAAM,OAAO,8HAAoB,CAAC;AA0CzC,eAAO,MAAM,iBAAiB,8HAAoB,CAAC;AAoMnD,eAAO,MAAM,gBAAgB,8HAAoB,CAAC"}