@trops/dash-core 0.1.373 → 0.1.374

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
@@ -2,7 +2,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
2
  import _typeof from '@babel/runtime/helpers/typeof';
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
4
  import * as DashReact from '@trops/dash-react';
5
- import { isObject, ThemeContext, deepCopy, MainSection, getUUID, getStylesForItem, themeObjects, Heading, SearchInput, ButtonIcon, SubHeading3, InputText, Button, FontAwesomeIcon, Tag, Modal, Sidebar, Paragraph, Panel, Stepper, Tag2, Tag3, Card2, Card3, Heading3, MenuItem3, FormLabel, SelectMenu, Switch, SelectInput, CodeEditorInline, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, DropdownPanel, MenuItem2, ButtonIcon2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, Button2, Button3, MenuItem, ButtonIcon3, DashPanel, colorNames, shades, themeVariants, Tabs3, DataList, Checkbox, StatCard, Card, Tabs, Accordion, Alert, Toast, ProgressBar, Toggle, Breadcrumbs, Tabs2, Accordion2, Alert2, Toast2, ProgressBar2, Toggle2, Breadcrumbs2, Accordion3, Alert3, Toast3, ProgressBar3, Toggle3, Breadcrumbs3, ThemeFromUrlPane, TextArea, Icon2, AlgoliaSearchBox, CommandPalette, useSidebar, EmptyState, Navbar, withRouter, Menu as Menu$1 } from '@trops/dash-react';
5
+ import { isObject, ThemeContext, deepCopy, MainSection, getUUID, getStylesForItem, themeObjects, Heading, SearchInput, ButtonIcon, SubHeading3, InputText, Button, FontAwesomeIcon, Tag, Modal, Paragraph, Sidebar, Panel, Stepper, Tag2, Tag3, Card2, Card3, Heading3, MenuItem3, FormLabel, SelectMenu, Switch, SelectInput, CodeEditorInline, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, DropdownPanel, MenuItem2, ButtonIcon2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, Button2, Button3, MenuItem, ButtonIcon3, DashPanel, colorNames, shades, themeVariants, Tabs3, DataList, Checkbox, StatCard, Card, Tabs, Accordion, Alert, Toast, ProgressBar, Toggle, Breadcrumbs, Tabs2, Accordion2, Alert2, Toast2, ProgressBar2, Toggle2, Breadcrumbs2, Accordion3, Alert3, Toast3, ProgressBar3, Toggle3, Breadcrumbs3, ThemeFromUrlPane, TextArea, Icon2, AlgoliaSearchBox, CommandPalette, useSidebar, EmptyState, Navbar, withRouter, Menu as Menu$1 } from '@trops/dash-react';
6
6
  export * from '@trops/dash-react';
7
7
  export { ThemeContext } from '@trops/dash-react';
8
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
@@ -4702,6 +4702,31 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4702
4702
  });
4703
4703
  };
4704
4704
 
4705
+ function RegistrySignInBanner(_ref) {
4706
+ var visible = _ref.visible,
4707
+ onSignIn = _ref.onSignIn,
4708
+ _ref$noun = _ref.noun,
4709
+ noun = _ref$noun === void 0 ? "package" : _ref$noun;
4710
+ if (!visible) return null;
4711
+ return /*#__PURE__*/jsxs("div", {
4712
+ className: "flex-shrink-0 mx-4 mb-2 px-3 py-2 rounded-lg bg-amber-900/15 border border-amber-700/30 flex items-center gap-3",
4713
+ children: [/*#__PURE__*/jsx("div", {
4714
+ className: "flex-1 min-w-0",
4715
+ children: /*#__PURE__*/jsxs(Paragraph, {
4716
+ className: "text-xs text-amber-200 leading-snug",
4717
+ children: ["Sign in to the registry to also see your private ", noun, "s and ones granted to you."]
4718
+ })
4719
+ }), /*#__PURE__*/jsx(Button, {
4720
+ title: "Sign in",
4721
+ bgColor: "bg-indigo-600",
4722
+ hoverBackgroundColor: "hover:bg-indigo-500",
4723
+ textSize: "text-xs",
4724
+ padding: "py-1 px-3",
4725
+ onClick: onSignIn
4726
+ })]
4727
+ });
4728
+ }
4729
+
4705
4730
  var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
4706
4731
  var onBack = _ref.onBack,
4707
4732
  appId = _ref.appId,
@@ -4893,27 +4918,12 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
4893
4918
  })]
4894
4919
  });
