@webjet/react 4.19.2 → 4.20.1
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/components/badge.js +1 -1
- package/components/date-picker-input.js +1 -1
- package/components/date-picker.js +1 -1
- package/components/date-range-picker-input.js +1 -1
- package/components/date-range-picker.js +1 -1
- package/components/feature-toggle.js +1 -1
- package/components/flight-details.js +1 -1
- package/package.json +1 -1
- package/utils/featureToggle.js +1 -1
package/package.json
CHANGED
package/utils/featureToggle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={53956(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.splitTest=e.getSplitTestGroup=e.SPLIT_TEST_GROUPS=void 0,e.SPLIT_TEST_GROUPS={CONTROL:"control",TEST_1:"test_1",TEST_2:"test_2"},e.splitTest=function(t,e){var r=(t||{}).splitTest,n=(void 0===r?{}:r)[e];return o(e,n)};var o=e.getSplitTestGroup=function(t,e){if(t&&e&&"function"==typeof window.split_test_group){var o=e.split(":").length;return window.split_test_group(t,2,o,e).test_group}return null}},84513(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.setSessionStorageJson=e.setSessionStorage=e.setCookieStorage=e.getSessionStorageJson=e.getSessionStorage=e.getCookieStorage=e.getAllCookiesStorage=void 0;var o=function(){var t="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(t,1),window.sessionStorage.removeItem(t),!0)}catch(t){return!1}},r=(e.getSessionStorage=function(t){if(t&&o())try{return window.sessionStorage.getItem(t)}catch(t){return}},e.setSessionStorage=function(t,e){if(t&&o())try{return window.sessionStorage.setItem(t,e)}catch(t){return}},e.getSessionStorageJson=function(t){if(t&&o())try{return JSON.parse(window.sessionStorage.getItem(t))}catch(t){return}},e.setSessionStorageJson=function(t,e){if(t&&o())try{return window.sessionStorage.setItem(t,JSON.stringify(e))}catch(t){return}},e.getCookieStorage=function(t){var e=r(t);return e.length>0?e[0]:null},e.getAllCookiesStorage=function(t){for(var e=t+"=",o=document.cookie.split(";"),r=[],n=0;n<o.length;n++){for(var s=o[n];" "===s.charAt(0);)s=s.substring(1,s.length);0===s.indexOf(e)&&r.push(s.substring(e.length,s.length))}return r});e.setCookieStorage=function(t,e,o){var r=window.location.hostname,n="localhost"===r?r:r.match(/(\.\w+){3}$/g);document.cookie="".concat(t,"=").concat(e,"; Domain=").concat(n,"; Path=/; Max-Age=").concat(o||86400)}}},e={};function o(r){var n=e[r];if(void 0!==n)return n.exports;var s=e[r]={exports:{}};return t[r](s,s.exports,o),s.exports}var r={};(()=>{var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.getTestGroupFromUrl=t.getTestGroupFromString=t.getTestGroupFromCookie=t.getFeatureToggle=void 0;var e=o(84513),n=o(53956),s="features",i=t.getTestGroupFromString=function(t,e){var o,r=null==t||null===(o=t.split(","))||void 0===o?void 0:o.find(function(t){return t.split("|")[0]===e});return r?r.split("|").at(1)||n.SPLIT_TEST_GROUPS.TEST_1:null},
|
|
1
|
+
(()=>{"use strict";var t={53956(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.splitTest=e.getSplitTestGroup=e.SPLIT_TEST_GROUPS=void 0,e.SPLIT_TEST_GROUPS={CONTROL:"control",TEST_1:"test_1",TEST_2:"test_2"},e.splitTest=function(t,e){var r=(t||{}).splitTest,n=(void 0===r?{}:r)[e];return o(e,n)};var o=e.getSplitTestGroup=function(t,e){if(t&&e&&"function"==typeof window.split_test_group){var o=e.split(":").length;return window.split_test_group(t,2,o,e).test_group}return null}},84513(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.setSessionStorageJson=e.setSessionStorage=e.setCookieStorage=e.getSessionStorageJson=e.getSessionStorage=e.getCookieStorage=e.getAllCookiesStorage=void 0;var o=function(){var t="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(t,1),window.sessionStorage.removeItem(t),!0)}catch(t){return!1}},r=(e.getSessionStorage=function(t){if(t&&o())try{return window.sessionStorage.getItem(t)}catch(t){return}},e.setSessionStorage=function(t,e){if(t&&o())try{return window.sessionStorage.setItem(t,e)}catch(t){return}},e.getSessionStorageJson=function(t){if(t&&o())try{return JSON.parse(window.sessionStorage.getItem(t))}catch(t){return}},e.setSessionStorageJson=function(t,e){if(t&&o())try{return window.sessionStorage.setItem(t,JSON.stringify(e))}catch(t){return}},e.getCookieStorage=function(t){var e=r(t);return e.length>0?e[0]:null},e.getAllCookiesStorage=function(t){for(var e=t+"=",o=document.cookie.split(";"),r=[],n=0;n<o.length;n++){for(var s=o[n];" "===s.charAt(0);)s=s.substring(1,s.length);0===s.indexOf(e)&&r.push(s.substring(e.length,s.length))}return r});e.setCookieStorage=function(t,e,o){var r=window.location.hostname,n="localhost"===r?r:r.match(/(\.\w+){3}$/g);document.cookie="".concat(t,"=").concat(e,"; Domain=").concat(n,"; Path=/; Max-Age=").concat(o||86400)}}},e={};function o(r){var n=e[r];if(void 0!==n)return n.exports;var s=e[r]={exports:{}};return t[r](s,s.exports,o),s.exports}var r={};(()=>{var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.getTestGroupFromUrl=t.getTestGroupFromString=t.getTestGroupFromCookie=t.getFeatureToggle=t.assignTestGroup=void 0;var e=o(84513),n=o(53956),s="features",i="manual",u=t.getTestGroupFromString=function(t,e){var o,r=null==t||null===(o=t.split(","))||void 0===o?void 0:o.find(function(t){return t.split("|")[0]===e});return r?r.split("|").at(1)||n.SPLIT_TEST_GROUPS.TEST_1:null},a=t.getTestGroupFromCookie=function(t){var o=(0,e.getCookieStorage)("wj_feature_on");return o?u(o,t):null},l=t.getTestGroupFromUrl=function(t){var e,o=new URLSearchParams(null===(e=window)||void 0===e||null===(e=e.location)||void 0===e?void 0:e.search);if(o.has(s)){var r=o.get(s);return u(r,t)}return null},g=(t.getFeatureToggle=function(t,e,o){var r=e?t:null==t?void 0:t.filter(function(t){return!(null!=t&&t.splitTest)});return r&&Array.isArray(r)&&null!=r&&r.length?null==r?void 0:r.map(function(t){var e=t.name,r=t.isEnabled,s=t.splitTest,u=t.splitTestMode,S=a(e)||l(e),T=r,c=r?n.SPLIT_TEST_GROUPS.TEST_1:n.SPLIT_TEST_GROUPS.CONTROL,p=!1;if(S)T=S!==n.SPLIT_TEST_GROUPS.CONTROL,c=S;else if(r&&s)if(u!==i){var f=g(e,s);T=f.isEnabled,c=f.testGroup}else if(u!==i||null!=o&&o.includes(e)){var d=g(e,s);T=d.isEnabled,c=d.testGroup,p=!1}else T=!1,c=null,p=!0;return{name:e,isEnabled:T,isPending:p,testGroup:c}}):null},t.assignTestGroup=function(t,e){var o=(0,n.getSplitTestGroup)(t,e),r=!1,s=n.SPLIT_TEST_GROUPS.CONTROL;return o&&(r=o!==n.SPLIT_TEST_GROUPS.CONTROL,s=o),{isEnabled:r,testGroup:s}})})(),module.exports=r})();
|