Browse Source

RollBACK ans-ui (#1058)

* Delete third party import license

* Resource authorization add file resource and UDF resource tab

* Solve the problem that the initial value of timing is not assigned and the period cannot be selected if the second is selected.

* revert

* Modification date format and page signature

* Upgrade ANSY UI to version 0.1.46

* Flink version migration

* Upload file size is limited to 1G

* Modify description field

* RollBACK ans-ui
pull/2/head
break60 5 years ago committed by lgcareer
parent
commit
d429bf5e37
  1. 2
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/ans-ui.min.css
  2. 6
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/ans-ui.min.js
  3. BIN
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/font/iconfont.eot
  4. 13
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/font/iconfont.svg
  5. BIN
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/font/iconfont.ttf
  6. BIN
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/font/iconfont.woff
  7. 95
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/package.json
  8. 3
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/README.md
  9. 1
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/src/source/base/index.js
  10. 29
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/src/source/layer/message/message.js
  11. 13
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/src/source/layer/modal/modal.js
  12. 30
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/src/source/layer/notice/notice.js
  13. 1
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-checkbox/README.md
  14. 31
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-checkbox/example/app.vue
  15. 6
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-checkbox/src/source/Checkbox.vue
  16. 8
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-checkbox/src/source/CheckboxGroup.vue
  17. 3
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/base/day.vue
  18. 117
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/base/time.vue
  19. 4
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/datepicker.vue
  20. 226
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/panel/date.vue
  21. 870
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/panel/daterange.vue
  22. 80
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/panel/month.vue
  23. 646
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/date.js
  24. 22
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/isType.js
  25. 24
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/isValid.js
  26. 28
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/ishms.js
  27. 16
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/todate.js
  28. 3
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-drawer/README.md
  29. 2
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-input/src/source/Input.vue
  30. 8
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-poptip/src/source/Poptip.vue
  31. 8
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-scroller/README.md
  32. 17
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-scroller/src/source/HorizontalScrollbar.vue
  33. 163
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-scroller/src/source/Scroller.vue
  34. 19
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-scroller/src/source/VerticalScrollbar.vue
  35. 9
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/README.md
  36. 2
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/example/dynamic.vue
  37. 2
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/example/index.js
  38. 125
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/example/manual.vue
  39. 21
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/example/navigation.vue
  40. 38
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/src/source/Option.vue
  41. 157
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/src/source/Select.vue
  42. 29
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/src/source/SelectDropdown.vue
  43. 2
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-switch/example/app.vue
  44. 15
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/README.md
  45. 5
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/app.vue
  46. 2
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/index.js
  47. 33
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/paging.vue
  48. 17
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/restrict.vue
  49. 14
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/tree.vue
  50. 51
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/CellRenderer.vue
  51. 382
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/Table.vue
  52. 79
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableBody.vue
  53. 40
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableColumn.vue
  54. 147
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableHeader.vue
  55. 100
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableTd.vue
  56. 26
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableTh.vue
  57. 43
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/cellRenderer.js
  58. 129
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/layout.js
  59. 5
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/layoutObserver.js
  60. 668
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/store.js
  61. 348
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/util.js
  62. 4
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-timepicker/example/app.vue
  63. 159
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-timepicker/src/source/Timepicker.vue
  64. 10
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/README.md
  65. 12
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/example/app.vue
  66. 34
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/src/source/Tooltip.vue
  67. 25
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/src/source/directive.js
  68. 25
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/src/source/factory.js
  69. 14
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/index.js
  70. 1196
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/attentionSeekers.scss
  71. 706
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/bouncingEntrances.scss
  72. 344
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/bouncingExits.scss
  73. 490
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/fadingEntrances.scss
  74. 422
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/fadingExits.scss
  75. 578
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/flippers.scss
  76. 142
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/lightspeed.scss
  77. 360
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/rotatingEntrances.scss
  78. 318
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/rotatingExits.scss
  79. 228
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/slidingEntrances.scss
  80. 184
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/slidingExits.scss
  81. 344
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/specials.scss
  82. 336
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/zoomEntrances.scss
  83. 346
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/zoomExits.scss
  84. 78
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/common.scss
  85. 15
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/checkbox/checkbox.scss
  86. 11
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/input/input.scss
  87. 8
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/select/select.scss
  88. 7
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/switch/switch.scss
  89. 67
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/table/table.scss
  90. 18
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/tooltip/tooltip.scss
  91. 125
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font.scss
  92. BIN
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font/iconfont.eot
  93. 13
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font/iconfont.svg
  94. BIN
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font/iconfont.ttf
  95. BIN
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font/iconfont.woff
  96. 36
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/vars.scss
  97. 30
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/util/directives/mousewheel.js
  98. 45
      dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/util/mixins/popper.js

2
dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/ans-ui.min.css vendored

File diff suppressed because one or more lines are too long

6
dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/ans-ui.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/font/iconfont.eot

Binary file not shown.

13
dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/font/iconfont.svg

@ -26,10 +26,10 @@ Created by iconfont
<glyph glyph-name="filter" unicode="&#58936;" d="M440.6096818342152-61.1951791181657c-7.411231604938271 0-14.823619047619045 3.7056158024691355-18.528079012345678 3.7056158024691355-11.118003245149911 7.411231604938271-18.53039068783069 22.234850652557316-18.53039068783069 33.351698059964725V298.27035880070537L77.4373722751323 768.9113058201058c-7.411231604938271 11.116847407407407-11.116847407407407 25.940466455026453-3.7056158024691355 40.7640855026455 7.412387442680775 11.116847407407407 18.529234850088184 18.528079012345678 33.352853897707234 18.528079012345678H922.3686320987654c14.823619047619045 0 25.940466455026453-7.4100757671957656 33.351698059964725-18.528079012345678 7.412387442680775-11.116847407407407 3.7056158024691355-25.940466455026453-3.7056158024691355-37.05846970017637L625.9020303350969 298.27035880070537v-248.29128465608463c0-14.823619047619045-7.412387442680775-25.940466455026453-22.234850652557316-33.352853897707234L455.4333008818342-57.489563315696614c-3.7056158024691355-3.7056158024691355-7.411231604938271-3.7056158024691355-14.823619047619045-3.7056158024691355z" horiz-adv-x="1024" />
<glyph glyph-name="search" unicode="&#59449;" d="M949.248-2.048000000000002c7.168-8.192 10.752-16.896 10.752-26.112 0-9.216-3.584-17.408-10.752-25.088-7.168-7.168-15.872-10.752-25.088-10.752-9.216 0-17.92 3.584-25.088 10.752l-205.824 204.8c-33.28-27.136-70.656-48.64-112.64-64.512-41.472-15.872-86.016-23.552-132.608-23.552-108.544 2.56-199.168 39.936-271.36 112.64-72.192 72.192-110.08 162.816-112.64 271.36 2.56 108.544 39.936 199.168 112.64 271.36 72.192 72.192 162.816 110.08 271.36 112.64 108.544-2.56 199.168-39.936 271.36-112.64 72.192-72.192 110.08-162.816 112.64-271.36 0-46.592-7.68-90.624-23.552-132.608-15.872-41.472-37.376-79.36-64.512-112.64l205.824-204.8h-0.512z m-280.576 229.376c29.184 29.184 51.712 62.464 67.584 99.84 15.872 37.888 24.064 77.824 24.064 120.32s-8.192 82.944-24.064 120.32c-15.872 37.888-38.4 71.168-67.584 99.84S606.208 719.8720000000001 568.32 736.256c-37.888 15.872-77.824 24.064-120.32 24.064S365.056 752.1279999999999 327.68 736.256c-37.888-15.872-71.168-38.4-99.84-67.584S176.128 606.2080000000001 160.256 568.3199999999999c-15.872-37.888-24.064-77.824-24.064-120.32s8.192-82.944 24.064-120.32c15.872-37.888 38.4-71.168 67.584-99.84s62.464-51.712 99.84-67.584c37.888-15.872 77.824-24.064 120.32-24.064s82.944 8.192 120.832 25.088c37.376 14.848 70.656 37.376 99.84 66.048z" horiz-adv-x="1024" />
<glyph glyph-name="check" unicode="&#58953;" d="M400.22 76.49400000000003l569.83 679.097c11.005 13.115 30.558 14.826 43.674 3.82 13.115-11.004 14.826-30.558 3.82-43.673L425.7 10.404999999999973c-11.005-13.115-30.559-14.826-43.674-3.82a31.285 31.285 0 0 0-2.999 2.874l-0.303 0.27L10.78 341.02700000000004c-13.134 11.825-14.194 32.059-2.369 45.192 11.826 13.134 32.06 14.194 45.193 2.369L400.22 76.49400000000003z" horiz-adv-x="1024" />
<glyph glyph-name="check" unicode="&#58953;" d="M400.22 76.49400000000003l569.83 679.097c11.005 13.115 30.558 14.826 43.674 3.82 13.115-11.004 14.826-30.558 3.82-43.673L425.7 10.404999999999973c-11.005-13.115-30.559-14.826-43.674-3.82a31.285 31.285 0 0 0-2.999 2.874l-0.303 0.27L10.78 341.02700000000004c-13.134 11.825-14.194 32.059-2.369 45.192 11.826 13.134 32.06 14.194 45.193 2.369L400.22 76.49400000000003z" horiz-adv-x="1024" />
<glyph glyph-name="search" unicode="&#58956;" d="M700.109 148.63300000000004l-69.093 69.093c-66.65-55.615-152.486-89.088-246.155-89.088-212.078 0-384 171.588-384 383.252C0.86 723.553 172.783 895.14 384.86 895.14c212.077 0 384-171.588 384-383.251 0-95.204-34.782-182.3-92.355-249.322l67.22-67.218c21.836 6.634 46.525 1.318 63.79-15.947l197.667-197.666c24.945-24.945 24.945-65.389 0-90.334-24.945-24.945-65.388-24.945-90.333 0L717.183 89.07000000000005c-16.159 16.16-21.85 38.822-17.074 59.563zM384.861 192.53999999999996c176.716 0 319.972 142.978 319.972 319.35 0 176.371-143.256 319.349-319.972 319.349-176.716 0-319.973-142.978-319.973-319.35 0-176.371 143.257-319.349 319.973-319.349z" horiz-adv-x="1024" />
<glyph glyph-name="off" unicode="&#58957;" d="M272.341 802.669c15.316 8.817 34.88 3.55 43.698-11.767 8.818-15.317 3.55-34.88-11.766-43.699C175.827 673.2570000000001 95 536.463 95 385.54c0-230.303 186.697-417 417-417s417 186.697 417 417c0 150.966-80.872 287.793-209.376 361.724-15.318 8.813-20.592 28.376-11.78 43.695 8.814 15.319 28.377 20.592 43.696 11.78C899.696 717.5 993 559.6379999999999 993 385.537c0-265.648-215.351-481-481-481s-481 215.352-481 481c0 174.052 93.252 331.876 241.341 417.13zM512 896c17.673 0 32-14.327 32-32v-512c0-17.673-14.327-32-32-32-17.673 0-32 14.327-32 32V864c0 17.673 14.327 32 32 32z" horiz-adv-x="1024" />
@ -98,15 +98,6 @@ Created by iconfont
<glyph glyph-name="increase" unicode="&#58988;" d="M164 700v-632c0-17.673 14.327-32 32-32h632c17.673 0 32 14.327 32 32V700c0 17.673-14.327 32-32 32H196c-17.673 0-32-14.327-32-32z m0 96h696c35.346 0 64-28.654 64-64v-696c0-35.346-28.654-64-64-64H164c-35.346 0-64 28.654-64 64V732c0 35.346 28.654 64 64 64zM528 588v-376c0-17.673-14.327-32-32-32-17.673 0-32 14.327-32 32V588c0 17.673 14.327 32 32 32 17.673 0 32-14.327 32-32zM716 400c0-17.673-14.327-32-32-32H308c-17.673 0-32 14.327-32 32 0 17.673 14.327 32 32 32h376c17.673 0 32-14.327 32-32z" horiz-adv-x="1024" />
<glyph glyph-name="eye" unicode="&#59586;" d="M1012.736 349.696c-104.96-173.056-297.472-289.792-500.736-289.792s-395.264 117.248-500.736 289.792C4.608 361.472 0 374.784 0 389.12s4.608 27.648 11.264 39.424C116.736 601.088 309.248 718.336 512 718.336s395.264-117.248 500.736-289.792c6.656-11.776 11.264-25.088 11.264-39.424s-4.608-27.648-11.264-39.424z m-279.552 241.152c23.04-38.912 34.816-83.456 34.816-128.512 0-141.312-114.688-256-256-256s-256 114.688-256 256c0 45.056 11.776 89.6 34.816 128.512-89.088-45.568-163.328-117.76-217.6-201.728 97.792-151.04 255.488-256 438.784-256s340.992 104.96 438.784 256c-54.272 83.968-128.512 156.16-217.6 201.728zM512 635.904c-95.232 0-173.568-78.336-173.568-173.568 0-14.848 12.8-27.648 27.648-27.648s27.648 12.8 27.648 27.648C393.216 527.36 446.976 581.12 512 581.12c14.848 0 27.648 12.8 27.648 27.648s-12.8 27.136-27.648 27.136z" horiz-adv-x="1029" />
<glyph glyph-name="amount-desc" unicode="&#59587;" d="M406.543284 63.554228999999964L225.178109-117.81094499999995c-4.075622-3.566169-8.660697-5.094527-13.245771-5.094528s-9.170149 1.528358-13.245771 5.094528L16.81194 64.06368199999997c-5.094527 5.60398-6.622886 13.245771-4.075622 19.868656 3.056716 6.622886 9.679602 11.20796 16.811941 11.207961h109.022885V877.659701c0 10.189055 8.151244 18.340299 18.340299 18.340299h109.022885c10.189055 0 18.340299-8.151244 18.340299-18.340299v-782.519402h109.022885c10.189055 0 18.340299-8.151244 18.340299-18.340299 0.509453-4.585075-2.037811-9.170149-5.094527-13.245771zM685.21393 768.636816c0-10.189055-8.151244-18.340299-18.340298-18.340299h-145.703483c-10.189055 0-18.340299 8.151244-18.340298 18.340299V877.659701c0 10.189055 8.151244 18.340299 18.340298 18.340299h145.703483c10.189055 0 18.340299-8.151244 18.340298-18.340299V768.636816z m109.022886-290.897513c0-10.189055-8.151244-18.340299-18.340299-18.340298h-254.726368c-10.189055 0-18.340299 8.151244-18.340298 18.340298V586.762189c0 10.189055 8.151244 18.340299 18.340298 18.340299h254.726368c10.189055 0 18.340299-8.151244 18.340299-18.340299v-109.022886z m109.022885-291.406965c0-10.189055-8.151244-18.340299-18.340298-18.340298h-363.749254c-10.189055 0-18.340299 8.151244-18.340298 18.340298v109.022886c0 10.189055 8.151244 18.340299 18.340298 18.340298h363.749254c10.189055 0 18.340299-8.151244 18.340298-18.340298v-109.022886z m109.022886-290.897512c0-10.189055-8.151244-18.340299-18.340298-18.340299h-473.281592c-10.189055 0-18.340299 8.151244-18.340299 18.340299V4.4577110000000175c0 10.189055 8.151244 18.340299 18.340299 18.340299h473.281592c10.189055 0 18.340299-8.151244 18.340298-18.340299v-109.022885z" horiz-adv-x="1024" />
<glyph glyph-name="amount-asc" unicode="&#59589;" d="M406.543284 63.554228999999964L225.178109-117.81094499999995c-4.075622-3.566169-8.660697-5.094527-13.245771-5.094528s-9.170149 1.528358-13.245771 5.094528L16.81194 64.06368199999997c-5.094527 5.60398-6.622886 13.245771-4.075622 19.868656 3.056716 6.622886 9.679602 11.20796 16.811941 11.207961h109.022885V877.659701c0 10.189055 8.151244 18.340299 18.340299 18.340299h109.022885c10.189055 0 18.340299-8.151244 18.340299-18.340299v-782.519402h109.022885c10.189055 0 18.340299-8.151244 18.340299-18.340299 0.509453-4.585075-2.037811-9.170149-5.094527-13.245771zM1012.282587 768.636816c0-10.189055-8.151244-18.340299-18.340298-18.340299h-473.281592c-10.189055 0-18.340299 8.151244-18.340299 18.340299V877.659701c0 10.189055 8.151244 18.340299 18.340299 18.340299h473.281592c10.189055 0 18.340299-8.151244 18.340298-18.340299V768.636816z m-109.022886-290.897513c0-10.189055-8.151244-18.340299-18.340298-18.340298h-363.749254c-10.189055 0-18.340299 8.151244-18.340298 18.340298V586.762189c0 10.189055 8.151244 18.340299 18.340298 18.340299h363.749254c10.189055 0 18.340299-8.151244 18.340298-18.340299v-109.022886z m-109.022885-291.406965c0-10.189055-8.151244-18.340299-18.340299-18.340298h-254.726368c-10.189055 0-18.340299 8.151244-18.340298 18.340298v109.022886c0 10.189055 8.151244 18.340299 18.340298 18.340298h254.726368c10.189055 0 18.340299-8.151244 18.340299-18.340298v-109.022886zM685.21393-104.56517399999996c0-10.189055-8.151244-18.340299-18.340298-18.340299h-145.703483c-10.189055 0-18.340299 8.151244-18.340298 18.340299V4.4577110000000175c0 10.189055 8.151244 18.340299 18.340298 18.340299h145.703483c10.189055 0 18.340299-8.151244 18.340298-18.340299v-109.022885z" horiz-adv-x="1024" />
</font>

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/font/iconfont.ttf

Binary file not shown.

BIN
dolphinscheduler-ui/src/lib/@analysys/ans-ui/lib/font/iconfont.woff

Binary file not shown.

95
dolphinscheduler-ui/src/lib/@analysys/ans-ui/package.json

@ -1,43 +1,42 @@
{
"_from": "@analysys/ans-ui",
"_id": "@analysys/ans-ui@0.1.46",
"_inBundle": false,
"_integrity": "sha1-2wM8Ul7F+u4ZrTSwyiEIHEiGd5k=",
"_location": "/@analysys/ans-ui",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "@analysys/ans-ui",
"name": "@analysys/ans-ui",
"escapedName": "@analysys%2fans-ui",
"scope": "@analysys",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
"name": "@analysys/ans-ui",
"version": "0.0.22",
"description": "vue components for analysys",
"keywords": [
"analysys",
"UI"
],
"_resolved": "http://registry.npm.analysys.cn/@analysys/ans-ui/download/@analysys/ans-ui-0.1.46.tgz",
"_shasum": "db033c525ec5faee19ad34b0ca21081c48867799",
"_spec": "@analysys/ans-ui",
"_where": "/Users/xiangcaibiao/Downloads/escheduler/dolphinscheduler-ui",
"bundleDependencies": false,
"config": {
"ghooks": {}
"main": "lib/ans-ui.min.js",
"style": "lib/ans-ui.min.css",
"files": [
"lib",
"src",
"packages"
],
"license": "MIT",
"scripts": {
"build": "npm run clean && cross-env NODE_ENV=production webpack --config ./build/webpack.config.prod.js && webpack --config ./build/webpack.config.locale.js",
"dev": "npm run clean && parcel ./example/index.html -p 4000",
"build:c": "node build/component/buildComponent.js",
"dev:c": "npm run clean && rimraf .cache && node build/component/devComponent.js",
"clean": "rimraf dist",
"lint": "standard \"**/*.{js,vue}\"",
"lint:fix": "standard \"**/*.{js,vue}\" --fix",
"theme": "node-sass --output-style compressed ./src/style/index.scss > ./theme/ans.min.css && cp -rf ./src/style/font/. ./theme/font",
"prepublishOnly": "npm run build",
"start": "npm run dev",
"test": "npm run lint"
},
"peerDependencies": {
"vue": ">=2"
},
"dependencies": {
"async-validator": "^1.10.0",
"dayjs": "^1.7.7",
"deepmerge": "^3.2.0",
"normalize-wheel": "^1.0.1",
"popper.js": "^1.14.4",
"throttle-debounce": "^2.1.0"
"popper.js": "^1.14.4"
},
"deprecated": false,
"description": "vue components for analysys",
"devDependencies": {
"@fedor/progress-webpack-plugin": "^1.0.0",
"@fedor/standard": "^1.0.3",
@ -54,7 +53,6 @@
"babel-plugin-transform-runtime": "^6.23.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-env": "^1.5.2",
"babel-runtime": "^6.26.0",
"cross-env": "^5.2.0",
"css-loader": "0.28.8",
"cssnano": "^4.0.3",
@ -78,40 +76,12 @@
"webpack": "^3",
"webpack-merge": "^4.1.3"
},
"files": [
"lib",
"src",
"packages"
],
"keywords": [
"analysys",
"UI"
],
"license": "MIT",
"main": "lib/ans-ui.min.js",
"maintainers": [
{
"name": "liuxin",
"email": "liuxin@analysys.com.cn"
}
],
"name": "@analysys/ans-ui",
"peerDependencies": {
"vue": ">=2"
},
"scripts": {
"build": "npm run clean && cross-env NODE_ENV=production webpack --config ./build/webpack.config.prod.js && webpack --config ./build/webpack.config.locale.js",
"build:c": "node build/component/buildComponent.js",
"clean": "rimraf dist",
"dev": "npm run clean && parcel ./example/index.html -p 4000",
"dev:c": "npm run clean && rimraf .cache && node build/component/devComponent.js",
"lint": "standard \"**/*.{js,vue}\"",
"lint:fix": "standard \"**/*.{js,vue}\" --fix",
"prepublishOnly": "npm run build",
"start": "npm run dev",
"test": "npm run lint",
"theme": "node-sass --output-style compressed ./src/style/index.scss > ./theme/ans.min.css && cp -rf ./src/style/font/. ./theme/font"
},
"standard": {
"parser": "babel-eslint",
"ignore": [
@ -119,6 +89,7 @@
"packages/*"
]
},
"style": "lib/ans-ui.min.css",
"version": "0.1.46"
"config": {
"ghooks": {}
}
}

3
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/README.md

@ -17,7 +17,6 @@ cancel | 点击取消的回调 | Object | {show [Boolean] ,text [String], handle
render | 自定义内容 | Function | 使用时 content, title ,ok , cancel 失效 | -
showMask | 是否显示遮罩 | Boolean | - | false
maskClosable | 点击遮罩是否关闭 | Boolean | - | false
i18n | 国际化对象 | VueI18n | - | -
#### Modal 实例方法
@ -35,7 +34,6 @@ content | 内容 | String | - | -
duration | 自动关闭的延时,单位秒,不关闭可以写 0 | Number | - | 1.5
onClose | 关闭时的回调 | Function | - | -
closable | 是否显示关闭图标 | Boolean | - | false
i18n | 国际化对象 | VueI18n | - | -
#### Message 全局相关
@ -59,7 +57,6 @@ content | 内容 | String | - | -
duration | 自动关闭的延时,单位秒,不关闭可以写 0 | Number | - | 1.5
onClose | 关闭时的回调 | Function | - | -
closable | 是否显示关闭图标 | Boolean | - | false
i18n | 国际化对象 | VueI18n | - | -
#### Notice 全局相关

1
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/src/source/base/index.js

@ -9,7 +9,6 @@ BoxManager.newInstance = properties => {
const Instance = new Vue({
data: _props,
i18n: _props.i18n,
render (h) {
return h(BoxManager, {
props: _props

29
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/src/source/layer/message/message.js

@ -13,8 +13,7 @@ let defaultConfig = {
// 设置出现的位置在浏览器顶部的距离
top: 60,
transitionName: `${ANIMATION_PREFIX}move-in`,
fixed: true,
i18n: null
fixed: true
}
let iconTypes = {
@ -25,28 +24,20 @@ let iconTypes = {
'loading': 'ans-icon-spinner'
}
function getMessageInstance (i18n) {
function getMessageInstance () {
messageInstance = messageInstance || BoxManager.newInstance({
prefixCls: prefixCls,
styles: {
top: defaultConfig.top + 'px',
left: '50%'
},
className: defaultConfig.fixed ? `${prefixCls}-fixed` : '',
i18n
className: defaultConfig.fixed ? `${prefixCls}-fixed` : ''
})
return messageInstance
}
function notice (
content = '',
duration = defaultConfig.duration,
type,
onClose = function () {},
closable = false,
i18n = defaultConfig.i18n
) {
let instance = getMessageInstance(i18n)
function notice (content = '', duration = defaultConfig.duration, type, onClose = function () {}, closable = false) {
let instance = getMessageInstance()
instance.notice({
name: `${prefixKey}${name}`,
@ -79,23 +70,23 @@ export default {
name: 'Message',
info (options) {
options = formatOptions(options)
return notice(options.content, options.duration, 'info', options.onClose, options.closable, options.i18n)
return notice(options.content, options.duration, 'info', options.onClose, options.closable)
},
success (options) {
options = formatOptions(options)
return notice(options.content, options.duration, 'success', options.onClose, options.closable, options.i18n)
return notice(options.content, options.duration, 'success', options.onClose, options.closable)
},
warning (options) {
options = formatOptions(options)
return notice(options.content, options.duration, 'warning', options.onClose, options.closable, options.i18n)
return notice(options.content, options.duration, 'warning', options.onClose, options.closable)
},
error (options) {
options = formatOptions(options)
return notice(options.content, options.duration, 'error', options.onClose, options.closable, options.i18n)
return notice(options.content, options.duration, 'error', options.onClose, options.closable)
},
loading (options) {
options = formatOptions(options)
return notice(options.content, options.duration, 'loading', options.onClose, options.closable, options.i18n)
return notice(options.content, options.duration, 'loading', options.onClose, options.closable)
},
config (cfg = {}) {
defaultConfig = Object.assign(defaultConfig, cfg)

13
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/src/source/layer/modal/modal.js

@ -17,15 +17,13 @@ let customModal
let defaultConfig = {
// 设置全局的自动关闭时间,为0时不自动消失
duration: 0,
transitionName: `${ANIMATION_PREFIX}modal-down`,
i18n: null
transitionName: `${ANIMATION_PREFIX}modal-down`
}
function getMessageInstance (i18n) {
function getMessageInstance () {
messageInstance = messageInstance || BoxManager.newInstance({
prefixCls: prefixCls,
styles: {},
i18n
styles: {}
})
return messageInstance
}
@ -47,8 +45,7 @@ function getMessageInstance (i18n) {
* maskClosable
*/
function notice (options) {
const i18n = options.i18n || defaultConfig.i18n
let instance = getMessageInstance(i18n)
let instance = getMessageInstance()
let keyName = `${prefixKey}${name}`
@ -59,7 +56,6 @@ function notice (options) {
let comp = instance.component.$children.find(o => o.name === keyName)
if (options.render) {
customModal = new Vue({
i18n,
name: 'customModal',
render: options.render,
mounted () {
@ -78,7 +74,6 @@ function notice (options) {
}).$mount(comp.$refs.content)
} else {
customModal = new Vue({
i18n,
name: 'defaultModal',
data: {
width: options.width ? options.width : '520',

30
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-box/src/source/layer/notice/notice.js

@ -14,8 +14,7 @@ let defaultConfig = {
top: 60,
right: 20,
transitionName: `${ANIMATION_PREFIX}move-right`,
list: true,
i18n: null
list: true
}
let iconTypes = {
@ -26,29 +25,20 @@ let iconTypes = {
'loading': 'ans-icon-spinner'
}
function getMessageInstance (i18n) {
function getMessageInstance () {
messageInstance = messageInstance || BoxManager.newInstance({
prefixCls: prefixCls,
styles: {
top: defaultConfig.top + 'px',
right: defaultConfig.right + 'px'
},
className: defaultConfig.list ? `${prefixCls}-list` : '',
i18n
className: defaultConfig.list ? `${prefixCls}-list` : ''
})
return messageInstance
}
function notice (
title = '',
content = '',
duration = defaultConfig.duration,
type,
onClose = function () {},
closable = false,
i18n = defaultConfig.i18n
) {
let instance = getMessageInstance(i18n)
function notice (title = '', content = '', duration = defaultConfig.duration, type, onClose = function () {}, closable = false) {
let instance = getMessageInstance()
instance.notice({
name: `${prefixKey}${name}`,
@ -85,23 +75,23 @@ export default {
name: 'Notice',
info (options) {
options = formatOptions(options)
return notice(options.title, options.content, options.duration, 'info', options.onClose, options.closable, options.i18n)
return notice(options.title, options.content, options.duration, 'info', options.onClose, options.closable)
},
success (options) {
options = formatOptions(options)
return notice(options.title, options.content, options.duration, 'success', options.onClose, options.closable, options.i18n)
return notice(options.title, options.content, options.duration, 'success', options.onClose, options.closable)
},
warning (options) {
options = formatOptions(options)
return notice(options.title, options.content, options.duration, 'warning', options.onClose, options.closable, options.i18n)
return notice(options.title, options.content, options.duration, 'warning', options.onClose, options.closable)
},
error (options) {
options = formatOptions(options)
return notice(options.title, options.content, options.duration, 'error', options.onClose, options.closable, options.i18n)
return notice(options.title, options.content, options.duration, 'error', options.onClose, options.closable)
},
loading (options) {
options = formatOptions(options)
return notice(options.title, options.content, options.duration, 'loading', options.onClose, options.closable, options.i18n)
return notice(options.title, options.content, options.duration, 'loading', options.onClose, options.closable)
},
config (cfg = {}) {
defaultConfig = Object.assign(defaultConfig, cfg)

1
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-checkbox/README.md

@ -11,7 +11,6 @@ label | 组合使用时有效,指定当前选项value值 | String / Number / B
disabled | 是否禁用 | Boolean | - | false
true-value | 自定义选中时的值 | String / Number / Boolean | - | true
false-value | 自定义未选中时的值 | String / Number / Boolean | - | false
indeterminate | 设置 indeterminate 状态,只负责样式控制 | Boolean | - | false
### Checkbox events

31
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-checkbox/example/app.vue

@ -10,17 +10,10 @@
<section class="demo-section">
<h4>组合</h4>
<div>
<x-checkbox-group v-model="favorites" @on-change="onChange">
<x-checkbox v-for="(f, i) in fruits" :label="f" :key="f" :disabled="!i">{{f}}</x-checkbox>
</x-checkbox-group>
</div>
</section>
<section class="demo-section">
<h4>indeterminate 状态</h4>
<div>
<x-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @on-change="handleCheckAll">全选</x-checkbox>
<x-checkbox-group v-model="favorites" @on-change="handleCheck">
<x-checkbox v-for="f in fruits" :label="f" :key="f">{{f}}</x-checkbox>
<x-checkbox-group v-model="md" @on-change="onChange">
<x-checkbox :label="'香蕉'" disabled>香蕉</x-checkbox>
<x-checkbox :label="'苹果'">苹果</x-checkbox>
<x-checkbox :label="'橘子'">橘子</x-checkbox>
</x-checkbox-group>
</div>
</section>
@ -34,11 +27,8 @@ export default {
name: 'app',
data () {
return {
ck: '真',
fruits: ['香蕉', '苹果', '橘子'],
favorites: ['苹果', '橘子'],
checkAll: false,
isIndeterminate: true
md: ['香蕉', '苹果', '橘子'],
ck: '真'
}
},
components: { xCheckboxGroup, xCheckbox },
@ -48,15 +38,6 @@ export default {
},
clickMe (d) {
console.log(d)
},
handleCheckAll (val) {
this.favorites = val ? this.fruits : []
this.isIndeterminate = false
},
handleCheck (value) {
let checkedCount = value.length
this.checkAll = checkedCount === this.fruits.length
this.isIndeterminate = checkedCount > 0 && checkedCount < this.fruits.length
}
}
}

6
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-checkbox/src/source/Checkbox.vue

@ -60,11 +60,6 @@ export default {
falseValue: {
type: [Boolean, String, Number],
default: false
},
//
indeterminate: {
type: Boolean,
default: false
}
},
computed: {
@ -78,7 +73,6 @@ export default {
checkedClass () {
return [{
[`${prefixCls}`]: true,
['is-indeterminate']: this.indeterminate,
[`${prefixCls}-checked`]: !!this.currentValue
}]
}

8
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-checkbox/src/source/CheckboxGroup.vue

@ -23,7 +23,7 @@ export default {
data () {
return {
currentValue: this.value,
children: []
childrens: []
}
},
computed: {
@ -37,9 +37,9 @@ export default {
methods: {
updateModel (update) {
const value = this.value
this.children = findComponentsDownward(this, 'xCheckbox')
if (this.children) {
this.children.forEach(child => {
this.childrens = findComponentsDownward(this, 'xCheckbox')
if (this.childrens) {
this.childrens.forEach(child => {
child.model = value
if (update) {
child.currentValue = value.indexOf(child.label) >= 0

3
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/base/day.vue

@ -38,12 +38,13 @@ for (let i = 10; i < 100; i++) {
}
const WEEKS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']
const daysInWeek = WEEKS.map(w => t(`ans.datepicker.weeks.${w}`))
export default {
components: { ym },
data () {
return {
week: WEEKS.map(w => t(`ans.datepicker.weeks.${w}`)),
week: daysInWeek,
//
weeks: 0,

117
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/base/time.vue

@ -2,49 +2,37 @@
<div class="x-date-packer-time" :style="{width: type==='daterange' ? '305px' : 'auto'}">
<div class="packer-time-body" :class="[getType()]">
<div class="hd-text" v-if="type==='daterange'">{{t('ans.datepicker.startTime')}}</div>
<div class="picker-time-div time-hours" ref="hours" >
<ul @mouseover="hoverBlock('start', 0)">
<li v-for="(item,index) in setStep(24, step[0])" :key="index"
:class="{'time-act': item == hours}"
@click="change(item, 'hours')">{{numLen(item)}}</li>
<div class="picker-time-div time-hours" ref="hours">
<ul>
<li v-for="(item,index) in 24" :class="{'time-act': index == hours}" @click="change(index, 'hours')">{{numLen(index)}}</li>
</ul>
</div>
<div class="picker-time-div time-minute" ref="minute">
<ul @mouseover="hoverBlock('start', 1)">
<li v-for="(item,index) in setStep(60, step[1])" :key="index"
:class="{'time-act': item == minute}"
@click="change(item, 'minute')">{{numLen(item)}}</li>
<ul>
<li v-for="(item,index) in 60" :class="{'time-act': index == minute}" @click="change(index, 'minute')">{{numLen(index)}}</li>
</ul>
</div>
<div class="picker-time-div time-second" ref="second">
<ul @mouseover="hoverBlock('start', 2)">
<li v-for="(item,index) in setStep(60, step[2])" :key="index"
:class="{'time-act': item == second}"
@click="change(item, 'second')">{{numLen(item)}}</li>
<ul>
<li v-for="(item,index) in 60" :class="{'time-act': index == second}" @click="change(index, 'second')">{{numLen(index)}}</li>
</ul>
</div>
</div>
<div class="packer-time-body" :class="[getType()]" v-if="type==='daterange'" style="float:right">
<div class="hd-text" v-if="type==='daterange'">{{t('ans.datepicker.endTime')}}</div>
<div class="picker-time-div time-hours bd-left" ref="hours1">
<ul @mouseover="hoverBlock('end', 0)">
<li v-for="(item,index) in setStep(24, step[0])" :key="index"
:class="{'time-act': item == hours1}"
@click="changeLast(item, 'hours1')">{{numLen(item)}}</li>
<ul>
<li v-for="(item,index) in 24" :class="{'time-act': index == hours1}" @click="changeLast(index, 'hours1')">{{numLen(index)}}</li>
</ul>
</div>
<div class="picker-time-div time-minute" ref="minute1">
<ul @mouseover="hoverBlock('end', 1)">
<li v-for="(item,index) in setStep(60, step[1])" :key="index"
:class="{'time-act': item == minute1}"
@click="changeLast(item, 'minute1')">{{numLen(item)}}</li>
<ul>
<li v-for="(item,index) in 60" :class="{'time-act': index == minute1}" @click="changeLast(index, 'minute1')">{{numLen(index)}}</li>
</ul>
</div>
<div class="picker-time-div time-second" ref="second1">
<ul @mouseover="hoverBlock('end', 2)">
<li v-for="(item,index) in setStep(60, step[2])" :key="index"
:class="{'time-act': item == second1}"
@click="changeLast(item, 'second1')">{{numLen(item)}}</li>
<ul>
<li v-for="(item,index) in 60" :class="{'time-act': index == second1}" @click="changeLast(index, 'second1')">{{numLen(index)}}</li>
</ul>
</div>
</div>
@ -70,13 +58,7 @@ export default {
},
props: {
format: String,
type: String,
step: {
type: Array,
default() {
return [1, 1, 1]
}
}
type: String
},
mixins: [Locale],
methods: {
@ -102,47 +84,15 @@ export default {
this.second1 = null
}
},
setStep (num, step) {
if(!step) {
step = 1
}
if (num === 1 || !num) {
return num
}
let n = []
for (let i = 0; i < num; i++) {
if(i % step === 0) {
n.push(i)
}
}
return n
},
getStepScrollTop (num, index) {
let selfStep = this.step[index]
if(selfStep && selfStep > 1) {
return num % selfStep === 0 ? (num / selfStep) * 25 : 0
}
return num * 25
},
setScrollTop () {
// let step = (num, index) => {
// let selfStep = this.step[index]
// if(selfStep && selfStep > 1) {
// return num % selfStep === 0 ? num / selfStep : 0
// }
// return num
// }
setTimeout(() => {
this.$refs.hours.scrollTop = this.getStepScrollTop(this.hours, 0)
this.$refs.minute.scrollTop = this.getStepScrollTop(this.minute, 1)
this.$refs.second.scrollTop = this.getStepScrollTop(this.second, 2)
if (this.$refs.hours1) this.$refs.hours1.scrollTop = this.getStepScrollTop(this.hours1, 0)
if (this.$refs.minute1) this.$refs.minute1.scrollTop = this.getStepScrollTop(this.minute1, 1)
if (this.$refs.second1) this.$refs.second1.scrollTop = this.getStepScrollTop(this.second1, 2)
this.$refs.hours.scrollTop = this.hours * 25
this.$refs.minute.scrollTop = this.minute * 25
this.$refs.second.scrollTop = this.second * 25
if (this.$refs.hours1) this.$refs.hours1.scrollTop = this.hours1 * 25
if (this.$refs.minute1) this.$refs.minute1.scrollTop = this.minute1 * 25
if (this.$refs.second1) this.$refs.second1.scrollTop = this.second1 * 25
}, 10)
},
@ -161,18 +111,7 @@ export default {
setHms (value, type) {
this[type] = value
let index = 0
if(/minute/.test(type)) {
index = 1
}
if(/second/.test(type)) {
index = 2
}
this.$refs[type].scrollTop = this.getStepScrollTop(value, index)
this.$refs[type].scrollTop = value * 25
let key = ['hours', 'minute', 'second', 'hours1', 'minute1', 'second1']
key.forEach(item => {
@ -182,25 +121,25 @@ export default {
change (value, type) {
this.setHms(value, type)
if (this.year === this.year1 && this.month === this.month1 && this.day === this.day1) {
if (type === 'hours') {
if (this.hours1 <= value && this.minute > this.minute1) {
this.minute1 = this.minute
this.$refs.minute1.scrollTop = this.getStepScrollTop(this.minute, 1)
this.$refs.minute1.scrollTop = this.minute * 25
}
if (this.hours1 < value) {
this.hours1 = value
if (this.$refs.hours1) this.$refs.hours1.scrollTop = this.getStepScrollTop(value, 0)
if (this.$refs.hours1) this.$refs.hours1.scrollTop = value * 25
}
}
if (type === 'minute' && this.hours1 === this.hours && this.minute1 < value) {
this.minute1 = value
if (this.$refs.minute1) this.$refs.minute1.scrollTop = this.getStepScrollTop(value, 1)
if (this.$refs.minute1) this.$refs.minute1.scrollTop = value * 25
}
if (type === 'second' && this.hours1 === this.hours && this.minute1 === this.minute && this.second1 < value) {
this.second1 = value
if (this.$refs.second1) this.$refs.second1.scrollTop = this.getStepScrollTop(value, 2)
if (this.$refs.second1) this.$refs.second1.scrollTop = value * 25
}
}
@ -234,10 +173,6 @@ export default {
if (/H|h/.test(fmt) && /m/.test(fmt) && /s/.test(fmt)) return 'hms'
if (/H|h/.test(fmt) && /m/.test(fmt)) return 'hm'
if (/H|h/.test(fmt)) return 'h'
},
hoverBlock (type, index) {
this.$emit('_hoverBlock', type, index)
}
}
}

4
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/datepicker.vue

@ -3,6 +3,7 @@
popper-class="date-poptip"
class="x-datepicker"
:placement="placement"
transition="datepicker-animation"
:append-to-body="appendToBody"
:position-fixed="positionFixed"
:viewport="viewport"
@ -275,7 +276,7 @@ export default {
dateChange (data, optItem) {
this.dateValueChange = data
this.optItem = optItem ? { ...optItem } : null
this.optItem = optItem ? JSON.parse(JSON.stringify(optItem)) : null
let fmtDate = this.fmtDate(data)
@ -284,6 +285,7 @@ export default {
if (optItem && this.multiple === 1) {
this.doClose()
}
!this.isConfirm() ? this.doClose() : this.$emit('on-text-change', fmtDate, optItem)
},

226
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/panel/date.vue

@ -1,114 +1,114 @@
<template>
<div class="x-date-panel" @click.stop>
<div class="x-date-panel-day">
<!-- <template v-if="isTimes()">
<times v-show="isTimesShow" ref="times" @change="timeChange"></times>
</template> -->
<day :selected-date="selectedDate" @change="dayChange" :format="format" :disabled-date="disabledDate" ref="vDate"></day>
</div>
<confirm v-if="isConfirm()"
:format="format"
@confirm-btn="$emit('confirm')"
@cancel="$emit('cancel')"
type="date"
ref="confirm"
@time-change="timeChange"
></confirm>
</div>
</template>
<script>
import day from '../base/day.vue'
import confirm from '../base/confirm.vue'
import ishms from '../util/ishms.js'
import isValid from '../util/isValid.js'
export default {
name: 'panelDate',
components: { day, confirm },
data () {
return {
selectedDate: null,
// times
isTimesShow: false
}
},
props: {
//
value: {
type: [Array],
default () {
return null
}
},
//
format: String,
//
disabledDate: {
type: Function,
default: null
},
// confirm
confirm: {
type: [Number, Boolean],
default: 0
},
//
options: {
type: [Array, Object],
default: null
}
},
mounted () {
this.init()
},
methods: {
init (date) {
let dateValue = date || this.value
if (dateValue && dateValue.length) {
this.selectedDate = dateValue
if (isValid(dateValue[0])) this.$refs.vDate.toDate = dateValue[0]
} else {
this.selectedDate = []
}
this.$refs.vDate.init(this.selectedDate)
this.timeInit()
},
timeInit () {
if (this.isTimes()) {
this.$refs.confirm.timsInit(this.selectedDate[this.selectedDate.length - 1])
}
},
dayChange (date) {
this.selectedDate = [date]
this.timeInit()
this.$emit('change', this.selectedDate)
},
timeChange (date) {
this.selectedDate = [date]
this.$emit('change', this.selectedDate)
},
isTimes () {
return ishms(this.format)
},
isConfirm () {
if (this.confirm || this.isTimes()) return true
return false
}
}
}
<template>
<div class="x-date-panel">
<div class="x-date-panel-day">
<!-- <template v-if="isTimes()">
<times v-show="isTimesShow" ref="times" @change="timeChange"></times>
</template> -->
<day :selected-date="selectedDate" @change="dayChange" :format="format" :disabled-date="disabledDate" ref="vDate"></day>
</div>
<confirm v-if="isConfirm()"
:format="format"
@confirm-btn="$emit('confirm')"
@cancel="$emit('cancel')"
type="date"
ref="confirm"
@time-change="timeChange"
></confirm>
</div>
</template>
<script>
import day from '../base/day.vue'
import confirm from '../base/confirm.vue'
import ishms from '../util/ishms.js'
import isValid from '../util/isValid.js'
export default {
name: 'panelDate',
components: { day, confirm },
data () {
return {
selectedDate: null,
// times
isTimesShow: false
}
},
props: {
//
value: {
type: [Array],
default () {
return null
}
},
//
format: String,
//
disabledDate: {
type: Function,
default: null
},
// confirm
confirm: {
type: [Number, Boolean],
default: 0
},
//
options: {
type: [Array, Object],
default: null
}
},
mounted () {
this.init()
},
methods: {
init (date) {
let dateValue = date || this.value
if (dateValue && dateValue.length) {
this.selectedDate = dateValue
if (isValid(dateValue[0])) this.$refs.vDate.toDate = dateValue[0]
} else {
this.selectedDate = []
}
this.$refs.vDate.init(this.selectedDate)
this.timeInit()
},
timeInit () {
if (this.isTimes()) {
this.$refs.confirm.timsInit(this.selectedDate[this.selectedDate.length - 1])
}
},
dayChange (date) {
this.selectedDate = [date]
this.timeInit()
this.$emit('change', this.selectedDate)
},
timeChange (date) {
this.selectedDate = [date]
this.$emit('change', this.selectedDate)
},
isTimes () {
return ishms(this.format)
},
isConfirm () {
if (this.confirm || this.isTimes()) return true
return false
}
}
}
</script>

870
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/panel/daterange.vue

@ -1,436 +1,436 @@
<template>
<div class="date-packer-daterange-body" @click.stop>
<div class="date-packer-daterange">
<div class="date-packer-opt" v-if="options" :style="{width: optionsWidth + 'px'}">
<div class="picker-panel-shortcut" :style="item.style"
v-for="item in options"
@click="optionsClick(item, $event)"
@mouseenter="optionsHover(item, $event)"
@mouseout="optionsHoverOut()"
:class="{act: getOptItemAct(item)}">{{item.text}}</div>
</div>
<div class="date-interval" ref="datePackerDay" :style="{width: 202 * panelNum + 'px', marginLeft: options ? optionsWidth + 'px' : ''}">
<template v-for="(item, i) in panelNum">
<day
type="daterange"
:format="format"
:is-hover="isHover"
:selected-date="selectedDate"
:hover-start-date="hoverStartDate"
:hover-end-date="hoverEndDate"
:disabled-date="disabledDate"
@change="dayChange"
@hover="hoverChange"
@ym-change="ymChange"
:ref="'dateRange' + i"
:class="{'date-start': i === 0, 'date-end': i === panelNum - 1}"
@switch-date-panel="switchDatePanel" :index="i"></day>
</template>
</div>
</div>
<confirm v-if="isConfirm()" :format="format" @confirm-btn="$emit('confirm')" @cancel="cancel" type="daterange" ref="confirm" @time-change="timeChange">
<template slot="confirm">
<slot name="confirm"></slot>
</template>
</confirm>
</div>
</template>
<script>
import day from '../base/day.vue'
import confirm from '../base/confirm.vue'
import ishms from '../util/ishms.js'
import isValid from '../util/isValid.js'
import isType from '../util/isType.js'
import moment from 'dayjs'
const deepFlatten = arr => [].concat(...arr.map(v => Array.isArray(v) ? deepFlatten(v) : v))
export default {
name: 'Daterange',
components: { day, confirm },
data () {
return {
selectedDate: [],
hoverStartDate: [],
hoverEndDate: [],
isHover: false,
arrDate: []
}
},
props: {
//
value: {
type: [Array],
default () {
return null
}
},
//
format: String,
//
disabledDate: {
type: Function
},
// confirm
confirm: {
type: [Number, Boolean],
default: 0
},
//
options: {
type: [Array, Object],
default: null
},
optionsWidth: Number,
//
panelNum: {
type: Number,
default: 2
},
// , 0
multiple: 0,
//
selectIndex: {
type: Number,
default: -1
}
},
mounted () {
this.init()
},
methods: {
init (date, display) {
let value = moment(new Date()).subtract(this.panelNum - 1, 'M'), selectedDate = []
this.hoverStartDate = []
this.hoverEndDate = []
this.arrDate = []
this.isHover = false
let dateValue = date || this.value
if (dateValue) {
selectedDate = deepFlatten(this.value)
this.selectedDate = dateValue
//
if (isType(dateValue[0]) === 'array' && isValid(dateValue[0][0])) {
value = moment(dateValue[0][0]).subtract(this.panelNum - 2, 'M')
}
dateValue.forEach((item, i) => {
if (item.length === 2) {
this.hoverStartDate.push(item[0])
this.hoverEndDate.push(item[1])
} else {
let options = this.options
if (options && options.length) {
for (let i = 0; i < options.length; i++) {
if (options[i].text === item[0] && options[i].value) {
let value = options[i].value()
this.hoverStartDate.push(value[0])
this.hoverEndDate.push(value[1])
}
}
}
}
})
}
if (!display) {
this.switchPanel(value, selectedDate)
}
this.timeInit()
},
timeInit (isShow = true) {
if (ishms(this.format)) {
let selectedDate = this.selectedDate
let len = selectedDate.length
if (len) {
let date = selectedDate[len - 1]
if (date.length === 2 && isShow) {
this.$refs.confirm.timsInit(date[0], date[1])
} else {
this.$refs.confirm.timsInit()
}
}
}
},
//
switchPanel (value, selectedDate) {
for (let i = 0; i < this.panelNum; i++) {
this.$refs['dateRange' + i][0].toDate = value
value = moment(new Date(value)).add(1, 'M')
this.$refs['dateRange' + i][0].init(selectedDate)
}
},
dayChange (date) {
let multiple = this.multiple
multiple === 1 ? this.radio(date) : this.multiSel(date)
},
hoverChange (date) {
let arrDate = this.arrDate
date.getTime() > arrDate[0].getTime() ? this.hoverClass([arrDate[0], date]) : this.hoverClass([date, arrDate[0]])
},
//
radio (date) {
if (this.arrDate.length === 0) {
this.selectedDate = [[date]]
this.hoverStartDate = [date]
this.hoverEndDate = []
this.arrDate.push(date)
this.isHover = true
} else {
if (date.getTime() > this.selectedDate[0][0].getTime()) {
this.selectedDate[0].push(date)
this.hoverEndDate = [date]
} else {
let endDate = this.selectedDate[0][0]
this.selectedDate = []
this.hoverStartDate = []
this.selectedDate = [[date, endDate]]
this.hoverStartDate = [date]
this.hoverEndDate = [endDate]
}
this.isHover = false
this.arrDate = []
this.change()
}
this.timeInit()
},
//
multiSel (date) {
let set = () => {
let arrDate = this.arrDate
let selectIndex = this.selectIndex
if (arrDate.length === 0) {
selectIndex === -1 ? this.hoverStartDate.push(date) : this.hoverStartDate[selectIndex] = date
arrDate.push(date)
this.isHover = true
this.timeInit(false)
} else {
if (date.getTime() > arrDate[0].getTime()) {
if (selectIndex === -1) {
this.selectedDate.push([arrDate[0], date])
this.hoverEndDate.push(date)
} else {
this.$set(this.selectedDate, selectIndex, [arrDate[0], date])
this.hoverEndDate[selectIndex] = date
}
} else {
if (selectIndex === -1) {
this.hoverStartDate.pop()
this.selectedDate.push([date, arrDate[0]])
this.hoverStartDate.push(date)
this.hoverEndDate.push(arrDate[0])
} else {
this.$set(this.selectedDate, selectIndex, [date, arrDate[0]])
this.hoverStartDate[selectIndex] = date
this.hoverEndDate[selectIndex] = arrDate[0]
}
}
this.isHover = false
this.arrDate = []
this.change()
this.timeInit()
}
}
this.getMultipleFn(set)
},
isConfirm () {
if (this.confirm || ishms(this.format)) return true
return false
},
//
switchDatePanel (type, key) {
if (type === 'add') {
for (let i = 0; i < this.panelNum - 1; i++) {
this.$refs['dateRange' + i][0].setToDateInit(type, key)
}
} else {
for (let i = 1; i < this.panelNum; i++) {
this.$refs['dateRange' + i][0].setToDateInit(type, key)
}
}
},
// options
optionsClick (item, e) {
if (/act/.test(e.currentTarget.className)) return
item.click && item.click(item)
let value = item.value()
let type = item.type
let dateValue = type === 'text' ? [item.text] : value
if (value.length === 2 && isValid(value[0]) && isValid(value[1])) {
let startDate = moment(new Date(value[0])).subtract(this.panelNum - 2, 'M')
this.switchPanel(startDate, value)
}
this.getMultipleFn(() => {
let selectIndex = this.selectIndex
if (selectIndex === -1) {
this.hoverStartDate.push(value[0])
this.hoverEndDate.push(value[1])
this.selectedDate.push(dateValue)
} else {
this.hoverStartDate[selectIndex] = value[0]
this.hoverEndDate[selectIndex] = value[1]
this.$set(this.selectedDate, selectIndex, dateValue)
}
}, () => {
this.selectedDate = [dateValue]
this.hoverStartDate = [value[0]]
this.hoverEndDate = [value[1]]
})
this.change(item)
this.reset()
},
//
optionsHover (item, e) {
if (/act/.test(e.currentTarget.className) || !item.value) return
this.timeOut = setTimeout(() => {
this.hoverClass(item.value())
}, 200)
},
optionsHoverOut () {
if (this.timeOut) {
clearTimeout(this.timeOut)
this.timeOut = null
}
this.hoverClass([])
},
// multiplen
getMultipleFn (fn, fn1) {
let num = this.multiple
if (num === 1) { //
fn1 && fn1()
} else { //
if (num === 0) {
fn && fn()
} else {
let len = this.hoverEndDate.length
if (len === num && this.selectIndex === -1) {
this.selectedDate.pop()
this.hoverStartDate.pop()
this.hoverEndDate.pop()
}
fn && fn()
}
}
},
// opt Item
getOptItemAct (item) {
let value = item.value().toString()
let selectedDate = this.selectedDate
return selectedDate.find((n) => n[0] === item.text || n.toString() === value)
},
hoverClass (date) {
let $day = this.$refs.datePackerDay.querySelectorAll('.dataMouseoverAct')
if (date.length === 2) {
for (let i = 0, len = $day.length; i < len; i++) {
let o = $day[i]
let toDate = moment(o.getAttribute('data-mouseover')).format('YYYYMMDD')
let startDate = moment(new Date(date[0])).format('YYYYMMDD')
let endDate = moment(new Date(date[1])).format('YYYYMMDD')
if (toDate === startDate && toDate === endDate) {
o.className = 'dataMouseoverAct bg-hover bg-hover-centre'
} else if (toDate === startDate) {
o.className = 'dataMouseoverAct bg-hover bg-hover-start'
} else if (toDate === endDate) {
o.className = 'dataMouseoverAct bg-hover bg-hover-end'
} else if (toDate > startDate && toDate < endDate) {
o.className = 'dataMouseoverAct bg-hover'
} else {
o.className = 'dataMouseoverAct'
}
}
} else {
for (let i = 0, len = $day.length; i < len; i++) {
let o = $day[i]
o.className = 'dataMouseoverAct'
}
}
},
//
ymChange (date, ref) {
let index = ref.getAttribute('index') - 0, value = date, decrease = date
for (let i = index + 1; i < this.panelNum; i++) {
let vDateRange = this.$refs['dateRange' + i][0]
value = moment(value).add(1, 'M')
vDateRange.toDate = value
vDateRange.init()
}
for (let i = index - 1; i >= 0; i--) {
let vDateRange = this.$refs['dateRange' + i][0]
decrease = moment(decrease).subtract(1, 'M')
vDateRange.toDate = decrease
vDateRange.init()
}
},
// Reset
reset () {
this.isHover = false
this.arrDate = []
this.hoverClass([])
},
cancel () {
this.$emit('cancel')
this.reset()
},
timeChange (date) {
this.selectedDate[this.selectedDate.length - 1] = date
this.change()
},
change (optItem) {
let date = [...this.selectedDate]
date.forEach(o => {
if (o.length === 2) {
o[0] = new Date(o[0])
o[1] = new Date(o[1])
}
})
this.$emit('change', date, optItem)
}
}
}
<template>
<div class="date-packer-daterange-body">
<div class="date-packer-daterange">
<div class="date-packer-opt" v-if="options" :style="{width: optionsWidth + 'px'}">
<div class="picker-panel-shortcut" :style="item.style"
v-for="item in options"
@click="optionsClick(item, $event)"
@mouseenter="optionsHover(item, $event)"
@mouseout="optionsHoverOut()"
:class="{act: getOptItemAct(item)}">{{item.text}}</div>
</div>
<div class="date-interval" ref="datePackerDay" :style="{width: 202 * panelNum + 'px', marginLeft: options ? optionsWidth + 'px' : ''}">
<template v-for="(item, i) in panelNum">
<day
type="daterange"
:format="format"
:is-hover="isHover"
:selected-date="selectedDate"
:hover-start-date="hoverStartDate"
:hover-end-date="hoverEndDate"
:disabled-date="disabledDate"
@change="dayChange"
@hover="hoverChange"
@ym-change="ymChange"
:ref="'dateRange' + i"
:class="{'date-start': i === 0, 'date-end': i === panelNum - 1}"
@switch-date-panel="switchDatePanel" :index="i"></day>
</template>
</div>
</div>
<confirm v-if="isConfirm()" :format="format" @confirm-btn="$emit('confirm')" @cancel="cancel" type="daterange" ref="confirm" @time-change="timeChange">
<template slot="confirm">
<slot name="confirm"></slot>
</template>
</confirm>
</div>
</template>
<script>
import day from '../base/day.vue'
import confirm from '../base/confirm.vue'
import ishms from '../util/ishms.js'
import isValid from '../util/isValid.js'
import isType from '../util/isType.js'
import moment from 'dayjs'
const deepFlatten = arr => [].concat(...arr.map(v => Array.isArray(v) ? deepFlatten(v) : v))
export default {
name: 'Daterange',
components: { day, confirm },
data () {
return {
selectedDate: [],
hoverStartDate: [],
hoverEndDate: [],
isHover: false,
arrDate: []
}
},
props: {
//
value: {
type: [Array],
default () {
return null
}
},
//
format: String,
//
disabledDate: {
type: Function
},
// confirm
confirm: {
type: [Number, Boolean],
default: 0
},
//
options: {
type: [Array, Object],
default: null
},
optionsWidth: Number,
//
panelNum: {
type: Number,
default: 2
},
// , 0
multiple: 0,
//
selectIndex: {
type: Number,
default: -1
}
},
mounted () {
this.init()
},
methods: {
init (date, display) {
let value = moment(new Date()).subtract(this.panelNum - 1, 'M'), selectedDate = []
this.hoverStartDate = []
this.hoverEndDate = []
this.arrDate = []
this.isHover = false
let dateValue = date || this.value
if (dateValue) {
selectedDate = deepFlatten(this.value)
this.selectedDate = dateValue
//
if (isType(dateValue[0]) === 'array' && isValid(dateValue[0][0])) {
value = moment(dateValue[0][0]).subtract(this.panelNum - 2, 'M')
}
dateValue.forEach((item, i) => {
if (item.length === 2) {
this.hoverStartDate.push(item[0])
this.hoverEndDate.push(item[1])
} else {
let options = this.options
if (options && options.length) {
for (let i = 0; i < options.length; i++) {
if (options[i].text === item[0] && options[i].value) {
let value = options[i].value()
this.hoverStartDate.push(value[0])
this.hoverEndDate.push(value[1])
}
}
}
}
})
}
if (!display) {
this.switchPanel(value, selectedDate)
}
this.timeInit()
},
timeInit (isShow = true) {
if (ishms(this.format)) {
let selectedDate = this.selectedDate
let len = selectedDate.length
if (len) {
let date = selectedDate[len - 1]
if (date.length === 2 && isShow) {
this.$refs.confirm.timsInit(date[0], date[1])
} else {
this.$refs.confirm.timsInit()
}
}
}
},
//
switchPanel (value, selectedDate) {
for (let i = 0; i < this.panelNum; i++) {
this.$refs['dateRange' + i][0].toDate = value
value = moment(new Date(value)).add(1, 'M')
this.$refs['dateRange' + i][0].init(selectedDate)
}
},
dayChange (date) {
let multiple = this.multiple
multiple === 1 ? this.radio(date) : this.multiSel(date)
},
hoverChange (date) {
let arrDate = this.arrDate
date.getTime() > arrDate[0].getTime() ? this.hoverClass([arrDate[0], date]) : this.hoverClass([date, arrDate[0]])
},
//
radio (date) {
if (this.arrDate.length === 0) {
this.selectedDate = [[date]]
this.hoverStartDate = [date]
this.hoverEndDate = []
this.arrDate.push(date)
this.isHover = true
} else {
if (date.getTime() > this.selectedDate[0][0].getTime()) {
this.selectedDate[0].push(date)
this.hoverEndDate = [date]
} else {
let endDate = this.selectedDate[0][0]
this.selectedDate = []
this.hoverStartDate = []
this.selectedDate = [[date, endDate]]
this.hoverStartDate = [date]
this.hoverEndDate = [endDate]
}
this.isHover = false
this.arrDate = []
this.change()
}
this.timeInit()
},
//
multiSel (date) {
let set = () => {
let arrDate = this.arrDate
let selectIndex = this.selectIndex
if (arrDate.length === 0) {
selectIndex === -1 ? this.hoverStartDate.push(date) : this.hoverStartDate[selectIndex] = date
arrDate.push(date)
this.isHover = true
this.timeInit(false)
} else {
if (date.getTime() > arrDate[0].getTime()) {
if (selectIndex === -1) {
this.selectedDate.push([arrDate[0], date])
this.hoverEndDate.push(date)
} else {
this.$set(this.selectedDate, selectIndex, [arrDate[0], date])
this.hoverEndDate[selectIndex] = date
}
} else {
if (selectIndex === -1) {
this.hoverStartDate.pop()
this.selectedDate.push([date, arrDate[0]])
this.hoverStartDate.push(date)
this.hoverEndDate.push(arrDate[0])
} else {
this.$set(this.selectedDate, selectIndex, [date, arrDate[0]])
this.hoverStartDate[selectIndex] = date
this.hoverEndDate[selectIndex] = arrDate[0]
}
}
this.isHover = false
this.arrDate = []
this.change()
this.timeInit()
}
}
this.getMultipleFn(set)
},
isConfirm () {
if (this.confirm || ishms(this.format)) return true
return false
},
//
switchDatePanel (type, key) {
if (type === 'add') {
for (let i = 0; i < this.panelNum - 1; i++) {
this.$refs['dateRange' + i][0].setToDateInit(type, key)
}
} else {
for (let i = 1; i < this.panelNum; i++) {
this.$refs['dateRange' + i][0].setToDateInit(type, key)
}
}
},
// options
optionsClick (item, e) {
if (/act/.test(e.currentTarget.className)) return
item.click && item.click(item)
let value = item.value()
let type = item.type
let dateValue = type === 'text' ? [item.text] : value
if (value.length === 2 && isValid(value[0]) && isValid(value[1])) {
let startDate = moment(new Date(value[0])).subtract(this.panelNum - 2, 'M')
this.switchPanel(startDate, value)
}
this.getMultipleFn(() => {
let selectIndex = this.selectIndex
if (selectIndex === -1) {
this.hoverStartDate.push(value[0])
this.hoverEndDate.push(value[1])
this.selectedDate.push(dateValue)
} else {
this.hoverStartDate[selectIndex] = value[0]
this.hoverEndDate[selectIndex] = value[1]
this.$set(this.selectedDate, selectIndex, dateValue)
}
}, () => {
this.selectedDate = [dateValue]
this.hoverStartDate = [value[0]]
this.hoverEndDate = [value[1]]
})
this.change(item)
this.reset()
},
//
optionsHover (item, e) {
if (/act/.test(e.currentTarget.className) || !item.value) return
this.timeOut = setTimeout(() => {
this.hoverClass(item.value())
}, 200)
},
optionsHoverOut () {
if (this.timeOut) {
clearTimeout(this.timeOut)
this.timeOut = null
}
this.hoverClass([])
},
// multiplen
getMultipleFn (fn, fn1) {
let num = this.multiple
if (num === 1) { //
fn1 && fn1()
} else { //
if (num === 0) {
fn && fn()
} else {
let len = this.hoverEndDate.length
if (len === num && this.selectIndex === -1) {
this.selectedDate.pop()
this.hoverStartDate.pop()
this.hoverEndDate.pop()
}
fn && fn()
}
}
},
// opt Item
getOptItemAct (item) {
let value = item.value().toString()
let selectedDate = this.selectedDate
return selectedDate.find((n) => n[0] === item.text || n.toString() === value)
},
hoverClass (date) {
let $day = this.$refs.datePackerDay.querySelectorAll('.dataMouseoverAct')
if (date.length === 2) {
for (let i = 0, len = $day.length; i < len; i++) {
let o = $day[i]
let toDate = moment(o.getAttribute('data-mouseover')).format('YYYYMMDD')
let startDate = moment(new Date(date[0])).format('YYYYMMDD')
let endDate = moment(new Date(date[1])).format('YYYYMMDD')
if (toDate === startDate && toDate === endDate) {
o.className = 'dataMouseoverAct bg-hover bg-hover-centre'
} else if (toDate === startDate) {
o.className = 'dataMouseoverAct bg-hover bg-hover-start'
} else if (toDate === endDate) {
o.className = 'dataMouseoverAct bg-hover bg-hover-end'
} else if (toDate > startDate && toDate < endDate) {
o.className = 'dataMouseoverAct bg-hover'
} else {
o.className = 'dataMouseoverAct'
}
}
} else {
for (let i = 0, len = $day.length; i < len; i++) {
let o = $day[i]
o.className = 'dataMouseoverAct'
}
}
},
//
ymChange (date, ref) {
let index = ref.getAttribute('index') - 0, value = date, decrease = date
for (let i = index + 1; i < this.panelNum; i++) {
let vDateRange = this.$refs['dateRange' + i][0]
value = moment(value).add(1, 'M')
vDateRange.toDate = value
vDateRange.init()
}
for (let i = index - 1; i >= 0; i--) {
let vDateRange = this.$refs['dateRange' + i][0]
decrease = moment(decrease).subtract(1, 'M')
vDateRange.toDate = decrease
vDateRange.init()
}
},
// Reset
reset () {
this.isHover = false
this.arrDate = []
this.hoverClass([])
},
cancel () {
this.$emit('cancel')
this.reset()
},
timeChange (date) {
this.selectedDate[this.selectedDate.length - 1] = date
this.change()
},
change (optItem) {
let date = [...this.selectedDate]
date.forEach(o => {
if (o.length === 2) {
o[0] = new Date(o[0])
o[1] = new Date(o[1])
}
})
this.$emit('change', date, optItem)
}
}
}
</script>

80
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/panel/month.vue

@ -1,41 +1,41 @@
<template>
<div class="x-date-packer-panel" @click.stop>
<years :types="type" ref="years" style="position:inherit;" @change="change"></years>
</div>
</template>
<script>
import years from '../base/years.vue'
export default {
components: { years },
data () {
return {
}
},
props: {
type: {
type: String,
default: 'year'
},
value: Array
},
mounted () {
let t = this.type === 'year' ? 'y' : 'm'
let d = this.value && this.value.length ? this.value[0] : new Date()
this.$refs.years.init(d, t)
},
methods: {
change (date) {
this.$emit('change', [date])
}
}
}
<template>
<div class="x-date-packer-panel">
<years :types="type" ref="years" style="position:inherit;" @change="change"></years>
</div>
</template>
<script>
import years from '../base/years.vue'
export default {
components: { years },
data () {
return {
}
},
props: {
type: {
type: String,
default: 'year'
},
value: Array
},
mounted () {
let t = this.type === 'year' ? 'y' : 'm'
let d = this.value && this.value.length ? this.value[0] : new Date()
this.$refs.years.init(d, t)
},
methods: {
change (date) {
this.$emit('change', [date])
}
}
}
</script>

646
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/date.js

@ -1,324 +1,324 @@
/**
* https://github.com/taylorhakes/fecha
* Parse or format dates
* @class fecha
*/
var fecha = {}
var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g
var twoDigits = /\d\d?/
var threeDigits = /\d{3}/
var fourDigits = /\d{4}/
var word = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i
var literal = /\[([^]*?)\]/gm
var noop = function () {
}
function shorten (arr, sLen) {
var newArr = []
for (var i = 0, len = arr.length; i < len; i++) {
newArr.push(arr[i].substr(0, sLen))
}
return newArr
}
function monthUpdate (arrName) {
return function (d, v, i18n) {
var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase())
if (~index) {
d.month = index
}
}
}
function pad (val, len) {
val = String(val)
len = len || 2
while (val.length < len) {
val = '0' + val
}
return val
}
var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
var monthNamesShort = shorten(monthNames, 3)
var dayNamesShort = shorten(dayNames, 3)
fecha.i18n = {
dayNamesShort: dayNamesShort,
dayNames: dayNames,
monthNamesShort: monthNamesShort,
monthNames: monthNames,
amPm: ['am', 'pm'],
DoFn: function DoFn (D) {
return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10]
}
}
var formatFlags = {
D: function (dateObj) {
return dateObj.getDate()
},
DD: function (dateObj) {
return pad(dateObj.getDate())
},
Do: function (dateObj, i18n) {
return i18n.DoFn(dateObj.getDate())
},
d: function (dateObj) {
return dateObj.getDay()
},
dd: function (dateObj) {
return pad(dateObj.getDay())
},
ddd: function (dateObj, i18n) {
return i18n.dayNamesShort[dateObj.getDay()]
},
dddd: function (dateObj, i18n) {
return i18n.dayNames[dateObj.getDay()]
},
M: function (dateObj) {
return dateObj.getMonth() + 1
},
MM: function (dateObj) {
return pad(dateObj.getMonth() + 1)
},
MMM: function (dateObj, i18n) {
return i18n.monthNamesShort[dateObj.getMonth()]
},
MMMM: function (dateObj, i18n) {
return i18n.monthNames[dateObj.getMonth()]
},
YY: function (dateObj) {
return String(dateObj.getFullYear()).substr(2)
},
YYYY: function (dateObj) {
return pad(dateObj.getFullYear(), 4)
},
h: function (dateObj) {
return dateObj.getHours() % 12 || 12
},
hh: function (dateObj) {
return pad(dateObj.getHours() % 12 || 12)
},
H: function (dateObj) {
return dateObj.getHours()
},
HH: function (dateObj) {
return pad(dateObj.getHours())
},
m: function (dateObj) {
return dateObj.getMinutes()
},
mm: function (dateObj) {
return pad(dateObj.getMinutes())
},
s: function (dateObj) {
return dateObj.getSeconds()
},
ss: function (dateObj) {
return pad(dateObj.getSeconds())
},
S: function (dateObj) {
return Math.round(dateObj.getMilliseconds() / 100)
},
SS: function (dateObj) {
return pad(Math.round(dateObj.getMilliseconds() / 10), 2)
},
SSS: function (dateObj) {
return pad(dateObj.getMilliseconds(), 3)
},
a: function (dateObj, i18n) {
return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1]
},
A: function (dateObj, i18n) {
return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase()
},
ZZ: function (dateObj) {
var o = dateObj.getTimezoneOffset()
return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4)
}
}
var parseFlags = {
D: [twoDigits, function (d, v) {
d.day = v
}],
Do: [new RegExp(twoDigits.source + word.source), function (d, v) {
d.day = parseInt(v, 10)
}],
M: [twoDigits, function (d, v) {
d.month = v - 1
}],
YY: [twoDigits, function (d, v) {
var da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2)
d.year = '' + (v > 68 ? cent - 1 : cent) + v
}],
h: [twoDigits, function (d, v) {
d.hour = v
}],
m: [twoDigits, function (d, v) {
d.minute = v
}],
s: [twoDigits, function (d, v) {
d.second = v
}],
YYYY: [fourDigits, function (d, v) {
d.year = v
}],
S: [/\d/, function (d, v) {
d.millisecond = v * 100
}],
SS: [/\d{2}/, function (d, v) {
d.millisecond = v * 10
}],
SSS: [threeDigits, function (d, v) {
d.millisecond = v
}],
d: [twoDigits, noop],
ddd: [word, noop],
MMM: [word, monthUpdate('monthNamesShort')],
MMMM: [word, monthUpdate('monthNames')],
a: [word, function (d, v, i18n) {
var val = v.toLowerCase()
if (val === i18n.amPm[0]) {
d.isPm = false
} else if (val === i18n.amPm[1]) {
d.isPm = true
}
}],
ZZ: [/([\+\-]\d\d:?\d\d|Z)/, function (d, v) {
if (v === 'Z') v = '+00:00'
var parts = (v + '').match(/([\+\-]|\d\d)/gi), minutes
if (parts) {
minutes = +(parts[1] * 60) + parseInt(parts[2], 10)
d.timezoneOffset = parts[0] === '+' ? minutes : -minutes
}
}]
}
parseFlags.dd = parseFlags.d
parseFlags.dddd = parseFlags.ddd
parseFlags.DD = parseFlags.D
parseFlags.mm = parseFlags.m
parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h
parseFlags.MM = parseFlags.M
parseFlags.ss = parseFlags.s
parseFlags.A = parseFlags.a
// Some common format strings
fecha.masks = {
default: 'ddd MMM DD YYYY HH:mm:ss',
shortDate: 'M/D/YY',
mediumDate: 'MMM D, YYYY',
longDate: 'MMMM D, YYYY',
fullDate: 'dddd, MMMM D, YYYY',
shortTime: 'HH:mm',
mediumTime: 'HH:mm:ss',
longTime: 'HH:mm:ss.SSS'
}
/***
* Format a date
* @method format
* @param {Date|number} dateObj
* @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
*/
fecha.format = function (dateObj, mask, i18nSettings) {
var i18n = i18nSettings || fecha.i18n
if (typeof dateObj === 'number') {
dateObj = new Date(dateObj)
}
if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
throw new Error('Invalid Date in fecha.format')
}
mask = fecha.masks[mask] || mask || fecha.masks['default']
var literals = []
// Make literals inactive by replacing them with ??
mask = mask.replace(literal, function ($0, $1) {
literals.push($1)
return '??'
})
// Apply formatting rules
mask = mask.replace(token, function ($0) {
return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1)
})
// Inline literal values back into the formatted value
return mask.replace(/\?\?/g, function () {
return literals.shift()
})
}
/**
* Parse a date string into an object, changes - into /
* @method parse
* @param {string} dateStr Date string
* @param {string} format Date parse format
* @returns {Date|boolean}
*/
fecha.parse = function (dateStr, format, i18nSettings) {
var i18n = i18nSettings || fecha.i18n
if (typeof format !== 'string') {
throw new Error('Invalid format in fecha.parse')
}
format = fecha.masks[format] || format
// Avoid regular expression denial of service, fail early for really long strings
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
if (dateStr.length > 1000) {
return false
}
var isValid = true
var dateInfo = {}
format.replace(token, function ($0) {
if (parseFlags[$0]) {
var info = parseFlags[$0]
var index = dateStr.search(info[0])
if (!~index) {
isValid = false
} else {
dateStr.replace(info[0], function (result) {
info[1](dateInfo, result, i18n)
dateStr = dateStr.substr(index + result.length)
return result
})
}
}
return parseFlags[$0] ? '' : $0.slice(1, $0.length - 1)
})
if (!isValid) {
return false
}
var today = new Date()
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
dateInfo.hour = +dateInfo.hour + 12
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
dateInfo.hour = 0
}
var date
if (dateInfo.timezoneOffset != null) {
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset
date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0))
} else {
date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0)
}
return date
}
/**
* https://github.com/taylorhakes/fecha
* Parse or format dates
* @class fecha
*/
var fecha = {}
var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g
var twoDigits = /\d\d?/
var threeDigits = /\d{3}/
var fourDigits = /\d{4}/
var word = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i
var literal = /\[([^]*?)\]/gm
var noop = function () {
}
function shorten (arr, sLen) {
var newArr = []
for (var i = 0, len = arr.length; i < len; i++) {
newArr.push(arr[i].substr(0, sLen))
}
return newArr
}
function monthUpdate (arrName) {
return function (d, v, i18n) {
var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase())
if (~index) {
d.month = index
}
}
}
function pad (val, len) {
val = String(val)
len = len || 2
while (val.length < len) {
val = '0' + val
}
return val
}
var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
var monthNamesShort = shorten(monthNames, 3)
var dayNamesShort = shorten(dayNames, 3)
fecha.i18n = {
dayNamesShort: dayNamesShort,
dayNames: dayNames,
monthNamesShort: monthNamesShort,
monthNames: monthNames,
amPm: ['am', 'pm'],
DoFn: function DoFn (D) {
return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10]
}
}
var formatFlags = {
D: function (dateObj) {
return dateObj.getDate()
},
DD: function (dateObj) {
return pad(dateObj.getDate())
},
Do: function (dateObj, i18n) {
return i18n.DoFn(dateObj.getDate())
},
d: function (dateObj) {
return dateObj.getDay()
},
dd: function (dateObj) {
return pad(dateObj.getDay())
},
ddd: function (dateObj, i18n) {
return i18n.dayNamesShort[dateObj.getDay()]
},
dddd: function (dateObj, i18n) {
return i18n.dayNames[dateObj.getDay()]
},
M: function (dateObj) {
return dateObj.getMonth() + 1
},
MM: function (dateObj) {
return pad(dateObj.getMonth() + 1)
},
MMM: function (dateObj, i18n) {
return i18n.monthNamesShort[dateObj.getMonth()]
},
MMMM: function (dateObj, i18n) {
return i18n.monthNames[dateObj.getMonth()]
},
YY: function (dateObj) {
return String(dateObj.getFullYear()).substr(2)
},
YYYY: function (dateObj) {
return pad(dateObj.getFullYear(), 4)
},
h: function (dateObj) {
return dateObj.getHours() % 12 || 12
},
hh: function (dateObj) {
return pad(dateObj.getHours() % 12 || 12)
},
H: function (dateObj) {
return dateObj.getHours()
},
HH: function (dateObj) {
return pad(dateObj.getHours())
},
m: function (dateObj) {
return dateObj.getMinutes()
},
mm: function (dateObj) {
return pad(dateObj.getMinutes())
},
s: function (dateObj) {
return dateObj.getSeconds()
},
ss: function (dateObj) {
return pad(dateObj.getSeconds())
},
S: function (dateObj) {
return Math.round(dateObj.getMilliseconds() / 100)
},
SS: function (dateObj) {
return pad(Math.round(dateObj.getMilliseconds() / 10), 2)
},
SSS: function (dateObj) {
return pad(dateObj.getMilliseconds(), 3)
},
a: function (dateObj, i18n) {
return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1]
},
A: function (dateObj, i18n) {
return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase()
},
ZZ: function (dateObj) {
var o = dateObj.getTimezoneOffset()
return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4)
}
}
var parseFlags = {
D: [twoDigits, function (d, v) {
d.day = v
}],
Do: [new RegExp(twoDigits.source + word.source), function (d, v) {
d.day = parseInt(v, 10)
}],
M: [twoDigits, function (d, v) {
d.month = v - 1
}],
YY: [twoDigits, function (d, v) {
var da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2)
d.year = '' + (v > 68 ? cent - 1 : cent) + v
}],
h: [twoDigits, function (d, v) {
d.hour = v
}],
m: [twoDigits, function (d, v) {
d.minute = v
}],
s: [twoDigits, function (d, v) {
d.second = v
}],
YYYY: [fourDigits, function (d, v) {
d.year = v
}],
S: [/\d/, function (d, v) {
d.millisecond = v * 100
}],
SS: [/\d{2}/, function (d, v) {
d.millisecond = v * 10
}],
SSS: [threeDigits, function (d, v) {
d.millisecond = v
}],
d: [twoDigits, noop],
ddd: [word, noop],
MMM: [word, monthUpdate('monthNamesShort')],
MMMM: [word, monthUpdate('monthNames')],
a: [word, function (d, v, i18n) {
var val = v.toLowerCase()
if (val === i18n.amPm[0]) {
d.isPm = false
} else if (val === i18n.amPm[1]) {
d.isPm = true
}
}],
ZZ: [/([\+\-]\d\d:?\d\d|Z)/, function (d, v) {
if (v === 'Z') v = '+00:00'
var parts = (v + '').match(/([\+\-]|\d\d)/gi), minutes
if (parts) {
minutes = +(parts[1] * 60) + parseInt(parts[2], 10)
d.timezoneOffset = parts[0] === '+' ? minutes : -minutes
}
}]
}
parseFlags.dd = parseFlags.d
parseFlags.dddd = parseFlags.ddd
parseFlags.DD = parseFlags.D
parseFlags.mm = parseFlags.m
parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h
parseFlags.MM = parseFlags.M
parseFlags.ss = parseFlags.s
parseFlags.A = parseFlags.a
// Some common format strings
fecha.masks = {
default: 'ddd MMM DD YYYY HH:mm:ss',
shortDate: 'M/D/YY',
mediumDate: 'MMM D, YYYY',
longDate: 'MMMM D, YYYY',
fullDate: 'dddd, MMMM D, YYYY',
shortTime: 'HH:mm',
mediumTime: 'HH:mm:ss',
longTime: 'HH:mm:ss.SSS'
}
/***
* Format a date
* @method format
* @param {Date|number} dateObj
* @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
*/
fecha.format = function (dateObj, mask, i18nSettings) {
var i18n = i18nSettings || fecha.i18n
if (typeof dateObj === 'number') {
dateObj = new Date(dateObj)
}
if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
throw new Error('Invalid Date in fecha.format')
}
mask = fecha.masks[mask] || mask || fecha.masks['default']
var literals = []
// Make literals inactive by replacing them with ??
mask = mask.replace(literal, function ($0, $1) {
literals.push($1)
return '??'
})
// Apply formatting rules
mask = mask.replace(token, function ($0) {
return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1)
})
// Inline literal values back into the formatted value
return mask.replace(/\?\?/g, function () {
return literals.shift()
})
}
/**
* Parse a date string into an object, changes - into /
* @method parse
* @param {string} dateStr Date string
* @param {string} format Date parse format
* @returns {Date|boolean}
*/
fecha.parse = function (dateStr, format, i18nSettings) {
var i18n = i18nSettings || fecha.i18n
if (typeof format !== 'string') {
throw new Error('Invalid format in fecha.parse')
}
format = fecha.masks[format] || format
// Avoid regular expression denial of service, fail early for really long strings
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
if (dateStr.length > 1000) {
return false
}
var isValid = true
var dateInfo = {}
format.replace(token, function ($0) {
if (parseFlags[$0]) {
var info = parseFlags[$0]
var index = dateStr.search(info[0])
if (!~index) {
isValid = false
} else {
dateStr.replace(info[0], function (result) {
info[1](dateInfo, result, i18n)
dateStr = dateStr.substr(index + result.length)
return result
})
}
}
return parseFlags[$0] ? '' : $0.slice(1, $0.length - 1)
})
if (!isValid) {
return false
}
var today = new Date()
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
dateInfo.hour = +dateInfo.hour + 12
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
dateInfo.hour = 0
}
var date
if (dateInfo.timezoneOffset != null) {
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset
date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0))
} else {
date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0)
}
return date
}
export default fecha

22
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/isType.js

@ -1,12 +1,12 @@
/*
*
* 判断数据类型
*
*/
function isType (value) {
let type = Object.prototype.toString.call(value)
return type.match(/\[object (.*?)\]/)[1].toLowerCase()
}
/*
*
* 判断数据类型
*
*/
function isType (value) {
let type = Object.prototype.toString.call(value)
return type.match(/\[object (.*?)\]/)[1].toLowerCase()
}
export default isType

24
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/isValid.js

@ -1,12 +1,12 @@
/*
*
* 验证日期是否合法
*
*/
import moment from 'dayjs'
export default (date) => {
// return Date.parse(date) > 0
return moment(date).isValid()
}
/*
*
* 验证日期是否合法
*
*/
import moment from 'dayjs'
export default (date) => {
// return Date.parse(date) > 0
return moment(date).isValid()
}

28
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/ishms.js

@ -1,15 +1,15 @@
export default (fmt) => {
if (/[HhmsS]/.test(fmt)) {
return 'second'
}
if (/[Hhm]/.test(fmt)) {
return 'minute'
}
if (/[Hh]/.test(fmt)) {
return 'hour'
}
return false
export default (fmt) => {
if (/[HhmsS]/.test(fmt)) {
return 'second'
}
if (/[Hhm]/.test(fmt)) {
return 'minute'
}
if (/[Hh]/.test(fmt)) {
return 'hour'
}
return false
}

16
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-datepicker/src/source/util/todate.js

@ -1,9 +1,9 @@
export default () => {
let date = new Date()
return {
year: date.getFullYear(),
month: date.getMonth() + 1,
today: date.getDate()
}
export default () => {
let date = new Date()
return {
year: date.getFullYear(),
month: date.getMonth() + 1,
today: date.getDate()
}
}

3
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-drawer/README.md

@ -12,5 +12,4 @@ closable | 是否显示关闭 | Boolean | - | false
escClose | 是否按 esc 键关闭 | Boolean | - | true
transitionName | 动画类名 | String | - | -
showMask | 是否显示遮罩 | Boolean | - | true
maskClosable | 是否关闭遮罩 | Boolean | - | true
i18n | 国际化对象 | VueI18n | - | -
maskClosable | 是否关闭遮罩 | Boolean | - | true

2
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-input/src/source/Input.vue

@ -67,6 +67,7 @@
<div ref="append" class="append-area" v-if="$slots.append">
<slot name="append"></slot>
</div>
<div class="no-border-shadow" v-if="noBorder" v-show="focused"></div>
</template>
<textarea
v-else
@ -299,7 +300,6 @@ export default {
clear () {
this.setCurrentValue('')
this.focus()
this.$emit('input', '')
},
/**
* 文本域自适应

8
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-poptip/src/source/Poptip.vue

@ -1,6 +1,6 @@
<template>
<span>
<transition :name="transition" @after-leave="destroyPopper">
<transition name="x-ani-fade" @after-leave="destroyPopper">
<div
:class="wrapperClass"
ref="popper"
@ -45,7 +45,7 @@ export default {
prefixCls: prefixCls,
delayTime: 0,
timer: null,
arrowClass: `${LIB_NAME}-popper-arrow large`
arrowClass: `${LIB_NAME}-popper-arrow`
}
},
props: {
@ -97,10 +97,6 @@ export default {
type: Number,
default: 5
},
transition: {
type: String,
default: 'x-ani-fade'
},
popperClass: String
},
computed: {

8
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-scroller/README.md

@ -23,8 +23,12 @@ bar-offset-bottom | 垂直滚动条距离视图底部的偏移 | Number | — |
事件名称 | 说明 | 回调参数
--- | --- | ---
on-scroll-x | 水平滚动改变时触发 | 当前的 left 值,是否达到最左侧,是否达到最右侧
on-scroll-y | 垂直滚动改变时触发 | 当前的 top 值,是否达到最顶部,是否达到最底部
on-x-start | 水平滚动到达最左侧时触发 | —
on-scroll-x | 水平滚动改变时触发 | 当前的 left 值
on-x-end | 水平滚动到达最右侧时触发 | —
on-y-start | 垂直滚动到达顶部时触发 | —
on-scroll-y | 垂直滚动改变时触发 | 当前的 top 值
on-y-end | 垂直滚动到达底部时触发 | —
on-start-drag-bar | 开始拖动滚动条时触发 | 是否垂直滚动条
on-end-drag-bar | 结束拖动滚动条时触发 | 是否垂直滚动条

17
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-scroller/src/source/HorizontalScrollbar.vue

@ -60,7 +60,7 @@ export default {
},
width () {
return Math.max(40, this.viewWidth * this.wrapperWidth / this.contentWidth)
return this.viewWidth * this.wrapperWidth / this.contentWidth
},
maxLeft () {
@ -69,13 +69,9 @@ export default {
},
methods: {
_getValidLeft (left) {
return Math.min(this.maxLeft, Math.max(left, 0))
},
setLeft (percentage) {
setLeft (left) {
if (this.contentWidth) {
this.left = this._getValidLeft(percentage * this.maxLeft)
this.left = -left * this.wrapperWidth / this.contentWidth
}
},
@ -101,8 +97,9 @@ export default {
const delta = event.clientX - this.startClientX
let left = this.startLeft + delta
this.left = this._getValidLeft(left)
this.$emit('on-horizontal-drag', left / this.maxLeft)
left = Math.min(this.maxLeft, Math.max(left, 0))
this.left = left
this.$emit('on-horizontal-drag', left / this.wrapperWidth)
}
},
@ -125,7 +122,7 @@ export default {
let left = this.left + delta
left = Math.min(this.maxLeft, Math.max(left, 0))
this.left = left
this.$emit('on-horizontal-drag', left / this.maxLeft)
this.$emit('on-horizontal-drag', left / this.wrapperWidth)
}
}
},

163
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-scroller/src/source/Scroller.vue

@ -4,7 +4,6 @@
ref="content"
class="scroll-area-wrapper"
:class="{'scroll-transition':!dragging}"
:style="innerStyles"
@touchstart="startDrag"
@touchmove="onDrag"
@touchend="endDrag">
@ -19,7 +18,7 @@
:offset-left="barOffsetLeft"
:offset-right="barOffsetRight"
:dragging="dragging"
:disabled="disableModel.disableX"
:disabled="disabled"
:active="activeBar"
@on-start-drag="handleStartDragBar"
@on-horizontal-drag="handleHorizontalDrag"
@ -36,7 +35,7 @@
:offset-top="barOffsetTop"
:offset-bottom="barOffsetBottom"
:dragging="dragging"
:disabled="disableModel.disableY"
:disabled="disabled"
:active="activeBar"
@on-start-drag="handleStartDragBar"
@on-vertical-drag="handleVerticalDrag"
@ -52,8 +51,6 @@ import { LIB_NAME, mousewheel, limitedLoop, formatSize } from '../../../../src/u
import xVerticalScrollbar from './VerticalScrollbar'
import xHorizontalScrollbar from './HorizontalScrollbar'
const maxScrollDistance = 500
export default {
name: 'xScroller',
@ -70,10 +67,6 @@ export default {
maxHeight: [String, Number],
innerWidth: [String, Number],
innerHeight: [String, Number],
scrollbarClass: String,
// Y true Y
@ -94,7 +87,7 @@ export default {
},
disabled: {
type: [Boolean, String],
type: Boolean,
default: false
},
@ -137,28 +130,12 @@ export default {
startTop: null,
startLeft: null,
moving: false,
hoveringBar: false
hoveringBar: false,
resetMovingTimer: null
}
},
computed: {
disableModel () {
if (typeof this.disabled === 'boolean' && this.disabled) {
return {
disableX: true,
disableY: true
}
} else if (typeof this.disabled === 'string' && ['x', 'y'].includes(this.disabled)) {
return this.disabled === 'x'
? { disableX: true, disableY: false }
: { disableX: false, disableY: true }
}
return {
disableX: false,
disableY: false
}
},
wrapperStyles () {
return {
width: formatSize(this.width),
@ -168,19 +145,12 @@ export default {
}
},
innerStyles () {
return {
width: formatSize(this.innerWidth),
height: formatSize(this.innerHeight)
}
},
minLeft () {
return Math.min(0, this.wrapperWidth - this.contentWidth)
return this.wrapperWidth - this.contentWidth
},
minTop () {
return Math.min(0, this.wrapperHeight - this.contentHeight)
return this.wrapperHeight - this.contentHeight
},
dragging () {
@ -213,22 +183,6 @@ export default {
maxHeight () {
this.checkScrollable()
},
innerWidth () {
this.checkScrollable()
},
innerHeight () {
this.checkScrollable()
},
scrollX (v) {
if (!v) this.setContentLeft(0, false)
},
scrollY (v) {
if (!v) this.setContentTop(0, false)
}
},
@ -247,12 +201,10 @@ export default {
}
this.scrollX = this.contentWidth - this.wrapperWidth > 1
this.scrollY = this.contentHeight - this.wrapperHeight > 1
this.checkBoundary()
},
handleMouseWheel (event, data) {
const { disableX, disableY } = this.disableModel
if (disableX && disableY) {
if (this.disabled) {
event.preventDefault()
return
}
@ -261,34 +213,26 @@ export default {
const content = this.$refs.content
let deltaLeft = this.reverseScrollY || shift ? -data.pixelY : -data.pixelX
let deltaTop = shift ? -data.pixelX : -data.pixelY
// mac
if (~navigator.userAgent.indexOf('Mac OS X')) {
deltaLeft = Math.min(maxScrollDistance, Math.max(-maxScrollDistance, deltaLeft))
deltaTop = Math.min(maxScrollDistance, Math.max(-maxScrollDistance, deltaTop))
}
const moveVertical = Math.abs(deltaLeft) < Math.abs(deltaTop)
if (!disableX && this.scrollX && deltaLeft && !moveVertical) {
if (this.scrollX && deltaLeft) {
let lastLeft = this.currentLeft
let left = this.getValidNumber(lastLeft + deltaLeft, this.minLeft, 0)
if (left !== lastLeft) {
this.currentLeft = left
content.style.left = left + 'px'
if (this.$refs.horizontal) {
this.$refs.horizontal.setLeft(left / this.minLeft)
this.$refs.horizontal.setLeft(left)
}
this.emitEvent(left, false)
event.preventDefault()
}
} else if (!disableY && this.scrollY && deltaTop && moveVertical) {
} else if (this.scrollY && deltaTop) {
let lastTop = this.currentTop
let top = this.getValidNumber(lastTop + deltaTop, this.minTop, 0)
if (top !== lastTop) {
this.currentTop = top
content.style.top = top + 'px'
if (this.$refs.vertical) {
this.$refs.vertical.setTop(top / this.minTop)
this.$refs.vertical.setTop(top)
}
this.emitEvent(top, true)
event.preventDefault()
@ -314,7 +258,7 @@ export default {
handleVerticalDrag (barTopPercentage) {
const content = this.$refs.content
let top = this.getValidNumber(barTopPercentage * this.minTop, this.minTop, 0)
let top = this.getValidNumber(-barTopPercentage * this.contentHeight, this.minTop, 0)
if (top !== this.currentTop) {
this.currentTop = top
content.style.top = top + 'px'
@ -326,7 +270,7 @@ export default {
handleHorizontalDrag (barLeftPercentage) {
const content = this.$refs.content
let left = this.getValidNumber(barLeftPercentage * this.minLeft, this.minLeft, 0)
let left = this.getValidNumber(-barLeftPercentage * this.contentWidth, this.minLeft, 0)
if (left !== this.currentLeft) {
this.currentLeft = left
content.style.left = left + 'px'
@ -337,10 +281,7 @@ export default {
startDrag (event) {
event.preventDefault()
const { disableX, disableY } = this.disableModel
this.$emit('start-drag')
if (disableX && disableY) return
if (this.disabled) return
event = event.changedTouches[0]
this.startTop = this.currentTop
@ -352,31 +293,28 @@ export default {
onDrag (e) {
if (!this.bodyDragging) return
this.$emit('dragging')
const { disableX, disableY } = this.disableModel
const content = this.$refs.content
const event = e.changedTouches[0]
if (!disableX && this.scrollX) {
if (this.scrollX) {
let left = this.getValidNumber(this.startLeft + event.clientX - this.startClientX, this.minLeft, 0)
if (left !== this.currentLeft) {
this.currentLeft = left
content.style.left = left + 'px'
if (this.$refs.horizontal) {
this.$refs.horizontal.setLeft(left / this.minLeft)
this.$refs.horizontal.setLeft(left)
}
this.emitEvent(left, false)
e.preventDefault()
}
}
if (!disableY && this.scrollY) {
if (this.scrollY) {
let top = this.getValidNumber(this.startTop + event.clientY - this.startClientY, this.minTop, 0)
if (top !== this.currentTop) {
this.currentTop = top
content.style.top = top + 'px'
if (this.$refs.vertical) {
this.$refs.vertical.setTop(top / this.minTop)
this.$refs.vertical.setTop(top)
}
this.emitEvent(top, true)
e.preventDefault()
@ -389,14 +327,23 @@ export default {
if (this.bodyDragging) {
this.bodyDragging = false
}
this.$emit('end-drag')
},
emitEvent (amount, vertical) {
if (vertical) {
this.$emit('on-scroll-y', amount, amount === 0, amount === this.minTop)
if (amount === 0) {
this.$nextTick(() => this.$emit('on-y-start'))
} else if (amount === this.minTop) {
this.$nextTick(() => this.$emit('on-y-end'))
}
this.$emit('on-scroll-y', amount)
} else {
this.$emit('on-scroll-x', amount, amount === 0, amount === this.minLeft)
if (amount === 0) {
this.$nextTick(() => this.$emit('on-x-start'))
} else if (amount === this.minLeft) {
this.$nextTick(() => this.$emit('on-x-end'))
}
this.$emit('on-scroll-x', amount)
}
},
@ -405,21 +352,6 @@ export default {
if (!this.contentWidth || !this.contentHeight) {
limitedLoop.nextTick(this.forceCheck, this)
}
// reset
this.forceCheck.startTime = null
},
checkBoundary () {
if (this.currentLeft > 0) {
this.setContentLeft(0, false)
} else if (this.currentLeft < this.minLeft) {
this.setContentLeft(this.minLeft, false)
}
if (this.currentTop > 0) {
this.setContentTop(0, false)
} else if (this.currentTop < this.minTop) {
this.setContentTop(this.minTop, false)
}
},
setContentLeft (left, transition = true) {
@ -428,13 +360,13 @@ export default {
this.currentLeft = left
if (!transition) {
this.bodyDragging = true
this.timer1 = setTimeout(() => {
setTimeout(() => {
this.bodyDragging = false
}, 500)
}
this.$refs.content.style.left = left + 'px'
if (this.$refs.horizontal) {
this.$refs.horizontal.setLeft(left / this.minLeft)
this.$refs.horizontal.setLeft(left)
}
this.handleAction()
},
@ -445,13 +377,13 @@ export default {
this.currentTop = top
if (!transition) {
this.bodyDragging = true
this.timer2 = setTimeout(() => {
setTimeout(() => {
this.bodyDragging = false
}, 500)
}
this.$refs.content.style.top = top + 'px'
if (this.$refs.vertical) {
this.$refs.vertical.setTop(top / this.minTop)
this.$refs.vertical.setTop(top)
}
this.handleAction()
},
@ -461,26 +393,22 @@ export default {
const content = this.$refs.content
if (!transition) {
this.bodyDragging = true
this.timer3 = setTimeout(() => {
setTimeout(() => {
this.bodyDragging = false
}, 500)
}
if (vertical) {
this.currentTop = start ? 0 : this.minTop
content.style.top = start ? 0 : this.minTop + 'px'
this.$nextTick(() => {
if (this.$refs.vertical) {
this.$refs.vertical.setTop(this.currentTop / this.minTop)
}
})
if (this.$refs.vertical) {
this.$refs.vertical.setTop(this.currentTop)
}
} else {
this.currentLeft = start ? 0 : this.minLeft
content.style.left = start ? 0 : this.minLeft + 'px'
this.$nextTick(() => {
if (this.$refs.horizontal) {
this.$refs.horizontal.setLeft(this.currentLeft / this.minLeft)
}
})
if (this.$refs.horizontal) {
this.$refs.horizontal.setLeft(this.currentLeft)
}
}
this.handleAction()
},
@ -526,13 +454,6 @@ export default {
this.forceCheck()
})
}
},
beforeDestroy () {
clearTimeout(this.timer1)
clearTimeout(this.timer2)
clearTimeout(this.timer3)
clearTimeout(this.resetMovingTimer)
}
}
</script>

19
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-scroller/src/source/VerticalScrollbar.vue

@ -60,22 +60,18 @@ export default {
},
height () {
return Math.max(40, this.viewHeight * this.wrapperHeight / this.contentHeight)
return this.viewHeight * this.wrapperHeight / this.contentHeight
},
maxTop () {
return this.wrapperHeight - this.height
return this.viewHeight - this.height
}
},
methods: {
_getValidTop (top) {
return Math.min(this.maxTop, Math.max(top, 0))
},
setTop (percentage) {
setTop (top) {
if (this.contentHeight) {
this.top = this._getValidTop(percentage * this.maxTop)
this.top = -top * this.wrapperHeight / this.contentHeight
}
},
@ -101,8 +97,9 @@ export default {
const delta = event.clientY - this.startClientY
let top = this.startTop + delta
this.top = this._getValidTop(top)
this.$emit('on-vertical-drag', top / this.maxTop)
top = Math.min(this.maxTop, Math.max(top, 0))
this.top = top
this.$emit('on-vertical-drag', top / this.wrapperHeight)
}
},
@ -125,7 +122,7 @@ export default {
let top = this.top + delta
top = Math.min(this.maxTop, Math.max(top, 0))
this.top = top
this.$emit('on-vertical-drag', top / this.maxTop)
this.$emit('on-vertical-drag', top / this.wrapperHeight)
}
}
},

9
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/README.md

@ -21,17 +21,13 @@ multiple | 是否开启多选 | Boolean | — | false
filterable | 是否开启搜索功能 | Boolean | — | false
filter-props | 当 option 的绑定值为对象时,搜索查找的对应属性列表 | Array | — | —
no-data-text | 选项为空时显示的文字 | String | — | 暂无数据
no-data-icon | 选项为空时显示的图标类名 | String | — | ans-icon-no-data
highlight-matched-text | 搜索时是否高亮选项中匹配的文字 | Boolean | — | false
ignore-case | 搜索时是否忽略大小写,可以和 filter-props 以及 highlight-matched-text 配合使用 | Boolean | — | false
highlight-matched-text | 搜索时是否高亮选项中匹配的文字,(仅当未设置 filter-props 时可用) | Boolean | — | false
no-match-text | 搜索没有任何匹配项时显示的文字 | String | — | 搜索无结果
no-match-icon | 搜索没有任何匹配项时显示的图标类名 | String | — | ans-icon-search-no-data
has-arrow | 下拉框是否显示指示箭头 | Boolean | — | false
append-to-body | 下拉框是否插入 body | Boolean | — | false
position-fixed | 下拉框是否 fixed 定位 | Boolean | — | false
viewport | 下拉框是否基于 viewport 定位 | Boolean | — | false
popper-options | Popper.js 的可选项 | Object | — | —
dropdown-class | 下拉框样式 | String | — | —
scrollbar-class | 滚动条样式 | String | — | —
drop-animation | 下拉框动画 | String | — | —
@ -41,7 +37,6 @@ drop-animation | 下拉框动画 | String | — | —
--- | --- | ---
on-change | 选中值发生变化时触发 | 目前的选中值,{ value: value, label: label }
on-visible-change | 下拉框状态改变时触发 | 出现则为 true,隐藏则为 false
on-keyword-change | 搜索关键字改变时触发 | keyword
### Select methods
@ -52,7 +47,6 @@ blur | 使 input 失去焦点并且隐藏下拉框 | —
search | 搜索 | keyword
updateScrollbar | 更新下拉框内的滚动条 | —
resetScrollbar | 将滚动条移回到顶部 | —
setDropdownReference | 手动指定下拉框的触发元素 | dom 元素
### Select slots
@ -62,6 +56,7 @@ trigger | Select 组件触发元素的插槽 | selectedModel
multiple | 开启多选时,控制 input 内如何显示的插槽 | selectedList
header | 下拉框头部插槽,必须使用作用域插槽 | —
footer | 下拉框底部插槽,必须使用作用域插槽 | —
empty | 数据为空时可使用该插槽 | —
### OptionGroup props

2
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/example/dynamic.vue

@ -3,7 +3,7 @@
<section class="demo-section">
<h4>动态 Option</h4>
<div>
<x-select height="500">
<x-select>
<div style="padding:10px 20px;" slot="header" slot-scope="header">
<x-input v-model="keyword"/>
</div>

2
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/example/index.js

@ -1,5 +1,5 @@
import Vue from 'vue'
import App from './navigation.vue'
import App from './dynamic.vue'
new Vue({
el: '#app',

125
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/example/manual.vue

@ -1,125 +0,0 @@
<template>
<div class="select-demo-wrapper">
<section class="demo-section">
<h4>手动触发</h4>
<div>
<x-select ref="select" v-model="value" valueKey="id" multiple :popperOptions="{placement:'bottom-start'}">
<x-option
v-for="city in cities"
:key="city.value"
:value="city"
:label="city.label"
>
</x-option>
<div slot="trigger">
<x-button @click="handle">第一个</x-button>
<x-button @click="handle">第二个</x-button>
<x-button @click="handle">第三个</x-button>
</div>
</x-select>
</div>
</section>
</div>
</template>
<script>
import { xButton } from '../../vue-button/src'
import { xSelect, xOption, xOptionGroup } from '../src'
export default {
name: 'app',
components: { xSelect, xOption, xOptionGroup, xButton },
data () {
return {
value: 1,
cities: [{
id: 1,
value: 'Beijing',
label: '北京'
}, {
id: 2,
value: 'Shanghai',
label: '上海'
}, {
id: 3,
value: 'Nanjing',
label: '南京'
}, {
id: 4,
value: 'Chengdu',
label: '成都'
}, {
id: 5,
value: 'Shenzhen',
label: '深圳'
}, {
id: 6,
value: 'Guangzhou',
label: '广州'
}]
}
},
methods: {
handle (e) {
this.value = 1
this.$refs.select.setDropdownReference(e.currentTarget)
this.$nextTick(() => this.$refs.select.focus())
}
}
}
</script>
<style lang="scss">
.demo-wrapper {
.cate {
height: 40px;
margin-left: 20px;
font-size: 16px;
font-weight: bold;
line-height: 40px;
}
.row {
display: flex;
margin: 20px 0;
padding: 0 50px;
& > div {
margin-right: 50px;
}
}
.custom {
display: flex;
justify-content: space-between;
padding: 5px 10px;
&:hover {
background: #8492a6;
.left,
.right {
color: #fff;
}
}
.left {
font-size: 12px;
}
.right {
color: #8492a6;
font-size: 12px;
transform: scale(0.8);
}
}
.selected .custom {
color: #598cd4;
background: #dfd8e4;
}
.custom-group {
height: 40px;
line-height: 40px;
font-size: 14px;
color: #303030;
font-weight: bolder;
background: #b7d1f0;
i {
margin: 0 10px;
}
}
}
</style>

21
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/example/navigation.vue

@ -3,14 +3,7 @@
<section class="demo-section">
<h4>键盘导航</h4>
<div>
<x-select
multiple
filterable
height="150"
highlight-matched-text
ignore-case
:filter-props="['label', 'value']"
>
<x-select multiple filterable height="150" highlight-matched-text>
<x-option
v-for="city in cities"
:key="city.value"
@ -35,27 +28,27 @@ export default {
cities: [{
id: 1,
value: 'Beijing',
label: '北京-Beijing'
label: '北京'
}, {
id: 2,
value: 'Shanghai',
label: '上海-Shanghai'
label: '上海'
}, {
id: 3,
value: 'Nanjing',
label: '南京-Nanjing'
label: '南京'
}, {
id: 4,
value: 'Chengdu',
label: '成都-Chengdu'
label: '成都'
}, {
id: 5,
value: 'Shenzhen',
label: '深圳-Shenzhen'
label: '深圳'
}, {
id: 6,
value: 'Guangzhou',
label: '广州-Guangzhou'
label: '广州'
}]
}
}

38
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/src/source/Option.vue

@ -1,14 +1,13 @@
<template>
<li
v-show="visible"
:class="[wrapperClass, {selected, disabled, multiple, 'invisible-option': !visible}]"
:class="[wrapperClass, {selected, disabled, multiple}]"
@mouseenter="hoverItem"
@touchend="handleTouch"
@click="handleClick">
<slot :option="this">
<span
class="default-option-class"
:class="{focused}"
:class="{focused, 'invisible-option': !visible}"
v-html="displayText"
></span>
<i v-if="multiple && selected" class="selected-mark"></i>
@ -50,31 +49,17 @@ export default {
return this.select && this.select.multiple
},
displayText () {
if (this.visible && this.select && this.select.filterable && this.select.highlightMatchedText && this.select.keyword) {
if (this.select.ignoreCase) {
const ll = this.label.toLowerCase()
const lk = this.select.keyword.toLowerCase()
const index = ll.indexOf(lk)
if (~index) {
const length = lk.length
return this.label.substr(0, index) + `<span class="highlight">${this.label.substr(index, length)}</span>` + this.label.substr(index + length)
}
} else {
return this.label.replace(this.select.keyword, `<span class="highlight">${this.select.keyword}</span>`)
}
}
return this.label
return (this.visible && this.select && this.select.filterable && this.select.highlightMatchedText && this.select.keyword)
? this.label.replace(this.select.keyword, `<span class="highlight">${this.select.keyword}</span>`)
: this.label
}
},
methods: {
hoverItem () {
if (!this.disabled) {
this.select.focusIndex = this.select.visibleOptions.indexOf(this)
this.select.focusIndex = this.select.options.indexOf(this)
}
},
handleTouch () {
!this.select.dragging && this.handleClick()
},
handleClick () {
if (this.clickHandler && typeof this.clickHandler === 'function') {
this.clickHandler(this.value, this.label)
@ -100,21 +85,14 @@ export default {
const value = this.value
let matchKeyword = false
for (const prop of props) {
if (value && value[prop] && this.isPropIncludeKeyword(value[prop].toString(), keyword)) {
if (value && value[prop] && value[prop].toString().includes(keyword)) {
matchKeyword = true
break
}
}
return matchKeyword
} else {
return this.isPropIncludeKeyword(this.label.toString(), keyword)
}
},
isPropIncludeKeyword (prop, keyword) {
if (this.select.ignoreCase) {
return prop.toLowerCase().includes(keyword.toLowerCase())
} else {
return prop.includes(keyword)
return this.label.toString().includes(keyword)
}
}
},

157
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/src/source/Select.vue

@ -1,10 +1,10 @@
<template>
<div :class="wrapperClass" v-click-outside="clickWrapperOutside">
<div :class="wrapperClass" v-click-outside="blur">
<div
class="tag-container"
:class="{'tag-container-disabled':disabled}"
ref="multiple"
v-if="multiple && !customTrigger"
v-if="multiple"
:style="tagContainerStyles"
@click="toggleDropdown"
@mouseenter="inputHovering = true"
@ -52,10 +52,8 @@
</slot>
</div>
<x-select-dropdown
v-click-outside="clickDropdownOutside"
ref="dropdown"
:scrollbar-class="scrollbarClass"
:custom-class="dropdownClass"
:custom-header="panelHeader"
:custom-footer="panelFooter"
:width="width"
@ -68,7 +66,7 @@
:viewport="viewport"
:popper-options="mergedOptions"
@on-update-width="handleUpdateWidth"
@click.native="clickDropdown"
@click.native="_refocus"
@keydown.native.esc.stop.prevent="_refocusTrigger"
@keydown.native.down.stop.prevent="navigateOptions('next')"
@keydown.native.up.stop.prevent="navigateOptions('prev')"
@ -86,12 +84,15 @@
<ul class="dropdown-container" :style="panelStyles">
<slot></slot>
</ul>
<div v-if="options.length === 0" class="empty-text">
<i :class="noDataIcon"></i>
<div v-if="hasEmptySlot" class="empty-hint-erea">
<slot name="empty"></slot>
</div>
<div v-if="!hasEmptySlot && options.length === 0" class="empty-text">
<i class="ans-icon-no-data"></i>
<span>{{noDataText}}</span>
</div>
<div v-else-if="visibleOptions.length === 0" class="empty-text">
<i :class="noMatchIcon"></i>
<div v-if="!hasEmptySlot && showNoMatchText" class="empty-text">
<i class="ans-icon-search-no-data"></i>
<span>{{noMatchText}}</span>
</div>
</x-select-dropdown>
@ -99,8 +100,7 @@
</template>
<script>
import { debounce } from 'throttle-debounce'
import { LIB_NAME, clickOutside, emitter, hasClass } from '../../../../src/util'
import { LIB_NAME, clickOutside, emitter, getValueByPath, hasClass } from '../../../../src/util'
import { xInput } from '../../../vue-input/src'
import xSelectDropdown from './SelectDropdown.vue'
import { t } from '../../../../src/locale'
@ -133,8 +133,6 @@ export default {
visible: false,
// select option
options: [],
// dom option
visibleOptions: [],
// option
selectedOptions: [],
// option
@ -149,9 +147,8 @@ export default {
panelHeader: null,
panelFooter: null,
panelStyles: {},
focusIndex: -1,
dragging: false,
customTrigger: false
hasEmptySlot: false,
focusIndex: -1
}
},
@ -218,23 +215,12 @@ export default {
}
},
noDataIcon: {
type: String,
default: 'ans-icon-no-data'
},
// ( filter-props )
highlightMatchedText: {
type: Boolean,
default: false
},
//
ignoreCase: {
type: Boolean,
default: false
},
//
noMatchText: {
type: String,
@ -243,11 +229,6 @@ export default {
}
},
noMatchIcon: {
type: String,
default: 'ans-icon-search-no-data'
},
hasArrow: {
type: Boolean,
default: false
@ -271,8 +252,6 @@ export default {
}
},
dropdownClass: String,
scrollbarClass: String,
dropAnimation: String
@ -317,11 +296,7 @@ export default {
selectedModel () {
return this.multiple
? this.selectedList
: this.lastOption ? {
label: this.lastOption.label,
value: this.lastOption.value,
notFound: this.lastOption.notFound
} : null
: this.lastOption ? { label: this.lastOption.label, value: this.lastOption.value } : null
},
//
@ -333,6 +308,10 @@ export default {
return this.clearable && !this.disabled && this.inputHovering && hasValue
},
showNoMatchText () {
return this.options.length !== 0 && this.options.every(o => !o.visible)
},
navigatable () {
return this.options.some(o => !o.disabled && o.visible)
}
@ -355,7 +334,7 @@ export default {
},
focusIndex (val) {
if (val > -1 && val < this.visibleOptions.length) {
if (val > -1 && val < this.options.length) {
const target = this._getOptionByElIndex(val)
this.options.forEach(o => {
o.focused = target === o
@ -369,14 +348,6 @@ export default {
},
methods: {
/**
* 设置下拉框的 reference 属性
*/
setDropdownReference (reference) {
this.hideDropdown()
this.$refs.dropdown.setReference(reference)
},
/**
* 更新下拉框内的滚动条
*/
@ -400,10 +371,8 @@ export default {
this.broadcast('xOption', 'keywordChange', keyword)
this.broadcast('xOptionGroup', 'keywordChange', keyword)
this.$nextTick(() => {
this._filterVisible()
this.$nextTick(() => this.updateScrollbar())
this.updateScrollbar()
})
this.$emit('on-keyword-change', keyword)
},
/**
@ -412,8 +381,6 @@ export default {
focus () {
if (!this.visible) {
this.toggleDropdown()
} else {
this.$refs.dropdown.updateLayout()
}
},
@ -541,10 +508,10 @@ export default {
resetHoverIndex () {
if (!this.multiple) {
this.focusIndex = this.visibleOptions.indexOf(this.lastOption)
this.focusIndex = this.options.indexOf(this.lastOption)
} else {
if (this.selectedOptions.length > 0) {
this.focusIndex = Math.min.apply(null, this.selectedOptions.map(o => this.visibleOptions.indexOf(o)))
this.focusIndex = Math.min.apply(null, this.selectedOptions.map(o => this.options.indexOf(o)))
} else {
this.focusIndex = -1
}
@ -561,13 +528,13 @@ export default {
}
if (direction === 'next') {
this.focusIndex++
if (this.focusIndex >= this.visibleOptions.length) {
if (this.focusIndex >= this.options.length) {
this.focusIndex = 0
}
} else if (direction === 'prev') {
this.focusIndex--
if (this.focusIndex < 0) {
this.focusIndex = this.visibleOptions.length - 1
this.focusIndex = this.options.length - 1
}
}
const option = this._getOptionByElIndex(this.focusIndex)
@ -577,35 +544,12 @@ export default {
this.$nextTick(() => this.$refs.dropdown.scrollToTarget(option))
},
_filterVisible () {
if (this.options.length) {
const parent = this.options[0].$el.parentNode
let els
if (hasClass(parent, 'dropdown-container')) {
els = Array.from(parent.children)
} else {
els = []
const groups = Array.from(parent.parentNode.parentNode.parentNode.children)
for (const group of groups) {
els = els.concat(Array.from(group.children[1].children[0].children))
}
}
const visibleEls = els.filter(e => !hasClass(e, 'invisible-option'))
const result = []
visibleEls.forEach(e => {
const c = this.options.find(o => o.$el === e)
c && result.push(c)
})
this.visibleOptions = result
} else {
this.visibleOptions = []
}
},
_getOptionByElIndex (index) {
if (this.options.length) {
if (this.visibleOptions.length < index + 1) return null
return this.visibleOptions[index]
const els = Array.from(this.options[0].$el.parentNode.children)
.filter(e => !hasClass('invisible-option'))
if (els.length < index + 1) return null
return this.options.find(o => o.$el === els[index])
} else {
return null
}
@ -665,7 +609,6 @@ export default {
} else {
this.lastOption = this.getOption(value)
}
this.resetHoverIndex()
}
},
@ -675,14 +618,14 @@ export default {
getOption (value) {
const checkByProp = this.valueKey || typeof value === 'object'
for (const option of this.options) {
if ((checkByProp && option.value[this.valueKey] === value[this.valueKey]) ||
if ((checkByProp && getValueByPath(option.value, this.valueKey) === value) ||
option.value === value) {
option.selected = true
return option
}
}
const label = typeof value === 'object' ? '' : value
return { value, label, notFound: true }
return { value, label }
},
/**
@ -692,7 +635,7 @@ export default {
if (index > -1) {
this.options.splice(index, 1)
}
this.debouncedUpdate()
this.focusIndex = -1
},
/**
@ -708,52 +651,22 @@ export default {
registerOption (option) {
this.options.push(option)
this.debouncedUpdate()
this.focusIndex = -1
this.setSelected(this.value)
this.$refs.dropdown && this.$refs.dropdown.checkScrollable()
},
handleUpdateWidth (width) {
this.panelStyles = { width }
},
clickWrapperOutside () {
if (this.appendToBody) {
setTimeout(() => {
if (!this.dropdownClicked) {
this.blur()
}
}, 0)
} else {
this.blur()
}
},
clickDropdownOutside () {
if (this.appendToBody) {
this.dropdownClicked = false
}
},
clickDropdown () {
if (this.appendToBody) {
this.dropdownClicked = true
} else {
this._refocus()
}
}
},
created () {
this.$on('click-option', this.handleSelect)
this.debouncedUpdate = debounce(50, () => {
this.focusIndex = -1
this.setSelected(this.value)
this._filterVisible()
this.$refs.dropdown && this.$refs.dropdown.checkScrollable()
})
},
mounted () {
this.customTrigger = !!(this.$slots.trigger || this.$scopedSlots.trigger)
this.hasEmptySlot = this.$slots.empty !== undefined
this.setSelected(this.value)
if (this.$refs.input) {
this.inputWidth = this.$refs.input.$el.clientWidth

29
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-select/src/source/SelectDropdown.vue

@ -5,14 +5,7 @@
<x-cuctom-render v-if="customHeader" :render="customHeader"></x-cuctom-render>
<slot name="search"></slot>
<div ref="wrapper" class="inner-wrapper" :style="innerStyles">
<x-scroller
ref="scroller"
:scrollbar-class="scrollbarClass"
:style="innerStyles"
width="100%"
@start-drag="handleStartDrag"
@dragging="handleDragging"
>
<x-scroller ref="scroller" :scrollbar-class="scrollbarClass" :style="innerStyles" width="100%">
<slot></slot>
</x-scroller>
</div>
@ -35,12 +28,11 @@ export default {
hasArrow: Boolean,
customHeader: Function,
customFooter: Function,
customClass: String,
scrollbarClass: String
},
data () {
return {
arrowClass: `${LIB_NAME}-popper-arrow large`,
arrowClass: `${LIB_NAME}-popper-arrow`,
wrapperStyles: {},
innerStyles: {}
}
@ -53,18 +45,11 @@ export default {
return [
`${LIB_NAME}-select-dropdown`,
{ light: this.hasArrow },
{ 'no-box-shadow': this.noBoxShadow },
this.customClass
{ 'no-box-shadow': this.noBoxShadow }
]
}
},
methods: {
handleStartDrag () {
this.$parent.dragging = false
},
handleDragging () {
this.$parent.dragging = true
},
toggle () {
if (this.visible) {
this.hide()
@ -101,14 +86,14 @@ export default {
if (option && option.$el) {
this.$refs.scroller.scrollToTarget(option.$el)
}
},
setReference (reference) {
this.destroyPopper()
this.referenceEl = reference
}
},
mounted () {
this.$refs.reference = this.$parent.$el
},
beforeDestroy () {
// Popper
this.destroyPopper()
}
}
</script>

2
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-switch/example/app.vue

@ -10,7 +10,7 @@
<section class="demo-section">
<h4>禁用状态</h4>
<div>
<x-switch v-model="checked" disabled></x-switch>
<x-switch disabled></x-switch>
</div>
</section>
<section class="demo-section">

15
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/README.md

@ -20,19 +20,16 @@ default-sort-orders | 点击表头文字,排序规则轮转顺序,数组元
default-expand-all | 是否默认展开所有行 | Boolean | — | false
expand-row-keys | 可以通过该属性设置 Table 目前的展开行,需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组 | Array | —
cell-span-method | 合并行或列的计算方法 | Function({ row, column, rowIndex, columnIndex }) | — | —
row-key | 表格行的 key 值,当 reserve-states 为 true 时,必须设置该属性 | String | — | —
current-row-key | 用于指定当前行,可以通过设置 .highlight-row 的样式来控制高亮 | String / Number | — | —
row-key | 表格行的 key 值,用于优化渲染。当 reserve-states / internal-paging 为 true 时,必须设置该属性 | String | — | —
reserve-states | 数据实例改变后是否保存多选、展开等状态,需要设置 row-key | Boolean | — | false
children-prop | 数据结构为树结构时,叶子节点数组的对应属性名称,注意树结构的数据只能使用自定义排序 | String | — | children
tree-title | 树结构的第一列是否需要加上 title 属性 | Boolean | — | false
default-unfold-children | 数据结构为树结构时,是否默认展开所有的叶子节点 | Boolean | — | false
show-header | 是否显示表头 | String | — | true
virtual-scroll | 是否启用虚拟滚动 | Boolean | — | false
row-height | 行高,启动虚拟滚动时需要设置 | Number | — | 38
max-tree-row | 当表格为树结构时,开启虚拟滚动后,最大渲染的行数 | Number | — | 15
internal-paging | 是否启用内部分页模式:实际显示的表格行数不会超过 row-limit,建议数据量过多时开启以提升性能,需要设置 row-key | Boolean | — | false
row-limit | 最大行数限制 | Number | — | 100
paging-active-distance | 未设置 table 高度时,激活上一页/下一页时的边界距离 | Number | — | 300
reverse-scroll-y | 是否反转 Y 轴滚轮,当该值为 true 时,滚动 Y 轴将控制水平方向的滚动 | Boolean | — | true
scroll-bar-class | 自定义滚动条样式名称 | String | — | —
frozen-data | 是否冻结 data,节省内存开销 | Boolean | — | true
### Table events
@ -45,8 +42,6 @@ on-expand-change | 当用户对某一行展开或者关闭的时候会触发该
on-unfolded-change | 当用户展开或者关闭树节点表格时会触发该事件 | row, unfoldedRows
on-sort-change | 当表格的排序条件发生变化时触发的事件 | column, prop, order
on-hit | 当表格内容滚动到边界时触发该事件,参数为边界位置信息 | 'left' / 'right' / 'top' / 'bottom'
on-scroll | 当表格内容滚动时触发(需要设置 height 或者 restrict 为 true) | isVertical, amount
on-slice | 当虚拟滚动做数据切割时触发 |
### Table methods
@ -70,7 +65,6 @@ type | 列的类型 | String | selection / expand | —
label | 表头内容 | String | — | —
prop | 表格内容对应的属性,支持多层访问:如 'user.address[0].city' | String | — | —
width | 列宽,单位为 px(只支持数值型的格式,如 400) | Number / String | — | —
min-width | 最小列宽,单位为 px(只支持数值型的格式,如 400) | Number / String | — | —
fixed | 是否固定列,true 等价于 left | Boolean / String | true / left / right | false
sortable | 对应列是否可以排序,如果设置为 'custom',则代表用户希望自定义排序,需要监听 Table 的 on-sort-change 事件 | Boolean / String | true / false / 'custom' | false
sort-method | 对数据进行排序的时候使用的方法,仅当 sortable 设置为 true 的时候有效,需返回一个数字,和 Array.sort 表现一致 | Function(cellA, cellB, rowA, rowB) | — | —
@ -90,4 +84,3 @@ expand | 展开行的内容,参数为 { row, $index }
prepend | 表头前置插槽,可以在不破坏原有表头功能的基础上进行额外扩展,参数为 { column, $index }
append | 表头后置插槽,可以在不破坏原有表头功能的基础上进行额外扩展,参数为 { column, $index }
headerText | 表头文本插槽,可以在不破坏原有表头功能的基础上进行额外扩展,参数为 { column, $index }
treeText | 树结构第一列文本的插槽,参数为 { row, column, content, $rowIndex, $columnIndex }

5
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/app.vue

@ -57,13 +57,12 @@
</section>
<section class="demo-section">
<h4>固定列</h4>
<x-table affix stripe :data="tableData">
<x-table stripe :data="tableData">
<x-table-column
v-for="(header, index) in detailTableHeaders"
:fixed="index === 3 ? 'right' : index === 1 ? 'left' : false"
:key="index"
:min-width="index > 2 ? 400 : undefined"
:width="index <= 2 ? 200 : undefined"
width="300"
:label="header.label"
:prop="header.prop">
</x-table-column>

2
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/index.js

@ -1,5 +1,5 @@
import Vue from 'vue'
import App from './app.vue'
import App from './dynamic.vue'
new Vue({
el: '#app',

33
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/paging.vue

@ -1,7 +1,7 @@
<template>
<div style="margin-bottom: 20px;">
<div style="line-height: 40px;">性能演示</div>
<x-table affix border virtual-scroll height="300" :default-column-width="200" row-key="rowId" :data="tableData" :cellSpanMethod="cellSpanMethod">
<x-table affix internal-paging border height="400" :default-column-width="200" row-key="rowId" :data="tableData">
<x-table-column type="selection"></x-table-column>
<x-table-column
v-for="(header, i) in headers"
@ -12,18 +12,7 @@
:label="header.label"
sortable
:sort-method="sortMethod"
>
<template slot="prepend" slot-scope="scope">
<div :style="{margin:i === 2 ? '0 0 0 10px' : '0 10px 0 0'}">这是前置插槽{{scope.$index}}</div>
</template>
<template slot="append" slot-scope="scope">
<div>这是后置插槽{{scope.$index}}</div>
</template>
<template slot="headerText" slot-scope="scope">
<div>这是表头文本插槽</div>
<div>{{scope.column.label}}</div>
</template>
</x-table-column>
></x-table-column>
</x-table>
</div>
</template>
@ -59,24 +48,6 @@ export default {
},
sortMethod (a, b) {
return a - b
},
cellSpanMethod ({ row, column, rowIndex, columnIndex }) {
// console.log('span')
if (rowIndex % 2 === 0) {
if (columnIndex === 1) {
return [1, 2]
} else if (columnIndex === 2) {
return [0, 0]
}
}
if (columnIndex === 3) {
if (rowIndex === 10) {
return [5, 1]
} else if ([11, 12, 13, 14].includes(rowIndex)) {
return [0, 0]
}
}
return [1, 1]
}
}
}

17
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/restrict.vue

@ -3,7 +3,7 @@
<div style="line-height: 40px;">restrict 属性</div>
<button @click="changeHeight">改变高度</button>
<div style="width:800px;overflow:hidden;" :style="{height:height + 'px'}">
<x-table :data="tableData" border ref="table" restrict>
<x-table :data="tableData" ref="table" restrict>
<x-table-column
v-for="header in tableHeaders"
:fixed="header.id === 1 ? 'left' : header.id === 2 ? 'right' : false"
@ -38,17 +38,8 @@ export default {
components: { xTable, xTableColumn },
computed: {
tableData () {
const list = this.getListData().slice(0, 1)
list[0].children = this.getListData()
list[0].children[2].children = this.getListData()
list[0].children[2].children[2].children = this.getListData()
return list
}
},
methods: {
getListData () {
const list = []
for (let i = 0; i < 5; i++) {
for (let i = 0; i < 6; i++) {
list.push({
id: i + 1,
name: '易小宝',
@ -64,7 +55,9 @@ export default {
})
}
return list
},
}
},
methods: {
changeHeight () {
this.height = this.height > 240 ? 200 : 400
setTimeout(() => this.$refs.table.doLayout(), 200)

14
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/example/tree.vue

@ -1,15 +1,12 @@
<template>
<div style="margin: 20px;height:200px;">
<div style="margin: 20px;">
<div style="line-height: 40px;">table tree</div>
<x-table :data="tableData" restrict ref="table" tree-title>
<x-table :data="tableData">
<x-table-column
v-for="(header, index) in tableHeaders"
:key="index"
:label="header.label"
:prop="header.prop">
<template slot="treeText" slot-scope="{content}">
<div>{{content}} + 'abc'</div>
</template>
</x-table-column>
</x-table>
</div>
@ -46,7 +43,7 @@ export default {
for (let i = 0; i < this.rowCount; i++) {
list.push({
id: i + 1,
name: '易小宝易小宝易小宝易小宝易小宝易小宝易小宝易小宝易小宝易小宝易小宝易小宝易小宝',
name: '易小宝',
city: '长沙',
lastUsedTime: `2018-09-${i + 1 < 10 ? '0' + (i + 1) : (i + 1)} 12:30:33`,
province: '湖南',
@ -60,11 +57,6 @@ export default {
}
return list
}
},
mounted () {
setTimeout(() => {
this.$refs.table.toggleRowUnfolding(this.tableData[0], true)
}, 100)
}
}
</script>

51
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/CellRenderer.vue

@ -1,51 +0,0 @@
<script>
export default {
name: 'CellRenderer',
props: {
expand: {
type: Boolean,
default: false
},
header: {
type: Boolean,
default: false
},
customRender: Function,
row: Object,
column: Object,
content: [String, Number, Object],
rIndex: Number,
cIndex: Number
},
render: function (h) {
let params
if (this.expand) {
params = {
row: this.row,
$index: this.rIndex
}
} else if (this.header) {
params = {
column: this.column,
$index: this.cIndex
}
} else {
params = {
row: this.row,
column: this.column,
content: this.content,
$rowIndex: this.rIndex,
$columnIndex: this.cIndex
}
}
const result = this.customRender(h, params)
if (!result) {
return null
}
if (Array.isArray(result)) {
return result.length === 1 ? result[0] : h('div', result)
}
return result
}
}
</script>

382
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/Table.vue

@ -14,15 +14,15 @@
ref="headerScroller"
width="100%"
height="100%"
:inner-width="scrollerContentWidth"
:show-scrollbar="false"
:disabled="scrollerDisabled"
:reverse-scroll-y="reverseScrollY"
@on-scroll-x="handleHeaderScrollX">
@on-scroll-x="handleHeaderScrollX"
@on-x-start="handleBodyScrollXStart"
@on-x-end="handleBodyScrollXEnd">
<x-table-header
:style="{
width: bodyWidth,
transform: transformX ? `translateX(${transformX}px)` : undefined
width: layout.bodyWidth ? layout.bodyWidth + 'px' : ''
}"
:store="store"
:stripe="stripe"
@ -36,25 +36,31 @@
bodyHeight,
{ marginTop: bodyTopMargin }
]"
v-spin.lock.fullscreen="layout.loading"
ref="bodyWrapper">
<x-scroller
width="100%"
height="100%"
:inner-width="scrollerContentWidth"
:inner-height="scrollerContentHeight"
ref="scroller"
:scrollbar-class="bodyScrollbarClass"
:reverse-scroll-y="reverseScrollY"
:disabled="scrollerDisabled"
show-scrollbar="active"
:bar-offset-left="layout.fixedLeftWidth"
:bar-offset-right="layout.fixedRightWidth"
@on-scroll-x="handleBodyScrollX"
@on-scroll-y="handleBodyScrollY"
@on-x-start="handleBodyScrollXStart"
@on-x-end="handleBodyScrollXEnd"
@on-y-start="handleBodyScrollYStart"
@on-y-end="handleBodyScrollYEnd"
@on-start-drag-bar="handleStartDragBar"
@on-end-drag-bar="handleEndDragBar">
<x-table-body
ref="bodyTable"
:style="tableBodyStyles"
:style="{
width: bodyWidth
}"
:store="store"
:stripe="stripe"
:border="hasBorder">
@ -73,7 +79,6 @@
</div>
<div
v-if="fixedLeftColumns.length > 0"
v-show="layout.scrollX"
:style="{
width: layout.fixedLeftWidth + 'px',
height: layout.tableHeight + 'px'
@ -98,8 +103,7 @@
<div
:style="[
{ top: layout.headerHeight + 'px' },
fixedBodyHeight,
{ width: this.layout.tableWrapperWidth + 'px' }
fixedBodyHeight
]"
class="table-body-wrapper"
ref="fixedLeftBodyWrapper">
@ -107,14 +111,16 @@
ref="fixedLeftScroller"
width="100%"
height="100%"
:inner-width="scrollerContentWidth"
:inner-height="scrollerContentHeight"
:show-scrollbar="false"
:disabled="scrollerDisabled || 'x'"
:disabled="scrollerDisabled"
@on-y-start="handleBodyScrollYStart"
@on-y-end="handleBodyScrollYEnd"
@on-scroll-y="handleFixedScrollY">
<x-table-body
fixed="left"
:style="fixedBodyStyles"
:style="{
width: '100%'
}"
:store="store"
:stripe="stripe"
:border="hasBorder">
@ -124,7 +130,6 @@
</div>
<div
v-if="fixedRightColumns.length > 0"
v-show="layout.scrollX"
:style="{
width: layout.fixedRightWidth + 'px',
height: layout.tableHeight + 'px',
@ -139,7 +144,9 @@
class="table-header-wrapper">
<x-table-header
fixed="right"
:style="fixedRightTableHeaderStyles"
:style="{
width: '100%'
}"
:store="store"
:stripe="stripe"
:border="hasBorder">
@ -148,8 +155,7 @@
<div
:style="[
{ top: layout.headerHeight + 'px' },
fixedBodyHeight,
{ width: this.layout.tableWrapperWidth + 'px' }
fixedBodyHeight
]"
class="table-body-wrapper"
ref="fixedRightBodyWrapper">
@ -157,14 +163,16 @@
ref="fixedRightScroller"
width="100%"
height="100%"
:inner-width="scrollerContentWidth"
:inner-height="scrollerContentHeight"
:show-scrollbar="false"
:disabled="scrollerDisabled || 'x'"
:disabled="scrollerDisabled"
@on-y-start="handleBodyScrollYStart"
@on-y-end="handleBodyScrollYEnd"
@on-scroll-y="handleFixedScrollY">
<x-table-body
fixed="right"
:style="[fixedBodyStyles, fixedRightBodyStyles]"
:style="{
width: '100%'
}"
:store="store"
:stripe="stripe"
:border="hasBorder">
@ -177,15 +185,18 @@
</template>
<script>
import { debounce } from 'throttle-debounce'
import { LIB_NAME } from '../../../../src/util'
import directive from '../../../vue-spin/src/source/directive.js'
import { xScroller } from '../../../vue-scroller/src'
import TableStore from './store.js'
import TableLayout from './layout.js'
import xTableBody from './TableBody'
import xTableHeader from './TableHeader'
import Vue from 'vue'
import { t } from '../../../../src/locale'
Vue.directive('spin', directive)
let tableIdSeed = 1
export default {
@ -204,6 +215,7 @@ export default {
return {
store,
layout,
multiLayerHeader: false,
resizeState: {
width: null,
height: null
@ -213,12 +225,10 @@ export default {
affixHeaderWidth: '',
isScrollXStart: true,
isScrollXEnd: false,
isScrollYStart: true,
isScrollYEnd: false,
expendRender: null,
resizeProxyVisible: false,
scrollerDisabled: false,
translateY: 0
windowScrolled: false,
scrollerDisabled: false
}
},
@ -279,11 +289,9 @@ export default {
//
cellSpanMethod: Function,
// key reserve-states true
// key
rowKey: String,
currentRowKey: [String, Number],
reserveStates: {
type: Boolean,
default: false
@ -294,12 +302,6 @@ export default {
default: 'children'
},
// title
treeTitle: {
type: Boolean,
default: false
},
// tree table
defaultUnfoldChildren: {
type: Boolean,
@ -311,22 +313,22 @@ export default {
default: true
},
//
virtualScroll: {
//
internalPaging: {
type: Boolean,
default: false
},
//
rowHeight: {
//
rowLimit: {
type: Number,
default: 38
default: 100
},
//
maxTreeRow: {
// table /
pagingActiveDistance: {
type: Number,
default: 15
default: 300
},
// Y true Y
@ -335,17 +337,12 @@ export default {
default: false
},
scrollBarClass: String,
frozenData: {
type: Boolean,
default: true
}
scrollBarClass: String
},
computed: {
hasBorder () {
return this.border || this.store.states.multiLayer
return this.border || this.multiLayerHeader
},
wrapperClasses () {
@ -354,10 +351,6 @@ export default {
{ [`${LIB_NAME}-table--border`]: this.hasBorder },
{ 'scrollable-x': this.layout.scrollX },
{ 'scrollable-y': this.layout.scrollY },
{ 'hit-left': this.layout.scrollX && this.isScrollXStart },
{ 'hit-right': this.layout.scrollX && this.isScrollXEnd },
{ 'hit-top': this.layout.scrollY && this.isScrollYStart },
{ 'hit-bottom': this.layout.scrollY && this.isScrollYEnd },
{ 'affix-table-header': this.affix }
]
},
@ -385,37 +378,29 @@ export default {
fixedLeftHeaderStyles () {
if (this.activeAffix) {
return {
width: this.layout.tableWrapperWidth + 'px',
width: this.layout.fixedLeftWidth + 'px',
position: 'fixed',
top: this.affixDistance + 'px'
}
} else {
return {
width: this.layout.tableWrapperWidth + 'px'
}
return null
}
},
fixedRightHeaderStyles () {
if (this.activeAffix) {
return {
width: this.layout.tableWrapperWidth + 'px',
width: this.layout.fixedRightWidth + 'px',
position: 'fixed',
top: this.affixDistance + 'px',
left: this.$el.getBoundingClientRect().left + 'px'
top: this.affixDistance + 'px'
}
} else {
return {
width: this.layout.tableWrapperWidth + 'px'
}
return null
}
},
bodyWidth () {
const { bodyWidth, tableWidth, scrollX } = this.layout
if (this.virtualScroll && scrollX) {
return tableWidth ? tableWidth + 'px' : ''
}
const { bodyWidth } = this.layout
return bodyWidth ? bodyWidth + 'px' : ''
},
@ -444,67 +429,6 @@ export default {
bodyScrollbarClass () {
return this.scrollBarClass ? `${this.scrollBarClass} table-body-scroller` : 'table-body-scroller'
},
scrollerContentWidth () {
return this.layout.scrollX && this.virtualScroll ? this.layout.bodyWidth + 'px' : undefined
},
scrollerContentHeight () {
return this.store.states.transformBodyY ? this.store.states.contentHeight + 'px' : undefined
},
transformX () {
return this.layout.scrollX && this.store.states.transformXAmount
? this.store.states.transformXAmount
: 0
},
tableBodyStyles () {
const result = {
width: this.bodyWidth
}
if (this.virtualScroll) {
result['will-change'] = 'transform'
const x = this.transformX
if (this.store.states.transformBodyY) {
result.transform = `translate(${x}px, ${this.translateY}px)`
} else {
result.transform = `translateX(${x}px)`
}
}
return result
},
fixedBodyStyles () {
const result = {}
if (this.store.states.transformBodyY) {
result['will-change'] = 'transform'
result.transform = `translateY(${this.translateY}px)`
}
if (this.layout.scrollX && this.virtualScroll) {
result.width = this.bodyWidth
} else {
result.width = '100%'
}
return result
},
fixedRightTransformX () {
const { tableWidth, bodyWidth } = this.layout
return bodyWidth - tableWidth
},
fixedRightTableHeaderStyles () {
return {
width: '100%',
position: 'relative',
left: this.$refs.scroller.minLeft + this.fixedRightTransformX + 'px'
}
},
fixedRightBodyStyles () {
return this.transformX ? { transform: `translateX(${this.fixedRightTransformX}px)` } : {}
}
},
@ -535,6 +459,10 @@ export default {
handler (newVal) {
this.layout.setHeight(newVal)
}
},
multiLayerHeader () {
this.$nextTick(() => this.doLayout())
}
},
@ -550,7 +478,6 @@ export default {
this.$refs.scroller.stickToBoundary(false, true, false)
this.isScrollXStart = true
this.isScrollXEnd = false
this.store.states.transformXAmount = 0
} else if (position === 'right') {
this.$refs.headerScroller && this.$refs.headerScroller.stickToBoundary(false, false, false)
this.$refs.scroller.stickToBoundary(false, false, false)
@ -560,17 +487,10 @@ export default {
this.$refs.fixedLeftScroller && this.$refs.fixedLeftScroller.stickToBoundary(true, true, false)
this.$refs.fixedRightScroller && this.$refs.fixedRightScroller.stickToBoundary(true, true, false)
this.$refs.scroller.stickToBoundary(true, true, false)
this.isScrollYStart = true
this.isScrollYEnd = false
} else if (position === 'bottom') {
this.$refs.fixedLeftScroller && this.$refs.fixedLeftScroller.stickToBoundary(true, false, false)
this.$refs.fixedRightScroller && this.$refs.fixedRightScroller.stickToBoundary(true, false, false)
this.$refs.scroller.stickToBoundary(true, false, false)
this.isScrollYStart = false
this.isScrollYEnd = true
}
if (this.virtualScroll) {
this.store.sliceData()
}
},
@ -603,7 +523,7 @@ export default {
},
bindEvent () {
if (this.affix) {
if (this.affix || this.internalPaging) {
window.addEventListener('scroll', this.windowScrollListener)
}
@ -630,78 +550,90 @@ export default {
}
},
handleHeaderScrollX (left, hitLeft, hitRight) {
this._setScrollXStates(hitLeft, hitRight)
handleHeaderScrollX (left) {
this.isScrollXStart = false
this.isScrollXEnd = false
if (this.layout.scrollX) {
this.$refs.scroller.setContentLeft(left)
}
this.store.throttleCalculateColumnIndexes(left)
this.$emit('on-scroll', false, left)
},
_setScrollXStates (hitLeft, hitRight) {
if (hitLeft) {
this.isScrollXStart = true
this.$emit('on-hit', 'left')
} else if (hitRight) {
this.isScrollXEnd = true
this.$emit('on-hit', 'right')
} else {
this.isScrollXStart = false
this.isScrollXEnd = false
handleFixedScrollY (top) {
this.$refs.scroller.setContentTop(top)
if (this.$refs.fixedLeftScroller) {
this.$refs.fixedLeftScroller.setContentTop(top)
}
if (this.$refs.fixedRightScroller) {
this.$refs.fixedRightScroller.setContentTop(top)
}
},
handleFixedScrollY (top, hitTop, hitBottom) {
this._setScrollYStates(hitTop, hitBottom)
this.$refs.scroller.setContentTop(top)
this._afterScrollY(top)
windowScrollListener () {
if (this.affix) {
const boundingRect = this.$el.getBoundingClientRect()
this.activeAffix = boundingRect.top < this.affixDistance &&
boundingRect.top + this.$el.offsetHeight > this.$refs.headerWrapper.offsetHeight
this.updateAffixHeaderWidth()
}
if (this.windowScrolled && !this.layout.scrollY && this.store.states.paging) {
const bodyWrapper = this.$refs.bodyWrapper
const y = bodyWrapper.getBoundingClientRect().top
if (y + bodyWrapper.clientHeight < window.innerHeight + this.pagingActiveDistance) {
if (!this.layout.slicing) {
this.store.nextPage()
}
} else if (y > -this.pagingActiveDistance) {
if (!this.layout.slicing) {
this.store.prevPage()
}
}
}
this.windowScrolled = true
},
_setScrollYStates (hitTop, hitBottom) {
if (hitTop) {
this.isScrollYStart = true
this.$emit('on-hit', 'top')
} else if (hitBottom) {
this.isScrollYEnd = true
this.$emit('on-hit', 'bottom')
} else {
this.isScrollYStart = false
this.isScrollYEnd = false
handleBodyScrollX (left) {
this.isScrollXStart = false
this.isScrollXEnd = false
if (this.showHeader) {
this.$refs.headerScroller.setContentLeft(left)
}
},
_afterScrollY (top) {
handleBodyScrollY (top) {
if (this.$refs.fixedLeftScroller) {
this.$refs.fixedLeftScroller.setContentTop(top)
}
if (this.$refs.fixedRightScroller) {
this.$refs.fixedRightScroller.setContentTop(top)
}
this.store.throttleCalculateIndexes(top)
this.$emit('on-scroll', true, top)
this.updateTranslateY(undefined, top)
},
handleBodyScrollX (left, hitLeft, hitRight) {
this._setScrollXStates(hitLeft, hitRight)
if (this.showHeader) {
this.$refs.headerScroller.setContentLeft(left)
}
this.store.throttleCalculateColumnIndexes(left)
this.$emit('on-scroll', false, left)
handleBodyScrollXStart () {
this.isScrollXStart = true
this.$emit('on-hit', 'left')
},
handleBodyScrollY (top, hitTop, hitBottom) {
this._setScrollYStates(hitTop, hitBottom)
this._afterScrollY(top)
handleBodyScrollXEnd () {
this.isScrollXEnd = true
this.$emit('on-hit', 'right')
},
windowScrollListener () {
const boundingRect = this.$el.getBoundingClientRect()
this.activeAffix = boundingRect.top < this.affixDistance &&
boundingRect.top + this.$el.offsetHeight > this.$refs.headerWrapper.offsetHeight
this.updateAffixHeaderWidth()
handleBodyScrollYStart () {
if (this.store.states.paging) {
if (!this.layout.slicing) {
this.store.prevPage()
}
}
this.$emit('on-hit', 'top')
},
handleBodyScrollYEnd () {
if (this.store.states.paging) {
if (!this.layout.slicing) {
this.store.nextPage()
}
}
this.$emit('on-hit', 'bottom')
},
resizeListener () {
@ -720,7 +652,7 @@ export default {
shouldUpdateLayout = true
}
if (shouldUpdateLayout || this.restrict) {
if (shouldUpdateLayout) {
this.resizeState.width = width
this.resizeState.height = height
this.doLayout()
@ -751,65 +683,46 @@ export default {
},
checkScrollable () {
const { scroller, headerScroller, fixedLeftScroller, fixedRightScroller } = this.$refs
if (!scroller) return
const prevTop = scroller.currentTop
const prevLeft = scroller.currentLeft
if (prevLeft === 0) {
this.store.states.transformXAmount = 0
}
scroller.checkScrollable()
this.isScrollXStart = scroller.currentLeft === 0
this.isScrollXEnd = scroller.currentLeft === scroller.minLeft
this.isScrollYStart = scroller.currentTop === 0
this.isScrollYEnd = scroller.currentTop === scroller.minTop
if (Math.abs(prevTop - scroller.currentTop) > 1 || Math.abs(prevLeft - scroller.currentLeft) > 1) {
return this.store.sliceData()
}
if (headerScroller) {
headerScroller.checkScrollable()
}
if (fixedLeftScroller) {
fixedLeftScroller.checkScrollable()
if (scroller.currentTop !== fixedLeftScroller.currentTop) {
fixedLeftScroller.setContentTop(scroller.currentTop)
}
if (this.$refs.scroller) {
this.$refs.scroller.checkScrollable()
}
if (fixedRightScroller) {
fixedRightScroller.checkScrollable()
fixedRightScroller.stickToBoundary(false, false, false)
if (scroller.currentTop !== fixedRightScroller.currentTop) {
fixedRightScroller.setContentTop(scroller.currentTop)
}
if (this.$refs.headerScroller) {
this.$refs.headerScroller.checkScrollable()
}
if (this.$refs.fixedLeftScroller) {
this.$refs.fixedLeftScroller.checkScrollable()
}
if (this.$refs.fixedRightScroller) {
this.$refs.fixedRightScroller.checkScrollable()
}
},
windowLoadListener () {
this.doLayout()
moveBodyTopByDiff (diff) {
const top = this.$refs.scroller.currentTop - diff
this.setBodyTop(top)
},
updateTranslateY (amount, top) {
if (amount !== undefined) {
this.translateY = amount
} else {
const { bodyHeight } = this.layout
const tableHeight = this.$refs.bodyTable.$el.offsetHeight
if (bodyHeight - top > this.translateY + tableHeight) {
this.translateY = 1.5 * bodyHeight - top - tableHeight
} else if (top + this.translateY > 0) {
this.translateY = -top - 0.5 * bodyHeight
}
setBodyTop (top) {
this.$refs.scroller.setContentTop(top, false)
if (this.$refs.fixedLeftScroller) {
this.$refs.fixedLeftScroller.setContentTop(top, false)
}
if (this.$refs.fixedRightScroller) {
this.$refs.fixedRightScroller.setContentTop(top, false)
}
},
windowLoadListener () {
this.doLayout()
}
},
created () {
this.tableId = `${LIB_NAME}-table_${tableIdSeed++}`
if (this.internalPaging && !this.rowKey) {
throw new Error('Table: Prop row-key should not be empty when internal-paging enabled.')
}
window.addEventListener('load', this.windowLoadListener)
this.debouncedUpdateLayout = debounce(50, () => this.doLayout())
this.debouncedCheckScrollable = debounce(10, () => this.checkScrollable())
},
mounted () {
@ -828,8 +741,7 @@ export default {
})
},
beforeDestroy () {
this.store.states.destroying = true
destroyed () {
window.removeEventListener('load', this.windowLoadListener)
window.removeEventListener('scroll', this.windowScrollListener)
window.removeEventListener('resize', this.resizeListener)

79
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableBody.vue

@ -5,35 +5,37 @@
cellpadding="0"
border="0">
<colgroup>
<col :name="column.id" v-for="(column, i) in renderedColColumns" :key="i">
<col :name="column.id" v-for="column in colColumns" :key="column.id">
</colgroup>
<tbody>
<template v-for="(row, i) in data">
<tr
:key="row.key"
:key="getRowKey(i, row)"
:table-row-key="getRowKey(i, row)"
class="table-row"
:class="[row.classes, {'highlight-row': row.key === table.currentRowKey}]"
:class="getRowClasses(i)"
@mouseenter="handleMouseEnter(i)"
@mouseleave="handleMouseLeave()">
<x-table-td
v-for="(cell, j) in row.renderedCells"
:key="row.key + '-' + cell.column.id"
:class="columnClasses[cell.columnIndex]"
v-for="(column, j) in colColumns"
:key="column.id"
:class="getCellClasses(j === colColumns.length -1)"
:store="store"
:row="row.item"
:column="cell.column"
:row="row"
:column="column"
:first="firstTextColumnIndex === j"
:row-index="row.rowIndex"
:cell="cell"
:row-index="i"
:column-index="j"
:fixed="fixed"
></x-table-td>
</tr>
<tr v-if="expandable && expandRows.includes(row.item)" :key="'expand_' + i">
<td class="table-cell" :class="getCellClasses(false)" :colspan="renderedColColumns.length">
<tr v-if="expandable && expandRows.includes(row)" :key="'expand_' + getRowKey(i, row)">
<td class="table-cell" :class="getCellClasses(false)" :colspan="colColumns.length">
<x-cell-renderer
expand
:row="row.item"
:r-index="row.rowIndex"
:custom-render="table.expendRender">
:row="row"
:r-index="i"
:render="table.expendRender">
</x-cell-renderer>
</td>
</tr>
@ -43,9 +45,9 @@
</template>
<script>
import { LIB_NAME, addClass, removeClass } from '../../../../src/util'
import { LIB_NAME, addClass, removeClass, getValueByPath } from '../../../../src/util'
import xTableTd from './TableTd'
import xCellRenderer from './CellRenderer.vue'
import xCellRenderer from './cellRenderer.js'
import layoutObserver from './layoutObserver.js'
export default {
@ -70,18 +72,16 @@ export default {
return this.store.states.data
},
renderedColColumns () {
return this.store.states.renderedColColumns
columns () {
return this.store.states.columns
},
colColumns () {
return this.store.states.colColumns
leafColumns () {
return this.store.states.leafColumns
},
columnClasses () {
const target = this.colColumns
const maxIndex = target.length - 1
return target.map((c, i) => this.getCellClasses(i === maxIndex, c))
colColumns () {
return this.table.multiLayerHeader ? this.leafColumns : this.columns
},
firstTextColumnIndex () {
@ -94,10 +94,6 @@ export default {
expandRows () {
return this.store.states.expandRows
},
sortingColumn () {
return this.store.states.sortingColumn
}
},
@ -128,13 +124,30 @@ export default {
},
methods: {
getCellClasses (transparent, column) {
getRowKey (i, row) {
if (!row) {
throw new Error('Table Body: Find invalid row!')
}
const rowKey = this.table.rowKey
if (rowKey) {
return getValueByPath(row, rowKey)
}
return i
},
getRowClasses (i) {
const classes = []
if (this.stripe) {
classes.push(i % 2 === 1 ? 'striped-row' : 'no-striped-row')
}
return classes
},
getCellClasses (transparent) {
return {
'right-border': this.border,
'bottom-border': this.border || !this.stripe,
'transparent-border': this.fixed && transparent,
'sorting-column': column && this.sortingColumn === column,
'hidden-column': column && ((this.fixed && !column.fixed) || (!this.fixed && column.fixed))
'transparent-border': this.fixed && transparent
}
},

40
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableColumn.vue

@ -32,7 +32,7 @@ const getDefaultColumn = (type, options) => {
}
if (column.width !== undefined) {
column.width = parseWidth(column.width)
column.width = parseInt(column.width)
}
column.currentWidth = column.width || column.minWidth
@ -40,16 +40,6 @@ const getDefaultColumn = (type, options) => {
return column
}
const parseWidth = (width) => {
if (width !== undefined) {
width = parseInt(width, 10);
if (isNaN(width)) {
width = null;
}
}
return width;
};
export default {
name: 'xTableColumn',
@ -69,9 +59,6 @@ export default {
//
width: [Number, String],
//
minWidth: [Number, String],
// `left` `right`
fixed: [Boolean, String],
@ -145,22 +132,16 @@ export default {
width (newVal) {
if (this.columnConfig) {
this.columnConfig.width = parseWidth(newVal)
this.owner.store.scheduleLayout()
}
},
minWidth (newVal) {
if (this.columnConfig) {
this.columnConfig.minWidth = parseWidth(newVal)
this.owner.store.scheduleLayout()
this.columnConfig.width = typeof newVal === 'string' ? parseInt(newVal) : newVal
this.owner.doLayout()
}
},
fixed (newVal) {
if (this.columnConfig) {
this.columnConfig.fixed = newVal
this.owner.store.scheduleLayout(true)
this.owner.store.updateColumns()
this.owner.doLayout()
}
},
@ -185,7 +166,6 @@ export default {
label: this.label,
prop: this.prop,
width: this.width,
minWidth: parseWidth(this.minWidth),
fixed: this.fixed,
sortable: this.sortable === '' ? true : this.sortable,
sortMethod: this.sortMethod,
@ -193,9 +173,7 @@ export default {
resizable: this.resizable,
formatter: this.formatter,
align: this.align,
headerAlign: this.headerAlign,
parent: parent.columnConfig,
destroyed: false
headerAlign: this.headerAlign
})
},
@ -250,18 +228,12 @@ export default {
columnConfig.headerText = (h, scope) => $scopedSlots.headerText(scope)
}
//
if ($scopedSlots.treeText) {
columnConfig.treeText = (h, scope) => $scopedSlots.treeText(scope)
}
owner.store.commit('insertColumn', columnConfig, columnIndex, isSubColumn ? parent.columnConfig : null)
},
destroyed () {
if (!this.$parent) return
const parent = this.$parent
this.columnConfig.destroyed = true
this.owner.store.commit('removeColumn', this.columnConfig, this.isSubColumn ? parent.columnConfig : null)
}
}

147
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableHeader.vue

@ -5,36 +5,38 @@
cellpadding="0"
border="0">
<colgroup>
<col :name="column.id" v-for="(column, i) in colColumns" :key="i">
<col :name="column.id" v-for="column in colColumns" :key="column.id">
</colgroup>
<thead>
<tr v-if="!multiLayer" class="table-header-row" :class="{stripe}">
<x-table-th
v-for="(column, i) in renderedColumns"
:key="i"
v-for="(column, i) in columns"
:key="column.id"
:store="store"
:border="border"
:column="column"
:column-index="column._index"
:class="columnClasses[column.id]"
:column-index="i"
:class="getCellClasses(i === columns.length - 1)"
:fixed="fixed"
></x-table-th>
</tr>
<tr
v-else
v-for="(row, i) in renderedRows"
v-for="(row, i) in rows"
:key="i"
class="table-header-row"
:class="{stripe}">
<x-table-th
v-for="column in row"
:key="i + '-' + column.id"
v-for="(column, j) in row"
:key="column.id"
:store="store"
:border="border"
:column="column"
:column-index="column._indexInRow"
:column-index="j"
:colspan="column.colSpan"
:rowspan="column.rowSpan"
:class="columnClasses[column.id]"
:class="getCellClasses(j === row.length - 1)"
:fixed="fixed"
></x-table-th>
</tr>
</thead>
@ -46,6 +48,64 @@ import { LIB_NAME } from '../../../../src/util'
import layoutObserver from './layoutObserver.js'
import xTableTh from './TableTh'
const getAllColumns = (columns) => {
const result = []
columns.forEach((column) => {
if (column.children) {
result.push(column)
result.push.apply(result, getAllColumns(column.children))
} else {
result.push(column)
}
})
return result
}
const convertToRows = (originColumns) => {
let maxLevel = 1
const traverse = (column, parent) => {
if (parent) {
column.level = parent.level + 1
if (maxLevel < column.level) {
maxLevel = column.level
}
}
if (column.children) {
let colSpan = 0
column.children.forEach((subColumn) => {
traverse(subColumn, column)
colSpan += subColumn.colSpan
})
column.colSpan = colSpan
} else {
column.colSpan = 1
}
}
originColumns.forEach((column) => {
column.level = 1
traverse(column)
})
const rows = []
for (let i = 0; i < maxLevel; i++) {
rows.push([])
}
const allColumns = getAllColumns(originColumns)
allColumns.forEach((column) => {
if (!column.children) {
column.rowSpan = maxLevel - column.level + 1
} else {
column.rowSpan = 1
}
rows[column.level - 1].push(column)
})
return rows
}
export default {
name: 'xTableHeader',
@ -55,7 +115,9 @@ export default {
data () {
return {
wrapperClass: `${LIB_NAME}-table-header`
wrapperClass: `${LIB_NAME}-table-header`,
rows: [],
multiLayer: false
}
},
@ -68,52 +130,12 @@ export default {
return this.store.states.columns
},
renderedColumns () {
return this.store.states.renderedColumns
},
columnClasses () {
if (this.multiLayer) {
const r = {}
for (let i = 0; i < this.rows.length; i++) {
const row = this.rows[i]
const maxIndex = row.length - 1
for (let j = 0; j < row.length; j++) {
const c = row[j]
r[c.id] = this.getCellClasses(j === maxIndex, c)
}
}
return r
} else {
const maxIndex = this.columns.length - 1
const r = {}
this.columns.forEach((c, i) => r[c.id] = this.getCellClasses(i === maxIndex, c))
return r
}
},
rows () {
return this.store.states.rows
},
renderedRows () {
return this.store.states.renderedRows
},
multiLayer () {
return this.store.states.multiLayer
leafColumns () {
return this.store.states.leafColumns
},
colColumns () {
return this.store.states.renderedColColumns
},
sortingColumn () {
return this.store.states.sortingColumn
},
sortOrder () {
return this.store.states.sortOrder
return this.multiLayer ? this.leafColumns : this.columns
}
},
@ -126,14 +148,23 @@ export default {
fixed: String
},
watch: {
columns: {
immediate: true,
handler (val) {
this.rows = convertToRows(val)
this.multiLayer = this.rows.length > 1
this.table.multiLayerHeader = this.multiLayer
}
}
},
methods: {
getCellClasses (transparent, column) {
getCellClasses (transparent) {
return {
'right-border': this.border,
'bottom-border': this.border,
'transparent-border': this.fixed && transparent,
[this.sortOrder]: this.sortingColumn === column,
'hidden-column': (this.fixed && !column.fixed) || (!this.fixed && column.fixed)
'transparent-border': this.fixed && transparent
}
}
}

100
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableTd.vue

@ -1,17 +1,18 @@
<template>
<td
v-if="visible && !column.destroyed"
:rowspan="cell.spanModel.rowspan"
:colspan="cell.spanModel.colspan"
v-if="visible"
:rowspan="rowspan"
:colspan="colspan"
:class="{ 'sorting-column': sortingColumn === column, 'hidden-column': fixed && column.__hiddenInFixed }"
class="table-cell">
<x-cell-renderer
v-if="column.customRender"
:content="cell.content"
:content="getCellContent()"
:row="row"
:column="column"
:r-index="rowIndex"
:c-index="cell.columnIndex"
:custom-render="column.customRender">
:c-index="columnIndex"
:render="column.customRender">
</x-cell-renderer>
<template v-else>
<div v-if="column.type === 'selection'" class="table-cell-content icon-column">
@ -28,40 +29,17 @@
</div>
<div
v-else
:title="titleText"
class="table-cell-content"
:class="contentClasses">
<template v-if="showUnfoldIcon">
<span class="tree-branch-text">{{getCellContent()}}</span>
<i
class="unfold-icon ans-icon-arrow-right"
:class="{'rotate-down':unfold}"
@click="store.commit('rowUnfoldingChanged', row)"
></i>
<span class="tree-branch-text" @click="store.commit('rowUnfoldingChanged', row)">
<x-cell-renderer
v-if="column.treeText && first"
:content="cell.content"
:row="row"
:column="column"
:r-index="rowIndex"
:c-index="cell.columnIndex"
:custom-render="column.treeText">
</x-cell-renderer>
<template v-else>{{cell.content}}</template>
</span>
</template>
<template v-else>
<x-cell-renderer
v-if="column.treeText && first"
:content="cell.content"
:row="row"
:column="column"
:r-index="rowIndex"
:c-index="cell.columnIndex"
:custom-render="column.treeText">
</x-cell-renderer>
<template v-else>{{cell.content}}</template>
</template>
<template v-else>{{getCellContent()}}</template>
</div>
</template>
</td>
@ -69,7 +47,8 @@
<script>
import { xCheckbox } from '../../../vue-checkbox/src'
import xCellRenderer from './CellRenderer.vue'
import xCellRenderer from './cellRenderer.js'
import { getValueByPath } from '../../../../src/util'
export default {
name: 'xTableTd',
@ -89,10 +68,18 @@ export default {
rowIndex: {
required: true
},
cell: {
columnIndex: {
required: true
},
first: Boolean
first: Boolean,
fixed: String
},
data () {
return {
rowspan: 1,
colspan: 1
}
},
computed: {
@ -101,7 +88,7 @@ export default {
},
visible () {
return this.cell.spanModel.rowspan || this.cell.spanModel.colspan
return this.rowspan || this.colspan
},
selection () {
@ -116,27 +103,50 @@ export default {
return this.store.states.treeType && this.store.states.parentRows.includes(this.row) && this.first
},
titleText () {
return this.store.states.treeType && this.table.treeTitle ? this.cell.content : undefined
},
unfold () {
return this.store.states.unfoldedRows.includes(this.row)
},
sortingColumn () {
return this.store.states.sortingColumn
},
contentClasses () {
let classes = `align-${this.column.align}`
if (this.store.states.treeType && this.first) {
classes += ` row-level-${this.row.__level}`
if (this.showUnfoldIcon) {
classes += ' flex-wrapper'
}
if (this.table.treeTitle) {
classes += ' ellipsis-text'
}
}
return classes
}
},
methods: {
getCellContent () {
const { row, column, rowIndex, columnIndex } = this
const value = getValueByPath(row, column.prop)
if (column.formatter) {
return column.formatter(row, column, value, rowIndex, columnIndex)
}
return value
}
},
created () {
const cellSpanMethod = this.table.cellSpanMethod
const { row, column, rowIndex, columnIndex } = this
if (cellSpanMethod) {
const result = cellSpanMethod({ row, column, rowIndex, columnIndex })
let rowspan, colspan
if (Array.isArray(result)) {
rowspan = result[0]
colspan = result[1]
} else if (typeof result === 'object') {
rowspan = result.rowspan
colspan = result.colspan
}
this.colspan = colspan
this.rowspan = rowspan
}
}
}
</script>

26
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/TableTh.vue

@ -1,8 +1,8 @@
<template>
<th
v-if="!column.destroyed"
:colspan="colspan"
:rowspan="rowspan"
:class="{ [sortOrder]: sortingColumn === column, 'hidden-column': fixed && column.__hiddenInFixed }"
class="table-header-cell"
@mousedown="handleMouseDown($event, column)"
@mousemove="handleMouseMove($event, column)"
@ -12,12 +12,11 @@
header
:column="column"
:c-index="columnIndex"
:custom-render="column.customHeader"
:render="column.customHeader"
></x-cell-renderer>
<template v-else>
<div v-if="column.type === 'selection'" class="table-header-cell-content icon-column">
<x-checkbox
:indeterminate="store.states.isIndeterminate"
:value="store.states.isAllSelected"
@on-change="store.commit('allSelectionChanged')">
</x-checkbox>
@ -35,7 +34,7 @@
header
:column="column"
:c-index="columnIndex"
:custom-render="column.prependHeader"
:render="column.prependHeader"
></x-cell-renderer>
<span
v-if="column.headerText"
@ -47,7 +46,7 @@
header
:column="column"
:c-index="columnIndex"
:custom-render="column.headerText"
:render="column.headerText"
></x-cell-renderer>
</span>
<span
@ -65,7 +64,7 @@
header
:column="column"
:c-index="columnIndex"
:custom-render="column.appendHeader"
:render="column.appendHeader"
></x-cell-renderer>
</div>
</template>
@ -75,7 +74,7 @@
<script>
import { xCheckbox } from '../../../vue-checkbox/src'
import xCellRenderer from './CellRenderer.vue'
import xCellRenderer from './cellRenderer.js'
const PROXY_GAP = 8
@ -96,7 +95,8 @@ export default {
},
border: Boolean,
rowspan: Number,
colspan: Number
colspan: Number,
fixed: String
},
computed: {
@ -104,6 +104,14 @@ export default {
return this.store.table
},
sortingColumn () {
return this.store.states.sortingColumn
},
sortOrder () {
return this.store.states.sortOrder
},
dragging () {
return this.store.states.dragging
},
@ -163,7 +171,7 @@ export default {
const columnWidth = finalLeft - startColumnLeft
column.width = column.currentWidth = columnWidth
store.scheduleLayout()
table.doLayout()
document.body.style.cursor = ''
store.commit('setDraggingState', false)

43
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/cellRenderer.js

@ -0,0 +1,43 @@
export default {
name: 'CellRenderer',
functional: true,
props: {
expand: {
type: Boolean,
default: false
},
header: {
type: Boolean,
default: false
},
render: Function,
row: Object,
column: Object,
content: [String, Number, Object],
rIndex: Number,
cIndex: Number
},
render: (h, ctx) => {
let params
if (ctx.props.expand) {
params = {
row: ctx.props.row,
$index: ctx.props.rIndex
}
} else if (ctx.props.header) {
params = {
column: ctx.props.column,
$index: ctx.props.cIndex
}
} else {
params = {
row: ctx.props.row,
column: ctx.props.column,
content: ctx.props.content,
$rowIndex: ctx.props.rIndex,
$columnIndex: ctx.props.cIndex
}
}
return ctx.props.render(h, params)
}
}

129
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/layout.js

@ -11,8 +11,6 @@ export default class TableLayout {
this.scrollX = false
this.scrollY = false
this.bodyWidth = null
this.tableWidth = null
this.tableWrapperWidth = null
this.fixedLeftWidth = 0
this.fixedRightWidth = 0
this.height = null
@ -20,6 +18,12 @@ export default class TableLayout {
this.headerHeight = null
this.bodyHeight = null
this.parentHeight = null
this.referenceRowId = null
this.referenceRowIndex = null
this.referenceRowPositionY = null
this.referenceRowOffsetTop = null
this.loading = false
this.slicing = false
this.observers = []
for (let name in options) {
@ -68,12 +72,10 @@ export default class TableLayout {
// can't use nexttick, dead loop
return limitedLoop.setTimeout(this.updateScrollY, this, 0)
}
// reset
this.updateScrollY.startTime = null
if (this.table.restrict) {
const parentHeight = this.parentHeight = this.table.$el.parentNode.clientHeight
if (this.table.$refs.scroller.$refs.content.clientHeight + this.headerHeight > parentHeight) {
if (this.tableHeight > parentHeight) {
this.table.$el.style.height = parentHeight + 'px'
this.tableHeight = parentHeight
this.bodyHeight = this.tableHeight - this.headerHeight
@ -83,7 +85,7 @@ export default class TableLayout {
this.scrollY = false
}
}
Vue.nextTick(() => this.table.debouncedCheckScrollable())
Vue.nextTick(() => this.table.checkScrollable())
} else {
this.scrollY = tableBodyHeight > this.bodyHeight
}
@ -103,9 +105,6 @@ export default class TableLayout {
if (!el && (value || value === 0)) {
return limitedLoop.nextTick(this.setHeight, this, value)
}
// reset
this.setHeight.startTime = null
if (typeof value === 'number') {
el.style.height = value + 'px'
this.updateElsHeight()
@ -117,7 +116,7 @@ export default class TableLayout {
updateElsHeight () {
if (!this.table.$ready) return
const { headerWrapper, scroller } = this.table.$refs
const { headerWrapper } = this.table.$refs
const { $el, restrict } = this.table
if (this.showHeader && !headerWrapper) return
@ -125,40 +124,27 @@ export default class TableLayout {
if (this.showHeader && headerWrapper.clientWidth > 0 && (this.store.states.columns || []).length > 0 && headerHeight < 10) {
return limitedLoop.nextTick(this.updateElsHeight, this)
}
// reset
this.updateElsHeight.startTime = null
if (restrict && this.parentHeight) {
const data = this.store.states.data
if (!data || !data.length) return
if (scroller.$el.clientHeight > scroller.$refs.content.clientHeight) {
$el.style.height = scroller.$refs.content.clientHeight + this.headerHeight + 'px'
this.bodyHeight = null
return limitedLoop.nextTick(this.updateElsHeight, this)
} else if (Math.abs(scroller.$el.clientHeight + this.headerHeight - $el.clientHeight) > 2) {
$el.style.height = 'auto'
this.bodyHeight = null
return limitedLoop.nextTick(this.updateElsHeight, this)
} else if ($el.parentNode && this.parentHeight !== $el.parentNode.clientHeight) {
$el.style.height = 'auto'
this.bodyHeight = null
this.parentHeight = $el.parentNode.clientHeight
return limitedLoop.nextTick(this.updateElsHeight, this)
}
if (restrict && this.parentHeight && this.parentHeight !== $el.parentNode.clientHeight) {
$el.style.height = 'auto'
this.bodyHeight = null
this.parentHeight = $el.parentNode.clientHeight
return Vue.nextTick(() => this.updateElsHeight())
}
const tableHeight = this.tableHeight = $el.clientHeight
const tableHeight = this.tableHeight = this.table.$el.clientHeight
const oldBodyHeight = this.bodyHeight
if (this.height !== null && (!isNaN(this.height) || typeof this.height === 'string')) {
this.bodyHeight = tableHeight - headerHeight
}
this.updateScrollY()
Vue.nextTick(() => this.table.debouncedCheckScrollable())
if (oldBodyHeight !== this.bodyHeight) {
Vue.nextTick(() => this.table.checkScrollable())
}
}
updateColumnsWidth () {
const bodyWidth = this.tableWrapperWidth = this.table.$el.clientWidth
const bodyWidth = this.table.$el.clientWidth
const fit = this.fit
let bodyMinWidth = 0
@ -212,10 +198,79 @@ export default class TableLayout {
})
this.fixedRightWidth = fixedRightWidth
}
this.store.updateRenderData()
Vue.nextTick(() => {
this.notifyObservers('columns')
this.table.checkScrollable()
})
}
updateTableWidth (width) {
this.tableWidth = width || this.bodyWidth
beforeJump (goBack) {
const bodyWrapper = this.table.$refs.bodyWrapper
if (bodyWrapper) {
this.loading = true
this.table.scrollerDisabled = true
this.store.commit('setHoverRowIndex', null)
const referenceRow = goBack
? bodyWrapper.querySelector('.table-row:first-child')
: bodyWrapper.querySelector('.table-row:last-child')
if (referenceRow) {
this.referenceRowId = referenceRow.getAttribute('table-row-key')
this.referenceRowIndex = Array.prototype.indexOf.call(referenceRow.parentNode.children, referenceRow)
this.referenceRowPositionY = referenceRow.getBoundingClientRect().top
this.referenceRowOffsetTop = referenceRow.offsetTop
}
}
}
afterJump (noReference) {
const bodyWrapper = this.table.$refs.bodyWrapper
if (bodyWrapper) {
Vue.nextTick(() => {
if (!this.referenceRowId || noReference) return this.scrollTableToView()
const referenceRow = bodyWrapper.querySelector(`.table-row[table-row-key='${this.referenceRowId}']`)
if (!referenceRow) return this.scrollTableToView()
const referenceRowIndex = Array.prototype.indexOf.call(referenceRow.parentNode.children, referenceRow)
if (referenceRowIndex === this.referenceRowIndex) return limitedLoop.nextTick(this.afterJump, this)
// finished
let diff = this.scrollY
? referenceRow.offsetTop - this.referenceRowOffsetTop
: referenceRow.getBoundingClientRect().top - this.referenceRowPositionY
if (this.scrollY) {
this.table.moveBodyTopByDiff(diff)
} else {
window.scrollBy(0, diff)
}
this.finishSlicing()
})
}
}
scrollTableToView () {
if (this.scrollY) {
this.table.setBodyTop(0)
} else {
const tableY = this.table.$el.getBoundingClientRect().top
if (tableY < 0) {
window.scrollBy(0, this.table.$el.getBoundingClientRect().top)
}
}
this.finishSlicing()
}
finishSlicing () {
Vue.nextTick(() => {
this.slicing = false
this.loading = false
// hack scroller event
setTimeout(() => {
this.table.scrollerDisabled = false
this.table.checkScrollable()
}, 500)
})
}
}

5
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/layoutObserver.js

@ -24,7 +24,10 @@ export default {
onColumnsChange () {
const cols = this.$el.querySelectorAll('colgroup > col')
if (!cols.length) return
const columnsMap = this.store.states.leafColumnMap
const columnsMap = {}
this.store.states.leafColumns.forEach((column) => {
columnsMap[column.id] = column
})
for (let i = 0, j = cols.length; i < j; i++) {
const col = cols[i]
const name = col.getAttribute('name')

668
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/store.js

@ -1,47 +1,30 @@
import Vue from 'vue'
import * as util from './util'
import { debounce, throttle } from 'throttle-debounce'
import { addClass, getValueByPath } from '../../../../src/util'
const ASCENDING_ORDER = 'asc'
const DESCENDING_ORDER = 'desc'
const ORDERS = [ASCENDING_ORDER, DESCENDING_ORDER]
export default class TableStore {
constructor (table) {
this.table = table
this.scheduleMappingSortedData = debounce(10, () => {
table.layout.updateColumnsWidth()
this.mappingSortedData()
})
this.scheduleUpdateColumns = debounce(10, (flag) => this.updateColumns(flag))
this.throttleCalculateIndexes = throttle(50, (top) => this.calculateIndexes(top))
this.throttleCalculateColumnIndexes = throttle(20, (left) => this.calculateColumnIndexes(left))
this.states = {
// 原始数据
_data: null,
_sortedData: null,
_mappedData: null,
_slicedData: null,
// 当前展示数据
data: null,
rows: [],
renderedRows: [],
_columns: [],
columns: [],
renderedColumns: [],
notFixedColumns: [],
notFixedLeafColumns: [],
leafColumns: [],
leafColumnMap: {},
colColumns: [],
colColumnIds: [],
renderedColColumns: [],
fixedLeftColumns: [],
fixedLeftLeafColumns: [],
fixedRightColumns: [],
fixedRightLeafColumns: [],
multiLayer: false,
hasFixedTable: false,
hoverRowIndex: null,
selection: [],
isAllSelected: false,
isIndeterminate: false,
expandable: false,
expandRows: [],
treeType: false,
@ -51,33 +34,23 @@ export default class TableStore {
sortingColumn: null,
sortProp: null,
sortOrder: '',
defaultSortOrders: util.ORDERS,
defaultSortOrders: ORDERS,
dragging: false,
draggingColumn: null,
dragModel: {},
rowLimit: null,
startRowIndex: 0,
endRowIndex: null,
startColumnIndex: 0,
transformBodyY: false,
transformXAmount: 0,
transformYAmount: 0,
contentHeight: null,
firstRowSpan: 1,
renderedRowCount: 0,
renderedColumnCount: 0,
destroying: false
paging: false,
startRowIndex: -1
}
if (table.defaultSortOrders) {
if (util.checkSortOrders(table.defaultSortOrders)) {
if (checkSortOrders(table.defaultSortOrders)) {
this.states.defaultSortOrders = table.defaultSortOrders
}
}
this.mutations = {
insertColumn (states, column, index, parent) {
if (!column.sortOrders || !util.checkSortOrders(column.sortOrders)) {
if (!column.sortOrders || !checkSortOrders(column.sortOrders)) {
column.sortOrders = states.defaultSortOrders
}
@ -95,8 +68,8 @@ export default class TableStore {
states.expandable = true
}
if (this.table.$ready) {
this.scheduleUpdateColumns(true)
this.scheduleLayout()
this.updateColumns()
this.table.doLayout()
}
},
@ -110,13 +83,13 @@ export default class TableStore {
array.splice(array.indexOf(column), 1)
}
if (this.table.$ready) {
this.scheduleUpdateColumns(true)
this.scheduleLayout()
this.updateColumns()
this.table.doLayout()
}
},
rowSelectionChanged (states, row) {
const changed = util.toggleRowSelection(states, row)
const changed = toggleRowSelection(states, row)
if (changed) {
const selection = states.selection ? states.selection.slice() : []
@ -130,7 +103,6 @@ export default class TableStore {
allSelectionChanged (states) {
states.isAllSelected = !states.isAllSelected
states.isIndeterminate = false
if (states.isAllSelected) {
states.selection = states._sortedData.slice()
} else {
@ -151,15 +123,15 @@ export default class TableStore {
sortConditionChanged (states, column, asc) {
let order
if (typeof asc === 'boolean') {
order = column.order = asc ? util.ASCENDING_ORDER : util.DESCENDING_ORDER
order = column.order = asc ? ASCENDING_ORDER : DESCENDING_ORDER
} else {
order = column.order = util.getNextOrder(column)
order = column.order = getNextOrder(column)
}
const changed = util.toggleSortCondition(states, column, order)
const changed = toggleSortCondition(states, column, order)
if (changed) {
if (column.sortable !== 'custom') {
states._sortedData = Object.freeze(util.sortData(states._data, states))
this.mappingSortedData()
states._sortedData = sortData(states._data, states)
this.jumpTo(0, 0, true)
Vue.nextTick(() => this.table.doLayout())
}
this.table.$emit('on-sort-change', column, states.sortProp, states.sortOrder)
@ -184,28 +156,21 @@ export default class TableStore {
}
}
scheduleLayout (updateColumns) {
if (updateColumns) {
this.updateColumns()
}
this.table.debouncedUpdateLayout()
}
setData (data) {
const states = this.states
const dataInstanceChanged = states._data !== data
states._data = this.table.frozenData ? Object.freeze(data) : data
states._data = data
if (states.childrenProp) {
util.processTreeData(states, this.table)
processTreeData(states, this.table)
}
states._sortedData = Object.freeze(util.sortData(states._data, states))
states._sortedData = sortData(states._data, states)
const { defaultExpandAll, rowKey, reserveStates, defaultUnfoldChildren } = this.table
if (defaultExpandAll) {
states.expandRows = (states._sortedData || []).slice()
} else {
if (reserveStates) {
states.expandRows = util.reserve(states.expandRows, states._sortedData, rowKey)
states.expandRows = reserve(states.expandRows, states._sortedData, rowKey)
} else {
if (dataInstanceChanged) {
this.clearExpandRows()
@ -216,7 +181,7 @@ export default class TableStore {
}
if (reserveStates) {
states.selection = util.reserve(states.selection, states._sortedData, rowKey)
states.selection = reserve(states.selection, states._sortedData, rowKey)
this.updateAllSelected()
} else {
if (dataInstanceChanged) {
@ -227,19 +192,18 @@ export default class TableStore {
}
}
this.jumpTo(0, 0, true)
if (defaultUnfoldChildren) {
states.parentRows.forEach((r) => {
util.toggleRowUnfolding(states, r, true)
toggleRowUnfolding(states, r, true)
})
}
this.mappingSortedData()
}
toggleAllSelection () {
const states = this.states
states.isAllSelected = !states.isAllSelected
states.isIndeterminate = false
if (states.isAllSelected) {
states.selection = states._sortedData.slice()
} else {
@ -251,7 +215,6 @@ export default class TableStore {
clearSelection () {
const states = this.states
states.isAllSelected = false
states.isIndeterminate = false
const oldSelection = states.selection
if (states.selection.length) {
states.selection = []
@ -264,7 +227,7 @@ export default class TableStore {
cleanSelection () {
const states = this.states
const rowKey = this.table.rowKey
const { changed, list: selection } = util.clean(states.selection, states._sortedData, rowKey)
const { changed, list: selection } = clean(states.selection, states._sortedData, rowKey)
states.selection = selection
if (changed) {
@ -273,7 +236,7 @@ export default class TableStore {
}
toggleRowSelection (row, selected) {
const changed = util.toggleRowSelection(this.states, row, selected)
const changed = toggleRowSelection(this.states, row, selected)
const selection = this.states.selection
if (changed) {
this.table.$emit('on-selection-change', selection ? selection.slice() : [])
@ -285,7 +248,6 @@ export default class TableStore {
const { selection, _sortedData } = this.states
// 简易判断
this.states.isAllSelected = selection && _sortedData && selection.length === _sortedData.length
this.states.isIndeterminate = !this.states.isAllSelected && selection && selection.length
}
clearExpandRows () {
@ -302,7 +264,7 @@ export default class TableStore {
cleanExpandRows () {
const states = this.states
const rowKey = this.table.rowKey
const { changed, list: expandRows } = util.clean(states.expandRows, states._sortedData, rowKey)
const { changed, list: expandRows } = clean(states.expandRows, states._sortedData, rowKey)
states.expandRows = expandRows
if (changed) {
@ -311,27 +273,26 @@ export default class TableStore {
}
toggleRowExpansion (row, expanded) {
const changed = util.toggleRowExpansion(this.states, row, expanded)
const changed = toggleRowExpansion(this.states, row, expanded)
if (changed) {
this.table.$emit('on-expand-change', row, this.states.expandRows)
Vue.nextTick(() => this.scheduleLayout())
Vue.nextTick(() => this.table.doLayout())
}
}
toggleRowUnfolding (row, unfolded) {
const changed = util.toggleRowUnfolding(this.states, row, unfolded)
const changed = toggleRowUnfolding(this.states, row, unfolded)
if (changed) {
this.mappingSortedData()
this.table.$emit('on-unfolded-change', row, this.states.unfoldedRows)
Vue.nextTick(() => this.table.doLayout())
}
}
setExpandRowKeys (rowKeys) {
setExpandRowKeys = (rowKeys) => {
const expandRows = []
const rowKey = this.table.rowKey
if (!rowKey) throw new Error('Table Store: Prop row-key should not be empty.')
const keysMap = util.getKeysMap(this.states._sortedData || [], rowKey)
const keysMap = getKeysMap(this.states._sortedData || [], rowKey)
rowKeys.forEach((key) => {
const info = keysMap[key]
if (info) {
@ -346,7 +307,7 @@ export default class TableStore {
clearSort () {
if (!this.states.sortingColumn) return
const changed = util.toggleSortCondition(this.states, this.states.sortingColumn, '')
const changed = toggleSortCondition(this.states, this.states.sortingColumn, '')
if (changed) {
this.table.$emit('on-sort-change', null, null, '')
Vue.nextTick(() => this.table.doLayout())
@ -360,71 +321,45 @@ export default class TableStore {
throw new Error(`Table Store: Can't find target column with prop '${prop}'!`)
}
if (typeof order === 'string' && !util.ORDERS.includes(order)) {
throw new Error(`Table Store: Sort order must be '${util.ASCENDING_ORDER}' or '${util.DESCENDING_ORDER}'!`)
if (typeof order === 'string' && !ORDERS.includes(order)) {
throw new Error(`Table Store: Sort order must be '${ASCENDING_ORDER}' or '${DESCENDING_ORDER}'!`)
}
if (typeof order === 'undefined') {
order = column.order = util.getNextOrder(column)
order = column.order = getNextOrder(column)
}
const changed = util.toggleSortCondition(states, column, order)
const changed = toggleSortCondition(states, column, order)
if (changed) {
if (column.sortable !== 'custom') {
states._sortedData = Object.freeze(util.sortData(states._data, states))
this.mappingSortedData()
states._sortedData = sortData(states._data, states)
this.jumpTo(0, 0, true)
Vue.nextTick(() => this.table.doLayout())
}
this.table.$emit('on-sort-change', column, states.sortProp, states.sortOrder)
}
}
updateColumns (debouncedMapping) {
if (this.states.destroying) return
updateColumns () {
const states = this.states
const _columns = states._columns || []
states.fixedLeftColumns = Object.freeze(_columns.filter(column => column.fixed === true || column.fixed === 'left'))
states.fixedRightColumns = Object.freeze(_columns.filter(column => column.fixed === 'right'))
states.fixedLeftColumns = _columns.filter(column => column.fixed === true || column.fixed === 'left')
states.fixedRightColumns = _columns.filter(column => column.fixed === 'right')
if (states.fixedLeftColumns.length > 0 && _columns[0] && _columns[0].type === 'selection' && !_columns[0].fixed) {
_columns[0].fixed = true
const temp = states.fixedLeftColumns.slice()
temp.unshift(_columns[0])
states.fixedLeftColumns = Object.freeze(temp)
}
const notFixedColumns = _columns.filter(column => !column.fixed)
states.notFixedColumns = Object.freeze(notFixedColumns)
states.notFixedLeafColumns = Object.freeze(util.doFlattenColumns(notFixedColumns))
states.columns = Object.freeze([].concat(states.fixedLeftColumns).concat(notFixedColumns).concat(states.fixedRightColumns))
for (let i = 0; i < states.columns.length; i++) {
const c = states.columns[i]
c._index = i
}
states.rows = Object.freeze(util.convertToRows(states.columns))
for (const r of states.rows) {
for (let i = 0; i < r.length; i++) {
const c = r[i]
c._indexInRow = i
}
states.fixedLeftColumns.unshift(_columns[0])
}
states.multiLayer = states.rows.length > 1
states.leafColumns = Object.freeze(util.doFlattenColumns(states.columns))
const columnsMap = {}
states.leafColumns.forEach((column) => {
columnsMap[column.id] = column
const notFixedColumns = _columns.filter(column => {
column.__hiddenInFixed = !column.fixed
return !column.fixed
})
states.leafColumnMap = columnsMap
states.colColumns = Object.freeze(states.multiLayer ? states.leafColumns : states.columns)
states.columns = [].concat(states.fixedLeftColumns).concat(notFixedColumns).concat(states.fixedRightColumns)
states.fixedLeftLeafColumns = Object.freeze(util.doFlattenColumns(states.fixedLeftColumns))
states.fixedRightLeafColumns = Object.freeze(util.doFlattenColumns(states.fixedRightColumns))
states.leafColumns = doFlattenColumns(states.columns)
states.fixedLeftLeafColumns = doFlattenColumns(states.fixedLeftColumns)
states.fixedRightLeafColumns = doFlattenColumns(states.fixedRightColumns)
states.hasFixedTable = states.fixedLeftColumns.length > 0 || states.fixedRightColumns.length > 0
if (debouncedMapping) {
this.scheduleMappingSortedData()
} else {
this.mappingSortedData()
}
}
commit (name, ...args) {
@ -436,279 +371,290 @@ export default class TableStore {
}
}
updateRenderData () {
const { colColumns, colColumnIds } = this.states
const changed = colColumns.some(c => !colColumnIds.includes(c.id))
if (changed) {
this.mappingSortedData()
jumpTo (topIndex, offset, sortChanged) {
const { internalPaging, rowLimit, layout } = this.table
const states = this.states
if (internalPaging && states._sortedData && states._sortedData.length > rowLimit) {
if (topIndex <= -rowLimit || topIndex >= states._sortedData.length) return
states.paging = true
if (typeof offset === 'undefined') {
offset = Math.round(rowLimit * 0.5)
}
let start = Math.max(0, topIndex - offset)
let end = start + rowLimit
if (end > states._sortedData.length) start = states._sortedData.length - rowLimit
if (!sortChanged && start === states.startRowIndex) return
const goBack = start < states.startRowIndex
states.startRowIndex = start
this.table.scrollerDisabled = true
layout.slicing = true
// disable window scroll
addClass(document.body, 'spin-lock-overflow')
// for scroll transition lag
setTimeout(() => {
layout.beforeJump(goBack)
// for loading lag
setTimeout(() => {
states.data = states._sortedData.slice(start, end)
layout.afterJump(sortChanged)
}, 100)
}, 200)
} else {
this.sliceData()
states.data = this.states._sortedData.slice()
states.paging = false
}
}
mappingSortedData () {
const { rowHeight, rowKey, stripe, cellSpanMethod, $el } = this.table
const states = this.states
if (states.destroying || ($el && $el.clientHeight === 0)) return
// mapping all data
if (states.colColumns.length) {
states.colColumnIds = Object.freeze(states.colColumns.map(c => c.id))
states.contentHeight = states._sortedData.length * rowHeight
// data + columns => cells
states._mappedData = Object.freeze(states._sortedData.map((d, i) => {
const cells = []
states.colColumns.forEach((c, j) => {
const model = {
columnIndex: j,
column: c,
content: util.getCellContent(d, c, i, j),
spanModel: util.getSpanModel(d, c, i, j, cellSpanMethod)
}
if (model.spanModel.rowspan > 1 && states.firstRowSpan === 1) {
states.firstRowSpan = model.spanModel.rowspan
}
cells.push(model)
})
return {
item: d,
rowIndex: i,
cells,
key: util.getRowKey(i, d, rowKey),
classes: util.getRowClasses(i, stripe)
}
}))
this.sliceData()
}
prevPage () {
this.jumpTo(this.states.startRowIndex - this.table.rowLimit, -this.table.rowLimit * 0.5)
}
sliceData () {
const { virtualScroll, rowHeight, layout, $el, maxTreeRow } = this.table
const states = this.states
if (!states._mappedData || ($el && $el.clientHeight === 0)) return
if (virtualScroll) {
if (layout.scrollY) {
let rowCount
if (!layout.bodyHeight) {
// init render
rowCount = 10
} else {
rowCount = Math.ceil(layout.bodyHeight / rowHeight)
}
nextPage () {
this.jumpTo(this.states.startRowIndex + this.table.rowLimit, this.table.rowLimit * 0.5)
}
}
const toggleRowSelection = (states, row, selected) => {
return toggleStateWithArray(states.selection, row, selected)
}
const toggleRowExpansion = (states, row, expanded) => {
return toggleStateWithArray(states.expandRows, row, expanded)
}
states.transformBodyY = rowCount < states._mappedData.length
states.rowLimit = states.firstRowSpan !== 1
? (Math.ceil(rowCount / states.firstRowSpan) + 1) * states.firstRowSpan
: rowCount + 6
this.calculateIndexes()
return
} else if (states.treeType) {
states._slicedData = Object.freeze(states._mappedData.slice(states.startRowIndex, states.renderedRowCount + maxTreeRow))
this.calculateColumnIndexes()
return
const toggleRowUnfolding = (states, row, unfolded) => {
let changed = toggleStateWithArray(states.unfoldedRows, row, unfolded)
if (changed) {
const index = states.data.indexOf(row)
if (states.unfoldedRows.includes(row)) {
const insertionArray = []
fillInsersionArray(states, row[states.childrenProp], insertionArray)
states.data.splice(index + 1, 0, ...insertionArray)
} else {
const nextSiblingIndex = states.data.findIndex((r, i) => {
return i > index && r.__level === row.__level
})
if (nextSiblingIndex !== -1) {
states.data.splice(index + 1, nextSiblingIndex - index - 1)
} else {
states.data.splice(index + 1, states.data.length - index - 1)
}
}
states._slicedData = Object.freeze(states._mappedData.slice())
states.transformBodyY = false
this.calculateColumnIndexes()
}
return changed
}
calculateIndexes (top) {
const states = this.states
const { rowLimit, _mappedData, firstRowSpan } = states
if (!rowLimit || !_mappedData || !_mappedData.length) return
const { $refs, rowHeight, cellSpanMethod } = this.table
this.commit('setHoverRowIndex', null)
const currentTop = top || ($refs.scroller && $refs.scroller.currentTop) || 0
const remainCount = firstRowSpan === 1 ? 3 : firstRowSpan
let startIndex = Math.floor(Math.abs(currentTop) / rowHeight) - remainCount
if (startIndex < 0) {
startIndex = 0
}
// fix rowspan
let realStartIndex = startIndex
if (cellSpanMethod) {
if (startIndex > states.startRowIndex) {
for (let i = states.startRowIndex; i < startIndex; i++) {
const currentRow = _mappedData[i]
const targetCell = currentRow.cells.find(c => c.spanModel.rowspan > 1)
if (targetCell && targetCell.spanModel.rowspan + i >= startIndex) {
realStartIndex = i
break
}
}
} else if (startIndex < states.startRowIndex) {
for (let i = states.startRowIndex; i >= 0; i--) {
const currentRow = _mappedData[i]
const targetCell = currentRow.cells.find(c => c.spanModel.rowspan > 1)
if (targetCell && i < startIndex && targetCell.spanModel.rowspan + i >= startIndex) {
realStartIndex = i
break
}
}
}
const fillInsersionArray = (states, children, array) => {
const { unfoldedRows, childrenProp } = states
children.forEach((c) => {
array.push(c)
const sub = c[childrenProp]
if (sub && sub.length && unfoldedRows.includes(c)) {
fillInsersionArray(states, sub, array)
}
const diff = startIndex - realStartIndex
})
}
let endIndex = realStartIndex + rowLimit + diff
if (endIndex - realStartIndex < states.renderedRowCount) {
endIndex = states.renderedRowCount + realStartIndex
if (endIndex > _mappedData.length) {
endIndex = _mappedData.length
realStartIndex = Math.max(0, endIndex - states.renderedRowCount)
const toggleStateWithArray = (array, row, insert) => {
let changed = false
const index = array.indexOf(row)
if (typeof insert !== 'undefined') {
if (insert) {
if (index === -1) {
array.push(row)
changed = true
}
} else {
if (index !== -1) {
array.splice(index, 1)
changed = true
}
}
} else {
if (index === -1) {
array.push(row)
} else {
array.splice(index, 1)
}
changed = true
}
return changed
}
const toggleSortCondition = (states, column, order) => {
if (!column) {
throw new Error('Table Store: Column is required!')
}
const prevSortingColumn = states.sortingColumn
if (!order) {
if (prevSortingColumn) {
states.sortingColumn = null
}
} else if (prevSortingColumn !== column) {
states.sortingColumn = column
}
if (prevSortingColumn && prevSortingColumn !== column) {
prevSortingColumn.order = ''
}
states.renderedRowCount = endIndex - realStartIndex
states.startRowIndex = realStartIndex
states.endRowIndex = endIndex
states.transformYAmount = realStartIndex * rowHeight
this.table.updateTranslateY(states.transformYAmount)
const changed = prevSortingColumn !== states.sortingColumn || states.sortOrder !== order
states._slicedData = Object.freeze(_mappedData.slice(realStartIndex, endIndex))
this.calculateColumnIndexes()
if (changed) {
states.sortProp = states.sortingColumn ? states.sortingColumn.prop : null
states.sortOrder = column.order = order
}
calculateColumnIndexes (left) {
const { scrollX, tableWrapperWidth, fixedLeftWidth, fixedRightWidth } = this.table.layout
const states = this.states
const { notFixedColumns, notFixedLeafColumns, fixedLeftColumns, fixedRightColumns, multiLayer } = states
const contentWidth = tableWrapperWidth - fixedLeftWidth - fixedRightWidth
if (contentWidth < 0) return
if (!states._slicedData || !states._slicedData.length) {
states.data = []
Vue.nextTick(() => {
this.table.layout.notifyObservers('columns')
this.table.debouncedCheckScrollable()
})
return
}
// 不需要切割列
if (!scrollX || !this.table.virtualScroll) {
states.transformXAmount = 0
states.renderedColumns = Object.freeze(states.columns)
states.renderedColColumns = Object.freeze(states.colColumns)
states.renderedRows = Object.freeze(states.rows)
states.renderedColumnCount = 0
if (states._slicedData) {
let columnCount = states._slicedData[0] ? states._slicedData[0].cells.length : 0
if (states.colColumns.length === columnCount) {
states._slicedData.forEach(r => {
r.renderedCells = r.cells.slice()
})
states.data = Object.freeze(states._slicedData.slice())
this.table.$emit('on-slice')
this.table.layout.updateTableWidth()
Vue.nextTick(() => {
this.table.layout.notifyObservers('columns')
this.table.debouncedCheckScrollable()
})
}
return changed
}
const sortData = (data, states) => {
data = data || []
const { treeType, sortingColumn, sortProp: key, sortOrder: order } = states
if (!sortingColumn || !key || !order || treeType || sortingColumn.sortable === 'custom') {
return data
}
const reverse = order === DESCENDING_ORDER ? -1 : 1
const sortMethod = sortingColumn.sortMethod
const compare = (a, b) => {
if (sortMethod) {
return sortMethod(a.content, b.content, a.row, b.row)
}
// 默认排序规则
for (let i = 0, len = a.content.length; i < len; i++) {
if (a.content[i] < b.content[i]) {
return -1
}
return
}
const currentLeft = left || (this.table.$refs.scroller && this.table.$refs.scroller.currentLeft) || 0
let _left = 0
let _width = 0
let startIndex = 0
let endIndex = 1
let findStart = false
for (let i = 0; i < notFixedLeafColumns.length; i++) {
const leaf = notFixedLeafColumns[i]
const cWidth = leaf.currentWidth
_left -= cWidth
if (!findStart) {
if (_left < currentLeft) {
_width = currentLeft - _left
// multiLayer header
let parent = leaf.parent
if (multiLayer && parent) {
while (parent.parent) {
parent = parent.parent
}
startIndex = notFixedColumns.indexOf(parent)
const siblings = util.doFlattenColumns([parent])
for (const s of siblings) {
if (s === leaf) {
break
} else {
_width -= s.currentWidth
}
}
} else {
startIndex = Math.max(0, i - 2)
}
findStart = true
}
} else {
_width += cWidth
if (_width >= contentWidth) {
let parent = leaf.parent
if (multiLayer && parent) {
while (parent.parent) {
parent = parent.parent
}
endIndex = notFixedColumns.indexOf(parent)
} else {
endIndex = i + 2
}
break
}
if (a.content[i] > b.content[i]) {
return 1
}
}
return 0
}
if (endIndex < startIndex || endIndex > notFixedColumns.length - 1) {
endIndex = notFixedColumns.length - 1
if (states.renderedColumnCount !== 0) {
startIndex = Math.max(0, endIndex - states.renderedColumnCount + 1)
}
} else if (endIndex - startIndex + 1 < states.renderedColumnCount) {
endIndex = states.renderedColumnCount + startIndex - 1
return data.map((row, index) => {
return {
row,
index,
content: getValueByPath(row, key)
}
}).sort((a, b) => {
let order = compare(a, b)
if (!order) {
// make stable https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
order = a.index - b.index
}
return order * reverse
}).map(item => item.row)
}
let transformXAmount = states.transformXAmount
if (states.startColumnIndex > startIndex) {
// to right
const leafs = util.doFlattenColumns(notFixedColumns.slice(startIndex, states.startColumnIndex))
for (const l of leafs) {
transformXAmount -= l.currentWidth
}
const getKeysMap = (array, rowKey) => {
const arrayMap = {}
array.forEach((row, index) => {
arrayMap[getValueByPath(row, rowKey)] = { row, index }
})
return arrayMap
}
const doFlattenColumns = (columns) => {
const result = []
columns.forEach((column) => {
if (column.children) {
result.push.apply(result, doFlattenColumns(column.children))
} else {
// to left
const leafs = util.doFlattenColumns(notFixedColumns.slice(states.startColumnIndex, startIndex))
for (const l of leafs) {
transformXAmount += l.currentWidth
}
result.push(column)
}
states.transformXAmount = transformXAmount
states.startColumnIndex = startIndex
})
return result
}
states.renderedColumns = Object.freeze([].concat(fixedLeftColumns).concat(notFixedColumns.slice(startIndex, endIndex + 1)).concat(fixedRightColumns))
states.renderedColumnCount = states.renderedColumns.length - fixedLeftColumns.length - fixedRightColumns.length
states.renderedColColumns = Object.freeze(multiLayer ? util.doFlattenColumns(states.renderedColumns) : states.renderedColumns)
states.renderedRows = Object.freeze(util.convertToRows(states.renderedColumns))
const checkSortOrders = (list) => {
let pass = true
for (const order of list) {
if (order && !ORDERS.includes(order)) {
pass = false
break
}
}
return pass
}
states._slicedData.forEach(r => {
r.renderedCells = r.cells.filter(c => states.renderedColColumns.includes(c.column))
})
const getNextOrder = ({ order, sortOrders }) => {
let index
if (order) {
index = sortOrders.indexOf(order)
} else {
index = sortOrders.findIndex(o => !o)
}
let nextOrder
if (index !== -1) {
nextOrder = sortOrders[index > sortOrders.length - 2 ? 0 : index + 1]
} else {
nextOrder = sortOrders[0]
}
return nextOrder || ''
}
states.data = Object.freeze(states._slicedData.slice())
this.table.$emit('on-slice')
const tableWidth = states.renderedColColumns.reduce((p, c) => p + c.currentWidth, 0)
this.table.layout.updateTableWidth(tableWidth)
const reserve = (source, dataList, rowKey) => {
source = source || []
dataList = dataList || []
if (!rowKey) {
throw new Error('Table Store: Prop row-key should not be empty when reserve-states enabled.')
}
const idMap = getKeysMap(source, rowKey)
const result = []
for (const row of dataList) {
const rowId = getValueByPath(row, rowKey)
if (idMap[rowId]) {
result.push(row)
}
}
return result
}
Vue.nextTick(() => {
this.table.layout.notifyObservers('columns')
this.table.debouncedCheckScrollable()
const clean = (source, dataList, rowKey) => {
source = source || []
dataList = dataList || []
let list
if (rowKey) {
list = reserve(source, dataList, rowKey)
} else {
list = source.filter((item) => {
return dataList.indexOf(item) !== -1
})
}
let changed = list.length !== source.length
return { changed, list }
}
const processTreeData = (states, table) => {
const { _data } = states
const { childrenProp } = table
if (!_data) return
const parentRows = []
const unfoldedRows = []
checkParentRows(_data, childrenProp, parentRows, unfoldedRows, 1)
states.treeType = parentRows.length !== 0
states.unfoldedRows = unfoldedRows
states.parentRows = parentRows
}
const checkParentRows = (list, childrenProp, parentRows, unfoldedRows, level) => {
list.forEach((row) => {
row.__level = level
const children = row[childrenProp]
if (children && children.length) {
parentRows.push(row)
checkParentRows(children, childrenProp, parentRows, unfoldedRows, level + 1)
}
})
}

348
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-table/src/source/util.js

@ -1,348 +0,0 @@
import { getValueByPath } from '../../../../src/util'
export const ASCENDING_ORDER = 'asc'
export const DESCENDING_ORDER = 'desc'
export const ORDERS = [ASCENDING_ORDER, DESCENDING_ORDER]
export const toggleRowSelection = (states, row, selected) => {
return toggleStateWithArray(states.selection, row, selected)
}
export const toggleRowExpansion = (states, row, expanded) => {
return toggleStateWithArray(states.expandRows, row, expanded)
}
export const toggleRowUnfolding = (states, row, unfolded) => {
let changed = toggleStateWithArray(states.unfoldedRows, row, unfolded)
if (changed) {
const rows = states._sortedData.slice()
const index = rows.indexOf(row)
if (states.unfoldedRows.includes(row)) {
const insertionArray = []
fillInsersionArray(states, row[states.childrenProp], insertionArray)
rows.splice(index + 1, 0, ...insertionArray)
} else {
const nextSiblingIndex = rows.findIndex((r, i) => {
return i > index && r.__level === row.__level
})
if (nextSiblingIndex !== -1) {
rows.splice(index + 1, nextSiblingIndex - index - 1)
} else {
rows.splice(index + 1, rows.length - index - 1)
}
}
states._sortedData = Object.freeze(rows.slice())
}
return changed
}
const fillInsersionArray = (states, children, array) => {
const { unfoldedRows, childrenProp } = states
children.forEach((c) => {
array.push(c)
const sub = c[childrenProp]
if (sub && sub.length && unfoldedRows.includes(c)) {
fillInsersionArray(states, sub, array)
}
})
}
const toggleStateWithArray = (array, row, insert) => {
let changed = false
const index = array.indexOf(row)
if (typeof insert !== 'undefined') {
if (insert) {
if (index === -1) {
array.push(row)
changed = true
}
} else {
if (index !== -1) {
array.splice(index, 1)
changed = true
}
}
} else {
if (index === -1) {
array.push(row)
} else {
array.splice(index, 1)
}
changed = true
}
return changed
}
export const toggleSortCondition = (states, column, order) => {
if (!column) {
throw new Error('Table Store: Column is required!')
}
const prevSortingColumn = states.sortingColumn
if (!order) {
if (prevSortingColumn) {
states.sortingColumn = null
}
} else if (prevSortingColumn !== column) {
states.sortingColumn = column
}
if (prevSortingColumn && prevSortingColumn !== column) {
prevSortingColumn.order = ''
}
const changed = prevSortingColumn !== states.sortingColumn || states.sortOrder !== order
if (changed) {
states.sortProp = states.sortingColumn ? states.sortingColumn.prop : null
states.sortOrder = column.order = order
}
return changed
}
export const sortData = (data, states) => {
data = data || []
const { treeType, sortingColumn, sortProp: key, sortOrder: order } = states
if (!sortingColumn || !key || !order || treeType || sortingColumn.sortable === 'custom') {
return data.slice()
}
const reverse = order === DESCENDING_ORDER ? -1 : 1
const sortMethod = sortingColumn.sortMethod
const compare = (a, b) => {
if (sortMethod) {
return sortMethod(a.content, b.content, a.row, b.row)
}
// 默认排序规则
for (let i = 0, len = a.content.length; i < len; i++) {
if (a.content[i] < b.content[i]) {
return -1
}
if (a.content[i] > b.content[i]) {
return 1
}
}
return 0
}
return data.map((row, index) => {
return {
row,
index,
content: getValueByPath(row, key)
}
}).sort((a, b) => {
let order = compare(a, b)
if (!order) {
// make stable https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
order = a.index - b.index
}
return order * reverse
}).map(item => item.row)
}
export const getKeysMap = (array, rowKey) => {
const arrayMap = {}
array.forEach((row, index) => {
arrayMap[getValueByPath(row, rowKey)] = { row, index }
})
return arrayMap
}
export const doFlattenColumns = (columns) => {
const result = []
columns.forEach((column) => {
if (column.children) {
result.push.apply(result, doFlattenColumns(column.children))
} else {
result.push(column)
}
})
return result
}
export const checkSortOrders = (list) => {
let pass = true
for (const order of list) {
if (order && !ORDERS.includes(order)) {
pass = false
break
}
}
return pass
}
export const getNextOrder = ({ order, sortOrders }) => {
let index
if (order) {
index = sortOrders.indexOf(order)
} else {
index = sortOrders.findIndex(o => !o)
}
let nextOrder
if (index !== -1) {
nextOrder = sortOrders[index > sortOrders.length - 2 ? 0 : index + 1]
} else {
nextOrder = sortOrders[0]
}
return nextOrder || ''
}
export const reserve = (source, dataList, rowKey) => {
source = source || []
dataList = dataList || []
if (!rowKey) {
throw new Error('Table Store: Prop row-key should not be empty when reserve-states enabled.')
}
const idMap = getKeysMap(source, rowKey)
const result = []
for (const row of dataList) {
const rowId = getValueByPath(row, rowKey)
if (idMap[rowId]) {
result.push(row)
}
}
return result
}
export const clean = (source, dataList, rowKey) => {
source = source || []
dataList = dataList || []
let list
if (rowKey) {
list = reserve(source, dataList, rowKey)
} else {
list = source.filter((item) => {
return dataList.indexOf(item) !== -1
})
}
let changed = list.length !== source.length
return { changed, list }
}
export const processTreeData = (states, table) => {
const { _data } = states
const { childrenProp } = table
if (!_data || !_data.length) return
const parentRows = []
const unfoldedRows = []
checkParentRows(_data, childrenProp, parentRows, unfoldedRows, 1)
states.treeType = parentRows.length !== 0
states.unfoldedRows = unfoldedRows
states.parentRows = parentRows
}
export const checkParentRows = (list, childrenProp, parentRows, unfoldedRows, level) => {
list.forEach((row) => {
row.__level = level
const children = row[childrenProp]
if (children && children.length) {
parentRows.push(row)
checkParentRows(children, childrenProp, parentRows, unfoldedRows, level + 1)
}
})
}
export const getRowKey = (i, row, rowKey) => {
if (!row) {
throw new Error('Table Body: Find invalid row!')
}
if (rowKey) {
return getValueByPath(row, rowKey)
}
return i
}
export const getRowClasses = (i, stripe) => {
const classes = []
if (stripe) {
classes.push(i % 2 === 1 ? 'striped-row' : 'no-striped-row')
}
return classes
}
export const getCellContent = (row, column, rowIndex, columnIndex) => {
const value = getValueByPath(row, column.prop)
if (column.formatter) {
return column.formatter(row, column, value, rowIndex, columnIndex)
}
return value
}
export const getSpanModel = (row, column, rowIndex, columnIndex, cellSpanMethod) => {
if (cellSpanMethod) {
const result = cellSpanMethod({ row, column, rowIndex, columnIndex })
let rowspan, colspan
if (Array.isArray(result)) {
rowspan = result[0]
colspan = result[1]
} else if (typeof result === 'object') {
rowspan = result.rowspan
colspan = result.colspan
}
return { colspan, rowspan }
}
return { colspan: 1, rowspan: 1 }
}
const getAllColumns = (columns) => {
const result = []
columns.forEach((column) => {
if (column.children && column.children.length !== 0) {
result.push(column)
result.push.apply(result, getAllColumns(column.children))
} else {
result.push(column)
}
})
return result
}
export const convertToRows = (originColumns) => {
let maxLevel = 1
const traverse = (column, parent) => {
if (parent) {
column.level = parent.level + 1
if (maxLevel < column.level) {
maxLevel = column.level
}
}
if (column.children) {
let colSpan = 0
column.children.forEach((subColumn) => {
traverse(subColumn, column)
colSpan += subColumn.colSpan
})
column.colSpan = colSpan
} else {
column.colSpan = 1
}
}
originColumns.forEach((column) => {
column.level = 1
traverse(column)
})
const rows = []
for (let i = 0; i < maxLevel; i++) {
rows.push([])
}
const allColumns = getAllColumns(originColumns)
allColumns.forEach((column) => {
if (!column.children) {
column.rowSpan = maxLevel - column.level + 1
} else {
column.rowSpan = 1
}
rows[column.level - 1].push(column)
})
return rows
}

4
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-timepicker/example/app.vue

@ -3,7 +3,7 @@
<section class="demo-section">
<h4>基础用法</h4>
<div>
<x-timepicker @on-change="timeChange" :readonly="false" format="HH:mm"></x-timepicker>
<x-timepicker></x-timepicker>
</div>
</section>
@ -18,7 +18,7 @@
<section class="demo-section">
<h4>时间区间</h4>
<div>
<x-timepicker @on-change="timeChange" type="timerange" format="HH:mm:ss" :step="[1, 5]" :readonly="false" :value="['2018-01-01 05:00:00', '2018-01-01 06:00:00']"></x-timepicker>
<x-timepicker type="timerange" :value="['2018-01-01 05:00:06', '2018-01-01 06:00: 06']"></x-timepicker>
</div>
</section>

159
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-timepicker/src/source/Timepicker.vue

@ -3,15 +3,16 @@
popper-class="date-poptip"
class="x-datepicker"
:placement="placement"
transition="datepicker-animation"
:append-to-body="appendToBody"
:position-fixed="positionFixed"
:viewport="viewport"
:popper-options="popperOptions"
ref="timepickerPoptip"
@on-show="poperShow"
@on-hide="poperHide"
@show="poperShow"
@hide="poperHide"
>
<div slot="reference" ref="timepickerPoptipInput">
<div slot="reference">
<slot
name="input"
:placeholder="placeholder"
@ -23,22 +24,17 @@
:readonly="readonly"
>
<x-input
v-model="text"
:value="text"
:placeholder="placeholder"
:suffix-icon="suffixIcon"
:prefix-icon="prefixIcon"
:size="size"
:readonly="readonly"
@on-blur="blur"
@input="pattern = 'edit'"
></x-input>
</slot>
</div>
<div>
<x-time :format="format"
:type="timeType" ref="xTime"
:step="step"
@change="timeChange" @_hoverBlock="hoverBlock"></x-time>
<x-time :format="format" :type="timeType" ref="xTime" @change="timeChange"></x-time>
<div class="x-date-packer-confirm" v-if="confirm">
<div class="confirm-slot">
<slot name="confirm"></slot>
@ -152,14 +148,6 @@ export default {
prefixIcon: {
type: String,
default: ''
},
//
step: {
type: Array,
default () {
return [1, 1, 1]
}
}
},
@ -170,10 +158,7 @@ export default {
dateValue: null,
dateValueBar: '',
startDate: null,
endDate: null,
// select: edit:
pattern: 'select'
endDate: null
}
},
@ -187,46 +172,28 @@ export default {
methods: {
init () {
this.setDate(null, true)
this.setDate()
this.setText()
this.$refs.xTime.init(this.startDate, this.endDate)
},
//
setDate (value, isInit) {
setDate (value) {
let date = value || this.value
if (isType(date) === 'array') {
if (date[0] && isValid(date[0])) {
this.startDate = date[0]
}
if (date[1] && isValid(date[1])) {
this.endDate = date[1]
}
//
if(isInit) {
this.dateValue = [this.startDate, this.endDate]
this.dateValueBar = [this.startDate, this.endDate]
}
} else {
if (isValid(date)) {
this.startDate = date
//
if(isInit) {
this.dateValue = new Date(date)
this.dateValueBar = new Date(date)
}
}
if (isValid(date)) this.startDate = date
}
},
dateFormat (date) {
if(date) {
return moment(date).format(this.format)
}
return date
return moment(date).format(this.format)
},
setText () {
@ -241,7 +208,6 @@ export default {
// timeChange
timeChange (date) {
this.pattern = 'select'
this.dateValue = date
this.setDate(date)
this.setText()
@ -253,9 +219,7 @@ export default {
},
poperHide () {
if(this.pattern === 'select') {
this.change()
}
this.change()
this.$emit('on-hide')
},
@ -274,112 +238,23 @@ export default {
this.$emit('on-clear')
},
fmtDateValue (key = 'dateValue') {
fmtDateValue () {
let dateValueFmt = []
if (isType(this[key]) === 'array') {
this[key].forEach(o => {
if (isType(this.dateValue) === 'array') {
this.dateValue.forEach(o => {
dateValueFmt.push(this.dateFormat(o))
})
} else {
dateValueFmt = this.dateFormat(this[key])
dateValueFmt = this.dateFormat(this.dateValue)
}
return dateValueFmt
},
change () {
if (this.dateValue) {
// debugger
if (this.fmtDateValue().toString() !== this.fmtDateValue('dateValueBar').toString()) {
if (this.dateValue.toString() !== this.dateValueBar.toString()) {
this.$emit('on-change', this.fmtDateValue(), this.dateValue)
this.dateValueBar = this.dateValue
this.$refs.xTime.init(this.startDate, this.endDate)
}
}
},
//
setSelectionRange (selectionStart, selectionEnd) {
if (this.readonly || this.disabled) {
return false
}
let input = this.$refs.timepickerPoptipInput.querySelector('input')
if (input.setSelectionRange) {
input.focus()
input.setSelectionRange(selectionStart, selectionEnd)
}
else if (input.createTextRange) {
var range = input.createTextRange();
range.collapse(true)
range.moveEnd('character', selectionEnd)
range.moveStart('character', selectionStart)
range.select()
}
},
//
blur () {
let isDate = (date) => {
return new Date(date) != 'Invalid Date'
}
setTimeout(()=> {
let input = this.$refs.timepickerPoptipInput.querySelector('input').value
if(this.readonly || this.disabled || !input || this.pattern !== 'edit') return
if (this.type === 'time') {
let date = moment(this.dateValue || new Date()).format('YYYY-MM-DD') + ' ' + input
if(isDate(date)) {
this.timeChange(new Date(date))
this.change()
} else {
this.timeChange(this.dateValueBar)
}
} else {
let setDate = (index, input) => {
return moment(this.dateValue[index] || new Date()).format('YYYY-MM-DD') + ' ' + input
}
let inputRange = input.split(' - '), inputDate = setDate(0, inputRange[0]), inputDate1 = setDate(1, inputRange[1])
if(inputRange.length === 2 && isDate(inputDate) && isDate(inputDate1)) {
//
if(new Date(inputDate).getTime() > new Date(inputDate1).getTime()) {
this.timeChange(this.dateValueBar)
} else {
// debugger
this.timeChange([new Date(inputDate), new Date(inputDate1)])
this.change()
}
} else {
this.timeChange(this.dateValueBar)
}
}
}, 100)
},
hoverBlock (type, index) {
if(type === 'start') {
if(index === 0) {
this.setSelectionRange(0, 2)
}
if(index === 1) {
this.setSelectionRange(3, 5)
}
if(index === 2) {
this.setSelectionRange(6, 8)
}
} else {
let start = this.text.indexOf(' - ') + 3
if(index === 0) {
this.setSelectionRange(start, start + 2)
}
if(index === 1) {
this.setSelectionRange(start + 3, start + 5)
}
if(index === 2) {
this.setSelectionRange(start + 6, start + 8)
}
}
}

10
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/README.md

@ -12,7 +12,6 @@ start / end | 提示位置,可与方向组合使用
light / dark | 主题,默认为 dark
fixed | 提示是否 fixed 定位
viewport | 提示是否基于 viewport 定位
large | 是否启用大号提示
### Tooltip 详细配置
@ -20,14 +19,9 @@ large | 是否启用大号提示
--- | --- | --- | --- | ---
text | 提示文本,支持标签 | String | — | —
placement | 提示优先出现方位 | 详见popper.js文档 | top
triggerEvent | 触发提示事件 | String | click / mouseenter / manual | mouseenter
triggerEvent | 触发提示事件 | String | click / mouseenter | mouseenter
theme | 主题 | String | light / dark | dark
containerID | 提示组件的父容器 id | String | — | ans-tooltip-container
maxWidth | 提示内容最大宽度,超过该宽度换行 | String | — | 200px
positionFixed | 同 fixed 修饰符 | Boolean | — | false
viewport | 同 viewport 修饰符 | Boolean | — | false
large | 同 large 修饰符 | Boolean | — | false
reveal | 当 triggerEvent 为 `manual` 的时候,控制 tooltip 是否显示 | Boolean | — | false
### Tooltip 方法
tooltip 对应的 dom 节点可以调用 destroy 方法销毁组件,hide 方法隐藏提示

12
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/example/app.vue

@ -60,13 +60,12 @@ export default {
return {
text: 'abc',
options: {
triggerEvent: 'manual',
text: '',
placement: 'top',
maxWidth: '100px',
theme: 'dark',
large: true,
reveal: true
triggerEvent: 'mouseenter',
containerID: 'temp'
}
}
},
@ -78,13 +77,6 @@ export default {
this.options.maxWidth = '120px'
this.options.theme = 'light'
this.options.text = this.optionText()
setTimeout(() => {
if (this.options.reveal) {
this.options.reveal = false
} else {
this.options.reveal = true
}
}, 1000)
},
optionText () {
const copy = Object.assign({}, this.options)

34
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/src/source/Tooltip.vue

@ -1,8 +1,8 @@
<template>
<transition :name="transitionName">
<div v-show="visible" :class="[wrapperClass, theme, {large}]">
<div v-show="visible" :class="[wrapperClass, theme]">
<div class="tooltip-content" :style="contentStyles" v-html="content"></div>
<div :class="[arrowClass, {large}]" x-arrow ref="arrow"></div>
<div :class="arrowClass" x-arrow ref="arrow"></div>
</div>
</transition>
</template>
@ -21,24 +21,12 @@ export default {
}
},
props: {
//
triggerEvent: {
type: String,
validator (v) {
return ['click', 'mouseenter', 'manual'].includes(v)
},
default: 'mouseenter'
},
//
content: String,
//
theme: String,
//
maxWidth: String,
// Tooltip
large: Boolean,
// triggerEvent `manual` tooltip
reveal: Boolean
maxWidth: String
},
computed: {
contentStyles () {
@ -55,27 +43,17 @@ export default {
this.visible = false
},
update (options) {
if (options.triggerEvent === 'manual') {
if (options.reveal === false) {
return this.hide()
} else if (options.reveal === true) {
this.show()
}
}
this.content = options.text
this.theme = options.theme
this.large = !!options.large
this.maxWidth = options.maxWidth
if (this.visible) {
this.updateElementHandler()
}
}
},
mounted () {
if (this.triggerEvent === 'manual' && this.reveal) {
this.show()
}
beforeDestroy () {
// Popper
this.destroyPopper()
}
}
</script>

25
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/src/source/directive.js

@ -8,7 +8,7 @@ export default {
// 移除事件
removeListeners(el)
// 是否点击触发,是否浅色主题
const { click, light, fixed, viewport, large } = binding.modifiers
const { click, light, fixed, viewport } = binding.modifiers
// 位置使用第一个修饰符,不传则居中
const positionModifiers = POSITIONS.filter(position => binding.modifiers[position])
const position = positionModifiers.length ? positionModifiers[0] : ''
@ -21,10 +21,9 @@ export default {
placement,
triggerEvent: click ? 'click' : 'mouseenter',
theme: light ? 'light' : 'dark',
maxWidth: '370px',
maxWidth: '200px',
positionFixed: !!fixed,
viewport: !!viewport,
large: !!large
viewport: !!viewport
}
// 可以绑定配置对象
let options = typeof binding.value === 'object' ? binding.value : { text: binding.value }
@ -35,23 +34,17 @@ export default {
el._appearHandler = function appearHandler () {
if (!this._ttInstance) {
// 确保使用最新的配置
this._ttInstance = factory(this._ttOptions)
}
if (this._ttOptions.text) {
this._ttInstance.show()
this._ttInstance = factory(el._ttOptions)
}
this._ttInstance.show()
}
el._vanishHandler = function vanishHandler () {
if (this._ttInstance) {
this._ttInstance.hide()
}
}
if (options.triggerEvent === 'manual') {
el._ttInstance = factory(options)
} else {
el.addEventListener(options.triggerEvent, el._appearHandler)
el.addEventListener('mouseleave', el._vanishHandler)
}
el.addEventListener(options.triggerEvent, el._appearHandler)
el.addEventListener('mouseleave', el._vanishHandler)
},
update (el, binding) {
@ -67,8 +60,8 @@ export default {
unbind (el) {
const instance = el._ttInstance
if (instance && instance.$destroy) {
instance.$destroy()
if (instance && instance.destroy) {
instance.destroy()
}
removeListeners(el)
delete el._appearHandler

25
dolphinscheduler-ui/src/lib/@analysys/ans-ui/packages/vue-tooltip/src/source/factory.js

@ -1,42 +1,39 @@
import Vue from 'vue'
import Tooltip from './Tooltip.vue'
import { LIB_NAME } from '../../../../src/util'
// 组件构造器
const TooltipConstructor = Vue.extend(Tooltip)
export default (options = {}) => {
const {
triggerEvent,
containerID = `${LIB_NAME}-tooltip-container`,
text = '',
placement,
theme,
maxWidth,
el,
positionFixed,
viewport,
large,
reveal
viewport
} = options
const instance = new TooltipConstructor({
propsData: {
triggerEvent,
content: text,
placement,
theme,
maxWidth,
reference: el,
positionFixed: positionFixed,
viewport: viewport,
large,
reveal
viewport: viewport
}
}).$mount()
document.body.appendChild(instance.$el)
instance.$el.destroy = () => {
instance.$destroy()
}
instance.$el.hide = () => {
instance.hide()
const selector = `#${containerID}`
let target = document.querySelector(selector)
if (!target) {
target = document.createElement('div')
target.id = containerID
document.body.appendChild(target)
}
target.appendChild(instance.$el)
return instance
}

14
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/index.js

@ -48,17 +48,15 @@ const install = (Vue, config = {}) => {
Vue.component(xForm.name, xForm)
Vue.component(xFormItem.name, xFormItem)
let { message, notice, modal, spin = {}, slotI18n } = config
const { message, notice, spin = {} } = config
if (slotI18n) {
message = Object.assign({}, message, { i18n: slotI18n })
notice = Object.assign({}, notice, { i18n: slotI18n })
modal = Object.assign({}, modal, { i18n: slotI18n })
if (message) {
xMessage.config(message)
}
xMessage.config(message)
xNotice.config(notice)
xModal.config(modal)
if (notice) {
xNotice.config(notice)
}
Vue.$message = Vue.prototype.$message = xMessage
Vue.$modal = Vue.prototype.$modal = xModal

1196
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/attentionSeekers.scss

File diff suppressed because it is too large Load Diff

706
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/bouncingEntrances.scss

@ -1,354 +1,354 @@
@-webkit-keyframes bounceIn {
from,
20%,
40%,
60%,
80%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(.97, .97, .97);
transform: scale3d(.97, .97, .97);
}
to {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes bounceIn {
from,
20%,
40%,
60%,
80%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(.97, .97, .97);
transform: scale3d(.97, .97, .97);
}
to {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
.bounceIn {
-webkit-animation-duration: .75s;
animation-duration: .75s;
-webkit-animation-name: bounceIn;
animation-name: bounceIn;
}
@-webkit-keyframes bounceInDown {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(0, -3000px, 0);
transform: translate3d(0, -3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, 25px, 0);
transform: translate3d(0, 25px, 0);
}
75% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
90% {
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInDown {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(0, -3000px, 0);
transform: translate3d(0, -3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, 25px, 0);
transform: translate3d(0, 25px, 0);
}
75% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
90% {
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInDown {
-webkit-animation-name: bounceInDown;
animation-name: bounceInDown;
}
@-webkit-keyframes bounceInLeft {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(-3000px, 0, 0);
transform: translate3d(-3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(25px, 0, 0);
transform: translate3d(25px, 0, 0);
}
75% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
90% {
-webkit-transform: translate3d(5px, 0, 0);
transform: translate3d(5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInLeft {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(-3000px, 0, 0);
transform: translate3d(-3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(25px, 0, 0);
transform: translate3d(25px, 0, 0);
}
75% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
90% {
-webkit-transform: translate3d(5px, 0, 0);
transform: translate3d(5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInLeft {
-webkit-animation-name: bounceInLeft;
animation-name: bounceInLeft;
}
@-webkit-keyframes bounceInRight {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(3000px, 0, 0);
transform: translate3d(3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(-25px, 0, 0);
transform: translate3d(-25px, 0, 0);
}
75% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
90% {
-webkit-transform: translate3d(-5px, 0, 0);
transform: translate3d(-5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInRight {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(3000px, 0, 0);
transform: translate3d(3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(-25px, 0, 0);
transform: translate3d(-25px, 0, 0);
}
75% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
90% {
-webkit-transform: translate3d(-5px, 0, 0);
transform: translate3d(-5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInRight {
-webkit-animation-name: bounceInRight;
animation-name: bounceInRight;
}
@-webkit-keyframes bounceInUp {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(0, 3000px, 0);
transform: translate3d(0, 3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
75% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
90% {
-webkit-transform: translate3d(0, -5px, 0);
transform: translate3d(0, -5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInUp {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(0, 3000px, 0);
transform: translate3d(0, 3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
75% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
90% {
-webkit-transform: translate3d(0, -5px, 0);
transform: translate3d(0, -5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInUp {
-webkit-animation-name: bounceInUp;
animation-name: bounceInUp;
@-webkit-keyframes bounceIn {
from,
20%,
40%,
60%,
80%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(.97, .97, .97);
transform: scale3d(.97, .97, .97);
}
to {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes bounceIn {
from,
20%,
40%,
60%,
80%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(.97, .97, .97);
transform: scale3d(.97, .97, .97);
}
to {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
.bounceIn {
-webkit-animation-duration: .75s;
animation-duration: .75s;
-webkit-animation-name: bounceIn;
animation-name: bounceIn;
}
@-webkit-keyframes bounceInDown {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(0, -3000px, 0);
transform: translate3d(0, -3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, 25px, 0);
transform: translate3d(0, 25px, 0);
}
75% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
90% {
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInDown {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(0, -3000px, 0);
transform: translate3d(0, -3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, 25px, 0);
transform: translate3d(0, 25px, 0);
}
75% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
90% {
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInDown {
-webkit-animation-name: bounceInDown;
animation-name: bounceInDown;
}
@-webkit-keyframes bounceInLeft {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(-3000px, 0, 0);
transform: translate3d(-3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(25px, 0, 0);
transform: translate3d(25px, 0, 0);
}
75% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
90% {
-webkit-transform: translate3d(5px, 0, 0);
transform: translate3d(5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInLeft {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(-3000px, 0, 0);
transform: translate3d(-3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(25px, 0, 0);
transform: translate3d(25px, 0, 0);
}
75% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
90% {
-webkit-transform: translate3d(5px, 0, 0);
transform: translate3d(5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInLeft {
-webkit-animation-name: bounceInLeft;
animation-name: bounceInLeft;
}
@-webkit-keyframes bounceInRight {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(3000px, 0, 0);
transform: translate3d(3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(-25px, 0, 0);
transform: translate3d(-25px, 0, 0);
}
75% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
90% {
-webkit-transform: translate3d(-5px, 0, 0);
transform: translate3d(-5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInRight {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(3000px, 0, 0);
transform: translate3d(3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(-25px, 0, 0);
transform: translate3d(-25px, 0, 0);
}
75% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
90% {
-webkit-transform: translate3d(-5px, 0, 0);
transform: translate3d(-5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInRight {
-webkit-animation-name: bounceInRight;
animation-name: bounceInRight;
}
@-webkit-keyframes bounceInUp {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(0, 3000px, 0);
transform: translate3d(0, 3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
75% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
90% {
-webkit-transform: translate3d(0, -5px, 0);
transform: translate3d(0, -5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInUp {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1);
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(0, 3000px, 0);
transform: translate3d(0, 3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
75% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
90% {
-webkit-transform: translate3d(0, -5px, 0);
transform: translate3d(0, -5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInUp {
-webkit-animation-name: bounceInUp;
animation-name: bounceInUp;
}

344
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/bouncingExits.scss

@ -1,173 +1,173 @@
@-webkit-keyframes bounceOut {
20% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
}
@keyframes bounceOut {
20% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
}
.bounceOut {
-webkit-animation-duration: .75s;
animation-duration: .75s;
-webkit-animation-name: bounceOut;
animation-name: bounceOut;
}
@-webkit-keyframes bounceOutDown {
20% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
@keyframes bounceOutDown {
20% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
.bounceOutDown {
-webkit-animation-name: bounceOutDown;
animation-name: bounceOutDown;
}
@-webkit-keyframes bounceOutLeft {
20% {
opacity: 1;
-webkit-transform: translate3d(20px, 0, 0);
transform: translate3d(20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
@keyframes bounceOutLeft {
20% {
opacity: 1;
-webkit-transform: translate3d(20px, 0, 0);
transform: translate3d(20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
.bounceOutLeft {
-webkit-animation-name: bounceOutLeft;
animation-name: bounceOutLeft;
}
@-webkit-keyframes bounceOutRight {
20% {
opacity: 1;
-webkit-transform: translate3d(-20px, 0, 0);
transform: translate3d(-20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
@keyframes bounceOutRight {
20% {
opacity: 1;
-webkit-transform: translate3d(-20px, 0, 0);
transform: translate3d(-20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
.bounceOutRight {
-webkit-animation-name: bounceOutRight;
animation-name: bounceOutRight;
}
@-webkit-keyframes bounceOutUp {
20% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, 20px, 0);
transform: translate3d(0, 20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
@keyframes bounceOutUp {
20% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, 20px, 0);
transform: translate3d(0, 20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
.bounceOutUp {
-webkit-animation-name: bounceOutUp;
animation-name: bounceOutUp;
@-webkit-keyframes bounceOut {
20% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
}
@keyframes bounceOut {
20% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
}
.bounceOut {
-webkit-animation-duration: .75s;
animation-duration: .75s;
-webkit-animation-name: bounceOut;
animation-name: bounceOut;
}
@-webkit-keyframes bounceOutDown {
20% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
@keyframes bounceOutDown {
20% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
.bounceOutDown {
-webkit-animation-name: bounceOutDown;
animation-name: bounceOutDown;
}
@-webkit-keyframes bounceOutLeft {
20% {
opacity: 1;
-webkit-transform: translate3d(20px, 0, 0);
transform: translate3d(20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
@keyframes bounceOutLeft {
20% {
opacity: 1;
-webkit-transform: translate3d(20px, 0, 0);
transform: translate3d(20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
.bounceOutLeft {
-webkit-animation-name: bounceOutLeft;
animation-name: bounceOutLeft;
}
@-webkit-keyframes bounceOutRight {
20% {
opacity: 1;
-webkit-transform: translate3d(-20px, 0, 0);
transform: translate3d(-20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
@keyframes bounceOutRight {
20% {
opacity: 1;
-webkit-transform: translate3d(-20px, 0, 0);
transform: translate3d(-20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
.bounceOutRight {
-webkit-animation-name: bounceOutRight;
animation-name: bounceOutRight;
}
@-webkit-keyframes bounceOutUp {
20% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, 20px, 0);
transform: translate3d(0, 20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
@keyframes bounceOutUp {
20% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, 20px, 0);
transform: translate3d(0, 20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
.bounceOutUp {
-webkit-animation-name: bounceOutUp;
animation-name: bounceOutUp;
}

490
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/fadingEntrances.scss

@ -1,246 +1,246 @@
@-webkit-keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fadeIn {
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
@-webkit-keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInDown {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
@-webkit-keyframes fadeInDownBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInDownBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInDownBig {
-webkit-animation-name: fadeInDownBig;
animation-name: fadeInDownBig;
}
@-webkit-keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInLeft {
-webkit-animation-name: fadeInLeft;
animation-name: fadeInLeft;
}
@-webkit-keyframes fadeInLeftBig {
from {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInLeftBig {
from {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInLeftBig {
-webkit-animation-name: fadeInLeftBig;
animation-name: fadeInLeftBig;
}
@-webkit-keyframes fadeInRight {
from {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInRight {
from {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInRight {
-webkit-animation-name: fadeInRight;
animation-name: fadeInRight;
}
@-webkit-keyframes fadeInRightBig {
from {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInRightBig {
from {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInRightBig {
-webkit-animation-name: fadeInRightBig;
animation-name: fadeInRightBig;
}
@-webkit-keyframes fadeInUp {
from {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInUp {
from {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInUp {
-webkit-animation-name: fadeInUp;
animation-name: fadeInUp;
}
@-webkit-keyframes fadeInUpBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInUpBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInUpBig {
-webkit-animation-name: fadeInUpBig;
animation-name: fadeInUpBig;
@-webkit-keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fadeIn {
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
@-webkit-keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInDown {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
@-webkit-keyframes fadeInDownBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInDownBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInDownBig {
-webkit-animation-name: fadeInDownBig;
animation-name: fadeInDownBig;
}
@-webkit-keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInLeft {
-webkit-animation-name: fadeInLeft;
animation-name: fadeInLeft;
}
@-webkit-keyframes fadeInLeftBig {
from {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInLeftBig {
from {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInLeftBig {
-webkit-animation-name: fadeInLeftBig;
animation-name: fadeInLeftBig;
}
@-webkit-keyframes fadeInRight {
from {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInRight {
from {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInRight {
-webkit-animation-name: fadeInRight;
animation-name: fadeInRight;
}
@-webkit-keyframes fadeInRightBig {
from {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInRightBig {
from {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInRightBig {
-webkit-animation-name: fadeInRightBig;
animation-name: fadeInRightBig;
}
@-webkit-keyframes fadeInUp {
from {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInUp {
from {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInUp {
-webkit-animation-name: fadeInUp;
animation-name: fadeInUp;
}
@-webkit-keyframes fadeInUpBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInUpBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInUpBig {
-webkit-animation-name: fadeInUpBig;
animation-name: fadeInUpBig;
}

422
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/fadingExits.scss

@ -1,212 +1,212 @@
@-webkit-keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.fadeOut {
-webkit-animation-name: fadeOut;
animation-name: fadeOut;
}
@-webkit-keyframes fadeOutDown {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
@keyframes fadeOutDown {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
.fadeOutDown {
-webkit-animation-name: fadeOutDown;
animation-name: fadeOutDown;
}
@-webkit-keyframes fadeOutDownBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
@keyframes fadeOutDownBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
.fadeOutDownBig {
-webkit-animation-name: fadeOutDownBig;
animation-name: fadeOutDownBig;
}
@-webkit-keyframes fadeOutLeft {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
@keyframes fadeOutLeft {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
.fadeOutLeft {
-webkit-animation-name: fadeOutLeft;
animation-name: fadeOutLeft;
}
@-webkit-keyframes fadeOutLeftBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
@keyframes fadeOutLeftBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
.fadeOutLeftBig {
-webkit-animation-name: fadeOutLeftBig;
animation-name: fadeOutLeftBig;
}
@-webkit-keyframes fadeOutRight {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
@keyframes fadeOutRight {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
.fadeOutRight {
-webkit-animation-name: fadeOutRight;
animation-name: fadeOutRight;
}
@-webkit-keyframes fadeOutRightBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
@keyframes fadeOutRightBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
.fadeOutRightBig {
-webkit-animation-name: fadeOutRightBig;
animation-name: fadeOutRightBig;
}
@-webkit-keyframes fadeOutUp {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
@keyframes fadeOutUp {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
.fadeOutUp {
-webkit-animation-name: fadeOutUp;
animation-name: fadeOutUp;
}
@-webkit-keyframes fadeOutUpBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
@keyframes fadeOutUpBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
.fadeOutUpBig {
-webkit-animation-name: fadeOutUpBig;
animation-name: fadeOutUpBig;
@-webkit-keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.fadeOut {
-webkit-animation-name: fadeOut;
animation-name: fadeOut;
}
@-webkit-keyframes fadeOutDown {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
@keyframes fadeOutDown {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
.fadeOutDown {
-webkit-animation-name: fadeOutDown;
animation-name: fadeOutDown;
}
@-webkit-keyframes fadeOutDownBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
@keyframes fadeOutDownBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
.fadeOutDownBig {
-webkit-animation-name: fadeOutDownBig;
animation-name: fadeOutDownBig;
}
@-webkit-keyframes fadeOutLeft {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
@keyframes fadeOutLeft {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
.fadeOutLeft {
-webkit-animation-name: fadeOutLeft;
animation-name: fadeOutLeft;
}
@-webkit-keyframes fadeOutLeftBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
@keyframes fadeOutLeftBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
.fadeOutLeftBig {
-webkit-animation-name: fadeOutLeftBig;
animation-name: fadeOutLeftBig;
}
@-webkit-keyframes fadeOutRight {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
@keyframes fadeOutRight {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
.fadeOutRight {
-webkit-animation-name: fadeOutRight;
animation-name: fadeOutRight;
}
@-webkit-keyframes fadeOutRightBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
@keyframes fadeOutRightBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
.fadeOutRightBig {
-webkit-animation-name: fadeOutRightBig;
animation-name: fadeOutRightBig;
}
@-webkit-keyframes fadeOutUp {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
@keyframes fadeOutUp {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
.fadeOutUp {
-webkit-animation-name: fadeOutUp;
animation-name: fadeOutUp;
}
@-webkit-keyframes fadeOutUpBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
@keyframes fadeOutUpBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
.fadeOutUpBig {
-webkit-animation-name: fadeOutUpBig;
animation-name: fadeOutUpBig;
}

578
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/flippers.scss

@ -1,290 +1,290 @@
@-webkit-keyframes flip {
from {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0)
rotate3d(0, 1, 0, -360deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
40% {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -190deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -190deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
50% {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -170deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -170deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
80% {
-webkit-transform: perspective(400px) scale3d(.95, .95, .95) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
transform: perspective(400px) scale3d(.95, .95, .95) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
to {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
}
@keyframes flip {
from {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0)
rotate3d(0, 1, 0, -360deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
40% {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -190deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -190deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
50% {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -170deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -170deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
80% {
-webkit-transform: perspective(400px) scale3d(.95, .95, .95) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
transform: perspective(400px) scale3d(.95, .95, .95) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
to {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
}
.animated.flip {
-webkit-backface-visibility: visible;
backface-visibility: visible;
-webkit-animation-name: flip;
animation-name: flip;
}
@-webkit-keyframes flipInX {
from {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInX {
from {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
.flipInX {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipInX;
animation-name: flipInX;
}
@-webkit-keyframes flipInY {
from {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInY {
from {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
.flipInY {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipInY;
animation-name: flipInY;
}
@-webkit-keyframes flipOutX {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
opacity: 0;
}
}
@keyframes flipOutX {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
opacity: 0;
}
}
.flipOutX {
-webkit-animation-duration: .75s;
animation-duration: .75s;
-webkit-animation-name: flipOutX;
animation-name: flipOutX;
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
}
@-webkit-keyframes flipOutY {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
opacity: 0;
}
}
@keyframes flipOutY {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
opacity: 0;
}
}
.flipOutY {
-webkit-animation-duration: .75s;
animation-duration: .75s;
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipOutY;
animation-name: flipOutY;
@-webkit-keyframes flip {
from {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0)
rotate3d(0, 1, 0, -360deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
40% {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -190deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -190deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
50% {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -170deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -170deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
80% {
-webkit-transform: perspective(400px) scale3d(.95, .95, .95) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
transform: perspective(400px) scale3d(.95, .95, .95) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
to {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
}
@keyframes flip {
from {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0)
rotate3d(0, 1, 0, -360deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
40% {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -190deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -190deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
50% {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -170deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -170deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
80% {
-webkit-transform: perspective(400px) scale3d(.95, .95, .95) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
transform: perspective(400px) scale3d(.95, .95, .95) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
to {
-webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
}
.animated.flip {
-webkit-backface-visibility: visible;
backface-visibility: visible;
-webkit-animation-name: flip;
animation-name: flip;
}
@-webkit-keyframes flipInX {
from {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInX {
from {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
.flipInX {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipInX;
animation-name: flipInX;
}
@-webkit-keyframes flipInY {
from {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInY {
from {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
.flipInY {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipInY;
animation-name: flipInY;
}
@-webkit-keyframes flipOutX {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
opacity: 0;
}
}
@keyframes flipOutX {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
opacity: 0;
}
}
.flipOutX {
-webkit-animation-duration: .75s;
animation-duration: .75s;
-webkit-animation-name: flipOutX;
animation-name: flipOutX;
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
}
@-webkit-keyframes flipOutY {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
opacity: 0;
}
}
@keyframes flipOutY {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
opacity: 0;
}
}
.flipOutY {
-webkit-animation-duration: .75s;
animation-duration: .75s;
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipOutY;
animation-name: flipOutY;
}

142
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/lightspeed.scss

@ -1,72 +1,72 @@
@-webkit-keyframes lightSpeedIn {
from {
-webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
transform: translate3d(100%, 0, 0) skewX(-30deg);
opacity: 0;
}
60% {
-webkit-transform: skewX(20deg);
transform: skewX(20deg);
opacity: 1;
}
80% {
-webkit-transform: skewX(-5deg);
transform: skewX(-5deg);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes lightSpeedIn {
from {
-webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
transform: translate3d(100%, 0, 0) skewX(-30deg);
opacity: 0;
}
60% {
-webkit-transform: skewX(20deg);
transform: skewX(20deg);
opacity: 1;
}
80% {
-webkit-transform: skewX(-5deg);
transform: skewX(-5deg);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.lightSpeedIn {
-webkit-animation-name: lightSpeedIn;
animation-name: lightSpeedIn;
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
@-webkit-keyframes lightSpeedOut {
from {
opacity: 1;
}
to {
-webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
transform: translate3d(100%, 0, 0) skewX(30deg);
opacity: 0;
}
}
@keyframes lightSpeedOut {
from {
opacity: 1;
}
to {
-webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
transform: translate3d(100%, 0, 0) skewX(30deg);
opacity: 0;
}
}
.lightSpeedOut {
-webkit-animation-name: lightSpeedOut;
animation-name: lightSpeedOut;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
@-webkit-keyframes lightSpeedIn {
from {
-webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
transform: translate3d(100%, 0, 0) skewX(-30deg);
opacity: 0;
}
60% {
-webkit-transform: skewX(20deg);
transform: skewX(20deg);
opacity: 1;
}
80% {
-webkit-transform: skewX(-5deg);
transform: skewX(-5deg);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes lightSpeedIn {
from {
-webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
transform: translate3d(100%, 0, 0) skewX(-30deg);
opacity: 0;
}
60% {
-webkit-transform: skewX(20deg);
transform: skewX(20deg);
opacity: 1;
}
80% {
-webkit-transform: skewX(-5deg);
transform: skewX(-5deg);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.lightSpeedIn {
-webkit-animation-name: lightSpeedIn;
animation-name: lightSpeedIn;
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
@-webkit-keyframes lightSpeedOut {
from {
opacity: 1;
}
to {
-webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
transform: translate3d(100%, 0, 0) skewX(30deg);
opacity: 0;
}
}
@keyframes lightSpeedOut {
from {
opacity: 1;
}
to {
-webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
transform: translate3d(100%, 0, 0) skewX(30deg);
opacity: 0;
}
}
.lightSpeedOut {
-webkit-animation-name: lightSpeedOut;
animation-name: lightSpeedOut;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}

360
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/rotatingEntrances.scss

@ -1,181 +1,181 @@
@-webkit-keyframes rotateIn {
from {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, -200deg);
transform: rotate3d(0, 0, 1, -200deg);
opacity: 0;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateIn {
from {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, -200deg);
transform: rotate3d(0, 0, 1, -200deg);
opacity: 0;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateIn {
-webkit-animation-name: rotateIn;
animation-name: rotateIn;
}
@-webkit-keyframes rotateInDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInDownLeft {
-webkit-animation-name: rotateInDownLeft;
animation-name: rotateInDownLeft;
}
@-webkit-keyframes rotateInDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInDownRight {
-webkit-animation-name: rotateInDownRight;
animation-name: rotateInDownRight;
}
@-webkit-keyframes rotateInUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInUpLeft {
-webkit-animation-name: rotateInUpLeft;
animation-name: rotateInUpLeft;
}
@-webkit-keyframes rotateInUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -90deg);
transform: rotate3d(0, 0, 1, -90deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -90deg);
transform: rotate3d(0, 0, 1, -90deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInUpRight {
-webkit-animation-name: rotateInUpRight;
animation-name: rotateInUpRight;
@-webkit-keyframes rotateIn {
from {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, -200deg);
transform: rotate3d(0, 0, 1, -200deg);
opacity: 0;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateIn {
from {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, -200deg);
transform: rotate3d(0, 0, 1, -200deg);
opacity: 0;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateIn {
-webkit-animation-name: rotateIn;
animation-name: rotateIn;
}
@-webkit-keyframes rotateInDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInDownLeft {
-webkit-animation-name: rotateInDownLeft;
animation-name: rotateInDownLeft;
}
@-webkit-keyframes rotateInDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInDownRight {
-webkit-animation-name: rotateInDownRight;
animation-name: rotateInDownRight;
}
@-webkit-keyframes rotateInUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInUpLeft {
-webkit-animation-name: rotateInUpLeft;
animation-name: rotateInUpLeft;
}
@-webkit-keyframes rotateInUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -90deg);
transform: rotate3d(0, 0, 1, -90deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -90deg);
transform: rotate3d(0, 0, 1, -90deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInUpRight {
-webkit-animation-name: rotateInUpRight;
animation-name: rotateInUpRight;
}

318
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/rotatingExits.scss

@ -1,160 +1,160 @@
@-webkit-keyframes rotateOut {
from {
-webkit-transform-origin: center;
transform-origin: center;
opacity: 1;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, 200deg);
transform: rotate3d(0, 0, 1, 200deg);
opacity: 0;
}
}
@keyframes rotateOut {
from {
-webkit-transform-origin: center;
transform-origin: center;
opacity: 1;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, 200deg);
transform: rotate3d(0, 0, 1, 200deg);
opacity: 0;
}
}
.rotateOut {
-webkit-animation-name: rotateOut;
animation-name: rotateOut;
}
@-webkit-keyframes rotateOutDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
}
@keyframes rotateOutDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
}
.rotateOutDownLeft {
-webkit-animation-name: rotateOutDownLeft;
animation-name: rotateOutDownLeft;
}
@-webkit-keyframes rotateOutDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
@keyframes rotateOutDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
.rotateOutDownRight {
-webkit-animation-name: rotateOutDownRight;
animation-name: rotateOutDownRight;
}
@-webkit-keyframes rotateOutUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
@keyframes rotateOutUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
.rotateOutUpLeft {
-webkit-animation-name: rotateOutUpLeft;
animation-name: rotateOutUpLeft;
}
@-webkit-keyframes rotateOutUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 90deg);
transform: rotate3d(0, 0, 1, 90deg);
opacity: 0;
}
}
@keyframes rotateOutUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 90deg);
transform: rotate3d(0, 0, 1, 90deg);
opacity: 0;
}
}
.rotateOutUpRight {
-webkit-animation-name: rotateOutUpRight;
animation-name: rotateOutUpRight;
@-webkit-keyframes rotateOut {
from {
-webkit-transform-origin: center;
transform-origin: center;
opacity: 1;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, 200deg);
transform: rotate3d(0, 0, 1, 200deg);
opacity: 0;
}
}
@keyframes rotateOut {
from {
-webkit-transform-origin: center;
transform-origin: center;
opacity: 1;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, 200deg);
transform: rotate3d(0, 0, 1, 200deg);
opacity: 0;
}
}
.rotateOut {
-webkit-animation-name: rotateOut;
animation-name: rotateOut;
}
@-webkit-keyframes rotateOutDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
}
@keyframes rotateOutDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
}
.rotateOutDownLeft {
-webkit-animation-name: rotateOutDownLeft;
animation-name: rotateOutDownLeft;
}
@-webkit-keyframes rotateOutDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
@keyframes rotateOutDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
.rotateOutDownRight {
-webkit-animation-name: rotateOutDownRight;
animation-name: rotateOutDownRight;
}
@-webkit-keyframes rotateOutUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
@keyframes rotateOutUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
.rotateOutUpLeft {
-webkit-animation-name: rotateOutUpLeft;
animation-name: rotateOutUpLeft;
}
@-webkit-keyframes rotateOutUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 90deg);
transform: rotate3d(0, 0, 1, 90deg);
opacity: 0;
}
}
@keyframes rotateOutUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 90deg);
transform: rotate3d(0, 0, 1, 90deg);
opacity: 0;
}
}
.rotateOutUpRight {
-webkit-animation-name: rotateOutUpRight;
animation-name: rotateOutUpRight;
}

228
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/slidingEntrances.scss

@ -1,115 +1,115 @@
@-webkit-keyframes slideInDown {
from {
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInDown {
from {
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInDown {
-webkit-animation-name: slideInDown;
animation-name: slideInDown;
}
@-webkit-keyframes slideInLeft {
from {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInLeft {
from {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInLeft {
-webkit-animation-name: slideInLeft;
animation-name: slideInLeft;
}
@-webkit-keyframes slideInRight {
from {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInRight {
from {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInRight {
-webkit-animation-name: slideInRight;
animation-name: slideInRight;
}
@-webkit-keyframes slideInUp {
from {
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInUp {
from {
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInUp {
-webkit-animation-name: slideInUp;
animation-name: slideInUp;
}
@-webkit-keyframes slideOutDown {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
@-webkit-keyframes slideInDown {
from {
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInDown {
from {
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInDown {
-webkit-animation-name: slideInDown;
animation-name: slideInDown;
}
@-webkit-keyframes slideInLeft {
from {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInLeft {
from {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInLeft {
-webkit-animation-name: slideInLeft;
animation-name: slideInLeft;
}
@-webkit-keyframes slideInRight {
from {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInRight {
from {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInRight {
-webkit-animation-name: slideInRight;
animation-name: slideInRight;
}
@-webkit-keyframes slideInUp {
from {
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInUp {
from {
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInUp {
-webkit-animation-name: slideInUp;
animation-name: slideInUp;
}
@-webkit-keyframes slideOutDown {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}

184
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/slidingExits.scss

@ -1,93 +1,93 @@
@keyframes slideOutDown {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
.slideOutDown {
-webkit-animation-name: slideOutDown;
animation-name: slideOutDown;
}
@-webkit-keyframes slideOutLeft {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
@keyframes slideOutLeft {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
.slideOutLeft {
-webkit-animation-name: slideOutLeft;
animation-name: slideOutLeft;
}
@-webkit-keyframes slideOutRight {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
@keyframes slideOutRight {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
.slideOutRight {
-webkit-animation-name: slideOutRight;
animation-name: slideOutRight;
}
@-webkit-keyframes slideOutUp {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
@keyframes slideOutUp {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
.slideOutUp {
-webkit-animation-name: slideOutUp;
animation-name: slideOutUp;
@keyframes slideOutDown {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
.slideOutDown {
-webkit-animation-name: slideOutDown;
animation-name: slideOutDown;
}
@-webkit-keyframes slideOutLeft {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
@keyframes slideOutLeft {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
.slideOutLeft {
-webkit-animation-name: slideOutLeft;
animation-name: slideOutLeft;
}
@-webkit-keyframes slideOutRight {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
@keyframes slideOutRight {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
.slideOutRight {
-webkit-animation-name: slideOutRight;
animation-name: slideOutRight;
}
@-webkit-keyframes slideOutUp {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
@keyframes slideOutUp {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
.slideOutUp {
-webkit-animation-name: slideOutUp;
animation-name: slideOutUp;
}

344
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/specials.scss

@ -1,173 +1,173 @@
@-webkit-keyframes hinge {
0% {
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
20%,
60% {
-webkit-transform: rotate3d(0, 0, 1, 80deg);
transform: rotate3d(0, 0, 1, 80deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
40%,
80% {
-webkit-transform: rotate3d(0, 0, 1, 60deg);
transform: rotate3d(0, 0, 1, 60deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
opacity: 1;
}
to {
-webkit-transform: translate3d(0, 700px, 0);
transform: translate3d(0, 700px, 0);
opacity: 0;
}
}
@keyframes hinge {
0% {
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
20%,
60% {
-webkit-transform: rotate3d(0, 0, 1, 80deg);
transform: rotate3d(0, 0, 1, 80deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
40%,
80% {
-webkit-transform: rotate3d(0, 0, 1, 60deg);
transform: rotate3d(0, 0, 1, 60deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
opacity: 1;
}
to {
-webkit-transform: translate3d(0, 700px, 0);
transform: translate3d(0, 700px, 0);
opacity: 0;
}
}
.hinge {
-webkit-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-name: hinge;
animation-name: hinge;
}
@-webkit-keyframes jackInTheBox {
from {
opacity: 0;
-webkit-transform: scale(.1) rotate(30deg);
transform: scale(.1) rotate(30deg);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
}
50% {
-webkit-transform: rotate(-10deg);
transform: rotate(-10deg);
}
70% {
-webkit-transform: rotate(3deg);
transform: rotate(3deg);
}
to {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes jackInTheBox {
from {
opacity: 0;
-webkit-transform: scale(.1) rotate(30deg);
transform: scale(.1) rotate(30deg);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
}
50% {
-webkit-transform: rotate(-10deg);
transform: rotate(-10deg);
}
70% {
-webkit-transform: rotate(3deg);
transform: rotate(3deg);
}
to {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
.jackInTheBox {
-webkit-animation-name: jackInTheBox;
animation-name: jackInTheBox;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes rollIn {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes rollIn {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.rollIn {
-webkit-animation-name: rollIn;
animation-name: rollIn;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes rollOut {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
}
}
@keyframes rollOut {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
}
}
.rollOut {
-webkit-animation-name: rollOut;
animation-name: rollOut;
@-webkit-keyframes hinge {
0% {
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
20%,
60% {
-webkit-transform: rotate3d(0, 0, 1, 80deg);
transform: rotate3d(0, 0, 1, 80deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
40%,
80% {
-webkit-transform: rotate3d(0, 0, 1, 60deg);
transform: rotate3d(0, 0, 1, 60deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
opacity: 1;
}
to {
-webkit-transform: translate3d(0, 700px, 0);
transform: translate3d(0, 700px, 0);
opacity: 0;
}
}
@keyframes hinge {
0% {
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
20%,
60% {
-webkit-transform: rotate3d(0, 0, 1, 80deg);
transform: rotate3d(0, 0, 1, 80deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
40%,
80% {
-webkit-transform: rotate3d(0, 0, 1, 60deg);
transform: rotate3d(0, 0, 1, 60deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
opacity: 1;
}
to {
-webkit-transform: translate3d(0, 700px, 0);
transform: translate3d(0, 700px, 0);
opacity: 0;
}
}
.hinge {
-webkit-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-name: hinge;
animation-name: hinge;
}
@-webkit-keyframes jackInTheBox {
from {
opacity: 0;
-webkit-transform: scale(.1) rotate(30deg);
transform: scale(.1) rotate(30deg);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
}
50% {
-webkit-transform: rotate(-10deg);
transform: rotate(-10deg);
}
70% {
-webkit-transform: rotate(3deg);
transform: rotate(3deg);
}
to {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes jackInTheBox {
from {
opacity: 0;
-webkit-transform: scale(.1) rotate(30deg);
transform: scale(.1) rotate(30deg);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
}
50% {
-webkit-transform: rotate(-10deg);
transform: rotate(-10deg);
}
70% {
-webkit-transform: rotate(3deg);
transform: rotate(3deg);
}
to {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
.jackInTheBox {
-webkit-animation-name: jackInTheBox;
animation-name: jackInTheBox;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes rollIn {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes rollIn {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.rollIn {
-webkit-animation-name: rollIn;
animation-name: rollIn;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes rollOut {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
}
}
@keyframes rollOut {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
}
}
.rollOut {
-webkit-animation-name: rollOut;
animation-name: rollOut;
}

336
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/zoomEntrances.scss

@ -1,169 +1,169 @@
@-webkit-keyframes zoomIn {
from {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
50% {
opacity: 1;
}
}
@keyframes zoomIn {
from {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
50% {
opacity: 1;
}
}
.zoomIn {
-webkit-animation-name: zoomIn;
animation-name: zoomIn;
}
@-webkit-keyframes zoomInDown {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomInDown {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomInDown {
-webkit-animation-name: zoomInDown;
animation-name: zoomInDown;
}
@-webkit-keyframes zoomInLeft {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomInLeft {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomInLeft {
-webkit-animation-name: zoomInLeft;
animation-name: zoomInLeft;
}
@-webkit-keyframes zoomInRight {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomInRight {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomInRight {
-webkit-animation-name: zoomInRight;
animation-name: zoomInRight;
}
@-webkit-keyframes zoomInUp {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomInUp {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomInUp {
-webkit-animation-name: zoomInUp;
animation-name: zoomInUp;
@-webkit-keyframes zoomIn {
from {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
50% {
opacity: 1;
}
}
@keyframes zoomIn {
from {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
50% {
opacity: 1;
}
}
.zoomIn {
-webkit-animation-name: zoomIn;
animation-name: zoomIn;
}
@-webkit-keyframes zoomInDown {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomInDown {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomInDown {
-webkit-animation-name: zoomInDown;
animation-name: zoomInDown;
}
@-webkit-keyframes zoomInLeft {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomInLeft {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomInLeft {
-webkit-animation-name: zoomInLeft;
animation-name: zoomInLeft;
}
@-webkit-keyframes zoomInRight {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomInRight {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomInRight {
-webkit-animation-name: zoomInRight;
animation-name: zoomInRight;
}
@-webkit-keyframes zoomInUp {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomInUp {
from {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomInUp {
-webkit-animation-name: zoomInUp;
animation-name: zoomInUp;
}

346
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/animation/zoomExits.scss

@ -1,174 +1,174 @@
@-webkit-keyframes zoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
to {
opacity: 0;
}
}
@keyframes zoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
to {
opacity: 0;
}
}
.zoomOut {
-webkit-animation-name: zoomOut;
animation-name: zoomOut;
}
@-webkit-keyframes zoomOutDown {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
to {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomOutDown {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
to {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomOutDown {
-webkit-animation-name: zoomOutDown;
animation-name: zoomOutDown;
}
@-webkit-keyframes zoomOutLeft {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(.1) translate3d(-2000px, 0, 0);
transform: scale(.1) translate3d(-2000px, 0, 0);
-webkit-transform-origin: left center;
transform-origin: left center;
}
}
@keyframes zoomOutLeft {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(.1) translate3d(-2000px, 0, 0);
transform: scale(.1) translate3d(-2000px, 0, 0);
-webkit-transform-origin: left center;
transform-origin: left center;
}
}
.zoomOutLeft {
-webkit-animation-name: zoomOutLeft;
animation-name: zoomOutLeft;
}
@-webkit-keyframes zoomOutRight {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(.1) translate3d(2000px, 0, 0);
transform: scale(.1) translate3d(2000px, 0, 0);
-webkit-transform-origin: right center;
transform-origin: right center;
}
}
@keyframes zoomOutRight {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(.1) translate3d(2000px, 0, 0);
transform: scale(.1) translate3d(2000px, 0, 0);
-webkit-transform-origin: right center;
transform-origin: right center;
}
}
.zoomOutRight {
-webkit-animation-name: zoomOutRight;
animation-name: zoomOutRight;
}
@-webkit-keyframes zoomOutUp {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
to {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomOutUp {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
to {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomOutUp {
-webkit-animation-name: zoomOutUp;
animation-name: zoomOutUp;
@-webkit-keyframes zoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
to {
opacity: 0;
}
}
@keyframes zoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
to {
opacity: 0;
}
}
.zoomOut {
-webkit-animation-name: zoomOut;
animation-name: zoomOut;
}
@-webkit-keyframes zoomOutDown {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
to {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomOutDown {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
to {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomOutDown {
-webkit-animation-name: zoomOutDown;
animation-name: zoomOutDown;
}
@-webkit-keyframes zoomOutLeft {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(.1) translate3d(-2000px, 0, 0);
transform: scale(.1) translate3d(-2000px, 0, 0);
-webkit-transform-origin: left center;
transform-origin: left center;
}
}
@keyframes zoomOutLeft {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(.1) translate3d(-2000px, 0, 0);
transform: scale(.1) translate3d(-2000px, 0, 0);
-webkit-transform-origin: left center;
transform-origin: left center;
}
}
.zoomOutLeft {
-webkit-animation-name: zoomOutLeft;
animation-name: zoomOutLeft;
}
@-webkit-keyframes zoomOutRight {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(.1) translate3d(2000px, 0, 0);
transform: scale(.1) translate3d(2000px, 0, 0);
-webkit-transform-origin: right center;
transform-origin: right center;
}
}
@keyframes zoomOutRight {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(.1) translate3d(2000px, 0, 0);
transform: scale(.1) translate3d(2000px, 0, 0);
-webkit-transform-origin: right center;
transform-origin: right center;
}
}
.zoomOutRight {
-webkit-animation-name: zoomOutRight;
animation-name: zoomOutRight;
}
@-webkit-keyframes zoomOutUp {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
to {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
@keyframes zoomOutUp {
40% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19);
animation-timing-function: cubic-bezier(.55, .055, .675, .19);
}
to {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1);
animation-timing-function: cubic-bezier(.175, .885, .32, 1);
}
}
.zoomOutUp {
-webkit-animation-name: zoomOutUp;
animation-name: zoomOutUp;
}

78
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/common.scss

@ -24,21 +24,13 @@
}
/* 弹出层箭头样式 */
$dark-arrow-height: 4px;
$dark-arrow-height: 5px;
// 三角形宽的一半
$dark-arrow-width-half: 6px;
$dark-arrow-width-half: $dark-arrow-height;
$light-arrow-offset: 1px;
$light-arrow-height: $light-arrow-offset + $dark-arrow-height;
$light-arrow-width-half: $light-arrow-offset + $dark-arrow-width-half;
// 大号箭头
$dark-arrow-height-large: 6px;
$dark-arrow-width-half-large: 8px;
$light-arrow-height-large: $light-arrow-offset + $dark-arrow-height-large;
$light-arrow-width-half-large: $light-arrow-offset + $dark-arrow-width-half-large;
$arrow-color: rgba($title-color-light, 0.95);
$light-arrow-width-half: $light-arrow-height;
.#{$lib-name}-popper-arrow {
position: absolute;
@ -54,11 +46,7 @@ $arrow-color: rgba($title-color-light, 0.95);
& > .#{$lib-name}-popper-arrow {
bottom: -$dark-arrow-height;
border-width: $dark-arrow-height $dark-arrow-width-half 0 $dark-arrow-width-half;
border-color: $arrow-color transparent transparent transparent;
&.large {
bottom: -$dark-arrow-height-large;
border-width: $dark-arrow-height-large $dark-arrow-width-half-large 0 $dark-arrow-width-half-large;
}
border-color: $background-color-dark transparent transparent transparent;
}
}
&[x-placement^="bottom"] {
@ -66,11 +54,7 @@ $arrow-color: rgba($title-color-light, 0.95);
& > .#{$lib-name}-popper-arrow {
top: -$dark-arrow-height;
border-width: 0 $dark-arrow-width-half $dark-arrow-height $dark-arrow-width-half;
border-color: transparent transparent $arrow-color transparent;
&.large {
top: -$dark-arrow-height-large;
border-width: 0 $dark-arrow-width-half-large $dark-arrow-height-large $dark-arrow-width-half-large;
}
border-color: transparent transparent $background-color-dark transparent;
}
}
&[x-placement^="right"] {
@ -78,11 +62,7 @@ $arrow-color: rgba($title-color-light, 0.95);
& > .#{$lib-name}-popper-arrow {
left: -$dark-arrow-height;
border-width: $dark-arrow-width-half $dark-arrow-height $dark-arrow-width-half 0;
border-color: transparent $arrow-color transparent transparent;
&.large {
left: -$dark-arrow-height-large;
border-width: $dark-arrow-width-half-large $dark-arrow-height-large $dark-arrow-width-half-large 0;
}
border-color: transparent $background-color-dark transparent transparent;
}
}
&[x-placement^="left"] {
@ -90,11 +70,7 @@ $arrow-color: rgba($title-color-light, 0.95);
& > .#{$lib-name}-popper-arrow {
right: -$dark-arrow-height;
border-width: $dark-arrow-width-half 0 $dark-arrow-width-half $dark-arrow-height;
border-color: transparent transparent transparent $arrow-color;
&.large {
right: -$dark-arrow-height-large;
border-width: $dark-arrow-width-half-large 0 $dark-arrow-width-half-large $dark-arrow-height-large;
}
border-color: transparent transparent transparent $background-color-dark;
}
}
}
@ -117,18 +93,10 @@ $arrow-color: rgba($title-color-light, 0.95);
border-color: $border-color-base transparent transparent transparent;
&::after {
bottom: $light-arrow-offset;
left: -$dark-arrow-width-half;
left: -$dark-arrow-height;
border-width: $dark-arrow-height $dark-arrow-width-half 0 $dark-arrow-width-half;
border-color: $background-color-base transparent transparent transparent;
}
&.large {
bottom: -$light-arrow-height-large;
border-width: $light-arrow-height-large $light-arrow-width-half-large 0 $light-arrow-width-half-large;
&::after {
left: -$dark-arrow-width-half-large;
border-width: $dark-arrow-height-large $dark-arrow-width-half-large 0 $dark-arrow-width-half-large;
}
}
}
}
&[x-placement^="bottom"] {
@ -139,18 +107,10 @@ $arrow-color: rgba($title-color-light, 0.95);
border-color: transparent transparent $border-color-base transparent;
&::after {
top: $light-arrow-offset;
left: -$dark-arrow-width-half;
left: -$dark-arrow-height;
border-width: 0 $dark-arrow-width-half $dark-arrow-height $dark-arrow-width-half;
border-color: transparent transparent $background-color-base transparent;
}
&.large {
top: -$light-arrow-height-large;
border-width: 0 $light-arrow-width-half-large $light-arrow-height-large $light-arrow-width-half-large;
&::after {
left: -$dark-arrow-width-half-large;
border-width: 0 $dark-arrow-width-half-large $dark-arrow-height-large $dark-arrow-width-half-large;
}
}
}
}
&[x-placement^="right"] {
@ -161,18 +121,10 @@ $arrow-color: rgba($title-color-light, 0.95);
border-color: transparent $border-color-base transparent transparent;
&::after {
left: $light-arrow-offset;
top: -$dark-arrow-width-half;
top: -$dark-arrow-height;
border-width: $dark-arrow-width-half $dark-arrow-height $dark-arrow-width-half 0;
border-color: transparent $background-color-base transparent transparent;
}
&.large {
left: -$light-arrow-height-large;
border-width: $light-arrow-width-half-large $light-arrow-height-large $light-arrow-width-half-large 0;
&::after {
top: -$dark-arrow-width-half-large;
border-width: $dark-arrow-width-half-large $dark-arrow-height-large $dark-arrow-width-half-large 0;
}
}
}
}
&[x-placement^="left"] {
@ -183,18 +135,10 @@ $arrow-color: rgba($title-color-light, 0.95);
border-color: transparent transparent transparent $border-color-base;
&::after {
right: $light-arrow-offset;
top: -$dark-arrow-width-half;
top: -$dark-arrow-height;
border-width: $dark-arrow-width-half 0 $dark-arrow-width-half $dark-arrow-height;
border-color: transparent transparent transparent $background-color-base;
}
&.large {
right: -$light-arrow-height-large;
border-width: $light-arrow-width-half-large 0 $light-arrow-width-half-large $light-arrow-height-large;
&::after {
top: -$dark-arrow-width-half-large;
border-width: $dark-arrow-width-half-large 0 $dark-arrow-width-half-large $dark-arrow-height-large;
}
}
}
}
}

15
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/checkbox/checkbox.scss

@ -45,21 +45,6 @@ $prefixCls: $lib-name + "-checkbox";
}
}
}
.is-indeterminate {
.#{$prefixCls}-inner {
border-color: $primary-color;
background-color: $primary-color;
&:after {
transition: none;
transform: none;
background: #fff;
border: none;
width: 6px;
height: 2px;
top: 5px;
}
}
}
.#{$prefixCls}-inner {
width: 14px;
height: 14px;

11
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/input/input.scss

@ -11,7 +11,7 @@ $component: $lib-name + "-input";
border: 1px solid $border-color-base;
border-radius: 4px;
box-sizing: border-box;
transition: border $transition-time;
transition: border $transition-time, box-shadow $transition-time;
&::placeholder {
color: $sub-text-color-light;
}
@ -23,6 +23,7 @@ $component: $lib-name + "-input";
}
&.active {
border-color: $primary-color;
box-shadow: 0 0 0 2px lighten($primary-color, 40);
}
&.disabled {
color: $sub-text-color-light;
@ -47,6 +48,7 @@ $component: $lib-name + "-input";
border-right-color: transparent;
}
border-radius: 0;
box-shadow: none;
}
&.input-textarea {
padding: 6px 10px;
@ -54,6 +56,13 @@ $component: $lib-name + "-input";
line-height: normal;
}
}
.no-border-shadow {
position: absolute;
z-index: 1;
width: 100%;
height: 2px;
background: lighten($primary-color, 40);
}
.prefix-area,
.suffix-area {
position: absolute;

8
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/select/select.scss

@ -5,13 +5,19 @@ $option-font-size: 14px;
display: inline-block;
width: 280px;
.inner-input {
.no-border-shadow {
display: none;
opacity: 0;
}
&.active .input-element {
border-color: $primary-color;
outline: none;
box-shadow: 0 0 0 2px lighten($primary-color, 40);
&.no-border {
border-top-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
box-shadow: none;
}
}
.input-element {
@ -128,6 +134,7 @@ $option-font-size: 14px;
.input-element {
background: $background-color-disabled;
border: none;
box-shadow: none;
border-radius: 16px;
&:hover {
background: lighten($border-color-base, 4);
@ -135,6 +142,7 @@ $option-font-size: 14px;
&.active {
caret-color: $primary-color;
background: $background-color-disabled;
box-shadow: none;
}
}
}

7
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/switch/switch.scss

@ -1,6 +1,7 @@
$switch-name: $lib-name + "-switch";
$switch-border-color: $disabled-text-color-light;
$switch-border-color: $border-color-base;
$switch-background-color: $background-color-base;
$switch-background-color-gray: $disabled-text-color-light;
$switch-time: $transition-time;
$switch-text-color: $title-color-dark;
$switch-checked-color: $primary-color;
@ -126,9 +127,7 @@ $switch-color-disabled: $background-color-disabled;
background: $switch-color-disabled;
&:after {
cursor: not-allowed;
}
&.is-checked {
background: lighten($color: $switch-checked-color, $amount: 36)
background: $switch-background-color-gray;
}
}
}

67
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/table/table.scss

@ -2,7 +2,7 @@ $component-name: $lib-name + "-table";
$table-border-color: $border-color-base;
$table-header-bg: $background-color-disabled;
$table-stripe-row-bg: lighten($background-color-disabled, 1);
$table-row-hover-bg: lighten($primary-color, 49);
$table-row-hover-bg: lighten($primary-color-hover, 45);
$order-triangle-height: 4px;
.#{$component-name} {
@ -36,21 +36,6 @@ $order-triangle-height: 4px;
background: $table-border-color;
content: "";
}
.fixed-left-table-wrapper.no-shadow::after,
.fixed-right-table-wrapper.no-shadow::after {
position: absolute;
content: "";
top: 0;
width: 1px;
height: 100%;
background: $table-border-color;
}
.fixed-left-table-wrapper.no-shadow::after {
right: 0;
}
.fixed-right-table-wrapper.no-shadow::after {
right: left;
}
}
.hidden-content {
visibility: hidden;
@ -96,6 +81,9 @@ $order-triangle-height: 4px;
&.bottom-border {
border-bottom: 1px solid $table-border-color;
}
&.hidden-column {
visibility: hidden;
}
}
.table-header-cell-content,
.table-cell-content {
@ -123,6 +111,19 @@ $order-triangle-height: 4px;
}
}
}
.unfold-icon {
margin-left: 8px;
cursor: pointer;
color: $sub-text-color-light;
font-size: 12px;
transition: transform $transition-time;
&:hover {
color: $primary-color;
}
&.rotate-down {
transform: rotate(90deg);
}
}
}
.table-header-cell-content {
font-weight: 500;
@ -175,35 +176,10 @@ $order-triangle-height: 4px;
color: $content-color-light;
@for $i from 1 through 9 {
&.row-level-#{$i} {
padding-left: 8px + 20px * ($i - 1);
}
}
&.flex-wrapper {
display: flex;
}
.unfold-icon {
margin-right: 8px;
cursor: pointer;
color: $sub-text-color-light;
font-size: 12px;
transition: transform $transition-time;
&:hover {
color: $primary-color;
}
&.rotate-down {
transform: rotate(90deg);
padding-left: 12px * $i;
}
}
}
.tree-branch-text {
cursor: pointer;
}
.ellipsis-text,
.ellipsis-text .tree-branch-text {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
&.affix-table-header {
.affix {
position: fixed;
@ -228,7 +204,6 @@ $order-triangle-height: 4px;
}
.affix {
z-index: 15;
background: transparent;
}
.table-header-wrapper,
.table-body-wrapper {
@ -276,11 +251,5 @@ $order-triangle-height: 4px;
z-index: 16;
}
}
.table-header-cell,
.table-cell {
&.hidden-column {
visibility: hidden;
}
}
}
}

18
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/components/tooltip/tooltip.scss

@ -1,14 +1,14 @@
$tooltip-wrapper-name: $lib-name + "-tooltip";
$tooltip-dark-bg-color: rgba($title-color-light, 0.95);
$tooltip-dark-text-color: $background-color-disabled;
$tooltip-dark-bg-color: $background-color-dark;
$tooltip-dark-text-color: $title-color-dark;
$tooltip-light-bg-color: $background-color-base;
$tooltip-light-border-color: $border-color-base;
$tooltip-light-text-color: $title-color-light;
.#{$tooltip-wrapper-name} {
padding: 8px;
padding: 6px 10px;
border-radius: 4px;
&.dark {
background: $tooltip-dark-bg-color;
@ -26,16 +26,8 @@ $tooltip-light-text-color: $title-color-light;
}
}
.tooltip-content {
font-size: 12px;
line-height: 1;
font-size: 14px;
line-height: 20px;
text-align: justify;
}
&.large {
padding: 12px 16px;
border-radius: 6px;
.tooltip-content {
font-size: 13px;
line-height: 21px;
}
}
}

125
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font.scss

File diff suppressed because one or more lines are too long

BIN
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font/iconfont.eot

Binary file not shown.

13
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font/iconfont.svg

@ -26,10 +26,10 @@ Created by iconfont
<glyph glyph-name="filter" unicode="&#58936;" d="M440.6096818342152-61.1951791181657c-7.411231604938271 0-14.823619047619045 3.7056158024691355-18.528079012345678 3.7056158024691355-11.118003245149911 7.411231604938271-18.53039068783069 22.234850652557316-18.53039068783069 33.351698059964725V298.27035880070537L77.4373722751323 768.9113058201058c-7.411231604938271 11.116847407407407-11.116847407407407 25.940466455026453-3.7056158024691355 40.7640855026455 7.412387442680775 11.116847407407407 18.529234850088184 18.528079012345678 33.352853897707234 18.528079012345678H922.3686320987654c14.823619047619045 0 25.940466455026453-7.4100757671957656 33.351698059964725-18.528079012345678 7.412387442680775-11.116847407407407 3.7056158024691355-25.940466455026453-3.7056158024691355-37.05846970017637L625.9020303350969 298.27035880070537v-248.29128465608463c0-14.823619047619045-7.412387442680775-25.940466455026453-22.234850652557316-33.352853897707234L455.4333008818342-57.489563315696614c-3.7056158024691355-3.7056158024691355-7.411231604938271-3.7056158024691355-14.823619047619045-3.7056158024691355z" horiz-adv-x="1024" />
<glyph glyph-name="search" unicode="&#59449;" d="M949.248-2.048000000000002c7.168-8.192 10.752-16.896 10.752-26.112 0-9.216-3.584-17.408-10.752-25.088-7.168-7.168-15.872-10.752-25.088-10.752-9.216 0-17.92 3.584-25.088 10.752l-205.824 204.8c-33.28-27.136-70.656-48.64-112.64-64.512-41.472-15.872-86.016-23.552-132.608-23.552-108.544 2.56-199.168 39.936-271.36 112.64-72.192 72.192-110.08 162.816-112.64 271.36 2.56 108.544 39.936 199.168 112.64 271.36 72.192 72.192 162.816 110.08 271.36 112.64 108.544-2.56 199.168-39.936 271.36-112.64 72.192-72.192 110.08-162.816 112.64-271.36 0-46.592-7.68-90.624-23.552-132.608-15.872-41.472-37.376-79.36-64.512-112.64l205.824-204.8h-0.512z m-280.576 229.376c29.184 29.184 51.712 62.464 67.584 99.84 15.872 37.888 24.064 77.824 24.064 120.32s-8.192 82.944-24.064 120.32c-15.872 37.888-38.4 71.168-67.584 99.84S606.208 719.8720000000001 568.32 736.256c-37.888 15.872-77.824 24.064-120.32 24.064S365.056 752.1279999999999 327.68 736.256c-37.888-15.872-71.168-38.4-99.84-67.584S176.128 606.2080000000001 160.256 568.3199999999999c-15.872-37.888-24.064-77.824-24.064-120.32s8.192-82.944 24.064-120.32c15.872-37.888 38.4-71.168 67.584-99.84s62.464-51.712 99.84-67.584c37.888-15.872 77.824-24.064 120.32-24.064s82.944 8.192 120.832 25.088c37.376 14.848 70.656 37.376 99.84 66.048z" horiz-adv-x="1024" />
<glyph glyph-name="check" unicode="&#58953;" d="M400.22 76.49400000000003l569.83 679.097c11.005 13.115 30.558 14.826 43.674 3.82 13.115-11.004 14.826-30.558 3.82-43.673L425.7 10.404999999999973c-11.005-13.115-30.559-14.826-43.674-3.82a31.285 31.285 0 0 0-2.999 2.874l-0.303 0.27L10.78 341.02700000000004c-13.134 11.825-14.194 32.059-2.369 45.192 11.826 13.134 32.06 14.194 45.193 2.369L400.22 76.49400000000003z" horiz-adv-x="1024" />
<glyph glyph-name="check" unicode="&#58953;" d="M400.22 76.49400000000003l569.83 679.097c11.005 13.115 30.558 14.826 43.674 3.82 13.115-11.004 14.826-30.558 3.82-43.673L425.7 10.404999999999973c-11.005-13.115-30.559-14.826-43.674-3.82a31.285 31.285 0 0 0-2.999 2.874l-0.303 0.27L10.78 341.02700000000004c-13.134 11.825-14.194 32.059-2.369 45.192 11.826 13.134 32.06 14.194 45.193 2.369L400.22 76.49400000000003z" horiz-adv-x="1024" />
<glyph glyph-name="search" unicode="&#58956;" d="M700.109 148.63300000000004l-69.093 69.093c-66.65-55.615-152.486-89.088-246.155-89.088-212.078 0-384 171.588-384 383.252C0.86 723.553 172.783 895.14 384.86 895.14c212.077 0 384-171.588 384-383.251 0-95.204-34.782-182.3-92.355-249.322l67.22-67.218c21.836 6.634 46.525 1.318 63.79-15.947l197.667-197.666c24.945-24.945 24.945-65.389 0-90.334-24.945-24.945-65.388-24.945-90.333 0L717.183 89.07000000000005c-16.159 16.16-21.85 38.822-17.074 59.563zM384.861 192.53999999999996c176.716 0 319.972 142.978 319.972 319.35 0 176.371-143.256 319.349-319.972 319.349-176.716 0-319.973-142.978-319.973-319.35 0-176.371 143.257-319.349 319.973-319.349z" horiz-adv-x="1024" />
<glyph glyph-name="off" unicode="&#58957;" d="M272.341 802.669c15.316 8.817 34.88 3.55 43.698-11.767 8.818-15.317 3.55-34.88-11.766-43.699C175.827 673.2570000000001 95 536.463 95 385.54c0-230.303 186.697-417 417-417s417 186.697 417 417c0 150.966-80.872 287.793-209.376 361.724-15.318 8.813-20.592 28.376-11.78 43.695 8.814 15.319 28.377 20.592 43.696 11.78C899.696 717.5 993 559.6379999999999 993 385.537c0-265.648-215.351-481-481-481s-481 215.352-481 481c0 174.052 93.252 331.876 241.341 417.13zM512 896c17.673 0 32-14.327 32-32v-512c0-17.673-14.327-32-32-32-17.673 0-32 14.327-32 32V864c0 17.673 14.327 32 32 32z" horiz-adv-x="1024" />
@ -98,15 +98,6 @@ Created by iconfont
<glyph glyph-name="increase" unicode="&#58988;" d="M164 700v-632c0-17.673 14.327-32 32-32h632c17.673 0 32 14.327 32 32V700c0 17.673-14.327 32-32 32H196c-17.673 0-32-14.327-32-32z m0 96h696c35.346 0 64-28.654 64-64v-696c0-35.346-28.654-64-64-64H164c-35.346 0-64 28.654-64 64V732c0 35.346 28.654 64 64 64zM528 588v-376c0-17.673-14.327-32-32-32-17.673 0-32 14.327-32 32V588c0 17.673 14.327 32 32 32 17.673 0 32-14.327 32-32zM716 400c0-17.673-14.327-32-32-32H308c-17.673 0-32 14.327-32 32 0 17.673 14.327 32 32 32h376c17.673 0 32-14.327 32-32z" horiz-adv-x="1024" />
<glyph glyph-name="eye" unicode="&#59586;" d="M1012.736 349.696c-104.96-173.056-297.472-289.792-500.736-289.792s-395.264 117.248-500.736 289.792C4.608 361.472 0 374.784 0 389.12s4.608 27.648 11.264 39.424C116.736 601.088 309.248 718.336 512 718.336s395.264-117.248 500.736-289.792c6.656-11.776 11.264-25.088 11.264-39.424s-4.608-27.648-11.264-39.424z m-279.552 241.152c23.04-38.912 34.816-83.456 34.816-128.512 0-141.312-114.688-256-256-256s-256 114.688-256 256c0 45.056 11.776 89.6 34.816 128.512-89.088-45.568-163.328-117.76-217.6-201.728 97.792-151.04 255.488-256 438.784-256s340.992 104.96 438.784 256c-54.272 83.968-128.512 156.16-217.6 201.728zM512 635.904c-95.232 0-173.568-78.336-173.568-173.568 0-14.848 12.8-27.648 27.648-27.648s27.648 12.8 27.648 27.648C393.216 527.36 446.976 581.12 512 581.12c14.848 0 27.648 12.8 27.648 27.648s-12.8 27.136-27.648 27.136z" horiz-adv-x="1029" />
<glyph glyph-name="amount-desc" unicode="&#59587;" d="M406.543284 63.554228999999964L225.178109-117.81094499999995c-4.075622-3.566169-8.660697-5.094527-13.245771-5.094528s-9.170149 1.528358-13.245771 5.094528L16.81194 64.06368199999997c-5.094527 5.60398-6.622886 13.245771-4.075622 19.868656 3.056716 6.622886 9.679602 11.20796 16.811941 11.207961h109.022885V877.659701c0 10.189055 8.151244 18.340299 18.340299 18.340299h109.022885c10.189055 0 18.340299-8.151244 18.340299-18.340299v-782.519402h109.022885c10.189055 0 18.340299-8.151244 18.340299-18.340299 0.509453-4.585075-2.037811-9.170149-5.094527-13.245771zM685.21393 768.636816c0-10.189055-8.151244-18.340299-18.340298-18.340299h-145.703483c-10.189055 0-18.340299 8.151244-18.340298 18.340299V877.659701c0 10.189055 8.151244 18.340299 18.340298 18.340299h145.703483c10.189055 0 18.340299-8.151244 18.340298-18.340299V768.636816z m109.022886-290.897513c0-10.189055-8.151244-18.340299-18.340299-18.340298h-254.726368c-10.189055 0-18.340299 8.151244-18.340298 18.340298V586.762189c0 10.189055 8.151244 18.340299 18.340298 18.340299h254.726368c10.189055 0 18.340299-8.151244 18.340299-18.340299v-109.022886z m109.022885-291.406965c0-10.189055-8.151244-18.340299-18.340298-18.340298h-363.749254c-10.189055 0-18.340299 8.151244-18.340298 18.340298v109.022886c0 10.189055 8.151244 18.340299 18.340298 18.340298h363.749254c10.189055 0 18.340299-8.151244 18.340298-18.340298v-109.022886z m109.022886-290.897512c0-10.189055-8.151244-18.340299-18.340298-18.340299h-473.281592c-10.189055 0-18.340299 8.151244-18.340299 18.340299V4.4577110000000175c0 10.189055 8.151244 18.340299 18.340299 18.340299h473.281592c10.189055 0 18.340299-8.151244 18.340298-18.340299v-109.022885z" horiz-adv-x="1024" />
<glyph glyph-name="amount-asc" unicode="&#59589;" d="M406.543284 63.554228999999964L225.178109-117.81094499999995c-4.075622-3.566169-8.660697-5.094527-13.245771-5.094528s-9.170149 1.528358-13.245771 5.094528L16.81194 64.06368199999997c-5.094527 5.60398-6.622886 13.245771-4.075622 19.868656 3.056716 6.622886 9.679602 11.20796 16.811941 11.207961h109.022885V877.659701c0 10.189055 8.151244 18.340299 18.340299 18.340299h109.022885c10.189055 0 18.340299-8.151244 18.340299-18.340299v-782.519402h109.022885c10.189055 0 18.340299-8.151244 18.340299-18.340299 0.509453-4.585075-2.037811-9.170149-5.094527-13.245771zM1012.282587 768.636816c0-10.189055-8.151244-18.340299-18.340298-18.340299h-473.281592c-10.189055 0-18.340299 8.151244-18.340299 18.340299V877.659701c0 10.189055 8.151244 18.340299 18.340299 18.340299h473.281592c10.189055 0 18.340299-8.151244 18.340298-18.340299V768.636816z m-109.022886-290.897513c0-10.189055-8.151244-18.340299-18.340298-18.340298h-363.749254c-10.189055 0-18.340299 8.151244-18.340298 18.340298V586.762189c0 10.189055 8.151244 18.340299 18.340298 18.340299h363.749254c10.189055 0 18.340299-8.151244 18.340298-18.340299v-109.022886z m-109.022885-291.406965c0-10.189055-8.151244-18.340299-18.340299-18.340298h-254.726368c-10.189055 0-18.340299 8.151244-18.340298 18.340298v109.022886c0 10.189055 8.151244 18.340299 18.340298 18.340298h254.726368c10.189055 0 18.340299-8.151244 18.340299-18.340298v-109.022886zM685.21393-104.56517399999996c0-10.189055-8.151244-18.340299-18.340298-18.340299h-145.703483c-10.189055 0-18.340299 8.151244-18.340298 18.340299V4.4577110000000175c0 10.189055 8.151244 18.340299 18.340298 18.340299h145.703483c10.189055 0 18.340299-8.151244 18.340298-18.340299v-109.022885z" horiz-adv-x="1024" />
</font>

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font/iconfont.ttf

Binary file not shown.

BIN
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/font/iconfont.woff

Binary file not shown.

36
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/style/vars.scss

@ -5,40 +5,40 @@ $lib-name: "ans";
$icon-path: "./font";
// 主要颜色
$primary-color: #1489e2 !default;
$primary-color-hover: #1799fc !default;
$primary-color-active: #127ac9 !default;
$sub-color: #ff8c00 !default;
$sub-color-hover: #ff981a !default;
$sub-color-active: #ef6c00 !default;
$info-color: #1489e2 !default;
$success-color: #4caf50 !default;
$warning-color: #ffc107 !default;
$error-color: #f14343 !default;
$primary-color: #0097e0 !default;
$primary-color-hover: #05acff !default;
$primary-color-active: #1875d1 !default;
$sub-color: #ff9a00 !default;
$sub-color-hover: #ffb846 !default;
$sub-color-active: #f97b00 !default;
$info-color: #0097e0 !default;
$success-color: #35cd75 !default;
$warning-color: #ffbc01 !default;
$error-color: #f04d4e !default;
// 浅色背景文本颜色
$title-color-light: #252d39 !default;
$content-color-light: #4c6072 !default;
$sub-text-color-light: #6d859e !default;
$disabled-text-color-light: #c5ced8 !default;
$title-color-light: #333 !default;
$content-color-light: #666 !default;
$sub-text-color-light: #999 !default;
$disabled-text-color-light: #ccc !default;
// 深色背景文本颜色
$title-color-dark: #fff !default;
$content-color-dark: #eee !default;
$sub-text-color-dark: #c5ced8 !default;
$sub-text-color-dark: #ccc !default;
$disabled-text-color-dark: #888 !default;
$bg-color-in-dark: #4c6072;
$bg-color-in-dark: #555;
// radius
$border-radius-base: 4px;
// 边框颜色
$border-color-base: #e4eaf1 !default;
$border-color-base: #dedede !default;
$box-shadow-base: 0 2px 8px 0 rgba(0,0,0,0.14) !default;
// 背景色
$background-color-base: #fff;
$background-color-disabled: #ecf3f8;
$background-color-disabled: #f5f5f5;
$background-color-dark: rgba(0, 0, 0, 0.6);
// 动画

30
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/util/directives/mousewheel.js

@ -1,38 +1,16 @@
import normalizeWheel from 'normalize-wheel'
import { hasClass } from '../../util'
const handler = function (event) {
let scrollDom = null
let parent = event.target.parentNode
while (parent) {
if (hasClass(parent, 'ans-scroller')) {
scrollDom = parent
break
} else {
parent = parent.parentNode
}
}
if (scrollDom) {
const callback = scrollDom.__wheel_callback
const normalized = normalizeWheel(event)
callback && callback.apply(this, [event, normalized])
}
}
const eventType = normalizeWheel.getEventType()
const mousewheel = function (element, callback) {
if (element && element.addEventListener) {
element.__wheel_callback = callback
element.addEventListener(eventType, handler)
element.addEventListener(normalizeWheel.getEventType(), function (event) {
const normalized = normalizeWheel(event)
callback && callback.apply(this, [event, normalized])
})
}
}
export default {
bind (el, binding) {
mousewheel(el, binding.value)
},
unbind (el) {
el.removeEventListener(eventType, el.__wheel_callback)
}
}

45
dolphinscheduler-ui/src/lib/@analysys/ans-ui/src/util/mixins/popper.js

@ -1,5 +1,4 @@
import PopperJS from 'popper.js'
import merge from 'deepmerge'
export default {
data () {
@ -23,6 +22,7 @@ export default {
default: 8
},
// 是否将弹出元素插入到 body
// 当弹出元素的父元素设置了 overflow: hidden 的时候可设置为 true
appendToBody: {
type: Boolean,
default: false
@ -53,6 +53,14 @@ export default {
if (appendToBody) document.body.appendChild(popperEl)
const options = Object.assign({}, this.popperOptions)
options.placement = this.placement
if (!options.modifiers) {
options.modifiers = {}
}
if (!options.modifiers.offset) {
options.modifiers.offset = {}
}
// 控制偏移的函数
const addDistance = (data) => {
const { arrowStyles, offsets, placement, styles } = data
@ -103,38 +111,29 @@ export default {
}
return data
}
const options = {
placement: this.placement,
modifiers: {
computeStyle: {},
preventOverflow: {},
hide: {}
}
if (!options.modifiers.computeStyle) {
options.modifiers.computeStyle = {}
}
const merged = merge(options, this.popperOptions || {})
// 关闭 GPU 加速,防止字体模糊
merged.modifiers.computeStyle.gpuAcceleration = false
merged.modifiers.computeStyle.fn = (data, options) => {
options.modifiers.computeStyle.gpuAcceleration = false
options.modifiers.computeStyle.fn = (data, options) => {
data = PopperJS.Defaults.modifiers.computeStyle.fn(data, options)
return addDistance(data)
}
if (this.positionFixed) {
merged.positionFixed = true
// fix position bug
if (!options.hasOwnProperty('positionFixed') && this.positionFixed) {
options.positionFixed = true
}
if (this.viewport) {
merged.modifiers.preventOverflow.boundariesElement = 'viewport'
// fix overflow bug
if (!options.modifiers.preventOverflow) {
options.modifiers.preventOverflow = {}
}
// fix popper.js warning
if (merged.modifiers.preventOverflow.hasOwnProperty('enabled') &&
!merged.modifiers.preventOverflow.enabled) {
merged.modifiers.hide.enabled = false
if (!options.modifiers.preventOverflow.hasOwnProperty('boundariesElement') && this.viewport) {
options.modifiers.preventOverflow.boundariesElement = 'viewport'
}
this.popperInstance = new PopperJS(referenceEl, popperEl, merged)
this.popperInstance = new PopperJS(referenceEl, popperEl, options)
}
},
hideElementHandler () {

Loading…
Cancel
Save