@elliemae/ds-page-header 3.16.0-next.1 → 3.16.0-next.3
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/dist/cjs/v1/DSPageHeader.js +18 -18
- package/dist/cjs/v1/DSPageHeader.js.map +2 -2
- package/dist/cjs/v2/PageHeader.js +2 -2
- package/dist/cjs/v2/PageHeader.js.map +2 -2
- package/dist/cjs/v2/components/PageHeaderEditableTitle.js +7 -6
- package/dist/cjs/v2/components/PageHeaderEditableTitle.js.map +2 -2
- package/dist/cjs/v2/components/PageHeaderSummary.js +4 -4
- package/dist/cjs/v2/components/PageHeaderSummary.js.map +2 -2
- package/dist/cjs/v2/components/PageHeaderTitle.js +4 -4
- package/dist/cjs/v2/components/PageHeaderTitle.js.map +2 -2
- package/dist/cjs/v2/config/usePageHeader.js +5 -5
- package/dist/cjs/v2/config/usePageHeader.js.map +2 -2
- package/dist/cjs/v2/react-desc-prop-types.js +16 -16
- package/dist/cjs/v2/react-desc-prop-types.js.map +2 -2
- package/dist/esm/v1/DSPageHeader.js +1 -1
- package/dist/esm/v1/DSPageHeader.js.map +1 -1
- package/dist/esm/v2/PageHeader.js +1 -1
- package/dist/esm/v2/PageHeader.js.map +1 -1
- package/dist/esm/v2/components/PageHeaderEditableTitle.js +2 -8
- package/dist/esm/v2/components/PageHeaderEditableTitle.js.map +2 -2
- package/dist/esm/v2/components/PageHeaderSummary.js +1 -1
- package/dist/esm/v2/components/PageHeaderSummary.js.map +1 -1
- package/dist/esm/v2/components/PageHeaderTitle.js +1 -1
- package/dist/esm/v2/components/PageHeaderTitle.js.map +1 -1
- package/dist/esm/v2/config/usePageHeader.js +1 -1
- package/dist/esm/v2/config/usePageHeader.js.map +2 -2
- package/dist/esm/v2/react-desc-prop-types.js +1 -1
- package/dist/esm/v2/react-desc-prop-types.js.map +1 -1
- package/dist/types/v1/DSPageHeader.d.ts +16 -16
- package/dist/types/v2/PageHeader.d.ts +1 -1
- package/dist/types/v2/components/PageHeaderEditableTitle.d.ts +1 -1
- package/dist/types/v2/components/PageHeaderSummary.d.ts +1 -1
- package/dist/types/v2/components/PageHeaderTitle.d.ts +1 -1
- package/dist/types/v2/config/usePageHeader.d.ts +2 -2
- package/dist/types/v2/react-desc-prop-types.d.ts +377 -378
- package/package.json +15 -14
|
@@ -31,7 +31,7 @@ __export(DSPageHeader_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(DSPageHeader_exports);
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
34
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
35
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
36
36
|
var import_PageHeaderImpl = __toESM(require("./PageHeaderImpl"));
|
|
37
37
|
const DSPageHeader = ({
|
|
@@ -73,26 +73,26 @@ const DSPageHeader = ({
|
|
|
73
73
|
}
|
|
74
74
|
) });
|
|
75
75
|
const props = {
|
|
76
|
-
version:
|
|
77
|
-
containerProps:
|
|
78
|
-
renderToolbar:
|
|
79
|
-
withBottomSeparator:
|
|
80
|
-
title:
|
|
81
|
-
titleOptions:
|
|
82
|
-
onSelectOption:
|
|
83
|
-
subtitle:
|
|
84
|
-
optionsSelection:
|
|
85
|
-
editable:
|
|
86
|
-
editing:
|
|
87
|
-
titleInputProps:
|
|
88
|
-
previousPage:
|
|
89
|
-
onGoToPreviousPage:
|
|
90
|
-
zIndex:
|
|
91
|
-
optionsMinWidth:
|
|
76
|
+
version: import_ds_props_helpers.PropTypes.oneOf([1, 2]).description("Component version"),
|
|
77
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("props injected to page header wrapper node"),
|
|
78
|
+
renderToolbar: import_ds_props_helpers.PropTypes.func.description("Function that returns the toolbar to the right of the page header"),
|
|
79
|
+
withBottomSeparator: import_ds_props_helpers.PropTypes.bool.description("Whether to show a separator at the bottom of the header"),
|
|
80
|
+
title: import_ds_props_helpers.PropTypes.string.description("The page header title"),
|
|
81
|
+
titleOptions: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description("The title dropdown options"),
|
|
82
|
+
onSelectOption: import_ds_props_helpers.PropTypes.func.description("Handler when a user selects an item in the dropdown menu"),
|
|
83
|
+
subtitle: import_ds_props_helpers.PropTypes.string.description("Description text below the title"),
|
|
84
|
+
optionsSelection: import_ds_props_helpers.PropTypes.object.description("Selection state for the title dropdown"),
|
|
85
|
+
editable: import_ds_props_helpers.PropTypes.bool.description("Whether the title is editable or not"),
|
|
86
|
+
editing: import_ds_props_helpers.PropTypes.bool.description("Activates/Deactivates the editing state in the title"),
|
|
87
|
+
titleInputProps: import_ds_props_helpers.PropTypes.object.description("Props passed to the input for editing the title"),
|
|
88
|
+
previousPage: import_ds_props_helpers.PropTypes.object.description("Enables navigation to previous page with back-arrow"),
|
|
89
|
+
onGoToPreviousPage: import_ds_props_helpers.PropTypes.func.description("Callback to handle navigation to previous page"),
|
|
90
|
+
zIndex: import_ds_props_helpers.PropTypes.number.description("z-index to use for the DropdownMenu"),
|
|
91
|
+
optionsMinWidth: import_ds_props_helpers.PropTypes.number.description("min width for options dropdown menu")
|
|
92
92
|
};
|
|
93
93
|
DSPageHeader.propTypes = props;
|
|
94
94
|
DSPageHeader.displayName = "DSPageHeader";
|
|
95
|
-
const DSPageHeaderV1WithSchema = (0,
|
|
95
|
+
const DSPageHeaderV1WithSchema = (0, import_ds_props_helpers.describe)(DSPageHeader).deprecated("use DSPageHeaderV2");
|
|
96
96
|
DSPageHeaderV1WithSchema.propTypes = props;
|
|
97
97
|
var DSPageHeader_default = DSPageHeader;
|
|
98
98
|
//# sourceMappingURL=DSPageHeader.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/DSPageHeader.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBnB;AAvBJ,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport PageHeaderImpl from './PageHeaderImpl';\n\nconst DSPageHeader = ({\n containerProps = {},\n renderToolbar = undefined,\n withBottomSeparator = true,\n title = '',\n titleOptions = undefined,\n onSelectOption = () => null,\n subtitle = '',\n optionsSelection = {},\n onGoToPreviousPage = () => null,\n previousPage,\n editable = false,\n editing = undefined,\n titleInputProps = {},\n zIndex = 2,\n optionsMinWidth = undefined,\n ...otherProps\n}) => (\n <TooltipTextProvider>\n <PageHeaderImpl\n containerProps={containerProps}\n editable={editable}\n editing={editing}\n onGoToPreviousPage={onGoToPreviousPage}\n onSelectOption={onSelectOption}\n optionsMinWidth={optionsMinWidth}\n optionsSelection={optionsSelection}\n previousPage={previousPage}\n renderToolbar={renderToolbar}\n subtitle={subtitle}\n title={title}\n titleInputProps={titleInputProps}\n titleOptions={titleOptions}\n withBottomSeparator={withBottomSeparator}\n zIndex={zIndex}\n {...otherProps}\n />\n </TooltipTextProvider>\n);\n\nconst props = {\n /* Component version */\n version: PropTypes.oneOf([1, 2]).description('Component version'),\n /* props injected to page header wrapper node */\n containerProps: PropTypes.object.description('props injected to page header wrapper node'),\n /* Function that returns the toolbar to the right of the page header */\n renderToolbar: PropTypes.func.description('Function that returns the toolbar to the right of the page header'),\n /* Whether to show a separator at the bottom of the header */\n withBottomSeparator: PropTypes.bool.description('Whether to show a separator at the bottom of the header'),\n /* The page header title */\n title: PropTypes.string.description('The page header title'),\n /* The title dropdown options */\n titleOptions: PropTypes.arrayOf(PropTypes.object).description('The title dropdown options'),\n /* Handler when a user selects an item in the dropdown menu */\n onSelectOption: PropTypes.func.description('Handler when a user selects an item in the dropdown menu'),\n /* Description text below the title */\n subtitle: PropTypes.string.description('Description text below the title'),\n /* Selection state for the title dropdown */\n optionsSelection: PropTypes.object.description('Selection state for the title dropdown'),\n /* Whether the title is editable or not */\n editable: PropTypes.bool.description('Whether the title is editable or not'),\n /* Activates/Deactivates the editing state in the title */\n editing: PropTypes.bool.description('Activates/Deactivates the editing state in the title'),\n /* Props passed to the input for editing the title */\n titleInputProps: PropTypes.object.description('Props passed to the input for editing the title'),\n /* Enables navigation to previous page with back-arrow */\n previousPage: PropTypes.object.description('Enables navigation to previous page with back-arrow'),\n /* Callback to handle navigation to previous page */\n onGoToPreviousPage: PropTypes.func.description('Callback to handle navigation to previous page'),\n /* z-index to use for the DropdownMenu */\n zIndex: PropTypes.number.description('z-index to use for the DropdownMenu'),\n /** min width for options dropdown menu */\n optionsMinWidth: PropTypes.number.description('min width for options dropdown menu'),\n};\n\nDSPageHeader.propTypes = props;\nDSPageHeader.displayName = 'DSPageHeader';\nconst DSPageHeaderV1WithSchema = describe(DSPageHeader).deprecated('use DSPageHeaderV2');\nDSPageHeaderV1WithSchema.propTypes = props;\n\nexport { DSPageHeader, DSPageHeaderV1WithSchema };\nexport default DSPageHeader;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBnB;AAvBJ,8BAAoC;AACpC,uCAAoC;AACpC,4BAA2B;AAE3B,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA,EACtB,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,iBAAiB,MAAM;AAAA,EACvB,WAAW;AAAA,EACX,mBAAmB,CAAC;AAAA,EACpB,qBAAqB,MAAM;AAAA,EAC3B;AAA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;AAC3B,MAAM,+BAA2B,kCAAS,YAAY,EAAE,WAAW,oBAAoB;AACvF,yBAAyB,YAAY;AAGrC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["PageHeaderImpl"]
|
|
7
7
|
}
|
|
@@ -36,7 +36,7 @@ __export(PageHeader_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(PageHeader_exports);
|
|
37
37
|
var React = __toESM(require("react"));
|
|
38
38
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
var
|
|
39
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
40
40
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
41
41
|
var import_lodash = require("lodash");
|
|
42
42
|
var import_styled = require("./styled");
|
|
@@ -90,7 +90,7 @@ const DSPageHeaderV2 = (props) => {
|
|
|
90
90
|
DSPageHeaderV2.propTypes = import_react_desc_prop_types.PageHeaderPropTypes;
|
|
91
91
|
DSPageHeaderV2.defaultProps = import_react_desc_prop_types.defaultProps;
|
|
92
92
|
DSPageHeaderV2.displayName = import_exported_related.DSPageHeaderName;
|
|
93
|
-
const DSPageHeaderWithSchema = (0,
|
|
93
|
+
const DSPageHeaderWithSchema = (0, import_ds_props_helpers.describe)(DSPageHeaderV2);
|
|
94
94
|
DSPageHeaderWithSchema.propTypes = import_react_desc_prop_types.PageHeaderPropTypes;
|
|
95
95
|
var PageHeader_default = DSPageHeaderV2;
|
|
96
96
|
//# sourceMappingURL=PageHeader.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/PageHeader.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDX;AA9CZ,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { compact } from 'lodash';\nimport {\n Container,\n ContainerWBorder,\n PageHeaderCustomRenderer,\n PageHeaderToolbarWrapper,\n PageHeaderMenu,\n PageHeaderBack,\n} from './styled';\nimport { usePageHeader } from './config/usePageHeader';\nimport { PageHeaderTitle } from './components/PageHeaderTitle';\nimport { PageHeaderEditableTitle } from './components/PageHeaderEditableTitle';\nimport { PageHeaderSummary } from './components/PageHeaderSummary';\nimport type { DSPageHeaderT } from './react-desc-prop-types';\nimport { PageHeaderPropTypes, defaultProps } from './react-desc-prop-types';\nimport { DSPageHeaderDataTestIds, DSPageHeaderName } from './exported-related';\n\nconst DSPageHeaderV2: React.ComponentType<DSPageHeaderT.Props> = (props) => {\n const {\n currentBackArrow,\n currentMenu,\n currentBreadcrumbs,\n currentSummary,\n currentToolbar,\n currentPageTitle,\n containerProps,\n withBottomSeparator,\n globalAttributes,\n xStyledProps,\n } = usePageHeader(props);\n\n const wrapperRow = ['auto', 1];\n const mainRow = compact([1, 'auto']);\n const pageTitleRow = compact(['auto', currentMenu && '30px', currentSummary && 'auto', 1]);\n return (\n <Container\n {...containerProps}\n {...globalAttributes}\n {...xStyledProps}\n data-testid={DSPageHeaderDataTestIds.CONTAINER}\n >\n <ContainerWBorder withBottomSeparator={withBottomSeparator}>\n <Grid cols={wrapperRow}>\n <Grid>\n <PageHeaderBack>{currentBackArrow}</PageHeaderBack>\n </Grid>\n <Grid rows={['auto', 'auto']}>\n <Grid className=\"em-ds-page-header-v2-breadcrumb\">{currentBreadcrumbs}</Grid>\n <Grid cols={mainRow}>\n <Grid cols={pageTitleRow}>\n {currentPageTitle}\n {currentMenu && <PageHeaderMenu>{currentMenu}</PageHeaderMenu>}\n {currentSummary}\n <div />\n </Grid>\n <Grid>\n <PageHeaderToolbarWrapper>{currentToolbar}</PageHeaderToolbarWrapper>\n </Grid>\n </Grid>\n </Grid>\n </Grid>\n </ContainerWBorder>\n </Container>\n );\n};\n\nDSPageHeaderV2.propTypes = PageHeaderPropTypes as WeakValidationMap<unknown>;\nDSPageHeaderV2.defaultProps = defaultProps;\nDSPageHeaderV2.displayName = DSPageHeaderName;\nconst DSPageHeaderWithSchema = describe(DSPageHeaderV2);\n\nDSPageHeaderWithSchema.propTypes = PageHeaderPropTypes as WeakValidationMap<unknown>;\n\nexport {\n DSPageHeaderV2,\n PageHeaderTitle,\n PageHeaderEditableTitle,\n PageHeaderSummary,\n PageHeaderMenu,\n PageHeaderCustomRenderer,\n DSPageHeaderWithSchema,\n};\n\nexport default DSPageHeaderV2;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDX;AA9CZ,8BAAyB;AACzB,qBAAqB;AACrB,oBAAwB;AACxB,oBAOO;AACP,2BAA8B;AAC9B,6BAAgC;AAChC,qCAAwC;AACxC,+BAAkC;AAElC,mCAAkD;AAClD,8BAA0D;AAE1D,MAAM,iBAA2D,CAAC,UAAU;AAC1E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,oCAAc,KAAK;AAEvB,QAAM,aAAa,CAAC,QAAQ,CAAC;AAC7B,QAAM,cAAU,uBAAQ,CAAC,GAAG,MAAM,CAAC;AACnC,QAAM,mBAAe,uBAAQ,CAAC,QAAQ,eAAe,QAAQ,kBAAkB,QAAQ,CAAC,CAAC;AACzF,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,eAAa,gDAAwB;AAAA,MAErC,sDAAC,kCAAiB,qBAChB,uDAAC,uBAAK,MAAM,YACV;AAAA,oDAAC,uBACC,sDAAC,gCAAgB,4BAAiB,GACpC;AAAA,QACA,6CAAC,uBAAK,MAAM,CAAC,QAAQ,MAAM,GACzB;AAAA,sDAAC,uBAAK,WAAU,mCAAmC,8BAAmB;AAAA,UACtE,6CAAC,uBAAK,MAAM,SACV;AAAA,yDAAC,uBAAK,MAAM,cACT;AAAA;AAAA,cACA,eAAe,4CAAC,gCAAgB,uBAAY;AAAA,cAC5C;AAAA,cACD,4CAAC,SAAI;AAAA,eACP;AAAA,YACA,4CAAC,uBACC,sDAAC,0CAA0B,0BAAe,GAC5C;AAAA,aACF;AAAA,WACF;AAAA,SACF,GACF;AAAA;AAAA,EACF;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B,MAAM,6BAAyB,kCAAS,cAAc;AAEtD,uBAAuB,YAAY;AAYnC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -34,6 +34,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
34
34
|
var import_react = require("react");
|
|
35
35
|
var import_ds_form_input_text = require("@elliemae/ds-form-input-text");
|
|
36
36
|
var import_ds_system = require("@elliemae/ds-system");
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
38
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
38
39
|
var import_PageHeaderTitle = require("./PageHeaderTitle");
|
|
39
40
|
var import_exported_related = require("../exported-related");
|
|
@@ -80,7 +81,7 @@ const PageHeaderEditableTitle = ({
|
|
|
80
81
|
const handleOnMouseOut = (0, import_react.useCallback)(() => {
|
|
81
82
|
setHovered(false);
|
|
82
83
|
}, []);
|
|
83
|
-
const globals = (0,
|
|
84
|
+
const globals = (0, import_ds_props_helpers.useGetGlobalAttributes)(rest, {
|
|
84
85
|
onFocus: handleOnFocus,
|
|
85
86
|
onMouseOut: handleOnMouseOut,
|
|
86
87
|
onChange: handleOnChange,
|
|
@@ -111,14 +112,14 @@ const PageHeaderEditableTitle = ({
|
|
|
111
112
|
);
|
|
112
113
|
};
|
|
113
114
|
const props = {
|
|
114
|
-
...
|
|
115
|
-
children:
|
|
116
|
-
editing:
|
|
117
|
-
showMarker:
|
|
115
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
116
|
+
children: import_ds_props_helpers.PropTypes.string.description("The title text"),
|
|
117
|
+
editing: import_ds_props_helpers.PropTypes.bool.description("Whether the title is editing or not"),
|
|
118
|
+
showMarker: import_ds_props_helpers.PropTypes.bool.description("Show error marker")
|
|
118
119
|
};
|
|
119
120
|
PageHeaderEditableTitle.propTypes = props;
|
|
120
121
|
PageHeaderEditableTitle.displayName = "PageHeaderEditableTitle";
|
|
121
|
-
const DSPageHeaderEditableTitleWithSchema = (0,
|
|
122
|
+
const DSPageHeaderEditableTitleWithSchema = (0, import_ds_props_helpers.describe)(PageHeaderEditableTitle);
|
|
122
123
|
DSPageHeaderEditableTitleWithSchema.propTypes = props;
|
|
123
124
|
var PageHeaderEditableTitle_default = PageHeaderEditableTitle;
|
|
124
125
|
//# sourceMappingURL=PageHeaderEditableTitle.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/v2/components/PageHeaderEditableTitle.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React, { useRef, useState, useCallback } from 'react';\nimport { DSInputText, DSInputTextName, DSInputTextSlots } from '@elliemae/ds-form-input-text';\nimport { styled } from '@elliemae/ds-system';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React, { useRef, useState, useCallback } from 'react';\nimport { DSInputText, DSInputTextName, DSInputTextSlots } from '@elliemae/ds-form-input-text';\nimport { styled } from '@elliemae/ds-system';\nimport { PropTypes, describe, useGetGlobalAttributes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { useDerivedStateFromProps, useMeasure } from '@elliemae/ds-utilities';\nimport { PageHeaderTitle } from './PageHeaderTitle';\nimport { DSPageHeaderDataTestIds } from '../exported-related';\n\nconst EditableContainer = styled('div')`\n height: 32px;\n position: relative;\n overflow: hidden;\n &.editable-title-component {\n position: relative;\n left: -7px;\n top: -1px;\n margin-left: -2px;\n margin-right: -9px;\n & .${DSInputTextName}-${DSInputTextSlots.INPUT_WRAPPER} {\n height: 32px;\n }\n & .${DSInputTextName}-${DSInputTextSlots.INPUT} {\n font-size: ${({ theme }) => theme.fontSizes.title[800]};\n line-height: normal;\n color: ${({ theme }) => theme.colors.neutral['700']};\n }\n }\n`;\n\nexport const PageHeaderEditableTitle = ({\n children: value,\n editing: editingProp = false,\n showMarker = false,\n ...rest\n}) => {\n const [titleValue, setTitleValue] = useState(value);\n const [hovered, setHovered] = useState(false);\n const [editing, setEditing] = useDerivedStateFromProps(editingProp || false);\n const titleRef = useRef(null);\n const { width } = useMeasure(titleRef);\n\n const handleOnChange: React.FormEventHandler<HTMLInputElement> = useCallback((e) => {\n setTitleValue(e.target.value);\n }, []);\n\n const handleOnFocus: React.FocusEventHandler = useCallback(() => {\n setEditing(true);\n }, [setEditing]);\n\n const handleOnBlur: React.FocusEventHandler = useCallback(() => {\n setEditing(false);\n }, [setEditing]);\n\n const handleOnMouseOut: React.MouseEventHandler = useCallback(() => {\n setHovered(false);\n }, []);\n\n const globals = useGetGlobalAttributes(rest, {\n onFocus: handleOnFocus,\n onMouseOut: handleOnMouseOut,\n onChange: handleOnChange,\n onBlur: handleOnBlur,\n });\n\n return (\n <EditableContainer\n className={hovered || editing ? 'editable-title-component' : ''}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n data-testid={DSPageHeaderDataTestIds.EDITABLE_HEADER_TITLE}\n >\n {(hovered || editing) && (\n <DSInputText\n onChange={handleOnChange}\n {...rest}\n {...globals}\n placeholder=\"\"\n style={{ width: width + 10, minWidth: '260px', maxWidth: '100%' }}\n value={titleValue}\n />\n )}\n <div ref={titleRef} style={{ width: 'fit-content' }}>\n <PageHeaderTitle showMarker={showMarker && !hovered && !editing}>{titleValue}</PageHeaderTitle>\n </div>\n </EditableContainer>\n );\n};\n\nconst props = {\n ...globalAttributesPropTypes,\n /** The title text */\n children: PropTypes.string.description('The title text'),\n /** Whether the title is editing or not */\n editing: PropTypes.bool.description('Whether the title is editing or not'),\n /** Show error marker */\n showMarker: PropTypes.bool.description('Show error marker'),\n};\n\nPageHeaderEditableTitle.propTypes = props as WeakValidationMap<unknown>;\nPageHeaderEditableTitle.displayName = 'PageHeaderEditableTitle';\nconst DSPageHeaderEditableTitleWithSchema = describe(PageHeaderEditableTitle);\n\nDSPageHeaderEditableTitleWithSchema.propTypes = props as WeakValidationMap<unknown>;\n\nexport default PageHeaderEditableTitle;\n\nexport { DSPageHeaderEditableTitleWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkEnB;AAjEJ,mBAAqD;AACrD,gCAA+D;AAC/D,uBAAuB;AACvB,8BAAuF;AACvF,0BAAqD;AACrD,6BAAgC;AAChC,8BAAwC;AAExC,MAAM,wBAAoB,yBAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAU7B,6CAAmB,2CAAiB;AAAA;AAAA;AAAA,SAGpC,6CAA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H,GAAG;AAAA,YACJ,aAAY;AAAA,YACZ,OAAO,EAAE,OAAO,QAAQ,IAAI,UAAU,SAAS,UAAU,OAAO;AAAA,YAChE,OAAO;AAAA;AAAA,QACT;AAAA,QAEF,4CAAC,SAAI,KAAK,UAAU,OAAO,EAAE,OAAO,cAAc,GAChD,sDAAC,0CAAgB,YAAY,cAAc,CAAC,WAAW,CAAC,SAAU,sBAAW,GAC/E;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,MAAM,QAAQ;AAAA,EACZ,GAAG;AAAA,EAEH,UAAU,kCAAU,OAAO,YAAY,gBAAgB;AAAA,EAEvD,SAAS,kCAAU,KAAK,YAAY,qCAAqC;AAAA,EAEzE,YAAY,kCAAU,KAAK,YAAY,mBAAmB;AAC5D;AAEA,wBAAwB,YAAY;AACpC,wBAAwB,cAAc;AACtC,MAAM,0CAAsC,kCAAS,uBAAuB;AAE5E,oCAAoC,YAAY;AAEhD,IAAO,kCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,7 +30,7 @@ __export(PageHeaderSummary_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(PageHeaderSummary_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
-
var
|
|
33
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
34
34
|
var import_ds_system = require("@elliemae/ds-system");
|
|
35
35
|
var import_exported_related = require("../exported-related");
|
|
36
36
|
const PageHeaderSummaryWrapper = (0, import_ds_system.styled)("div", {
|
|
@@ -70,11 +70,11 @@ const PageHeaderSummary = ({ value = null, label = "", ...rest }) => /* @__PURE_
|
|
|
70
70
|
(value === 0 || value || label) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ph-summary-space" })
|
|
71
71
|
] });
|
|
72
72
|
const props = {
|
|
73
|
-
value:
|
|
74
|
-
label:
|
|
73
|
+
value: import_ds_props_helpers.PropTypes.number.description("value for page header summary"),
|
|
74
|
+
label: import_ds_props_helpers.PropTypes.string.description("label attached to value")
|
|
75
75
|
};
|
|
76
76
|
PageHeaderSummary.propTypes = props;
|
|
77
77
|
PageHeaderSummary.displayName = "PageHeaderSummary";
|
|
78
|
-
const DSPageHeaderSummaryWithSchema = (0,
|
|
78
|
+
const DSPageHeaderSummaryWithSchema = (0, import_ds_props_helpers.describe)(PageHeaderSummary);
|
|
79
79
|
DSPageHeaderSummaryWithSchema.propTypes = props;
|
|
80
80
|
//# sourceMappingURL=PageHeaderSummary.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/v2/components/PageHeaderSummary.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCrB;AApCF,
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { DSPageHeaderName, DSPageHeaderSlots, DSPageHeaderDataTestIds } from '../exported-related';\n\nconst PageHeaderSummaryWrapper = styled('div', {\n name: DSPageHeaderName,\n slot: DSPageHeaderSlots.SUMMARY,\n})`\n display: flex;\n flex-direction: row;\n align-items: center;\n\n margin-left: ${({ theme }) => theme.space.xxxs};\n font-size: ${({ theme }) => theme.fontSizes.title[700]};\n line-height: ${({ theme }) => theme.lineHeights.m};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n &:before {\n display: block;\n content: '';\n height: 23px;\n background: ${({ theme }) => theme.colors.neutral[600]};\n width: 1px;\n margin-right: ${({ theme }) => theme.space.xxs};\n }\n .ph-summary-value {\n color: ${({ theme }) => theme.colors.neutral[700]};\n padding-right: ${({ theme }) => theme.space.xxs};\n }\n .ph-summary-label {\n color: ${({ theme }) => theme.colors.neutral[600]};\n }\n .ph-summary-space {\n width: ${({ theme }) => theme.space.l};\n }\n`;\nconst PageHeaderSummary = ({ value = null, label = '', ...rest }) => (\n <PageHeaderSummaryWrapper data-testid={DSPageHeaderDataTestIds.SUMMARY} {...rest}>\n {(value === 0 || value) && <div className=\"ph-summary-value\">{value}</div>}\n {label && <div className=\"ph-summary-label\">{label}</div>}\n {(value === 0 || value || label) && <div className=\"ph-summary-space\" />}\n </PageHeaderSummaryWrapper>\n);\n\nconst props = {\n /** value for page header summary */\n value: PropTypes.number.description('value for page header summary'),\n /** label attached to value */\n label: PropTypes.string.description('label attached to value'),\n};\n\nPageHeaderSummary.propTypes = props as WeakValidationMap<unknown>;\nPageHeaderSummary.displayName = 'PageHeaderSummary';\nconst DSPageHeaderSummaryWithSchema = describe(PageHeaderSummary);\n\nDSPageHeaderSummaryWithSchema.propTypes = props as WeakValidationMap<unknown>;\n\nexport { PageHeaderSummary, DSPageHeaderSummaryWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCrB;AApCF,8BAAoC;AACpC,uBAAuB;AACvB,8BAA6E;AAE7E,MAAM,+BAA2B,yBAAO,OAAO;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,0CAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKgB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,eAC7B,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM;AAAA,iBACnC,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,iBACjC,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKhC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,oBAElC,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA,aAGlC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA,qBAC5B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA,aAGnC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,aAGpC,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAGxC,MAAM,oBAAoB,CAAC,EAAE,QAAQ,MAAM,QAAQ,OAAO,KAAK,MAC7D,6CAAC,4BAAyB,eAAa,gDAAwB,SAAU,GAAG,MACxE;AAAA,aAAU,KAAK,UAAU,4CAAC,SAAI,WAAU,oBAAoB,iBAAM;AAAA,EACnE,SAAS,4CAAC,SAAI,WAAU,oBAAoB,iBAAM;AAAA,GACjD,UAAU,KAAK,SAAS,UAAU,4CAAC,SAAI,WAAU,oBAAmB;AAAA,GACxE;AAGF,MAAM,QAAQ;AAAA,EAEZ,OAAO,kCAAU,OAAO,YAAY,+BAA+B;AAAA,EAEnE,OAAO,kCAAU,OAAO,YAAY,yBAAyB;AAC/D;AAEA,kBAAkB,YAAY;AAC9B,kBAAkB,cAAc;AAChC,MAAM,oCAAgC,kCAAS,iBAAiB;AAEhE,8BAA8B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -31,7 +31,7 @@ module.exports = __toCommonJS(PageHeaderTitle_exports);
|
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
33
|
var import_ds_system = require("@elliemae/ds-system");
|
|
34
|
-
var
|
|
34
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
35
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
36
36
|
var import_ds_form = require("@elliemae/ds-form");
|
|
37
37
|
var import_exported_related = require("../exported-related");
|
|
@@ -57,11 +57,11 @@ const PageHeaderTitle = ({ children = "", showMarker = false, ...rest }) => /* @
|
|
|
57
57
|
showMarker && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.RequiredMark, { required: true })
|
|
58
58
|
] });
|
|
59
59
|
const props = {
|
|
60
|
-
children:
|
|
61
|
-
showMarker:
|
|
60
|
+
children: import_ds_props_helpers.PropTypes.string.description("Page header title string"),
|
|
61
|
+
showMarker: import_ds_props_helpers.PropTypes.bool.description("show required mark")
|
|
62
62
|
};
|
|
63
63
|
PageHeaderTitle.propTypes = props;
|
|
64
64
|
PageHeaderTitle.displayName = "PageHeaderTitle";
|
|
65
|
-
const DSPageHeaderTitleWithSchema = (0,
|
|
65
|
+
const DSPageHeaderTitleWithSchema = (0, import_ds_props_helpers.describe)(PageHeaderTitle);
|
|
66
66
|
DSPageHeaderTitleWithSchema.propTypes = props;
|
|
67
67
|
//# sourceMappingURL=PageHeaderTitle.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/v2/components/PageHeaderTitle.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBrB;AAvBF,uBAAuB;AACvB,
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { RequiredMark } from '@elliemae/ds-form';\nimport { DSPageHeaderName, DSPageHeaderSlots, DSPageHeaderDataTestIds } from '../exported-related';\nconst PageHeaderTitleWrapper = styled('div', {\n name: DSPageHeaderName,\n slot: DSPageHeaderSlots.HEADER_TITLE,\n})`\n display: grid;\n font-size: ${({ theme }) => theme.fontSizes.title[800]};\n color: ${({ theme }) => theme.colors.neutral['700']};\n line-height: normal;\n font-weight: 400;\n margin-right: 0.61538rem;\n\n & .em-ds-form-required-mark {\n position: absolute;\n top: 0;\n right: 0;\n }\n`;\nconst PageHeaderTitle = ({ children = '', showMarker = false, ...rest }) => (\n <PageHeaderTitleWrapper {...rest} data-testid={DSPageHeaderDataTestIds.HEADER_TITLE}>\n <TooltipTextProvider>\n <DSTruncatedTooltipText value={children} />\n </TooltipTextProvider>\n {showMarker && <RequiredMark required />}\n </PageHeaderTitleWrapper>\n);\n\nconst props = {\n /** page header title string */\n children: PropTypes.string.description('Page header title string'),\n /** show required mark */\n showMarker: PropTypes.bool.description('show required mark'),\n};\n\nPageHeaderTitle.propTypes = props as WeakValidationMap<unknown>;\nPageHeaderTitle.displayName = 'PageHeaderTitle';\nconst DSPageHeaderTitleWithSchema = describe(PageHeaderTitle);\n\nDSPageHeaderTitleWithSchema.propTypes = props as WeakValidationMap<unknown>;\n\nexport { PageHeaderTitle, DSPageHeaderTitleWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBrB;AAvBF,uBAAuB;AACvB,8BAAoC;AACpC,uCAA4D;AAC5D,qBAA6B;AAC7B,8BAA6E;AAC7E,MAAM,6BAAyB,yBAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,0CAAkB;AAC1B,CAAC;AAAA;AAAA,eAEc,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM;AAAA,WACzC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW/C,MAAM,kBAAkB,CAAC,EAAE,WAAW,IAAI,aAAa,UAAU,KAAK,MACpE,6CAAC,0BAAwB,GAAG,MAAM,eAAa,gDAAwB,cACrE;AAAA,8CAAC,wDACC,sDAAC,2DAAuB,OAAO,UAAU,GAC3C;AAAA,EACC,cAAc,4CAAC,+BAAa,UAAQ,MAAC;AAAA,GACxC;AAGF,MAAM,QAAQ;AAAA,EAEZ,UAAU,kCAAU,OAAO,YAAY,0BAA0B;AAAA,EAEjE,YAAY,kCAAU,KAAK,YAAY,oBAAoB;AAC7D;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,kCAA8B,kCAAS,eAAe;AAE5D,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,12 +30,12 @@ module.exports = __toCommonJS(usePageHeader_exports);
|
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var
|
|
33
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
34
34
|
var import_react_desc_prop_types = require("../react-desc-prop-types");
|
|
35
35
|
var import_exported_related = require("../exported-related");
|
|
36
36
|
const usePageHeader = (props) => {
|
|
37
|
-
const propsWithDefaults = (0,
|
|
38
|
-
(0,
|
|
37
|
+
const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
38
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefaults, import_react_desc_prop_types.PageHeaderPropTypes, import_exported_related.DSPageHeaderName);
|
|
39
39
|
const {
|
|
40
40
|
menu,
|
|
41
41
|
Menu,
|
|
@@ -51,8 +51,8 @@ const usePageHeader = (props) => {
|
|
|
51
51
|
Breadcrumbs,
|
|
52
52
|
...rest
|
|
53
53
|
} = props;
|
|
54
|
-
const globalAttributes = (0,
|
|
55
|
-
const xStyledProps = (0,
|
|
54
|
+
const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefaults);
|
|
55
|
+
const xStyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefaults);
|
|
56
56
|
const currentBackArrow = (0, import_react.useMemo)(() => backarrow ?? (Backarrow ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Backarrow, {}) : void 0), [Backarrow, backarrow]);
|
|
57
57
|
const currentMenu = (0, import_react.useMemo)(() => menu ?? (Menu ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, {}) : void 0), [Menu, menu]);
|
|
58
58
|
const currentBreadcrumbs = (0, import_react.useMemo)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/v2/config/usePageHeader.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\nimport { useMemo } from 'react';\nimport {\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\nimport { useMemo } from 'react';\nimport {\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport type { DSPageHeaderT } from '../react-desc-prop-types';\nimport { PageHeaderPropTypes, defaultProps } from '../react-desc-prop-types';\nimport { DSPageHeaderName } from '../exported-related';\n\nexport const usePageHeader = (props: DSPageHeaderT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, PageHeaderPropTypes, DSPageHeaderName);\n\n const {\n menu,\n Menu,\n pageTitle,\n PageTitle,\n toolbar,\n Toolbar,\n summary,\n Summary,\n backarrow,\n Backarrow,\n breadcrumbs,\n Breadcrumbs,\n ...rest\n } = props;\n\n const globalAttributes = useGetGlobalAttributes(propsWithDefaults);\n const xStyledProps = useGetXstyledProps(propsWithDefaults);\n\n const currentBackArrow = useMemo(() => backarrow ?? (Backarrow ? <Backarrow /> : undefined), [Backarrow, backarrow]);\n\n const currentMenu = useMemo(() => menu ?? (Menu ? <Menu /> : undefined), [Menu, menu]);\n\n const currentBreadcrumbs = useMemo(\n () => breadcrumbs ?? (Breadcrumbs ? <Breadcrumbs /> : undefined),\n [Breadcrumbs, breadcrumbs],\n );\n\n const currentSummary = useMemo(() => summary ?? (Summary ? <Summary /> : undefined), [Summary, summary]);\n\n const currentToolbar = useMemo(() => toolbar ?? (Toolbar ? <Toolbar /> : undefined), [Toolbar, toolbar]);\n\n const currentPageTitle = useMemo(() => pageTitle ?? (PageTitle ? <PageTitle /> : undefined), [PageTitle, pageTitle]);\n\n return useMemo(\n () => ({\n propsWithDefaults,\n globalAttributes,\n xStyledProps,\n currentBackArrow,\n currentMenu,\n currentBreadcrumbs,\n currentSummary,\n currentToolbar,\n currentPageTitle,\n ...rest,\n }),\n [\n propsWithDefaults,\n currentBackArrow,\n currentBreadcrumbs,\n currentMenu,\n currentPageTitle,\n currentSummary,\n currentToolbar,\n globalAttributes,\n rest,\n xStyledProps,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmC4C;AAlCnE,mBAAwB;AACxB,8BAKO;AAEP,mCAAkD;AAClD,8BAAiC;AAE1B,MAAM,gBAAgB,CAAC,UAA+B;AAC3D,QAAM,wBAAoB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[]
|
|
7
7
|
}
|
|
@@ -29,23 +29,23 @@ __export(react_desc_prop_types_exports, {
|
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
|
-
var
|
|
32
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
33
33
|
const PageHeaderPropTypes = {
|
|
34
|
-
...
|
|
35
|
-
containerProps:
|
|
36
|
-
breadcrumbs:
|
|
37
|
-
Breadcrumbs:
|
|
38
|
-
pageTitle:
|
|
39
|
-
PageTitle:
|
|
40
|
-
backarrow:
|
|
41
|
-
Backarrow:
|
|
42
|
-
summary:
|
|
43
|
-
Summary:
|
|
44
|
-
toolbar:
|
|
45
|
-
Toolbar:
|
|
46
|
-
menu:
|
|
47
|
-
Menu:
|
|
48
|
-
withBottomSeparator:
|
|
34
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
35
|
+
containerProps: import_ds_props_helpers.PropTypes.shape({}).description("props injected to wrapper of page header"),
|
|
36
|
+
breadcrumbs: import_ds_props_helpers.PropTypes.node.description("breadcrumbs component").deprecated({ version: "Prop will be removed on 05/01/2022" }),
|
|
37
|
+
Breadcrumbs: import_ds_props_helpers.PropTypes.func.description("breadcrumbs component"),
|
|
38
|
+
pageTitle: import_ds_props_helpers.PropTypes.node.description("PageHeaderTitle component").deprecated({ version: "Prop will be removed on 05/01/2022" }),
|
|
39
|
+
PageTitle: import_ds_props_helpers.PropTypes.func.description("PageHeaderTitle component"),
|
|
40
|
+
backarrow: import_ds_props_helpers.PropTypes.node.description("back arrow component").deprecated({ version: "Prop will be removed on 05/01/2022" }),
|
|
41
|
+
Backarrow: import_ds_props_helpers.PropTypes.func.description("back arrow component"),
|
|
42
|
+
summary: import_ds_props_helpers.PropTypes.node.description("PageHeaderSummary component").deprecated({ version: "Prop will be removed on 05/01/2022" }),
|
|
43
|
+
Summary: import_ds_props_helpers.PropTypes.func.description("PageHeaderSummary component"),
|
|
44
|
+
toolbar: import_ds_props_helpers.PropTypes.node.description("toolbar component").deprecated({ version: "Prop will be removed on 05/01/2022" }),
|
|
45
|
+
Toolbar: import_ds_props_helpers.PropTypes.func.description("toolbar component"),
|
|
46
|
+
menu: import_ds_props_helpers.PropTypes.node.description("PageHeaderMenu component").deprecated({ version: "Prop will be removed on 05/01/2022" }),
|
|
47
|
+
Menu: import_ds_props_helpers.PropTypes.func.description("PageHeaderMenu component"),
|
|
48
|
+
withBottomSeparator: import_ds_props_helpers.PropTypes.bool.description("Border bottom below the page header")
|
|
49
49
|
};
|
|
50
50
|
const defaultProps = {
|
|
51
51
|
containerProps: {},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSPageHeaderT {\n export interface DefaultProps {\n withBottomSeparator: boolean;\n containerProps: object;\n }\n\n export interface OptionalProps {\n breadcrumbs?: JSX.Element;\n pageTitle?: JSX.Element;\n backarrow?: JSX.Element;\n summary?: JSX.Element;\n toolbar?: JSX.Element;\n menu?: JSX.Element;\n Breadcrumbs?: () => JSX.Element;\n PageTitle?: () => JSX.Element;\n Backarrow?: () => JSX.Element;\n Summary?: () => JSX.Element;\n Toolbar?: () => JSX.Element;\n Menu?: () => JSX.Element;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n}\n\nexport const PageHeaderPropTypes = {\n ...globalAttributesPropTypes,\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description('props injected to wrapper of page header'),\n /** breadcrumbs component */\n breadcrumbs: PropTypes.node\n .description('breadcrumbs component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Breadcrumbs: PropTypes.func.description('breadcrumbs component'),\n /** PageHeaderTitle component */\n pageTitle: PropTypes.node\n .description('PageHeaderTitle component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n PageTitle: PropTypes.func.description('PageHeaderTitle component'),\n /** back arrow component */\n backarrow: PropTypes.node\n .description('back arrow component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Backarrow: PropTypes.func.description('back arrow component'),\n\n /** PageHeaderSummary component */\n summary: PropTypes.node\n .description('PageHeaderSummary component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Summary: PropTypes.func.description('PageHeaderSummary component'),\n /** toolbar component */\n toolbar: PropTypes.node\n .description('toolbar component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Toolbar: PropTypes.func.description('toolbar component'),\n\n /** PageHeaderMenu component */\n menu: PropTypes.node\n .description('PageHeaderMenu component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Menu: PropTypes.func.description('PageHeaderMenu component'),\n /** Border bottom below the page header */\n withBottomSeparator: PropTypes.bool.description('Border bottom below the page header'),\n};\n\nexport const defaultProps: DSPageHeaderT.DefaultProps = {\n containerProps: {},\n withBottomSeparator: true,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAqD;AA0B9C,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EAEH,gBAAgB,kCAAU,MAAM,CAAC,CAAC,EAAE,YAAY,0CAA0C;AAAA,EAE1F,aAAa,kCAAU,KACpB,YAAY,uBAAuB,EACnC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,aAAa,kCAAU,KAAK,YAAY,uBAAuB;AAAA,EAE/D,WAAW,kCAAU,KAClB,YAAY,2BAA2B,EACvC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,WAAW,kCAAU,KAAK,YAAY,2BAA2B;AAAA,EAEjE,WAAW,kCAAU,KAClB,YAAY,sBAAsB,EAClC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,WAAW,kCAAU,KAAK,YAAY,sBAAsB;AAAA,EAG5D,SAAS,kCAAU,KAChB,YAAY,6BAA6B,EACzC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,SAAS,kCAAU,KAAK,YAAY,6BAA6B;AAAA,EAEjE,SAAS,kCAAU,KAChB,YAAY,mBAAmB,EAC/B,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,SAAS,kCAAU,KAAK,YAAY,mBAAmB;AAAA,EAGvD,MAAM,kCAAU,KACb,YAAY,0BAA0B,EACtC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,MAAM,kCAAU,KAAK,YAAY,0BAA0B;AAAA,EAE3D,qBAAqB,kCAAU,KAAK,YAAY,qCAAqC;AACvF;AAEO,MAAM,eAA2C;AAAA,EACtD,gBAAgB,CAAC;AAAA,EACjB,qBAAqB;AACvB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { describe, PropTypes } from "@elliemae/ds-
|
|
3
|
+
import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
|
|
5
5
|
import PageHeaderImpl from "./PageHeaderImpl";
|
|
6
6
|
const DSPageHeader = ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/DSPageHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport PageHeaderImpl from './PageHeaderImpl';\n\nconst DSPageHeader = ({\n containerProps = {},\n renderToolbar = undefined,\n withBottomSeparator = true,\n title = '',\n titleOptions = undefined,\n onSelectOption = () => null,\n subtitle = '',\n optionsSelection = {},\n onGoToPreviousPage = () => null,\n previousPage,\n editable = false,\n editing = undefined,\n titleInputProps = {},\n zIndex = 2,\n optionsMinWidth = undefined,\n ...otherProps\n}) => (\n <TooltipTextProvider>\n <PageHeaderImpl\n containerProps={containerProps}\n editable={editable}\n editing={editing}\n onGoToPreviousPage={onGoToPreviousPage}\n onSelectOption={onSelectOption}\n optionsMinWidth={optionsMinWidth}\n optionsSelection={optionsSelection}\n previousPage={previousPage}\n renderToolbar={renderToolbar}\n subtitle={subtitle}\n title={title}\n titleInputProps={titleInputProps}\n titleOptions={titleOptions}\n withBottomSeparator={withBottomSeparator}\n zIndex={zIndex}\n {...otherProps}\n />\n </TooltipTextProvider>\n);\n\nconst props = {\n /* Component version */\n version: PropTypes.oneOf([1, 2]).description('Component version'),\n /* props injected to page header wrapper node */\n containerProps: PropTypes.object.description('props injected to page header wrapper node'),\n /* Function that returns the toolbar to the right of the page header */\n renderToolbar: PropTypes.func.description('Function that returns the toolbar to the right of the page header'),\n /* Whether to show a separator at the bottom of the header */\n withBottomSeparator: PropTypes.bool.description('Whether to show a separator at the bottom of the header'),\n /* The page header title */\n title: PropTypes.string.description('The page header title'),\n /* The title dropdown options */\n titleOptions: PropTypes.arrayOf(PropTypes.object).description('The title dropdown options'),\n /* Handler when a user selects an item in the dropdown menu */\n onSelectOption: PropTypes.func.description('Handler when a user selects an item in the dropdown menu'),\n /* Description text below the title */\n subtitle: PropTypes.string.description('Description text below the title'),\n /* Selection state for the title dropdown */\n optionsSelection: PropTypes.object.description('Selection state for the title dropdown'),\n /* Whether the title is editable or not */\n editable: PropTypes.bool.description('Whether the title is editable or not'),\n /* Activates/Deactivates the editing state in the title */\n editing: PropTypes.bool.description('Activates/Deactivates the editing state in the title'),\n /* Props passed to the input for editing the title */\n titleInputProps: PropTypes.object.description('Props passed to the input for editing the title'),\n /* Enables navigation to previous page with back-arrow */\n previousPage: PropTypes.object.description('Enables navigation to previous page with back-arrow'),\n /* Callback to handle navigation to previous page */\n onGoToPreviousPage: PropTypes.func.description('Callback to handle navigation to previous page'),\n /* z-index to use for the DropdownMenu */\n zIndex: PropTypes.number.description('z-index to use for the DropdownMenu'),\n /** min width for options dropdown menu */\n optionsMinWidth: PropTypes.number.description('min width for options dropdown menu'),\n};\n\nDSPageHeader.propTypes = props;\nDSPageHeader.displayName = 'DSPageHeader';\nconst DSPageHeaderV1WithSchema = describe(DSPageHeader).deprecated('use DSPageHeaderV2');\nDSPageHeaderV1WithSchema.propTypes = props;\n\nexport { DSPageHeader, DSPageHeaderV1WithSchema };\nexport default DSPageHeader;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACwBnB;AAvBJ,SAAS,UAAU,iBAAiB;AACpC,SAAS,2BAA2B;AACpC,OAAO,oBAAoB;AAE3B,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA,EACtB,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,iBAAiB,MAAM;AAAA,EACvB,WAAW;AAAA,EACX,mBAAmB,CAAC;AAAA,EACpB,qBAAqB,MAAM;AAAA,EAC3B;AAAA,EACA,WAAW;AAAA,EACX,UAAU;AAAA,EACV,kBAAkB,CAAC;AAAA,EACnB,SAAS;AAAA,EACT,kBAAkB;A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
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { describe } from "@elliemae/ds-
|
|
3
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { Grid } from "@elliemae/ds-grid";
|
|
5
5
|
import { compact } from "lodash";
|
|
6
6
|
import {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/PageHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { compact } from 'lodash';\nimport {\n Container,\n ContainerWBorder,\n PageHeaderCustomRenderer,\n PageHeaderToolbarWrapper,\n PageHeaderMenu,\n PageHeaderBack,\n} from './styled';\nimport { usePageHeader } from './config/usePageHeader';\nimport { PageHeaderTitle } from './components/PageHeaderTitle';\nimport { PageHeaderEditableTitle } from './components/PageHeaderEditableTitle';\nimport { PageHeaderSummary } from './components/PageHeaderSummary';\nimport type { DSPageHeaderT } from './react-desc-prop-types';\nimport { PageHeaderPropTypes, defaultProps } from './react-desc-prop-types';\nimport { DSPageHeaderDataTestIds, DSPageHeaderName } from './exported-related';\n\nconst DSPageHeaderV2: React.ComponentType<DSPageHeaderT.Props> = (props) => {\n const {\n currentBackArrow,\n currentMenu,\n currentBreadcrumbs,\n currentSummary,\n currentToolbar,\n currentPageTitle,\n containerProps,\n withBottomSeparator,\n globalAttributes,\n xStyledProps,\n } = usePageHeader(props);\n\n const wrapperRow = ['auto', 1];\n const mainRow = compact([1, 'auto']);\n const pageTitleRow = compact(['auto', currentMenu && '30px', currentSummary && 'auto', 1]);\n return (\n <Container\n {...containerProps}\n {...globalAttributes}\n {...xStyledProps}\n data-testid={DSPageHeaderDataTestIds.CONTAINER}\n >\n <ContainerWBorder withBottomSeparator={withBottomSeparator}>\n <Grid cols={wrapperRow}>\n <Grid>\n <PageHeaderBack>{currentBackArrow}</PageHeaderBack>\n </Grid>\n <Grid rows={['auto', 'auto']}>\n <Grid className=\"em-ds-page-header-v2-breadcrumb\">{currentBreadcrumbs}</Grid>\n <Grid cols={mainRow}>\n <Grid cols={pageTitleRow}>\n {currentPageTitle}\n {currentMenu && <PageHeaderMenu>{currentMenu}</PageHeaderMenu>}\n {currentSummary}\n <div />\n </Grid>\n <Grid>\n <PageHeaderToolbarWrapper>{currentToolbar}</PageHeaderToolbarWrapper>\n </Grid>\n </Grid>\n </Grid>\n </Grid>\n </ContainerWBorder>\n </Container>\n );\n};\n\nDSPageHeaderV2.propTypes = PageHeaderPropTypes as WeakValidationMap<unknown>;\nDSPageHeaderV2.defaultProps = defaultProps;\nDSPageHeaderV2.displayName = DSPageHeaderName;\nconst DSPageHeaderWithSchema = describe(DSPageHeaderV2);\n\nDSPageHeaderWithSchema.propTypes = PageHeaderPropTypes as WeakValidationMap<unknown>;\n\nexport {\n DSPageHeaderV2,\n PageHeaderTitle,\n PageHeaderEditableTitle,\n PageHeaderSummary,\n PageHeaderMenu,\n PageHeaderCustomRenderer,\n DSPageHeaderWithSchema,\n};\n\nexport default DSPageHeaderV2;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACkDX,cAKE,YALF;AA9CZ,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBA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|
|
@@ -3,14 +3,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useRef, useState, useCallback } from "react";
|
|
4
4
|
import { DSInputText, DSInputTextName, DSInputTextSlots } from "@elliemae/ds-form-input-text";
|
|
5
5
|
import { styled } from "@elliemae/ds-system";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
describe,
|
|
9
|
-
useDerivedStateFromProps,
|
|
10
|
-
useMeasure,
|
|
11
|
-
useGetGlobalAttributes,
|
|
12
|
-
globalAttributesPropTypes
|
|
13
|
-
} from "@elliemae/ds-utilities";
|
|
6
|
+
import { PropTypes, describe, useGetGlobalAttributes, globalAttributesPropTypes } from "@elliemae/ds-props-helpers";
|
|
7
|
+
import { useDerivedStateFromProps, useMeasure } from "@elliemae/ds-utilities";
|
|
14
8
|
import { PageHeaderTitle } from "./PageHeaderTitle";
|
|
15
9
|
import { DSPageHeaderDataTestIds } from "../exported-related";
|
|
16
10
|
const EditableContainer = styled("div")`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/PageHeaderEditableTitle.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React, { useRef, useState, useCallback } from 'react';\nimport { DSInputText, DSInputTextName, DSInputTextSlots } from '@elliemae/ds-form-input-text';\nimport { styled } from '@elliemae/ds-system';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React, { useRef, useState, useCallback } from 'react';\nimport { DSInputText, DSInputTextName, DSInputTextSlots } from '@elliemae/ds-form-input-text';\nimport { styled } from '@elliemae/ds-system';\nimport { PropTypes, describe, useGetGlobalAttributes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { useDerivedStateFromProps, useMeasure } from '@elliemae/ds-utilities';\nimport { PageHeaderTitle } from './PageHeaderTitle';\nimport { DSPageHeaderDataTestIds } from '../exported-related';\n\nconst EditableContainer = styled('div')`\n height: 32px;\n position: relative;\n overflow: hidden;\n &.editable-title-component {\n position: relative;\n left: -7px;\n top: -1px;\n margin-left: -2px;\n margin-right: -9px;\n & .${DSInputTextName}-${DSInputTextSlots.INPUT_WRAPPER} {\n height: 32px;\n }\n & .${DSInputTextName}-${DSInputTextSlots.INPUT} {\n font-size: ${({ theme }) => theme.fontSizes.title[800]};\n line-height: normal;\n color: ${({ theme }) => theme.colors.neutral['700']};\n }\n }\n`;\n\nexport const PageHeaderEditableTitle = ({\n children: value,\n editing: editingProp = false,\n showMarker = false,\n ...rest\n}) => {\n const [titleValue, setTitleValue] = useState(value);\n const [hovered, setHovered] = useState(false);\n const [editing, setEditing] = useDerivedStateFromProps(editingProp || false);\n const titleRef = useRef(null);\n const { width } = useMeasure(titleRef);\n\n const handleOnChange: React.FormEventHandler<HTMLInputElement> = useCallback((e) => {\n setTitleValue(e.target.value);\n }, []);\n\n const handleOnFocus: React.FocusEventHandler = useCallback(() => {\n setEditing(true);\n }, [setEditing]);\n\n const handleOnBlur: React.FocusEventHandler = useCallback(() => {\n setEditing(false);\n }, [setEditing]);\n\n const handleOnMouseOut: React.MouseEventHandler = useCallback(() => {\n setHovered(false);\n }, []);\n\n const globals = useGetGlobalAttributes(rest, {\n onFocus: handleOnFocus,\n onMouseOut: handleOnMouseOut,\n onChange: handleOnChange,\n onBlur: handleOnBlur,\n });\n\n return (\n <EditableContainer\n className={hovered || editing ? 'editable-title-component' : ''}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n data-testid={DSPageHeaderDataTestIds.EDITABLE_HEADER_TITLE}\n >\n {(hovered || editing) && (\n <DSInputText\n onChange={handleOnChange}\n {...rest}\n {...globals}\n placeholder=\"\"\n style={{ width: width + 10, minWidth: '260px', maxWidth: '100%' }}\n value={titleValue}\n />\n )}\n <div ref={titleRef} style={{ width: 'fit-content' }}>\n <PageHeaderTitle showMarker={showMarker && !hovered && !editing}>{titleValue}</PageHeaderTitle>\n </div>\n </EditableContainer>\n );\n};\n\nconst props = {\n ...globalAttributesPropTypes,\n /** The title text */\n children: PropTypes.string.description('The title text'),\n /** Whether the title is editing or not */\n editing: PropTypes.bool.description('Whether the title is editing or not'),\n /** Show error marker */\n showMarker: PropTypes.bool.description('Show error marker'),\n};\n\nPageHeaderEditableTitle.propTypes = props as WeakValidationMap<unknown>;\nPageHeaderEditableTitle.displayName = 'PageHeaderEditableTitle';\nconst DSPageHeaderEditableTitleWithSchema = describe(PageHeaderEditableTitle);\n\nDSPageHeaderEditableTitleWithSchema.propTypes = props as WeakValidationMap<unknown>;\n\nexport default PageHeaderEditableTitle;\n\nexport { DSPageHeaderEditableTitleWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkEnB,SAOI,KAPJ;AAjEJ,SAAgB,QAAQ,UAAU,mBAAmB;AACrD,SAAS,aAAa,iBAAiB,wBAAwB;AAC/D,SAAS,cAAc;AACvB,SAAS,WAAW,UAAU,wBAAwB,iCAAiC;AACvF,SAAS,0BAA0B,kBAAkB;AACrD,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC,MAAM,oBAAoB,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAU7B,mBAAmB,iBAAiB;AAAA;AAAA;AAAA,SAGpC,mBAAmB,iBAAiB;AAAA,mBAC1B,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA,eAEzC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAK5C,MAAM,0BAA0B,CAAC;AAAA,EACtC,UAAU;AAAA,EACV,SAAS,cAAc;AAAA,EACvB,aAAa;AAAA,KACV;AACL,MAAM;AACJ,QAA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A,EACF;AAEJ;AAEA,MAAM,QAAQ;AAAA,EACZ,GAAG;AAAA,EAEH,UAAU,UAAU,OAAO,YAAY,gBAAgB;AAAA,EAEvD,SAAS,UAAU,KAAK,YAAY,qCAAqC;AAAA,EAEzE,YAAY,UAAU,KAAK,YAAY,mBAAmB;AAC5D;AAEA,wBAAwB,YAAY;AACpC,wBAAwB,cAAc;AACtC,MAAM,sCAAsC,SAAS,uBAAuB;AAE5E,oCAAoC,YAAY;AAEhD,IAAO,kCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
|
3
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { DSPageHeaderName, DSPageHeaderSlots, DSPageHeaderDataTestIds } from "../exported-related";
|
|
6
6
|
const PageHeaderSummaryWrapper = styled("div", {
|