import { ICONS } from "@tsed/tailwind-formio/lib/templates/tailwind/iconClass";
import React from "react";
import { FormsTable } from "./formsTable.component";
export default {
title: "ReactFormio/FormsTable",
component: FormsTable,
argTypes: {
icon: {
control: {
type: "select",
options: Object.keys(ICONS)
}
},
data: {
control: {
type: "object"
}
},
operations: {
control: {
type: "object"
}
},
isLoading: {
control: {
type: "boolean"
}
},
isEmpty: {
control: {
type: "boolean"
}
},
disableFilters: {
control: {
type: "boolean"
}
},
disablePagination: {
control: {
type: "boolean"
}
},
tags: {
control: {
type: "object"
}
}
},
parameters: {}
};
export const Sandbox = (args: any) => {
return ;
};
Sandbox.args = {
icon: "server",
data: [
{
_id: "602967600685b24dbe24e999",
type: "form",
tags: ["common", "app"],
title: "test-form",
name: "testForm",
path: "testform",
modified: "2021-02-14T18:24:07.460Z"
},
{
_id: "6023f8fe4b1a2ab9a3aae096",
type: "form",
tags: [],
title: "text-field",
name: "textField",
path: "textfield",
modified: "2021-02-10T21:38:52.325Z"
},
{
_id: "5d0797bc872fc762a855985d",
type: "form",
tags: [],
title: "User Login",
name: "userLogin",
path: "user/login",
modified: "2020-03-06T13:37:33.032Z"
},
{
_id: "5d64e89603679802b728dd0e",
type: "form",
tags: [],
title: "test",
name: "test",
path: "test",
modified: "2019-09-12T17:44:03.780Z"
},
{
_id: "5d0797bc872fc7fb4b55985e",
type: "form",
tags: [],
title: "User Register",
name: "userRegister",
path: "user/register",
modified: "2019-06-17T13:38:04.747Z"
}
],
operations: [
{
title: "Edit",
action: "edit",
alias: "row",
path: "/resources/:resourceId/submissions/:submissionId",
icon: "edit",
permissionsResolver() {
return true;
}
},
{
action: "delete",
path: "/resources/:resourceId/submissions/:submissionId/delete",
icon: "trash",
buttonType: "danger",
permissionsResolver() {
return true;
}
}
]
};
export const ButtonsOutlined = (args: any) => {
return ;
};
ButtonsOutlined.args = {
icon: "server",
data: [
{
_id: "602967600685b24dbe24e999",
type: "form",
tags: ["common", "app"],
title: "test-form",
name: "testForm",
path: "testform",
modified: "2021-02-14T18:24:07.460Z"
},
{
_id: "6023f8fe4b1a2ab9a3aae096",
type: "form",
tags: [],
title: "text-field",
name: "textField",
path: "textfield",
modified: "2021-02-10T21:38:52.325Z"
},
{
_id: "5d0797bc872fc762a855985d",
type: "form",
tags: [],
title: "User Login",
name: "userLogin",
path: "user/login",
modified: "2020-03-06T13:37:33.032Z"
},
{
_id: "5d64e89603679802b728dd0e",
type: "form",
tags: [],
title: "test",
name: "test",
path: "test",
modified: "2019-09-12T17:44:03.780Z"
},
{
_id: "5d0797bc872fc7fb4b55985e",
type: "form",
tags: [],
title: "User Register",
name: "userRegister",
path: "user/register",
modified: "2019-06-17T13:38:04.747Z"
}
],
operations: [
{
title: "Edit",
action: "edit",
alias: "row",
path: "/resources/:resourceId/submissions/:submissionId",
icon: "edit",
buttonOutline: true,
permissionsResolver() {
return true;
}
},
{
action: "delete",
path: "/resources/:resourceId/submissions/:submissionId/delete",
icon: "trash",
buttonType: "danger",
buttonOutline: true,
permissionsResolver() {
return true;
}
}
]
};