@bigbinary/neeto-molecules 3.15.0 → 3.15.2
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/BrowserPreview.js +3 -2
- package/dist/BrowserPreview.js.map +1 -1
- package/dist/{Chevron-tz1-4YT4.js → Chevron-C3M0XG3p.js} +2 -2
- package/dist/{Chevron-tz1-4YT4.js.map → Chevron-C3M0XG3p.js.map} +1 -1
- package/dist/Codeblock.js +1 -1
- package/dist/Codeblock.js.map +1 -1
- package/dist/ConfigurePageSidebar.js +1 -1
- package/dist/ProductEmbed.js +154 -80
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/Sidebar.js +17 -3
- package/dist/Sidebar.js.map +1 -1
- package/dist/cjs/BrowserPreview.js +3 -2
- package/dist/cjs/BrowserPreview.js.map +1 -1
- package/dist/cjs/{Chevron-55AGkSis.js → Chevron-kf8dWOcZ.js} +2 -2
- package/dist/cjs/{Chevron-55AGkSis.js.map → Chevron-kf8dWOcZ.js.map} +1 -1
- package/dist/cjs/Codeblock.js +1 -1
- package/dist/cjs/Codeblock.js.map +1 -1
- package/dist/cjs/ConfigurePageSidebar.js +1 -1
- package/dist/cjs/ProductEmbed.js +152 -78
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/Sidebar.js +17 -3
- package/dist/cjs/Sidebar.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +1 -1
- package/types/BrowserPreview.d.ts +1 -0
- package/types/ProductEmbed.d.ts +3 -0
- package/types/Sidebar.d.ts +1 -0
|
@@ -227,7 +227,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
227
227
|
});
|
|
228
228
|
};
|
|
229
229
|
|
|
230
|
-
var css = ":root{--neeto-molecules-sidebar-width:15rem;--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-engage-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:15rem}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:15rem;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:15rem;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:15rem;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:.5rem;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-15rem;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:6.8125rem}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;padding:1.5rem 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);width:15rem;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:.375rem auto;width:100%}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:3.125rem}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{color:rgb(var(--neeto-ui-primary-500))!important;position:absolute!important;right:.5rem;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:12.625rem;left:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);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 - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:.5rem 0 2rem;padding:0 1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:2.5rem}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:.625rem;line-height:1.2;padding:.75rem 1.5rem;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{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:left}@media screen and (min-width:1536px){.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:1rem}}.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-accent-100));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-semibold)}.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:.25rem 0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-bottom:0;padding:.5rem 1.5rem .5rem 3.625rem;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:0.9375rem;opacity:.75}@media screen and (min-width:1536px){.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:1rem}}.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-accent-800));font-weight:500;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:.5rem!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:.75rem;width:9.375rem}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:.5rem;height:2.5rem;margin-bottom:.5rem;margin-left:auto;margin-right:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-bottom:.25rem}.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;min-width:15rem}.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:.25rem 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:2.5rem;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:.5rem}.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:.9375rem;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:.9375rem}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 1rem);margin-bottom:.5rem;min-width:calc(100vw - 11rem);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 11.5625rem)!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:3.625rem}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:.25rem 1.5rem .25rem 3.625rem}.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:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);margin-bottom:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin:0 0 .625rem!important;min-height:0;overflow-y:auto;padding:0 0 .625rem!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body1:1.125rem;background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black));cursor:pointer;font-weight:var(--neeto-ui-font-semibold);gap:.25rem;padding:.75rem .25rem;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:0.9375rem}.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:0;padding-bottom:.625rem;padding-top:.625rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink.active{font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0;padding-left:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding:.5rem .75rem .5rem 1.5rem;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-accent-100))!important;color:rgb(var(--neeto-ui-black))!important;font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link-unread-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:1rem;justify-content:center;min-width:1rem;padding-left:.25rem;padding-right:.25rem;position:absolute;right:-4px;top:-4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-ui-theme--dark .neeto-molecules-sidebar__logo>path{fill:rgb(var(--neeto-ui-black))}";
|
|
230
|
+
var css = ":root{--neeto-molecules-sidebar-width:15rem;--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-engage-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:15rem}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:15rem;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:15rem;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:15rem;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{right:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{left:.5rem;right:auto}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{left:-15rem;left:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:6.8125rem}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-right:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;padding:1.5rem 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);width:15rem;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:.375rem auto;width:100%}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:3.125rem}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{color:rgb(var(--neeto-ui-primary-500))!important;position:absolute!important;right:.5rem;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{left:12.625rem;left:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);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 - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin:.5rem 0 2rem;padding:0 1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:2.5rem}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:.625rem;line-height:1.2;padding:.75rem 1.5rem;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{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:left}@media screen and (min-width:1536px){.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:1rem}}.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-accent-100));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-semibold)}.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:.25rem 0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-bottom:0;padding:.5rem 1.5rem .5rem 3.625rem;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:0.9375rem;opacity:.75}@media screen and (min-width:1536px){.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:1rem}}.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-accent-800));font-weight:500;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:.5rem!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:.75rem;width:9.375rem}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:.5rem;height:2.5rem;margin-bottom:.5rem;margin-left:auto;margin-right:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-bottom:.25rem}.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;min-width:15rem}.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:.25rem 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:2.5rem;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:.5rem}.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:.9375rem;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:.9375rem}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 1rem);margin-bottom:.5rem;min-width:calc(100vw - 11rem);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 11.5625rem)!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:3.625rem}.neeto-molecules-sidebar-segment{margin-bottom:0!important;padding:.25rem 1.5rem .25rem 3.625rem}.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:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);margin-bottom:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin:0 0 .625rem!important;min-height:0;overflow-y:auto;padding:0 0 .625rem!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body1:1.125rem;background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black));cursor:pointer;font-weight:var(--neeto-ui-font-semibold);gap:.25rem;padding:.75rem .25rem;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:0.9375rem}.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:0;padding-bottom:.625rem;padding-top:.625rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink.active{font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0;padding-left:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding:.5rem .75rem .5rem 1.5rem;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-accent-100))!important;color:rgb(var(--neeto-ui-black))!important;font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link-unread-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:1rem;justify-content:center;min-width:1rem;padding-left:.25rem;padding-right:.25rem;position:absolute;right:-4px;top:-4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-ui-theme--dark .neeto-molecules-sidebar__logo>path{fill:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__workspace-info{margin-bottom:1.5rem;padding:.5rem 1.5rem}";
|
|
231
231
|
injectCss.n(css,{});
|
|
232
232
|
|
|
233
233
|
var Chevron = function Chevron(_ref) {
|
|
@@ -253,4 +253,4 @@ exports._Items = _Items;
|
|
|
253
253
|
exports.filterByPermissions = filterByPermissions;
|
|
254
254
|
exports.getActiveConfigurePageLink = getActiveConfigurePageLink;
|
|
255
255
|
exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
|
|
256
|
-
//# sourceMappingURL=Chevron-
|
|
256
|
+
//# sourceMappingURL=Chevron-kf8dWOcZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron-55AGkSis.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 { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({\n checkpointKey,\n to,\n href,\n children,\n ...others\n}) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n const LinkElement = href ? \"a\" : NavLink;\n const linkProps = href\n ? { href, key: href, ...others }\n : { to: checkpoint || to, key: to, ...others };\n\n return <LinkElement {...linkProps}>{children}</LinkElement>;\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\nexport const DEFAULT_HOME_PATH = \"/\";\n","import { isPresent, 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\nexport const getActiveConfigurePageLink = ({ navLinks, location }) =>\n navLinks.find(link => {\n const [linkPathname] = link.to?.split(\"?\") || [];\n\n return (\n isPresent(link.isConfigureNavLink) &&\n link.isConfigureNavLink &&\n location.pathname.startsWith(linkPathname)\n );\n });\n","import { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\nimport { is } from \"ramda\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n href,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n baseUrl,\n isActive,\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ baseUrl, columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n const isSubLinkActive = () =>\n !isSectionHeader &&\n (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));\n\n return (\n <CheckPointNavLinks\n {...{ href, 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={isSubLinkActive}\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 { Fragment } 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 <Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n href={subItem.href}\n isActive={subItem.isActive}\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 {items.length - 1 !== subIndex && (\n <hr className=\"neeto-molecules-sidebar__separator neeto-ui-border-gray-200\" />\n )}\n </>\n )}\n </Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import classNames from \"classnames\";\nimport { handleMetaClick } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Home } from \"neetoicons\";\nimport { Typography, Button } from \"neetoui\";\nimport { omit } from \"ramda\";\nimport { useHistory } from \"react-router-dom\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n homePath,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, homePath, e);\n };\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-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span className=\"neeto-molecules-sidebar__link-icon flex items-center pl-3\">\n <Button\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-home-button`}\n icon={Home}\n style=\"text\"\n onClick={handleHomeButtonClick}\n />\n <span className=\"px-1 text-xs\">/</span>\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body1\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-4\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","const 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","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","DEFAULT_HOME_PATH","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","__","getActiveConfigurePageLink","_ref2","navLinks","find","link","_link$to","_ref3","split","_ref4","_slicedToArray","linkPathname","isPresent","isConfigureNavLink","startsWith","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","baseUrl","isActive","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","isSubLinkActive","Function","_jsxs","activeClassName","className","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","item","path","_Fragment","_Items","length","SelectedLink","_ref$navLink","navLink","handleGoBack","isConfigureSidebar","homePath","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","onClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAMlB;AAAA,EAAA,IALJC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;AACLC,IAAAA,MAAM,GAAAC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,MAAAA,KAAK,EAALA,KAAK;MAAIE,eAAe,EAAA,IAAA;AAAA,KAAE,CAAC,CAAA;AAAA,GAC/C,CAAC,CAAA;AAEV;;;;;AC7DA,IAAMiC,OAAO,GAAG,SAAVA,OAAOA,CAAAvI,IAAA,EAAA;AAAA,EAAA,IAAMkG,KAAK,GAAAlG,IAAA,CAALkG,KAAK,CAAA;AAAA,EAAA,oBACtBlF,cAAA,CAAA,KAAA,EAAA;AAAWkF,IAAAA,KAAK,EAALA,KAAK;AAAIsC,IAAAA,MAAM,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAAtI,IAAAA,QAAA,eAC5DY,cAAA,CAAA,MAAA,EAAA;AACE2H,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC,cAAA;KACN,CAAA;AAAC,GACC,CAAC,CAAA;AAAA;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Chevron-kf8dWOcZ.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 { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({\n checkpointKey,\n to,\n href,\n children,\n ...others\n}) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n const LinkElement = href ? \"a\" : NavLink;\n const linkProps = href\n ? { href, key: href, ...others }\n : { to: checkpoint || to, key: to, ...others };\n\n return <LinkElement {...linkProps}>{children}</LinkElement>;\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\nexport const DEFAULT_HOME_PATH = \"/\";\n","import { isPresent, 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\nexport const getActiveConfigurePageLink = ({ navLinks, location }) =>\n navLinks.find(link => {\n const [linkPathname] = link.to?.split(\"?\") || [];\n\n return (\n isPresent(link.isConfigureNavLink) &&\n link.isConfigureNavLink &&\n location.pathname.startsWith(linkPathname)\n );\n });\n","import { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\nimport { is } from \"ramda\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n href,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n baseUrl,\n isActive,\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ baseUrl, columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n const isSubLinkActive = () =>\n !isSectionHeader &&\n (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));\n\n return (\n <CheckPointNavLinks\n {...{ href, 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={isSubLinkActive}\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 { Fragment } 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 <Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n href={subItem.href}\n isActive={subItem.isActive}\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 {items.length - 1 !== subIndex && (\n <hr className=\"neeto-molecules-sidebar__separator neeto-ui-border-gray-200\" />\n )}\n </>\n )}\n </Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import classNames from \"classnames\";\nimport { handleMetaClick } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Home } from \"neetoicons\";\nimport { Typography, Button } from \"neetoui\";\nimport { omit } from \"ramda\";\nimport { useHistory } from \"react-router-dom\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n homePath,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, homePath, e);\n };\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-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span className=\"neeto-molecules-sidebar__link-icon flex items-center pl-3\">\n <Button\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-home-button`}\n icon={Home}\n style=\"text\"\n onClick={handleHomeButtonClick}\n />\n <span className=\"px-1 text-xs\">/</span>\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body1\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-4\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","const 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","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","DEFAULT_HOME_PATH","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","__","getActiveConfigurePageLink","_ref2","navLinks","find","link","_link$to","_ref3","split","_ref4","_slicedToArray","linkPathname","isPresent","isConfigureNavLink","startsWith","SubLink","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","baseUrl","isActive","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","isSubLinkActive","Function","_jsxs","activeClassName","className","Typography","component","style","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","item","path","_Fragment","_Items","length","SelectedLink","_ref$navLink","navLink","handleGoBack","isConfigureSidebar","homePath","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","onClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAMlB;AAAA,EAAA,IALJC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;AACLC,IAAAA,MAAM,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,WAAA,CAAA,CAAA;AAET,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACR,aAAa,CAAC;IADhBS,UAAU,GAAAF,qBAAA,CAA1BP,aAAa,CAAA,CAAA;AAGtB,EAAA,IAAMU,WAAW,GAAGR,IAAI,GAAG,GAAG,GAAGS,sBAAO,CAAA;AACxC,EAAA,IAAMC,SAAS,GAAGV,IAAI,GAAAW,eAAA,CAAA;AAChBX,IAAAA,IAAI,EAAJA,IAAI;AAAEY,IAAAA,GAAG,EAAEZ,IAAAA;GAASE,EAAAA,MAAM,IAAAS,eAAA,CAAA;IAC1BZ,EAAE,EAAEQ,UAAU,IAAIR,EAAE;AAAEa,IAAAA,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AA,EAAA;AACE2H,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC,cAAA;KACN,CAAA;AAAC,GACC,CAAC,CAAA;AAAA;;;;;;;;;;;;"}
|
package/dist/cjs/Codeblock.js
CHANGED
|
@@ -33,7 +33,7 @@ var Codeblock = function Codeblock(_ref) {
|
|
|
33
33
|
className: "relative",
|
|
34
34
|
children: [/*#__PURE__*/jsxRuntime.jsx(reactSyntaxHighlighter.PrismLight, _objectSpread(_objectSpread({
|
|
35
35
|
wrapLines: true,
|
|
36
|
-
className: "p-4 pr-12 md:pr-4",
|
|
36
|
+
className: "neeto-molecules-code-block p-4 pr-12 md:pr-4",
|
|
37
37
|
codeTagProps: {
|
|
38
38
|
"data-cy": "code-block-content"
|
|
39
39
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Codeblock.js","sources":["../../src/components/Codeblock.jsx"],"sourcesContent":["import PropTypes from \"prop-types\";\nimport { PrismLight as CodeBlock } from \"react-syntax-highlighter\";\nimport { dracula } from \"react-syntax-highlighter/dist/esm/styles/prism\";\n\nimport CopyCode from \"components/CopyToClipboardButton\";\n\nconst Codeblock = ({\n code,\n showCopyButton = true,\n codeblockProps,\n copyButtonProps = { label: \"Copy\" },\n}) => {\n const isLargerScreen = window.innerWidth > 768;\n\n return (\n <div className=\"relative\">\n <CodeBlock\n wrapLines\n className=\"p-4 pr-12 md:pr-4\"\n codeTagProps={{ \"data-cy\": \"code-block-content\" }}\n data-cy=\"code-block\"\n data-testid=\"codeblock-react-highlighter\"\n language=\"javascript\"\n style={dracula}\n {...codeblockProps}\n >\n {code}\n </CodeBlock>\n {showCopyButton && (\n <CopyCode\n className=\"absolute right-2 top-2\"\n data-cy=\"copy-button\"\n data-testid=\"codeblock-copy-button\"\n size=\"small\"\n style=\"secondary\"\n value={code}\n {...copyButtonProps}\n label={isLargerScreen ? copyButtonProps.label : \"\"}\n />\n )}\n </div>\n );\n};\n\nCodeblock.propTypes = {\n /**\n * The code to be displayed.\n */\n code: PropTypes.string,\n /**\n * Flag to determine whether the 'Copy' button is displayed.\n */\n showCopyButton: PropTypes.bool,\n /**\n * Additional props that can be passed on to the 'PrismLight' component from 'react-syntax-highlighter'.\n */\n codeblockProps: PropTypes.object,\n /**\n * Additional props that can be passed on to the 'CopyToClipboardButton' component from 'neeto-molecules'.\n */\n copyButtonProps: PropTypes.object,\n};\n\nexport default Codeblock;\n"],"names":["Codeblock","_ref","code","_ref$showCopyButton","showCopyButton","codeblockProps","_ref$copyButtonProps","copyButtonProps","label","isLargerScreen","window","innerWidth","_jsxs","className","children","_jsx","CodeBlock","_objectSpread","wrapLines","codeTagProps","language","style","dracula","CopyCode","size","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAKT;AAAA,EAAA,IAJJC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAAC,mBAAA,GAAAF,IAAA,CACJG,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;IACrBE,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAAC,oBAAA,GAAAL,IAAA,CACdM,eAAe;IAAfA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA;AAAEE,MAAAA,KAAK,EAAE,MAAA;AAAO,KAAC,GAAAF,oBAAA,CAAA;AAEnC,EAAA,IAAMG,cAAc,GAAGC,MAAM,CAACC,UAAU,GAAG,GAAG,CAAA;AAE9C,EAAA,oBACEC,eAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,UAAU;AAAAC,IAAAA,QAAA,gBACvBC,cAAA,CAACC,iCAAS,EAAAC,aAAA,CAAAA,aAAA,CAAA;MACRC,SAAS,EAAA,IAAA;AACTL,MAAAA,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"Codeblock.js","sources":["../../src/components/Codeblock.jsx"],"sourcesContent":["import PropTypes from \"prop-types\";\nimport { PrismLight as CodeBlock } from \"react-syntax-highlighter\";\nimport { dracula } from \"react-syntax-highlighter/dist/esm/styles/prism\";\n\nimport CopyCode from \"components/CopyToClipboardButton\";\n\nconst Codeblock = ({\n code,\n showCopyButton = true,\n codeblockProps,\n copyButtonProps = { label: \"Copy\" },\n}) => {\n const isLargerScreen = window.innerWidth > 768;\n\n return (\n <div className=\"relative\">\n <CodeBlock\n wrapLines\n className=\"neeto-molecules-code-block p-4 pr-12 md:pr-4\"\n codeTagProps={{ \"data-cy\": \"code-block-content\" }}\n data-cy=\"code-block\"\n data-testid=\"codeblock-react-highlighter\"\n language=\"javascript\"\n style={dracula}\n {...codeblockProps}\n >\n {code}\n </CodeBlock>\n {showCopyButton && (\n <CopyCode\n className=\"absolute right-2 top-2\"\n data-cy=\"copy-button\"\n data-testid=\"codeblock-copy-button\"\n size=\"small\"\n style=\"secondary\"\n value={code}\n {...copyButtonProps}\n label={isLargerScreen ? copyButtonProps.label : \"\"}\n />\n )}\n </div>\n );\n};\n\nCodeblock.propTypes = {\n /**\n * The code to be displayed.\n */\n code: PropTypes.string,\n /**\n * Flag to determine whether the 'Copy' button is displayed.\n */\n showCopyButton: PropTypes.bool,\n /**\n * Additional props that can be passed on to the 'PrismLight' component from 'react-syntax-highlighter'.\n */\n codeblockProps: PropTypes.object,\n /**\n * Additional props that can be passed on to the 'CopyToClipboardButton' component from 'neeto-molecules'.\n */\n copyButtonProps: PropTypes.object,\n};\n\nexport default Codeblock;\n"],"names":["Codeblock","_ref","code","_ref$showCopyButton","showCopyButton","codeblockProps","_ref$copyButtonProps","copyButtonProps","label","isLargerScreen","window","innerWidth","_jsxs","className","children","_jsx","CodeBlock","_objectSpread","wrapLines","codeTagProps","language","style","dracula","CopyCode","size","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAKT;AAAA,EAAA,IA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eAAe,CAAA,EAAA,EAAA,EAAA;AACnBC,MAAAA,KAAK,EAAEC,cAAc,GAAGF,eAAe,CAACC,KAAK,GAAG,EAAA;AAAG,KAAA,CACpD,CACF,CAAA;AAAA,GACE,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -7,7 +7,7 @@ var Button = require('@bigbinary/neetoui/Button');
|
|
|
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-kf8dWOcZ.js');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
require('@babel/runtime/helpers/defineProperty');
|
|
13
13
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
package/dist/cjs/ProductEmbed.js
CHANGED
|
@@ -14,13 +14,13 @@ var Codeblock = require('./Codeblock.js');
|
|
|
14
14
|
var jsxRuntime = require('react/jsx-runtime');
|
|
15
15
|
var i18next = require('i18next');
|
|
16
16
|
var Code$1 = require('@bigbinary/neeto-icons/Code');
|
|
17
|
-
var Eye = require('@bigbinary/neeto-icons/Eye');
|
|
18
17
|
var Input = require('@bigbinary/neetoui/Input');
|
|
19
18
|
var Callout = require('@bigbinary/neetoui/Callout');
|
|
20
19
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
21
20
|
var Delete = require('@bigbinary/neeto-icons/Delete');
|
|
22
21
|
var Plus = require('@bigbinary/neeto-icons/Plus');
|
|
23
22
|
var Label = require('@bigbinary/neetoui/Label');
|
|
23
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
24
24
|
var Checkbox = require('@bigbinary/neetoui/Checkbox');
|
|
25
25
|
var Select = require('@bigbinary/neetoui/Select');
|
|
26
26
|
var ColorPicker = require('@bigbinary/neetoui/ColorPicker');
|
|
@@ -32,17 +32,17 @@ var injectCss = require('./inject-css-vQvjPR2x.js');
|
|
|
32
32
|
require('react-syntax-highlighter');
|
|
33
33
|
require('react-syntax-highlighter/dist/esm/styles/prism');
|
|
34
34
|
require('./CopyToClipboardButton.js');
|
|
35
|
-
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
36
35
|
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
37
36
|
require('@bigbinary/neeto-icons/Copy');
|
|
38
37
|
require('@bigbinary/neeto-icons/Check');
|
|
39
38
|
|
|
40
39
|
var Code = function Code(_ref) {
|
|
41
|
-
var code = _ref.code
|
|
40
|
+
var code = _ref.code,
|
|
41
|
+
tab = _ref.tab;
|
|
42
42
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
43
|
-
className: "relative w-full overflow-y-auto",
|
|
43
|
+
className: "neeto-molecules-embed__code-block relative w-full overflow-y-auto",
|
|
44
44
|
"data-cy": "embed-code-block",
|
|
45
|
-
"data-testid": "
|
|
45
|
+
"data-testid": "".concat(tab, "-code-block"),
|
|
46
46
|
children: /*#__PURE__*/jsxRuntime.jsx(Codeblock, {
|
|
47
47
|
code: code
|
|
48
48
|
})
|
|
@@ -51,16 +51,16 @@ var Code = function Code(_ref) {
|
|
|
51
51
|
|
|
52
52
|
var TAB_KEYS = {
|
|
53
53
|
HTML: "html",
|
|
54
|
-
|
|
54
|
+
REACT: "react"
|
|
55
55
|
};
|
|
56
56
|
var TABS = [{
|
|
57
57
|
key: TAB_KEYS.HTML,
|
|
58
58
|
label: i18next.t("neetoMolecules.productEmbed.tab.html"),
|
|
59
59
|
icon: Code$1
|
|
60
60
|
}, {
|
|
61
|
-
key: TAB_KEYS.
|
|
62
|
-
label: i18next.t("neetoMolecules.productEmbed.tab.
|
|
63
|
-
icon:
|
|
61
|
+
key: TAB_KEYS.REACT,
|
|
62
|
+
label: i18next.t("neetoMolecules.productEmbed.tab.react"),
|
|
63
|
+
icon: Code$1
|
|
64
64
|
}];
|
|
65
65
|
var EMBED_OPTIONS = {
|
|
66
66
|
INLINE: "inline",
|
|
@@ -95,17 +95,17 @@ var INITIAL_QUERY_PARAM = {
|
|
|
95
95
|
value: ""
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
-
var camelCasedAppName = globalProps.appName.replace(/^neeto/i, "neeto");
|
|
98
|
+
var camelCasedAppName$1 = globalProps.appName.replace(/^neeto/i, "neeto");
|
|
99
99
|
var embedBaseScript = function embedBaseScript(embedScriptLink) {
|
|
100
|
-
return "<script>window.".concat(camelCasedAppName, " = window.").concat(camelCasedAppName, " || { embed: function(){(").concat(camelCasedAppName, ".q=").concat(camelCasedAppName, ".q||[]).push(arguments)} };</script>\n <script async\n src=\"").concat(embedScriptLink, "\">\n </script>");
|
|
100
|
+
return "<script>window.".concat(camelCasedAppName$1, " = window.").concat(camelCasedAppName$1, " || { embed: function(){(").concat(camelCasedAppName$1, ".q=").concat(camelCasedAppName$1, ".q||[]).push(arguments)} };</script>\n <script async\n src=\"").concat(embedScriptLink, "\">\n </script>");
|
|
101
101
|
};
|
|
102
|
-
var embedEnv = function embedEnv() {
|
|
102
|
+
var embedEnv$1 = function embedEnv() {
|
|
103
103
|
return globalProps.railsEnv !== "production" ? "\n".concat(TAB_STRING, " env: \"").concat(globalProps.railsEnv, "\",") : "";
|
|
104
104
|
};
|
|
105
|
-
var embedQueryParam = function embedQueryParam(queryParams) {
|
|
105
|
+
var embedQueryParam$1 = function embedQueryParam(queryParams) {
|
|
106
106
|
return queryParams ? "\n".concat(TAB_STRING, " queryParams: ").concat(queryParams, ",") : "";
|
|
107
107
|
};
|
|
108
|
-
var parseExtraArgs = function parseExtraArgs(extraArgs) {
|
|
108
|
+
var parseExtraArgs$1 = function parseExtraArgs(extraArgs) {
|
|
109
109
|
return ramda.toPairs(extraArgs).map(function (_ref) {
|
|
110
110
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
111
111
|
key = _ref2[0],
|
|
@@ -113,6 +113,81 @@ var parseExtraArgs = function parseExtraArgs(extraArgs) {
|
|
|
113
113
|
return "\n".concat(TAB_STRING, " ").concat(key, ": \"").concat(value, "\"");
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
|
+
var inlineEmbedCode$1 = function inlineEmbedCode(_ref3) {
|
|
117
|
+
var customization = _ref3.customization,
|
|
118
|
+
id = _ref3.id,
|
|
119
|
+
embedScriptLink = _ref3.embedScriptLink,
|
|
120
|
+
extraArgs = _ref3.extraArgs,
|
|
121
|
+
inlineWrapperStyle = _ref3.inlineWrapperStyle;
|
|
122
|
+
var elementSelector = customization.elementSelector,
|
|
123
|
+
_customization$width = customization.width,
|
|
124
|
+
width = _customization$width === void 0 ? 100 : _customization$width,
|
|
125
|
+
_customization$height = customization.height,
|
|
126
|
+
height = _customization$height === void 0 ? 100 : _customization$height,
|
|
127
|
+
queryParams = customization.queryParams;
|
|
128
|
+
return "\n <!-- ".concat(globalProps.appName, " inline embed code begins -->\n <div style=\"").concat(inlineWrapperStyle || "height: 90vh; width: 100%;", "\" id=\"").concat(elementSelector, "\">\n <!-- ").concat(globalProps.appName, " widget will be added here -->\n </div>\n ").concat(embedBaseScript(embedScriptLink), "\n <script>\n ").concat(camelCasedAppName$1, ".embed({\n type: \"inline\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n elementSelector: \"#").concat(elementSelector, "\",\n styles: { height: \"").concat(height, "%\", width: \"").concat(width, "%\"},").concat(embedQueryParam$1(queryParams)).concat(embedEnv$1()).concat(parseExtraArgs$1(extraArgs), "\n });\n </script>\n <!-- ").concat(globalProps.appName, " inline embed code ends -->");
|
|
129
|
+
};
|
|
130
|
+
var floatingPopupEmbedCode$1 = function floatingPopupEmbedCode(_ref4) {
|
|
131
|
+
var customization = _ref4.customization,
|
|
132
|
+
id = _ref4.id,
|
|
133
|
+
embedScriptLink = _ref4.embedScriptLink,
|
|
134
|
+
extraArgs = _ref4.extraArgs;
|
|
135
|
+
var btnTextColor = customization.btnTextColor,
|
|
136
|
+
showIcon = customization.showIcon,
|
|
137
|
+
btnText = customization.btnText,
|
|
138
|
+
btnPosition = customization.btnPosition,
|
|
139
|
+
btnColor = customization.btnColor,
|
|
140
|
+
icon = customization.icon,
|
|
141
|
+
queryParams = customization.queryParams;
|
|
142
|
+
return "\n <!-- ".concat(globalProps.appName, " floating-popup embed code begins -->\n ").concat(embedBaseScript(embedScriptLink), "\n <script>\n ").concat(camelCasedAppName$1, ".embed({\n type: \"floatingPopup\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n styles: {\n btnTextColor: \"").concat(btnTextColor, "\",\n btnPosition: \"").concat(btnPosition, "\",\n btnColor: \"").concat(btnColor, "\",\n btnText: \"").concat(btnText, "\", ").concat(icon ? "\n".concat(TAB_STRING).concat(TAB_STRING, "showIcon: ").concat(showIcon, ",") : "", "\n },").concat(embedQueryParam$1(queryParams)).concat(embedEnv$1()).concat(parseExtraArgs$1(extraArgs), "\n });\n </script>\n <!-- ").concat(globalProps.appName, " floating-popup embed code ends -->");
|
|
143
|
+
};
|
|
144
|
+
var elementPopupEmbedCode$1 = function elementPopupEmbedCode(_ref5) {
|
|
145
|
+
var customization = _ref5.customization,
|
|
146
|
+
id = _ref5.id,
|
|
147
|
+
embedScriptLink = _ref5.embedScriptLink,
|
|
148
|
+
extraArgs = _ref5.extraArgs;
|
|
149
|
+
var elementSelector = customization.elementSelector,
|
|
150
|
+
queryParams = customization.queryParams;
|
|
151
|
+
return "\n <!-- This is a demo button, you can use any element on your website instead. -->\n <button id=\"".concat(elementSelector, "\">Click to open popup</button>\n\n <!-- ").concat(globalProps.appName, " element-click embed code begins -->\n ").concat(embedBaseScript(embedScriptLink), "\n <script>\n ").concat(camelCasedAppName$1, ".embed({\n type: \"elementClick\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n elementSelector: \"#").concat(elementSelector, "\",").concat(embedQueryParam$1(queryParams)).concat(embedEnv$1()).concat(parseExtraArgs$1(extraArgs), "\n });\n </script>\n <!-- ").concat(globalProps.appName, " element-click embed code ends -->");
|
|
152
|
+
};
|
|
153
|
+
var htmlCodeGenerators = {
|
|
154
|
+
inline: inlineEmbedCode$1,
|
|
155
|
+
floatingPopup: floatingPopupEmbedCode$1,
|
|
156
|
+
elementPopup: elementPopupEmbedCode$1
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
var camelCasedAppName = globalProps.appName.replace(/^neeto/i, "neeto");
|
|
160
|
+
var embedFunctionName = "".concat(camelCasedAppName, "Embed");
|
|
161
|
+
var baseScript = "const baseScript = document.createElement(\"script\");\n baseScript.innerHTML = `window.".concat(camelCasedAppName, " = window.").concat(camelCasedAppName, " || { embed: function(){(").concat(camelCasedAppName, ".q=").concat(camelCasedAppName, ".q||[]).push(arguments)} };`\n document.body.appendChild(baseScript);\n");
|
|
162
|
+
var embedScript = function embedScript(scriptLink) {
|
|
163
|
+
return "const embedScript = document.createElement(\"script\");\n embedScript.src = \"".concat(scriptLink, "\";\n embedScript.async = true;\n document.body.appendChild(embedScript);\n");
|
|
164
|
+
};
|
|
165
|
+
var cleanupFunction = "// Cleanup function\n return () => {\n document.body.removeChild(baseScript);\n document.body.removeChild(embedScript);\n };";
|
|
166
|
+
var embedEnv = function embedEnv() {
|
|
167
|
+
return globalProps.railsEnv !== "production" ? "\n".concat(TAB_STRING).concat(TAB_STRING, "env: \"").concat(globalProps.railsEnv, "\",") : "";
|
|
168
|
+
};
|
|
169
|
+
var embedQueryParam = function embedQueryParam(queryParams) {
|
|
170
|
+
return queryParams ? "\n".concat(TAB_STRING).concat(TAB_STRING, "queryParams: ").concat(queryParams, ",") : "";
|
|
171
|
+
};
|
|
172
|
+
var parseExtraArgs = function parseExtraArgs(extraArgs) {
|
|
173
|
+
return ramda.toPairs(extraArgs).map(function (_ref) {
|
|
174
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
175
|
+
key = _ref2[0],
|
|
176
|
+
value = _ref2[1];
|
|
177
|
+
return "\n".concat(TAB_STRING).concat(TAB_STRING).concat(key, ": \"").concat(value, "\"");
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
var parseInlineStyle = function parseInlineStyle(styleString) {
|
|
181
|
+
return styleString ? styleString.split(";").map(function (rule) {
|
|
182
|
+
var _rule$split$map = rule.split(":").map(function (s) {
|
|
183
|
+
return s.trim();
|
|
184
|
+
}),
|
|
185
|
+
_rule$split$map2 = _slicedToArray(_rule$split$map, 2),
|
|
186
|
+
key = _rule$split$map2[0],
|
|
187
|
+
value = _rule$split$map2[1];
|
|
188
|
+
return key && value ? "".concat(key, ": \"").concat(value, "\"") : null;
|
|
189
|
+
}).filter(Boolean).join(", ") : 'height: "90vh", width: "100%"';
|
|
190
|
+
};
|
|
116
191
|
var inlineEmbedCode = function inlineEmbedCode(_ref3) {
|
|
117
192
|
var customization = _ref3.customization,
|
|
118
193
|
id = _ref3.id,
|
|
@@ -125,7 +200,7 @@ var inlineEmbedCode = function inlineEmbedCode(_ref3) {
|
|
|
125
200
|
_customization$height = customization.height,
|
|
126
201
|
height = _customization$height === void 0 ? 100 : _customization$height,
|
|
127
202
|
queryParams = customization.queryParams;
|
|
128
|
-
return "\n
|
|
203
|
+
return "\n import { useEffect } from \"react\";\n\n const App = () => {\n const ".concat(embedFunctionName, " = () => {\n ").concat(baseScript, "\n ").concat(embedScript(embedScriptLink), "\n ").concat(camelCasedAppName, ".embed({\n type: \"inline\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n elementSelector: \"#").concat(elementSelector, "\",\n styles: { height: \"").concat(height, "%\", width: \"").concat(width, "%\" },").concat(embedQueryParam(queryParams)).concat(embedEnv()).concat(parseExtraArgs(extraArgs), "\n });\n\n ").concat(cleanupFunction, "\n };\n\n useEffect(() => ").concat(embedFunctionName, "(), []);\n\n return (\n <div\n id=\"inline-embed-container\"\n style={{ ").concat(parseInlineStyle(inlineWrapperStyle), " }}\n />\n );\n };");
|
|
129
204
|
};
|
|
130
205
|
var floatingPopupEmbedCode = function floatingPopupEmbedCode(_ref4) {
|
|
131
206
|
var customization = _ref4.customization,
|
|
@@ -139,7 +214,7 @@ var floatingPopupEmbedCode = function floatingPopupEmbedCode(_ref4) {
|
|
|
139
214
|
btnColor = customization.btnColor,
|
|
140
215
|
icon = customization.icon,
|
|
141
216
|
queryParams = customization.queryParams;
|
|
142
|
-
return "\n
|
|
217
|
+
return "\n import { useEffect } from \"react\";\n\n const App = () => {\n const ".concat(embedFunctionName, " = () => {\n ").concat(baseScript, "\n ").concat(embedScript(embedScriptLink), "\n ").concat(camelCasedAppName, ".embed({\n type: \"floatingPopup\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n styles: {\n btnTextColor: \"").concat(btnTextColor, "\",\n btnPosition: \"").concat(btnPosition, "\",\n btnColor: \"").concat(btnColor, "\",\n btnText: \"").concat(btnText, "\",").concat(icon ? "\n".concat(TAB_STRING).concat(TAB_STRING, " showIcon: ").concat(showIcon, ",") : "", "\n },").concat(embedQueryParam(queryParams)).concat(embedEnv()).concat(parseExtraArgs(extraArgs), "\n });\n\n ").concat(cleanupFunction, "\n };\n\n useEffect(() => ").concat(embedFunctionName, "(), []);\n\n return <div />;\n };");
|
|
143
218
|
};
|
|
144
219
|
var elementPopupEmbedCode = function elementPopupEmbedCode(_ref5) {
|
|
145
220
|
var customization = _ref5.customization,
|
|
@@ -148,55 +223,34 @@ var elementPopupEmbedCode = function elementPopupEmbedCode(_ref5) {
|
|
|
148
223
|
extraArgs = _ref5.extraArgs;
|
|
149
224
|
var elementSelector = customization.elementSelector,
|
|
150
225
|
queryParams = customization.queryParams;
|
|
151
|
-
return "\n
|
|
152
|
-
};
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
embedScriptLink: embedScriptLink,
|
|
167
|
-
extraArgs: extraArgs,
|
|
168
|
-
inlineWrapperStyle: inlineWrapperStyle
|
|
169
|
-
});
|
|
170
|
-
case "floatingPopup":
|
|
171
|
-
return floatingPopupEmbedCode({
|
|
172
|
-
customization: customization,
|
|
173
|
-
id: id,
|
|
174
|
-
embedScriptLink: embedScriptLink,
|
|
175
|
-
extraArgs: extraArgs
|
|
176
|
-
});
|
|
177
|
-
case "elementPopup":
|
|
178
|
-
return elementPopupEmbedCode({
|
|
179
|
-
customization: customization,
|
|
180
|
-
id: id,
|
|
181
|
-
embedScriptLink: embedScriptLink,
|
|
182
|
-
extraArgs: extraArgs
|
|
183
|
-
});
|
|
184
|
-
default:
|
|
185
|
-
return "";
|
|
186
|
-
}
|
|
226
|
+
return "\n import { useEffect } from \"react\";\n\n const App = () => {\n const ".concat(embedFunctionName, " = () => {\n ").concat(baseScript, "\n ").concat(embedScript(embedScriptLink), "\n ").concat(camelCasedAppName, ".embed({\n type: \"elementClick\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n elementSelector: \"#").concat(elementSelector, "\",").concat(embedQueryParam(queryParams)).concat(embedEnv()).concat(parseExtraArgs(extraArgs), "\n });\n\n ").concat(cleanupFunction, "\n };\n\n useEffect(() => ").concat(embedFunctionName, "(), []);\n\n return <div />;\n };");
|
|
227
|
+
};
|
|
228
|
+
var reactCodeGenerators = {
|
|
229
|
+
inline: inlineEmbedCode,
|
|
230
|
+
floatingPopup: floatingPopupEmbedCode,
|
|
231
|
+
elementPopup: elementPopupEmbedCode
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
var _excluded = ["tab", "type"];
|
|
235
|
+
var generateCode = function generateCode(options) {
|
|
236
|
+
var _reactCodeGenerators$, _htmlCodeGenerators$t;
|
|
237
|
+
var tab = options.tab,
|
|
238
|
+
type = options.type,
|
|
239
|
+
embeddedCodeOptions = _objectWithoutProperties(options, _excluded);
|
|
240
|
+
return tab === "react" ? (_reactCodeGenerators$ = reactCodeGenerators[type]) === null || _reactCodeGenerators$ === void 0 ? void 0 : _reactCodeGenerators$.call(reactCodeGenerators, embeddedCodeOptions) : (_htmlCodeGenerators$t = htmlCodeGenerators[type]) === null || _htmlCodeGenerators$t === void 0 ? void 0 : _htmlCodeGenerators$t.call(htmlCodeGenerators, embeddedCodeOptions);
|
|
187
241
|
};
|
|
188
242
|
var buildDefaultCustomization = function buildDefaultCustomization(defaultCustomizations) {
|
|
189
243
|
return ramda.mergeDeepLeft(defaultCustomizations, DEFAULT_CUSTOMIZATION);
|
|
190
244
|
};
|
|
191
245
|
var buildQueryParamsFromInputFields = function buildQueryParamsFromInputFields(inputFields) {
|
|
192
|
-
var filteredInputFields = inputFields.filter(function (
|
|
193
|
-
var name =
|
|
194
|
-
value =
|
|
246
|
+
var filteredInputFields = inputFields.filter(function (_ref) {
|
|
247
|
+
var name = _ref.name,
|
|
248
|
+
value = _ref.value;
|
|
195
249
|
return name && value;
|
|
196
250
|
});
|
|
197
|
-
var queryParams = filteredInputFields.reduce(function (queryParams,
|
|
198
|
-
var name =
|
|
199
|
-
value =
|
|
251
|
+
var queryParams = filteredInputFields.reduce(function (queryParams, _ref2) {
|
|
252
|
+
var name = _ref2.name,
|
|
253
|
+
value = _ref2.value;
|
|
200
254
|
queryParams[name] = value;
|
|
201
255
|
return queryParams;
|
|
202
256
|
}, {});
|
|
@@ -517,14 +571,15 @@ var Customization = function Customization(_ref) {
|
|
|
517
571
|
};
|
|
518
572
|
|
|
519
573
|
var Header = function Header(_ref) {
|
|
520
|
-
var
|
|
521
|
-
setTab = _ref.setTab
|
|
574
|
+
var supportedLanguagesTabs = _ref.supportedLanguagesTabs,
|
|
575
|
+
setTab = _ref.setTab,
|
|
576
|
+
tab = _ref.tab;
|
|
522
577
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
523
|
-
className: "flex w-full
|
|
578
|
+
className: "flex w-full",
|
|
524
579
|
children: /*#__PURE__*/jsxRuntime.jsx(Tab, {
|
|
525
580
|
noUnderline: true,
|
|
526
581
|
className: "neeto-molecules-product-embed-tab",
|
|
527
|
-
children:
|
|
582
|
+
children: supportedLanguagesTabs.map(function (_ref2) {
|
|
528
583
|
var key = _ref2.key,
|
|
529
584
|
label = _ref2.label,
|
|
530
585
|
icon = _ref2.icon;
|
|
@@ -677,6 +732,8 @@ var Preview = function Preview(_ref) {
|
|
|
677
732
|
});
|
|
678
733
|
}
|
|
679
734
|
return /*#__PURE__*/jsxRuntime.jsx(BrowserPreview, {
|
|
735
|
+
className: "h-full",
|
|
736
|
+
wrapperClassName: "neeto-molecules-embed__browser-preview pointer-events-auto",
|
|
680
737
|
children: /*#__PURE__*/jsxRuntime.jsx(Component, {
|
|
681
738
|
customization: customization,
|
|
682
739
|
iframeURL: iframeURL
|
|
@@ -684,7 +741,7 @@ var Preview = function Preview(_ref) {
|
|
|
684
741
|
});
|
|
685
742
|
};
|
|
686
743
|
|
|
687
|
-
var css = ".neeto-molecules-product-embed-size-input.neeto-ui-input__wrapper .neeto-ui-input__prefix{align-self:stretch;background-color:rgb(var(--neeto-ui-gray-200));margin-left:0!important;padding-left:.75rem;padding-right:.75rem}.neeto-molecules-product-embed-tab{gap:.5rem}.neeto-molecules-product-embed-tab .neeto-ui-tab{border-radius:var(--neeto-ui-btn-border-radius);color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-product-embed-tab .neeto-ui-tab:not(.active):hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-product-embed-tab .neeto-ui-tab.active{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-embed__left-sidebar{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto;padding:1.5rem;width:100%}@media (min-width:768px){.neeto-molecules-embed__left-sidebar{border-right:1px solid rgb(var(--neeto-ui-gray-200));max-width:25rem}}@media (min-width:1024px){.neeto-molecules-embed__left-sidebar{max-width:27.5rem}}";
|
|
744
|
+
var css = ".neeto-molecules-product-embed-size-input.neeto-ui-input__wrapper .neeto-ui-input__prefix{align-self:stretch;background-color:rgb(var(--neeto-ui-gray-200));margin-left:0!important;padding-left:.75rem;padding-right:.75rem}.neeto-molecules-product-embed-tab{gap:.5rem}.neeto-molecules-product-embed-tab .neeto-ui-tab{border-radius:var(--neeto-ui-btn-border-radius);color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-product-embed-tab .neeto-ui-tab:not(.active):hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-product-embed-tab .neeto-ui-tab.active{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-embed__left-sidebar{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto;padding:1.5rem;width:100%}@media (min-width:768px){.neeto-molecules-embed__left-sidebar{border-right:1px solid rgb(var(--neeto-ui-gray-200));max-width:25rem}}@media (min-width:1024px){.neeto-molecules-embed__left-sidebar{max-width:27.5rem}}.neeto-molecules-embed__code-block .neeto-molecules-code-block{font-size:.875rem;height:15.625rem;margin-top:0!important}.neeto-molecules-embed__browser-preview{height:100%;min-height:18.75rem}.neeto-molecules-embed__browser-preview .neeto-molecules-browser-preview__body{position:relative}.neeto-molecules-embed__browser-preview .neeto-molecules-browser-preview__body iframe{height:100%;left:0;position:absolute;top:0;width:100%}";
|
|
688
745
|
injectCss.n(css,{});
|
|
689
746
|
|
|
690
747
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -708,12 +765,19 @@ var ProductEmbed = function ProductEmbed(_ref) {
|
|
|
708
765
|
_ref$otherCustomizati = _ref.otherCustomizations,
|
|
709
766
|
otherCustomizations = _ref$otherCustomizati === void 0 ? neetoCist.noop : _ref$otherCustomizati,
|
|
710
767
|
_ref$inlineWrapperSty = _ref.inlineWrapperStyle,
|
|
711
|
-
inlineWrapperStyle = _ref$inlineWrapperSty === void 0 ? "" : _ref$inlineWrapperSty
|
|
768
|
+
inlineWrapperStyle = _ref$inlineWrapperSty === void 0 ? "" : _ref$inlineWrapperSty,
|
|
769
|
+
_ref$supportedLanguag = _ref.supportedLanguages,
|
|
770
|
+
supportedLanguages = _ref$supportedLanguag === void 0 ? ["html"] : _ref$supportedLanguag;
|
|
771
|
+
var supportedLanguagesTabs = neetoCist.filterBy({
|
|
772
|
+
key: function key(_key) {
|
|
773
|
+
return supportedLanguages === null || supportedLanguages === void 0 ? void 0 : supportedLanguages.includes(_key);
|
|
774
|
+
}
|
|
775
|
+
}, TABS);
|
|
712
776
|
var _useState = React.useState(true),
|
|
713
777
|
_useState2 = _slicedToArray(_useState, 2),
|
|
714
778
|
isScriptLoading = _useState2[0],
|
|
715
779
|
setIsScriptLoading = _useState2[1];
|
|
716
|
-
var _useState3 = React.useState(
|
|
780
|
+
var _useState3 = React.useState(supportedLanguagesTabs[0].key),
|
|
717
781
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
718
782
|
tab = _useState4[0],
|
|
719
783
|
setTab = _useState4[1];
|
|
@@ -730,8 +794,9 @@ var ProductEmbed = function ProductEmbed(_ref) {
|
|
|
730
794
|
var _useTranslation = reactI18next.useTranslation(),
|
|
731
795
|
t = _useTranslation.t;
|
|
732
796
|
var embedScriptLink = customEmbedScriptPath || "".concat(window.location.protocol, "//").concat(window.location.host, "/javascript/embed.js");
|
|
733
|
-
var code =
|
|
797
|
+
var code = generateCode({
|
|
734
798
|
id: id,
|
|
799
|
+
tab: tab,
|
|
735
800
|
type: selectedOption,
|
|
736
801
|
customization: customizations[selectedOption],
|
|
737
802
|
embedScriptLink: embedScriptLink,
|
|
@@ -788,21 +853,30 @@ var ProductEmbed = function ProductEmbed(_ref) {
|
|
|
788
853
|
})]
|
|
789
854
|
})]
|
|
790
855
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
791
|
-
className: "neeto-molecules-embed__preview neeto-ui-bg-white flex min-h-screen w-full min-w-0 flex-col gap-
|
|
856
|
+
className: "neeto-molecules-embed__preview neeto-ui-bg-white flex min-h-screen w-full min-w-0 flex-col gap-3 overflow-y-auto p-6 md:min-h-0 md:flex-grow",
|
|
792
857
|
children: [/*#__PURE__*/jsxRuntime.jsx(Header, {
|
|
793
858
|
setTab: setTab,
|
|
859
|
+
supportedLanguagesTabs: supportedLanguagesTabs,
|
|
794
860
|
tab: tab
|
|
795
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
796
|
-
className: "flex flex-grow
|
|
797
|
-
children:
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
861
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
862
|
+
className: "flex min-h-0 flex-grow flex-col gap-3",
|
|
863
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
864
|
+
className: "flex-shrink-0",
|
|
865
|
+
"data-testid": "embed-code-block",
|
|
866
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Code, {
|
|
867
|
+
code: code,
|
|
868
|
+
tab: tab
|
|
869
|
+
})
|
|
870
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
871
|
+
className: "flex-grow",
|
|
872
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Preview, {
|
|
873
|
+
customPreviewIframeUrl: customPreviewIframeUrl,
|
|
874
|
+
id: id,
|
|
875
|
+
isScriptLoading: isScriptLoading,
|
|
876
|
+
selectedOption: selectedOption,
|
|
877
|
+
customization: customizations[selectedOption]
|
|
878
|
+
})
|
|
879
|
+
})]
|
|
806
880
|
})]
|
|
807
881
|
})]
|
|
808
882
|
});
|