@corva/ui 0.48.0-9-test-674373bf → 0.49.0-0

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.
Files changed (46) hide show
  1. package/_virtual/_tslib.js +1 -1
  2. package/components/AssetNameLabel/styles.css.js +1 -1
  3. package/components/Chip/index.d.ts +14 -7
  4. package/components/Chip/index.d.ts.map +1 -1
  5. package/components/Chip/index.js +1 -1
  6. package/components/ColorPickerPalette/ColorPickerPalette.d.ts +17 -19
  7. package/components/ColorPickerPalette/ColorPickerPalette.d.ts.map +1 -1
  8. package/components/ColorPickerPalette/ColorPickerPalette.js +1 -1
  9. package/components/Comment/CommentIcon/index.d.ts +20 -21
  10. package/components/Comment/CommentIcon/index.d.ts.map +1 -1
  11. package/components/Comment/CommentIcon/index.js +1 -1
  12. package/components/CommentInput/index.js +1 -1
  13. package/components/DatePicker/index.d.ts +17 -19
  14. package/components/DatePicker/index.d.ts.map +1 -1
  15. package/components/DatePicker/index.js +1 -1
  16. package/components/DevCenter/AppHeader/AppHeader.css.js +1 -1
  17. package/components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js +1 -1
  18. package/components/EmptyView/EmptyView.js +1 -1
  19. package/components/Notifications/components/Toast.d.ts.map +1 -1
  20. package/components/Notifications/components/Toast.js +1 -1
  21. package/components/Notifications/components/styles.d.ts.map +1 -1
  22. package/components/Notifications/components/styles.js +1 -1
  23. package/components/OffsetWellButton/OffsetWellButton.d.ts.map +1 -1
  24. package/components/OffsetWellButton/OffsetWellButton.js +1 -1
  25. package/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
  26. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.d.ts +3 -1
  27. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.d.ts.map +1 -1
  28. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js +1 -1
  29. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.d.ts +3 -1
  30. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.d.ts.map +1 -1
  31. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  32. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  33. package/components/SwitchControl/index.d.ts +124 -2
  34. package/components/SwitchControl/index.d.ts.map +1 -1
  35. package/components/SwitchControl/index.js +1 -1
  36. package/components/Tabs/Tabs.d.ts +23 -25
  37. package/components/Tabs/Tabs.d.ts.map +1 -1
  38. package/components/Tabs/Tabs.js +1 -1
  39. package/components/TextLink/index.d.ts +33 -38
  40. package/components/TextLink/index.d.ts.map +1 -1
  41. package/components/TextLink/index.js +1 -1
  42. package/components/VirtualizedTable/VirtualizedTable.d.ts +227 -81
  43. package/components/VirtualizedTable/VirtualizedTable.d.ts.map +1 -1
  44. package/components/VirtualizedTable/VirtualizedTable.js +1 -1
  45. package/package.json +2 -2
  46. package/types.d.ts +141 -0
