@corva/ui 3.83.0-3 → 3.83.0-5

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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("@babel/runtime/helpers/defineProperty"),e=require("@babel/runtime/helpers/slicedToArray"),n=require("react"),o=require("@tanstack/react-query"),c=require("../Chip/Chip.js"),i=require("../Menu/Menu.js"),r=require("./useInterventionUnitEvents.js"),t=require("./utils.js"),u=require("./InterventionEventSelector.scss.js"),l=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/InfoRounded.js"),require("../../icons/customIcons/icons/FlameFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/PinOne.js"),require("../../icons/customIcons/icons/PinOneCrossed.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var a=require("react/jsx-runtime");function m(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var j=m(s),I=m(e);function q(s,e){var n=Object.keys(s);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(s);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(s,e).enumerable}))),n.push.apply(n,o)}return n}function d(s){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?q(Object(n),!0).forEach((function(e){j.default(s,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(n,e))}))}return s}function p(s){var e=s.wellId,o=s.selectedEventId,m=s.onChange,j=s.className,q=n.useState(!1),d=I.default(q,2),p=d[0],v=d[1],f=n.useRef(null),h=r.useInterventionUnitEvents(e),C=h.data,O=void 0===C?[]:C,b=h.isSuccess,E=n.useMemo((function(){var s;return null!==(s=O.find((function(s){return t.isSameEventId(s.id,o)})))&&void 0!==s?s:null}),[O,o]);if(n.useEffect((function(){b&&null!=o&&!E&&m(null,null)}),[b,o,E,m]),!(null!=o||e&&O.length))return null;var P=p?l.UpIcon:l.DownIcon,x=function(s){v(!1),m(s?Number(s.id):null,s)};return a.jsxs(a.Fragment,{children:[a.jsx(c.Chip,{ref:f,className:j,size:"small",onClick:function(){return v(!0)},suffix:a.jsx(P,{}),testId:"interventionEventSelectorChip",children:t.getEventChipLabel(E,o)}),a.jsxs(i.Menu,{open:p,anchorEl:f.current,onClose:function(){return v(!1)},className:u.menu,children:[a.jsx(i.Menu.Item,{selected:null==o,onClick:function(){return x(null)},testId:"interventionEventSelectorAllEvents",children:t.ALL_EVENTS_LABEL}),O.map((function(s){var e;return a.jsx(i.Menu.Item,{size:"large",selected:t.isSameEventId(s.id,o),onClick:function(){return x(s)},testId:"interventionEventSelectorEvent-".concat(s.id),children:a.jsxs("div",{className:u.eventItem,children:[a.jsxs("div",{className:u.eventItemMain,children:[a.jsx("span",{className:u.eventItemOperation,children:s.operation}),a.jsx("span",{className:u.eventItemDate,children:t.formatEventDate(s)})]}),(null===(e=s.intervention_unit)||void 0===e?void 0:e.name)&&a.jsx("div",{className:u.eventItemUnit,children:s.intervention_unit.name})]})},s.id)}))]})]})}exports.InterventionEventSelector=function(s){return a.jsx(o.QueryClientProvider,{client:r.interventionEventSelectorQueryClient,children:a.jsx(p,d({},s))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("@babel/runtime/helpers/defineProperty"),e=require("@babel/runtime/helpers/slicedToArray"),n=require("react"),o=require("@tanstack/react-query"),c=require("classnames"),i=require("../Chip/Chip.js"),r=require("../Menu/Menu.js"),t=require("./useInterventionUnitEvents.js"),u=require("./utils.js"),l=require("./InterventionEventSelector.scss.js"),a=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/InfoRounded.js"),require("../../icons/customIcons/icons/FlameFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/PinOne.js"),require("../../icons/customIcons/icons/PinOneCrossed.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var m=require("react/jsx-runtime");function j(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var I=j(s),q=j(e),d=j(c);function p(s,e){var n=Object.keys(s);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(s);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(s,e).enumerable}))),n.push.apply(n,o)}return n}function v(s){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){I.default(s,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(n,e))}))}return s}function f(s){var e=s.wellId,o=s.selectedEventId,c=s.onChange,j=s.className,I=n.useState(!1),p=q.default(I,2),v=p[0],f=p[1],h=n.useRef(null),C=t.useInterventionUnitEvents(e),O=C.data,b=void 0===O?[]:O,E=C.isSuccess,P=n.useMemo((function(){var s;return null!==(s=b.find((function(s){return u.isSameEventId(s.id,o)})))&&void 0!==s?s:null}),[b,o]);if(n.useEffect((function(){E&&null!=o&&!P&&c(null,null)}),[E,o,P,c]),!(null!=o||e&&b.length))return null;var x=v?a.UpIcon:a.DownIcon,y=function(s){f(!1),c(s?Number(s.id):null,s)};return m.jsxs(m.Fragment,{children:[m.jsx(i.Chip,{ref:h,className:d.default(l.chip,j),size:"small",onClick:function(){return f(!0)},suffix:m.jsx(x,{size:16}),testId:"interventionEventSelectorChip",children:u.getEventChipLabel(P,o)}),m.jsxs(r.Menu,{open:v,anchorEl:h.current,onClose:function(){return f(!1)},className:l.menu,children:[m.jsx(r.Menu.Item,{selected:null==o,onClick:function(){return y(null)},testId:"interventionEventSelectorAllEvents",children:u.ALL_EVENTS_LABEL}),b.map((function(s){var e;return m.jsx(r.Menu.Item,{size:"large",selected:u.isSameEventId(s.id,o),onClick:function(){return y(s)},testId:"interventionEventSelectorEvent-".concat(s.id),children:m.jsxs("div",{className:l.eventItem,children:[m.jsxs("div",{className:l.eventItemMain,children:[m.jsx("span",{className:l.eventItemOperation,children:s.operation}),m.jsx("span",{className:l.eventItemDate,children:u.formatEventDate(s)})]}),(null===(e=s.intervention_unit)||void 0===e?void 0:e.name)&&m.jsx("div",{className:l.eventItemUnit,children:s.intervention_unit.name})]})},s.id)}))]})]})}exports.InterventionEventSelector=function(s){return m.jsx(o.QueryClientProvider,{client:t.interventionEventSelectorQueryClient,children:m.jsx(f,v({},s))})};
2
2
  //# sourceMappingURL=InterventionEventSelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InterventionEventSelector.js","sources":["../../../../src/componentsV2/InterventionEventSelector/InterventionEventSelector.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport { QueryClientProvider } from '@tanstack/react-query';\n\nimport { Chip } from '../Chip';\nimport { Menu } from '../Menu';\n\nimport { InterventionEventSelectorProps, InterventionUnitEvent } from './types';\nimport {\n interventionEventSelectorQueryClient,\n useInterventionUnitEvents,\n} from './useInterventionUnitEvents';\nimport { ALL_EVENTS_LABEL, formatEventDate, getEventChipLabel, isSameEventId } from './utils';\n\nimport styles from './InterventionEventSelector.scss';\n\nimport { DownIcon, UpIcon } from '~/icons';\n\nfunction InterventionEventSelectorInner({\n wellId,\n selectedEventId,\n onChange,\n className,\n}: InterventionEventSelectorProps) {\n const [isOpen, setIsOpen] = useState(false);\n const anchorRef = useRef<HTMLDivElement>(null);\n\n const { data: events = [], isSuccess } = useInterventionUnitEvents(wellId);\n\n const selectedEvent = useMemo(\n () => events.find(event => isSameEventId(event.id, selectedEventId)) ?? null,\n [events, selectedEventId]\n );\n\n // A persisted selection may belong to another well (e.g. the app well changed\n // while unmounted). Once the current well's events are known, an unknown id is\n // reset to \"All events\" so consumers drop the dead filter. Only a successful\n // fetch may reset — a failed one must not wipe a valid selection.\n useEffect(() => {\n if (!isSuccess || selectedEventId == null || selectedEvent) return;\n onChange(null, null);\n }, [isSuccess, selectedEventId, selectedEvent, onChange]);\n\n // With an active selection the chip must stay reachable even when the events\n // cannot be listed (failed fetch, missing well id) — it is the only control\n // that can clear the persisted filter.\n if (selectedEventId == null && (!wellId || !events.length)) return null;\n\n const ArrowIcon = isOpen ? UpIcon : DownIcon;\n\n const handleSelect = (event: InterventionUnitEvent | null) => {\n setIsOpen(false);\n onChange(event ? Number(event.id) : null, event);\n };\n\n return (\n <>\n <Chip\n ref={anchorRef}\n className={className}\n size=\"small\"\n onClick={() => setIsOpen(true)}\n suffix={<ArrowIcon />}\n testId=\"interventionEventSelectorChip\"\n >\n {getEventChipLabel(selectedEvent, selectedEventId)}\n </Chip>\n <Menu\n open={isOpen}\n anchorEl={anchorRef.current}\n onClose={() => setIsOpen(false)}\n className={styles.menu}\n >\n <Menu.Item\n // An unresolvable active selection (failed fetch) still filters the\n // consumer's data, so it must not present as \"All events\" here\n selected={selectedEventId == null}\n onClick={() => handleSelect(null)}\n testId=\"interventionEventSelectorAllEvents\"\n >\n {ALL_EVENTS_LABEL}\n </Menu.Item>\n {events.map(event => (\n <Menu.Item\n key={event.id}\n size=\"large\"\n selected={isSameEventId(event.id, selectedEventId)}\n onClick={() => handleSelect(event)}\n testId={`interventionEventSelectorEvent-${event.id}`}\n >\n <div className={styles.eventItem}>\n <div className={styles.eventItemMain}>\n <span className={styles.eventItemOperation}>{event.operation}</span>\n <span className={styles.eventItemDate}>{formatEventDate(event)}</span>\n </div>\n {event.intervention_unit?.name && (\n <div className={styles.eventItemUnit}>{event.intervention_unit.name}</div>\n )}\n </div>\n </Menu.Item>\n ))}\n </Menu>\n </>\n );\n}\n\n// The host app may bundle a different @tanstack/react-query instance than this\n// library, making an app-level QueryClientProvider invisible to the hook above.\n// Shipping our own provider keeps the component self-contained in any DC app.\nexport function InterventionEventSelector(props: InterventionEventSelectorProps) {\n return (\n <QueryClientProvider client={interventionEventSelectorQueryClient}>\n <InterventionEventSelectorInner {...props} />\n </QueryClientProvider>\n );\n}\n"],"names":["InterventionEventSelectorInner","_ref","wellId","selectedEventId","onChange","className","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","anchorRef","useRef","useInterventionUnitEvents","_useInterventionUnitE2","_useInterventionUnitE","data","events","isSuccess","selectedEvent","useMemo","_events$find","find","event","isSameEventId","id","useEffect","length","ArrowIcon","UpIcon","DownIcon","handleSelect","Number","_jsxs","_Fragment","children","_jsx","Chip","ref","size","onClick","suffix","testId","getEventChipLabel","Menu","open","anchorEl","current","onClose","styles","menu","Item","selected","ALL_EVENTS_LABEL","map","_event$intervention_u","jsx","jsxs","eventItem","eventItemMain","eventItemOperation","operation","eventItemDate","formatEventDate","intervention_unit","name","eventItemUnit","props","QueryClientProvider","client","interventionEventSelectorQueryClient","_objectSpread"],"mappings":"moKAiBA,SAASA,EAK0BC,GAAA,IAJjCC,IAAAA,OACAC,IAAAA,gBACAC,IAAAA,SACAC,IAAAA,UAE4BC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAApCC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GAClBK,EAAYC,SAAuB,MAEAC,EAAAA,EAAyBA,0BAACZ,GAAOa,EAAAC,EAAlEC,KAAMC,aAAS,GAAEH,EAAEI,IAAAA,UAErBC,EAAgBC,EAAAA,SACpB,WAAA,IAAAC,EAAA,eAAAA,EAAMJ,EAAOK,MAAK,SAAAC,GAAK,OAAIC,gBAAcD,EAAME,GAAIvB,EAAgB,mBAAK,IAAI,GAC5E,CAACe,EAAQf,IAeX,GARAwB,EAAAA,WAAU,WACHR,GAAgC,MAAnBhB,IAA2BiB,GAC7ChB,EAAS,KAAM,KAChB,GAAE,CAACe,EAAWhB,EAAiBiB,EAAehB,MAKxB,MAAnBD,GAA6BD,GAAWgB,EAAOU,QAAS,OAAO,KAEnE,IAAMC,EAAYnB,EAASoB,EAAMA,OAAGC,WAE9BC,EAAe,SAACR,GACpBb,GAAU,GACVP,EAASoB,EAAQS,OAAOT,EAAME,IAAM,KAAMF,IAG5C,OACEU,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SAAA,CACEC,MAACC,OAAI,CACHC,IAAK3B,EACLP,UAAWA,EACXmC,KAAK,QACLC,QAAS,WAAA,OAAM9B,GAAU,EAAM,EAC/B+B,OAAQL,EAAAA,IAACR,EAAa,IACtBc,OAAO,gCAA+BP,SAErCQ,EAAAA,kBAAkBxB,EAAejB,KAEpC+B,OAACW,OAAI,CACHC,KAAMpC,EACNqC,SAAUnC,EAAUoC,QACpBC,QAAS,WAAA,OAAMtC,GAAU,EAAO,EAChCN,UAAW6C,EAAOC,KAAKf,SAEvB,CAAAC,EAAAA,IAACQ,EAAIA,KAACO,KAAI,CAGRC,SAA6B,MAAnBlD,EACVsC,QAAS,WAAA,OAAMT,EAAa,KAAM,EAClCW,OAAO,qCAAoCP,SAE1CkB,EAAAA,mBAEFpC,EAAOqC,KAAI,SAAA/B,GAAK,IAAAgC,EAAA,OACfnB,EAAAoB,IAACZ,EAAIA,KAACO,KAAI,CAERZ,KAAK,QACLa,SAAU5B,EAAaA,cAACD,EAAME,GAAIvB,GAClCsC,QAAS,WAAA,OAAMT,EAAaR,EAAO,EACnCmB,OAA0CnB,kCAAAA,OAAAA,EAAME,IAAKU,SAErDF,EAAAwB,KAAA,MAAA,CAAKrD,UAAW6C,EAAOS,UAAUvB,SAC/B,CAAAF,EAAAwB,KAAA,MAAA,CAAKrD,UAAW6C,EAAOU,cAAcxB,SACnC,CAAAC,EAAAoB,IAAA,OAAA,CAAMpD,UAAW6C,EAAOW,mBAAmBzB,SAAEZ,EAAMsC,YACnDzB,EAAAoB,IAAA,OAAA,CAAMpD,UAAW6C,EAAOa,cAAc3B,SAAE4B,EAAeA,gBAACxC,SAEzD,UAAAA,EAAMyC,yBAAN,IAAAT,OAAA,EAAAA,EAAyBU,OACxB7B,EAAAA,IAAA,MAAA,CAAKhC,UAAW6C,EAAOiB,cAAc/B,SAAEZ,EAAMyC,kBAAkBC,WAZ9D1C,EAAME,GAeD,SAKtB,mCAKO,SAAmC0C,GACxC,OACE/B,EAAAA,IAACgC,EAAAA,oBAAmB,CAACC,OAAQC,EAAqCA,qCAAAnC,SAChEC,EAAAoB,IAACzD,EAA8BwE,EAAA,CAAA,EAAKJ,KAG1C"}
