@elliemae/ds-page-header 3.4.3-rc.1 → 3.5.0-rc.10
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/DSPageHeader.js +4 -1
- package/dist/cjs/DSPageHeader.js.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v1/DSPageHeader.js +61 -32
- package/dist/cjs/v1/DSPageHeader.js.map +2 -2
- package/dist/cjs/v1/DropdownTitle.js +22 -14
- package/dist/cjs/v1/DropdownTitle.js.map +2 -2
- package/dist/cjs/v1/EditableTitle.js +32 -14
- package/dist/cjs/v1/EditableTitle.js.map +2 -2
- package/dist/cjs/v1/PageHeaderImpl.js +71 -39
- package/dist/cjs/v1/PageHeaderImpl.js.map +2 -2
- package/dist/cjs/v1/Title.js +10 -4
- package/dist/cjs/v1/Title.js.map +2 -2
- package/dist/cjs/v1/TitleWrapper.js +4 -1
- package/dist/cjs/v1/TitleWrapper.js.map +1 -1
- package/dist/cjs/v2/PageHeader.js +51 -17
- package/dist/cjs/v2/PageHeader.js.map +1 -1
- package/dist/cjs/v2/components/PageHeaderEditableTitle.js +27 -17
- package/dist/cjs/v2/components/PageHeaderEditableTitle.js.map +1 -1
- package/dist/cjs/v2/components/PageHeaderSummary.js +21 -11
- package/dist/cjs/v2/components/PageHeaderSummary.js.map +1 -1
- package/dist/cjs/v2/components/PageHeaderTitle.js +18 -9
- package/dist/cjs/v2/components/PageHeaderTitle.js.map +1 -1
- package/dist/cjs/v2/config/usePageHeader.js +40 -30
- package/dist/cjs/v2/config/usePageHeader.js.map +1 -1
- package/dist/cjs/v2/exported-related/data-test-ids.js +4 -1
- package/dist/cjs/v2/exported-related/data-test-ids.js.map +1 -1
- package/dist/cjs/v2/exported-related/index.js +4 -1
- package/dist/cjs/v2/exported-related/index.js.map +1 -1
- package/dist/cjs/v2/exported-related/theming.js +4 -1
- package/dist/cjs/v2/exported-related/theming.js.map +1 -1
- package/dist/cjs/v2/react-desc-prop-types.js +4 -1
- package/dist/cjs/v2/react-desc-prop-types.js.map +1 -1
- package/dist/cjs/v2/styled.js +4 -1
- package/dist/cjs/v2/styled.js.map +1 -1
- package/dist/cjs/v2/tests/utils.js +4 -1
- package/dist/cjs/v2/tests/utils.js.map +1 -1
- package/dist/esm/DSPageHeader.js.map +2 -2
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/v1/DSPageHeader.js +57 -31
- package/dist/esm/v1/DSPageHeader.js.map +1 -1
- package/dist/esm/v1/DropdownTitle.js +18 -13
- package/dist/esm/v1/DropdownTitle.js.map +1 -1
- package/dist/esm/v1/EditableTitle.js +28 -13
- package/dist/esm/v1/EditableTitle.js.map +1 -1
- package/dist/esm/v1/PageHeaderImpl.js +67 -38
- package/dist/esm/v1/PageHeaderImpl.js.map +1 -1
- package/dist/esm/v1/Title.js +6 -3
- package/dist/esm/v1/Title.js.map +1 -1
- package/dist/esm/v1/TitleWrapper.js.map +1 -1
- package/dist/esm/v2/PageHeader.js +47 -16
- package/dist/esm/v2/PageHeader.js.map +1 -1
- package/dist/esm/v2/components/PageHeaderEditableTitle.js +23 -16
- package/dist/esm/v2/components/PageHeaderEditableTitle.js.map +1 -1
- package/dist/esm/v2/components/PageHeaderSummary.js +17 -10
- package/dist/esm/v2/components/PageHeaderSummary.js.map +1 -1
- package/dist/esm/v2/components/PageHeaderTitle.js +14 -8
- package/dist/esm/v2/components/PageHeaderTitle.js.map +1 -1
- package/dist/esm/v2/config/usePageHeader.js +36 -29
- package/dist/esm/v2/config/usePageHeader.js.map +1 -1
- package/dist/esm/v2/exported-related/data-test-ids.js.map +1 -1
- package/dist/esm/v2/exported-related/index.js.map +1 -1
- package/dist/esm/v2/exported-related/theming.js.map +1 -1
- package/dist/esm/v2/react-desc-prop-types.js.map +1 -1
- package/dist/esm/v2/styled.js.map +1 -1
- package/dist/esm/v2/tests/utils.js.map +1 -1
- package/package.json +13 -13
package/dist/cjs/DSPageHeader.js
CHANGED
|
@@ -18,7 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
+
mod
|
|
24
|
+
));
|
|
22
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
26
|
var DSPageHeader_exports = {};
|
|
24
27
|
__export(DSPageHeader_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSPageHeader.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './v2/PageHeader';\nexport { default } from './v1/DSPageHeader';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAAc,4BAAd;AACA,0BAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,7 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
+
mod
|
|
24
|
+
));
|
|
22
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
26
|
var src_exports = {};
|
|
24
27
|
__export(src_exports, {
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './v1/DSPageHeader';\nexport * from './v2/PageHeader';\n\nexport { DSPageHeaderSummaryWithSchema } from './v2/components/PageHeaderSummary';\nexport { DSPageHeaderTitleWithSchema } from './v2/components/PageHeaderTitle';\nexport { DSPageHeaderEditableTitleWithSchema } from './v2/components/PageHeaderEditableTitle';\n\nexport * from './v2/exported-related';\nexport { default } from './v1/DSPageHeader';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,8BAAd;AACA,wBAAc,4BADd;AAGA,+BAA8C;AAC9C,6BAA4C;AAC5C,qCAAoD;AAEpD,wBAAc,kCAPd;AAQA,0BAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSPageHeader_exports = {};
|
|
23
26
|
__export(DSPageHeader_exports, {
|
|
@@ -27,7 +30,7 @@ __export(DSPageHeader_exports, {
|
|
|
27
30
|
});
|
|
28
31
|
module.exports = __toCommonJS(DSPageHeader_exports);
|
|
29
32
|
var React = __toESM(require("react"));
|
|
30
|
-
var
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
34
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
32
35
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
33
36
|
var import_PageHeaderImpl = __toESM(require("./PageHeaderImpl"));
|
|
@@ -48,45 +51,71 @@ const DSPageHeader = ({
|
|
|
48
51
|
zIndex = 2,
|
|
49
52
|
optionsMinWidth = void 0,
|
|
50
53
|
...otherProps
|
|
51
|
-
}) => /* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
54
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.TooltipTextProvider, {
|
|
55
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PageHeaderImpl.default, {
|
|
56
|
+
containerProps,
|
|
57
|
+
editable,
|
|
58
|
+
editing,
|
|
59
|
+
onGoToPreviousPage,
|
|
60
|
+
onSelectOption,
|
|
61
|
+
optionsMinWidth,
|
|
62
|
+
optionsSelection,
|
|
63
|
+
previousPage,
|
|
64
|
+
renderToolbar,
|
|
65
|
+
subtitle,
|
|
66
|
+
title,
|
|
67
|
+
titleInputProps,
|
|
68
|
+
titleOptions,
|
|
69
|
+
withBottomSeparator,
|
|
70
|
+
zIndex,
|
|
71
|
+
...otherProps
|
|
72
|
+
})
|
|
73
|
+
});
|
|
69
74
|
const props = {
|
|
70
75
|
version: import_ds_utilities.PropTypes.oneOf([1, 2]).description("Component version"),
|
|
71
|
-
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
77
|
+
"props injected to page header wrapper node"
|
|
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
|
+
),
|
|
74
85
|
title: import_ds_utilities.PropTypes.string.description("The page header title"),
|
|
75
|
-
titleOptions: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object).description(
|
|
76
|
-
|
|
86
|
+
titleOptions: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object).description(
|
|
87
|
+
"The title dropdown options"
|
|
88
|
+
),
|
|
89
|
+
onSelectOption: import_ds_utilities.PropTypes.func.description(
|
|
90
|
+
"Handler when a user selects an item in the dropdown menu"
|
|
91
|
+
),
|
|
77
92
|
subtitle: import_ds_utilities.PropTypes.string.description("Description text below the title"),
|
|
78
|
-
optionsSelection: import_ds_utilities.PropTypes.object.description(
|
|
93
|
+
optionsSelection: import_ds_utilities.PropTypes.object.description(
|
|
94
|
+
"Selection state for the title dropdown"
|
|
95
|
+
),
|
|
79
96
|
editable: import_ds_utilities.PropTypes.bool.description("Whether the title is editable or not"),
|
|
80
|
-
editing: import_ds_utilities.PropTypes.bool.description(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
97
|
+
editing: import_ds_utilities.PropTypes.bool.description(
|
|
98
|
+
"Activates/Deactivates the editing state in the title"
|
|
99
|
+
),
|
|
100
|
+
titleInputProps: import_ds_utilities.PropTypes.object.description(
|
|
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
|
+
),
|
|
84
109
|
zIndex: import_ds_utilities.PropTypes.number.description("z-index to use for the DropdownMenu"),
|
|
85
|
-
optionsMinWidth: import_ds_utilities.PropTypes.number.description(
|
|
110
|
+
optionsMinWidth: import_ds_utilities.PropTypes.number.description(
|
|
111
|
+
"min width for options dropdown menu"
|
|
112
|
+
)
|
|
86
113
|
};
|
|
87
114
|
DSPageHeader.propTypes = props;
|
|
88
115
|
DSPageHeader.displayName = "DSPageHeader";
|
|
89
|
-
const DSPageHeaderV1WithSchema = (0, import_ds_utilities.describe)(DSPageHeader).deprecated(
|
|
116
|
+
const DSPageHeaderV1WithSchema = (0, import_ds_utilities.describe)(DSPageHeader).deprecated(
|
|
117
|
+
"use DSPageHeaderV2"
|
|
118
|
+
);
|
|
90
119
|
DSPageHeaderV1WithSchema.propTypes = props;
|
|
91
120
|
var DSPageHeader_default = DSPageHeader;
|
|
92
121
|
//# sourceMappingURL=DSPageHeader.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/DSPageHeader.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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(\n 'props injected to page header wrapper node',\n ),\n /* Function that returns the toolbar to the right of the page header */\n renderToolbar: PropTypes.func.description(\n 'Function that returns the toolbar to the right of the page header',\n ),\n /* Whether to show a separator at the bottom of the header */\n withBottomSeparator: PropTypes.bool.description(\n 'Whether to show a separator at the bottom of the header',\n ),\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(\n 'The title dropdown options',\n ),\n /* Handler when a user selects an item in the dropdown menu */\n onSelectOption: PropTypes.func.description(\n 'Handler when a user selects an item in the dropdown menu',\n ),\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(\n 'Selection state for the title dropdown',\n ),\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(\n 'Activates/Deactivates the editing state in the title',\n ),\n /* Props passed to the input for editing the title */\n titleInputProps: PropTypes.object.description(\n 'Props passed to the input for editing the title',\n ),\n /* Enables navigation to previous page with back-arrow */\n previousPage: PropTypes.object.description(\n 'Enables navigation to previous page with back-arrow',\n ),\n /* Callback to handle navigation to previous page */\n onGoToPreviousPage: PropTypes.func.description(\n 'Callback to handle navigation to previous page',\n ),\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(\n 'min width for options dropdown menu',\n ),\n};\n\nDSPageHeader.propTypes = props;\nDSPageHeader.displayName = 'DSPageHeader';\nconst DSPageHeaderV1WithSchema = describe(DSPageHeader).deprecated(\n 'use DSPageHeaderV2',\n);\nDSPageHeaderV1WithSchema.propTypes = props;\n\nexport { DSPageHeader, DSPageHeaderV1WithSchema };\nexport default DSPageHeader;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,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;AAAA,IAC/B;AAAA,EACF;AAAA,EAEA,eAAe,8BAAU,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,qBAAqB,8BAAU,KAAK;AAAA,IAClC;AAAA,EACF;AAAA,EAEA,OAAO,8BAAU,OAAO,YAAY,uBAAuB;AAAA,EAE3D,cAAc,8BAAU,QAAQ,8BAAU,MAAM,EAAE;AAAA,IAChD;AAAA,EACF;AAAA,EAEA,gBAAgB,8BAAU,KAAK;AAAA,IAC7B;AAAA,EACF;AAAA,EAEA,UAAU,8BAAU,OAAO,YAAY,kCAAkC;AAAA,EAEzE,kBAAkB,8BAAU,OAAO;AAAA,IACjC;AAAA,EACF;AAAA,EAEA,UAAU,8BAAU,KAAK,YAAY,sCAAsC;AAAA,EAE3E,SAAS,8BAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA,EAEA,iBAAiB,8BAAU,OAAO;AAAA,IAChC;AAAA,EACF;AAAA,EAEA,cAAc,8BAAU,OAAO;AAAA,IAC7B;AAAA,EACF;AAAA,EAEA,oBAAoB,8BAAU,KAAK;AAAA,IACjC;AAAA,EACF;AAAA,EAEA,QAAQ,8BAAU,OAAO,YAAY,qCAAqC;AAAA,EAE1E,iBAAiB,8BAAU,OAAO;AAAA,IAChC;AAAA,EACF;AACF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,+BAA2B,8BAAS,YAAY,EAAE;AAAA,EACtD;AACF;AACA,yBAAyB,YAAY;AAGrC,IAAO,uBAAQ;",
|
|
6
|
+
"names": ["PageHeaderImpl"]
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DropdownTitle_exports = {};
|
|
23
26
|
__export(DropdownTitle_exports, {
|
|
@@ -25,24 +28,29 @@ __export(DropdownTitle_exports, {
|
|
|
25
28
|
});
|
|
26
29
|
module.exports = __toCommonJS(DropdownTitle_exports);
|
|
27
30
|
var React = __toESM(require("react"));
|
|
28
|
-
var
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
32
|
var import_ds_dropdownmenu = __toESM(require("@elliemae/ds-dropdownmenu"));
|
|
30
33
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
31
34
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
32
35
|
var import_TitleWrapper = __toESM(require("./TitleWrapper"));
|
|
33
36
|
function DropdownTitle({ titleComponent, onSelectOption, options, optionsMinWidth, selection, zIndex }) {
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_TitleWrapper.default, {
|
|
38
|
+
children: [
|
|
39
|
+
titleComponent,
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_dropdownmenu.default, {
|
|
41
|
+
minWidth: optionsMinWidth,
|
|
42
|
+
onSelectMenuItem: onSelectOption,
|
|
43
|
+
options,
|
|
44
|
+
selection,
|
|
45
|
+
triggerComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
46
|
+
buttonType: "text",
|
|
47
|
+
"data-testid": "page-header-dropdown-trigger-component",
|
|
48
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, {})
|
|
49
|
+
}),
|
|
50
|
+
zIndex
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
46
54
|
}
|
|
47
55
|
DropdownTitle.propTypes = {};
|
|
48
56
|
var DropdownTitle_default = DropdownTitle;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/DropdownTitle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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\nfunction DropdownTitle({ titleComponent, onSelectOption, options, optionsMinWidth, selection, zIndex }) {\n return (\n <TitleWrapper>\n {titleComponent}\n <DSDropdownMenu\n minWidth={optionsMinWidth}\n onSelectMenuItem={onSelectOption}\n options={options}\n selection={selection}\n triggerComponent={\n <DSButton\n buttonType=\"text\"\n data-testid=\"page-header-dropdown-trigger-component\"\n icon={<ChevronSmallDown />}\n />\n }\n zIndex={zIndex}\n />\n </TitleWrapper>\n );\n}\n\nDropdownTitle.propTypes = {};\n\nexport default DropdownTitle;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,6BAA2B;AAC3B,sBAAiC;AACjC,uBAAqB;AACrB,0BAAyB;AAEzB,SAAS,cAAc,EAAE,gBAAgB,gBAAgB,SAAS,iBAAiB,WAAW,OAAO,GAAG;AACtG,SACE,6CAAC,oBAAAA,SAAA;AAAA,IACE;AAAA;AAAA,MACD,4CAAC,uBAAAC,SAAA;AAAA,QACC,UAAU;AAAA,QACV,kBAAkB;AAAA,QAClB;AAAA,QACA;AAAA,QACA,kBACE,4CAAC,iBAAAC,SAAA;AAAA,UACC,YAAW;AAAA,UACX,eAAY;AAAA,UACZ,MAAM,4CAAC,oCAAiB;AAAA,SAC1B;AAAA,QAEF;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,cAAc,YAAY,CAAC;AAE3B,IAAO,wBAAQ;",
|
|
6
|
+
"names": ["TitleWrapper", "DSDropdownMenu", "DSButton"]
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var EditableTitle_exports = {};
|
|
23
26
|
__export(EditableTitle_exports, {
|
|
@@ -25,7 +28,8 @@ __export(EditableTitle_exports, {
|
|
|
25
28
|
});
|
|
26
29
|
module.exports = __toCommonJS(EditableTitle_exports);
|
|
27
30
|
var React = __toESM(require("react"));
|
|
28
|
-
var
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
var import_react = require("react");
|
|
29
33
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
30
34
|
var import_prop_types = __toESM(require("prop-types"));
|
|
31
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
@@ -33,7 +37,10 @@ var import_ds_utilities2 = require("@elliemae/ds-utilities");
|
|
|
33
37
|
var import_Input = __toESM(require("@elliemae/ds-form/Input"));
|
|
34
38
|
var import_Title = __toESM(require("./Title"));
|
|
35
39
|
const blockName = "page-header";
|
|
36
|
-
const EditableTitleComponent = (0, import_ds_classnames.aggregatedClasses)(import_Input.default)(
|
|
40
|
+
const EditableTitleComponent = (0, import_ds_classnames.aggregatedClasses)(import_Input.default)(
|
|
41
|
+
`${blockName}-title`,
|
|
42
|
+
"editable-title"
|
|
43
|
+
);
|
|
37
44
|
function EditableTitle({
|
|
38
45
|
children: value,
|
|
39
46
|
editing: editingProp,
|
|
@@ -43,17 +50,28 @@ function EditableTitle({
|
|
|
43
50
|
const [hovered, setHovered] = (0, import_react.useState)(false);
|
|
44
51
|
const [editing, setEditing] = (0, import_ds_utilities.useDerivedStateFromProps)(editingProp || false);
|
|
45
52
|
const titleRef = (0, import_react.useRef)(null);
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
54
|
+
children: hovered || editing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EditableTitleComponent, {
|
|
55
|
+
...titleInputProps,
|
|
56
|
+
onBlur: (0, import_ds_utilities2.runAll)(() => setEditing(false), titleInputProps.onBlur),
|
|
57
|
+
onChange: (0, import_ds_utilities2.runAll)(
|
|
58
|
+
(e) => setTitleValue(e.target.value),
|
|
59
|
+
titleInputProps.onChange
|
|
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
|
+
),
|
|
66
|
+
value: titleValue
|
|
67
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
68
|
+
ref: titleRef,
|
|
69
|
+
onMouseEnter: () => setHovered(true),
|
|
70
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Title.default, {
|
|
71
|
+
children: titleValue
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
});
|
|
57
75
|
}
|
|
58
76
|
EditableTitle.propTypes = {
|
|
59
77
|
children: import_prop_types.default.string,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/EditableTitle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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 { runAll } from '@elliemae/ds-utilities';\nimport DSInput from '@elliemae/ds-form/Input';\nimport Title from './Title';\n\nconst blockName = 'page-header';\n\nconst EditableTitleComponent = aggregatedClasses(DSInput)(\n `${blockName}-title`,\n 'editable-title',\n);\n\nfunction EditableTitle({\n children: value,\n editing: editingProp,\n titleInputProps,\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 return (\n <>\n {hovered || editing ? (\n <EditableTitleComponent\n {...titleInputProps}\n onBlur={runAll(() => setEditing(false), titleInputProps.onBlur)}\n onChange={runAll(\n (e) => setTitleValue(e.target.value),\n titleInputProps.onChange,\n )}\n onFocus={runAll(() => setEditing(true), titleInputProps.onFocus)}\n onMouseOut={runAll(\n () => setHovered(false),\n titleInputProps.onMouseOut,\n )}\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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAAwC;AACxC,0BAAyC;AACzC,wBAAsB;AACtB,2BAAkC;AAClC,IAAAA,uBAAuB;AACvB,mBAAoB;AACpB,mBAAkB;AAElB,MAAM,YAAY;AAElB,MAAM,6BAAyB,wCAAkB,aAAAC,OAAO;AAAA,EACtD,GAAG;AAAA,EACH;AACF;AAEA,SAAS,cAAc;AAAA,EACrB,UAAU;AAAA,EACV,SAAS;AAAA,EACT;AACF,GAAG;AACD,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAS,KAAK;AAClD,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,KAAK;AAC5C,QAAM,CAAC,SAAS,UAAU,QAAI,8CAAyB,eAAe,KAAK;AAC3E,QAAM,eAAW,qBAAO,IAAI;AAC5B,SACE;AAAA,IACG,qBAAW,UACV,4CAAC;AAAA,MACE,GAAG;AAAA,MACJ,YAAQ,6BAAO,MAAM,WAAW,KAAK,GAAG,gBAAgB,MAAM;AAAA,MAC9D,cAAU;AAAA,QACR,CAAC,MAAM,cAAc,EAAE,OAAO,KAAK;AAAA,QACnC,gBAAgB;AAAA,MAClB;AAAA,MACA,aAAS,6BAAO,MAAM,WAAW,IAAI,GAAG,gBAAgB,OAAO;AAAA,MAC/D,gBAAY;AAAA,QACV,MAAM,WAAW,KAAK;AAAA,QACtB,gBAAgB;AAAA,MAClB;AAAA,MACA,OAAO;AAAA,KACT,IAEA,4CAAC;AAAA,MAAI,KAAK;AAAA,MAAU,cAAc,MAAM,WAAW,IAAI;AAAA,MACrD,sDAAC,aAAAC,SAAA;AAAA,QAAO;AAAA,OAAW;AAAA,KACrB;AAAA,GAEJ;AAEJ;AAEA,cAAc,YAAY;AAAA,EAExB,UAAU,kBAAAC,QAAU;AAAA,EAEpB,SAAS,kBAAAA,QAAU;AACrB;AAEA,IAAO,wBAAQ;",
|
|
6
|
+
"names": ["import_ds_utilities", "DSInput", "Title", "PropTypes"]
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var PageHeaderImpl_exports = {};
|
|
23
26
|
__export(PageHeaderImpl_exports, {
|
|
@@ -25,7 +28,7 @@ __export(PageHeaderImpl_exports, {
|
|
|
25
28
|
});
|
|
26
29
|
module.exports = __toCommonJS(PageHeaderImpl_exports);
|
|
27
30
|
var React = __toESM(require("react"));
|
|
28
|
-
var
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
32
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
30
33
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
31
34
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
@@ -60,18 +63,28 @@ function HeaderTitle({
|
|
|
60
63
|
titleInputProps,
|
|
61
64
|
zIndex
|
|
62
65
|
}) {
|
|
63
|
-
const titleComponent = editable ? /* @__PURE__ */
|
|
66
|
+
const titleComponent = editable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_EditableTitle.default, {
|
|
64
67
|
editing,
|
|
65
|
-
titleInputProps
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
titleInputProps,
|
|
69
|
+
children: title
|
|
70
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Title.default, {
|
|
71
|
+
children: title
|
|
72
|
+
});
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageHeaderTitle, {
|
|
74
|
+
children: [
|
|
75
|
+
options.length ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DropdownTitle.default, {
|
|
76
|
+
onSelectOption,
|
|
77
|
+
options,
|
|
78
|
+
optionsMinWidth,
|
|
79
|
+
selection,
|
|
80
|
+
titleComponent,
|
|
81
|
+
zIndex
|
|
82
|
+
}) : titleComponent,
|
|
83
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Subtitle, {
|
|
84
|
+
children: subtitle
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
75
88
|
}
|
|
76
89
|
function PageHeaderImpl({
|
|
77
90
|
containerProps,
|
|
@@ -93,37 +106,56 @@ function PageHeaderImpl({
|
|
|
93
106
|
zIndex
|
|
94
107
|
}) {
|
|
95
108
|
const hasBreadcrumbs = !!breadcrumbs.length;
|
|
96
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageHeaderContainer, {
|
|
97
110
|
...containerProps,
|
|
98
111
|
className,
|
|
99
112
|
classProps: {
|
|
100
113
|
withBottomSeparator,
|
|
101
114
|
subtitle
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
115
|
+
},
|
|
116
|
+
children: [
|
|
117
|
+
previousPage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BackArrow, {
|
|
118
|
+
"data-testid": "back-arrow",
|
|
119
|
+
onClick: onGoToPreviousPage,
|
|
120
|
+
size: import_ds_icon.DSIconSizes.M
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageHeaderMainSection, {
|
|
123
|
+
children: [
|
|
124
|
+
hasBreadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderBreadcrumb, {
|
|
125
|
+
children: breadcrumbs.map((breadcrumb) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_breadcrumb.default.Item, {
|
|
126
|
+
...breadcrumb
|
|
127
|
+
}, breadcrumb.label))
|
|
128
|
+
}),
|
|
129
|
+
previousPage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderBreadcrumb, {
|
|
130
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_breadcrumb.default.Item, {
|
|
131
|
+
label: previousPage.title,
|
|
132
|
+
onClick: previousPage.onClick,
|
|
133
|
+
...previousPage
|
|
134
|
+
}, previousPage.id)
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageHeaderTitleSection, {
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeaderTitle, {
|
|
139
|
+
editable,
|
|
140
|
+
editing,
|
|
141
|
+
onSelectOption,
|
|
142
|
+
options: titleOptions,
|
|
143
|
+
optionsMinWidth,
|
|
144
|
+
selection: optionsSelection,
|
|
145
|
+
subtitle,
|
|
146
|
+
title,
|
|
147
|
+
titleInputProps,
|
|
148
|
+
zIndex
|
|
149
|
+
}),
|
|
150
|
+
(0, import_ds_utilities.isFunction)(renderToolbar) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderToolbar, {
|
|
151
|
+
children: renderToolbar()
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
});
|
|
127
159
|
}
|
|
128
160
|
var PageHeaderImpl_default = PageHeaderImpl;
|
|
129
161
|
//# sourceMappingURL=PageHeaderImpl.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/PageHeaderImpl.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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\nfunction 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\nfunction 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": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["DSBreadcrumb", "EditableTitle", "Title", "DropdownTitle"]
|
|
7
7
|
}
|
package/dist/cjs/v1/Title.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var Title_exports = {};
|
|
23
26
|
__export(Title_exports, {
|
|
@@ -25,12 +28,15 @@ __export(Title_exports, {
|
|
|
25
28
|
});
|
|
26
29
|
module.exports = __toCommonJS(Title_exports);
|
|
27
30
|
var React = __toESM(require("react"));
|
|
28
|
-
var
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
32
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
30
33
|
var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
|
|
31
34
|
const blockName = "page-header";
|
|
32
|
-
const TitleWrapper = (0, import_ds_classnames.aggregatedClasses)(import_ds_truncated_tooltip_text.default)(
|
|
33
|
-
|
|
35
|
+
const TitleWrapper = (0, import_ds_classnames.aggregatedClasses)(import_ds_truncated_tooltip_text.default)(
|
|
36
|
+
`${blockName}-title`,
|
|
37
|
+
"title"
|
|
38
|
+
);
|
|
39
|
+
const Title = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWrapper, {
|
|
34
40
|
value: children
|
|
35
41
|
});
|
|
36
42
|
var Title_default = Title;
|
package/dist/cjs/v1/Title.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/Title.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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)(\n `${blockName}-title`,\n 'title',\n);\nconst Title = ({ children }) => <TitleWrapper value={children} />;\n\nexport default Title;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,2BAAkC;AAClC,uCAAmC;AAEnC,MAAM,YAAY;AAClB,MAAM,mBAAe,wCAAkB,iCAAAA,OAAsB;AAAA,EAC3D,GAAG;AAAA,EACH;AACF;AACA,MAAM,QAAQ,CAAC,EAAE,SAAS,MAAM,4CAAC;AAAA,EAAa,OAAO;AAAA,CAAU;AAE/D,IAAO,gBAAQ;",
|
|
6
|
+
"names": ["DSTruncatedTooltipText"]
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var TitleWrapper_exports = {};
|
|
23
26
|
__export(TitleWrapper_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v1/TitleWrapper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'page-header';\n\nexport default aggregatedClasses('span')(`${blockName}-title-wrapper`);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAElC,MAAM,YAAY;AAElB,IAAO,2BAAQ,wCAAkB,MAAM,EAAE,GAAG,yBAAyB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|