diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/NextPage.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/NextPage.svelte
deleted file mode 100644
index a96e1bd3d..000000000
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/NextPage.svelte
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/PrevPage.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/PrevPage.svelte
deleted file mode 100644
index f662aa334..000000000
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/PrevPage.svelte
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/index.js b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/index.js
index 95c92a3f6..4700ea5c8 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/index.js
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/index.js
@@ -6,8 +6,6 @@ import TriggerAutomation from "./TriggerAutomation.svelte"
import ValidateForm from "./ValidateForm.svelte"
import LogIn from "./LogIn.svelte"
import LogOut from "./LogOut.svelte"
-import NextPage from "./NextPage.svelte"
-import PrevPage from "./PrevPage.svelte"
// defines what actions are available, when adding a new one
// the component is the setup panel for the action
@@ -47,12 +45,4 @@ export default [
name: "Log Out",
component: LogOut,
},
- {
- name: "Next Page",
- component: NextPage,
- },
- {
- name: "Previous Page",
- component: PrevPage,
- },
]
diff --git a/packages/client/src/constants.js b/packages/client/src/constants.js
index fc69ac212..3aa302bec 100644
--- a/packages/client/src/constants.js
+++ b/packages/client/src/constants.js
@@ -5,6 +5,4 @@ export const TableNames = {
export const ActionTypes = {
ValidateForm: "ValidateForm",
RefreshDatasource: "RefreshDatasource",
- NextPage: "NextPage",
- PrevPage: "PrevPage",
}
diff --git a/packages/client/src/utils/buttonActions.js b/packages/client/src/utils/buttonActions.js
index f78ac1773..4d2865d58 100644
--- a/packages/client/src/utils/buttonActions.js
+++ b/packages/client/src/utils/buttonActions.js
@@ -16,27 +16,27 @@ const saveRowHandler = async (action, context) => {
}
}
-const deleteRowHandler = async (action) => {
+const deleteRowHandler = async action => {
const { tableId, revId, rowId } = action.parameters
if (tableId && revId && rowId) {
await deleteRow({ tableId, rowId, revId })
}
}
-const triggerAutomationHandler = async (action) => {
+const triggerAutomationHandler = async action => {
const { fields } = action.parameters
if (fields) {
await triggerAutomation(action.parameters.automationId, fields)
}
}
-const navigationHandler = (action) => {
+const navigationHandler = action => {
if (action.parameters.url) {
routeStore.actions.navigate(action.parameters.url)
}
}
-const queryExecutionHandler = async (action) => {
+const queryExecutionHandler = async action => {
const { datasourceId, queryId, queryParams } = action.parameters
await executeQuery({
datasourceId,
@@ -68,23 +68,7 @@ const refreshDatasourceHandler = async (action, context) => {
)
}
-const nextPageHandler = async (action, context) => {
- return await executeActionHandler(
- context,
- action.parameters.componentId,
- ActionTypes.NextPage
- )
-}
-
-const prevPageHandler = async (action, context) => {
- return await executeActionHandler(
- context,
- action.parameters.componentId,
- ActionTypes.PrevPage
- )
-}
-
-const loginHandler = async (action) => {
+const loginHandler = async action => {
const { email, password } = action.parameters
await authStore.actions.logIn({ email, password })
}
@@ -103,8 +87,6 @@ const handlerMap = {
["Refresh Datasource"]: refreshDatasourceHandler,
["Log In"]: loginHandler,
["Log Out"]: logoutHandler,
- ["Next Page"]: nextPageHandler,
- ["Previous Page"]: prevPageHandler,
}
/**
@@ -114,10 +96,9 @@ const handlerMap = {
export const enrichButtonActions = (actions, context) => {
// Prevent button actions in the builder preview
if (get(builderStore).inBuilder) {
- // TODO uncomment
- // return () => {}
+ return () => {}
}
- const handlers = actions.map((def) => handlerMap[def["##eventHandlerType"]])
+ const handlers = actions.map(def => handlerMap[def["##eventHandlerType"]])
return async () => {
for (let i = 0; i < handlers.length; i++) {
try {
diff --git a/packages/standard-components/manifest.json b/packages/standard-components/manifest.json
index c19deb9d7..dab68f41c 100644
--- a/packages/standard-components/manifest.json
+++ b/packages/standard-components/manifest.json
@@ -1384,7 +1384,6 @@
"icon": "Data",
"styleable": false,
"hasChildren": true,
- "actions": ["NextPage", "PrevPage"],
"settings": [
{
"type": "dataSource",
diff --git a/packages/standard-components/src/DataProvider.svelte b/packages/standard-components/src/DataProvider.svelte
index 80ddffede..64e387462 100644
--- a/packages/standard-components/src/DataProvider.svelte
+++ b/packages/standard-components/src/DataProvider.svelte
@@ -54,25 +54,8 @@
callback: () => fetchData(dataSource),
metadata: { dataSource },
},
- {
- type: ActionTypes.NextPage,
- callback: () => nextPage(),
- },
- {
- type: ActionTypes.PrevPage,
- callback: () => prevPage(),
- },
]
- $: dataContext = {
- rows,
- schema,
- rowsLength: rows.length,
- loading,
- loaded,
- pageNumber: pageNumber + 1,
- hasNextPage,
- hasPrevPage,
- }
+ $: dataContext = { rows, schema, rowsLength: rows.length }
const getSortType = (schema, sortColumn) => {
if (!schema || !sortColumn || !schema[sortColumn]) {