types.ts 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * <<
  3. * Davinci
  4. * ==
  5. * Copyright (C) 2016 - 2017 EDP
  6. * ==
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. * >>
  19. */
  20. import {
  21. ILayerFormed,
  22. IBaseline,
  23. LayersOperationInfo
  24. } from './components/types'
  25. import { ISlideFormed } from 'containers/Viz/types'
  26. import { ActionTypes as VizActionTypes } from 'containers/Viz/constants'
  27. import { ActionTypes } from './constants'
  28. import { IQueryConditions } from 'containers/Dashboard/types'
  29. import { RenderType } from 'containers/Widget/components/Widget'
  30. import { IWidgetFormed } from 'containers/Widget/types'
  31. import { ISharePanel, TShareVizsType } from 'app/components/SharePanel/types'
  32. export interface ILayerInfo {
  33. datasource: {
  34. pageNo?: number
  35. pageSize?: number
  36. resultList: any[]
  37. totalCount?: number
  38. }
  39. loading: boolean
  40. queryConditions?: Partial<IQueryConditions>
  41. interactId?: string
  42. rendered?: boolean
  43. renderType?: RenderType
  44. }
  45. interface IDisplayLoading {
  46. shareToken: boolean
  47. slideLayers: boolean
  48. }
  49. export interface IDisplayState {
  50. currentDisplayShareToken: string
  51. currentDisplayAuthorizedShareToken: string
  52. currentDisplayPasswordShareToken: string
  53. currentDisplayPasswordPassword: string
  54. currentDisplaySelectOptions: object
  55. currentSlideId: number
  56. currentDisplayWidgets: { [widgetId: number]: IWidgetFormed }
  57. slideLayers: { [slideId: number]: { [layerId: number]: ILayerFormed } }
  58. slideLayersInfo: { [slideId: number]: { [layerId: number]: ILayerInfo } }
  59. slideLayersOperationInfo: {
  60. [slideId: number]: LayersOperationInfo
  61. }
  62. clipboardSlides: ISlideFormed[]
  63. clipboardLayers: ILayerFormed[]
  64. lastOperationType: keyof typeof ActionTypes | keyof typeof VizActionTypes
  65. lastLayers: ILayerFormed[]
  66. editorBaselines: IBaseline[]
  67. operateItemParams: ILayerFormed[]
  68. sharePanel: IDisplaySharePanelState
  69. loading: IDisplayLoading
  70. }
  71. export interface IDisplaySharePanelState
  72. extends Pick<ISharePanel, 'id' | 'type' | 'title'> {
  73. visible: boolean
  74. }
  75. export { TShareVizsType }