@mongodb-js/compass-components 1.2.0 → 1.4.0
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/lib/components/accordion.d.ts.map +1 -1
- package/lib/components/accordion.js +4 -5
- package/lib/components/accordion.js.map +1 -1
- package/lib/components/bson-value.d.ts +5 -3
- package/lib/components/bson-value.d.ts.map +1 -1
- package/lib/components/bson-value.js +52 -34
- package/lib/components/bson-value.js.map +1 -1
- package/lib/components/cancel-loader.js +1 -1
- package/lib/components/cancel-loader.js.map +1 -1
- package/lib/components/collapsible-field-set.d.ts +2 -4
- package/lib/components/collapsible-field-set.d.ts.map +1 -1
- package/lib/components/collapsible-field-set.js +13 -20
- package/lib/components/collapsible-field-set.js.map +1 -1
- package/lib/components/document-list/document-actions-group.js +1 -1
- package/lib/components/document-list/document-actions-group.js.map +1 -1
- package/lib/components/document-list/document-edit-actions-footer.d.ts.map +1 -1
- package/lib/components/document-list/document-edit-actions-footer.js +17 -11
- package/lib/components/document-list/document-edit-actions-footer.js.map +1 -1
- package/lib/components/document-list/document.js +4 -4
- package/lib/components/document-list/document.js.map +1 -1
- package/lib/components/document-list/element-actions.d.ts.map +1 -1
- package/lib/components/document-list/element-actions.js +18 -15
- package/lib/components/document-list/element-actions.js.map +1 -1
- package/lib/components/document-list/element-editors.d.ts.map +1 -1
- package/lib/components/document-list/element-editors.js +47 -22
- package/lib/components/document-list/element-editors.js.map +1 -1
- package/lib/components/document-list/element.d.ts.map +1 -1
- package/lib/components/document-list/element.js +71 -21
- package/lib/components/document-list/element.js.map +1 -1
- package/lib/components/document-list/typography.d.ts +6 -0
- package/lib/components/document-list/typography.d.ts.map +1 -0
- package/lib/components/document-list/typography.js +10 -0
- package/lib/components/document-list/typography.js.map +1 -0
- package/lib/components/empty-content.d.ts +12 -0
- package/lib/components/empty-content.d.ts.map +1 -0
- package/lib/components/empty-content.js +52 -0
- package/lib/components/empty-content.js.map +1 -0
- package/lib/components/error-warning-summary.d.ts +2 -0
- package/lib/components/error-warning-summary.d.ts.map +1 -1
- package/lib/components/error-warning-summary.js +6 -6
- package/lib/components/error-warning-summary.js.map +1 -1
- package/lib/components/file-input.d.ts +34 -1
- package/lib/components/file-input.d.ts.map +1 -1
- package/lib/components/file-input.js +113 -16
- package/lib/components/file-input.js.map +1 -1
- package/lib/components/form-field-container.d.ts +8 -0
- package/lib/components/form-field-container.d.ts.map +1 -0
- package/lib/components/form-field-container.js +16 -0
- package/lib/components/form-field-container.js.map +1 -0
- package/lib/components/icons/document-icon.d.ts +7 -0
- package/lib/components/icons/document-icon.d.ts.map +1 -0
- package/lib/components/icons/document-icon.js +52 -0
- package/lib/components/icons/document-icon.js.map +1 -0
- package/lib/components/icons/favorite-icon.d.ts.map +1 -1
- package/lib/components/icons/favorite-icon.js +2 -3
- package/lib/components/icons/favorite-icon.js.map +1 -1
- package/lib/components/icons/no-saved-items-icon.d.ts +8 -0
- package/lib/components/icons/no-saved-items-icon.d.ts.map +1 -0
- package/lib/components/icons/no-saved-items-icon.js +41 -0
- package/lib/components/icons/no-saved-items-icon.js.map +1 -0
- package/lib/components/interactive-popover.d.ts +3 -4
- package/lib/components/interactive-popover.d.ts.map +1 -1
- package/lib/components/interactive-popover.js +30 -16
- package/lib/components/interactive-popover.js.map +1 -1
- package/lib/components/item-action-controls.d.ts +13 -0
- package/lib/components/item-action-controls.d.ts.map +1 -1
- package/lib/components/item-action-controls.js +44 -7
- package/lib/components/item-action-controls.js.map +1 -1
- package/lib/components/keyline-card.d.ts +7 -0
- package/lib/components/keyline-card.d.ts.map +1 -0
- package/lib/components/keyline-card.js +28 -0
- package/lib/components/keyline-card.js.map +1 -0
- package/lib/components/leafygreen.d.ts +19 -15
- package/lib/components/leafygreen.d.ts.map +1 -1
- package/lib/components/leafygreen.js +27 -9
- package/lib/components/leafygreen.js.map +1 -1
- package/lib/components/list-editor.d.ts +14 -0
- package/lib/components/list-editor.d.ts.map +1 -0
- package/lib/components/list-editor.js +36 -0
- package/lib/components/list-editor.js.map +1 -0
- package/lib/components/{confirmation-modal.d.ts → modals/confirmation-modal.d.ts} +1 -1
- package/lib/components/modals/confirmation-modal.d.ts.map +1 -0
- package/lib/components/{confirmation-modal.js → modals/confirmation-modal.js} +1 -1
- package/lib/components/modals/confirmation-modal.js.map +1 -0
- package/lib/components/modals/form-modal.d.ts +22 -0
- package/lib/components/modals/form-modal.d.ts.map +1 -0
- package/lib/components/modals/form-modal.js +31 -0
- package/lib/components/modals/form-modal.js.map +1 -0
- package/lib/components/modals/info-modal.d.ts +12 -0
- package/lib/components/modals/info-modal.d.ts.map +1 -0
- package/lib/components/modals/info-modal.js +23 -0
- package/lib/components/modals/info-modal.js.map +1 -0
- package/lib/components/modals/modal-body.d.ts +16 -0
- package/lib/components/modals/modal-body.d.ts.map +1 -0
- package/lib/components/modals/modal-body.js +66 -0
- package/lib/components/modals/modal-body.js.map +1 -0
- package/lib/components/modals/modal-footer-button.d.ts +5 -0
- package/lib/components/modals/modal-footer-button.d.ts.map +1 -0
- package/lib/components/modals/modal-footer-button.js +37 -0
- package/lib/components/modals/modal-footer-button.js.map +1 -0
- package/lib/components/modals/modal-header.d.ts +15 -0
- package/lib/components/modals/modal-header.d.ts.map +1 -0
- package/lib/components/modals/modal-header.js +65 -0
- package/lib/components/modals/modal-header.js.map +1 -0
- package/lib/components/modals/modal.d.ts +7 -0
- package/lib/components/modals/modal.d.ts.map +1 -0
- package/lib/components/{modal.js → modals/modal.js} +9 -3
- package/lib/components/modals/modal.js.map +1 -0
- package/lib/components/placeholder.js +4 -4
- package/lib/components/placeholder.js.map +1 -1
- package/lib/components/resize-handle.d.ts.map +1 -1
- package/lib/components/resize-handle.js +2 -1
- package/lib/components/resize-handle.js.map +1 -1
- package/lib/components/resizeable-sidebar.d.ts.map +1 -1
- package/lib/components/resizeable-sidebar.js +21 -22
- package/lib/components/resizeable-sidebar.js.map +1 -1
- package/lib/components/spin-loader.js +1 -1
- package/lib/components/spin-loader.js.map +1 -1
- package/lib/components/tab-nav-bar.d.ts.map +1 -1
- package/lib/components/tab-nav-bar.js +11 -7
- package/lib/components/tab-nav-bar.js.map +1 -1
- package/lib/components/virtual-grid.d.ts +1 -1
- package/lib/components/workspace-container.d.ts +1 -0
- package/lib/components/workspace-container.d.ts.map +1 -1
- package/lib/components/workspace-container.js +98 -10
- package/lib/components/workspace-container.js.map +1 -1
- package/lib/components/workspace-tabs/tab.d.ts.map +1 -1
- package/lib/components/workspace-tabs/tab.js +26 -27
- package/lib/components/workspace-tabs/tab.js.map +1 -1
- package/lib/components/workspace-tabs/workspace-tabs.d.ts +2 -0
- package/lib/components/workspace-tabs/workspace-tabs.d.ts.map +1 -1
- package/lib/components/workspace-tabs/workspace-tabs.js +10 -8
- package/lib/components/workspace-tabs/workspace-tabs.js.map +1 -1
- package/lib/hooks/use-focus-ring.d.ts.map +1 -1
- package/lib/hooks/use-focus-ring.js +3 -2
- package/lib/hooks/use-focus-ring.js.map +1 -1
- package/lib/hooks/use-formatted-date.d.ts +2 -0
- package/lib/hooks/use-formatted-date.d.ts.map +1 -0
- package/lib/hooks/use-formatted-date.js +20 -0
- package/lib/hooks/use-formatted-date.js.map +1 -0
- package/lib/hooks/use-theme.d.ts +2 -1
- package/lib/hooks/use-theme.d.ts.map +1 -1
- package/lib/hooks/use-theme.js +9 -6
- package/lib/hooks/use-theme.js.map +1 -1
- package/lib/hooks/use-toast.d.ts +2 -0
- package/lib/hooks/use-toast.d.ts.map +1 -1
- package/lib/hooks/use-toast.js +59 -37
- package/lib/hooks/use-toast.js.map +1 -1
- package/lib/index.d.ts +21 -14
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +38 -21
- package/lib/index.js.map +1 -1
- package/lib/utils/format-date.d.ts +2 -0
- package/lib/utils/format-date.d.ts.map +1 -0
- package/lib/utils/format-date.js +47 -0
- package/lib/utils/format-date.js.map +1 -0
- package/package.json +38 -42
- package/lib/compass-font-sizes.d.ts +0 -3
- package/lib/compass-font-sizes.d.ts.map +0 -1
- package/lib/compass-font-sizes.js +0 -6
- package/lib/compass-font-sizes.js.map +0 -1
- package/lib/compass-ui-colors.d.ts +0 -7
- package/lib/compass-ui-colors.d.ts.map +0 -1
- package/lib/compass-ui-colors.js +0 -10
- package/lib/compass-ui-colors.js.map +0 -1
- package/lib/components/confirmation-modal.d.ts.map +0 -1
- package/lib/components/confirmation-modal.js.map +0 -1
- package/lib/components/document-list/font-awesome-icon.d.ts +0 -14
- package/lib/components/document-list/font-awesome-icon.d.ts.map +0 -1
- package/lib/components/document-list/font-awesome-icon.js +0 -29
- package/lib/components/document-list/font-awesome-icon.js.map +0 -1
- package/lib/components/editor.d.ts +0 -36
- package/lib/components/editor.d.ts.map +0 -1
- package/lib/components/editor.js +0 -107
- package/lib/components/editor.js.map +0 -1
- package/lib/components/modal-title.d.ts +0 -5
- package/lib/components/modal-title.d.ts.map +0 -1
- package/lib/components/modal-title.js +0 -18
- package/lib/components/modal-title.js.map +0 -1
- package/lib/components/modal.d.ts +0 -7
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js.map +0 -1
- package/lib/components/toolbar.d.ts +0 -10
- package/lib/components/toolbar.d.ts.map +0 -1
- package/lib/components/toolbar.js +0 -25
- package/lib/components/toolbar.js.map +0 -1
- package/lib/constants/mongodb-ace-theme-query.d.ts +0 -3
- package/lib/constants/mongodb-ace-theme-query.d.ts.map +0 -1
- package/lib/constants/mongodb-ace-theme-query.js +0 -123
- package/lib/constants/mongodb-ace-theme-query.js.map +0 -1
- package/lib/constants/mongodb-ace-theme.d.ts +0 -3
- package/lib/constants/mongodb-ace-theme.d.ts.map +0 -1
- package/lib/constants/mongodb-ace-theme.js +0 -113
- package/lib/constants/mongodb-ace-theme.js.map +0 -1
package/lib/index.js
CHANGED
|
@@ -29,8 +29,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.
|
|
33
|
-
exports.DocumentList = exports.BSONValue = exports.
|
|
32
|
+
exports.MoreOptionsToggle = exports.IndexIcon = exports.FileInput = exports.ErrorSummary = exports.ConfirmationModal = exports.CancelLoader = exports.CollapsibleFieldSet = exports.Accordion = exports.InfoModal = exports.FormModal = exports.ModalHeader = exports.ModalBody = exports.Modal = exports.FormFieldContainer = exports.Tooltip = exports.spacing = exports.breakpoints = exports.Toggle = exports.ToastVariant = exports.ToastArea = exports.closeToast = exports.openToast = exports.useToast = exports.VisuallyHidden = exports.useId = exports.SelectSize = exports.RadioBoxSize = exports.Portal = exports.rgba = exports.palette = exports.LeafyGreenProvider = exports.Checkbox = exports.ButtonVariant = exports.ButtonSize = exports.BannerVariant = exports.BadgeVariant = exports.NoSavedItemsIcon = exports.FavoriteIcon = exports.DocumentIcon = exports.cache = exports.sheet = exports.css = exports.keyframes = exports.injectGlobal = exports.getRegisteredStyles = exports.merge = exports.cx = exports.hydrate = exports.flush = exports.emotion = void 0;
|
|
33
|
+
exports.KeylineCard = exports.DocumentList = exports.BSONValue = exports.fontFamilies = exports.useFormattedDate = exports.useSortedItems = exports.useSortControls = exports.useDefaultAction = exports.useFocusRing = exports.focusRing = exports.mergeProps = exports.VirtualGrid = exports.useDOMRect = exports.Placeholder = exports.ListEditor = exports.InteractivePopover = exports.InlineInfoLink = exports.WorkspaceContainer = exports.TabNavBar = exports.ErrorBoundary = exports.EmptyContent = exports.InlineDefinition = exports.FadeInPlaceholder = exports.ContentWithFallback = exports.ThemeProvider = exports.Theme = exports.useDarkMode = exports.useTheme = exports.withTheme = exports.FocusState = exports.useHoverState = exports.useFocusState = exports.createElectronFileInputBackend = exports.defaultSidebarWidth = exports.DropdownMenuButton = exports.ItemActionMenu = exports.ItemActionGroup = exports.ItemActionControls = exports.WorkspaceTabs = exports.WarningSummary = exports.ResizableSidebar = exports.ResizeDirection = exports.ResizeHandle = exports.SpinLoader = exports.RadioBoxGroup = void 0;
|
|
34
34
|
__exportStar(require("./components/leafygreen"), exports);
|
|
35
35
|
var emotion_1 = require("@leafygreen-ui/emotion");
|
|
36
36
|
Object.defineProperty(exports, "emotion", { enumerable: true, get: function () { return __importDefault(emotion_1).default; } });
|
|
@@ -46,16 +46,11 @@ Object.defineProperty(exports, "sheet", { enumerable: true, get: function () { r
|
|
|
46
46
|
Object.defineProperty(exports, "cache", { enumerable: true, get: function () { return emotion_1.cache; } });
|
|
47
47
|
const cancel_loader_1 = __importDefault(require("./components/cancel-loader"));
|
|
48
48
|
exports.CancelLoader = cancel_loader_1.default;
|
|
49
|
-
const confirmation_modal_1 = __importDefault(require("./components/confirmation-modal"));
|
|
49
|
+
const confirmation_modal_1 = __importDefault(require("./components/modals/confirmation-modal"));
|
|
50
50
|
exports.ConfirmationModal = confirmation_modal_1.default;
|
|
51
|
-
const file_input_1 =
|
|
51
|
+
const file_input_1 = __importStar(require("./components/file-input"));
|
|
52
52
|
exports.FileInput = file_input_1.default;
|
|
53
|
-
|
|
54
|
-
Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return modal_1.Modal; } });
|
|
55
|
-
const modal_title_1 = require("./components/modal-title");
|
|
56
|
-
Object.defineProperty(exports, "ModalTitle", { enumerable: true, get: function () { return modal_title_1.ModalTitle; } });
|
|
57
|
-
const toolbar_1 = require("./components/toolbar");
|
|
58
|
-
Object.defineProperty(exports, "Toolbar", { enumerable: true, get: function () { return toolbar_1.Toolbar; } });
|
|
53
|
+
Object.defineProperty(exports, "createElectronFileInputBackend", { enumerable: true, get: function () { return file_input_1.createElectronFileInputBackend; } });
|
|
59
54
|
const more_options_toggle_1 = require("./components/more-options-toggle");
|
|
60
55
|
Object.defineProperty(exports, "MoreOptionsToggle", { enumerable: true, get: function () { return more_options_toggle_1.MoreOptionsToggle; } });
|
|
61
56
|
const error_warning_summary_1 = require("./components/error-warning-summary");
|
|
@@ -81,13 +76,13 @@ const item_action_controls_1 = require("./components/item-action-controls");
|
|
|
81
76
|
Object.defineProperty(exports, "ItemActionControls", { enumerable: true, get: function () { return item_action_controls_1.ItemActionControls; } });
|
|
82
77
|
Object.defineProperty(exports, "ItemActionGroup", { enumerable: true, get: function () { return item_action_controls_1.ItemActionGroup; } });
|
|
83
78
|
Object.defineProperty(exports, "ItemActionMenu", { enumerable: true, get: function () { return item_action_controls_1.ItemActionMenu; } });
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
Object.defineProperty(exports, "
|
|
87
|
-
Object.defineProperty(exports, "EditorTextCompleter", { enumerable: true, get: function () { return editor_1.EditorTextCompleter; } });
|
|
88
|
-
Object.defineProperty(exports, "setEditorValue", { enumerable: true, get: function () { return editor_1.setEditorValue; } });
|
|
79
|
+
Object.defineProperty(exports, "DropdownMenuButton", { enumerable: true, get: function () { return item_action_controls_1.DropdownMenuButton; } });
|
|
80
|
+
var document_icon_1 = require("./components/icons/document-icon");
|
|
81
|
+
Object.defineProperty(exports, "DocumentIcon", { enumerable: true, get: function () { return document_icon_1.DocumentIcon; } });
|
|
89
82
|
var favorite_icon_1 = require("./components/icons/favorite-icon");
|
|
90
83
|
Object.defineProperty(exports, "FavoriteIcon", { enumerable: true, get: function () { return favorite_icon_1.FavoriteIcon; } });
|
|
84
|
+
var no_saved_items_icon_1 = require("./components/icons/no-saved-items-icon");
|
|
85
|
+
Object.defineProperty(exports, "NoSavedItemsIcon", { enumerable: true, get: function () { return no_saved_items_icon_1.NoSavedItemsIcon; } });
|
|
91
86
|
var badge_1 = require("@leafygreen-ui/badge");
|
|
92
87
|
Object.defineProperty(exports, "BadgeVariant", { enumerable: true, get: function () { return badge_1.Variant; } });
|
|
93
88
|
var banner_1 = require("@leafygreen-ui/banner");
|
|
@@ -100,9 +95,9 @@ Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function ()
|
|
|
100
95
|
var leafygreen_provider_1 = require("@leafygreen-ui/leafygreen-provider");
|
|
101
96
|
Object.defineProperty(exports, "LeafyGreenProvider", { enumerable: true, get: function () { return __importDefault(leafygreen_provider_1).default; } });
|
|
102
97
|
var palette_1 = require("@leafygreen-ui/palette");
|
|
103
|
-
Object.defineProperty(exports, "
|
|
104
|
-
|
|
105
|
-
exports
|
|
98
|
+
Object.defineProperty(exports, "palette", { enumerable: true, get: function () { return palette_1.palette; } });
|
|
99
|
+
var polished_1 = require("polished");
|
|
100
|
+
Object.defineProperty(exports, "rgba", { enumerable: true, get: function () { return polished_1.rgba; } });
|
|
106
101
|
var portal_1 = require("@leafygreen-ui/portal");
|
|
107
102
|
Object.defineProperty(exports, "Portal", { enumerable: true, get: function () { return __importDefault(portal_1).default; } });
|
|
108
103
|
var radio_box_group_2 = require("@leafygreen-ui/radio-box-group");
|
|
@@ -115,6 +110,8 @@ var visually_hidden_1 = require("@react-aria/visually-hidden");
|
|
|
115
110
|
Object.defineProperty(exports, "VisuallyHidden", { enumerable: true, get: function () { return visually_hidden_1.VisuallyHidden; } });
|
|
116
111
|
var use_toast_1 = require("./hooks/use-toast");
|
|
117
112
|
Object.defineProperty(exports, "useToast", { enumerable: true, get: function () { return use_toast_1.useToast; } });
|
|
113
|
+
Object.defineProperty(exports, "openToast", { enumerable: true, get: function () { return use_toast_1.openToast; } });
|
|
114
|
+
Object.defineProperty(exports, "closeToast", { enumerable: true, get: function () { return use_toast_1.closeToast; } });
|
|
118
115
|
Object.defineProperty(exports, "ToastArea", { enumerable: true, get: function () { return use_toast_1.ToastArea; } });
|
|
119
116
|
Object.defineProperty(exports, "ToastVariant", { enumerable: true, get: function () { return use_toast_1.ToastVariant; } });
|
|
120
117
|
var toggle_1 = require("./components/toggle");
|
|
@@ -126,6 +123,18 @@ var tooltip_1 = require("./components/tooltip");
|
|
|
126
123
|
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return tooltip_1.Tooltip; } });
|
|
127
124
|
const index_icon_1 = __importDefault(require("./components/index-icon"));
|
|
128
125
|
exports.IndexIcon = index_icon_1.default;
|
|
126
|
+
var form_field_container_1 = require("./components/form-field-container");
|
|
127
|
+
Object.defineProperty(exports, "FormFieldContainer", { enumerable: true, get: function () { return __importDefault(form_field_container_1).default; } });
|
|
128
|
+
var modal_1 = require("./components/modals/modal");
|
|
129
|
+
Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return modal_1.Modal; } });
|
|
130
|
+
var modal_body_1 = require("./components/modals/modal-body");
|
|
131
|
+
Object.defineProperty(exports, "ModalBody", { enumerable: true, get: function () { return modal_body_1.ModalBody; } });
|
|
132
|
+
var modal_header_1 = require("./components/modals/modal-header");
|
|
133
|
+
Object.defineProperty(exports, "ModalHeader", { enumerable: true, get: function () { return modal_header_1.ModalHeader; } });
|
|
134
|
+
var form_modal_1 = require("./components/modals/form-modal");
|
|
135
|
+
Object.defineProperty(exports, "FormModal", { enumerable: true, get: function () { return form_modal_1.FormModal; } });
|
|
136
|
+
var info_modal_1 = require("./components/modals/info-modal");
|
|
137
|
+
Object.defineProperty(exports, "InfoModal", { enumerable: true, get: function () { return info_modal_1.InfoModal; } });
|
|
129
138
|
var use_focus_hover_1 = require("./hooks/use-focus-hover");
|
|
130
139
|
Object.defineProperty(exports, "useFocusState", { enumerable: true, get: function () { return use_focus_hover_1.useFocusState; } });
|
|
131
140
|
Object.defineProperty(exports, "useHoverState", { enumerable: true, get: function () { return use_focus_hover_1.useHoverState; } });
|
|
@@ -133,6 +142,7 @@ Object.defineProperty(exports, "FocusState", { enumerable: true, get: function (
|
|
|
133
142
|
var use_theme_1 = require("./hooks/use-theme");
|
|
134
143
|
Object.defineProperty(exports, "withTheme", { enumerable: true, get: function () { return use_theme_1.withTheme; } });
|
|
135
144
|
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return use_theme_1.useTheme; } });
|
|
145
|
+
Object.defineProperty(exports, "useDarkMode", { enumerable: true, get: function () { return use_theme_1.useDarkMode; } });
|
|
136
146
|
Object.defineProperty(exports, "Theme", { enumerable: true, get: function () { return use_theme_1.Theme; } });
|
|
137
147
|
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return use_theme_1.ThemeProvider; } });
|
|
138
148
|
var content_with_fallback_1 = require("./components/content-with-fallback");
|
|
@@ -140,6 +150,8 @@ Object.defineProperty(exports, "ContentWithFallback", { enumerable: true, get: f
|
|
|
140
150
|
Object.defineProperty(exports, "FadeInPlaceholder", { enumerable: true, get: function () { return content_with_fallback_1.FadeInPlaceholder; } });
|
|
141
151
|
var inline_definition_1 = require("./components/inline-definition");
|
|
142
152
|
Object.defineProperty(exports, "InlineDefinition", { enumerable: true, get: function () { return inline_definition_1.InlineDefinition; } });
|
|
153
|
+
var empty_content_1 = require("./components/empty-content");
|
|
154
|
+
Object.defineProperty(exports, "EmptyContent", { enumerable: true, get: function () { return empty_content_1.EmptyContent; } });
|
|
143
155
|
var error_boundary_1 = require("./components/error-boundary");
|
|
144
156
|
Object.defineProperty(exports, "ErrorBoundary", { enumerable: true, get: function () { return error_boundary_1.ErrorBoundary; } });
|
|
145
157
|
var tab_nav_bar_1 = require("./components/tab-nav-bar");
|
|
@@ -150,6 +162,8 @@ var inline_info_link_1 = require("./components/inline-info-link");
|
|
|
150
162
|
Object.defineProperty(exports, "InlineInfoLink", { enumerable: true, get: function () { return inline_info_link_1.InlineInfoLink; } });
|
|
151
163
|
var interactive_popover_1 = require("./components/interactive-popover");
|
|
152
164
|
Object.defineProperty(exports, "InteractivePopover", { enumerable: true, get: function () { return interactive_popover_1.InteractivePopover; } });
|
|
165
|
+
var list_editor_1 = require("./components/list-editor");
|
|
166
|
+
Object.defineProperty(exports, "ListEditor", { enumerable: true, get: function () { return list_editor_1.ListEditor; } });
|
|
153
167
|
var placeholder_1 = require("./components/placeholder");
|
|
154
168
|
Object.defineProperty(exports, "Placeholder", { enumerable: true, get: function () { return placeholder_1.Placeholder; } });
|
|
155
169
|
var use_dom_rect_1 = require("./hooks/use-dom-rect");
|
|
@@ -166,10 +180,13 @@ Object.defineProperty(exports, "useDefaultAction", { enumerable: true, get: func
|
|
|
166
180
|
var use_sort_1 = require("./hooks/use-sort");
|
|
167
181
|
Object.defineProperty(exports, "useSortControls", { enumerable: true, get: function () { return use_sort_1.useSortControls; } });
|
|
168
182
|
Object.defineProperty(exports, "useSortedItems", { enumerable: true, get: function () { return use_sort_1.useSortedItems; } });
|
|
169
|
-
var
|
|
170
|
-
Object.defineProperty(exports, "
|
|
171
|
-
|
|
183
|
+
var use_formatted_date_1 = require("./hooks/use-formatted-date");
|
|
184
|
+
Object.defineProperty(exports, "useFormattedDate", { enumerable: true, get: function () { return use_formatted_date_1.useFormattedDate; } });
|
|
185
|
+
var tokens_2 = require("@leafygreen-ui/tokens");
|
|
186
|
+
Object.defineProperty(exports, "fontFamilies", { enumerable: true, get: function () { return tokens_2.fontFamilies; } });
|
|
172
187
|
var bson_value_1 = require("./components/bson-value");
|
|
173
188
|
Object.defineProperty(exports, "BSONValue", { enumerable: true, get: function () { return __importDefault(bson_value_1).default; } });
|
|
174
189
|
exports.DocumentList = __importStar(require("./components/document-list"));
|
|
190
|
+
var keyline_card_1 = require("./components/keyline-card");
|
|
191
|
+
Object.defineProperty(exports, "KeylineCard", { enumerable: true, get: function () { return keyline_card_1.KeylineCard; } });
|
|
175
192
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAAwC;AAExC,kDAYgC;AAX9B,mHAAA,OAAO,OAAW;AAClB,gGAAA,KAAK,OAAA;AACL,kGAAA,OAAO,OAAA;AACP,6FAAA,EAAE,OAAA;AACF,gGAAA,KAAK,OAAA;AACL,8GAAA,mBAAmB,OAAA;AACnB,uGAAA,YAAY,OAAA;AACZ,oGAAA,SAAS,OAAA;AACT,8FAAA,GAAG,OAAA;AACH,gGAAA,KAAK,OAAA;AACL,gGAAA,KAAK,OAAA;AAEP,+EAAsD;
|
|
1
|
+
{"version":3,"file":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"names":[],"mappings":"AAyBA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAsB/C"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatDate = void 0;
|
|
4
|
+
const SECOND = 1000;
|
|
5
|
+
const MINUTE = SECOND * 60;
|
|
6
|
+
const HOUR = MINUTE * 60;
|
|
7
|
+
const DAY = HOUR * 24;
|
|
8
|
+
const WEEK = DAY * 7;
|
|
9
|
+
const MONTH = WEEK * 4;
|
|
10
|
+
const relativeDateFormatter = new Intl.RelativeTimeFormat('en', {
|
|
11
|
+
numeric: 'auto',
|
|
12
|
+
});
|
|
13
|
+
const absoluteDateFormatter = new Intl.DateTimeFormat('en', {
|
|
14
|
+
dateStyle: 'long',
|
|
15
|
+
});
|
|
16
|
+
const formatScale = {
|
|
17
|
+
second: SECOND,
|
|
18
|
+
minute: MINUTE,
|
|
19
|
+
hour: HOUR,
|
|
20
|
+
day: DAY,
|
|
21
|
+
week: WEEK,
|
|
22
|
+
};
|
|
23
|
+
function formatDate(date) {
|
|
24
|
+
const timeDiff = Date.now() - date;
|
|
25
|
+
let formatType = null;
|
|
26
|
+
if (timeDiff < MINUTE) {
|
|
27
|
+
formatType = 'second';
|
|
28
|
+
}
|
|
29
|
+
else if (timeDiff < HOUR) {
|
|
30
|
+
formatType = 'minute';
|
|
31
|
+
}
|
|
32
|
+
else if (timeDiff < DAY) {
|
|
33
|
+
formatType = 'hour';
|
|
34
|
+
}
|
|
35
|
+
else if (timeDiff < WEEK) {
|
|
36
|
+
formatType = 'day';
|
|
37
|
+
}
|
|
38
|
+
else if (timeDiff < MONTH) {
|
|
39
|
+
formatType = 'week';
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return absoluteDateFormatter.format(date);
|
|
43
|
+
}
|
|
44
|
+
return relativeDateFormatter.format(-Math.round(timeDiff / formatScale[formatType]), formatType);
|
|
45
|
+
}
|
|
46
|
+
exports.formatDate = formatDate;
|
|
47
|
+
//# sourceMappingURL=format-date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-date.js","sourceRoot":"","sources":["../../src/utils/format-date.ts"],"names":[],"mappings":";;;AAAA,MAAM,MAAM,GAAG,IAAI,CAAC;AACpB,MAAM,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC;AAC3B,MAAM,IAAI,GAAG,MAAM,GAAG,EAAE,CAAC;AACzB,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;AACtB,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;AACrB,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC;AAGvB,MAAM,qBAAqB,GAAG,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE;IAC9D,OAAO,EAAE,MAAM;CAChB,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE;IAE1D,SAAS,EAAE,MAAM;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,SAAgB,UAAU,CAAC,IAAY;IACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;IACnC,IAAI,UAAU,GAAoC,IAAI,CAAC;IAEvD,IAAI,QAAQ,GAAG,MAAM,EAAE;QACrB,UAAU,GAAG,QAAQ,CAAC;KACvB;SAAM,IAAI,QAAQ,GAAG,IAAI,EAAE;QAC1B,UAAU,GAAG,QAAQ,CAAC;KACvB;SAAM,IAAI,QAAQ,GAAG,GAAG,EAAE;QACzB,UAAU,GAAG,MAAM,CAAC;KACrB;SAAM,IAAI,QAAQ,GAAG,IAAI,EAAE;QAC1B,UAAU,GAAG,KAAK,CAAC;KACpB;SAAM,IAAI,QAAQ,GAAG,KAAK,EAAE;QAC3B,UAAU,GAAG,MAAM,CAAC;KACrB;SAAM;QACL,OAAO,qBAAqB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC3C;IAED,OAAO,qBAAqB,CAAC,MAAM,CACjC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,EAC/C,UAAU,CACX,CAAC;AACJ,CAAC;AAtBD,gCAsBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongodb-js/compass-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "React Components used in Compass",
|
|
5
5
|
"license": "SSPL",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,39 +31,40 @@
|
|
|
31
31
|
"reformat": "npm run prettier -- --write ."
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@leafygreen-ui/badge": "^
|
|
35
|
-
"@leafygreen-ui/banner": "^
|
|
36
|
-
"@leafygreen-ui/button": "^16.
|
|
37
|
-
"@leafygreen-ui/card": "^7.
|
|
38
|
-
"@leafygreen-ui/checkbox": "^10.
|
|
39
|
-
"@leafygreen-ui/code": "^12.
|
|
40
|
-
"@leafygreen-ui/combobox": "^3.
|
|
41
|
-
"@leafygreen-ui/confirmation-modal": "^3.
|
|
42
|
-
"@leafygreen-ui/emotion": "^4.0.
|
|
43
|
-
"@leafygreen-ui/icon": "^11.
|
|
44
|
-
"@leafygreen-ui/icon-button": "^13.1
|
|
45
|
-
"@leafygreen-ui/leafygreen-provider": "^2.3.
|
|
46
|
-
"@leafygreen-ui/logo": "^6.
|
|
47
|
-
"@leafygreen-ui/
|
|
48
|
-
"@leafygreen-ui/
|
|
49
|
-
"@leafygreen-ui/
|
|
50
|
-
"@leafygreen-ui/
|
|
51
|
-
"@leafygreen-ui/
|
|
52
|
-
"@leafygreen-ui/
|
|
53
|
-
"@leafygreen-ui/
|
|
54
|
-
"@leafygreen-ui/radio-group": "^
|
|
55
|
-
"@leafygreen-ui/
|
|
56
|
-
"@leafygreen-ui/
|
|
57
|
-
"@leafygreen-ui/
|
|
58
|
-
"@leafygreen-ui/
|
|
59
|
-
"@leafygreen-ui/
|
|
60
|
-
"@leafygreen-ui/text-
|
|
61
|
-
"@leafygreen-ui/
|
|
62
|
-
"@leafygreen-ui/
|
|
63
|
-
"@leafygreen-ui/
|
|
64
|
-
"@leafygreen-ui/
|
|
65
|
-
"@leafygreen-ui/
|
|
66
|
-
"@
|
|
34
|
+
"@leafygreen-ui/badge": "^6.1.2",
|
|
35
|
+
"@leafygreen-ui/banner": "^5.0.3",
|
|
36
|
+
"@leafygreen-ui/button": "^16.1.1",
|
|
37
|
+
"@leafygreen-ui/card": "^7.1.1",
|
|
38
|
+
"@leafygreen-ui/checkbox": "^10.1.1",
|
|
39
|
+
"@leafygreen-ui/code": "^12.1.1",
|
|
40
|
+
"@leafygreen-ui/combobox": "^3.1.1",
|
|
41
|
+
"@leafygreen-ui/confirmation-modal": "^3.1.1",
|
|
42
|
+
"@leafygreen-ui/emotion": "^4.0.3",
|
|
43
|
+
"@leafygreen-ui/icon": "^11.11.1",
|
|
44
|
+
"@leafygreen-ui/icon-button": "^13.2.1",
|
|
45
|
+
"@leafygreen-ui/leafygreen-provider": "^2.3.5",
|
|
46
|
+
"@leafygreen-ui/logo": "^6.3.0",
|
|
47
|
+
"@leafygreen-ui/marketing-modal": "^3.0.7",
|
|
48
|
+
"@leafygreen-ui/menu": "^16.0.0",
|
|
49
|
+
"@leafygreen-ui/modal": "^10.1.2",
|
|
50
|
+
"@leafygreen-ui/palette": "^3.4.4",
|
|
51
|
+
"@leafygreen-ui/pipeline": "^3.0.0",
|
|
52
|
+
"@leafygreen-ui/popover": "^9.1.1",
|
|
53
|
+
"@leafygreen-ui/portal": "^4.0.6",
|
|
54
|
+
"@leafygreen-ui/radio-box-group": "^9.1.1",
|
|
55
|
+
"@leafygreen-ui/radio-group": "^8.1.1",
|
|
56
|
+
"@leafygreen-ui/segmented-control": "^3.1.1",
|
|
57
|
+
"@leafygreen-ui/select": "^7.1.2",
|
|
58
|
+
"@leafygreen-ui/table": "^6.1.1",
|
|
59
|
+
"@leafygreen-ui/tabs": "^9.2.1",
|
|
60
|
+
"@leafygreen-ui/text-area": "^6.2.1",
|
|
61
|
+
"@leafygreen-ui/text-input": "^10.2.1",
|
|
62
|
+
"@leafygreen-ui/toast": "^2.0.3",
|
|
63
|
+
"@leafygreen-ui/toggle": "^8.0.5",
|
|
64
|
+
"@leafygreen-ui/tokens": "^1.3.4",
|
|
65
|
+
"@leafygreen-ui/tooltip": "^7.1.3",
|
|
66
|
+
"@leafygreen-ui/typography": "^13.2.1",
|
|
67
|
+
"@mongodb-js/compass-logging": "^1.1.1",
|
|
67
68
|
"@react-aria/interactions": "^3.9.1",
|
|
68
69
|
"@react-aria/tooltip": "^3.2.1",
|
|
69
70
|
"@react-aria/utils": "^3.13.1",
|
|
@@ -71,16 +72,14 @@
|
|
|
71
72
|
"@react-stately/tooltip": "^3.0.5",
|
|
72
73
|
"bson": "^4.6.1",
|
|
73
74
|
"focus-trap-react": "^8.4.2",
|
|
74
|
-
"hadron-document": "^8.0.
|
|
75
|
+
"hadron-document": "^8.0.2",
|
|
75
76
|
"hadron-type-checker": "^7.0.0",
|
|
76
77
|
"polished": "^4.2.2",
|
|
78
|
+
"react-intersection-observer": "^8.34.0",
|
|
77
79
|
"react-sortable-hoc": "^2.0.0",
|
|
78
80
|
"react-window": "^1.8.6"
|
|
79
81
|
},
|
|
80
82
|
"peerDependencies": {
|
|
81
|
-
"ace-builds": "^1.4.3",
|
|
82
|
-
"mongodb-ace-autocompleter": "^1.1.1",
|
|
83
|
-
"mongodb-ace-mode": "^2.0.1",
|
|
84
83
|
"react": "^16.14.0",
|
|
85
84
|
"react-ace": "^9.5.0"
|
|
86
85
|
},
|
|
@@ -97,12 +96,9 @@
|
|
|
97
96
|
"@types/chai-dom": "^0.0.10",
|
|
98
97
|
"@types/mocha": "^9.0.0",
|
|
99
98
|
"@types/react": "^17.0.5",
|
|
100
|
-
"ace-builds": "^1.4.3",
|
|
101
99
|
"chai": "^4.3.4",
|
|
102
100
|
"eslint": "^7.25.0",
|
|
103
101
|
"mocha": "^8.4.0",
|
|
104
|
-
"mongodb-ace-autocompleter": "^1.1.1",
|
|
105
|
-
"mongodb-ace-mode": "^2.0.1",
|
|
106
102
|
"nyc": "^15.0.0",
|
|
107
103
|
"prettier": "^2.7.1",
|
|
108
104
|
"react": "^16.14.0",
|
|
@@ -120,5 +116,5 @@
|
|
|
120
116
|
"publishConfig": {
|
|
121
117
|
"access": "public"
|
|
122
118
|
},
|
|
123
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "7f786ed13b999a5c0831af6fde545154890df956"
|
|
124
120
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compass-font-sizes.d.ts","sourceRoot":"","sources":["../src/compass-font-sizes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,SAAS,CAAC;AACpC,eAAO,MAAM,eAAe,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compass-font-sizes.js","sourceRoot":"","sources":["../src/compass-font-sizes.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG,MAAM,CAAC;AACvB,QAAA,eAAe,GAAG,MAAM,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const gray8 = "#f5f6f7";
|
|
2
|
-
export declare const transparentGray = "rgba(180, 180, 180, 0.5)";
|
|
3
|
-
export declare const transparentWhite = "rgba(255, 255, 255, 0.5)";
|
|
4
|
-
export declare const gold = "#FFC010";
|
|
5
|
-
export declare const scrollbarThumbLightTheme = "rgba(137, 151, 155, 0.65)";
|
|
6
|
-
export declare const scrollbarThumbDarkTheme = "rgba(137, 151, 155, 0.65)";
|
|
7
|
-
//# sourceMappingURL=compass-ui-colors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compass-ui-colors.d.ts","sourceRoot":"","sources":["../src/compass-ui-colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAAY,CAAC;AAC/B,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAC3D,eAAO,MAAM,IAAI,YAAY,CAAC;AAG9B,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AACpE,eAAO,MAAM,uBAAuB,8BAA8B,CAAC"}
|
package/lib/compass-ui-colors.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scrollbarThumbDarkTheme = exports.scrollbarThumbLightTheme = exports.gold = exports.transparentWhite = exports.transparentGray = exports.gray8 = void 0;
|
|
4
|
-
exports.gray8 = '#f5f6f7';
|
|
5
|
-
exports.transparentGray = 'rgba(180, 180, 180, 0.5)';
|
|
6
|
-
exports.transparentWhite = 'rgba(255, 255, 255, 0.5)';
|
|
7
|
-
exports.gold = '#FFC010';
|
|
8
|
-
exports.scrollbarThumbLightTheme = 'rgba(137, 151, 155, 0.65)';
|
|
9
|
-
exports.scrollbarThumbDarkTheme = 'rgba(137, 151, 155, 0.65)';
|
|
10
|
-
//# sourceMappingURL=compass-ui-colors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compass-ui-colors.js","sourceRoot":"","sources":["../src/compass-ui-colors.ts"],"names":[],"mappings":";;;AAAa,QAAA,KAAK,GAAG,SAAS,CAAC;AAClB,QAAA,eAAe,GAAG,0BAA0B,CAAC;AAC7C,QAAA,gBAAgB,GAAG,0BAA0B,CAAC;AAC9C,QAAA,IAAI,GAAG,SAAS,CAAC;AAGjB,QAAA,wBAAwB,GAAG,2BAA2B,CAAC;AACvD,QAAA,uBAAuB,GAAG,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confirmation-modal.d.ts","sourceRoot":"","sources":["../../src/components/confirmation-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAE,iBAAiB,IAAI,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAEhF,iBAAS,iBAAiB,CAAC,EACzB,UAAU,EACV,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,2BAA2B,CAAC,GAAG;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,KAAK,CAAC,YAAY,CAOrB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confirmation-modal.js","sourceRoot":"","sources":["../../src/components/confirmation-modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,iEAAuE;AACvE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,0CAAwB,EAAC,YAAY,CAAC,CAAC;AAEzD,6CAAgF;AAEhF,SAAS,iBAAiB,CAAC,EACzB,UAAU,EACV,GAAG,KAAK,EAGT;IACC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,IAAI,IAAI,UAAU,EAAE;YAC5B,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;SACvC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;IAC7B,OAAO,8BAAC,8BAA2B,mBAAc,UAAU,KAAM,KAAK,GAAI,CAAC;AAC7E,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const FA_ICONS: {
|
|
3
|
-
remove: string;
|
|
4
|
-
revert: string;
|
|
5
|
-
collapsed: string;
|
|
6
|
-
expanded: string;
|
|
7
|
-
addChild: string;
|
|
8
|
-
addSibling: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const FontAwesomeIcon: React.FunctionComponent<{
|
|
11
|
-
icon: keyof typeof FA_ICONS;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=font-awesome-icon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"font-awesome-icon.d.ts","sourceRoot":"","sources":["../../../src/components/document-list/font-awesome-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,QAAA,MAAM,QAAQ;;;;;;;CAOb,CAAC;AASF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACpD,IAAI,EAAE,MAAM,OAAO,QAAQ,CAAC;CAC7B,CAQA,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FontAwesomeIcon = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
9
|
-
const tokens_1 = require("@leafygreen-ui/tokens");
|
|
10
|
-
const FA_ICONS = {
|
|
11
|
-
remove: 'times-circle',
|
|
12
|
-
revert: 'rotate-left',
|
|
13
|
-
collapsed: 'angle-right',
|
|
14
|
-
expanded: 'angle-right fa-rotate-90',
|
|
15
|
-
addChild: 'level-down fa-rotate-90',
|
|
16
|
-
addSibling: 'plus-square-o',
|
|
17
|
-
};
|
|
18
|
-
const faIcon = (0, emotion_1.css)({
|
|
19
|
-
width: tokens_1.spacing[3],
|
|
20
|
-
height: tokens_1.spacing[3],
|
|
21
|
-
padding: '2px',
|
|
22
|
-
textAlign: 'center',
|
|
23
|
-
});
|
|
24
|
-
const FontAwesomeIcon = ({ icon }) => {
|
|
25
|
-
const faClassName = FA_ICONS[icon];
|
|
26
|
-
return (react_1.default.createElement("span", { role: "presentation", className: (0, emotion_1.cx)(faIcon, `fa fa-${faClassName}`) }));
|
|
27
|
-
};
|
|
28
|
-
exports.FontAwesomeIcon = FontAwesomeIcon;
|
|
29
|
-
//# sourceMappingURL=font-awesome-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"font-awesome-icon.js","sourceRoot":"","sources":["../../../src/components/document-list/font-awesome-icon.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAAiD;AACjD,kDAAgD;AAEhD,MAAM,QAAQ,GAAG;IACf,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,aAAa;IACrB,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,2BAA2B;IACrC,QAAQ,EAAE,yBAAyB;IACnC,UAAU,EAAE,eAAe;CAC5B,CAAC;AAEF,MAAM,MAAM,GAAG,IAAA,aAAG,EAAC;IACjB,KAAK,EAAE,gBAAO,CAAC,CAAC,CAAC;IACjB,MAAM,EAAE,gBAAO,CAAC,CAAC,CAAC;IAClB,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,QAAQ;CACpB,CAAC,CAAC;AAEI,MAAM,eAAe,GAEvB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAChB,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,CACL,wCACE,IAAI,EAAC,cAAc,EACnB,SAAS,EAAE,IAAA,YAAE,EAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC,GACvC,CACT,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,eAAe,mBAU1B"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import 'ace-builds';
|
|
3
|
-
import type { IAceEditorProps, IAceOptions } from 'react-ace';
|
|
4
|
-
import 'ace-builds/src-noconflict/ext-language_tools';
|
|
5
|
-
import 'ace-builds/src-noconflict/mode-javascript';
|
|
6
|
-
import 'ace-builds/src-noconflict/mode-json';
|
|
7
|
-
import 'ace-builds/src-noconflict/mode-csharp';
|
|
8
|
-
import 'ace-builds/src-noconflict/mode-python';
|
|
9
|
-
import 'ace-builds/src-noconflict/mode-java';
|
|
10
|
-
import 'ace-builds/src-noconflict/mode-ruby';
|
|
11
|
-
import 'ace-builds/src-noconflict/mode-rust';
|
|
12
|
-
import 'ace-builds/src-noconflict/mode-golang';
|
|
13
|
-
import 'ace-builds/src-noconflict/mode-php';
|
|
14
|
-
import 'mongodb-ace-mode';
|
|
15
|
-
import '../constants/mongodb-ace-theme';
|
|
16
|
-
import '../constants/mongodb-ace-theme-query';
|
|
17
|
-
declare const EditorVariant: {
|
|
18
|
-
readonly Shell: "Shell";
|
|
19
|
-
readonly EJSON: "EJSON";
|
|
20
|
-
readonly Generic: "Generic";
|
|
21
|
-
};
|
|
22
|
-
declare type EditorProps = {
|
|
23
|
-
variant: keyof typeof EditorVariant;
|
|
24
|
-
text?: string;
|
|
25
|
-
id?: string;
|
|
26
|
-
options?: Omit<IAceOptions, 'readOnly'>;
|
|
27
|
-
readOnly?: boolean;
|
|
28
|
-
completer?: unknown;
|
|
29
|
-
'data-testid'?: string;
|
|
30
|
-
onChangeText?: (text: string, event?: any) => void;
|
|
31
|
-
} & Omit<IAceEditorProps, 'onChange' | 'value'>;
|
|
32
|
-
declare function Editor({ text, variant, options, readOnly, id, onChangeText, completer, onFocus, 'data-testid': dataTestId, ...aceProps }: EditorProps): React.ReactElement;
|
|
33
|
-
declare function setEditorValue(element: HTMLElement, value: string): void;
|
|
34
|
-
declare const EditorTextCompleter: any;
|
|
35
|
-
export { Editor, EditorVariant, EditorTextCompleter, setEditorValue };
|
|
36
|
-
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/components/editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAYvD,OAAO,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAI9D,OAAO,8CAA8C,CAAC;AACtD,OAAO,2CAA2C,CAAC;AACnD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,oCAAoC,CAAC;AAE5C,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAiB9C,QAAA,MAAM,aAAa;;;;CAIT,CAAC;AAEX,aAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,OAAO,aAAa,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACpD,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;AAEhD,iBAAS,MAAM,CAAC,EACd,IAAI,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,EAAE,EACF,YAAY,EACZ,SAAS,EACT,OAAO,EACP,aAAa,EAAE,UAAU,EACzB,GAAG,QAAQ,EACZ,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAuDlC;AAUD,iBAAS,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAMjE;AAED,QAAA,MAAM,mBAAmB,KAAsB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,CAAC"}
|
package/lib/components/editor.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.setEditorValue = exports.EditorTextCompleter = exports.EditorVariant = exports.Editor = void 0;
|
|
30
|
-
const react_1 = __importStar(require("react"));
|
|
31
|
-
const utils_1 = require("@react-aria/utils");
|
|
32
|
-
if (typeof window === 'undefined' && typeof globalThis !== 'undefined') {
|
|
33
|
-
globalThis.window = {};
|
|
34
|
-
}
|
|
35
|
-
require("ace-builds");
|
|
36
|
-
const react_ace_1 = __importDefault(require("react-ace"));
|
|
37
|
-
require("ace-builds/src-noconflict/ext-language_tools");
|
|
38
|
-
require("ace-builds/src-noconflict/mode-javascript");
|
|
39
|
-
require("ace-builds/src-noconflict/mode-json");
|
|
40
|
-
require("ace-builds/src-noconflict/mode-csharp");
|
|
41
|
-
require("ace-builds/src-noconflict/mode-python");
|
|
42
|
-
require("ace-builds/src-noconflict/mode-java");
|
|
43
|
-
require("ace-builds/src-noconflict/mode-ruby");
|
|
44
|
-
require("ace-builds/src-noconflict/mode-rust");
|
|
45
|
-
require("ace-builds/src-noconflict/mode-golang");
|
|
46
|
-
require("ace-builds/src-noconflict/mode-php");
|
|
47
|
-
const ext_beautify_1 = __importDefault(require("ace-builds/src-noconflict/ext-beautify"));
|
|
48
|
-
require("mongodb-ace-mode");
|
|
49
|
-
require("../constants/mongodb-ace-theme");
|
|
50
|
-
require("../constants/mongodb-ace-theme-query");
|
|
51
|
-
const ext_language_tools_1 = __importDefault(require("ace-builds/src-noconflict/ext-language_tools"));
|
|
52
|
-
const DEFAULT_OPTIONS = {
|
|
53
|
-
enableLiveAutocompletion: false,
|
|
54
|
-
tabSize: 2,
|
|
55
|
-
fontSize: 11,
|
|
56
|
-
minLines: 10,
|
|
57
|
-
maxLines: Infinity,
|
|
58
|
-
showGutter: true,
|
|
59
|
-
showPrintMargin: false,
|
|
60
|
-
useWorker: false,
|
|
61
|
-
};
|
|
62
|
-
const EditorVariant = {
|
|
63
|
-
Shell: 'Shell',
|
|
64
|
-
EJSON: 'EJSON',
|
|
65
|
-
Generic: 'Generic',
|
|
66
|
-
};
|
|
67
|
-
exports.EditorVariant = EditorVariant;
|
|
68
|
-
function Editor({ text, variant, options, readOnly, id, onChangeText, completer, onFocus, 'data-testid': dataTestId, ...aceProps }) {
|
|
69
|
-
var _a;
|
|
70
|
-
const setOptions = {
|
|
71
|
-
...DEFAULT_OPTIONS,
|
|
72
|
-
...options,
|
|
73
|
-
...(typeof readOnly === 'boolean' && { readOnly }),
|
|
74
|
-
...(variant === 'Shell' && { mode: 'ace/mode/mongodb' }),
|
|
75
|
-
...(!!completer && { enableLiveAutocompletion: true }),
|
|
76
|
-
};
|
|
77
|
-
const editorRef = (0, react_1.useRef)(null);
|
|
78
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
79
|
-
if (id && editorRef.current) {
|
|
80
|
-
editorRef.current.editor.textInput.getElement().id = id;
|
|
81
|
-
}
|
|
82
|
-
}, [id]);
|
|
83
|
-
const editorName = (0, utils_1.useId)();
|
|
84
|
-
const editor = (react_1.default.createElement(react_ace_1.default, { ref: (ref) => (editorRef.current = ref), mode: variant === 'Generic'
|
|
85
|
-
? undefined
|
|
86
|
-
: variant === 'EJSON'
|
|
87
|
-
? 'json'
|
|
88
|
-
: 'javascript', theme: "mongodb", width: "100%", value: text, onChange: onChangeText, editorProps: { $blockScrolling: Infinity }, setOptions: setOptions, readOnly: readOnly, commands: ext_beautify_1.default.commands, name: (_a = aceProps.name) !== null && _a !== void 0 ? _a : editorName, ...aceProps, onFocus: (ev) => {
|
|
89
|
-
if (completer) {
|
|
90
|
-
ext_language_tools_1.default.setCompleters([completer]);
|
|
91
|
-
}
|
|
92
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus(ev);
|
|
93
|
-
} }));
|
|
94
|
-
return dataTestId ? react_1.default.createElement("div", { "data-testid": dataTestId }, editor) : editor;
|
|
95
|
-
}
|
|
96
|
-
exports.Editor = Editor;
|
|
97
|
-
function setEditorValue(element, value) {
|
|
98
|
-
const container = element.querySelector('.ace_editor');
|
|
99
|
-
if (!container) {
|
|
100
|
-
throw new Error('Cannot find editor container');
|
|
101
|
-
}
|
|
102
|
-
window.ace.edit(container.id).setValue(value);
|
|
103
|
-
}
|
|
104
|
-
exports.setEditorValue = setEditorValue;
|
|
105
|
-
const EditorTextCompleter = ext_language_tools_1.default.textCompleter;
|
|
106
|
-
exports.EditorTextCompleter = EditorTextCompleter;
|
|
107
|
-
//# sourceMappingURL=editor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../src/components/editor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuD;AACvD,6CAA0C;AAE1C,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,UAAU,KAAK,WAAW,EAAE;IAMrE,UAAkB,CAAC,MAAM,GAAG,EAAE,CAAC;CACjC;AAED,sBAAoB;AAEpB,0DAAkC;AAGlC,wDAAsD;AACtD,qDAAmD;AACnD,+CAA6C;AAC7C,iDAA+C;AAC/C,iDAA+C;AAC/C,+CAA6C;AAC7C,+CAA6C;AAC7C,+CAA6C;AAC7C,iDAA+C;AAC/C,8CAA4C;AAC5C,0FAA8D;AAC9D,4BAA0B;AAC1B,0CAAwC;AACxC,gDAA8C;AAC9C,sGAAiE;AAKjE,MAAM,eAAe,GAAgB;IACnC,wBAAwB,EAAE,KAAK;IAC/B,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,IAAI;IAChB,eAAe,EAAE,KAAK;IACtB,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,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