@trops/dash-core 0.1.543 → 0.1.545
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 +54 -48
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +53 -47
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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, Button3, Button2, Paragraph, Sidebar, Panel, Stepper, Tag3, Card2, Card3, Heading3, MenuItem3, FormLabel, SelectMenu, Switch, SelectInput, CodeEditorVS, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, ButtonIcon2, DropdownPanel, MenuItem2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, MenuItem, Tag2, 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, CodeEditorInline, Icon2, AlgoliaSearchBox, CommandPalette, useSidebar, Divider, 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, Button3, Button2, Paragraph, Sidebar, Panel, Stepper, Tag3, Card2, Card3, Heading3, MenuItem3, FormLabel, SelectMenu, Switch, SelectInput, CodeEditorVS, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, ButtonIcon2, DropdownPanel, MenuItem2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, MenuItem, Tag2, 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, CodeEditorInline, Icon2, AlgoliaSearchBox, CommandPalette, useSidebar, Divider, Caption2, Caption, Caption3, 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';
|
|
@@ -56751,8 +56751,8 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
56751
56751
|
return setActiveTab("dependencies");
|
|
56752
56752
|
},
|
|
56753
56753
|
className: "px-3 py-1.5 text-sm font-medium -mb-px border-b-2 ".concat(activeTab === "dependencies" ? "border-indigo-400" : "border-transparent opacity-60 hover:opacity-100"),
|
|
56754
|
-
children: ["Dependencies", dependencyCount > 0 && /*#__PURE__*/jsxs(
|
|
56755
|
-
className: "ml-2
|
|
56754
|
+
children: ["Dependencies", dependencyCount > 0 && /*#__PURE__*/jsxs(Caption2, {
|
|
56755
|
+
className: "ml-2",
|
|
56756
56756
|
children: ["(", dependencyCount, ")"]
|
|
56757
56757
|
}), hasUnknownDependency && /*#__PURE__*/jsx("span", {
|
|
56758
56758
|
className: "ml-1 inline-block h-1.5 w-1.5 rounded-full bg-amber-400 align-middle"
|
|
@@ -56968,14 +56968,14 @@ function NotificationsTab(_ref4) {
|
|
|
56968
56968
|
return /*#__PURE__*/jsxs("div", {
|
|
56969
56969
|
className: "flex flex-col h-full",
|
|
56970
56970
|
children: [/*#__PURE__*/jsxs("div", {
|
|
56971
|
-
className: "flex flex-col gap-2 px-2 py-2 flex-shrink-0
|
|
56971
|
+
className: "flex flex-col gap-2 px-2 py-2 flex-shrink-0",
|
|
56972
56972
|
children: [/*#__PURE__*/jsx(SearchInput, {
|
|
56973
56973
|
value: searchQuery,
|
|
56974
56974
|
onChange: setSearchQuery,
|
|
56975
56975
|
placeholder: "Search widgets...",
|
|
56976
56976
|
inputClassName: "py-1.5 text-xs"
|
|
56977
56977
|
}), /*#__PURE__*/jsxs("div", {
|
|
56978
|
-
className: "flex flex-row items-center justify-between text-
|
|
56978
|
+
className: "flex flex-row items-center justify-between text-xs",
|
|
56979
56979
|
children: [/*#__PURE__*/jsxs("span", {
|
|
56980
56980
|
className: "opacity-50",
|
|
56981
56981
|
children: [filtered.length, " of ", widgetInstances.length, " widget", widgetInstances.length === 1 ? "" : "s"]
|
|
@@ -57000,7 +57000,7 @@ function NotificationsTab(_ref4) {
|
|
|
57000
57000
|
})]
|
|
57001
57001
|
})]
|
|
57002
57002
|
})]
|
|
57003
|
-
}), /*#__PURE__*/jsx("div", {
|
|
57003
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsx("div", {
|
|
57004
57004
|
className: "flex-1 overflow-y-auto px-2 py-2 space-y-3",
|
|
57005
57005
|
children: filtered.map(function (wi) {
|
|
57006
57006
|
return /*#__PURE__*/jsxs("div", {
|
|
@@ -57010,35 +57010,38 @@ function NotificationsTab(_ref4) {
|
|
|
57010
57010
|
children: [/*#__PURE__*/jsx("span", {
|
|
57011
57011
|
className: "text-sm font-medium",
|
|
57012
57012
|
children: wi.title
|
|
57013
|
-
}), /*#__PURE__*/jsxs(
|
|
57014
|
-
className: "
|
|
57013
|
+
}), /*#__PURE__*/jsxs(Caption, {
|
|
57014
|
+
className: "font-mono",
|
|
57015
57015
|
children: [wi.component, wi.itemId != null ? " \xB7 #".concat(wi.itemId) : ""]
|
|
57016
|
-
}), /*#__PURE__*/jsx(
|
|
57017
|
-
className: "text-[10px] opacity-40",
|
|
57016
|
+
}), /*#__PURE__*/jsx(Caption3, {
|
|
57018
57017
|
children: wi["package"]
|
|
57019
57018
|
})]
|
|
57020
|
-
}), /*#__PURE__*/
|
|
57021
|
-
className: "flex flex-
|
|
57022
|
-
children:
|
|
57023
|
-
|
|
57024
|
-
|
|
57025
|
-
|
|
57026
|
-
|
|
57027
|
-
|
|
57028
|
-
|
|
57029
|
-
|
|
57030
|
-
|
|
57031
|
-
|
|
57032
|
-
|
|
57019
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
57020
|
+
className: "flex flex-row gap-2",
|
|
57021
|
+
children: [/*#__PURE__*/jsx(Divider, {
|
|
57022
|
+
orientation: "vertical"
|
|
57023
|
+
}), /*#__PURE__*/jsx("div", {
|
|
57024
|
+
className: "flex flex-col flex-1",
|
|
57025
|
+
children: wi.notifications.map(function (notif) {
|
|
57026
|
+
return /*#__PURE__*/jsxs("div", {
|
|
57027
|
+
className: "flex flex-row items-center justify-between gap-3 py-2 px-2 -mx-2 rounded hover:bg-gray-800 transition-colors",
|
|
57028
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
57029
|
+
className: "flex flex-col",
|
|
57030
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
57031
|
+
className: "text-xs",
|
|
57032
|
+
children: notif.displayName
|
|
57033
|
+
}), notif.description && /*#__PURE__*/jsx(Caption, {
|
|
57034
|
+
children: notif.description
|
|
57035
|
+
})]
|
|
57036
|
+
}), /*#__PURE__*/jsx(Switch, {
|
|
57037
|
+
checked: isEnabled(wi.uuid, notif.key, notif.defaultEnabled),
|
|
57038
|
+
onChange: function onChange(value) {
|
|
57039
|
+
return setOne(wi.uuid, notif.key, value);
|
|
57040
|
+
}
|
|
57033
57041
|
})]
|
|
57034
|
-
}
|
|
57035
|
-
|
|
57036
|
-
|
|
57037
|
-
return setOne(wi.uuid, notif.key, value);
|
|
57038
|
-
}
|
|
57039
|
-
})]
|
|
57040
|
-
}, notif.key);
|
|
57041
|
-
})
|
|
57042
|
+
}, notif.key);
|
|
57043
|
+
})
|
|
57044
|
+
})]
|
|
57042
57045
|
})]
|
|
57043
57046
|
}, wi.uuid);
|
|
57044
57047
|
})
|
|
@@ -57090,9 +57093,9 @@ function ProvidersTab(_ref5) {
|
|
|
57090
57093
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57091
57094
|
className: "w-56 flex-shrink-0 bg-white/5 border border-white/10 rounded-lg overflow-hidden flex flex-col",
|
|
57092
57095
|
children: [/*#__PURE__*/jsx("div", {
|
|
57093
|
-
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider
|
|
57096
|
+
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
|
|
57094
57097
|
children: "Provider Types"
|
|
57095
|
-
}), /*#__PURE__*/jsx("div", {
|
|
57098
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsx("div", {
|
|
57096
57099
|
className: "overflow-y-auto flex-1",
|
|
57097
57100
|
children: typeEntries.map(function (_ref6) {
|
|
57098
57101
|
var _ref7 = _slicedToArray(_ref6, 2),
|
|
@@ -57131,7 +57134,7 @@ function ProvidersTab(_ref5) {
|
|
|
57131
57134
|
className: "flex-1 min-w-0 bg-white/5 border border-white/10 rounded-lg overflow-hidden flex flex-col",
|
|
57132
57135
|
children: selectedType ? /*#__PURE__*/jsxs(Fragment, {
|
|
57133
57136
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57134
|
-
className: "px-4 py-3
|
|
57137
|
+
className: "px-4 py-3 flex-shrink-0",
|
|
57135
57138
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57136
57139
|
className: "text-sm font-semibold",
|
|
57137
57140
|
children: [selectedType, " ", /*#__PURE__*/jsx("span", {
|
|
@@ -57142,7 +57145,7 @@ function ProvidersTab(_ref5) {
|
|
|
57142
57145
|
className: "text-xs opacity-60 mt-1",
|
|
57143
57146
|
children: "Apply one provider to every widget of this type, or adjust per-widget below."
|
|
57144
57147
|
})]
|
|
57145
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
57148
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsxs("div", {
|
|
57146
57149
|
className: "flex-1 overflow-y-auto p-4 space-y-4",
|
|
57147
57150
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57148
57151
|
className: "flex items-center gap-3",
|
|
@@ -57191,12 +57194,13 @@ function ProvidersTab(_ref5) {
|
|
|
57191
57194
|
"aria-label": "required",
|
|
57192
57195
|
children: "*"
|
|
57193
57196
|
})]
|
|
57194
|
-
}), (row.widgetRef || row.component) && /*#__PURE__*/jsx(
|
|
57195
|
-
|
|
57197
|
+
}), (row.widgetRef || row.component) && /*#__PURE__*/jsx(Caption, {
|
|
57198
|
+
block: true,
|
|
57199
|
+
className: "font-mono truncate mt-0.5",
|
|
57196
57200
|
title: row.widgetRef || row.component,
|
|
57197
57201
|
children: row.widgetRef || row.component
|
|
57198
57202
|
}), /*#__PURE__*/jsxs("div", {
|
|
57199
|
-
className: "flex items-center gap-1.5 mt-1 text-
|
|
57203
|
+
className: "flex items-center gap-1.5 mt-1 text-xs",
|
|
57200
57204
|
children: [/*#__PURE__*/jsx("span", {
|
|
57201
57205
|
className: "uppercase tracking-wide px-1.5 py-0.5 rounded font-semibold ".concat(needsAttention ? "bg-red-600 text-white" : isRequired ? "bg-indigo-800 text-indigo-100" : "bg-gray-700 text-gray-300"),
|
|
57202
57206
|
children: isRequired ? "required" : "optional"
|
|
@@ -57388,9 +57392,9 @@ function ListenersTab(_ref0) {
|
|
|
57388
57392
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57389
57393
|
className: "w-56 flex-shrink-0 bg-white/5 border border-white/10 rounded-lg overflow-hidden flex flex-col",
|
|
57390
57394
|
children: [/*#__PURE__*/jsx("div", {
|
|
57391
|
-
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider
|
|
57395
|
+
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
|
|
57392
57396
|
children: "Widgets"
|
|
57393
|
-
}), /*#__PURE__*/jsx("div", {
|
|
57397
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsx("div", {
|
|
57394
57398
|
className: "overflow-y-auto flex-1",
|
|
57395
57399
|
children: receivers.map(function (r) {
|
|
57396
57400
|
var isActive = r.key === selectedReceiverKey;
|
|
@@ -57403,8 +57407,9 @@ function ListenersTab(_ref0) {
|
|
|
57403
57407
|
children: [/*#__PURE__*/jsx("div", {
|
|
57404
57408
|
className: "text-sm font-medium truncate",
|
|
57405
57409
|
children: r.label
|
|
57406
|
-
}), r.widgetRef && /*#__PURE__*/jsx(
|
|
57407
|
-
|
|
57410
|
+
}), r.widgetRef && /*#__PURE__*/jsx(Caption, {
|
|
57411
|
+
block: true,
|
|
57412
|
+
className: "font-mono truncate mt-0.5",
|
|
57408
57413
|
title: r.widgetRef,
|
|
57409
57414
|
children: r.widgetRef
|
|
57410
57415
|
})]
|
|
@@ -57467,9 +57472,9 @@ function HandlersColumn(_ref10) {
|
|
|
57467
57472
|
return /*#__PURE__*/jsxs("div", {
|
|
57468
57473
|
className: "w-56 flex-shrink-0 bg-white/5 border border-white/10 rounded-lg overflow-hidden flex flex-col",
|
|
57469
57474
|
children: [/*#__PURE__*/jsx("div", {
|
|
57470
|
-
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider
|
|
57475
|
+
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
|
|
57471
57476
|
children: "Event Handlers"
|
|
57472
|
-
}), /*#__PURE__*/jsx("div", {
|
|
57477
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsx("div", {
|
|
57473
57478
|
className: "overflow-y-auto flex-1",
|
|
57474
57479
|
children: receiver.eventHandlers.length === 0 ? /*#__PURE__*/jsx("div", {
|
|
57475
57480
|
className: "text-xs opacity-50 text-center py-6 px-3",
|
|
@@ -57582,7 +57587,7 @@ function EventsColumn(_ref11) {
|
|
|
57582
57587
|
return /*#__PURE__*/jsxs("div", {
|
|
57583
57588
|
className: "flex-1 min-w-0 bg-white/5 border border-white/10 rounded-lg overflow-hidden flex flex-col",
|
|
57584
57589
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57585
|
-
className: "flex-shrink-0 px-4 py-2
|
|
57590
|
+
className: "flex-shrink-0 px-4 py-2 text-xs opacity-60",
|
|
57586
57591
|
children: ["Check an event to fire ", /*#__PURE__*/jsx("code", {
|
|
57587
57592
|
className: "text-xs",
|
|
57588
57593
|
children: handlerName
|
|
@@ -57590,7 +57595,7 @@ function EventsColumn(_ref11) {
|
|
|
57590
57595
|
className: "font-medium",
|
|
57591
57596
|
children: receiver.label
|
|
57592
57597
|
}), "."]
|
|
57593
|
-
}), /*#__PURE__*/jsx("div", {
|
|
57598
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsx("div", {
|
|
57594
57599
|
className: "flex-1 overflow-y-auto p-4 space-y-5",
|
|
57595
57600
|
children: emittersForList.length === 0 ? /*#__PURE__*/jsx("div", {
|
|
57596
57601
|
className: "text-sm opacity-60",
|
|
@@ -57603,8 +57608,9 @@ function EventsColumn(_ref11) {
|
|
|
57603
57608
|
children: [/*#__PURE__*/jsx("div", {
|
|
57604
57609
|
className: "text-sm font-semibold",
|
|
57605
57610
|
children: e.label
|
|
57606
|
-
}), (e.widgetRef || e.component) && /*#__PURE__*/jsx(
|
|
57607
|
-
|
|
57611
|
+
}), (e.widgetRef || e.component) && /*#__PURE__*/jsx(Caption, {
|
|
57612
|
+
block: true,
|
|
57613
|
+
className: "font-mono truncate",
|
|
57608
57614
|
children: (e.widgetRef || e.component) + (e.itemId != null ? "[".concat(e.itemId, "]") : "")
|
|
57609
57615
|
})]
|
|
57610
57616
|
}), e.events.map(function (eventName) {
|