@ledvance/ui-biz-bundle 1.1.122 → 1.1.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/package.json +1 -1
  2. package/src/hooks/DeviceDpStateHooks.ts +41 -60
  3. package/src/modules/flags/FlagEditPage.tsx +3 -3
  4. package/src/modules/flags/FlagPage.tsx +1 -1
  5. package/src/modules/history/HistoryPage.tsx +13 -3
  6. package/src/modules/mood/DynamicMoodEditorPage.tsx +5 -5
  7. package/src/modules/mood/FantasyMoodEditPage.tsx +3 -3
  8. package/src/modules/mood/MixMood/MixMoodEditPage.tsx +6 -6
  9. package/src/modules/mood/MixMood/MixMoodItem.tsx +2 -2
  10. package/src/modules/music/MusicDataBean.ts +4 -4
  11. package/src/modules/music/MusicPage.tsx +2 -2
  12. package/src/modules/timeSchedule/DeviceState.tsx +2 -2
  13. package/src/modules/timeSchedule/TimeScheduleEditpage.tsx +11 -11
  14. package/src/modules/timeSchedule/TimeSchedulePage.tsx +1 -1
  15. package/src/modules/timer/TimerPage.tsx +6 -4
  16. package/src/newModules/biorhythm/BiorhythmActions.ts +11 -11
  17. package/src/newModules/biorhythm/BiorhythmBean.ts +6 -6
  18. package/src/newModules/biorhythm/BiorhythmEditPage.tsx +3 -4
  19. package/src/newModules/biorhythm/BiorhythmPage.tsx +8 -9
  20. package/src/newModules/biorhythm/IconSelect.tsx +1 -1
  21. package/src/newModules/biorhythm/circular/ItemIcon.tsx +1 -1
  22. package/src/newModules/biorhythm/circular/Progress.tsx +2 -2
  23. package/src/newModules/biorhythm/circular/TimeCircular.tsx +4 -4
  24. package/src/newModules/biorhythm/iconListData.ts +26 -26
  25. package/src/newModules/childLock/ChildLockPage.tsx +1 -1
  26. package/src/newModules/diyScene/DiySceneEditorPage.tsx +4 -4
  27. package/src/newModules/diyScene/DiyScenePage.tsx +1 -1
  28. package/src/newModules/energyConsumption/EnergyConsumptionChart.tsx +2 -2
  29. package/src/newModules/energyConsumption/EnergyConsumptionDetail.tsx +3 -3
  30. package/src/newModules/energyConsumption/EnergyConsumptionPage.tsx +4 -4
  31. package/src/newModules/energyConsumption/component/DateSwitch.tsx +4 -4
  32. package/src/newModules/energyConsumption/component/EnergyModal.tsx +2 -2
  33. package/src/newModules/energyConsumption/component/Overview.tsx +4 -4
  34. package/src/newModules/fixedTime/FixedTimeDetailPage.tsx +3 -3
  35. package/src/newModules/fixedTime/FixedTimePage.tsx +2 -1
  36. package/src/newModules/mood/DynamicMoodEditorPage.tsx +3 -3
  37. package/src/newModules/mood/MixDynamicMoodEditor.tsx +6 -6
  38. package/src/newModules/mood/MoodItem.tsx +1 -1
  39. package/src/newModules/mood/MoodPage.tsx +1 -1
  40. package/src/newModules/randomTime/RandomTimeDetailPage.tsx +2 -2
  41. package/src/newModules/randomTime/RandomTimePage.tsx +2 -1
  42. package/src/newModules/sleepWakeUp/SleepWakeUpPage.tsx +15 -15
  43. package/src/newModules/timeSchedule/TimeScheduleDetailPage.tsx +2 -2
  44. package/src/modules/biorhythm/BiorhythmActions.d.ts +0 -8
  45. package/src/modules/biorhythm/BiorhythmActions.ts +0 -324
  46. package/src/modules/biorhythm/BiorhythmBean.d.ts +0 -58
  47. package/src/modules/biorhythm/BiorhythmBean.ts +0 -230
  48. package/src/modules/biorhythm/BiorhythmEditPage.d.ts +0 -14
  49. package/src/modules/biorhythm/BiorhythmEditPage.tsx +0 -324
  50. package/src/modules/biorhythm/BiorhythmPage.d.ts +0 -10
  51. package/src/modules/biorhythm/BiorhythmPage.tsx +0 -796
  52. package/src/modules/biorhythm/IconSelect.d.ts +0 -2
  53. package/src/modules/biorhythm/IconSelect.tsx +0 -82
  54. package/src/modules/biorhythm/Router.ts +0 -34
  55. package/src/modules/biorhythm/circular/ItemIcon.d.ts +0 -22
  56. package/src/modules/biorhythm/circular/ItemIcon.tsx +0 -173
  57. package/src/modules/biorhythm/circular/Progress.d.ts +0 -24
  58. package/src/modules/biorhythm/circular/Progress.tsx +0 -412
  59. package/src/modules/biorhythm/circular/TimeCircular.d.ts +0 -11
  60. package/src/modules/biorhythm/circular/TimeCircular.tsx +0 -70
  61. package/src/modules/biorhythm/circular/biorhythm_plantimer.png +0 -0
  62. package/src/modules/biorhythm/circular/rhythm_icon.png +0 -0
  63. package/src/modules/biorhythm/iconListData.d.ts +0 -7
  64. package/src/modules/biorhythm/iconListData.ts +0 -30
  65. package/src/modules/biorhythm/pIdList.d.ts +0 -2
  66. package/src/modules/biorhythm/pIdList.ts +0 -36
  67. package/src/modules/biorhythm/res/BiologicalRes.d.ts +0 -43
  68. package/src/modules/biorhythm/res/BiologicalRes.ts +0 -42
  69. package/src/modules/biorhythm/res/Biological_Rhythm.png +0 -0
  70. package/src/modules/biorhythm/res/Biological_Rhythm_12.png +0 -0
  71. package/src/modules/biorhythm/res/Biological_Rhythm_new.png +0 -0
  72. package/src/modules/biorhythm/res/Biological_Rhythm_new_12.png +0 -0
  73. package/src/modules/biorhythm/res/iconsMaterialOutlinedAccountGroups.png +0 -0
  74. package/src/modules/biorhythm/res/iconsMaterialOutlinedAccountGroups@2x.png +0 -0
  75. package/src/modules/biorhythm/res/iconsMaterialOutlinedAccountGroups@3x.png +0 -0
  76. package/src/modules/biorhythm/res/iconsMaterialOutlinedArrowsNavAdd.png +0 -0
  77. package/src/modules/biorhythm/res/iconsMaterialOutlinedArrowsNavAdd@2x.png +0 -0
  78. package/src/modules/biorhythm/res/iconsMaterialOutlinedArrowsNavAdd@3x.png +0 -0
  79. package/src/modules/biorhythm/res/iconsMaterialOutlinedArrowsNavArrowForwardIos.png +0 -0
  80. package/src/modules/biorhythm/res/iconsMaterialOutlinedArrowsNavArrowForwardIos@2x.png +0 -0
  81. package/src/modules/biorhythm/res/iconsMaterialOutlinedArrowsNavArrowForwardIos@3x.png +0 -0
  82. package/src/modules/biorhythm/res/iconsMaterialOutlinedBuildingsHome.png +0 -0
  83. package/src/modules/biorhythm/res/iconsMaterialOutlinedBuildingsHome@2x.png +0 -0
  84. package/src/modules/biorhythm/res/iconsMaterialOutlinedBuildingsHome@3x.png +0 -0
  85. package/src/modules/biorhythm/res/iconsMaterialOutlinedEditorFavoriteBorder.png +0 -0
  86. package/src/modules/biorhythm/res/iconsMaterialOutlinedEditorFavoriteBorder@2x.png +0 -0
  87. package/src/modules/biorhythm/res/iconsMaterialOutlinedEditorFavoriteBorder@3x.png +0 -0
  88. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherBed.png +0 -0
  89. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherBed@2x.png +0 -0
  90. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherBed@3x.png +0 -0
  91. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherBusinessCenter.png +0 -0
  92. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherBusinessCenter@2x.png +0 -0
  93. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherBusinessCenter@3x.png +0 -0
  94. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherChair.png +0 -0
  95. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherChair@2x.png +0 -0
  96. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherChair@3x.png +0 -0
  97. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherCoffee.png +0 -0
  98. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherCoffee@2x.png +0 -0
  99. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherCoffee@3x.png +0 -0
  100. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherDirectionsCar.png +0 -0
  101. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherDirectionsCar@2x.png +0 -0
  102. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherDirectionsCar@3x.png +0 -0
  103. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherFitnessCenter.png +0 -0
  104. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherFitnessCenter@2x.png +0 -0
  105. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherFitnessCenter@3x.png +0 -0
  106. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherHeadphones.png +0 -0
  107. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherHeadphones@2x.png +0 -0
  108. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherHeadphones@3x.png +0 -0
  109. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherMenuBook.png +0 -0
  110. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherMenuBook@2x.png +0 -0
  111. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherMenuBook@3x.png +0 -0
  112. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherMusicNote.png +0 -0
  113. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherMusicNote@2x.png +0 -0
  114. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherMusicNote@3x.png +0 -0
  115. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherNotificationsNone.png +0 -0
  116. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherNotificationsNone@2x.png +0 -0
  117. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherNotificationsNone@3x.png +0 -0
  118. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherPottedPlant.png +0 -0
  119. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherPottedPlant@2x.png +0 -0
  120. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherPottedPlant@3x.png +0 -0
  121. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherRestaurant.png +0 -0
  122. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherRestaurant@2x.png +0 -0
  123. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherRestaurant@3x.png +0 -0
  124. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherSentimentSatisfied.png +0 -0
  125. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherSentimentSatisfied@2x.png +0 -0
  126. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherSentimentSatisfied@3x.png +0 -0
  127. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherSportsEsports.png +0 -0
  128. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherSportsEsports@2x.png +0 -0
  129. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherSportsEsports@3x.png +0 -0
  130. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherTv.png +0 -0
  131. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherTv@2x.png +0 -0
  132. package/src/modules/biorhythm/res/iconsMaterialOutlinedOtherTv@3x.png +0 -0
  133. package/src/modules/biorhythm/res/iconsMaterialOutlinedTimeAccessAlarm.png +0 -0
  134. package/src/modules/biorhythm/res/iconsMaterialOutlinedTimeAccessAlarm@2x.png +0 -0
  135. package/src/modules/biorhythm/res/iconsMaterialOutlinedTimeAccessAlarm@3x.png +0 -0
  136. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherBedtime.png +0 -0
  137. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherBedtime@2x.png +0 -0
  138. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherBedtime@3x.png +0 -0
  139. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherPartlyCloudyDay.png +0 -0
  140. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherPartlyCloudyDay@2x.png +0 -0
  141. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherPartlyCloudyDay@3x.png +0 -0
  142. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherStarOutline.png +0 -0
  143. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherStarOutline@2x.png +0 -0
  144. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherStarOutline@3x.png +0 -0
  145. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherWbSunny.png +0 -0
  146. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherWbSunny@2x.png +0 -0
  147. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherWbSunny@3x.png +0 -0
  148. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherWbTwilight.png +0 -0
  149. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherWbTwilight@2x.png +0 -0
  150. package/src/modules/biorhythm/res/iconsMaterialOutlinedWheatherWbTwilight@3x.png +0 -0
  151. package/src/modules/fixedTime/FixedTimeActions.ts +0 -173
  152. package/src/modules/fixedTime/FixedTimeDetailPage.tsx +0 -373
  153. package/src/modules/fixedTime/FixedTimePage.tsx +0 -214
  154. package/src/modules/fixedTime/Router.ts +0 -26
  155. package/src/modules/music/res/app_music_ball@2x.png +0 -0
  156. package/src/modules/music/res/app_music_ball@3x.png +0 -0
  157. package/src/modules/music/res/app_music_game@2x.png +0 -0
  158. package/src/modules/music/res/app_music_game@3x.png +0 -0
  159. package/src/modules/music/res/app_music_music@2x.png +0 -0
  160. package/src/modules/music/res/app_music_music@3x.png +0 -0
  161. package/src/modules/music/res/app_music_romantic@2x.png +0 -0
  162. package/src/modules/music/res/app_music_romantic@3x.png +0 -0
  163. package/src/modules/music/res/iconsMaterialOutlinedArrowsNavCheck.png +0 -0
  164. package/src/modules/music/res/iconsMaterialOutlinedArrowsNavCheck@2x.png +0 -0
  165. package/src/modules/music/res/iconsMaterialOutlinedArrowsNavCheck@3x.png +0 -0
  166. package/src/modules/music/res/illustrationsFeaturesMusic-dark.png +0 -0
  167. package/src/modules/music/res/illustrationsFeaturesMusic-dark@2x.png +0 -0
  168. package/src/modules/music/res/illustrationsFeaturesMusic-dark@3x.png +0 -0
  169. package/src/modules/music/res/illustrationsFeaturesMusic.png +0 -0
  170. package/src/modules/music/res/illustrationsFeaturesMusic@2x.png +0 -0
  171. package/src/modules/music/res/illustrationsFeaturesMusic@3x.png +0 -0
  172. package/src/modules/music/res/illustrationsFeaturesMusicDisabled.png +0 -0
  173. package/src/modules/music/res/illustrationsFeaturesMusicDisabled@2x.png +0 -0
  174. package/src/modules/music/res/illustrationsFeaturesMusicDisabled@3x.png +0 -0
  175. package/src/modules/music/res/index.d.ts +0 -10
  176. package/src/modules/music/res/index.ts +0 -10
  177. package/src/modules/powerOnBehavior/PowerOnBehaviorActions.ts +0 -12
  178. package/src/modules/powerOnBehavior/PowerOnBehaviorPage.tsx +0 -173
  179. package/src/modules/powerOnBehavior/Router.ts +0 -16
  180. package/src/modules/randomTime/RandomTimeActions.ts +0 -160
  181. package/src/modules/randomTime/RandomTimeDetailPage.tsx +0 -338
  182. package/src/modules/randomTime/RandomTimePage.tsx +0 -215
  183. package/src/modules/randomTime/Router.ts +0 -25
  184. package/src/modules/randomTime/Summary.tsx +0 -123
  185. package/src/modules/sleepWakeup/DeviceState.d.ts +0 -9
  186. package/src/modules/sleepWakeup/DeviceState.tsx +0 -100
  187. package/src/modules/sleepWakeup/LdvScheduleItem.d.ts +0 -15
  188. package/src/modules/sleepWakeup/LdvScheduleItem.tsx +0 -176
  189. package/src/modules/sleepWakeup/Router.ts +0 -25
  190. package/src/modules/sleepWakeup/SleepWakeUpActions.d.ts +0 -2
  191. package/src/modules/sleepWakeup/SleepWakeUpActions.ts +0 -180
  192. package/src/modules/sleepWakeup/SleepWakeUpDetailPage.d.ts +0 -2
  193. package/src/modules/sleepWakeup/SleepWakeUpDetailPage.tsx +0 -617
  194. package/src/modules/sleepWakeup/SleepWakeUpPage.d.ts +0 -13
  195. package/src/modules/sleepWakeup/SleepWakeUpPage.tsx +0 -425
  196. package/src/modules/sleepWakeup/utils.d.ts +0 -44
  197. package/src/modules/sleepWakeup/utils.ts +0 -254
  198. package/src/newModules/biorhythm/circular/biorhythm_plantimer.png +0 -0
  199. package/src/newModules/biorhythm/circular/rhythm_icon.png +0 -0
  200. package/src/newModules/biorhythm/res/BiologicalRes.d.ts +0 -43
  201. package/src/newModules/biorhythm/res/BiologicalRes.ts +0 -42
  202. package/src/newModules/biorhythm/res/Biological_Rhythm.png +0 -0
  203. package/src/newModules/biorhythm/res/Biological_Rhythm_12.png +0 -0
  204. package/src/newModules/biorhythm/res/Biological_Rhythm_new.png +0 -0
  205. package/src/newModules/biorhythm/res/Biological_Rhythm_new_12.png +0 -0
  206. package/src/newModules/biorhythm/res/iconsMaterialOutlinedAccountGroups.png +0 -0
  207. package/src/newModules/biorhythm/res/iconsMaterialOutlinedAccountGroups@2x.png +0 -0
  208. package/src/newModules/biorhythm/res/iconsMaterialOutlinedAccountGroups@3x.png +0 -0
  209. package/src/newModules/biorhythm/res/iconsMaterialOutlinedArrowsNavAdd.png +0 -0
  210. package/src/newModules/biorhythm/res/iconsMaterialOutlinedArrowsNavAdd@2x.png +0 -0
  211. package/src/newModules/biorhythm/res/iconsMaterialOutlinedArrowsNavAdd@3x.png +0 -0
  212. package/src/newModules/biorhythm/res/iconsMaterialOutlinedArrowsNavArrowForwardIos.png +0 -0
  213. package/src/newModules/biorhythm/res/iconsMaterialOutlinedArrowsNavArrowForwardIos@2x.png +0 -0
  214. package/src/newModules/biorhythm/res/iconsMaterialOutlinedArrowsNavArrowForwardIos@3x.png +0 -0
  215. package/src/newModules/biorhythm/res/iconsMaterialOutlinedBuildingsHome.png +0 -0
  216. package/src/newModules/biorhythm/res/iconsMaterialOutlinedBuildingsHome@2x.png +0 -0
  217. package/src/newModules/biorhythm/res/iconsMaterialOutlinedBuildingsHome@3x.png +0 -0
  218. package/src/newModules/biorhythm/res/iconsMaterialOutlinedEditorFavoriteBorder.png +0 -0
  219. package/src/newModules/biorhythm/res/iconsMaterialOutlinedEditorFavoriteBorder@2x.png +0 -0
  220. package/src/newModules/biorhythm/res/iconsMaterialOutlinedEditorFavoriteBorder@3x.png +0 -0
  221. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherBed.png +0 -0
  222. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherBed@2x.png +0 -0
  223. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherBed@3x.png +0 -0
  224. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherBusinessCenter.png +0 -0
  225. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherBusinessCenter@2x.png +0 -0
  226. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherBusinessCenter@3x.png +0 -0
  227. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherChair.png +0 -0
  228. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherChair@2x.png +0 -0
  229. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherChair@3x.png +0 -0
  230. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherCoffee.png +0 -0
  231. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherCoffee@2x.png +0 -0
  232. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherCoffee@3x.png +0 -0
  233. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherDirectionsCar.png +0 -0
  234. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherDirectionsCar@2x.png +0 -0
  235. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherDirectionsCar@3x.png +0 -0
  236. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherFitnessCenter.png +0 -0
  237. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherFitnessCenter@2x.png +0 -0
  238. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherFitnessCenter@3x.png +0 -0
  239. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherHeadphones.png +0 -0
  240. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherHeadphones@2x.png +0 -0
  241. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherHeadphones@3x.png +0 -0
  242. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherMenuBook.png +0 -0
  243. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherMenuBook@2x.png +0 -0
  244. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherMenuBook@3x.png +0 -0
  245. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherMusicNote.png +0 -0
  246. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherMusicNote@2x.png +0 -0
  247. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherMusicNote@3x.png +0 -0
  248. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherNotificationsNone.png +0 -0
  249. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherNotificationsNone@2x.png +0 -0
  250. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherNotificationsNone@3x.png +0 -0
  251. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherPottedPlant.png +0 -0
  252. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherPottedPlant@2x.png +0 -0
  253. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherPottedPlant@3x.png +0 -0
  254. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherRestaurant.png +0 -0
  255. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherRestaurant@2x.png +0 -0
  256. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherRestaurant@3x.png +0 -0
  257. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherSentimentSatisfied.png +0 -0
  258. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherSentimentSatisfied@2x.png +0 -0
  259. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherSentimentSatisfied@3x.png +0 -0
  260. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherSportsEsports.png +0 -0
  261. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherSportsEsports@2x.png +0 -0
  262. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherSportsEsports@3x.png +0 -0
  263. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherTv.png +0 -0
  264. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherTv@2x.png +0 -0
  265. package/src/newModules/biorhythm/res/iconsMaterialOutlinedOtherTv@3x.png +0 -0
  266. package/src/newModules/biorhythm/res/iconsMaterialOutlinedTimeAccessAlarm.png +0 -0
  267. package/src/newModules/biorhythm/res/iconsMaterialOutlinedTimeAccessAlarm@2x.png +0 -0
  268. package/src/newModules/biorhythm/res/iconsMaterialOutlinedTimeAccessAlarm@3x.png +0 -0
  269. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherBedtime.png +0 -0
  270. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherBedtime@2x.png +0 -0
  271. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherBedtime@3x.png +0 -0
  272. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherPartlyCloudyDay.png +0 -0
  273. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherPartlyCloudyDay@2x.png +0 -0
  274. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherPartlyCloudyDay@3x.png +0 -0
  275. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherStarOutline.png +0 -0
  276. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherStarOutline@2x.png +0 -0
  277. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherStarOutline@3x.png +0 -0
  278. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherWbSunny.png +0 -0
  279. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherWbSunny@2x.png +0 -0
  280. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherWbSunny@3x.png +0 -0
  281. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherWbTwilight.png +0 -0
  282. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherWbTwilight@2x.png +0 -0
  283. package/src/newModules/biorhythm/res/iconsMaterialOutlinedWheatherWbTwilight@3x.png +0 -0
