@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,49 @@
|
|
|
1
|
+
import { HoistModel, ModelSelector, ModelPublishMode } from './';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a ModelSpec to define how a functional HoistComponent should source its primary backing
|
|
4
|
+
* HoistModel from props or context. Use this option when your component expects its parent to
|
|
5
|
+
* provide its model (or a config to create one).
|
|
6
|
+
*
|
|
7
|
+
* Hoist will look for a model instance in either props or context. If required and so specified,
|
|
8
|
+
* the model can also be created on demand from either a config passed via props or its class defaults.
|
|
9
|
+
*
|
|
10
|
+
* The resolved/constructed model instance will be provided to the component via props and placed
|
|
11
|
+
* in context for access by all subcomponents.
|
|
12
|
+
*
|
|
13
|
+
* Note that any model created via `createFromConfig` or `createDefault` will be considered to be
|
|
14
|
+
* 'owned' by the receiving component and treated as if it were specified using `create()`: if it
|
|
15
|
+
* implements loading it will be loaded on component mount, and it will always be destroyed
|
|
16
|
+
* on component unmount.
|
|
17
|
+
*
|
|
18
|
+
* @param selector - specification of Model to use, or '*' (default) to accept the
|
|
19
|
+
* closest context model, without specifying any particular class.
|
|
20
|
+
* @param opts - additional options
|
|
21
|
+
*/
|
|
22
|
+
export declare function uses<T extends HoistModel>(selector: ModelSelector<T>, { fromContext, publishMode, createFromConfig, createDefault, optional }?: UsesOptions): UsesSpec<T>;
|
|
23
|
+
export interface UsesOptions {
|
|
24
|
+
/** True (default) to look for a suitable model in context if not sourced via props.*/
|
|
25
|
+
fromContext?: boolean;
|
|
26
|
+
/** Mode for publishing this model to context.*/
|
|
27
|
+
publishMode?: ModelPublishMode;
|
|
28
|
+
/**
|
|
29
|
+
* True (default) to accept model config from props and construct an instance on-demand.
|
|
30
|
+
* Selector must be a HoistModel Class.
|
|
31
|
+
*/
|
|
32
|
+
createFromConfig?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* True to create a model if none provided.
|
|
35
|
+
* Selector must be a HoistModel Class, or a custom function may be provided for this argument.
|
|
36
|
+
*/
|
|
37
|
+
createDefault?: boolean | (() => HoistModel);
|
|
38
|
+
/** True to specify a model that is optional. Default false. */
|
|
39
|
+
optional?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare class UsesSpec<T extends HoistModel> {
|
|
42
|
+
fromContext: boolean;
|
|
43
|
+
publishMode: ModelPublishMode;
|
|
44
|
+
optional: boolean;
|
|
45
|
+
selector: ModelSelector<T>;
|
|
46
|
+
createFromConfig: boolean;
|
|
47
|
+
createDefault: boolean;
|
|
48
|
+
constructor(selector: any, fromContext: any, publishMode: any, createFromConfig: any, createDefault: any, optional: any);
|
|
49
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './HoistModel';
|
|
2
|
+
export * from './RefreshContextModel';
|
|
3
|
+
export * from './ManagedRefreshContextModel';
|
|
4
|
+
export * from './RootRefreshContextModel';
|
|
5
|
+
export * from './ModelSelector';
|
|
6
|
+
export * from './ModelLookup';
|
|
7
|
+
export * from './ModelSpec';
|
|
8
|
+
export * from './CreatesSpec';
|
|
9
|
+
export * from './UsesSpec';
|
|
10
|
+
export * from './Hooks';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PersistenceProvider, PersistOptions } from './';
|
|
2
|
+
/**
|
|
3
|
+
* A minimal Persistence provider for use by apps that wish to implement the actual persistence
|
|
4
|
+
* of the backing data via custom handlers.
|
|
5
|
+
*
|
|
6
|
+
* This provider allows applications to use the Persistence API to populate and read state from
|
|
7
|
+
* components without actually writing to any pre-defined storage.
|
|
8
|
+
*/
|
|
9
|
+
export declare class CustomProvider extends PersistenceProvider {
|
|
10
|
+
getData: any;
|
|
11
|
+
setData: any;
|
|
12
|
+
constructor({ getData, setData, ...rest }: PersistOptions);
|
|
13
|
+
readRaw(): any;
|
|
14
|
+
writeRaw(data: any): void;
|
|
15
|
+
clearRaw(): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PersistenceProvider, PersistOptions } from './';
|
|
2
|
+
/**
|
|
3
|
+
* PersistenceProvider that stores state within a DashViewModel.
|
|
4
|
+
*/
|
|
5
|
+
export declare class DashViewProvider extends PersistenceProvider {
|
|
6
|
+
dashViewModel: any;
|
|
7
|
+
constructor({ dashViewModel, ...rest }: PersistOptions);
|
|
8
|
+
readRaw(): any;
|
|
9
|
+
writeRaw(data: any): void;
|
|
10
|
+
clearRaw(): any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PersistenceProvider, PersistOptions } from './';
|
|
2
|
+
/**
|
|
3
|
+
* PersistenceProvider that stores state within the Browser's LocalStorage.
|
|
4
|
+
*/
|
|
5
|
+
export declare class LocalStorageProvider extends PersistenceProvider {
|
|
6
|
+
key: string;
|
|
7
|
+
constructor({ localStorageKey: key, ...rest }: PersistOptions);
|
|
8
|
+
readRaw(): any;
|
|
9
|
+
writeRaw(data: any): void;
|
|
10
|
+
clearRaw(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DebounceSpec } from '../';
|
|
2
|
+
/**
|
|
3
|
+
* Options governing persistence.
|
|
4
|
+
*/
|
|
5
|
+
export interface PersistOptions {
|
|
6
|
+
/** Dot delimited path to store state. */
|
|
7
|
+
path?: string;
|
|
8
|
+
/** Debounce interval in ms, or a lodash debounce config. */
|
|
9
|
+
debounce?: DebounceSpec;
|
|
10
|
+
/**
|
|
11
|
+
* Type of PersistenceProvider to create. If not provided, defaulted based
|
|
12
|
+
* on the presence of `prefKey`, `localStorageKey`, `dashViewModel`, `getData` and `setData`.
|
|
13
|
+
*/
|
|
14
|
+
type?: string;
|
|
15
|
+
/** Predefined Hoist application Preference key used to store state. */
|
|
16
|
+
prefKey?: string;
|
|
17
|
+
/** Browser local storage key used to store state. */
|
|
18
|
+
localStorageKey?: string;
|
|
19
|
+
/** DashViewModel used to read / write view state. */
|
|
20
|
+
dashViewModel?: object;
|
|
21
|
+
/**
|
|
22
|
+
* Function returning blob of data to be used for reading state.
|
|
23
|
+
* Ignored if `prefKey`, `localStorageKey` or `dashViewModel` are provided.
|
|
24
|
+
*/
|
|
25
|
+
getData?: () => any;
|
|
26
|
+
/**
|
|
27
|
+
* Function to be used to write blob of data representing state.
|
|
28
|
+
* Ignored if `prefKey`, `localStorageKey` or `dashViewModel` are provided.
|
|
29
|
+
*/
|
|
30
|
+
setData?: (data: object) => void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DebounceSpec } from '../';
|
|
2
|
+
import { PersistOptions } from './';
|
|
3
|
+
/**
|
|
4
|
+
* Abstract superclass for adaptor objects used by models and components to (re)store state to and
|
|
5
|
+
* from a persistent location, typically a Hoist preference or key within browser local storage.
|
|
6
|
+
*
|
|
7
|
+
* Note that multiple instances of this object may be writing into the same location.
|
|
8
|
+
* Implementations should take care to incorporate any writes immediately into the readable state.
|
|
9
|
+
*
|
|
10
|
+
* Hoist-provided implementations include:
|
|
11
|
+
* - {@link PrefProvider} - stores state in a predefined Hoist application Preference.
|
|
12
|
+
* - {@link LocalStorageProvider} - stores state in browser local storage under a configured key.
|
|
13
|
+
* - {@link DashViewProvider} - stores state with other Dashboard-specific state via a `DashViewModel`.
|
|
14
|
+
* - {@link CustomProvider} - API for app and components to provide their own storage mechanism.
|
|
15
|
+
*/
|
|
16
|
+
export declare class PersistenceProvider {
|
|
17
|
+
get isPersistenceProvider(): boolean;
|
|
18
|
+
path: string;
|
|
19
|
+
debounce: DebounceSpec;
|
|
20
|
+
/**
|
|
21
|
+
* Construct an instance of this class.
|
|
22
|
+
*/
|
|
23
|
+
static create({ type, ...rest }: PersistOptions): PersistenceProvider;
|
|
24
|
+
/**
|
|
25
|
+
* Called by implementations only. See create.
|
|
26
|
+
*/
|
|
27
|
+
protected constructor({ path, debounce }: PersistOptions);
|
|
28
|
+
/**
|
|
29
|
+
* Read data at a path
|
|
30
|
+
*/
|
|
31
|
+
read(): any;
|
|
32
|
+
/**
|
|
33
|
+
* Save data at a path
|
|
34
|
+
* @param data - data to be written to the path, must be serializable to JSON.
|
|
35
|
+
*/
|
|
36
|
+
write(data: any): void;
|
|
37
|
+
/**
|
|
38
|
+
* Clear any state saved by this object at a path
|
|
39
|
+
*/
|
|
40
|
+
clear(path?: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Clear *all* state held by this object.
|
|
43
|
+
*/
|
|
44
|
+
clearAll(): void;
|
|
45
|
+
protected writeInternal(data: object): void;
|
|
46
|
+
protected writeRaw(obj: object): void;
|
|
47
|
+
protected readRaw(): object;
|
|
48
|
+
protected clearRaw(): void;
|
|
49
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PersistenceProvider, PersistOptions } from './';
|
|
2
|
+
/**
|
|
3
|
+
* PersistenceProvider that stores state within the Hoist Preferences system.
|
|
4
|
+
*/
|
|
5
|
+
export declare class PrefProvider extends PersistenceProvider {
|
|
6
|
+
key: string;
|
|
7
|
+
constructor({ prefKey: key, ...rest }: PersistOptions);
|
|
8
|
+
readRaw(): any;
|
|
9
|
+
writeRaw(data: any): void;
|
|
10
|
+
clearRaw(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { RuleLike } from '@xh/hoist/data';
|
|
2
|
+
import { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import { LoadSpec } from '../load';
|
|
4
|
+
import { Intent, Thunkable } from './Types';
|
|
5
|
+
/**
|
|
6
|
+
* User of the application, as loaded from the server.
|
|
7
|
+
*
|
|
8
|
+
* Note that instances of this class may contain other custom properties serialize by an
|
|
9
|
+
* application. Applications may wish to extend this interface
|
|
10
|
+
*/
|
|
11
|
+
export interface HoistUser {
|
|
12
|
+
username: string;
|
|
13
|
+
email: string;
|
|
14
|
+
displayName: string;
|
|
15
|
+
roles: string[];
|
|
16
|
+
isHoistAdmin: boolean;
|
|
17
|
+
isHoistAdminReader: boolean;
|
|
18
|
+
hasRole(s: string): boolean;
|
|
19
|
+
hasGate(s: string): boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Enhanced Response returned by FetchService.
|
|
23
|
+
*/
|
|
24
|
+
export interface FetchResponse extends Response {
|
|
25
|
+
/**
|
|
26
|
+
* Property containing the already-awaited output of `response.text()`.
|
|
27
|
+
*/
|
|
28
|
+
responseText: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Options for showing a "toast" notification that appears and then automatically dismisses.
|
|
32
|
+
*/
|
|
33
|
+
export interface ToastSpec {
|
|
34
|
+
message: ReactNode;
|
|
35
|
+
icon?: ReactElement;
|
|
36
|
+
intent?: Intent;
|
|
37
|
+
/**
|
|
38
|
+
* Time in ms to show before auto-dismissing the toast, or null to keep toast
|
|
39
|
+
* visible until manually dismissed. Default 3000.
|
|
40
|
+
*/
|
|
41
|
+
timeout?: number;
|
|
42
|
+
/**
|
|
43
|
+
* If provided, will render a button within the toast to enable the user to take some
|
|
44
|
+
* specific action right from the toast.
|
|
45
|
+
*/
|
|
46
|
+
actionButtonProps?: any;
|
|
47
|
+
/**
|
|
48
|
+
* Relative position at which to display toast, e.g. "bottom-right" (default) or "top".
|
|
49
|
+
* (Desktop only.)
|
|
50
|
+
*/
|
|
51
|
+
position?: string;
|
|
52
|
+
/**
|
|
53
|
+
* DOM element relative to which the toast should be positioned. If null, Toast will show
|
|
54
|
+
* along edge of overall document. (Desktop only.)
|
|
55
|
+
*/
|
|
56
|
+
containerRef?: HTMLElement;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Options for showing a modal alert, confirm, or prompt.
|
|
60
|
+
*/
|
|
61
|
+
export interface MessageSpec {
|
|
62
|
+
message?: ReactNode;
|
|
63
|
+
title?: string;
|
|
64
|
+
icon?: ReactElement;
|
|
65
|
+
className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Unique key identifying the message. If subsequent messages.
|
|
68
|
+
* If subsequent messages are triggered with this key, they will replace this message.
|
|
69
|
+
* Useful for usages that may be producing messages recursively, or via timers and wish to
|
|
70
|
+
* avoid generating a large stack of duplicates.
|
|
71
|
+
*/
|
|
72
|
+
messageKey?: string;
|
|
73
|
+
/** Config for input to be displayed (as a prompt). */
|
|
74
|
+
input?: {
|
|
75
|
+
/** An element specifying a HoistInput, defaults to a platform appropriate TextInput. */
|
|
76
|
+
item?: ReactElement;
|
|
77
|
+
/** Validation constraints to apply. */
|
|
78
|
+
rules?: RuleLike[];
|
|
79
|
+
/** Initial value for the input. */
|
|
80
|
+
initialValue?: any;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Props for primary confirm button.
|
|
84
|
+
* Must provide either text or icon for button to be displayed, or use a preconfigured
|
|
85
|
+
* helper such as `XH.alert()` or `XH.confirm()` for default buttons.
|
|
86
|
+
*/
|
|
87
|
+
confirmProps?: any;
|
|
88
|
+
/**
|
|
89
|
+
* Props for secondary cancel button.
|
|
90
|
+
* Must provide either text or icon for button to be displayed, or use a preconfigured
|
|
91
|
+
* helper such as `XH.alert()` or `XH.confirm()` for default buttons.
|
|
92
|
+
*/
|
|
93
|
+
cancelProps?: any;
|
|
94
|
+
/**
|
|
95
|
+
* Specify 'left' to place the Cancel button (if shown) on the
|
|
96
|
+
* left edge of the dialog toolbar, with a filler between it and Confirm.
|
|
97
|
+
*/
|
|
98
|
+
cancelAlign?: any;
|
|
99
|
+
/** Callback to execute when confirm is clicked.*/
|
|
100
|
+
onConfirm?(): any;
|
|
101
|
+
/** Callback to execute when cancel is clicked.*/
|
|
102
|
+
onCancel?(): any;
|
|
103
|
+
/** Flag to specify whether a popup can be clicked out of or escaped.*/
|
|
104
|
+
dismissable?: boolean;
|
|
105
|
+
/** Flag to specify whether onCancel is executed when clicking out of or escaping a popup. */
|
|
106
|
+
cancelOnDismiss?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Configuration object for an app-wide banner.
|
|
110
|
+
*/
|
|
111
|
+
export interface BannerSpec {
|
|
112
|
+
message?: ReactNode;
|
|
113
|
+
icon?: ReactElement;
|
|
114
|
+
intent?: Intent;
|
|
115
|
+
className?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Determines order in which banner will be displayed.
|
|
118
|
+
* If not provided, banner will be placed below any existing banners.
|
|
119
|
+
* @see BannerModel.BANNER_SORTS
|
|
120
|
+
*/
|
|
121
|
+
sortOrder?: number;
|
|
122
|
+
/**
|
|
123
|
+
* Showing a banner with a given category will hide any
|
|
124
|
+
* preexisting banner with the same category.
|
|
125
|
+
*/
|
|
126
|
+
category?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Callback function triggered when the user clicks the close button.
|
|
129
|
+
* (Note, banners closed via `XH.hideBanner()` or when the max
|
|
130
|
+
* number of banners shown is exceeded will NOT trigger this callback.)
|
|
131
|
+
*/
|
|
132
|
+
onClose?(model: any): any;
|
|
133
|
+
/**
|
|
134
|
+
* Callback function triggered when the user clicks on the banner.
|
|
135
|
+
*/
|
|
136
|
+
onClick?(model: any): any;
|
|
137
|
+
/**
|
|
138
|
+
* If provided, will render a button within the banner to enable the user to
|
|
139
|
+
* take some specific action right from the banner.
|
|
140
|
+
*/
|
|
141
|
+
actionButtonProps?: object;
|
|
142
|
+
/** Enable the Banner to be closed? Defaults to true. */
|
|
143
|
+
enableClose?: boolean;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Option for Application option in the application.
|
|
147
|
+
*/
|
|
148
|
+
export interface AppOptionSpec {
|
|
149
|
+
name: string;
|
|
150
|
+
prefName?: string;
|
|
151
|
+
/** Config for FormField for this option. */
|
|
152
|
+
formField: any;
|
|
153
|
+
/** Config for FieldModel for the option.*/
|
|
154
|
+
fieldModel?: any;
|
|
155
|
+
/** Function, possibly async, which returns the value. */
|
|
156
|
+
valueGetter?: () => any;
|
|
157
|
+
/** Function, possibly async, which sets the value. */
|
|
158
|
+
valueSetter?: (s: any) => any;
|
|
159
|
+
/** True to reload the app after changing this option. Default false. */
|
|
160
|
+
reloadRequired?: boolean;
|
|
161
|
+
/** Optional flag to omit displaying option. */
|
|
162
|
+
omit?: Thunkable<boolean>;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Options for tracking activity on the server via TrackService.
|
|
166
|
+
*/
|
|
167
|
+
export interface TrackOptions {
|
|
168
|
+
/** Short description of the activity being tracked. */
|
|
169
|
+
message: string;
|
|
170
|
+
/** App-supplied category.*/
|
|
171
|
+
category?: string;
|
|
172
|
+
/** App-supplied data to save along with track log.*/
|
|
173
|
+
data?: object | object[];
|
|
174
|
+
/**
|
|
175
|
+
* Flag to indicate relative importance of activity.
|
|
176
|
+
* Default 'INFO'. Note, errors should be tracked via {@link XH.handleException}, which
|
|
177
|
+
* will post to the server for dedicated logging if requested.
|
|
178
|
+
*/
|
|
179
|
+
severity?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Set to true to log this message only once during the current session. The category and
|
|
182
|
+
* message text will be used as a compound key to identify repeated messages.
|
|
183
|
+
*/
|
|
184
|
+
oncePerSession?: boolean;
|
|
185
|
+
/** Optional LoadSpec associated with this track.*/
|
|
186
|
+
loadSpec?: LoadSpec;
|
|
187
|
+
/** Elapsed time (ms) for action. */
|
|
188
|
+
elapsed?: number;
|
|
189
|
+
/** Optional flag to omit sending message. */
|
|
190
|
+
omit?: Thunkable<boolean>;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Basic interface for a MenuItem to appear in a menu.
|
|
194
|
+
*
|
|
195
|
+
* MenuItems can be displayed within a context menu, or shown when clicking on a button.
|
|
196
|
+
*/
|
|
197
|
+
export interface MenuItem {
|
|
198
|
+
/** Label to be displayed. */
|
|
199
|
+
text: ReactNode;
|
|
200
|
+
/** Icon to be displayed. */
|
|
201
|
+
icon?: ReactElement;
|
|
202
|
+
/** Intent to be used for rendering the action. */
|
|
203
|
+
intent?: Intent;
|
|
204
|
+
/** Executed when the user clicks the menu item. */
|
|
205
|
+
actionFn?: () => void;
|
|
206
|
+
/** Executed before the item is shown. Use to adjust properties dynamically. */
|
|
207
|
+
prepareFn?: (me: MenuItem) => void;
|
|
208
|
+
/** Child menu items. */
|
|
209
|
+
items?: MenuItemLike[];
|
|
210
|
+
/** True to disable this item. */
|
|
211
|
+
disabled?: boolean;
|
|
212
|
+
/** True to hide this item. May be set dynamically via prepareFn.*/
|
|
213
|
+
hidden?: boolean;
|
|
214
|
+
/** True to skip this item. May be set dynamically via prepareFn. Alias for hidden. */
|
|
215
|
+
omit?: Thunkable<boolean>;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* An item that can exist in a Menu.
|
|
219
|
+
*
|
|
220
|
+
* Allows for a ReactNode as divider. If strings are specified, the implementations may choose
|
|
221
|
+
* an appropriate default display, with '-' providing a standard textless divider that will also
|
|
222
|
+
* be de-duped if appearing at the beginning, or end, or adjacent to another divider at render time.
|
|
223
|
+
*/
|
|
224
|
+
export type MenuItemLike = MenuItem | ReactNode;
|
|
225
|
+
/**
|
|
226
|
+
* An option to be passed to Select controls
|
|
227
|
+
*/
|
|
228
|
+
export interface SelectOption {
|
|
229
|
+
value?: any;
|
|
230
|
+
label?: string;
|
|
231
|
+
options?: (SelectOption | any)[];
|
|
232
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ElementFactory } from '@xh/hoist/core';
|
|
2
|
+
import { LocalDate } from '@xh/hoist/utils/datetime';
|
|
3
|
+
import { MomentInput } from 'moment';
|
|
4
|
+
import { Component, FunctionComponent, ReactElement } from 'react';
|
|
5
|
+
import { DebounceSettings } from 'lodash';
|
|
6
|
+
/** Values available for intents. */
|
|
7
|
+
export type Intent = 'primary' | 'success' | 'warning' | 'danger';
|
|
8
|
+
/** Values available for App Theme. */
|
|
9
|
+
export type Theme = 'system' | 'dark' | 'light';
|
|
10
|
+
export type Side = 'top' | 'bottom' | 'left' | 'right';
|
|
11
|
+
export type VSide = 'top' | 'bottom';
|
|
12
|
+
export type HSide = 'left' | 'right';
|
|
13
|
+
export type Corner = 'tl' | 'tr' | 'bl' | 'br';
|
|
14
|
+
export type HAlign = 'left' | 'right' | 'center';
|
|
15
|
+
export type VAlign = 'top' | 'bottom' | 'center';
|
|
16
|
+
/** Convenience type for common pattern of accepting a single T, or an array of Ts. */
|
|
17
|
+
export type Some<T> = T | T[];
|
|
18
|
+
export type Thunkable<T> = T | (() => T);
|
|
19
|
+
export type Awaitable<T> = Promise<T> | T;
|
|
20
|
+
/** Convenience type for a "plain", string-keyed object holding any kind of values. */
|
|
21
|
+
export type PlainObject = Record<string, any>;
|
|
22
|
+
/**
|
|
23
|
+
* Specification for debouncing in Hoist.
|
|
24
|
+
*
|
|
25
|
+
* When specified as object, should contain an 'interval' and other optional keys for
|
|
26
|
+
* lodash. If specified as number the default lodash debounce will be used.
|
|
27
|
+
*/
|
|
28
|
+
export type DebounceSpec = number | (DebounceSettings & {
|
|
29
|
+
interval: number;
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Argument passed to components that create views on demand.
|
|
33
|
+
*
|
|
34
|
+
* Used by the TabContainer, DashContainer, DockView, and Navigator APIs to process the 'content'
|
|
35
|
+
* configs provided to them for their tabs and views.
|
|
36
|
+
*
|
|
37
|
+
* Can be a ReactElement, HoistComponent or function. If a function, it may be an ElemFactory or any
|
|
38
|
+
* function that returns a ReactElement. In either case, the function will be called with no arguments.
|
|
39
|
+
*/
|
|
40
|
+
export type Content = ReactElement | FunctionComponent | Component | ElementFactory | (() => ReactElement);
|
|
41
|
+
export type DateLike = Date | LocalDate | MomentInput;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Rule, RuleLike } from './validation/Rule';
|
|
2
|
+
/**
|
|
3
|
+
* Constructor arguments for a Hoist data package Field.
|
|
4
|
+
*/
|
|
5
|
+
export interface FieldSpec {
|
|
6
|
+
/** Unique key representing this field. */
|
|
7
|
+
name: string;
|
|
8
|
+
/** default `'auto` indicates no conversion.*/
|
|
9
|
+
type?: FieldType;
|
|
10
|
+
/**
|
|
11
|
+
* User-facing / longer name for display, defaults to `name`
|
|
12
|
+
* transformed via `genDisplayName()` (e.g. 'myField' translates to 'My Field').
|
|
13
|
+
*/
|
|
14
|
+
displayName?: string;
|
|
15
|
+
/** Value to be used for records with a null, or non-existent value. */
|
|
16
|
+
defaultValue?: any;
|
|
17
|
+
/** Rules to apply to this field. */
|
|
18
|
+
rules?: RuleLike[];
|
|
19
|
+
/**
|
|
20
|
+
* True to disable built-in XSS (cross-site scripting) protection, applied by default to all
|
|
21
|
+
* incoming String values using {@link https://github.com/cure53/DOMPurify | DOMPurify}.
|
|
22
|
+
*
|
|
23
|
+
* DOMPurify provides fast escaping of dangerous HTML, scripting, and other content that can be
|
|
24
|
+
* used to execute XSS attacks, while allowing common and expected HTML and style tags.
|
|
25
|
+
*
|
|
26
|
+
* Please contact XH if you find yourself needing to disable this protection!
|
|
27
|
+
*/
|
|
28
|
+
disableXssProtection?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** Metadata for an individual data field within a {@link StoreRecord}. */
|
|
31
|
+
export declare class Field {
|
|
32
|
+
get isField(): boolean;
|
|
33
|
+
readonly name: string;
|
|
34
|
+
readonly type: FieldType;
|
|
35
|
+
readonly displayName: string;
|
|
36
|
+
readonly defaultValue: any;
|
|
37
|
+
readonly rules: Rule[];
|
|
38
|
+
readonly disableXssProtection: boolean;
|
|
39
|
+
constructor({ name, type, displayName, defaultValue, rules, disableXssProtection }: FieldSpec);
|
|
40
|
+
parseVal(val: any): any;
|
|
41
|
+
isEqual(val1: any, val2: any): boolean;
|
|
42
|
+
private processRuleSpecs;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Parse a value according to a field type.
|
|
46
|
+
* @param val - raw value to parse.
|
|
47
|
+
* @param type - data type of the field to use for possible conversion.
|
|
48
|
+
* @param defaultValue - typed value to return if `val` undefined or null.
|
|
49
|
+
* @param disableXssProtection - true to disable XSS (cross-site scripting) protection.
|
|
50
|
+
* @see {@link FieldConfig} docs for additional details.
|
|
51
|
+
* @returns resulting value, potentially parsed or cast as per type.
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseFieldValue(val: any, type: FieldType, defaultValue?: any, disableXssProtection?: boolean): any;
|
|
54
|
+
/** Data types for Fields used within Hoist Store Records and Cubes. */
|
|
55
|
+
export declare const FieldType: Readonly<{
|
|
56
|
+
TAGS: "tags";
|
|
57
|
+
AUTO: "auto";
|
|
58
|
+
BOOL: "bool";
|
|
59
|
+
DATE: "date";
|
|
60
|
+
INT: "int";
|
|
61
|
+
JSON: "json";
|
|
62
|
+
LOCAL_DATE: "localDate";
|
|
63
|
+
NUMBER: "number";
|
|
64
|
+
PWD: "pwd";
|
|
65
|
+
STRING: "string";
|
|
66
|
+
}>;
|
|
67
|
+
export type FieldType = (typeof FieldType)[keyof typeof FieldType];
|
|
68
|
+
/**
|
|
69
|
+
* @param fieldName - short name / code for a field.
|
|
70
|
+
* @returns fieldName transformed into user-facing / longer name for display.
|
|
71
|
+
*/
|
|
72
|
+
export declare function genDisplayName(fieldName: string): string;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { Intent, PlainObject } from '../core';
|
|
3
|
+
import { StoreRecord } from './StoreRecord';
|
|
4
|
+
import { GridModel, Column } from '../cmp/grid';
|
|
5
|
+
export interface RecordActionSpec {
|
|
6
|
+
/** Label to be displayed. */
|
|
7
|
+
text?: string;
|
|
8
|
+
/** Additional label to be displayed, usually in a minimal fashion.*/
|
|
9
|
+
secondaryText?: string;
|
|
10
|
+
/** Icon to be displayed.*/
|
|
11
|
+
icon?: ReactElement;
|
|
12
|
+
/** Intent to be used for rendering the action.*/
|
|
13
|
+
intent?: Intent;
|
|
14
|
+
/** Css class name to be added when rendering the action. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Tooltip to display when hovering over the action. */
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
/** Function called on action execution. */
|
|
19
|
+
actionFn?: (data: ActionFnData) => void;
|
|
20
|
+
/** Function called prior to showing this item. */
|
|
21
|
+
displayFn?: (data: DisplayFnData) => PlainObject;
|
|
22
|
+
/** Sub-actions for this action. */
|
|
23
|
+
items?: RecordActionLike[];
|
|
24
|
+
/** True to disable this item. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** True to hide this item. */
|
|
27
|
+
hidden?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Count of records that must be 'active' (selected and / or clicked upon) for the action to be
|
|
30
|
+
* enabled.
|
|
31
|
+
* - int: specifies exactly n number of records. Defaults to 1 for single record actions.
|
|
32
|
+
* Can specify 0 to only enable action if *no* records are active.
|
|
33
|
+
* - true: specifies a non-zero number of records.
|
|
34
|
+
* - false: specifies any number of records (0 - infinity, inclusive). Always active.
|
|
35
|
+
*/
|
|
36
|
+
recordsRequired?: boolean | number;
|
|
37
|
+
}
|
|
38
|
+
export type RecordActionLike = RecordAction | RecordActionSpec | '-';
|
|
39
|
+
/**
|
|
40
|
+
* Data passed to the Action Function of a RecordAction
|
|
41
|
+
*/
|
|
42
|
+
export interface ActionFnData {
|
|
43
|
+
/** The triggering action itself. */
|
|
44
|
+
action?: RecordAction;
|
|
45
|
+
/** Row data object (entire row, if any).*/
|
|
46
|
+
record?: any;
|
|
47
|
+
/** All currently selected records (if any).*/
|
|
48
|
+
selectedRecords?: StoreRecord[];
|
|
49
|
+
/** Grid model where action occurred (if any). */
|
|
50
|
+
gridModel?: GridModel;
|
|
51
|
+
/** Column where action occurred (if any). */
|
|
52
|
+
column?: Column;
|
|
53
|
+
/** Additional data provided by the context where this action presides */
|
|
54
|
+
[x: string]: any;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A RecordAction encapsulates a shared set of configuration for items within components such as
|
|
58
|
+
* a Grid Context Menu nd RecordActionBar (aka grid context menus and action columns).
|
|
59
|
+
*
|
|
60
|
+
* Components passed these actions will render them with an appropriate UI (e.g. menu item, button)
|
|
61
|
+
* and call their `actionFn` when clicked, passing it a data object (if available) sourced from the
|
|
62
|
+
* selected row(s) or node(s) on the underlying grid or data view.
|
|
63
|
+
*
|
|
64
|
+
* The `displayFn` callback allows apps to customize any display properties of the action prior to
|
|
65
|
+
* each render by returning an object with keys/values to override (e.g. `{hidden: true}`).
|
|
66
|
+
*
|
|
67
|
+
* NOTE that both `actionFn` and `displayFn` can be called with a null record - e.g. when showing a
|
|
68
|
+
* context menu on a full-width grid group row, where there is no backing record for the row.
|
|
69
|
+
* Applications should ensure these callbacks handle their `record` param in a null-safe manner.
|
|
70
|
+
*
|
|
71
|
+
* @see RecordActionBar
|
|
72
|
+
* @see GridContextMenuSpec
|
|
73
|
+
*/
|
|
74
|
+
export declare class RecordAction {
|
|
75
|
+
text: string;
|
|
76
|
+
secondaryText: string;
|
|
77
|
+
icon: ReactElement;
|
|
78
|
+
intent: Intent;
|
|
79
|
+
className: string;
|
|
80
|
+
tooltip: string;
|
|
81
|
+
actionFn: (data: ActionFnData) => void;
|
|
82
|
+
displayFn: (data: DisplayFnData) => PlainObject;
|
|
83
|
+
items: Array<RecordAction | string>;
|
|
84
|
+
disabled: boolean;
|
|
85
|
+
hidden: boolean;
|
|
86
|
+
recordsRequired: boolean | number;
|
|
87
|
+
constructor({ text, secondaryText, icon, intent, className, tooltip, actionFn, items, disabled, hidden, displayFn, recordsRequired }: RecordActionSpec);
|
|
88
|
+
/**
|
|
89
|
+
* Called by UI elements to get the display configuration for rendering the action.
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
getDisplaySpec({ record, selectedRecords, gridModel, column, ...rest }: ActionFnData): {
|
|
93
|
+
icon: ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
94
|
+
text: string;
|
|
95
|
+
secondaryText: string;
|
|
96
|
+
intent: Intent;
|
|
97
|
+
className: string;
|
|
98
|
+
tooltip: string;
|
|
99
|
+
items: (string | RecordAction)[];
|
|
100
|
+
hidden: boolean;
|
|
101
|
+
disabled: boolean;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Called by UI elements to trigger the action.
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
call({ record, selectedRecords, gridModel, column, ...rest }: ActionFnData): void;
|
|
108
|
+
private meetsRecordRequirement;
|
|
109
|
+
}
|
|
110
|
+
interface DisplayFnData extends ActionFnData {
|
|
111
|
+
/** Default display config for the action */
|
|
112
|
+
defaultConfig?: PlainObject;
|
|
113
|
+
}
|
|
114
|
+
export {};
|