@webjet/react 4.12.13 → 4.12.14
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/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-card-info.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},u=t.getTestGroupFromCookie=function(t){var o=(0,e.getCookieStorage)("wj_feature_on");return o?i(o,t):null},a=t.getTestGroupFromUrl=function(t){var e,o,r=new URLSearchParams(null===(e=window)||void 0===e||null===(o=e.location)||void 0===o?void 0:o.search);if(r.has(s)){var n=r.get(s);return i(n,t)}return null};t.getFeatureToggle=function(t,e){var o=e?t:null==t?void 0:t.filter(function(t){return!(null!=t&&t.splitTest)});return o&&Array.isArray(o)&&null!=o&&o.length?null==o?void 0:o.map(function(t){var e=t.name,o=t.isEnabled,r=t.splitTest,s=u(e)||a(e),i=
|
|
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},u=t.getTestGroupFromCookie=function(t){var o=(0,e.getCookieStorage)("wj_feature_on");return o?i(o,t):null},a=t.getTestGroupFromUrl=function(t){var e,o,r=new URLSearchParams(null===(e=window)||void 0===e||null===(o=e.location)||void 0===o?void 0:o.search);if(r.has(s)){var n=r.get(s);return i(n,t)}return null};t.getFeatureToggle=function(t,e){var o=e?t:null==t?void 0:t.filter(function(t){return!(null!=t&&t.splitTest)});return o&&Array.isArray(o)&&null!=o&&o.length?null==o?void 0:o.map(function(t){var e=t.name,o=t.isEnabled,r=t.splitTest,s=u(e)||a(e),i=o,l=o?n.SPLIT_TEST_GROUPS.TEST_1:n.SPLIT_TEST_GROUPS.CONTROL;if(s)i=s!==n.SPLIT_TEST_GROUPS.CONTROL,l=s;else if(o){var g=(0,n.getSplitTestGroup)(e,r);g?(i=g!==n.SPLIT_TEST_GROUPS.CONTROL,l=g):r&&!g&&(i=!1,l=n.SPLIT_TEST_GROUPS.CONTROL)}return{name:e,isEnabled:i,testGroup:l}}):null}})(),module.exports=r})();
|