@papillonbits/library 0.99.0 → 1.2.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2023 MTS.
3
+ Copyright (c) 2024 MTS.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/array/index.js CHANGED
@@ -24,7 +24,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
24
24
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25
25
  function getCurrentIndex(indexItems) {
26
26
  var _indexItems$filter$0$, _indexItems$filter$;
27
- return (_indexItems$filter$0$ = indexItems === null || indexItems === void 0 ? void 0 : (_indexItems$filter$ = indexItems.filter(function (indexItem) {
27
+ return (_indexItems$filter$0$ = indexItems === null || indexItems === void 0 || (_indexItems$filter$ = indexItems.filter(function (indexItem) {
28
28
  return indexItem.isCurrent;
29
29
  })[0]) === null || _indexItems$filter$ === void 0 ? void 0 : _indexItems$filter$.index) !== null && _indexItems$filter$0$ !== void 0 ? _indexItems$filter$0$ : -1;
30
30
  }
@@ -67,7 +67,7 @@ function getSelectedItem(_ref2) {
67
67
  function getSelectedItemText(_ref4) {
68
68
  var _items$find;
69
69
  var items = _ref4.items;
70
- return items === null || items === void 0 ? void 0 : (_items$find = items.find(function (_ref5) {
70
+ return items === null || items === void 0 || (_items$find = items.find(function (_ref5) {
71
71
  var isSelected = _ref5.isSelected;
72
72
  return isSelected === true;
73
73
  })) === null || _items$find === void 0 ? void 0 : _items$find.text;
package/auth/index.js CHANGED
@@ -19,7 +19,7 @@ function isUserAuthenticatedPapillonBitsOrganizationMember(_x) {
19
19
  return _isUserAuthenticatedPapillonBitsOrganizationMember.apply(this, arguments);
20
20
  }
21
21
  function _isUserAuthenticatedPapillonBitsOrganizationMember() {
22
- _isUserAuthenticatedPapillonBitsOrganizationMember = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(personalAccessToken) {
22
+ _isUserAuthenticatedPapillonBitsOrganizationMember = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(personalAccessToken) {
23
23
  var collectedAccessToken, octokit, _yield$octokit$reques, data, isActivePapillonBitsMember;
24
24
  return _regenerator["default"].wrap(function _callee$(_context) {
25
25
  while (1) switch (_context.prev = _context.next) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papillonbits/library",
3
- "version": "0.99.0",
3
+ "version": "1.2.0",
4
4
  "description": "Papillon Bits Library",
5
5
  "homepage": "https://github.com/papillonbits/papillonbits/tree/master/packages/library",
6
6
  "repository": {
@@ -36,5 +36,5 @@
36
36
  "build-acceptance": "npm run build",
37
37
  "build-release": "npm run build"
38
38
  },
39
- "gitHead": "abb194bef37668293c17fc25cf67df5c4c8580a9"
39
+ "gitHead": "3860d47fb63b20d16c8c8d110c8280ff0c89de91"
40
40
  }
package/sort/index.js CHANGED
@@ -43,23 +43,23 @@ function sortObjects(_ref2) {
43
43
  }
44
44
  if (sort.order === sortOrder.ascending) {
45
45
  return objects.sort(function (a, b) {
46
- var _a$sort$value2, _a$sort$value2$value, _b$sort$value2, _b$sort$value2$value, _a$sort$value3, _b$sort$value3;
46
+ var _a$sort$value2, _b$sort$value2, _a$sort$value3, _b$sort$value3;
47
47
  switch ((0, _typeof2["default"])(a === null || a === void 0 ? void 0 : a[sort.value])) {
48
48
  case 'object':
49
49
  if ((a === null || a === void 0 ? void 0 : a[sort.value]) instanceof Object && (a === null || a === void 0 ? void 0 : a[sort.value]) instanceof Date) {
50
50
  return (a === null || a === void 0 ? void 0 : a[sort.value]) > (b === null || b === void 0 ? void 0 : b[sort.value]) ? 1 : -1;
51
51
  }
52
52
  if ((a === null || a === void 0 ? void 0 : a[sort.value]) instanceof Object && (a === null || a === void 0 ? void 0 : a[sort.value]) instanceof Array) {
53
- var _a$sort$value, _a$sort$value$find, _a$sort$value$find$te, _b$sort$value, _b$sort$value$find, _b$sort$value$find$te;
54
- return (a === null || a === void 0 ? void 0 : (_a$sort$value = a[sort.value]) === null || _a$sort$value === void 0 ? void 0 : (_a$sort$value$find = _a$sort$value.find(function (item) {
53
+ var _a$sort$value, _b$sort$value;
54
+ return (a === null || a === void 0 || (_a$sort$value = a[sort.value]) === null || _a$sort$value === void 0 || (_a$sort$value = _a$sort$value.find(function (item) {
55
55
  return item.isSelected === true;
56
- })) === null || _a$sort$value$find === void 0 ? void 0 : (_a$sort$value$find$te = _a$sort$value$find.text) === null || _a$sort$value$find$te === void 0 ? void 0 : _a$sort$value$find$te.toLowerCase()) > (b === null || b === void 0 ? void 0 : (_b$sort$value = b[sort.value]) === null || _b$sort$value === void 0 ? void 0 : (_b$sort$value$find = _b$sort$value.find(function (item) {
56
+ })) === null || _a$sort$value === void 0 || (_a$sort$value = _a$sort$value.text) === null || _a$sort$value === void 0 ? void 0 : _a$sort$value.toLowerCase()) > (b === null || b === void 0 || (_b$sort$value = b[sort.value]) === null || _b$sort$value === void 0 || (_b$sort$value = _b$sort$value.find(function (item) {
57
57
  return item.isSelected === true;
58
- })) === null || _b$sort$value$find === void 0 ? void 0 : (_b$sort$value$find$te = _b$sort$value$find.text) === null || _b$sort$value$find$te === void 0 ? void 0 : _b$sort$value$find$te.toLowerCase()) ? 1 : -1;
58
+ })) === null || _b$sort$value === void 0 || (_b$sort$value = _b$sort$value.text) === null || _b$sort$value === void 0 ? void 0 : _b$sort$value.toLowerCase()) ? 1 : -1;
59
59
  }
60
- return (a === null || a === void 0 ? void 0 : (_a$sort$value2 = a[sort.value]) === null || _a$sort$value2 === void 0 ? void 0 : (_a$sort$value2$value = _a$sort$value2.value) === null || _a$sort$value2$value === void 0 ? void 0 : _a$sort$value2$value.toLowerCase()) > (b === null || b === void 0 ? void 0 : (_b$sort$value2 = b[sort.value]) === null || _b$sort$value2 === void 0 ? void 0 : (_b$sort$value2$value = _b$sort$value2.value) === null || _b$sort$value2$value === void 0 ? void 0 : _b$sort$value2$value.toLowerCase()) ? 1 : -1;
60
+ return (a === null || a === void 0 || (_a$sort$value2 = a[sort.value]) === null || _a$sort$value2 === void 0 || (_a$sort$value2 = _a$sort$value2.value) === null || _a$sort$value2 === void 0 ? void 0 : _a$sort$value2.toLowerCase()) > (b === null || b === void 0 || (_b$sort$value2 = b[sort.value]) === null || _b$sort$value2 === void 0 || (_b$sort$value2 = _b$sort$value2.value) === null || _b$sort$value2 === void 0 ? void 0 : _b$sort$value2.toLowerCase()) ? 1 : -1;
61
61
  case 'string':
62
- return (a === null || a === void 0 ? void 0 : (_a$sort$value3 = a[sort.value]) === null || _a$sort$value3 === void 0 ? void 0 : _a$sort$value3.toLowerCase()) > (b === null || b === void 0 ? void 0 : (_b$sort$value3 = b[sort.value]) === null || _b$sort$value3 === void 0 ? void 0 : _b$sort$value3.toLowerCase()) ? 1 : -1;
62
+ return (a === null || a === void 0 || (_a$sort$value3 = a[sort.value]) === null || _a$sort$value3 === void 0 ? void 0 : _a$sort$value3.toLowerCase()) > (b === null || b === void 0 || (_b$sort$value3 = b[sort.value]) === null || _b$sort$value3 === void 0 ? void 0 : _b$sort$value3.toLowerCase()) ? 1 : -1;
63
63
  case 'number':
64
64
  return (a === null || a === void 0 ? void 0 : a[sort.value]) > (b === null || b === void 0 ? void 0 : b[sort.value]) ? 1 : -1;
65
65
  default:
@@ -68,23 +68,23 @@ function sortObjects(_ref2) {
68
68
  });
69
69
  }
70
70
  return objects.sort(function (a, b) {
71
- var _a$sort$value5, _a$sort$value5$value, _b$sort$value5, _b$sort$value5$value, _a$sort$value6, _b$sort$value6;
71
+ var _a$sort$value5, _b$sort$value5, _a$sort$value6, _b$sort$value6;
72
72
  switch ((0, _typeof2["default"])(a === null || a === void 0 ? void 0 : a[sort.value])) {
73
73
  case 'object':
74
74
  if ((a === null || a === void 0 ? void 0 : a[sort.value]) instanceof Object && (a === null || a === void 0 ? void 0 : a[sort.value]) instanceof Date) {
75
75
  return (a === null || a === void 0 ? void 0 : a[sort.value]) < (b === null || b === void 0 ? void 0 : b[sort.value]) ? 1 : -1;
76
76
  }
77
77
  if ((a === null || a === void 0 ? void 0 : a[sort.value]) instanceof Object && (a === null || a === void 0 ? void 0 : a[sort.value]) instanceof Array) {
78
- var _a$sort$value4, _a$sort$value4$find, _a$sort$value4$find$t, _b$sort$value4, _b$sort$value4$find, _b$sort$value4$find$t;
79
- return (a === null || a === void 0 ? void 0 : (_a$sort$value4 = a[sort.value]) === null || _a$sort$value4 === void 0 ? void 0 : (_a$sort$value4$find = _a$sort$value4.find(function (item) {
78
+ var _a$sort$value4, _b$sort$value4;
79
+ return (a === null || a === void 0 || (_a$sort$value4 = a[sort.value]) === null || _a$sort$value4 === void 0 || (_a$sort$value4 = _a$sort$value4.find(function (item) {
80
80
  return item.isSelected === true;
81
- })) === null || _a$sort$value4$find === void 0 ? void 0 : (_a$sort$value4$find$t = _a$sort$value4$find.text) === null || _a$sort$value4$find$t === void 0 ? void 0 : _a$sort$value4$find$t.toLowerCase()) < (b === null || b === void 0 ? void 0 : (_b$sort$value4 = b[sort.value]) === null || _b$sort$value4 === void 0 ? void 0 : (_b$sort$value4$find = _b$sort$value4.find(function (item) {
81
+ })) === null || _a$sort$value4 === void 0 || (_a$sort$value4 = _a$sort$value4.text) === null || _a$sort$value4 === void 0 ? void 0 : _a$sort$value4.toLowerCase()) < (b === null || b === void 0 || (_b$sort$value4 = b[sort.value]) === null || _b$sort$value4 === void 0 || (_b$sort$value4 = _b$sort$value4.find(function (item) {
82
82
  return item.isSelected === true;
83
- })) === null || _b$sort$value4$find === void 0 ? void 0 : (_b$sort$value4$find$t = _b$sort$value4$find.text) === null || _b$sort$value4$find$t === void 0 ? void 0 : _b$sort$value4$find$t.toLowerCase()) ? 1 : -1;
83
+ })) === null || _b$sort$value4 === void 0 || (_b$sort$value4 = _b$sort$value4.text) === null || _b$sort$value4 === void 0 ? void 0 : _b$sort$value4.toLowerCase()) ? 1 : -1;
84
84
  }
85
- return (a === null || a === void 0 ? void 0 : (_a$sort$value5 = a[sort.value]) === null || _a$sort$value5 === void 0 ? void 0 : (_a$sort$value5$value = _a$sort$value5.value) === null || _a$sort$value5$value === void 0 ? void 0 : _a$sort$value5$value.toLowerCase()) < (b === null || b === void 0 ? void 0 : (_b$sort$value5 = b[sort.value]) === null || _b$sort$value5 === void 0 ? void 0 : (_b$sort$value5$value = _b$sort$value5.value) === null || _b$sort$value5$value === void 0 ? void 0 : _b$sort$value5$value.toLowerCase()) ? 1 : -1;
85
+ return (a === null || a === void 0 || (_a$sort$value5 = a[sort.value]) === null || _a$sort$value5 === void 0 || (_a$sort$value5 = _a$sort$value5.value) === null || _a$sort$value5 === void 0 ? void 0 : _a$sort$value5.toLowerCase()) < (b === null || b === void 0 || (_b$sort$value5 = b[sort.value]) === null || _b$sort$value5 === void 0 || (_b$sort$value5 = _b$sort$value5.value) === null || _b$sort$value5 === void 0 ? void 0 : _b$sort$value5.toLowerCase()) ? 1 : -1;
86
86
  case 'string':
87
- return (a === null || a === void 0 ? void 0 : (_a$sort$value6 = a[sort.value]) === null || _a$sort$value6 === void 0 ? void 0 : _a$sort$value6.toLowerCase()) < (b === null || b === void 0 ? void 0 : (_b$sort$value6 = b[sort.value]) === null || _b$sort$value6 === void 0 ? void 0 : _b$sort$value6.toLowerCase()) ? 1 : -1;
87
+ return (a === null || a === void 0 || (_a$sort$value6 = a[sort.value]) === null || _a$sort$value6 === void 0 ? void 0 : _a$sort$value6.toLowerCase()) < (b === null || b === void 0 || (_b$sort$value6 = b[sort.value]) === null || _b$sort$value6 === void 0 ? void 0 : _b$sort$value6.toLowerCase()) ? 1 : -1;
88
88
  case 'number':
89
89
  return (a === null || a === void 0 ? void 0 : a[sort.value]) < (b === null || b === void 0 ? void 0 : b[sort.value]) ? 1 : -1;
90
90
  default: