@elliemae/ds-page-header 3.12.0-next.0 → 3.12.0-next.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/dist/cjs/v1/DSPageHeader.js +12 -36
- package/dist/cjs/v1/DSPageHeader.js.map +2 -2
- package/dist/cjs/v1/DropdownTitle.js +17 -19
- package/dist/cjs/v1/DropdownTitle.js.map +2 -2
- package/dist/cjs/v1/EditableTitle.js +7 -21
- package/dist/cjs/v1/EditableTitle.js.map +3 -3
- package/dist/cjs/v1/PageHeaderImpl.js +6 -6
- package/dist/cjs/v1/PageHeaderImpl.js.map +2 -2
- package/dist/cjs/v1/Title.js +1 -4
- package/dist/cjs/v1/Title.js.map +2 -2
- package/dist/cjs/v2/PageHeader.js.map +2 -2
- package/dist/cjs/v2/components/PageHeaderEditableTitle.js.map +2 -2
- package/dist/cjs/v2/components/PageHeaderSummary.js.map +2 -2
- package/dist/cjs/v2/components/PageHeaderTitle.js.map +2 -2
- package/dist/cjs/v2/config/usePageHeader.js.map +2 -2
- package/dist/esm/v1/DSPageHeader.js +12 -36
- package/dist/esm/v1/DSPageHeader.js.map +2 -2
- package/dist/esm/v1/DropdownTitle.js +17 -19
- package/dist/esm/v1/DropdownTitle.js.map +2 -2
- package/dist/esm/v1/EditableTitle.js +6 -20
- package/dist/esm/v1/EditableTitle.js.map +2 -2
- package/dist/esm/v1/PageHeaderImpl.js +6 -6
- package/dist/esm/v1/PageHeaderImpl.js.map +2 -2
- package/dist/esm/v1/Title.js +1 -4
- package/dist/esm/v1/Title.js.map +2 -2
- package/dist/esm/v2/PageHeader.js.map +2 -2
- package/dist/esm/v2/components/PageHeaderEditableTitle.js.map +2 -2
- package/dist/esm/v2/components/PageHeaderSummary.js.map +2 -2
- package/dist/esm/v2/components/PageHeaderTitle.js.map +2 -2
- package/dist/esm/v2/config/usePageHeader.js.map +2 -2
- package/package.json +13 -13
|
@@ -73,49 +73,25 @@ const DSPageHeader = ({
|
|
|
73
73
|
});
|
|
74
74
|
const props = {
|
|
75
75
|
version: import_ds_utilities.PropTypes.oneOf([1, 2]).description("Component version"),
|
|
76
|
-
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
77
|
-
|
|
78
|
-
),
|
|
79
|
-
renderToolbar: import_ds_utilities.PropTypes.func.description(
|
|
80
|
-
"Function that returns the toolbar to the right of the page header"
|
|
81
|
-
),
|
|
82
|
-
withBottomSeparator: import_ds_utilities.PropTypes.bool.description(
|
|
83
|
-
"Whether to show a separator at the bottom of the header"
|
|
84
|
-
),
|
|
76
|
+
containerProps: import_ds_utilities.PropTypes.object.description("props injected to page header wrapper node"),
|
|
77
|
+
renderToolbar: import_ds_utilities.PropTypes.func.description("Function that returns the toolbar to the right of the page header"),
|
|
78
|
+
withBottomSeparator: import_ds_utilities.PropTypes.bool.description("Whether to show a separator at the bottom of the header"),
|
|
85
79
|
title: import_ds_utilities.PropTypes.string.description("The page header title"),
|
|
86
|
-
titleOptions: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object).description(
|
|
87
|
-
|
|
88
|
-
),
|
|
89
|
-
onSelectOption: import_ds_utilities.PropTypes.func.description(
|
|
90
|
-
"Handler when a user selects an item in the dropdown menu"
|
|
91
|
-
),
|
|
80
|
+
titleOptions: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object).description("The title dropdown options"),
|
|
81
|
+
onSelectOption: import_ds_utilities.PropTypes.func.description("Handler when a user selects an item in the dropdown menu"),
|
|
92
82
|
subtitle: import_ds_utilities.PropTypes.string.description("Description text below the title"),
|
|
93
|
-
optionsSelection: import_ds_utilities.PropTypes.object.description(
|
|
94
|
-
"Selection state for the title dropdown"
|
|
95
|
-
),
|
|
83
|
+
optionsSelection: import_ds_utilities.PropTypes.object.description("Selection state for the title dropdown"),
|
|
96
84
|
editable: import_ds_utilities.PropTypes.bool.description("Whether the title is editable or not"),
|
|
97
|
-
editing: import_ds_utilities.PropTypes.bool.description(
|
|
98
|
-
|
|
99
|
-
),
|
|
100
|
-
|
|
101
|
-
"Props passed to the input for editing the title"
|
|
102
|
-
),
|
|
103
|
-
previousPage: import_ds_utilities.PropTypes.object.description(
|
|
104
|
-
"Enables navigation to previous page with back-arrow"
|
|
105
|
-
),
|
|
106
|
-
onGoToPreviousPage: import_ds_utilities.PropTypes.func.description(
|
|
107
|
-
"Callback to handle navigation to previous page"
|
|
108
|
-
),
|
|
85
|
+
editing: import_ds_utilities.PropTypes.bool.description("Activates/Deactivates the editing state in the title"),
|
|
86
|
+
titleInputProps: import_ds_utilities.PropTypes.object.description("Props passed to the input for editing the title"),
|
|
87
|
+
previousPage: import_ds_utilities.PropTypes.object.description("Enables navigation to previous page with back-arrow"),
|
|
88
|
+
onGoToPreviousPage: import_ds_utilities.PropTypes.func.description("Callback to handle navigation to previous page"),
|
|
109
89
|
zIndex: import_ds_utilities.PropTypes.number.description("z-index to use for the DropdownMenu"),
|
|
110
|
-
optionsMinWidth: import_ds_utilities.PropTypes.number.description(
|
|
111
|
-
"min width for options dropdown menu"
|
|
112
|
-
)
|
|
90
|
+
optionsMinWidth: import_ds_utilities.PropTypes.number.description("min width for options dropdown menu")
|
|
113
91
|
};
|
|
114
92
|
DSPageHeader.propTypes = props;
|
|
115
93
|
DSPageHeader.displayName = "DSPageHeader";
|
|
116
|
-
const DSPageHeaderV1WithSchema = (0, import_ds_utilities.describe)(DSPageHeader).deprecated(
|
|
117
|
-
"use DSPageHeaderV2"
|
|
118
|
-
);
|
|
94
|
+
const DSPageHeaderV1WithSchema = (0, import_ds_utilities.describe)(DSPageHeader).deprecated("use DSPageHeaderV2");
|
|
119
95
|
DSPageHeaderV1WithSchema.propTypes = props;
|
|
120
96
|
var DSPageHeader_default = DSPageHeader;
|
|
121
97
|
//# 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-utilities';\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(
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBnB;AAvBJ,0BAAoC;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;AAAA,EACA,WAAW;AAAA,EACX,UAAU;AAAA,EACV,kBAAkB,CAAC;AAAA,EACnB,SAAS;AAAA,EACT,kBAAkB;AAAA,KACf;AACL,MACE,4CAAC;AAAA,EACC,sDAAC,sBAAAA,SAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACC,GAAG;AAAA,GACN;AAAA,CACF;AAGF,MAAM,QAAQ;AAAA,EAEZ,SAAS,8BAAU,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,mBAAmB;AAAA,EAEhE,gBAAgB,8BAAU,OAAO
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\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,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EAE1F,iBAAiB,8BAAU,OAAO,YAAY,iDAAiD;AAAA,EAE/F,cAAc,8BAAU,OAAO,YAAY,qDAAqD;AAAA,EAEhG,oBAAoB,8BAAU,KAAK,YAAY,gDAAgD;AAAA,EAE/F,QAAQ,8BAAU,OAAO,YAAY,qCAAqC;AAAA,EAE1E,iBAAiB,8BAAU,OAAO,YAAY,qCAAqC;AACrF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,+BAA2B,8BAAS,YAAY,EAAE,WAAW,oBAAoB;AACvF,yBAAyB,YAAY;AAGrC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["PageHeaderImpl"]
|
|
7
7
|
}
|
|
@@ -33,25 +33,23 @@ var import_ds_dropdownmenu = __toESM(require("@elliemae/ds-dropdownmenu"));
|
|
|
33
33
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
34
34
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
35
35
|
var import_TitleWrapper = __toESM(require("./TitleWrapper"));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
}
|
|
36
|
+
const DropdownTitle = ({ titleComponent, onSelectOption, options, optionsMinWidth, selection, zIndex }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_TitleWrapper.default, {
|
|
37
|
+
children: [
|
|
38
|
+
titleComponent,
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dropdownmenu.default, {
|
|
40
|
+
minWidth: optionsMinWidth,
|
|
41
|
+
onSelectMenuItem: onSelectOption,
|
|
42
|
+
options,
|
|
43
|
+
selection,
|
|
44
|
+
triggerComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
45
|
+
buttonType: "text",
|
|
46
|
+
"data-testid": "page-header-dropdown-trigger-component",
|
|
47
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, {})
|
|
48
|
+
}),
|
|
49
|
+
zIndex
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
});
|
|
55
53
|
DropdownTitle.propTypes = {};
|
|
56
54
|
var DropdownTitle_default = DropdownTitle;
|
|
57
55
|
//# sourceMappingURL=DropdownTitle.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/DropdownTitle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport TitleWrapper from './TitleWrapper';\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport TitleWrapper from './TitleWrapper';\n\nconst DropdownTitle = ({ titleComponent, onSelectOption, options, optionsMinWidth, selection, zIndex }) => (\n <TitleWrapper>\n {titleComponent}\n <DSDropdownMenu\n minWidth={optionsMinWidth}\n onSelectMenuItem={onSelectOption}\n options={options}\n selection={selection}\n triggerComponent={\n <DSButton buttonType=\"text\" data-testid=\"page-header-dropdown-trigger-component\" icon={<ChevronSmallDown />} />\n }\n zIndex={zIndex}\n />\n </TitleWrapper>\n);\n\nDropdownTitle.propTypes = {};\n\nexport default DropdownTitle;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOrB;AANF,6BAA2B;AAC3B,sBAAiC;AACjC,uBAAqB;AACrB,0BAAyB;AAEzB,MAAM,gBAAgB,CAAC,EAAE,gBAAgB,gBAAgB,SAAS,iBAAiB,WAAW,OAAO,MACnG,6CAAC,oBAAAA,SAAA;AAAA,EACE;AAAA;AAAA,IACD,4CAAC,uBAAAC,SAAA;AAAA,MACC,UAAU;AAAA,MACV,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,MACA,kBACE,4CAAC,iBAAAC,SAAA;AAAA,QAAS,YAAW;AAAA,QAAO,eAAY;AAAA,QAAyC,MAAM,4CAAC,oCAAiB;AAAA,OAAI;AAAA,MAE/G;AAAA,KACF;AAAA;AAAA,CACF;AAGF,cAAc,YAAY,CAAC;AAE3B,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["TitleWrapper", "DSDropdownMenu", "DSButton"]
|
|
7
7
|
}
|
|
@@ -33,19 +33,11 @@ var import_react = require("react");
|
|
|
33
33
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
34
34
|
var import_prop_types = __toESM(require("prop-types"));
|
|
35
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
36
|
-
var import_ds_utilities2 = require("@elliemae/ds-utilities");
|
|
37
36
|
var import_Input = __toESM(require("@elliemae/ds-form/Input"));
|
|
38
37
|
var import_Title = __toESM(require("./Title"));
|
|
39
38
|
const blockName = "page-header";
|
|
40
|
-
const EditableTitleComponent = (0, import_ds_classnames.aggregatedClasses)(import_Input.default)(
|
|
41
|
-
|
|
42
|
-
"editable-title"
|
|
43
|
-
);
|
|
44
|
-
function EditableTitle({
|
|
45
|
-
children: value,
|
|
46
|
-
editing: editingProp,
|
|
47
|
-
titleInputProps
|
|
48
|
-
}) {
|
|
39
|
+
const EditableTitleComponent = (0, import_ds_classnames.aggregatedClasses)(import_Input.default)(`${blockName}-title`, "editable-title");
|
|
40
|
+
const EditableTitle = ({ children: value, editing: editingProp, titleInputProps }) => {
|
|
49
41
|
const [titleValue, setTitleValue] = (0, import_react.useState)(value);
|
|
50
42
|
const [hovered, setHovered] = (0, import_react.useState)(false);
|
|
51
43
|
const [editing, setEditing] = (0, import_ds_utilities.useDerivedStateFromProps)(editingProp || false);
|
|
@@ -53,16 +45,10 @@ function EditableTitle({
|
|
|
53
45
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
54
46
|
children: hovered || editing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EditableTitleComponent, {
|
|
55
47
|
...titleInputProps,
|
|
56
|
-
onBlur: (0,
|
|
57
|
-
onChange: (0,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
),
|
|
61
|
-
onFocus: (0, import_ds_utilities2.runAll)(() => setEditing(true), titleInputProps.onFocus),
|
|
62
|
-
onMouseOut: (0, import_ds_utilities2.runAll)(
|
|
63
|
-
() => setHovered(false),
|
|
64
|
-
titleInputProps.onMouseOut
|
|
65
|
-
),
|
|
48
|
+
onBlur: (0, import_ds_utilities.runAll)(() => setEditing(false), titleInputProps.onBlur),
|
|
49
|
+
onChange: (0, import_ds_utilities.runAll)((e) => setTitleValue(e.target.value), titleInputProps.onChange),
|
|
50
|
+
onFocus: (0, import_ds_utilities.runAll)(() => setEditing(true), titleInputProps.onFocus),
|
|
51
|
+
onMouseOut: (0, import_ds_utilities.runAll)(() => setHovered(false), titleInputProps.onMouseOut),
|
|
66
52
|
value: titleValue
|
|
67
53
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
68
54
|
ref: titleRef,
|
|
@@ -72,7 +58,7 @@ function EditableTitle({
|
|
|
72
58
|
})
|
|
73
59
|
})
|
|
74
60
|
});
|
|
75
|
-
}
|
|
61
|
+
};
|
|
76
62
|
EditableTitle.propTypes = {
|
|
77
63
|
children: import_prop_types.default.string,
|
|
78
64
|
editing: import_prop_types.default.bool
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/EditableTitle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useRef, useState } from 'react';\nimport { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import React, { useRef, useState } from 'react';\nimport { useDerivedStateFromProps, runAll } from '@elliemae/ds-utilities';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSInput from '@elliemae/ds-form/Input';\nimport Title from './Title';\n\nconst blockName = 'page-header';\n\nconst EditableTitleComponent = aggregatedClasses(DSInput)(`${blockName}-title`, 'editable-title');\n\nconst EditableTitle = ({ children: value, editing: editingProp, titleInputProps }) => {\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 return (\n <>\n {hovered || editing ? (\n <EditableTitleComponent\n {...titleInputProps}\n onBlur={runAll(() => setEditing(false), titleInputProps.onBlur)}\n onChange={runAll((e) => setTitleValue(e.target.value), titleInputProps.onChange)}\n onFocus={runAll(() => setEditing(true), titleInputProps.onFocus)}\n onMouseOut={runAll(() => setHovered(false), titleInputProps.onMouseOut)}\n value={titleValue}\n />\n ) : (\n <div ref={titleRef} onMouseEnter={() => setHovered(true)}>\n <Title>{titleValue}</Title>\n </div>\n )}\n </>\n );\n};\n\nEditableTitle.propTypes = {\n /** The title text */\n children: PropTypes.string,\n /** Whether the title is editing or not */\n editing: PropTypes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|
|
6
|
+
"names": ["DSInput", "Title", "PropTypes"]
|
|
7
7
|
}
|
|
@@ -51,7 +51,7 @@ const PageHeaderBreadcrumb = (0, import_ds_classnames.aggregatedClasses)(import_
|
|
|
51
51
|
const PageHeaderTitle = (0, import_ds_classnames.aggregatedClasses)("div")(`${blockName}-title`);
|
|
52
52
|
const Subtitle = (0, import_ds_classnames.aggregatedClasses)("div")(`${blockName}-title`, "subtitle");
|
|
53
53
|
const BackArrow = (0, import_ds_classnames.aggregatedClasses)(import_ds_icons.ChevronLeft)(`${blockName}-backarrow`);
|
|
54
|
-
|
|
54
|
+
const HeaderTitle = ({
|
|
55
55
|
title = "",
|
|
56
56
|
options = [],
|
|
57
57
|
optionsMinWidth,
|
|
@@ -62,7 +62,7 @@ function HeaderTitle({
|
|
|
62
62
|
editing = false,
|
|
63
63
|
titleInputProps,
|
|
64
64
|
zIndex
|
|
65
|
-
}) {
|
|
65
|
+
}) => {
|
|
66
66
|
const titleComponent = editable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_EditableTitle.default, {
|
|
67
67
|
editing,
|
|
68
68
|
titleInputProps,
|
|
@@ -85,8 +85,8 @@ function HeaderTitle({
|
|
|
85
85
|
})
|
|
86
86
|
]
|
|
87
87
|
});
|
|
88
|
-
}
|
|
89
|
-
|
|
88
|
+
};
|
|
89
|
+
const PageHeaderImpl = ({
|
|
90
90
|
containerProps,
|
|
91
91
|
className,
|
|
92
92
|
title,
|
|
@@ -104,7 +104,7 @@ function PageHeaderImpl({
|
|
|
104
104
|
titleInputProps,
|
|
105
105
|
editing = void 0,
|
|
106
106
|
zIndex
|
|
107
|
-
}) {
|
|
107
|
+
}) => {
|
|
108
108
|
const hasBreadcrumbs = !!breadcrumbs.length;
|
|
109
109
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageHeaderContainer, {
|
|
110
110
|
...containerProps,
|
|
@@ -156,6 +156,6 @@ function PageHeaderImpl({
|
|
|
156
156
|
})
|
|
157
157
|
]
|
|
158
158
|
});
|
|
159
|
-
}
|
|
159
|
+
};
|
|
160
160
|
var PageHeaderImpl_default = PageHeaderImpl;
|
|
161
161
|
//# sourceMappingURL=PageHeaderImpl.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/PageHeaderImpl.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport DSBreadcrumb from '@elliemae/ds-breadcrumb';\nimport { DSIconSizes } from '@elliemae/ds-icon';\nimport EditableTitle from './EditableTitle';\nimport Title from './Title';\nimport DropdownTitle from './DropdownTitle';\n\nconst blockName = 'page-header';\n\nconst PageHeaderContainer = aggregatedClasses('div')(blockName, null, ({ withBottomSeparator, subtitle }) => ({\n 'with-bottom-separator': withBottomSeparator,\n 'with-subtitle': subtitle,\n}));\n\nconst PageHeaderMainSection = aggregatedClasses('div')(`${blockName}-main-section`);\nconst PageHeaderTitleSection = aggregatedClasses('div')(`${blockName}-title-section`);\nconst PageHeaderToolbar = aggregatedClasses('div')(`${blockName}-toolbar`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\nconst PageHeaderBreadcrumb = aggregatedClasses(DSBreadcrumb)(`${blockName}-breadcrumb`);\n\nconst PageHeaderTitle = aggregatedClasses('div')(`${blockName}-title`);\nconst Subtitle = aggregatedClasses('div')(`${blockName}-title`, 'subtitle');\nconst BackArrow = aggregatedClasses(ChevronLeft)(`${blockName}-backarrow`);\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyCnB;AAxCJ,0BAA2B;AAC3B,2BAAkC;AAClC,sBAA4B;AAC5B,2BAAyB;AACzB,qBAA4B;AAC5B,2BAA0B;AAC1B,mBAAkB;AAClB,2BAA0B;AAE1B,MAAM,YAAY;AAElB,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,qBAAqB,SAAS,OAAO;AAAA,EAC5G,yBAAyB;AAAA,EACzB,iBAAiB;AACnB,EAAE;AAEF,MAAM,4BAAwB,wCAAkB,KAAK,EAAE,GAAG,wBAAwB;AAClF,MAAM,6BAAyB,wCAAkB,KAAK,EAAE,GAAG,yBAAyB;AACpF,MAAM,wBAAoB,wCAAkB,KAAK,EAAE,GAAG,qBAAqB,MAAM,OAAO;AAAA,EACtF,sBAAsB;AACxB,EAAE;AACF,MAAM,2BAAuB,wCAAkB,qBAAAA,OAAY,EAAE,GAAG,sBAAsB;AAEtF,MAAM,sBAAkB,wCAAkB,KAAK,EAAE,GAAG,iBAAiB;AACrE,MAAM,eAAW,wCAAkB,KAAK,EAAE,GAAG,mBAAmB,UAAU;AAC1E,MAAM,gBAAY,wCAAkB,2BAAW,EAAE,GAAG,qBAAqB;AAEzE,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport DSBreadcrumb from '@elliemae/ds-breadcrumb';\nimport { DSIconSizes } from '@elliemae/ds-icon';\nimport EditableTitle from './EditableTitle';\nimport Title from './Title';\nimport DropdownTitle from './DropdownTitle';\n\nconst blockName = 'page-header';\n\nconst PageHeaderContainer = aggregatedClasses('div')(blockName, null, ({ withBottomSeparator, subtitle }) => ({\n 'with-bottom-separator': withBottomSeparator,\n 'with-subtitle': subtitle,\n}));\n\nconst PageHeaderMainSection = aggregatedClasses('div')(`${blockName}-main-section`);\nconst PageHeaderTitleSection = aggregatedClasses('div')(`${blockName}-title-section`);\nconst PageHeaderToolbar = aggregatedClasses('div')(`${blockName}-toolbar`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\nconst PageHeaderBreadcrumb = aggregatedClasses(DSBreadcrumb)(`${blockName}-breadcrumb`);\n\nconst PageHeaderTitle = aggregatedClasses('div')(`${blockName}-title`);\nconst Subtitle = aggregatedClasses('div')(`${blockName}-title`, 'subtitle');\nconst BackArrow = aggregatedClasses(ChevronLeft)(`${blockName}-backarrow`);\n\nconst HeaderTitle = ({\n title = '',\n options = [],\n optionsMinWidth,\n onSelectOption = () => null,\n selection,\n subtitle = '',\n editable = false,\n editing = false,\n titleInputProps,\n zIndex,\n}) => {\n const titleComponent = editable ? (\n <EditableTitle editing={editing} titleInputProps={titleInputProps}>\n {title}\n </EditableTitle>\n ) : (\n <Title>{title}</Title>\n );\n\n return (\n <PageHeaderTitle>\n {options.length ? (\n <DropdownTitle\n onSelectOption={onSelectOption}\n options={options}\n optionsMinWidth={optionsMinWidth}\n selection={selection}\n titleComponent={titleComponent}\n zIndex={zIndex}\n />\n ) : (\n titleComponent\n )}\n {subtitle && <Subtitle>{subtitle}</Subtitle>}\n </PageHeaderTitle>\n );\n};\n\nconst PageHeaderImpl = ({\n containerProps,\n className,\n title,\n titleOptions,\n renderToolbar,\n breadcrumbs = [],\n previousPage,\n onGoToPreviousPage = () => null,\n subtitle = '',\n withBottomSeparator,\n onSelectOption,\n optionsSelection,\n optionsMinWidth,\n editable = false,\n titleInputProps,\n editing = undefined,\n zIndex,\n}) => {\n const hasBreadcrumbs = !!breadcrumbs.length;\n\n return (\n <PageHeaderContainer\n {...containerProps}\n className={className}\n classProps={{\n withBottomSeparator,\n subtitle,\n }}\n >\n {previousPage && <BackArrow data-testid=\"back-arrow\" onClick={onGoToPreviousPage} size={DSIconSizes.M} />}\n <PageHeaderMainSection>\n {hasBreadcrumbs && (\n <PageHeaderBreadcrumb>\n {breadcrumbs.map((breadcrumb) => (\n <DSBreadcrumb.Item key={breadcrumb.label} {...breadcrumb} />\n ))}\n </PageHeaderBreadcrumb>\n )}\n {previousPage && (\n <PageHeaderBreadcrumb>\n <DSBreadcrumb.Item\n key={previousPage.id}\n label={previousPage.title}\n onClick={previousPage.onClick}\n {...previousPage}\n />\n </PageHeaderBreadcrumb>\n )}\n <PageHeaderTitleSection>\n <HeaderTitle\n editable={editable}\n editing={editing}\n onSelectOption={onSelectOption}\n options={titleOptions}\n optionsMinWidth={optionsMinWidth}\n selection={optionsSelection}\n subtitle={subtitle}\n title={title}\n titleInputProps={titleInputProps}\n zIndex={zIndex}\n />\n {isFunction(renderToolbar) && <PageHeaderToolbar>{renderToolbar()}</PageHeaderToolbar>}\n </PageHeaderTitleSection>\n </PageHeaderMainSection>\n </PageHeaderContainer>\n );\n};\n\nexport default PageHeaderImpl;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyCnB;AAxCJ,0BAA2B;AAC3B,2BAAkC;AAClC,sBAA4B;AAC5B,2BAAyB;AACzB,qBAA4B;AAC5B,2BAA0B;AAC1B,mBAAkB;AAClB,2BAA0B;AAE1B,MAAM,YAAY;AAElB,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,qBAAqB,SAAS,OAAO;AAAA,EAC5G,yBAAyB;AAAA,EACzB,iBAAiB;AACnB,EAAE;AAEF,MAAM,4BAAwB,wCAAkB,KAAK,EAAE,GAAG,wBAAwB;AAClF,MAAM,6BAAyB,wCAAkB,KAAK,EAAE,GAAG,yBAAyB;AACpF,MAAM,wBAAoB,wCAAkB,KAAK,EAAE,GAAG,qBAAqB,MAAM,OAAO;AAAA,EACtF,sBAAsB;AACxB,EAAE;AACF,MAAM,2BAAuB,wCAAkB,qBAAAA,OAAY,EAAE,GAAG,sBAAsB;AAEtF,MAAM,sBAAkB,wCAAkB,KAAK,EAAE,GAAG,iBAAiB;AACrE,MAAM,eAAW,wCAAkB,KAAK,EAAE,GAAG,mBAAmB,UAAU;AAC1E,MAAM,gBAAY,wCAAkB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cAA0C,GAAG;AAAA,eAAtB,WAAW,KAAuB,CAC3D;AAAA,WACH;AAAA,UAED,gBACC,4CAAC;AAAA,YACC,sDAAC,qBAAAA,QAAa,MAAb;AAAA,cAEC,OAAO,aAAa;AAAA,cACpB,SAAS,aAAa;AAAA,cACrB,GAAG;AAAA,eAHC,aAAa,EAIpB;AAAA,WACF;AAAA,UAEF,6CAAC;AAAA,YACC;AAAA,0DAAC;AAAA,gBACC;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,SAAS;AAAA,gBACT;AAAA,gBACA,WAAW;AAAA,gBACX;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,eACF;AAAA,kBACC,gCAAW,aAAa,KAAK,4CAAC;AAAA,gBAAmB,wBAAc;AAAA,eAAE;AAAA;AAAA,WACpE;AAAA;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,IAAO,yBAAQ;",
|
|
6
6
|
"names": ["DSBreadcrumb", "EditableTitle", "Title", "DropdownTitle"]
|
|
7
7
|
}
|
package/dist/cjs/v1/Title.js
CHANGED
|
@@ -32,10 +32,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
32
32
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
33
33
|
var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
|
|
34
34
|
const blockName = "page-header";
|
|
35
|
-
const TitleWrapper = (0, import_ds_classnames.aggregatedClasses)(import_ds_truncated_tooltip_text.default)(
|
|
36
|
-
`${blockName}-title`,
|
|
37
|
-
"title"
|
|
38
|
-
);
|
|
35
|
+
const TitleWrapper = (0, import_ds_classnames.aggregatedClasses)(import_ds_truncated_tooltip_text.default)(`${blockName}-title`, "title");
|
|
39
36
|
const Title = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWrapper, {
|
|
40
37
|
value: children
|
|
41
38
|
});
|
package/dist/cjs/v1/Title.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/Title.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\n\nconst blockName = 'page-header';\nconst TitleWrapper = aggregatedClasses(DSTruncatedTooltipText)(
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\n\nconst blockName = 'page-header';\nconst TitleWrapper = aggregatedClasses(DSTruncatedTooltipText)(`${blockName}-title`, 'title');\nconst Title = ({ children }) => <TitleWrapper value={children} />;\n\nexport default Title;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADMS;AALhC,2BAAkC;AAClC,uCAAmC;AAEnC,MAAM,YAAY;AAClB,MAAM,mBAAe,wCAAkB,iCAAAA,OAAsB,EAAE,GAAG,mBAAmB,OAAO;AAC5F,MAAM,QAAQ,CAAC,EAAE,SAAS,MAAM,4CAAC;AAAA,EAAa,OAAO;AAAA,CAAU;AAE/D,IAAO,gBAAQ;",
|
|
6
6
|
"names": ["DSTruncatedTooltipText"]
|
|
7
7
|
}
|
|
@@ -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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\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 } 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 = 'DSPageHeaderV2';\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,0BAAyB;AACzB,qBAAqB;AACrB,oBAAwB;AACxB,oBAOO;AACP,2BAA8B;AAC9B,6BAAgC;AAChC,qCAAwC;AACxC,+BAAkC;AAElC,mCAAkD;AAClD,8BAAwC;AAExC,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,4CAAC;AAAA,IACE,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACJ,eAAa,gDAAwB;AAAA,IAErC,sDAAC;AAAA,MAAiB;AAAA,MAChB,uDAAC;AAAA,QAAK,MAAM;AAAA,QACV;AAAA,sDAAC;AAAA,YACC,sDAAC;AAAA,cAAgB;AAAA,aAAiB;AAAA,WACpC;AAAA,UACA,6CAAC;AAAA,YAAK,MAAM,CAAC,QAAQ,MAAM;AAAA,YACzB;AAAA,0DAAC;AAAA,gBAAK,WAAU;AAAA,gBAAmC;AAAA,eAAmB;AAAA,cACtE,6CAAC;AAAA,gBAAK,MAAM;AAAA,gBACV;AAAA,+DAAC;AAAA,oBAAK,MAAM;AAAA,oBACT;AAAA;AAAA,sBACA,eAAe,4CAAC;AAAA,wBAAgB;AAAA,uBAAY;AAAA,sBAC5C;AAAA,sBACD,4CAAC,SAAI;AAAA;AAAA,mBACP;AAAA,kBACA,4CAAC;AAAA,oBACC,sDAAC;AAAA,sBAA0B;AAAA,qBAAe;AAAA,mBAC5C;AAAA;AAAA,eACF;AAAA;AAAA,WACF;AAAA;AAAA,OACF;AAAA,KACF;AAAA,GACF;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B,MAAM,6BAAyB,8BAAS,cAAc;AAEtD,uBAAuB,YAAY;AAYnC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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 React, { useRef, useState, useCallback
|
|
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 {\n PropTypes,\n describe,\n useDerivedStateFromProps,\n useMeasure,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n} 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;ADwEnB;AAvEJ,mBAAqD;AACrD,gCAA+D;AAC/D,uBAAuB;AACvB,0BAOO;AACP,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,6CAAmB,2CAAiB;AAAA,mBAC1B,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA,eAEzC,CAAC,EAAE,MA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AAA,MAEF,4CAAC;AAAA,QAAI,KAAK;AAAA,QAAU,OAAO,EAAE,OAAO,cAAc;AAAA,QAChD,sDAAC;AAAA,UAAgB,YAAY,cAAc,CAAC,WAAW,CAAC;AAAA,UAAU;AAAA,SAAW;AAAA,OAC/E;AAAA;AAAA,GACF;AAEJ;AAEA,MAAM,QAAQ;AAAA,EACZ,GAAG;AAAA,EAEH,UAAU,8BAAU,OAAO,YAAY,gBAAgB;AAAA,EAEvD,SAAS,8BAAU,KAAK,YAAY,qCAAqC;AAAA,EAEzE,YAAY,8BAAU,KAAK,YAAY,mBAAmB;AAC5D;AAEA,wBAAwB,YAAY;AACpC,wBAAwB,cAAc;AACtC,MAAM,0CAAsC,8BAAS,uBAAuB;AAE5E,oCAAoC,YAAY;AAEhD,IAAO,kCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\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,0BAAoC;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,CAA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/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\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,0BAAoC;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;AAAA,EAAwB,GAAG;AAAA,EAAM,eAAa,gDAAwB;AAAA,EACrE;AAAA,gDAAC;AAAA,MACC,sDAAC;AAAA,QAAuB,OAAO;AAAA,OAAU;AAAA,KAC3C;AAAA,IACC,cAAc,4CAAC;AAAA,MAAa,UAAQ;AAAA,KAAC;AAAA;AAAA,CACxC;AAGF,MAAM,QAAQ;AAAA,EAEZ,UAAU,8BAAU,OAAO,YAAY,0BAA0B;AAAA,EAEjE,YAAY,8BAAU,KAAK,YAAY,oBAAoB;AAC7D;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,kCAA8B,8BAAS,eAAe;AAE5D,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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-utilities';\n\nimport { DSPageHeaderT
|
|
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-utilities';\n\nimport type { DSPageHeaderT } from '../react-desc-prop-types';\nimport { PageHeaderPropTypes, defaultProps } from '../react-desc-prop-types';\n\nexport const usePageHeader = (props: DSPageHeaderT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, PageHeaderPropTypes);\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,0BAKO;AAGP,mCAAkD;AAE3C,MAAM,gBAAgB,CAAC,UAA+B;AAC3D,QAAM,wBAAoB,kDAA6B,OAAO,yCAAY;AAC1E,0DAA+B,mBAAmB,gDAAmB;AAErE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,OACG;AAAA,EACL,IAAI;AAEJ,QAAM,uBAAmB,4CAAuB,iBAAiB;AACjE,QAAM,mBAAe,wCAAmB,iBAAiB;AAEzD,QAAM,uBAAmB,sBAAQ,MAAM,cAAc,YAAY,4CAAC,aAAU,IAAK,SAAY,CAAC,WAAW,SAAS,CAAC;AAEnH,QAAM,kBAAc,sBAAQ,MAAM,SAAS,OAAO,4CAAC,QAAK,IAAK,SAAY,CAAC,MAAM,IAAI,CAAC;AAErF,QAAM,yBAAqB;AAAA,IACzB,MAAM,gBAAgB,cAAc,4CAAC,eAAY,IAAK;AAAA,IACtD,CAAC,aAAa,WAAW;AAAA,EAC3B;AAEA,QAAM,qBAAiB,sBAAQ,MAAM,YAAY,UAAU,4CAAC,WAAQ,IAAK,SAAY,CAAC,SAAS,OAAO,CAAC;AAEvG,QAAM,qBAAiB,sBAAQ,MAAM,YAAY,UAAU,4CAAC,WAAQ,IAAK,SAAY,CAAC,SAAS,OAAO,CAAC;AAEvG,QAAM,uBAAmB,sBAAQ,MAAM,cAAc,YAAY,4CAAC,aAAU,IAAK,SAAY,CAAC,WAAW,SAAS,CAAC;AAEnH,aAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -42,49 +42,25 @@ const DSPageHeader = ({
|
|
|
42
42
|
});
|
|
43
43
|
const props = {
|
|
44
44
|
version: PropTypes.oneOf([1, 2]).description("Component version"),
|
|
45
|
-
containerProps: PropTypes.object.description(
|
|
46
|
-
|
|
47
|
-
),
|
|
48
|
-
renderToolbar: PropTypes.func.description(
|
|
49
|
-
"Function that returns the toolbar to the right of the page header"
|
|
50
|
-
),
|
|
51
|
-
withBottomSeparator: PropTypes.bool.description(
|
|
52
|
-
"Whether to show a separator at the bottom of the header"
|
|
53
|
-
),
|
|
45
|
+
containerProps: PropTypes.object.description("props injected to page header wrapper node"),
|
|
46
|
+
renderToolbar: PropTypes.func.description("Function that returns the toolbar to the right of the page header"),
|
|
47
|
+
withBottomSeparator: PropTypes.bool.description("Whether to show a separator at the bottom of the header"),
|
|
54
48
|
title: PropTypes.string.description("The page header title"),
|
|
55
|
-
titleOptions: PropTypes.arrayOf(PropTypes.object).description(
|
|
56
|
-
|
|
57
|
-
),
|
|
58
|
-
onSelectOption: PropTypes.func.description(
|
|
59
|
-
"Handler when a user selects an item in the dropdown menu"
|
|
60
|
-
),
|
|
49
|
+
titleOptions: PropTypes.arrayOf(PropTypes.object).description("The title dropdown options"),
|
|
50
|
+
onSelectOption: PropTypes.func.description("Handler when a user selects an item in the dropdown menu"),
|
|
61
51
|
subtitle: PropTypes.string.description("Description text below the title"),
|
|
62
|
-
optionsSelection: PropTypes.object.description(
|
|
63
|
-
"Selection state for the title dropdown"
|
|
64
|
-
),
|
|
52
|
+
optionsSelection: PropTypes.object.description("Selection state for the title dropdown"),
|
|
65
53
|
editable: PropTypes.bool.description("Whether the title is editable or not"),
|
|
66
|
-
editing: PropTypes.bool.description(
|
|
67
|
-
|
|
68
|
-
),
|
|
69
|
-
|
|
70
|
-
"Props passed to the input for editing the title"
|
|
71
|
-
),
|
|
72
|
-
previousPage: PropTypes.object.description(
|
|
73
|
-
"Enables navigation to previous page with back-arrow"
|
|
74
|
-
),
|
|
75
|
-
onGoToPreviousPage: PropTypes.func.description(
|
|
76
|
-
"Callback to handle navigation to previous page"
|
|
77
|
-
),
|
|
54
|
+
editing: PropTypes.bool.description("Activates/Deactivates the editing state in the title"),
|
|
55
|
+
titleInputProps: PropTypes.object.description("Props passed to the input for editing the title"),
|
|
56
|
+
previousPage: PropTypes.object.description("Enables navigation to previous page with back-arrow"),
|
|
57
|
+
onGoToPreviousPage: PropTypes.func.description("Callback to handle navigation to previous page"),
|
|
78
58
|
zIndex: PropTypes.number.description("z-index to use for the DropdownMenu"),
|
|
79
|
-
optionsMinWidth: PropTypes.number.description(
|
|
80
|
-
"min width for options dropdown menu"
|
|
81
|
-
)
|
|
59
|
+
optionsMinWidth: PropTypes.number.description("min width for options dropdown menu")
|
|
82
60
|
};
|
|
83
61
|
DSPageHeader.propTypes = props;
|
|
84
62
|
DSPageHeader.displayName = "DSPageHeader";
|
|
85
|
-
const DSPageHeaderV1WithSchema = describe(DSPageHeader).deprecated(
|
|
86
|
-
"use DSPageHeaderV2"
|
|
87
|
-
);
|
|
63
|
+
const DSPageHeaderV1WithSchema = describe(DSPageHeader).deprecated("use DSPageHeaderV2");
|
|
88
64
|
DSPageHeaderV1WithSchema.propTypes = props;
|
|
89
65
|
var DSPageHeader_default = DSPageHeader;
|
|
90
66
|
export {
|
|
@@ -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-utilities';\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(
|
|
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;AAAA,KACf;AACL,MACE,oBAAC;AAAA,EACC,8BAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACC,GAAG;AAAA,GACN;AAAA,CACF;AAGF,MAAM,QAAQ;AAAA,EAEZ,SAAS,UAAU,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,mBAAmB;AAAA,EAEhE,gBAAgB,UAAU,OAAO
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\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
|
+
"mappings": "AAAA,YAAY,WAAW;ACwBnB;AAvBJ,SAAS,UAA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,UAAU,OAAO,YAAY,iDAAiD;AAAA,EAE/F,cAAc,UAAU,OAAO,YAAY,qDAAqD;AAAA,EAEhG,oBAAoB,UAAU,KAAK,YAAY,gDAAgD;AAAA,EAE/F,QAAQ,UAAU,OAAO,YAAY,qCAAqC;AAAA,EAE1E,iBAAiB,UAAU,OAAO,YAAY,qCAAqC;AACrF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,2BAA2B,SAAS,YAAY,EAAE,WAAW,oBAAoB;AACvF,yBAAyB,YAAY;AAGrC,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,25 +4,23 @@ import DSDropdownMenu from "@elliemae/ds-dropdownmenu";
|
|
|
4
4
|
import { ChevronSmallDown } from "@elliemae/ds-icons";
|
|
5
5
|
import DSButton from "@elliemae/ds-button";
|
|
6
6
|
import TitleWrapper from "./TitleWrapper";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
}
|
|
7
|
+
const DropdownTitle = ({ titleComponent, onSelectOption, options, optionsMinWidth, selection, zIndex }) => /* @__PURE__ */ jsxs(TitleWrapper, {
|
|
8
|
+
children: [
|
|
9
|
+
titleComponent,
|
|
10
|
+
/* @__PURE__ */ jsx(DSDropdownMenu, {
|
|
11
|
+
minWidth: optionsMinWidth,
|
|
12
|
+
onSelectMenuItem: onSelectOption,
|
|
13
|
+
options,
|
|
14
|
+
selection,
|
|
15
|
+
triggerComponent: /* @__PURE__ */ jsx(DSButton, {
|
|
16
|
+
buttonType: "text",
|
|
17
|
+
"data-testid": "page-header-dropdown-trigger-component",
|
|
18
|
+
icon: /* @__PURE__ */ jsx(ChevronSmallDown, {})
|
|
19
|
+
}),
|
|
20
|
+
zIndex
|
|
21
|
+
})
|
|
22
|
+
]
|
|
23
|
+
});
|
|
26
24
|
DropdownTitle.propTypes = {};
|
|
27
25
|
var DropdownTitle_default = DropdownTitle;
|
|
28
26
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/DropdownTitle.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport TitleWrapper from './TitleWrapper';\n\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport TitleWrapper from './TitleWrapper';\n\nconst DropdownTitle = ({ titleComponent, onSelectOption, options, optionsMinWidth, selection, zIndex }) => (\n <TitleWrapper>\n {titleComponent}\n <DSDropdownMenu\n minWidth={optionsMinWidth}\n onSelectMenuItem={onSelectOption}\n options={options}\n selection={selection}\n triggerComponent={\n <DSButton buttonType=\"text\" data-testid=\"page-header-dropdown-trigger-component\" icon={<ChevronSmallDown />} />\n }\n zIndex={zIndex}\n />\n </TitleWrapper>\n);\n\nDropdownTitle.propTypes = {};\n\nexport default DropdownTitle;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACOrB,SAQ6F,KAR7F;AANF,OAAO,oBAAoB;AAC3B,SAAS,wBAAwB;AACjC,OAAO,cAAc;AACrB,OAAO,kBAAkB;AAEzB,MAAM,gBAAgB,CAAC,EAAE,gBAAgB,gBAAgB,SAAS,iBAAiB,WAAW,OAAO,MACnG,qBAAC;AAAA,EACE;AAAA;AAAA,IACD,oBAAC;AAAA,MACC,UAAU;AAAA,MACV,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,MACA,kBACE,oBAAC;AAAA,QAAS,YAAW;AAAA,QAAO,eAAY;AAAA,QAAyC,MAAM,oBAAC,oBAAiB;AAAA,OAAI;AAAA,MAE/G;AAAA,KACF;AAAA;AAAA,CACF;AAGF,cAAc,YAAY,CAAC;AAE3B,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useRef, useState } from "react";
|
|
4
|
-
import { useDerivedStateFromProps } from "@elliemae/ds-utilities";
|
|
4
|
+
import { useDerivedStateFromProps, runAll } from "@elliemae/ds-utilities";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
6
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
7
|
-
import { runAll } from "@elliemae/ds-utilities";
|
|
8
7
|
import DSInput from "@elliemae/ds-form/Input";
|
|
9
8
|
import Title from "./Title";
|
|
10
9
|
const blockName = "page-header";
|
|
11
|
-
const EditableTitleComponent = aggregatedClasses(DSInput)(
|
|
12
|
-
|
|
13
|
-
"editable-title"
|
|
14
|
-
);
|
|
15
|
-
function EditableTitle({
|
|
16
|
-
children: value,
|
|
17
|
-
editing: editingProp,
|
|
18
|
-
titleInputProps
|
|
19
|
-
}) {
|
|
10
|
+
const EditableTitleComponent = aggregatedClasses(DSInput)(`${blockName}-title`, "editable-title");
|
|
11
|
+
const EditableTitle = ({ children: value, editing: editingProp, titleInputProps }) => {
|
|
20
12
|
const [titleValue, setTitleValue] = useState(value);
|
|
21
13
|
const [hovered, setHovered] = useState(false);
|
|
22
14
|
const [editing, setEditing] = useDerivedStateFromProps(editingProp || false);
|
|
@@ -25,15 +17,9 @@ function EditableTitle({
|
|
|
25
17
|
children: hovered || editing ? /* @__PURE__ */ jsx(EditableTitleComponent, {
|
|
26
18
|
...titleInputProps,
|
|
27
19
|
onBlur: runAll(() => setEditing(false), titleInputProps.onBlur),
|
|
28
|
-
onChange: runAll(
|
|
29
|
-
(e) => setTitleValue(e.target.value),
|
|
30
|
-
titleInputProps.onChange
|
|
31
|
-
),
|
|
20
|
+
onChange: runAll((e) => setTitleValue(e.target.value), titleInputProps.onChange),
|
|
32
21
|
onFocus: runAll(() => setEditing(true), titleInputProps.onFocus),
|
|
33
|
-
onMouseOut: runAll(
|
|
34
|
-
() => setHovered(false),
|
|
35
|
-
titleInputProps.onMouseOut
|
|
36
|
-
),
|
|
22
|
+
onMouseOut: runAll(() => setHovered(false), titleInputProps.onMouseOut),
|
|
37
23
|
value: titleValue
|
|
38
24
|
}) : /* @__PURE__ */ jsx("div", {
|
|
39
25
|
ref: titleRef,
|
|
@@ -43,7 +29,7 @@ function EditableTitle({
|
|
|
43
29
|
})
|
|
44
30
|
})
|
|
45
31
|
});
|
|
46
|
-
}
|
|
32
|
+
};
|
|
47
33
|
EditableTitle.propTypes = {
|
|
48
34
|
children: PropTypes.string,
|
|
49
35
|
editing: PropTypes.bool
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/EditableTitle.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useState } from 'react';\nimport { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useState } from 'react';\nimport { useDerivedStateFromProps, runAll } from '@elliemae/ds-utilities';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSInput from '@elliemae/ds-form/Input';\nimport Title from './Title';\n\nconst blockName = 'page-header';\n\nconst EditableTitleComponent = aggregatedClasses(DSInput)(`${blockName}-title`, 'editable-title');\n\nconst EditableTitle = ({ children: value, editing: editingProp, titleInputProps }) => {\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 return (\n <>\n {hovered || editing ? (\n <EditableTitleComponent\n {...titleInputProps}\n onBlur={runAll(() => setEditing(false), titleInputProps.onBlur)}\n onChange={runAll((e) => setTitleValue(e.target.value), titleInputProps.onChange)}\n onFocus={runAll(() => setEditing(true), titleInputProps.onFocus)}\n onMouseOut={runAll(() => setHovered(false), titleInputProps.onMouseOut)}\n value={titleValue}\n />\n ) : (\n <div ref={titleRef} onMouseEnter={() => setHovered(true)}>\n <Title>{titleValue}</Title>\n </div>\n )}\n </>\n );\n};\n\nEditableTitle.propTypes = {\n /** The title text */\n children: PropTypes.string,\n /** Whether the title is editing or not */\n editing: PropTypes.bool,\n};\n\nexport default EditableTitle;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiBnB,mBAEI,WAFJ;AAjBJ,SAAgB,QAAQ,gBAAgB;AACxC,SAAS,0BAA0B,cAAc;AACjD,OAAO,eAAe;AACtB,SAAS,yBAAyB;AAClC,OAAO,aAAa;AACpB,OAAO,WAAW;AAElB,MAAM,YAAY;AAElB,MAAM,yBAAyB,kBAAkB,OAAO,EAAE,GAAG,mBAAmB,gBAAgB;AAEhG,MAAM,gBAAgB,CAAC,EAAE,UAAU,OAAO,SAAS,aAAa,gBAAgB,MAAM;AACpF,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,CAAC,SAAS,UAAU,IAAI,yBAAyB,eAAe,KAAK;AAC3E,QAAM,WAAW,OAAO,IAAI;AAC5B,SACE;AAAA,IACG,qBAAW,UACV,oBAAC;AAAA,MACE,GAAG;AAAA,MACJ,QAAQ,OAAO,MAAM,WAAW,KAAK,GAAG,gBAAgB,MAAM;AAAA,MAC9D,UAAU,OAAO,CAAC,MAAM,cAAc,EAAE,OAAO,KAAK,GAAG,gBAAgB,QAAQ;AAAA,MAC/E,SAAS,OAAO,MAAM,WAAW,IAAI,GAAG,gBAAgB,OAAO;AAAA,MAC/D,YAAY,OAAO,MAAM,WAAW,KAAK,GAAG,gBAAgB,UAAU;AAAA,MACtE,OAAO;AAAA,KACT,IAEA,oBAAC;AAAA,MAAI,KAAK;AAAA,MAAU,cAAc,MAAM,WAAW,IAAI;AAAA,MACrD,8BAAC;AAAA,QAAO;AAAA,OAAW;AAAA,KACrB;AAAA,GAEJ;AAEJ;AAEA,cAAc,YAAY;AAAA,EAExB,UAAU,UAAU;AAAA,EAEpB,SAAS,UAAU;AACrB;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,7 +22,7 @@ const PageHeaderBreadcrumb = aggregatedClasses(DSBreadcrumb)(`${blockName}-bread
|
|
|
22
22
|
const PageHeaderTitle = aggregatedClasses("div")(`${blockName}-title`);
|
|
23
23
|
const Subtitle = aggregatedClasses("div")(`${blockName}-title`, "subtitle");
|
|
24
24
|
const BackArrow = aggregatedClasses(ChevronLeft)(`${blockName}-backarrow`);
|
|
25
|
-
|
|
25
|
+
const HeaderTitle = ({
|
|
26
26
|
title = "",
|
|
27
27
|
options = [],
|
|
28
28
|
optionsMinWidth,
|
|
@@ -33,7 +33,7 @@ function HeaderTitle({
|
|
|
33
33
|
editing = false,
|
|
34
34
|
titleInputProps,
|
|
35
35
|
zIndex
|
|
36
|
-
}) {
|
|
36
|
+
}) => {
|
|
37
37
|
const titleComponent = editable ? /* @__PURE__ */ jsx(EditableTitle, {
|
|
38
38
|
editing,
|
|
39
39
|
titleInputProps,
|
|
@@ -56,8 +56,8 @@ function HeaderTitle({
|
|
|
56
56
|
})
|
|
57
57
|
]
|
|
58
58
|
});
|
|
59
|
-
}
|
|
60
|
-
|
|
59
|
+
};
|
|
60
|
+
const PageHeaderImpl = ({
|
|
61
61
|
containerProps,
|
|
62
62
|
className,
|
|
63
63
|
title,
|
|
@@ -75,7 +75,7 @@ function PageHeaderImpl({
|
|
|
75
75
|
titleInputProps,
|
|
76
76
|
editing = void 0,
|
|
77
77
|
zIndex
|
|
78
|
-
}) {
|
|
78
|
+
}) => {
|
|
79
79
|
const hasBreadcrumbs = !!breadcrumbs.length;
|
|
80
80
|
return /* @__PURE__ */ jsxs(PageHeaderContainer, {
|
|
81
81
|
...containerProps,
|
|
@@ -127,7 +127,7 @@ function PageHeaderImpl({
|
|
|
127
127
|
})
|
|
128
128
|
]
|
|
129
129
|
});
|
|
130
|
-
}
|
|
130
|
+
};
|
|
131
131
|
var PageHeaderImpl_default = PageHeaderImpl;
|
|
132
132
|
export {
|
|
133
133
|
PageHeaderImpl_default as default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/PageHeaderImpl.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport DSBreadcrumb from '@elliemae/ds-breadcrumb';\nimport { DSIconSizes } from '@elliemae/ds-icon';\nimport EditableTitle from './EditableTitle';\nimport Title from './Title';\nimport DropdownTitle from './DropdownTitle';\n\nconst blockName = 'page-header';\n\nconst PageHeaderContainer = aggregatedClasses('div')(blockName, null, ({ withBottomSeparator, subtitle }) => ({\n 'with-bottom-separator': withBottomSeparator,\n 'with-subtitle': subtitle,\n}));\n\nconst PageHeaderMainSection = aggregatedClasses('div')(`${blockName}-main-section`);\nconst PageHeaderTitleSection = aggregatedClasses('div')(`${blockName}-title-section`);\nconst PageHeaderToolbar = aggregatedClasses('div')(`${blockName}-toolbar`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\nconst PageHeaderBreadcrumb = aggregatedClasses(DSBreadcrumb)(`${blockName}-breadcrumb`);\n\nconst PageHeaderTitle = aggregatedClasses('div')(`${blockName}-title`);\nconst Subtitle = aggregatedClasses('div')(`${blockName}-title`, 'subtitle');\nconst BackArrow = aggregatedClasses(ChevronLeft)(`${blockName}-backarrow`);\n\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACyCnB,cAQA,YARA;AAxCJ,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,OAAO,kBAAkB;AACzB,SAAS,mBAAmB;AAC5B,OAAO,mBAAmB;AAC1B,OAAO,WAAW;AAClB,OAAO,mBAAmB;AAE1B,MAAM,YAAY;AAElB,MAAM,sBAAsB,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,qBAAqB,SAAS,OAAO;AAAA,EAC5G,yBAAyB;AAAA,EACzB,iBAAiB;AACnB,EAAE;AAEF,MAAM,wBAAwB,kBAAkB,KAAK,EAAE,GAAG,wBAAwB;AAClF,MAAM,yBAAyB,kBAAkB,KAAK,EAAE,GAAG,yBAAyB;AACpF,MAAM,oBAAoB,kBAAkB,KAAK,EAAE,GAAG,qBAAqB,MAAM,OAAO;AAAA,EACtF,sBAAsB;AACxB,EAAE;AACF,MAAM,uBAAuB,kBAAkB,YAAY,EAAE,GAAG,sBAAsB;AAEtF,MAAM,kBAAkB,kBAAkB,KAAK,EAAE,GAAG,iBAAiB;AACrE,MAAM,WAAW,kBAAkB,KAAK,EAAE,GAAG,mBAAmB,UAAU;AAC1E,MAAM,YAAY,kBAAkB,WAAW,EAAE,GAAG,qBAAqB;AAEzE,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport DSBreadcrumb from '@elliemae/ds-breadcrumb';\nimport { DSIconSizes } from '@elliemae/ds-icon';\nimport EditableTitle from './EditableTitle';\nimport Title from './Title';\nimport DropdownTitle from './DropdownTitle';\n\nconst blockName = 'page-header';\n\nconst PageHeaderContainer = aggregatedClasses('div')(blockName, null, ({ withBottomSeparator, subtitle }) => ({\n 'with-bottom-separator': withBottomSeparator,\n 'with-subtitle': subtitle,\n}));\n\nconst PageHeaderMainSection = aggregatedClasses('div')(`${blockName}-main-section`);\nconst PageHeaderTitleSection = aggregatedClasses('div')(`${blockName}-title-section`);\nconst PageHeaderToolbar = aggregatedClasses('div')(`${blockName}-toolbar`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\nconst PageHeaderBreadcrumb = aggregatedClasses(DSBreadcrumb)(`${blockName}-breadcrumb`);\n\nconst PageHeaderTitle = aggregatedClasses('div')(`${blockName}-title`);\nconst Subtitle = aggregatedClasses('div')(`${blockName}-title`, 'subtitle');\nconst BackArrow = aggregatedClasses(ChevronLeft)(`${blockName}-backarrow`);\n\nconst HeaderTitle = ({\n title = '',\n options = [],\n optionsMinWidth,\n onSelectOption = () => null,\n selection,\n subtitle = '',\n editable = false,\n editing = false,\n titleInputProps,\n zIndex,\n}) => {\n const titleComponent = editable ? (\n <EditableTitle editing={editing} titleInputProps={titleInputProps}>\n {title}\n </EditableTitle>\n ) : (\n <Title>{title}</Title>\n );\n\n return (\n <PageHeaderTitle>\n {options.length ? (\n <DropdownTitle\n onSelectOption={onSelectOption}\n options={options}\n optionsMinWidth={optionsMinWidth}\n selection={selection}\n titleComponent={titleComponent}\n zIndex={zIndex}\n />\n ) : (\n titleComponent\n )}\n {subtitle && <Subtitle>{subtitle}</Subtitle>}\n </PageHeaderTitle>\n );\n};\n\nconst PageHeaderImpl = ({\n containerProps,\n className,\n title,\n titleOptions,\n renderToolbar,\n breadcrumbs = [],\n previousPage,\n onGoToPreviousPage = () => null,\n subtitle = '',\n withBottomSeparator,\n onSelectOption,\n optionsSelection,\n optionsMinWidth,\n editable = false,\n titleInputProps,\n editing = undefined,\n zIndex,\n}) => {\n const hasBreadcrumbs = !!breadcrumbs.length;\n\n return (\n <PageHeaderContainer\n {...containerProps}\n className={className}\n classProps={{\n withBottomSeparator,\n subtitle,\n }}\n >\n {previousPage && <BackArrow data-testid=\"back-arrow\" onClick={onGoToPreviousPage} size={DSIconSizes.M} />}\n <PageHeaderMainSection>\n {hasBreadcrumbs && (\n <PageHeaderBreadcrumb>\n {breadcrumbs.map((breadcrumb) => (\n <DSBreadcrumb.Item key={breadcrumb.label} {...breadcrumb} />\n ))}\n </PageHeaderBreadcrumb>\n )}\n {previousPage && (\n <PageHeaderBreadcrumb>\n <DSBreadcrumb.Item\n key={previousPage.id}\n label={previousPage.title}\n onClick={previousPage.onClick}\n {...previousPage}\n />\n </PageHeaderBreadcrumb>\n )}\n <PageHeaderTitleSection>\n <HeaderTitle\n editable={editable}\n editing={editing}\n onSelectOption={onSelectOption}\n options={titleOptions}\n optionsMinWidth={optionsMinWidth}\n selection={optionsSelection}\n subtitle={subtitle}\n title={title}\n titleInputProps={titleInputProps}\n zIndex={zIndex}\n />\n {isFunction(renderToolbar) && <PageHeaderToolbar>{renderToolbar()}</PageHeaderToolbar>}\n </PageHeaderTitleSection>\n </PageHeaderMainSection>\n </PageHeaderContainer>\n );\n};\n\nexport default PageHeaderImpl;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyCnB,cAQA,YARA;AAxCJ,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,OAAO,kBAAkB;AACzB,SAAS,mBAAmB;AAC5B,OAAO,mBAAmB;AAC1B,OAAO,WAAW;AAClB,OAAO,mBAAmB;AAE1B,MAAM,YAAY;AAElB,MAAM,sBAAsB,k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3B,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,UAAU;AAAA,EACV;AACF,MAAM;AACJ,QAAM,iBAAiB,CAAC,CAAC,YAAY;AAErC,SACE,qBAAC;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,YAAY;AAAA,MACV;AAAA,MACA;AAAA,IACF;AAAA,IAEC;AAAA,sBAAgB,oBAAC;AAAA,QAAU,eAAY;AAAA,QAAa,SAAS;AAAA,QAAoB,MAAM,YAAY;AAAA,OAAG;AAAA,MACvG,qBAAC;AAAA,QACE;AAAA,4BACC,oBAAC;AAAA,YACE,sBAAY,IAAI,CAAC,eAChB,oBAAC,aAAa,MAAb;AAAA,cAA0C,GAAG;AAAA,eAAtB,WAAW,KAAuB,CAC3D;AAAA,WACH;AAAA,UAED,gBACC,oBAAC;AAAA,YACC,8BAAC,aAAa,MAAb;AAAA,cAEC,OAAO,aAAa;AAAA,cACpB,SAAS,aAAa;AAAA,cACrB,GAAG;AAAA,eAHC,aAAa,EAIpB;AAAA,WACF;AAAA,UAEF,qBAAC;AAAA,YACC;AAAA,kCAAC;AAAA,gBACC;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,SAAS;AAAA,gBACT;AAAA,gBACA,WAAW;AAAA,gBACX;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,eACF;AAAA,cACC,WAAW,aAAa,KAAK,oBAAC;AAAA,gBAAmB,wBAAc;AAAA,eAAE;AAAA;AAAA,WACpE;AAAA;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/v1/Title.js
CHANGED
|
@@ -3,10 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
4
|
import DSTruncatedTooltipText from "@elliemae/ds-truncated-tooltip-text";
|
|
5
5
|
const blockName = "page-header";
|
|
6
|
-
const TitleWrapper = aggregatedClasses(DSTruncatedTooltipText)(
|
|
7
|
-
`${blockName}-title`,
|
|
8
|
-
"title"
|
|
9
|
-
);
|
|
6
|
+
const TitleWrapper = aggregatedClasses(DSTruncatedTooltipText)(`${blockName}-title`, "title");
|
|
10
7
|
const Title = ({ children }) => /* @__PURE__ */ jsx(TitleWrapper, {
|
|
11
8
|
value: children
|
|
12
9
|
});
|
package/dist/esm/v1/Title.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/Title.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\n\nconst blockName = 'page-header';\nconst TitleWrapper = aggregatedClasses(DSTruncatedTooltipText)(
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\n\nconst blockName = 'page-header';\nconst TitleWrapper = aggregatedClasses(DSTruncatedTooltipText)(`${blockName}-title`, 'title');\nconst Title = ({ children }) => <TitleWrapper value={children} />;\n\nexport default Title;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACMS;AALhC,SAAS,yBAAyB;AAClC,OAAO,4BAA4B;AAEnC,MAAM,YAAY;AAClB,MAAM,eAAe,kBAAkB,sBAAsB,EAAE,GAAG,mBAAmB,OAAO;AAC5F,MAAM,QAAQ,CAAC,EAAE,SAAS,MAAM,oBAAC;AAAA,EAAa,OAAO;AAAA,CAAU;AAE/D,IAAO,gBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
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-utilities';\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 } 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 = 'DSPageHeaderV2';\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
|
+
"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,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AACxC,SAAS,yBAAyB;AAElC,SAAS,qBAAqB,oBAAoB;AAClD,SAAS,+BAA+B;AAExC,MAAM,iBAA2D,CAAC,UAAU;AAC1E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;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react-shim.js", "../../../../src/v2/components/PageHeaderEditableTitle.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useState, useCallback
|
|
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 {\n PropTypes,\n describe,\n useDerivedStateFromProps,\n useMeasure,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n} 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;ACwEnB,SAOI,KAPJ;AAvEJ,SAAgB,QAAQ,UAAU,mBAAmB;AACrD,SAAS,aAAa,iBAAiB,wBAAwB;AAC/D,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC,MAAM,oB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ACpC,eAAa,wBAAwB;AAAA,IAEnC;AAAA,kBAAW,YACX,oBAAC;AAAA,QACC,UAAU;AAAA,QACT,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,aAAY;AAAA,QACZ,OAAO,EAAE,OAAO,QAAQ,IAAI,UAAU,SAAS,UAAU,OAAO;AAAA,QAChE,OAAO;AAAA,OACT;AAAA,MAEF,oBAAC;AAAA,QAAI,KAAK;AAAA,QAAU,OAAO,EAAE,OAAO,cAAc;AAAA,QAChD,8BAAC;AAAA,UAAgB,YAAY,cAAc,CAAC,WAAW,CAAC;AAAA,UAAU;AAAA,SAAW;AAAA,OAC/E;AAAA;AAAA,GACF;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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/PageHeaderSummary.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsCrB,SAC6B,KAD7B;AApCF,SAAS,WAAW,gBAAgB;AACpC,SAAS,cAAc;AACvB,SAAS,kBAAkB,mBAAmB,+BAA+B;AAE7E,MAAM,2BAA2B,OAAO,OAAO;AAAA,EAC7C,MAAM;AAAA,EACN,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BAA8B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/PageHeaderTitle.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyBrB,SAEI,KAFJ;AAvBF,SAAS,cAAc;AACvB,SAAS,WAAW,gBAAgB;AACpC,SAAS,wBAAwB,2BAA2B;AAC5D,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB,mBAAmB,+BAA+B;AAC7E,MAAM,yBAAyB,OAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,kBAAkB;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,qBAAC;AAAA,EAAwB,GAAG;AAAA,EAAM,eAAa,wBAAwB;AAAA,EACrE;AAAA,wBAAC;AAAA,MACC,8BAAC;AAAA,QAAuB,OAAO;AAAA,OAAU;AAAA,KAC3C;AAAA,IACC,cAAc,oBAAC;AAAA,MAAa,UAAQ;AAAA,KAAC;AAAA;AAAA,CACxC;AAGF,MAAM,QAAQ;AAAA,EAEZ,UAAU,UAAU,OAAO,YAAY,0BAA0B;AAAA,EAEjE,YAAY,UAAU,KAAK,YAAY,oBAAoB;AAC7D;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,8BAA8B,SAAS,eAAe;AAE5D,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/config/usePageHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport { useMemo } from 'react';\nimport {\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\n\nimport { DSPageHeaderT
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport { useMemo } from 'react';\nimport {\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\n\nimport type { DSPageHeaderT } from '../react-desc-prop-types';\nimport { PageHeaderPropTypes, defaultProps } from '../react-desc-prop-types';\n\nexport const usePageHeader = (props: DSPageHeaderT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, PageHeaderPropTypes);\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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmC4C;AAlCnE,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,qBAAqB,oBAAoB;AAE3C,MAAM,gBAAgB,CAAC,UAA+B;AAC3D,QAAM,oBAAoB,6BAA6B,OAAO,YAAY;AAC1E,iCAA+B,mBAAmB,mBAAmB;AAErE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,OACG;AAAA,EACL,IAAI;AAEJ,QAAM,mBAAmB,uBAAuB,iBAAiB;AACjE,QAAM,eAAe,mBAAmB,iBAAiB;AAEzD,QAAM,mBAAmB,QAAQ,MAAM,cAAc,YAAY,oBAAC,aAAU,IAAK,SAAY,CAAC,WAAW,SAAS,CAAC;AAEnH,QAAM,cAAc,QAAQ,MAAM,SAAS,OAAO,oBAAC,QAAK,IAAK,SAAY,CAAC,MAAM,IAAI,CAAC;AAErF,QAAM,qBAAqB;AAAA,IACzB,MAAM,gBAAgB,cAAc,oBAAC,eAAY,IAAK;AAAA,IACtD,CAAC,aAAa,WAAW;AAAA,EAC3B;AAEA,QAAM,iBAAiB,QAAQ,MAAM,YAAY,UAAU,oBAAC,WAAQ,IAAK,SAAY,CAAC,SAAS,OAAO,CAAC;AAEvG,QAAM,iBAAiB,QAAQ,MAAM,YAAY,UAAU,oBAAC,WAAQ,IAAK,SAAY,CAAC,SAAS,OAAO,CAAC;AAEvG,QAAM,mBAAmB,QAAQ,MAAM,cAAc,YAAY,oBAAC,aAAU,IAAK,SAAY,CAAC,WAAW,SAAS,CAAC;AAEnH,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-page-header",
|
|
3
|
-
"version": "3.12.0-next.
|
|
3
|
+
"version": "3.12.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Page Header",
|
|
6
6
|
"files": [
|
|
@@ -103,18 +103,18 @@
|
|
|
103
103
|
"indent": 4
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@elliemae/ds-breadcrumb": "3.12.0-next.
|
|
107
|
-
"@elliemae/ds-button": "3.12.0-next.
|
|
108
|
-
"@elliemae/ds-classnames": "3.12.0-next.
|
|
109
|
-
"@elliemae/ds-dropdownmenu": "3.12.0-next.
|
|
110
|
-
"@elliemae/ds-form": "3.12.0-next.
|
|
111
|
-
"@elliemae/ds-form-input-text": "3.12.0-next.
|
|
112
|
-
"@elliemae/ds-grid": "3.12.0-next.
|
|
113
|
-
"@elliemae/ds-icon": "3.12.0-next.
|
|
114
|
-
"@elliemae/ds-icons": "3.12.0-next.
|
|
115
|
-
"@elliemae/ds-system": "3.12.0-next.
|
|
116
|
-
"@elliemae/ds-truncated-tooltip-text": "3.12.0-next.
|
|
117
|
-
"@elliemae/ds-utilities": "3.12.0-next.
|
|
106
|
+
"@elliemae/ds-breadcrumb": "3.12.0-next.1",
|
|
107
|
+
"@elliemae/ds-button": "3.12.0-next.1",
|
|
108
|
+
"@elliemae/ds-classnames": "3.12.0-next.1",
|
|
109
|
+
"@elliemae/ds-dropdownmenu": "3.12.0-next.1",
|
|
110
|
+
"@elliemae/ds-form": "3.12.0-next.1",
|
|
111
|
+
"@elliemae/ds-form-input-text": "3.12.0-next.1",
|
|
112
|
+
"@elliemae/ds-grid": "3.12.0-next.1",
|
|
113
|
+
"@elliemae/ds-icon": "3.12.0-next.1",
|
|
114
|
+
"@elliemae/ds-icons": "3.12.0-next.1",
|
|
115
|
+
"@elliemae/ds-system": "3.12.0-next.1",
|
|
116
|
+
"@elliemae/ds-truncated-tooltip-text": "3.12.0-next.1",
|
|
117
|
+
"@elliemae/ds-utilities": "3.12.0-next.1",
|
|
118
118
|
"prop-types": "~15.8.1"
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|