@@ -1,338 +0,0 @@
1
- import React, { useCallback, useEffect, useMemo } from "react";
2
- import { ScrollView, StyleSheet, View, Text, Image, TouchableOpacity } from "react-native";
3
- import { useReactive } from "ahooks";
4
- import Page from "@ledvance/base/src/components/Page";
5
- import { useNavigation, useRoute } from '@react-navigation/core'
6
- import I18n from "@ledvance/base/src/i18n";
7
- import res from "@ledvance/base/src/res";
8
- import LdvTopName from "@ledvance/base/src/components/ldvTopName";
9
- import TextField from "@ledvance/base/src/components/TextField";
10
- import LdvWeekView from '@ledvance/base/src/components/weekSelect'
11
- import { TimerPicker, Utils } from "tuya-panel-kit";
12
- import DeleteButton from "@ledvance/base/src/components/DeleteButton";
13
- import Spacer from "@ledvance/base/src/components/Spacer";
14
- import { loopText, showDialog } from "@ledvance/base/src/utils/common";
15
- import LampAdjustView from '@ledvance/base/src/components/LampAdjustView'
16
- import Card from "@ledvance/base/src/components/Card";
17
- import LdvSwitch from "@ledvance/base/src/components/ldvSwitch";
18
- import { RandomTimerItem } from "./RandomTimeActions";
19
- import { cloneDeep, isEqual } from "lodash";
20
- import Summary from "./Summary";
21
- import { getSystemTimeFormat } from "@ledvance/base/src/api/native";
22
- import { RandomTimePageParams } from "./RandomTimePage";
23
-
24
- const { parseTimer } = Utils.TimeUtils
25
- const { convertX: cx } = Utils.RatioUtils;
26
-
27
- export interface RandomTimeDetailPageParams extends RandomTimePageParams{
28
- mode: 'add' | 'edit'
29
- scheduleItem: RandomTimerItem
30
- onPost: (mode: 'add' | 'edit' | 'del', randomTime: RandomTimerItem, goBack?: boolean) => Promise<void>
31
- }
32
-
33
- const RandomTimeDetailPage = () => {
34
- const navigation = useNavigation()
35
- const params = useRoute().params as RandomTimeDetailPageParams
36
- const state = useReactive({
37
- loading: false,
38
- isColorMode: false,
39
- is24Hour: true,
40
- selectedSkill: params.applyDps.length === 1 ? params.applyDps : [],
41
- skillList: params.applyDps.length === 1 ? [] : params.applyDps,
42
- randomTime: params.mode === 'add' ? newRandomTime() : cloneDeep(params.scheduleItem)
43
- })
44
-
45
-
46
- useEffect(() => {
47
- const { brightness, temperature, hue, saturation, value } = state.randomTime.color
48
- const isColor = brightness === 0 && temperature === 0 && (hue !== 0 || saturation !== 0 || value !== 0)
49
- state.isColorMode = isColor
50
- }, [])
51
-
52
- useEffect(() =>{
53
- const getSystemTime = async () =>{
54
- state.is24Hour = await getSystemTimeFormat() === 24
55
- }
56
- getSystemTime().then()
57
- }, [])
58
-
59
-
60
- const showClearIcon = useMemo(() => (
61
- false
62
- ), [state.skillList])
63
-
64
-
65
- const showIcon = useCallback(() => {
66
- return state.randomTime.name?.length > 0 && state.randomTime.name?.length <= 32
67
- }, [state.randomTime.name])
68
-
69
- const deleteDialog = () => {
70
- return showDialog({
71
- method: 'confirm',
72
- title: I18n.getLang('cancel_dialog_delete_item_fixedtimecycle_titel'),
73
- subTitle: I18n.getLang('cancel_dialog_delete_item_fixedtimecycle_description'),
74
- onConfirm: async (_, { close }) => {
75
- close()
76
- await params.onPost('del', state.randomTime, true)
77
- }
78
- })
79
- }
80
-
81
- const showBackDialog = useCallback(() => {
82
- if (params.mode === 'add') return false
83
- return !(state.randomTime.name === params.scheduleItem.name &&
84
- state.randomTime.startTime === params.scheduleItem.startTime &&
85
- state.randomTime.endTime === params.scheduleItem.endTime &&
86
- isEqual(state.randomTime.color, params.scheduleItem.color)) &&
87
- isEqual(state.randomTime.weeks, params.scheduleItem.weeks)
88
- }, [state.randomTime, params.scheduleItem])
89
-
90
- return (
91
- <Page
92
- backText={I18n.getLang('randomtimecycle_sockets_headline_text')}
93
- onBackClick={!showBackDialog() ? navigation.goBack : undefined}
94
- rightButtonIcon={showIcon() ? res.ic_check : res.ic_uncheck}
95
- rightButtonDisabled={state.loading}
96
- loading={state.loading}
97
- showBackDialog={showBackDialog()}
98
- backDialogTitle={I18n.getLang('cancel_dialog_leave_unsaved_titel')}
99
- backDialogContent={I18n.getLang('cancel_dialog_delete_item_randomtimecycle_description')}
100
- rightButtonIconClick={async () => {
101
- if (!showIcon()) return
102
- state.loading = true
103
- await params.onPost(params.mode, {
104
- ...state.randomTime,
105
- power: true,
106
- color: {
107
- hue: state.isColorMode ? state.randomTime.color.hue : 0,
108
- saturation: state.isColorMode ? state.randomTime.color.saturation : 0,
109
- value: state.isColorMode ? state.randomTime.color.value : 0,
110
- temperature: state.isColorMode ? 0 : state.randomTime.color.temperature,
111
- brightness: state.isColorMode ? 0 : state.randomTime.color.brightness
112
- }
113
- }, true)
114
- }}
115
- >
116
- <ScrollView nestedScrollEnabled={true}>
117
- <LdvTopName title={I18n.getLang(params.mode === 'add' ? 'add_fixedtimecycle_headline_text' : 'edit_fixedtimecycle_headline_text')} />
118
- <TextField
119
- style={styles.cardContainer}
120
- value={state.randomTime.name}
121
- showError={state.randomTime.name?.length > 32}
122
- maxLength={33}
123
- errorText={I18n.getLang('add_new_dynamic_mood_alert_text')}
124
- placeholder={I18n.getLang('add_new_trigger_time_inputfield_value_text')}
125
- onChangeText={(t: string) => {
126
- state.randomTime.name = t;
127
- }}
128
- />
129
- {/* pick */}
130
- <TimerPicker
131
- itemTextColor='#aeadb5'
132
- style={{ paddingVertical: cx(0), marginVertical: cx(0) }}
133
- is12Hours={!state.is24Hour}
134
- startTime={state.randomTime.startTime}
135
- endTime={state.randomTime.endTime}
136
- onTimerChange={(startTime, endTime) => {
137
- state.randomTime.startTime = startTime
138
- state.randomTime.endTime = endTime
139
- }} />
140
- <LdvWeekView
141
- value={state.randomTime.weeks}
142
- style={styles.cardContainer}
143
- onSelect={(index: number) => {
144
- const rawIndex = index - 1
145
- state.randomTime.weeks[rawIndex] = state.randomTime.weeks[rawIndex] === 1 ? 0 : 1
146
- }} />
147
- <Spacer />
148
- <Text style={styles.cardContainer}>{loopText(state.randomTime.weeks)}</Text>
149
- <Spacer />
150
- {/* Apply for */}
151
- <View style={styles.cardContainer}>
152
- <Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline_text')}</Text>
153
- <Spacer height={cx(10)} />
154
- <View style={styles.applyContent}>
155
- {state.selectedSkill.length === 0 ?
156
- <Text>{I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}</Text> :
157
- state.selectedSkill.map((skill: any) => (
158
- <View style={[styles.applyItem, { marginBottom: cx(10), borderRadius: 4 }]} key={skill.label}>
159
- <Text style={{ color: '#000' }}>{skill.label}</Text>
160
- {showClearIcon && <TouchableOpacity
161
- onPress={() => { }}
162
- style={{ paddingHorizontal: cx(5) }}>
163
- <Image style={{ width: cx(16), height: cx(16) }} source={res.ic_arrows_nav_clear} />
164
- </TouchableOpacity>}
165
- </View>
166
- ))
167
- }
168
- </View>
169
- {state.skillList.map((item: any) => {
170
- return (
171
- <TouchableOpacity style={styles.applyItem} key={item.label} onPress={() => { }}>
172
- <Text style={{ color: '#000' }}>{item.label}</Text>
173
- <Image style={{ width: cx(16), height: cx(16) }} source={res.device_panel_timer_add} />
174
- </TouchableOpacity>
175
- )
176
- })}
177
- </View>
178
- <Spacer />
179
- {/* Devices */}
180
- <View style={styles.cardContainer}>
181
- <Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline2_text')}</Text>
182
- <Spacer height={cx(10)} />
183
- <Card>
184
- <LdvSwitch
185
- title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
186
- color={'#fff'}
187
- colorAlpha={1}
188
- enable={true}
189
- setEnable={() => { }}
190
- showSwitch={false}
191
- />
192
- <LampAdjustView
193
- isSupportColor={params.isSupportColor}
194
- isSupportBrightness={params.isSupportBrightness}
195
- isSupportTemperature={params.isSupportTemperature}
196
- isColorMode={state.isColorMode}
197
- reserveSV={true}
198
- setIsColorMode={(v) => state.isColorMode = v}
199
- h={state.randomTime.color.hue}
200
- s={state.randomTime.color.saturation}
201
- v={state.randomTime.color.value}
202
- colorTemp={state.randomTime.color.temperature}
203
- brightness={state.randomTime.color.brightness}
204
- onHSVChangeComplete={(h, s, v) => {
205
- state.randomTime.color = {
206
- ...state.randomTime.color,
207
- hue: h,
208
- saturation: s,
209
- value: v
210
- }
211
- }}
212
- onCCTChangeComplete={(v) => {
213
- state.randomTime.color = {
214
- ...state.randomTime.color,
215
- temperature: v
216
- }
217
- }}
218
- onBrightnessChangeComplete={(v) => {
219
- state.randomTime.color = {
220
- ...state.randomTime.color,
221
- brightness: v
222
- }
223
- }}
224
- />
225
- </Card>
226
- <Spacer />
227
- </View>
228
- {/* summary */}
229
- <Summary
230
- frequency={loopText(state.randomTime.weeks)}
231
- time={`${parseTimer(state.randomTime.startTime * 60)} - ${parseTimer(state.randomTime.endTime * 60)}`}
232
- hideActions={true}
233
- />
234
- <Spacer />
235
- {params.mode === 'edit' &&
236
- <View style={{ marginHorizontal: cx(24) }}>
237
- <DeleteButton
238
- text={I18n.getLang('edit_fixedtimecycle_bttn_text')}
239
- onPress={deleteDialog} />
240
- </View>
241
- }
242
- <Spacer />
243
- </ScrollView>
244
- </Page>
245
- )
246
- }
247
-
248
- const newRandomTime = () => {
249
- return {
250
- name: '',
251
- power: true,
252
- weeks: [0, 0, 0, 0, 0, 0, 0],
253
- startTime: 480,
254
- endTime: 840,
255
- index: '',
256
- channel: 1,
257
- color: {
258
- hue: 0,
259
- saturation: 0,
260
- value: 100,
261
- brightness: 100,
262
- temperature: 0,
263
- }
264
- }
265
- }
266
-
267
- const styles = StyleSheet.create({
268
- cardContainer: {
269
- marginHorizontal: cx(24)
270
- },
271
- itemTitle: {
272
- color: '#000',
273
- fontSize: cx(16),
274
- fontWeight: 'bold',
275
- fontFamily: 'helvetica_neue_lt_std_bd',
276
- },
277
- applyContent: {
278
- backgroundColor: '#f6f6f6',
279
- borderRadius: 4,
280
- minHeight: cx(55),
281
- flex: 1,
282
- justifyContent: 'center',
283
- paddingHorizontal: cx(10),
284
- paddingTop: cx(10)
285
- },
286
- applyItem: {
287
- paddingLeft: cx(5),
288
- flexDirection: 'row',
289
- justifyContent: 'space-between',
290
- alignItems: 'center',
291
- backgroundColor: '#fff',
292
- height: cx(35),
293
- },
294
- summaryContainer: {
295
- flexDirection: 'row',
296
- justifyContent: 'flex-start',
297
- marginBottom: cx(10)
298
- },
299
- summaryLeft: {
300
- flexDirection: 'row',
301
- justifyContent: 'flex-start',
302
- alignItems: 'center',
303
- },
304
- summaryImg: {
305
- width: cx(12),
306
- height: cx(12),
307
- marginRight: cx(6)
308
- },
309
- leftTitle: {
310
- fontSize: cx(14),
311
- color: '#000'
312
- },
313
- summaryRight: {
314
- flexDirection: 'column',
315
- marginLeft: cx(21),
316
- borderRadius: cx(16),
317
- backgroundColor: '#cbcbcb',
318
- },
319
- rightItem: {
320
- paddingHorizontal: cx(12),
321
- color: '#000',
322
- },
323
- rightTitle: {
324
- paddingLeft: cx(12),
325
- paddingRight: cx(12),
326
- fontSize: cx(10),
327
- textAlign: 'center',
328
- alignSelf: 'flex-start'
329
- },
330
- filletCorner: {
331
- flexDirection: 'row',
332
- backgroundColor: '#cbcbcb',
333
- borderRadius: cx(16),
334
- alignSelf: 'flex-start'
335
- }
336
- })
337
-
338
- export default RandomTimeDetailPage
@@ -1,215 +0,0 @@
1
- import React, { useCallback } from 'react'
2
- import { FlatList, Image, ScrollView, StyleSheet, Text, View } from 'react-native'
3
- import Page from '@ledvance/base/src/components/Page'
4
- import { useDeviceInfo } from '@ledvance/base/src/models/modules/NativePropsSlice'
5
- import { useNavigation, useRoute } from '@react-navigation/core'
6
- import I18n from '@ledvance/base/src/i18n'
7
- import res from '@ledvance/base/src/res'
8
- import { ui_biz_routerKey } from '../../navigation/Routers'
9
- import { useReactive, useUpdateEffect } from 'ahooks'
10
- import Spacer from '@ledvance/base/src/components/Spacer'
11
- import TextButton from '@ledvance/base/src/components/TextButton'
12
- import { SwitchButton, Utils } from 'tuya-panel-kit'
13
- import { RandomTimerItem, useRandomTime } from './RandomTimeActions'
14
- import Card from '@ledvance/base/src/components/Card'
15
- import { loopText } from '@ledvance/base/src/utils/common'
16
- import { cloneDeep, isEqual } from 'lodash'
17
-
18
- const { convertX: cx } = Utils.RatioUtils
19
- const { parseTimer } = Utils.TimeUtils
20
- const MAX_NUM = 10
21
-
22
- export interface RandomTimePageParams {
23
- randomTimeDp: string
24
- conflictDps: {
25
- fixedTimeDp?: string
26
- biorhythmDp?: string
27
- sleepWakeUpDp?: string
28
- }
29
- isSocket?: boolean
30
- showTags?: boolean
31
- applyDps: {
32
- label: string
33
- dp: string
34
- value: string
35
- }[]
36
- isSupportColor: boolean
37
- isSupportTemperature: boolean
38
- isSupportBrightness: boolean
39
- }
40
-
41
- const RandomTimePage = () => {
42
- const navigation = useNavigation()
43
- const devInfo = useDeviceInfo()
44
- const params = useRoute().params as RandomTimePageParams
45
- const [randomTime, setRandomTime] = useRandomTime(params.randomTimeDp)
46
- const state = useReactive({
47
- loading: false,
48
- randomTimeList: randomTime,
49
- })
50
-
51
- useUpdateEffect(() => {
52
- state.randomTimeList = randomTime
53
- }, [randomTime])
54
-
55
- const navigateToEdit = useCallback((mode: 'add' | 'edit', scheduleItem?: RandomTimerItem) => {
56
- navigation.navigate(ui_biz_routerKey.ui_biz_random_time_edit, {
57
- ...params,
58
- mode,
59
- scheduleItem: cloneDeep(scheduleItem),
60
- onPost,
61
- })
62
- }, [])
63
-
64
- const showMaxNumTip = useCallback(() => {
65
- return state.randomTimeList.length >= MAX_NUM
66
- }, [state.randomTimeList.length])
67
-
68
- const onPost = useCallback(async (mode: 'add' | 'edit' | 'del', randomTime: RandomTimerItem, goBack?: boolean) => {
69
- state.loading = true
70
- const cloneFixedTimeList = cloneDeep(state.randomTimeList)
71
- const idx = state.randomTimeList.findIndex(f => f.index === randomTime.index)
72
- let manualEdit = false
73
- if (mode === 'edit') {
74
- const editItem = cloneFixedTimeList[idx]
75
- manualEdit = isEqual(editItem, { ...randomTime, name: editItem.name })
76
- cloneFixedTimeList.splice(idx, 1, randomTime)
77
- }
78
- if (mode === 'del') cloneFixedTimeList.splice(idx, 1)
79
- const newFixedTimeList = mode === 'add' ? [...state.randomTimeList, randomTime] : cloneFixedTimeList
80
- const res = await setRandomTime(newFixedTimeList, manualEdit)
81
- state.loading = false
82
- if (res.success && goBack) {
83
- navigation.goBack()
84
- }
85
- }, [state.randomTimeList])
86
-
87
- console.log('running page')
88
- return (
89
- <Page
90
- backText={devInfo.name}
91
- headlineText={I18n.getLang('randomtimecycle_sockets_headline_text')}
92
- headlineIcon={!showMaxNumTip() ? res.device_panel_schedule_add : undefined}
93
- onBackClick={navigation.goBack}
94
- loading={state.loading}
95
- onHeadlineIconClick={() => {
96
- navigateToEdit('add')
97
- }}
98
- >
99
- {state.randomTimeList.length > 0 ?
100
- <ScrollView nestedScrollEnabled={true}>
101
- <Text style={{
102
- color: '#000',
103
- marginLeft: cx(24),
104
- }}>{I18n.getLang('timeschedule_overview_description_text')}</Text>
105
- <Spacer height={cx(10)}/>
106
- {showMaxNumTip() && <View style={{ marginHorizontal: cx(24), flexDirection: 'row' }}>
107
- <Image style={{ width: cx(16), height: cx(16), tintColor: '#ff9500' }} source={res.ic_warning_amber}/>
108
- <Text>{I18n.getLang('randomtimecycle_warning_max_number_text')}</Text>
109
- </View>}
110
- <FlatList
111
- data={state.randomTimeList}
112
- renderItem={({ item }) => (
113
- <FixedTimeCard
114
- randomTime={item}
115
- onSwitch={(v) => {
116
- onPost('edit', {
117
- ...item,
118
- power: v,
119
- })
120
- }}
121
- onPress={() => {
122
- navigateToEdit('edit', item)
123
- }}
124
- />
125
- )}
126
- keyExtractor={(item: any) => `${item?.index}`}
127
- ItemSeparatorComponent={() => <Spacer/>}
128
- ListHeaderComponent={<Spacer height={cx(10)}/>}
129
- ListFooterComponent={<Spacer/>}
130
- />
131
- </ScrollView> :
132
- <View style={{ flex: 1, marginTop: cx(60), alignItems: 'center' }}>
133
- <Image
134
- style={{ width: cx(225), height: cx(198) }}
135
- source={{ uri: res.ldv_timer_empty }}
136
- resizeMode="contain"/>
137
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
138
- <Image
139
- source={{ uri: res.device_panel_schedule_alert }}
140
- style={{ width: cx(16), height: cx(16) }}
141
- />
142
- <Text style={{ color: '#000', fontSize: cx(12) }}>
143
- {I18n.getLang('randomtimecycle_empty_information_text')}
144
- </Text>
145
- </View>
146
- <Spacer/>
147
- <TextButton
148
- text={I18n.getLang('randomtimecycle_empty_bttn_text')}
149
- style={{
150
- backgroundColor: '#f60',
151
- borderRadius: cx(6),
152
- paddingVertical: cx(12),
153
- paddingHorizontal: cx(24),
154
- }}
155
- textStyle={{ color: '#fff' }}
156
- onPress={() => {
157
- navigateToEdit('add')
158
- }}/>
159
- </View>
160
- }
161
- </Page>
162
- )
163
- }
164
-
165
- const FixedTimeCard = (props: {
166
- randomTime: RandomTimerItem,
167
- onSwitch: (enable: boolean) => void,
168
- onPress: () => void
169
- }) => {
170
- const { randomTime, onSwitch, onPress } = props
171
- return (
172
- <Card style={styles.randomTimingCard} onPress={onPress}>
173
- <Spacer height={cx(16)}/>
174
- <View style={styles.switchLine}>
175
- <Text style={styles.time}>
176
- {`${parseTimer(randomTime.startTime * 60)} - ${parseTimer(randomTime.endTime * 60)}`}</Text>
177
- <SwitchButton
178
- style={styles.switchBtn}
179
- value={randomTime.power}
180
- thumbStyle={{ elevation: 0 }}
181
- onValueChange={onSwitch}/>
182
- </View>
183
- <Text style={styles.loopText}>{loopText(randomTime.weeks, parseTimer(randomTime.startTime * 60))}</Text>
184
- <Spacer height={cx(5)}/>
185
- <Text style={styles.loopText}>{randomTime.name}</Text>
186
- <Spacer/>
187
- </Card>
188
- )
189
- }
190
-
191
- const styles = StyleSheet.create({
192
- randomTimingCard: {
193
- marginHorizontal: cx(24),
194
- paddingHorizontal: cx(16),
195
- },
196
- switchLine: {
197
- flexDirection: 'row',
198
- alignItems: 'center',
199
- },
200
- time: {
201
- flex: 1,
202
- color: '#000',
203
- fontSize: cx(16),
204
- fontWeight: 'bold',
205
- fontFamily: 'helvetica_neue_lt_std_bd',
206
- },
207
- switchBtn: {},
208
- loopText: {
209
- color: '#000',
210
- fontSize: cx(14),
211
- fontFamily: 'helvetica_neue_lt_std_roman',
212
- },
213
- })
214
-
215
- export default RandomTimePage
@@ -1,25 +0,0 @@
1
- import {NavigationRoute} from "tuya-panel-kit";
2
- import RandomTimePage from "./RandomTimePage";
3
- import RandomTimeDetailPage from "./RandomTimeDetailPage";
4
- import {ui_biz_routerKey} from "../../navigation/Routers";
5
-
6
- const RandomTimePageRouters: NavigationRoute[] = [
7
- {
8
- name: ui_biz_routerKey.ui_biz_random_time,
9
- component: RandomTimePage,
10
- options: {
11
- hideTopbar: true,
12
- showOfflineView: false,
13
- },
14
- },
15
- {
16
- name: ui_biz_routerKey.ui_biz_random_time_edit,
17
- component: RandomTimeDetailPage,
18
- options: {
19
- hideTopbar: true,
20
- showOfflineView: false,
21
- },
22
- }
23
- ]
24
-
25
- export default RandomTimePageRouters
@@ -1,123 +0,0 @@
1
- import React, { ReactElement, memo } from "react";
2
- import { Text, Image, ViewStyle, View, StyleSheet } from 'react-native'
3
- import res from "@ledvance/base/src/res"
4
- import I18n from "@ledvance/base/src/i18n";
5
- import { Utils } from "tuya-panel-kit";
6
- import Spacer from "@ledvance/base/src/components/Spacer";
7
-
8
- const { convertX: cx } = Utils.RatioUtils;
9
-
10
- interface SummaryProps {
11
- style?: ViewStyle
12
- frequency?: string | ReactElement
13
- time?: string | ReactElement
14
- actions?: ReactElement
15
- hideActions?: boolean
16
- }
17
-
18
- const Summary = (props: SummaryProps) => {
19
- return (
20
- <View style={styles.cardContainer}>
21
- <Text style={styles.itemTitle}>{I18n.getLang('add_randomtimecycle_subheadline_text')}</Text>
22
- <Spacer height={cx(10)} />
23
- <View style={{}}>
24
- <View style={styles.summaryContainer}>
25
- <View style={styles.summaryLeft}>
26
- <Image
27
- source={res.summary_icon1}
28
- resizeMode="contain"
29
- style={styles.summaryImg}
30
- />
31
- <View>
32
- <Text style={styles.leftTitle}>{I18n.getLang('feature_summary_frequency_headline')}</Text>
33
- </View>
34
- </View>
35
- <View style={styles.summaryRight}>
36
- <View style={styles.rightWrap}>
37
- <Text style={styles.rightItem}>{props.frequency}</Text>
38
- </View>
39
- </View>
40
- </View>
41
- <View style={styles.summaryContainer}>
42
- <View style={styles.summaryLeft}>
43
- <Image
44
- source={res.summary_icon2}
45
- resizeMode="contain"
46
- style={styles.summaryImg}
47
- />
48
- <View>
49
- <Text style={styles.leftTitle}>{I18n.getLang('feature_summary_time_headline')}</Text>
50
- </View>
51
- </View>
52
- <View style={styles.summaryRight}>
53
- <View style={styles.rightWrap}>
54
- <Text style={styles.rightItem}>{props.time}</Text>
55
- </View>
56
- </View>
57
- </View>
58
- {!props.hideActions && <View style={[styles.summaryContainer, { alignItems: 'flex-start' }]}>
59
- <View style={styles.summaryLeft}>
60
- <Image
61
- source={res.summary_icon3}
62
- resizeMode="contain"
63
- style={styles.summaryImg}
64
- />
65
- <View>
66
- <Text style={styles.leftTitle}>{I18n.getLang('motion_detection_add_time_schedule_actions_text1')}</Text>
67
- </View>
68
- </View>
69
- <View style={styles.summaryRight}>
70
- {props.actions}
71
- </View>
72
- </View>}
73
- </View>
74
- </View>
75
- )
76
- }
77
-
78
- const styles = StyleSheet.create({
79
- cardContainer: {
80
- marginHorizontal: cx(24),
81
- },
82
- itemTitle: {
83
- color: '#000',
84
- fontSize: cx(16),
85
- fontWeight: 'bold',
86
- fontFamily: 'helvetica_neue_lt_std_bd',
87
- },
88
- summaryContainer: {
89
- flex: 1,
90
- flexDirection: 'row',
91
- marginBottom: cx(10),
92
- },
93
- summaryLeft: {
94
- flexDirection: 'row',
95
- alignItems: 'center',
96
- minWidth: cx(100)
97
- },
98
- summaryImg: {
99
- width: cx(12),
100
- height: cx(12),
101
- marginRight: cx(6)
102
- },
103
- leftTitle: {
104
- fontSize: cx(14),
105
- color: '#000'
106
- },
107
- summaryRight: {
108
- flex: 1,
109
- flexDirection: 'column',
110
- marginLeft: cx(15),
111
- },
112
- rightWrap: {
113
- borderRadius: cx(16),
114
- paddingHorizontal: cx(12),
115
- alignSelf: 'flex-start',
116
- backgroundColor: '#cbcbcb',
117
- },
118
- rightItem: {
119
- color: '#000',
120
- },
121
- })
122
-
123
- export default memo(Summary)