@capillarytech/blaze-ui 5.0.9 → 5.0.11
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/CapDrawer/index.d.ts.map +1 -1
- package/CapDrawer/index.js +4 -2
- package/CapDrawer/index.js.map +1 -1
- package/CapHamburgerMenu/index.js +4 -2
- package/CapHamburgerMenu/index.js.map +1 -1
- package/CapNavigation/index.js +281 -117
- package/CapNavigation/index.js.map +1 -1
- package/CapTopBar/CapOrgSelect.d.ts.map +1 -1
- package/CapTopBar/CapOrgSelectUtils.d.ts.map +1 -1
- package/CapTopBar/index.d.ts.map +1 -1
- package/CapTopBar/index.js +389 -117
- package/CapTopBar/index.js.map +1 -1
- package/CapTopBar/themeConfig.d.ts.map +1 -1
- package/CapTopBar/types.d.ts +3 -2
- package/CapTopBar/types.d.ts.map +1 -1
- package/CapTopBar/utils.d.ts +1 -1
- package/CapTopBar/utils.d.ts.map +1 -1
- package/CapUnifiedSelect/enhanceOptions.d.ts +11 -1
- package/CapUnifiedSelect/enhanceOptions.d.ts.map +1 -1
- package/CapUnifiedSelect/index.d.ts +6 -0
- package/CapUnifiedSelect/index.d.ts.map +1 -1
- package/CapUnifiedSelect/index.js +87 -39
- package/CapUnifiedSelect/index.js.map +1 -1
- package/index.js +281 -117
- package/index.js.map +1 -1
- package/package.json +1 -1
package/CapNavigation/index.js
CHANGED
|
@@ -928,22 +928,13 @@ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(31601);
|
|
|
928
928
|
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(76314);
|
|
929
929
|
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
|
|
930
930
|
// Module
|
|
931
|
-
___CSS_LOADER_EXPORT___.push([module.id, `.cap-navbar a,.cap-navbar a:hover,.cap-navbar a:visited,.cap-navbar a:focus{text-decoration:none;color:#091e42}.cap-navbar-header{background-color:#fff;padding:0;display:flex;justify-content:
|
|
931
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.cap-navbar a,.cap-navbar a:hover,.cap-navbar a:visited,.cap-navbar a:focus{text-decoration:none;color:#091e42}.cap-navbar-header{background-color:#fff;padding:0;display:flex;justify-content:center;align-items:center;border-bottom:1px solid #e8e8e8;width:100%;position:fixed;z-index:100;height:4.571rem;box-shadow:none}.cap-navbar-new-header{background-color:rgba(0,0,0,0);padding:0;display:flex;justify-content:space-between;align-items:center;width:calc(100vw - 21.42rem);position:fixed;z-index:100;height:4rem;box-shadow:none;margin-left:20.57rem;background-color:#fff !important}.cap-navbar-drawer .ant-list-items{margin-top:.857rem}.cap-navbar-drawer .ant-list-split .ant-list-item{--ant-line-width: 0}.cap-navbar-divider{height:1.428rem;align-self:center}.top-bar-select-selection{width:240px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:0 0 0 .571rem;margin:.571rem 0;height:3.428rem;border:1px solid rgba(0,0,0,0)}.top-bar-select-selection.open{border-radius:.285rem;border:1px solid #b3bac5}.top-bar-select-selection.secondary-select{margin-left:0}.top-bar-select-selected-value{font-size:1.143rem;font-weight:500;display:flex;align-items:center;min-width:188px}.top-bar-select-overflow-ellipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.top-bar-select-selected-value-label{max-width:150px}.top-bar-select-selected-ou-value-label{display:inline-flex;align-items:baseline;justify-content:space-between;width:150px}.cap-navbar-menu{width:100%;display:flex;flex-direction:row;justify-content:end;margin-right:4.286rem}.cap-navbar-menu .ant-menu-item-selected{font-weight:500}.cap-navbar-menu .ant-dropdown-menu-vertical{display:flex;flex-direction:column}.cap-navbar-actions-menu{width:100%;display:flex;flex-direction:column}.cap-navbar-vertical{height:1.428rem;margin-right:15px}.user-profile{width:17.714rem;display:flex;flex-direction:column;align-items:center;margin-top:.6rem}.user-profile-name-wrapper{display:flex;justify-content:center;align-items:center;background-color:#9e1d71;width:2.857rem;height:2.857rem;border-radius:1.142rem}.user-profile-avatar{font-weight:500;font-size:1.143rem;color:#fff}.user-profile-name{margin:.8rem 0 .2rem;font-weight:500}.user-profile-loginName{font-size:.857rem;opacity:.8}.user-profile .ant-divider-horizontal{width:20.2rem;margin:1rem 0 .857rem}.lang-wrapper{display:flex;align-items:center}.lang-icon{margin-right:.4rem;opacity:.6}.logout-wrapper{display:flex;align-items:center;margin-bottom:.286rem}.logout-text{font-weight:500;margin-left:.4rem;cursor:pointer}.cap-navbar-topbarIcon{padding:1.714rem;margin:0 2px;color:#091e42;cursor:pointer}.cap-navbar-new-topbarIcon{padding:.571rem}.cap-navbar-topbarIcon:hover{background-color:#ebecf0;border-radius:1.714rem;cursor:pointer}.cap-navbar-user{margin:0 2.857rem 0 2.857rem;cursor:pointer}.cap-navbar-new-user{cursor:pointer}@media screen and (min-width: 1260px){.cap-navbar-new-user.expanded{margin:0 0 0 3%}.cap-navbar-new-user.collapsed{margin:0 6% 0 3%}}@media screen and (max-width: 1260px){.cap-navbar-new-user{margin:0 4.571rem 0 2.857rem}}.top-bar-select-selected-icon{margin-right:.571rem}.cap-navbar-user,.cap-navbar-new-user,.top-bar-select-selected-icon{display:flex;align-items:center;justify-content:center;position:relative;height:2.285rem;width:2.285rem}.cap-navbar-user .text-label,.cap-navbar-new-user .text-label,.top-bar-select-selected-icon .text-label{position:absolute;right:47%;top:50%;transform:translate(50%, -50%);line-height:14px}.oval{width:2.285rem;height:2.285rem;background:#dfe2e7;border-radius:36%;display:flex}.oval .text-label{position:relative;right:47%;top:22%}.top-bar-select-header{padding:.571rem 1.142rem 1.428rem 1.142rem;font-size:1rem;font-weight:500}.top-bar-select-select-item,.top-bar-select-select-ou-org-item,.top-bar-select-select-ou-item{cursor:pointer}.top-bar-select-select-item:hover,.top-bar-select-select-ou-org-item:hover,.top-bar-select-select-ou-item:hover{background-color:#faf9f4}.top-bar-select-select-item.selected,.top-bar-select-select-ou-org-item.selected,.top-bar-select-select-ou-item.selected{color:#2466ea;font-weight:500;position:relative;background-color:rgba(36,102,234,.1)}.top-bar-select-select-item.selected:before,.top-bar-select-select-ou-org-item.selected:before,.top-bar-select-select-ou-item.selected:before{content:" ";width:2px;height:100%;left:0;top:0;position:absolute;background-color:#2466ea}.top-bar-select-select-item{padding:.571rem .571rem .571rem 1.714rem}.top-bar-select-select-ou-org-item{padding:.571rem .571rem .571rem .571rem}.top-bar-select-select-ou-item{padding:.571rem 1.142rem .571rem 2.857rem;display:flex;justify-content:space-between;align-items:baseline}.top-bar-select-no-results{display:flex;justify-content:center;flex-direction:column}.top-bar-select-no-results .top-bar-select-no-results-text{margin-top:8px;text-align:center;color:#97a0af;font-size:.857rem}.ant-popover.top-bar-select-popover,.ant-popover.cap-navbar-user-popover{padding-top:0;width:260px}.ant-popover.top-bar-select-popover .ant-popover-inner-content,.ant-popover.cap-navbar-user-popover .ant-popover-inner-content{padding-left:0;padding-right:0}.ant-popover.top-bar-select-popover .ant-popover-arrow,.ant-popover.cap-navbar-user-popover .ant-popover-arrow{display:none}.top-bar-select-search{padding:0 1.142rem 1.142rem 1.142rem}.top-bar-select-items-wrapper{max-height:200px}.top-bar-select-arrow{margin-right:.857rem}.cap-navbar-user-popover{width:260px}.cap-navbar-user-popover-item{cursor:pointer;display:flex;align-items:center;justify-content:space-between}.cap-navbar-person{z-index:0}.cap-navbar-flexDisplay{display:flex;flex-grow:1;align-items:center}.cap-navbar-more-app{height:1.714rem;width:1.614rem;margin:17px 10px 17px 21px}.cap-navbar-product-title{margin:1.428rem .857rem 1.428rem 1.714rem}.cap-navbar-new-dimensions{height:2.857rem;width:220px}.cap-navbar-new-dimensions .top-bar-select-selection{justify-content:unset;border:1px solid #b3bac5;border-radius:4px;margin:0;height:2.857rem}.cap-navbar-new-dimensions .top-bar-select-arrow{margin-left:.857rem;margin-right:unset}.cap-navbar-dimensions{width:17.143rem}.cap-navbar-heading{font-weight:500}.cap-navbar-capitalize{text-transform:capitalize}.cap-navbar-tick-icon{margin-right:.857rem}.cap-navbar-cursor-pointer{cursor:pointer}.breadcrumbs-topbar-expanded{font-weight:500 !important;color:#5e6c84 !important}.breadcrumbs-topbar-collapsed{font-weight:500 !important;color:#5e6c84 !important}.user-profile-icon{width:2.5rem;height:2.5rem;border-radius:.9375rem;background-color:#ebecf0;margin-right:.75rem}.cap-navbar-left-navigation-wrapper{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.cap-navbar-left-navigation-wrapper .cap-unified-select-container .ant-select-prefix{display:inline;width:1.714rem;height:1.714rem;color:#091e42;fill:#dfe2e7;font-weight:500;line-height:4.571rem}.cap-navbar-left-navigation-wrapper .cap-unified-select-container .ant-select-content-value{display:flex;align-items:center;justify-content:start;flex-grow:1;margin:0 .857rem 0 .571rem;font-size:1rem;font-weight:500;color:#091e42}.cap-navbar-left-navigation-wrapper .cap-unified-select-container .ant-select-content-value>div{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.cap-navbar-left-navigation-wrapper .cap-unified-select-container .ant-select-content-value>div>span:first-child{color:#091e42;font-size:1rem;font-weight:500}.cap-navbar-right-navigation-wrapper{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-end}`, ""]);
|
|
932
932
|
// Exports
|
|
933
933
|
___CSS_LOADER_EXPORT___.locals = {
|
|
934
934
|
"cap-navbar": `cap-navbar`,
|
|
935
935
|
"cap-navbar-header": `cap-navbar-header`,
|
|
936
936
|
"cap-navbar-new-header": `cap-navbar-new-header`,
|
|
937
937
|
"cap-navbar-drawer": `cap-navbar-drawer`,
|
|
938
|
-
"ant-drawer-header": `ant-drawer-header`,
|
|
939
|
-
"ant-drawer-body": `ant-drawer-body`,
|
|
940
|
-
"ant-list": `ant-list`,
|
|
941
|
-
"cap-list-v2": `cap-list-v2`,
|
|
942
|
-
"ant-list-split": `ant-list-split`,
|
|
943
|
-
"ant-list-item": `ant-list-item`,
|
|
944
|
-
"cap-icon-v2-tick": `cap-icon-v2-tick`,
|
|
945
|
-
"cap-navbar-menu": `cap-navbar-menu`,
|
|
946
|
-
"ant-dropdown-menu-item": `ant-dropdown-menu-item`,
|
|
947
938
|
"cap-navbar-divider": `cap-navbar-divider`,
|
|
948
939
|
"top-bar-select-selection": `top-bar-select-selection`,
|
|
949
940
|
"open": `open`,
|
|
@@ -952,9 +943,8 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
952
943
|
"top-bar-select-overflow-ellipsis": `top-bar-select-overflow-ellipsis`,
|
|
953
944
|
"top-bar-select-selected-value-label": `top-bar-select-selected-value-label`,
|
|
954
945
|
"top-bar-select-selected-ou-value-label": `top-bar-select-selected-ou-value-label`,
|
|
955
|
-
"cap-navbar-menu
|
|
956
|
-
"
|
|
957
|
-
"ant-menu-item-selected": `ant-menu-item-selected`,
|
|
946
|
+
"cap-navbar-menu": `cap-navbar-menu`,
|
|
947
|
+
"cap-navbar-actions-menu": `cap-navbar-actions-menu`,
|
|
958
948
|
"cap-navbar-vertical": `cap-navbar-vertical`,
|
|
959
949
|
"user-profile": `user-profile`,
|
|
960
950
|
"user-profile-name-wrapper": `user-profile-name-wrapper`,
|
|
@@ -999,10 +989,14 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
999
989
|
"cap-navbar-dimensions": `cap-navbar-dimensions`,
|
|
1000
990
|
"cap-navbar-heading": `cap-navbar-heading`,
|
|
1001
991
|
"cap-navbar-capitalize": `cap-navbar-capitalize`,
|
|
992
|
+
"cap-navbar-tick-icon": `cap-navbar-tick-icon`,
|
|
1002
993
|
"cap-navbar-cursor-pointer": `cap-navbar-cursor-pointer`,
|
|
1003
994
|
"breadcrumbs-topbar-expanded": `breadcrumbs-topbar-expanded`,
|
|
1004
995
|
"breadcrumbs-topbar-collapsed": `breadcrumbs-topbar-collapsed`,
|
|
1005
|
-
"user-profile-icon": `user-profile-icon
|
|
996
|
+
"user-profile-icon": `user-profile-icon`,
|
|
997
|
+
"cap-navbar-left-navigation-wrapper": `cap-navbar-left-navigation-wrapper`,
|
|
998
|
+
"cap-unified-select-container": `cap-unified-select-container`,
|
|
999
|
+
"cap-navbar-right-navigation-wrapper": `cap-navbar-right-navigation-wrapper`
|
|
1006
1000
|
};
|
|
1007
1001
|
module.exports = ___CSS_LOADER_EXPORT___;
|
|
1008
1002
|
|
|
@@ -1900,10 +1894,11 @@ module.exports = __webpack_require__.p + "CapCollapsibleLeftNavigation/assets/ch
|
|
|
1900
1894
|
exports.__esModule = true;
|
|
1901
1895
|
exports.transformOrgOuToTreeOptions = exports.isSelectDisabled = exports.handleSelectChange = exports.getSelectedValue = exports.getSelectType = exports.findParentOrgValue = exports.extractLabelText = exports.createPrefix = void 0;
|
|
1902
1896
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
1903
|
-
var _CapIcon = _interopRequireDefault(__webpack_require__(65124));
|
|
1904
|
-
var _CapRow = _interopRequireDefault(__webpack_require__(69813));
|
|
1905
1897
|
var _icons = __webpack_require__(30775);
|
|
1906
1898
|
var _capillary_logo = _interopRequireDefault(__webpack_require__(69038));
|
|
1899
|
+
var _CapImage = _interopRequireDefault(__webpack_require__(84446));
|
|
1900
|
+
var _CapLabel = _interopRequireDefault(__webpack_require__(92675));
|
|
1901
|
+
var _CapRow = _interopRequireDefault(__webpack_require__(69813));
|
|
1907
1902
|
var styledVars = _interopRequireWildcard(__webpack_require__(56587));
|
|
1908
1903
|
var _jsxRuntime = __webpack_require__(74848);
|
|
1909
1904
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -1919,36 +1914,56 @@ const transformOrgOuToTreeOptions = function (items) {
|
|
|
1919
1914
|
return items.map(org => {
|
|
1920
1915
|
var _org$accessibleOus;
|
|
1921
1916
|
const hasOus = org.accessibleOus && org.accessibleOus.length > 0;
|
|
1917
|
+
const parentOrgSubLabel = org.parentOrgSubLabel;
|
|
1922
1918
|
|
|
1923
|
-
//
|
|
1924
|
-
const
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1919
|
+
// Helper to create label with right-aligned sub-label for selected value display
|
|
1920
|
+
const createLabelWithSubLabel = (mainLabel, subLabel) => {
|
|
1921
|
+
if (!subLabel) return mainLabel;
|
|
1922
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
1923
|
+
align: "middle",
|
|
1924
|
+
justify: "space-between",
|
|
1925
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default.CapLabelInline, {
|
|
1926
|
+
children: mainLabel
|
|
1927
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default.CapLabelInline, {
|
|
1928
|
+
children: subLabel
|
|
1929
|
+
})]
|
|
1930
|
+
});
|
|
1931
|
+
};
|
|
1932
|
+
|
|
1933
|
+
// For parent organizations:
|
|
1934
|
+
// - Label should be just text (no icon, no sub-label) for selected state
|
|
1935
|
+
// - Icon will be added in dropdown items via enhanceOptions
|
|
1936
|
+
// - No sub-label for parent orgs (only for children/OUs)
|
|
1937
|
+
const orgLabel = org.label || '';
|
|
1940
1938
|
return {
|
|
1941
1939
|
value: org.value,
|
|
1942
1940
|
label: orgLabel,
|
|
1941
|
+
// Just text for parent orgs - no icon, no sub-label
|
|
1943
1942
|
// Store original label as string for prefix extraction
|
|
1944
1943
|
originalLabel: org.label,
|
|
1944
|
+
// Store parent org sub label for OU display only (not for parent orgs themselves)
|
|
1945
|
+
parentOrgSubLabel,
|
|
1946
|
+
// Store flag to indicate this is a parent org with OUs (for icon in dropdown)
|
|
1947
|
+
hasOus,
|
|
1948
|
+
// No optionSuffix for parent orgs - sub-label only for children
|
|
1949
|
+
optionSuffix: undefined,
|
|
1950
|
+
// Explicitly no sub-label for parent orgs
|
|
1945
1951
|
key: org.key,
|
|
1946
1952
|
children: (_org$accessibleOus = org.accessibleOus) == null ? void 0 : _org$accessibleOus.map(ou => ({
|
|
1947
1953
|
value: ou.value,
|
|
1948
|
-
label
|
|
1954
|
+
// Label with sub-label for selected state (TreeSelect uses label prop for selected value)
|
|
1955
|
+
// For dropdown, enhanceOptions will extract plain text when optionSuffix exists
|
|
1956
|
+
label: parentOrgSubLabel ? createLabelWithSubLabel(ou.label || '', parentOrgSubLabel) : ou.label || '',
|
|
1949
1957
|
key: ou.key,
|
|
1950
1958
|
// Store parent org label for OU display
|
|
1951
|
-
parentOrgLabel: org.label
|
|
1959
|
+
parentOrgLabel: org.label,
|
|
1960
|
+
// Store parent org sub label for OU display
|
|
1961
|
+
parentOrgSubLabel,
|
|
1962
|
+
// Use optionSuffix for right-aligned sub-label in dropdown items
|
|
1963
|
+
// enhanceOptions will extract plain text from label when optionSuffix exists to avoid duplication
|
|
1964
|
+
optionSuffix: parentOrgSubLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default.CapLabelInline, {
|
|
1965
|
+
children: parentOrgSubLabel
|
|
1966
|
+
}) : undefined
|
|
1952
1967
|
}))
|
|
1953
1968
|
};
|
|
1954
1969
|
});
|
|
@@ -1978,20 +1993,56 @@ const extractLabelText = node => {
|
|
|
1978
1993
|
return String(node.originalLabel);
|
|
1979
1994
|
}
|
|
1980
1995
|
if (node.label && typeof node.label === 'object' && 'props' in node.label) {
|
|
1981
|
-
var
|
|
1982
|
-
// Try to extract text from React element (for org labels with icons)
|
|
1983
|
-
const
|
|
1996
|
+
var _element$props;
|
|
1997
|
+
// Try to extract text from React element (for org labels with icons and sub-labels)
|
|
1998
|
+
const element = node.label;
|
|
1999
|
+
const children = (_element$props = element.props) == null ? void 0 : _element$props.children;
|
|
2000
|
+
|
|
2001
|
+
// Helper to extract text from nested React elements
|
|
2002
|
+
const extractTextFromElement = child => {
|
|
2003
|
+
if (typeof child === 'string') {
|
|
2004
|
+
return child;
|
|
2005
|
+
}
|
|
2006
|
+
if (child && typeof child === 'object' && 'props' in child) {
|
|
2007
|
+
const childProps = child.props;
|
|
2008
|
+
// If it's a span with children array, get the first text child (main label)
|
|
2009
|
+
// This handles the case: <span><span>{mainLabel}</span><span>{subLabel}</span></span>
|
|
2010
|
+
if (Array.isArray(childProps == null ? void 0 : childProps.children)) {
|
|
2011
|
+
// First try to find a direct string child
|
|
2012
|
+
const firstTextChild = childProps.children.find(c => typeof c === 'string');
|
|
2013
|
+
if (firstTextChild) return firstTextChild;
|
|
2014
|
+
// Otherwise, recursively extract from the first element (which should be the main label span)
|
|
2015
|
+
if (childProps.children.length > 0) {
|
|
2016
|
+
const extracted = extractTextFromElement(childProps.children[0]);
|
|
2017
|
+
if (extracted) return extracted;
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
// Recursively try to extract from nested children (single child case)
|
|
2021
|
+
if (childProps != null && childProps.children && !Array.isArray(childProps.children)) {
|
|
2022
|
+
return extractTextFromElement(childProps.children);
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
return '';
|
|
2026
|
+
};
|
|
1984
2027
|
if (Array.isArray(children)) {
|
|
1985
|
-
|
|
1986
|
-
const
|
|
2028
|
+
// For CapRow with icon and label, find the label element
|
|
2029
|
+
const labelElement = children.find(child => {
|
|
1987
2030
|
var _child$props;
|
|
1988
|
-
return typeof child === 'string' || typeof child === 'object' &&
|
|
2031
|
+
return typeof child === 'string' || typeof child === 'object' && child && 'props' in child && ((_child$props = child.props) == null ? void 0 : _child$props.children);
|
|
1989
2032
|
});
|
|
1990
|
-
|
|
2033
|
+
if (labelElement) {
|
|
2034
|
+
const extracted = extractTextFromElement(labelElement);
|
|
2035
|
+
if (extracted) return extracted;
|
|
2036
|
+
}
|
|
1991
2037
|
}
|
|
1992
2038
|
if (typeof children === 'string') {
|
|
1993
2039
|
return children;
|
|
1994
2040
|
}
|
|
2041
|
+
// Try extracting from children directly
|
|
2042
|
+
if (children) {
|
|
2043
|
+
const extracted = extractTextFromElement(children);
|
|
2044
|
+
if (extracted) return extracted;
|
|
2045
|
+
}
|
|
1995
2046
|
}
|
|
1996
2047
|
return '';
|
|
1997
2048
|
};
|
|
@@ -2005,37 +2056,35 @@ const createPrefix = (value, treeMaps, showCapillaryIcon) => {
|
|
|
2005
2056
|
const node = treeMaps.nodeMap[value];
|
|
2006
2057
|
const labelText = extractLabelText(node);
|
|
2007
2058
|
if (showCapillaryIcon) {
|
|
2008
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
2059
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapImage.default, {
|
|
2009
2060
|
src: _capillary_logo.default,
|
|
2010
|
-
alt: ""
|
|
2011
|
-
style: {
|
|
2012
|
-
marginRight: 8,
|
|
2013
|
-
width: 24,
|
|
2014
|
-
height: 24
|
|
2015
|
-
}
|
|
2061
|
+
alt: ""
|
|
2016
2062
|
});
|
|
2017
2063
|
}
|
|
2018
2064
|
if (labelText) {
|
|
2019
2065
|
var _labelText$;
|
|
2020
2066
|
const firstLetter = ((_labelText$ = labelText[0]) == null ? void 0 : _labelText$.toUpperCase()) || '';
|
|
2021
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
2067
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
2068
|
+
align: "middle",
|
|
2022
2069
|
style: {
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
position: 'relative'
|
|
2070
|
+
position: 'relative',
|
|
2071
|
+
width: styledVars.CAP_SPACE_24,
|
|
2072
|
+
height: styledVars.CAP_SPACE_24
|
|
2027
2073
|
},
|
|
2028
2074
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LogoBackground, {
|
|
2029
2075
|
width: 24,
|
|
2030
2076
|
height: 24
|
|
2031
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
2077
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
2078
|
+
type: "label14",
|
|
2032
2079
|
style: {
|
|
2033
2080
|
position: 'absolute',
|
|
2034
2081
|
left: '50%',
|
|
2035
2082
|
top: '50%',
|
|
2036
2083
|
transform: 'translate(-50%, -50%)',
|
|
2037
|
-
lineHeight:
|
|
2038
|
-
|
|
2084
|
+
lineHeight: styledVars.CAP_SPACE_24,
|
|
2085
|
+
fontWeight: styledVars.FONT_WEIGHT_MEDIUM,
|
|
2086
|
+
fontSize: styledVars.FONT_SIZE_M,
|
|
2087
|
+
color: styledVars.CAP_G01
|
|
2039
2088
|
},
|
|
2040
2089
|
children: firstLetter
|
|
2041
2090
|
})]
|
|
@@ -2651,7 +2700,7 @@ var _messages = _interopRequireDefault(__webpack_require__(13581));
|
|
|
2651
2700
|
var _styles = _interopRequireDefault(__webpack_require__(18263));
|
|
2652
2701
|
var _useCapUnifiedSelect = __webpack_require__(480);
|
|
2653
2702
|
var _jsxRuntime = __webpack_require__(74848);
|
|
2654
|
-
const _excluded = ["intl", "type", "options", "value", "onChange", "placeholder", "className", "style", "isError", "errorMessage", "containerClassName", "popoverClassName", "allowClear", "headerLabel", "onUpload", "uploadLabel", "tooltip", "bylineText", "disabled", "showUpload", "customPopupRender", "showSearch", "searchBasedOn", "onSearch", "searchDebounce", "onConfirm", "clearText", "noResultCustomText", "noResultCustomIcon", "readOnly", "staticValue", "onFooterDownloadChange", "onPopupScroll", "hasMore", "enableVirtualization", "virtualRowHeight", "resetSearch", "resetData", "fetchMissingOptions", "fetchDynamicValueStatus"];
|
|
2703
|
+
const _excluded = ["intl", "type", "options", "value", "onChange", "placeholder", "className", "style", "isError", "errorMessage", "containerClassName", "popoverClassName", "allowClear", "headerLabel", "onUpload", "uploadLabel", "tooltip", "bylineText", "disabled", "showUpload", "customPopupRender", "showSearch", "searchBasedOn", "onSearch", "searchDebounce", "onConfirm", "clearText", "noResultCustomText", "noResultCustomIcon", "readOnly", "staticValue", "onFooterDownloadChange", "onPopupScroll", "hasMore", "enableVirtualization", "virtualRowHeight", "listHeight", "resetSearch", "resetData", "fetchMissingOptions", "fetchDynamicValueStatus", "customOptionRenderer"];
|
|
2655
2704
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
2656
2705
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
2657
2706
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
@@ -2696,10 +2745,12 @@ const CapUnifiedSelect = _ref => {
|
|
|
2696
2745
|
hasMore = true,
|
|
2697
2746
|
enableVirtualization = false,
|
|
2698
2747
|
virtualRowHeight = _constants.DEFAULTS.VIRTUAL_ROW_HEIGHT,
|
|
2748
|
+
listHeight = _constants.DEFAULTS.LIST_HEIGHT,
|
|
2699
2749
|
resetSearch = true,
|
|
2700
2750
|
resetData,
|
|
2701
2751
|
fetchMissingOptions,
|
|
2702
|
-
fetchDynamicValueStatus
|
|
2752
|
+
fetchDynamicValueStatus,
|
|
2753
|
+
customOptionRenderer
|
|
2703
2754
|
} = _ref,
|
|
2704
2755
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
2705
2756
|
const isMulti = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.MULTI_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
|
|
@@ -2745,8 +2796,8 @@ const CapUnifiedSelect = _ref => {
|
|
|
2745
2796
|
// Enhance filtered tree with React components
|
|
2746
2797
|
const filteredTree = (0, _react.useMemo)(() => {
|
|
2747
2798
|
if (!(rawFilteredTree != null && rawFilteredTree.length)) return [];
|
|
2748
|
-
return (0, _enhanceOptions.enhanceOptionsWithComponents)(rawFilteredTree, type);
|
|
2749
|
-
}, [rawFilteredTree, type]);
|
|
2799
|
+
return (0, _enhanceOptions.enhanceOptionsWithComponents)(rawFilteredTree, type, customOptionRenderer);
|
|
2800
|
+
}, [rawFilteredTree, type, customOptionRenderer]);
|
|
2750
2801
|
|
|
2751
2802
|
// Render tooltip content for multi-select
|
|
2752
2803
|
const renderDisabledTooltipContent = (0, _react.useMemo)(() => {
|
|
@@ -2912,7 +2963,7 @@ const CapUnifiedSelect = _ref => {
|
|
|
2912
2963
|
className: _styles.default['cap-unified-select-tree-select-container'],
|
|
2913
2964
|
type: "flex",
|
|
2914
2965
|
align: "middle",
|
|
2915
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_treeSelect.default, _extends({
|
|
2966
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_treeSelect.default, _extends({}, rest, {
|
|
2916
2967
|
treeData: filteredTree,
|
|
2917
2968
|
value: customPopupRender ? tempValue : value,
|
|
2918
2969
|
treeNodeLabelProp: "label",
|
|
@@ -2938,13 +2989,12 @@ const CapUnifiedSelect = _ref => {
|
|
|
2938
2989
|
open: dropdownOpen,
|
|
2939
2990
|
onOpenChange: handleDropdownVisibilityChange,
|
|
2940
2991
|
virtual: !enableVirtualization,
|
|
2941
|
-
popupMatchSelectWidth:
|
|
2992
|
+
popupMatchSelectWidth: !enableVirtualization,
|
|
2942
2993
|
disabled: disabled || readOnly,
|
|
2943
2994
|
filterTreeNode: false,
|
|
2944
|
-
listHeight:
|
|
2995
|
+
listHeight: listHeight,
|
|
2945
2996
|
listItemHeight: virtualRowHeight,
|
|
2946
|
-
popupRender: renderCustomDropdown
|
|
2947
|
-
}, rest, {
|
|
2997
|
+
popupRender: renderCustomDropdown,
|
|
2948
2998
|
suffixIcon: null
|
|
2949
2999
|
})), suffix]
|
|
2950
3000
|
}), isError && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
@@ -16747,14 +16797,21 @@ var _default = exports["default"] = Empty;
|
|
|
16747
16797
|
|
|
16748
16798
|
exports.__esModule = true;
|
|
16749
16799
|
exports["default"] = exports.CapOrgSelect = void 0;
|
|
16800
|
+
var _classnames = _interopRequireDefault(__webpack_require__(46942));
|
|
16750
16801
|
var _react = _interopRequireWildcard(__webpack_require__(9206));
|
|
16802
|
+
var _CapIcon = _interopRequireDefault(__webpack_require__(65124));
|
|
16803
|
+
var _CapLabel = _interopRequireDefault(__webpack_require__(92675));
|
|
16804
|
+
var _CapRow = _interopRequireDefault(__webpack_require__(69813));
|
|
16805
|
+
var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(74584));
|
|
16751
16806
|
var _CapUnifiedSelect = _interopRequireDefault(__webpack_require__(3535));
|
|
16752
16807
|
var _constants = __webpack_require__(99788);
|
|
16808
|
+
var _styles = _interopRequireDefault(__webpack_require__(18263));
|
|
16753
16809
|
var _utils = __webpack_require__(8052);
|
|
16810
|
+
var styledVars = _interopRequireWildcard(__webpack_require__(56587));
|
|
16754
16811
|
var _CapOrgSelectUtils = __webpack_require__(2834);
|
|
16755
16812
|
var _jsxRuntime = __webpack_require__(74848);
|
|
16756
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16757
16813
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16814
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16758
16815
|
/**
|
|
16759
16816
|
* Wrapper component that maintains backward compatibility with the old Select API
|
|
16760
16817
|
* while using CapUnifiedSelect internally.
|
|
@@ -16804,8 +16861,60 @@ const CapOrgSelect = _ref => {
|
|
|
16804
16861
|
const type = (0, _CapOrgSelectUtils.getSelectType)(items);
|
|
16805
16862
|
return type === 'treeSelect' ? _constants.SELECT_TYPES.TREE_SELECT : _constants.SELECT_TYPES.SELECT;
|
|
16806
16863
|
}, [items]);
|
|
16864
|
+
|
|
16865
|
+
// Custom option renderer that adds sitemap icon for organizations with OUs
|
|
16866
|
+
const customOptionRenderer = (0, _react.useMemo)(() => (opt, defaultTitle, context) => {
|
|
16867
|
+
// Check if this is a parent org with OUs (for adding sitemap icon in dropdown)
|
|
16868
|
+
const hasOus = opt.hasOus === true;
|
|
16869
|
+
if (!hasOus) {
|
|
16870
|
+
return defaultTitle;
|
|
16871
|
+
}
|
|
16872
|
+
|
|
16873
|
+
// Build custom title with sitemap icon, using the same structure as defaultTitle
|
|
16874
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
16875
|
+
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
16876
|
+
justify: "space-between",
|
|
16877
|
+
align: "middle",
|
|
16878
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
16879
|
+
className: _styles.default['cap-unified-select-option-label'],
|
|
16880
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
16881
|
+
align: "middle",
|
|
16882
|
+
style: {
|
|
16883
|
+
display: 'flex',
|
|
16884
|
+
alignItems: 'center',
|
|
16885
|
+
flexWrap: 'nowrap'
|
|
16886
|
+
},
|
|
16887
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
16888
|
+
type: "sitemap",
|
|
16889
|
+
size: "s",
|
|
16890
|
+
style: {
|
|
16891
|
+
marginRight: styledVars.CAP_SPACE_04
|
|
16892
|
+
}
|
|
16893
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
16894
|
+
type: "label14",
|
|
16895
|
+
className: (0, _classnames.default)(_styles.default['truncate-text'], {
|
|
16896
|
+
[_styles.default['option-disabled']]: context.isDisabled,
|
|
16897
|
+
[_styles.default['option-enabled']]: !context.isDisabled
|
|
16898
|
+
}),
|
|
16899
|
+
title: context.tooltipTitle,
|
|
16900
|
+
children: context.displayText
|
|
16901
|
+
})]
|
|
16902
|
+
})
|
|
16903
|
+
}), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
16904
|
+
className: _styles.default['cap-unified-select-option-end'],
|
|
16905
|
+
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
16906
|
+
className: _styles.default['cap-unified-select-option-suffix'],
|
|
16907
|
+
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
16908
|
+
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
16909
|
+
})]
|
|
16910
|
+
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
16911
|
+
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
16912
|
+
})]
|
|
16913
|
+
})]
|
|
16914
|
+
});
|
|
16915
|
+
}, []);
|
|
16807
16916
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapUnifiedSelect.default, {
|
|
16808
|
-
size:
|
|
16917
|
+
size: "large",
|
|
16809
16918
|
type: selectType,
|
|
16810
16919
|
options: options,
|
|
16811
16920
|
value: value,
|
|
@@ -16821,13 +16930,14 @@ const CapOrgSelect = _ref => {
|
|
|
16821
16930
|
},
|
|
16822
16931
|
listHeight: 200,
|
|
16823
16932
|
virtualRowHeight: 40,
|
|
16824
|
-
enableVirtualization: false //
|
|
16933
|
+
enableVirtualization: false // false enables virtualization (inverted prop: virtual={!enableVirtualization})
|
|
16825
16934
|
,
|
|
16826
16935
|
staticValue: true // Client-side search
|
|
16827
16936
|
,
|
|
16828
16937
|
searchBasedOn: "label",
|
|
16829
16938
|
resetSearch: true,
|
|
16830
|
-
prefix: prefix
|
|
16939
|
+
prefix: prefix,
|
|
16940
|
+
customOptionRenderer: customOptionRenderer
|
|
16831
16941
|
});
|
|
16832
16942
|
};
|
|
16833
16943
|
exports.CapOrgSelect = CapOrgSelect;
|
|
@@ -29061,11 +29171,11 @@ var _CapPopover = _interopRequireDefault(__webpack_require__(33018));
|
|
|
29061
29171
|
var _CapRow = _interopRequireDefault(__webpack_require__(69813));
|
|
29062
29172
|
var _CapTooltip = _interopRequireDefault(__webpack_require__(85684));
|
|
29063
29173
|
var styledVars = _interopRequireWildcard(__webpack_require__(56587));
|
|
29064
|
-
var _constants = __webpack_require__(77608);
|
|
29065
29174
|
var _CapOrgSelect = _interopRequireDefault(__webpack_require__(21505));
|
|
29175
|
+
var _constants = __webpack_require__(77608);
|
|
29066
29176
|
var _styles = _interopRequireDefault(__webpack_require__(49789));
|
|
29067
|
-
var _utils = __webpack_require__(74032);
|
|
29068
29177
|
var _themeConfig = __webpack_require__(69490);
|
|
29178
|
+
var _utils = __webpack_require__(74032);
|
|
29069
29179
|
var _jsxRuntime = __webpack_require__(74848);
|
|
29070
29180
|
const _excluded = ["onMenuItemClick", "items"],
|
|
29071
29181
|
_excluded2 = ["iconType", "onClickHandler", "className", "toolTip", "placement", "content"],
|
|
@@ -29110,8 +29220,8 @@ const CapTopBar = _ref => {
|
|
|
29110
29220
|
isLatestLeftNavigationEnabled = false,
|
|
29111
29221
|
leftNavbarExpanded = false,
|
|
29112
29222
|
headerOverideCss = {},
|
|
29113
|
-
request,
|
|
29114
|
-
getAPICallObject,
|
|
29223
|
+
request: _request,
|
|
29224
|
+
getAPICallObject: _getAPICallObject,
|
|
29115
29225
|
userData,
|
|
29116
29226
|
children
|
|
29117
29227
|
} = _ref;
|
|
@@ -29139,6 +29249,7 @@ const CapTopBar = _ref => {
|
|
|
29139
29249
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapMenu.default, _extends({
|
|
29140
29250
|
className: _styles.default[clsPrefix + "-menu"],
|
|
29141
29251
|
mode: "horizontal",
|
|
29252
|
+
items: items,
|
|
29142
29253
|
style: {
|
|
29143
29254
|
lineHeight: styledVars.CAP_SPACE_64
|
|
29144
29255
|
}
|
|
@@ -29168,7 +29279,7 @@ const CapTopBar = _ref => {
|
|
|
29168
29279
|
placement: placement || 'bottom',
|
|
29169
29280
|
children: iconType === 'custom' ? content : /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, _extends({
|
|
29170
29281
|
onClick: onClickHandler ? () => onClickHandler() : undefined,
|
|
29171
|
-
className: (0, _classnames.default)(_styles.default[
|
|
29282
|
+
className: (0, _classnames.default)(isLatestLeftNavigationEnabled ? _styles.default[clsPrefix + "-new-topbarIcon"] : _styles.default[clsPrefix + "-topbarIcon"], className),
|
|
29172
29283
|
type: iconType
|
|
29173
29284
|
}, rest))
|
|
29174
29285
|
}, index);
|
|
@@ -29260,7 +29371,7 @@ const CapTopBar = _ref => {
|
|
|
29260
29371
|
trigger: ['click'],
|
|
29261
29372
|
onOpenChange: expandUserBackground,
|
|
29262
29373
|
overlay: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapMenu.default, {
|
|
29263
|
-
className: _styles.default[clsPrefix + "-menu"],
|
|
29374
|
+
className: _styles.default[clsPrefix + "-actions-menu"],
|
|
29264
29375
|
children: dropdownMenuProps.map(dropdownMenuProp => /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapMenu.default.Item, {
|
|
29265
29376
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
29266
29377
|
onClick: dropdownMenuProp.onClickHandler ? () => dropdownMenuProp.onClickHandler == null ? void 0 : dropdownMenuProp.onClickHandler() : undefined,
|
|
@@ -29270,8 +29381,9 @@ const CapTopBar = _ref => {
|
|
|
29270
29381
|
})
|
|
29271
29382
|
})
|
|
29272
29383
|
}, dropdownMenuProp.key))
|
|
29273
|
-
})
|
|
29274
|
-
placement
|
|
29384
|
+
})
|
|
29385
|
+
//placement="bottomLeft"
|
|
29386
|
+
,
|
|
29275
29387
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
29276
29388
|
className: (0, _classnames.default)(_styles.default["" + clsPrefix + (isLatestLeftNavigationEnabled ? '-new' : '') + "-user"], visible && _styles.default['oval'], leftNavbarExpanded ? 'expanded' : 'collapsed'),
|
|
29277
29389
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LogoBackground, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -29326,7 +29438,8 @@ const CapTopBar = _ref => {
|
|
|
29326
29438
|
"data-testid": "tick-icon",
|
|
29327
29439
|
svgProps: {
|
|
29328
29440
|
fill: styledVars.CAP_BLUE01
|
|
29329
|
-
}
|
|
29441
|
+
},
|
|
29442
|
+
className: _styles.default[clsPrefix + "-tick-icon"]
|
|
29330
29443
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapHeading.default, {
|
|
29331
29444
|
type: "h3",
|
|
29332
29445
|
className: (0, _classnames.default)({
|
|
@@ -29437,11 +29550,14 @@ const CapTopBar = _ref => {
|
|
|
29437
29550
|
style: _extends({}, headerOverideCss),
|
|
29438
29551
|
className: (0, _classnames.default)(isLatestLeftNavigationEnabled ? _styles.default[clsPrefix + "-new-header"] : _styles.default[clsPrefix + "-header"]),
|
|
29439
29552
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
29440
|
-
className: _styles.default[clsPrefix + "-
|
|
29553
|
+
className: _styles.default[clsPrefix + "-left-navigation-wrapper"],
|
|
29441
29554
|
children: [isLatestLeftNavigationEnabled && breadcrumbs && renderBreadcrumbs(), !isLatestLeftNavigationEnabled && drawerListProps && renderDrawerList(), !isLatestLeftNavigationEnabled && selectProps && renderOrgsSelect()]
|
|
29442
|
-
}),
|
|
29443
|
-
|
|
29444
|
-
|
|
29555
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
29556
|
+
className: _styles.default[clsPrefix + "-right-navigation-wrapper"],
|
|
29557
|
+
children: [menuProps && renderTopMenu(), topbarIcons && renderTopbarIcons(), isLatestLeftNavigationEnabled && selectProps && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
29558
|
+
children: [renderDividerBeforeOrgSelect(topbarIcons, showDocumentationBot), renderOrgsSelect()]
|
|
29559
|
+
}), dropdownMenuProps && renderDropdownMenu()]
|
|
29560
|
+
}), children]
|
|
29445
29561
|
})
|
|
29446
29562
|
});
|
|
29447
29563
|
};
|
|
@@ -51711,8 +51827,7 @@ const menuTheme = exports.menuTheme = {
|
|
|
51711
51827
|
horizontalItemSelectedBg: 'transparent',
|
|
51712
51828
|
horizontalItemHoverColor: styledVars.CAP_G01,
|
|
51713
51829
|
horizontalItemHoverBg: 'transparent',
|
|
51714
|
-
activeBarHeight: 2
|
|
51715
|
-
activeBarBorderWidth: 2
|
|
51830
|
+
activeBarHeight: 2
|
|
51716
51831
|
}
|
|
51717
51832
|
}
|
|
51718
51833
|
};
|
|
@@ -56761,7 +56876,7 @@ var _antdV = __webpack_require__(64273);
|
|
|
56761
56876
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
56762
56877
|
var _logDeprecationWarning = _interopRequireDefault(__webpack_require__(19224));
|
|
56763
56878
|
var _jsxRuntime = __webpack_require__(74848);
|
|
56764
|
-
const _excluded = ["content", "size", "width", "open", "visible", "onOpenChange", "onVisibleChange"];
|
|
56879
|
+
const _excluded = ["content", "size", "width", "open", "visible", "onOpenChange", "onVisibleChange", "className"];
|
|
56765
56880
|
/**
|
|
56766
56881
|
*
|
|
56767
56882
|
* CapDrawer
|
|
@@ -56778,7 +56893,8 @@ const CapDrawer = _ref => {
|
|
|
56778
56893
|
open,
|
|
56779
56894
|
visible,
|
|
56780
56895
|
onOpenChange,
|
|
56781
|
-
onVisibleChange
|
|
56896
|
+
onVisibleChange,
|
|
56897
|
+
className
|
|
56782
56898
|
} = _ref,
|
|
56783
56899
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
56784
56900
|
(0, _logDeprecationWarning.default)('CapDrawer', 'visible', visible, 'open');
|
|
@@ -56797,6 +56913,7 @@ const CapDrawer = _ref => {
|
|
|
56797
56913
|
// Ant Design v5 Drawer types expect onVisibleChange, but runtime (v6) supports both
|
|
56798
56914
|
// Use onVisibleChange to satisfy TypeScript types
|
|
56799
56915
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Drawer, _extends({
|
|
56916
|
+
className: className,
|
|
56800
56917
|
width: widthMapping,
|
|
56801
56918
|
open: finalOpen
|
|
56802
56919
|
}, finalOnOpenChange && {
|
|
@@ -58230,19 +58347,51 @@ var _constants = __webpack_require__(99788);
|
|
|
58230
58347
|
var _styles = _interopRequireDefault(__webpack_require__(18263));
|
|
58231
58348
|
var _jsxRuntime = __webpack_require__(74848);
|
|
58232
58349
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
58233
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
58350
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /**
|
|
58351
|
+
* Custom option renderer function type
|
|
58352
|
+
* Allows customization of how option titles are rendered
|
|
58353
|
+
*/
|
|
58234
58354
|
/**
|
|
58235
58355
|
* Enhances options with React components for rendering
|
|
58236
58356
|
* Adds decorated titles with suffixes and tooltips
|
|
58237
58357
|
*/
|
|
58238
|
-
const enhanceOptionsWithComponents = (options, type) => {
|
|
58358
|
+
const enhanceOptionsWithComponents = (options, type, customOptionRenderer) => {
|
|
58239
58359
|
if (!(options != null && options.length)) return [];
|
|
58240
58360
|
const isTree = type === _constants.SELECT_TYPES.TREE_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT;
|
|
58361
|
+
|
|
58362
|
+
// Helper to extract plain text from label (handles React elements with sub-labels)
|
|
58363
|
+
const extractPlainText = label => {
|
|
58364
|
+
if (typeof label === 'string' || typeof label === 'number') {
|
|
58365
|
+
return label;
|
|
58366
|
+
}
|
|
58367
|
+
if (label && typeof label === 'object' && 'props' in label) {
|
|
58368
|
+
var _element$props;
|
|
58369
|
+
const element = label;
|
|
58370
|
+
// If it's a span with flex layout (contains sub-label), extract just the main text
|
|
58371
|
+
if ((_element$props = element.props) != null && _element$props.children && Array.isArray(element.props.children)) {
|
|
58372
|
+
const firstChild = element.props.children[0];
|
|
58373
|
+
if (firstChild && typeof firstChild === 'object' && 'props' in firstChild) {
|
|
58374
|
+
var _props;
|
|
58375
|
+
// Get text from first child span
|
|
58376
|
+
const textChild = (_props = firstChild.props) == null ? void 0 : _props.children;
|
|
58377
|
+
return typeof textChild === 'string' ? textChild : textChild;
|
|
58378
|
+
}
|
|
58379
|
+
// If first child is string, return it
|
|
58380
|
+
if (typeof firstChild === 'string') {
|
|
58381
|
+
return firstChild;
|
|
58382
|
+
}
|
|
58383
|
+
}
|
|
58384
|
+
}
|
|
58385
|
+
return label;
|
|
58386
|
+
};
|
|
58241
58387
|
const enhanceOptions = opts => opts.map(opt => {
|
|
58242
|
-
|
|
58388
|
+
// Extract plain text from label if it's a React element (to avoid duplication with optionSuffix)
|
|
58389
|
+
// If label is a React element with sub-label, use plain text for dropdown display
|
|
58390
|
+
// The optionSuffix will add the sub-label separately
|
|
58391
|
+
const displayText = opt != null && opt.optionSuffix ? extractPlainText(opt == null ? void 0 : opt.label) || (opt == null ? void 0 : opt.value) : (opt == null ? void 0 : opt.label) || (opt == null ? void 0 : opt.value);
|
|
58243
58392
|
const tooltipTitle = opt == null ? void 0 : opt.hoverText;
|
|
58244
58393
|
const isDisabled = (opt == null ? void 0 : opt.disabled) === true;
|
|
58245
|
-
const
|
|
58394
|
+
const defaultTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
58246
58395
|
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
58247
58396
|
justify: "space-between",
|
|
58248
58397
|
align: "middle",
|
|
@@ -58269,6 +58418,13 @@ const enhanceOptionsWithComponents = (options, type) => {
|
|
|
58269
58418
|
})]
|
|
58270
58419
|
})]
|
|
58271
58420
|
});
|
|
58421
|
+
|
|
58422
|
+
// Use custom renderer if provided, otherwise use default
|
|
58423
|
+
const decoratedTitle = customOptionRenderer ? customOptionRenderer(opt, defaultTitle, {
|
|
58424
|
+
displayText,
|
|
58425
|
+
tooltipTitle,
|
|
58426
|
+
isDisabled
|
|
58427
|
+
}) : defaultTitle;
|
|
58272
58428
|
return _extends({}, opt, {
|
|
58273
58429
|
title: decoratedTitle,
|
|
58274
58430
|
label: opt == null ? void 0 : opt.label,
|
|
@@ -58282,34 +58438,42 @@ const enhanceOptionsWithComponents = (options, type) => {
|
|
|
58282
58438
|
const displayText = (opt == null ? void 0 : opt.label) || (opt == null ? void 0 : opt.value);
|
|
58283
58439
|
const tooltipTitle = opt == null ? void 0 : opt.hoverText;
|
|
58284
58440
|
const isDisabled = (opt == null ? void 0 : opt.disabled) === true;
|
|
58285
|
-
|
|
58286
|
-
|
|
58287
|
-
|
|
58288
|
-
|
|
58289
|
-
|
|
58290
|
-
|
|
58291
|
-
|
|
58292
|
-
|
|
58293
|
-
|
|
58294
|
-
|
|
58295
|
-
|
|
58296
|
-
|
|
58297
|
-
|
|
58298
|
-
|
|
58299
|
-
|
|
58300
|
-
|
|
58301
|
-
|
|
58302
|
-
|
|
58303
|
-
|
|
58304
|
-
|
|
58305
|
-
|
|
58306
|
-
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
58307
|
-
})]
|
|
58308
|
-
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
58309
|
-
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
58441
|
+
const defaultTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
58442
|
+
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
58443
|
+
justify: "space-between",
|
|
58444
|
+
align: "middle",
|
|
58445
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
58446
|
+
className: _styles.default['cap-unified-select-option-label'],
|
|
58447
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
58448
|
+
type: "label14",
|
|
58449
|
+
className: (0, _classnames.default)(_styles.default['truncate-text'], {
|
|
58450
|
+
[_styles.default['option-disabled']]: isDisabled,
|
|
58451
|
+
[_styles.default['option-enabled']]: !isDisabled
|
|
58452
|
+
}),
|
|
58453
|
+
title: tooltipTitle,
|
|
58454
|
+
children: displayText
|
|
58455
|
+
})
|
|
58456
|
+
}), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
58457
|
+
className: _styles.default['cap-unified-select-option-end'],
|
|
58458
|
+
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
58459
|
+
className: _styles.default['cap-unified-select-option-suffix'],
|
|
58460
|
+
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
58461
|
+
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
58310
58462
|
})]
|
|
58463
|
+
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
58464
|
+
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
58311
58465
|
})]
|
|
58312
|
-
})
|
|
58466
|
+
})]
|
|
58467
|
+
});
|
|
58468
|
+
|
|
58469
|
+
// Use custom renderer if provided, otherwise use default
|
|
58470
|
+
const decoratedTitle = customOptionRenderer ? customOptionRenderer(opt, defaultTitle, {
|
|
58471
|
+
displayText,
|
|
58472
|
+
tooltipTitle,
|
|
58473
|
+
isDisabled
|
|
58474
|
+
}) : defaultTitle;
|
|
58475
|
+
return _extends({}, opt, {
|
|
58476
|
+
title: decoratedTitle,
|
|
58313
58477
|
label: opt == null ? void 0 : opt.label
|
|
58314
58478
|
});
|
|
58315
58479
|
});
|