@trops/dash-core 0.1.350 → 0.1.352

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.esm.js CHANGED
@@ -47719,7 +47719,7 @@ var PackageItem = function PackageItem(_ref6) {
47719
47719
  }
47720
47720
  function _handleSave2() {
47721
47721
  _handleSave2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
47722
- var _window$mainApi3, updates, result;
47722
+ var _window$mainApi4, updates, result;
47723
47723
  return _regeneratorRuntime.wrap(function (_context3) {
47724
47724
  while (1) switch (_context3.prev = _context3.next) {
47725
47725
  case 0:
@@ -47735,7 +47735,7 @@ var PackageItem = function PackageItem(_ref6) {
47735
47735
  visibility: form.visibility
47736
47736
  };
47737
47737
  _context3.next = 2;
47738
- return (_window$mainApi3 = window.mainApi) === null || _window$mainApi3 === void 0 || (_window$mainApi3 = _window$mainApi3.registryAuth) === null || _window$mainApi3 === void 0 ? void 0 : _window$mainApi3.updatePackage(pkg.scope, pkg.name, updates);
47738
+ return (_window$mainApi4 = window.mainApi) === null || _window$mainApi4 === void 0 || (_window$mainApi4 = _window$mainApi4.registryAuth) === null || _window$mainApi4 === void 0 ? void 0 : _window$mainApi4.updatePackage(pkg.scope, pkg.name, updates);
47739
47739
  case 2:
47740
47740
  result = _context3.sent;
47741
47741
  if (result) {
@@ -47763,14 +47763,14 @@ var PackageItem = function PackageItem(_ref6) {
47763
47763
  }
47764
47764
  function _handleDelete() {
47765
47765
  _handleDelete = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
47766
- var _window$mainApi4, result;
47766
+ var _window$mainApi5, result;
47767
47767
  return _regeneratorRuntime.wrap(function (_context4) {
47768
47768
  while (1) switch (_context4.prev = _context4.next) {
47769
47769
  case 0:
47770
47770
  setDeleting(true);
47771
47771
  _context4.prev = 1;
47772
47772
  _context4.next = 2;
47773
- return (_window$mainApi4 = window.mainApi) === null || _window$mainApi4 === void 0 || (_window$mainApi4 = _window$mainApi4.registryAuth) === null || _window$mainApi4 === void 0 ? void 0 : _window$mainApi4.deletePackage(pkg.scope, pkg.name);
47773
+ return (_window$mainApi5 = window.mainApi) === null || _window$mainApi5 === void 0 || (_window$mainApi5 = _window$mainApi5.registryAuth) === null || _window$mainApi5 === void 0 ? void 0 : _window$mainApi5.deletePackage(pkg.scope, pkg.name);
47774
47774
  case 2:
47775
47775
  result = _context4.sent;
47776
47776
  if (result) {
@@ -47897,6 +47897,16 @@ var PackageItem = function PackageItem(_ref6) {
47897
47897
  })]
47898
47898
  });
47899
47899
  }
47900
+ var isPrivate = pkg.visibility === "private";
47901
+ function openAccessPage(e) {
47902
+ var _window$mainApi3;
47903
+ e.stopPropagation();
47904
+ // Registry web URL. If we ever move off Amplify Hosting's default
47905
+ // domain this centralizes nicely into a config, but hardcoded is
47906
+ // consistent with how other files in the app already reference it.
47907
+ var url = "https://main.d919rwhuzp7rj.amplifyapp.com/package/".concat(encodeURIComponent(pkg.scope), "/").concat(encodeURIComponent(pkg.name), "/access");
47908
+ (_window$mainApi3 = window.mainApi) === null || _window$mainApi3 === void 0 || (_window$mainApi3 = _window$mainApi3.shell) === null || _window$mainApi3 === void 0 || _window$mainApi3.openExternal(url);
47909
+ }
47900
47910
  return /*#__PURE__*/jsx("div", {
47901
47911
  onClick: onEdit,
47902
47912
  className: "bg-white/5 rounded-lg p-3 cursor-pointer hover:bg-white/10 transition-colors",
@@ -47911,8 +47921,14 @@ var PackageItem = function PackageItem(_ref6) {
47911
47921
  className: "text-[10px] px-1.5 py-0.5 rounded bg-white/10 opacity-60",
47912
47922
  children: ["v", pkg.version]
47913
47923
  }), /*#__PURE__*/jsx("span", {
47914
- className: "text-[10px] px-1.5 py-0.5 rounded ".concat(pkg.visibility === "private" ? "bg-amber-500/20 text-amber-300" : "bg-emerald-500/20 text-emerald-300"),
47924
+ className: "text-[10px] px-1.5 py-0.5 rounded ".concat(isPrivate ? "bg-amber-500/20 text-amber-300" : "bg-emerald-500/20 text-emerald-300"),
47915
47925
  children: pkg.visibility || "public"
47926
+ }), isPrivate && /*#__PURE__*/jsx("button", {
47927
+ type: "button",
47928
+ onClick: openAccessPage,
47929
+ title: "Open the access management page in your browser",
47930
+ className: "ml-auto text-[10px] px-2 py-0.5 rounded border border-indigo-500/40 text-indigo-300 hover:text-white hover:bg-indigo-600/20 transition-colors",
47931
+ children: "Manage access \u2192"
47916
47932
  })]
47917
47933
  }), pkg.description && /*#__PURE__*/jsx("p", {
47918
47934
  className: "text-xs opacity-50 truncate",