ui.py 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # isort:skip_file
  2. import os
  3. class Ui:
  4. from .config import config # NOTE: before run
  5. from .run import run # NOTE: before justpy
  6. _excludes = [word.strip().lower().removesuffix('.js') for word in config.exclude.split(',')]
  7. os.environ['HIGHCHARTS'] = str('highcharts' not in _excludes)
  8. os.environ['AGGRID'] = str('aggrid' not in _excludes)
  9. from .elements.button import Button as button
  10. from .elements.card import Card as card
  11. from .elements.card import CardSection as card_section
  12. from .elements.checkbox import Checkbox as checkbox
  13. from .elements.color_input import ColorInput as color_input
  14. from .elements.color_picker import ColorPicker as color_picker
  15. from .elements.column import Column as column
  16. from .elements.dialog import Dialog as dialog
  17. from .elements.expansion import Expansion as expansion
  18. from .elements.html import Html as html
  19. from .elements.icon import Icon as icon
  20. from .elements.image import Image as image
  21. from .elements.input import Input as input
  22. from .elements.label import Label as label
  23. from .elements.link import Link as link
  24. from .elements.markdown import Markdown as markdown
  25. from .elements.menu import Menu as menu
  26. from .elements.menu_item import MenuItem as menu_item
  27. from .elements.menu_separator import MenuSeparator as menu_separator
  28. from .elements.notify import Notify as notify
  29. from .elements.number import Number as number
  30. from .elements.open import open, open_async
  31. from .elements.page import Page as page
  32. from .elements.radio import Radio as radio
  33. from .elements.row import Row as row
  34. from .elements.select import Select as select
  35. from .elements.slider import Slider as slider
  36. from .elements.svg import Svg as svg
  37. from .elements.switch import Switch as switch
  38. from .elements.table import Table as table
  39. from .elements.toggle import Toggle as toggle
  40. from .elements.tree import Tree as tree
  41. from .elements.upload import Upload as upload
  42. from .lifecycle import on_shutdown, on_startup, shutdown_tasks, startup_tasks
  43. from .routes import add_route, add_static_files, get
  44. from .timer import Timer as timer
  45. if 'colors' not in _excludes:
  46. from .elements.colors import Colors as colors
  47. if 'custom_example' not in _excludes:
  48. from .elements.custom_example import CustomExample as custom_example
  49. if 'highcharts' not in _excludes:
  50. from .elements.chart import Chart as chart
  51. if 'interactive_image' not in _excludes:
  52. from .elements.interactive_image import InteractiveImage as interactive_image
  53. if 'keyboard' not in _excludes:
  54. from .elements.keyboard import Keyboard as keyboard
  55. if 'log' not in _excludes:
  56. from .elements.log import Log as log
  57. if 'matplotlib' not in _excludes:
  58. from .elements.line_plot import LinePlot as line_plot
  59. from .elements.plot import Plot as plot
  60. if 'nipple' not in _excludes:
  61. from .elements.joystick import Joystick as joystick
  62. if 'three' not in _excludes:
  63. from .elements.scene import Scene as scene