@corva/ui 0.107.0-0 → 0.107.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/componentsV2/AppHeader/AppHeader.js +1 -1
- package/componentsV2/AppHeader/AppHeader.d.ts +2 -1
- package/componentsV2/AppHeader/AppHeader.d.ts.map +1 -1
- package/componentsV2/AppHeader/AppHeader.js +1 -1
- package/componentsV2/AppHeader/AppHeader.stories.d.ts +1 -0
- package/componentsV2/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("classnames"),s=require("react"),t=require("lodash"),r=require("../Header/Header.js"),n=require("../TextEndTruncated/TextEndTruncated.js"),i=require("../../utils/devcenter.js"),l=require("../../constants/segment.js"),d=require("../../components/DevCenter/DevCenterAppContainer/components/AppCommons/AppCommonsContext.js"),o=require("./AppBadge/AppBadge.js"),p=require("./AppAssets/AppAssets.js"),u=require("./PadMode/PadMode.js"),c=require("./AppHeader.scss.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=m(a);exports.AppHeader=function(a){var m,v,j,f=a.className,x=a.testId,A=a.logo,C=a.children,N=a.padModeDisabled,h=a.padModeWells,q=a.onPadModeChange,M=a.elementsClassNames,T=d.useAppCommons(),E
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("classnames"),s=require("react"),t=require("lodash"),r=require("../Header/Header.js"),n=require("../TextEndTruncated/TextEndTruncated.js"),i=require("../../utils/devcenter.js"),l=require("../../constants/segment.js"),d=require("../../components/DevCenter/DevCenterAppContainer/components/AppCommons/AppCommonsContext.js"),o=require("./AppBadge/AppBadge.js"),p=require("./AppAssets/AppAssets.js"),u=require("./PadMode/PadMode.js"),c=require("./AppHeader.scss.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=m(a);exports.AppHeader=function(a){var m,v,j,f=a.className,x=a.testId,A=a.logo,C=a.children,N=a.padModeDisabled,h=a.padModeWells,q=a.onPadModeChange,M=a.elementsClassNames,T=a.title,E=d.useAppCommons(),S=E.app,w=E.rig,P=E.well,H=E.fracFleet,y=E.wells,B=E.onSettingChange,b=E.appSettings,D=void 0===b?{}:b,F=h||y,O=i.getAppSegment(S),I=(null===(j=null===(v=null===(m=null==S?void 0:S.package)||void 0===m?void 0:m.manifest)||void 0===v?void 0:v.application)||void 0===j?void 0:j.name)||(null==S?void 0:S.name),L=!(N||O!==l.SEGMENTS.COMPLETION||P||t.isEmpty(F)||!H),_=s.useMemo((function(){return q?function(e,a){return q(a)}:B}),[q,B]);return e.jsxs("div",{className:g.default(c.root,f),"data-testid":x,children:[e.jsxs(r.Header,{className:g.default(c.logoTitleBadgeContainer,null==M?void 0:M.title),appearance:"appName",children:[A&&e.jsx("div",{className:c.logoContainer,children:"string"==typeof A?e.jsx("img",{className:c.logo,src:A,alt:"Logo"}):A}),e.jsx(n.TextEndTruncated,{className:c.appName,children:T||I}),e.jsx(o.AppBadge,{app:S})]}),(C||L)&&e.jsxs("div",{className:g.default(c.additional,null==M?void 0:M.additional),children:[L&&e.jsx(u.PadMode,{app:S,appSettings:D,fracFleet:H,onSettingChange:_,well:P,wells:F}),C]}),e.jsx("div",{className:g.default(c.assetChips,null==M?void 0:M.chips),children:e.jsx(p.AppAssets,{app:S,fracFleet:H,rig:w,well:P,forceNarrow:L||!!C})})]})};
|
|
@@ -30,8 +30,9 @@ export type AppHeaderProps = {
|
|
|
30
30
|
additional?: string;
|
|
31
31
|
chips?: string;
|
|
32
32
|
};
|
|
33
|
+
title?: ReactNode;
|
|
33
34
|
className?: string;
|
|
34
35
|
testId?: string;
|
|
35
36
|
};
|
|
36
|
-
export declare const AppHeader: ({ className, testId, logo, children, padModeDisabled, padModeWells, onPadModeChange, elementsClassNames, }: AppHeaderProps) => JSX.Element;
|
|
37
|
+
export declare const AppHeader: ({ className, testId, logo, children, padModeDisabled, padModeWells, onPadModeChange, elementsClassNames, title, }: AppHeaderProps) => JSX.Element;
|
|
37
38
|
//# sourceMappingURL=AppHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/AppHeader/AppHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAOzE,OAAO,EAAE,aAAa,EAAE,MAAM,0FAA0F,CAAC;AAQzH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC;IAEzD;;;;;;OAMG;IAEH,eAAe,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,kBAAkB,CAAC,EAAE;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/AppHeader/AppHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAOzE,OAAO,EAAE,aAAa,EAAE,MAAM,0FAA0F,CAAC;AAQzH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC;IAEzD;;;;;;OAMG;IAEH,eAAe,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,kBAAkB,CAAC,EAAE;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,SAAS,sHAUnB,cAAc,gBAwEhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import a from"classnames";import{useMemo as t}from"react";import{isEmpty as n}from"lodash";import{Header as r}from"../Header/Header.js";import{TextEndTruncated as
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import a from"classnames";import{useMemo as t}from"react";import{isEmpty as n}from"lodash";import{Header as r}from"../Header/Header.js";import{TextEndTruncated as i}from"../TextEndTruncated/TextEndTruncated.js";import{getAppSegment as s}from"../../utils/devcenter.js";import{SEGMENTS as l}from"../../constants/segment.js";import{useAppCommons as p}from"../../components/DevCenter/DevCenterAppContainer/components/AppCommons/AppCommonsContext.js";import{AppBadge as d}from"./AppBadge/AppBadge.js";import{AppAssets as m}from"./AppAssets/AppAssets.js";import{PadMode as c}from"./PadMode/PadMode.js";import f from"./AppHeader.scss.js";var g=function(g){var v,u,C,h=g.className,N=g.testId,j=g.logo,A=g.children,w=g.padModeDisabled,M=g.padModeWells,T=g.onPadModeChange,x=g.elementsClassNames,P=g.title,S=p(),B=S.app,D=S.rig,E=S.well,F=S.fracFleet,H=S.wells,I=S.onSettingChange,L=S.appSettings,O=void 0===L?{}:L,b=M||H,k=s(B),y=(null===(C=null===(u=null===(v=null==B?void 0:B.package)||void 0===v?void 0:v.manifest)||void 0===u?void 0:u.application)||void 0===C?void 0:C.name)||(null==B?void 0:B.name),W=!(w||k!==l.COMPLETION||E||n(b)||!F),q=t((function(){return T?function(e,o){return T(o)}:I}),[T,I]);return e("div",{className:a(f.root,h),"data-testid":N,children:[e(r,{className:a(f.logoTitleBadgeContainer,null==x?void 0:x.title),appearance:"appName",children:[j&&o("div",{className:f.logoContainer,children:"string"==typeof j?o("img",{className:f.logo,src:j,alt:"Logo"}):j}),o(i,{className:f.appName,children:P||y}),o(d,{app:B})]}),(A||W)&&e("div",{className:a(f.additional,null==x?void 0:x.additional),children:[W&&o(c,{app:B,appSettings:O,fracFleet:F,onSettingChange:q,well:E,wells:b}),A]}),o("div",{className:a(f.assetChips,null==x?void 0:x.chips),children:o(m,{app:B,fracFleet:F,rig:D,well:E,forceNarrow:W||!!A})})]})};export{g as AppHeader};
|
|
@@ -11,5 +11,6 @@ export declare const Completions: () => JSX.Element;
|
|
|
11
11
|
export declare const WithCustomPadWells: () => JSX.Element;
|
|
12
12
|
export declare const WithCustomPadModeChangeHandler: () => JSX.Element;
|
|
13
13
|
export declare const CorvaV3HiddenChips: () => JSX.Element;
|
|
14
|
+
export declare const WithCustomTitle: () => JSX.Element;
|
|
14
15
|
export declare const Responsiveness: () => JSX.Element;
|
|
15
16
|
//# sourceMappingURL=AppHeader.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/AppHeader/AppHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAUjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAiG9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppHeader.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/AppHeader/AppHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAUjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAiG9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAmBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAInC,CAAC;AAEF,eAAO,MAAM,aAAa,mBA0CzB,CAAC;AAOF,eAAO,MAAM,QAAQ,mBAIpB,CAAC;AAMF,eAAO,MAAM,WAAW,mBA+CvB,CAAC;AAOF,eAAO,MAAM,kBAAkB,mBAqB9B,CAAC;AAOF,eAAO,MAAM,8BAA8B,mBAkB1C,CAAC;AAOF,eAAO,MAAM,kBAAkB,mBA0B9B,CAAC;AAYF,eAAO,MAAM,eAAe,mBAU3B,CAAC;AAMF,eAAO,MAAM,cAAc,mBAoI1B,CAAC"}
|