1
+ {"version":3,"file":"InterventionEventSelector.js","sources":["../../../../src/componentsV2/InterventionEventSelector/InterventionEventSelector.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport classNames from 'classnames';\n\nimport { Chip } from '../Chip';\nimport { Menu } from '../Menu';\n\nimport { InterventionEventSelectorProps, InterventionUnitEvent } from './types';\nimport {\n interventionEventSelectorQueryClient,\n useInterventionUnitEvents,\n} from './useInterventionUnitEvents';\nimport { ALL_EVENTS_LABEL, formatEventDate, getEventChipLabel, isSameEventId } from './utils';\n\nimport styles from './InterventionEventSelector.scss';\n\nimport { DownIcon, UpIcon } from '~/icons';\n\nfunction InterventionEventSelectorInner({\n wellId,\n selectedEventId,\n onChange,\n className,\n}: InterventionEventSelectorProps) {\n const [isOpen, setIsOpen] = useState(false);\n const anchorRef = useRef<HTMLDivElement>(null);\n\n const { data: events = [], isSuccess } = useInterventionUnitEvents(wellId);\n\n const selectedEvent = useMemo(\n () => events.find(event => isSameEventId(event.id, selectedEventId)) ?? null,\n [events, selectedEventId]\n );\n\n // A persisted selection may belong to another well (e.g. the app well changed\n // while unmounted). Once the current well's events are known, an unknown id is\n // reset to \"All events\" so consumers drop the dead filter. Only a successful\n // fetch may reset — a failed one must not wipe a valid selection.\n useEffect(() => {\n if (!isSuccess || selectedEventId == null || selectedEvent) return;\n onChange(null, null);\n }, [isSuccess, selectedEventId, selectedEvent, onChange]);\n\n // With an active selection the chip must stay reachable even when the events\n // cannot be listed (failed fetch, missing well id) — it is the only control\n // that can clear the persisted filter.\n if (selectedEventId == null && (!wellId || !events.length)) return null;\n\n const ArrowIcon = isOpen ? UpIcon : DownIcon;\n\n const handleSelect = (event: InterventionUnitEvent | null) => {\n setIsOpen(false);\n onChange(event ? Number(event.id) : null, event);\n };\n\n return (\n <>\n <Chip\n ref={anchorRef}\n className={classNames(styles.chip, className)}\n size=\"small\"\n onClick={() => setIsOpen(true)}\n suffix={<ArrowIcon size={16} />}\n testId=\"interventionEventSelectorChip\"\n >\n {getEventChipLabel(selectedEvent, selectedEventId)}\n </Chip>\n <Menu\n open={isOpen}\n anchorEl={anchorRef.current}\n onClose={() => setIsOpen(false)}\n className={styles.menu}\n >\n <Menu.Item\n // An unresolvable active selection (failed fetch) still filters the\n // consumer's data, so it must not present as \"All events\" here\n selected={selectedEventId == null}\n onClick={() => handleSelect(null)}\n testId=\"interventionEventSelectorAllEvents\"\n >\n {ALL_EVENTS_LABEL}\n </Menu.Item>\n {events.map(event => (\n <Menu.Item\n key={event.id}\n size=\"large\"\n selected={isSameEventId(event.id, selectedEventId)}\n onClick={() => handleSelect(event)}\n testId={`interventionEventSelectorEvent-${event.id}`}\n >\n <div className={styles.eventItem}>\n <div className={styles.eventItemMain}>\n <span className={styles.eventItemOperation}>{event.operation}</span>\n <span className={styles.eventItemDate}>{formatEventDate(event)}</span>\n </div>\n {event.intervention_unit?.name && (\n <div className={styles.eventItemUnit}>{event.intervention_unit.name}</div>\n )}\n </div>\n </Menu.Item>\n ))}\n </Menu>\n </>\n );\n}\n\n// The host app may bundle a different @tanstack/react-query instance than this\n// library, making an app-level QueryClientProvider invisible to the hook above.\n// Shipping our own provider keeps the component self-contained in any DC app.\nexport function InterventionEventSelector(props: InterventionEventSelectorProps) {\n return (\n <QueryClientProvider client={interventionEventSelectorQueryClient}>\n <InterventionEventSelectorInner {...props} />\n </QueryClientProvider>\n );\n}\n"],"names":["InterventionEventSelectorInner","_ref","wellId","selectedEventId","onChange","className","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","anchorRef","useRef","useInterventionUnitEvents","_useInterventionUnitE2","_useInterventionUnitE","data","events","isSuccess","selectedEvent","useMemo","_events$find","find","event","isSameEventId","id","useEffect","length","ArrowIcon","UpIcon","DownIcon","handleSelect","Number","_jsxs","_Fragment","children","_jsx","Chip","ref","classNames","styles","chip","size","onClick","suffix","testId","getEventChipLabel","Menu","open","anchorEl","current","onClose","menu","Item","selected","ALL_EVENTS_LABEL","map","_event$intervention_u","jsx","jsxs","eventItem","eventItemMain","eventItemOperation","operation","eventItemDate","formatEventDate","intervention_unit","name","eventItemUnit","props","QueryClientProvider","client","interventionEventSelectorQueryClient","_objectSpread"],"mappings":"kqKAkBA,SAASA,EAK0BC,GAAA,IAJjCC,IAAAA,OACAC,IAAAA,gBACAC,IAAAA,SACAC,IAAAA,UAE4BC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAApCC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GAClBK,EAAYC,SAAuB,MAEAC,EAAAA,EAAyBA,0BAACZ,GAAOa,EAAAC,EAAlEC,KAAMC,aAAS,GAAEH,EAAEI,IAAAA,UAErBC,EAAgBC,EAAAA,SACpB,WAAA,IAAAC,EAAA,eAAAA,EAAMJ,EAAOK,MAAK,SAAAC,GAAK,OAAIC,gBAAcD,EAAME,GAAIvB,EAAgB,mBAAK,IAAI,GAC5E,CAACe,EAAQf,IAeX,GARAwB,EAAAA,WAAU,WACHR,GAAgC,MAAnBhB,IAA2BiB,GAC7ChB,EAAS,KAAM,KAChB,GAAE,CAACe,EAAWhB,EAAiBiB,EAAehB,MAKxB,MAAnBD,GAA6BD,GAAWgB,EAAOU,QAAS,OAAO,KAEnE,IAAMC,EAAYnB,EAASoB,EAAMA,OAAGC,WAE9BC,EAAe,SAACR,GACpBb,GAAU,GACVP,EAASoB,EAAQS,OAAOT,EAAME,IAAM,KAAMF,IAG5C,OACEU,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SAAA,CACEC,MAACC,OAAI,CACHC,IAAK3B,EACLP,UAAWmC,EAAU,QAACC,EAAOC,KAAMrC,GACnCsC,KAAK,QACLC,QAAS,WAAA,OAAMjC,GAAU,EAAM,EAC/BkC,OAAQR,MAACR,EAAS,CAACc,KAAM,KACzBG,OAAO,gCAA+BV,SAErCW,EAAAA,kBAAkB3B,EAAejB,KAEpC+B,OAACc,OAAI,CACHC,KAAMvC,EACNwC,SAAUtC,EAAUuC,QACpBC,QAAS,WAAA,OAAMzC,GAAU,EAAO,EAChCN,UAAWoC,EAAOY,KAAKjB,SAEvB,CAAAC,EAAAA,IAACW,EAAIA,KAACM,KAAI,CAGRC,SAA6B,MAAnBpD,EACVyC,QAAS,WAAA,OAAMZ,EAAa,KAAM,EAClCc,OAAO,qCAAoCV,SAE1CoB,EAAAA,mBAEFtC,EAAOuC,KAAI,SAAAjC,GAAK,IAAAkC,EAAA,OACfrB,EAAAsB,IAACX,EAAIA,KAACM,KAAI,CAERX,KAAK,QACLY,SAAU9B,EAAaA,cAACD,EAAME,GAAIvB,GAClCyC,QAAS,WAAA,OAAMZ,EAAaR,EAAO,EACnCsB,OAA0CtB,kCAAAA,OAAAA,EAAME,IAAKU,SAErDF,EAAA0B,KAAA,MAAA,CAAKvD,UAAWoC,EAAOoB,UAAUzB,SAC/B,CAAAF,EAAA0B,KAAA,MAAA,CAAKvD,UAAWoC,EAAOqB,cAAc1B,SACnC,CAAAC,EAAAsB,IAAA,OAAA,CAAMtD,UAAWoC,EAAOsB,mBAAmB3B,SAAEZ,EAAMwC,YACnD3B,EAAAsB,IAAA,OAAA,CAAMtD,UAAWoC,EAAOwB,cAAc7B,SAAE8B,EAAeA,gBAAC1C,SAEzD,UAAAA,EAAM2C,yBAAN,IAAAT,OAAA,EAAAA,EAAyBU,OACxB/B,EAAAA,IAAA,MAAA,CAAKhC,UAAWoC,EAAO4B,cAAcjC,SAAEZ,EAAM2C,kBAAkBC,WAZ9D5C,EAAME,GAeD,SAKtB,mCAKO,SAAmC4C,GACxC,OACEjC,EAAAA,IAACkC,EAAAA,oBAAmB,CAACC,OAAQC,EAAqCA,qCAAArC,SAChEC,EAAAsB,IAAC3D,EAA8B0E,EAAA,CAAA,EAAKJ,KAG1C"}
@@ -1,2 +1,2 @@
1
- "use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')(".InterventionEventSelector_menu__kjVhB{max-height:360px;max-width:320px;min-width:240px}.InterventionEventSelector_eventItem__XC1Z4{display:flex;flex-direction:column;gap:2px;min-width:0;width:100%}.InterventionEventSelector_eventItemMain__SYYAI{align-items:baseline;display:flex;gap:12px;justify-content:space-between;min-width:0}.InterventionEventSelector_eventItemOperation__3VEM8{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.InterventionEventSelector_eventItemDate__fAZXc{color:var(--palette-primary-text-6);flex-shrink:0;font-size:12px}.InterventionEventSelector_eventItemUnit__GwdHJ{color:var(--palette-primary-text-6);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"),module.exports={spacing:"8",menu:"InterventionEventSelector_menu__kjVhB",eventItem:"InterventionEventSelector_eventItem__XC1Z4",eventItemMain:"InterventionEventSelector_eventItemMain__SYYAI",eventItemOperation:"InterventionEventSelector_eventItemOperation__3VEM8",eventItemDate:"InterventionEventSelector_eventItemDate__fAZXc",eventItemUnit:"InterventionEventSelector_eventItemUnit__GwdHJ"};
1
+ "use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')(".InterventionEventSelector_chip__EbIsB.InterventionEventSelector_chip__EbIsB{background:transparent;border-radius:4px;color:var(--palette-primary-text-6);font-size:12px;gap:2px;height:20px;line-height:16px;padding:2px 2px 2px 4px}.InterventionEventSelector_menu__kjVhB.InterventionEventSelector_menu__kjVhB{--corvaui-background:var(--palette-background-b-6);background:var(--palette-background-b-6);max-height:360px;max-width:320px;min-width:240px}.InterventionEventSelector_menu__kjVhB li{padding-left:0;padding-right:0}.InterventionEventSelector_menu__kjVhB .MuiListItem-root{border-radius:0;padding-left:16px;padding-right:16px}.InterventionEventSelector_menu__kjVhB .MuiListItem-root:has(.InterventionEventSelector_eventItem__XC1Z4){min-height:0;padding-bottom:8px;padding-top:8px}.InterventionEventSelector_eventItem__XC1Z4{display:flex;flex-direction:column;gap:2px;min-width:0;width:100%}.InterventionEventSelector_eventItemMain__SYYAI{align-items:baseline;display:flex;gap:12px;justify-content:space-between;min-width:0}.InterventionEventSelector_eventItemOperation__3VEM8{color:var(--palette-primary-text-1);font-size:16px;line-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.InterventionEventSelector_eventItemDate__fAZXc{color:var(--palette-primary-text-6);flex-shrink:0;font-size:12px;line-height:16px}.InterventionEventSelector_eventItemUnit__GwdHJ{color:var(--palette-primary-text-7);font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"),module.exports={spacing:"8",chip:"InterventionEventSelector_chip__EbIsB",menu:"InterventionEventSelector_menu__kjVhB",eventItem:"InterventionEventSelector_eventItem__XC1Z4",eventItemMain:"InterventionEventSelector_eventItemMain__SYYAI",eventItemOperation:"InterventionEventSelector_eventItemOperation__3VEM8",eventItemDate:"InterventionEventSelector_eventItemDate__fAZXc",eventItemUnit:"InterventionEventSelector_eventItemUnit__GwdHJ"};
2
2
  //# sourceMappingURL=InterventionEventSelector.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InterventionEventSelector.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/InterventionEventSelector/InterventionEventSelector.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,8BAA8B,EAAyB,MAAM,SAAS,CAAC;AAsGhF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,2CAM9E"}
1
+ {"version":3,"file":"InterventionEventSelector.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/InterventionEventSelector/InterventionEventSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,8BAA8B,EAAyB,MAAM,SAAS,CAAC;AAsGhF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,2CAM9E"}
@@ -1,2 +1,2 @@
1
- import o from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/helpers/slicedToArray";import{useState as n,useRef as c,useMemo as i,useEffect as t}from"react";import{QueryClientProvider as e}from"@tanstack/react-query";import{Chip as r}from"../Chip/Chip.js";import{Menu as m}from"../Menu/Menu.js";import{interventionEventSelectorQueryClient as u,useInterventionUnitEvents as p}from"./useInterventionUnitEvents.js";import{isSameEventId as l,getEventChipLabel as a,ALL_EVENTS_LABEL as j,formatEventDate as I}from"./utils.js";import d from"./InterventionEventSelector.scss.js";import{UpIcon as v,DownIcon as f}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/InfoRounded.js";import"../../icons/customIcons/icons/FlameFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/PinOne.js";import"../../icons/customIcons/icons/PinOneCrossed.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{jsx as h,jsxs as O,Fragment as C}from"react/jsx-runtime";function b(o,s){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);s&&(c=c.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),n.push.apply(n,c)}return n}function P(s){for(var n=1;n<arguments.length;n++){var c=null!=arguments[n]?arguments[n]:{};n%2?b(Object(c),!0).forEach((function(n){o(s,n,c[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(c)):b(Object(c)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(c,o))}))}return s}function F(o){var e=o.wellId,u=o.selectedEventId,b=o.onChange,P=o.className,F=n(!1),g=s(F,2),y=g[0],E=g[1],k=c(null),A=p(e),S=A.data,D=void 0===S?[]:S,M=A.isSuccess,N=i((function(){var o;return null!==(o=D.find((function(o){return l(o.id,u)})))&&void 0!==o?o:null}),[D,u]);if(t((function(){M&&null!=u&&!N&&b(null,null)}),[M,u,N,b]),!(null!=u||e&&D.length))return null;var w=function(o){E(!1),b(o?Number(o.id):null,o)};return O(C,{children:[h(r,{ref:k,className:P,size:"small",onClick:function(){return E(!0)},suffix:h(y?v:f,{}),testId:"interventionEventSelectorChip",children:a(N,u)}),O(m,{open:y,anchorEl:k.current,onClose:function(){return E(!1)},className:d.menu,children:[h(m.Item,{selected:null==u,onClick:function(){return w(null)},testId:"interventionEventSelectorAllEvents",children:j}),D.map((function(o){var s;return h(m.Item,{size:"large",selected:l(o.id,u),onClick:function(){return w(o)},testId:"interventionEventSelectorEvent-".concat(o.id),children:O("div",{className:d.eventItem,children:[O("div",{className:d.eventItemMain,children:[h("span",{className:d.eventItemOperation,children:o.operation}),h("span",{className:d.eventItemDate,children:I(o)})]}),(null===(s=o.intervention_unit)||void 0===s?void 0:s.name)&&h("div",{className:d.eventItemUnit,children:o.intervention_unit.name})]})},o.id)}))]})]})}function g(o){return h(e,{client:u,children:h(F,P({},o))})}export{g as InterventionEventSelector};
1
+ import o from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/helpers/slicedToArray";import{useState as n,useRef as c,useMemo as i,useEffect as t}from"react";import{QueryClientProvider as e}from"@tanstack/react-query";import r from"classnames";import{Chip as m}from"../Chip/Chip.js";import{Menu as u}from"../Menu/Menu.js";import{interventionEventSelectorQueryClient as p,useInterventionUnitEvents as l}from"./useInterventionUnitEvents.js";import{isSameEventId as a,getEventChipLabel as j,ALL_EVENTS_LABEL as I,formatEventDate as d}from"./utils.js";import v from"./InterventionEventSelector.scss.js";import{UpIcon as f,DownIcon as h}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/InfoRounded.js";import"../../icons/customIcons/icons/FlameFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/PinOne.js";import"../../icons/customIcons/icons/PinOneCrossed.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{jsx as O,jsxs as C,Fragment as b}from"react/jsx-runtime";function P(o,s){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);s&&(c=c.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),n.push.apply(n,c)}return n}function F(s){for(var n=1;n<arguments.length;n++){var c=null!=arguments[n]?arguments[n]:{};n%2?P(Object(c),!0).forEach((function(n){o(s,n,c[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(c)):P(Object(c)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(c,o))}))}return s}function g(o){var e=o.wellId,p=o.selectedEventId,P=o.onChange,F=o.className,g=n(!1),y=s(g,2),E=y[0],k=y[1],A=c(null),S=l(e),D=S.data,M=void 0===D?[]:D,N=S.isSuccess,w=i((function(){var o;return null!==(o=M.find((function(o){return a(o.id,p)})))&&void 0!==o?o:null}),[M,p]);if(t((function(){N&&null!=p&&!w&&P(null,null)}),[N,p,w,P]),!(null!=p||e&&M.length))return null;var x=E?f:h,R=function(o){k(!1),P(o?Number(o.id):null,o)};return C(b,{children:[O(m,{ref:A,className:r(v.chip,F),size:"small",onClick:function(){return k(!0)},suffix:O(x,{size:16}),testId:"interventionEventSelectorChip",children:j(w,p)}),C(u,{open:E,anchorEl:A.current,onClose:function(){return k(!1)},className:v.menu,children:[O(u.Item,{selected:null==p,onClick:function(){return R(null)},testId:"interventionEventSelectorAllEvents",children:I}),M.map((function(o){var s;return O(u.Item,{size:"large",selected:a(o.id,p),onClick:function(){return R(o)},testId:"interventionEventSelectorEvent-".concat(o.id),children:C("div",{className:v.eventItem,children:[C("div",{className:v.eventItemMain,children:[O("span",{className:v.eventItemOperation,children:o.operation}),O("span",{className:v.eventItemDate,children:d(o)})]}),(null===(s=o.intervention_unit)||void 0===s?void 0:s.name)&&O("div",{className:v.eventItemUnit,children:o.intervention_unit.name})]})},o.id)}))]})]})}function y(o){return O(e,{client:p,children:O(g,F({},o))})}export{y as InterventionEventSelector};
2
2
  //# sourceMappingURL=InterventionEventSelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InterventionEventSelector.js","sources":["../../../src/componentsV2/InterventionEventSelector/InterventionEventSelector.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport { QueryClientProvider } from '@tanstack/react-query';\n\nimport { Chip } from '../Chip';\nimport { Menu } from '../Menu';\n\nimport { InterventionEventSelectorProps, InterventionUnitEvent } from './types';\nimport {\n interventionEventSelectorQueryClient,\n useInterventionUnitEvents,\n} from './useInterventionUnitEvents';\nimport { ALL_EVENTS_LABEL, formatEventDate, getEventChipLabel, isSameEventId } from './utils';\n\nimport styles from './InterventionEventSelector.scss';\n\nimport { DownIcon, UpIcon } from '~/icons';\n\nfunction InterventionEventSelectorInner({\n wellId,\n selectedEventId,\n onChange,\n className,\n}: InterventionEventSelectorProps) {\n const [isOpen, setIsOpen] = useState(false);\n const anchorRef = useRef<HTMLDivElement>(null);\n\n const { data: events = [], isSuccess } = useInterventionUnitEvents(wellId);\n\n const selectedEvent = useMemo(\n () => events.find(event => isSameEventId(event.id, selectedEventId)) ?? null,\n [events, selectedEventId]\n );\n\n // A persisted selection may belong to another well (e.g. the app well changed\n // while unmounted). Once the current well's events are known, an unknown id is\n // reset to \"All events\" so consumers drop the dead filter. Only a successful\n // fetch may reset — a failed one must not wipe a valid selection.\n useEffect(() => {\n if (!isSuccess || selectedEventId == null || selectedEvent) return;\n onChange(null, null);\n }, [isSuccess, selectedEventId, selectedEvent, onChange]);\n\n // With an active selection the chip must stay reachable even when the events\n // cannot be listed (failed fetch, missing well id) — it is the only control\n // that can clear the persisted filter.\n if (selectedEventId == null && (!wellId || !events.length)) return null;\n\n const ArrowIcon = isOpen ? UpIcon : DownIcon;\n\n const handleSelect = (event: InterventionUnitEvent | null) => {\n setIsOpen(false);\n onChange(event ? Number(event.id) : null, event);\n };\n\n return (\n <>\n <Chip\n ref={anchorRef}\n className={className}\n size=\"small\"\n onClick={() => setIsOpen(true)}\n suffix={<ArrowIcon />}\n testId=\"interventionEventSelectorChip\"\n >\n {getEventChipLabel(selectedEvent, selectedEventId)}\n </Chip>\n <Menu\n open={isOpen}\n anchorEl={anchorRef.current}\n onClose={() => setIsOpen(false)}\n className={styles.menu}\n >\n <Menu.Item\n // An unresolvable active selection (failed fetch) still filters the\n // consumer's data, so it must not present as \"All events\" here\n selected={selectedEventId == null}\n onClick={() => handleSelect(null)}\n testId=\"interventionEventSelectorAllEvents\"\n >\n {ALL_EVENTS_LABEL}\n </Menu.Item>\n {events.map(event => (\n <Menu.Item\n key={event.id}\n size=\"large\"\n selected={isSameEventId(event.id, selectedEventId)}\n onClick={() => handleSelect(event)}\n testId={`interventionEventSelectorEvent-${event.id}`}\n >\n <div className={styles.eventItem}>\n <div className={styles.eventItemMain}>\n <span className={styles.eventItemOperation}>{event.operation}</span>\n <span className={styles.eventItemDate}>{formatEventDate(event)}</span>\n </div>\n {event.intervention_unit?.name && (\n <div className={styles.eventItemUnit}>{event.intervention_unit.name}</div>\n )}\n </div>\n </Menu.Item>\n ))}\n </Menu>\n </>\n );\n}\n\n// The host app may bundle a different @tanstack/react-query instance than this\n// library, making an app-level QueryClientProvider invisible to the hook above.\n// Shipping our own provider keeps the component self-contained in any DC app.\nexport function InterventionEventSelector(props: InterventionEventSelectorProps) {\n return (\n <QueryClientProvider client={interventionEventSelectorQueryClient}>\n <InterventionEventSelectorInner {...props} />\n </QueryClientProvider>\n );\n}\n"],"names":["InterventionEventSelectorInner","_ref","wellId","selectedEventId","onChange","className","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","anchorRef","useRef","useInterventionUnitEvents","_useInterventionUnitE2","_useInterventionUnitE","data","events","isSuccess","selectedEvent","useMemo","_events$find","find","event","isSameEventId","id","useEffect","length","handleSelect","Number","_jsxs","_Fragment","children","_jsx","Chip","ref","size","onClick","suffix","UpIcon","DownIcon","testId","getEventChipLabel","Menu","open","anchorEl","current","onClose","styles","menu","Item","selected","ALL_EVENTS_LABEL","map","_event$intervention_u","eventItem","eventItemMain","eventItemOperation","operation","eventItemDate","formatEventDate","intervention_unit","name","eventItemUnit","InterventionEventSelector","props","QueryClientProvider","client","interventionEventSelectorQueryClient","_objectSpread"],"mappings":"sjKAiBA,SAASA,EAK0BC,GAAA,IAJjCC,IAAAA,OACAC,IAAAA,gBACAC,IAAAA,SACAC,IAAAA,UAE4BC,EAAAA,GAAS,GAAMC,EAAAC,EAAAC,EAAA,GAApCC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GAClBK,EAAYC,EAAuB,MAEAC,EAAAA,EAA0BZ,GAAOa,EAAAC,EAAlEC,KAAMC,aAAS,GAAEH,EAAEI,IAAAA,UAErBC,EAAgBC,GACpB,WAAA,IAAAC,EAAA,eAAAA,EAAMJ,EAAOK,MAAK,SAAAC,GAAK,OAAIC,EAAcD,EAAME,GAAIvB,EAAgB,mBAAK,IAAI,GAC5E,CAACe,EAAQf,IAeX,GARAwB,GAAU,WACHR,GAAgC,MAAnBhB,IAA2BiB,GAC7ChB,EAAS,KAAM,KAChB,GAAE,CAACe,EAAWhB,EAAiBiB,EAAehB,MAKxB,MAAnBD,GAA6BD,GAAWgB,EAAOU,QAAS,OAAO,KAEnE,IAEMC,EAAe,SAACL,GACpBb,GAAU,GACVP,EAASoB,EAAQM,OAAON,EAAME,IAAM,KAAMF,IAG5C,OACEO,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,EAAI,CACHC,IAAKxB,EACLP,UAAWA,EACXgC,KAAK,QACLC,QAAS,WAAA,OAAM3B,GAAU,EAAM,EAC/B4B,OAAQL,EAdIxB,EAAS8B,EAASC,EAcR,IACtBC,OAAO,gCAA+BT,SAErCU,EAAkBvB,EAAejB,KAEpC4B,EAACa,EAAI,CACHC,KAAMnC,EACNoC,SAAUlC,EAAUmC,QACpBC,QAAS,WAAA,OAAMrC,GAAU,EAAO,EAChCN,UAAW4C,EAAOC,KAAKjB,SAEvB,CAAAC,EAACU,EAAKO,KAAI,CAGRC,SAA6B,MAAnBjD,EACVmC,QAAS,WAAA,OAAMT,EAAa,KAAM,EAClCa,OAAO,qCAAoCT,SAE1CoB,IAEFnC,EAAOoC,KAAI,SAAA9B,GAAK,IAAA+B,EAAA,OACfrB,EAACU,EAAKO,KAAI,CAERd,KAAK,QACLe,SAAU3B,EAAcD,EAAME,GAAIvB,GAClCmC,QAAS,WAAA,OAAMT,EAAaL,EAAO,EACnCkB,OAA0ClB,kCAAAA,OAAAA,EAAME,IAAKO,SAErDF,EAAA,MAAA,CAAK1B,UAAW4C,EAAOO,UAAUvB,SAC/B,CAAAF,EAAA,MAAA,CAAK1B,UAAW4C,EAAOQ,cAAcxB,SACnC,CAAAC,EAAA,OAAA,CAAM7B,UAAW4C,EAAOS,mBAAmBzB,SAAET,EAAMmC,YACnDzB,EAAA,OAAA,CAAM7B,UAAW4C,EAAOW,cAAc3B,SAAE4B,EAAgBrC,SAEzD,UAAAA,EAAMsC,yBAAN,IAAAP,OAAA,EAAAA,EAAyBQ,OACxB7B,EAAA,MAAA,CAAK7B,UAAW4C,EAAOe,cAAc/B,SAAET,EAAMsC,kBAAkBC,WAZ9DvC,EAAME,GAeD,SAKtB,CAKO,SAASuC,EAA0BC,GACxC,OACEhC,EAACiC,EAAmB,CAACC,OAAQC,EAAqCpC,SAChEC,EAAClC,EAA8BsE,EAAA,CAAA,EAAKJ,KAG1C"}
1
+ {"version":3,"file":"InterventionEventSelector.js","sources":["../../../src/componentsV2/InterventionEventSelector/InterventionEventSelector.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport classNames from 'classnames';\n\nimport { Chip } from '../Chip';\nimport { Menu } from '../Menu';\n\nimport { InterventionEventSelectorProps, InterventionUnitEvent } from './types';\nimport {\n interventionEventSelectorQueryClient,\n useInterventionUnitEvents,\n} from './useInterventionUnitEvents';\nimport { ALL_EVENTS_LABEL, formatEventDate, getEventChipLabel, isSameEventId } from './utils';\n\nimport styles from './InterventionEventSelector.scss';\n\nimport { DownIcon, UpIcon } from '~/icons';\n\nfunction InterventionEventSelectorInner({\n wellId,\n selectedEventId,\n onChange,\n className,\n}: InterventionEventSelectorProps) {\n const [isOpen, setIsOpen] = useState(false);\n const anchorRef = useRef<HTMLDivElement>(null);\n\n const { data: events = [], isSuccess } = useInterventionUnitEvents(wellId);\n\n const selectedEvent = useMemo(\n () => events.find(event => isSameEventId(event.id, selectedEventId)) ?? null,\n [events, selectedEventId]\n );\n\n // A persisted selection may belong to another well (e.g. the app well changed\n // while unmounted). Once the current well's events are known, an unknown id is\n // reset to \"All events\" so consumers drop the dead filter. Only a successful\n // fetch may reset — a failed one must not wipe a valid selection.\n useEffect(() => {\n if (!isSuccess || selectedEventId == null || selectedEvent) return;\n onChange(null, null);\n }, [isSuccess, selectedEventId, selectedEvent, onChange]);\n\n // With an active selection the chip must stay reachable even when the events\n // cannot be listed (failed fetch, missing well id) — it is the only control\n // that can clear the persisted filter.\n if (selectedEventId == null && (!wellId || !events.length)) return null;\n\n const ArrowIcon = isOpen ? UpIcon : DownIcon;\n\n const handleSelect = (event: InterventionUnitEvent | null) => {\n setIsOpen(false);\n onChange(event ? Number(event.id) : null, event);\n };\n\n return (\n <>\n <Chip\n ref={anchorRef}\n className={classNames(styles.chip, className)}\n size=\"small\"\n onClick={() => setIsOpen(true)}\n suffix={<ArrowIcon size={16} />}\n testId=\"interventionEventSelectorChip\"\n >\n {getEventChipLabel(selectedEvent, selectedEventId)}\n </Chip>\n <Menu\n open={isOpen}\n anchorEl={anchorRef.current}\n onClose={() => setIsOpen(false)}\n className={styles.menu}\n >\n <Menu.Item\n // An unresolvable active selection (failed fetch) still filters the\n // consumer's data, so it must not present as \"All events\" here\n selected={selectedEventId == null}\n onClick={() => handleSelect(null)}\n testId=\"interventionEventSelectorAllEvents\"\n >\n {ALL_EVENTS_LABEL}\n </Menu.Item>\n {events.map(event => (\n <Menu.Item\n key={event.id}\n size=\"large\"\n selected={isSameEventId(event.id, selectedEventId)}\n onClick={() => handleSelect(event)}\n testId={`interventionEventSelectorEvent-${event.id}`}\n >\n <div className={styles.eventItem}>\n <div className={styles.eventItemMain}>\n <span className={styles.eventItemOperation}>{event.operation}</span>\n <span className={styles.eventItemDate}>{formatEventDate(event)}</span>\n </div>\n {event.intervention_unit?.name && (\n <div className={styles.eventItemUnit}>{event.intervention_unit.name}</div>\n )}\n </div>\n </Menu.Item>\n ))}\n </Menu>\n </>\n );\n}\n\n// The host app may bundle a different @tanstack/react-query instance than this\n// library, making an app-level QueryClientProvider invisible to the hook above.\n// Shipping our own provider keeps the component self-contained in any DC app.\nexport function InterventionEventSelector(props: InterventionEventSelectorProps) {\n return (\n <QueryClientProvider client={interventionEventSelectorQueryClient}>\n <InterventionEventSelectorInner {...props} />\n </QueryClientProvider>\n );\n}\n"],"names":["InterventionEventSelectorInner","_ref","wellId","selectedEventId","onChange","className","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","anchorRef","useRef","useInterventionUnitEvents","_useInterventionUnitE2","_useInterventionUnitE","data","events","isSuccess","selectedEvent","useMemo","_events$find","find","event","isSameEventId","id","useEffect","length","ArrowIcon","UpIcon","DownIcon","handleSelect","Number","_jsxs","_Fragment","children","_jsx","Chip","ref","classNames","styles","chip","size","onClick","suffix","testId","getEventChipLabel","Menu","open","anchorEl","current","onClose","menu","Item","selected","ALL_EVENTS_LABEL","map","_event$intervention_u","eventItem","eventItemMain","eventItemOperation","operation","eventItemDate","formatEventDate","intervention_unit","name","eventItemUnit","InterventionEventSelector","props","QueryClientProvider","client","interventionEventSelectorQueryClient","_objectSpread"],"mappings":"glKAkBA,SAASA,EAK0BC,GAAA,IAJjCC,IAAAA,OACAC,IAAAA,gBACAC,IAAAA,SACAC,IAAAA,UAE4BC,EAAAA,GAAS,GAAMC,EAAAC,EAAAC,EAAA,GAApCC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GAClBK,EAAYC,EAAuB,MAEAC,EAAAA,EAA0BZ,GAAOa,EAAAC,EAAlEC,KAAMC,aAAS,GAAEH,EAAEI,IAAAA,UAErBC,EAAgBC,GACpB,WAAA,IAAAC,EAAA,eAAAA,EAAMJ,EAAOK,MAAK,SAAAC,GAAK,OAAIC,EAAcD,EAAME,GAAIvB,EAAgB,mBAAK,IAAI,GAC5E,CAACe,EAAQf,IAeX,GARAwB,GAAU,WACHR,GAAgC,MAAnBhB,IAA2BiB,GAC7ChB,EAAS,KAAM,KAChB,GAAE,CAACe,EAAWhB,EAAiBiB,EAAehB,MAKxB,MAAnBD,GAA6BD,GAAWgB,EAAOU,QAAS,OAAO,KAEnE,IAAMC,EAAYnB,EAASoB,EAASC,EAE9BC,EAAe,SAACR,GACpBb,GAAU,GACVP,EAASoB,EAAQS,OAAOT,EAAME,IAAM,KAAMF,IAG5C,OACEU,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,EAAI,CACHC,IAAK3B,EACLP,UAAWmC,EAAWC,EAAOC,KAAMrC,GACnCsC,KAAK,QACLC,QAAS,WAAA,OAAMjC,GAAU,EAAM,EAC/BkC,OAAQR,EAACR,EAAS,CAACc,KAAM,KACzBG,OAAO,gCAA+BV,SAErCW,EAAkB3B,EAAejB,KAEpC+B,EAACc,EAAI,CACHC,KAAMvC,EACNwC,SAAUtC,EAAUuC,QACpBC,QAAS,WAAA,OAAMzC,GAAU,EAAO,EAChCN,UAAWoC,EAAOY,KAAKjB,SAEvB,CAAAC,EAACW,EAAKM,KAAI,CAGRC,SAA6B,MAAnBpD,EACVyC,QAAS,WAAA,OAAMZ,EAAa,KAAM,EAClCc,OAAO,qCAAoCV,SAE1CoB,IAEFtC,EAAOuC,KAAI,SAAAjC,GAAK,IAAAkC,EAAA,OACfrB,EAACW,EAAKM,KAAI,CAERX,KAAK,QACLY,SAAU9B,EAAcD,EAAME,GAAIvB,GAClCyC,QAAS,WAAA,OAAMZ,EAAaR,EAAO,EACnCsB,OAA0CtB,kCAAAA,OAAAA,EAAME,IAAKU,SAErDF,EAAA,MAAA,CAAK7B,UAAWoC,EAAOkB,UAAUvB,SAC/B,CAAAF,EAAA,MAAA,CAAK7B,UAAWoC,EAAOmB,cAAcxB,SACnC,CAAAC,EAAA,OAAA,CAAMhC,UAAWoC,EAAOoB,mBAAmBzB,SAAEZ,EAAMsC,YACnDzB,EAAA,OAAA,CAAMhC,UAAWoC,EAAOsB,cAAc3B,SAAE4B,EAAgBxC,SAEzD,UAAAA,EAAMyC,yBAAN,IAAAP,OAAA,EAAAA,EAAyBQ,OACxB7B,EAAA,MAAA,CAAKhC,UAAWoC,EAAO0B,cAAc/B,SAAEZ,EAAMyC,kBAAkBC,WAZ9D1C,EAAME,GAeD,SAKtB,CAKO,SAAS0C,EAA0BC,GACxC,OACEhC,EAACiC,EAAmB,CAACC,OAAQC,EAAqCpC,SAChEC,EAACrC,EAA8ByE,EAAA,CAAA,EAAKJ,KAG1C"}
@@ -1,2 +1,2 @@
1
- import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var t={spacing:"8",menu:"InterventionEventSelector_menu__kjVhB",eventItem:"InterventionEventSelector_eventItem__XC1Z4",eventItemMain:"InterventionEventSelector_eventItemMain__SYYAI",eventItemOperation:"InterventionEventSelector_eventItemOperation__3VEM8",eventItemDate:"InterventionEventSelector_eventItemDate__fAZXc",eventItemUnit:"InterventionEventSelector_eventItemUnit__GwdHJ"};e(".InterventionEventSelector_menu__kjVhB{max-height:360px;max-width:320px;min-width:240px}.InterventionEventSelector_eventItem__XC1Z4{display:flex;flex-direction:column;gap:2px;min-width:0;width:100%}.InterventionEventSelector_eventItemMain__SYYAI{align-items:baseline;display:flex;gap:12px;justify-content:space-between;min-width:0}.InterventionEventSelector_eventItemOperation__3VEM8{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.InterventionEventSelector_eventItemDate__fAZXc{color:var(--palette-primary-text-6);flex-shrink:0;font-size:12px}.InterventionEventSelector_eventItemUnit__GwdHJ{color:var(--palette-primary-text-6);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}");export{t as default};
1
+ import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var t={spacing:"8",chip:"InterventionEventSelector_chip__EbIsB",menu:"InterventionEventSelector_menu__kjVhB",eventItem:"InterventionEventSelector_eventItem__XC1Z4",eventItemMain:"InterventionEventSelector_eventItemMain__SYYAI",eventItemOperation:"InterventionEventSelector_eventItemOperation__3VEM8",eventItemDate:"InterventionEventSelector_eventItemDate__fAZXc",eventItemUnit:"InterventionEventSelector_eventItemUnit__GwdHJ"};e(".InterventionEventSelector_chip__EbIsB.InterventionEventSelector_chip__EbIsB{background:transparent;border-radius:4px;color:var(--palette-primary-text-6);font-size:12px;gap:2px;height:20px;line-height:16px;padding:2px 2px 2px 4px}.InterventionEventSelector_menu__kjVhB.InterventionEventSelector_menu__kjVhB{--corvaui-background:var(--palette-background-b-6);background:var(--palette-background-b-6);max-height:360px;max-width:320px;min-width:240px}.InterventionEventSelector_menu__kjVhB li{padding-left:0;padding-right:0}.InterventionEventSelector_menu__kjVhB .MuiListItem-root{border-radius:0;padding-left:16px;padding-right:16px}.InterventionEventSelector_menu__kjVhB .MuiListItem-root:has(.InterventionEventSelector_eventItem__XC1Z4){min-height:0;padding-bottom:8px;padding-top:8px}.InterventionEventSelector_eventItem__XC1Z4{display:flex;flex-direction:column;gap:2px;min-width:0;width:100%}.InterventionEventSelector_eventItemMain__SYYAI{align-items:baseline;display:flex;gap:12px;justify-content:space-between;min-width:0}.InterventionEventSelector_eventItemOperation__3VEM8{color:var(--palette-primary-text-1);font-size:16px;line-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.InterventionEventSelector_eventItemDate__fAZXc{color:var(--palette-primary-text-6);flex-shrink:0;font-size:12px;line-height:16px}.InterventionEventSelector_eventItemUnit__GwdHJ{color:var(--palette-primary-text-7);font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}");export{t as default};
2
2
  //# sourceMappingURL=InterventionEventSelector.scss.js.map
@@ -249,7 +249,7 @@ const validateDsn = dsn => {
249
249
 
250
250
  const MCP_SERVER_VERSION = '1.10.0';
251
251
 
252
- var version = "3.83.0-3";
252
+ var version = "3.83.0-5";
253
253
 
254
254
  const CORVA_UI_VERSION = version;
255
255
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "3.83.0-3",
3
+ "version": "3.83.0-5",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Shared components/utils for Corva ui projects",
6
6
  "repository": {
@@ -204,7 +204,7 @@
204
204
  "react-s3-uploader": "4.8.0",
205
205
  "react-sizeme": "2.5.2",
206
206
  "react-sortable-hoc": "0.6.8",
207
- "react-virtualized": "9.21.2",
207
+ "react-virtualized": "9.22.6",
208
208
  "react-virtualized-auto-sizer": "1.0.2",
209
209
  "react-window": "^2.2.7",
210
210
  "read-excel-file": "^5.8.7",