@vertesia/ui 0.55.0 → 0.57.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/esm/code/index.js +3 -0
- package/lib/esm/code/index.js.map +1 -0
- package/lib/esm/core/components/Avatar.js +31 -0
- package/lib/esm/core/components/Avatar.js.map +1 -0
- package/lib/esm/core/components/Badge.js +62 -0
- package/lib/esm/core/components/Badge.js.map +1 -0
- package/lib/esm/core/components/Button.js +32 -0
- package/lib/esm/core/components/Button.js.map +1 -0
- package/lib/esm/core/components/Center.js +6 -0
- package/lib/esm/core/components/Center.js.map +1 -0
- package/lib/esm/core/components/ComboBox.js +356 -0
- package/lib/esm/core/components/ComboBox.js.map +1 -0
- package/lib/esm/core/components/ConfirmModal.js +10 -0
- package/lib/esm/core/components/ConfirmModal.js.map +1 -0
- package/lib/esm/core/components/DeleteModal.js +28 -0
- package/lib/esm/core/components/DeleteModal.js.map +1 -0
- package/lib/esm/core/components/Divider.js +6 -0
- package/lib/esm/core/components/Divider.js.map +1 -0
- package/lib/esm/core/components/Dropdown.js +16 -0
- package/lib/esm/core/components/Dropdown.js.map +1 -0
- package/lib/esm/core/components/DropdownList.js +9 -0
- package/lib/esm/core/components/DropdownList.js.map +1 -0
- package/lib/esm/core/components/EmptyCollection.js +7 -0
- package/lib/esm/core/components/EmptyCollection.js.map +1 -0
- package/lib/esm/core/components/FileUpload.js +119 -0
- package/lib/esm/core/components/FileUpload.js.map +1 -0
- package/lib/esm/core/components/Input.js +16 -0
- package/lib/esm/core/components/Input.js.map +1 -0
- package/lib/esm/core/components/InputList.js +42 -0
- package/lib/esm/core/components/InputList.js.map +1 -0
- package/lib/esm/core/components/Link.js +13 -0
- package/lib/esm/core/components/Link.js.map +1 -0
- package/lib/esm/core/components/MenuList.js +23 -0
- package/lib/esm/core/components/MenuList.js.map +1 -0
- package/lib/esm/core/components/MessageBox.js +66 -0
- package/lib/esm/core/components/MessageBox.js.map +1 -0
- package/lib/esm/core/components/Modal.js +26 -0
- package/lib/esm/core/components/Modal.js.map +1 -0
- package/lib/esm/core/components/NumberInput.js +43 -0
- package/lib/esm/core/components/NumberInput.js.map +1 -0
- package/lib/esm/core/components/Portal.js +28 -0
- package/lib/esm/core/components/Portal.js.map +1 -0
- package/lib/esm/core/components/RadioGroup.js +34 -0
- package/lib/esm/core/components/RadioGroup.js.map +1 -0
- package/lib/esm/core/components/SelectBox.js +68 -0
- package/lib/esm/core/components/SelectBox.js.map +1 -0
- package/lib/esm/core/components/SelectList.js +47 -0
- package/lib/esm/core/components/SelectList.js.map +1 -0
- package/lib/esm/core/components/SelectStack.js +8 -0
- package/lib/esm/core/components/SelectStack.js.map +1 -0
- package/lib/esm/core/components/SidePanel.js +33 -0
- package/lib/esm/core/components/SidePanel.js.map +1 -0
- package/lib/esm/core/components/Spinner.js +18 -0
- package/lib/esm/core/components/Spinner.js.map +1 -0
- package/lib/esm/core/components/Switch.js +12 -0
- package/lib/esm/core/components/Switch.js.map +1 -0
- package/lib/esm/core/components/Textarea.js +15 -0
- package/lib/esm/core/components/Textarea.js.map +1 -0
- package/lib/esm/core/components/index.js +34 -0
- package/lib/esm/core/components/index.js.map +1 -0
- package/lib/esm/core/components/libs/utils.js +6 -0
- package/lib/esm/core/components/libs/utils.js.map +1 -0
- package/lib/esm/core/components/libs/visuallyHidden.js +16 -0
- package/lib/esm/core/components/libs/visuallyHidden.js.map +1 -0
- package/lib/esm/core/components/popup/Popup.js +60 -0
- package/lib/esm/core/components/popup/Popup.js.map +1 -0
- package/lib/esm/core/components/popup/PopupController.js +149 -0
- package/lib/esm/core/components/popup/PopupController.js.map +1 -0
- package/lib/esm/core/components/popup/index.js +4 -0
- package/lib/esm/core/components/popup/index.js.map +1 -0
- package/lib/esm/core/components/popup/position.js +221 -0
- package/lib/esm/core/components/popup/position.js.map +1 -0
- package/lib/esm/core/components/popup/utils.js +74 -0
- package/lib/esm/core/components/popup/utils.js.map +1 -0
- package/lib/esm/core/components/shadcn/breadcrumb.js +30 -0
- package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -0
- package/lib/esm/core/components/shadcn/button.js +45 -0
- package/lib/esm/core/components/shadcn/button.js.map +1 -0
- package/lib/esm/core/components/shadcn/calendar.js +46 -0
- package/lib/esm/core/components/shadcn/calendar.js.map +1 -0
- package/lib/esm/core/components/shadcn/card.js +17 -0
- package/lib/esm/core/components/shadcn/card.js.map +1 -0
- package/lib/esm/core/components/shadcn/checkbox.js +10 -0
- package/lib/esm/core/components/shadcn/checkbox.js.map +1 -0
- package/lib/esm/core/components/shadcn/command.js +30 -0
- package/lib/esm/core/components/shadcn/command.js.map +1 -0
- package/lib/esm/core/components/shadcn/dialog.js +61 -0
- package/lib/esm/core/components/shadcn/dialog.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js +23 -0
- package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox.js +82 -0
- package/lib/esm/core/components/shadcn/filters/comboBox.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/dateFilter.js +31 -0
- package/lib/esm/core/components/shadcn/filters/dateFilter.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/filterBar.js +140 -0
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/filters.js +42 -0
- package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/index.js +6 -0
- package/lib/esm/core/components/shadcn/filters/index.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/selectFilter.js +58 -0
- package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/textFilter.js +20 -0
- package/lib/esm/core/components/shadcn/filters/textFilter.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/types.js +10 -0
- package/lib/esm/core/components/shadcn/filters/types.js.map +1 -0
- package/lib/esm/core/components/shadcn/heading.js +17 -0
- package/lib/esm/core/components/shadcn/heading.js.map +1 -0
- package/lib/esm/core/components/shadcn/index.js +22 -0
- package/lib/esm/core/components/shadcn/index.js.map +1 -0
- package/lib/esm/core/components/shadcn/input.js +38 -0
- package/lib/esm/core/components/shadcn/input.js.map +1 -0
- package/lib/esm/core/components/shadcn/label.js +11 -0
- package/lib/esm/core/components/shadcn/label.js.map +1 -0
- package/lib/esm/core/components/shadcn/popover.js +50 -0
- package/lib/esm/core/components/shadcn/popover.js.map +1 -0
- package/lib/esm/core/components/shadcn/selectBox.js +62 -0
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -0
- package/lib/esm/core/components/shadcn/separator.js +8 -0
- package/lib/esm/core/components/shadcn/separator.js.map +1 -0
- package/lib/esm/core/components/shadcn/tabs.js +77 -0
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -0
- package/lib/esm/core/components/shadcn/text.js +30 -0
- package/lib/esm/core/components/shadcn/text.js.map +1 -0
- package/lib/esm/core/components/shadcn/theme/ThemeProvider.js +38 -0
- package/lib/esm/core/components/shadcn/theme/ThemeProvider.js.map +1 -0
- package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js +13 -0
- package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -0
- package/lib/esm/core/components/shadcn/tooltip.js +14 -0
- package/lib/esm/core/components/shadcn/tooltip.js.map +1 -0
- package/lib/esm/core/components/styles.js +10 -0
- package/lib/esm/core/components/styles.js.map +1 -0
- package/lib/esm/core/components/table/index.js +20 -0
- package/lib/esm/core/components/table/index.js.map +1 -0
- package/lib/esm/core/components/tabs/Tabs.js +78 -0
- package/lib/esm/core/components/tabs/Tabs.js.map +1 -0
- package/lib/esm/core/components/tabs/TabsContext.js +7 -0
- package/lib/esm/core/components/tabs/TabsContext.js.map +1 -0
- package/lib/esm/core/components/tabs/index.js +3 -0
- package/lib/esm/core/components/tabs/index.js.map +1 -0
- package/lib/esm/core/components/toast/NotificationPanel.js +37 -0
- package/lib/esm/core/components/toast/NotificationPanel.js.map +1 -0
- package/lib/esm/core/components/toast/ToastContext.js +7 -0
- package/lib/esm/core/components/toast/ToastContext.js.map +1 -0
- package/lib/esm/core/components/toast/ToastProps.js +2 -0
- package/lib/esm/core/components/toast/ToastProps.js.map +1 -0
- package/lib/esm/core/components/toast/ToastProvider.js +13 -0
- package/lib/esm/core/components/toast/ToastProvider.js.map +1 -0
- package/lib/esm/core/components/toast/index.js +3 -0
- package/lib/esm/core/components/toast/index.js.map +1 -0
- package/lib/esm/core/hooks/CompositeState.js +118 -0
- package/lib/esm/core/hooks/CompositeState.js.map +1 -0
- package/lib/esm/core/hooks/SharedState.js +64 -0
- package/lib/esm/core/hooks/SharedState.js.map +1 -0
- package/lib/esm/core/hooks/index.js +14 -0
- package/lib/esm/core/hooks/index.js.map +1 -0
- package/lib/esm/core/hooks/useClickOutside.js +29 -0
- package/lib/esm/core/hooks/useClickOutside.js.map +1 -0
- package/lib/esm/core/hooks/useCopyToClipboard.js +23 -0
- package/lib/esm/core/hooks/useCopyToClipboard.js.map +1 -0
- package/lib/esm/core/hooks/useDarkMode.js +11 -0
- package/lib/esm/core/hooks/useDarkMode.js.map +1 -0
- package/lib/esm/core/hooks/useDebounce.js +14 -0
- package/lib/esm/core/hooks/useDebounce.js.map +1 -0
- package/lib/esm/core/hooks/useEventSource.js +31 -0
- package/lib/esm/core/hooks/useEventSource.js.map +1 -0
- package/lib/esm/core/hooks/useFetch.js +40 -0
- package/lib/esm/core/hooks/useFetch.js.map +1 -0
- package/lib/esm/core/hooks/useFlag.js +13 -0
- package/lib/esm/core/hooks/useFlag.js.map +1 -0
- package/lib/esm/core/hooks/useIntersectionObserver.js +34 -0
- package/lib/esm/core/hooks/useIntersectionObserver.js.map +1 -0
- package/lib/esm/core/hooks/useIsFistRendering.js +14 -0
- package/lib/esm/core/hooks/useIsFistRendering.js.map +1 -0
- package/lib/esm/core/hooks/useSafeLayoutEffect.js +4 -0
- package/lib/esm/core/hooks/useSafeLayoutEffect.js.map +1 -0
- package/lib/esm/core/hooks/useSharedValue.js +21 -0
- package/lib/esm/core/hooks/useSharedValue.js.map +1 -0
- package/lib/esm/core/index.js +3 -0
- package/lib/esm/core/index.js.map +1 -0
- package/lib/esm/env/index.js +69 -0
- package/lib/esm/env/index.js.map +1 -0
- package/lib/esm/features/activity-doc/ActivityDoc.js +71 -0
- package/lib/esm/features/activity-doc/ActivityDoc.js.map +1 -0
- package/lib/esm/features/activity-doc/index.js +2 -0
- package/lib/esm/features/activity-doc/index.js.map +1 -0
- package/lib/esm/features/index.js +3 -0
- package/lib/esm/features/index.js.map +1 -0
- package/lib/esm/features/permissions/SecureButton.js +13 -0
- package/lib/esm/features/permissions/SecureButton.js.map +1 -0
- package/lib/esm/features/permissions/SecureSidebarItem.js +14 -0
- package/lib/esm/features/permissions/SecureSidebarItem.js.map +1 -0
- package/lib/esm/features/permissions/UserPermissionsProvider.js +86 -0
- package/lib/esm/features/permissions/UserPermissionsProvider.js.map +1 -0
- package/lib/esm/features/permissions/helpers.js +12 -0
- package/lib/esm/features/permissions/helpers.js.map +1 -0
- package/lib/esm/features/permissions/index.js +5 -0
- package/lib/esm/features/permissions/index.js.map +1 -0
- package/lib/esm/form/index.js +3 -0
- package/lib/esm/form/index.js.map +1 -0
- package/lib/esm/layout/AppLayout.js +46 -0
- package/lib/esm/layout/AppLayout.js.map +1 -0
- package/lib/esm/layout/FullHeightLayout.js +20 -0
- package/lib/esm/layout/FullHeightLayout.js.map +1 -0
- package/lib/esm/layout/Navbar.js +40 -0
- package/lib/esm/layout/Navbar.js.map +1 -0
- package/lib/esm/layout/Sidebar.js +35 -0
- package/lib/esm/layout/Sidebar.js.map +1 -0
- package/lib/esm/layout/SidebarContext.js +10 -0
- package/lib/esm/layout/SidebarContext.js.map +1 -0
- package/lib/esm/layout/TitleBar.js +5 -0
- package/lib/esm/layout/TitleBar.js.map +1 -0
- package/lib/esm/layout/index.js +7 -0
- package/lib/esm/layout/index.js.map +1 -0
- package/lib/esm/router/FixLinks.js +23 -0
- package/lib/esm/router/FixLinks.js.map +1 -0
- package/lib/esm/router/HistoryNavigator.js +149 -0
- package/lib/esm/router/HistoryNavigator.js.map +1 -0
- package/lib/esm/router/Nav.js +26 -0
- package/lib/esm/router/Nav.js.map +1 -0
- package/lib/esm/router/NestedNavigationContext.js +19 -0
- package/lib/esm/router/NestedNavigationContext.js.map +1 -0
- package/lib/esm/router/NestedRouterProvider.js +44 -0
- package/lib/esm/router/NestedRouterProvider.js.map +1 -0
- package/lib/esm/router/PathMatcher.js +159 -0
- package/lib/esm/router/PathMatcher.js.map +1 -0
- package/lib/esm/router/PathWithParams.js +34 -0
- package/lib/esm/router/PathWithParams.js.map +1 -0
- package/lib/esm/router/Route404.js +18 -0
- package/lib/esm/router/Route404.js.map +1 -0
- package/lib/esm/router/RouteComponent.js +32 -0
- package/lib/esm/router/RouteComponent.js.map +1 -0
- package/lib/esm/router/Router.js +161 -0
- package/lib/esm/router/Router.js.map +1 -0
- package/lib/esm/router/RouterProvider.js +41 -0
- package/lib/esm/router/RouterProvider.js.map +1 -0
- package/lib/esm/router/index.js +11 -0
- package/lib/esm/router/index.js.map +1 -0
- package/lib/esm/router/path.js +137 -0
- package/lib/esm/router/path.js.map +1 -0
- package/lib/esm/session/TypeRegistry.js +24 -0
- package/lib/esm/session/TypeRegistry.js.map +1 -0
- package/lib/esm/session/UserSession.js +191 -0
- package/lib/esm/session/UserSession.js.map +1 -0
- package/lib/esm/session/UserSessionProvider.js +161 -0
- package/lib/esm/session/UserSessionProvider.js.map +1 -0
- package/lib/esm/session/auth/composable.js +162 -0
- package/lib/esm/session/auth/composable.js.map +1 -0
- package/lib/esm/session/auth/firebase.js +151 -0
- package/lib/esm/session/auth/firebase.js.map +1 -0
- package/lib/esm/session/auth/useAuthState.js +49 -0
- package/lib/esm/session/auth/useAuthState.js.map +1 -0
- package/lib/esm/session/index.js +7 -0
- package/lib/esm/session/index.js.map +1 -0
- package/lib/esm/session/useUXTracking.js +29 -0
- package/lib/esm/session/useUXTracking.js.map +1 -0
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +103 -0
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -0
- package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js +33 -0
- package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js.map +1 -0
- package/lib/esm/widgets/codemirror/index.js +2 -0
- package/lib/esm/widgets/codemirror/index.js.map +1 -0
- package/lib/esm/widgets/form/Form.js +102 -0
- package/lib/esm/widgets/form/Form.js.map +1 -0
- package/lib/esm/widgets/form/FormContext.js +29 -0
- package/lib/esm/widgets/form/FormContext.js.map +1 -0
- package/lib/esm/widgets/form/ManagedObject.js +283 -0
- package/lib/esm/widgets/form/ManagedObject.js.map +1 -0
- package/lib/esm/widgets/form/fields.js +11 -0
- package/lib/esm/widgets/form/fields.js.map +1 -0
- package/lib/esm/widgets/form/index.js +7 -0
- package/lib/esm/widgets/form/index.js.map +1 -0
- package/lib/esm/widgets/form/inputs.js +36 -0
- package/lib/esm/widgets/form/inputs.js.map +1 -0
- package/lib/esm/widgets/form/schema.js +191 -0
- package/lib/esm/widgets/form/schema.js.map +1 -0
- package/lib/esm/widgets/index.js +6 -0
- package/lib/esm/widgets/index.js.map +1 -0
- package/lib/esm/widgets/json-view/JSONCode.js +157 -0
- package/lib/esm/widgets/json-view/JSONCode.js.map +1 -0
- package/lib/esm/widgets/json-view/JSONDisplay.js +10 -0
- package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -0
- package/lib/esm/widgets/json-view/JSONView.js +106 -0
- package/lib/esm/widgets/json-view/JSONView.js.map +1 -0
- package/lib/esm/widgets/json-view/index.js +4 -0
- package/lib/esm/widgets/json-view/index.js.map +1 -0
- package/lib/esm/widgets/json-view/types.js +2 -0
- package/lib/esm/widgets/json-view/types.js.map +1 -0
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +50 -0
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +1 -0
- package/lib/esm/widgets/schema-editor/ManagedSchema.js +303 -0
- package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -0
- package/lib/esm/widgets/schema-editor/editor/Editable.js +111 -0
- package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -0
- package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js +8 -0
- package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js.map +1 -0
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +81 -0
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -0
- package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +7 -0
- package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -0
- package/lib/esm/widgets/schema-editor/editor/SchemaContext.js +9 -0
- package/lib/esm/widgets/schema-editor/editor/SchemaContext.js.map +1 -0
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +84 -0
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -0
- package/lib/esm/widgets/schema-editor/index.js +8 -0
- package/lib/esm/widgets/schema-editor/index.js.map +1 -0
- package/lib/esm/widgets/schema-editor/json-schema4-utils.js +188 -0
- package/lib/esm/widgets/schema-editor/json-schema4-utils.js.map +1 -0
- package/lib/esm/widgets/schema-editor/type-signature.js +30 -0
- package/lib/esm/widgets/schema-editor/type-signature.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/Attributes/index.js +11 -0
- package/lib/esm/widgets/xml-viewer/components/Attributes/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js +8 -0
- package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js +11 -0
- package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js +11 -0
- package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js +9 -0
- package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/Elements/index.js +36 -0
- package/lib/esm/widgets/xml-viewer/components/Elements/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js +5 -0
- package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/Tag/index.js +13 -0
- package/lib/esm/widgets/xml-viewer/components/Tag/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/TextElement/index.js +13 -0
- package/lib/esm/widgets/xml-viewer/components/TextElement/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/XMLViewer.js +30 -0
- package/lib/esm/widgets/xml-viewer/components/XMLViewer.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/components/types.js +2 -0
- package/lib/esm/widgets/xml-viewer/components/types.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/constants/index.js +17 -0
- package/lib/esm/widgets/xml-viewer/constants/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js +10 -0
- package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/helpers/index.js +40 -0
- package/lib/esm/widgets/xml-viewer/helpers/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js +22 -0
- package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js +31 -0
- package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/index.js +3 -0
- package/lib/esm/widgets/xml-viewer/index.js.map +1 -0
- package/lib/esm/widgets/xml-viewer/types/index.js +2 -0
- package/lib/esm/widgets/xml-viewer/types/index.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/code/index.d.ts +0 -0
- package/lib/types/core/components/Avatar.d.ts +15 -0
- package/lib/types/core/components/Badge.d.ts +20 -0
- package/lib/types/core/components/Button.d.ts +13 -0
- package/lib/types/core/components/Center.d.ts +7 -0
- package/lib/types/core/components/ComboBox.d.ts +123 -0
- package/lib/types/core/components/ConfirmModal.d.ts +10 -0
- package/lib/types/core/components/DeleteModal.d.ts +10 -0
- package/lib/types/core/components/Divider.d.ts +5 -0
- package/lib/types/core/components/Dropdown.d.ts +14 -0
- package/lib/types/core/components/DropdownList.d.ts +12 -0
- package/lib/types/core/components/EmptyCollection.d.ts +8 -0
- package/lib/types/core/components/FileUpload.d.ts +28 -0
- package/lib/types/core/components/Input.d.ts +8 -0
- package/lib/types/core/components/InputList.d.ts +10 -0
- package/lib/types/core/components/Link.d.ts +6 -0
- package/lib/types/core/components/MenuList.d.ts +13 -0
- package/lib/types/core/components/MessageBox.d.ts +35 -0
- package/lib/types/core/components/Modal.d.ts +29 -0
- package/lib/types/core/components/NumberInput.d.ts +15 -0
- package/lib/types/core/components/Portal.d.ts +5 -0
- package/lib/types/core/components/RadioGroup.d.ts +25 -0
- package/lib/types/core/components/SelectBox.d.ts +35 -0
- package/lib/types/core/components/SelectList.d.ts +17 -0
- package/lib/types/core/components/SelectStack.d.ts +12 -0
- package/lib/types/core/components/SidePanel.d.ts +8 -0
- package/lib/types/core/components/Spinner.d.ts +6 -0
- package/lib/types/core/components/Switch.d.ts +9 -0
- package/lib/types/core/components/Textarea.d.ts +7 -0
- package/lib/types/core/components/index.d.ts +37 -0
- package/lib/types/core/components/libs/utils.d.ts +2 -0
- package/lib/types/core/components/libs/visuallyHidden.d.ts +6 -0
- package/lib/types/core/components/popup/Popup.d.ts +25 -0
- package/lib/types/core/components/popup/PopupController.d.ts +40 -0
- package/lib/types/core/components/popup/index.d.ts +3 -0
- package/lib/types/core/components/popup/position.d.ts +58 -0
- package/lib/types/core/components/popup/utils.d.ts +29 -0
- package/lib/types/core/components/shadcn/breadcrumb.d.ts +13 -0
- package/lib/types/core/components/shadcn/button.d.ts +15 -0
- package/lib/types/core/components/shadcn/calendar.d.ts +10 -0
- package/lib/types/core/components/shadcn/card.d.ts +8 -0
- package/lib/types/core/components/shadcn/checkbox.d.ts +4 -0
- package/lib/types/core/components/shadcn/command.d.ts +80 -0
- package/lib/types/core/components/shadcn/dialog.d.ts +34 -0
- package/lib/types/core/components/shadcn/filters/animateChangeInHeight.d.ts +6 -0
- package/lib/types/core/components/shadcn/filters/comboBox.d.ts +17 -0
- package/lib/types/core/components/shadcn/filters/dateFilter.d.ts +14 -0
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts +9 -0
- package/lib/types/core/components/shadcn/filters/filters.d.ts +9 -0
- package/lib/types/core/components/shadcn/filters/index.d.ts +5 -0
- package/lib/types/core/components/shadcn/filters/selectFilter.d.ts +11 -0
- package/lib/types/core/components/shadcn/filters/textFilter.d.ts +12 -0
- package/lib/types/core/components/shadcn/filters/types.d.ts +26 -0
- package/lib/types/core/components/shadcn/heading.d.ts +5 -0
- package/lib/types/core/components/shadcn/index.d.ts +21 -0
- package/lib/types/core/components/shadcn/input.d.ts +16 -0
- package/lib/types/core/components/shadcn/label.d.ts +7 -0
- package/lib/types/core/components/shadcn/popover.d.ts +16 -0
- package/lib/types/core/components/shadcn/selectBox.d.ts +21 -0
- package/lib/types/core/components/shadcn/separator.d.ts +4 -0
- package/lib/types/core/components/shadcn/tabs.d.ts +26 -0
- package/lib/types/core/components/shadcn/text.d.ts +10 -0
- package/lib/types/core/components/shadcn/theme/ThemeProvider.d.ts +13 -0
- package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts +9 -0
- package/lib/types/core/components/shadcn/tooltip.d.ts +19 -0
- package/lib/types/core/components/styles.d.ts +6 -0
- package/lib/types/core/components/table/index.d.ts +13 -0
- package/lib/types/core/components/tabs/Tabs.d.ts +24 -0
- package/lib/types/core/components/tabs/TabsContext.d.ts +16 -0
- package/lib/types/core/components/tabs/index.d.ts +2 -0
- package/lib/types/core/components/toast/NotificationPanel.d.ts +7 -0
- package/lib/types/core/components/toast/ToastContext.d.ts +5 -0
- package/lib/types/core/components/toast/ToastProps.d.ts +6 -0
- package/lib/types/core/components/toast/ToastProvider.d.ts +5 -0
- package/lib/types/core/components/toast/index.d.ts +2 -0
- package/lib/types/core/hooks/CompositeState.d.ts +27 -0
- package/lib/types/core/hooks/SharedState.d.ts +9 -0
- package/lib/types/core/hooks/index.d.ts +13 -0
- package/lib/types/core/hooks/useClickOutside.d.ts +7 -0
- package/lib/types/core/hooks/useCopyToClipboard.d.ts +4 -0
- package/lib/types/core/hooks/useDarkMode.d.ts +1 -0
- package/lib/types/core/hooks/useDebounce.d.ts +1 -0
- package/lib/types/core/hooks/useEventSource.d.ts +1 -0
- package/lib/types/core/hooks/useFetch.d.ts +23 -0
- package/lib/types/core/hooks/useFlag.d.ts +8 -0
- package/lib/types/core/hooks/useIntersectionObserver.d.ts +13 -0
- package/lib/types/core/hooks/useIsFistRendering.d.ts +1 -0
- package/lib/types/core/hooks/useSafeLayoutEffect.d.ts +3 -0
- package/lib/types/core/hooks/useSharedValue.d.ts +11 -0
- package/lib/types/core/index.d.ts +2 -0
- package/lib/types/env/index.d.ts +70 -0
- package/lib/types/features/activity-doc/ActivityDoc.d.ts +13 -0
- package/lib/types/features/activity-doc/index.d.ts +1 -0
- package/lib/types/features/index.d.ts +2 -0
- package/lib/types/features/permissions/SecureButton.d.ts +7 -0
- package/lib/types/features/permissions/SecureSidebarItem.d.ts +7 -0
- package/lib/types/features/permissions/UserPermissionsProvider.d.ts +19 -0
- package/lib/types/features/permissions/helpers.d.ts +4 -0
- package/lib/types/features/permissions/index.d.ts +4 -0
- package/lib/types/form/index.d.ts +0 -0
- package/lib/types/layout/AppLayout.d.ts +12 -0
- package/lib/types/layout/FullHeightLayout.d.ts +26 -0
- package/lib/types/layout/Navbar.d.ts +32 -0
- package/lib/types/layout/Sidebar.d.ts +29 -0
- package/lib/types/layout/SidebarContext.d.ts +8 -0
- package/lib/types/layout/TitleBar.d.ts +5 -0
- package/lib/types/layout/index.d.ts +6 -0
- package/lib/types/router/FixLinks.d.ts +6 -0
- package/lib/types/router/HistoryNavigator.d.ts +55 -0
- package/lib/types/router/Nav.d.ts +28 -0
- package/lib/types/router/NestedNavigationContext.d.ts +8 -0
- package/lib/types/router/NestedRouterProvider.d.ts +13 -0
- package/lib/types/router/PathMatcher.d.ts +35 -0
- package/lib/types/router/PathWithParams.d.ts +8 -0
- package/lib/types/router/Route404.d.ts +3 -0
- package/lib/types/router/RouteComponent.d.ts +5 -0
- package/lib/types/router/Router.d.ts +73 -0
- package/lib/types/router/RouterProvider.d.ts +14 -0
- package/lib/types/router/index.d.ts +10 -0
- package/lib/types/router/path.d.ts +7 -0
- package/lib/types/session/TypeRegistry.d.ts +9 -0
- package/lib/types/session/UserSession.d.ts +39 -0
- package/lib/types/session/UserSessionProvider.d.ts +6 -0
- package/lib/types/session/auth/composable.d.ts +25 -0
- package/lib/types/session/auth/firebase.d.ts +9 -0
- package/lib/types/session/auth/useAuthState.d.ts +9 -0
- package/lib/types/session/index.d.ts +6 -0
- package/lib/types/session/useUXTracking.d.ts +5 -0
- package/lib/types/widgets/codemirror/CodeMirrorEditor.d.ts +22 -0
- package/lib/types/widgets/codemirror/CodemirrorStateSingleton.d.ts +14 -0
- package/lib/types/widgets/codemirror/index.d.ts +1 -0
- package/lib/types/widgets/form/Form.d.ts +20 -0
- package/lib/types/widgets/form/FormContext.d.ts +16 -0
- package/lib/types/widgets/form/ManagedObject.d.ts +81 -0
- package/lib/types/widgets/form/fields.d.ts +15 -0
- package/lib/types/widgets/form/index.d.ts +6 -0
- package/lib/types/widgets/form/inputs.d.ts +7 -0
- package/lib/types/widgets/form/schema.d.ts +45 -0
- package/lib/types/widgets/index.d.ts +5 -0
- package/lib/types/widgets/json-view/JSONCode.d.ts +21 -0
- package/lib/types/widgets/json-view/JSONDisplay.d.ts +7 -0
- package/lib/types/widgets/json-view/JSONView.d.ts +6 -0
- package/lib/types/widgets/json-view/index.d.ts +4 -0
- package/lib/types/widgets/json-view/types.d.ts +7 -0
- package/lib/types/widgets/schema-editor/JSONSchemaEditorModal.d.ts +9 -0
- package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +74 -0
- package/lib/types/widgets/schema-editor/editor/Editable.d.ts +39 -0
- package/lib/types/widgets/schema-editor/editor/EditableSchemaProperty.d.ts +7 -0
- package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts +4 -0
- package/lib/types/widgets/schema-editor/editor/PropertyViewer.d.ts +3 -0
- package/lib/types/widgets/schema-editor/editor/SchemaContext.d.ts +2 -0
- package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts +8 -0
- package/lib/types/widgets/schema-editor/index.d.ts +7 -0
- package/lib/types/widgets/schema-editor/json-schema4-utils.d.ts +15 -0
- package/lib/types/widgets/schema-editor/type-signature.d.ts +18 -0
- package/lib/types/widgets/xml-viewer/components/Attributes/index.d.ts +5 -0
- package/lib/types/widgets/xml-viewer/components/CDataTag/index.d.ts +7 -0
- package/lib/types/widgets/xml-viewer/components/CollapseIcon/index.d.ts +4 -0
- package/lib/types/widgets/xml-viewer/components/CommentTag/index.d.ts +8 -0
- package/lib/types/widgets/xml-viewer/components/DeclarationTag/index.d.ts +7 -0
- package/lib/types/widgets/xml-viewer/components/Elements/index.d.ts +7 -0
- package/lib/types/widgets/xml-viewer/components/InvalidXml/index.d.ts +1 -0
- package/lib/types/widgets/xml-viewer/components/Tag/index.d.ts +12 -0
- package/lib/types/widgets/xml-viewer/components/TextElement/index.d.ts +7 -0
- package/lib/types/widgets/xml-viewer/components/XMLViewer.d.ts +2 -0
- package/lib/types/widgets/xml-viewer/components/types.d.ts +103 -0
- package/lib/types/widgets/xml-viewer/constants/index.d.ts +16 -0
- package/lib/types/widgets/xml-viewer/context/xml-viewer-context.d.ts +3 -0
- package/lib/types/widgets/xml-viewer/helpers/index.d.ts +12 -0
- package/lib/types/widgets/xml-viewer/hooks/useCollapsible.d.ts +14 -0
- package/lib/types/widgets/xml-viewer/hooks/useXMLViewer.d.ts +9 -0
- package/lib/types/widgets/xml-viewer/index.d.ts +2 -0
- package/lib/types/widgets/xml-viewer/types/index.d.ts +15 -0
- package/lib/vertesia-ui-code.js +2 -0
- package/lib/vertesia-ui-code.js.map +1 -0
- package/lib/vertesia-ui-core.js +2 -0
- package/lib/vertesia-ui-core.js.map +1 -0
- package/lib/vertesia-ui-env.js +2 -0
- package/lib/vertesia-ui-env.js.map +1 -0
- package/lib/vertesia-ui-features.js +2 -0
- package/lib/vertesia-ui-features.js.map +1 -0
- package/lib/vertesia-ui-form.js +2 -0
- package/lib/vertesia-ui-form.js.map +1 -0
- package/lib/vertesia-ui-layout.js +2 -0
- package/lib/vertesia-ui-layout.js.map +1 -0
- package/lib/vertesia-ui-router.js +2 -0
- package/lib/vertesia-ui-router.js.map +1 -0
- package/lib/vertesia-ui-session.js +2 -0
- package/lib/vertesia-ui-session.js.map +1 -0
- package/lib/vertesia-ui-widgets.js +2 -0
- package/lib/vertesia-ui-widgets.js.map +1 -0
- package/package.json +113 -33
- package/src/code/index.ts +1 -0
- package/src/core/components/Avatar.tsx +67 -0
- package/src/core/components/Badge.tsx +114 -0
- package/src/core/components/Button.tsx +63 -0
- package/src/core/components/Center.tsx +12 -0
- package/src/core/components/ComboBox.tsx +488 -0
- package/src/core/components/ConfirmModal.tsx +51 -0
- package/src/core/components/DeleteModal.tsx +45 -0
- package/src/core/components/Divider.tsx +11 -0
- package/src/core/components/Dropdown.tsx +63 -0
- package/src/core/components/DropdownList.tsx +72 -0
- package/src/core/components/EmptyCollection.tsx +39 -0
- package/src/core/components/FileUpload.tsx +196 -0
- package/src/core/components/Input.tsx +43 -0
- package/src/core/components/InputList.tsx +75 -0
- package/src/core/components/Link.tsx +16 -0
- package/src/core/components/MenuList.tsx +44 -0
- package/src/core/components/MessageBox.tsx +96 -0
- package/src/core/components/Modal.tsx +144 -0
- package/src/core/components/NumberInput.tsx +64 -0
- package/src/core/components/Portal.tsx +33 -0
- package/src/core/components/RadioGroup.tsx +100 -0
- package/src/core/components/SelectBox.tsx +189 -0
- package/src/core/components/SelectList.tsx +85 -0
- package/src/core/components/SelectStack.tsx +63 -0
- package/src/core/components/SidePanel.tsx +104 -0
- package/src/core/components/Spinner.tsx +33 -0
- package/src/core/components/Switch.tsx +29 -0
- package/src/core/components/Textarea.tsx +25 -0
- package/src/core/components/index.ts +39 -0
- package/src/core/components/libs/utils.tsx +6 -0
- package/src/core/components/libs/visuallyHidden.tsx +25 -0
- package/src/core/components/popup/Popup.tsx +94 -0
- package/src/core/components/popup/PopupController.ts +182 -0
- package/src/core/components/popup/index.ts +3 -0
- package/src/core/components/popup/position.ts +277 -0
- package/src/core/components/popup/utils.ts +82 -0
- package/src/core/components/shadcn/breadcrumb.tsx +174 -0
- package/src/core/components/shadcn/button.tsx +95 -0
- package/src/core/components/shadcn/calendar.tsx +87 -0
- package/src/core/components/shadcn/card.tsx +76 -0
- package/src/core/components/shadcn/checkbox.tsx +30 -0
- package/src/core/components/shadcn/command.tsx +155 -0
- package/src/core/components/shadcn/dialog.tsx +230 -0
- package/src/core/components/shadcn/filters/animateChangeInHeight.tsx +41 -0
- package/src/core/components/shadcn/filters/comboBox.tsx +251 -0
- package/src/core/components/shadcn/filters/dateFilter.tsx +65 -0
- package/src/core/components/shadcn/filters/filterBar.tsx +262 -0
- package/src/core/components/shadcn/filters/filters.tsx +110 -0
- package/src/core/components/shadcn/filters/index.ts +5 -0
- package/src/core/components/shadcn/filters/selectFilter.tsx +91 -0
- package/src/core/components/shadcn/filters/textFilter.tsx +59 -0
- package/src/core/components/shadcn/filters/types.ts +29 -0
- package/src/core/components/shadcn/heading.tsx +23 -0
- package/src/core/components/shadcn/index.ts +22 -0
- package/src/core/components/shadcn/input.tsx +89 -0
- package/src/core/components/shadcn/label.tsx +31 -0
- package/src/core/components/shadcn/popover.tsx +115 -0
- package/src/core/components/shadcn/selectBox.tsx +186 -0
- package/src/core/components/shadcn/separator.tsx +29 -0
- package/src/core/components/shadcn/tabs.tsx +218 -0
- package/src/core/components/shadcn/text.tsx +33 -0
- package/src/core/components/shadcn/theme/ThemeProvider.tsx +73 -0
- package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +35 -0
- package/src/core/components/shadcn/tooltip.tsx +57 -0
- package/src/core/components/styles.ts +11 -0
- package/src/core/components/table/index.tsx +49 -0
- package/src/core/components/tabs/Tabs.tsx +132 -0
- package/src/core/components/tabs/TabsContext.ts +25 -0
- package/src/core/components/tabs/index.ts +2 -0
- package/src/core/components/toast/NotificationPanel.tsx +91 -0
- package/src/core/components/toast/ToastContext.ts +12 -0
- package/src/core/components/toast/ToastProps.ts +6 -0
- package/src/core/components/toast/ToastProvider.tsx +26 -0
- package/src/core/components/toast/index.ts +2 -0
- package/src/core/hooks/CompositeState.tsx +142 -0
- package/src/core/hooks/SharedState.tsx +69 -0
- package/src/core/hooks/index.ts +13 -0
- package/src/core/hooks/useClickOutside.tsx +29 -0
- package/src/core/hooks/useCopyToClipboard.tsx +28 -0
- package/src/core/hooks/useDarkMode.ts +11 -0
- package/src/core/hooks/useDebounce.tsx +15 -0
- package/src/core/hooks/useEventSource.ts +35 -0
- package/src/core/hooks/useFetch.ts +51 -0
- package/src/core/hooks/useFlag.tsx +13 -0
- package/src/core/hooks/useIntersectionObserver.tsx +40 -0
- package/src/core/hooks/useIsFistRendering.ts +17 -0
- package/src/core/hooks/useSafeLayoutEffect.ts +5 -0
- package/src/core/hooks/useSharedValue.ts +22 -0
- package/src/core/index.ts +2 -0
- package/src/env/index.ts +116 -0
- package/src/features/activity-doc/ActivityDoc.tsx +199 -0
- package/src/features/activity-doc/index.ts +1 -0
- package/src/features/index.ts +2 -0
- package/src/features/permissions/SecureButton.tsx +18 -0
- package/src/features/permissions/SecureSidebarItem.tsx +19 -0
- package/src/features/permissions/UserPermissionsProvider.tsx +102 -0
- package/src/features/permissions/helpers.ts +16 -0
- package/src/features/permissions/index.ts +4 -0
- package/src/form/index.ts +1 -0
- package/src/layout/AppLayout.tsx +132 -0
- package/src/layout/FullHeightLayout.tsx +74 -0
- package/src/layout/Navbar.tsx +127 -0
- package/src/layout/Sidebar.tsx +129 -0
- package/src/layout/SidebarContext.ts +17 -0
- package/src/layout/TitleBar.tsx +7 -0
- package/src/layout/index.ts +6 -0
- package/src/router/FixLinks.tsx +28 -0
- package/src/router/HistoryNavigator.ts +178 -0
- package/src/router/Nav.tsx +55 -0
- package/src/router/NestedNavigationContext.tsx +32 -0
- package/src/router/NestedRouterProvider.tsx +64 -0
- package/src/router/PathMatcher.ts +166 -0
- package/src/router/PathWithParams.ts +34 -0
- package/src/router/Route404.tsx +18 -0
- package/src/router/RouteComponent.tsx +41 -0
- package/src/router/Router.tsx +216 -0
- package/src/router/RouterProvider.tsx +55 -0
- package/src/router/index.ts +10 -0
- package/src/router/path.ts +151 -0
- package/src/session/TypeRegistry.ts +27 -0
- package/src/session/UserSession.ts +227 -0
- package/src/session/UserSessionProvider.tsx +170 -0
- package/src/session/auth/composable.ts +190 -0
- package/src/session/auth/firebase.ts +160 -0
- package/src/session/auth/useAuthState.ts +61 -0
- package/src/session/index.ts +6 -0
- package/src/session/useUXTracking.tsx +38 -0
- package/src/vite-env.d.ts +2 -0
- package/src/widgets/codemirror/CodeMirrorEditor.tsx +121 -0
- package/src/widgets/codemirror/CodemirrorStateSingleton.tsx +39 -0
- package/src/widgets/codemirror/index.ts +2 -0
- package/src/widgets/form/Form.tsx +194 -0
- package/src/widgets/form/FormContext.ts +38 -0
- package/src/widgets/form/ManagedObject.ts +332 -0
- package/src/widgets/form/fields.tsx +34 -0
- package/src/widgets/form/index.ts +6 -0
- package/src/widgets/form/inputs.tsx +44 -0
- package/src/widgets/form/schema.ts +215 -0
- package/src/widgets/index.ts +5 -0
- package/src/widgets/json-view/JSONCode.tsx +176 -0
- package/src/widgets/json-view/JSONDisplay.tsx +24 -0
- package/src/widgets/json-view/JSONView.tsx +183 -0
- package/src/widgets/json-view/index.ts +4 -0
- package/src/widgets/json-view/types.ts +5 -0
- package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +68 -0
- package/src/widgets/schema-editor/ManagedSchema.ts +340 -0
- package/src/widgets/schema-editor/editor/Editable.tsx +252 -0
- package/src/widgets/schema-editor/editor/EditableSchemaProperty.tsx +15 -0
- package/src/widgets/schema-editor/editor/PropertyEditor.tsx +150 -0
- package/src/widgets/schema-editor/editor/PropertyViewer.tsx +15 -0
- package/src/widgets/schema-editor/editor/SchemaContext.tsx +9 -0
- package/src/widgets/schema-editor/editor/SchemaEditor.test.ts +48 -0
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +161 -0
- package/src/widgets/schema-editor/index.ts +7 -0
- package/src/widgets/schema-editor/json-schema4-utils.ts +187 -0
- package/src/widgets/schema-editor/type-signature.ts +39 -0
- package/src/widgets/xml-viewer/components/Attributes/index.tsx +27 -0
- package/src/widgets/xml-viewer/components/CDataTag/index.tsx +21 -0
- package/src/widgets/xml-viewer/components/CollapseIcon/index.tsx +32 -0
- package/src/widgets/xml-viewer/components/CommentTag/index.tsx +30 -0
- package/src/widgets/xml-viewer/components/DeclarationTag/index.tsx +23 -0
- package/src/widgets/xml-viewer/components/Elements/index.tsx +83 -0
- package/src/widgets/xml-viewer/components/InvalidXml/index.tsx +3 -0
- package/src/widgets/xml-viewer/components/Tag/index.tsx +47 -0
- package/src/widgets/xml-viewer/components/TextElement/index.tsx +28 -0
- package/src/widgets/xml-viewer/components/XMLViewer.tsx +53 -0
- package/src/widgets/xml-viewer/components/types.ts +104 -0
- package/src/widgets/xml-viewer/constants/index.ts +17 -0
- package/src/widgets/xml-viewer/context/xml-viewer-context.ts +12 -0
- package/src/widgets/xml-viewer/helpers/index.ts +56 -0
- package/src/widgets/xml-viewer/hooks/useCollapsible.ts +28 -0
- package/src/widgets/xml-viewer/hooks/useXMLViewer.ts +34 -0
- package/src/widgets/xml-viewer/index.ts +2 -0
- package/src/widgets/xml-viewer/types/index.ts +21 -0
- package/README.md +0 -1
- package/lib/context/HostContext.d.ts +0 -67
- package/lib/context/HostContext.d.ts.map +0 -1
- package/lib/context/HostContext.js +0 -2
- package/lib/context/HostContext.js.map +0 -1
- package/lib/context/index.d.ts +0 -9
- package/lib/context/index.d.ts.map +0 -1
- package/lib/context/index.js +0 -11
- package/lib/context/index.js.map +0 -1
- package/lib/host/PluginHost.d.ts +0 -7
- package/lib/host/PluginHost.d.ts.map +0 -1
- package/lib/host/PluginHost.js +0 -37
- package/lib/host/PluginHost.js.map +0 -1
- package/lib/host/PluginManager.d.ts +0 -59
- package/lib/host/PluginManager.d.ts.map +0 -1
- package/lib/host/PluginManager.js +0 -195
- package/lib/host/PluginManager.js.map +0 -1
- package/lib/host/index.d.ts +0 -3
- package/lib/host/index.d.ts.map +0 -1
- package/lib/host/index.js +0 -3
- package/lib/host/index.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -3
- package/lib/index.js.map +0 -1
- package/src/context/HostContext.ts +0 -73
- package/src/context/index.ts +0 -20
- package/src/host/PluginHost.tsx +0 -37
- package/src/host/PluginManager.tsx +0 -197
- package/src/host/index.ts +0 -2
- package/src/index.ts +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { TriangleAlert } from "lucide-react"
|
|
2
|
+
import React, { useRef } from "react"
|
|
3
|
+
import { VModal, VModalTitle, VModalFooter } from "./shadcn"
|
|
4
|
+
import { Button } from "./shadcn/button"
|
|
5
|
+
|
|
6
|
+
interface ConfirmModalProps {
|
|
7
|
+
title: string
|
|
8
|
+
content: string | React.ReactNode
|
|
9
|
+
onConfirm: () => void
|
|
10
|
+
onCancel: () => void
|
|
11
|
+
isOpen: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function ConfirmModal({ title, content, onConfirm, onCancel, isOpen }: ConfirmModalProps) {
|
|
15
|
+
const cancelButtonRef = useRef(null)
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<VModal isOpen={isOpen} onClose={onCancel} description="Confirm Modal">
|
|
19
|
+
<div className="sm:flex sm:items-start p-2">
|
|
20
|
+
<div className="mx-auto flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10">
|
|
21
|
+
<TriangleAlert className="size-6 text-red-600" aria-hidden="true" />
|
|
22
|
+
</div>
|
|
23
|
+
<div className="mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left">
|
|
24
|
+
<VModalTitle className="leading-6" show >
|
|
25
|
+
{title}
|
|
26
|
+
</VModalTitle>
|
|
27
|
+
<div className="mt-2">
|
|
28
|
+
<div className="prose text-sm text-gray-500">
|
|
29
|
+
{content}
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<VModalFooter align="right">
|
|
35
|
+
<Button
|
|
36
|
+
variant="destructive"
|
|
37
|
+
onClick={onConfirm}
|
|
38
|
+
>
|
|
39
|
+
Confirm
|
|
40
|
+
</Button>
|
|
41
|
+
<Button
|
|
42
|
+
variant="outline"
|
|
43
|
+
onClick={onCancel}
|
|
44
|
+
ref={cancelButtonRef}
|
|
45
|
+
>
|
|
46
|
+
Cancel
|
|
47
|
+
</Button>
|
|
48
|
+
</VModalFooter>
|
|
49
|
+
</VModal>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { ConfirmModal } from "./ConfirmModal.js";
|
|
3
|
+
import { useToast } from "./toast/index.js";
|
|
4
|
+
|
|
5
|
+
interface DeleteModalProps {
|
|
6
|
+
idToDelete?: string;
|
|
7
|
+
title: string;
|
|
8
|
+
content: string | ReactNode;
|
|
9
|
+
setIdToDelete: (id: string | undefined) => void;
|
|
10
|
+
deleteApi: (id: string) => Promise<any>;
|
|
11
|
+
}
|
|
12
|
+
export function DeleteModal({ idToDelete, title, content, setIdToDelete, deleteApi }: DeleteModalProps) {
|
|
13
|
+
const toast = useToast();
|
|
14
|
+
|
|
15
|
+
const doDelete = async () => {
|
|
16
|
+
|
|
17
|
+
if (!idToDelete) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
return deleteApi(idToDelete)
|
|
21
|
+
.then(() => {
|
|
22
|
+
toast({
|
|
23
|
+
title: 'Delete succeeded',
|
|
24
|
+
status: 'success'
|
|
25
|
+
});
|
|
26
|
+
}).catch((err: any) => {
|
|
27
|
+
toast({
|
|
28
|
+
title: 'Failed to delete',
|
|
29
|
+
description: err.message ?? 'An error occurred while deleting the object',
|
|
30
|
+
status: 'error'
|
|
31
|
+
});
|
|
32
|
+
}).finally(() => {
|
|
33
|
+
setIdToDelete(undefined);
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<ConfirmModal
|
|
39
|
+
title={title}
|
|
40
|
+
content={content}
|
|
41
|
+
isOpen={!!idToDelete}
|
|
42
|
+
onConfirm={doDelete}
|
|
43
|
+
onCancel={() => { setIdToDelete(undefined); }} />
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Menu, MenuButton, MenuItems, MenuItem as _MenuItem, Transition } from '@headlessui/react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { Fragment } from 'react';
|
|
4
|
+
|
|
5
|
+
interface DropdownProps {
|
|
6
|
+
trigger: React.ReactNode;
|
|
7
|
+
children: React.ReactNode | React.ReactNode[];
|
|
8
|
+
}
|
|
9
|
+
export function Dropdown({ trigger, children }: DropdownProps) {
|
|
10
|
+
return (
|
|
11
|
+
<Menu as="div" className="relative">
|
|
12
|
+
<MenuButton as="span" className="-m-1.5 flex items-center p-1.5">
|
|
13
|
+
{trigger}
|
|
14
|
+
</MenuButton>
|
|
15
|
+
<Transition
|
|
16
|
+
as={Fragment}
|
|
17
|
+
enter="transition ease-out duration-100"
|
|
18
|
+
enterFrom="transform opacity-0 scale-95"
|
|
19
|
+
enterTo="transform opacity-100 scale-100"
|
|
20
|
+
leave="transition ease-in duration-75"
|
|
21
|
+
leaveFrom="transform opacity-100 scale-100"
|
|
22
|
+
leaveTo="transform opacity-0 scale-95"
|
|
23
|
+
>
|
|
24
|
+
<MenuItems className="absolute right-0 z-10 mt-2.5 w-48 origin-top-right rounded-md bg-white dark:bg-slate-900 dark:border-slate-800 dark:border py-2 shadow-lg ring-1 ring-gray-900/5 dark:ring-slate-200/5 focus:outline-hidden">
|
|
25
|
+
{children}
|
|
26
|
+
</MenuItems>
|
|
27
|
+
</Transition>
|
|
28
|
+
</Menu>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface MenuItemProps {
|
|
33
|
+
children: React.ReactNode | React.ReactNode[]
|
|
34
|
+
onClick?: (ev: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
35
|
+
href?: string
|
|
36
|
+
closeOnClick?: boolean
|
|
37
|
+
isDisabled?: boolean
|
|
38
|
+
}
|
|
39
|
+
export function MenuItem({ children, href = '#', onClick, closeOnClick = true, isDisabled = false }: MenuItemProps) {
|
|
40
|
+
return (
|
|
41
|
+
<_MenuItem disabled={isDisabled}>
|
|
42
|
+
{
|
|
43
|
+
({ active, close }) => (
|
|
44
|
+
<a
|
|
45
|
+
href={href}
|
|
46
|
+
onClick={(e) => {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
onClick && onClick(e);
|
|
50
|
+
closeOnClick && close();
|
|
51
|
+
}}
|
|
52
|
+
className={clsx(
|
|
53
|
+
active ? 'bg-gray-50 dark:bg-slate-800' : '',
|
|
54
|
+
isDisabled ? 'opacity-50 cursor-not-allowed' : '',
|
|
55
|
+
'block px-3 py-1 text-sm leading-6 text-gray-900 dark:text-gray-200'
|
|
56
|
+
)}
|
|
57
|
+
>
|
|
58
|
+
{children}
|
|
59
|
+
</a>
|
|
60
|
+
)}
|
|
61
|
+
</_MenuItem>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Listbox, ListboxButton, ListboxOption, ListboxOptions, Transition } from "@headlessui/react";
|
|
2
|
+
import { Check, ChevronDown } from "lucide-react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { Fragment } from "react";
|
|
5
|
+
|
|
6
|
+
export interface IListItem {
|
|
7
|
+
id: string, name: string, description?: string
|
|
8
|
+
}
|
|
9
|
+
interface DropdownListProps {
|
|
10
|
+
value: IListItem;
|
|
11
|
+
items: IListItem[];
|
|
12
|
+
onChange: (item: IListItem) => void;
|
|
13
|
+
}
|
|
14
|
+
export function DropdownList({ items, value, onChange }: DropdownListProps) {
|
|
15
|
+
return (
|
|
16
|
+
<Listbox value={value} onChange={onChange}>
|
|
17
|
+
{({ open }) => (
|
|
18
|
+
<div className="relative">
|
|
19
|
+
<div className="inline-flex divide-x divide-indigo-700 rounded-md shadow-2xs">
|
|
20
|
+
<div className="inline-flex items-center gap-x-1.5 rounded-l-md bg-indigo-600 px-3 py-2 text-white shadow-2xs">
|
|
21
|
+
{value.name && <Check className="-ml-0.5 size-5" aria-hidden="true" />}
|
|
22
|
+
<p className="text-sm font-semibold">{value.name || ""}</p>
|
|
23
|
+
</div>
|
|
24
|
+
<ListboxButton className="inline-flex items-center rounded-l-none rounded-r-md bg-indigo-600 p-2 hover:bg-indigo-700 focus:outline-hidden focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2 focus:ring-offset-gray-50">
|
|
25
|
+
<span className="sr-only">Change selection</span>
|
|
26
|
+
<ChevronDown className="size-5 text-white" aria-hidden="true" />
|
|
27
|
+
</ListboxButton>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<Transition
|
|
31
|
+
show={open}
|
|
32
|
+
as={Fragment}
|
|
33
|
+
leave="transition ease-in duration-100"
|
|
34
|
+
leaveFrom="opacity-100"
|
|
35
|
+
leaveTo="opacity-0"
|
|
36
|
+
>
|
|
37
|
+
<ListboxOptions className="absolute right-0 z-10 mt-2 w-72 origin-top-right divide-y divide-gray-200 overflow-hidden rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-hidden">
|
|
38
|
+
{items.map((option) => (
|
|
39
|
+
<ListboxOption
|
|
40
|
+
key={option.id}
|
|
41
|
+
className={({ active }) =>
|
|
42
|
+
clsx(
|
|
43
|
+
active ? 'bg-indigo-600 text-white' : 'text-gray-900',
|
|
44
|
+
'cursor-default select-none p-4 text-sm'
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
value={option}
|
|
48
|
+
>
|
|
49
|
+
{({ selected, active }) => (
|
|
50
|
+
<div className="flex flex-col">
|
|
51
|
+
<div className="flex justify-between">
|
|
52
|
+
<p className={selected ? 'font-semibold' : 'font-normal'}>{option.name}</p>
|
|
53
|
+
{selected ? (
|
|
54
|
+
<span className={active ? 'text-white' : 'text-indigo-600'}>
|
|
55
|
+
<Check className="size-5" aria-hidden="true" />
|
|
56
|
+
</span>
|
|
57
|
+
) : null}
|
|
58
|
+
</div>
|
|
59
|
+
<p className={clsx(active ? 'text-indigo-200' : 'text-gray-500', 'mt-2')}>
|
|
60
|
+
{option.description}
|
|
61
|
+
</p>
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
</ListboxOption>
|
|
65
|
+
))}
|
|
66
|
+
</ListboxOptions>
|
|
67
|
+
</Transition>
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
</Listbox>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Plus } from "lucide-react";
|
|
2
|
+
import { Button } from "./Button.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
interface EmptyInteractionsProps {
|
|
6
|
+
buttonLabel: string;
|
|
7
|
+
title: string;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
children: React.ReactNode | React.ReactNode[];
|
|
10
|
+
}
|
|
11
|
+
export function EmptyCollection({ buttonLabel, title, children, onClick }: EmptyInteractionsProps) {
|
|
12
|
+
return (
|
|
13
|
+
<div className="text-center py-12">
|
|
14
|
+
<svg
|
|
15
|
+
className="mx-auto h-12 w-12 text-gray-400 dark:text-gray-200"
|
|
16
|
+
fill="none"
|
|
17
|
+
viewBox="0 0 24 24"
|
|
18
|
+
stroke="currentColor"
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
>
|
|
21
|
+
<path
|
|
22
|
+
vectorEffect="non-scaling-stroke"
|
|
23
|
+
strokeLinecap="round"
|
|
24
|
+
strokeLinejoin="round"
|
|
25
|
+
strokeWidth={2}
|
|
26
|
+
d="M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"
|
|
27
|
+
/>
|
|
28
|
+
</svg>
|
|
29
|
+
<h3 className="mt-2 text-sm font-semibold text-gray-500">{title}</h3>
|
|
30
|
+
<p className="mt-1 text-sm text-gray-500">{children}</p>
|
|
31
|
+
<div className="mt-6">
|
|
32
|
+
<Button onClick={onClick} size='lg'>
|
|
33
|
+
<Plus className="-ml-0.5 mr-1.5 size-5" aria-hidden="true" />
|
|
34
|
+
{buttonLabel}
|
|
35
|
+
</Button>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { DragEventHandler, MutableRefObject, ReactNode, useRef } from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TODO: TS complains that:
|
|
5
|
+
* Type 'FileList' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
|
|
6
|
+
* So as a quick fix aI use a for loop to convert FileList to File[]
|
|
7
|
+
* @param files
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
function fileListToArray(files: FileList) {
|
|
11
|
+
const ar = [];
|
|
12
|
+
for (let i = 0, l = files.length; i < l; i++) {
|
|
13
|
+
ar.push(files[i]);
|
|
14
|
+
}
|
|
15
|
+
return ar;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface FileUploadInputProps {
|
|
19
|
+
onUpload: (files: File[]) => unknown;
|
|
20
|
+
children: ReactNode | ReactNode[];
|
|
21
|
+
}
|
|
22
|
+
export function FileUploadInput({ children, onUpload }: FileUploadInputProps) {
|
|
23
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
24
|
+
const _onUpload = () => {
|
|
25
|
+
if (inputRef.current?.files) {
|
|
26
|
+
onUpload(fileListToArray(inputRef.current.files));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return (
|
|
30
|
+
<label style={{ cursor: "pointer" }}>
|
|
31
|
+
{children}
|
|
32
|
+
<input ref={inputRef} type="file" style={{ display: "none" }} onChange={_onUpload} />
|
|
33
|
+
</label>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface DropZoneProps {
|
|
38
|
+
onUpload: (files: File[]) => unknown;
|
|
39
|
+
children: ReactNode | ReactNode[];
|
|
40
|
+
height?: string;
|
|
41
|
+
border?: string;
|
|
42
|
+
borderActiveColor?: string;
|
|
43
|
+
}
|
|
44
|
+
//TODO implement using tailwind
|
|
45
|
+
export function DropZone({ onUpload }: DropZoneProps) {
|
|
46
|
+
const dropZoneProps = useDropZone<HTMLDivElement>({ onUpload });
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<div
|
|
50
|
+
{...dropZoneProps}
|
|
51
|
+
className="flex items-center justify-center w-full h-64 border-2 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"
|
|
52
|
+
>
|
|
53
|
+
<label htmlFor="dropzone-file" className="flex flex-col items-center justify-center w-full h-full">
|
|
54
|
+
<div className="flex flex-col items-center justify-center pt-5 pb-6">
|
|
55
|
+
<svg
|
|
56
|
+
className="w-8 h-8 mb-4 text-gray-500 dark:text-gray-400"
|
|
57
|
+
aria-hidden="true"
|
|
58
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
59
|
+
fill="none"
|
|
60
|
+
viewBox="0 0 20 16"
|
|
61
|
+
>
|
|
62
|
+
<path
|
|
63
|
+
stroke="currentColor"
|
|
64
|
+
stroke-linecap="round"
|
|
65
|
+
stroke-linejoin="round"
|
|
66
|
+
stroke-width="2"
|
|
67
|
+
d="M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"
|
|
68
|
+
/>
|
|
69
|
+
</svg>
|
|
70
|
+
<p className="mb-2 text-sm text-gray-500 dark:text-gray-400">
|
|
71
|
+
<span className="font-semibold">Click to upload</span> or drag and drop
|
|
72
|
+
</p>
|
|
73
|
+
<p className="text-xs text-gray-500 dark:text-gray-400">SVG, PNG, JPG or GIF (MAX. 800x400px)</p>
|
|
74
|
+
</div>
|
|
75
|
+
<input id="dropzone-file" type="file" className="hidden" />
|
|
76
|
+
</label>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function _onDragEnter(el: any) {
|
|
82
|
+
let cnt = el.__dragOver_cnt__ || 0;
|
|
83
|
+
el.__dragOver_cnt__ = cnt + 1;
|
|
84
|
+
return !cnt; // true if first drag o ver false if dragover already recorded
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function _onDragLeave(el: any) {
|
|
88
|
+
let cnt = el.__dragOver_cnt__;
|
|
89
|
+
if (!cnt) return false;
|
|
90
|
+
el.__dragOver_cnt__ = cnt - 1;
|
|
91
|
+
return cnt === 1; // true if leave false if not
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function _onDrop(el: any) {
|
|
95
|
+
delete el.__dragOver_cnt__;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface IDropZoneOpts {
|
|
99
|
+
onUpload: (files: File[]) => unknown;
|
|
100
|
+
dragOverClass?: string;
|
|
101
|
+
dropEffect?: "none" | "copy" | "link" | "move";
|
|
102
|
+
}
|
|
103
|
+
export interface IDropZoneProps<T> {
|
|
104
|
+
onDrop: DragEventHandler<T>;
|
|
105
|
+
onDragOver: DragEventHandler<T>;
|
|
106
|
+
onDragEnter: DragEventHandler<T>;
|
|
107
|
+
onDragLeave: DragEventHandler<T>;
|
|
108
|
+
ref: MutableRefObject<T | null>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function useDropZone<T extends HTMLElement = HTMLDivElement>({
|
|
112
|
+
onUpload,
|
|
113
|
+
dragOverClass = "is-drag-over-on",
|
|
114
|
+
dropEffect = "copy",
|
|
115
|
+
}: IDropZoneOpts): IDropZoneProps<T> {
|
|
116
|
+
const ref = useRef<T>(null);
|
|
117
|
+
|
|
118
|
+
const onDrop = (ev: React.DragEvent<T>) => {
|
|
119
|
+
ev.preventDefault();
|
|
120
|
+
_onDrop(ref.current);
|
|
121
|
+
ref.current?.classList.remove(dragOverClass);
|
|
122
|
+
|
|
123
|
+
const items = ev.dataTransfer.items;
|
|
124
|
+
if (items) {
|
|
125
|
+
const promises: Promise<File[]>[] = [];
|
|
126
|
+
|
|
127
|
+
const traverseFileTree = (item: any, path: string = ""): Promise<File[]> => {
|
|
128
|
+
return new Promise((resolve) => {
|
|
129
|
+
if (item.isFile) {
|
|
130
|
+
item.file((file: File) => {
|
|
131
|
+
Object.defineProperty(file, "webkitRelativePath", { value: path + file.name });
|
|
132
|
+
resolve([file]);
|
|
133
|
+
});
|
|
134
|
+
} else if (item.isDirectory) {
|
|
135
|
+
const dirReader = item.createReader();
|
|
136
|
+
const entries: Promise<File[]>[] = [];
|
|
137
|
+
|
|
138
|
+
const readEntries = () => {
|
|
139
|
+
dirReader.readEntries((results: any[]) => {
|
|
140
|
+
if (!results.length) {
|
|
141
|
+
Promise.all(entries).then((filesArrays) => resolve(filesArrays.flat()));
|
|
142
|
+
} else {
|
|
143
|
+
for (const entry of results) {
|
|
144
|
+
entries.push(traverseFileTree(entry, path + item.name + "/"));
|
|
145
|
+
}
|
|
146
|
+
readEntries();
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
readEntries();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
for (let i = 0; i < items.length; i++) {
|
|
157
|
+
const entry = items[i].webkitGetAsEntry();
|
|
158
|
+
if (entry) {
|
|
159
|
+
promises.push(traverseFileTree(entry));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
Promise.all(promises).then((filesArrays) => {
|
|
164
|
+
const allFiles = filesArrays.flat();
|
|
165
|
+
if (allFiles.length) {
|
|
166
|
+
onUpload(allFiles);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const onDragOver = (ev: React.DragEvent<T>) => {
|
|
173
|
+
ev.preventDefault();
|
|
174
|
+
ev.dataTransfer.dropEffect = dropEffect;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const onDragEnter = () => {
|
|
178
|
+
if (_onDragEnter(ref.current)) {
|
|
179
|
+
ref.current?.classList.add(dragOverClass);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const onDragLeave = () => {
|
|
184
|
+
if (_onDragLeave(ref.current)) {
|
|
185
|
+
ref.current?.classList.remove(dragOverClass);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
onDrop,
|
|
191
|
+
onDragOver,
|
|
192
|
+
onDragEnter,
|
|
193
|
+
onDragLeave,
|
|
194
|
+
ref,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import React, { ChangeEvent } from 'react';
|
|
3
|
+
|
|
4
|
+
import { X } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
import { Styles } from './styles.js';
|
|
7
|
+
|
|
8
|
+
interface InputProps extends Omit<React.HTMLProps<HTMLInputElement>, 'ref' | 'onChange' | 'value'> {
|
|
9
|
+
value?: string;
|
|
10
|
+
onChange?: (value: string) => void
|
|
11
|
+
unstyled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
const Input = React.forwardRef<HTMLInputElement, InputProps>(({ unstyled, value, onChange, className, type, ...others }: InputProps, ref) => {
|
|
14
|
+
const _onChange = (ev: ChangeEvent<HTMLInputElement>) => {
|
|
15
|
+
onChange && onChange(ev.target.value);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const _onClear = () => {
|
|
19
|
+
onChange && onChange('');
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div style={{ position: 'relative', display: 'inline-block' }} className={clsx("w-full", className)}>
|
|
24
|
+
<input
|
|
25
|
+
type={type || 'text'}
|
|
26
|
+
value={value == null ? '' : value}
|
|
27
|
+
onChange={_onChange}
|
|
28
|
+
className={clsx('w-full', unstyled ? Styles.INPUT_UNSTYLED : Styles.INPUT, className)}
|
|
29
|
+
ref={ref}
|
|
30
|
+
{...others}
|
|
31
|
+
/>
|
|
32
|
+
{
|
|
33
|
+
value && (
|
|
34
|
+
<button onClick={_onClear} className={`absolute ${type !== 'number' ? 'right-2' : 'right-7'} top-1/2 -translate-y-1/2 size-7 text-gray-400 hover:text-red-500 cursor-pointer`}>
|
|
35
|
+
<X />
|
|
36
|
+
</button>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
export { Input };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
|
|
4
|
+
import { Badge } from './Badge';
|
|
5
|
+
import { VInput } from './shadcn/input';
|
|
6
|
+
|
|
7
|
+
interface InputListProps {
|
|
8
|
+
value?: string[];
|
|
9
|
+
onChange: (value: string[]) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
allowSpaces?: boolean;
|
|
12
|
+
delimiters?: string; // space and , by default
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
}
|
|
15
|
+
export function InputList({ value = [], onChange, className, delimiters = ", ", placeholder }: InputListProps) {
|
|
16
|
+
const [text, setText] = useState<string>('');
|
|
17
|
+
|
|
18
|
+
const onBlur = (ev: any) => {
|
|
19
|
+
const v = ev.target.value;
|
|
20
|
+
if (v && v.trim()) {
|
|
21
|
+
onChange([...value, v.trim()])
|
|
22
|
+
setText('')
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const onKeyDown = (ev: any) => {
|
|
26
|
+
const v = ev.target.value;
|
|
27
|
+
const isEmpty = !v.trim();
|
|
28
|
+
const key = ev.key;
|
|
29
|
+
if (key === 'Enter' || delimiters.indexOf(key) > -1) {
|
|
30
|
+
ev.preventDefault();
|
|
31
|
+
if (value && !isEmpty) {
|
|
32
|
+
onChange([...value, v.trim()])
|
|
33
|
+
setText('')
|
|
34
|
+
}
|
|
35
|
+
} else if (key === 'Backspace' && isEmpty) {
|
|
36
|
+
if (value && value.length > 0) {
|
|
37
|
+
value.pop();
|
|
38
|
+
onChange([...value])
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const _onClick = (index: any): void => {
|
|
44
|
+
if (value && value.length > 0) {
|
|
45
|
+
value.splice(index, 1);
|
|
46
|
+
onChange([...value]);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div className={clsx(className, 'w-full space-x-1 space-y-1 flex flex-wrap w-full rounded-md py-2 px-1 text-sm border border-input bg-background dark:bg-slate-800 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2')}>
|
|
52
|
+
{
|
|
53
|
+
value && value.length > 0 &&
|
|
54
|
+
(value.map((v, index) =>
|
|
55
|
+
<Badge variant={"secondary"} key={index} onClick={() => _onClick(index)} style={{ whiteSpace: 'nowrap' }} className='cursor-pointer'>
|
|
56
|
+
{v}
|
|
57
|
+
</Badge>
|
|
58
|
+
))
|
|
59
|
+
}
|
|
60
|
+
<div>
|
|
61
|
+
<VInput
|
|
62
|
+
clearable={false}
|
|
63
|
+
className='placeholder:text-muted-foreground px-1'
|
|
64
|
+
variant='unstyled'
|
|
65
|
+
type='text'
|
|
66
|
+
value={text}
|
|
67
|
+
onBlur={onBlur}
|
|
68
|
+
onKeyDown={onKeyDown}
|
|
69
|
+
onChange={setText}
|
|
70
|
+
placeholder={!value || value.length === 0 ? placeholder : ''}
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
|
|
4
|
+
interface LinkProps extends React.HTMLProps<HTMLAnchorElement> {
|
|
5
|
+
underline?: 'always' | 'hover' | 'none'
|
|
6
|
+
}
|
|
7
|
+
export function Link({ underline = 'always', className, children, ...others }: LinkProps) {
|
|
8
|
+
|
|
9
|
+
let underlineClass: string | undefined;
|
|
10
|
+
if (underline === 'always') {
|
|
11
|
+
underlineClass = 'underline';
|
|
12
|
+
} else if (underline === 'hover') {
|
|
13
|
+
underlineClass = 'hover:underline';
|
|
14
|
+
}
|
|
15
|
+
return <a className={clsx("text-indigo-800 dark:text-indigo-300", className, underlineClass)} {...others}>{children}</a>
|
|
16
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { AnchorHTMLAttributes, forwardRef } from "react";
|
|
3
|
+
|
|
4
|
+
interface MenuListProps {
|
|
5
|
+
children: React.ReactNode | React.ReactNode[]
|
|
6
|
+
className?: string
|
|
7
|
+
}
|
|
8
|
+
export function MenuList({ className, children }: MenuListProps) {
|
|
9
|
+
return (
|
|
10
|
+
<ul className={`${className} space-y-1 flex flex-col items-start dark:px-2`}>
|
|
11
|
+
{children}
|
|
12
|
+
</ul>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
interface MenuListItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
18
|
+
current?: boolean
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const MenuListItem = forwardRef<HTMLAnchorElement, MenuListItemProps>(function _MenuListItem(props, ref) {
|
|
22
|
+
const { current, children, className, href = '#', onClick, ...others } = props;
|
|
23
|
+
return (
|
|
24
|
+
<li className={clsx(className, current ?
|
|
25
|
+
'bg-gray-50 text-indigo-600'
|
|
26
|
+
:
|
|
27
|
+
'text-gray-700 dark:dark:text-slate-300 hover:text-indigo-600 hover:bg-gray-50 dark:hover:bg-slate-800 dark:hover:text-slate-50 dark:border dark:border-transparent dark:hover:border-slate-50',
|
|
28
|
+
'w-full rounded-md p-2 pl-3 text-sm leading-6 font-semibold')}>
|
|
29
|
+
<a ref={ref} href={href} onClick={(e) => {
|
|
30
|
+
if (onClick) {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
onClick(e);
|
|
33
|
+
} else if (href === '#') {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
}
|
|
36
|
+
}}
|
|
37
|
+
className='w-full flex items-center gap-x-3'
|
|
38
|
+
{...others}
|
|
39
|
+
>{children}</a>
|
|
40
|
+
</li>
|
|
41
|
+
)
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
MenuList.Item = MenuListItem;
|