@trops/dash-core 0.1.276 → 0.1.278
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 +78 -63
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +77 -62
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29450,6 +29450,11 @@ var ComponentManager = {
|
|
|
29450
29450
|
// otherwise fall back to the provided widgetKey for backward compatibility
|
|
29451
29451
|
var registrationKey = config.id || widgetKey;
|
|
29452
29452
|
tempComponentMap[registrationKey] = ComponentConfigModel(config);
|
|
29453
|
+
// Also register under plain component name for backward compat
|
|
29454
|
+
// (dashboards may reference "SlackWidget" instead of "trops.slack.SlackWidget")
|
|
29455
|
+
if (config.id && config.id !== widgetKey && !tempComponentMap[widgetKey]) {
|
|
29456
|
+
tempComponentMap[widgetKey] = tempComponentMap[registrationKey];
|
|
29457
|
+
}
|
|
29453
29458
|
this.setComponentMap(tempComponentMap);
|
|
29454
29459
|
},
|
|
29455
29460
|
/**
|
|
@@ -47981,27 +47986,33 @@ var DashTabBar = function DashTabBar(_ref) {
|
|
|
47981
47986
|
});
|
|
47982
47987
|
};
|
|
47983
47988
|
|
|
47984
|
-
var
|
|
47985
|
-
var
|
|
47986
|
-
|
|
47987
|
-
|
|
47988
|
-
|
|
47989
|
-
|
|
47990
|
-
|
|
47991
|
-
|
|
47992
|
-
|
|
47993
|
-
|
|
47994
|
-
|
|
47995
|
-
|
|
47996
|
-
|
|
47997
|
-
|
|
47998
|
-
|
|
47999
|
-
|
|
48000
|
-
|
|
48001
|
-
|
|
48002
|
-
|
|
48003
|
-
|
|
48004
|
-
|
|
47989
|
+
var CollapsibleContent = function CollapsibleContent(_ref) {
|
|
47990
|
+
var children = _ref.children;
|
|
47991
|
+
var _useSidebar = DashReact.useSidebar(),
|
|
47992
|
+
collapsed = _useSidebar.collapsed;
|
|
47993
|
+
return collapsed ? null : children;
|
|
47994
|
+
};
|
|
47995
|
+
var DashSidebar = function DashSidebar(_ref2) {
|
|
47996
|
+
var collapsed = _ref2.collapsed,
|
|
47997
|
+
onCollapsedChange = _ref2.onCollapsedChange,
|
|
47998
|
+
_ref2$workspaces = _ref2.workspaces,
|
|
47999
|
+
workspaces = _ref2$workspaces === void 0 ? [] : _ref2$workspaces,
|
|
48000
|
+
_ref2$menuItems = _ref2.menuItems,
|
|
48001
|
+
menuItems = _ref2$menuItems === void 0 ? [] : _ref2$menuItems,
|
|
48002
|
+
_ref2$activeTabId = _ref2.activeTabId,
|
|
48003
|
+
activeTabId = _ref2$activeTabId === void 0 ? null : _ref2$activeTabId,
|
|
48004
|
+
_ref2$recentDashboard = _ref2.recentDashboards,
|
|
48005
|
+
recentDashboards = _ref2$recentDashboard === void 0 ? [] : _ref2$recentDashboard,
|
|
48006
|
+
_ref2$authStatus = _ref2.authStatus,
|
|
48007
|
+
authStatus = _ref2$authStatus === void 0 ? "loading" : _ref2$authStatus,
|
|
48008
|
+
_ref2$authProfile = _ref2.authProfile,
|
|
48009
|
+
authProfile = _ref2$authProfile === void 0 ? null : _ref2$authProfile,
|
|
48010
|
+
onOpenWorkspace = _ref2.onOpenWorkspace,
|
|
48011
|
+
onNewDashboard = _ref2.onNewDashboard,
|
|
48012
|
+
onOpenSettings = _ref2.onOpenSettings,
|
|
48013
|
+
onOpenCommandPalette = _ref2.onOpenCommandPalette,
|
|
48014
|
+
onSignIn = _ref2.onSignIn,
|
|
48015
|
+
onSignOut = _ref2.onSignOut;
|
|
48005
48016
|
var _useContext = React.useContext(DashReact.ThemeContext),
|
|
48006
48017
|
themeVariant = _useContext.themeVariant,
|
|
48007
48018
|
changeThemeVariant = _useContext.changeThemeVariant;
|
|
@@ -48031,9 +48042,11 @@ var DashSidebar = function DashSidebar(_ref) {
|
|
|
48031
48042
|
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Header, {
|
|
48032
48043
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
48033
48044
|
className: "flex items-center justify-between",
|
|
48034
|
-
children: [
|
|
48035
|
-
|
|
48036
|
-
|
|
48045
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CollapsibleContent, {
|
|
48046
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
48047
|
+
className: "font-bold text-lg tracking-tight opacity-80",
|
|
48048
|
+
children: "Dash."
|
|
48049
|
+
})
|
|
48037
48050
|
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Trigger, {})]
|
|
48038
48051
|
})
|
|
48039
48052
|
}), /*#__PURE__*/jsxRuntime.jsxs(DashReact.Sidebar.Content, {
|
|
@@ -48044,25 +48057,27 @@ var DashSidebar = function DashSidebar(_ref) {
|
|
|
48044
48057
|
}),
|
|
48045
48058
|
onClick: onOpenCommandPalette,
|
|
48046
48059
|
children: "Search"
|
|
48047
|
-
}),
|
|
48048
|
-
|
|
48049
|
-
|
|
48050
|
-
|
|
48051
|
-
|
|
48052
|
-
|
|
48053
|
-
|
|
48054
|
-
|
|
48055
|
-
icon:
|
|
48056
|
-
|
|
48057
|
-
|
|
48058
|
-
|
|
48059
|
-
|
|
48060
|
-
|
|
48061
|
-
|
|
48062
|
-
|
|
48063
|
-
|
|
48064
|
-
|
|
48065
|
-
|
|
48060
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CollapsibleContent, {
|
|
48061
|
+
children: visibleRecents.length > 0 && /*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Group, {
|
|
48062
|
+
label: "Recents",
|
|
48063
|
+
children: visibleRecents.map(function (recent) {
|
|
48064
|
+
var ws = workspaces.find(function (w) {
|
|
48065
|
+
return w.id === recent.workspaceId;
|
|
48066
|
+
});
|
|
48067
|
+
return /*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Item, {
|
|
48068
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
48069
|
+
icon: "clock-rotate-left",
|
|
48070
|
+
className: "h-3.5 w-3.5"
|
|
48071
|
+
}),
|
|
48072
|
+
active: recent.workspaceId === activeTabId,
|
|
48073
|
+
onClick: function onClick() {
|
|
48074
|
+
return ws && onOpenWorkspace(ws);
|
|
48075
|
+
},
|
|
48076
|
+
children: (recent.name || "Untitled").replace(/^./, function (c) {
|
|
48077
|
+
return c.toUpperCase();
|
|
48078
|
+
})
|
|
48079
|
+
}, recent.workspaceId);
|
|
48080
|
+
})
|
|
48066
48081
|
})
|
|
48067
48082
|
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Group, {
|
|
48068
48083
|
label: "Dashboards",
|
|
@@ -48074,7 +48089,7 @@ var DashSidebar = function DashSidebar(_ref) {
|
|
|
48074
48089
|
onClick: onNewDashboard,
|
|
48075
48090
|
children: "New Dashboard"
|
|
48076
48091
|
})
|
|
48077
|
-
}),
|
|
48092
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(CollapsibleContent, {
|
|
48078
48093
|
children: [menuItems.map(function (menuItem) {
|
|
48079
48094
|
var folderWorkspaces = workspacesForFolder(menuItem.id);
|
|
48080
48095
|
var folderIcon = menuItem.icon || menuItem.folder || "folder";
|
|
@@ -48130,15 +48145,15 @@ var DashSidebar = function DashSidebar(_ref) {
|
|
|
48130
48145
|
})]
|
|
48131
48146
|
});
|
|
48132
48147
|
};
|
|
48133
|
-
var FooterPopover = function FooterPopover(
|
|
48134
|
-
var collapsed =
|
|
48135
|
-
themeVariant =
|
|
48136
|
-
changeThemeVariant =
|
|
48137
|
-
authStatus =
|
|
48138
|
-
authProfile =
|
|
48139
|
-
onOpenSettings =
|
|
48140
|
-
onSignIn =
|
|
48141
|
-
onSignOut =
|
|
48148
|
+
var FooterPopover = function FooterPopover(_ref3) {
|
|
48149
|
+
var collapsed = _ref3.collapsed,
|
|
48150
|
+
themeVariant = _ref3.themeVariant,
|
|
48151
|
+
changeThemeVariant = _ref3.changeThemeVariant,
|
|
48152
|
+
authStatus = _ref3.authStatus,
|
|
48153
|
+
authProfile = _ref3.authProfile,
|
|
48154
|
+
onOpenSettings = _ref3.onOpenSettings,
|
|
48155
|
+
onSignIn = _ref3.onSignIn,
|
|
48156
|
+
onSignOut = _ref3.onSignOut;
|
|
48142
48157
|
var buttonRef = React.useRef(null);
|
|
48143
48158
|
var _useState = React.useState(false),
|
|
48144
48159
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -48182,10 +48197,10 @@ var FooterPopover = function FooterPopover(_ref2) {
|
|
|
48182
48197
|
}
|
|
48183
48198
|
return /*#__PURE__*/jsxRuntime.jsx(react.Popover, {
|
|
48184
48199
|
className: "relative",
|
|
48185
|
-
children: function children(
|
|
48200
|
+
children: function children(_ref4) {
|
|
48186
48201
|
var _rect$left;
|
|
48187
|
-
var open =
|
|
48188
|
-
close =
|
|
48202
|
+
var open = _ref4.open,
|
|
48203
|
+
close = _ref4.close;
|
|
48189
48204
|
var rect = open && buttonRef.current ? buttonRef.current.getBoundingClientRect() : null;
|
|
48190
48205
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
48191
48206
|
children: [/*#__PURE__*/jsxRuntime.jsxs(react.Popover.Button, {
|
|
@@ -48266,12 +48281,12 @@ var FooterPopover = function FooterPopover(_ref2) {
|
|
|
48266
48281
|
}
|
|
48267
48282
|
});
|
|
48268
48283
|
};
|
|
48269
|
-
var PopoverItem = function PopoverItem(
|
|
48270
|
-
var icon =
|
|
48271
|
-
label =
|
|
48272
|
-
onClick =
|
|
48273
|
-
|
|
48274
|
-
active =
|
|
48284
|
+
var PopoverItem = function PopoverItem(_ref5) {
|
|
48285
|
+
var icon = _ref5.icon,
|
|
48286
|
+
label = _ref5.label,
|
|
48287
|
+
onClick = _ref5.onClick,
|
|
48288
|
+
_ref5$active = _ref5.active,
|
|
48289
|
+
active = _ref5$active === void 0 ? false : _ref5$active;
|
|
48275
48290
|
return /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
48276
48291
|
type: "button",
|
|
48277
48292
|
onClick: onClick,
|