@trops/dash-core 0.1.222 → 0.1.225

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
@@ -47721,6 +47721,55 @@ var WidgetSidebar = function WidgetSidebar(_ref4) {
47721
47721
  });
47722
47722
  };
47723
47723
 
47724
+ var WELCOME_STORAGE_KEY = "dash:welcome-prompted";
47725
+ function markPrompted() {
47726
+ localStorage.setItem(WELCOME_STORAGE_KEY, "true");
47727
+ }
47728
+ var WelcomePrompt = function WelcomePrompt(_ref) {
47729
+ var isOpen = _ref.isOpen,
47730
+ onAccept = _ref.onAccept,
47731
+ onDismiss = _ref.onDismiss;
47732
+ var handleAccept = function handleAccept() {
47733
+ markPrompted();
47734
+ if (onAccept) onAccept();
47735
+ };
47736
+ var handleDismiss = function handleDismiss() {
47737
+ markPrompted();
47738
+ if (onDismiss) onDismiss();
47739
+ };
47740
+ return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Modal, {
47741
+ isOpen: isOpen,
47742
+ setIsOpen: handleDismiss,
47743
+ width: "w-[520px]",
47744
+ height: "h-auto",
47745
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
47746
+ className: "px-8 pt-8 pb-4 flex flex-col items-center text-center gap-4",
47747
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
47748
+ className: "text-4xl opacity-60",
47749
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
47750
+ icon: "table-cells-large"
47751
+ })
47752
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading2, {
47753
+ children: "Welcome to Dash!"
47754
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph2, {
47755
+ className: "max-w-sm",
47756
+ children: "Get started with a sample dashboard that showcases widgets for AI chat, notes, GitHub, Slack, Gmail, Calendar, and more \u2014 all in a ready-made 4x3 grid."
47757
+ })]
47758
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Modal.Footer, {
47759
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
47760
+ className: "flex flex-row gap-3 w-full justify-end",
47761
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Button2, {
47762
+ title: "Start Fresh",
47763
+ onClick: handleDismiss
47764
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
47765
+ title: "Load Sample Dashboard",
47766
+ onClick: handleAccept
47767
+ })]
47768
+ })
47769
+ })]
47770
+ });
47771
+ };
47772
+
47724
47773
  function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
47725
47774
  function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
47726
47775
  var DashboardStage = function DashboardStage(_ref) {
@@ -47735,15 +47784,21 @@ var DashboardStage = function DashboardStage(_ref) {
47735
47784
  _ref$popout = _ref.popout,
47736
47785
  popout = _ref$popout === void 0 ? false : _ref$popout,
47737
47786
  _ref$popoutWorkspaceI = _ref.popoutWorkspaceId,
47738
- popoutWorkspaceId = _ref$popoutWorkspaceI === void 0 ? null : _ref$popoutWorkspaceI;
47787
+ popoutWorkspaceId = _ref$popoutWorkspaceI === void 0 ? null : _ref$popoutWorkspaceI,
47788
+ _ref$showWelcomePromp = _ref.showWelcomePrompt,
47789
+ showWelcomePrompt = _ref$showWelcomePromp === void 0 ? false : _ref$showWelcomePromp,
47790
+ _ref$onAcceptWelcome = _ref.onAcceptWelcome,
47791
+ onAcceptWelcome = _ref$onAcceptWelcome === void 0 ? null : _ref$onAcceptWelcome,
47792
+ _ref$onDismissWelcome = _ref.onDismissWelcome,
47793
+ onDismissWelcome = _ref$onDismissWelcome === void 0 ? null : _ref$onDismissWelcome;
47739
47794
  return /*#__PURE__*/jsxRuntime.jsx(React.Profiler, {
47740
47795
  id: "myapp",
47741
47796
  onRender: function onRender() {},
47742
- children: /*#__PURE__*/jsxRuntime.jsx(DashboardWrapper, {
47797
+ children: /*#__PURE__*/jsxRuntime.jsxs(DashboardWrapper, {
47743
47798
  dashApi: dashApi,
47744
47799
  credentials: credentials,
47745
47800
  backgroundColor: backgroundColor,
47746
- children: /*#__PURE__*/jsxRuntime.jsx(DashboardStageInner, {
47801
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashboardStageInner, {
47747
47802
  dashApi: dashApi,
47748
47803
  credentials: credentials,
47749
47804
  workspace: workspace,
@@ -47751,7 +47806,11 @@ var DashboardStage = function DashboardStage(_ref) {
47751
47806
  backgroundColor: backgroundColor,
47752
47807
  popout: popout,
47753
47808
  popoutWorkspaceId: popoutWorkspaceId
47754
- })
47809
+ }), /*#__PURE__*/jsxRuntime.jsx(WelcomePrompt, {
47810
+ isOpen: showWelcomePrompt,
47811
+ onAccept: onAcceptWelcome,
47812
+ onDismiss: onDismissWelcome
47813
+ })]
47755
47814
  })
47756
47815
  });
47757
47816
  };
@@ -50360,6 +50419,7 @@ exports.ThemeColorDots = ThemeColorDots;
50360
50419
  exports.ThemeManagerModal = ThemeManagerModal;
50361
50420
  exports.ThemeModel = ThemeModel;
50362
50421
  exports.ThemeWrapper = ThemeWrapper;
50422
+ exports.WELCOME_STORAGE_KEY = WELCOME_STORAGE_KEY;
50363
50423
  exports.WORKSPACE_DELETE = WORKSPACE_DELETE;
50364
50424
  exports.WORKSPACE_DELETE_COMPLETE = WORKSPACE_DELETE_COMPLETE;
50365
50425
  exports.WORKSPACE_DELETE_ERROR = WORKSPACE_DELETE_ERROR;
@@ -50370,6 +50430,7 @@ exports.WORKSPACE_SAVE = WORKSPACE_SAVE;
50370
50430
  exports.WORKSPACE_SAVE_COMPLETE = WORKSPACE_SAVE_COMPLETE;
50371
50431
  exports.WORKSPACE_SAVE_ERROR = WORKSPACE_SAVE_ERROR;
50372
50432
  exports.WebDashboardApi = WebDashboardApi;
50433
+ exports.WelcomePrompt = WelcomePrompt;
50373
50434
  exports.Widget = Widget;
50374
50435
  exports.WidgetApi = WidgetApi;
50375
50436
  exports.WidgetConfigPanel = WidgetConfigPanel;