calendar-daily.go 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. package vuetify
  2. import (
  3. "context"
  4. "fmt"
  5. h "github.com/theplant/htmlgo"
  6. )
  7. type VCalendarDailyBuilder struct {
  8. tag *h.HTMLTagBuilder
  9. }
  10. func VCalendarDaily(children ...h.HTMLComponent) (r *VCalendarDailyBuilder) {
  11. r = &VCalendarDailyBuilder{
  12. tag: h.Tag("v-calendar-daily").Children(children...),
  13. }
  14. return
  15. }
  16. func (b *VCalendarDailyBuilder) Color(v string) (r *VCalendarDailyBuilder) {
  17. b.tag.Attr("color", v)
  18. return b
  19. }
  20. func (b *VCalendarDailyBuilder) Dark(v bool) (r *VCalendarDailyBuilder) {
  21. b.tag.Attr(":dark", fmt.Sprint(v))
  22. return b
  23. }
  24. func (b *VCalendarDailyBuilder) DayFormat(v interface{}) (r *VCalendarDailyBuilder) {
  25. b.tag.Attr(":day-format", h.JSONString(v))
  26. return b
  27. }
  28. func (b *VCalendarDailyBuilder) End(v int) (r *VCalendarDailyBuilder) {
  29. b.tag.Attr(":end", fmt.Sprint(v))
  30. return b
  31. }
  32. func (b *VCalendarDailyBuilder) FirstInterval(v int) (r *VCalendarDailyBuilder) {
  33. b.tag.Attr(":first-interval", fmt.Sprint(v))
  34. return b
  35. }
  36. func (b *VCalendarDailyBuilder) FirstTime(v interface{}) (r *VCalendarDailyBuilder) {
  37. b.tag.Attr(":first-time", h.JSONString(v))
  38. return b
  39. }
  40. func (b *VCalendarDailyBuilder) HideHeader(v bool) (r *VCalendarDailyBuilder) {
  41. b.tag.Attr(":hide-header", fmt.Sprint(v))
  42. return b
  43. }
  44. func (b *VCalendarDailyBuilder) IntervalCount(v int) (r *VCalendarDailyBuilder) {
  45. b.tag.Attr(":interval-count", fmt.Sprint(v))
  46. return b
  47. }
  48. func (b *VCalendarDailyBuilder) IntervalFormat(v interface{}) (r *VCalendarDailyBuilder) {
  49. b.tag.Attr(":interval-format", h.JSONString(v))
  50. return b
  51. }
  52. func (b *VCalendarDailyBuilder) IntervalHeight(v int) (r *VCalendarDailyBuilder) {
  53. b.tag.Attr(":interval-height", fmt.Sprint(v))
  54. return b
  55. }
  56. func (b *VCalendarDailyBuilder) IntervalMinutes(v int) (r *VCalendarDailyBuilder) {
  57. b.tag.Attr(":interval-minutes", fmt.Sprint(v))
  58. return b
  59. }
  60. func (b *VCalendarDailyBuilder) IntervalStyle(v interface{}) (r *VCalendarDailyBuilder) {
  61. b.tag.Attr(":interval-style", h.JSONString(v))
  62. return b
  63. }
  64. func (b *VCalendarDailyBuilder) IntervalWidth(v int) (r *VCalendarDailyBuilder) {
  65. b.tag.Attr(":interval-width", fmt.Sprint(v))
  66. return b
  67. }
  68. func (b *VCalendarDailyBuilder) Light(v bool) (r *VCalendarDailyBuilder) {
  69. b.tag.Attr(":light", fmt.Sprint(v))
  70. return b
  71. }
  72. func (b *VCalendarDailyBuilder) Locale(v string) (r *VCalendarDailyBuilder) {
  73. b.tag.Attr("locale", v)
  74. return b
  75. }
  76. func (b *VCalendarDailyBuilder) MaxDays(v int) (r *VCalendarDailyBuilder) {
  77. b.tag.Attr(":max-days", fmt.Sprint(v))
  78. return b
  79. }
  80. func (b *VCalendarDailyBuilder) Now(v string) (r *VCalendarDailyBuilder) {
  81. b.tag.Attr("now", v)
  82. return b
  83. }
  84. func (b *VCalendarDailyBuilder) ShortIntervals(v bool) (r *VCalendarDailyBuilder) {
  85. b.tag.Attr(":short-intervals", fmt.Sprint(v))
  86. return b
  87. }
  88. func (b *VCalendarDailyBuilder) ShortWeekdays(v bool) (r *VCalendarDailyBuilder) {
  89. b.tag.Attr(":short-weekdays", fmt.Sprint(v))
  90. return b
  91. }
  92. func (b *VCalendarDailyBuilder) ShowIntervalLabel(v interface{}) (r *VCalendarDailyBuilder) {
  93. b.tag.Attr(":show-interval-label", h.JSONString(v))
  94. return b
  95. }
  96. func (b *VCalendarDailyBuilder) Start(v int) (r *VCalendarDailyBuilder) {
  97. b.tag.Attr(":start", fmt.Sprint(v))
  98. return b
  99. }
  100. func (b *VCalendarDailyBuilder) WeekdayFormat(v interface{}) (r *VCalendarDailyBuilder) {
  101. b.tag.Attr(":weekday-format", h.JSONString(v))
  102. return b
  103. }
  104. func (b *VCalendarDailyBuilder) Weekdays(v string) (r *VCalendarDailyBuilder) {
  105. b.tag.Attr("weekdays", v)
  106. return b
  107. }
  108. func (b *VCalendarDailyBuilder) SetAttr(k string, v interface{}) {
  109. b.tag.SetAttr(k, v)
  110. }
  111. func (b *VCalendarDailyBuilder) Attr(vs ...interface{}) (r *VCalendarDailyBuilder) {
  112. b.tag.Attr(vs...)
  113. return b
  114. }
  115. func (b *VCalendarDailyBuilder) Children(children ...h.HTMLComponent) (r *VCalendarDailyBuilder) {
  116. b.tag.Children(children...)
  117. return b
  118. }
  119. func (b *VCalendarDailyBuilder) AppendChildren(children ...h.HTMLComponent) (r *VCalendarDailyBuilder) {
  120. b.tag.AppendChildren(children...)
  121. return b
  122. }
  123. func (b *VCalendarDailyBuilder) PrependChildren(children ...h.HTMLComponent) (r *VCalendarDailyBuilder) {
  124. b.tag.PrependChildren(children...)
  125. return b
  126. }
  127. func (b *VCalendarDailyBuilder) Class(names ...string) (r *VCalendarDailyBuilder) {
  128. b.tag.Class(names...)
  129. return b
  130. }
  131. func (b *VCalendarDailyBuilder) ClassIf(name string, add bool) (r *VCalendarDailyBuilder) {
  132. b.tag.ClassIf(name, add)
  133. return b
  134. }
  135. func (b *VCalendarDailyBuilder) On(name string, value string) (r *VCalendarDailyBuilder) {
  136. b.tag.Attr(fmt.Sprintf("v-on:%s", name), value)
  137. return b
  138. }
  139. func (b *VCalendarDailyBuilder) Bind(name string, value string) (r *VCalendarDailyBuilder) {
  140. b.tag.Attr(fmt.Sprintf("v-bind:%s", name), value)
  141. return b
  142. }
  143. func (b *VCalendarDailyBuilder) MarshalHTML(ctx context.Context) (r []byte, err error) {
  144. return b.tag.MarshalHTML(ctx)
  145. }