@xh/hoist 57.0.0 → 57.0.2
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/CHANGELOG.md +22 -3
- package/build/types/admin/AppComponent.d.ts +4 -0
- package/build/types/admin/AppModel.d.ts +13 -0
- package/build/types/admin/columns/Core.d.ts +6 -0
- package/build/types/admin/columns/Rest.d.ts +5 -0
- package/build/types/admin/columns/Tracking.d.ts +18 -0
- package/build/types/admin/columns/User.d.ts +9 -0
- package/build/types/admin/columns/UserData.d.ts +7 -0
- package/build/types/admin/columns/index.d.ts +5 -0
- package/build/types/admin/differ/Differ.d.ts +2 -0
- package/build/types/admin/differ/DifferDetail.d.ts +3 -0
- package/build/types/admin/differ/DifferDetailModel.d.ts +17 -0
- package/build/types/admin/differ/DifferModel.d.ts +43 -0
- package/build/types/admin/regroup/RegroupDialog.d.ts +2 -0
- package/build/types/admin/regroup/RegroupDialogModel.d.ts +20 -0
- package/build/types/admin/tabs/activity/ActivityTab.d.ts +2 -0
- package/build/types/admin/tabs/activity/aggregators/RangeAggregator.d.ts +8 -0
- package/build/types/admin/tabs/activity/clienterrors/ClientErrorDetail.d.ts +2 -0
- package/build/types/admin/tabs/activity/clienterrors/ClientErrorsModel.d.ts +30 -0
- package/build/types/admin/tabs/activity/clienterrors/ClientErrorsPanel.d.ts +2 -0
- package/build/types/admin/tabs/activity/feedback/FeedbackPanel.d.ts +1 -0
- package/build/types/admin/tabs/activity/tracking/ActivityTrackingModel.d.ts +50 -0
- package/build/types/admin/tabs/activity/tracking/ActivityTrackingPanel.d.ts +2 -0
- package/build/types/admin/tabs/activity/tracking/charts/ChartsModel.d.ts +32 -0
- package/build/types/admin/tabs/activity/tracking/charts/ChartsPanel.d.ts +2 -0
- package/build/types/admin/tabs/activity/tracking/detail/ActivityDetailModel.d.ts +15 -0
- package/build/types/admin/tabs/activity/tracking/detail/ActivityDetailView.d.ts +2 -0
- package/build/types/admin/tabs/general/GeneralTab.d.ts +1 -0
- package/build/types/admin/tabs/general/about/AboutPanel.d.ts +2 -0
- package/build/types/admin/tabs/general/alertBanner/AlertBannerModel.d.ts +24 -0
- package/build/types/admin/tabs/general/alertBanner/AlertBannerPanel.d.ts +3 -0
- package/build/types/admin/tabs/general/config/ConfigPanel.d.ts +2 -0
- package/build/types/admin/tabs/general/config/ConfigPanelModel.d.ts +19 -0
- package/build/types/admin/tabs/general/users/UserModel.d.ts +12 -0
- package/build/types/admin/tabs/general/users/UserPanel.d.ts +2 -0
- package/build/types/admin/tabs/monitor/MonitorColumns.d.ts +15 -0
- package/build/types/admin/tabs/monitor/MonitorEditorPanel.d.ts +1 -0
- package/build/types/admin/tabs/monitor/MonitorResultsModel.d.ts +17 -0
- package/build/types/admin/tabs/monitor/MonitorResultsPanel.d.ts +3 -0
- package/build/types/admin/tabs/monitor/MonitorResultsToolbar.d.ts +2 -0
- package/build/types/admin/tabs/monitor/MonitorTab.d.ts +1 -0
- package/build/types/admin/tabs/monitor/Tile.d.ts +2 -0
- package/build/types/admin/tabs/server/ServerTab.d.ts +1 -0
- package/build/types/admin/tabs/server/ehcache/EhCacheModel.d.ts +10 -0
- package/build/types/admin/tabs/server/ehcache/EhCachePanel.d.ts +2 -0
- package/build/types/admin/tabs/server/environment/ServerEnvModel.d.ts +11 -0
- package/build/types/admin/tabs/server/environment/ServerEnvPanel.d.ts +2 -0
- package/build/types/admin/tabs/server/logLevel/LogLevelColumns.d.ts +5 -0
- package/build/types/admin/tabs/server/logLevel/LogLevelPanel.d.ts +1 -0
- package/build/types/admin/tabs/server/logViewer/LogDisplay.d.ts +6 -0
- package/build/types/admin/tabs/server/logViewer/LogDisplayModel.d.ts +29 -0
- package/build/types/admin/tabs/server/logViewer/LogViewer.d.ts +3 -0
- package/build/types/admin/tabs/server/logViewer/LogViewerModel.d.ts +23 -0
- package/build/types/admin/tabs/server/memory/MemoryMonitorModel.d.ts +15 -0
- package/build/types/admin/tabs/server/memory/MemoryMonitorPanel.d.ts +2 -0
- package/build/types/admin/tabs/server/services/ServiceModel.d.ts +8 -0
- package/build/types/admin/tabs/server/services/ServicePanel.d.ts +2 -0
- package/build/types/admin/tabs/server/websocket/WebSocketColumns.d.ts +8 -0
- package/build/types/admin/tabs/server/websocket/WebSocketModel.d.ts +12 -0
- package/build/types/admin/tabs/server/websocket/WebSocketPanel.d.ts +2 -0
- package/build/types/admin/tabs/userData/JsonBlobColumns.d.ts +9 -0
- package/build/types/admin/tabs/userData/JsonBlobModel.d.ts +15 -0
- package/build/types/admin/tabs/userData/JsonBlobPanel.d.ts +2 -0
- package/build/types/admin/tabs/userData/PreferenceModel.d.ts +16 -0
- package/build/types/admin/tabs/userData/PreferencePanel.d.ts +2 -0
- package/build/types/admin/tabs/userData/UserDataTab.d.ts +1 -0
- package/build/types/admin/tabs/userData/UserPreferencePanel.d.ts +1 -0
- package/build/types/appcontainer/AboutDialogModel.d.ts +15 -0
- package/build/types/appcontainer/AppContainerModel.d.ts +43 -0
- package/build/types/appcontainer/AppOption.d.ts +23 -0
- package/build/types/appcontainer/BannerModel.d.ts +26 -0
- package/build/types/appcontainer/BannerSourceModel.d.ts +15 -0
- package/build/types/appcontainer/ChangelogDialogModel.d.ts +9 -0
- package/build/types/appcontainer/ErrorBoundary.d.ts +16 -0
- package/build/types/appcontainer/ExceptionDialogModel.d.ts +28 -0
- package/build/types/appcontainer/FeedbackDialogModel.d.ts +24 -0
- package/build/types/appcontainer/ImpersonationBarModel.d.ts +20 -0
- package/build/types/appcontainer/MessageModel.d.ts +35 -0
- package/build/types/appcontainer/MessageSourceModel.d.ts +18 -0
- package/build/types/appcontainer/OptionsDialogModel.d.ts +23 -0
- package/build/types/appcontainer/SizingModeModel.d.ts +13 -0
- package/build/types/appcontainer/ThemeModel.d.ts +13 -0
- package/build/types/appcontainer/ToastModel.d.ts +27 -0
- package/build/types/appcontainer/ToastSourceModel.d.ts +13 -0
- package/build/types/appcontainer/ViewportSizeModel.d.ts +19 -0
- package/build/types/appcontainer/login/LoginPanelModel.d.ts +15 -0
- package/build/types/cmp/ag-grid/AgGrid.d.ts +31 -0
- package/build/types/cmp/ag-grid/AgGridModel.d.ts +183 -0
- package/build/types/cmp/ag-grid/index.d.ts +2 -0
- package/build/types/cmp/badge/Badge.d.ts +13 -0
- package/build/types/cmp/badge/index.d.ts +1 -0
- package/build/types/cmp/chart/Chart.d.ts +18 -0
- package/build/types/cmp/chart/ChartModel.d.ts +48 -0
- package/build/types/cmp/chart/impl/copyToClipboard.d.ts +6 -0
- package/build/types/cmp/chart/impl/zoomout.d.ts +5 -0
- package/build/types/cmp/chart/index.d.ts +2 -0
- package/build/types/cmp/chart/theme/Dark.d.ts +216 -0
- package/build/types/cmp/chart/theme/Light.d.ts +193 -0
- package/build/types/cmp/clock/Clock.d.ts +26 -0
- package/build/types/cmp/clock/index.d.ts +1 -0
- package/build/types/cmp/dataview/DataView.d.ts +22 -0
- package/build/types/cmp/dataview/DataViewModel.d.ts +103 -0
- package/build/types/cmp/dataview/index.d.ts +2 -0
- package/build/types/cmp/filter/FilterChooserFieldSpec.d.ts +39 -0
- package/build/types/cmp/filter/FilterChooserModel.d.ts +130 -0
- package/build/types/cmp/filter/impl/Option.d.ts +47 -0
- package/build/types/cmp/filter/impl/QueryEngine.d.ts +29 -0
- package/build/types/cmp/filter/index.d.ts +1 -0
- package/build/types/cmp/form/BaseFormFieldProps.d.ts +33 -0
- package/build/types/cmp/form/Form.d.ts +35 -0
- package/build/types/cmp/form/FormModel.d.ts +130 -0
- package/build/types/cmp/form/field/BaseFieldModel.d.ts +156 -0
- package/build/types/cmp/form/field/FieldModel.d.ts +11 -0
- package/build/types/cmp/form/field/SubformsFieldModel.d.ts +65 -0
- package/build/types/cmp/form/index.d.ts +6 -0
- package/build/types/cmp/grid/Grid.d.ts +39 -0
- package/build/types/cmp/grid/GridAutosizeOptions.d.ts +44 -0
- package/build/types/cmp/grid/GridContextMenu.d.ts +28 -0
- package/build/types/cmp/grid/GridModel.d.ts +556 -0
- package/build/types/cmp/grid/GridSorter.d.ts +23 -0
- package/build/types/cmp/grid/Types.d.ts +274 -0
- package/build/types/cmp/grid/columns/Column.d.ts +362 -0
- package/build/types/cmp/grid/columns/ColumnGroup.d.ts +56 -0
- package/build/types/cmp/grid/columns/Core.d.ts +9 -0
- package/build/types/cmp/grid/columns/DatesTimes.d.ts +12 -0
- package/build/types/cmp/grid/columns/index.d.ts +4 -0
- package/build/types/cmp/grid/enums/ExcelFormat.d.ts +33 -0
- package/build/types/cmp/grid/enums/GridAutosizeMode.d.ts +24 -0
- package/build/types/cmp/grid/enums/TreeStyle.d.ts +15 -0
- package/build/types/cmp/grid/filter/GridFilterFieldSpec.d.ts +38 -0
- package/build/types/cmp/grid/filter/GridFilterModel.d.ts +44 -0
- package/build/types/cmp/grid/helpers/GridCountLabel.d.ts +25 -0
- package/build/types/cmp/grid/impl/ColumnGroupHeader.d.ts +24 -0
- package/build/types/cmp/grid/impl/ColumnHeader.d.ts +55 -0
- package/build/types/cmp/grid/impl/ColumnWidthCalculator.d.ts +41 -0
- package/build/types/cmp/grid/impl/GridPersistenceModel.d.ts +34 -0
- package/build/types/cmp/grid/impl/MenuSupport.d.ts +7 -0
- package/build/types/cmp/grid/impl/RowKeyNavSupport.d.ts +11 -0
- package/build/types/cmp/grid/impl/Utils.d.ts +5 -0
- package/build/types/cmp/grid/index.d.ts +15 -0
- package/build/types/cmp/grid/renderers/MultiFieldRenderer.d.ts +27 -0
- package/build/types/cmp/grid/renderers/TagsRenderer.d.ts +3 -0
- package/build/types/cmp/grouping/GroupingChooserModel.d.ts +89 -0
- package/build/types/cmp/grouping/index.d.ts +1 -0
- package/build/types/cmp/input/HoistInputModel.d.ts +148 -0
- package/build/types/cmp/input/HoistInputProps.d.ts +19 -0
- package/build/types/cmp/input/index.d.ts +2 -0
- package/build/types/cmp/layout/Box.d.ts +17 -0
- package/build/types/cmp/layout/Frame.d.ts +15 -0
- package/build/types/cmp/layout/Placeholder.d.ts +12 -0
- package/build/types/cmp/layout/Spacer.d.ts +15 -0
- package/build/types/cmp/layout/Tags.d.ts +32 -0
- package/build/types/cmp/layout/TileFrame.d.ts +38 -0
- package/build/types/cmp/layout/Viewport.d.ts +9 -0
- package/build/types/cmp/layout/index.d.ts +7 -0
- package/build/types/cmp/pinpad/PinPad.d.ts +10 -0
- package/build/types/cmp/pinpad/PinPadModel.d.ts +35 -0
- package/build/types/cmp/pinpad/index.d.ts +2 -0
- package/build/types/cmp/relativetimestamp/RelativeTimestamp.d.ts +46 -0
- package/build/types/cmp/relativetimestamp/index.d.ts +1 -0
- package/build/types/cmp/spinner/Spinner.d.ts +16 -0
- package/build/types/cmp/spinner/index.d.ts +1 -0
- package/build/types/cmp/store/StoreCountLabel.d.ts +18 -0
- package/build/types/cmp/store/StoreFilterField.d.ts +82 -0
- package/build/types/cmp/store/impl/StoreFilterFieldImplModel.d.ts +23 -0
- package/build/types/cmp/store/index.d.ts +2 -0
- package/build/types/cmp/tab/TabContainer.d.ts +20 -0
- package/build/types/cmp/tab/TabContainerModel.d.ts +114 -0
- package/build/types/cmp/tab/TabModel.d.ts +71 -0
- package/build/types/cmp/tab/TabSwitcherProps.d.ts +16 -0
- package/build/types/cmp/tab/index.d.ts +4 -0
- package/build/types/cmp/websocket/WebSocketIndicator.d.ts +10 -0
- package/build/types/cmp/websocket/index.d.ts +1 -0
- package/build/types/core/AppSpec.d.ts +106 -0
- package/build/types/core/AppState.d.ts +13 -0
- package/build/types/core/HoistAppModel.d.ts +81 -0
- package/build/types/core/HoistBase.d.ts +160 -0
- package/build/types/core/HoistBaseDecorators.d.ts +20 -0
- package/build/types/core/HoistComponent.d.ts +109 -0
- package/build/types/core/HoistProps.d.ts +91 -0
- package/build/types/core/HoistService.d.ts +56 -0
- package/build/types/core/RefreshContextView.d.ts +11 -0
- package/build/types/core/RouterModel.d.ts +41 -0
- package/build/types/core/TaskObserver.d.ts +75 -0
- package/build/types/core/XH.d.ts +358 -0
- package/build/types/core/elem.d.ts +55 -0
- package/build/types/core/enums/RefreshMode.d.ts +16 -0
- package/build/types/core/enums/RenderMode.d.ts +13 -0
- package/build/types/core/enums/SizingMode.d.ts +10 -0
- package/build/types/core/exception/Exception.d.ts +63 -0
- package/build/types/core/exception/ExceptionHandler.d.ts +121 -0
- package/build/types/core/exception/Types.d.ts +50 -0
- package/build/types/core/impl/InstallServices.d.ts +18 -0
- package/build/types/core/impl/InstanceManager.d.ts +19 -0
- package/build/types/core/impl/PlatformManager.d.ts +13 -0
- package/build/types/core/index.d.ts +24 -0
- package/build/types/core/load/LoadSpec.d.ts +50 -0
- package/build/types/core/load/LoadSupport.d.ts +36 -0
- package/build/types/core/load/Loadable.d.ts +48 -0
- package/build/types/core/load/index.d.ts +3 -0
- package/build/types/core/model/CreatesSpec.d.ts +29 -0
- package/build/types/core/model/HoistModel.d.ts +121 -0
- package/build/types/core/model/Hooks.d.ts +28 -0
- package/build/types/core/model/ManagedRefreshContextModel.d.ts +23 -0
- package/build/types/core/model/ModelLookup.d.ts +27 -0
- package/build/types/core/model/ModelSelector.d.ts +28 -0
- package/build/types/core/model/ModelSpec.d.ts +30 -0
- package/build/types/core/model/RefreshContextModel.d.ts +45 -0
- package/build/types/core/model/RootRefreshContextModel.d.ts +14 -0
- package/build/types/core/model/UsesSpec.d.ts +49 -0
- package/build/types/core/model/index.d.ts +10 -0
- package/build/types/core/persist/CustomProvider.d.ts +16 -0
- package/build/types/core/persist/DashViewProvider.d.ts +11 -0
- package/build/types/core/persist/LocalStorageProvider.d.ts +11 -0
- package/build/types/core/persist/PersistOptions.d.ts +31 -0
- package/build/types/core/persist/PersistenceProvider.d.ts +49 -0
- package/build/types/core/persist/PrefProvider.d.ts +11 -0
- package/build/types/core/persist/index.d.ts +6 -0
- package/build/types/core/types/Interfaces.d.ts +232 -0
- package/build/types/core/types/Types.d.ts +41 -0
- package/build/types/data/Field.d.ts +72 -0
- package/build/types/data/RecordAction.d.ts +114 -0
- package/build/types/data/Store.d.ts +386 -0
- package/build/types/data/StoreRecord.d.ts +167 -0
- package/build/types/data/StoreSelectionModel.d.ts +52 -0
- package/build/types/data/UrlStore.d.ts +26 -0
- package/build/types/data/cube/BucketSpec.d.ts +13 -0
- package/build/types/data/cube/Cube.d.ts +159 -0
- package/build/types/data/cube/CubeField.d.ts +52 -0
- package/build/types/data/cube/Query.d.ts +63 -0
- package/build/types/data/cube/View.d.ts +97 -0
- package/build/types/data/cube/aggregate/AggregationContext.d.ts +21 -0
- package/build/types/data/cube/aggregate/Aggregator.d.ts +40 -0
- package/build/types/data/cube/aggregate/AverageAggregator.d.ts +4 -0
- package/build/types/data/cube/aggregate/AverageStrictAggregator.d.ts +5 -0
- package/build/types/data/cube/aggregate/ChildCountAggregator.d.ts +5 -0
- package/build/types/data/cube/aggregate/LeafCountAggregator.d.ts +5 -0
- package/build/types/data/cube/aggregate/MaxAggregator.d.ts +5 -0
- package/build/types/data/cube/aggregate/MinAggregator.d.ts +5 -0
- package/build/types/data/cube/aggregate/NullAggregator.d.ts +4 -0
- package/build/types/data/cube/aggregate/SingleAggregator.d.ts +4 -0
- package/build/types/data/cube/aggregate/SumAggregator.d.ts +5 -0
- package/build/types/data/cube/aggregate/SumStrictAggregator.d.ts +5 -0
- package/build/types/data/cube/aggregate/UniqueAggregator.d.ts +5 -0
- package/build/types/data/cube/row/AggregateRow.d.ts +13 -0
- package/build/types/data/cube/row/BaseRow.d.ts +27 -0
- package/build/types/data/cube/row/BucketRow.d.ts +12 -0
- package/build/types/data/cube/row/LeafRow.d.ts +12 -0
- package/build/types/data/cube/row/RowUpdate.d.ts +10 -0
- package/build/types/data/filter/BaseFilterFieldSpec.d.ts +73 -0
- package/build/types/data/filter/CompoundFilter.d.ts +23 -0
- package/build/types/data/filter/FieldFilter.d.ts +32 -0
- package/build/types/data/filter/Filter.d.ts +25 -0
- package/build/types/data/filter/FunctionFilter.d.ts +20 -0
- package/build/types/data/filter/Types.d.ts +31 -0
- package/build/types/data/filter/Utils.d.ts +49 -0
- package/build/types/data/impl/RecordSet.d.ts +44 -0
- package/build/types/data/impl/RecordValidator.d.ts +39 -0
- package/build/types/data/impl/StoreValidator.d.ts +47 -0
- package/build/types/data/index.d.ts +31 -0
- package/build/types/data/validation/Rule.d.ts +51 -0
- package/build/types/data/validation/ValidationState.d.ts +6 -0
- package/build/types/data/validation/constraints.d.ts +64 -0
- package/build/types/deprecated/index.d.ts +0 -0
- package/build/types/desktop/appcontainer/AboutDialog.d.ts +11 -0
- package/build/types/desktop/appcontainer/AppContainer.d.ts +13 -0
- package/build/types/desktop/appcontainer/Banner.d.ts +8 -0
- package/build/types/desktop/appcontainer/ChangelogDialog.d.ts +3 -0
- package/build/types/desktop/appcontainer/ExceptionDialog.d.ts +13 -0
- package/build/types/desktop/appcontainer/ExceptionDialogDetails.d.ts +8 -0
- package/build/types/desktop/appcontainer/FeedbackDialog.d.ts +6 -0
- package/build/types/desktop/appcontainer/IdlePanel.d.ts +8 -0
- package/build/types/desktop/appcontainer/ImpersonationBar.d.ts +9 -0
- package/build/types/desktop/appcontainer/LockoutPanel.d.ts +8 -0
- package/build/types/desktop/appcontainer/LoginPanel.d.ts +9 -0
- package/build/types/desktop/appcontainer/Message.d.ts +8 -0
- package/build/types/desktop/appcontainer/MessageSource.d.ts +6 -0
- package/build/types/desktop/appcontainer/OptionsDialog.d.ts +9 -0
- package/build/types/desktop/appcontainer/SuspendPanel.d.ts +6 -0
- package/build/types/desktop/appcontainer/ToastSource.d.ts +8 -0
- package/build/types/desktop/appcontainer/VersionBar.d.ts +3 -0
- package/build/types/desktop/appcontainer/index.d.ts +1 -0
- package/build/types/desktop/cmp/appOption/AutoRefreshAppOption.d.ts +340 -0
- package/build/types/desktop/cmp/appOption/SizingModeAppOption.d.ts +17 -0
- package/build/types/desktop/cmp/appOption/ThemeAppOption.d.ts +340 -0
- package/build/types/desktop/cmp/appOption/index.d.ts +3 -0
- package/build/types/desktop/cmp/appbar/AppBar.d.ts +34 -0
- package/build/types/desktop/cmp/appbar/AppBarSeparator.d.ts +6 -0
- package/build/types/desktop/cmp/appbar/index.d.ts +2 -0
- package/build/types/desktop/cmp/button/AppMenuButton.d.ts +36 -0
- package/build/types/desktop/cmp/button/Button.d.ts +28 -0
- package/build/types/desktop/cmp/button/ButtonGroup.d.ts +17 -0
- package/build/types/desktop/cmp/button/ColAutosizeButton.d.ts +14 -0
- package/build/types/desktop/cmp/button/ColChooserButton.d.ts +19 -0
- package/build/types/desktop/cmp/button/DashCanvasAddViewButton.d.ts +11 -0
- package/build/types/desktop/cmp/button/ExportButton.d.ts +22 -0
- package/build/types/desktop/cmp/button/FeedbackButton.d.ts +9 -0
- package/build/types/desktop/cmp/button/LaunchAdminButton.d.ts +9 -0
- package/build/types/desktop/cmp/button/LogoutButton.d.ts +11 -0
- package/build/types/desktop/cmp/button/ModalToggleButton.d.ts +11 -0
- package/build/types/desktop/cmp/button/OptionsButton.d.ts +10 -0
- package/build/types/desktop/cmp/button/RefreshButton.d.ts +13 -0
- package/build/types/desktop/cmp/button/RestoreDefaultsButton.d.ts +16 -0
- package/build/types/desktop/cmp/button/ThemeToggleButton.d.ts +8 -0
- package/build/types/desktop/cmp/button/WhatsNewButton.d.ts +11 -0
- package/build/types/desktop/cmp/button/index.d.ts +15 -0
- package/build/types/desktop/cmp/clipboard/ClipboardButton.d.ts +13 -0
- package/build/types/desktop/cmp/clipboard/ClipboardMenuItem.d.ts +7 -0
- package/build/types/desktop/cmp/clipboard/index.d.ts +2 -0
- package/build/types/desktop/cmp/contextmenu/ContextMenu.d.ts +21 -0
- package/build/types/desktop/cmp/contextmenu/index.d.ts +1 -0
- package/build/types/desktop/cmp/dash/DashConfig.d.ts +33 -0
- package/build/types/desktop/cmp/dash/DashModel.d.ts +19 -0
- package/build/types/desktop/cmp/dash/DashViewModel.d.ts +52 -0
- package/build/types/desktop/cmp/dash/DashViewSpec.d.ts +41 -0
- package/build/types/desktop/cmp/dash/canvas/DashCanvas.d.ts +19 -0
- package/build/types/desktop/cmp/dash/canvas/DashCanvasModel.d.ts +104 -0
- package/build/types/desktop/cmp/dash/canvas/DashCanvasViewModel.d.ts +27 -0
- package/build/types/desktop/cmp/dash/canvas/DashCanvasViewSpec.d.ts +30 -0
- package/build/types/desktop/cmp/dash/canvas/impl/DashCanvasContextMenu.d.ts +8 -0
- package/build/types/desktop/cmp/dash/canvas/impl/DashCanvasView.d.ts +12 -0
- package/build/types/desktop/cmp/dash/canvas/impl/utils.d.ts +10 -0
- package/build/types/desktop/cmp/dash/container/DashContainer.d.ts +9 -0
- package/build/types/desktop/cmp/dash/container/DashContainerModel.d.ts +143 -0
- package/build/types/desktop/cmp/dash/container/DashContainerViewSpec.d.ts +17 -0
- package/build/types/desktop/cmp/dash/container/impl/DashContainerContextMenu.d.ts +15 -0
- package/build/types/desktop/cmp/dash/container/impl/DashContainerMenuButton.d.ts +7 -0
- package/build/types/desktop/cmp/dash/container/impl/DashContainerUtils.d.ts +14 -0
- package/build/types/desktop/cmp/dash/container/impl/DashContainerView.d.ts +12 -0
- package/build/types/desktop/cmp/dash/index.d.ts +11 -0
- package/build/types/desktop/cmp/dock/DockContainer.d.ts +26 -0
- package/build/types/desktop/cmp/dock/DockContainerModel.d.ts +33 -0
- package/build/types/desktop/cmp/dock/DockViewModel.d.ts +75 -0
- package/build/types/desktop/cmp/dock/impl/DockContainer.d.ts +10 -0
- package/build/types/desktop/cmp/dock/impl/DockView.d.ts +15 -0
- package/build/types/desktop/cmp/dock/index.d.ts +3 -0
- package/build/types/desktop/cmp/error/ErrorMessage.d.ts +33 -0
- package/build/types/desktop/cmp/error/index.d.ts +1 -0
- package/build/types/desktop/cmp/filechooser/FileChooser.d.ts +42 -0
- package/build/types/desktop/cmp/filechooser/FileChooserModel.d.ts +25 -0
- package/build/types/desktop/cmp/filechooser/index.d.ts +2 -0
- package/build/types/desktop/cmp/filter/FilterChooser.d.ts +28 -0
- package/build/types/desktop/cmp/filter/index.d.ts +2 -0
- package/build/types/desktop/cmp/form/FormField.d.ts +63 -0
- package/build/types/desktop/cmp/form/index.d.ts +1 -0
- package/build/types/desktop/cmp/grid/columns/Actions.d.ts +29 -0
- package/build/types/desktop/cmp/grid/editors/BooleanEditor.d.ts +16 -0
- package/build/types/desktop/cmp/grid/editors/DateEditor.d.ts +7 -0
- package/build/types/desktop/cmp/grid/editors/EditorProps.d.ts +17 -0
- package/build/types/desktop/cmp/grid/editors/NumberEditor.d.ts +7 -0
- package/build/types/desktop/cmp/grid/editors/SelectEditor.d.ts +7 -0
- package/build/types/desktop/cmp/grid/editors/TextAreaEditor.d.ts +7 -0
- package/build/types/desktop/cmp/grid/editors/TextEditor.d.ts +7 -0
- package/build/types/desktop/cmp/grid/editors/impl/InlineEditorModel.d.ts +15 -0
- package/build/types/desktop/cmp/grid/editors/index.d.ts +6 -0
- package/build/types/desktop/cmp/grid/find/GridFindField.d.ts +43 -0
- package/build/types/desktop/cmp/grid/find/impl/GridFindFieldImplModel.d.ts +37 -0
- package/build/types/desktop/cmp/grid/impl/colchooser/ColChooser.d.ts +18 -0
- package/build/types/desktop/cmp/grid/impl/colchooser/ColChooserDialog.d.ts +2 -0
- package/build/types/desktop/cmp/grid/impl/colchooser/ColChooserModel.d.ts +33 -0
- package/build/types/desktop/cmp/grid/impl/filter/ColumnHeaderFilter.d.ts +9 -0
- package/build/types/desktop/cmp/grid/impl/filter/ColumnHeaderFilterModel.d.ts +38 -0
- package/build/types/desktop/cmp/grid/impl/filter/GridFilterDialog.d.ts +11 -0
- package/build/types/desktop/cmp/grid/impl/filter/custom/CustomRow.d.ts +6 -0
- package/build/types/desktop/cmp/grid/impl/filter/custom/CustomRowModel.d.ts +28 -0
- package/build/types/desktop/cmp/grid/impl/filter/custom/CustomTab.d.ts +7 -0
- package/build/types/desktop/cmp/grid/impl/filter/custom/CustomTabModel.d.ts +21 -0
- package/build/types/desktop/cmp/grid/impl/filter/values/ValuesTab.d.ts +7 -0
- package/build/types/desktop/cmp/grid/impl/filter/values/ValuesTabModel.d.ts +33 -0
- package/build/types/desktop/cmp/grid/index.d.ts +3 -0
- package/build/types/desktop/cmp/grouping/GroupingChooser.d.ts +26 -0
- package/build/types/desktop/cmp/grouping/index.d.ts +2 -0
- package/build/types/desktop/cmp/input/ButtonGroupInput.d.ts +26 -0
- package/build/types/desktop/cmp/input/Checkbox.d.ts +28 -0
- package/build/types/desktop/cmp/input/CodeInput.d.ts +80 -0
- package/build/types/desktop/cmp/input/DateInput.d.ts +117 -0
- package/build/types/desktop/cmp/input/JsonInput.d.ts +9 -0
- package/build/types/desktop/cmp/input/NumberInput.d.ts +77 -0
- package/build/types/desktop/cmp/input/RadioInput.d.ts +22 -0
- package/build/types/desktop/cmp/input/Select.d.ts +139 -0
- package/build/types/desktop/cmp/input/Slider.d.ts +33 -0
- package/build/types/desktop/cmp/input/SwitchInput.d.ts +21 -0
- package/build/types/desktop/cmp/input/TextArea.d.ts +26 -0
- package/build/types/desktop/cmp/input/TextInput.d.ts +55 -0
- package/build/types/desktop/cmp/input/index.d.ts +12 -0
- package/build/types/desktop/cmp/leftrightchooser/LeftRightChooser.d.ts +14 -0
- package/build/types/desktop/cmp/leftrightchooser/LeftRightChooserFilter.d.ts +15 -0
- package/build/types/desktop/cmp/leftrightchooser/LeftRightChooserModel.d.ts +83 -0
- package/build/types/desktop/cmp/leftrightchooser/impl/ChooserToolbar.d.ts +3 -0
- package/build/types/desktop/cmp/leftrightchooser/impl/Description.d.ts +3 -0
- package/build/types/desktop/cmp/leftrightchooser/index.d.ts +3 -0
- package/build/types/desktop/cmp/loadingindicator/LoadingIndicator.d.ts +27 -0
- package/build/types/desktop/cmp/loadingindicator/index.d.ts +1 -0
- package/build/types/desktop/cmp/mask/Mask.d.ts +27 -0
- package/build/types/desktop/cmp/mask/index.d.ts +1 -0
- package/build/types/desktop/cmp/modalsupport/ModalSupport.d.ts +16 -0
- package/build/types/desktop/cmp/modalsupport/ModalSupportModel.d.ts +30 -0
- package/build/types/desktop/cmp/modalsupport/index.d.ts +2 -0
- package/build/types/desktop/cmp/panel/Panel.d.ts +60 -0
- package/build/types/desktop/cmp/panel/PanelModel.d.ts +112 -0
- package/build/types/desktop/cmp/panel/impl/PanelHeader.d.ts +2 -0
- package/build/types/desktop/cmp/panel/impl/ResizeContainer.d.ts +1 -0
- package/build/types/desktop/cmp/panel/impl/Splitter.d.ts +2 -0
- package/build/types/desktop/cmp/panel/impl/dragger/Dragger.d.ts +3 -0
- package/build/types/desktop/cmp/panel/impl/dragger/DraggerModel.d.ts +33 -0
- package/build/types/desktop/cmp/panel/index.d.ts +2 -0
- package/build/types/desktop/cmp/pinpad/impl/PinPad.d.ts +11 -0
- package/build/types/desktop/cmp/record/RecordActionBar.d.ts +33 -0
- package/build/types/desktop/cmp/record/impl/RecordActionButton.d.ts +21 -0
- package/build/types/desktop/cmp/record/index.d.ts +1 -0
- package/build/types/desktop/cmp/rest/Actions.d.ts +7 -0
- package/build/types/desktop/cmp/rest/RestGrid.d.ts +24 -0
- package/build/types/desktop/cmp/rest/RestGridModel.d.ts +98 -0
- package/build/types/desktop/cmp/rest/data/RestField.d.ts +37 -0
- package/build/types/desktop/cmp/rest/data/RestStore.d.ts +39 -0
- package/build/types/desktop/cmp/rest/impl/RestForm.d.ts +6 -0
- package/build/types/desktop/cmp/rest/impl/RestFormField.d.ts +5 -0
- package/build/types/desktop/cmp/rest/impl/RestFormModel.d.ts +48 -0
- package/build/types/desktop/cmp/rest/impl/RestGridToolbar.d.ts +5 -0
- package/build/types/desktop/cmp/rest/index.d.ts +4 -0
- package/build/types/desktop/cmp/store/impl/StoreFilterField.d.ts +7 -0
- package/build/types/desktop/cmp/tab/TabSwitcher.d.ts +15 -0
- package/build/types/desktop/cmp/tab/impl/Tab.d.ts +12 -0
- package/build/types/desktop/cmp/tab/impl/TabContainer.d.ts +8 -0
- package/build/types/desktop/cmp/tab/index.d.ts +1 -0
- package/build/types/desktop/cmp/toolbar/Toolbar.d.ts +31 -0
- package/build/types/desktop/cmp/toolbar/ToolbarSep.d.ts +11 -0
- package/build/types/desktop/cmp/toolbar/index.d.ts +2 -0
- package/build/types/desktop/cmp/treemap/SplitTreeMap.d.ts +11 -0
- package/build/types/desktop/cmp/treemap/SplitTreeMapModel.d.ts +79 -0
- package/build/types/desktop/cmp/treemap/TreeMap.d.ts +16 -0
- package/build/types/desktop/cmp/treemap/TreeMapModel.d.ts +182 -0
- package/build/types/desktop/cmp/treemap/impl/Splitter.d.ts +6 -0
- package/build/types/desktop/cmp/treemap/index.d.ts +4 -0
- package/build/types/desktop/hooks/UseContextMenu.d.ts +11 -0
- package/build/types/desktop/hooks/UseHotkeys.d.ts +14 -0
- package/build/types/desktop/hooks/index.d.ts +2 -0
- package/build/types/desktop/register.d.ts +1 -0
- package/build/types/dynamics/desktop.d.ts +27 -0
- package/build/types/dynamics/mobile.d.ts +21 -0
- package/build/types/format/FormatDate.d.ts +52 -0
- package/build/types/format/FormatMisc.d.ts +41 -0
- package/build/types/format/FormatNumber.d.ts +112 -0
- package/build/types/format/FormatUtils.d.ts +11 -0
- package/build/types/format/impl/Utils.d.ts +7 -0
- package/build/types/format/index.d.ts +4 -0
- package/build/types/icon/Icon.d.ts +340 -0
- package/build/types/icon/XHLogo.d.ts +4 -0
- package/build/types/icon/impl/IconCmp.d.ts +6 -0
- package/build/types/icon/impl/IconHtml.d.ts +13 -0
- package/build/types/icon/index.d.ts +2 -0
- package/build/types/inspector/InspectorPanel.d.ts +5 -0
- package/build/types/inspector/instances/InstancesModel.d.ts +48 -0
- package/build/types/inspector/instances/InstancesPanel.d.ts +2 -0
- package/build/types/inspector/stats/StatsModel.d.ts +19 -0
- package/build/types/inspector/stats/StatsPanel.d.ts +2 -0
- package/build/types/kit/ag-grid/index.d.ts +19 -0
- package/build/types/kit/blueprint/Dialog.d.ts +13 -0
- package/build/types/kit/blueprint/Wrappers.d.ts +5 -0
- package/build/types/kit/blueprint/index.d.ts +8 -0
- package/build/types/kit/highcharts/index.d.ts +6 -0
- package/build/types/kit/onsen/index.d.ts +8 -0
- package/build/types/kit/react-beautiful-dnd/index.d.ts +3 -0
- package/build/types/kit/react-dates/index.d.ts +5 -0
- package/build/types/kit/react-dropzone/index.d.ts +3 -0
- package/build/types/kit/react-select/index.d.ts +7 -0
- package/build/types/mobile/appcontainer/AboutDialog.d.ts +10 -0
- package/build/types/mobile/appcontainer/AppContainer.d.ts +13 -0
- package/build/types/mobile/appcontainer/Banner.d.ts +8 -0
- package/build/types/mobile/appcontainer/ExceptionDialog.d.ts +13 -0
- package/build/types/mobile/appcontainer/ExceptionDialogDetails.d.ts +7 -0
- package/build/types/mobile/appcontainer/FeedbackDialog.d.ts +6 -0
- package/build/types/mobile/appcontainer/IdlePanel.d.ts +8 -0
- package/build/types/mobile/appcontainer/ImpersonationBar.d.ts +9 -0
- package/build/types/mobile/appcontainer/LockoutPanel.d.ts +7 -0
- package/build/types/mobile/appcontainer/LoginPanel.d.ts +9 -0
- package/build/types/mobile/appcontainer/Message.d.ts +7 -0
- package/build/types/mobile/appcontainer/MessageSource.d.ts +6 -0
- package/build/types/mobile/appcontainer/OptionsDialog.d.ts +6 -0
- package/build/types/mobile/appcontainer/SuspendPanel.d.ts +6 -0
- package/build/types/mobile/appcontainer/Toast.d.ts +6 -0
- package/build/types/mobile/appcontainer/ToastSource.d.ts +7 -0
- package/build/types/mobile/appcontainer/VersionBar.d.ts +5 -0
- package/build/types/mobile/appcontainer/index.d.ts +1 -0
- package/build/types/mobile/cmp/appOption/AutoRefreshAppOption.d.ts +333 -0
- package/build/types/mobile/cmp/appOption/SizingModeAppOption.d.ts +336 -0
- package/build/types/mobile/cmp/appOption/ThemeAppOption.d.ts +333 -0
- package/build/types/mobile/cmp/appOption/index.d.ts +3 -0
- package/build/types/mobile/cmp/button/Button.d.ts +22 -0
- package/build/types/mobile/cmp/button/ButtonGroup.d.ts +13 -0
- package/build/types/mobile/cmp/button/ColAutosizeButton.d.ts +14 -0
- package/build/types/mobile/cmp/button/ColChooserButton.d.ts +15 -0
- package/build/types/mobile/cmp/button/ExpandCollapseButton.d.ts +12 -0
- package/build/types/mobile/cmp/button/FeedbackButton.d.ts +9 -0
- package/build/types/mobile/cmp/button/LogoutButton.d.ts +11 -0
- package/build/types/mobile/cmp/button/NavigatorBackButton.d.ts +8 -0
- package/build/types/mobile/cmp/button/OptionsButton.d.ts +10 -0
- package/build/types/mobile/cmp/button/RefreshButton.d.ts +13 -0
- package/build/types/mobile/cmp/button/RestoreDefaultsButton.d.ts +16 -0
- package/build/types/mobile/cmp/button/ThemeToggleButton.d.ts +8 -0
- package/build/types/mobile/cmp/button/index.d.ts +11 -0
- package/build/types/mobile/cmp/dialog/Dialog.d.ts +17 -0
- package/build/types/mobile/cmp/dialog/index.d.ts +1 -0
- package/build/types/mobile/cmp/error/ErrorMessage.d.ts +33 -0
- package/build/types/mobile/cmp/error/index.d.ts +1 -0
- package/build/types/mobile/cmp/form/FormField.d.ts +26 -0
- package/build/types/mobile/cmp/form/index.d.ts +1 -0
- package/build/types/mobile/cmp/grid/impl/ColChooser.d.ts +22 -0
- package/build/types/mobile/cmp/grid/impl/ColChooserModel.d.ts +46 -0
- package/build/types/mobile/cmp/grouping/GroupingChooser.d.ts +20 -0
- package/build/types/mobile/cmp/grouping/index.d.ts +2 -0
- package/build/types/mobile/cmp/header/AppBar.d.ts +39 -0
- package/build/types/mobile/cmp/header/AppMenuButton.d.ts +31 -0
- package/build/types/mobile/cmp/header/index.d.ts +2 -0
- package/build/types/mobile/cmp/input/ButtonGroupInput.d.ts +23 -0
- package/build/types/mobile/cmp/input/Checkbox.d.ts +14 -0
- package/build/types/mobile/cmp/input/DateInput.d.ts +53 -0
- package/build/types/mobile/cmp/input/Label.d.ts +11 -0
- package/build/types/mobile/cmp/input/NumberInput.d.ts +52 -0
- package/build/types/mobile/cmp/input/SearchInput.d.ts +24 -0
- package/build/types/mobile/cmp/input/Select.d.ts +122 -0
- package/build/types/mobile/cmp/input/SwitchInput.d.ts +14 -0
- package/build/types/mobile/cmp/input/TextArea.d.ts +22 -0
- package/build/types/mobile/cmp/input/TextInput.d.ts +39 -0
- package/build/types/mobile/cmp/input/index.d.ts +10 -0
- package/build/types/mobile/cmp/loadingindicator/LoadingIndicator.d.ts +27 -0
- package/build/types/mobile/cmp/loadingindicator/index.d.ts +1 -0
- package/build/types/mobile/cmp/mask/Mask.d.ts +25 -0
- package/build/types/mobile/cmp/mask/index.d.ts +1 -0
- package/build/types/mobile/cmp/menu/MenuButton.d.ts +21 -0
- package/build/types/mobile/cmp/menu/impl/Menu.d.ts +12 -0
- package/build/types/mobile/cmp/menu/index.d.ts +1 -0
- package/build/types/mobile/cmp/navigator/Navigator.d.ts +13 -0
- package/build/types/mobile/cmp/navigator/NavigatorModel.d.ts +55 -0
- package/build/types/mobile/cmp/navigator/PageModel.d.ts +60 -0
- package/build/types/mobile/cmp/navigator/impl/Page.d.ts +12 -0
- package/build/types/mobile/cmp/navigator/impl/swipe/BackIndicator.d.ts +6 -0
- package/build/types/mobile/cmp/navigator/impl/swipe/RefreshIndicator.d.ts +6 -0
- package/build/types/mobile/cmp/navigator/impl/swipe/Swiper.d.ts +8 -0
- package/build/types/mobile/cmp/navigator/impl/swipe/SwiperModel.d.ts +23 -0
- package/build/types/mobile/cmp/navigator/index.d.ts +2 -0
- package/build/types/mobile/cmp/panel/DialogPanel.d.ts +15 -0
- package/build/types/mobile/cmp/panel/Panel.d.ts +39 -0
- package/build/types/mobile/cmp/panel/impl/PanelHeader.d.ts +6 -0
- package/build/types/mobile/cmp/panel/index.d.ts +2 -0
- package/build/types/mobile/cmp/pinpad/impl/PinPad.d.ts +9 -0
- package/build/types/mobile/cmp/popover/Popover.d.ts +36 -0
- package/build/types/mobile/cmp/popover/index.d.ts +1 -0
- package/build/types/mobile/cmp/store/impl/StoreFilterField.d.ts +7 -0
- package/build/types/mobile/cmp/tab/impl/Tab.d.ts +13 -0
- package/build/types/mobile/cmp/tab/impl/TabContainer.d.ts +10 -0
- package/build/types/mobile/cmp/toolbar/Toolbar.d.ts +12 -0
- package/build/types/mobile/cmp/toolbar/ToolbarSeparator.d.ts +8 -0
- package/build/types/mobile/cmp/toolbar/index.d.ts +2 -0
- package/build/types/mobile/register.d.ts +1 -0
- package/build/types/mobx/decorators.d.ts +11 -0
- package/build/types/mobx/index.d.ts +5 -0
- package/build/types/mobx/overrides.d.ts +9 -0
- package/build/types/promise/Promise.d.ts +107 -0
- package/build/types/promise/index.d.ts +1 -0
- package/build/types/svc/AlertBannerService.d.ts +19 -0
- package/build/types/svc/AutoRefreshService.d.ts +28 -0
- package/build/types/svc/ChangelogService.d.ts +62 -0
- package/build/types/svc/ConfigService.d.ts +36 -0
- package/build/types/svc/EnvironmentService.d.ts +24 -0
- package/build/types/svc/FetchService.d.ts +139 -0
- package/build/types/svc/GridAutosizeService.d.ts +38 -0
- package/build/types/svc/GridExportService.d.ts +56 -0
- package/build/types/svc/IdentityService.d.ts +61 -0
- package/build/types/svc/IdleService.d.ts +21 -0
- package/build/types/svc/InspectorService.d.ts +74 -0
- package/build/types/svc/JsonBlobService.d.ts +35 -0
- package/build/types/svc/LocalStorageService.d.ts +24 -0
- package/build/types/svc/PrefService.d.ts +76 -0
- package/build/types/svc/TrackService.d.ts +15 -0
- package/build/types/svc/WebSocketService.d.ts +94 -0
- package/build/types/svc/index.d.ts +16 -0
- package/build/types/utils/async/AsyncUtils.d.ts +40 -0
- package/build/types/utils/async/Timer.d.ts +89 -0
- package/build/types/utils/async/index.d.ts +2 -0
- package/build/types/utils/datetime/DateTimeUtils.d.ts +10 -0
- package/build/types/utils/datetime/LocalDate.d.ts +94 -0
- package/build/types/utils/datetime/index.d.ts +2 -0
- package/build/types/utils/impl/Equals.d.ts +4 -0
- package/build/types/utils/impl/IsOmitted.d.ts +7 -0
- package/build/types/utils/impl/Separators.d.ts +10 -0
- package/build/types/utils/impl/TimeZone.d.ts +4 -0
- package/build/types/utils/impl/index.d.ts +4 -0
- package/build/types/utils/js/BrowserUtils.d.ts +4 -0
- package/build/types/utils/js/Decorators.d.ts +25 -0
- package/build/types/utils/js/DomUtils.d.ts +46 -0
- package/build/types/utils/js/HtmlUtils.d.ts +4 -0
- package/build/types/utils/js/LangUtils.d.ts +112 -0
- package/build/types/utils/js/LogUtils.d.ts +32 -0
- package/build/types/utils/js/VersionUtils.d.ts +17 -0
- package/build/types/utils/js/index.d.ts +7 -0
- package/build/types/utils/react/ClassName.d.ts +14 -0
- package/build/types/utils/react/Hooks.d.ts +47 -0
- package/build/types/utils/react/LayoutPropUtils.d.ts +42 -0
- package/build/types/utils/react/ObservableRef.d.ts +13 -0
- package/build/types/utils/react/ReactUtils.d.ts +19 -0
- package/build/types/utils/react/index.d.ts +5 -0
- package/package.json +2 -2
- package/static/preflight.js +15 -13
- package/tsconfig.json +14 -7
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { HoistModel, RefreshContextModel, PersistenceProvider, RefreshMode, RenderMode, PersistOptions } from '@xh/hoist/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { TabConfig, TabModel } from './TabModel';
|
|
4
|
+
import { TabSwitcherProps } from './TabSwitcherProps';
|
|
5
|
+
export interface TabContainerConfig {
|
|
6
|
+
/** Tabs to be displayed. */
|
|
7
|
+
tabs?: TabConfig[];
|
|
8
|
+
/**
|
|
9
|
+
* ID of Tab to be shown initially if routing does not specify otherwise. If not set,
|
|
10
|
+
* will default to first tab in the provided collection.
|
|
11
|
+
*/
|
|
12
|
+
defaultTabId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Base route name for this container. If set, this container will be route-enabled, with the
|
|
15
|
+
* route for each tab being "[route]/[tab.id]". Cannot be used with `persistWith`.
|
|
16
|
+
*/
|
|
17
|
+
route?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Indicates whether to include a default switcher docked within this component. Specify as a
|
|
20
|
+
* boolean or an object containing props for a TabSwitcher component. Set to false to not
|
|
21
|
+
* include a switcher. Defaults to true.
|
|
22
|
+
*/
|
|
23
|
+
switcher?: boolean | TabSwitcherProps;
|
|
24
|
+
/**
|
|
25
|
+
* True to enable activity tracking of tab views (default false). Viewing of each tab will
|
|
26
|
+
* be tracked with the `oncePerSession` flag, to avoid duplication.
|
|
27
|
+
*/
|
|
28
|
+
track?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Strategy for rendering child tabs. Can be set per-tab via `TabModel.renderMode`. See enum
|
|
31
|
+
* for description of supported modes.
|
|
32
|
+
*/
|
|
33
|
+
renderMode?: RenderMode;
|
|
34
|
+
/**
|
|
35
|
+
* Strategy for refreshing child tabs. Can be set per-tab via `TabModel.refreshMode`.
|
|
36
|
+
* See enum for description of supported modes.
|
|
37
|
+
*/
|
|
38
|
+
refreshMode?: RefreshMode;
|
|
39
|
+
/** Options governing persistence. Cannot be used with `route`. */
|
|
40
|
+
persistWith?: PersistOptions;
|
|
41
|
+
/**
|
|
42
|
+
* Placeholder to display if no tabs are provided or all tabs have been removed via
|
|
43
|
+
* their `omit` config.
|
|
44
|
+
*/
|
|
45
|
+
emptyText?: ReactNode;
|
|
46
|
+
/** @internal */
|
|
47
|
+
xhImpl?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Model for a TabContainer, representing its layout/contents and the currently displayed Tab.
|
|
51
|
+
*
|
|
52
|
+
* This object provides support for routing based navigation, customizable (lazy) mounting and
|
|
53
|
+
* unmounting of inactive tabs, and customizable refreshing of tabs via a built-in RefreshContextModel.
|
|
54
|
+
*
|
|
55
|
+
* Note: Routing is currently enabled for desktop applications only.
|
|
56
|
+
*/
|
|
57
|
+
export declare class TabContainerModel extends HoistModel {
|
|
58
|
+
config: TabContainerConfig;
|
|
59
|
+
tabs: TabModel[];
|
|
60
|
+
activeTabId: string;
|
|
61
|
+
route: string;
|
|
62
|
+
defaultTabId: string;
|
|
63
|
+
switcher: TabSwitcherProps;
|
|
64
|
+
track: boolean;
|
|
65
|
+
renderMode: RenderMode;
|
|
66
|
+
refreshMode: RefreshMode;
|
|
67
|
+
emptyText: ReactNode;
|
|
68
|
+
provider: PersistenceProvider;
|
|
69
|
+
refreshContextModel: RefreshContextModel;
|
|
70
|
+
private lastActiveTabId;
|
|
71
|
+
constructor({ tabs, defaultTabId, route, switcher, track, renderMode, refreshMode, persistWith, emptyText, xhImpl }: TabContainerConfig);
|
|
72
|
+
/**
|
|
73
|
+
* Set the Tabs displayed by this object.
|
|
74
|
+
*/
|
|
75
|
+
setTabs(tabs: Array<TabModel | TabConfig>): void;
|
|
76
|
+
/** Add a Tab for display.*/
|
|
77
|
+
addTab(tab: TabModel | TabConfig, opts?: AddTabOptions): TabModel;
|
|
78
|
+
/**
|
|
79
|
+
* Remove a Tab for display.
|
|
80
|
+
* @param tab - TabModel or id of TabModel to be removed.
|
|
81
|
+
*/
|
|
82
|
+
removeTab(tab: TabModel | string): void;
|
|
83
|
+
findTab(id: string): TabModel;
|
|
84
|
+
get activeTab(): TabModel;
|
|
85
|
+
/** The tab immediately before the active tab in the model's tab list. */
|
|
86
|
+
get prevTab(): TabModel;
|
|
87
|
+
/** The tab immediately after the active tab in the model's tab list. */
|
|
88
|
+
get nextTab(): TabModel;
|
|
89
|
+
/**
|
|
90
|
+
* Set the currently active Tab.
|
|
91
|
+
*
|
|
92
|
+
* If using routing, this method will navigate to the new tab via the router and the active Tab
|
|
93
|
+
* will only be updated once the router state changes. Otherwise the active Tab will be updated
|
|
94
|
+
* immediately.
|
|
95
|
+
*
|
|
96
|
+
* @param tab - TabModel or id of TabModel to be activated.
|
|
97
|
+
*/
|
|
98
|
+
activateTab(tab: TabModel | string): void;
|
|
99
|
+
/** Navigate to the tab immediately before the currently active tab, if any. */
|
|
100
|
+
activatePrevTab(): void;
|
|
101
|
+
/** Navigate to the tab immediately after the currently active tab, if any. */
|
|
102
|
+
activateNextTab(): void;
|
|
103
|
+
private setActiveTabIdInternal;
|
|
104
|
+
private syncWithRouter;
|
|
105
|
+
private forwardRouterToTab;
|
|
106
|
+
private calculateActiveTabId;
|
|
107
|
+
private setupStateProvider;
|
|
108
|
+
}
|
|
109
|
+
export interface AddTabOptions {
|
|
110
|
+
/** Index in tab collection where tab is to be added. */
|
|
111
|
+
index?: number;
|
|
112
|
+
/** True to immediately activate new tab. */
|
|
113
|
+
activateImmediately?: boolean;
|
|
114
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { HoistModel, RefreshMode, RenderMode, Content, RefreshContextModel, Thunkable } from '@xh/hoist/core';
|
|
2
|
+
import { TabContainerModel } from '@xh/hoist/cmp/tab/TabContainerModel';
|
|
3
|
+
import { ReactElement, ReactNode } from 'react';
|
|
4
|
+
export interface TabConfig {
|
|
5
|
+
/** Unique ID, used by container for locating tabs and generating routes. */
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* Parent TabContainerModel. Provided by the container when constructing these models -
|
|
9
|
+
* no need for application to specify directly.
|
|
10
|
+
*/
|
|
11
|
+
containerModel?: TabContainerModel;
|
|
12
|
+
/** Display title for the Tab in the container's TabSwitcher. */
|
|
13
|
+
title?: ReactNode;
|
|
14
|
+
/** Display icon for the Tab in the container's TabSwitcher. */
|
|
15
|
+
icon?: ReactElement;
|
|
16
|
+
/** Tooltip for the Tab in the container's TabSwitcher. */
|
|
17
|
+
tooltip?: ReactNode;
|
|
18
|
+
/** True to disable this tab in the TabSwitcher and block routing. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* True to hide this Tab in the TabSwitcher, but still be able to activate the tab manually
|
|
22
|
+
* or via routing.
|
|
23
|
+
*/
|
|
24
|
+
excludeFromSwitcher?: boolean;
|
|
25
|
+
/** Display an affordance to allow the user to remove this tab from its container.*/
|
|
26
|
+
showRemoveAction?: boolean;
|
|
27
|
+
/** Item to be rendered by this tab.*/
|
|
28
|
+
content?: Content;
|
|
29
|
+
/**
|
|
30
|
+
* Strategy for rendering this tab. If null, will default to its container's mode. See enum
|
|
31
|
+
* for description of supported modes.
|
|
32
|
+
*/
|
|
33
|
+
renderMode?: RenderMode;
|
|
34
|
+
/**
|
|
35
|
+
* Strategy for refreshing this tab. If null, will default to its container's mode. See enum
|
|
36
|
+
* for description of supported modes.
|
|
37
|
+
*/
|
|
38
|
+
refreshMode?: RefreshMode;
|
|
39
|
+
/** True to skip this tab. */
|
|
40
|
+
omit?: Thunkable<boolean>;
|
|
41
|
+
/** @internal */
|
|
42
|
+
xhImpl?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Model for a Tab within a TabContainer. Specifies the actual content (child component) to be
|
|
46
|
+
* rendered within a tab and manages that content's active and refresh state.
|
|
47
|
+
*
|
|
48
|
+
* This model is not typically created directly within applications. Instead, specify a
|
|
49
|
+
* configuration for it via the `TabContainerModel.tabs` constructor config.
|
|
50
|
+
*/
|
|
51
|
+
export declare class TabModel extends HoistModel {
|
|
52
|
+
id: string;
|
|
53
|
+
title: ReactNode;
|
|
54
|
+
icon: ReactElement;
|
|
55
|
+
tooltip: ReactNode;
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
excludeFromSwitcher: boolean;
|
|
58
|
+
showRemoveAction: boolean;
|
|
59
|
+
content: Content;
|
|
60
|
+
private _renderMode;
|
|
61
|
+
private _refreshMode;
|
|
62
|
+
containerModel: TabContainerModel;
|
|
63
|
+
refreshContextModel: RefreshContextModel;
|
|
64
|
+
get isTabModel(): boolean;
|
|
65
|
+
constructor({ id, containerModel, title, icon, tooltip, disabled, excludeFromSwitcher, showRemoveAction, content, refreshMode, renderMode, xhImpl }: TabConfig);
|
|
66
|
+
activate(): void;
|
|
67
|
+
get renderMode(): RenderMode;
|
|
68
|
+
get refreshMode(): RefreshMode;
|
|
69
|
+
get isActive(): boolean;
|
|
70
|
+
setDisabled(disabled: boolean): void;
|
|
71
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BoxProps, HoistProps, Side } from '@xh/hoist/core';
|
|
2
|
+
import { TabContainerModel } from './TabContainerModel';
|
|
3
|
+
export interface TabSwitcherProps extends HoistProps<TabContainerModel>, BoxProps {
|
|
4
|
+
/** Relative position within the parent TabContainer. Defaults to 'top'. */
|
|
5
|
+
orientation?: Side;
|
|
6
|
+
/** True to animate the indicator when switching tabs. False (default) to change instantly. */
|
|
7
|
+
animate?: boolean;
|
|
8
|
+
/** Enable scrolling and place tabs that overflow into a menu. Default to false. */
|
|
9
|
+
enableOverflow?: boolean;
|
|
10
|
+
/** Width (in px) to render tabs. Only applies to horizontal orientations */
|
|
11
|
+
tabWidth?: number;
|
|
12
|
+
/** Minimum width (in px) to render tabs. Only applies to horizontal orientations */
|
|
13
|
+
tabMinWidth?: number;
|
|
14
|
+
/** Maximum width (in px) to render tabs. Only applies to horizontal orientations */
|
|
15
|
+
tabMaxWidth?: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps, HoistProps } from '@xh/hoist/core';
|
|
3
|
+
export interface WebSocketIndicatorProps extends HoistProps, BoxProps {
|
|
4
|
+
/** True to display status as an icon only, without text label. */
|
|
5
|
+
iconOnly?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Provides a visual indicator of connection status for @see {@link WebSocketService}.
|
|
9
|
+
*/
|
|
10
|
+
export declare const WebSocketIndicator: import("react").FC<WebSocketIndicatorProps>, webSocketIndicator: import("@xh/hoist/core").ElementFactory<WebSocketIndicatorProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WebSocketIndicator';
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { HoistAppModel, ElementFactory, HoistProps } from '@xh/hoist/core';
|
|
2
|
+
import { Component, ComponentClass, FunctionComponent } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Specification for a client-side Hoist application.
|
|
5
|
+
* Passed to XH.renderApp() to kick-off app rendering and available thereafter as `XH.appSpec`.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AppSpec<T extends HoistAppModel = HoistAppModel> {
|
|
8
|
+
/**
|
|
9
|
+
* Short code for this particular JS client application.
|
|
10
|
+
* Will default to the `appCode` specified within the project's Webpack config, but can be
|
|
11
|
+
* set to a more specific value (e.g. 'myAppMobile') to identify the client app in common
|
|
12
|
+
* code or configs.
|
|
13
|
+
*/
|
|
14
|
+
clientAppCode?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Display name for this particular JS client application.
|
|
17
|
+
* As with `clientAppCode` above, this will default to the global `appName` specified by
|
|
18
|
+
* the project's Webpack config, but can be set here to a more specific value (e.g.
|
|
19
|
+
* 'MyApp Mobile').
|
|
20
|
+
*/
|
|
21
|
+
clientAppName?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Root Model class for the application. Note this is a reference
|
|
24
|
+
* to the class itself, not an instance, and must extend {@link HoistAppModel}.
|
|
25
|
+
*/
|
|
26
|
+
modelClass: new () => T;
|
|
27
|
+
/**
|
|
28
|
+
* Root HoistComponent for the application. Despite the name,
|
|
29
|
+
* functional components are fully supported and expected.
|
|
30
|
+
*/
|
|
31
|
+
componentClass: ComponentClass<HoistProps> | FunctionComponent<HoistProps>;
|
|
32
|
+
/**
|
|
33
|
+
* Container component to be used to host this application.
|
|
34
|
+
* This class determines the platform used by Hoist. The value should be imported from
|
|
35
|
+
* either `@xh/hoist/desktop/AppContainer` or `@xh/hoist/mobile/AppContainer`.
|
|
36
|
+
*/
|
|
37
|
+
containerClass: ComponentClass<HoistProps> | FunctionComponent<HoistProps>;
|
|
38
|
+
/** True if the app should use the Hoist mobile toolkit.*/
|
|
39
|
+
isMobileApp: boolean;
|
|
40
|
+
/** True if SSO auth is enabled, as opposed to a login prompt. */
|
|
41
|
+
isSSO: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Method for determining if user may access the app.
|
|
44
|
+
* If a string, will be interpreted as the role required for basic UI access.
|
|
45
|
+
* Otherwise, function taking a user and returning a boolean or an object of the form
|
|
46
|
+
* `{hasAccess: boolean, message: 'explanatory message'}`.
|
|
47
|
+
*/
|
|
48
|
+
checkAccess: string | ((user: object) => boolean | {
|
|
49
|
+
hasAccess: boolean;
|
|
50
|
+
message: string;
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Write a track log statement after the app has loaded and fully initialized?
|
|
54
|
+
* Message will include elapsed time of asset loading and init.
|
|
55
|
+
*/
|
|
56
|
+
trackAppLoad?: boolean;
|
|
57
|
+
/** Enable Hoist websocket connectivity? (default false) */
|
|
58
|
+
webSocketsEnabled?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Optional custom Component to display when App has been suspended. The component will
|
|
61
|
+
* receive a single prop -- onReactivate -- a callback called when the user has acknowledged
|
|
62
|
+
* the suspension and wishes to reload the app.
|
|
63
|
+
*/
|
|
64
|
+
idlePanel?: ElementFactory | FunctionComponent | Component;
|
|
65
|
+
/**
|
|
66
|
+
* Optional custom Component to display when the user is denied access to app. Intended for
|
|
67
|
+
* apps that implement custom auth flows. See also `lockoutMessage` for a more lightweight
|
|
68
|
+
* customization option.
|
|
69
|
+
*/
|
|
70
|
+
lockoutPanel?: ElementFactory | FunctionComponent | Component;
|
|
71
|
+
/** Optional message to show on login form (for non-SSO apps). */
|
|
72
|
+
loginMessage?: string;
|
|
73
|
+
/** Optional message to show users when denied access to app. */
|
|
74
|
+
lockoutMessage?: string;
|
|
75
|
+
/**
|
|
76
|
+
* True to show the built-in browser context menu when no app-specific menu would be shown
|
|
77
|
+
* (e.g. from a Grid). False (the default) prevents the browser menu from being shown anywhere
|
|
78
|
+
* upon right-click.
|
|
79
|
+
*/
|
|
80
|
+
showBrowserContextMenu?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* True to disable Field-level XSS protection by default across all Stores/Fields in the app.
|
|
83
|
+
* For use with secure, internal apps that do not display arbitrary/external user input and
|
|
84
|
+
* have tight performance tolerances and/or load very large recordsets.
|
|
85
|
+
* @see FieldConfig.disableXssProtection
|
|
86
|
+
*/
|
|
87
|
+
disableXssProtection?: boolean;
|
|
88
|
+
constructor({ clientAppCode, clientAppName, modelClass, componentClass, containerClass, isMobileApp, isSSO, checkAccess, trackAppLoad, webSocketsEnabled, idlePanel, lockoutPanel, loginMessage, lockoutMessage, showBrowserContextMenu, disableXssProtection }: {
|
|
89
|
+
clientAppCode?: string;
|
|
90
|
+
clientAppName?: string;
|
|
91
|
+
modelClass: any;
|
|
92
|
+
componentClass: any;
|
|
93
|
+
containerClass: any;
|
|
94
|
+
isMobileApp: any;
|
|
95
|
+
isSSO: any;
|
|
96
|
+
checkAccess: any;
|
|
97
|
+
trackAppLoad?: boolean;
|
|
98
|
+
webSocketsEnabled?: boolean;
|
|
99
|
+
idlePanel?: any;
|
|
100
|
+
lockoutPanel?: any;
|
|
101
|
+
loginMessage?: any;
|
|
102
|
+
lockoutMessage?: any;
|
|
103
|
+
showBrowserContextMenu?: boolean;
|
|
104
|
+
disableXssProtection?: boolean;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enumeration of possible App States
|
|
3
|
+
*/
|
|
4
|
+
export declare const AppState: Readonly<{
|
|
5
|
+
PRE_AUTH: "PRE_AUTH";
|
|
6
|
+
LOGIN_REQUIRED: "LOGIN_REQUIRED";
|
|
7
|
+
ACCESS_DENIED: "ACCESS_DENIED";
|
|
8
|
+
INITIALIZING: "INITIALIZING";
|
|
9
|
+
RUNNING: "RUNNING";
|
|
10
|
+
SUSPENDED: "SUSPENDED";
|
|
11
|
+
LOAD_FAILED: "LOAD_FAILED";
|
|
12
|
+
}>;
|
|
13
|
+
export type AppState = (typeof AppState)[keyof typeof AppState];
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { AppOptionSpec, HoistModel, Thunkable } from './';
|
|
2
|
+
import { Route } from 'router5';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Specialized base class for defining the central model for a Hoist app as specified by its
|
|
6
|
+
* See the {@link AppSpec.modelClass} config, which should reference a concrete implementation class
|
|
7
|
+
* extending this base. Hoist will create and then initialize an instance of that class after
|
|
8
|
+
* the framework has successfully initialized and will make it available to all app code via the
|
|
9
|
+
* `XH.appModel` getter.
|
|
10
|
+
*
|
|
11
|
+
* Applications should specify this class to provide application level state and services and
|
|
12
|
+
* customize important metadata. Initialization of all resources (e.g. application level services)
|
|
13
|
+
* should be done in `initAsync()`.
|
|
14
|
+
*
|
|
15
|
+
* Hoist will load/reload this Model during the global refresh process. This will occur before the
|
|
16
|
+
* application's global `XH.refreshContextModel` has been refreshed (when all mounted and 'owned'
|
|
17
|
+
* HoistModels in the application are refreshed). AppModels should implement `doLoadAsync()` if
|
|
18
|
+
* required to refresh all other app-wide services and models, respecting any ordering and phasing
|
|
19
|
+
* requirements specific to its needs.
|
|
20
|
+
*/
|
|
21
|
+
export declare class HoistAppModel extends HoistModel {
|
|
22
|
+
/**
|
|
23
|
+
* Hoist will call this method early in the initialization sequence, prior to user
|
|
24
|
+
* authentication and full Hoist initialization. This means that several core services
|
|
25
|
+
* (identity, configs, prefs) will *not* be available, but it provides the app a hook to
|
|
26
|
+
* do early service initialization or other work to support flows such as OAuth.
|
|
27
|
+
*/
|
|
28
|
+
static preAuthAsync(): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Hoist will call this method after Hoist services have initialized and the application
|
|
31
|
+
* has mounted. Use to trigger initialization of the app and any app-specific services.
|
|
32
|
+
*
|
|
33
|
+
* Applications will typically use this method to install and initialize app-specific
|
|
34
|
+
* services using one or more phased calls to XH.installServicesAsync().
|
|
35
|
+
*/
|
|
36
|
+
initAsync(): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Called by {@link IdentityService.logoutAsync} to provide an app-specific hook prior
|
|
39
|
+
* to logging out an authenticated user. Applicable only to apps that generally support
|
|
40
|
+
* logout (i.e. not SSO) and require handling in addition to Hoist server logout.
|
|
41
|
+
*/
|
|
42
|
+
logoutAsync(): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Should the version bar be shown in this application?.
|
|
45
|
+
* Applications for which a version bar might not be appropriate (e.g. a mini-app
|
|
46
|
+
* being shown in a frame or modal) may override this getter and return false
|
|
47
|
+
*/
|
|
48
|
+
get supportsVersionBar(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Provide the initial set of Router5 Routes to be used by this application.
|
|
51
|
+
*/
|
|
52
|
+
getRoutes(): Route[];
|
|
53
|
+
/**
|
|
54
|
+
* Provide a list of app-wide options to be displayed in the App's built-in Options
|
|
55
|
+
* dialog, accessible from the default AppBar menu when this method returns non-empty.
|
|
56
|
+
* @see AppOption
|
|
57
|
+
*/
|
|
58
|
+
getAppOptions(): AppOptionSpec[];
|
|
59
|
+
/**
|
|
60
|
+
* Provide a list of app-wide metadata and version information to be displayed in the
|
|
61
|
+
* App's built-in About dialog.
|
|
62
|
+
*/
|
|
63
|
+
getAboutDialogItems(): AboutDialogItem[];
|
|
64
|
+
/**
|
|
65
|
+
* Resets user preferences and any persistent local application state.
|
|
66
|
+
*
|
|
67
|
+
* The default implementation for this method will clear *all* preferences and local storage.
|
|
68
|
+
*
|
|
69
|
+
* Applications may wish to override this method to do a more targeted clearing of state.
|
|
70
|
+
* This is important for complex applications with smaller sub-applications, and/or device
|
|
71
|
+
* specific applications. These applications will typically want to perform a custom clearing
|
|
72
|
+
* that is more targeted, and includes any additional app-specific state.
|
|
73
|
+
*/
|
|
74
|
+
restoreDefaultsAsync(): Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
/** Object Describing an entry in the AboutDialog. */
|
|
77
|
+
export interface AboutDialogItem {
|
|
78
|
+
label: ReactNode;
|
|
79
|
+
value: ReactNode;
|
|
80
|
+
omit?: Thunkable<boolean>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { PersistOptions, DebounceSpec } from './';
|
|
2
|
+
import { IAutorunOptions, IReactionOptions } from 'mobx/dist/api/autorun';
|
|
3
|
+
import { IReactionDisposer } from 'mobx/dist/internal';
|
|
4
|
+
export interface HoistBaseClass {
|
|
5
|
+
new (...args: any[]): HoistBase;
|
|
6
|
+
isHoistBase: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Base class for objects in Hoist.
|
|
10
|
+
* Provides misc. support for Mobx integration, state persistence, and resource cleanup.
|
|
11
|
+
*
|
|
12
|
+
* This class should not typically be extended directly by applications. Applications should
|
|
13
|
+
* extend one of its subclasses instead, notably:
|
|
14
|
+
* @see HoistModel
|
|
15
|
+
* @see HoistService
|
|
16
|
+
* @see Store
|
|
17
|
+
*/
|
|
18
|
+
export declare abstract class HoistBase {
|
|
19
|
+
static get isHoistBase(): boolean;
|
|
20
|
+
get isHoistBase(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* For XH internal use only - marks this instance as created by and for Hoist as part of its
|
|
23
|
+
* own implementation. Used as a filter within Hoist Inspector to distinguish services and
|
|
24
|
+
* models that are either created directly by the app developer or important/public parts of
|
|
25
|
+
* the Hoist API from those that are not.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
xhImpl: boolean;
|
|
29
|
+
private managedInstances;
|
|
30
|
+
private disposers;
|
|
31
|
+
private _destroyed;
|
|
32
|
+
private _xhImpl;
|
|
33
|
+
/** Default persistence options for this object. */
|
|
34
|
+
persistWith: PersistOptions;
|
|
35
|
+
/**
|
|
36
|
+
* Add and start one or more managed reactions.
|
|
37
|
+
*
|
|
38
|
+
* A reaction's run function will be executed on changes to any/all observables read in its
|
|
39
|
+
* track function, regardless of whether they - or any other observables - are accessed in
|
|
40
|
+
* the run function. The reaction will also run only when the output of the track function
|
|
41
|
+
* changes, and this output is passed to the run function.
|
|
42
|
+
*
|
|
43
|
+
* Specify the property 'track' to run the reaction continuously until disposal.
|
|
44
|
+
* Alternatively, specify the 'when' property to run this reaction only until the predicate
|
|
45
|
+
* passes, and the run function is executed once. (These map to mobX's native `reaction()`
|
|
46
|
+
* and `when()` functions, respectively).
|
|
47
|
+
*
|
|
48
|
+
* Specify the property 'equals' to determine how successive outputs of track will be compared.
|
|
49
|
+
* Hoist supports string specification of this (i.e. 'shallow','structural', or 'identity') and
|
|
50
|
+
* will map it to the underlying MobX `comparer` object. For returns of arrays and objects,
|
|
51
|
+
* consider using the value 'shallow' over the default 'identity' to avoid triggering spurious
|
|
52
|
+
* changes. See MobX for more information.
|
|
53
|
+
*
|
|
54
|
+
* Choose this method over an autorun when you wish to explicitly declare which observables
|
|
55
|
+
* should be tracked. A common pattern is to have the track function return these
|
|
56
|
+
* observables in a simple array or object, which the run function can use as its input or
|
|
57
|
+
* (commonly) ignore. This helps to clarify that the track function is only enumerating
|
|
58
|
+
* the observables to be watched, and not necessarily generating or transforming values.
|
|
59
|
+
*
|
|
60
|
+
* Reactions created in this method will be disposed of automatically when this object is
|
|
61
|
+
* destroyed. They can also be ended/disposed of manually using the native MobX disposer
|
|
62
|
+
* functions returned by this method.
|
|
63
|
+
*
|
|
64
|
+
* @param specs - one or more reactions to add
|
|
65
|
+
* @returns disposer(s) to manually dispose of each created reaction.
|
|
66
|
+
*/
|
|
67
|
+
addReaction(...specs: ReactionSpec<any>[]): IReactionDisposer | IReactionDisposer[];
|
|
68
|
+
/**
|
|
69
|
+
* Add and start one or more managed autoruns.
|
|
70
|
+
*
|
|
71
|
+
* An autorun function will be run on changes to any/all observables read during the last
|
|
72
|
+
* execution of the function. This provides convenient and often very efficient dynamic
|
|
73
|
+
* reactivity. This is a core MobX concept and is important to fully understand when
|
|
74
|
+
* using autorun functions.
|
|
75
|
+
*
|
|
76
|
+
* In some cases, however, it is desirable or more clear to explicitly declare which
|
|
77
|
+
* observables should be tracked and trigger a reaction, regardless of their use within
|
|
78
|
+
* the function itself. See addReaction() above for that functionality.
|
|
79
|
+
*
|
|
80
|
+
* Autoruns created in this method will be disposed of automatically when this object is
|
|
81
|
+
* destroyed. They can also be ended/disposed of manually using the native mobx disposer
|
|
82
|
+
* functions returned by this method.
|
|
83
|
+
*
|
|
84
|
+
* @param specs - one or more autoruns to add
|
|
85
|
+
* @returns disposer(s) to manually dispose of each created autorun.
|
|
86
|
+
*/
|
|
87
|
+
addAutorun(...specs: Array<AutoRunSpec | (() => any)>): IReactionDisposer | Array<IReactionDisposer>;
|
|
88
|
+
/**
|
|
89
|
+
* Set an observable/bindable value.
|
|
90
|
+
*
|
|
91
|
+
* This method is a convenience method for calling the conventional setXXX method
|
|
92
|
+
* for updating a mobx observable given the property name.
|
|
93
|
+
*/
|
|
94
|
+
setBindable(property: string, value: any): void;
|
|
95
|
+
/** @returns a unique id for this object within the lifetime of this document. */
|
|
96
|
+
get xhId(): string;
|
|
97
|
+
/**
|
|
98
|
+
* Mark an object as managed by this object.
|
|
99
|
+
*
|
|
100
|
+
* Managed objects are assumed to hold objects that are created by the referencing object
|
|
101
|
+
* and therefore should be destroyed when the referencing object is destroyed.
|
|
102
|
+
*
|
|
103
|
+
* See also {@link managed}, a decorator that can be used to mark any object held within
|
|
104
|
+
* a given property as managed.
|
|
105
|
+
*
|
|
106
|
+
* @param obj - object to be destroyed when this instance is destroyed
|
|
107
|
+
* @returns object passed
|
|
108
|
+
*/
|
|
109
|
+
markManaged<T>(obj: T): T;
|
|
110
|
+
/**
|
|
111
|
+
* Method to make a class property persistent, syncing its value via a configured
|
|
112
|
+
* `PersistenceProvider` to maintain and restore values across browser sessions.
|
|
113
|
+
*
|
|
114
|
+
* This may be used on any `@observable` or `@bindable` class property which is a primitive.
|
|
115
|
+
* It will initialize the observable's value from the class's default `PersistenceProvider` and
|
|
116
|
+
* will write back any changes to the property to that Provider. If the Provider has not yet
|
|
117
|
+
* been populated with a value, or an error occurs, it will use the value set in-code instead.
|
|
118
|
+
*
|
|
119
|
+
* See also {@link persist} and {@link persist.with} for a decorator that may be used directly
|
|
120
|
+
* on the property declaration itself. Use this method in the general case, when you need to
|
|
121
|
+
* control the timing.
|
|
122
|
+
*
|
|
123
|
+
* @param property - name of property on this object to bind to a persistence provider.
|
|
124
|
+
* @param options - options governing the persistence of this object. These will be applied
|
|
125
|
+
* on top of any default persistWith options defined on the instance itself.
|
|
126
|
+
*/
|
|
127
|
+
markPersist(property: string, options?: PersistOptions): void;
|
|
128
|
+
/** @returns true if this instance has been destroyed. */
|
|
129
|
+
get isDestroyed(): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Clean up resources associated with this object
|
|
132
|
+
*/
|
|
133
|
+
destroy(): void;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Object containing options accepted by MobX 'reaction' API as well as arguments below.
|
|
137
|
+
*/
|
|
138
|
+
export interface ReactionSpec<T = any> extends IReactionOptions<T, any> {
|
|
139
|
+
/**
|
|
140
|
+
* Function returning data to observe - first arg to the underlying reaction() call.
|
|
141
|
+
* Specify this or `when`.
|
|
142
|
+
*/
|
|
143
|
+
track?: () => T;
|
|
144
|
+
/**
|
|
145
|
+
* Function determining when reaction should fire - first arg to the underlying when() call.
|
|
146
|
+
* Specify this or `track`.
|
|
147
|
+
*/
|
|
148
|
+
when?: () => boolean;
|
|
149
|
+
/** Function to run - second arg to underlying reaction()/when() call. */
|
|
150
|
+
run?: (curr?: T, prev?: T) => void;
|
|
151
|
+
/** Specify to debounce run function */
|
|
152
|
+
debounce?: DebounceSpec;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Object containing options accepted by MobX 'autorun' API as well as arguments below.
|
|
156
|
+
*/
|
|
157
|
+
export interface AutoRunSpec extends IAutorunOptions {
|
|
158
|
+
/** Function to run - first arg to underlying autorun() call. */
|
|
159
|
+
run?: () => void;
|
|
160
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decorator to make a property "managed". Managed properties are designed to hold objects that
|
|
3
|
+
* are created by the referencing object and that implement a `destroy()` method.
|
|
4
|
+
*
|
|
5
|
+
* @see HoistBase.markManaged
|
|
6
|
+
*/
|
|
7
|
+
export declare const managed: any;
|
|
8
|
+
/**
|
|
9
|
+
* Decorator to make a class property persistent.
|
|
10
|
+
*
|
|
11
|
+
* This decorator provides the same functionality as {@link HoistBase.markPersist}. See that method
|
|
12
|
+
* for more details.
|
|
13
|
+
*
|
|
14
|
+
* This decorator should always be applied "before" the mobx decorator, i.e. second in file line
|
|
15
|
+
* order: `@bindable @persist fooBarFlag = true`
|
|
16
|
+
*
|
|
17
|
+
* See also `@persist.with`, a higher-order version of this decorator that allows for setting
|
|
18
|
+
* property-specific persistence options.
|
|
19
|
+
*/
|
|
20
|
+
export declare const persist: any;
|