@mxenabled/connect-widget 0.16.0 → 0.17.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/index.es.js +123 -22
- package/dist/index.es.js.map +1 -1
- package/dist/lastBuild.txt +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5131,23 +5131,39 @@ function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
|
|
|
5131
5131
|
}
|
|
5132
5132
|
var _baseFindIndex = baseFindIndex$2;
|
|
5133
5133
|
|
|
5134
|
-
var
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5134
|
+
var _trimmedEndIndex;
|
|
5135
|
+
var hasRequired_trimmedEndIndex;
|
|
5136
|
+
|
|
5137
|
+
function require_trimmedEndIndex () {
|
|
5138
|
+
if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
|
|
5139
|
+
hasRequired_trimmedEndIndex = 1;
|
|
5140
|
+
var reWhitespace = /\s/;
|
|
5141
|
+
function trimmedEndIndex(string) {
|
|
5142
|
+
var index = string.length;
|
|
5143
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
5144
|
+
}
|
|
5145
|
+
return index;
|
|
5146
|
+
}
|
|
5147
|
+
_trimmedEndIndex = trimmedEndIndex;
|
|
5148
|
+
return _trimmedEndIndex;
|
|
5140
5149
|
}
|
|
5141
|
-
var _trimmedEndIndex = trimmedEndIndex$1;
|
|
5142
5150
|
|
|
5143
|
-
var
|
|
5144
|
-
var
|
|
5145
|
-
|
|
5146
|
-
|
|
5151
|
+
var _baseTrim;
|
|
5152
|
+
var hasRequired_baseTrim;
|
|
5153
|
+
|
|
5154
|
+
function require_baseTrim () {
|
|
5155
|
+
if (hasRequired_baseTrim) return _baseTrim;
|
|
5156
|
+
hasRequired_baseTrim = 1;
|
|
5157
|
+
var trimmedEndIndex = require_trimmedEndIndex();
|
|
5158
|
+
var reTrimStart = /^\s+/;
|
|
5159
|
+
function baseTrim(string) {
|
|
5160
|
+
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
5161
|
+
}
|
|
5162
|
+
_baseTrim = baseTrim;
|
|
5163
|
+
return _baseTrim;
|
|
5147
5164
|
}
|
|
5148
|
-
var _baseTrim = baseTrim$1;
|
|
5149
5165
|
|
|
5150
|
-
var baseTrim =
|
|
5166
|
+
var baseTrim = require_baseTrim(), isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
|
|
5151
5167
|
var NAN = 0 / 0;
|
|
5152
5168
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
5153
5169
|
var reIsBinary = /^0b[01]+$/i;
|
|
@@ -8613,7 +8629,7 @@ var hasRequiredTrim;
|
|
|
8613
8629
|
function requireTrim () {
|
|
8614
8630
|
if (hasRequiredTrim) return trim_1;
|
|
8615
8631
|
hasRequiredTrim = 1;
|
|
8616
|
-
var baseToString = _baseToString, baseTrim =
|
|
8632
|
+
var baseToString = _baseToString, baseTrim = require_baseTrim(), castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
|
|
8617
8633
|
function trim(string, chars, guard) {
|
|
8618
8634
|
string = toString(string);
|
|
8619
8635
|
if (string && (guard || chars === void 0)) {
|
|
@@ -9500,6 +9516,7 @@ const COMBO_JOB_DATA_TYPES = {
|
|
|
9500
9516
|
};
|
|
9501
9517
|
|
|
9502
9518
|
const initialState$5 = {
|
|
9519
|
+
_initialValues: "",
|
|
9503
9520
|
is_mobile_webview: false,
|
|
9504
9521
|
target_origin_referrer: null,
|
|
9505
9522
|
ui_message_protocol: "post_message",
|
|
@@ -9533,12 +9550,23 @@ const configSlice = createSlice({
|
|
|
9533
9550
|
(state, action) => {
|
|
9534
9551
|
const productDetermineMode = getProductDeterminedMode(action.payload);
|
|
9535
9552
|
const ui_message_version = typeof action.payload.ui_message_version === "string" ? parseInt(action.payload.ui_message_version, 10) : action.payload.ui_message_version || state.ui_message_version;
|
|
9536
|
-
|
|
9553
|
+
const loadedState = {
|
|
9537
9554
|
...state,
|
|
9538
9555
|
...action.payload,
|
|
9539
9556
|
ui_message_version,
|
|
9540
9557
|
mode: productDetermineMode !== null ? productDetermineMode : action.payload.mode || state.mode
|
|
9541
9558
|
};
|
|
9559
|
+
const { _initialValues, ...stateWithoutInitialValues } = loadedState;
|
|
9560
|
+
return {
|
|
9561
|
+
...stateWithoutInitialValues,
|
|
9562
|
+
// _initialValues is a reference to the values that were used to load the widget initially.
|
|
9563
|
+
// It is meant to be set, and then READ ONLY after that.
|
|
9564
|
+
// Example:
|
|
9565
|
+
// When a user dynamically changes the mode, use_cases, or data for a connection we need to
|
|
9566
|
+
// reset the mode, use_cases, and data to the initial state for the next connection attempt.
|
|
9567
|
+
// JSON is used here to deeply copy the object, use a selector to get the values.
|
|
9568
|
+
_initialValues: JSON.stringify(stateWithoutInitialValues)
|
|
9569
|
+
};
|
|
9542
9570
|
}
|
|
9543
9571
|
);
|
|
9544
9572
|
}
|
|
@@ -14578,7 +14606,7 @@ var isPropValid = /* @__PURE__ */ memoize$2(
|
|
|
14578
14606
|
/* Z+1 */
|
|
14579
14607
|
);
|
|
14580
14608
|
|
|
14581
|
-
var isDevelopment$
|
|
14609
|
+
var isDevelopment$3 = false;
|
|
14582
14610
|
function sheetForTag(tag) {
|
|
14583
14611
|
if (tag.sheet) {
|
|
14584
14612
|
return tag.sheet;
|
|
@@ -14619,7 +14647,7 @@ var StyleSheet = /* @__PURE__ */ function() {
|
|
|
14619
14647
|
_this.container.insertBefore(tag, before);
|
|
14620
14648
|
_this.tags.push(tag);
|
|
14621
14649
|
};
|
|
14622
|
-
this.isSpeedy = options.speedy === void 0 ? !isDevelopment$
|
|
14650
|
+
this.isSpeedy = options.speedy === void 0 ? !isDevelopment$3 : options.speedy;
|
|
14623
14651
|
this.tags = [];
|
|
14624
14652
|
this.ctr = 0;
|
|
14625
14653
|
this.nonce = options.nonce;
|
|
@@ -15057,7 +15085,8 @@ var compat = function compat2(element) {
|
|
|
15057
15085
|
element.length < 1) {
|
|
15058
15086
|
return;
|
|
15059
15087
|
}
|
|
15060
|
-
var value = element.value
|
|
15088
|
+
var value = element.value;
|
|
15089
|
+
var parent = element.parent;
|
|
15061
15090
|
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
15062
15091
|
while (parent.type !== "rule") {
|
|
15063
15092
|
parent = parent.parent;
|
|
@@ -15728,7 +15757,7 @@ var unitlessKeys = {
|
|
|
15728
15757
|
strokeWidth: 1
|
|
15729
15758
|
};
|
|
15730
15759
|
|
|
15731
|
-
var isDevelopment$
|
|
15760
|
+
var isDevelopment$2 = false;
|
|
15732
15761
|
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
15733
15762
|
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
15734
15763
|
var isCustomProperty = function isCustomProperty2(property) {
|
|
@@ -15836,7 +15865,7 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
15836
15865
|
string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
15837
15866
|
}
|
|
15838
15867
|
} else {
|
|
15839
|
-
if (key === "NO_COMPONENT_SELECTOR" && isDevelopment$
|
|
15868
|
+
if (key === "NO_COMPONENT_SELECTOR" && isDevelopment$2) {
|
|
15840
15869
|
throw new Error(noComponentSelectorMessage);
|
|
15841
15870
|
}
|
|
15842
15871
|
if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
|
|
@@ -15908,6 +15937,7 @@ var useInsertionEffect = React$2["useInsertionEffect"] ? React$2["useInsertionEf
|
|
|
15908
15937
|
var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;
|
|
15909
15938
|
var useInsertionEffectWithLayoutFallback = useInsertionEffect || React$2.useLayoutEffect;
|
|
15910
15939
|
|
|
15940
|
+
var isDevelopment$1 = false;
|
|
15911
15941
|
var EmotionCacheContext = /* @__PURE__ */ React$2.createContext(
|
|
15912
15942
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
15913
15943
|
// because this module is primarily intended for the browser and node
|
|
@@ -15927,6 +15957,58 @@ var withEmotionCache = function withEmotionCache2(func) {
|
|
|
15927
15957
|
});
|
|
15928
15958
|
};
|
|
15929
15959
|
var ThemeContext$1 = /* @__PURE__ */ React$2.createContext({});
|
|
15960
|
+
var hasOwn = {}.hasOwnProperty;
|
|
15961
|
+
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
15962
|
+
var createEmotionProps = function createEmotionProps2(type, props) {
|
|
15963
|
+
var newProps = {};
|
|
15964
|
+
for (var _key in props) {
|
|
15965
|
+
if (hasOwn.call(props, _key)) {
|
|
15966
|
+
newProps[_key] = props[_key];
|
|
15967
|
+
}
|
|
15968
|
+
}
|
|
15969
|
+
newProps[typePropName] = type;
|
|
15970
|
+
return newProps;
|
|
15971
|
+
};
|
|
15972
|
+
var Insertion$1 = function Insertion2(_ref) {
|
|
15973
|
+
var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
|
|
15974
|
+
registerStyles(cache, serialized, isStringTag);
|
|
15975
|
+
useInsertionEffectAlwaysWithSyncFallback(function() {
|
|
15976
|
+
return insertStyles(cache, serialized, isStringTag);
|
|
15977
|
+
});
|
|
15978
|
+
return null;
|
|
15979
|
+
};
|
|
15980
|
+
var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
15981
|
+
var cssProp = props.css;
|
|
15982
|
+
if (typeof cssProp === "string" && cache.registered[cssProp] !== void 0) {
|
|
15983
|
+
cssProp = cache.registered[cssProp];
|
|
15984
|
+
}
|
|
15985
|
+
var WrappedComponent = props[typePropName];
|
|
15986
|
+
var registeredStyles = [cssProp];
|
|
15987
|
+
var className = "";
|
|
15988
|
+
if (typeof props.className === "string") {
|
|
15989
|
+
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
15990
|
+
} else if (props.className != null) {
|
|
15991
|
+
className = props.className + " ";
|
|
15992
|
+
}
|
|
15993
|
+
var serialized = serializeStyles(registeredStyles, void 0, React$2.useContext(ThemeContext$1));
|
|
15994
|
+
className += cache.key + "-" + serialized.name;
|
|
15995
|
+
var newProps = {};
|
|
15996
|
+
for (var _key2 in props) {
|
|
15997
|
+
if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && !isDevelopment$1) {
|
|
15998
|
+
newProps[_key2] = props[_key2];
|
|
15999
|
+
}
|
|
16000
|
+
}
|
|
16001
|
+
newProps.className = className;
|
|
16002
|
+
if (ref) {
|
|
16003
|
+
newProps.ref = ref;
|
|
16004
|
+
}
|
|
16005
|
+
return /* @__PURE__ */ React$2.createElement(React$2.Fragment, null, /* @__PURE__ */ React$2.createElement(Insertion$1, {
|
|
16006
|
+
cache,
|
|
16007
|
+
serialized,
|
|
16008
|
+
isStringTag: typeof WrappedComponent === "string"
|
|
16009
|
+
}), /* @__PURE__ */ React$2.createElement(WrappedComponent, newProps));
|
|
16010
|
+
});
|
|
16011
|
+
var Emotion$1 = Emotion;
|
|
15930
16012
|
|
|
15931
16013
|
var _extends = {exports: {}};
|
|
15932
16014
|
|
|
@@ -15952,6 +16034,25 @@ function require_extends () {
|
|
|
15952
16034
|
|
|
15953
16035
|
require_extends();
|
|
15954
16036
|
|
|
16037
|
+
var jsx = function jsx2(type, props) {
|
|
16038
|
+
var args = arguments;
|
|
16039
|
+
if (props == null || !hasOwn.call(props, "css")) {
|
|
16040
|
+
return React$2.createElement.apply(void 0, args);
|
|
16041
|
+
}
|
|
16042
|
+
var argsLength = args.length;
|
|
16043
|
+
var createElementArgArray = new Array(argsLength);
|
|
16044
|
+
createElementArgArray[0] = Emotion$1;
|
|
16045
|
+
createElementArgArray[1] = createEmotionProps(type, props);
|
|
16046
|
+
for (var i = 2; i < argsLength; i++) {
|
|
16047
|
+
createElementArgArray[i] = args[i];
|
|
16048
|
+
}
|
|
16049
|
+
return React$2.createElement.apply(null, createElementArgArray);
|
|
16050
|
+
};
|
|
16051
|
+
(function(_jsx) {
|
|
16052
|
+
var JSX;
|
|
16053
|
+
/* @__PURE__ */ (function(_JSX) {
|
|
16054
|
+
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
16055
|
+
})(jsx || (jsx = {}));
|
|
15955
16056
|
var Global = /* @__PURE__ */ withEmotionCache(function(props, cache) {
|
|
15956
16057
|
var styles = props.styles;
|
|
15957
16058
|
var serialized = serializeStyles([styles], void 0, React$2.useContext(ThemeContext$1));
|
|
@@ -16004,7 +16105,7 @@ function css() {
|
|
|
16004
16105
|
}
|
|
16005
16106
|
return serializeStyles(args);
|
|
16006
16107
|
}
|
|
16007
|
-
|
|
16108
|
+
function keyframes() {
|
|
16008
16109
|
var insertable = css.apply(void 0, arguments);
|
|
16009
16110
|
var name = "animation-" + insertable.name;
|
|
16010
16111
|
return {
|
|
@@ -16015,7 +16116,7 @@ var keyframes = function keyframes2() {
|
|
|
16015
16116
|
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
16016
16117
|
}
|
|
16017
16118
|
};
|
|
16018
|
-
}
|
|
16119
|
+
}
|
|
16019
16120
|
|
|
16020
16121
|
var testOmitPropsOnStringTag = isPropValid;
|
|
16021
16122
|
var testOmitPropsOnComponent = function testOmitPropsOnComponent2(key) {
|