@bigbinary/neeto-github-frontend 1.0.8 → 1.0.10

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.js CHANGED
@@ -115,31 +115,31 @@ function _arrayWithHoles(arr) {
115
115
  if (Array.isArray(arr)) return arr;
116
116
  }
117
117
 
118
- function _iterableToArrayLimit(arr, i) {
119
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
120
- if (null != _i) {
121
- var _s,
122
- _e,
123
- _x,
124
- _r,
125
- _arr = [],
126
- _n = !0,
127
- _d = !1;
118
+ function _iterableToArrayLimit(r, l) {
119
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
120
+ if (null != t) {
121
+ var e,
122
+ n,
123
+ i,
124
+ u,
125
+ a = [],
126
+ f = !0,
127
+ o = !1;
128
128
  try {
129
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
130
- if (Object(_i) !== _i) return;
131
- _n = !1;
132
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
133
- } catch (err) {
134
- _d = !0, _e = err;
129
+ if (i = (t = t.call(r)).next, 0 === l) {
130
+ if (Object(t) !== t) return;
131
+ f = !1;
132
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
133
+ } catch (r) {
134
+ o = !0, n = r;
135
135
  } finally {
136
136
  try {
137
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
137
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
138
138
  } finally {
139
- if (_d) throw _e;
139
+ if (o) throw n;
140
140
  }
141
141
  }
142
- return _arr;
142
+ return a;
143
143
  }
144
144
  }
145
145
 
@@ -272,7 +272,9 @@ var NotConnected = withT(function (_ref) {
272
272
  className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
273
273
  }, /*#__PURE__*/React.createElement(Typography, {
274
274
  style: "body2"
275
- }, t("neetoGithub.notConnectedDescription")), /*#__PURE__*/React.createElement(Button, {
275
+ }, t("neetoGithub.notConnectedDescription", {
276
+ appName: globalProps.appName
277
+ })), /*#__PURE__*/React.createElement(Button, {
276
278
  href: installationUrl,
277
279
  icon: Github,
278
280
  iconPosition: "left",
@@ -434,7 +436,7 @@ var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
434
436
  _ref$isPane = _ref.isPane,
435
437
  isPane = _ref$isPane === void 0 ? false : _ref$isPane;
436
438
  return /*#__PURE__*/React.createElement("div", {
437
- className: "flex w-full flex-col-reverse 2xl:flex-row"
439
+ className: "flex w-full flex-col-reverse xl:flex-row"
438
440
  }, /*#__PURE__*/React.createElement(Repositories, {
439
441
  installationUrl: installationUrl,
440
442
  isConnected: isConnected,
@@ -2122,7 +2124,6 @@ var arrayPrefixGenerators = {
2122
2124
  };
2123
2125
 
2124
2126
  var isArray$1 = Array.isArray;
2125
- var split = String.prototype.split;
2126
2127
  var push = Array.prototype.push;
2127
2128
  var pushToArray = function (arr, valueOrArray) {
2128
2129
  push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
@@ -2224,14 +2225,6 @@ var stringify$1 = function stringify(
2224
2225
  if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
2225
2226
  if (encoder) {
2226
2227
  var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
2227
- if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
2228
- var valuesArray = split.call(String(obj), ',');
2229
- var valuesJoined = '';
2230
- for (var i = 0; i < valuesArray.length; ++i) {
2231
- valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$1.encoder, charset, 'value', format));
2232
- }
2233
- return [formatter(keyValue) + (commaRoundTrip && isArray$1(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
2234
- }
2235
2228
  return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
2236
2229
  }
2237
2230
  return [formatter(prefix) + '=' + formatter(String(obj))];
@@ -2246,6 +2239,9 @@ var stringify$1 = function stringify(
2246
2239
  var objKeys;
2247
2240
  if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
2248
2241
  // we need to join elements in
2242
+ if (encodeValuesOnly && encoder) {
2243
+ obj = utils$1.maybeMap(obj, encoder);
2244
+ }
2249
2245
  objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
2250
2246
  } else if (isArray$1(filter)) {
2251
2247
  objKeys = filter;
@@ -2278,7 +2274,7 @@ var stringify$1 = function stringify(
2278
2274
  commaRoundTrip,
2279
2275
  strictNullHandling,
2280
2276
  skipNulls,
2281
- encoder,
2277
+ generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
2282
2278
  filter,
2283
2279
  sort,
2284
2280
  allowDots,
@@ -2477,7 +2473,8 @@ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
2477
2473
  var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
2478
2474
 
2479
2475
  var parseValues = function parseQueryStringValues(str, options) {
2480
- var obj = {};
2476
+ var obj = { __proto__: null };
2477
+
2481
2478
  var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
2482
2479
  var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
2483
2480
  var parts = cleanStr.split(options.delimiter, limit);
@@ -2725,7 +2722,11 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
2725
2722
  _ref$troubleshootUrl = _ref.troubleshootUrl,
2726
2723
  troubleshootUrl = _ref$troubleshootUrl === void 0 ? TROUBLESHOOT_URL : _ref$troubleshootUrl,
2727
2724
  _ref$onConnect = _ref.onConnect,
2728
- onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect;
2725
+ onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
2726
+ _ref$title = _ref.title,
2727
+ title = _ref$title === void 0 ? "" : _ref$title,
2728
+ _ref$description = _ref.description,
2729
+ description = _ref$description === void 0 ? "" : _ref$description;
2729
2730
  var _useTranslation = useTranslation(),
2730
2731
  t = _useTranslation.t;
2731
2732
  var initialFocusRef = useRef(null);
@@ -2737,10 +2738,10 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
2737
2738
  size: "large"
2738
2739
  }, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
2739
2740
  style: "h2"
2740
- }, t("neetoGithub.modal.title")), /*#__PURE__*/React.createElement(Typography, {
2741
+ }, isPresent(title) ? title : t("neetoGithub.modal.title")), /*#__PURE__*/React.createElement(Typography, {
2741
2742
  className: "mt-4",
2742
2743
  style: "body2"
2743
- }, t("neetoGithub.modal.description"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement(NeetoGithubNanoContainer, {
2744
+ }, isPresent(description) ? description : t("neetoGithub.modal.description"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement(NeetoGithubNanoContainer, {
2744
2745
  accounts: accounts,
2745
2746
  installationUrl: installationUrl,
2746
2747
  isConnected: isConnected,