"use strict";(self.webpackChunkangular_storybook_project=self.webpackChunkangular_storybook_project||[]).push([[9245],{"./src/common/shared/models-mdx/ActionsField.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});var react=__webpack_require__("./node_modules/react/index.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),dist=__webpack_require__("./node_modules/@storybook/blocks/dist/index.mjs");const ActionsFieldReader=()=>react.createElement("div",{className:"panel-content"},react.createElement(dist.oz,null,"# ActionsField\n\nDocumentazione dettagliata del oggetto custom  **ActionsField**, usato nei componenti di Intranet Webkit v17. \n**ActionsField** è un array di <a href=\"?path=/docs/resources-models-actionitem--docs\">ActionItem</a> ed è utilizzato per costruire la colonna di azioni nelle tabelle.\n\n## Implementazione\n<div class=\"table-responsive\">`import { ActionsField } from '@inail/intranet-webkit'`</div>\n<br />\n\n***Struttura:***\n`constructor(label: string,\n  actions: ActionItem[],\n  canActionShowed?: (model: any, action: ActionItem) => boolean,\n  size?: any)`\n\n***Esempio d'uso:***\n` actionsField = new ActionsField('', [\n    new ActionItem(\n      'BUTTON.EDIT_STEP',\n      (actions: ActionItem, item: any) => {\n        action('onEdit')(\n          'This is after clicked onEdit ${JSON.stringify(item, null, 2)}'\n        );\n      },\n      ['pencil']\n    ),\n    new ActionItem(\n      'TITLE.DELETE_USER',\n      (actions: ActionItem, item: any) => {\n        action('onDelete')(\n          'This is after clicked onDelete ${JSON.stringify(item, null, 2)}'\n        );\n      },\n      ['trash']\n    ),\n ])`\n\n## API\n<div class=\"table-responsive\">\n  <table class=\"table table-documentation\">\n  <thead>\n    <tr>\n      <th><strong>Campo</strong></th>\n      <th><strong>Descrizione</strong></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>label</code></td>\n      <td>\n        Campo di tipo string che definisce l'etichetta dell'`ActionsField`.\n      </td>\n    </tr>\n    <tr>\n      <td><code>actions</code></td>\n      <td>\n        Campo di tipo array di <a href=\"?path=/docs/resources-models-actionitem--docs\">ActionItem</a>. Crea l'array di pulsanti che verranno visualizzati nella colonna azioni.\n      </td>\n    </tr>\n    <tr>\n      <td><code>canActionShowed</code></td>\n      <td>\n        Funzione che restituisce un booleano e può accettare come argomenti un model e un object di tipo <a href=\"?path=/docs/resources-models-actionitem--docs\">ActionItem</a>.\n      </td>\n    </tr>\n  </tbody>\n</table>\n</div>\n\n## Casi d'utilizzo\n<br />\n<a href=\"?path=/story/components-table-simple--simple-table\">Simple and Paginated Tables</a>\n"));function _createMdxContent(props){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(dist.W8,{title:"Resources/Models/ActionsField"}),"\n",(0,jsx_runtime.jsx)(ActionsFieldReader,{})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent()}}}]);