@corva/ui 0.55.0-5 → 0.55.0-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/OffsetWellChips/Chip.js +1 -1
- package/cjs-bundle/components/OffsetWellChips/ChipsContainer.js +1 -1
- package/components/OffsetWellChips/Chip.d.ts +1 -13
- package/components/OffsetWellChips/Chip.d.ts.map +1 -1
- package/components/OffsetWellChips/Chip.js +1 -1
- package/components/OffsetWellChips/ChipsContainer.d.ts +1 -13
- package/components/OffsetWellChips/ChipsContainer.d.ts.map +1 -1
- package/components/OffsetWellChips/ChipsContainer.js +1 -1
- package/components/OffsetWellChips/types.d.ts +15 -17
- package/components/OffsetWellChips/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/cjs-bundle/components/OffsetWellChips/types.js +0 -1
- package/components/OffsetWellChips/types.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),i=require("react/jsx-runtime"),t=require("react"),
|
|
1
|
+
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),i=require("react/jsx-runtime"),t=require("react"),o=require("@material-ui/core"),r=require("@material-ui/icons"),s=require("./components/OffsetWellTruncatedText.js"),a=require("../../utils/main.js"),l=require("./icons/SubjectIcon.js"),n=o.makeStyles((function(e){return{chipRoot:{position:"relative",height:30,padding:"7px 12px",fontSize:12,color:e.palette.primary.text6,margin:"2px 4px","&:hover":{cursor:"pointer",backgroundColor:"rgba(255, 255, 255, 0.1)",color:e.palette.primary.contrastText}},root:{width:"100%",display:"flex",alignItems:"center"},label:{padding:0},mark:{display:function(e){return e.isShowMark?"block":"none"},marginRight:4,width:8,height:8,borderRadius:8,backgroundColor:function(e){return e.markColor}},subject:{display:"flex",marginRight:4},closeIcon:{fontSize:"1rem",marginLeft:"4px"},closeArea:{position:"absolute",top:0,right:0,width:32,height:30},tooltip:{marginTop:"8px"},titleContainer:{display:"flex",alignItems:"center"}}})),c=function(c){var u=c.title,m=c.onClick,p=c.markColor,d=c.isSubject,g=c.rigName,h=c.maxWidth,x=c.wellId,j=c.onRemoveOffsetWell,f=c.isShowMark,k=t.useState(null),b=k[0],C=k[1],_=n({markColor:p||"#".concat(a.getColorFromString(u)),isShowMark:f}),v=!!b,S=g?"".concat(u," | ").concat(g):u,q=i.jsxs("div",e.__assign({className:_.root},{children:[i.jsx(o.Tooltip,e.__assign({title:v?S:g,classes:{popper:_.tooltip}},{children:i.jsxs("div",e.__assign({className:_.titleContainer},{children:[d?i.jsx("span",e.__assign({className:_.subject},{children:i.jsx(l,{})})):i.jsx("span",{className:_.mark}),i.jsx(s,e.__assign({onTruncate:function(e){C(e)},truncatedText:b,maxWidth:h},{children:u}))]}))})),!d&&!!j&&i.jsxs(i.Fragment,{children:[i.jsx(r.Close,{className:_.closeIcon}),i.jsx(o.Tooltip,e.__assign({title:"Remove",classes:{popper:_.tooltip}},{children:i.jsx("div",{className:_.closeArea,onClick:function(e){e.stopPropagation(),j&&j(x)}})}))]})]}));return i.jsx(o.Chip,{"data-not-migrated-MuiChip":!0,variant:"outlined",size:"medium",label:q,classes:{root:_.chipRoot,label:_.label},onClick:function(e){return m&&m(e,x)}})};c.defaultProps={onClick:null,markColor:null,maxWidth:200,rigName:null,isShowMark:!0,onRemoveOffsetWell:null},module.exports=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),
|
|
1
|
+
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),i=require("react/jsx-runtime"),r=require("@material-ui/core"),l=require("./Chip.js"),t=r.makeStyles((function(){return{container:{display:"flex",flexWrap:"wrap",padding:"8px"}}}));module.exports=function(r){var a=r.wells,s=r.maxWidth,o=r.onRemoveOffsetWell,n=r.isShowMark,u=void 0===n||n,m=r.onChipClick,c=void 0===m?null:m,d=t();return i.jsx("div",e.__assign({className:d.container},{children:a.map((function(e){var r=e.wellId,t=e.title,a=e.isSubject,n=e.markColor,m=e.rigName;return i.jsx(l,{maxWidth:s,title:t,isSubject:a,markColor:n,rigName:m,wellId:r,onRemoveOffsetWell:o,isShowMark:u,onClick:c},r)}))}))};
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ChipProps } from './types';
|
|
3
3
|
declare const OffsetWellChip: {
|
|
4
|
-
({ title, onClick, markColor, isSubject, rigName, maxWidth, wellId, onRemoveOffsetWell, isShowMark, }: ChipProps): JSX.Element;
|
|
5
|
-
propTypes: {
|
|
6
|
-
title: import("prop-types").Validator<string>;
|
|
7
|
-
isSubject: import("prop-types").Validator<boolean>;
|
|
8
|
-
maxWidth: import("prop-types").Requireable<number>;
|
|
9
|
-
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
10
|
-
markColor: import("prop-types").Requireable<string>;
|
|
11
|
-
rigName: import("prop-types").Requireable<string>;
|
|
12
|
-
id: import("prop-types").Validator<string>;
|
|
13
|
-
wellId: import("prop-types").Validator<string>;
|
|
14
|
-
onRemoveOffsetWell: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
15
|
-
isShowMark: import("prop-types").Requireable<boolean>;
|
|
16
|
-
};
|
|
4
|
+
<T extends unknown>({ title, onClick, markColor, isSubject, rigName, maxWidth, wellId, onRemoveOffsetWell, isShowMark, }: ChipProps<T>): JSX.Element;
|
|
17
5
|
defaultProps: {
|
|
18
6
|
onClick: any;
|
|
19
7
|
markColor: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellChips/Chip.tsx"],"names":[],"mappings":";AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellChips/Chip.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,SAAS,EAAc,MAAM,SAAS,CAAC;AA0DhD,QAAA,MAAM,cAAc;6IAUF,WAAW;;;;;;;;;CA4D5B,CAAC;AAWF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as t,jsx as e,Fragment as r}from"react/jsx-runtime";import{useState as i}from"react";import{makeStyles as l,Tooltip as a,Chip as n}from"@material-ui/core";import{Close as s}from"@material-ui/icons";import c from"./components/OffsetWellTruncatedText.js";import m from"../../utils/main.js";import p from"./icons/SubjectIcon.js";var d=l((function(o){return{chipRoot:{position:"relative",height:30,padding:"7px 12px",fontSize:12,color:o.palette.primary.text6,margin:"2px 4px","&:hover":{cursor:"pointer",backgroundColor:"rgba(255, 255, 255, 0.1)",color:o.palette.primary.contrastText}},root:{width:"100%",display:"flex",alignItems:"center"},label:{padding:0},mark:{display:function(o){return o.isShowMark?"block":"none"},marginRight:4,width:8,height:8,borderRadius:8,backgroundColor:function(o){return o.markColor}},subject:{display:"flex",marginRight:4},closeIcon:{fontSize:"1rem",marginLeft:"4px"},closeArea:{position:"absolute",top:0,right:0,width:32,height:30},tooltip:{marginTop:"8px"},titleContainer:{display:"flex",alignItems:"center"}}})),u=function(l){var u=l.title,h=l.onClick,f=l.markColor,g=l.isSubject,x=l.rigName,k=l.maxWidth,b=l.wellId,C=l.onRemoveOffsetWell,v=l.isShowMark,j=i(null),S=j[0],w=j[1],N=d({markColor:f||"#".concat(m.getColorFromString(u)),isShowMark:v}),R=!!S,y=x?"".concat(u," | ").concat(x):u,I=t("div",o({className:N.root},{children:[e(a,o({title:R?y:x,classes:{popper:N.tooltip}},{children:t("div",o({className:N.titleContainer},{children:[e("span",g?o({className:N.subject},{children:e(p,{})}):{className:N.mark}),e(c,o({onTruncate:function(o){w(o)},truncatedText:S,maxWidth:k},{children:u}))]}))})),!g&&!!C&&t(r,{children:[e(s,{className:N.closeIcon}),e(a,o({title:"Remove",classes:{popper:N.tooltip}},{children:e("div",{className:N.closeArea,onClick:function(o){o.stopPropagation(),C&&C(b)}})}))]})]}));return e(n,{"data-not-migrated-MuiChip":!0,variant:"outlined",size:"medium",label:I,classes:{root:N.chipRoot,label:N.label},onClick:function(o){return h&&h(o,b)}})};u.defaultProps={onClick:null,markColor:null,maxWidth:200,rigName:null,isShowMark:!0,onRemoveOffsetWell:null};export{u as default};
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import { ChipsContainerProps } from './types';
|
|
4
|
-
declare const OffsetWellChips: {
|
|
5
|
-
({ wells, maxWidth, onRemoveOffsetWell, isShowMark, }: ChipsContainerProps): JSX.Element;
|
|
6
|
-
propTypes: {
|
|
7
|
-
wells: PropTypes.Validator<PropTypes.InferProps<{
|
|
8
|
-
title: PropTypes.Requireable<string>;
|
|
9
|
-
id: PropTypes.Requireable<number>;
|
|
10
|
-
rigName: PropTypes.Requireable<string>;
|
|
11
|
-
isSubject: PropTypes.Requireable<boolean>;
|
|
12
|
-
markColor: PropTypes.Requireable<string>;
|
|
13
|
-
}>[]>;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
3
|
+
declare const OffsetWellChips: <T extends unknown>({ wells, maxWidth, onRemoveOffsetWell, isShowMark, onChipClick, }: ChipsContainerProps<T>) => JSX.Element;
|
|
16
4
|
export default OffsetWellChips;
|
|
17
5
|
//# sourceMappingURL=ChipsContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipsContainer.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellChips/ChipsContainer.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ChipsContainer.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellChips/ChipsContainer.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAU9C,QAAA,MAAM,eAAe,oHAMO,WAqB3B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r}from"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import o from"./Chip.js";var t=i((function(){return{container:{display:"flex",flexWrap:"wrap",padding:"8px"}}})),l=function(i){var l=i.wells,a=i.maxWidth,n=i.onRemoveOffsetWell,m=i.isShowMark,s=void 0===m||m,d=i.onChipClick,f=void 0===d?null:d,c=t();return r("div",e({className:c.container},{children:l.map((function(e){var i=e.wellId,t=e.title,l=e.isSubject,m=e.markColor,d=e.rigName;return r(o,{maxWidth:a,title:t,isSubject:l,markColor:m,rigName:d,wellId:i,onRemoveOffsetWell:n,isShowMark:s,onClick:f},i)}))}))};export{l as default};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
title:
|
|
4
|
-
isSubject
|
|
5
|
-
maxWidth
|
|
6
|
-
onClick:
|
|
7
|
-
markColor
|
|
8
|
-
rigName
|
|
9
|
-
|
|
10
|
-
wellId:
|
|
11
|
-
|
|
12
|
-
isShowMark: PropTypes.Requireable<boolean>;
|
|
13
|
-
};
|
|
14
|
-
export interface ChipProps extends PropTypes.InferProps<typeof offsetWellChipPropTypes> {
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
export interface ChipProps<T> {
|
|
3
|
+
title: string;
|
|
4
|
+
isSubject?: boolean;
|
|
5
|
+
maxWidth?: number;
|
|
6
|
+
onClick?: (e: MouseEvent<HTMLDivElement>, wellId: T) => void;
|
|
7
|
+
markColor?: string;
|
|
8
|
+
rigName?: string;
|
|
9
|
+
wellId: T;
|
|
10
|
+
onRemoveOffsetWell?: (wellId: T) => void;
|
|
11
|
+
isShowMark?: boolean;
|
|
15
12
|
}
|
|
16
|
-
export interface ChipsContainerProps {
|
|
17
|
-
wells: ChipProps[];
|
|
13
|
+
export interface ChipsContainerProps<T> {
|
|
14
|
+
wells: ChipProps<T>[];
|
|
18
15
|
maxWidth?: number;
|
|
19
|
-
onRemoveOffsetWell
|
|
16
|
+
onRemoveOffsetWell?: (wellId: T) => void;
|
|
20
17
|
isShowMark?: boolean;
|
|
18
|
+
onChipClick: (e: MouseEvent<HTMLDivElement>, wellId: T) => void;
|
|
21
19
|
}
|
|
22
20
|
export interface StyleProps {
|
|
23
21
|
markColor: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellChips/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellChips/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,CAAC;IACV,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AACD,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;CACjE;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("prop-types")),i={title:t.default.string.isRequired,isSubject:t.default.bool.isRequired,maxWidth:t.default.number,onClick:t.default.func,markColor:t.default.string,rigName:t.default.string,id:t.default.string.isRequired,wellId:t.default.string.isRequired,onRemoveOffsetWell:t.default.func,isShowMark:t.default.bool};exports.offsetWellChipPropTypes=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import i from"prop-types";var e={title:i.string.isRequired,isSubject:i.bool.isRequired,maxWidth:i.number,onClick:i.func,markColor:i.string,rigName:i.string,id:i.string.isRequired,wellId:i.string.isRequired,onRemoveOffsetWell:i.func,isShowMark:i.bool};export{e as offsetWellChipPropTypes};
|