@@ -1 +1 @@
1
- var r=function(){return r=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},r.apply(this,arguments)};function t(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]])}return e}export{r as __assign,t as __rest};
1
+ var r=function(){return r=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},r.apply(this,arguments)};function t(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]])}return e}function e(r,t,e){if(e||2===arguments.length)for(var n,o=0,l=t.length;o<l;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return r.concat(n||Array.prototype.slice.call(t))}export{r as __assign,t as __rest,e as __spreadArray};
@@ -1 +1 @@
1
- import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var s={assetNameLabelContainer:"styles_assetNameLabelContainer__BZm9s",appMaximized:"styles_appMaximized__GAWNG",item:"styles_item__ZZ7Ie",primaryAssetLink:"styles_primaryAssetLink__nqKCI",secondaryAsset:"styles_secondaryAsset__t2-xQ",seccondaryAssetWrapper:"styles_seccondaryAssetWrapper__lqt0o",seccondaryAssetLink:"styles_seccondaryAssetLink__VIBjy"};e(".styles_assetNameLabelContainer__BZm9s{display:flex;justify-content:flex-end;margin-top:4px;position:absolute;right:15px;top:10px;width:fit-content;z-index:100}.styles_appMaximized__GAWNG{margin-right:28px}.styles_item__ZZ7Ie{background-color:#434343;border-radius:10px;color:var(--palette-primary-text-1);font-size:.85rem;line-height:20px;padding:0 12px}.dc-app-container__light-theme .styles_item__ZZ7Ie{background-color:#bdbdbd}.styles_primaryAssetLink__nqKCI{padding:0 6px}.styles_item__ZZ7Ie.styles_secondaryAsset__t2-xQ{background-color:#d860d8;line-height:20px;margin-right:4px;min-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.styles_seccondaryAssetWrapper__lqt0o{max-width:20%}.styles_seccondaryAssetLink__VIBjy{padding:0;width:100%}");export{s as default};
1
+ import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var s={assetNameLabelContainer:"styles_assetNameLabelContainer__BZm9s",appMaximized:"styles_appMaximized__GAWNG",item:"styles_item__ZZ7Ie",primaryAssetLink:"styles_primaryAssetLink__nqKCI",secondaryAsset:"styles_secondaryAsset__t2-xQ",seccondaryAssetWrapper:"styles_seccondaryAssetWrapper__lqt0o",seccondaryAssetLink:"styles_seccondaryAssetLink__VIBjy"};e(".styles_assetNameLabelContainer__BZm9s{display:flex;justify-content:flex-end;margin-top:4px;position:absolute;right:15px;top:10px;width:fit-content;z-index:100}.styles_appMaximized__GAWNG{margin-right:28px}.styles_item__ZZ7Ie{background-color:#434343;border-radius:10px;color:var(--palette-primary-text-1);font-size:.85rem;line-height:20px;padding:0 12px;white-space:nowrap}.dc-app-container__light-theme .styles_item__ZZ7Ie{background-color:#bdbdbd}.styles_primaryAssetLink__nqKCI{padding:0 6px}.styles_item__ZZ7Ie.styles_secondaryAsset__t2-xQ{background-color:#d860d8;line-height:20px;margin-right:4px;min-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.styles_seccondaryAssetWrapper__lqt0o{max-width:20%}.styles_seccondaryAssetLink__VIBjy{padding:0;width:100%}");export{s as default};
@@ -1,14 +1,21 @@
1
- export default Chip;
2
- declare function Chip(props: any): JSX.Element;
3
- declare namespace Chip {
4
- const propTypes: {
1
+ import { ChipProps as MuiChipProps } from '@material-ui/core';
2
+ import PropTypes from 'prop-types';
3
+ interface ChipProps extends MuiChipProps, PropTypes.InferProps<typeof chipPropTypes> {
4
+ }
5
+ declare const Chip: {
6
+ (props: ChipProps): JSX.Element;
7
+ propTypes: {
5
8
  checked: PropTypes.Requireable<boolean>;
6
9
  'data-testid': PropTypes.Requireable<string>;
7
10
  };
8
- const defaultProps: {
11
+ defaultProps: {
9
12
  checked: boolean;
10
13
  'data-testid': string;
11
14
  };
12
- }
13
- import PropTypes from "prop-types";
15
+ };
16
+ declare const chipPropTypes: {
17
+ checked: PropTypes.Requireable<boolean>;
18
+ 'data-testid': PropTypes.Requireable<string>;
19
+ };
20
+ export default Chip;
14
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.js"],"names":[],"mappings":";AAwDA,+CAkBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,SAAS,MAAM,YAAY,CAAC;AAuDnC,UAAU,SAAU,SAAQ,YAAY,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC;CAAG;AAEvF,QAAA,MAAM,IAAI;YAAW,SAAS,GAAG,WAAW;;;;;;;;;CAkB3C,CAAC;AAEF,QAAA,MAAM,aAAa;;;CAGlB,CAAC;AASF,eAAe,IAAI,CAAC"}
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import{makeStyles as e,Chip as i}from"@material-ui/core";import r from"prop-types";import a from"classnames";import{jsx as o}from"react/jsx-runtime";function n(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function c(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?n(Object(r),!0).forEach((function(i){t(e,i,r[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l=function(t){var e=t.width,i=void 0===e?18:e,r=t.height,a=void 0===r?14:r,o=t.fill.replace("#","%23");return"<svg width='".concat(i,"' height='").concat(a,"' viewBox='0 0 18 14' fill='").concat(o,"' xmlns='http://www.w3.org/2000/svg'><path d='M6 11.1698L1.83 6.99984L0.410004 8.40984L6 13.9998L18 1.99984L16.59 0.589844L6 11.1698Z'/></svg>")},p=e((function(t){return{checked:{"&::before":{content:'url("data:image/svg+xml; utf8, '.concat(l({fill:t.palette.primary.main}),'")'),display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,lineHeight:"24px",marginLeft:8,marginRight:"-4px",paddingTop:3},"&.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(l({fill:t.palette.primary.text8}),'")')},"&.MuiChip-sizeSmall::before":{content:'url("data:image/svg+xml; utf8, '.concat(l({width:12,fill:t.palette.primary.main}),'")'),width:16,height:16},"&.MuiChip-sizeSmall.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(l({width:12,fill:t.palette.primary.text8}),'")')},"&.MuiChip-root.MuiChip-clickable":{"& .MuiChip-label, & .MuiChip-deleteIcon, & .MuiChip-icon":{color:"#FFFFFF"}},"& .MuiChip-label:first-child":{marginLeft:"-4px"}}}})),s=function(t){var e=t.checked,r=t.classes,n=void 0===r?{}:r,l=t["data-testid"],s=p();return o(i,e?c(c({"data-testid":l},t),{},{classes:c(c({},n),{},{root:a(n.root,s.checked)})}):c({"data-testid":l},t))};s.propTypes={checked:r.bool,"data-testid":r.string},s.defaultProps={checked:!1,"data-testid":"Chip"};export{s as default};
1
+ import{__assign as t}from"../../_virtual/_tslib.js";import{jsx as i}from"react/jsx-runtime";import{makeStyles as e,Chip as a}from"@material-ui/core";import r from"prop-types";import l from"classnames";var o=function(t){var i=t.width,e=void 0===i?18:i,a=t.height,r=void 0===a?14:a,l=t.fill.replace("#","%23");return"<svg width='".concat(e,"' height='").concat(r,"' viewBox='0 0 18 14' fill='").concat(l,"' xmlns='http://www.w3.org/2000/svg'><path d='M6 11.1698L1.83 6.99984L0.410004 8.40984L6 13.9998L18 1.99984L16.59 0.589844L6 11.1698Z'/></svg>")},c=e((function(t){return{checked:{"&::before":{content:'url("data:image/svg+xml; utf8, '.concat(o({fill:t.palette.primary.main}),'")'),display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,lineHeight:"24px",marginLeft:8,marginRight:"-4px",paddingTop:3},"&.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(o({fill:t.palette.primary.text8}),'")')},"&.MuiChip-sizeSmall::before":{content:'url("data:image/svg+xml; utf8, '.concat(o({width:12,fill:t.palette.primary.main}),'")'),width:16,height:16},"&.MuiChip-sizeSmall.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(o({width:12,fill:t.palette.primary.text8}),'")')},"&.MuiChip-root.MuiChip-clickable":{"& .MuiChip-label, & .MuiChip-deleteIcon, & .MuiChip-icon":{color:"#FFFFFF"}},"& .MuiChip-label:first-child":{marginLeft:"-4px"}}}})),n=function(e){var r=e.checked,o=e.classes,n=void 0===o?{}:o,d=e["data-testid"],p=c();return i(a,r?t({"data-testid":d},e,{classes:t(t({},n),{root:l(n.root,p.checked)})}):t({"data-testid":d},e))},d={checked:r.bool,"data-testid":r.string};n.propTypes=d,n.defaultProps={checked:!1,"data-testid":"Chip"};export{n as default};
@@ -1,21 +1,19 @@
1
- declare const _default: import("react").ComponentType<Pick<Pick<{
2
- color: any;
3
- onChange: any;
4
- anchorEl: any;
5
- handleClose: any;
6
- converter: any;
7
- popoverAnchorOrigin: any;
8
- popoverTransformOrigin: any;
9
- pickerComponent: any;
10
- classes: any;
11
- enableTransparencyPalette: any;
12
- }, "classes" | "color" | "onChange" | "handleClose"> & {
13
- anchorEl?: any;
14
- enableTransparencyPalette?: any;
15
- converter?: any;
16
- popoverAnchorOrigin?: any;
17
- popoverTransformOrigin?: any;
18
- pickerComponent?: any;
19
- } & {}, "color" | "onChange" | "anchorEl" | "handleClose" | "enableTransparencyPalette" | "converter" | "popoverAnchorOrigin" | "popoverTransformOrigin" | "pickerComponent"> & import("@material-ui/core").StyledComponentProps<"root" | "popper" | "rightLabel" | "topLabel">>;
1
+ import { ElementType } from 'react';
2
+ import { PopoverOrigin } from '@material-ui/core';
3
+ declare type ColorPickerPaletteProps = {
4
+ color: string;
5
+ onChange: (convertedColor: string) => void;
6
+ handleClose: () => void;
7
+ anchorEl?: null | Element | ((element: Element) => Element);
8
+ converter?: string;
9
+ popoverAnchorOrigin?: PopoverOrigin;
10
+ popoverTransformOrigin?: PopoverOrigin;
11
+ pickerComponent?: ElementType;
12
+ classes?: {
13
+ root: string;
14
+ };
15
+ enableTransparencyPalette?: boolean;
16
+ };
17
+ declare const _default: import("react").ComponentType<Pick<ColorPickerPaletteProps, "color" | "onChange" | "anchorEl" | "handleClose" | "enableTransparencyPalette" | "converter" | "popoverAnchorOrigin" | "popoverTransformOrigin" | "pickerComponent"> & import("@material-ui/core").StyledComponentProps<"root" | "popper" | "rightLabel" | "topLabel">>;
20
18
  export default _default;
21
19
  //# sourceMappingURL=ColorPickerPalette.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPickerPalette.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPickerPalette/ColorPickerPalette.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ColorPickerPalette.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPickerPalette/ColorPickerPalette.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAuC,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAYvF,aAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,IAAI,GAAG,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC,sBAAsB,CAAC,EAAE,aAAa,CAAC;IACvC,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;KAAE,CAAA;IAC3B,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAA;;AAgED,wBAoBuB"}
@@ -1 +1 @@
1
- import{useRef as r}from"react";import{withStyles as o,Popover as e}from"@material-ui/core";import n from"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import{jsx as t}from"react/jsx-runtime";var a={rgba:function(r){return"rgba(".concat(r.rgb.r,", ").concat(r.rgb.g,", ").concat(r.rgb.b,", ").concat(r.rgb.a,")")},rgb:function(r){return"rgb(".concat(r.rgb.r,", ").concat(r.rgb.g,", ").concat(r.rgb.b,")")},hex:function(r){return r.hex},rgba_rgb:function(r){return 1===r.rgb.a?a.rgb(r):a.rgba(r)},rgba_hex:function(r){return 1===r.rgb.a?a.hex(r):a.rgba(r)}},i=function(o){var n=o.color,i=o.onChange,c=o.anchorEl,l=o.handleClose,p=o.converter,g=o.popoverAnchorOrigin,b=o.popoverTransformOrigin,h=o.pickerComponent,f=o.classes,m=o.enableTransparencyPalette,u=r();return t("div",{className:f.root,children:t(e,{id:"colors-popper",action:u,open:Boolean(c),anchorEl:c,onClose:l,anchorOrigin:g,transformOrigin:b,children:t(h,{color:n,onChange:function(r){var o=a[p](r);i(o)},onSizeChange:function(){u.current&&u.current.updatePosition()},enableTransparencyPalette:m})})})};i.defaultProps={converter:"rgba_hex",pickerComponent:n,popoverAnchorOrigin:{vertical:"bottom",horizontal:"left"},popoverTransformOrigin:{vertical:"top",horizontal:"left"},enableTransparencyPalette:!1,anchorEl:null};var c=o({root:{position:"relative",display:"flex"},popper:{zIndex:1500},topLabel:{marginBottom:"8px",fontSize:"15px",lineHeight:"17px",letterSpacing:"0.4px",color:"#BDBDBD",whiteSpace:"nowrap"},rightLabel:{marginLeft:"8px",fontSize:"16px"}})(i);export{c as default};
1
+ import{__assign as r}from"../../_virtual/_tslib.js";import{jsx as o}from"react/jsx-runtime";import{useRef as e}from"react";import{withStyles as n,Popover as t}from"@material-ui/core";import a from"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";var i={rgba:function(r){return"rgba(".concat(r.rgb.r,", ").concat(r.rgb.g,", ").concat(r.rgb.b,", ").concat(r.rgb.a,")")},rgb:function(r){return"rgb(".concat(r.rgb.r,", ").concat(r.rgb.g,", ").concat(r.rgb.b,")")},hex:function(r){return r.hex},rgba_rgb:function(r){return 1===r.rgb.a?i.rgb(r):i.rgba(r)},rgba_hex:function(r){return 1===r.rgb.a?i.hex(r):i.rgba(r)}},c=function(n){var a=n.color,c=n.onChange,l=n.anchorEl,p=n.handleClose,g=n.converter,b=n.popoverAnchorOrigin,f=n.popoverTransformOrigin,h=n.pickerComponent,m=n.classes,s=n.enableTransparencyPalette,u=e();return o("div",r({className:m.root},{children:o(t,r({id:"colors-popper",action:u,open:Boolean(l),anchorEl:l,onClose:p,anchorOrigin:b,transformOrigin:f},{children:o(h,{color:a,onChange:function(r){var o=i[g](r);c(o)},onSizeChange:function(){u.current&&u.current.updatePosition()},enableTransparencyPalette:s})}))}))};c.defaultProps={converter:"rgba_hex",pickerComponent:a,popoverAnchorOrigin:{vertical:"bottom",horizontal:"left"},popoverTransformOrigin:{vertical:"top",horizontal:"left"},enableTransparencyPalette:!1,anchorEl:null};var l=n({root:{position:"relative",display:"flex"},popper:{zIndex:1500},topLabel:{marginBottom:"8px",fontSize:"15px",lineHeight:"17px",letterSpacing:"0.4px",color:"#BDBDBD",whiteSpace:"nowrap"},rightLabel:{marginLeft:"8px",fontSize:"16px"}})(c);export{l as default};
@@ -1,23 +1,22 @@
1
+ import PropTypes from 'prop-types';
2
+ declare type CommentIconProps = PropTypes.InferProps<typeof commentIconProps>;
3
+ declare const CommentIcon: {
4
+ ({ displayName, imgSrc, size }: CommentIconProps): JSX.Element;
5
+ propTypes: {
6
+ displayName: PropTypes.Requireable<string>;
7
+ imgSrc: PropTypes.Requireable<string>;
8
+ size: PropTypes.Requireable<number>;
9
+ };
10
+ defaultProps: {
11
+ displayName: string;
12
+ imgSrc: any;
13
+ size: number;
14
+ };
15
+ };
16
+ declare const commentIconProps: {
17
+ displayName: PropTypes.Requireable<string>;
18
+ imgSrc: PropTypes.Requireable<string>;
19
+ size: PropTypes.Requireable<number>;
20
+ };
1
21
  export default CommentIcon;
2
- declare function CommentIcon({ displayName, imgSrc, size }: {
3
- displayName: any;
4
- imgSrc: any;
5
- size: any;
6
- }): JSX.Element;
7
- declare namespace CommentIcon {
8
- namespace propTypes {
9
- const displayName: PropTypes.Requireable<string>;
10
- const imgSrc: PropTypes.Requireable<string>;
11
- const size: PropTypes.Requireable<number>;
12
- }
13
- namespace defaultProps {
14
- const displayName_1: boolean;
15
- export { displayName_1 as displayName };
16
- const imgSrc_1: any;
17
- export { imgSrc_1 as imgSrc };
18
- const size_1: number;
19
- export { size_1 as size };
20
- }
21
- }
22
- import PropTypes from "prop-types";
23
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Comment/CommentIcon/index.js"],"names":[],"mappings":";AAiCA;;;;gBAYC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Comment/CommentIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAiCnC,aAAK,gBAAgB,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEtE,QAAA,MAAM,WAAW;oCAAmC,gBAAgB,GAAG,WAAW;;;;;;;;;;;CAYjF,CAAC;AAEF,QAAA,MAAM,gBAAgB;;;;CAIrB,CAAC;AAUF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- import t from"prop-types";import{makeStyles as i,Tooltip as r,IconButton as e,Badge as o}from"@material-ui/core";import a from"../../Avatar/index.js";import p from"./BadgeIcon.js";import{jsx as s}from"react/jsx-runtime";var l=i((function(t){return{icon:{padding:0,"&:hover":{"& .MuiBadge-root .MuiBadge-badge svg path":{"&:first-of-type":{fill:t.palette.primary.light}},"& .MuiAvatar-root":{outline:"1px solid ".concat(t.palette.primary.light)}},marginTop:4},badge:{top:2,right:6,"&:hover":{"& svg path":{"&:first-of-type":{fill:t.palette.primary.light}}}},tooltip:{marginTop:8}}})),m=function(t){var i=t.displayName,m=t.imgSrc,n=t.size,g=l();return s(r,{title:"Comment",placement:"bottom",classes:{tooltip:g.tooltip},children:s(e,{classes:{root:g.icon},children:s(o,{classes:{badge:g.badge},badgeContent:s(p,{}),children:s(a,{displayName:i,size:n,imgSrc:m})})})})};m.propTypes={displayName:t.string,imgSrc:t.string,size:t.number},m.defaultProps={displayName:!1,imgSrc:void 0,size:24};export{m as default};
1
+ import{__assign as t}from"../../../_virtual/_tslib.js";import{jsx as i}from"react/jsx-runtime";import r from"prop-types";import{makeStyles as e,Tooltip as o,IconButton as a,Badge as p}from"@material-ui/core";import s from"../../Avatar/index.js";import l from"./BadgeIcon.js";var m=e((function(t){return{icon:{padding:0,"&:hover":{"& .MuiBadge-root .MuiBadge-badge svg path":{"&:first-of-type":{fill:t.palette.primary.light}},"& .MuiAvatar-root":{outline:"1px solid ".concat(t.palette.primary.light)}},marginTop:4},badge:{top:2,right:6,"&:hover":{"& svg path":{"&:first-of-type":{fill:t.palette.primary.light}}}},tooltip:{marginTop:8}}})),n=function(r){var e=r.displayName,n=r.imgSrc,g=r.size,d=m();return i(o,t({title:"Comment",placement:"bottom",classes:{tooltip:d.tooltip}},{children:i(a,t({classes:{root:d.icon}},{children:i(p,t({classes:{badge:d.badge},badgeContent:i(l,{})},{children:i(s,{displayName:e,size:g,imgSrc:n})}))}))}))},g={displayName:r.string,imgSrc:r.string,size:r.number};n.propTypes=g,n.defaultProps={displayName:"",imgSrc:void 0,size:24};export{n as default};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import i from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import{PureComponent as c}from"react";import m from"prop-types";import p from"lodash/noop";import{withStyles as u}from"@material-ui/core/styles";import d from"classnames";import{get as h}from"lodash";import{Paper as f,TextField as g,InputAdornment as C,Tooltip as b,Typography as I}from"@material-ui/core";import v from"@material-ui/core/colors/grey";import x from"../Avatar/index.js";import y from"../FileUploadIconButton.js";import F from"../EmojiIconButton.js";import S from"../FailedFileUploading.js";import E from"../UserMention/index.js";import U from"../FilePreview/index.js";import N from"../IconButton/index.js";import k from"../Icons/SendIcon.js";import{isSuggestionsListOpened as A}from"../UserMention/utils/index.js";import M from"../../utils/main.js";import{isNativeDetected as R}from"../../utils/mobileDetect.js";import{notifyCommentEdit as j,notifyCommentPost as B}from"../../utils/nativeMessages.js";import{patchFeedItemComment as w}from"../../clients/jsonApi/index.js";import T from"./styles.css.js";import{jsxs as L,jsx as P}from"react/jsx-runtime";function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var i=r(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return a(this,n)}}var D={chatAvatarWrapper:{display:"flex",alignItems:"center",position:"absolute",left:0,height:32},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},_=function(a){i(m,c);var r=z(m);function m(n){var i,a,c;return e(this,m),i=r.call(this,n),s(o(i),"handleSelectEmoji",(function(t){return i.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),s(o(i),"postComment",(a=t(l.mark((function t(e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),s(o(i),"patchComment",(c=t(l.mark((function t(e){var n,o,a,r;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.props,o=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,w(o,a,e);case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return c.apply(this,arguments)})),s(o(i),"clearCommentField",(function(t){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){i.focusOnRef(),t&&"function"==typeof t&&t()}))})),s(o(i),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&i.props.exitEditMode(),"Enter"===e&&(A()||(t.preventDefault(),i.handleSendComment()))})),s(o(i),"handleAttachmentLoadingError",(function(t){i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),s(o(i),"handleFileUpload",(function(t,e,n){i.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),s(o(i),"handleNativeFileUpload",(function(){var t=i.state.comment;i.isEditMode?(j(t),i.clearCommentField(i.props.exitEditMode)):(B(t),i.clearCommentField())})),s(o(i),"handleFileDelete",(function(){return i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),s(o(i),"handleSendComment",t(l.mark((function t(){var e,n,o;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=i.state.comment?i.state.comment.trim():null)||i.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:i.state.attachmentUrl,size:i.state.attachmentSize,file_name:i.state.attachmentName}}},!i.isEditMode){t.next=16;break}return i.props.setIsEditting(!0),t.next=8,i.patchComment(n);case 8:return o=t.sent,t.next=11,i.props.patchCommentCallback(o);case 11:i.props.setIsEditting(!1),i.clearCommentField(),i.props.exitEditMode(),t.next=24;break;case 16:return i.props.setIsPosting(!0),t.next=19,i.postComment(n);case 19:return o=t.sent,t.next=22,i.props.postCommentCallback(o);case 22:i.props.setIsPosting(!1),i.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),s(o(i),"handleCancelClick",(function(){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},i.props.exitEditMode())})),i.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null,isInputFocused:!1},i}return n(m,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?this.props.editAttachment.file_name||M.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.size:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t,e=this,n=this.props,o=n.classes,i=n.currentUser,a="".concat(h(i,["attributes","first_name"])||h(i,"first_name")," ").concat(h(i,["attributes","last_name"])||h(i,"last_name"));return L("div",{style:this.props.spaceAround?D.commentTextFieldContainerSpaceAround:D.commentTextFieldContainer,children:[P("div",{style:D.chatAvatarWrapper,children:P(x,{displayName:a,size:32,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),P(f,{className:this.props.classes.paperRoot,children:P(g,{"data-testid":"".concat("commentInput","_input"),placeholder:"Type here",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:E,inputProps:{onChange:function(t){return e.setState({comment:t})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled,onFocus:function(){return e.setState({isInputFocused:!0})},onBlur:function(){return e.setState({isInputFocused:!1})},allowSuggestionsAboveCursor:!0},endAdornment:!this.props.isNative&&L(C,{position:"end",className:this.props.classes.inputAdornment,children:[!this.state.attachmentUrl&&P(b,{title:"Attach File",placement:"bottom",classes:{tooltip:o.iconTooltip},children:P("div",{className:d(T.cCommentInputIconContainer,T.cCommentInputIconUpload),children:P(y,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],inputId:"comment-attachment-".concat(this.props.editCommentId||this.props.parentId)})})}),P(b,{title:"Add Emoji",placement:"bottom",classes:{tooltip:o.iconTooltip},children:P("div",{className:T.cCommentInputIconContainer,children:P(F,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],disableRipple:!0})})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&P(S,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&P(U,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),(this.state.isInputFocused||this.state.attachmentUrl||this.state.comment||this.props.editComment||(null===(t=this.props.editAttachment)||void 0===t?void 0:t.url))&&L("div",{className:T.cCommentInputSendContainer,children:[P("div",{className:T.cCommentInputSendContainerCancel,children:P(I,{"data-testid":"".concat("commentInput","_cancel"),variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.handleCancelClick,children:"Cancel"})}),L("div",{className:T.cCommentInputSendContainerSend,children:[L(I,{variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",P(I,{variant:"caption",color:"primary",className:d(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),P(N,{size:"large",tooltipProps:{title:"Send"},"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,classes:{root:this.props.classes.sendButton},children:P(k,{})})]})]})]})}}]),m}();_.propTypes={inputRef:m.shape({current:m.shape({focus:m.shape({})})}),editFeedItemId:m.number,editCommentId:m.number,editComment:m.string,editAttachment:m.shape({url:m.string,size:m.number,file_name:m.string}),spaceAround:m.bool,postComment:m.func.isRequired,postCommentCallback:m.func,patchCommentCallback:m.func,exitEditMode:m.func,setIsPosting:m.func,setIsEditting:m.func,onMount:m.func,autoFocus:m.bool,disabled:m.bool,classes:m.shape({}).isRequired,currentUser:m.shape(),isNative:m.bool,companyId:m.number,parentId:m.string},_.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,parentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:p,setIsEditting:p,onMount:p,autoFocus:void 0,disabled:!1,patchCommentCallback:p,postCommentCallback:p,exitEditMode:p,companyId:null,currentUser:{},isNative:R};var O=u((function(t){return{paperRoot:{width:"calc(100% - 48px)",marginLeft:48,display:"inline-block",height:32,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none",background:"#4D4D4D"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:32,paddingRight:"8px",lineHeight:"29px",paddingLeft:"8px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"6px"},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:"11px",color:t.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconTooltip:{marginTop:"3px"},sendButton:{"&:hover":{backgroundColor:"rgba(3,188,212, 0.1)"},"&.MuiButtonBase-root":{padding:7}},inputAdornment:{marginBottom:"0!important",height:"100%"}}}))(_);export{O as default};
1
+ import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import i from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import{PureComponent as c}from"react";import m from"prop-types";import p from"lodash/noop";import{withStyles as u}from"@material-ui/core/styles";import{Paper as d,TextField as h,InputAdornment as f,Tooltip as g,Collapse as C,Typography as b}from"@material-ui/core";import I from"classnames";import{get as v}from"lodash";import x from"@material-ui/core/colors/grey";import y from"../Avatar/index.js";import E from"../FileUploadIconButton.js";import F from"../EmojiIconButton.js";import S from"../FailedFileUploading.js";import U from"../UserMention/index.js";import N from"../FilePreview/index.js";import k from"../IconButton/index.js";import A from"../Icons/SendIcon.js";import{isSuggestionsListOpened as M}from"../UserMention/utils/index.js";import R from"../../utils/main.js";import{isNativeDetected as j}from"../../utils/mobileDetect.js";import{notifyCommentEdit as B,notifyCommentPost as w}from"../../utils/nativeMessages.js";import{patchFeedItemComment as T}from"../../clients/jsonApi/index.js";import L from"./styles.css.js";import{jsxs as P,jsx as z}from"react/jsx-runtime";function D(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var i=r(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return a(this,n)}}var _={chatAvatarWrapper:{display:"flex",alignItems:"center",position:"absolute",left:0,height:32},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},O=function(a){i(m,c);var r=D(m);function m(n){var i,a,c;return e(this,m),i=r.call(this,n),s(o(i),"handleSelectEmoji",(function(t){return i.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),s(o(i),"postComment",(a=t(l.mark((function t(e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),s(o(i),"patchComment",(c=t(l.mark((function t(e){var n,o,a,r;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.props,o=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,T(o,a,e);case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return c.apply(this,arguments)})),s(o(i),"clearCommentField",(function(t){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){i.focusOnRef(),t&&"function"==typeof t&&t()}))})),s(o(i),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&i.props.exitEditMode(),"Enter"===e&&(M()||(t.preventDefault(),i.handleSendComment()))})),s(o(i),"handleAttachmentLoadingError",(function(t){i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),s(o(i),"handleFileUpload",(function(t,e,n){i.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),s(o(i),"handleNativeFileUpload",(function(){var t=i.state.comment;i.isEditMode?(B(t),i.clearCommentField(i.props.exitEditMode)):(w(t),i.clearCommentField())})),s(o(i),"handleFileDelete",(function(){return i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),s(o(i),"handleSendComment",t(l.mark((function t(){var e,n,o;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=i.state.comment?i.state.comment.trim():null)||i.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:i.state.attachmentUrl,size:i.state.attachmentSize,file_name:i.state.attachmentName}}},!i.isEditMode){t.next=16;break}return i.props.setIsEditting(!0),t.next=8,i.patchComment(n);case 8:return o=t.sent,t.next=11,i.props.patchCommentCallback(o);case 11:i.props.setIsEditting(!1),i.clearCommentField(),i.props.exitEditMode(),t.next=24;break;case 16:return i.props.setIsPosting(!0),t.next=19,i.postComment(n);case 19:return o=t.sent,t.next=22,i.props.postCommentCallback(o);case 22:i.props.setIsPosting(!1),i.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),s(o(i),"handleCancelClick",(function(){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},i.props.exitEditMode())})),i.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null,isInputFocused:!1},i}return n(m,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?this.props.editAttachment.file_name||R.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.size:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t,e=this,n=this.props,o=n.classes,i=n.currentUser,a="".concat(v(i,["attributes","first_name"])||v(i,"first_name")," ").concat(v(i,["attributes","last_name"])||v(i,"last_name")),r=this.state.isInputFocused||this.state.attachmentUrl||this.state.comment||this.props.editComment||(null===(t=this.props.editAttachment)||void 0===t?void 0:t.url);return P("div",{style:this.props.spaceAround?_.commentTextFieldContainerSpaceAround:_.commentTextFieldContainer,children:[z("div",{style:_.chatAvatarWrapper,children:z(y,{displayName:a,size:32,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),z(d,{className:this.props.classes.paperRoot,children:z(h,{"data-testid":"".concat("commentInput","_input"),placeholder:"Type here",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:U,inputProps:{onChange:function(t){return e.setState({comment:t})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled,onFocus:function(){return e.setState({isInputFocused:!0})},onBlur:function(){return e.setState({isInputFocused:!1})},allowSuggestionsAboveCursor:!0},endAdornment:!this.props.isNative&&P(f,{position:"end",className:this.props.classes.inputAdornment,children:[!this.state.attachmentUrl&&z(g,{title:"Attach File",placement:"bottom",classes:{tooltip:o.iconTooltip},children:z("div",{className:I(L.cCommentInputIconContainer,L.cCommentInputIconUpload),children:z(E,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:x[400],inputId:"comment-attachment-".concat(this.props.editCommentId||this.props.parentId)})})}),z(g,{title:"Add Emoji",placement:"bottom",classes:{tooltip:o.iconTooltip},children:z("div",{className:L.cCommentInputIconContainer,children:z(F,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:x[400],disableRipple:!0})})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&z(S,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&z(N,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),z(C,{in:r,mountOnEnter:!0,unmountOnExit:!0,children:P("div",{className:L.cCommentInputSendContainer,children:[z("div",{className:L.cCommentInputSendContainerCancel,children:z(b,{"data-testid":"".concat("commentInput","_cancel"),variant:"caption",className:I(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.handleCancelClick,children:"Cancel"})}),P("div",{className:L.cCommentInputSendContainerSend,children:[P(b,{variant:"caption",className:I(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",z(b,{variant:"caption",color:"primary",className:I(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),z(k,{size:"large",tooltipProps:{title:"Send"},"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,classes:{root:this.props.classes.sendButton},children:z(A,{})})]})]})})]})}}]),m}();O.propTypes={inputRef:m.shape({current:m.shape({focus:m.shape({})})}),editFeedItemId:m.number,editCommentId:m.number,editComment:m.string,editAttachment:m.shape({url:m.string,size:m.number,file_name:m.string}),spaceAround:m.bool,postComment:m.func.isRequired,postCommentCallback:m.func,patchCommentCallback:m.func,exitEditMode:m.func,setIsPosting:m.func,setIsEditting:m.func,onMount:m.func,autoFocus:m.bool,disabled:m.bool,classes:m.shape({}).isRequired,currentUser:m.shape(),isNative:m.bool,companyId:m.number,parentId:m.string},O.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,parentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:p,setIsEditting:p,onMount:p,autoFocus:void 0,disabled:!1,patchCommentCallback:p,postCommentCallback:p,exitEditMode:p,companyId:null,currentUser:{},isNative:j};var H=u((function(t){return{paperRoot:{width:"calc(100% - 48px)",marginLeft:48,display:"inline-block",height:32,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none",background:"#4D4D4D"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:32,paddingRight:"8px",lineHeight:"29px",paddingLeft:"8px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"6px"},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:"11px",color:t.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconTooltip:{marginTop:"3px"},sendButton:{"&:hover":{backgroundColor:"rgba(3,188,212, 0.1)"},"&.MuiButtonBase-root":{padding:7}},inputAdornment:{marginBottom:"0!important",height:"100%"}}}))(O);export{H as default};
@@ -1,22 +1,20 @@
1
- export default DatePicker;
2
- declare function DatePicker({ className, PopoverProps, ...otherProps }: {
3
- [x: string]: any;
4
- className: any;
5
- PopoverProps: any;
6
- }): JSX.Element;
7
- declare namespace DatePicker {
8
- namespace propTypes {
9
- const PopoverProps: PropTypes.Requireable<PropTypes.InferProps<{
1
+ import PropTypes from 'prop-types';
2
+ import { KeyboardDatePickerProps } from '@material-ui/pickers';
3
+ interface DatePickerProps extends KeyboardDatePickerProps {
4
+ className: string;
5
+ }
6
+ declare const DatePicker: {
7
+ ({ className, PopoverProps, ...otherProps }: DatePickerProps): JSX.Element;
8
+ propTypes: {
9
+ PopoverProps: PropTypes.Requireable<PropTypes.InferProps<{
10
10
  className: PropTypes.Requireable<string>;
11
11
  }>>;
12
- const className: PropTypes.Requireable<string>;
13
- }
14
- namespace defaultProps {
15
- const PopoverProps_1: {};
16
- export { PopoverProps_1 as PopoverProps };
17
- const className_1: string;
18
- export { className_1 as className };
19
- }
20
- }
21
- import PropTypes from "prop-types";
12
+ className: PropTypes.Requireable<string>;
13
+ };
14
+ defaultProps: {
15
+ PopoverProps: {};
16
+ className: string;
17
+ };
18
+ };
19
+ export default DatePicker;
22
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/index.js"],"names":[],"mappings":";AAgCA;;;;gBAmBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAsB,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AA6BnF,UAAU,eAAgB,SAAQ,uBAAuB;IACvD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,UAAU;iDAAgD,eAAe,GAAG,WAAW;;;;;;;;;;;CAmB5F,CAAA;AAcD,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/objectWithoutProperties";import t from"classnames";import o from"prop-types";import{KeyboardDatePicker as a}from"@material-ui/pickers";import{makeStyles as i}from"@material-ui/core";import{Event as p}from"@material-ui/icons";import n from"moment";import{DATE_FORMAT as m}from"../../constants/dateTimeFormat.js";import{jsx as s}from"react/jsx-runtime";var c=["className","PopoverProps"];function l(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function u(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var f=i((function(r){return{dateTimePickerInput:{width:"100%",paddingBottom:8,"& .MuiFormLabel-root.Mui-focused":{color:r.palette.primary.main},"& .MuiInput-root.Mui-focused .MuiIconButton-root":{color:r.palette.primary.main},"& .MuiIconButton-root":{marginRight:-7,padding:7},"& .MuiSvgIcon-root":{fill:"".concat(r.palette.primary.text6," !important")}},paper:{marginTop:8}}}));function b(r){var o=r.className,i=r.PopoverProps,l=e(r,c),b=f();return s(a,u(u({disableToolbar:!0,variant:"inline",keyboardIcon:s(p,{}),format:m,placeholder:n().format(m),refuse:/[^(\w|\d)]+/gi},l),{},{PopoverProps:u({className:t(b.paper,i.className)},i),className:t(b.dateTimePickerInput,o)}))}b.propTypes={PopoverProps:o.shape({className:o.string}),className:o.string},b.defaultProps={PopoverProps:{},className:""};export{b as default};
1
+ import{__rest as o,__assign as r}from"../../_virtual/_tslib.js";import{jsx as t}from"react/jsx-runtime";import a from"classnames";import e from"prop-types";import{KeyboardDatePicker as i}from"@material-ui/pickers";import{makeStyles as m}from"@material-ui/core";import{Event as p}from"@material-ui/icons";import s from"moment";import{DATE_FORMAT as n}from"../../constants/dateTimeFormat.js";var c=m((function(o){return{dateTimePickerInput:{width:"100%",paddingBottom:8,"& .MuiFormLabel-root.Mui-focused":{color:o.palette.primary.main},"& .MuiInput-root.Mui-focused .MuiIconButton-root":{color:o.palette.primary.main},"& .MuiIconButton-root":{marginRight:-7,padding:7},"& .MuiSvgIcon-root":{fill:"".concat(o.palette.primary.text6," !important")}},paper:{marginTop:8}}})),l=function(e){var m=e.className,l=e.PopoverProps,u=o(e,["className","PopoverProps"]),f=c();return t(i,r({disableToolbar:!0,variant:"inline",keyboardIcon:t(p,{}),format:n,placeholder:s().format(n),refuse:/[^(\w|\d)]+/gi},u,{PopoverProps:r({className:a(f.paper,l.className)},l),className:a(f.dateTimePickerInput,m)}))};l.propTypes={PopoverProps:e.shape({className:e.string}),className:e.string},l.defaultProps={PopoverProps:{},className:""};export{l as default};
@@ -1 +1 @@
1
- import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var d={padModeSelect:"AppHeader_padModeSelect__CP-Ia",smallPadModeSelect:"AppHeader_smallPadModeSelect__a5Xo6",mediumSizeContent:"AppHeader_mediumSizeContent__xb-Wo",headerChildren:"AppHeader_headerChildren__HJCQq",controlsContainer:"AppHeader_controlsContainer__aX0s9",appMaximized:"AppHeader_appMaximized__lT1ld",item:"AppHeader_item__uDz5N",secondaryAsset:"AppHeader_secondaryAsset__AoPAz",seccondaryAssetWrapper:"AppHeader_seccondaryAssetWrapper__OGaNa",seccondaryAssetLink:"AppHeader_seccondaryAssetLink__fZb2u"};e(".AppHeader_padModeSelect__CP-Ia{height:24px;z-index:999}.AppHeader_padModeSelect__CP-Ia>div:first-child{padding-top:0!important}.AppHeader_smallPadModeSelect__a5Xo6{height:24px;margin-top:8px}.AppHeader_smallPadModeSelect__a5Xo6>div:first-child{padding-bottom:0;padding-left:0;padding-top:8px}.AppHeader_mediumSizeContent__xb-Wo{justify-content:flex-start;margin-top:8px}.AppHeader_mediumSizeContent__xb-Wo .AppHeader_headerChildren__HJCQq{padding:0}.AppHeader_headerChildren__HJCQq{display:flex;padding:0 0 12px 16px}.AppHeader_headerChildren__HJCQq,.AppHeader_headerChildren__HJCQq>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AppHeader_controlsContainer__aX0s9{align-items:center;display:flex;justify-content:flex-end;margin-top:4px;position:absolute;right:15px;top:10px;width:100%;z-index:100}.AppHeader_controlsContainer__aX0s9>:not(:last-child){padding:0 16px}.AppHeader_appMaximized__lT1ld{margin-right:28px}.AppHeader_item__uDz5N{background-color:#434343;border-radius:10px;color:var(--palette-primary-text-1);font-size:.85rem;line-height:20px;padding:0 12px}.dc-app-container__light-theme .AppHeader_item__uDz5N{background-color:#bdbdbd}.AppHeader_item__uDz5N.AppHeader_secondaryAsset__AoPAz{background-color:#d860d8;line-height:20px;margin-right:4px;min-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AppHeader_seccondaryAssetWrapper__OGaNa{max-width:20%}.AppHeader_seccondaryAssetLink__fZb2u{padding:0;width:100%}");export{d as default};
1
+ import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var d={padModeSelect:"AppHeader_padModeSelect__CP-Ia",smallPadModeSelect:"AppHeader_smallPadModeSelect__a5Xo6",mediumSizeContent:"AppHeader_mediumSizeContent__xb-Wo",headerChildren:"AppHeader_headerChildren__HJCQq",controlsContainer:"AppHeader_controlsContainer__aX0s9",appMaximized:"AppHeader_appMaximized__lT1ld",item:"AppHeader_item__uDz5N",secondaryAsset:"AppHeader_secondaryAsset__AoPAz",seccondaryAssetWrapper:"AppHeader_seccondaryAssetWrapper__OGaNa",seccondaryAssetLink:"AppHeader_seccondaryAssetLink__fZb2u"};e(".AppHeader_padModeSelect__CP-Ia{height:24px;z-index:999}.AppHeader_padModeSelect__CP-Ia>div:first-child{padding-top:0!important}.AppHeader_smallPadModeSelect__a5Xo6{height:24px;margin-top:8px}.AppHeader_smallPadModeSelect__a5Xo6>div:first-child{padding-bottom:0;padding-left:0;padding-top:8px}.AppHeader_mediumSizeContent__xb-Wo{justify-content:flex-start;margin-top:8px}.AppHeader_mediumSizeContent__xb-Wo .AppHeader_headerChildren__HJCQq{padding:0}.AppHeader_headerChildren__HJCQq{display:flex;padding:0 0 12px 16px}.AppHeader_headerChildren__HJCQq,.AppHeader_headerChildren__HJCQq>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AppHeader_controlsContainer__aX0s9{align-items:center;display:flex;justify-content:flex-end;width:100%}.AppHeader_controlsContainer__aX0s9>:not(:last-child){padding:0 16px}.AppHeader_appMaximized__lT1ld{margin-right:28px}.AppHeader_item__uDz5N{background-color:#434343;border-radius:10px;color:var(--palette-primary-text-1);font-size:.85rem;line-height:20px;padding:0 12px}.dc-app-container__light-theme .AppHeader_item__uDz5N{background-color:#bdbdbd}.AppHeader_item__uDz5N.AppHeader_secondaryAsset__AoPAz{background-color:#d860d8;line-height:20px;margin-right:4px;min-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AppHeader_seccondaryAssetWrapper__OGaNa{max-width:20%}.AppHeader_seccondaryAssetLink__fZb2u{padding:0;width:100%}");export{d as default};
@@ -1 +1 @@
1
- import i from'./../../../../../ext-esm/style-inject/dist/style-inject.es.js';var t={appActions:"AppActions_appActions__hPD0u",appActionsButton:"AppActions_appActionsButton__SYkEO"};i(".AppActions_appActions__hPD0u{bottom:5px;cursor:pointer;position:absolute;right:7px;transition:visibility .45s cubic-bezier(.23,1,.32,1) 0ms;visibility:hidden}.dc-app-container:hover .AppActions_appActions__hPD0u{visibility:visible}.AppActions_appActionsButton__SYkEO{background-color:transparent!important;padding:3px}");export{t as default};
1
+ import i from'./../../../../../ext-esm/style-inject/dist/style-inject.es.js';var t={appActions:"AppActions_appActions__hPD0u",appActionsButton:"AppActions_appActionsButton__SYkEO"};i(".AppActions_appActions__hPD0u{bottom:5px;cursor:pointer;position:absolute;right:7px;transition:visibility .45s cubic-bezier(.23,1,.32,1) 0ms;visibility:hidden;z-index:10000}.dc-app-container:hover .AppActions_appActions__hPD0u{visibility:visible}.AppActions_appActionsButton__SYkEO{background-color:transparent!important;padding:3px}");export{t as default};
@@ -1 +1 @@
1
- import t from"prop-types";import{makeStyles as e,Typography as i}from"@material-ui/core";import a from"classnames";import{jsxs as r,jsx as p}from"react/jsx-runtime";var o=e({wrapper:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",padding:"16px",zIndex:1,"@media (max-height:350px)":{paddingTop:"56px"},"@media (max-width:500px)":{paddingTop:"128px"}},errorImage:{width:"390px",height:"300px",marginTop:"24px","@media (max-height:400px)":{width:"260px",height:"200px"},"@media (max-height:350px), (max-width: 580px) and (max-height:550px)":{display:"none"},"@media (max-width:500px)":{width:"260px",height:"200px"}},title:{fontSize:"32px",fontStyle:"italic",color:"#9E9E9E",lineHeight:"37px",fontWeight:"normal","@media (max-height:400px)":{fontSize:"24px"},"@media (max-width:500px)":{fontSize:"24px"}},description:{fontSize:"16px",color:"#9E9E9E"},arrow:{position:"absolute",top:0,right:0,zIndex:-1,"@media (max-width: 960px)":{display:"none"}}});function s(t){var e=t.title,s=t.description,d=t.showArrow,n=t.customStyles,m=o();return r("div",{"data-testid":"".concat("EmptyView","_wrapper"),className:a(m.wrapper,n.wrapper),children:[p(i,{className:a(m.title,n.title),children:e}),p(i,{className:a(m.description,n.description),children:s}),p("img",{src:"/static/media/5010eaf4520add4dcd713ce1fdbda5ea.png",className:m.errorImage,alt:"error state"}),d&&p("img",{src:"/static/media/1be6a0ee1d46b5f5c15203014864e086.svg",alt:"arrow",className:a(m.arrow,n.arrow)})]})}s.propTypes={title:t.string,description:t.string,showArrow:t.bool,customStyles:t.shape({wrapper:t.string,title:t.string,description:t.string,arrow:t.string})},s.defaultProps={title:"No Data Available",description:"",showArrow:!1,customStyles:{}};export{s as default};
1
+ import t from"prop-types";import{makeStyles as e,Typography as i}from"@material-ui/core";import r from"classnames";import{jsxs as a,jsx as o}from"react/jsx-runtime";var p=e({wrapper:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",padding:"16px",zIndex:function(t){return t.showArrow?1:"auto"},"@media (max-height:350px)":{paddingTop:"56px"},"@media (max-width:500px)":{paddingTop:"128px"}},errorImage:{width:"390px",height:"300px",marginTop:"24px","@media (max-height:400px)":{width:"260px",height:"200px"},"@media (max-height:350px), (max-width: 580px) and (max-height:550px)":{display:"none"},"@media (max-width:500px)":{width:"260px",height:"200px"}},title:{fontSize:"32px",fontStyle:"italic",color:"#9E9E9E",lineHeight:"37px",fontWeight:"normal","@media (max-height:400px)":{fontSize:"24px"},"@media (max-width:500px)":{fontSize:"24px"}},description:{fontSize:"16px",color:"#9E9E9E"},arrow:{position:"absolute",top:0,right:0,zIndex:-1,"@media (max-width: 960px)":{display:"none"}}});function s(t){var e=t.title,s=t.description,d=t.showArrow,n=t.customStyles,m=p({showArrow:d});return a("div",{"data-testid":"".concat("EmptyView","_wrapper"),className:r(m.wrapper,n.wrapper),children:[o(i,{className:r(m.title,n.title),children:e}),o(i,{className:r(m.description,n.description),children:s}),o("img",{src:"/static/media/5010eaf4520add4dcd713ce1fdbda5ea.png",className:m.errorImage,alt:"error state"}),d&&o("img",{src:"/static/media/1be6a0ee1d46b5f5c15203014864e086.svg",alt:"arrow",className:r(m.arrow,n.arrow)})]})}s.propTypes={title:t.string,description:t.string,showArrow:t.bool,customStyles:t.shape({wrapper:t.string,title:t.string,description:t.string,arrow:t.string})},s.defaultProps={title:"No Data Available",description:"",showArrow:!1,customStyles:{}};export{s as default};
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/Notifications/components/Toast.js"],"names":[],"mappings":";AA+BA;;;;;gBAoHC"}
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/Notifications/components/Toast.js"],"names":[],"mappings":";AA+BA;;;;;gBAqHC"}
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/objectWithoutProperties";import t from"@babel/runtime/helpers/defineProperty";import{useEffect as o,cloneElement as i}from"react";import r from"prop-types";import n from"classnames";import{noop as s}from"lodash";import{Grow as a,SnackbarContent as c,Tooltip as l,Typography as m}from"@material-ui/core";import{CheckCircleOutline as p,ReportProblemOutlined as f,ReportOutlined as u,InfoOutlined as d,Check as b,Close as h}from"@material-ui/icons";import v from"../../IconButton/index.js";import{NOTIFICATION_VARIANTS as O}from"../../../constants/notifications.js";import{useStyles as g}from"./styles.js";import{jsx as j,jsxs as y}from"react/jsx-runtime";var C,P=["classes","onDismissClick","toast"];function N(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function k(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?N(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):N(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var D="NotificationPopup",w=(t(C={},O.success,p),t(C,O.warning,f),t(C,O.error,u),t(C,O.info,d),t(C,O.neutral,b),C),I=function(t){t.classes;var r=t.onDismissClick,p=t.toast,f=e(t,P),u=p.alertLevel,d=p.autoHideDuration,b=void 0===d?3e3:d,C=p.content,N=p.hideIcon,I=p.icon,T=p.id,_=p.onClick,q=void 0===_?function(){}:_,R=p.timestamp,x=p.title,B=p.variant,L=void 0===B?"info":B,W=p.tooltipProps,E=p.onClose,H=void 0===E?s:E;o((function(){var e=setTimeout((function(){return r(T)}),b);return function(){return clearTimeout(e)}}),[]);var S=g(),z=w[L];return j(a,{appear:!0,in:!0,children:j(c,k({classes:{root:n(S.main,!u&&S[L],u&&S["alertLevels-".concat(u)]),action:S.actionContainer,message:S.messageContainer},"aria-describedby":"client-snackbar",message:j(l,k(k({},W),{},{title:C,classes:{tooltip:S.tooltip},placement:"bottom",children:y("div",{id:"client-snackbar",className:S.messageWrapper,onClick:q,"data-testid":"".concat(D,"_status_").concat(O[L]),children:[!N&&j("div",{className:S.iconWrapper,children:I?i(I,{className:S.icon,nativeColor:"#fff"}):j(z,{htmlColor:"#fff",className:S.icon})}),y("div",{className:S.message,children:[y("div",{className:S.messageTop,children:[x&&j(m,{"data-testid":"".concat(D,"_title"),variant:"subtitle2",className:S.title,children:x}),R&&j(m,{className:n(S.timestamp,!u&&S[L]),children:R})]}),j("div",{className:n(S.messageContent,!u&&S[L]),children:j(m,{"data-testid":"".concat(D,"_content"),className:n(!u&&S.content),children:C})})]})]})})),action:[j(v,{"data-testid":"".concat(D,"_closeButton"),"aria-label":"Close",color:"inherit",onClick:function(){H(),r(T)},size:"small",tooltipProps:{title:"Close",classes:{tooltip:S.tooltip}},className:S.closeIconButton,children:j(h,{className:S.closeIcon,htmlColor:u?"#000":"#fff"})},"close")]},f))})};I.propTypes={onDismissClick:r.func.isRequired,toast:r.shape({alertLevel:r.oneOf(["info","warning","critical"]),autoHideDuration:r.number,content:r.node.isRequired,hideIcon:r.bool,icon:r.node,id:r.oneOfType([r.number,r.string]).isRequired,onClick:r.func,timestamp:r.string,title:r.string,variant:r.oneOf(Object.values(O)),tooltipProps:r.shape({}),onClose:r.func}).isRequired};export{I as default};
1
+ import e from"@babel/runtime/helpers/objectWithoutProperties";import t from"@babel/runtime/helpers/defineProperty";import{useEffect as o,cloneElement as i}from"react";import r from"prop-types";import n from"classnames";import{noop as s}from"lodash";import{Grow as a,SnackbarContent as c,Tooltip as l,Typography as m}from"@material-ui/core";import{CheckCircleOutline as p,ReportProblemOutlined as f,ReportOutlined as u,InfoOutlined as d,Check as b,Close as h}from"@material-ui/icons";import v from"../../IconButton/index.js";import{NOTIFICATION_VARIANTS as O}from"../../../constants/notifications.js";import{useStyles as g}from"./styles.js";import{jsx as j,jsxs as y}from"react/jsx-runtime";var C,N=["classes","onDismissClick","toast"];function P(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function k(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?P(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var D="NotificationPopup",w=(t(C={},O.success,p),t(C,O.warning,f),t(C,O.error,u),t(C,O.info,d),t(C,O.neutral,b),C),I=function(t){t.classes;var r=t.onDismissClick,p=t.toast,f=e(t,N),u=p.alertLevel,d=p.autoHideDuration,b=void 0===d?3e3:d,C=p.content,P=p.hideIcon,I=p.icon,T=p.id,_=p.onClick,q=void 0===_?function(){}:_,R=p.timestamp,x=p.title,B=p.variant,L=void 0===B?"info":B,W=p.tooltipProps,E=p.onClose,H=void 0===E?s:E;o((function(){var e=setTimeout((function(){return r(T)}),b);return function(){return clearTimeout(e)}}),[]);var S=g(),z=w[L];return j(a,{appear:!0,in:!0,children:j(c,k({classes:{root:n(S.main,!u&&S[L],u&&S.alertNotification,u&&S["alertLevels-".concat(u)]),action:S.actionContainer,message:S.messageContainer},"aria-describedby":"client-snackbar",message:j(l,k(k({},W),{},{title:C,classes:{tooltip:S.tooltip},placement:"bottom",children:y("div",{id:"client-snackbar",className:S.messageWrapper,onClick:q,"data-testid":"".concat(D,"_status_").concat(O[L]),children:[!P&&j("div",{className:S.iconWrapper,children:I?i(I,{className:S.icon,nativeColor:"#fff"}):j(z,{htmlColor:"#fff",className:S.icon})}),y("div",{className:S.message,children:[y("div",{className:S.messageTop,children:[x&&j(m,{"data-testid":"".concat(D,"_title"),variant:"subtitle2",className:S.title,children:x}),R&&j(m,{className:n(S.timestamp,!u&&S[L]),children:R})]}),j("div",{className:n(S.messageContent,!u&&S[L]),children:j(m,{"data-testid":"".concat(D,"_content"),className:n(!u&&S.content),children:C})})]})]})})),action:[j(v,{"data-testid":"".concat(D,"_closeButton"),"aria-label":"Close",color:"inherit",onClick:function(){H(),r(T)},size:"small",tooltipProps:{title:"Close",classes:{tooltip:S.tooltip}},className:S.closeIconButton,children:j(h,{className:S.closeIcon,htmlColor:u?"#000":"#fff"})},"close")]},f))})};I.propTypes={onDismissClick:r.func.isRequired,toast:r.shape({alertLevel:r.oneOf(["info","warning","critical"]),autoHideDuration:r.number,content:r.node.isRequired,hideIcon:r.bool,icon:r.node,id:r.oneOfType([r.number,r.string]).isRequired,onClick:r.func,timestamp:r.string,title:r.string,variant:r.oneOf(Object.values(O)),tooltipProps:r.shape({}),onClose:r.func}).isRequired};export{I as default};
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Notifications/components/styles.js"],"names":[],"mappings":"AAEA,2FAqII"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Notifications/components/styles.js"],"names":[],"mappings":"AAEA,2FAuII"}
@@ -1 +1 @@
1
- import{makeStyles as e}from"@material-ui/core";var t=e((function(e){return{main:{width:443,height:48,maxWidth:"85vw",display:"flex",flexWrap:"nowrap",alignItems:"center",padding:0,marginBottom:e.spacing(2)},success:{backgroundColor:e.palette.success.main},error:{backgroundColor:e.palette.error.main},warning:{backgroundColor:e.palette.warning.main,"& .MuiSvgIcon-root":{color:e.palette.background.b7},"& p":{color:e.palette.background.b7}},info:{backgroundColor:e.palette.info.main},neutral:{backgroundColor:e.palette.background.b9,"& .MuiSvgIcon-root":{color:e.palette.primary.text7}},title:{color:e.palette.grey[600],fontWeight:"400"},content:{fontSize:"14px",lineHeight:"16px",color:e.palette.primary.contrastText,fontWeight:500,whiteSpace:"normal",overflow:"hidden",textOverflow:"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":2,height:"fit-content",display:"-webkit-box",flexDirection:"column",justifyContent:"center"},iconWrapper:{display:"flex",alignSelf:"center",alignItems:"center",height:35,padding:"0px 10px 0 18px"},icon:{width:20,height:20,transform:"scale(1.2)"},closeIconButton:{"&.MuiButtonBase-root":{color:e.palette.primary.contrastText,padding:11,"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)"},"&:active":{backgroundColor:"rgba(255, 255, 255, 0.4)"}}},closeIcon:{width:14,height:14,"&.MuiSvgIcon-root":{fontSize:14,transform:"scale(1.715)"}},messageContainer:{overflowX:"hidden",flex:1},messageWrapper:{display:"flex"},message:{display:"flex",flex:1,alignItems:"center",minHeight:35,height:"100%",overflowY:"hidden",justifyContent:"center",flexDirection:"column"},messageTop:{display:"flex",justifyContent:"space-between",overflowX:"hidden",textOverflow:"ellipsis",width:"100%"},messageContent:{overflowX:"hidden",textOverflow:"ellipsis",width:"100%"},timestamp:{marginLeft:10,alignSelf:"flex-end"},actionContainer:{paddingLeft:"8px",marginRight:"16px"},"alertLevels-info":{borderLeft:"15px solid rgb(119, 195, 241)",backgroundColor:e.palette.primary.contrastText},"alertLevels-warning":{borderLeft:"15px solid rgb(242, 192, 70)",backgroundColor:e.palette.primary.contrastText},"alertLevels-critical":{borderLeft:"15px solid rgb(237, 70, 48)",backgroundColor:e.palette.primary.contrastText},tooltip:{marginTop:8,color:e.palette.primary.contrastText}}}));export{t as useStyles};
1
+ import{makeStyles as e}from"@material-ui/core";var t=e((function(e){return{main:{width:443,height:48,maxWidth:"85vw",display:"flex",flexWrap:"nowrap",alignItems:"center",padding:0,marginBottom:e.spacing(2)},success:{backgroundColor:e.palette.success.main},error:{backgroundColor:e.palette.error.main},warning:{backgroundColor:e.palette.warning.main,"& .MuiSvgIcon-root":{color:e.palette.background.b7},"& p":{color:e.palette.background.b7}},info:{backgroundColor:e.palette.info.main},neutral:{backgroundColor:e.palette.background.b9,"& .MuiSvgIcon-root":{color:e.palette.primary.text7}},title:{color:e.palette.grey[600],fontWeight:"400"},content:{fontSize:"14px",lineHeight:"16px",color:e.palette.primary.contrastText,fontWeight:500,whiteSpace:"normal",overflow:"hidden",textOverflow:"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":2,height:"fit-content",display:"-webkit-box",flexDirection:"column",justifyContent:"center"},iconWrapper:{display:"flex",alignSelf:"center",alignItems:"center",height:35,padding:"0px 10px 0 18px"},icon:{width:20,height:20,transform:"scale(1.2)"},closeIconButton:{"&.MuiButtonBase-root":{color:e.palette.primary.contrastText,padding:11,"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)"},"&:active":{backgroundColor:"rgba(255, 255, 255, 0.4)"}}},closeIcon:{width:14,height:14,"&.MuiSvgIcon-root":{fontSize:14,transform:"scale(1.715)"}},messageContainer:{overflowX:"hidden",flex:1},messageWrapper:{display:"flex"},message:{display:"flex",flex:1,alignItems:"center",minHeight:35,height:"100%",overflowY:"hidden",justifyContent:"center",flexDirection:"column"},messageTop:{display:"flex",justifyContent:"space-between",overflowX:"hidden",textOverflow:"ellipsis",width:"100%"},messageContent:{overflowX:"hidden",textOverflow:"ellipsis",width:"100%"},timestamp:{marginLeft:10,alignSelf:"flex-end"},actionContainer:{paddingLeft:"8px",marginRight:"16px"},alertNotification:{paddingLeft:12,backgroundColor:e.palette.background.paper,height:"unset"},"alertLevels-info":{borderLeft:"15px solid rgb(119, 195, 241)"},"alertLevels-warning":{borderLeft:"15px solid rgb(242, 192, 70)"},"alertLevels-critical":{borderLeft:"15px solid rgb(237, 70, 48)"},tooltip:{marginTop:8,color:e.palette.primary.contrastText}}}));export{t as useStyles};
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellButton.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellButton/OffsetWellButton.js"],"names":[],"mappings":";AA+CA;;;;;;gBAoEC"}
1
+ {"version":3,"file":"OffsetWellButton.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellButton/OffsetWellButton.js"],"names":[],"mappings":";AAgDA;;;;;;gBAoEC"}
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as t}from"react";import o from"prop-types";import r from"classnames";import{makeStyles as i,Typography as n,Tooltip as s}from"@material-ui/core";import{Edit as p,ExpandLess as a,ExpandMore as m}from"@material-ui/icons";import"@babel/runtime/helpers/defineProperty";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as l,jsx as d}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/AppContext.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"lodash";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../AdvancedSlider/AdvancedSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import c from"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../clients/jsonApi/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../HelpCenter/HelpCenterIcon.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";var j=i((function(e){var t=e.palette;return{disabled:{opacity:.4,pointerEvents:"none"},offsetContainer:{cursor:"pointer",display:"flex",flexWrap:"nowrap",alignItems:"center",width:"fit-content"},hoveredContainer:{backgroundColor:"rgba(3, 188, 212, 0.16)"},offsetText:{color:t.primary.text6,fontSize:12,paddingRight:4,"&:hover":{color:t.primary.contrastText}},buttons:{display:"flex"},isActive:{color:t.primary.contrastText},primaryIcon:{"&:hover":{backgroundColor:"rgba(3, 188, 212, 0.16)"}}}})),C=function(o){var i=o.onClick,C=o.wells,u=o.disabled,A=o.expanded,b=o.onExpand,v=t(!1),D=e(v,2),f=D[0],g=D[1],x=j(),h=C.length,P=!(!h||!b),S=l("div",{className:r(x.offsetContainer,u&&x.disabled),onClick:i,onMouseMove:function(e){var t=e.target,o=t.parentNode;t.getAttribute("data-icon")||o.getAttribute("data-icon")?g(!1):g(!0)},onMouseLeave:function(){g(!1)},children:[l(n,{className:r(x.offsetText,f&&x.isActive),children:["Offset Wells (",h,")"]}),d(c,{className:r(x.primaryIcon,f&&x.hoveredContainer),color:"primary",size:"medium",children:d(p,{})})]});return l("div",{className:x.buttons,children:[d(s,{title:"Edit Offset Wells",placement:"bottom",children:S}),P&&d(c,{tooltipProps:{title:A?"Collapse Offset Wells":"Expand Offset Wells"},onClick:function(e){e.stopPropagation(),b()},color:"default",size:"medium","data-icon":"expandIcon",children:d(A?a:m,{"data-icon":"expandIcon"})})]})};C.propTypes={onClick:o.func.isRequired,wells:o.arrayOf(o.shape({id:o.number,title:o.string})),disabled:o.bool,onExpand:o.func,expanded:o.bool},C.defaultProps={onExpand:null,expanded:!1,wells:[],disabled:!1};export{C as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import{useState as o}from"react";import t from"prop-types";import r from"classnames";import{makeStyles as n,Typography as i,Tooltip as a}from"@material-ui/core";import{Edit as l,ExpandLess as s,ExpandMore as d}from"@material-ui/icons";import c from"../IconButton/index.js";import{jsxs as p,jsx as f}from"react/jsx-runtime";var m=n((function(e){var o=e.palette;return{disabled:{opacity:.4,pointerEvents:"none"},offsetContainer:{cursor:"pointer",display:"flex",whiteSpace:"nowrap",flexWrap:"nowrap",alignItems:"center",width:"fit-content"},hoveredContainer:{backgroundColor:"rgba(3, 188, 212, 0.16)"},offsetText:{color:o.primary.text6,fontSize:12,paddingRight:4,"&:hover":{color:o.primary.contrastText}},buttons:{display:"flex"},isActive:{color:o.primary.contrastText},primaryIcon:{"&:hover":{backgroundColor:"rgba(3, 188, 212, 0.16)"}}}})),u=function(t){var n=t.onClick,u=t.wells,x=t.disabled,b=t.expanded,h=t.onExpand,v=o(!1),g=e(v,2),y=g[0],C=g[1],w=m(),k=u.length,E=!(!k||!h),I=p("div",{className:r(w.offsetContainer,x&&w.disabled),onClick:n,onMouseMove:function(e){var o=e.target,t=o.parentNode;o.getAttribute("data-icon")||t.getAttribute("data-icon")?C(!1):C(!0)},onMouseLeave:function(){C(!1)},children:[p(i,{className:r(w.offsetText,y&&w.isActive),children:["Offset Wells (",k,")"]}),f(c,{className:r(w.primaryIcon,y&&w.hoveredContainer),color:"primary",size:"medium",children:f(l,{})})]});return p("div",{className:w.buttons,children:[f(a,{title:"Edit Offset Wells",placement:"bottom",children:I}),E&&f(c,{tooltipProps:{title:b?"Collapse Offset Wells":"Expand Offset Wells"},onClick:function(e){e.stopPropagation(),h()},color:"default",size:"medium","data-icon":"expandIcon",children:f(b?s:d,{"data-icon":"expandIcon"})})]})};u.propTypes={onClick:t.func.isRequired,wells:t.arrayOf(t.shape({id:t.number,title:t.string})),disabled:t.bool,onExpand:t.func,expanded:t.bool},u.defaultProps={onExpand:null,expanded:!1,wells:[],disabled:!1};export{u as default};
@@ -1 +1 @@
1
- import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",offsetWellDialogMobile:"OffsetWellPickerV4-module_offsetWellDialogMobile__ng66x",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",smallContainer:"OffsetWellPickerV4-module_smallContainer__ngDTM",contentContainerMobile:"OffsetWellPickerV4-module_contentContainerMobile__0VZNE",content:"OffsetWellPickerV4-module_content__mEQWD",contentMobile:"OffsetWellPickerV4-module_contentMobile__jM5ou",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",modalActionsMobile:"OffsetWellPickerV4-module_modalActionsMobile__ttUJ0",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",countContainerMobile:"OffsetWellPickerV4-module_countContainerMobile__HPiI2",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K",resetButtonMobile:"OffsetWellPickerV4-module_resetButtonMobile__dCDdg",infoIconContainer:"OffsetWellPickerV4-module_infoIconContainer__olAOe",infoIcon:"OffsetWellPickerV4-module_infoIcon__8tuGL",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W"};e(".OffsetWellPickerV4-module_offsetWellDialog__EkSjl{padding-bottom:40px;width:1100px}.OffsetWellPickerV4-module_offsetWellDialogMobile__ng66x{margin-top:50px;overflow-y:hidden;padding-bottom:0}.OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c{color:var(--palette-primary-text-6);font-size:16px!important;line-height:140.6%!important;margin-bottom:16px!important;margin-left:40px!important}.OffsetWellPickerV4-module_contentWrapper__gVGQ-{display:flex;flex-direction:column;overflow:hidden auto;position:relative}.OffsetWellPickerV4-module_contentContainer__Eb9sk{display:flex;flex-direction:column;overflow-y:hidden;padding:0;position:relative}.OffsetWellPickerV4-module_smallContainer__ngDTM{margin-top:4px}.OffsetWellPickerV4-module_contentContainerMobile__0VZNE{height:calc(100% - 104px)}.OffsetWellPickerV4-module_content__mEQWD{flex:1;margin:0 24px 0 40px;overflow:auto;position:relative}.OffsetWellPickerV4-module_contentMobile__jM5ou{margin:0 0 0 16px}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-corner{background-color:transparent}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar{width:16px}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:hsla(240,2%,65%,.722);border:5px solid rgba(0,0,0,.01);border-radius:10px}.OffsetWellPickerV4-module_modalActions__cShAH{justify-content:flex-end;padding:8px 40px}.OffsetWellPickerV4-module_modalActionsMobile__ttUJ0{padding:10px 16px}.OffsetWellPickerV4-module_actionsWrapper__C0Ciz{align-items:center;display:flex;flex:1;justify-content:space-between}.OffsetWellPickerV4-module_buttonGap__fjFT6{display:flex;gap:16px}.OffsetWellPickerV4-module_viewOnlyLabel__GP44N{color:var(--palette-primary-text-6);padding-bottom:16px;padding-left:40px}.OffsetWellPickerV4-module_countContainer__p8V5A{align-items:center;display:flex;height:24px;margin:0 0 16px 40px;z-index:9}.OffsetWellPickerV4-module_countContainerMobile__HPiI2{margin-left:16px;margin-top:14px}.OffsetWellPickerV4-module_totalLabel__3n5bD{color:var(--palette-primary-text-6)}.OffsetWellPickerV4-module_selectedLabel__BzClE{color:var(--palette-primary-text-6);padding-left:16px}.OffsetWellPickerV4-module_countValue__dLG-K{color:var(--palette-primary-text-1);padding-left:8px}.OffsetWellPickerV4-module_resetButtonMobile__dCDdg{max-height:40px;max-width:40px;min-height:40px;min-width:40px!important}.OffsetWellPickerV4-module_infoIconContainer__olAOe{height:40px}.OffsetWellPickerV4-module_infoIcon__8tuGL{color:#dadada;height:40px!important;padding:10px;width:40px!important}.OffsetWellPickerV4-module_topGradient__fAc7W{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);border-bottom:none!important;height:16px!important;padding:0!important;position:absolute;top:120px;width:100%;z-index:3}");export{l as default};
1
+ import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellDialog:"OffsetWellPickerV4-module_offsetWellDialog__EkSjl",offsetWellDialogMobile:"OffsetWellPickerV4-module_offsetWellDialogMobile__ng66x",viewOnlyTitleLabel:"OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c",contentWrapper:"OffsetWellPickerV4-module_contentWrapper__gVGQ-",contentContainer:"OffsetWellPickerV4-module_contentContainer__Eb9sk",smallContainer:"OffsetWellPickerV4-module_smallContainer__ngDTM",contentContainerMobile:"OffsetWellPickerV4-module_contentContainerMobile__0VZNE",content:"OffsetWellPickerV4-module_content__mEQWD",contentMobile:"OffsetWellPickerV4-module_contentMobile__jM5ou",modalActions:"OffsetWellPickerV4-module_modalActions__cShAH",modalActionsMobile:"OffsetWellPickerV4-module_modalActionsMobile__ttUJ0",actionsWrapper:"OffsetWellPickerV4-module_actionsWrapper__C0Ciz",buttonGap:"OffsetWellPickerV4-module_buttonGap__fjFT6",viewOnlyLabel:"OffsetWellPickerV4-module_viewOnlyLabel__GP44N",countContainer:"OffsetWellPickerV4-module_countContainer__p8V5A",countContainerMobile:"OffsetWellPickerV4-module_countContainerMobile__HPiI2",totalLabel:"OffsetWellPickerV4-module_totalLabel__3n5bD",selectedLabel:"OffsetWellPickerV4-module_selectedLabel__BzClE",countValue:"OffsetWellPickerV4-module_countValue__dLG-K",resetButtonMobile:"OffsetWellPickerV4-module_resetButtonMobile__dCDdg",infoIconContainer:"OffsetWellPickerV4-module_infoIconContainer__olAOe",infoIcon:"OffsetWellPickerV4-module_infoIcon__8tuGL",topGradient:"OffsetWellPickerV4-module_topGradient__fAc7W"};e(".OffsetWellPickerV4-module_offsetWellDialog__EkSjl{max-height:calc(100% - 32px);padding-bottom:40px;width:1100px}.OffsetWellPickerV4-module_offsetWellDialogMobile__ng66x{margin-top:50px;overflow-y:hidden;padding-bottom:0}.OffsetWellPickerV4-module_viewOnlyTitleLabel__pod4c{color:var(--palette-primary-text-6);font-size:16px!important;line-height:140.6%!important;margin-bottom:16px!important;margin-left:40px!important}.OffsetWellPickerV4-module_contentWrapper__gVGQ-{display:flex;flex-direction:column;overflow:hidden auto;position:relative}.OffsetWellPickerV4-module_contentContainer__Eb9sk{display:flex;flex-direction:column;overflow-y:hidden;padding:0;position:relative}.OffsetWellPickerV4-module_smallContainer__ngDTM{margin-top:4px}.OffsetWellPickerV4-module_contentContainerMobile__0VZNE{height:calc(100% - 104px)}.OffsetWellPickerV4-module_content__mEQWD{flex:1;margin:0 24px 0 40px;overflow:auto;position:relative}.OffsetWellPickerV4-module_contentMobile__jM5ou{margin:0 0 0 16px}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-corner{background-color:transparent}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar{width:16px}.OffsetWellPickerV4-module_content__mEQWD::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:hsla(240,2%,65%,.722);border:5px solid rgba(0,0,0,.01);border-radius:10px}.OffsetWellPickerV4-module_modalActions__cShAH{justify-content:flex-end;padding:8px 40px}.OffsetWellPickerV4-module_modalActionsMobile__ttUJ0{padding:10px 16px}.OffsetWellPickerV4-module_actionsWrapper__C0Ciz{align-items:center;display:flex;flex:1;justify-content:space-between}.OffsetWellPickerV4-module_buttonGap__fjFT6{display:flex;gap:16px}.OffsetWellPickerV4-module_viewOnlyLabel__GP44N{color:var(--palette-primary-text-6);padding-bottom:16px;padding-left:40px}.OffsetWellPickerV4-module_countContainer__p8V5A{align-items:center;display:flex;height:24px;margin:0 0 16px 40px;z-index:9}.OffsetWellPickerV4-module_countContainerMobile__HPiI2{margin-left:16px;margin-top:14px}.OffsetWellPickerV4-module_totalLabel__3n5bD{color:var(--palette-primary-text-6)}.OffsetWellPickerV4-module_selectedLabel__BzClE{color:var(--palette-primary-text-6);padding-left:16px}.OffsetWellPickerV4-module_countValue__dLG-K{color:var(--palette-primary-text-1);padding-left:8px}.OffsetWellPickerV4-module_resetButtonMobile__dCDdg{max-height:40px;max-width:40px;min-height:40px;min-width:40px!important}.OffsetWellPickerV4-module_infoIconContainer__olAOe{height:40px}.OffsetWellPickerV4-module_infoIcon__8tuGL{color:#dadada;height:40px!important;padding:10px;width:40px!important}.OffsetWellPickerV4-module_topGradient__fAc7W{background-image:linear-gradient(0deg,rgba(65,65,65,0),#414141);border-bottom:none!important;height:16px!important;padding:0!important;position:absolute;top:120px;width:100%;z-index:3}");export{l as default};
@@ -1,9 +1,10 @@
1
- export function AdvancedSearch({ companyId, subjectWellId, onChange, selectedWellIds, onHideAdvancedSearch, }: {
1
+ export function AdvancedSearch({ companyId, subjectWellId, onChange, selectedWellIds, onHideAdvancedSearch, viewType, }: {
2
2
  companyId: any;
3
3
  subjectWellId: any;
4
4
  onChange: any;
5
5
  selectedWellIds: any;
6
6
  onHideAdvancedSearch: any;
7
+ viewType: any;
7
8
  }): JSX.Element;
8
9
  export namespace AdvancedSearch {
9
10
  namespace propTypes {
@@ -12,6 +13,7 @@ export namespace AdvancedSearch {
12
13
  const onChange: PropTypes.Validator<(...args: any[]) => any>;
13
14
  const selectedWellIds: PropTypes.Validator<number[]>;
14
15
  const onHideAdvancedSearch: PropTypes.Validator<(...args: any[]) => any>;
16
+ const viewType: PropTypes.Validator<string>;
15
17
  }
16
18
  }
17
19
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"AdvancedSearch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js"],"names":[],"mappings":"AASO;;;;;;gBAuEN"}
1
+ {"version":3,"file":"AdvancedSearch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js"],"names":[],"mappings":"AASO;;;;;;;gBAyEN"}
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as r,useRef as o}from"react";import t from"prop-types";import{TextField as n,InputAdornment as a,Popover as l}from"@material-ui/core";import{Search as c}from"@material-ui/icons";import i from"./AutoCompleteAssetSearch.js";import s from"./AdvancedSearch.module.css.js";import{jsxs as d,Fragment as u,jsx as m}from"react/jsx-runtime";var p=function(t){var p=t.companyId,f=t.subjectWellId,h=t.onChange,v=t.selectedWellIds,I=t.onHideAdvancedSearch,g=r(null),b=e(g,2),A=b[0],C=b[1],y=r(""),j=e(y,2),R=j[0],W=j[1],q=o(),O=function(){W(""),C(null),I()};return d(u,{children:[m(n,{"data-testid":"ows_advanced_search",id:"well-section-search-textfield",placeholder:"Add Offset ...",InputProps:{startAdornment:m(a,{position:"start",children:m(c,{className:s.searchIcon})}),className:s.searchInput},classes:{root:s.searchRoot},ref:q,value:R,onChange:function(e){W(e.target.value),e.target.value&&C(q.current)},onClick:function(e){C(e.currentTarget)}}),m(l,{open:Boolean(A),anchorEl:A,onClose:O,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:m(i,{subjectWellId:f,value:R,company:p,selectedWellIds:v,onChange:h,onClose:O})})]})};p.propTypes={companyId:t.number.isRequired,subjectWellId:t.number.isRequired,onChange:t.func.isRequired,selectedWellIds:t.arrayOf(t.number).isRequired,onHideAdvancedSearch:t.func.isRequired};export{p as AdvancedSearch};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import{useState as r,useRef as o}from"react";import t from"prop-types";import{TextField as n,InputAdornment as a,Popover as i}from"@material-ui/core";import{Search as l}from"@material-ui/icons";import s from"./AutoCompleteAssetSearch.js";import c from"./AdvancedSearch.module.css.js";import{jsxs as d,Fragment as u,jsx as m}from"react/jsx-runtime";var p=function(t){var p=t.companyId,f=t.subjectWellId,h=t.onChange,v=t.selectedWellIds,I=t.onHideAdvancedSearch,g=t.viewType,y=r(null),b=e(y,2),A=b[0],C=b[1],R=r(""),j=e(R,2),q=j[0],T=j[1],W=o(),w=function(){T(""),C(null),I()};return d(u,{children:[m(n,{"data-testid":"ows_advanced_search",id:"well-section-search-textfield",placeholder:"Add Offset ...",InputProps:{startAdornment:m(a,{position:"start",children:m(l,{className:c.searchIcon})}),className:c.searchInput},classes:{root:c.searchRoot},ref:W,value:q,onChange:function(e){T(e.target.value),e.target.value&&C(W.current)},onClick:function(e){C(e.currentTarget)}}),m(i,{open:Boolean(A),anchorEl:A,onClose:w,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:m(s,{subjectWellId:f,value:q,company:p,selectedWellIds:v,onChange:h,onClose:w,viewType:g})})]})};p.propTypes={companyId:t.number.isRequired,subjectWellId:t.number.isRequired,onChange:t.func.isRequired,selectedWellIds:t.arrayOf(t.number).isRequired,onHideAdvancedSearch:t.func.isRequired,viewType:t.string.isRequired};export{p as AdvancedSearch};
@@ -1,10 +1,11 @@
1
1
  export default AutoCompleteAssetSearch;
2
- declare function AutoCompleteAssetSearch({ company, subjectWellId, value, selectedWellIds, onChange }: {
2
+ declare function AutoCompleteAssetSearch({ company, subjectWellId, value, selectedWellIds, onChange, viewType, }: {
3
3
  company: any;
4
4
  subjectWellId: any;
5
5
  value: any;
6
6
  selectedWellIds: any;
7
7
  onChange: any;
8
+ viewType: any;
8
9
  }): JSX.Element;
9
10
  declare namespace AutoCompleteAssetSearch {
10
11
  namespace propTypes {
@@ -13,6 +14,7 @@ declare namespace AutoCompleteAssetSearch {
13
14
  const value: PropTypes.Validator<string>;
14
15
  const selectedWellIds: PropTypes.Validator<number[]>;
15
16
  const onChange: PropTypes.Validator<(...args: any[]) => any>;
17
+ const viewType: PropTypes.Validator<string>;
16
18
  }
17
19
  }
18
20
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"AutoCompleteAssetSearch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js"],"names":[],"mappings":";AAwFA;;;;;;gBAqJC"}
1
+ {"version":3,"file":"AutoCompleteAssetSearch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js"],"names":[],"mappings":";AAyFA;;;;;;;gBA6JC"}
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as o,useMemo as n}from"react";import i from"prop-types";import{get as s}from"lodash";import{withStyles as l,Tooltip as a,makeStyles as p,Chip as c,Input as u}from"@material-ui/core";import d from"@material-ui/icons/Close";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../utils/apiCalls.js";import"../../../effects/useAdvancedWells.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"../../../constants.js";import"../../../../../utils/index.js";import"../../../../../constants/goals.js";import"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"@babel/runtime/helpers/typeof";import"moment";import"react-virtualized";import{useAssetsData as m}from"../../../effects/useAssetsData.js";import f from"./AssetTypesSection.js";import h from"./AssetResultSection.js";import{SEARCH_CATEGORIES as x,CATEGORY_KEY_VALUES as b}from"./constants.js";import{jsxs as g,jsx as y,Fragment as C}from"react/jsx-runtime";var j=l((function(){return{tooltip:{backgroundColor:"#414141",color:"#ffffff",fontSize:"11px",lineHeight:"16px",borderRadius:"4px",boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.12)",padding:"4px"}}}))(a),I=p((function(e){return{wrapper:{width:"996px",display:"flex",flexDirection:"column",padding:16},inputWrapper:{display:"flex",width:"auto",margin:"0 8px 8px",alignItems:"center",flexWrap:"nowrap",justifyContent:"space-between"},selectedChip:{height:"24px",margin:"4px"},selectedChipDeleteIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,"&:hover":{color:e.palette.primary.text1}},selectedLabel:{fontWeight:400,fontSize:"16px",lineHeight:"22px",color:e.palette.primary.text1,whiteSpace:"nowrap",paddingLeft:"4px",paddingRight:"8px"},disabledIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,opacity:.4},closeIconButton:{padding:0,"&:hover $closeIcon":{color:e.palette.primary.text1}},searchInput:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"2px solid #03BCD4"},closeIcon:{color:e.palette.primary.text6,fontSize:"18px"}}})),v=function(i){var l=i.company,a=i.subjectWellId,p=i.value,v=i.selectedWellIds,A=i.onChange,w=t(null),W=e(w,2),R=W[0],S=W[1],k=t(null),D=e(k,2),T=D[0],q=D[1],z=t(1),N=e(z,2),L=N[0],B=N[1],H=I(),K=r();o((function(){q(p)}),[p]);var O=m(T,R,L,l,v),P=e(O,2),U=P[0],F=P[1],G=n((function(){return R&&F&&0!==F.length?F[0][1].filter((function(e){return e.checked})).length:0}),[R,F]);return g("div",{className:H.wrapper,children:[y("div",{className:H.inputWrapper,children:g("div",{className:H.searchInput,children:[R&&g(C,{children:[y(c,{"data-not-migrated-muichip":!0,classes:{root:H.selectedChip,deleteIcon:H.selectedChipDeleteIcon},label:s(x,[R,"labelPlural"],"Assets"),deleteIcon:y(d,{}),onDelete:function(){S(null)}}),G>0&&g("span",{className:H.selectedLabel,children:[G," Selected"]})]}),y(u,{"data-testid":"".concat("AutoCompleteAssetSearch","_searchInput"),inputRef:K,autoFocus:!0,disableUnderline:!0,fullWidth:!0,value:T||"",placeholder:"Add Offset ...",onChange:function(e){var t=e.target.value;K.current.focus(),q(t),B(1)},onKeyUp:function(t){var r=t.target.value,o=t.keyCode,n=b.find((function(t){var o=e(t,2);return o[0],o[1].autoCategorizedKey===r.trim().toLowerCase()}));if(n&&(13===o||32===o))return q(""),S(n[0]),void B(1);""===r&&8===o&&(S(null),B(1))}}),y(j,{title:"Clear",children:y(d,{className:R||T?H.selectedChipDeleteIcon:H.disabledIcon,onClick:function(){K.current.focus(),q(""),S(null),B(1)}})})]})}),!R&&!T&&y(f,{onClickAssetType:function(e){K.current.focus(),S(e),B(1)}}),(R||T)&&y(h,{subjectWellId:a,page:L,assetType:R,loading:U,groupedAssets:F,onClickAsset:function(e,t){A(!e.checked,[e.redirectAssetId],t)},onClickAllAsset:function(e,t){var r=F[0][1];A(e,r.map((function(e){return e.redirectAssetId})),t)},onScrollReached:function(e){"top"===e&&L>1&&B((function(e){return e-1})),"bottom"===e&&B((function(e){return e+1}))}})]})};v.propTypes={subjectWellId:i.number.isRequired,company:i.number.isRequired,value:i.string.isRequired,selectedWellIds:i.arrayOf(i.number).isRequired,onChange:i.func.isRequired};export{v as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useMemo as r,useRef as o,useEffect as n}from"react";import i from"prop-types";import{get as s}from"lodash";import{withStyles as a,Tooltip as l,makeStyles as p,Chip as c,Input as u}from"@material-ui/core";import d from"@material-ui/icons/Close";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../utils/apiCalls.js";import"../../../effects/useAdvancedWells.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import{ViewType as m}from"../../../constants.js";import"../../../../../utils/index.js";import"../../../../../constants/goals.js";import"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"@babel/runtime/helpers/typeof";import"moment";import"react-virtualized";import{useAssetsData as f}from"../../../effects/useAssetsData.js";import h from"./AssetTypesSection.js";import x from"./AssetResultSection.js";import{SEARCH_CATEGORIES as b,CATEGORY_KEY_VALUES as g}from"./constants.js";import{jsxs as y,jsx as v,Fragment as C}from"react/jsx-runtime";var j=a((function(){return{tooltip:{backgroundColor:"#414141",color:"#ffffff",fontSize:"11px",lineHeight:"16px",borderRadius:"4px",boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.12)",padding:"4px"}}}))(l),I=p((function(e){return{wrapper:{width:function(e){var t=e.viewType,r=e.searchWidth;return t===m.mobile?r:"996px"},display:"flex",flexDirection:"column",padding:16},inputWrapper:{display:"flex",width:"auto",margin:"0 8px 8px",alignItems:"center",flexWrap:"nowrap",justifyContent:"space-between"},selectedChip:{height:"24px",margin:"4px"},selectedChipDeleteIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,"&:hover":{color:e.palette.primary.text1}},selectedLabel:{fontWeight:400,fontSize:"16px",lineHeight:"22px",color:e.palette.primary.text1,whiteSpace:"nowrap",paddingLeft:"4px",paddingRight:"8px"},disabledIcon:{width:"16px",height:"16px",color:e.palette.primary.text6,opacity:.4},closeIconButton:{padding:0,"&:hover $closeIcon":{color:e.palette.primary.text1}},searchInput:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"2px solid #03BCD4"},closeIcon:{color:e.palette.primary.text6,fontSize:"18px"}}})),w=function(i){var a=i.company,l=i.subjectWellId,p=i.value,m=i.selectedWellIds,w=i.onChange,A=i.viewType,W=t(null),R=e(W,2),S=R[0],T=R[1],k=t(null),D=e(k,2),q=D[0],z=D[1],N=t(1),L=e(N,2),B=L[0],H=L[1],K=r((function(){return window.innerWidth-32}),[]),O=I({viewType:A,searchWidth:K}),P=o();n((function(){z(p)}),[p]);var U=f(q,S,B,a,m),F=e(U,2),G=F[0],$=F[1],_=r((function(){return S&&$&&0!==$.length?$[0][1].filter((function(e){return e.checked})).length:0}),[S,$]);return y("div",{className:O.wrapper,children:[v("div",{className:O.inputWrapper,children:y("div",{className:O.searchInput,children:[S&&y(C,{children:[v(c,{"data-not-migrated-muichip":!0,classes:{root:O.selectedChip,deleteIcon:O.selectedChipDeleteIcon},label:s(b,[S,"labelPlural"],"Assets"),deleteIcon:v(d,{}),onDelete:function(){T(null)}}),_>0&&y("span",{className:O.selectedLabel,children:[_," Selected"]})]}),v(u,{"data-testid":"".concat("AutoCompleteAssetSearch","_searchInput"),inputRef:P,autoFocus:!0,disableUnderline:!0,fullWidth:!0,value:q||"",placeholder:"Add Offset ...",onChange:function(e){var t=e.target.value;P.current.focus(),z(t),H(1)},onKeyUp:function(t){var r=t.target.value,o=t.keyCode,n=g.find((function(t){var o=e(t,2);return o[0],o[1].autoCategorizedKey===r.trim().toLowerCase()}));if(n&&(13===o||32===o))return z(""),T(n[0]),void H(1);""===r&&8===o&&(T(null),H(1))}}),v(j,{title:"Clear",children:v(d,{className:S||q?O.selectedChipDeleteIcon:O.disabledIcon,onClick:function(){P.current.focus(),z(""),T(null),H(1)}})})]})}),!S&&!q&&v(h,{onClickAssetType:function(e){P.current.focus(),T(e),H(1)}}),(S||q)&&v(x,{subjectWellId:l,page:B,assetType:S,loading:G,groupedAssets:$,onClickAsset:function(e,t){w(!e.checked,[e.redirectAssetId],t)},onClickAllAsset:function(e,t){var r=$[0][1];w(e,r.map((function(e){return e.redirectAssetId})),t)},onScrollReached:function(e){"top"===e&&B>1&&H((function(e){return e-1})),"bottom"===e&&H((function(e){return e+1}))}})]})};w.propTypes={subjectWellId:i.number.isRequired,company:i.number.isRequired,value:i.string.isRequired,selectedWellIds:i.arrayOf(i.number).isRequired,onChange:i.func.isRequired,viewType:i.string.isRequired};export{w as default};