@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/index.js
CHANGED
|
@@ -1459,22 +1459,13 @@ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(31601);
|
|
|
1459
1459
|
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(76314);
|
|
1460
1460
|
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
|
|
1461
1461
|
// Module
|
|
1462
|
-
___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:
|
|
1462
|
+
___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}`, ""]);
|
|
1463
1463
|
// Exports
|
|
1464
1464
|
___CSS_LOADER_EXPORT___.locals = {
|
|
1465
1465
|
"cap-navbar": `cap-navbar`,
|
|
1466
1466
|
"cap-navbar-header": `cap-navbar-header`,
|
|
1467
1467
|
"cap-navbar-new-header": `cap-navbar-new-header`,
|
|
1468
1468
|
"cap-navbar-drawer": `cap-navbar-drawer`,
|
|
1469
|
-
"ant-drawer-header": `ant-drawer-header`,
|
|
1470
|
-
"ant-drawer-body": `ant-drawer-body`,
|
|
1471
|
-
"ant-list": `ant-list`,
|
|
1472
|
-
"cap-list-v2": `cap-list-v2`,
|
|
1473
|
-
"ant-list-split": `ant-list-split`,
|
|
1474
|
-
"ant-list-item": `ant-list-item`,
|
|
1475
|
-
"cap-icon-v2-tick": `cap-icon-v2-tick`,
|
|
1476
|
-
"cap-navbar-menu": `cap-navbar-menu`,
|
|
1477
|
-
"ant-dropdown-menu-item": `ant-dropdown-menu-item`,
|
|
1478
1469
|
"cap-navbar-divider": `cap-navbar-divider`,
|
|
1479
1470
|
"top-bar-select-selection": `top-bar-select-selection`,
|
|
1480
1471
|
"open": `open`,
|
|
@@ -1483,9 +1474,8 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
1483
1474
|
"top-bar-select-overflow-ellipsis": `top-bar-select-overflow-ellipsis`,
|
|
1484
1475
|
"top-bar-select-selected-value-label": `top-bar-select-selected-value-label`,
|
|
1485
1476
|
"top-bar-select-selected-ou-value-label": `top-bar-select-selected-ou-value-label`,
|
|
1486
|
-
"cap-navbar-menu
|
|
1487
|
-
"
|
|
1488
|
-
"ant-menu-item-selected": `ant-menu-item-selected`,
|
|
1477
|
+
"cap-navbar-menu": `cap-navbar-menu`,
|
|
1478
|
+
"cap-navbar-actions-menu": `cap-navbar-actions-menu`,
|
|
1489
1479
|
"cap-navbar-vertical": `cap-navbar-vertical`,
|
|
1490
1480
|
"user-profile": `user-profile`,
|
|
1491
1481
|
"user-profile-name-wrapper": `user-profile-name-wrapper`,
|
|
@@ -1530,10 +1520,14 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
1530
1520
|
"cap-navbar-dimensions": `cap-navbar-dimensions`,
|
|
1531
1521
|
"cap-navbar-heading": `cap-navbar-heading`,
|
|
1532
1522
|
"cap-navbar-capitalize": `cap-navbar-capitalize`,
|
|
1523
|
+
"cap-navbar-tick-icon": `cap-navbar-tick-icon`,
|
|
1533
1524
|
"cap-navbar-cursor-pointer": `cap-navbar-cursor-pointer`,
|
|
1534
1525
|
"breadcrumbs-topbar-expanded": `breadcrumbs-topbar-expanded`,
|
|
1535
1526
|
"breadcrumbs-topbar-collapsed": `breadcrumbs-topbar-collapsed`,
|
|
1536
|
-
"user-profile-icon": `user-profile-icon
|
|
1527
|
+
"user-profile-icon": `user-profile-icon`,
|
|
1528
|
+
"cap-navbar-left-navigation-wrapper": `cap-navbar-left-navigation-wrapper`,
|
|
1529
|
+
"cap-unified-select-container": `cap-unified-select-container`,
|
|
1530
|
+
"cap-navbar-right-navigation-wrapper": `cap-navbar-right-navigation-wrapper`
|
|
1537
1531
|
};
|
|
1538
1532
|
module.exports = ___CSS_LOADER_EXPORT___;
|
|
1539
1533
|
|
|
@@ -2520,10 +2514,11 @@ module.exports = require("dayjs/plugin/customParseFormat");
|
|
|
2520
2514
|
exports.__esModule = true;
|
|
2521
2515
|
exports.transformOrgOuToTreeOptions = exports.isSelectDisabled = exports.handleSelectChange = exports.getSelectedValue = exports.getSelectType = exports.findParentOrgValue = exports.extractLabelText = exports.createPrefix = void 0;
|
|
2522
2516
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
2523
|
-
var _CapIcon = _interopRequireDefault(__webpack_require__(65124));
|
|
2524
|
-
var _CapRow = _interopRequireDefault(__webpack_require__(69813));
|
|
2525
2517
|
var _icons = __webpack_require__(30775);
|
|
2526
2518
|
var _capillary_logo = _interopRequireDefault(__webpack_require__(69038));
|
|
2519
|
+
var _CapImage = _interopRequireDefault(__webpack_require__(84446));
|
|
2520
|
+
var _CapLabel = _interopRequireDefault(__webpack_require__(92675));
|
|
2521
|
+
var _CapRow = _interopRequireDefault(__webpack_require__(69813));
|
|
2527
2522
|
var styledVars = _interopRequireWildcard(__webpack_require__(56587));
|
|
2528
2523
|
var _jsxRuntime = __webpack_require__(74848);
|
|
2529
2524
|
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); }
|
|
@@ -2539,36 +2534,56 @@ const transformOrgOuToTreeOptions = function (items) {
|
|
|
2539
2534
|
return items.map(org => {
|
|
2540
2535
|
var _org$accessibleOus;
|
|
2541
2536
|
const hasOus = org.accessibleOus && org.accessibleOus.length > 0;
|
|
2537
|
+
const parentOrgSubLabel = org.parentOrgSubLabel;
|
|
2542
2538
|
|
|
2543
|
-
//
|
|
2544
|
-
const
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2539
|
+
// Helper to create label with right-aligned sub-label for selected value display
|
|
2540
|
+
const createLabelWithSubLabel = (mainLabel, subLabel) => {
|
|
2541
|
+
if (!subLabel) return mainLabel;
|
|
2542
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
2543
|
+
align: "middle",
|
|
2544
|
+
justify: "space-between",
|
|
2545
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default.CapLabelInline, {
|
|
2546
|
+
children: mainLabel
|
|
2547
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default.CapLabelInline, {
|
|
2548
|
+
children: subLabel
|
|
2549
|
+
})]
|
|
2550
|
+
});
|
|
2551
|
+
};
|
|
2552
|
+
|
|
2553
|
+
// For parent organizations:
|
|
2554
|
+
// - Label should be just text (no icon, no sub-label) for selected state
|
|
2555
|
+
// - Icon will be added in dropdown items via enhanceOptions
|
|
2556
|
+
// - No sub-label for parent orgs (only for children/OUs)
|
|
2557
|
+
const orgLabel = org.label || '';
|
|
2560
2558
|
return {
|
|
2561
2559
|
value: org.value,
|
|
2562
2560
|
label: orgLabel,
|
|
2561
|
+
// Just text for parent orgs - no icon, no sub-label
|
|
2563
2562
|
// Store original label as string for prefix extraction
|
|
2564
2563
|
originalLabel: org.label,
|
|
2564
|
+
// Store parent org sub label for OU display only (not for parent orgs themselves)
|
|
2565
|
+
parentOrgSubLabel,
|
|
2566
|
+
// Store flag to indicate this is a parent org with OUs (for icon in dropdown)
|
|
2567
|
+
hasOus,
|
|
2568
|
+
// No optionSuffix for parent orgs - sub-label only for children
|
|
2569
|
+
optionSuffix: undefined,
|
|
2570
|
+
// Explicitly no sub-label for parent orgs
|
|
2565
2571
|
key: org.key,
|
|
2566
2572
|
children: (_org$accessibleOus = org.accessibleOus) == null ? void 0 : _org$accessibleOus.map(ou => ({
|
|
2567
2573
|
value: ou.value,
|
|
2568
|
-
label
|
|
2574
|
+
// Label with sub-label for selected state (TreeSelect uses label prop for selected value)
|
|
2575
|
+
// For dropdown, enhanceOptions will extract plain text when optionSuffix exists
|
|
2576
|
+
label: parentOrgSubLabel ? createLabelWithSubLabel(ou.label || '', parentOrgSubLabel) : ou.label || '',
|
|
2569
2577
|
key: ou.key,
|
|
2570
2578
|
// Store parent org label for OU display
|
|
2571
|
-
parentOrgLabel: org.label
|
|
2579
|
+
parentOrgLabel: org.label,
|
|
2580
|
+
// Store parent org sub label for OU display
|
|
2581
|
+
parentOrgSubLabel,
|
|
2582
|
+
// Use optionSuffix for right-aligned sub-label in dropdown items
|
|
2583
|
+
// enhanceOptions will extract plain text from label when optionSuffix exists to avoid duplication
|
|
2584
|
+
optionSuffix: parentOrgSubLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default.CapLabelInline, {
|
|
2585
|
+
children: parentOrgSubLabel
|
|
2586
|
+
}) : undefined
|
|
2572
2587
|
}))
|
|
2573
2588
|
};
|
|
2574
2589
|
});
|
|
@@ -2598,20 +2613,56 @@ const extractLabelText = node => {
|
|
|
2598
2613
|
return String(node.originalLabel);
|
|
2599
2614
|
}
|
|
2600
2615
|
if (node.label && typeof node.label === 'object' && 'props' in node.label) {
|
|
2601
|
-
var
|
|
2602
|
-
// Try to extract text from React element (for org labels with icons)
|
|
2603
|
-
const
|
|
2616
|
+
var _element$props;
|
|
2617
|
+
// Try to extract text from React element (for org labels with icons and sub-labels)
|
|
2618
|
+
const element = node.label;
|
|
2619
|
+
const children = (_element$props = element.props) == null ? void 0 : _element$props.children;
|
|
2620
|
+
|
|
2621
|
+
// Helper to extract text from nested React elements
|
|
2622
|
+
const extractTextFromElement = child => {
|
|
2623
|
+
if (typeof child === 'string') {
|
|
2624
|
+
return child;
|
|
2625
|
+
}
|
|
2626
|
+
if (child && typeof child === 'object' && 'props' in child) {
|
|
2627
|
+
const childProps = child.props;
|
|
2628
|
+
// If it's a span with children array, get the first text child (main label)
|
|
2629
|
+
// This handles the case: <span><span>{mainLabel}</span><span>{subLabel}</span></span>
|
|
2630
|
+
if (Array.isArray(childProps == null ? void 0 : childProps.children)) {
|
|
2631
|
+
// First try to find a direct string child
|
|
2632
|
+
const firstTextChild = childProps.children.find(c => typeof c === 'string');
|
|
2633
|
+
if (firstTextChild) return firstTextChild;
|
|
2634
|
+
// Otherwise, recursively extract from the first element (which should be the main label span)
|
|
2635
|
+
if (childProps.children.length > 0) {
|
|
2636
|
+
const extracted = extractTextFromElement(childProps.children[0]);
|
|
2637
|
+
if (extracted) return extracted;
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
// Recursively try to extract from nested children (single child case)
|
|
2641
|
+
if (childProps != null && childProps.children && !Array.isArray(childProps.children)) {
|
|
2642
|
+
return extractTextFromElement(childProps.children);
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
return '';
|
|
2646
|
+
};
|
|
2604
2647
|
if (Array.isArray(children)) {
|
|
2605
|
-
|
|
2606
|
-
const
|
|
2648
|
+
// For CapRow with icon and label, find the label element
|
|
2649
|
+
const labelElement = children.find(child => {
|
|
2607
2650
|
var _child$props;
|
|
2608
|
-
return typeof child === 'string' || typeof child === 'object' &&
|
|
2651
|
+
return typeof child === 'string' || typeof child === 'object' && child && 'props' in child && ((_child$props = child.props) == null ? void 0 : _child$props.children);
|
|
2609
2652
|
});
|
|
2610
|
-
|
|
2653
|
+
if (labelElement) {
|
|
2654
|
+
const extracted = extractTextFromElement(labelElement);
|
|
2655
|
+
if (extracted) return extracted;
|
|
2656
|
+
}
|
|
2611
2657
|
}
|
|
2612
2658
|
if (typeof children === 'string') {
|
|
2613
2659
|
return children;
|
|
2614
2660
|
}
|
|
2661
|
+
// Try extracting from children directly
|
|
2662
|
+
if (children) {
|
|
2663
|
+
const extracted = extractTextFromElement(children);
|
|
2664
|
+
if (extracted) return extracted;
|
|
2665
|
+
}
|
|
2615
2666
|
}
|
|
2616
2667
|
return '';
|
|
2617
2668
|
};
|
|
@@ -2625,37 +2676,35 @@ const createPrefix = (value, treeMaps, showCapillaryIcon) => {
|
|
|
2625
2676
|
const node = treeMaps.nodeMap[value];
|
|
2626
2677
|
const labelText = extractLabelText(node);
|
|
2627
2678
|
if (showCapillaryIcon) {
|
|
2628
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
2679
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapImage.default, {
|
|
2629
2680
|
src: _capillary_logo.default,
|
|
2630
|
-
alt: ""
|
|
2631
|
-
style: {
|
|
2632
|
-
marginRight: 8,
|
|
2633
|
-
width: 24,
|
|
2634
|
-
height: 24
|
|
2635
|
-
}
|
|
2681
|
+
alt: ""
|
|
2636
2682
|
});
|
|
2637
2683
|
}
|
|
2638
2684
|
if (labelText) {
|
|
2639
2685
|
var _labelText$;
|
|
2640
2686
|
const firstLetter = ((_labelText$ = labelText[0]) == null ? void 0 : _labelText$.toUpperCase()) || '';
|
|
2641
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
2687
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
2688
|
+
align: "middle",
|
|
2642
2689
|
style: {
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
position: 'relative'
|
|
2690
|
+
position: 'relative',
|
|
2691
|
+
width: styledVars.CAP_SPACE_24,
|
|
2692
|
+
height: styledVars.CAP_SPACE_24
|
|
2647
2693
|
},
|
|
2648
2694
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LogoBackground, {
|
|
2649
2695
|
width: 24,
|
|
2650
2696
|
height: 24
|
|
2651
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
2697
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
2698
|
+
type: "label14",
|
|
2652
2699
|
style: {
|
|
2653
2700
|
position: 'absolute',
|
|
2654
2701
|
left: '50%',
|
|
2655
2702
|
top: '50%',
|
|
2656
2703
|
transform: 'translate(-50%, -50%)',
|
|
2657
|
-
lineHeight:
|
|
2658
|
-
|
|
2704
|
+
lineHeight: styledVars.CAP_SPACE_24,
|
|
2705
|
+
fontWeight: styledVars.FONT_WEIGHT_MEDIUM,
|
|
2706
|
+
fontSize: styledVars.FONT_SIZE_M,
|
|
2707
|
+
color: styledVars.CAP_G01
|
|
2659
2708
|
},
|
|
2660
2709
|
children: firstLetter
|
|
2661
2710
|
})]
|
|
@@ -3684,7 +3733,7 @@ var _messages = _interopRequireDefault(__webpack_require__(13581));
|
|
|
3684
3733
|
var _styles = _interopRequireDefault(__webpack_require__(18263));
|
|
3685
3734
|
var _useCapUnifiedSelect = __webpack_require__(480);
|
|
3686
3735
|
var _jsxRuntime = __webpack_require__(74848);
|
|
3687
|
-
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"];
|
|
3736
|
+
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"];
|
|
3688
3737
|
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); }
|
|
3689
3738
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
3690
3739
|
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); }
|
|
@@ -3729,10 +3778,12 @@ const CapUnifiedSelect = _ref => {
|
|
|
3729
3778
|
hasMore = true,
|
|
3730
3779
|
enableVirtualization = false,
|
|
3731
3780
|
virtualRowHeight = _constants.DEFAULTS.VIRTUAL_ROW_HEIGHT,
|
|
3781
|
+
listHeight = _constants.DEFAULTS.LIST_HEIGHT,
|
|
3732
3782
|
resetSearch = true,
|
|
3733
3783
|
resetData,
|
|
3734
3784
|
fetchMissingOptions,
|
|
3735
|
-
fetchDynamicValueStatus
|
|
3785
|
+
fetchDynamicValueStatus,
|
|
3786
|
+
customOptionRenderer
|
|
3736
3787
|
} = _ref,
|
|
3737
3788
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
3738
3789
|
const isMulti = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.MULTI_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
|
|
@@ -3778,8 +3829,8 @@ const CapUnifiedSelect = _ref => {
|
|
|
3778
3829
|
// Enhance filtered tree with React components
|
|
3779
3830
|
const filteredTree = (0, _react.useMemo)(() => {
|
|
3780
3831
|
if (!(rawFilteredTree != null && rawFilteredTree.length)) return [];
|
|
3781
|
-
return (0, _enhanceOptions.enhanceOptionsWithComponents)(rawFilteredTree, type);
|
|
3782
|
-
}, [rawFilteredTree, type]);
|
|
3832
|
+
return (0, _enhanceOptions.enhanceOptionsWithComponents)(rawFilteredTree, type, customOptionRenderer);
|
|
3833
|
+
}, [rawFilteredTree, type, customOptionRenderer]);
|
|
3783
3834
|
|
|
3784
3835
|
// Render tooltip content for multi-select
|
|
3785
3836
|
const renderDisabledTooltipContent = (0, _react.useMemo)(() => {
|
|
@@ -3945,7 +3996,7 @@ const CapUnifiedSelect = _ref => {
|
|
|
3945
3996
|
className: _styles.default['cap-unified-select-tree-select-container'],
|
|
3946
3997
|
type: "flex",
|
|
3947
3998
|
align: "middle",
|
|
3948
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_treeSelect.default, _extends({
|
|
3999
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_treeSelect.default, _extends({}, rest, {
|
|
3949
4000
|
treeData: filteredTree,
|
|
3950
4001
|
value: customPopupRender ? tempValue : value,
|
|
3951
4002
|
treeNodeLabelProp: "label",
|
|
@@ -3971,13 +4022,12 @@ const CapUnifiedSelect = _ref => {
|
|
|
3971
4022
|
open: dropdownOpen,
|
|
3972
4023
|
onOpenChange: handleDropdownVisibilityChange,
|
|
3973
4024
|
virtual: !enableVirtualization,
|
|
3974
|
-
popupMatchSelectWidth:
|
|
4025
|
+
popupMatchSelectWidth: !enableVirtualization,
|
|
3975
4026
|
disabled: disabled || readOnly,
|
|
3976
4027
|
filterTreeNode: false,
|
|
3977
|
-
listHeight:
|
|
4028
|
+
listHeight: listHeight,
|
|
3978
4029
|
listItemHeight: virtualRowHeight,
|
|
3979
|
-
popupRender: renderCustomDropdown
|
|
3980
|
-
}, rest, {
|
|
4030
|
+
popupRender: renderCustomDropdown,
|
|
3981
4031
|
suffixIcon: null
|
|
3982
4032
|
})), suffix]
|
|
3983
4033
|
}), isError && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
@@ -19252,14 +19302,21 @@ var _default = exports["default"] = Empty;
|
|
|
19252
19302
|
|
|
19253
19303
|
exports.__esModule = true;
|
|
19254
19304
|
exports["default"] = exports.CapOrgSelect = void 0;
|
|
19305
|
+
var _classnames = _interopRequireDefault(__webpack_require__(46942));
|
|
19255
19306
|
var _react = _interopRequireWildcard(__webpack_require__(9206));
|
|
19307
|
+
var _CapIcon = _interopRequireDefault(__webpack_require__(65124));
|
|
19308
|
+
var _CapLabel = _interopRequireDefault(__webpack_require__(92675));
|
|
19309
|
+
var _CapRow = _interopRequireDefault(__webpack_require__(69813));
|
|
19310
|
+
var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(74584));
|
|
19256
19311
|
var _CapUnifiedSelect = _interopRequireDefault(__webpack_require__(3535));
|
|
19257
19312
|
var _constants = __webpack_require__(99788);
|
|
19313
|
+
var _styles = _interopRequireDefault(__webpack_require__(18263));
|
|
19258
19314
|
var _utils = __webpack_require__(8052);
|
|
19315
|
+
var styledVars = _interopRequireWildcard(__webpack_require__(56587));
|
|
19259
19316
|
var _CapOrgSelectUtils = __webpack_require__(2834);
|
|
19260
19317
|
var _jsxRuntime = __webpack_require__(74848);
|
|
19261
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19262
19318
|
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); }
|
|
19319
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19263
19320
|
/**
|
|
19264
19321
|
* Wrapper component that maintains backward compatibility with the old Select API
|
|
19265
19322
|
* while using CapUnifiedSelect internally.
|
|
@@ -19309,8 +19366,60 @@ const CapOrgSelect = _ref => {
|
|
|
19309
19366
|
const type = (0, _CapOrgSelectUtils.getSelectType)(items);
|
|
19310
19367
|
return type === 'treeSelect' ? _constants.SELECT_TYPES.TREE_SELECT : _constants.SELECT_TYPES.SELECT;
|
|
19311
19368
|
}, [items]);
|
|
19369
|
+
|
|
19370
|
+
// Custom option renderer that adds sitemap icon for organizations with OUs
|
|
19371
|
+
const customOptionRenderer = (0, _react.useMemo)(() => (opt, defaultTitle, context) => {
|
|
19372
|
+
// Check if this is a parent org with OUs (for adding sitemap icon in dropdown)
|
|
19373
|
+
const hasOus = opt.hasOus === true;
|
|
19374
|
+
if (!hasOus) {
|
|
19375
|
+
return defaultTitle;
|
|
19376
|
+
}
|
|
19377
|
+
|
|
19378
|
+
// Build custom title with sitemap icon, using the same structure as defaultTitle
|
|
19379
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
19380
|
+
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
19381
|
+
justify: "space-between",
|
|
19382
|
+
align: "middle",
|
|
19383
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19384
|
+
className: _styles.default['cap-unified-select-option-label'],
|
|
19385
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
19386
|
+
align: "middle",
|
|
19387
|
+
style: {
|
|
19388
|
+
display: 'flex',
|
|
19389
|
+
alignItems: 'center',
|
|
19390
|
+
flexWrap: 'nowrap'
|
|
19391
|
+
},
|
|
19392
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
19393
|
+
type: "sitemap",
|
|
19394
|
+
size: "s",
|
|
19395
|
+
style: {
|
|
19396
|
+
marginRight: styledVars.CAP_SPACE_04
|
|
19397
|
+
}
|
|
19398
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
19399
|
+
type: "label14",
|
|
19400
|
+
className: (0, _classnames.default)(_styles.default['truncate-text'], {
|
|
19401
|
+
[_styles.default['option-disabled']]: context.isDisabled,
|
|
19402
|
+
[_styles.default['option-enabled']]: !context.isDisabled
|
|
19403
|
+
}),
|
|
19404
|
+
title: context.tooltipTitle,
|
|
19405
|
+
children: context.displayText
|
|
19406
|
+
})]
|
|
19407
|
+
})
|
|
19408
|
+
}), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
19409
|
+
className: _styles.default['cap-unified-select-option-end'],
|
|
19410
|
+
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
19411
|
+
className: _styles.default['cap-unified-select-option-suffix'],
|
|
19412
|
+
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
19413
|
+
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
19414
|
+
})]
|
|
19415
|
+
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
19416
|
+
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
19417
|
+
})]
|
|
19418
|
+
})]
|
|
19419
|
+
});
|
|
19420
|
+
}, []);
|
|
19312
19421
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapUnifiedSelect.default, {
|
|
19313
|
-
size:
|
|
19422
|
+
size: "large",
|
|
19314
19423
|
type: selectType,
|
|
19315
19424
|
options: options,
|
|
19316
19425
|
value: value,
|
|
@@ -19326,13 +19435,14 @@ const CapOrgSelect = _ref => {
|
|
|
19326
19435
|
},
|
|
19327
19436
|
listHeight: 200,
|
|
19328
19437
|
virtualRowHeight: 40,
|
|
19329
|
-
enableVirtualization: false //
|
|
19438
|
+
enableVirtualization: false // false enables virtualization (inverted prop: virtual={!enableVirtualization})
|
|
19330
19439
|
,
|
|
19331
19440
|
staticValue: true // Client-side search
|
|
19332
19441
|
,
|
|
19333
19442
|
searchBasedOn: "label",
|
|
19334
19443
|
resetSearch: true,
|
|
19335
|
-
prefix: prefix
|
|
19444
|
+
prefix: prefix,
|
|
19445
|
+
customOptionRenderer: customOptionRenderer
|
|
19336
19446
|
});
|
|
19337
19447
|
};
|
|
19338
19448
|
exports.CapOrgSelect = CapOrgSelect;
|
|
@@ -32601,11 +32711,11 @@ var _CapPopover = _interopRequireDefault(__webpack_require__(33018));
|
|
|
32601
32711
|
var _CapRow = _interopRequireDefault(__webpack_require__(69813));
|
|
32602
32712
|
var _CapTooltip = _interopRequireDefault(__webpack_require__(85684));
|
|
32603
32713
|
var styledVars = _interopRequireWildcard(__webpack_require__(56587));
|
|
32604
|
-
var _constants = __webpack_require__(77608);
|
|
32605
32714
|
var _CapOrgSelect = _interopRequireDefault(__webpack_require__(21505));
|
|
32715
|
+
var _constants = __webpack_require__(77608);
|
|
32606
32716
|
var _styles = _interopRequireDefault(__webpack_require__(49789));
|
|
32607
|
-
var _utils = __webpack_require__(74032);
|
|
32608
32717
|
var _themeConfig = __webpack_require__(69490);
|
|
32718
|
+
var _utils = __webpack_require__(74032);
|
|
32609
32719
|
var _jsxRuntime = __webpack_require__(74848);
|
|
32610
32720
|
const _excluded = ["onMenuItemClick", "items"],
|
|
32611
32721
|
_excluded2 = ["iconType", "onClickHandler", "className", "toolTip", "placement", "content"],
|
|
@@ -32650,8 +32760,8 @@ const CapTopBar = _ref => {
|
|
|
32650
32760
|
isLatestLeftNavigationEnabled = false,
|
|
32651
32761
|
leftNavbarExpanded = false,
|
|
32652
32762
|
headerOverideCss = {},
|
|
32653
|
-
request,
|
|
32654
|
-
getAPICallObject,
|
|
32763
|
+
request: _request,
|
|
32764
|
+
getAPICallObject: _getAPICallObject,
|
|
32655
32765
|
userData,
|
|
32656
32766
|
children
|
|
32657
32767
|
} = _ref;
|
|
@@ -32679,6 +32789,7 @@ const CapTopBar = _ref => {
|
|
|
32679
32789
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapMenu.default, _extends({
|
|
32680
32790
|
className: _styles.default[clsPrefix + "-menu"],
|
|
32681
32791
|
mode: "horizontal",
|
|
32792
|
+
items: items,
|
|
32682
32793
|
style: {
|
|
32683
32794
|
lineHeight: styledVars.CAP_SPACE_64
|
|
32684
32795
|
}
|
|
@@ -32708,7 +32819,7 @@ const CapTopBar = _ref => {
|
|
|
32708
32819
|
placement: placement || 'bottom',
|
|
32709
32820
|
children: iconType === 'custom' ? content : /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, _extends({
|
|
32710
32821
|
onClick: onClickHandler ? () => onClickHandler() : undefined,
|
|
32711
|
-
className: (0, _classnames.default)(_styles.default[
|
|
32822
|
+
className: (0, _classnames.default)(isLatestLeftNavigationEnabled ? _styles.default[clsPrefix + "-new-topbarIcon"] : _styles.default[clsPrefix + "-topbarIcon"], className),
|
|
32712
32823
|
type: iconType
|
|
32713
32824
|
}, rest))
|
|
32714
32825
|
}, index);
|
|
@@ -32800,7 +32911,7 @@ const CapTopBar = _ref => {
|
|
|
32800
32911
|
trigger: ['click'],
|
|
32801
32912
|
onOpenChange: expandUserBackground,
|
|
32802
32913
|
overlay: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapMenu.default, {
|
|
32803
|
-
className: _styles.default[clsPrefix + "-menu"],
|
|
32914
|
+
className: _styles.default[clsPrefix + "-actions-menu"],
|
|
32804
32915
|
children: dropdownMenuProps.map(dropdownMenuProp => /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapMenu.default.Item, {
|
|
32805
32916
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32806
32917
|
onClick: dropdownMenuProp.onClickHandler ? () => dropdownMenuProp.onClickHandler == null ? void 0 : dropdownMenuProp.onClickHandler() : undefined,
|
|
@@ -32810,8 +32921,9 @@ const CapTopBar = _ref => {
|
|
|
32810
32921
|
})
|
|
32811
32922
|
})
|
|
32812
32923
|
}, dropdownMenuProp.key))
|
|
32813
|
-
})
|
|
32814
|
-
placement
|
|
32924
|
+
})
|
|
32925
|
+
//placement="bottomLeft"
|
|
32926
|
+
,
|
|
32815
32927
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
32816
32928
|
className: (0, _classnames.default)(_styles.default["" + clsPrefix + (isLatestLeftNavigationEnabled ? '-new' : '') + "-user"], visible && _styles.default['oval'], leftNavbarExpanded ? 'expanded' : 'collapsed'),
|
|
32817
32929
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LogoBackground, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -32866,7 +32978,8 @@ const CapTopBar = _ref => {
|
|
|
32866
32978
|
"data-testid": "tick-icon",
|
|
32867
32979
|
svgProps: {
|
|
32868
32980
|
fill: styledVars.CAP_BLUE01
|
|
32869
|
-
}
|
|
32981
|
+
},
|
|
32982
|
+
className: _styles.default[clsPrefix + "-tick-icon"]
|
|
32870
32983
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapHeading.default, {
|
|
32871
32984
|
type: "h3",
|
|
32872
32985
|
className: (0, _classnames.default)({
|
|
@@ -32977,11 +33090,14 @@ const CapTopBar = _ref => {
|
|
|
32977
33090
|
style: _extends({}, headerOverideCss),
|
|
32978
33091
|
className: (0, _classnames.default)(isLatestLeftNavigationEnabled ? _styles.default[clsPrefix + "-new-header"] : _styles.default[clsPrefix + "-header"]),
|
|
32979
33092
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
32980
|
-
className: _styles.default[clsPrefix + "-
|
|
33093
|
+
className: _styles.default[clsPrefix + "-left-navigation-wrapper"],
|
|
32981
33094
|
children: [isLatestLeftNavigationEnabled && breadcrumbs && renderBreadcrumbs(), !isLatestLeftNavigationEnabled && drawerListProps && renderDrawerList(), !isLatestLeftNavigationEnabled && selectProps && renderOrgsSelect()]
|
|
32982
|
-
}),
|
|
32983
|
-
|
|
32984
|
-
|
|
33095
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
33096
|
+
className: _styles.default[clsPrefix + "-right-navigation-wrapper"],
|
|
33097
|
+
children: [menuProps && renderTopMenu(), topbarIcons && renderTopbarIcons(), isLatestLeftNavigationEnabled && selectProps && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
33098
|
+
children: [renderDividerBeforeOrgSelect(topbarIcons, showDocumentationBot), renderOrgsSelect()]
|
|
33099
|
+
}), dropdownMenuProps && renderDropdownMenu()]
|
|
33100
|
+
}), children]
|
|
32985
33101
|
})
|
|
32986
33102
|
});
|
|
32987
33103
|
};
|
|
@@ -56775,8 +56891,7 @@ const menuTheme = exports.menuTheme = {
|
|
|
56775
56891
|
horizontalItemSelectedBg: 'transparent',
|
|
56776
56892
|
horizontalItemHoverColor: styledVars.CAP_G01,
|
|
56777
56893
|
horizontalItemHoverBg: 'transparent',
|
|
56778
|
-
activeBarHeight: 2
|
|
56779
|
-
activeBarBorderWidth: 2
|
|
56894
|
+
activeBarHeight: 2
|
|
56780
56895
|
}
|
|
56781
56896
|
}
|
|
56782
56897
|
};
|
|
@@ -62450,7 +62565,7 @@ var _antdV = __webpack_require__(64273);
|
|
|
62450
62565
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
62451
62566
|
var _logDeprecationWarning = _interopRequireDefault(__webpack_require__(19224));
|
|
62452
62567
|
var _jsxRuntime = __webpack_require__(74848);
|
|
62453
|
-
const _excluded = ["content", "size", "width", "open", "visible", "onOpenChange", "onVisibleChange"];
|
|
62568
|
+
const _excluded = ["content", "size", "width", "open", "visible", "onOpenChange", "onVisibleChange", "className"];
|
|
62454
62569
|
/**
|
|
62455
62570
|
*
|
|
62456
62571
|
* CapDrawer
|
|
@@ -62467,7 +62582,8 @@ const CapDrawer = _ref => {
|
|
|
62467
62582
|
open,
|
|
62468
62583
|
visible,
|
|
62469
62584
|
onOpenChange,
|
|
62470
|
-
onVisibleChange
|
|
62585
|
+
onVisibleChange,
|
|
62586
|
+
className
|
|
62471
62587
|
} = _ref,
|
|
62472
62588
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
62473
62589
|
(0, _logDeprecationWarning.default)('CapDrawer', 'visible', visible, 'open');
|
|
@@ -62486,6 +62602,7 @@ const CapDrawer = _ref => {
|
|
|
62486
62602
|
// Ant Design v5 Drawer types expect onVisibleChange, but runtime (v6) supports both
|
|
62487
62603
|
// Use onVisibleChange to satisfy TypeScript types
|
|
62488
62604
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Drawer, _extends({
|
|
62605
|
+
className: className,
|
|
62489
62606
|
width: widthMapping,
|
|
62490
62607
|
open: finalOpen
|
|
62491
62608
|
}, finalOnOpenChange && {
|
|
@@ -64329,19 +64446,51 @@ var _constants = __webpack_require__(99788);
|
|
|
64329
64446
|
var _styles = _interopRequireDefault(__webpack_require__(18263));
|
|
64330
64447
|
var _jsxRuntime = __webpack_require__(74848);
|
|
64331
64448
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
64332
|
-
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); }
|
|
64449
|
+
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); } /**
|
|
64450
|
+
* Custom option renderer function type
|
|
64451
|
+
* Allows customization of how option titles are rendered
|
|
64452
|
+
*/
|
|
64333
64453
|
/**
|
|
64334
64454
|
* Enhances options with React components for rendering
|
|
64335
64455
|
* Adds decorated titles with suffixes and tooltips
|
|
64336
64456
|
*/
|
|
64337
|
-
const enhanceOptionsWithComponents = (options, type) => {
|
|
64457
|
+
const enhanceOptionsWithComponents = (options, type, customOptionRenderer) => {
|
|
64338
64458
|
if (!(options != null && options.length)) return [];
|
|
64339
64459
|
const isTree = type === _constants.SELECT_TYPES.TREE_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT;
|
|
64460
|
+
|
|
64461
|
+
// Helper to extract plain text from label (handles React elements with sub-labels)
|
|
64462
|
+
const extractPlainText = label => {
|
|
64463
|
+
if (typeof label === 'string' || typeof label === 'number') {
|
|
64464
|
+
return label;
|
|
64465
|
+
}
|
|
64466
|
+
if (label && typeof label === 'object' && 'props' in label) {
|
|
64467
|
+
var _element$props;
|
|
64468
|
+
const element = label;
|
|
64469
|
+
// If it's a span with flex layout (contains sub-label), extract just the main text
|
|
64470
|
+
if ((_element$props = element.props) != null && _element$props.children && Array.isArray(element.props.children)) {
|
|
64471
|
+
const firstChild = element.props.children[0];
|
|
64472
|
+
if (firstChild && typeof firstChild === 'object' && 'props' in firstChild) {
|
|
64473
|
+
var _props;
|
|
64474
|
+
// Get text from first child span
|
|
64475
|
+
const textChild = (_props = firstChild.props) == null ? void 0 : _props.children;
|
|
64476
|
+
return typeof textChild === 'string' ? textChild : textChild;
|
|
64477
|
+
}
|
|
64478
|
+
// If first child is string, return it
|
|
64479
|
+
if (typeof firstChild === 'string') {
|
|
64480
|
+
return firstChild;
|
|
64481
|
+
}
|
|
64482
|
+
}
|
|
64483
|
+
}
|
|
64484
|
+
return label;
|
|
64485
|
+
};
|
|
64340
64486
|
const enhanceOptions = opts => opts.map(opt => {
|
|
64341
|
-
|
|
64487
|
+
// Extract plain text from label if it's a React element (to avoid duplication with optionSuffix)
|
|
64488
|
+
// If label is a React element with sub-label, use plain text for dropdown display
|
|
64489
|
+
// The optionSuffix will add the sub-label separately
|
|
64490
|
+
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);
|
|
64342
64491
|
const tooltipTitle = opt == null ? void 0 : opt.hoverText;
|
|
64343
64492
|
const isDisabled = (opt == null ? void 0 : opt.disabled) === true;
|
|
64344
|
-
const
|
|
64493
|
+
const defaultTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
64345
64494
|
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
64346
64495
|
justify: "space-between",
|
|
64347
64496
|
align: "middle",
|
|
@@ -64368,6 +64517,13 @@ const enhanceOptionsWithComponents = (options, type) => {
|
|
|
64368
64517
|
})]
|
|
64369
64518
|
})]
|
|
64370
64519
|
});
|
|
64520
|
+
|
|
64521
|
+
// Use custom renderer if provided, otherwise use default
|
|
64522
|
+
const decoratedTitle = customOptionRenderer ? customOptionRenderer(opt, defaultTitle, {
|
|
64523
|
+
displayText,
|
|
64524
|
+
tooltipTitle,
|
|
64525
|
+
isDisabled
|
|
64526
|
+
}) : defaultTitle;
|
|
64371
64527
|
return _extends({}, opt, {
|
|
64372
64528
|
title: decoratedTitle,
|
|
64373
64529
|
label: opt == null ? void 0 : opt.label,
|
|
@@ -64381,34 +64537,42 @@ const enhanceOptionsWithComponents = (options, type) => {
|
|
|
64381
64537
|
const displayText = (opt == null ? void 0 : opt.label) || (opt == null ? void 0 : opt.value);
|
|
64382
64538
|
const tooltipTitle = opt == null ? void 0 : opt.hoverText;
|
|
64383
64539
|
const isDisabled = (opt == null ? void 0 : opt.disabled) === true;
|
|
64384
|
-
|
|
64385
|
-
|
|
64386
|
-
|
|
64387
|
-
|
|
64388
|
-
|
|
64389
|
-
|
|
64390
|
-
|
|
64391
|
-
|
|
64392
|
-
|
|
64393
|
-
|
|
64394
|
-
|
|
64395
|
-
|
|
64396
|
-
|
|
64397
|
-
|
|
64398
|
-
|
|
64399
|
-
|
|
64400
|
-
|
|
64401
|
-
|
|
64402
|
-
|
|
64403
|
-
|
|
64404
|
-
|
|
64405
|
-
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
64406
|
-
})]
|
|
64407
|
-
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
64408
|
-
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
64540
|
+
const defaultTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
64541
|
+
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
64542
|
+
justify: "space-between",
|
|
64543
|
+
align: "middle",
|
|
64544
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
64545
|
+
className: _styles.default['cap-unified-select-option-label'],
|
|
64546
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
64547
|
+
type: "label14",
|
|
64548
|
+
className: (0, _classnames.default)(_styles.default['truncate-text'], {
|
|
64549
|
+
[_styles.default['option-disabled']]: isDisabled,
|
|
64550
|
+
[_styles.default['option-enabled']]: !isDisabled
|
|
64551
|
+
}),
|
|
64552
|
+
title: tooltipTitle,
|
|
64553
|
+
children: displayText
|
|
64554
|
+
})
|
|
64555
|
+
}), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
64556
|
+
className: _styles.default['cap-unified-select-option-end'],
|
|
64557
|
+
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
64558
|
+
className: _styles.default['cap-unified-select-option-suffix'],
|
|
64559
|
+
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
64560
|
+
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
64409
64561
|
})]
|
|
64562
|
+
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
64563
|
+
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
64410
64564
|
})]
|
|
64411
|
-
})
|
|
64565
|
+
})]
|
|
64566
|
+
});
|
|
64567
|
+
|
|
64568
|
+
// Use custom renderer if provided, otherwise use default
|
|
64569
|
+
const decoratedTitle = customOptionRenderer ? customOptionRenderer(opt, defaultTitle, {
|
|
64570
|
+
displayText,
|
|
64571
|
+
tooltipTitle,
|
|
64572
|
+
isDisabled
|
|
64573
|
+
}) : defaultTitle;
|
|
64574
|
+
return _extends({}, opt, {
|
|
64575
|
+
title: decoratedTitle,
|
|
64412
64576
|
label: opt == null ? void 0 : opt.label
|
|
64413
64577
|
});
|
|
64414
64578
|
});
|