@mxenabled/connect-widget 1.2.8 → 2.0.0
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/README.md +7 -2
- package/dist/index.es.js +54 -33
- package/dist/index.es.js.map +1 -1
- package/dist/lastBuild.txt +1 -1
- package/dist/style.css +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,8 +15,9 @@ npm install @mxenabled/connect-widget
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
17
|
1. Install package: `npm install --save @mxenabled/connect-widget`
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
1. Import the styles `import "@mxenabled/connect-widget/dist/style.css"`
|
|
19
|
+
1. Import `ApiProvider` and `ConnectWidget`. Add both to your project.
|
|
20
|
+
1. Pass applicable props to widget and your API to the provider.
|
|
20
21
|
|
|
21
22
|
```jsx
|
|
22
23
|
import ConnectWidget, { ApiProvider } from '@mxenabled/connect-widget'
|
|
@@ -96,6 +97,10 @@ Pull requests are welcome. Please open an issue first to discuss what you would
|
|
|
96
97
|
|
|
97
98
|
Make sure to add/update tests, translations, and documentation as appropriate.
|
|
98
99
|
|
|
100
|
+
### Architecture Decision Records
|
|
101
|
+
|
|
102
|
+
We have some [architecture decision records](./architectureDecisionRecords/) that outline what is expected when contributing.
|
|
103
|
+
|
|
99
104
|
## Changes
|
|
100
105
|
|
|
101
106
|
View our notes for each release [here](https://github.com/mxenabled/connect-widget/releases)
|
package/dist/index.es.js
CHANGED
|
@@ -5087,23 +5087,39 @@ function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
|
|
|
5087
5087
|
}
|
|
5088
5088
|
var _baseFindIndex = baseFindIndex$2;
|
|
5089
5089
|
|
|
5090
|
-
var
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5090
|
+
var _trimmedEndIndex;
|
|
5091
|
+
var hasRequired_trimmedEndIndex;
|
|
5092
|
+
|
|
5093
|
+
function require_trimmedEndIndex () {
|
|
5094
|
+
if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
|
|
5095
|
+
hasRequired_trimmedEndIndex = 1;
|
|
5096
|
+
var reWhitespace = /\s/;
|
|
5097
|
+
function trimmedEndIndex(string) {
|
|
5098
|
+
var index = string.length;
|
|
5099
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
5100
|
+
}
|
|
5101
|
+
return index;
|
|
5102
|
+
}
|
|
5103
|
+
_trimmedEndIndex = trimmedEndIndex;
|
|
5104
|
+
return _trimmedEndIndex;
|
|
5096
5105
|
}
|
|
5097
|
-
var _trimmedEndIndex = trimmedEndIndex$1;
|
|
5098
5106
|
|
|
5099
|
-
var
|
|
5100
|
-
var
|
|
5101
|
-
|
|
5102
|
-
|
|
5107
|
+
var _baseTrim;
|
|
5108
|
+
var hasRequired_baseTrim;
|
|
5109
|
+
|
|
5110
|
+
function require_baseTrim () {
|
|
5111
|
+
if (hasRequired_baseTrim) return _baseTrim;
|
|
5112
|
+
hasRequired_baseTrim = 1;
|
|
5113
|
+
var trimmedEndIndex = require_trimmedEndIndex();
|
|
5114
|
+
var reTrimStart = /^\s+/;
|
|
5115
|
+
function baseTrim(string) {
|
|
5116
|
+
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
5117
|
+
}
|
|
5118
|
+
_baseTrim = baseTrim;
|
|
5119
|
+
return _baseTrim;
|
|
5103
5120
|
}
|
|
5104
|
-
var _baseTrim = baseTrim$1;
|
|
5105
5121
|
|
|
5106
|
-
var baseTrim =
|
|
5122
|
+
var baseTrim = require_baseTrim(), isObject$7 = isObject_1, isSymbol$1 = isSymbol_1;
|
|
5107
5123
|
var NAN = 0 / 0;
|
|
5108
5124
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
5109
5125
|
var reIsBinary = /^0b[01]+$/i;
|
|
@@ -8559,7 +8575,7 @@ var hasRequiredTrim;
|
|
|
8559
8575
|
function requireTrim () {
|
|
8560
8576
|
if (hasRequiredTrim) return trim_1;
|
|
8561
8577
|
hasRequiredTrim = 1;
|
|
8562
|
-
var baseToString = _baseToString, baseTrim =
|
|
8578
|
+
var baseToString = _baseToString, baseTrim = require_baseTrim(), castSlice = require_castSlice(), charsEndIndex = require_charsEndIndex(), charsStartIndex = require_charsStartIndex(), stringToArray = require_stringToArray(), toString = toString_1;
|
|
8563
8579
|
function trim(string, chars, guard) {
|
|
8564
8580
|
string = toString(string);
|
|
8565
8581
|
if (string && (guard || chars === void 0)) {
|
|
@@ -27734,7 +27750,7 @@ process.env.NODE_ENV !== "production" ? MenuList$1.propTypes = {
|
|
|
27734
27750
|
function getStyleValue$1(value) {
|
|
27735
27751
|
return parseInt(value, 10) || 0;
|
|
27736
27752
|
}
|
|
27737
|
-
const styles$
|
|
27753
|
+
const styles$6 = {
|
|
27738
27754
|
shadow: {
|
|
27739
27755
|
// Visibility needed to hide the extra text area on iPads
|
|
27740
27756
|
visibility: "hidden",
|
|
@@ -27873,7 +27889,7 @@ const TextareaAutosize$1 = /* @__PURE__ */ React$1.forwardRef(function TextareaA
|
|
|
27873
27889
|
ref: shadowRef,
|
|
27874
27890
|
tabIndex: -1,
|
|
27875
27891
|
style: {
|
|
27876
|
-
...styles$
|
|
27892
|
+
...styles$6.shadow,
|
|
27877
27893
|
...style,
|
|
27878
27894
|
paddingTop: 0,
|
|
27879
27895
|
paddingBottom: 0
|
|
@@ -30993,7 +31009,7 @@ function getTransitionProps$1(props, options) {
|
|
|
30993
31009
|
function getScale$1(value) {
|
|
30994
31010
|
return `scale(${value}, ${value ** 2})`;
|
|
30995
31011
|
}
|
|
30996
|
-
const styles$
|
|
31012
|
+
const styles$5 = {
|
|
30997
31013
|
entering: {
|
|
30998
31014
|
opacity: 1,
|
|
30999
31015
|
transform: getScale$1(1)
|
|
@@ -31134,7 +31150,7 @@ const Grow$1 = /* @__PURE__ */ React$1.forwardRef(function Grow2(props, ref) {
|
|
|
31134
31150
|
opacity: 0,
|
|
31135
31151
|
transform: getScale$1(0.75),
|
|
31136
31152
|
visibility: state === "exited" && !inProp ? "hidden" : void 0,
|
|
31137
|
-
...styles$
|
|
31153
|
+
...styles$5[state],
|
|
31138
31154
|
...style,
|
|
31139
31155
|
...children.props.style
|
|
31140
31156
|
},
|
|
@@ -31798,7 +31814,7 @@ function useSlot(name, parameters) {
|
|
|
31798
31814
|
return [elementType, props];
|
|
31799
31815
|
}
|
|
31800
31816
|
|
|
31801
|
-
const styles$
|
|
31817
|
+
const styles$4 = {
|
|
31802
31818
|
entering: {
|
|
31803
31819
|
opacity: 1
|
|
31804
31820
|
},
|
|
@@ -31898,7 +31914,7 @@ const Fade$1 = /* @__PURE__ */ React$1.forwardRef(function Fade2(props, ref) {
|
|
|
31898
31914
|
style: {
|
|
31899
31915
|
opacity: 0,
|
|
31900
31916
|
visibility: state === "exited" && !inProp ? "hidden" : void 0,
|
|
31901
|
-
...styles$
|
|
31917
|
+
...styles$4[state],
|
|
31902
31918
|
...style,
|
|
31903
31919
|
...children.props.style
|
|
31904
31920
|
},
|
|
@@ -39213,7 +39229,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
39213
39229
|
}
|
|
39214
39230
|
|
|
39215
39231
|
const _excluded$n = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
|
|
39216
|
-
const styles$
|
|
39232
|
+
const styles$3 = {
|
|
39217
39233
|
entering: {
|
|
39218
39234
|
opacity: 1
|
|
39219
39235
|
},
|
|
@@ -39312,7 +39328,7 @@ const Fade = /* @__PURE__ */ React$1.forwardRef(function Fade2(props, ref) {
|
|
|
39312
39328
|
style: _extends$1({
|
|
39313
39329
|
opacity: 0,
|
|
39314
39330
|
visibility: state === "exited" && !inProp ? "hidden" : void 0
|
|
39315
|
-
}, styles$
|
|
39331
|
+
}, styles$3[state], style, children.props.style),
|
|
39316
39332
|
ref: handleRef
|
|
39317
39333
|
}, childProps));
|
|
39318
39334
|
}
|
|
@@ -40407,7 +40423,7 @@ const _excluded$i = ["onChange", "maxRows", "minRows", "style", "value"];
|
|
|
40407
40423
|
function getStyleValue(value) {
|
|
40408
40424
|
return parseInt(value, 10) || 0;
|
|
40409
40425
|
}
|
|
40410
|
-
const styles$
|
|
40426
|
+
const styles$2 = {
|
|
40411
40427
|
shadow: {
|
|
40412
40428
|
// Visibility needed to hide the extra text area on iPads
|
|
40413
40429
|
visibility: "hidden",
|
|
@@ -40543,7 +40559,7 @@ const TextareaAutosize = /* @__PURE__ */ React$1.forwardRef(function TextareaAut
|
|
|
40543
40559
|
readOnly: true,
|
|
40544
40560
|
ref: shadowRef,
|
|
40545
40561
|
tabIndex: -1,
|
|
40546
|
-
style: _extends$1({}, styles$
|
|
40562
|
+
style: _extends$1({}, styles$2.shadow, style, {
|
|
40547
40563
|
paddingTop: 0,
|
|
40548
40564
|
paddingBottom: 0
|
|
40549
40565
|
})
|
|
@@ -43651,7 +43667,7 @@ const _excluded$6 = ["addEndListener", "appear", "children", "easing", "in", "on
|
|
|
43651
43667
|
function getScale(value) {
|
|
43652
43668
|
return `scale(${value}, ${value ** 2})`;
|
|
43653
43669
|
}
|
|
43654
|
-
const styles = {
|
|
43670
|
+
const styles$1 = {
|
|
43655
43671
|
entering: {
|
|
43656
43672
|
opacity: 1,
|
|
43657
43673
|
transform: getScale(1)
|
|
@@ -43791,7 +43807,7 @@ const Grow = /* @__PURE__ */ React$1.forwardRef(function Grow2(props, ref) {
|
|
|
43791
43807
|
opacity: 0,
|
|
43792
43808
|
transform: getScale(0.75),
|
|
43793
43809
|
visibility: state === "exited" && !inProp ? "hidden" : void 0
|
|
43794
|
-
}, styles[state], style, children.props.style),
|
|
43810
|
+
}, styles$1[state], style, children.props.style),
|
|
43795
43811
|
ref: handleRef
|
|
43796
43812
|
}, childProps));
|
|
43797
43813
|
}
|
|
@@ -65648,6 +65664,11 @@ const focusElement = (element) => {
|
|
|
65648
65664
|
}
|
|
65649
65665
|
};
|
|
65650
65666
|
|
|
65667
|
+
const container = "_container_1pcxm_1";
|
|
65668
|
+
const styles = {
|
|
65669
|
+
container: container
|
|
65670
|
+
};
|
|
65671
|
+
|
|
65651
65672
|
const initialState$1 = {
|
|
65652
65673
|
currentView: SEARCH_VIEWS.LOADING,
|
|
65653
65674
|
popularInstitutions: [],
|
|
@@ -65863,7 +65884,7 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
65863
65884
|
}
|
|
65864
65885
|
}, 500);
|
|
65865
65886
|
const tokens = useTokens();
|
|
65866
|
-
const
|
|
65887
|
+
const inlineStyles = getStyles$13(tokens, state.currentView);
|
|
65867
65888
|
if (state.currentView === SEARCH_VIEWS.OOPS) {
|
|
65868
65889
|
throw state.error;
|
|
65869
65890
|
}
|
|
@@ -65877,8 +65898,8 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
65877
65898
|
}
|
|
65878
65899
|
);
|
|
65879
65900
|
}
|
|
65880
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
65881
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style:
|
|
65901
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles.container, children: [
|
|
65902
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: inlineStyles.searchBar, children: [
|
|
65882
65903
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
65883
65904
|
x,
|
|
65884
65905
|
{
|
|
@@ -65887,7 +65908,7 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
65887
65908
|
component: "h2",
|
|
65888
65909
|
"data-test": "search-header",
|
|
65889
65910
|
id: "connect-search-header",
|
|
65890
|
-
style:
|
|
65911
|
+
style: inlineStyles.headerText,
|
|
65891
65912
|
tabIndex: -1,
|
|
65892
65913
|
truncate: false,
|
|
65893
65914
|
variant: "H2",
|
|
@@ -65913,7 +65934,7 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
65913
65934
|
searchInput.current.value = "";
|
|
65914
65935
|
searchInput.current.focus();
|
|
65915
65936
|
},
|
|
65916
|
-
style:
|
|
65937
|
+
style: inlineStyles.resetButton,
|
|
65917
65938
|
variant: "text",
|
|
65918
65939
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseOutline, {})
|
|
65919
65940
|
}
|
|
@@ -65931,7 +65952,7 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
65931
65952
|
}
|
|
65932
65953
|
)
|
|
65933
65954
|
] }),
|
|
65934
|
-
state.currentView === SEARCH_VIEWS.LOADING && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style:
|
|
65955
|
+
state.currentView === SEARCH_VIEWS.LOADING && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: inlineStyles.spinner, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingSpinner, {}) }),
|
|
65935
65956
|
state.currentView === SEARCH_VIEWS.SEARCH_FAILED && /* @__PURE__ */ jsxRuntimeExports.jsx(SearchFailed, {}),
|
|
65936
65957
|
state.currentView === SEARCH_VIEWS.NO_RESULTS && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
65937
65958
|
SearchNoResult,
|
|
@@ -65948,7 +65969,7 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
65948
65969
|
setAriaLiveRegionMessage
|
|
65949
65970
|
}
|
|
65950
65971
|
),
|
|
65951
|
-
state.currentView === SEARCH_VIEWS.SEARCH_LOADING && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style:
|
|
65972
|
+
state.currentView === SEARCH_VIEWS.SEARCH_LOADING && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: inlineStyles.spinner, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingSpinner, {}) }),
|
|
65952
65973
|
state.currentView === SEARCH_VIEWS.SEARCHED && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
65953
65974
|
SearchedInstitutionsList,
|
|
65954
65975
|
{
|