@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,373 +0,0 @@
1
- import React, { useCallback, useEffect, useMemo } from "react";
2
- import { ScrollView, StyleSheet, View, Text, Image, TouchableOpacity } from "react-native";
3
- import { useReactive, useUpdateEffect } 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 { isTimeSpanValid, loopText, showDialog } from "@ledvance/base/src/utils/common";
15
- import LdvPickerView from "@ledvance/base/src/components/ldvPickerView";
16
- import LampAdjustView from '@ledvance/base/src/components/LampAdjustView'
17
- import Card from "@ledvance/base/src/components/Card";
18
- import LdvSwitch from "@ledvance/base/src/components/ldvSwitch";
19
- import { CycleTimerItem } from "./FixedTimeActions";
20
- import { cloneDeep, isEqual } from "lodash";
21
- import Summary from "../randomTime/Summary";
22
- import { getSystemTimeFormat } from "@ledvance/base/src/api/native";
23
- import { FixedTimePageParams } from "./FixedTimePage";
24
-
25
- const { parseTimer } = Utils.TimeUtils
26
- const { convertX: cx } = Utils.RatioUtils;
27
- const { toFixedString } = Utils.NumberUtils;
28
-
29
- export interface FixedTimeDetailPageParams extends FixedTimePageParams{
30
- mode: 'add' | 'edit'
31
- scheduleItem: CycleTimerItem
32
- onPost: (mode: 'add' | 'edit' | 'del', fixedTime: CycleTimerItem, goBack?: boolean) => Promise<void>
33
- }
34
-
35
- const FixedTimeDetailPage = () => {
36
- const navigation = useNavigation()
37
- const params = useRoute().params as FixedTimeDetailPageParams
38
- const state = useReactive({
39
- loading: false,
40
- isColorMode: false,
41
- is24Hour: true,
42
- selectedSkill: params.applyDps.length === 1 ? params.applyDps : [],
43
- skillList: params.applyDps.length === 1 ? [] : params.applyDps,
44
- fixedTime: params.mode === 'add' ? newFixedTime() : cloneDeep(params.scheduleItem)
45
- })
46
-
47
- useEffect(() => {
48
- const { brightness, temperature, hue, saturation, value } = state.fixedTime.color
49
- const isColor = brightness === 0 && temperature === 0 && (hue !== 0 || saturation !== 0 || value !== 0)
50
- state.isColorMode = isColor
51
- }, [])
52
-
53
- useEffect(() =>{
54
- const getSystemTime = async () =>{
55
- state.is24Hour = await getSystemTimeFormat() === 24
56
- }
57
- getSystemTime().then()
58
- }, [])
59
-
60
- useUpdateEffect(() => {
61
- if (state.fixedTime.openTime === 0) state.fixedTime.openTime = 1
62
- if (state.fixedTime.closeTime === 0) state.fixedTime.closeTime = 1
63
- }, [state.fixedTime.openTime, state.fixedTime.closeTime])
64
-
65
- const showClearIcon = useMemo(() => (
66
- false
67
- ), [state.skillList])
68
-
69
-
70
-
71
- const maintenanceTime = () => {
72
- const { startTime, endTime, closeTime, openTime } = state.fixedTime
73
- const powered = openTime + closeTime
74
- const compute = isTimeSpanValid({
75
- startTime: [Math.trunc(startTime / 60), startTime % 60],
76
- endTime: [Math.trunc(endTime / 60), endTime % 60]
77
- })
78
- return compute >= powered
79
- }
80
-
81
- const showIcon = useCallback(() => {
82
- return state.fixedTime.name?.length > 0 && state.fixedTime?.name.length <= 32 && maintenanceTime()
83
- }, [state.fixedTime.name, maintenanceTime()])
84
-
85
- const deleteDialog = () => {
86
- return showDialog({
87
- method: 'confirm',
88
- title: I18n.getLang('cancel_dialog_delete_item_fixedtimecycle_titel'),
89
- subTitle: I18n.getLang('cancel_dialog_delete_item_fixedtimecycle_description'),
90
- onConfirm: async (_, { close }) => {
91
- close()
92
- await params.onPost('del', state.fixedTime, true)
93
- }
94
- })
95
- }
96
-
97
- const showBackDialog = useCallback(() => {
98
- if (params.mode === 'add') return false
99
- return !(state.fixedTime.name === params.scheduleItem.name &&
100
- state.fixedTime.startTime === params.scheduleItem.startTime &&
101
- state.fixedTime.endTime === params.scheduleItem.endTime &&
102
- state.fixedTime.openTime === params.scheduleItem.openTime &&
103
- state.fixedTime.closeTime === params.scheduleItem.closeTime &&
104
- isEqual(state.fixedTime.color, params.scheduleItem.color)) &&
105
- isEqual(state.fixedTime.weeks, params.scheduleItem.weeks)
106
- }, [state.fixedTime, params.scheduleItem])
107
-
108
-
109
- return (
110
- <Page
111
- backText={I18n.getLang('fixedTimeCycle_socket_headline')}
112
- onBackClick={!showBackDialog() ? navigation.goBack : undefined}
113
- rightButtonIcon={showIcon() ? res.ic_check : res.ic_uncheck}
114
- rightButtonDisabled={state.loading}
115
- loading={state.loading}
116
- showBackDialog={showBackDialog()}
117
- backDialogTitle={I18n.getLang('cancel_dialog_leave_unsaved_titel')}
118
- backDialogContent={I18n.getLang('cancel_dialog_leave_unsaved_fixedtimecycle_note')}
119
- rightButtonIconClick={async () => {
120
- if (!showIcon()) return
121
- state.loading = true
122
- await params.onPost(params.mode, {
123
- ...state.fixedTime,
124
- power: true,
125
- color: {
126
- hue: state.isColorMode ? state.fixedTime.color.hue : 0,
127
- saturation: state.isColorMode ? state.fixedTime.color.saturation : 0,
128
- value: state.isColorMode ? state.fixedTime.color.value : 0,
129
- temperature: state.isColorMode ? 0 : state.fixedTime.color.temperature,
130
- brightness: state.isColorMode ? 0 : state.fixedTime.color.brightness
131
- }
132
- }, true)
133
- }}
134
- >
135
- <ScrollView nestedScrollEnabled={true}>
136
- <LdvTopName title={I18n.getLang(params.mode === 'add' ? 'add_fixedtimecycle_headline_text' : 'edit_fixedtimecycle_headline_text')} />
137
- <TextField
138
- style={styles.cardContainer}
139
- value={state.fixedTime.name}
140
- showError={state.fixedTime.name?.length > 32}
141
- maxLength={33}
142
- errorText={I18n.getLang('add_new_dynamic_mood_alert_text')}
143
- placeholder={I18n.getLang('add_new_trigger_time_inputfield_value_text')}
144
- onChangeText={(t: string) => {
145
- state.fixedTime.name = t;
146
- }}
147
- />
148
- {/* pick */}
149
- <TimerPicker
150
- itemTextColor='#aeadb5'
151
- style={{ paddingVertical: cx(0), marginVertical: cx(0) }}
152
- is12Hours={!state.is24Hour}
153
- startTime={state.fixedTime.startTime}
154
- endTime={state.fixedTime.endTime}
155
- onTimerChange={(startTime, endTime) => {
156
- state.fixedTime.startTime = startTime
157
- state.fixedTime.endTime = endTime
158
- }} />
159
- <LdvWeekView
160
- value={state.fixedTime.weeks}
161
- style={styles.cardContainer}
162
- onSelect={(index: number) => {
163
- const rawIndex = index - 1
164
- state.fixedTime.weeks[rawIndex] = state.fixedTime.weeks[rawIndex] === 1 ? 0 : 1
165
- }} />
166
- <Spacer />
167
- <Text style={styles.cardContainer}>{loopText(state.fixedTime.weeks)}</Text>
168
- <Spacer />
169
- {/* Apply for */}
170
- <View style={styles.cardContainer}>
171
- <Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline_text')}</Text>
172
- <Spacer height={cx(10)} />
173
- <View style={styles.applyContent}>
174
- {state.selectedSkill.length === 0 ?
175
- <Text>{I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}</Text> :
176
- state.selectedSkill.map((skill: any) => (
177
- <View style={[styles.applyItem, { marginBottom: cx(10), borderRadius: 4 }]} key={skill.label}>
178
- <Text style={{ color: '#000' }}>{skill.label}</Text>
179
- {showClearIcon && <TouchableOpacity
180
- onPress={() => { }}
181
- style={{ paddingHorizontal: cx(5) }}>
182
- <Image style={{ width: cx(16), height: cx(16) }} source={res.ic_arrows_nav_clear} />
183
- </TouchableOpacity>}
184
- </View>
185
- ))
186
- }
187
- </View>
188
- {state.skillList.map((item: any) => {
189
- return (
190
- <TouchableOpacity style={styles.applyItem} key={item.label} onPress={() => { }}>
191
- <Text style={{ color: '#000' }}>{item.label}</Text>
192
- <Image style={{ width: cx(16), height: cx(16) }} source={res.device_panel_timer_add} />
193
- </TouchableOpacity>
194
- )
195
- })}
196
- </View>
197
- <Spacer />
198
- {/* Devices */}
199
- <View style={styles.cardContainer}>
200
- <Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline2_text')}</Text>
201
- <Spacer height={cx(10)} />
202
- <Card>
203
- <LdvSwitch
204
- title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
205
- color={'#fff'}
206
- colorAlpha={1}
207
- enable={true}
208
- setEnable={() => { }}
209
- showSwitch={false}
210
- />
211
- <LampAdjustView
212
- isSupportColor={params.isSupportColor}
213
- isSupportBrightness={params.isSupportBrightness}
214
- isSupportTemperature={params.isSupportTemperature}
215
- isColorMode={state.isColorMode}
216
- reserveSV={true}
217
- setIsColorMode={(v) => state.isColorMode = v}
218
- h={state.fixedTime.color.hue}
219
- s={state.fixedTime.color.saturation}
220
- v={state.fixedTime.color.value}
221
- colorTemp={state.fixedTime.color.temperature}
222
- brightness={state.fixedTime.color.brightness}
223
- onHSVChangeComplete={(h, s, v) => {
224
- state.fixedTime.color = {
225
- ...state.fixedTime.color,
226
- hue: h,
227
- saturation: s,
228
- value: v
229
- }
230
- }}
231
- onCCTChangeComplete={(v) => {
232
- state.fixedTime.color = {
233
- ...state.fixedTime.color,
234
- temperature: v
235
- }
236
- }}
237
- onBrightnessChangeComplete={(v) => {
238
- state.fixedTime.color = {
239
- ...state.fixedTime.color,
240
- brightness: v
241
- }
242
- }}
243
- />
244
- </Card>
245
- <Spacer />
246
- </View>
247
- {/* Settings */}
248
- <View style={styles.cardContainer}>
249
- <Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline4_text')}</Text>
250
- <Spacer height={cx(10)} />
251
- {!maintenanceTime() && <View style={{ flexDirection: 'row', alignItems: 'center' }}>
252
- <Image style={{ width: cx(16), height: cx(16), tintColor: 'rgb(255,149,0)' }} source={res.ic_warning_amber} />
253
- <Text style={{ fontSize: cx(12), color: 'rgb(255,149,0)' }}>{I18n.getLang('addTimeCycle_warning_text')}</Text>
254
- </View>}
255
- <View >
256
- <Text style={{ color: '#000', marginVertical: cx(10) }}>{I18n.getLang('addTimeCycle_settings_sec_text')}</Text>
257
- <LdvPickerView
258
- hour={toFixedString(Math.trunc(state.fixedTime.openTime / 60), 2)}
259
- minute={toFixedString(state.fixedTime.openTime % 60, 2)}
260
- setHour={(h) => {
261
- state.fixedTime.openTime = Number(h) * 60 + state.fixedTime.openTime % 60
262
- }}
263
- setMinute={(m) => {
264
- state.fixedTime.openTime = Math.trunc(state.fixedTime.openTime / 60) * 60 + Number(m)
265
- }}
266
- unit={['h', 'min']}
267
- />
268
- </View>
269
- <View>
270
- <Text style={{ color: '#000', marginVertical: cx(10) }}>{I18n.getLang('addTimeCycle_settings_sec_text2')}</Text>
271
- <LdvPickerView
272
- hour={toFixedString(Math.trunc(state.fixedTime.closeTime / 60), 2)}
273
- minute={toFixedString(state.fixedTime.closeTime % 60, 2)}
274
- setHour={(h) => {
275
- state.fixedTime.closeTime = Number(h) * 60 + state.fixedTime.closeTime % 60
276
- }}
277
- setMinute={(m) => {
278
- state.fixedTime.closeTime = Math.trunc(state.fixedTime.closeTime / 60) * 60 + Number(m)
279
- }}
280
- unit={['h', 'min']}
281
- />
282
- </View>
283
- <Spacer />
284
- </View>
285
- {/* summary */}
286
- <Summary
287
- frequency={loopText(state.fixedTime.weeks)}
288
- time={`${parseTimer(state.fixedTime.startTime * 60)} - ${parseTimer(state.fixedTime.endTime * 60)}`}
289
- actions={(
290
- <View style={{ flexDirection: 'column' }}>
291
- <Text style={{ color: '#000' }}>{I18n.formatValue('feature_summary_action_txt_4', `${Math.trunc(state.fixedTime.openTime / 60)}`, `${state.fixedTime.openTime % 60}`)}</Text>
292
- <View style={styles.summaryTag}>
293
- <Text style={{ color: '#000' }}>{I18n.getLang('timeschedule_add_schedule_nightlight_plug_selectionfield_text2')}</Text>
294
- </View>
295
- <Spacer height={cx(5)} />
296
- <Text style={{ color: '#000' }}>{I18n.formatValue('feature_summary_action_txt_6', `${Math.trunc(state.fixedTime.closeTime / 60)}`, `${state.fixedTime.closeTime % 60}`)}</Text>
297
- <View style={styles.summaryTag}>
298
- <Text style={{ color: '#000' }}>{I18n.getLang('timeschedule_add_schedule_nightlight_plug_selectionfield_text2')}</Text>
299
- </View>
300
- </View>
301
- )}
302
- />
303
- <Spacer />
304
- {params.mode === 'edit' &&
305
- <View style={{ marginHorizontal: cx(24) }}>
306
- <DeleteButton
307
- text={I18n.getLang('edit_fixedtimecycle_bttn_text')}
308
- onPress={deleteDialog} />
309
- </View>
310
- }
311
- <Spacer />
312
- </ScrollView>
313
- </Page>
314
- )
315
- }
316
-
317
- const newFixedTime = () => {
318
- return {
319
- name: '',
320
- power: true,
321
- weeks: [0, 0, 0, 0, 0, 0, 0],
322
- startTime: 480,
323
- endTime: 840,
324
- closeTime: 1,
325
- openTime: 1,
326
- index: '',
327
- channel: 1,
328
- color: {
329
- hue: 0,
330
- saturation: 0,
331
- value: 100,
332
- brightness: 100,
333
- temperature: 0,
334
- }
335
- }
336
- }
337
-
338
- const styles = StyleSheet.create({
339
- cardContainer: {
340
- marginHorizontal: cx(24)
341
- },
342
- itemTitle: {
343
- color: '#000',
344
- fontSize: cx(16),
345
- fontWeight: 'bold',
346
- fontFamily: 'helvetica_neue_lt_std_bd',
347
- },
348
- applyContent: {
349
- backgroundColor: '#f6f6f6',
350
- borderRadius: 4,
351
- minHeight: cx(55),
352
- flex: 1,
353
- justifyContent: 'center',
354
- paddingHorizontal: cx(10),
355
- paddingTop: cx(10)
356
- },
357
- applyItem: {
358
- paddingLeft: cx(5),
359
- flexDirection: 'row',
360
- justifyContent: 'space-between',
361
- alignItems: 'center',
362
- backgroundColor: '#fff',
363
- height: cx(35),
364
- },
365
- summaryTag: {
366
- backgroundColor: '#cbcbcb',
367
- borderRadius: cx(16),
368
- paddingHorizontal: cx(12),
369
- alignSelf: 'flex-start'
370
- }
371
- })
372
-
373
- export default FixedTimeDetailPage
@@ -1,214 +0,0 @@
1
- import React, { memo, 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 { CycleTimerItem, useFixedTime } from "./FixedTimeActions";
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 FixedTimePageParams {
23
- fixedTimeDp: string
24
- conflictDps: {
25
- randomTimeDp?: 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 FixedTimePage = () => {
42
- const navigation = useNavigation()
43
- const devInfo = useDeviceInfo()
44
- const params = useRoute().params as FixedTimePageParams
45
- const [fixedTime, setFixedTime] = useFixedTime(params.fixedTimeDp)
46
- const state = useReactive({
47
- loading: false,
48
- fixedTimeList: fixedTime
49
- })
50
-
51
- useUpdateEffect(() => {
52
- state.fixedTimeList = fixedTime
53
- }, [fixedTime])
54
-
55
- const navigateToEdit = useCallback((mode: 'add' | 'edit', scheduleItem?: CycleTimerItem) => {
56
- navigation.navigate(ui_biz_routerKey.ui_biz_fixed_time_edit, {
57
- ...params,
58
- mode,
59
- scheduleItem: cloneDeep(scheduleItem),
60
- onPost
61
- })
62
- }, [])
63
-
64
- const showMaxNumTip = useCallback(() => {
65
- return state.fixedTimeList.length >= MAX_NUM
66
- }, [state.fixedTimeList.length])
67
-
68
- const onPost = useCallback(async (mode: 'add' | 'edit' | 'del', fixedTime: CycleTimerItem, goBack?: boolean) => {
69
- state.loading = true
70
- const cloneFixedTimeList = cloneDeep(state.fixedTimeList)
71
- const idx = state.fixedTimeList.findIndex(f => f.index === fixedTime.index)
72
- let manualEdit = false
73
- if (mode === 'edit') {
74
- const editItem = cloneFixedTimeList[idx]
75
- manualEdit = isEqual(editItem, { ...fixedTime, name: editItem.name })
76
- cloneFixedTimeList.splice(idx, 1, fixedTime)
77
- }
78
- if (mode === 'del') cloneFixedTimeList.splice(idx, 1)
79
- const newFixedTimeList = mode === 'add' ? [...state.fixedTimeList, fixedTime] : cloneFixedTimeList
80
- const res = await setFixedTime(newFixedTimeList, manualEdit)
81
- state.loading = false
82
- if (res.success && goBack) {
83
- navigation.goBack()
84
- }
85
- }, [state.fixedTimeList])
86
-
87
- return (
88
- <Page
89
- backText={devInfo.name}
90
- headlineText={I18n.getLang('fixedTimeCycle_socket_headline')}
91
- headlineIcon={!showMaxNumTip() ? res.device_panel_schedule_add : undefined}
92
- loading={state.loading}
93
- onBackClick={navigation.goBack}
94
- onHeadlineIconClick={() => {
95
- navigateToEdit('add')
96
- }}
97
- >
98
- {state.fixedTimeList.length > 0 ?
99
- <ScrollView nestedScrollEnabled={true}>
100
- <Text style={{
101
- color: '#000',
102
- marginLeft: cx(24),
103
- }}>{I18n.getLang('timeschedule_overview_description_text')}</Text>
104
- <Spacer height={cx(10)} />
105
- {showMaxNumTip() && <View style={{ marginHorizontal: cx(24), flexDirection: 'row' }}>
106
- <Image style={{ width: cx(16), height: cx(16), tintColor: '#ff9500' }} source={res.ic_warning_amber} />
107
- <Text>{I18n.getLang('fixedtimecycle_warning_max_number_text')}</Text>
108
- </View>}
109
- <FlatList
110
- data={state.fixedTimeList}
111
- renderItem={({ item }) => (
112
- <FixedTimeCard
113
- fixedTime={item}
114
- onSwitch={(v) => {
115
- onPost('edit', {
116
- ...item,
117
- power: v
118
- })
119
- }}
120
- onPress={() => {
121
- navigateToEdit('edit', item)
122
- }}
123
- />
124
- )}
125
- keyExtractor={(item: any) => `${item?.index}`}
126
- ItemSeparatorComponent={() => <Spacer />}
127
- ListHeaderComponent={<Spacer height={cx(10)} />}
128
- ListFooterComponent={<Spacer />}
129
- />
130
- </ScrollView> :
131
- <View style={{ flex: 1, marginTop: cx(60), alignItems: 'center' }}>
132
- <Image
133
- style={{ width: cx(225), height: cx(198) }}
134
- source={{ uri: res.ldv_timer_empty }}
135
- resizeMode="contain" />
136
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
137
- <Image
138
- source={{ uri: res.device_panel_schedule_alert }}
139
- style={{ width: cx(16), height: cx(16) }}
140
- />
141
- <Text style={{ color: '#000', fontSize: cx(12) }}>
142
- {I18n.getLang('fixedTimeCycle_information_text')}
143
- </Text>
144
- </View>
145
- <Spacer />
146
- <TextButton
147
- text={I18n.getLang('fixedTimeCycle_bttn_text')}
148
- style={{
149
- backgroundColor: '#f60',
150
- borderRadius: cx(6),
151
- paddingVertical: cx(12),
152
- paddingHorizontal: cx(24),
153
- }}
154
- textStyle={{ color: '#fff' }}
155
- onPress={() => {
156
- navigateToEdit('add')
157
- }} />
158
- </View>
159
- }
160
- </Page>
161
- )
162
- }
163
-
164
- const FixedTimeCard = memo((props: {
165
- fixedTime: CycleTimerItem,
166
- onSwitch: (enable: boolean) => void,
167
- onPress: () => void
168
- }) => {
169
- const { fixedTime, onSwitch, onPress } = props
170
- return (
171
- <Card style={styles.randomTimingCard} onPress={onPress}>
172
- <Spacer height={cx(16)} />
173
- <View style={styles.switchLine}>
174
- <Text style={styles.time}>
175
- {`${parseTimer(fixedTime.startTime * 60)} - ${parseTimer(fixedTime.endTime * 60)}`}</Text>
176
- <SwitchButton
177
- style={styles.switchBtn}
178
- value={fixedTime.power}
179
- thumbStyle={{ elevation: 0 }}
180
- onValueChange={onSwitch} />
181
- </View>
182
- <Text style={styles.loopText}>{loopText(fixedTime.weeks)}</Text>
183
- <Spacer height={cx(5)} />
184
- <Text style={styles.loopText}>{fixedTime.name}</Text>
185
- <Spacer />
186
- </Card>
187
- )
188
- })
189
-
190
- const styles = StyleSheet.create({
191
- randomTimingCard: {
192
- marginHorizontal: cx(24),
193
- paddingHorizontal: cx(16),
194
- },
195
- switchLine: {
196
- flexDirection: 'row',
197
- alignItems: 'center',
198
- },
199
- time: {
200
- flex: 1,
201
- color: '#000',
202
- fontSize: cx(16),
203
- fontWeight: 'bold',
204
- fontFamily: 'helvetica_neue_lt_std_bd',
205
- },
206
- switchBtn: {},
207
- loopText: {
208
- color: '#000',
209
- fontSize: cx(14),
210
- fontFamily: 'helvetica_neue_lt_std_roman',
211
- },
212
- })
213
-
214
- export default FixedTimePage
@@ -1,26 +0,0 @@
1
- import {NavigationRoute} from "tuya-panel-kit";
2
- import {ui_biz_routerKey} from "../../navigation/Routers";
3
- import FixedTimePage from "./FixedTimePage";
4
- import FixedTimeDetailPage from "./FixedTimeDetailPage";
5
-
6
- export const FixedTimePageRouters: NavigationRoute[] = [
7
- {
8
- name: ui_biz_routerKey.ui_biz_fixed_time,
9
- component: FixedTimePage,
10
- options: {
11
- hideTopbar: true,
12
- showOfflineView: false,
13
- },
14
- },
15
- {
16
- name: ui_biz_routerKey.ui_biz_fixed_time_edit,
17
- component: FixedTimeDetailPage,
18
- options: {
19
- hideTopbar: true,
20
- showOfflineView: false,
21
- },
22
- }
23
- ]
24
-
25
-
26
- export default FixedTimePageRouters
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- app_music_music: any;
3
- app_music_ball: any;
4
- app_music_game: any;
5
- app_music_romantic: any;
6
- app_music_check: any;
7
- app_music_center_off: any;
8
- app_music_center_on: any;
9
- };
10
- export default _default;