-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved TaskManager component to scommons-react-redux module
- Loading branch information
1 parent
164b6a5
commit f60eca5
Showing
11 changed files
with
1,515 additions
and
1,920 deletions.
There are no files selected for viewing
2,829 changes: 1,413 additions & 1,416 deletions
2,829
docs/showcase/assets/scommons-client-showcase-opt.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
showcase/src/main/scala/scommons/client/showcase/ShowcaseRouteController.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package scommons.client.showcase | ||
|
||
import io.github.shogowada.scalajs.reactjs.React.Props | ||
import io.github.shogowada.scalajs.reactjs.redux.Redux.Dispatch | ||
import scommons.client.app.{AppBrowseController, AppBrowseControllerProps} | ||
import scommons.client.ui.Buttons | ||
import scommons.react.UiComponent | ||
import scommons.react.redux.BaseStateController | ||
|
||
object ShowcaseRouteController extends BaseStateController[ShowcaseState, AppBrowseControllerProps] { | ||
|
||
lazy val uiComponent: UiComponent[AppBrowseControllerProps] = AppBrowseController | ||
|
||
def mapStateToProps(dispatch: Dispatch, state: ShowcaseState, props: Props[Unit]): AppBrowseControllerProps = { | ||
AppBrowseControllerProps( | ||
List(Buttons.REFRESH, Buttons.ADD, Buttons.REMOVE, Buttons.EDIT), | ||
ShowcaseReducer.getTreeRoots(state), | ||
dispatch, | ||
Set(ShowcaseReducer.widgetsNode.path) | ||
) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
showcase/src/main/scala/scommons/client/showcase/ShowcaseTaskController.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package scommons.client.showcase | ||
|
||
import io.github.shogowada.scalajs.reactjs.React.Props | ||
import io.github.shogowada.scalajs.reactjs.redux.Redux.Dispatch | ||
import scommons.client.app.AppTaskManagerUi | ||
import scommons.react.UiComponent | ||
import scommons.react.redux.BaseStateController | ||
import scommons.react.redux.task.{TaskManager, TaskManagerProps} | ||
|
||
object ShowcaseTaskController extends BaseStateController[ShowcaseState, TaskManagerProps] { | ||
|
||
lazy val uiComponent: UiComponent[TaskManagerProps] = { | ||
TaskManager.uiComponent = AppTaskManagerUi | ||
TaskManager.errorHandler = AppTaskManagerUi.errorHandler | ||
TaskManager | ||
} | ||
|
||
def mapStateToProps(dispatch: Dispatch, state: ShowcaseState, props: Props[Unit]): TaskManagerProps = { | ||
TaskManagerProps(state.currentTask) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 17 additions & 8 deletions
25
.../scommons/client/task/TaskManagerUi.scala → ...commons/client/app/AppTaskManagerUi.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.