4895
4920
  } else if (packages.length === 0) {
4896
- listBody = /*#__PURE__*/jsxs("div", {
4897
- className: "px-4 py-8 text-center space-y-3",
4898
- children: [/*#__PURE__*/jsx(Paragraph, {
4921
+ listBody = /*#__PURE__*/jsx("div", {
4922
+ className: "px-4 py-8 text-center",
4923
+ children: /*#__PURE__*/jsx(Paragraph, {
4899
4924
  className: "text-sm opacity-50",
4900
4925
  children: searchQuery ? "No dashboards match your search." : "No dashboard packages available."
4901
- }), registryAuthed === false && /*#__PURE__*/jsxs("div", {
4902
- className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
4903
- children: [/*#__PURE__*/jsx(Paragraph, {
4904
- className: "text-xs text-amber-200",
4905
- children: "Sign in to the registry to see your private dashboards."
4906
- }), /*#__PURE__*/jsx(Button, {
4907
- title: "Sign in to Registry",
4908
- bgColor: "bg-indigo-600",
4909
- hoverBackgroundColor: "hover:bg-indigo-500",
4910
- textSize: "text-sm",
4911
- padding: "py-1 px-3",
4912
- onClick: function onClick() {
4913
- return setShowAuthFromEmpty(true);
4914
- }
4915
- })]
4916
- })]
4926
+ })
4917
4927
  });
4918
4928
  } else {
4919
4929
  listBody = /*#__PURE__*/jsx("div", {
@@ -4957,6 +4967,12 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
4957
4967
  placeholder: "Search dashboards...",
4958
4968
  inputClassName: "py-1.5 text-xs"
4959
4969
  })
4970
+ }), /*#__PURE__*/jsx(RegistrySignInBanner, {
4971
+ visible: registryAuthed === false,
4972
+ onSignIn: function onSignIn() {
4973
+ return setShowAuthFromEmpty(true);
4974
+ },
4975
+ noun: "dashboard"
4960
4976
  }), /*#__PURE__*/jsx("div", {
4961
4977
  className: "flex-1 min-h-0 overflow-y-auto px-2",
4962
4978
  children: listBody
@@ -38466,27 +38482,12 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
38466
38482
  })]
38467
38483
  });
38468
38484
  } else if (packages.length === 0) {
38469
- listBody = /*#__PURE__*/jsxs("div", {
38470
- className: "px-4 py-8 text-center space-y-3",
38471
- children: [/*#__PURE__*/jsx(Paragraph, {
38485
+ listBody = /*#__PURE__*/jsx("div", {
38486
+ className: "px-4 py-8 text-center",
38487
+ children: /*#__PURE__*/jsx(Paragraph, {
38472
38488
  className: "text-sm opacity-50",
38473
38489
  children: searchQuery ? "No themes match your search." : "No theme packages available."
38474
- }), registryAuthed === false && /*#__PURE__*/jsxs("div", {
38475
- className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
38476
- children: [/*#__PURE__*/jsx(Paragraph, {
38477
- className: "text-xs text-amber-200",
38478
- children: "Sign in to the registry to see your private themes."
38479
- }), /*#__PURE__*/jsx(Button, {
38480
- title: "Sign in to Registry",
38481
- bgColor: "bg-indigo-600",
38482
- hoverBackgroundColor: "hover:bg-indigo-500",
38483
- textSize: "text-sm",
38484
- padding: "py-1 px-3",
38485
- onClick: function onClick() {
38486
- return setShowAuthFromEmpty(true);
38487
- }
38488
- })]
38489
- })]
38490
+ })
38490
38491
  });
38491
38492
  } else {
38492
38493
  listBody = /*#__PURE__*/jsx("div", {
@@ -38532,6 +38533,12 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
38532
38533
  placeholder: "Search themes...",
38533
38534
  inputClassName: "py-1.5 text-xs"
38534
38535
  })
38536
+ }), /*#__PURE__*/jsx(RegistrySignInBanner, {
38537
+ visible: registryAuthed === false,
38538
+ onSignIn: function onSignIn() {
38539
+ return setShowAuthFromEmpty(true);
38540
+ },
38541
+ noun: "theme"
38535
38542
  }), /*#__PURE__*/jsx("div", {
38536
38543
  className: "flex-1 min-h-0 overflow-y-auto px-2",
38537
38544
  children: listBody
@@ -47443,27 +47450,12 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
47443
47450
  })]
47444
47451
  });
47445
47452
  } else if (packages.length === 0) {
47446
- listBody = /*#__PURE__*/jsxs("div", {
47447
- className: "px-4 py-8 text-center space-y-3",
47448
- children: [/*#__PURE__*/jsx(Paragraph, {
47453
+ listBody = /*#__PURE__*/jsx("div", {
47454
+ className: "px-4 py-8 text-center",
47455
+ children: /*#__PURE__*/jsx(Paragraph, {
47449
47456
  className: "text-sm opacity-50",
47450
47457
  children: searchQuery ? "No packages match your search." : "No packages available."
47451
- }), registryAuthed === false && /*#__PURE__*/jsxs("div", {
47452
- className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
47453
- children: [/*#__PURE__*/jsx(Paragraph, {
47454
- className: "text-xs text-amber-200",
47455
- children: "Sign in to the registry to see your private packages."
47456
- }), /*#__PURE__*/jsx(Button, {
47457
- title: "Sign in to Registry",
47458
- bgColor: "bg-indigo-600",
47459
- hoverBackgroundColor: "hover:bg-indigo-500",
47460
- textSize: "text-sm",
47461
- padding: "py-1 px-3",
47462
- onClick: function onClick() {
47463
- return setShowAuthFromEmpty(true);
47464
- }
47465
- })]
47466
- })]
47458
+ })
47467
47459
  });
47468
47460
  } else {
47469
47461
  listBody = /*#__PURE__*/jsx("div", {
@@ -47530,6 +47522,12 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
47530
47522
  className: "rounded"
47531
47523
  }), "Show all packages"]
47532
47524
  })]
47525
+ }), /*#__PURE__*/jsx(RegistrySignInBanner, {
47526
+ visible: registryAuthed === false,
47527
+ onSignIn: function onSignIn() {
47528
+ return setShowAuthFromEmpty(true);
47529
+ },
47530
+ noun: "widget"
47533
47531
  }), /*#__PURE__*/jsx("div", {
47534
47532
  className: "flex-1 min-h-0 overflow-y-auto px-2",
47535
47533
  children: listBody