not-bulma 1.0.70 → 1.0.71

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-bulma",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "description": "not-* family UI components on Bulma CSS Framework",
5
5
  "main": "src/index.js",
6
6
  "svelte": "src/index.js",
@@ -1,6 +1,6 @@
1
1
  export default (ACTION, TITLE, UIConstructor) => {
2
2
  return class {
3
- static async run(controller, c) {
3
+ static async run(controller, params) {
4
4
  try {
5
5
  controller.setBreadcrumbs([
6
6
  {
@@ -0,0 +1,19 @@
1
+ export default class PlainRouter {
2
+ static extractActionName(params) {
3
+ if (params.length > 0) {
4
+ return params[0];
5
+ }
6
+ throw new Error("no action name");
7
+ }
8
+
9
+ static route(controller, params) {
10
+ try {
11
+ const actionName = PlainRouter.extractActionName(params);
12
+ controller.setCurrentAction(actionName);
13
+ return controller.runAction(actionName, params);
14
+ } catch (e) {
15
+ controller.report(e);
16
+ controller.showErrorMessage(e);
17
+ }
18
+ }
19
+ }