@trops/dash-core 0.1.542 → 0.1.544
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 +47 -42
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +46 -41
- 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, 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, 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';
|
|
@@ -56088,7 +56088,7 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
56088
56088
|
return /*#__PURE__*/jsxs("div", {
|
|
56089
56089
|
className: "flex flex-col h-full min-h-0",
|
|
56090
56090
|
children: [/*#__PURE__*/jsxs("div", {
|
|
56091
|
-
className: "flex-shrink-0 flex flex-row items-center justify-between gap-2 pb-3
|
|
56091
|
+
className: "flex-shrink-0 flex flex-row items-center justify-between gap-2 pb-3",
|
|
56092
56092
|
children: [/*#__PURE__*/jsxs("div", {
|
|
56093
56093
|
className: "flex flex-col",
|
|
56094
56094
|
children: [/*#__PURE__*/jsxs("span", {
|
|
@@ -56112,7 +56112,7 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
56112
56112
|
size: "sm"
|
|
56113
56113
|
})]
|
|
56114
56114
|
})]
|
|
56115
|
-
}), error && /*#__PURE__*/jsx("div", {
|
|
56115
|
+
}), /*#__PURE__*/jsx(Divider, {}), error && /*#__PURE__*/jsx("div", {
|
|
56116
56116
|
className: "flex-shrink-0 text-xs text-red-400 bg-red-900/20 border border-red-700 rounded p-2 mt-3",
|
|
56117
56117
|
children: error
|
|
56118
56118
|
}), /*#__PURE__*/jsx("div", {
|
|
@@ -56684,7 +56684,7 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
56684
56684
|
children: /*#__PURE__*/jsxs("div", {
|
|
56685
56685
|
className: "flex flex-col h-full w-full rounded-lg overflow-clip border ".concat(panelStyles.backgroundColor || "", " ").concat(panelStyles.borderColor || "", " ").concat(panelStyles.textColor || ""),
|
|
56686
56686
|
children: [/*#__PURE__*/jsxs("div", {
|
|
56687
|
-
className: "flex-shrink-0 flex flex-row items-center justify-between p-4
|
|
56687
|
+
className: "flex-shrink-0 flex flex-row items-center justify-between p-4",
|
|
56688
56688
|
children: [/*#__PURE__*/jsxs("div", {
|
|
56689
56689
|
className: "flex items-center gap-3",
|
|
56690
56690
|
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
@@ -56706,8 +56706,8 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
56706
56706
|
className: "h-5 w-5"
|
|
56707
56707
|
})
|
|
56708
56708
|
})]
|
|
56709
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
56710
|
-
className: "flex-shrink-0 flex flex-row items-center gap-2 px-4 pt-3
|
|
56709
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsxs("div", {
|
|
56710
|
+
className: "flex-shrink-0 flex flex-row items-center gap-2 px-4 pt-3",
|
|
56711
56711
|
children: [/*#__PURE__*/jsxs("button", {
|
|
56712
56712
|
type: "button",
|
|
56713
56713
|
onClick: function onClick() {
|
|
@@ -56758,7 +56758,7 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
56758
56758
|
className: "ml-1 inline-block h-1.5 w-1.5 rounded-full bg-amber-400 align-middle"
|
|
56759
56759
|
})]
|
|
56760
56760
|
})]
|
|
56761
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
56761
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsxs("div", {
|
|
56762
56762
|
className: "flex-1 min-h-0 ".concat(activeTab === "widgets" ? "" : "p-5"),
|
|
56763
56763
|
children: [activeTab === "listeners" && /*#__PURE__*/jsx(ListenersTab, {
|
|
56764
56764
|
emitters: emitters,
|
|
@@ -56784,8 +56784,8 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
56784
56784
|
}), activeTab === "dependencies" && /*#__PURE__*/jsx(DependenciesTab, {
|
|
56785
56785
|
dependencies: dependencies
|
|
56786
56786
|
})]
|
|
56787
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
56788
|
-
className: "flex-shrink-0 flex flex-row justify-end gap-2 p-4
|
|
56787
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsxs("div", {
|
|
56788
|
+
className: "flex-shrink-0 flex flex-row justify-end gap-2 p-4",
|
|
56789
56789
|
children: [/*#__PURE__*/jsx(Button3, {
|
|
56790
56790
|
title: "Cancel",
|
|
56791
56791
|
onClick: handleCancel
|
|
@@ -56968,7 +56968,7 @@ 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,
|
|
@@ -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", {
|
|
@@ -57017,28 +57017,33 @@ function NotificationsTab(_ref4) {
|
|
|
57017
57017
|
className: "text-[10px] opacity-40",
|
|
57018
57018
|
children: wi["package"]
|
|
57019
57019
|
})]
|
|
57020
|
-
}), /*#__PURE__*/
|
|
57021
|
-
className: "flex flex-
|
|
57022
|
-
children:
|
|
57023
|
-
|
|
57024
|
-
|
|
57025
|
-
|
|
57026
|
-
|
|
57027
|
-
|
|
57028
|
-
|
|
57029
|
-
|
|
57030
|
-
|
|
57031
|
-
|
|
57032
|
-
|
|
57020
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
57021
|
+
className: "flex flex-row gap-2",
|
|
57022
|
+
children: [/*#__PURE__*/jsx(Divider, {
|
|
57023
|
+
orientation: "vertical"
|
|
57024
|
+
}), /*#__PURE__*/jsx("div", {
|
|
57025
|
+
className: "flex flex-col flex-1",
|
|
57026
|
+
children: wi.notifications.map(function (notif) {
|
|
57027
|
+
return /*#__PURE__*/jsxs("div", {
|
|
57028
|
+
className: "flex flex-row items-center justify-between gap-3 py-2 px-2 -mx-2 rounded hover:bg-gray-800 transition-colors",
|
|
57029
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
57030
|
+
className: "flex flex-col",
|
|
57031
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
57032
|
+
className: "text-xs",
|
|
57033
|
+
children: notif.displayName
|
|
57034
|
+
}), notif.description && /*#__PURE__*/jsx("span", {
|
|
57035
|
+
className: "text-[10px] opacity-50",
|
|
57036
|
+
children: notif.description
|
|
57037
|
+
})]
|
|
57038
|
+
}), /*#__PURE__*/jsx(Switch, {
|
|
57039
|
+
checked: isEnabled(wi.uuid, notif.key, notif.defaultEnabled),
|
|
57040
|
+
onChange: function onChange(value) {
|
|
57041
|
+
return setOne(wi.uuid, notif.key, value);
|
|
57042
|
+
}
|
|
57033
57043
|
})]
|
|
57034
|
-
}
|
|
57035
|
-
|
|
57036
|
-
|
|
57037
|
-
return setOne(wi.uuid, notif.key, value);
|
|
57038
|
-
}
|
|
57039
|
-
})]
|
|
57040
|
-
}, notif.key);
|
|
57041
|
-
})
|
|
57044
|
+
}, notif.key);
|
|
57045
|
+
})
|
|
57046
|
+
})]
|
|
57042
57047
|
})]
|
|
57043
57048
|
}, wi.uuid);
|
|
57044
57049
|
})
|
|
@@ -57090,9 +57095,9 @@ function ProvidersTab(_ref5) {
|
|
|
57090
57095
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57091
57096
|
className: "w-56 flex-shrink-0 bg-white/5 border border-white/10 rounded-lg overflow-hidden flex flex-col",
|
|
57092
57097
|
children: [/*#__PURE__*/jsx("div", {
|
|
57093
|
-
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider
|
|
57098
|
+
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
|
|
57094
57099
|
children: "Provider Types"
|
|
57095
|
-
}), /*#__PURE__*/jsx("div", {
|
|
57100
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsx("div", {
|
|
57096
57101
|
className: "overflow-y-auto flex-1",
|
|
57097
57102
|
children: typeEntries.map(function (_ref6) {
|
|
57098
57103
|
var _ref7 = _slicedToArray(_ref6, 2),
|
|
@@ -57131,7 +57136,7 @@ function ProvidersTab(_ref5) {
|
|
|
57131
57136
|
className: "flex-1 min-w-0 bg-white/5 border border-white/10 rounded-lg overflow-hidden flex flex-col",
|
|
57132
57137
|
children: selectedType ? /*#__PURE__*/jsxs(Fragment, {
|
|
57133
57138
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57134
|
-
className: "px-4 py-3
|
|
57139
|
+
className: "px-4 py-3 flex-shrink-0",
|
|
57135
57140
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57136
57141
|
className: "text-sm font-semibold",
|
|
57137
57142
|
children: [selectedType, " ", /*#__PURE__*/jsx("span", {
|
|
@@ -57142,7 +57147,7 @@ function ProvidersTab(_ref5) {
|
|
|
57142
57147
|
className: "text-xs opacity-60 mt-1",
|
|
57143
57148
|
children: "Apply one provider to every widget of this type, or adjust per-widget below."
|
|
57144
57149
|
})]
|
|
57145
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
57150
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsxs("div", {
|
|
57146
57151
|
className: "flex-1 overflow-y-auto p-4 space-y-4",
|
|
57147
57152
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57148
57153
|
className: "flex items-center gap-3",
|
|
@@ -57388,9 +57393,9 @@ function ListenersTab(_ref0) {
|
|
|
57388
57393
|
children: [/*#__PURE__*/jsxs("div", {
|
|
57389
57394
|
className: "w-56 flex-shrink-0 bg-white/5 border border-white/10 rounded-lg overflow-hidden flex flex-col",
|
|
57390
57395
|
children: [/*#__PURE__*/jsx("div", {
|
|
57391
|
-
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider
|
|
57396
|
+
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
|
|
57392
57397
|
children: "Widgets"
|
|
57393
|
-
}), /*#__PURE__*/jsx("div", {
|
|
57398
|
+
}), /*#__PURE__*/jsx(Divider, {}), /*#__PURE__*/jsx("div", {
|
|
57394
57399
|
className: "overflow-y-auto flex-1",
|
|
57395
57400
|
children: receivers.map(function (r) {
|
|
57396
57401
|
var isActive = r.key === selectedReceiverKey;
|
|
@@ -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",
|