@bigbinary/neeto-molecules 1.15.58-beta → 1.15.59-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Chevron-5b140e64.js → Chevron-74f7053c.js} +4 -4
- package/dist/Chevron-74f7053c.js.map +1 -0
- package/dist/ConfigurePageSidebar.js +1 -1
- package/dist/OptionFields.js +2 -1
- package/dist/OptionFields.js.map +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/cjs/{Chevron-97f5d14e.js → Chevron-7b1b9258.js} +4 -4
- package/dist/cjs/Chevron-7b1b9258.js.map +1 -0
- package/dist/cjs/ConfigurePageSidebar.js +1 -1
- package/dist/cjs/OptionFields.js +2 -1
- package/dist/cjs/OptionFields.js.map +1 -1
- package/dist/cjs/Sidebar.js +1 -1
- package/package.json +1 -1
- package/dist/Chevron-5b140e64.js.map +0 -1
- package/dist/cjs/Chevron-97f5d14e.js.map +0 -1
|
@@ -151,7 +151,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
151
151
|
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
|
|
152
152
|
"data-cy": "configure-nav-container"
|
|
153
153
|
}, /*#__PURE__*/React__default.createElement("div", _extends({
|
|
154
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-bg-
|
|
154
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-text-primary-500 neeto-ui-border-b hover:neeto-ui-text-primary-500 mb-2",
|
|
155
155
|
onClick: handleGoBack
|
|
156
156
|
}, _objectSpread({}, omit(["icon"], otherProps))), isConfigureNavLink && /*#__PURE__*/React__default.createElement("span", {
|
|
157
157
|
className: "neeto-molecules-sidebar__link-icon",
|
|
@@ -159,7 +159,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
159
159
|
"data-testid": "".concat(label, "-go-back-button")
|
|
160
160
|
}, /*#__PURE__*/React__default.createElement(Left, null)), /*#__PURE__*/React__default.createElement(Typography, {
|
|
161
161
|
component: "span",
|
|
162
|
-
style: "
|
|
162
|
+
style: "body1",
|
|
163
163
|
weight: "normal",
|
|
164
164
|
className: classnames("neeto-molecules-sidebar__link-label", _defineProperty({
|
|
165
165
|
"neeto-molecules-sidebar__configure-page-header": isConfigureNavLink
|
|
@@ -170,7 +170,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
170
170
|
}));
|
|
171
171
|
};
|
|
172
172
|
|
|
173
|
-
var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:240px;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:20px}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:70px}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:3px auto 11px;width:90%}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 136px)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 80px)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__link span{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-primary-100));color:rgb(var(--neeto-ui-primary-800))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding:4px 0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;margin-bottom:2px;padding:8px 24px 8px 58px;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-primary-800));text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:4px 24px 4px 58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0 0 10px!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0 8px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:var(--neeto-ui-rounded)}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body2:16px;cursor:pointer;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:15px;color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:5px}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:13px;padding-left:40px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;padding:4px 15px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}";
|
|
173
|
+
var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:240px;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:20px}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:70px}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:3px auto 11px;width:90%}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 136px)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 80px)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__link span{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)!important}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:16px;flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-primary-100));color:rgb(var(--neeto-ui-primary-800))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding:4px 0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));cursor:pointer;gap:8px;margin-bottom:2px;padding:8px 24px 8px 58px;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-black));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-black));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-primary-800));text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:4px 24px 4px 58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0 0 10px!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0 8px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:var(--neeto-ui-rounded)}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{cursor:pointer;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:15px}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:5px}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:var(--neeto-ui-rounded);font-weight:var(--neeto-ui-font-normal)}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;padding:4px 15px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}";
|
|
174
174
|
n(css,{});
|
|
175
175
|
|
|
176
176
|
var Chevron = function Chevron(_ref) {
|
|
@@ -187,4 +187,4 @@ var Chevron = function Chevron(_ref) {
|
|
|
187
187
|
};
|
|
188
188
|
|
|
189
189
|
export { Chevron as C, Items as I, SelectedLink as S, CheckPointNavLinks as a, SELECTED_NAV_LINK_ROUTE_STORAGE_KEY as b, filterByPermissions as f, getSidebarStateLocalStorageKey as g };
|
|
190
|
-
//# sourceMappingURL=Chevron-
|
|
190
|
+
//# sourceMappingURL=Chevron-74f7053c.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chevron-74f7053c.js","sources":["../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../src/components/Sidebar/constants.js","../src/components/Sidebar/utils.js","../src/components/Sidebar/Components/Links/SubLink.jsx","../src/components/Sidebar/Components/Links/Items.jsx","../src/components/Sidebar/Components/Links/SelectedLink.jsx","../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others} key={to}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n","import { isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={() => !isSectionHeader && isSubRouteActive(to, location)}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import React from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <React.Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <>\n <Items {...{ isSettingsItems }} items={subItem.items} />\n <hr className=\"neeto-molecules-sidebar__separator\" />\n </>\n )}\n </React.Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { omit } from \"ramda\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-text-primary-500 neeto-ui-border-b hover:neeto-ui-text-primary-500 mb-2\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-back-button`}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body1\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","key","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","activeClassName","className","isActive","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","_objectSpread","isPresent","item","path","SelectedLink","_ref$navLink","navLink","isConfigureNavLink","handleGoBack","isConfigureSidebar","otherProps","onClick","omit","hyphenize","Left","weight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
|
@@ -5,7 +5,7 @@ import { Button } from '@bigbinary/neetoui';
|
|
|
5
5
|
import { not } from 'ramda';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { useHistory } from 'react-router-dom';
|
|
8
|
-
import { S as SelectedLink, C as Chevron } from './Chevron-
|
|
8
|
+
import { S as SelectedLink, C as Chevron } from './Chevron-74f7053c.js';
|
|
9
9
|
import './extends-093996c9.js';
|
|
10
10
|
import './defineProperty-549061a7.js';
|
|
11
11
|
import './objectWithoutProperties-a0edb288.js';
|
package/dist/OptionFields.js
CHANGED
|
@@ -310,13 +310,14 @@ var InputOption = function InputOption(_ref) {
|
|
|
310
310
|
}))), /*#__PURE__*/React__default.createElement(Component, {
|
|
311
311
|
disabled: disabled,
|
|
312
312
|
autoFocus: shouldFocus,
|
|
313
|
-
"data-cy": "option-input",
|
|
313
|
+
"data-cy": "option-input-".concat(index),
|
|
314
314
|
"data-testid": isTextArea ? "textarea-option" : "input-option",
|
|
315
315
|
placeholder: t("neetoMolecules.optionFields.optionName"),
|
|
316
316
|
value: label,
|
|
317
317
|
suffix: !hideDeleteOption && /*#__PURE__*/React__default.createElement(Button, {
|
|
318
318
|
disabled: disabled,
|
|
319
319
|
className: "p-0.5",
|
|
320
|
+
"data-cy": "delete-option-button-".concat(index),
|
|
320
321
|
"data-testid": "delete-option-button",
|
|
321
322
|
icon: Delete,
|
|
322
323
|
size: "small",
|
package/dist/OptionFields.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionFields.js","sources":["../src/components/OptionFields/DragHandle.jsx","../src/components/OptionFields/BlockOption.jsx","../src/components/OptionFields/BulkOptionModal.jsx","../src/components/OptionFields/constants.js","../src/components/OptionFields/utils.js","../src/components/OptionFields/hooks/useOptionFields.js","../src/components/OptionFields/InputOption.jsx","../src/components/OptionFields/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Reorder } from \"neetoicons\";\n\nconst DragHandle = props => (\n <div\n className=\"neeto-ui-text-gray-400 absolute bottom-0 left-0 top-0 my-auto -ml-6 h-6 cursor-grab opacity-0 transition-opacity duration-300 ease-in-out group-hover:opacity-100\"\n data-cy=\"drag-handle\"\n data-testid=\"drag-handle\"\n {...props}\n >\n <Reorder size={24} strokeWidth={2} />\n </div>\n);\n\nexport default DragHandle;\n","import React from \"react\";\n\nimport { withT } from \"neetocommons/react-utils\";\nimport { Delete, Edit } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\n\nimport DragHandle from \"./DragHandle\";\n\nconst BlockOption = withT(\n ({\n t,\n innerRef,\n hideDeleteOption = false,\n draggableProps,\n dragHandleProps,\n label,\n index,\n onEdit,\n handleDeleteClick,\n }) => (\n <div ref={innerRef} {...draggableProps} {...dragHandleProps}>\n <div\n className=\"neeto-ui-border-gray-400 hover:neeto-ui-bg-gray-200 neeto-ui-rounded-sm shadow-xs group relative mb-2 flex h-10 cursor-pointer items-center gap-2 border p-3 transition-colors duration-300 ease-in-out\"\n data-cy=\"address-field-block\"\n >\n <DragHandle {...dragHandleProps} />\n <Typography\n className=\"flex-grow leading-4\"\n data-cy=\"address-text-field\"\n data-testid=\"address-text-field\"\n style=\"body2\"\n >\n {label}\n </Typography>\n <div className=\"flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100\">\n <Button\n className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-400 p-1\"\n data-cy=\"address-field-edit-button\"\n data-testid=\"address-field-edit-button\"\n icon={Edit}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.edit\"),\n position: \"top\",\n }}\n onClick={() => onEdit(index)}\n />\n {!hideDeleteOption && (\n <Button\n className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-400 p-1\"\n data-cy=\"address-field-delete-button\"\n data-testid=\"address-field-delete-button\"\n icon={Delete}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.delete\"),\n position: \"top\",\n }}\n onClick={() => handleDeleteClick({ index })}\n />\n )}\n </div>\n </div>\n </div>\n )\n);\n\nexport default BlockOption;\n","import React, { useState } from \"react\";\n\nimport { Button, Modal, Textarea, Typography } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nconst BulkOptionModal = ({\n isOpen,\n onClose,\n handleBulkAdd,\n bulkAddHelpDocUrl,\n}) => {\n const { t } = useTranslation();\n const [optionsString, setOptionsString] = useState(\"\");\n\n const handleSave = () => {\n handleBulkAdd(optionsString);\n handleClose();\n };\n\n const handleClose = () => {\n setOptionsString(\"\");\n onClose();\n };\n\n return (\n <Modal {...{ isOpen }} onClose={handleClose}>\n <Modal.Header>\n <Typography style=\"h3\">\n {t(\"neetoMolecules.optionFields.bulkOption.title\")}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <Textarea\n className=\"my-2\"\n data-cy=\"bulk-add-options-textarea\"\n data-testid=\"bulk-add-options-textarea\"\n label={t(\"neetoMolecules.optionFields.bulkOption.label\")}\n placeholder={t(\"neetoMolecules.optionFields.bulkOption.label\")}\n rows={8}\n value={optionsString}\n helpText={\n <Trans\n i18nKey=\"neetoMolecules.optionFields.bulkOption.helpText\"\n components={{\n Link: (\n <Button\n className=\"text-xs\"\n href={bulkAddHelpDocUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n />\n }\n onChange={e => setOptionsString(e.target.value)}\n />\n </Modal.Body>\n <Modal.Footer className=\"gap-x-2\">\n <Button\n data-cy=\"bulk-add-options-done-button\"\n data-testid=\"bulk-add-options-done-button\"\n label={t(\"neetoMolecules.common.actions.submit\")}\n onClick={handleSave}\n />\n <Button\n data-cy=\"bulk-add-options-cancel-button\"\n data-testid=\"bulk-add-options-cancel-button\"\n label={t(\"neetoMolecules.common.actions.cancel\")}\n style=\"text\"\n onClick={handleClose}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nexport default BulkOptionModal;\n","import i18next from \"i18next\";\n\nexport const DEFAULT_OPTION_LABEL = i18next.t(\n \"neetoMolecules.optionFields.defaultOption\"\n);\n","import { prop, reject } from \"ramda\";\n\nexport const getVisibleOptions = (options = []) =>\n options\n .filter(option => !option.deleted)\n .sort((a, b) => a.position - b.position);\n\nexport const filterDeletedRecords = reject(prop(\"deleted\"));\n\nexport const randomId = () => Math.random().toString(36).substring(2, 13);\n","import { useState } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isNotEmpty } from \"neetocist\";\nimport { pluck, append, assocPath, move, path, remove, isEmpty } from \"ramda\";\n\nimport { DEFAULT_OPTION_LABEL } from \"../constants\";\nimport { filterDeletedRecords, randomId } from \"../utils\";\n\nconst attachPosition = options =>\n options.map((option, index) => ({ ...option, position: index + 1 }));\n\nconst useOptionFields = ({\n options,\n onChange,\n shouldDestroy,\n name = \"\",\n currentRecord,\n itemLabel = DEFAULT_OPTION_LABEL,\n}) => {\n const [shouldFocus, setShouldFocus] = useState(false);\n\n const deletedOptions = options.filter(option => !!option?.deleted);\n\n const { initialValues } = useFormikContext();\n\n const handleChange = (index, value, isOnBlur = false) => {\n const draftAttributes = currentRecord?.draftAttributes;\n\n const getNextOptions = () =>\n assocPath(\n [index, \"label\"],\n isOnBlur\n ? path(name.split(\".\"), initialValues)[index]?.label ||\n path(name.split(\".\"), draftAttributes)[index]?.label\n : value,\n filterDeletedRecords(options)\n );\n if (isOnBlur && !isEmpty(value)) return;\n onChange([...deletedOptions, ...getNextOptions()]);\n };\n\n const generateLabel = (opts, count) => {\n const labelCount = count || opts.length + 1;\n const tempLabel = `${itemLabel} ${labelCount}`;\n const isDuplicateLabel = pluck(\"label\", opts).includes(tempLabel);\n\n return isDuplicateLabel ? generateLabel(opts, labelCount + 1) : tempLabel;\n };\n\n const handleDelete = index => {\n let nextOptions;\n let finalOptions;\n\n if (shouldDestroy) {\n nextOptions = assocPath(\n [index, \"deleted\"],\n true,\n filterDeletedRecords(options)\n );\n finalOptions = attachPosition(filterDeletedRecords(nextOptions));\n } else {\n nextOptions = remove(index, 1, options);\n finalOptions = attachPosition(nextOptions);\n }\n onChange([...deletedOptions, ...finalOptions]);\n };\n\n const handleDragEnd = ({ source, destination }) => {\n // When dragged outside of draggable\n if (destination === null) return;\n\n const filteredOptions = filterDeletedRecords(options);\n const nextOptions = move(source.index, destination.index, filteredOptions);\n const finalOptions = attachPosition(nextOptions);\n onChange([...deletedOptions, ...finalOptions]);\n };\n\n const handleAddOption = () => {\n setShouldFocus(true);\n const position = filterDeletedRecords(options).length;\n const id = randomId();\n const newOption = {\n id: `draft-${id}`,\n altId: `alt-${id}`,\n label: generateLabel(options, null),\n position,\n };\n const nextOptions = append(newOption, options);\n onChange(nextOptions);\n };\n\n const handleBulkAddOption = optionsString => {\n setShouldFocus(true);\n const position = filterDeletedRecords(options).length;\n const newOptions = optionsString\n .trim()\n .split(/\\r?\\n|,/)\n .filter(isNotEmpty)\n .map((option, index) => ({\n id: `draft-${randomId()}`,\n altId: `alt-${randomId()}`,\n label: option.trim(),\n position: position + index,\n }));\n onChange([...options, ...newOptions]);\n };\n\n const handleKeyDown = () => event => {\n if (event.key !== \"Enter\") return;\n const form = event.target.form;\n const inputs = Array.from(form.querySelectorAll(\"input\"));\n const currentInput = inputs.indexOf(event.target);\n\n if (currentInput >= inputs.length - 1) {\n handleAddOption();\n } else {\n inputs[currentInput + 1]?.focus();\n event.preventDefault();\n }\n event.stopPropagation();\n };\n\n return {\n shouldFocus,\n handleAddOption,\n handleBulkAddOption,\n handleChange,\n handleKeyDown,\n handleDelete,\n handleDragEnd,\n };\n};\n\nexport default useOptionFields;\n","import React from \"react\";\n\nimport { ImageUpload, Delete } from \"neetoicons\";\nimport { Button, Input, Textarea } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DragHandle from \"./DragHandle\";\n\nconst InputOption = ({\n shouldFocus,\n hideDeleteOption = false,\n innerRef,\n draggableProps,\n dragHandleProps,\n isPictureChoice,\n onKeyDown,\n onDelete,\n onChange,\n label,\n index,\n disabled,\n isTextArea,\n}) => {\n const { t } = useTranslation();\n\n const Component = isTextArea ? Textarea : Input;\n\n return (\n <div\n ref={innerRef}\n {...draggableProps}\n {...dragHandleProps}\n data-cy=\"form-block-options\"\n >\n <div className=\"nf-input-options group relative mb-2 flex items-center gap-2\">\n <DragHandle {...dragHandleProps} />\n {isPictureChoice && (\n <>\n {index === 0 ? (\n <img\n className=\"neeto-ui-rounded-sm h-8 w-8 cursor-pointer overflow-hidden object-cover\"\n data-testid=\"picture-choice-option\"\n src=\"https://i.pravatar.cc/300\"\n />\n ) : (\n <div className=\"hover:neeto-ui-bg-gray-100 neeto-ui-border-primary-600 neeto-ui-text-primary-800 neeto-ui-rounded-sm flex h-8 w-8 cursor-pointer items-center justify-center border border-dashed transition-all duration-300 ease-in-out\">\n <ImageUpload size={16} />\n </div>\n )}\n </>\n )}\n <Component\n {...{ disabled }}\n autoFocus={shouldFocus}\n data-cy=\"option-input\"\n data-testid={isTextArea ? \"textarea-option\" : \"input-option\"}\n placeholder={t(\"neetoMolecules.optionFields.optionName\")}\n value={label}\n suffix={\n !hideDeleteOption && (\n <Button\n {...{ disabled }}\n className=\"p-0.5\"\n data-testid=\"delete-option-button\"\n icon={Delete}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.delete\"),\n position: \"top\",\n }}\n onClick={() => onDelete({ index })}\n />\n )\n }\n onBlur={({ target }) => onChange(index, target.value, true)}\n onChange={({ target }) => onChange(index, target.value)}\n onFocus={({ target }) => target.select()}\n onKeyDown={onKeyDown(index)}\n />\n </div>\n </div>\n );\n};\n\nexport default InputOption;\n","import React, { useState } from \"react\";\n\nimport { DragDropContext, Droppable, Draggable } from \"@hello-pangea/dnd\";\nimport { noop, slugify } from \"neetocist\";\nimport { Plus } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport BlockOption from \"./BlockOption\";\nimport BulkOptionModal from \"./BulkOptionModal\";\nimport useOptionFields from \"./hooks/useOptionFields\";\nimport InputOption from \"./InputOption\";\nimport { getVisibleOptions } from \"./utils\";\n\nconst OptionFields = ({\n options,\n error,\n onChange,\n name,\n onDelete,\n itemLabel,\n onEdit = noop,\n buttonProps = {},\n minOptions = 0,\n draggable = false,\n editable = true,\n isPictureChoice = false,\n isTextArea = false,\n shouldDestroy = false,\n currentRecord = {},\n bulkActionProps = { enabled: false, bulkAddHelpDocUrl: \"\" },\n}) => {\n const { t } = useTranslation();\n const [isBulkOptionModalOpen, setIsBulkOptionModalOpen] = useState(false);\n\n const {\n shouldFocus,\n handleAddOption,\n handleBulkAddOption,\n handleChange,\n handleKeyDown,\n handleDelete,\n handleDragEnd,\n } = useOptionFields({\n options,\n onChange,\n shouldDestroy,\n name,\n currentRecord,\n itemLabel,\n });\n\n // Temporarily disables the modifications to options when changed are getting saved to server\n // This condition only needed for server id generated types\n let isEditable = true;\n if (shouldDestroy) {\n isEditable =\n options.every(prop(\"id\") || error) && !options.some(prop(\"_destroy\"));\n }\n\n const handleDeleteClick = ({ index }) => {\n const deleteFunction = onDelete ?? handleDelete;\n deleteFunction(index);\n };\n const visibleOptions = getVisibleOptions(options);\n const hideDeleteOption = visibleOptions.length <= minOptions;\n\n const getUniqueOptionId = option =>\n option.altId ||\n option.id?.toString() ||\n option.position?.toString() ||\n slugify(option.label);\n\n return (\n <form onSubmit={e => e.preventDefault()}>\n <DragDropContext onDragEnd={handleDragEnd}>\n <Droppable\n droppableId={`neeto-molecules-option-fields-${name}`}\n isDropDisabled={!draggable}\n >\n {({ innerRef, droppableProps, placeholder }) => (\n <div ref={innerRef} {...droppableProps}>\n {visibleOptions.map((option, index) => (\n <Draggable\n {...{ index }}\n draggableId={getUniqueOptionId(option)}\n isDragDisabled={!draggable}\n key={getUniqueOptionId(option)}\n >\n {({ innerRef, draggableProps, dragHandleProps }) =>\n editable ? (\n <InputOption\n {...{\n dragHandleProps,\n draggableProps,\n hideDeleteOption,\n index,\n innerRef,\n isPictureChoice,\n isTextArea,\n name,\n shouldFocus,\n }}\n disabled={!isEditable}\n label={option.label}\n onChange={handleChange}\n onDelete={handleDeleteClick}\n onKeyDown={handleKeyDown}\n />\n ) : (\n <BlockOption\n {...{\n dragHandleProps,\n draggableProps,\n handleDeleteClick,\n hideDeleteOption,\n index,\n innerRef,\n onEdit,\n }}\n label={option.label}\n />\n )\n }\n </Draggable>\n ))}\n {error && (\n <Typography\n className=\"neeto-ui-input__error\"\n data-testid=\"validation-error-container\"\n style=\"body3\"\n >\n {error}\n </Typography>\n )}\n {placeholder}\n </div>\n )}\n </Droppable>\n <div className=\"mt-4 flex items-center justify-between\">\n <Button\n data-cy=\"add-option-link\"\n data-testid=\"add-option-link\"\n disabled={!isEditable}\n icon={Plus}\n iconPosition=\"left\"\n label={t(\"neetoMolecules.optionFields.addOption\")}\n size=\"small\"\n style=\"link\"\n onClick={handleAddOption}\n {...buttonProps}\n />\n {bulkActionProps.enabled && (\n <Button\n data-cy=\"add-bulk-option-link\"\n data-testid=\"add-bulk-option-link\"\n disabled={!isEditable}\n label={t(\"neetoMolecules.optionFields.addBulk\")}\n size=\"small\"\n style=\"text\"\n onClick={() => setIsBulkOptionModalOpen(true)}\n />\n )}\n </div>\n </DragDropContext>\n <BulkOptionModal\n bulkAddHelpDocUrl={bulkActionProps.bulkAddHelpDocUrl}\n handleBulkAdd={handleBulkAddOption}\n isOpen={isBulkOptionModalOpen}\n onClose={() => setIsBulkOptionModalOpen(false)}\n />\n </form>\n );\n};\n\nOptionFields.propTypes = {\n /**\n * Props to be passed to the add option button\n */\n buttonProps: PropTypes.object,\n /**\n * Current record object\n */\n currentRecord: PropTypes.object,\n /**\n * Enable drag and drop functionality\n */\n draggable: PropTypes.bool,\n\n /**\n * Enable edit functionality\n */\n editable: PropTypes.bool,\n\n /**\n * Error message to be displayed\n */\n error: PropTypes.string,\n\n /**\n * The field name in Formik state.\n */\n name: PropTypes.string,\n\n /**\n * Function to handle option deletion\n */\n onDelete: PropTypes.func,\n\n /**\n * Function to handle option edit\n *\n */\n onEdit: PropTypes.func,\n\n /**\n * Minimum number of options required\n */\n minOptions: PropTypes.number,\n\n /**\n * Options array\n */\n options: PropTypes.array,\n\n /**\n * Prop to switch between Input and Textarea\n */\n isTextArea: PropTypes.bool,\n\n /**\n * Function to handle options change\n */\n onChange: PropTypes.func,\n\n /**\n * Prop to switch between PictureChoice and normal options\n * */\n isPictureChoice: PropTypes.bool,\n\n /**\n * Prop to destroy options\n * */\n shouldDestroy: PropTypes.bool,\n\n /**\n * Prop to set the item label\n * */\n\n itemLabel: PropTypes.string,\n\n /**\n * Props for bulk action\n */\n bulkActionProps: PropTypes.shape({\n enabled: PropTypes.bool,\n bulkAddHelpDocUrl: PropTypes.string,\n }),\n};\nexport default OptionFields;\n"],"names":["DragHandle","props","React","createElement","_extends","className","Reorder","size","strokeWidth","BlockOption","withT","_ref","t","innerRef","_ref$hideDeleteOption","hideDeleteOption","draggableProps","dragHandleProps","label","index","onEdit","handleDeleteClick","ref","Typography","style","Button","icon","Edit","tooltipProps","content","position","onClick","Delete","BulkOptionModal","isOpen","onClose","handleBulkAdd","bulkAddHelpDocUrl","_useTranslation","useTranslation","_useState","useState","_useState2","_slicedToArray","optionsString","setOptionsString","handleSave","handleClose","Modal","Header","Body","Textarea","placeholder","rows","value","helpText","Trans","i18nKey","components","Link","href","target","onChange","e","Footer","DEFAULT_OPTION_LABEL","i18next","getVisibleOptions","options","arguments","length","undefined","filter","option","deleted","sort","a","b","filterDeletedRecords","reject","prop","randomId","Math","random","toString","substring","attachPosition","map","_objectSpread","useOptionFields","shouldDestroy","_ref$name","name","currentRecord","_ref$itemLabel","itemLabel","shouldFocus","setShouldFocus","deletedOptions","_useFormikContext","useFormikContext","initialValues","handleChange","isOnBlur","draftAttributes","getNextOptions","_path$index","_path$index2","assocPath","path","split","isEmpty","concat","_toConsumableArray","generateLabel","opts","count","labelCount","tempLabel","isDuplicateLabel","pluck","includes","handleDelete","nextOptions","finalOptions","remove","handleDragEnd","_ref2","source","destination","filteredOptions","move","handleAddOption","id","newOption","altId","append","handleBulkAddOption","newOptions","trim","isNotEmpty","handleKeyDown","event","key","form","inputs","Array","from","querySelectorAll","currentInput","indexOf","_inputs","focus","preventDefault","stopPropagation","InputOption","isPictureChoice","onKeyDown","onDelete","disabled","isTextArea","Component","Input","Fragment","src","ImageUpload","autoFocus","suffix","onBlur","_ref3","onFocus","_ref4","select","OptionFields","error","_ref$onEdit","noop","_ref$buttonProps","buttonProps","_ref$minOptions","minOptions","_ref$draggable","draggable","_ref$editable","editable","_ref$isPictureChoice","_ref$isTextArea","_ref$shouldDestroy","_ref$currentRecord","_ref$bulkActionProps","bulkActionProps","enabled","isBulkOptionModalOpen","setIsBulkOptionModalOpen","_useOptionFields","isEditable","every","some","deleteFunction","visibleOptions","getUniqueOptionId","_option$id","_option$position","slugify","onSubmit","DragDropContext","onDragEnd","Droppable","droppableId","isDropDisabled","droppableProps","Draggable","draggableId","isDragDisabled","Plus","iconPosition"],"mappings":";;;;;;;;;;;;;;;AAIA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAGC,KAAK,EAAA;AAAA,EAAA,oBACtBC,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAAC,QAAA,CAAA;AACEC,IAAAA,SAAS,EAAC,mKAAmK;AAC7K,IAAA,SAAA,EAAQ,aAAa;IACrB,aAAY,EAAA,aAAA;AAAa,GAAA,EACrBJ,KAAK,CAETC,eAAAA,cAAA,CAAAC,aAAA,CAACG,OAAO,EAAA;AAACC,IAAAA,IAAI,EAAE,EAAG;AAACC,IAAAA,WAAW,EAAE,CAAA;AAAE,GAAE,CACjC,CAAC,CAAA;AAAA,CACP;;ACLD,IAAMC,WAAW,GAAGC,KAAK,CACvB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IACDC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,qBAAA,GAAAH,IAAA,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AQ,iBAAiB;AACzB,IAAA,aAAA,EAAY,iBAAiB;IAC7B2J,QAAQ,EAAE,CAACoC,UAAW;AACtBzK,IAAAA,IAAI,EAAE4L,IAAK;AACXC,IAAAA,YAAY,EAAC,MAAM;AACnBrM,IAAAA,KAAK,EAAEN,CAAC,CAAC,uCAAuC,CAAE;AAClDL,IAAAA,IAAI,EAAC,OAAO;AACZiB,IAAAA,KAAK,EAAC,MAAM;AACZO,IAAAA,OAAO,EAAEqG,eAAAA;AAAgB,GAAA,EACrB8C,WAAW,CAChB,CAAC,EACDY,eAAe,CAACC,OAAO,iBACtB7L,cAAA,CAAAC,aAAA,CAACsB,MAAM,EAAA;AACL,IAAA,SAAA,EAAQ,sBAAsB;AAC9B,IAAA,aAAA,EAAY,sBAAsB;IAClCsI,QAAQ,EAAE,CAACoC,UAAW;AACtBjL,IAAAA,KAAK,EAAEN,CAAC,CAAC,qCAAqC,CAAE;AAChDL,IAAAA,IAAI,EAAC,OAAO;AACZiB,IAAAA,KAAK,EAAC,MAAM;IACZO,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAMkK,wBAAwB,CAAC,IAAI,CAAC,CAAA;AAAA,KAAA;GAC9C,CAEA,CACU,CAAC,eAClB/L,cAAA,CAAAC,aAAA,CAAC8B,eAAe,EAAA;IACdI,iBAAiB,EAAEyJ,eAAe,CAACzJ,iBAAkB;AACrDD,IAAAA,aAAa,EAAEqG,mBAAoB;AACnCvG,IAAAA,MAAM,EAAE8J,qBAAsB;IAC9B7J,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAM8J,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAAA,KAAA;AAAC,GAChD,CACG,CAAC,CAAA;AAEX;;;;"}
|
|
1
|
+
{"version":3,"file":"OptionFields.js","sources":["../src/components/OptionFields/DragHandle.jsx","../src/components/OptionFields/BlockOption.jsx","../src/components/OptionFields/BulkOptionModal.jsx","../src/components/OptionFields/constants.js","../src/components/OptionFields/utils.js","../src/components/OptionFields/hooks/useOptionFields.js","../src/components/OptionFields/InputOption.jsx","../src/components/OptionFields/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Reorder } from \"neetoicons\";\n\nconst DragHandle = props => (\n <div\n className=\"neeto-ui-text-gray-400 absolute bottom-0 left-0 top-0 my-auto -ml-6 h-6 cursor-grab opacity-0 transition-opacity duration-300 ease-in-out group-hover:opacity-100\"\n data-cy=\"drag-handle\"\n data-testid=\"drag-handle\"\n {...props}\n >\n <Reorder size={24} strokeWidth={2} />\n </div>\n);\n\nexport default DragHandle;\n","import React from \"react\";\n\nimport { withT } from \"neetocommons/react-utils\";\nimport { Delete, Edit } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\n\nimport DragHandle from \"./DragHandle\";\n\nconst BlockOption = withT(\n ({\n t,\n innerRef,\n hideDeleteOption = false,\n draggableProps,\n dragHandleProps,\n label,\n index,\n onEdit,\n handleDeleteClick,\n }) => (\n <div ref={innerRef} {...draggableProps} {...dragHandleProps}>\n <div\n className=\"neeto-ui-border-gray-400 hover:neeto-ui-bg-gray-200 neeto-ui-rounded-sm shadow-xs group relative mb-2 flex h-10 cursor-pointer items-center gap-2 border p-3 transition-colors duration-300 ease-in-out\"\n data-cy=\"address-field-block\"\n >\n <DragHandle {...dragHandleProps} />\n <Typography\n className=\"flex-grow leading-4\"\n data-cy=\"address-text-field\"\n data-testid=\"address-text-field\"\n style=\"body2\"\n >\n {label}\n </Typography>\n <div className=\"flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100\">\n <Button\n className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-400 p-1\"\n data-cy=\"address-field-edit-button\"\n data-testid=\"address-field-edit-button\"\n icon={Edit}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.edit\"),\n position: \"top\",\n }}\n onClick={() => onEdit(index)}\n />\n {!hideDeleteOption && (\n <Button\n className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-400 p-1\"\n data-cy=\"address-field-delete-button\"\n data-testid=\"address-field-delete-button\"\n icon={Delete}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.delete\"),\n position: \"top\",\n }}\n onClick={() => handleDeleteClick({ index })}\n />\n )}\n </div>\n </div>\n </div>\n )\n);\n\nexport default BlockOption;\n","import React, { useState } from \"react\";\n\nimport { Button, Modal, Textarea, Typography } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nconst BulkOptionModal = ({\n isOpen,\n onClose,\n handleBulkAdd,\n bulkAddHelpDocUrl,\n}) => {\n const { t } = useTranslation();\n const [optionsString, setOptionsString] = useState(\"\");\n\n const handleSave = () => {\n handleBulkAdd(optionsString);\n handleClose();\n };\n\n const handleClose = () => {\n setOptionsString(\"\");\n onClose();\n };\n\n return (\n <Modal {...{ isOpen }} onClose={handleClose}>\n <Modal.Header>\n <Typography style=\"h3\">\n {t(\"neetoMolecules.optionFields.bulkOption.title\")}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <Textarea\n className=\"my-2\"\n data-cy=\"bulk-add-options-textarea\"\n data-testid=\"bulk-add-options-textarea\"\n label={t(\"neetoMolecules.optionFields.bulkOption.label\")}\n placeholder={t(\"neetoMolecules.optionFields.bulkOption.label\")}\n rows={8}\n value={optionsString}\n helpText={\n <Trans\n i18nKey=\"neetoMolecules.optionFields.bulkOption.helpText\"\n components={{\n Link: (\n <Button\n className=\"text-xs\"\n href={bulkAddHelpDocUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n />\n }\n onChange={e => setOptionsString(e.target.value)}\n />\n </Modal.Body>\n <Modal.Footer className=\"gap-x-2\">\n <Button\n data-cy=\"bulk-add-options-done-button\"\n data-testid=\"bulk-add-options-done-button\"\n label={t(\"neetoMolecules.common.actions.submit\")}\n onClick={handleSave}\n />\n <Button\n data-cy=\"bulk-add-options-cancel-button\"\n data-testid=\"bulk-add-options-cancel-button\"\n label={t(\"neetoMolecules.common.actions.cancel\")}\n style=\"text\"\n onClick={handleClose}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nexport default BulkOptionModal;\n","import i18next from \"i18next\";\n\nexport const DEFAULT_OPTION_LABEL = i18next.t(\n \"neetoMolecules.optionFields.defaultOption\"\n);\n","import { prop, reject } from \"ramda\";\n\nexport const getVisibleOptions = (options = []) =>\n options\n .filter(option => !option.deleted)\n .sort((a, b) => a.position - b.position);\n\nexport const filterDeletedRecords = reject(prop(\"deleted\"));\n\nexport const randomId = () => Math.random().toString(36).substring(2, 13);\n","import { useState } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isNotEmpty } from \"neetocist\";\nimport { pluck, append, assocPath, move, path, remove, isEmpty } from \"ramda\";\n\nimport { DEFAULT_OPTION_LABEL } from \"../constants\";\nimport { filterDeletedRecords, randomId } from \"../utils\";\n\nconst attachPosition = options =>\n options.map((option, index) => ({ ...option, position: index + 1 }));\n\nconst useOptionFields = ({\n options,\n onChange,\n shouldDestroy,\n name = \"\",\n currentRecord,\n itemLabel = DEFAULT_OPTION_LABEL,\n}) => {\n const [shouldFocus, setShouldFocus] = useState(false);\n\n const deletedOptions = options.filter(option => !!option?.deleted);\n\n const { initialValues } = useFormikContext();\n\n const handleChange = (index, value, isOnBlur = false) => {\n const draftAttributes = currentRecord?.draftAttributes;\n\n const getNextOptions = () =>\n assocPath(\n [index, \"label\"],\n isOnBlur\n ? path(name.split(\".\"), initialValues)[index]?.label ||\n path(name.split(\".\"), draftAttributes)[index]?.label\n : value,\n filterDeletedRecords(options)\n );\n if (isOnBlur && !isEmpty(value)) return;\n onChange([...deletedOptions, ...getNextOptions()]);\n };\n\n const generateLabel = (opts, count) => {\n const labelCount = count || opts.length + 1;\n const tempLabel = `${itemLabel} ${labelCount}`;\n const isDuplicateLabel = pluck(\"label\", opts).includes(tempLabel);\n\n return isDuplicateLabel ? generateLabel(opts, labelCount + 1) : tempLabel;\n };\n\n const handleDelete = index => {\n let nextOptions;\n let finalOptions;\n\n if (shouldDestroy) {\n nextOptions = assocPath(\n [index, \"deleted\"],\n true,\n filterDeletedRecords(options)\n );\n finalOptions = attachPosition(filterDeletedRecords(nextOptions));\n } else {\n nextOptions = remove(index, 1, options);\n finalOptions = attachPosition(nextOptions);\n }\n onChange([...deletedOptions, ...finalOptions]);\n };\n\n const handleDragEnd = ({ source, destination }) => {\n // When dragged outside of draggable\n if (destination === null) return;\n\n const filteredOptions = filterDeletedRecords(options);\n const nextOptions = move(source.index, destination.index, filteredOptions);\n const finalOptions = attachPosition(nextOptions);\n onChange([...deletedOptions, ...finalOptions]);\n };\n\n const handleAddOption = () => {\n setShouldFocus(true);\n const position = filterDeletedRecords(options).length;\n const id = randomId();\n const newOption = {\n id: `draft-${id}`,\n altId: `alt-${id}`,\n label: generateLabel(options, null),\n position,\n };\n const nextOptions = append(newOption, options);\n onChange(nextOptions);\n };\n\n const handleBulkAddOption = optionsString => {\n setShouldFocus(true);\n const position = filterDeletedRecords(options).length;\n const newOptions = optionsString\n .trim()\n .split(/\\r?\\n|,/)\n .filter(isNotEmpty)\n .map((option, index) => ({\n id: `draft-${randomId()}`,\n altId: `alt-${randomId()}`,\n label: option.trim(),\n position: position + index,\n }));\n onChange([...options, ...newOptions]);\n };\n\n const handleKeyDown = () => event => {\n if (event.key !== \"Enter\") return;\n const form = event.target.form;\n const inputs = Array.from(form.querySelectorAll(\"input\"));\n const currentInput = inputs.indexOf(event.target);\n\n if (currentInput >= inputs.length - 1) {\n handleAddOption();\n } else {\n inputs[currentInput + 1]?.focus();\n event.preventDefault();\n }\n event.stopPropagation();\n };\n\n return {\n shouldFocus,\n handleAddOption,\n handleBulkAddOption,\n handleChange,\n handleKeyDown,\n handleDelete,\n handleDragEnd,\n };\n};\n\nexport default useOptionFields;\n","import React from \"react\";\n\nimport { ImageUpload, Delete } from \"neetoicons\";\nimport { Button, Input, Textarea } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DragHandle from \"./DragHandle\";\n\nconst InputOption = ({\n shouldFocus,\n hideDeleteOption = false,\n innerRef,\n draggableProps,\n dragHandleProps,\n isPictureChoice,\n onKeyDown,\n onDelete,\n onChange,\n label,\n index,\n disabled,\n isTextArea,\n}) => {\n const { t } = useTranslation();\n\n const Component = isTextArea ? Textarea : Input;\n\n return (\n <div\n ref={innerRef}\n {...draggableProps}\n {...dragHandleProps}\n data-cy=\"form-block-options\"\n >\n <div className=\"nf-input-options group relative mb-2 flex items-center gap-2\">\n <DragHandle {...dragHandleProps} />\n {isPictureChoice && (\n <>\n {index === 0 ? (\n <img\n className=\"neeto-ui-rounded-sm h-8 w-8 cursor-pointer overflow-hidden object-cover\"\n data-testid=\"picture-choice-option\"\n src=\"https://i.pravatar.cc/300\"\n />\n ) : (\n <div className=\"hover:neeto-ui-bg-gray-100 neeto-ui-border-primary-600 neeto-ui-text-primary-800 neeto-ui-rounded-sm flex h-8 w-8 cursor-pointer items-center justify-center border border-dashed transition-all duration-300 ease-in-out\">\n <ImageUpload size={16} />\n </div>\n )}\n </>\n )}\n <Component\n {...{ disabled }}\n autoFocus={shouldFocus}\n data-cy={`option-input-${index}`}\n data-testid={isTextArea ? \"textarea-option\" : \"input-option\"}\n placeholder={t(\"neetoMolecules.optionFields.optionName\")}\n value={label}\n suffix={\n !hideDeleteOption && (\n <Button\n {...{ disabled }}\n className=\"p-0.5\"\n data-cy={`delete-option-button-${index}`}\n data-testid=\"delete-option-button\"\n icon={Delete}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.delete\"),\n position: \"top\",\n }}\n onClick={() => onDelete({ index })}\n />\n )\n }\n onBlur={({ target }) => onChange(index, target.value, true)}\n onChange={({ target }) => onChange(index, target.value)}\n onFocus={({ target }) => target.select()}\n onKeyDown={onKeyDown(index)}\n />\n </div>\n </div>\n );\n};\n\nexport default InputOption;\n","import React, { useState } from \"react\";\n\nimport { DragDropContext, Droppable, Draggable } from \"@hello-pangea/dnd\";\nimport { noop, slugify } from \"neetocist\";\nimport { Plus } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport BlockOption from \"./BlockOption\";\nimport BulkOptionModal from \"./BulkOptionModal\";\nimport useOptionFields from \"./hooks/useOptionFields\";\nimport InputOption from \"./InputOption\";\nimport { getVisibleOptions } from \"./utils\";\n\nconst OptionFields = ({\n options,\n error,\n onChange,\n name,\n onDelete,\n itemLabel,\n onEdit = noop,\n buttonProps = {},\n minOptions = 0,\n draggable = false,\n editable = true,\n isPictureChoice = false,\n isTextArea = false,\n shouldDestroy = false,\n currentRecord = {},\n bulkActionProps = { enabled: false, bulkAddHelpDocUrl: \"\" },\n}) => {\n const { t } = useTranslation();\n const [isBulkOptionModalOpen, setIsBulkOptionModalOpen] = useState(false);\n\n const {\n shouldFocus,\n handleAddOption,\n handleBulkAddOption,\n handleChange,\n handleKeyDown,\n handleDelete,\n handleDragEnd,\n } = useOptionFields({\n options,\n onChange,\n shouldDestroy,\n name,\n currentRecord,\n itemLabel,\n });\n\n // Temporarily disables the modifications to options when changed are getting saved to server\n // This condition only needed for server id generated types\n let isEditable = true;\n if (shouldDestroy) {\n isEditable =\n options.every(prop(\"id\") || error) && !options.some(prop(\"_destroy\"));\n }\n\n const handleDeleteClick = ({ index }) => {\n const deleteFunction = onDelete ?? handleDelete;\n deleteFunction(index);\n };\n const visibleOptions = getVisibleOptions(options);\n const hideDeleteOption = visibleOptions.length <= minOptions;\n\n const getUniqueOptionId = option =>\n option.altId ||\n option.id?.toString() ||\n option.position?.toString() ||\n slugify(option.label);\n\n return (\n <form onSubmit={e => e.preventDefault()}>\n <DragDropContext onDragEnd={handleDragEnd}>\n <Droppable\n droppableId={`neeto-molecules-option-fields-${name}`}\n isDropDisabled={!draggable}\n >\n {({ innerRef, droppableProps, placeholder }) => (\n <div ref={innerRef} {...droppableProps}>\n {visibleOptions.map((option, index) => (\n <Draggable\n {...{ index }}\n draggableId={getUniqueOptionId(option)}\n isDragDisabled={!draggable}\n key={getUniqueOptionId(option)}\n >\n {({ innerRef, draggableProps, dragHandleProps }) =>\n editable ? (\n <InputOption\n {...{\n dragHandleProps,\n draggableProps,\n hideDeleteOption,\n index,\n innerRef,\n isPictureChoice,\n isTextArea,\n name,\n shouldFocus,\n }}\n disabled={!isEditable}\n label={option.label}\n onChange={handleChange}\n onDelete={handleDeleteClick}\n onKeyDown={handleKeyDown}\n />\n ) : (\n <BlockOption\n {...{\n dragHandleProps,\n draggableProps,\n handleDeleteClick,\n hideDeleteOption,\n index,\n innerRef,\n onEdit,\n }}\n label={option.label}\n />\n )\n }\n </Draggable>\n ))}\n {error && (\n <Typography\n className=\"neeto-ui-input__error\"\n data-testid=\"validation-error-container\"\n style=\"body3\"\n >\n {error}\n </Typography>\n )}\n {placeholder}\n </div>\n )}\n </Droppable>\n <div className=\"mt-4 flex items-center justify-between\">\n <Button\n data-cy=\"add-option-link\"\n data-testid=\"add-option-link\"\n disabled={!isEditable}\n icon={Plus}\n iconPosition=\"left\"\n label={t(\"neetoMolecules.optionFields.addOption\")}\n size=\"small\"\n style=\"link\"\n onClick={handleAddOption}\n {...buttonProps}\n />\n {bulkActionProps.enabled && (\n <Button\n data-cy=\"add-bulk-option-link\"\n data-testid=\"add-bulk-option-link\"\n disabled={!isEditable}\n label={t(\"neetoMolecules.optionFields.addBulk\")}\n size=\"small\"\n style=\"text\"\n onClick={() => setIsBulkOptionModalOpen(true)}\n />\n )}\n </div>\n </DragDropContext>\n <BulkOptionModal\n bulkAddHelpDocUrl={bulkActionProps.bulkAddHelpDocUrl}\n handleBulkAdd={handleBulkAddOption}\n isOpen={isBulkOptionModalOpen}\n onClose={() => setIsBulkOptionModalOpen(false)}\n />\n </form>\n );\n};\n\nOptionFields.propTypes = {\n /**\n * Props to be passed to the add option button\n */\n buttonProps: PropTypes.object,\n /**\n * Current record object\n */\n currentRecord: PropTypes.object,\n /**\n * Enable drag and drop functionality\n */\n draggable: PropTypes.bool,\n\n /**\n * Enable edit functionality\n */\n editable: PropTypes.bool,\n\n /**\n * Error message to be displayed\n */\n error: PropTypes.string,\n\n /**\n * The field name in Formik state.\n */\n name: PropTypes.string,\n\n /**\n * Function to handle option deletion\n */\n onDelete: PropTypes.func,\n\n /**\n * Function to handle option edit\n *\n */\n onEdit: PropTypes.func,\n\n /**\n * Minimum number of options required\n */\n minOptions: PropTypes.number,\n\n /**\n * Options array\n */\n options: PropTypes.array,\n\n /**\n * Prop to switch between Input and Textarea\n */\n isTextArea: PropTypes.bool,\n\n /**\n * Function to handle options change\n */\n onChange: PropTypes.func,\n\n /**\n * Prop to switch between PictureChoice and normal options\n * */\n isPictureChoice: PropTypes.bool,\n\n /**\n * Prop to destroy options\n * */\n shouldDestroy: PropTypes.bool,\n\n /**\n * Prop to set the item label\n * */\n\n itemLabel: PropTypes.string,\n\n /**\n * Props for bulk action\n */\n bulkActionProps: PropTypes.shape({\n enabled: PropTypes.bool,\n bulkAddHelpDocUrl: PropTypes.string,\n }),\n};\nexport default OptionFields;\n"],"names":["DragHandle","props","React","createElement","_extends","className","Reorder","size","strokeWidth","BlockOption","withT","_ref","t","innerRef","_ref$hideDeleteOption","hideDeleteOption","draggableProps","dragHandleProps","label","index","onEdit","handleDeleteClick","ref","Typography","style","Button","icon","Edit","tooltipProps","content","position","onClick","Delete","BulkOptionModal","isOpen","onClose","handleBulkAdd","bulkAddHelpDocUrl","_useTranslation","useTranslation","_useState","useState","_useState2","_slicedToArray","optionsString","setOptionsString","handleSave","handleClose","Modal","Header","Body","Textarea","placeholder","rows","value","helpText","Trans","i18nKey","components","Link","href","target","onChange","e","Footer","DEFAULT_OPTION_LABEL","i18next","getVisibleOptions","options","arguments","length","undefined","filter","option","deleted","sort","a","b","filterDeletedRecords","reject","prop","randomId","Math","random","toString","substring","attachPosition","map","_objectSpread","useOptionFields","shouldDestroy","_ref$name","name","currentRecord","_ref$itemLabel","itemLabel","shouldFocus","setShouldFocus","deletedOptions","_useFormikContext","useFormikContext","initialValues","handleChange","isOnBlur","draftAttributes","getNextOptions","_path$index","_path$index2","assocPath","path","split","isEmpty","concat","_toConsumableArray","generateLabel","opts","count","labelCount","tempLabel","isDuplicateLabel","pluck","includes","handleDelete","nextOptions","finalOptions","remove","handleDragEnd","_ref2","source","destination","filteredOptions","move","handleAddOption","id","newOption","altId","append","handleBulkAddOption","newOptions","trim","isNotEmpty","handleKeyDown","event","key","form","inputs","Array","from","querySelectorAll","currentInput","indexOf","_inputs","focus","preventDefault","stopPropagation","InputOption","isPictureChoice","onKeyDown","onDelete","disabled","isTextArea","Component","Input","Fragment","src","ImageUpload","autoFocus","suffix","onBlur","_ref3","onFocus","_ref4","select","OptionFields","error","_ref$onEdit","noop","_ref$buttonProps","buttonProps","_ref$minOptions","minOptions","_ref$draggable","draggable","_ref$editable","editable","_ref$isPictureChoice","_ref$isTextArea","_ref$shouldDestroy","_ref$currentRecord","_ref$bulkActionProps","bulkActionProps","enabled","isBulkOptionModalOpen","setIsBulkOptionModalOpen","_useOptionFields","isEditable","every","some","deleteFunction","visibleOptions","getUniqueOptionId","_option$id","_option$position","slugify","onSubmit","DragDropContext","onDragEnd","Droppable","droppableId","isDropDisabled","droppableProps","Draggable","draggableId","isDragDisabled","Plus","iconPosition"],"mappings":";;;;;;;;;;;;;;;AAIA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAGC,KAAK,EAAA;AAAA,EAAA,oBACtBC,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAAC,QAAA,CAAA;AACEC,IAAAA,SAAS,EAAC,mKAAmK;AAC7K,IAAA,SAAA,EAAQ,aAAa;IACrB,aAAY,EAAA,aAAA;AAAa,GAAA,EACrBJ,KAAK,CAETC,eAAAA,cAAA,CAAAC,aAAA,CAACG,OAAO,EAAA;AAACC,IAAAA,IAAI,EAAE,EAAG;AAACC,IAAAA,WAAW,EAAE,CAAA;AAAE,GAAE,CACjC,CAAC,CAAA;AAAA,CACP;;AC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,GAAA;MAAA,OAAM8J,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAAA,KAAA;AAAC,GAChD,CACG,CAAC,CAAA;AAEX;;;;"}
|
package/dist/Sidebar.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Typography, Button } from '@bigbinary/neetoui';
|
|
|
9
9
|
import { not, is, findLast } from 'ramda';
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
11
|
import { Link, useLocation, useHistory } from 'react-router-dom';
|
|
12
|
-
import { f as filterByPermissions, a as CheckPointNavLinks, I as Items, b as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, S as SelectedLink, C as Chevron } from './Chevron-
|
|
12
|
+
import { f as filterByPermissions, a as CheckPointNavLinks, I as Items, b as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, S as SelectedLink, C as Chevron } from './Chevron-74f7053c.js';
|
|
13
13
|
import useFetchNeetoApps from '@bigbinary/neeto-commons-frontend/react-utils/useFetchNeetoApps';
|
|
14
14
|
import * as ProductTypefaceLogos from '@bigbinary/neeto-icons/typeface-logos';
|
|
15
15
|
import { Neeto } from '@bigbinary/neeto-icons/typeface-logos';
|
|
@@ -158,7 +158,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
158
158
|
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
|
|
159
159
|
"data-cy": "configure-nav-container"
|
|
160
160
|
}, /*#__PURE__*/React__default["default"].createElement("div", _extends._extends({
|
|
161
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-bg-
|
|
161
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-text-primary-500 neeto-ui-border-b hover:neeto-ui-text-primary-500 mb-2",
|
|
162
162
|
onClick: handleGoBack
|
|
163
163
|
}, _objectSpread({}, ramda.omit(["icon"], otherProps))), isConfigureNavLink && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
164
164
|
className: "neeto-molecules-sidebar__link-icon",
|
|
@@ -166,7 +166,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
166
166
|
"data-testid": "".concat(label, "-go-back-button")
|
|
167
167
|
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Left, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
168
168
|
component: "span",
|
|
169
|
-
style: "
|
|
169
|
+
style: "body1",
|
|
170
170
|
weight: "normal",
|
|
171
171
|
className: classnames__default["default"]("neeto-molecules-sidebar__link-label", defineProperty._defineProperty({
|
|
172
172
|
"neeto-molecules-sidebar__configure-page-header": isConfigureNavLink
|
|
@@ -177,7 +177,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
177
177
|
}));
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:240px;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:20px}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:70px}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:3px auto 11px;width:90%}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 136px)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 80px)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__link span{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-primary-100));color:rgb(var(--neeto-ui-primary-800))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding:4px 0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;margin-bottom:2px;padding:8px 24px 8px 58px;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-primary-800));text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:4px 24px 4px 58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0 0 10px!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0 8px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:var(--neeto-ui-rounded)}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body2:16px;cursor:pointer;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:15px;color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:5px}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{--neeto-ui-text-body2:13px;padding-left:40px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;padding:4px 15px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}";
|
|
180
|
+
var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:240px}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;left:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{left:0;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:240px;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:20px}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:8px;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-240px;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:70px}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:3px auto 11px;width:90%}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{position:absolute;right:8px;top:8px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:202px;left:calc(var(--neeto-molecules-sidebar-width) - 38px);right:auto;transition:none}}.neeto-molecules-sidebar__configure-page{border-right:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 136px)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 80px)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__link span{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)!important}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:16px;flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-primary-100));color:rgb(var(--neeto-ui-primary-800))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding:4px 0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));cursor:pointer;gap:8px;margin-bottom:2px;padding:8px 24px 8px 58px;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-black));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-black));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-primary-800));text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 16px);margin-bottom:8px;min-width:calc(100vw - 176px);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 185px)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;left:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-left:58px}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:4px 24px 4px 58px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-top:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-top:24px}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{height:calc(100vh - 160px);margin-bottom:0;overflow:auto}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper{margin:0 0 10px!important;padding:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0 8px!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:var(--neeto-ui-rounded)}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{cursor:pointer;gap:4px;padding:12px 4px;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:15px}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-bottom:5px}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:var(--neeto-ui-rounded);font-weight:var(--neeto-ui-font-normal)}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;padding:4px 15px!important;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-primary-100))!important}";
|
|
181
181
|
injectCss.n(css,{});
|
|
182
182
|
|
|
183
183
|
var Chevron = function Chevron(_ref) {
|
|
@@ -200,4 +200,4 @@ exports.SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = SELECTED_NAV_LINK_ROUTE_STORAGE_KE
|
|
|
200
200
|
exports.SelectedLink = SelectedLink;
|
|
201
201
|
exports.filterByPermissions = filterByPermissions;
|
|
202
202
|
exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
|
|
203
|
-
//# sourceMappingURL=Chevron-
|
|
203
|
+
//# sourceMappingURL=Chevron-7b1b9258.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chevron-7b1b9258.js","sources":["../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/constants.js","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx","../../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others} key={to}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n","import { isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={() => !isSectionHeader && isSubRouteActive(to, location)}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import React from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <React.Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <>\n <Items {...{ isSettingsItems }} items={subItem.items} />\n <hr className=\"neeto-molecules-sidebar__separator\" />\n </>\n )}\n </React.Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { omit } from \"ramda\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-bg-white neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-text-primary-500 neeto-ui-border-b hover:neeto-ui-text-primary-500 mb-2\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-back-button`}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body1\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","key","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","activeClassName","className","isActive","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","_objectSpread","isPresent","item","path","SelectedLink","_ref$navLink","navLink","isConfigureNavLink","handleGoBack","isConfigureSidebar","otherProps","onClick","omit","hyphenize","Left","weight","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AAAKC,IAAAA,MAAM,GAAAC,gDAAA,CAAAL,IAAA,EAAAM,WAAA,CAAA,CAAA;AAClE,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACP,aAAa,CAAC;IADhBQ,UAAU,GAAAF,qBAAA,CAA1BN,aAAa,CAAA,CAAA;AAGtB,EAAA,oBACES,yBAAA,CAAAC,aAAA,CAACC,sBAAO,EAAAC,iBAAA,CAAA;IAACX,EAAE,EAAEO,UAAU,IAAIP,EAAAA;AAAG,GAAA,EAAKE,MAAM,EAAA;AAAEU,IAAAA,GAAG,EAAEZ,EAAAA;AAAG,GAAA,CAAA,EAChDC,QACM,CAAC,CAAA;AAEd;;ACdO,IAAMY,cAAc,GAAG;AAC5BC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE,UAAA;AACZ,CAAC,CAAA;AAEM,IAAMC,mCAAmC,GAAG;;ACF5C,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,QAAQ,EAAEC,QAAQ,EAAK;EACtD,IAAMC,iBAAiB,GAAG,IAAIC,GAAG,CAC/BF,QAAQ,CAACG,QAAQ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,EAAA;AAAWkE,IAAAA,KAAK,EAALA,KAAK;AAAI8B,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAA;GACxDnG,eAAAA,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACEmG,IAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,IAAAA,IAAI,EAAC,cAAA;AAAc,GACpB,CACE,CAAC,CAAA;AAAA;;;;;;;;;;"}
|
|
@@ -7,7 +7,7 @@ var neetoui = require('@bigbinary/neetoui');
|
|
|
7
7
|
var ramda = require('ramda');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
9
|
var reactRouterDom = require('react-router-dom');
|
|
10
|
-
var Chevron = require('./Chevron-
|
|
10
|
+
var Chevron = require('./Chevron-7b1b9258.js');
|
|
11
11
|
require('./extends-1b35a664.js');
|
|
12
12
|
require('./defineProperty-886ed289.js');
|
|
13
13
|
require('./objectWithoutProperties-2fed2d7d.js');
|
package/dist/cjs/OptionFields.js
CHANGED
|
@@ -317,13 +317,14 @@ var InputOption = function InputOption(_ref) {
|
|
|
317
317
|
}))), /*#__PURE__*/React__default["default"].createElement(Component, {
|
|
318
318
|
disabled: disabled,
|
|
319
319
|
autoFocus: shouldFocus,
|
|
320
|
-
"data-cy": "option-input",
|
|
320
|
+
"data-cy": "option-input-".concat(index),
|
|
321
321
|
"data-testid": isTextArea ? "textarea-option" : "input-option",
|
|
322
322
|
placeholder: t("neetoMolecules.optionFields.optionName"),
|
|
323
323
|
value: label,
|
|
324
324
|
suffix: !hideDeleteOption && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
325
325
|
disabled: disabled,
|
|
326
326
|
className: "p-0.5",
|
|
327
|
+
"data-cy": "delete-option-button-".concat(index),
|
|
327
328
|
"data-testid": "delete-option-button",
|
|
328
329
|
icon: neetoIcons.Delete,
|
|
329
330
|
size: "small",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionFields.js","sources":["../../src/components/OptionFields/DragHandle.jsx","../../src/components/OptionFields/BlockOption.jsx","../../src/components/OptionFields/BulkOptionModal.jsx","../../src/components/OptionFields/constants.js","../../src/components/OptionFields/utils.js","../../src/components/OptionFields/hooks/useOptionFields.js","../../src/components/OptionFields/InputOption.jsx","../../src/components/OptionFields/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Reorder } from \"neetoicons\";\n\nconst DragHandle = props => (\n <div\n className=\"neeto-ui-text-gray-400 absolute bottom-0 left-0 top-0 my-auto -ml-6 h-6 cursor-grab opacity-0 transition-opacity duration-300 ease-in-out group-hover:opacity-100\"\n data-cy=\"drag-handle\"\n data-testid=\"drag-handle\"\n {...props}\n >\n <Reorder size={24} strokeWidth={2} />\n </div>\n);\n\nexport default DragHandle;\n","import React from \"react\";\n\nimport { withT } from \"neetocommons/react-utils\";\nimport { Delete, Edit } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\n\nimport DragHandle from \"./DragHandle\";\n\nconst BlockOption = withT(\n ({\n t,\n innerRef,\n hideDeleteOption = false,\n draggableProps,\n dragHandleProps,\n label,\n index,\n onEdit,\n handleDeleteClick,\n }) => (\n <div ref={innerRef} {...draggableProps} {...dragHandleProps}>\n <div\n className=\"neeto-ui-border-gray-400 hover:neeto-ui-bg-gray-200 neeto-ui-rounded-sm shadow-xs group relative mb-2 flex h-10 cursor-pointer items-center gap-2 border p-3 transition-colors duration-300 ease-in-out\"\n data-cy=\"address-field-block\"\n >\n <DragHandle {...dragHandleProps} />\n <Typography\n className=\"flex-grow leading-4\"\n data-cy=\"address-text-field\"\n data-testid=\"address-text-field\"\n style=\"body2\"\n >\n {label}\n </Typography>\n <div className=\"flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100\">\n <Button\n className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-400 p-1\"\n data-cy=\"address-field-edit-button\"\n data-testid=\"address-field-edit-button\"\n icon={Edit}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.edit\"),\n position: \"top\",\n }}\n onClick={() => onEdit(index)}\n />\n {!hideDeleteOption && (\n <Button\n className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-400 p-1\"\n data-cy=\"address-field-delete-button\"\n data-testid=\"address-field-delete-button\"\n icon={Delete}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.delete\"),\n position: \"top\",\n }}\n onClick={() => handleDeleteClick({ index })}\n />\n )}\n </div>\n </div>\n </div>\n )\n);\n\nexport default BlockOption;\n","import React, { useState } from \"react\";\n\nimport { Button, Modal, Textarea, Typography } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nconst BulkOptionModal = ({\n isOpen,\n onClose,\n handleBulkAdd,\n bulkAddHelpDocUrl,\n}) => {\n const { t } = useTranslation();\n const [optionsString, setOptionsString] = useState(\"\");\n\n const handleSave = () => {\n handleBulkAdd(optionsString);\n handleClose();\n };\n\n const handleClose = () => {\n setOptionsString(\"\");\n onClose();\n };\n\n return (\n <Modal {...{ isOpen }} onClose={handleClose}>\n <Modal.Header>\n <Typography style=\"h3\">\n {t(\"neetoMolecules.optionFields.bulkOption.title\")}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <Textarea\n className=\"my-2\"\n data-cy=\"bulk-add-options-textarea\"\n data-testid=\"bulk-add-options-textarea\"\n label={t(\"neetoMolecules.optionFields.bulkOption.label\")}\n placeholder={t(\"neetoMolecules.optionFields.bulkOption.label\")}\n rows={8}\n value={optionsString}\n helpText={\n <Trans\n i18nKey=\"neetoMolecules.optionFields.bulkOption.helpText\"\n components={{\n Link: (\n <Button\n className=\"text-xs\"\n href={bulkAddHelpDocUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n />\n }\n onChange={e => setOptionsString(e.target.value)}\n />\n </Modal.Body>\n <Modal.Footer className=\"gap-x-2\">\n <Button\n data-cy=\"bulk-add-options-done-button\"\n data-testid=\"bulk-add-options-done-button\"\n label={t(\"neetoMolecules.common.actions.submit\")}\n onClick={handleSave}\n />\n <Button\n data-cy=\"bulk-add-options-cancel-button\"\n data-testid=\"bulk-add-options-cancel-button\"\n label={t(\"neetoMolecules.common.actions.cancel\")}\n style=\"text\"\n onClick={handleClose}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nexport default BulkOptionModal;\n","import i18next from \"i18next\";\n\nexport const DEFAULT_OPTION_LABEL = i18next.t(\n \"neetoMolecules.optionFields.defaultOption\"\n);\n","import { prop, reject } from \"ramda\";\n\nexport const getVisibleOptions = (options = []) =>\n options\n .filter(option => !option.deleted)\n .sort((a, b) => a.position - b.position);\n\nexport const filterDeletedRecords = reject(prop(\"deleted\"));\n\nexport const randomId = () => Math.random().toString(36).substring(2, 13);\n","import { useState } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isNotEmpty } from \"neetocist\";\nimport { pluck, append, assocPath, move, path, remove, isEmpty } from \"ramda\";\n\nimport { DEFAULT_OPTION_LABEL } from \"../constants\";\nimport { filterDeletedRecords, randomId } from \"../utils\";\n\nconst attachPosition = options =>\n options.map((option, index) => ({ ...option, position: index + 1 }));\n\nconst useOptionFields = ({\n options,\n onChange,\n shouldDestroy,\n name = \"\",\n currentRecord,\n itemLabel = DEFAULT_OPTION_LABEL,\n}) => {\n const [shouldFocus, setShouldFocus] = useState(false);\n\n const deletedOptions = options.filter(option => !!option?.deleted);\n\n const { initialValues } = useFormikContext();\n\n const handleChange = (index, value, isOnBlur = false) => {\n const draftAttributes = currentRecord?.draftAttributes;\n\n const getNextOptions = () =>\n assocPath(\n [index, \"label\"],\n isOnBlur\n ? path(name.split(\".\"), initialValues)[index]?.label ||\n path(name.split(\".\"), draftAttributes)[index]?.label\n : value,\n filterDeletedRecords(options)\n );\n if (isOnBlur && !isEmpty(value)) return;\n onChange([...deletedOptions, ...getNextOptions()]);\n };\n\n const generateLabel = (opts, count) => {\n const labelCount = count || opts.length + 1;\n const tempLabel = `${itemLabel} ${labelCount}`;\n const isDuplicateLabel = pluck(\"label\", opts).includes(tempLabel);\n\n return isDuplicateLabel ? generateLabel(opts, labelCount + 1) : tempLabel;\n };\n\n const handleDelete = index => {\n let nextOptions;\n let finalOptions;\n\n if (shouldDestroy) {\n nextOptions = assocPath(\n [index, \"deleted\"],\n true,\n filterDeletedRecords(options)\n );\n finalOptions = attachPosition(filterDeletedRecords(nextOptions));\n } else {\n nextOptions = remove(index, 1, options);\n finalOptions = attachPosition(nextOptions);\n }\n onChange([...deletedOptions, ...finalOptions]);\n };\n\n const handleDragEnd = ({ source, destination }) => {\n // When dragged outside of draggable\n if (destination === null) return;\n\n const filteredOptions = filterDeletedRecords(options);\n const nextOptions = move(source.index, destination.index, filteredOptions);\n const finalOptions = attachPosition(nextOptions);\n onChange([...deletedOptions, ...finalOptions]);\n };\n\n const handleAddOption = () => {\n setShouldFocus(true);\n const position = filterDeletedRecords(options).length;\n const id = randomId();\n const newOption = {\n id: `draft-${id}`,\n altId: `alt-${id}`,\n label: generateLabel(options, null),\n position,\n };\n const nextOptions = append(newOption, options);\n onChange(nextOptions);\n };\n\n const handleBulkAddOption = optionsString => {\n setShouldFocus(true);\n const position = filterDeletedRecords(options).length;\n const newOptions = optionsString\n .trim()\n .split(/\\r?\\n|,/)\n .filter(isNotEmpty)\n .map((option, index) => ({\n id: `draft-${randomId()}`,\n altId: `alt-${randomId()}`,\n label: option.trim(),\n position: position + index,\n }));\n onChange([...options, ...newOptions]);\n };\n\n const handleKeyDown = () => event => {\n if (event.key !== \"Enter\") return;\n const form = event.target.form;\n const inputs = Array.from(form.querySelectorAll(\"input\"));\n const currentInput = inputs.indexOf(event.target);\n\n if (currentInput >= inputs.length - 1) {\n handleAddOption();\n } else {\n inputs[currentInput + 1]?.focus();\n event.preventDefault();\n }\n event.stopPropagation();\n };\n\n return {\n shouldFocus,\n handleAddOption,\n handleBulkAddOption,\n handleChange,\n handleKeyDown,\n handleDelete,\n handleDragEnd,\n };\n};\n\nexport default useOptionFields;\n","import React from \"react\";\n\nimport { ImageUpload, Delete } from \"neetoicons\";\nimport { Button, Input, Textarea } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DragHandle from \"./DragHandle\";\n\nconst InputOption = ({\n shouldFocus,\n hideDeleteOption = false,\n innerRef,\n draggableProps,\n dragHandleProps,\n isPictureChoice,\n onKeyDown,\n onDelete,\n onChange,\n label,\n index,\n disabled,\n isTextArea,\n}) => {\n const { t } = useTranslation();\n\n const Component = isTextArea ? Textarea : Input;\n\n return (\n <div\n ref={innerRef}\n {...draggableProps}\n {...dragHandleProps}\n data-cy=\"form-block-options\"\n >\n <div className=\"nf-input-options group relative mb-2 flex items-center gap-2\">\n <DragHandle {...dragHandleProps} />\n {isPictureChoice && (\n <>\n {index === 0 ? (\n <img\n className=\"neeto-ui-rounded-sm h-8 w-8 cursor-pointer overflow-hidden object-cover\"\n data-testid=\"picture-choice-option\"\n src=\"https://i.pravatar.cc/300\"\n />\n ) : (\n <div className=\"hover:neeto-ui-bg-gray-100 neeto-ui-border-primary-600 neeto-ui-text-primary-800 neeto-ui-rounded-sm flex h-8 w-8 cursor-pointer items-center justify-center border border-dashed transition-all duration-300 ease-in-out\">\n <ImageUpload size={16} />\n </div>\n )}\n </>\n )}\n <Component\n {...{ disabled }}\n autoFocus={shouldFocus}\n data-cy=\"option-input\"\n data-testid={isTextArea ? \"textarea-option\" : \"input-option\"}\n placeholder={t(\"neetoMolecules.optionFields.optionName\")}\n value={label}\n suffix={\n !hideDeleteOption && (\n <Button\n {...{ disabled }}\n className=\"p-0.5\"\n data-testid=\"delete-option-button\"\n icon={Delete}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.delete\"),\n position: \"top\",\n }}\n onClick={() => onDelete({ index })}\n />\n )\n }\n onBlur={({ target }) => onChange(index, target.value, true)}\n onChange={({ target }) => onChange(index, target.value)}\n onFocus={({ target }) => target.select()}\n onKeyDown={onKeyDown(index)}\n />\n </div>\n </div>\n );\n};\n\nexport default InputOption;\n","import React, { useState } from \"react\";\n\nimport { DragDropContext, Droppable, Draggable } from \"@hello-pangea/dnd\";\nimport { noop, slugify } from \"neetocist\";\nimport { Plus } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport BlockOption from \"./BlockOption\";\nimport BulkOptionModal from \"./BulkOptionModal\";\nimport useOptionFields from \"./hooks/useOptionFields\";\nimport InputOption from \"./InputOption\";\nimport { getVisibleOptions } from \"./utils\";\n\nconst OptionFields = ({\n options,\n error,\n onChange,\n name,\n onDelete,\n itemLabel,\n onEdit = noop,\n buttonProps = {},\n minOptions = 0,\n draggable = false,\n editable = true,\n isPictureChoice = false,\n isTextArea = false,\n shouldDestroy = false,\n currentRecord = {},\n bulkActionProps = { enabled: false, bulkAddHelpDocUrl: \"\" },\n}) => {\n const { t } = useTranslation();\n const [isBulkOptionModalOpen, setIsBulkOptionModalOpen] = useState(false);\n\n const {\n shouldFocus,\n handleAddOption,\n handleBulkAddOption,\n handleChange,\n handleKeyDown,\n handleDelete,\n handleDragEnd,\n } = useOptionFields({\n options,\n onChange,\n shouldDestroy,\n name,\n currentRecord,\n itemLabel,\n });\n\n // Temporarily disables the modifications to options when changed are getting saved to server\n // This condition only needed for server id generated types\n let isEditable = true;\n if (shouldDestroy) {\n isEditable =\n options.every(prop(\"id\") || error) && !options.some(prop(\"_destroy\"));\n }\n\n const handleDeleteClick = ({ index }) => {\n const deleteFunction = onDelete ?? handleDelete;\n deleteFunction(index);\n };\n const visibleOptions = getVisibleOptions(options);\n const hideDeleteOption = visibleOptions.length <= minOptions;\n\n const getUniqueOptionId = option =>\n option.altId ||\n option.id?.toString() ||\n option.position?.toString() ||\n slugify(option.label);\n\n return (\n <form onSubmit={e => e.preventDefault()}>\n <DragDropContext onDragEnd={handleDragEnd}>\n <Droppable\n droppableId={`neeto-molecules-option-fields-${name}`}\n isDropDisabled={!draggable}\n >\n {({ innerRef, droppableProps, placeholder }) => (\n <div ref={innerRef} {...droppableProps}>\n {visibleOptions.map((option, index) => (\n <Draggable\n {...{ index }}\n draggableId={getUniqueOptionId(option)}\n isDragDisabled={!draggable}\n key={getUniqueOptionId(option)}\n >\n {({ innerRef, draggableProps, dragHandleProps }) =>\n editable ? (\n <InputOption\n {...{\n dragHandleProps,\n draggableProps,\n hideDeleteOption,\n index,\n innerRef,\n isPictureChoice,\n isTextArea,\n name,\n shouldFocus,\n }}\n disabled={!isEditable}\n label={option.label}\n onChange={handleChange}\n onDelete={handleDeleteClick}\n onKeyDown={handleKeyDown}\n />\n ) : (\n <BlockOption\n {...{\n dragHandleProps,\n draggableProps,\n handleDeleteClick,\n hideDeleteOption,\n index,\n innerRef,\n onEdit,\n }}\n label={option.label}\n />\n )\n }\n </Draggable>\n ))}\n {error && (\n <Typography\n className=\"neeto-ui-input__error\"\n data-testid=\"validation-error-container\"\n style=\"body3\"\n >\n {error}\n </Typography>\n )}\n {placeholder}\n </div>\n )}\n </Droppable>\n <div className=\"mt-4 flex items-center justify-between\">\n <Button\n data-cy=\"add-option-link\"\n data-testid=\"add-option-link\"\n disabled={!isEditable}\n icon={Plus}\n iconPosition=\"left\"\n label={t(\"neetoMolecules.optionFields.addOption\")}\n size=\"small\"\n style=\"link\"\n onClick={handleAddOption}\n {...buttonProps}\n />\n {bulkActionProps.enabled && (\n <Button\n data-cy=\"add-bulk-option-link\"\n data-testid=\"add-bulk-option-link\"\n disabled={!isEditable}\n label={t(\"neetoMolecules.optionFields.addBulk\")}\n size=\"small\"\n style=\"text\"\n onClick={() => setIsBulkOptionModalOpen(true)}\n />\n )}\n </div>\n </DragDropContext>\n <BulkOptionModal\n bulkAddHelpDocUrl={bulkActionProps.bulkAddHelpDocUrl}\n handleBulkAdd={handleBulkAddOption}\n isOpen={isBulkOptionModalOpen}\n onClose={() => setIsBulkOptionModalOpen(false)}\n />\n </form>\n );\n};\n\nOptionFields.propTypes = {\n /**\n * Props to be passed to the add option button\n */\n buttonProps: PropTypes.object,\n /**\n * Current record object\n */\n currentRecord: PropTypes.object,\n /**\n * Enable drag and drop functionality\n */\n draggable: PropTypes.bool,\n\n /**\n * Enable edit functionality\n */\n editable: PropTypes.bool,\n\n /**\n * Error message to be displayed\n */\n error: PropTypes.string,\n\n /**\n * The field name in Formik state.\n */\n name: PropTypes.string,\n\n /**\n * Function to handle option deletion\n */\n onDelete: PropTypes.func,\n\n /**\n * Function to handle option edit\n *\n */\n onEdit: PropTypes.func,\n\n /**\n * Minimum number of options required\n */\n minOptions: PropTypes.number,\n\n /**\n * Options array\n */\n options: PropTypes.array,\n\n /**\n * Prop to switch between Input and Textarea\n */\n isTextArea: PropTypes.bool,\n\n /**\n * Function to handle options change\n */\n onChange: PropTypes.func,\n\n /**\n * Prop to switch between PictureChoice and normal options\n * */\n isPictureChoice: PropTypes.bool,\n\n /**\n * Prop to destroy options\n * */\n shouldDestroy: PropTypes.bool,\n\n /**\n * Prop to set the item label\n * */\n\n itemLabel: PropTypes.string,\n\n /**\n * Props for bulk action\n */\n bulkActionProps: PropTypes.shape({\n enabled: PropTypes.bool,\n bulkAddHelpDocUrl: PropTypes.string,\n }),\n};\nexport default OptionFields;\n"],"names":["DragHandle","props","React","createElement","_extends","className","Reorder","size","strokeWidth","BlockOption","withT","_ref","t","innerRef","_ref$hideDeleteOption","hideDeleteOption","draggableProps","dragHandleProps","label","index","onEdit","handleDeleteClick","ref","Typography","style","Button","icon","Edit","tooltipProps","content","position","onClick","Delete","BulkOptionModal","isOpen","onClose","handleBulkAdd","bulkAddHelpDocUrl","_useTranslation","useTranslation","_useState","useState","_useState2","_slicedToArray","optionsString","setOptionsString","handleSave","handleClose","Modal","Header","Body","Textarea","placeholder","rows","value","helpText","Trans","i18nKey","components","Link","href","target","onChange","e","Footer","DEFAULT_OPTION_LABEL","i18next","getVisibleOptions","options","arguments","length","undefined","filter","option","deleted","sort","a","b","filterDeletedRecords","reject","prop","randomId","Math","random","toString","substring","attachPosition","map","_objectSpread","useOptionFields","shouldDestroy","_ref$name","name","currentRecord","_ref$itemLabel","itemLabel","shouldFocus","setShouldFocus","deletedOptions","_useFormikContext","useFormikContext","initialValues","handleChange","isOnBlur","draftAttributes","getNextOptions","_path$index","_path$index2","assocPath","path","split","isEmpty","concat","_toConsumableArray","generateLabel","opts","count","labelCount","tempLabel","isDuplicateLabel","pluck","includes","handleDelete","nextOptions","finalOptions","remove","handleDragEnd","_ref2","source","destination","filteredOptions","move","handleAddOption","id","newOption","altId","append","handleBulkAddOption","newOptions","trim","isNotEmpty","handleKeyDown","event","key","form","inputs","Array","from","querySelectorAll","currentInput","indexOf","_inputs","focus","preventDefault","stopPropagation","InputOption","isPictureChoice","onKeyDown","onDelete","disabled","isTextArea","Component","Input","Fragment","src","ImageUpload","autoFocus","suffix","onBlur","_ref3","onFocus","_ref4","select","OptionFields","error","_ref$onEdit","noop","_ref$buttonProps","buttonProps","_ref$minOptions","minOptions","_ref$draggable","draggable","_ref$editable","editable","_ref$isPictureChoice","_ref$isTextArea","_ref$shouldDestroy","_ref$currentRecord","_ref$bulkActionProps","bulkActionProps","enabled","isBulkOptionModalOpen","setIsBulkOptionModalOpen","_useOptionFields","isEditable","every","some","deleteFunction","visibleOptions","getUniqueOptionId","_option$id","_option$position","slugify","onSubmit","DragDropContext","onDragEnd","Droppable","droppableId","isDropDisabled","droppableProps","Draggable","draggableId","isDragDisabled","Plus","iconPosition"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAGC,KAAK,EAAA;AAAA,EAAA,oBACtBC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAAC,iBAAA,CAAA;AACEC,IAAAA,SAAS,EAAC,mKAAmK;AAC7K,IAAA,SAAA,EAAQ,aAAa;IACrB,aAAY,EAAA,aAAA;AAAa,GAAA,EACrBJ,KAAK,CAETC,eAAAA,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AACzJ,iBAAkB;AACrDD,IAAAA,aAAa,EAAEqG,mBAAoB;AACnCvG,IAAAA,MAAM,EAAE8J,qBAAsB;IAC9B7J,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAM8J,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAAA,KAAA;AAAC,GAChD,CACG,CAAC,CAAA;AAEX;;;;"}
|
|
1
|
+
{"version":3,"file":"OptionFields.js","sources":["../../src/components/OptionFields/DragHandle.jsx","../../src/components/OptionFields/BlockOption.jsx","../../src/components/OptionFields/BulkOptionModal.jsx","../../src/components/OptionFields/constants.js","../../src/components/OptionFields/utils.js","../../src/components/OptionFields/hooks/useOptionFields.js","../../src/components/OptionFields/InputOption.jsx","../../src/components/OptionFields/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Reorder } from \"neetoicons\";\n\nconst DragHandle = props => (\n <div\n className=\"neeto-ui-text-gray-400 absolute bottom-0 left-0 top-0 my-auto -ml-6 h-6 cursor-grab opacity-0 transition-opacity duration-300 ease-in-out group-hover:opacity-100\"\n data-cy=\"drag-handle\"\n data-testid=\"drag-handle\"\n {...props}\n >\n <Reorder size={24} strokeWidth={2} />\n </div>\n);\n\nexport default DragHandle;\n","import React from \"react\";\n\nimport { withT } from \"neetocommons/react-utils\";\nimport { Delete, Edit } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\n\nimport DragHandle from \"./DragHandle\";\n\nconst BlockOption = withT(\n ({\n t,\n innerRef,\n hideDeleteOption = false,\n draggableProps,\n dragHandleProps,\n label,\n index,\n onEdit,\n handleDeleteClick,\n }) => (\n <div ref={innerRef} {...draggableProps} {...dragHandleProps}>\n <div\n className=\"neeto-ui-border-gray-400 hover:neeto-ui-bg-gray-200 neeto-ui-rounded-sm shadow-xs group relative mb-2 flex h-10 cursor-pointer items-center gap-2 border p-3 transition-colors duration-300 ease-in-out\"\n data-cy=\"address-field-block\"\n >\n <DragHandle {...dragHandleProps} />\n <Typography\n className=\"flex-grow leading-4\"\n data-cy=\"address-text-field\"\n data-testid=\"address-text-field\"\n style=\"body2\"\n >\n {label}\n </Typography>\n <div className=\"flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100\">\n <Button\n className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-400 p-1\"\n data-cy=\"address-field-edit-button\"\n data-testid=\"address-field-edit-button\"\n icon={Edit}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.edit\"),\n position: \"top\",\n }}\n onClick={() => onEdit(index)}\n />\n {!hideDeleteOption && (\n <Button\n className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-400 p-1\"\n data-cy=\"address-field-delete-button\"\n data-testid=\"address-field-delete-button\"\n icon={Delete}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.delete\"),\n position: \"top\",\n }}\n onClick={() => handleDeleteClick({ index })}\n />\n )}\n </div>\n </div>\n </div>\n )\n);\n\nexport default BlockOption;\n","import React, { useState } from \"react\";\n\nimport { Button, Modal, Textarea, Typography } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nconst BulkOptionModal = ({\n isOpen,\n onClose,\n handleBulkAdd,\n bulkAddHelpDocUrl,\n}) => {\n const { t } = useTranslation();\n const [optionsString, setOptionsString] = useState(\"\");\n\n const handleSave = () => {\n handleBulkAdd(optionsString);\n handleClose();\n };\n\n const handleClose = () => {\n setOptionsString(\"\");\n onClose();\n };\n\n return (\n <Modal {...{ isOpen }} onClose={handleClose}>\n <Modal.Header>\n <Typography style=\"h3\">\n {t(\"neetoMolecules.optionFields.bulkOption.title\")}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <Textarea\n className=\"my-2\"\n data-cy=\"bulk-add-options-textarea\"\n data-testid=\"bulk-add-options-textarea\"\n label={t(\"neetoMolecules.optionFields.bulkOption.label\")}\n placeholder={t(\"neetoMolecules.optionFields.bulkOption.label\")}\n rows={8}\n value={optionsString}\n helpText={\n <Trans\n i18nKey=\"neetoMolecules.optionFields.bulkOption.helpText\"\n components={{\n Link: (\n <Button\n className=\"text-xs\"\n href={bulkAddHelpDocUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n />\n }\n onChange={e => setOptionsString(e.target.value)}\n />\n </Modal.Body>\n <Modal.Footer className=\"gap-x-2\">\n <Button\n data-cy=\"bulk-add-options-done-button\"\n data-testid=\"bulk-add-options-done-button\"\n label={t(\"neetoMolecules.common.actions.submit\")}\n onClick={handleSave}\n />\n <Button\n data-cy=\"bulk-add-options-cancel-button\"\n data-testid=\"bulk-add-options-cancel-button\"\n label={t(\"neetoMolecules.common.actions.cancel\")}\n style=\"text\"\n onClick={handleClose}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nexport default BulkOptionModal;\n","import i18next from \"i18next\";\n\nexport const DEFAULT_OPTION_LABEL = i18next.t(\n \"neetoMolecules.optionFields.defaultOption\"\n);\n","import { prop, reject } from \"ramda\";\n\nexport const getVisibleOptions = (options = []) =>\n options\n .filter(option => !option.deleted)\n .sort((a, b) => a.position - b.position);\n\nexport const filterDeletedRecords = reject(prop(\"deleted\"));\n\nexport const randomId = () => Math.random().toString(36).substring(2, 13);\n","import { useState } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isNotEmpty } from \"neetocist\";\nimport { pluck, append, assocPath, move, path, remove, isEmpty } from \"ramda\";\n\nimport { DEFAULT_OPTION_LABEL } from \"../constants\";\nimport { filterDeletedRecords, randomId } from \"../utils\";\n\nconst attachPosition = options =>\n options.map((option, index) => ({ ...option, position: index + 1 }));\n\nconst useOptionFields = ({\n options,\n onChange,\n shouldDestroy,\n name = \"\",\n currentRecord,\n itemLabel = DEFAULT_OPTION_LABEL,\n}) => {\n const [shouldFocus, setShouldFocus] = useState(false);\n\n const deletedOptions = options.filter(option => !!option?.deleted);\n\n const { initialValues } = useFormikContext();\n\n const handleChange = (index, value, isOnBlur = false) => {\n const draftAttributes = currentRecord?.draftAttributes;\n\n const getNextOptions = () =>\n assocPath(\n [index, \"label\"],\n isOnBlur\n ? path(name.split(\".\"), initialValues)[index]?.label ||\n path(name.split(\".\"), draftAttributes)[index]?.label\n : value,\n filterDeletedRecords(options)\n );\n if (isOnBlur && !isEmpty(value)) return;\n onChange([...deletedOptions, ...getNextOptions()]);\n };\n\n const generateLabel = (opts, count) => {\n const labelCount = count || opts.length + 1;\n const tempLabel = `${itemLabel} ${labelCount}`;\n const isDuplicateLabel = pluck(\"label\", opts).includes(tempLabel);\n\n return isDuplicateLabel ? generateLabel(opts, labelCount + 1) : tempLabel;\n };\n\n const handleDelete = index => {\n let nextOptions;\n let finalOptions;\n\n if (shouldDestroy) {\n nextOptions = assocPath(\n [index, \"deleted\"],\n true,\n filterDeletedRecords(options)\n );\n finalOptions = attachPosition(filterDeletedRecords(nextOptions));\n } else {\n nextOptions = remove(index, 1, options);\n finalOptions = attachPosition(nextOptions);\n }\n onChange([...deletedOptions, ...finalOptions]);\n };\n\n const handleDragEnd = ({ source, destination }) => {\n // When dragged outside of draggable\n if (destination === null) return;\n\n const filteredOptions = filterDeletedRecords(options);\n const nextOptions = move(source.index, destination.index, filteredOptions);\n const finalOptions = attachPosition(nextOptions);\n onChange([...deletedOptions, ...finalOptions]);\n };\n\n const handleAddOption = () => {\n setShouldFocus(true);\n const position = filterDeletedRecords(options).length;\n const id = randomId();\n const newOption = {\n id: `draft-${id}`,\n altId: `alt-${id}`,\n label: generateLabel(options, null),\n position,\n };\n const nextOptions = append(newOption, options);\n onChange(nextOptions);\n };\n\n const handleBulkAddOption = optionsString => {\n setShouldFocus(true);\n const position = filterDeletedRecords(options).length;\n const newOptions = optionsString\n .trim()\n .split(/\\r?\\n|,/)\n .filter(isNotEmpty)\n .map((option, index) => ({\n id: `draft-${randomId()}`,\n altId: `alt-${randomId()}`,\n label: option.trim(),\n position: position + index,\n }));\n onChange([...options, ...newOptions]);\n };\n\n const handleKeyDown = () => event => {\n if (event.key !== \"Enter\") return;\n const form = event.target.form;\n const inputs = Array.from(form.querySelectorAll(\"input\"));\n const currentInput = inputs.indexOf(event.target);\n\n if (currentInput >= inputs.length - 1) {\n handleAddOption();\n } else {\n inputs[currentInput + 1]?.focus();\n event.preventDefault();\n }\n event.stopPropagation();\n };\n\n return {\n shouldFocus,\n handleAddOption,\n handleBulkAddOption,\n handleChange,\n handleKeyDown,\n handleDelete,\n handleDragEnd,\n };\n};\n\nexport default useOptionFields;\n","import React from \"react\";\n\nimport { ImageUpload, Delete } from \"neetoicons\";\nimport { Button, Input, Textarea } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DragHandle from \"./DragHandle\";\n\nconst InputOption = ({\n shouldFocus,\n hideDeleteOption = false,\n innerRef,\n draggableProps,\n dragHandleProps,\n isPictureChoice,\n onKeyDown,\n onDelete,\n onChange,\n label,\n index,\n disabled,\n isTextArea,\n}) => {\n const { t } = useTranslation();\n\n const Component = isTextArea ? Textarea : Input;\n\n return (\n <div\n ref={innerRef}\n {...draggableProps}\n {...dragHandleProps}\n data-cy=\"form-block-options\"\n >\n <div className=\"nf-input-options group relative mb-2 flex items-center gap-2\">\n <DragHandle {...dragHandleProps} />\n {isPictureChoice && (\n <>\n {index === 0 ? (\n <img\n className=\"neeto-ui-rounded-sm h-8 w-8 cursor-pointer overflow-hidden object-cover\"\n data-testid=\"picture-choice-option\"\n src=\"https://i.pravatar.cc/300\"\n />\n ) : (\n <div className=\"hover:neeto-ui-bg-gray-100 neeto-ui-border-primary-600 neeto-ui-text-primary-800 neeto-ui-rounded-sm flex h-8 w-8 cursor-pointer items-center justify-center border border-dashed transition-all duration-300 ease-in-out\">\n <ImageUpload size={16} />\n </div>\n )}\n </>\n )}\n <Component\n {...{ disabled }}\n autoFocus={shouldFocus}\n data-cy={`option-input-${index}`}\n data-testid={isTextArea ? \"textarea-option\" : \"input-option\"}\n placeholder={t(\"neetoMolecules.optionFields.optionName\")}\n value={label}\n suffix={\n !hideDeleteOption && (\n <Button\n {...{ disabled }}\n className=\"p-0.5\"\n data-cy={`delete-option-button-${index}`}\n data-testid=\"delete-option-button\"\n icon={Delete}\n size=\"small\"\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.actions.delete\"),\n position: \"top\",\n }}\n onClick={() => onDelete({ index })}\n />\n )\n }\n onBlur={({ target }) => onChange(index, target.value, true)}\n onChange={({ target }) => onChange(index, target.value)}\n onFocus={({ target }) => target.select()}\n onKeyDown={onKeyDown(index)}\n />\n </div>\n </div>\n );\n};\n\nexport default InputOption;\n","import React, { useState } from \"react\";\n\nimport { DragDropContext, Droppable, Draggable } from \"@hello-pangea/dnd\";\nimport { noop, slugify } from \"neetocist\";\nimport { Plus } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport BlockOption from \"./BlockOption\";\nimport BulkOptionModal from \"./BulkOptionModal\";\nimport useOptionFields from \"./hooks/useOptionFields\";\nimport InputOption from \"./InputOption\";\nimport { getVisibleOptions } from \"./utils\";\n\nconst OptionFields = ({\n options,\n error,\n onChange,\n name,\n onDelete,\n itemLabel,\n onEdit = noop,\n buttonProps = {},\n minOptions = 0,\n draggable = false,\n editable = true,\n isPictureChoice = false,\n isTextArea = false,\n shouldDestroy = false,\n currentRecord = {},\n bulkActionProps = { enabled: false, bulkAddHelpDocUrl: \"\" },\n}) => {\n const { t } = useTranslation();\n const [isBulkOptionModalOpen, setIsBulkOptionModalOpen] = useState(false);\n\n const {\n shouldFocus,\n handleAddOption,\n handleBulkAddOption,\n handleChange,\n handleKeyDown,\n handleDelete,\n handleDragEnd,\n } = useOptionFields({\n options,\n onChange,\n shouldDestroy,\n name,\n currentRecord,\n itemLabel,\n });\n\n // Temporarily disables the modifications to options when changed are getting saved to server\n // This condition only needed for server id generated types\n let isEditable = true;\n if (shouldDestroy) {\n isEditable =\n options.every(prop(\"id\") || error) && !options.some(prop(\"_destroy\"));\n }\n\n const handleDeleteClick = ({ index }) => {\n const deleteFunction = onDelete ?? handleDelete;\n deleteFunction(index);\n };\n const visibleOptions = getVisibleOptions(options);\n const hideDeleteOption = visibleOptions.length <= minOptions;\n\n const getUniqueOptionId = option =>\n option.altId ||\n option.id?.toString() ||\n option.position?.toString() ||\n slugify(option.label);\n\n return (\n <form onSubmit={e => e.preventDefault()}>\n <DragDropContext onDragEnd={handleDragEnd}>\n <Droppable\n droppableId={`neeto-molecules-option-fields-${name}`}\n isDropDisabled={!draggable}\n >\n {({ innerRef, droppableProps, placeholder }) => (\n <div ref={innerRef} {...droppableProps}>\n {visibleOptions.map((option, index) => (\n <Draggable\n {...{ index }}\n draggableId={getUniqueOptionId(option)}\n isDragDisabled={!draggable}\n key={getUniqueOptionId(option)}\n >\n {({ innerRef, draggableProps, dragHandleProps }) =>\n editable ? (\n <InputOption\n {...{\n dragHandleProps,\n draggableProps,\n hideDeleteOption,\n index,\n innerRef,\n isPictureChoice,\n isTextArea,\n name,\n shouldFocus,\n }}\n disabled={!isEditable}\n label={option.label}\n onChange={handleChange}\n onDelete={handleDeleteClick}\n onKeyDown={handleKeyDown}\n />\n ) : (\n <BlockOption\n {...{\n dragHandleProps,\n draggableProps,\n handleDeleteClick,\n hideDeleteOption,\n index,\n innerRef,\n onEdit,\n }}\n label={option.label}\n />\n )\n }\n </Draggable>\n ))}\n {error && (\n <Typography\n className=\"neeto-ui-input__error\"\n data-testid=\"validation-error-container\"\n style=\"body3\"\n >\n {error}\n </Typography>\n )}\n {placeholder}\n </div>\n )}\n </Droppable>\n <div className=\"mt-4 flex items-center justify-between\">\n <Button\n data-cy=\"add-option-link\"\n data-testid=\"add-option-link\"\n disabled={!isEditable}\n icon={Plus}\n iconPosition=\"left\"\n label={t(\"neetoMolecules.optionFields.addOption\")}\n size=\"small\"\n style=\"link\"\n onClick={handleAddOption}\n {...buttonProps}\n />\n {bulkActionProps.enabled && (\n <Button\n data-cy=\"add-bulk-option-link\"\n data-testid=\"add-bulk-option-link\"\n disabled={!isEditable}\n label={t(\"neetoMolecules.optionFields.addBulk\")}\n size=\"small\"\n style=\"text\"\n onClick={() => setIsBulkOptionModalOpen(true)}\n />\n )}\n </div>\n </DragDropContext>\n <BulkOptionModal\n bulkAddHelpDocUrl={bulkActionProps.bulkAddHelpDocUrl}\n handleBulkAdd={handleBulkAddOption}\n isOpen={isBulkOptionModalOpen}\n onClose={() => setIsBulkOptionModalOpen(false)}\n />\n </form>\n );\n};\n\nOptionFields.propTypes = {\n /**\n * Props to be passed to the add option button\n */\n buttonProps: PropTypes.object,\n /**\n * Current record object\n */\n currentRecord: PropTypes.object,\n /**\n * Enable drag and drop functionality\n */\n draggable: PropTypes.bool,\n\n /**\n * Enable edit functionality\n */\n editable: PropTypes.bool,\n\n /**\n * Error message to be displayed\n */\n error: PropTypes.string,\n\n /**\n * The field name in Formik state.\n */\n name: PropTypes.string,\n\n /**\n * Function to handle option deletion\n */\n onDelete: PropTypes.func,\n\n /**\n * Function to handle option edit\n *\n */\n onEdit: PropTypes.func,\n\n /**\n * Minimum number of options required\n */\n minOptions: PropTypes.number,\n\n /**\n * Options array\n */\n options: PropTypes.array,\n\n /**\n * Prop to switch between Input and Textarea\n */\n isTextArea: PropTypes.bool,\n\n /**\n * Function to handle options change\n */\n onChange: PropTypes.func,\n\n /**\n * Prop to switch between PictureChoice and normal options\n * */\n isPictureChoice: PropTypes.bool,\n\n /**\n * Prop to destroy options\n * */\n shouldDestroy: PropTypes.bool,\n\n /**\n * Prop to set the item label\n * */\n\n itemLabel: PropTypes.string,\n\n /**\n * Props for bulk action\n */\n bulkActionProps: PropTypes.shape({\n enabled: PropTypes.bool,\n bulkAddHelpDocUrl: PropTypes.string,\n }),\n};\nexport default OptionFields;\n"],"names":["DragHandle","props","React","createElement","_extends","className","Reorder","size","strokeWidth","BlockOption","withT","_ref","t","innerRef","_ref$hideDeleteOption","hideDeleteOption","draggableProps","dragHandleProps","label","index","onEdit","handleDeleteClick","ref","Typography","style","Button","icon","Edit","tooltipProps","content","position","onClick","Delete","BulkOptionModal","isOpen","onClose","handleBulkAdd","bulkAddHelpDocUrl","_useTranslation","useTranslation","_useState","useState","_useState2","_slicedToArray","optionsString","setOptionsString","handleSave","handleClose","Modal","Header","Body","Textarea","placeholder","rows","value","helpText","Trans","i18nKey","components","Link","href","target","onChange","e","Footer","DEFAULT_OPTION_LABEL","i18next","getVisibleOptions","options","arguments","length","undefined","filter","option","deleted","sort","a","b","filterDeletedRecords","reject","prop","randomId","Math","random","toString","substring","attachPosition","map","_objectSpread","useOptionFields","shouldDestroy","_ref$name","name","currentRecord","_ref$itemLabel","itemLabel","shouldFocus","setShouldFocus","deletedOptions","_useFormikContext","useFormikContext","initialValues","handleChange","isOnBlur","draftAttributes","getNextOptions","_path$index","_path$index2","assocPath","path","split","isEmpty","concat","_toConsumableArray","generateLabel","opts","count","labelCount","tempLabel","isDuplicateLabel","pluck","includes","handleDelete","nextOptions","finalOptions","remove","handleDragEnd","_ref2","source","destination","filteredOptions","move","handleAddOption","id","newOption","altId","append","handleBulkAddOption","newOptions","trim","isNotEmpty","handleKeyDown","event","key","form","inputs","Array","from","querySelectorAll","currentInput","indexOf","_inputs","focus","preventDefault","stopPropagation","InputOption","isPictureChoice","onKeyDown","onDelete","disabled","isTextArea","Component","Input","Fragment","src","ImageUpload","autoFocus","suffix","onBlur","_ref3","onFocus","_ref4","select","OptionFields","error","_ref$onEdit","noop","_ref$buttonProps","buttonProps","_ref$minOptions","minOptions","_ref$draggable","draggable","_ref$editable","editable","_ref$isPictureChoice","_ref$isTextArea","_ref$shouldDestroy","_ref$currentRecord","_ref$bulkActionProps","bulkActionProps","enabled","isBulkOptionModalOpen","setIsBulkOptionModalOpen","_useOptionFields","isEditable","every","some","deleteFunction","visibleOptions","getUniqueOptionId","_option$id","_option$position","slugify","onSubmit","DragDropContext","onDragEnd","Droppable","droppableId","isDropDisabled","droppableProps","Draggable","draggableId","isDragDisabled","Plus","iconPosition"],"mappings":";;;;;;;;;;;;;;;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AY,sBAAsB;IAClCsI,QAAQ,EAAE,CAACoC,UAAW;AACtBjL,IAAAA,KAAK,EAAEN,CAAC,CAAC,qCAAqC,CAAE;AAChDL,IAAAA,IAAI,EAAC,OAAO;AACZiB,IAAAA,KAAK,EAAC,MAAM;IACZO,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAMkK,wBAAwB,CAAC,IAAI,CAAC,CAAA;AAAA,KAAA;GAC9C,CAEA,CACU,CAAC,eAClB/L,yBAAA,CAAAC,aAAA,CAAC8B,eAAe,EAAA;IACdI,iBAAiB,EAAEyJ,eAAe,CAACzJ,iBAAkB;AACrDD,IAAAA,aAAa,EAAEqG,mBAAoB;AACnCvG,IAAAA,MAAM,EAAE8J,qBAAsB;IAC9B7J,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAM8J,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAAA,KAAA;AAAC,GAChD,CACG,CAAC,CAAA;AAEX;;;;"}
|
package/dist/cjs/Sidebar.js
CHANGED
|
@@ -11,7 +11,7 @@ var neetoui = require('@bigbinary/neetoui');
|
|
|
11
11
|
var ramda = require('ramda');
|
|
12
12
|
var reactI18next = require('react-i18next');
|
|
13
13
|
var reactRouterDom = require('react-router-dom');
|
|
14
|
-
var Chevron = require('./Chevron-
|
|
14
|
+
var Chevron = require('./Chevron-7b1b9258.js');
|
|
15
15
|
var useFetchNeetoApps = require('@bigbinary/neeto-commons-frontend/react-utils/useFetchNeetoApps');
|
|
16
16
|
var ProductTypefaceLogos = require('@bigbinary/neeto-icons/typeface-logos');
|
|
17
17
|
var _extends = require('./extends-1b35a664.js');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.59-beta",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron-5b140e64.js","sources":["../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../src/components/Sidebar/constants.js","../src/components/Sidebar/utils.js","../src/components/Sidebar/Components/Links/SubLink.jsx","../src/components/Sidebar/Components/Links/Items.jsx","../src/components/Sidebar/Components/Links/SelectedLink.jsx","../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others} key={to}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n","import { isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={() => !isSectionHeader && isSubRouteActive(to, location)}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import React from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <React.Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <>\n <Items {...{ isSettingsItems }} items={subItem.items} />\n <hr className=\"neeto-molecules-sidebar__separator\" />\n </>\n )}\n </React.Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { omit } from \"ramda\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-bg-gray-100 neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-text-primary-500 neeto-ui-border-b hover:neeto-ui-text-primary-500 mb-4 \"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-back-button`}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","key","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","activeClassName","className","isActive","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","_objectSpread","isPresent","item","path","SelectedLink","_ref$navLink","navLink","isConfigureNavLink","handleGoBack","isConfigureSidebar","otherProps","onClick","omit","hyphenize","Left","weight","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AAAKC,IAAAA,MAAM,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,WAAA,CAAA,CAAA;AAClE,EAAA,IAAAC,qBAAA,GACEC,wBAAwB,CAACP,aAAa,CAAC;IADhBQ,UAAU,GAAAF,qBAAA,CAA1BN,aAAa,CAAA,CAAA;AAGtB,EAAA,oBACES,cAAA,CAAAC,aAAA,CAACC,OAAO,EAAAC,QAAA,CAAA;IAACX,EAAE,EAAEO,UAAU,IAAIP,EAAAA;AAAG,GAAA,EAAKE,MAAM,EAAA;AAAEU,IAAAA,GAAG,EAAEZ,EAAAA;AAAG,GAAA,CAAA,EAChDC,QACM,CAAC,CAAA;AAEd;;ACdO,IAAMY,cAAc,GAAG;AAC5BC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE,UAAA;AACZ,CAAC,CAAA;AAEM,IAAMC,mCAAmC,GAAG;;ACF5C,IAAMC,gBAAgB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6E,KAAK,GAAA7E,IAAA,CAAL6E,KAAK,CAAA;EAAA,oBACtBnE,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAWkE,IAAAA,KAAK,EAALA,KAAK;AAAI8B,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAA;GACxDnG,eAAAA,cAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACEmG,IAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,IAAAA,IAAI,EAAC,cAAA;AAAc,GACpB,CACE,CAAC,CAAA;AAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron-97f5d14e.js","sources":["../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/constants.js","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx","../../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({ checkpointKey, to, children, ...others }) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n return (\n <NavLink to={checkpoint || to} {...others} key={to}>\n {children}\n </NavLink>\n );\n};\n\nexport default CheckPointNavLinks;\n","export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n","import { isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n return (\n <CheckPointNavLinks\n {...{ to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={() => !isSectionHeader && isSubRouteActive(to, location)}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import React from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <React.Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <>\n <Items {...{ isSettingsItems }} items={subItem.items} />\n <hr className=\"neeto-molecules-sidebar__separator\" />\n </>\n )}\n </React.Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Left } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { omit } from \"ramda\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-bg-gray-100 neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-text-primary-500 neeto-ui-border-b hover:neeto-ui-text-primary-500 mb-4 \"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span\n className=\"neeto-molecules-sidebar__link-icon\"\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-back-button`}\n >\n <Left />\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body2\"\n weight=\"normal\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-6\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","import React from \"react\";\n\nconst Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["CheckPointNavLinks","_ref","checkpointKey","to","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","React","createElement","NavLink","_extends","key","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","activeClassName","className","isActive","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","_objectSpread","isPresent","item","path","SelectedLink","_ref$navLink","navLink","isConfigureNavLink","handleGoBack","isConfigureSidebar","otherProps","onClick","omit","hyphenize","Left","weight","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAAmD;AAAA,EAAA,IAA7CC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AAAKC,IAAAA,MAAM,GAAAC,gDAAA,CAAAL,IAAA,EAAAM,WAAA,CAAA,CAAA;AAClE,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACP,aAAa,CAAC;IADhBQ,UAAU,GAAAF,qBAAA,CAA1BN,aAAa,CAAA,CAAA;AAGtB,EAAA,oBACES,yBAAA,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