8ea7d4ab6fae0b0b7d8cb2100d6df4e893aa73fea0fb03373ff5d33f165fe058e8e9eb58e359db78b75cafa1ad7eb04b5b0c9c6d14cbfc6599c54f4b2f0182 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var defaults = require('./defaults.js');
  4. var runtime = require('../../../utils/vue/props/runtime.js');
  5. var typescript = require('../../../utils/typescript.js');
  6. const itemSize = runtime.buildProp({
  7. type: runtime.definePropType([Number, Function]),
  8. required: true
  9. });
  10. const estimatedItemSize = runtime.buildProp({
  11. type: Number
  12. });
  13. const cache = runtime.buildProp({
  14. type: Number,
  15. default: 2
  16. });
  17. const direction = runtime.buildProp({
  18. type: String,
  19. values: ["ltr", "rtl"],
  20. default: "ltr"
  21. });
  22. const initScrollOffset = runtime.buildProp({
  23. type: Number,
  24. default: 0
  25. });
  26. const total = runtime.buildProp({
  27. type: Number,
  28. required: true
  29. });
  30. const layout = runtime.buildProp({
  31. type: String,
  32. values: ["horizontal", "vertical"],
  33. default: defaults.VERTICAL
  34. });
  35. const virtualizedProps = runtime.buildProps({
  36. className: {
  37. type: String,
  38. default: ""
  39. },
  40. containerElement: {
  41. type: runtime.definePropType([String, Object]),
  42. default: "div"
  43. },
  44. data: {
  45. type: runtime.definePropType(Array),
  46. default: () => typescript.mutable([])
  47. },
  48. direction,
  49. height: {
  50. type: [String, Number],
  51. required: true
  52. },
  53. innerElement: {
  54. type: [String, Object],
  55. default: "div"
  56. },
  57. style: {
  58. type: runtime.definePropType([Object, String, Array])
  59. },
  60. useIsScrolling: Boolean,
  61. width: {
  62. type: [Number, String],
  63. required: false
  64. },
  65. perfMode: {
  66. type: Boolean,
  67. default: true
  68. },
  69. scrollbarAlwaysOn: Boolean
  70. });
  71. const virtualizedListProps = runtime.buildProps({
  72. cache,
  73. estimatedItemSize,
  74. layout,
  75. initScrollOffset,
  76. total,
  77. itemSize,
  78. ...virtualizedProps
  79. });
  80. const scrollbarSize = {
  81. type: Number,
  82. default: 6
  83. };
  84. const startGap = { type: Number, default: 0 };
  85. const endGap = { type: Number, default: 2 };
  86. const virtualizedGridProps = runtime.buildProps({
  87. columnCache: cache,
  88. columnWidth: itemSize,
  89. estimatedColumnWidth: estimatedItemSize,
  90. estimatedRowHeight: estimatedItemSize,
  91. initScrollLeft: initScrollOffset,
  92. initScrollTop: initScrollOffset,
  93. itemKey: {
  94. type: runtime.definePropType(Function),
  95. default: ({
  96. columnIndex,
  97. rowIndex
  98. }) => `${rowIndex}:${columnIndex}`
  99. },
  100. rowCache: cache,
  101. rowHeight: itemSize,
  102. totalColumn: total,
  103. totalRow: total,
  104. hScrollbarSize: scrollbarSize,
  105. vScrollbarSize: scrollbarSize,
  106. scrollbarStartGap: startGap,
  107. scrollbarEndGap: endGap,
  108. role: String,
  109. ...virtualizedProps
  110. });
  111. const virtualizedScrollbarProps = runtime.buildProps({
  112. alwaysOn: Boolean,
  113. class: String,
  114. layout,
  115. total,
  116. ratio: {
  117. type: Number,
  118. required: true
  119. },
  120. clientSize: {
  121. type: Number,
  122. required: true
  123. },
  124. scrollFrom: {
  125. type: Number,
  126. required: true
  127. },
  128. scrollbarSize,
  129. startGap,
  130. endGap,
  131. visible: Boolean
  132. });
  133. exports.virtualizedGridProps = virtualizedGridProps;
  134. exports.virtualizedListProps = virtualizedListProps;
  135. exports.virtualizedProps = virtualizedProps;
  136. exports.virtualizedScrollbarProps = virtualizedScrollbarProps;
  137. //# sourceMappingURL=props.js.map