diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a7e5e2..bfaf175 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,3 +42,23 @@ jobs: tags: registry.webix.io/kanban-docs-alt:${{ steps.vars.outputs.short_ref }} - run: curl "https://docs.dhtmlx.com/hooks/restart-docker?token=${{ secrets.RESTART_TOKEN }}&project=docs-kanban-alt-${{ steps.vars.outputs.short_ref }}" + algolia-crawl: + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Wait for Deployment + run: sleep 30 + + - name: Algolia Crawler Creation and Crawl + uses: algolia/algoliasearch-crawler-github-actions@v1.0.10 + with: + crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} + crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} + algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} + algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} + site-url: "https://docs.dhtmlx.com/kanban/" + crawler-name: "Kanban Docs Crawler" + override-config: true diff --git a/.gitignore b/.gitignore index 538365a..b61b221 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,10 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -*.cjs -.pnp.loader.mjs .yarn +.pnp.cjs +.pnp.loader.mjs +.yarnrc.yml +prompts +gptit.toml +.gitconfig diff --git a/docs/api/overview/main_overview.md b/docs/api/overview/main_overview.md index 7d58bb3..9af2106 100644 --- a/docs/api/overview/main_overview.md +++ b/docs/api/overview/main_overview.md @@ -197,29 +197,29 @@ new kanban.Toolbar("#toolbar", { | Name | Description | | ----------------------------------------------------------- | ------------------------------------------------------ | -| [GET `/cards`](../provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | -| [GET `/columns`](../provider/rest_routes/get_routes/js_kanban_get_columns_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | -| [GET `/links`](../provider/rest_routes/get_routes/js_kanban_get_links_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_links_route.md) | -| [GET `/rows`](../provider/rest_routes/get_routes/js_kanban_get_rows_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | -| [GET `/users`](../provider/rest_routes/get_routes/js_kanban_get_users_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_users_route.md) | -| [GET `/uploads`](../provider/rest_routes/get_routes/js_kanban_get_uploads_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | -| [POST `/cards`](../provider/rest_routes/post_routes/js_kanban_post_cards_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | -| [POST `/cards/{cardId}/comments`](../provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | -| [POST `/cards/{cardId}/vote`](../provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | -| [POST `/columns`](../provider/rest_routes/post_routes/js_kanban_post_columns_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | -| [POST `/links`](../provider/rest_routes/post_routes/js_kanban_post_links_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_links_route.md) | -| [POST `/rows`](../provider/rest_routes/post_routes/js_kanban_post_rows_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | -| [POST `/uploads`](../provider/rest_routes/post_routes/js_kanban_post_uploads_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | -| [PUT `/cards`](../provider/rest_routes/put_routes/js_kanban_put_cards_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | -| [PUT `/cards/{id}/move`](../provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | -| [PUT `/cards/{cardId}/comments/{cardId}`](../provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | -| [PUT `/columns`](../provider/rest_routes/put_routes/js_kanban_put_columns_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | -| [PUT `/columns/{id}/move`](../provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | -| [PUT `/rows`](../provider/rest_routes/put_routes/js_kanban_put_rows_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | -| [PUT `/rows/{id}/move`](../provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | -| [DELETE `/cards`](../provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | -| [DELETE `/cards/{cardId}/comments/{cardId}`](../provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | -| [DELETE `/cards/{cardId}/vote`](../provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | -| [DELETE `/columns`](../provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | -| [DELETE `/links`](../provider/rest_routes/delete_routes/js_kanban_delete_links_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | -| [DELETE `/rows`](../provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | +| [GET `/cards`](api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | +| [GET `/columns`](api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | +| [GET `/links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_links_route.md) | +| [GET `/rows`](api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | +| [GET `/users`](api/provider/rest_routes/get_routes/js_kanban_get_users_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_users_route.md) | +| [GET `/uploads`](api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | +| [POST `/cards`](api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | +| [POST `/cards/{cardId}/comments`](api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | +| [POST `/cards/{cardId}/vote`](api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | +| [POST `/columns`](api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | +| [POST `/links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_links_route.md) | +| [POST `/rows`](api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | +| [POST `/uploads`](api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | +| [PUT `/cards`](api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | +| [PUT `/cards/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | +| [PUT `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | +| [PUT `/columns`](api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | +| [PUT `/columns/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | +| [PUT `/rows`](api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | +| [PUT `/rows/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | +| [DELETE `/cards`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | +| [DELETE `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | +| [DELETE `/cards/{cardId}/vote`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | +| [DELETE `/columns`](api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | +| [DELETE `/links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | +| [DELETE `/rows`](api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | diff --git a/docs/api/overview/rest_routes_overview.md b/docs/api/overview/rest_routes_overview.md index 248ff64..9bd4820 100644 --- a/docs/api/overview/rest_routes_overview.md +++ b/docs/api/overview/rest_routes_overview.md @@ -9,7 +9,7 @@ description: You can have an Internal RestDataProvider routes overview of JavaSc import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -This page gives you the list of all REST routes with their short description and links to pages with more details.
Before you dive into each route description, it's recommended to read about [Working with Server](guides/working_with_server.md). +This page gives you the list of all REST routes with their short description and links to pages with more details.
Before you dive into each route description, it's recommended to read about [Working with Server](guides/working_with_server.md). --- diff --git a/docs/guides/initialization.md b/docs/guides/initialization.md index bbf2f7a..8a584e9 100644 --- a/docs/guides/initialization.md +++ b/docs/guides/initialization.md @@ -80,7 +80,7 @@ To learn more about configuring the Toolbar of Kanban, read the [**Configuration ### Configuration properties :::note -The full list of properties to configure **Kanban** can be found [**here**](api/overview/properties_overview.md).
+The full list of properties to configure **Kanban** can be found [**here**](api/overview/properties_overview.md).
The full list of properties to configure **Toolbar of Kanban** can be found [**here**](api/overview/toolbar_properties_overview.md). ::: diff --git a/docs/guides/integration_with_salesforce.md b/docs/guides/integration_with_salesforce.md index 7f6430f..fdf0be0 100644 --- a/docs/guides/integration_with_salesforce.md +++ b/docs/guides/integration_with_salesforce.md @@ -13,7 +13,7 @@ You should be familiar with the basic concepts and patterns of [**Salesforce**]( DHTMLX Kanban is compatible with [Salesforce](https://www.salesforce.com/) platform. We have prepared code examples on how to add DHTMLX Kanban into Salesforce environment. For more information, refer to the corresponding [Example on GitHub](https://github.com/DHTMLX/salesforce-lwc-demo). :::note -The JavaScript Kanban widget automatically detects that it operates within a [Salesforce](https://www.salesforce.com/) environment and configures the integration logic internally. In most cases, you do not need to call any [Salesforce-specific methods](#salesforce-specific-methods) manually. +The JavaScript Kanban widget automatically detects that it operates within a [**Salesforce**](https://www.salesforce.com/) environment and configures the integration logic internally. In most cases, you do not need to call any [**Salesforce-specific methods**](#salesforce-specific-methods) manually. ::: ## Preparing environment @@ -49,13 +49,23 @@ Normally, salesforce-specific methods are not required, but they can be availabl ### Salesforce-specific methods -You can use the following methods of the `salesForceEnv` helper class: +You can use the following methods of the `salesForceEnv` helper class: | Method | Description | | :--------------------------------------------------------------- | :----------------------------------------------------------------------------- | | `salesForceEnv.detect()` | Detects whether the Kanban is running inside Salesforce | -| `salesForceEnv.addGlobalEvent(eventName, handler, htmlElement)` | Attaches a global event to the first available `HTMLElement` | -| `salesForceEnv.getTopNode()` | Returns the first available `HTMLElement` inside the Salesforce DOM hierarchy | +| `salesForceEnv.addGlobalEvent(eventName, handler, htmlElement)` | Attaches a global event to the first available HTML element | +| `salesForceEnv.getTopNode()` | Returns the first available HTML element inside the Salesforce DOM hierarchy | + +```jsx {4,7} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; + +salesForceEnv.detect(); +``` ### Additional exported function @@ -63,6 +73,17 @@ You can use the following methods of the `salesForceEnv` helper class: | :------------------- | :-------------------------------------------------------------------------------- | | `enableSalesForce()` | Manually sets the Salesforce environment when automatic detection is unavailable | +```jsx {5,8} +import { + Kanban, + Toolbar, + salesForceEnv, + enableSalesForce +} from "@dhx/trial-kanban"; + +enableSalesForce(); +``` + ## Workflow steps 1. Add the `data-wx-root="true"` attribute to your LWC container diff --git a/docs/news/whats_new.md b/docs/news/whats_new.md index 68ba7ac..c8efdb7 100644 --- a/docs/news/whats_new.md +++ b/docs/news/whats_new.md @@ -12,7 +12,7 @@ If you are updating Kanban from an older version, check [Migration to newer vers Released on October 14, 2025 -[Review of release on the blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-7/) +[Review of release on the blog](https://dhtmlx.com/blog/meet-dhtmlx-kanban-1-7/) ### Salesforce Integration diff --git a/docusaurus.config.js b/docusaurus.config.js index 74cda40..f4ee8f7 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -134,17 +134,30 @@ const onAfterDataTransformation = (data) => { const config = { noIndex: false, title: 'DHTMLX JavaScript Kanban Docs', - tagline: 'DHTMLX JavaScript Kanban Docs', + tagline: 'DHTMLX JavaScript Kanban Docs', url: 'https://docs.dhtmlx.com', - baseUrl: '/kanban/', - + baseUrl: process.env.DOCUSAURUS_BASEURL || '/kanban/', + i18n: { + defaultLocale: 'en', + locales: ['en', 'de', 'ru', 'zh', 'ko'], + localeConfigs: { + zh: { + htmlLang: 'zh-CN', + label: '中文' + }, + } + }, onBrokenLinks: 'warn', - onBrokenMarkdownLinks: 'warn', onBrokenAnchors: 'warn', favicon: 'img/favicon.ico', organizationName: 'DHTMLX', // Usually your GitHub org/user name. projectName: 'docs-kanban', // Usually your repo name. trailingSlash: true, + markdown: { + hooks: { + onBrokenMarkdownLinks: 'warn', + } + }, scripts:[ { src: 'https://dhtmlx.com/gtag/docs.js', @@ -217,7 +230,11 @@ const config = { "label": "Download", "href": "https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml", "position": "right" - } + }, + { + type: 'localeDropdown', + position: 'right', + }, ], }, footer: { diff --git a/i18n/cn/code.json b/i18n/cn/code.json new file mode 100644 index 0000000..1637690 --- /dev/null +++ b/i18n/cn/code.json @@ -0,0 +1,444 @@ +{ + "theme.ErrorPageContent.title": { + "message": "此页面崩溃了。", + "description": "页面崩溃时备用页面的标题" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "滚动回顶部", + "description": "返回顶部按钮的ARIA标签" + }, + "theme.blog.archive.title": { + "message": "存档", + "description": "博客存档页面的页面及主标题" + }, + "theme.blog.archive.description": { + "message": "存档", + "description": "博客存档页面的页面及主描述" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "博客列表页面导航", + "description": "博客分页的ARIA标签" + }, + "theme.blog.paginator.newerEntries": { + "message": "更新的文章", + "description": "用于导航到较新博客文章页面(上一页)的标签" + }, + "theme.blog.paginator.olderEntries": { + "message": "更早的文章", + "description": "用于导航到较旧博客文章页面(下一页)的标签" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "博客文章页面导航", + "description": "博客文章分页的ARIA标签" + }, + "theme.blog.post.paginator.newerPost": { + "message": "更新的文章", + "description": "导航到较新/上一篇文章的博客文章按钮标签" + }, + "theme.blog.post.paginator.olderPost": { + "message": "更早的文章", + "description": "导航到较旧/下一篇文章的博客文章按钮标签" + }, + "theme.tags.tagsPageLink": { + "message": "查看所有标签", + "description": "指向标签列表页面的链接标签" + }, + "theme.colorToggle.ariaLabel": { + "message": "切换深色和浅色模式(当前为 {mode})", + "description": "导航栏颜色模式切换按钮的ARIA标签" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "深色模式", + "description": "深色模式的名称" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "浅色模式", + "description": "浅色模式的名称" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "面包屑导航", + "description": "面包屑导航的ARIA标签" + }, + "theme.docs.DocCard.categoryDescription.plurals": { + "message": "1 个项目|{count} 个项目", + "description": "生成的索引中类别卡的默认描述,说明该类别包含多少项目" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "文档页面", + "description": "文档分页的ARIA标签" + }, + "theme.docs.paginator.previous": { + "message": "上一页", + "description": "用于导航到上一篇文档的标签" + }, + "theme.docs.paginator.next": { + "message": "下一页", + "description": "用于导航到下一篇文档的标签" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "一个文档被标记|{count} 个文档被标记", + "description": "“{count} 个文档被标记”的复数形式标签。根据语言支持使用尽可能多的复数形式(用“|”分隔)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "带有“{tagName}”的 {nDocsTagged}", + "description": "文档标签页面的标题" + }, + "theme.docs.versionBadge.label": { + "message": "版本: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "这是 {siteTitle} {versionLabel} 版本的未发布文档。", + "description": "用于告知用户正在浏览未发布文档版本的标签" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "这是 {siteTitle} {versionLabel} 的文档,该版本已不再维护。", + "description": "用于告知用户正在浏览不再维护的文档版本的标签" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "有关最新文档,请参见 {latestVersionLink}({versionLabel})。", + "description": "用于提示用户查看最新版本的标签" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "最新版本", + "description": "最新版本建议链接的标签" + }, + "theme.common.editThisPage": { + "message": "编辑此页面", + "description": "编辑当前页面的链接标签" + }, + "theme.common.headingLinkTitle": { + "message": "直达链接至 {heading}", + "description": "指向标题的链接标题" + }, + "theme.lastUpdated.atDate": { + "message": " 于 {date}", + "description": "描述页面最后更新时间的日期词汇" + }, + "theme.lastUpdated.byUser": { + "message": " 由 {user}", + "description": "描述页面最后更新者的词汇" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "最后更新于{atDate}{byUser}", + "description": "显示页面最后更新时间及更新者的句子" + }, + "theme.NotFound.title": { + "message": "页面未找到", + "description": "404页面的标题" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "版本", + "description": "移动视图下导航栏版本下拉菜单的标签" + }, + "theme.tags.tagsListLabel": { + "message": "标签:", + "description": "标签列表旁边的标签" + }, + "theme.admonition.caution": { + "message": "注意", + "description": "Caution 提示框的默认标签(:::caution)" + }, + "theme.admonition.danger": { + "message": "危险", + "description": "Danger 提示框的默认标签(:::danger)" + }, + "theme.admonition.info": { + "message": "信息", + "description": "Info 提示框的默认标签(:::info)" + }, + "theme.admonition.note": { + "message": "注释", + "description": "Note 提示框的默认标签(:::note)" + }, + "theme.admonition.tip": { + "message": "提示", + "description": "Tip 提示框的默认标签(:::tip)" + }, + "theme.admonition.warning": { + "message": "警告", + "description": "Warning 提示框的默认标签(:::warning)" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "关闭", + "description": "公告栏关闭按钮的ARIA标签" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "博客最新文章导航", + "description": "博客侧边栏中最近文章的ARIA标签" + }, + "theme.CodeBlock.copied": { + "message": "已复制", + "description": "代码块中复制按钮的标签" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "复制代码到剪贴板", + "description": "复制代码按钮的ARIA标签" + }, + "theme.CodeBlock.copy": { + "message": "复制", + "description": "代码块中复制按钮的标签" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "切换自动换行", + "description": "代码块行自动换行切换按钮的标题属性" + }, + "theme.DocSidebarItem.expandCategoryAriaLabel": { + "message": "展开侧边栏类别 '{label}'", + "description": "展开侧边栏类别的ARIA标签" + }, + "theme.DocSidebarItem.collapseCategoryAriaLabel": { + "message": "折叠侧边栏类别 '{label}'", + "description": "折叠侧边栏类别的ARIA标签" + }, + "theme.NavBar.navAriaLabel": { + "message": "主导航", + "description": "主导航的ARIA标签" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "语言", + "description": "移动端语言切换下拉菜单的标签" + }, + "theme.NotFound.p1": { + "message": "我们无法找到您要查找的内容。", + "description": "404页面的第一段文字" + }, + "theme.NotFound.p2": { + "message": "请联系将您链接到原始URL的网站所有者,告知他们的链接已失效。", + "description": "404页面的第二段文字" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "本页内容", + "description": "折叠目录组件按钮使用的标签" + }, + "theme.blog.post.readMore": { + "message": "阅读更多", + "description": "博客文章摘要中链接到完整博客文章的标签" + }, + "theme.blog.post.readMoreLabel": { + "message": "阅读关于 {title} 的更多内容", + "description": "从摘要链接到完整博客文章的ARIA标签" + }, + "theme.blog.post.readingTime.plurals": { + "message": "阅读时间1分钟|阅读时间 {readingTime} 分钟", + "description": "“{readingTime} 分钟阅读时间”的复数形式标签。根据语言支持使用尽可能多的复数形式(用“|”分隔)" + }, + "theme.docs.breadcrumbs.home": { + "message": "首页", + "description": "面包屑导航中主页的ARIA标签" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "折叠侧边栏", + "description": "文档侧边栏折叠按钮的标题属性" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "折叠侧边栏", + "description": "文档侧边栏折叠按钮的ARIA标签" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "文档侧边栏", + "description": "侧边栏导航的ARIA标签" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "关闭导航栏", + "description": "移动侧边栏关闭按钮的ARIA标签" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "切换导航栏", + "description": "移动端导航汉堡菜单按钮的ARIA标签" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← 返回主菜单", + "description": "移动导航栏侧边栏二级菜单中返回主菜单的返回按钮标签(常用于显示文档侧边栏)" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "展开侧边栏", + "description": "文档侧边栏展开按钮的ARIA标签和标题属性" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "展开侧边栏", + "description": "文档侧边栏展开按钮的ARIA标签和标题属性" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "找到一篇文档|找到 {count} 篇文档", + "description": "“找到 {count} 篇文档”的复数形式标签。根据语言支持使用尽可能多的复数形式(用“|”分隔)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "\"{query}\" 的搜索结果", + "description": "非空查询的搜索页面标题" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "搜索文档", + "description": "空查询的搜索页面标题" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "在此输入搜索内容", + "description": "搜索页面输入框的占位符" + }, + "theme.SearchPage.inputLabel": { + "message": "搜索", + "description": "搜索页面输入框的ARIA标签" + }, + "theme.SearchPage.algoliaLabel": { + "message": "由 Algolia 提供搜索", + "description": "Algolia 提示的ARIA标签" + }, + "theme.SearchPage.noResultsText": { + "message": "未找到结果", + "description": "空搜索结果时的段落文字" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "正在获取新结果...", + "description": "获取新搜索结果时的段落文字" + }, + "theme.SearchBar.seeAll": { + "message": "查看全部 {count} 个结果" + }, + "theme.SearchBar.label": { + "message": "搜索", + "description": "搜索按钮的ARIA标签和占位符" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "清除查询", + "description": "搜索框重置按钮的标签和ARIA标签" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "取消", + "description": "搜索框取消按钮的标签和ARIA标签" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "最近", + "description": "最近搜索的标题" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "无最近搜索", + "description": "无最近搜索时的文本" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "保存此搜索", + "description": "保存最近搜索按钮的标签" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "从历史记录中移除此搜索", + "description": "移除最近搜索按钮的标签" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "收藏", + "description": "收藏搜索的标题" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "从收藏中移除此搜索", + "description": "移除收藏搜索按钮的标签" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "无法获取结果", + "description": "搜索模态框错误屏幕的标题" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "您可能需要检查您的网络连接。", + "description": "搜索模态框错误屏幕的帮助文本" + }, + "theme.SearchModal.footer.selectText": { + "message": "选择", + "description": "Enter键执行选择操作的说明文本" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "回车键", + "description": "执行选择操作的回车键按钮ARIA标签" + }, + "theme.SearchModal.footer.navigateText": { + "message": "导航", + "description": "上下箭头键执行导航操作的说明文本" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "向上箭头", + "description": "执行向上导航操作的向上箭头键按钮ARIA标签" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "向下箭头", + "description": "执行向下导航操作的向下箭头键按钮ARIA标签" + }, + "theme.SearchModal.footer.closeText": { + "message": "关闭", + "description": "Esc键执行关闭操作的说明文本" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Esc键", + "description": "关闭模态框的Esc键按钮ARIA标签" + }, + "theme.SearchModal.footer.searchByText": { + "message": "搜索提供者", + "description": "搜索由Algolia提供的说明文本" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "无结果", + "description": "说明没有搜索结果的文本" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "尝试搜索", + "description": "无结果时的建议搜索文本" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "认为此查询应该返回结果?", + "description": "用户认为缺少结果时的提示文本" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "告诉我们。", + "description": "报告缺少结果的链接文本" + }, + "theme.SearchModal.placeholder": { + "message": "搜索文档", + "description": "DocSearch弹出模态框输入框的占位符" + }, + "theme.blog.post.plurals": { + "message": "一篇文章|{count} 篇文章", + "description": "\"{count} 篇文章\"的复数形式标签。根据语言支持使用尽可能多的复数形式(用“|”分隔)" + }, + "theme.blog.tagTitle": { + "message": "带有“{tagName}”标签的 {nPosts} 篇文章", + "description": "博客标签页面的标题" + }, + "theme.blog.author.pageTitle": { + "message": "{authorName} - {nPosts}", + "description": "博客作者页面的标题" + }, + "theme.blog.authorsList.pageTitle": { + "message": "作者", + "description": "作者列表页面的标题" + }, + "theme.blog.authorsList.viewAll": { + "message": "查看所有作者", + "description": "指向博客作者页面的链接标签" + }, + "theme.blog.author.noPosts": { + "message": "该作者尚未撰写任何文章。", + "description": "作者没有博客文章时的文本" + }, + "theme.contentVisibility.unlistedBanner.title": { + "message": "非公开页面", + "description": "非公开内容横幅标题" + }, + "theme.contentVisibility.unlistedBanner.message": { + "message": "此页面为非公开。搜索引擎不会索引它,只有拥有直接链接的用户可以访问。", + "description": "非公开内容横幅信息" + }, + "theme.contentVisibility.draftBanner.title": { + "message": "草稿页面", + "description": "草稿内容横幅标题" + }, + "theme.contentVisibility.draftBanner.message": { + "message": "此页面为草稿,仅在开发环境可见,并且不会包含在生产构建中。", + "description": "草稿内容横幅信息" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "再试一次", + "description": "React错误边界捕获错误时,重新尝试渲染的按钮标签" + }, + "theme.common.skipToMainContent": { + "message": "跳至主要内容", + "description": "无障碍跳转至主要内容的标签,允许通过键盘Tab/Enter快速导航" + }, + "theme.tags.tagsPageTitle": { + "message": "标签", + "description": "标签列表页面的标题" + } +} \ No newline at end of file diff --git a/i18n/cn/docusaurus-plugin-content-docs/current.json b/i18n/cn/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..84ad445 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,134 @@ +{ + "version.label": { + "message": "下一个", + "description": "当前版本的标签" + }, + "sidebar.docs.category.What's new and migration": { + "message": "新功能和迁移", + "description": "侧边栏文档中新功能和迁移类别的标签" + }, + "sidebar.docs.category.What's new and migration.link.generated-index.title": { + "message": "新功能和迁移", + "description": "侧边栏文档中新功能和迁移类别的生成索引页面标题" + }, + "sidebar.docs.category.API": { + "message": "API", + "description": "侧边栏文档中API类别的标签" + }, + "sidebar.docs.category.Kanban methods": { + "message": "看板方法", + "description": "侧边栏文档中看板方法类别的标签" + }, + "sidebar.docs.category.Kanban internal API": { + "message": "看板内部API", + "description": "侧边栏文档中看板内部API类别的标签" + }, + "sidebar.docs.category.Kanban internal API.link.generated-index.title": { + "message": "内部API概述", + "description": "侧边栏文档中看板内部API类别的生成索引页面标题" + }, + "sidebar.docs.category.Event Bus methods": { + "message": "事件总线方法", + "description": "侧边栏文档中事件总线方法类别的标签" + }, + "sidebar.docs.category.Export methods": { + "message": "导出方法", + "description": "侧边栏文档中导出方法类别的标签" + }, + "sidebar.docs.category.State methods": { + "message": "状态方法", + "description": "侧边栏文档中状态方法类别的标签" + }, + "sidebar.docs.category.Kanban events": { + "message": "看板事件", + "description": "侧边栏文档中看板事件类别的标签" + }, + "sidebar.docs.category.Kanban properties": { + "message": "看板属性", + "description": "侧边栏文档中看板属性类别的标签" + }, + "sidebar.docs.category.Toolbar methods": { + "message": "工具栏方法", + "description": "侧边栏文档中工具栏方法类别的标签" + }, + "sidebar.docs.category.Toolbar properties": { + "message": "工具栏属性", + "description": "侧边栏文档中工具栏属性类别的标签" + }, + "sidebar.docs.category.Common settings": { + "message": "通用设置", + "description": "侧边栏文档中通用设置类别的标签" + }, + "sidebar.docs.category.Backend API": { + "message": "后端API", + "description": "侧边栏文档中后端API类别的标签" + }, + "sidebar.docs.category.Backend API.link.generated-index.title": { + "message": "后端API", + "description": "侧边栏文档中后端API类别的生成索引页面标题" + }, + "sidebar.docs.category.RestDataProvider API": { + "message": "RestDataProvider API", + "description": "侧边栏文档中RestDataProvider API类别的标签" + }, + "sidebar.docs.category.RestDataProvider API.link.generated-index.title": { + "message": "RestDataProvider API", + "description": "侧边栏文档中RestDataProvider API类别的生成索引页面标题" + }, + "sidebar.docs.category.REST methods": { + "message": "REST方法", + "description": "侧边栏文档中REST方法类别的标签" + }, + "sidebar.docs.category.REST routes": { + "message": "REST路由", + "description": "侧边栏文档中REST路由类别的标签" + }, + "sidebar.docs.category.GET routes": { + "message": "GET路由", + "description": "侧边栏文档中GET路由类别的标签" + }, + "sidebar.docs.category.GET routes.link.generated-index.title": { + "message": "GET路由", + "description": "侧边栏文档中GET路由类别的生成索引页面标题" + }, + "sidebar.docs.category.POST routes": { + "message": "POST路由", + "description": "侧边栏文档中POST路由类别的标签" + }, + "sidebar.docs.category.POST routes.link.generated-index.title": { + "message": "POST路由", + "description": "侧边栏文档中POST路由类别的生成索引页面标题" + }, + "sidebar.docs.category.PUT routes": { + "message": "PUT路由", + "description": "侧边栏文档中PUT路由类别的标签" + }, + "sidebar.docs.category.PUT routes.link.generated-index.title": { + "message": "PUT路由", + "description": "侧边栏文档中PUT路由类别的生成索引页面标题" + }, + "sidebar.docs.category.DELETE routes": { + "message": "DELETE路由", + "description": "侧边栏文档中DELETE路由类别的标签" + }, + "sidebar.docs.category.DELETE routes.link.generated-index.title": { + "message": "DELETE路由", + "description": "侧边栏文档中DELETE路由类别的生成索引页面标题" + }, + "sidebar.docs.category.Backend and frameworks integration": { + "message": "后端和框架集成", + "description": "侧边栏文档中后端和框架集成类别的标签" + }, + "sidebar.docs.category.Backend and frameworks integration.link.generated-index.title": { + "message": "后端和框架集成", + "description": "侧边栏文档中后端和框架集成类别的生成索引页面标题" + }, + "sidebar.docs.category.Guides": { + "message": "指南", + "description": "侧边栏文档中指南类别的标签" + }, + "sidebar.docs.category.Guides.link.generated-index.title": { + "message": "指南", + "description": "侧边栏文档中指南类别的生成索引页面标题" + } +} \ No newline at end of file diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md new file mode 100644 index 0000000..962fb2d --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md @@ -0,0 +1,52 @@ +--- +sidebar_label: $meta +title: $meta 参数 +description: 您可以在DHTMLX JavaScript看板库的文档中了解 $meta 参数。浏览开发者指南和API参考,试用代码示例和在线演示,并免费下载30天评估版的DHTMLX看板。 +--- + +# $meta + +### 说明 + +@short: 一个包含额外设置的对象,用于自定义看板的方法和事件 + +:::important +`$meta` 对象提供了额外的参数,用于配置与看板事件相关的方法! +::: + +### 用法 + +~~~jsx {} +$meta?: { + skipHistory?: boolean +}; +~~~ + +### 参数 + +`$meta` 对象包含以下参数: + +- `skipHistory` - (可选)控制该操作是否应被排除在看板的历史记录跟踪之外 + +### 示例 + +~~~jsx {11-13} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 添加新卡片,并在看板历史中跳过此操作 +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" }, + $meta: { + skipHistory: true + } +}); +~~~ + +**更新日志:** `$meta` 参数自 v1.3 版本引入 + +**相关文章:** [`history`](/api/config/js_kanban_history_config.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md new file mode 100644 index 0000000..cfe53ce --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: cardHeight +title: cardHeight 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 cardHeight 配置。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX Kanban 的免费 30 天评估版。 +--- + +# cardHeight + +### 描述 + +@short: 可选。定义卡片的高度。 + +### 用法 + +~~~jsx {} +cardHeight?: number; // px +~~~ + +:::important +当同时使用 [`renderType: "lazy"`](/api/config/js_kanban_rendertype_config.md) 和 [`scrollType: "default"`](/api/config/js_kanban_scrolltype_config.md) 时,务必通过 `cardHeight` 属性设置卡片的固定高度。否则,卡片将无法显示。 +::: + +### 示例 + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + cardHeight: 150, // px + // 其他参数 +}); +~~~ + +**更新日志:** 此属性自版本 1.2 起引入 + +**相关文档:** [配置](/guides/configuration#卡片) + +**相关示例:** [Kanban. 懒加载渲染与列滚动](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md new file mode 100644 index 0000000..2a953df --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md @@ -0,0 +1,153 @@ +--- +sidebar_label: cards +title: cards 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 cards 配置。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX 看板的免费30天评估版。 +--- + +# cards + +### 描述 + +@short: 可选。包含卡片数据的对象数组 + +### 用法 + +~~~jsx {} +cards?: [ + { + id?: string | number, + label?: string, + description?: string, + progress?: number, + start_date?: Date, + end_date?: Date, + attached?: [ + { + id: string | number, + url?: string, + previewURL?: string, + coverURL?: string, + name?: string, + isCover?: boolean + }, {...} + ], + color?: string, + users?: array | string | number, + // users?: array - 多用户时使用,若使用 "multiselect" 编辑器类型分配用户 + // users?: string | number - 单用户时使用,若使用 "combo" 或 "select" 编辑器类型分配用户 + priority?: string | number, + css?: string, + votes?: array, + comments?: [ + { + id: string | number, + userId: string | number, + cardId: string | number, + text?: string, + date?: Date, + }, {...} + ], + [custom_key: string]?: any + }, {...} // 其他卡片数据 +]; +~~~ + +### 参数 + +每个卡片可以包含以下参数: + +- `id` - (可选)卡片的**ID**,用于通过相关方法管理卡片 +- `label` - (可选)显示在**标签**字段中的文本标签 +- `description` - (可选)显示在**描述**字段中的描述文本 +- `progress` - (可选)进度条数值,范围0到100,显示在**进度条**字段 +- `start_date` - (可选)开始日期,作为 Date 对象(避免字符串日期),显示在**开始日期**字段 +- `end_date` - (可选)结束日期,作为 Date 对象(避免字符串日期),显示在**结束日期**字段 +- `attached` - (可选)包含附件详情的数组,显示在**附件**字段。每个对象可包含: + - `id` - (必需)附件的**ID** + - `url` - (可选)文件路径 + - `previewURL` - (可选)预览图片路径 + - `coverURL` - (可选)设置为封面的图片路径 + - `name` - (可选)文件名 + - `isCover` - (可选)当为 **true** 时,从 "coverURL" 加载封面图片 +- `color` - (可选)以 HEX 颜色代码表示卡片顶部线条颜色 +- `users` - (可选)多用户时为用户 ID 的**数组**,单用户时为**字符串或数字**。分配用户时,在 [cardShape.users](../js_kanban_cardshape_config) 属性中定义用户数据数组。用户显示在**用户**字段 + +:::info +`users?: array` - 当使用 [**multiselect**](../js_kanban_editorshape_config/#--comboselect-和-multiselect-类型参数) 编辑器类型分配多个用户时,使用用户 **ID** 的**数组** + +`users?: string | number` - 当使用 [**combo** 或 **select**](../js_kanban_editorshape_config/#--comboselect-和-multiselect-类型参数) 编辑器类型分配单个用户时,指定单个用户 **ID** +::: + +- `priority` - (可选)卡片的优先级 **ID**。在 [cardShape.priority](../js_kanban_cardshape_config) 属性中定义优先级数组。显示在**优先级**字段 +- `css` - (可选)卡片的自定义 CSS 样式 +- `votes` - (可选)投票用户 ID 数组 +- `comments` - (可选)评论对象数组,包括: + - `id` - (必需)评论的**ID** + - `userId` - (必需)评论者的用户 **ID** + - `cardId` - (必需)评论所属的卡片 **ID** + - `text` - (可选)评论文本,可包含 HTML 标记 + - `date` - (可选)表示评论发布时间的 Date 对象(编辑后不更新) +- `custom_key` - (可选)卡片的任何自定义键。可用于定位卡片在列或行中的位置,详见 [columnKey](../js_kanban_columnkey_config) 和 [rowKey](../js_kanban_rowkey_config) 属性 + +:::info +要动态加载新的卡片数据,可以使用 [**parse()**](../../methods/js_kanban_parse_method) 方法。 +::: + +### 示例 + +~~~jsx {1-40,44} +const cards = [ + { + id: 1, + label: "Integration with React", + description: "Some description", + progress: 25, + start_date: new Date("02/24/2022"), + end_date: new Date("02/24/2023"), + attached: [ + { + id: 234, + url: "../assets/img-1.jpg", + previewURL: "../assets/img-1.jpg", + coverURL: "../assets/img-1.jpg", + name: "img-1.jpg", + isCover: true + }, {...} // 其他附件数据 + ], + color: "#65D3B3", + users: [1,2], + votes: [3,6,8], + comments: [ + { + id: 1, + userId: 1, + cardId: 1, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays. ", + date: new Date(), + }, {...} // 其他评论 + ], + priority: 1, + // 自定义字段,用于将卡片放置在 "feature" 行 + // 需要将 rowKey 配置设置为 "type" 值 + type: "feature", + // 自定义字段,用于将卡片放置在 "backlog" 列 + // 需要将 columnKey 配置设置为 "stage" 值 + stage: "backlog", + css: "red", + }, {...} // 其他卡片数据 +]; + +new kanban.Kanban("#root", { + columns, + cards, + // 其他参数 +}); +~~~ + +**更新日志:** ***css***、***comments*** 和 ***votes*** 参数自 v1.4 版本引入 + +**相关内容:** +- [处理数据](/guides/working_with_data) +- [updateCard()](/api/methods/js_kanban_updatecard_method.md) + +**相关示例:** [Kanban. Styling cards](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md new file mode 100644 index 0000000..af6f719 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md @@ -0,0 +1,322 @@ +--- +sidebar_label: cardShape +title: cardShape 配置 +description: 探索 DHTMLX JavaScript 看板库中的 cardShape 配置。查看开发者指南、API 参考,试用代码示例和在线演示,并免费下载 DHTMLX 看板的30天试用版。 +--- + +# cardShape + +### 描述 + +@short: 可选。用于控制卡片外观的设置对象。 + +### 用法 + +~~~jsx {} +cardShape?: { + label?: boolean | { show?: boolean }, + description?: boolean | { show?: boolean }, + progress?: boolean | { show?: boolean }, + attached?: boolean | { show?: boolean }, + cover?: boolean | { show?: boolean }, + comments?: boolean | { show?: boolean }, + confirmDeletion?: boolean | { show?: boolean }, + start_date?: boolean | { + show?: boolean, + format?: string + }, + end_date?: boolean | { + show?: boolean, + format?: string + }, + color?: boolean | { + show?: boolean, + values?: array + }, + menu?: boolean | { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, card }) => void + }, + {...} + ] | ({ card, store }) => array | boolean + }, + users?: boolean | { + show?: boolean, + values: [ + { + id: string | number, + label?: string, + avatar?: string + }, + {...} // 其他用户数据 + ], + maxCount?: number | false + }, + priority?: boolean | { + show?: boolean, + values?: [ + { + id: string | number, + label?: string, + color: string + }, + {...} // 其他优先级数据 + ] + }, + votes?: boolean | { + show?: boolean, + clickable?: boolean + }, + css?: (card) => string, + headerFields?: [ + { + key: string, + label?: string, + css?: string + }, + {...} // 其他字段数据 + ] +}; +~~~ + +### 参数 + +:::info +有时参数可以用**简写**或**扩展**形式设置。例如: + +~~~jsx {3,6} + label: boolean | { show?: boolean } + // 简写形式 + label: true + // 或者 + // 扩展形式 + label: { show: true } +~~~ +::: + +**cardShape** 对象允许你通过配置以下字段来控制卡片的显示: + +- `label` - (可选)切换 **标签** 字段的显示 +- `description` - (可选)切换 **描述** 字段的显示 +- `progress` - (可选)切换 **进度** 字段的显示 +- `attached` - (可选)切换 **附件** 字段的显示 +- `cover` - (可选)切换 **卡片图片** 的显示 +- `comments` - (可选)切换卡片上的 **评论** 显示 +- `confirmDeletion` - (可选)切换删除卡片时的 **确认对话框** +- `start_date` - (可选)配置 **开始日期** 字段 + - `show` - (可选)切换开始日期的显示 + - `format` - (可选)设置日期格式。可用选项参见 [这里](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `end_date` - (可选)配置 **结束日期** 字段 + - `show` - (可选)切换结束日期的显示 + - `format` - (可选)设置日期格式。可用选项参见 [这里](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `color` - (可选)配置卡片顶部的 **颜色线** + - `show` - (可选)切换颜色线的显示 + - `values` - (可选)HEX 颜色码数组 +- `menu` - (可选)配置 **卡片上下文菜单** + - `show` - (可选)启用或禁用上下文菜单 + - `items` - (可选)菜单项对象数组,属性包括: + - `id` - (可选)菜单项 ID。内置操作包括: + - ***"set-edit"*** - 编辑卡片名称 + - ***"delete-card"*** - 删除卡片 + - `icon` - (可选)图标类名(例如 *mdi-delete*) + - `text` - (可选)菜单项标签 + - `disabled` - (可选)启用或禁用菜单项 + - `onClick` - (可选)回调函数,接收: + - ***id*** - 菜单项 ID + - ***item*** - 菜单项数据 + - ***card*** - 目标卡片数据 + +:::info +你还可以为 `items` 提供一个自定义函数,该函数接收: +- ***card*** - 当前卡片数据 +- ***store*** - *dataStore* 对象 + +这样你可以通过返回 *null* 或 *false* 来针对特定卡片自定义或隐藏菜单: + +~~~jsx {} + items: ({ card, store }) => { + if(card.id === 1) + return false + return [ + { id: "set-edit", icon: "wxi-edit", label: "Edit" }, + { id: "delete-card", icon: "wxi-delete", label: "Delete" } + ] + } +~~~ +::: + +- `users` - (可选)配置 **用户** 字段 + - `show` - (可选)切换已分配用户的显示 + - `values` - (必需)用户对象数组: + - `id` - (必需)用户 ID + - `label` - (可选)用户名 + - `avatar` - (可选)用户头像路径 + - `maxCount` - (可选)卡片上显示的最大用户数,或设置为 ***false*** 表示无限制 + + 设置 `maxCount` 可控制卡片上显示多少分配的用户。设置为 `false` 则显示所有分配用户。 + +:::info +***users*** 字段默认关闭。启用时,请将 `show` 设为 `true` 并在 `values` 中提供用户数据。通过编辑器分配用户时,请在 [`editorShape`](/api/config/js_kanban_editorshape_config.md#--comboselect-和-multiselect-类型参数) 中配置相应控件。单选请使用 ***select***,多选请使用 ***multiselect***。 + +~~~jsx {} + cardShape: { + users: { + show: true, + values: [ + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } + ], + maxCount: 4 // 限制每张卡最多显示4个用户 + } + } +~~~ +::: + +- `priority` - (可选)配置 **优先级** 字段 + - `show` - (可选)切换优先级显示 + - `values` - (可选)优先级对象数组: + - `id` - (必需)优先级 ID + - `label` - (可选)优先级名称 + - `color` - (必需)HEX 颜色码 +- `votes` - (可选)配置 **投票** 功能 + - `show` - (可选)切换卡片和编辑器中的投票图标 + - `clickable` - (可选)若为 `true`,用户可通过点击卡片上的图标投票;否则只能通过编辑器投票 +- `css` - 返回 CSS 类名的函数,用于条件式自定义卡片样式 +- `headerFields` - (可选)定义 **自定义字段** 的对象数组 + - `key` - (必需)自定义字段键,用于通过 [editorShape](../js_kanban_editorshape_config) 配置编辑器 + - `label` - (可选)自定义字段标签 + - `css` - (可选)自定义字段的 CSS 类名 + +:::info +如果未通过 **cardShape** 设置卡片选项,则采用默认参数 **defaultCardShape**。 +::: + +### 默认配置 + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "High" }, + { id: 2, color: "#F1B941", label: "Medium" }, + { id: 3, color: "#77D257", label: "Low" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +export const getDefaultCardMenuItems = ({ store }: { store: DataStore }) => { + const { readonly } = store.getState(); + const baseItems = [ + { id: "duplicate-card", icon: "wxi-content-copy", text: "Duplicate" }, + { id: "delete-card", icon: "wxi-delete-outline", text: "Delete" } + ]; + + if (!readonly?.select && readonly?.edit) { + return [ + { id: "set-edit", icon: "wxi-edit-outline", text: "Edit" }, + ...baseItems, + ]; + } + return baseItems; +}; + +const defaultCardShape = { + label: { show: true }, + description: { show: false }, + progress: { show: false }, + start_date: { show: false }, + end_date: { show: false }, + users: { show: false }, + confirmDeletion: { show: true }, + priority: { + show: false, + values: defaultPriorities + }, + color: { + show: false, + values: defaultColors + }, + cover: { show: false }, + attached: { show: false }, + menu: { show: true } +}; +~~~ + +### 示例 + +~~~jsx {14-49,54} +const users = [ // 示例用户数据 + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // 示例优先级数据 + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardColors = ["#65D3B3", "#FFC975", "#58C3FE"]; + +const cardShape = { // 卡片显示设置 + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + cover: false, + comments: false, + confirmDeletion: false, + color: { + show: true, + values: cardColors + }, + users: { + show: true, + values: users, + maxCount: false + }, + priority: { + show: true, + values: cardPriority + }, + votes: { + show: true, + clickable: true + }, + css: (card) => card.type == "feature" ? "green" : "red", + headerFields: [ + { // 自定义字段示例 + key: "sprint", + css: "custom_style", + label: "Sprint" + } + ] +}; + +new kanban.Kanban("#root", { + cards, + columns, + cardShape, + // 其他参数 +}); +~~~ + +**更新日志:** +- ***comments***、***css*** 和 ***votes*** 选项在 v1.4 版本新增 +- ***menu.items[0].label*** 选项在 v1.4 版本重命名为 ***menu.items[0].text*** +- ***users.maxCount*** 和 ***votes.clickable*** 选项在 v1.6 版本新增 + +**相关文档:** [配置](/guides/configuration#卡片) + +**相关示例:** +- [看板。泳道、评论、投票](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) +- [看板。高亮显示过期和活动任务](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban) +- [看板。卡片样式设置](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) +- [看板。每个任务无限制用户分配](https://snippet.dhtmlx.com/w205dvzg?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md new file mode 100644 index 0000000..486ef88 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md @@ -0,0 +1,73 @@ +--- +sidebar_label: cardTemplate +title: cardTemplate 配置 +description: 了解 DHTMLX JavaScript 看板库中 cardTemplate 配置的全部内容。探索开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# cardTemplate + +### 描述 + +@short: 可选。生成并应用卡片的自定义 HTML 模板。 + +### 用法 + +~~~jsx +function cardTemplate ({ cardFields, selected, dragging, cardShape }){ + return "卡片的 HTML 模板"; +}; +~~~ + +### 参数 + +回调函数接收一个包含以下属性的对象: + +- `cardFields` - 包含卡片的数据 +- `selected` - 指示卡片是否被选中 +- `dragging` - 指示卡片是否正在被拖拽 +- `cardShape` - 卡片的配置对象 + +:::important +要为卡片模板添加上下文菜单,请在标记中包含自定义图标,并使用 `data-menu-id=${cardFields.id}` 属性,如下面示例所示。 +::: + +### 示例 + +~~~jsx {1-23,28} +const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + const { label, color, id } = cardFields; + if (selected) { + return ` +
+
+
+ +
+ Selected:${label} +
+ `; + } + return ` +
+
+
+ +
+ ${label} +
+ `; +} + +new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // 其他参数 +}); +~~~ + +**更新日志:** 上下文菜单支持自 v1.4 版本起引入 + +**相关文章:** [自定义](/guides/customization#自定义卡片) + +**相关示例:** [Kanban. Custom card](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md new file mode 100644 index 0000000..f0af2e7 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md @@ -0,0 +1,58 @@ +--- +sidebar_label: columnKey +title: columnKey 配置 +description: 探索 DHTMLX JavaScript Kanban 库中的 columnKey 配置。查找开发者指南、API 参考、代码示例、在线演示,并免费下载 DHTMLX Kanban 30 天试用版。 +--- + +# columnKey + +### 描述 + +@short: 可选。指定卡片所属的列。 + +:::info +要将卡片分配到特定的列,必须使用一个键(**column** 或自定义键)并将其设置为卡片数据对象中对应列的 **ID**。在组件配置中,**columnKey** 属性应设置为该键。 +::: + +### 用法 + +~~~jsx {} +columnKey?: string; +~~~ + +### 默认配置 + +:::note +如果未通过 **columnKey** 属性提供自定义列键,组件默认使用 **"column"** 键!在这种情况下,卡片数据对象应将 **column** 键设置为相应的列 **ID**。 + +~~~jsx {3} +const cards = [ + { + column: "backlog", + // 其他数据 + } +]; +~~~ +::: + +### 示例 + +~~~jsx {4,8,15} +const cards = [ + { + label: "Backlog task", + column_custom_key: "backlog" + }, + { + label: "In progress task", + column_custom_key: "inprogress" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + columnKey: "column_custom_key", + // 其他参数 +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md new file mode 100644 index 0000000..940846e --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md @@ -0,0 +1,107 @@ +--- +sidebar_label: columns +title: columns 配置 +description: 探索 DHTMLX JavaScript 看板库中 columns 的配置。查找开发者指南、API 参考、代码示例、在线演示,并免费下载 DHTMLX 看板的30天试用版。 +--- + +# columns + +### 描述 + +@short: 可选。包含列数据的对象数组 + +### 用法 + +~~~jsx {} +columns?: [ + { + id: string, + label?: string, + collapsed?: boolean, + limit?: number | object, + strictLimit?: boolean, + css?: string, + overlay?: any + }, + {...} // 其他列数据 +]; +~~~ + +### 参数 + +每个列可以使用以下属性(数据)进行配置: + +- `id` - (必需)列的唯一**ID**。用于通过相关方法管理该列。 +- `label` - (可选)显示在列头的标签。 +- `collapsed` - (可选)指示列的初始状态。若为***true***,列初始为折叠状态。默认值为***false***(展开)。 +- `limit` - (可选)可以是以下两种类型之一: + - `number` - 设置列中允许的最大卡片数。 + - `object` - 按行(泳道)的ID定义卡片限制。 +- `strictLimit` - (可选)启用严格限制。如果为***true***,用户不能添加超过**limit**参数指定数量的卡片。默认值为***false***。 +- `css` - (可选)为单个列应用自定义 CSS 样式。 +- `overlay` - (可选)为列添加覆盖层。这对于定义覆盖整个列的模板非常有用,例如: + +~~~jsx {} + overlay: template(` +
+ 不允许放置 + 只有测试人员可以将卡片移动到此列 +
`) +~~~ + +:::info +要动态更新列数据,可以使用 [`parse()`](../../methods/js_kanban_parse_method) 方法。 +::: + +### 示例 + +~~~jsx {1-31,34} +const columns = [ + { + label: "待办事项", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true, + css: "red" + }, + { + label: "进行中", + id: "inprogress", + collapsed: false, + limit: { + // 限制 “进行中” 列中 “Feature” 和 “Task” 行的卡片数量 + feature: 3, + task: 2 + }, + strictLimit: false + }, + { + label: "已完成", + id: "done", + overlay: template(` +
+ 不允许放置 + 只有测试人员可以将卡片移动到此列 +
`) + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + // 其他参数 +}); +~~~ + +**更新日志:** **css** 和 **overlay** 属性在版本 1.4 中引入。 + +**相关文章:** +- [处理数据](/guides/working_with_data) +- [updateColumn()](/api/methods/js_kanban_updatecolumn_method.md) + +**相关示例:** +- [看板。列和泳道的限制](https://snippet.dhtmlx.com/2blo6hx8?tag=kanban) +- [看板。通过自定义菜单更改列颜色](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [看板。禁止拖放到特定列](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md new file mode 100644 index 0000000..6a9e4db --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md @@ -0,0 +1,209 @@ +--- +sidebar_label: columnShape +title: columnShape 配置 +description: 探索 DHTMLX JavaScript 看板库中的 columnShape 配置。浏览开发者指南和 API 参考,测试代码示例和在线演示,并下载免费的 30 天试用版 DHTMLX 看板。 +--- + +# columnShape + +### 描述 + +@short: 可选。用于自定义列外观的设置对象 + +### 用法 + +~~~jsx {} +columnShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled?: boolean, + onClick?: ({ id, item, column }) => void + }, + {...} + ] | ({ column, columnIndex, columns, store }) => array | boolean + }, + fixedHeaders?: boolean, + css?: (column, cards) => string, + headerTemplate?: template(column => { + return "展开状态下列头的 HTML 模板"; + }), + collapsedTemplate?: template(column => { + return "折叠状态下列头的 HTML 模板"; + }), + confirmDeletion?: boolean +}; +~~~ + +### 参数 + +为了设置列的样式,**columnShape** 对象支持以下选项: + +- `menu` - (可选)列上下文菜单的设置。包括: + - `show` - (可选)切换列上下文菜单的显示与隐藏 + - `items` - (可选)定义菜单项的数组。每个菜单项可以包含: + - `id` - (可选)菜单项 ID。内置操作可使用以下值: + - ***"add-card"*** - 添加新卡片 + - ***"set-edit"*** - 编辑列名称 + - ***"move-column:left"*** - 向左移动列 + - ***"move-column:right"*** - 向右移动列 + - ***"delete-column"*** - 删除列 + - `icon` - (可选)菜单项的图标类,例如 *mdi-delete* + - `text` - (可选)菜单项标签 + - `disabled` - (可选)设置菜单项是否启用或禁用 + - `onClick` - (可选)回调函数,参数包括: + - ***id*** - 当前菜单项 ID + - ***item*** - 当前菜单项数据对象 + - ***column*** - 目标列数据对象 + +:::info +你也可以将 `items` 设置为一个函数,接收以下参数: + +- ***column*** - 当前列数据 +- ***columnIndex*** - 当前列索引 +- ***columns*** - 所有列数据的数组 +- ***store*** - *dataStore* 对象 + +这样可以为每个列创建自定义菜单,或者通过返回 *null* 或 *false* 来隐藏某些列的菜单: + +~~~jsx {} + items: ({ column, columnIndex, columns, store }) => { + if(column.id === "inprogress") + return null + + if (column.id === "backlog") + return [ + { id: "set-edit", icon: "wxi-edit", text: "重命名" }, + { + id: "delete-card", + icon: "wxi-delete", + text: "移除卡片" + } + ] + } +~~~ +::: + +- `fixedHeaders` - (可选)在垂直滚动时保持列头可见(默认值为 *true*)。注意:Kanban 必须启用滚动(限制高度)。 +- `css` - (可选)返回 CSS 类名的函数,用于条件性地设置列样式 +- `headerTemplate` - (可选)列展开时的列头 HTML 模板 +- `collapsedTemplate` - (可选)列折叠时的列头 HTML 模板 +- `confirmDeletion` - (可选)删除列时是否显示确认对话框 + +### 默认配置 + +~~~jsx {} +const getDefaultColumnMenuItems = ({ column, columnIndex, columns, store }) => [ + { id: "add-card", icon: "wxi-plus", text: "添加新卡片" }, + { id: "set-edit", icon: "wxi-edit", text: "重命名" }, + { + id: "move-column:left", + icon: "wxi-arrow-left", + text: "向左移动", + disabled: columnIndex <= 0 + }, + { + id: "move-column:right", + icon: "wxi-arrow-right", + text: "向右移动", + disabled: columnIndex >= columns.length - 1 + }, + { id: "delete-column", icon: "wxi-delete", text: "删除" } +]; +const columnShape = { + menu: { + show: true, + items: getDefaultColumnMenuItems + }, + fixedHeaders: true, + confirmDeletion: true +}; +~~~ + +### 示例 + +~~~jsx {1-58,64} +const columnShape = { + menu: { + show: true, + items: [ + { + id: "color", + text: "颜色", + items: [ + { + id:"yellow", + text: "黄色", + onClick: ({ column }) => changeColumnColor(column, "yellow") + }, + { + id:"red", + text: "红色", + onClick: ({ column }) => changeColumnColor(column, "red") + }, + { + id:"green", + text: "绿色", + onClick: ({ column }) => changeColumnColor(column, "green") + } + ] + } + ] + }, + fixedHeaders: false, + css: (column, cards) => column.id == "inprogress" && cards.length < 5 ? "green" : "red", + headerTemplate: template(column => { + return `
+ +
+ ${ + !column.column.collapsed + ? `
+ ${escapeHTML(column.column.label)} + (${column.columnState.cardsCount}) +
` + : "" + } + ${ + !column.column.collapsed + ? `
+ +
` + : "" + }`; + }), + collapsedTemplate: template(column => { + return `
+
${escapeHTML(column.column.label)} (${ + column.columnState?.cardsCount + })
+
`; + }), + confirmDeletion: true +}; + +new kanban.Kanban("#root", { + cards, + columns, + rows, + columnShape, + // 其他参数 +}); +~~~ + +**更新日志:** +- ***css*** 选项在 v1.4 中新增 +- ***menu.items[0].label*** 重命名为 ***menu.items[0].text*** 于 v1.4 +- ***fixedHeaders*** 选项在 v1.5 中新增 +- ***headerTemplate*** 和 ***collapsedTemplate*** 选项在 v1.6 中新增 + +**相关文档:** [配置](/guides/configuration) + +**相关示例:** +- [看板。通过自定义菜单更改列颜色](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [看板。固定表头、懒渲染和列滚动](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) +- [看板。列头模板](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md new file mode 100644 index 0000000..28bc056 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md @@ -0,0 +1,36 @@ +--- +sidebar_label: currentUser +title: currentUser 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 currentUser 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费30天评估版。 +--- + +# currentUser + +### 描述 + +@short: 可选。表示当前用户的 ID + +:::note +当前用户 ID 应当与 [`cardShape.users`](/api/config/js_kanban_cardshape_config.md) 属性中列出的某个 ID 匹配。如果未提供此 ID,评论将仅以只读模式访问。 +::: + +### 用法 + +~~~jsx {} +currentUser?: string | number; +~~~ + +### 示例 + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + currentUser: 1, + // 其他参数 +}); +~~~ + +**更新日志:** 此属性在版本 1.4 中引入 + +**相关示例:** [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md new file mode 100644 index 0000000..f32a074 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md @@ -0,0 +1,58 @@ +--- +sidebar_label: editor +title: editor 配置 +description: 探索 DHTMLX JavaScript 看板库中 editor 配置。查看开发者指南、API 参考,尝试代码示例和实时演示,并免费下载 DHTMLX 看板 30 天试用版。 +--- + +# editor + +### 描述 + +@short: 可选项。包含用于自定义看板编辑器的设置 + +### 用法 + +~~~jsx {} +editor?: { + autoSave?: boolean, + debounce?: number, + placement?: "sidebar" | "modal" +}; +~~~ + +### 参数 + +- `autoSave` - (可选)开启或关闭自动保存功能 +- `debounce` - (可选)设置自动保存数据前的延迟时间(仅当 ***autoSave: true*** 时生效) +- `placement` - (可选)定义编辑器的显示位置。可选值如下: + - `"sidebar"` - 以侧边栏形式显示编辑器 + - `"modal"` - 以模态窗口形式显示编辑器 + +### 默认配置 + +~~~jsx {} +editor: { + debounce: 100, + autoSave: true, + placement: "sidebar" +} +~~~ + +### 示例 + +~~~jsx {4-8} +new kanban.Kanban("#root", { + columns, + cards, + editor: { + autoSave: true, + debounce: 2000, + placement: "modal" + } + // 其他参数 +}); +~~~ + +**更新日志:** `placement` 选项自 v1.6 版本引入 + +**相关示例:** [Kanban. 在模态窗口中打开编辑器](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md new file mode 100644 index 0000000..e2aaf1a --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md @@ -0,0 +1,44 @@ +--- +sidebar_label: editorAutoSave +title: editorAutoSave 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 editorAutoSave 配置。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# + +

editorAutoSave

+ +:::danger +从版本 1.3 开始,`editorAutoSave` 属性已被**弃用**。请使用 [`editor`](/api/config/js_kanban_editor_config.md) 属性来控制"自动保存"模式。 +::: + +### 描述 + +@short: 可选。开启或关闭自动保存模式 + +:::info +此设置允许您在看板编辑器中启用或禁用自动保存。当 **editorAutoSave** 属性设置为 **false** 时,编辑器将显示"保存"按钮以手动保存更改。 +::: + +### 用法 + +~~~jsx {} +editorAutoSave?: boolean; // 默认为 true +~~~ + +### 默认配置 + +~~~jsx {} +editorAutoSave: true +~~~ + +### 示例 + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + editorAutoSave: false, // 禁用自动保存 + // 其他参数 +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md new file mode 100644 index 0000000..5fdd2fd --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md @@ -0,0 +1,471 @@ +--- +sidebar_label: editorShape +title: editorShape 配置 +description: 探索 DHTMLX JavaScript 看板库中 editorShape 的配置。查找开发者指南、API 参考、代码示例、在线演示,并获取 DHTMLX Kanban 免费 30 天试用。 +--- + +# editorShape + +### 描述 + +@short: 可选。一个对象数组,用于定义控制看板编辑器外观和行为的设置。 + +### 用法 + +~~~jsx {3,8,28,42,52,73,88,97,108,117,125} +editorShape?: [ + { + // 所有类型的通用参数 + type: string, + key: string, + label?: string, + + // 仅适用于 "dateRange" 类型 + key: { + start: string, + end: string + }, + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + done?: boolean, + error?: boolean, + format?: string, + months?: number, + placeholder?: string, + title?: string, + width?: string + }, + + // 仅适用于 "date" 类型 + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + error?: boolean, + format?: string, + placeholder?: string, + title?: string, + width?: string + }, + + // 仅适用于 "color" 类型 + values?: array, + config?: { + clear?: boolean, + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string + }, + + // 仅适用于 "combo"、"select" 和 "multiselect" 类型 + values?: [ + { + id: string | number, + label: string, + avatar?: string // 仅适用于 "multiselect" 类型 + }, + {...} // 其他选项 + ], + config?: { + clearButton?: boolean, // 仅适用于 "combo" 类型 + label?: string, // 仅适用于 "select" 类型 + checkboxes?: boolean, // 仅适用于 "multiselect" 类型 + // 通用参数 + disabled?: boolean, + error?: boolean, + placeholder?: string, + textField?: string, + title?: string + }, + + // 仅适用于 "text" 类型 + config?: { + css?: string, + disabled?: boolean, + error?: boolean, + focus?: boolean, + icon?: string, + inputStyle?: string, + placeholder?: string, + readonly?: boolean, + select?: boolean, + title?: string, + type?: string + }, + + // 仅适用于 "textarea" 类型 + config? { + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string, + readonly?: boolean + }, + + // 仅适用于 "progress" 类型 + config?: { + disabled?: boolean, + label?: string, + max?: number, + min?: number, + step?: number, + title?: string, + width?: number + }, + + // 仅适用于 "files" 类型 + uploadURL?: string | function, + config?: { + accept?: string, + disabled?: boolean, + multiple?: boolean, + folder?: boolean, + }, + + // 仅适用于 "comments" 类型 + config?: { + format?: string, + placement?: "page" | "editor", + html?: boolean, + confirmDeletion?: boolean + }, + + // 仅适用于 "links" 类型 + config?: { + confirmDeletion?: boolean + }, + }, { /* 其他控件设置 */ } +]; +~~~ + +### 参数 + +编辑器的外观和功能可通过设置以下参数(字段)进行自定义: + +#### - 所有类型的通用参数 + +- `type` - (必需)指定编辑器字段的类型。 + +:::important +看板编辑器支持的字段类型有:**dateRange**、**date**、**combo**、**select**、**multiselect**、**color**、**text**、**textarea**、**progress**、**files**、**comments** 和 **links**。 +::: + +- `key` - (必需)编辑器字段的键。此键应与 [`cardShape`](../js_kanban_cardshape_config) 属性中设置的值相匹配。示例: + +~~~js {8,17} + // 卡片外观设置 + const cardShape = { + ...kanban.defaultCardShape, + headerFields: [ + { // 自定义字段 + label: "Custom field", + css: "custom_style", + key: "custom_key" + } + ] + }; + // 编辑器外观设置 + const editorShape = [ + { + label: "Custom field", + type: "text", + key: "custom_key" + } + ]; +~~~ + +- `label` - (可选)编辑器字段的标签。 + +#### - "dateRange" 类型参数 + +- `key` - (必需)包含编辑器字段键的对象: + - `start` - (必需)起始日期键 + - `end` - (必需)结束日期键 + +:::important +这些键对应于 [`cardShape`](../js_kanban_cardshape_config) 属性中使用的键。 +::: + +- `config` - (可选)**"dateRange"** 字段的配置对象,包含以下选项: + - `align` - (可选)设置日历弹出相对于日期范围控件的位置对齐 + - `editable` - (可选)控制日期选择器是否可编辑;也可定义日期编辑的自定义格式 + - `buttons` - (可选)切换日历弹出下方的"今天"和"清除"按钮的可见性 + - `css` - (可选)调整日期范围控件中图标的位置 + - `disabled` - (可选)禁用日期范围控件 + - `done` - (可选)切换日期范围控件中"完成"按钮的可见性 + - `error` - (可选)为日期范围控件应用错误样式 + - `format` - (可选)设置日期范围控件的日期格式。可参考[此处](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `months` - (可选)定义日期范围控件中显示的日历数量 + - `placeholder` - (可选)设置日期范围控件的占位符文本 + - `title` - (可选)为日期范围控件添加工具提示或标题 + - `width` - (可选)调整日历弹出宽度 + +#### - "date" 类型参数 + +- `config` - (可选)**"date"** 字段的配置对象,包含以下选项: + - `align` - (可选)控制日历弹出相对于日期控件的位置对齐 + - `editable` - (可选)切换日期选择器是否可编辑;可指定自定义格式 + - `buttons` - (可选)显示或隐藏日历弹出中的"今天"和"清除"按钮 + - `css` - (可选)更改日期控件中图标的位置 + - `disabled` - (可选)禁用日期控件 + - `error` - (可选)为日期控件应用错误样式 + - `format` - (可选)设置日期控件的日期格式。参考[此处](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placeholder` - (可选)设置日期控件的占位符文本 + - `title` - (可选)为日期控件添加工具提示或标题 + - `width` - (可选)设置日历弹出宽度 + +#### - "color" 类型参数 + +- `values` - (可选)有效的 HEX 颜色代码数组 +- `config` - (可选)**"color"** 字段的配置对象,包含: + - `placeholder` - (可选)颜色控件的占位符 + - `clear` - (可选)切换清除图标的显示 + - `disabled` - (可选)禁用颜色控件 + - `error` - (可选)应用错误样式 + - `title` - (可选)为颜色控件添加工具提示或标题 + +#### - "combo"、"select" 和 "multiselect" 类型参数 + +- `values` - (可选)表示下拉选项的对象数组,包含: + - `id` - (必需)选项 ID + - `label` - (必需)选项标签 + - `avatar` - (可选)图像路径(仅适用于 **"multiselect"**) + +:::important +分配单个用户请使用 ***"select"*** 或 ***"combo"*** 类型,选择多个用户请使用 ***"multiselect"***。 +::: + +- `config` - (可选)这些类型的配置对象,包括: + - `clearButton` - (可选)在 combo 输入框中添加清除按钮(仅限 **"combo"**) + - `label` - (可选)通过此键绑定 select 选项(仅限 **"select"**) + - `checkboxes` - (可选)切换选项旁的复选框(仅限 **"multiselect"**) + - `textField` - (可选)通过此键绑定 combo 和 multiselect 选项的文本显示 + + - `disabled` - (可选)禁用控件 + - `error` - (可选)应用错误样式 + - `placeholder` - (可选)设置占位符文本 + - `title` - (可选)添加工具提示或标题 + +#### - "text" 类型参数 + +- `config` - (可选)**"text"** 字段的配置对象,包含: + - `css` - (可选)设置文本控件内图标的位置 + - `disabled` - (可选)禁用文本控件 + - `error` - (可选)应用错误样式 + - `focus` - (可选)设置文本控件聚焦 + - `icon` - (可选)在文本控件内添加图标 + - `inputStyle` - (可选)应用自定义样式 + - `placeholder` - (可选)设置占位符文本 + - `readonly` - (可选)使文本控件只读 + - `select` - (可选)选中文本控件内容 + - `title` - (可选)添加工具提示或标题 + - `type` - (可选)定义输入类型 + +#### - "textarea" 类型参数 + +- `config` - (可选)**"textarea"** 字段的配置对象,包括: + - `disabled` - (可选)禁用多行文本控件 + - `error` - (可选)应用错误样式 + - `placeholder` - (可选)设置占位符文本 + - `title` - (可选)添加工具提示或标题 + - `readonly` - (可选)使多行文本只读 + +#### - "progress" 类型参数 + +- `config` - (可选)**"progress"** 字段的配置对象,包含: + - `disabled` - (可选)禁用进度控件 + - `label` - (可选)控件上方显示的标签 + - `max` - (可选)最大允许值 + - `min` - (可选)最小允许值 + - `step` - (可选)步进值 + - `title` - (可选)工具提示或标题 + - `width` - (可选)进度控件宽度 + +#### - "files" 类型参数 + +- `uploadURL` - (可选)编辑器上传 URL,详见下文 + +
+ +`uploadURL` 可设置为 **字符串** 或 **函数**。以下是使用函数的示例: + +~~~jsx {} +uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // 这里可以传入 token 或其他请求头 + } + }; + + return fetch(url + "/uploads", config) // 这里填入 URL + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); +} +~~~ + +`rec` 参数是扩展的 `PointerEvent` 对象,包含额外属性: + +~~~jsx {} +interface UploadEvent extends PointerEvent { + id: number; + status: "client" | "server" | "error"; // 分别表示“尚未发送”、“发送成功”或“错误” + name: string; // 文件名 + file: string | Blob; // 文件本体 +} +~~~ + +
+ +- `config` - (可选)**"files"** 字段的配置对象,包含: + - `accept` - (可选)允许的文件类型(例如 ***"image/*", "video/*", "audio/*"***) + - `disabled` - (可选)启用或禁用文件上传 + - `multiple` - (可选)启用或禁用多文件上传 + - `folder` - (可选)启用或禁用文件夹上传 + +#### - "comments" 类型参数 + +- `config` - (可选)**"comments"** 字段的配置对象,包括: + - `format` - (可选)评论的日期格式。选项见[此处](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placement` - (可选)评论显示位置: + - `"editor"` - 在编辑器内 + - `"page"` - 在单独面板中 + - `html` - (可选)启用或禁用评论中的 HTML 标记 + - `confirmDeletion` - (可选)删除评论时是否显示确认对话框 + +#### - "links" 类型参数 + +- `config` - (可选)**"links"** 字段的配置对象,包含: + - `confirmDeletion` - (可选)删除链接时是否显示确认对话框 + +:::info +如果未设置 `editorShape` 属性,控件默认使用 **defaultEditorShape** 参数。 +::: + +### 默认配置 + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "高" }, + { id: 2, color: "#F1B941", label: "中" }, + { id: 3, color: "#77D257", label: "低" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +const defaultEditorShape = [ + { + key: "label", + type: "text", + label: "标签" + }, + { + key: "description", + type: "textarea", + label: "描述" + }, + { + type: "combo", + label: "优先级", + key: "priority", + config: { + clearButton: true + } + }, + { + type: "color", + label: "颜色", + key: "color" + }, + { + type: "progress", + key: "progress", + label: "进度" + }, + { + type: "date", + key: "start_date", + label: "开始日期" + }, + { + type: "date", + key: "end_date", + label: "结束日期" + }, + { + type: "multiselect", + key: "users", + label: "用户" + } +]; +~~~ + +### 示例 + +~~~jsx {6-33,38} +const users = [ // 用户数据 + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const editorShape = [ // 编辑器设置 + ...kanban.defaultEditorShape, // 包含默认设置 + { // 添加自定义字段 + type: "multiselect", + key: "users", + label: "用户", + values: users + }, + { + type: "comments", + key: "comments", + label: "评论", + config: { + format: "%M %d", + placement: "page", + html: true, + confirmDeletion: true + } + }, + { + type: "links", + key:"links", + label: "链接", + config: { + confirmDeletion: true + } + } +]; + +new kanban.Kanban("#root", { + cards, + columns, + editorShape, + // 其他参数 +}); +~~~ + +**更新日志:** + +- 在 v1.3 中新增了 ***dateRange*** 类型 +- 在 v1.4 中新增了 ***comments*** 和 ***links*** 编辑器类型,以及 ***format*** 参数 + +**相关文章:** [配置](/guides/configuration#编辑器) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md new file mode 100644 index 0000000..e9b9d46 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: history +title: history 配置 +description: 本节介绍 DHTMLX JavaScript 看板库中的 history 配置。您可以查看开发者指南、API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# history + +### 描述 + +@short: 可选。控制是否跟踪变更历史 + +:::info +`history` 属性允许您开启或关闭看板的历史管理。将其设置为 **false** 表示无法通过 API 或工具栏控件来控制历史。 +::: + +:::tip +您还可以通过在方法和事件中使用 [`$meta`](/api/common/js_kanban_meta_parameter.md) 参数,将某些操作排除在看板历史之外! +::: + +### 用法 + +~~~jsx {} +history?: boolean; +~~~ + +### 默认配置 + +~~~jsx {} +history: true +~~~ + +### 示例 + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + history: false, // 禁用历史管理 + // 其他参数 +}); +~~~ + +**更新日志:** 此属性从版本 1.3 引入 + +**相关内容:** [`undo()`](/api/methods/js_kanban_undo_method.md) 和 [`redo()`](/api/methods/js_kanban_redo_method.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md new file mode 100644 index 0000000..8e25d42 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md @@ -0,0 +1,67 @@ +--- +sidebar_label: links +title: links 配置 +description: 探索 DHTMLX JavaScript 看板库文档中的 links 配置。查看开发者指南、API 参考,试用代码示例和实时演示,并免费下载 DHTMLX 看板的 30 天试用版。 +--- + +# links + +### 描述 + +@short: 可选。一个包含链接数据对象的数组。 + +### 用法 + +~~~jsx {} +links?: [ + { + id: string | number, + masterId: string | number, + slaveId: string | number, + relation: "relatesTo" | "requiredFor" | "duplicate" | "parent" + }, {...} // 其他链接数据 +]; +~~~ + +### 参数 + +每个链接包含以下数据字段: + +- `id` - (必填)链接的唯一 ID +- `masterId` - (必填)表示链接中主导角色的卡片 ID(例如,"Is required for") +- `slaveId` - (必填)表示链接中被动角色的卡片 ID(例如,"Depends on") +- `relation` - (必填)链接类型。可用类型有: + - ***"relatesTo"*** - 表示当前任务与另一个任务相关联的依赖关系 + - ***"requiredFor"*** - 表示一个任务需要另一个任务先完成的依赖关系 + - ***"duplicate"*** - 标记重复任务间的依赖关系 + - ***"parent"*** - 设定父(master)任务与其子(slave)任务之间的依赖关系 + +:::info +要动态加载新的链接数据,可以使用 [**parse()**](../../methods/js_kanban_parse_method) 方法! +::: + +### 示例 + +~~~jsx {1-8,13} +const links = [ + { + id: 1, + masterId: 2, + slaveId: 5, + relation: "relatesTo", + }, {...} // 其他链接数据 +]; + +new kanban.Kanban("#root", { + columns, + cards, + links + // 其他参数 +}); +~~~ + +**更新日志:** 此属性在 v1.4 版本中引入 + +**相关文档:** [数据操作](/guides/working_with_data) + +**相关示例:** [看板. 任务间的链接](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md new file mode 100644 index 0000000..6758a63 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md @@ -0,0 +1,45 @@ +--- +sidebar_label: locale +title: locale 配置 +description: 探索 DHTMLX JavaScript 看板库中的 locale 配置。查看开发者指南、API 参考、代码示例、实时演示,并免费下载 DHTMLX 看板的30天试用版。 +--- + +# locale + +### 描述 + +@short: 可选。一个定义自定义看板语言环境的对象 + +:::info +**locale** 对象应包含所有看板和工具栏的标签及其翻译版本。 +::: + +### 用法 + +~~~jsx {} +locale?: object; +~~~ + +### 默认配置 + +看板默认使用 [**英语**](/guides/localization/#默认语言环境) 语言环境。您也可以根据需要指定自定义语言环境。 + +:::tip +要动态切换语言环境,可以使用看板中的 [**setLocale()**](../../methods/js_kanban_setlocale_method) 方法。 +::: + +### 示例 + +~~~jsx {5} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: cn // 初始应用 "cn" 语言环境 + // 其他参数 +}); +~~~ + +**相关文档:** [本地化](/guides/localization) + +**相关示例:** [看板. 本地化](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md new file mode 100644 index 0000000..dc1d15c --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: readonly +title: 只读配置 +description: 探索 DHTMLX JavaScript 看板库中的只读配置。查看开发者指南、API 参考,尝试代码示例和实时演示,并获取 DHTMLX 看板的免费 30 天试用。 +--- + +# readonly + +### 描述 + +@short: 可选。控制是否启用或禁用卡片的编辑、新增、选择和拖拽功能。 + +### 用法 + +~~~js {} +readonly?: boolean; +// 或者 +readonly?: { + edit?: boolean, + add?: boolean, + select?: boolean, + dnd?: boolean +}; +~~~ + +### 参数 + +设置 **只读模式** 有两种方式:使用 **简写** 或 **扩展** 格式。 + +**简写** 格式: +- `readonly` - (可选)开启或关闭看板的 **只读模式**。 + +**扩展** 格式: +- `readonly` - (可选)包含详细设置的对象。支持以下属性: + - `edit` - (可选)开启或关闭 **卡片编辑**。 + - `add` - (可选)开启或关闭 **新增卡片**。 + - `select` - (可选)开启或关闭 **卡片选择**。 + - `dnd` - (可选)开启或关闭 **卡片拖拽**。 + +### 默认配置 + +~~~jsx {} +readonly: false // 默认关闭只读模式 +// 或者 +readonly: { + edit: true, // 启用编辑 + add: true, // 启用新增 + select: true, // 启用选择 + dnd: true // 启用拖拽 +} +~~~ + +### 示例 + +~~~jsx {4-9} +new kanban.Kanban("#root", { + cards, + columns, + readonly: { + edit: false, // 禁用编辑 + add: true, // 启用新增 + select: false, // 禁用选择 + dnd: true // 启用拖拽 + }, + // 其他参数 +}); +~~~ + +**相关示例:** [Readonly mode](https://snippet.dhtmlx.com/b8x84yln?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md new file mode 100644 index 0000000..37d0b0e --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: renderType +title: renderType 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 renderType 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版 DHTMLX 看板。 +--- + +# renderType + +### 描述 + +@short: 可选。指定卡片的渲染方式。 + +:::info +当处理大量卡片时,此设置非常有用。将其设置为 *"lazy"* 会使组件仅渲染当前在看板上可见的卡片,从而大幅提升性能。 +::: + +### 用法 + +~~~jsx {} +renderType?: "default" | "lazy"; +~~~ + +:::important +当 `renderType: "lazy"` 与 [`scrollType: "default"`](/api/config/js_kanban_scrolltype_config.md) 一起使用时,请确保通过 [`cardHeight`](/api/config/js_kanban_cardheight_config.md) 属性为卡片设置固定高度。否则,卡片可能无法正确显示。 +::: + +### 默认配置 + +~~~jsx {} +renderType: "default" +~~~ + +### 示例 + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + renderType: "lazy", + // 其他参数 +}); +~~~ + +**更新日志:** 此属性自 v1.2 引入 + +**相关文档:** [配置](/guides/configuration#卡片) + +**相关示例:** [Kanban. 固定表头,懒加载渲染与列滚动](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md new file mode 100644 index 0000000..d5f5dc4 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: rowKey +title: rowKey 配置 +description: 探索 DHTMLX JavaScript 看板库中的 rowKey 配置。查找开发者指南和 API 参考,试验代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# rowKey + +### 描述 + +@short: 可选。指定卡片如何分配到某一行。 + +:::info +要将卡片组织到行(泳道)中,您需要定义一个 **自定义键**,该键对应每张卡片数据中行的 **ID**。然后,在组件配置中将 **rowKey** 属性设置为该 *自定义键*。 +::: + +### 用法 + +~~~jsx {} +rowKey?: string; +~~~ + +### 示例 + +~~~jsx {4,8,16} +const cards = [ + { + label: "Backlog task", + row_custom_key: "feature" + }, + { + label: "In progress task", + row_custom_key: "done" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + rowKey: "row_custom_key", + // 其他参数 +}); +~~~ + +**相关示例:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md new file mode 100644 index 0000000..bcf8f18 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md @@ -0,0 +1,65 @@ +--- +sidebar_label: rows +title: rows 配置 +description: 探索 DHTMLX JavaScript 看板库文档中的 rows 配置。查看开发者指南、API 参考,尝试代码示例和在线演示,并获取 DHTMLX 看板的免费 30 天试用。 +--- + +# rows + +### 描述 + +@short: 可选。一个包含行(泳道)数据的对象数组 + +### 用法 + +~~~jsx {} +rows?: [ + { + id: string, + label?: string, + collapsed?: boolean, + css?: string, + }, {...} // 其他行数据 +]; +~~~ + +:::info +要设置泳道,请在 **rows** 数组中提供相关数据。你可以通过 UI 或使用[相关 API](/howtos/#行泳道操作指南)来折叠/展开、重命名、删除和移动泳道。 +::: + +### 参数 + +每个行(泳道)可以包含以下参数: + +- `id` - (必需)行(泳道)的 **ID**,用于通过其方法操作该行 +- `label` - (可选)该行(泳道)的标签,显示在行区域 +- `collapsed` - (可选)指示行(泳道)是否初始折叠。若为 ***true***,则初始状态为折叠。默认值为 ***false***(展开) +- `css` - (可选)为单个行应用 CSS 样式 + +:::info +要动态加载新的行(泳道)数据,可以使用 [**parse()**](../../methods/js_kanban_parse_method) 方法。 +::: + +### 示例 + +~~~jsx {1-4,9} +const rows = [ + { label: "Feature", id: "feature", collapsed: false, css: "red" }, + { label: "Task", id: "task", collapsed: true } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, // 泳道数据 + // 其他参数 +}); +~~~ + +**更新日志:** ***css*** 参数在 v1.4 版本中引入 + +**相关文章:** +- [使用数据](/guides/working_with_data) +- [updateRow()](/api/methods/js_kanban_updaterow_method.md) + +**相关示例:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md new file mode 100644 index 0000000..3762342 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md @@ -0,0 +1,179 @@ +--- +sidebar_label: rowShape +title: rowShape 配置 +description: DHTMLX JavaScript 看板库中的 rowShape 配置允许您调整行的外观。查看开发者指南和 API 参考,测试代码示例和在线演示,并免费下载 30 天试用版的 DHTMLX 看板。 +--- + +# rowShape + +### 描述 + +@short: 可选。一个用于自定义行外观的设置对象 + +### 用法 + +~~~jsx {} +rowShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, row }) => void + }, {...} // 其他菜单项数据 + ] | ({ row, rowIndex, rows, store }) => array | boolean + }, + css?: (row, cards) => string, + confirmDeletion?: boolean +}; +~~~ + +### 参数 + +为了控制行的显示效果,**rowShape** 对象支持以下选项: + +- `menu` - (可选)行上下文菜单的设置。包括: + - `show` - (可选)切换行上下文菜单的显示与隐藏 + - `items` - (可选)定义行菜单项的对象数组。每个菜单项可以包含: + - `id` - (可选)菜单项 ID。内置操作可使用以下值: + - ***"set-edit"*** - 允许编辑行名称 + - ***"move-row:up"*** - 将行上移 + - ***"move-row:down"*** - 将行下移 + - ***"delete-row"*** - 删除该行 + + - `icon` - (可选)菜单项的图标类名(例如 *mdi-delete*) + - `text` - (可选)菜单项的标签文本 + - `disabled` - (可选)菜单项是否禁用(布尔值) + - `onClick` - (可选)自定义回调函数,接收以下参数: + - ***id*** - 当前菜单项 ID + - ***item*** - 当前菜单项数据 + - ***row*** - 目标行数据 + +:::info +`items` 参数也可以是一个自定义函数,带有以下参数: + +- ***row*** - 当前行数据 +- ***rowIndex*** - 当前行的索引 +- ***rows*** - 所有行的数组 +- ***store*** - *dataStore* 对象 + +通过此函数,您可以灵活地为特定行自定义菜单,或完全禁用菜单(返回 *null* 或 *false*): + +~~~jsx {} + items: ({ row, rowIndex, rows, store }) => { + if(rowIndex == 0) + return null + return [ + { id: "set-edit", icon: "wxi-edit", text: "重命名" }, + { + id: "custom-delete-row", + icon: "wxi-delete", + text: "移除行" + }, + { + id: "custom-move-row:up", + icon: "wxi-arrow-up", + text: "上移" + } + ] + } +~~~ +::: + +- `css` - 一个函数,返回一个条件应用于行的 CSS 类名 +- `confirmDeletion` - (可选)删除行时是否启用确认对话框 + +### 默认配置 + +~~~jsx {} +const getDefaultRowMenuItems = ({ row, rowIndex, rows, store }) => [ + { id: "set-edit", icon: "wxi-edit", text: "重命名" }, + { + id: "move-row:up", + icon: "wxi-arrow-up", + text: "上移", + disabled: rowIndex <= 0 + }, + { + id: "move-row:down", + icon: "wxi-arrow-down", + text: "下移", + disabled: rowIndex >= rows.length - 1 + }, + { id: "delete-row", icon: "wxi-delete", text: "删除" } +]; +const rowShape = { + menu: { + show: true, + items: getDefaultRowMenuItems + }, + confirmDeletion: true +}; +~~~ + +### 示例 + +~~~jsx {10-43,48} +const changeRowColor = (row, cssClass) => board.updateRow({ + id: row.id, + row: { + css: cssClass, + collapsed: false + }, + replace: false +}); + +const rowShape = { + menu: { + show: true, + items: ({ row, rowIndex, rows, store }) => { + if (rowIndex == 0) + return false + return [ + { + id: "color", + text: "颜色", + items: [ + { + id:"gray", + text: "灰色", + onClick: ({ id, item, row }) => changeRowColor(row, "gray") + }, + { + id:"yellow", + text: "黄色", + onClick: ({ id, item, row }) => changeRowColor(row, "yellow") + }, + { + id:"red", + text: "红色", + onClick: ({ id, item, row }) => changeRowColor(row, "red") + } + ] + } + ] + } + }, + css: (row, cards) => row.id == "task" && cards.length < 3 ? "green" : "red", + confirmDeletion: false +}; + +new kanban.Kanban("#root", { + cards, + rows, + rows, + rowShape, + // 其他参数 +}); +~~~ + +**更新日志:** +- ***css*** 参数自 v1.4 起引入 +- ***menu.items[0].label*** 参数在 v1.4 中重命名为 ***menu.items[0].text*** + +**相关文档:** [配置](/guides/configuration) + +**相关示例:** [Kanban. 通过自定义菜单更改行颜色](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md new file mode 100644 index 0000000..c8315de --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scrollType +title: scrollType 配置 +description: 了解 DHTMLX JavaScript 看板库中的 scrollType 配置。查看开发者指南、API 参考、代码示例、在线演示,并免费下载 30 天试用版的 DHTMLX 看板。 +--- + +# scrollType + +### 描述 + +@short: 可选。指定滚动行为的方式。 + +### 用法 + +~~~jsx {} +scrollType?: "default" | "column"; +~~~ + +:::note +当 `scrollType` 设置为 `"column"` 时,每个列可以独立滚动。 +::: + +### 默认配置 + +~~~jsx {} +scrollType: "default" +~~~ + +:::important +如果您将 [`renderType: "lazy"`](/api/config/js_kanban_rendertype_config.md) 与 `scrollType: "default"` 一起使用,确保通过 [`cardHeight`](/api/config/js_kanban_cardheight_config.md) 属性设置固定的卡片高度。否则,卡片将不会显示。 +::: + +### 示例 + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + scrollType: "column", + // 其他参数 +}); +~~~ + +**更新日志:** 该属性在 v1.2 版本引入 + +**相关文档:** [配置](/guides/configuration#卡片) + +**相关示例:** [看板。固定表头、懒加载和列滚动](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md new file mode 100644 index 0000000..e3d65b7 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md @@ -0,0 +1,101 @@ +--- +sidebar_label: theme +title: theme +description: 探索 DHTMLX JavaScript 看板库中的主题配置选项。查看开发者指南、API 参考、在线演示,并获取 DHTMLX 看板的免费 30 天试用。 +--- + +# 主题 + +### 描述 + +@short: 可选。定义应用于看板的主题 + +### 用法 + +~~~jsx {} +theme?: { + name: string, // "material"(默认)| "willow" | "willow-dark" + fonts?: boolean +}; +~~~ + +:::important +除了设置 `theme` 属性外,还可以通过直接向组件容器添加相应的 *css* 类来应用主题: + +- **Material 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark 主题** +~~~html {} + +
+ +
+~~~ + +或者,你也可以通过从 skins 文件夹链接所需主题的样式表来包含该主题: + +~~~html {} + +~~~ +::: + +### 参数 + +以下是可用于配置 **theme** 的参数: + +- `theme` - (可选)包含主题设置的对象,支持: + - `name` - (必需)要应用于看板的主题名称 + - `fonts` - (可选)控制是否从 CDN 加载字体(wxi 字体) + +:::tip +**Willow** 和 **Willow-Dark** 主题也可用。要动态切换主题,可以使用 [`setTheme()`](../../methods/js_kanban_settheme_method) 方法。 +::: + +### 默认配置 + +看板默认使用 **Material** 主题。 + +~~~jsx {} +theme: { + name: "material", + fonts: true +} +~~~ + +### 示例 + +~~~jsx {5-8} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: { + name: "willow-dark", // 初始设置为 "willow-dark" 主题 + fonts: false + } + // 其他参数 +}); +~~~ + +**更新日志:** 该属性从 v1.4 版本引入 + +**相关文档:** [样式定制](/guides/stylization) + +**相关示例:** +- [看板。使用主题](https://snippet.dhtmlx.com/jnw54xif?tag=kanban) +- [看板。以样式表形式引入主题](https://snippet.dhtmlx.com/k3iw6ti0?tag=kanban) +- [看板。通过 CSS 类切换主题](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md new file mode 100644 index 0000000..6336765 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: api +title: api 配置 +description: 在 DHTMLX JavaScript 看板库文档中,探索(工具栏)api 配置。查找开发者指南、API 参考、代码示例、在线演示及 DHTMLX 看板的免费30天试用。 +--- + +# api + +### 描述 + +@short: 必填。表示看板内部 API 的对象。 + +:::info +这里的**看板内部 API**指的是工具栏上的**控件**。 +::: + +### 用法 + +~~~jsx {} +api: object; +~~~ + +### 示例 + +~~~jsx {7} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api +}); +~~~ + +**相关文章:** [配置](/guides/configuration#工具栏) + +**相关示例:** [看板. 自定义工具栏](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md new file mode 100644 index 0000000..68c4aea --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md @@ -0,0 +1,191 @@ +--- +sidebar_label: items +title: items 配置 +description: 探索 DHTMLX JavaScript 看板库中(Toolbar)items 配置。查看开发者指南、API 参考、代码示例、在线演示,并免费下载 30 天试用版的 DHTMLX 看板。 +--- + +# items + +### 描述 + +@short: 可选。一个数组,包含排列在看板工具栏上的控件。 + +### 用法 + +~~~jsx {} +items?: [ + "search" | { + // 搜索参数 + type: "search", + options?: [ + { + id: string, + label: string, + searchRule?: (card, value, by) => { + return boolean + } + }, {...} + ], + resultTemplate?: template(searchResult => { + return "搜索结果的 HTML 模板"; + }) + }, + "sort" | { + // 排序参数 + type: "sort", + options?: [ + { + text: string, + by?: string, // by?: ((card: object) => any), + dir?: "asc" | "desc" + }, {...} + ] + }, + "spacer", + "undo", + "redo", + "addColumn", + "addRow", + custom_control // 字符串或函数 +]; +~~~ + +### 参数 + +在 **items** 数组中,可以包含以下参数: + +:::info +#### 添加 *默认搜索栏*,只需使用字符串 `"search"`。 +#### 配置 *自定义搜索栏*,需提供包含以下参数的对象: + +- `type` - (必需)指定控件类型(*"search"*) +- `options` - (可选)定义搜索参数的数组。每个对象(*搜索选项*)可以包含: + - `id` - (必需)用于搜索的卡片字段键 + - `label` - (必需)搜索栏下拉中显示的选项名称 + - `searchRule`(可选)- 自定义函数,用于定义搜索规则。接收参数: + - ***card*** - 卡片数据对象 + - ***value*** - 搜索输入值 + - ***by*** - 用于搜索的卡片字段键 +- `searchResult` - (可选)自定义搜索结果显示的模板 + +~~~jsx +items: [ + "search", // 默认搜索栏 + // 其他控件 +] + +// 或者 + +items: [ + { // 自定义搜索栏 + type: "search", + options: [ + { + id: "label", + label: "按标签" + }, + { + id: "start_date", + label: "按日期", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + // 其他控件 +] +~~~ +::: + +:::info +#### 添加 *默认排序控件*,只需使用字符串 `"sort"`。 +#### 配置 *自定义排序控件*,需提供包含以下参数的对象: + +- `type` - (必需)指定控件类型(*"sort"*) +- `options` - (可选)定义排序参数的数组。每个对象(*排序选项*)可以包含: + - `text` - (必需)排序下拉中显示的选项名称 + - `by` - (可选)用于排序的卡片字段键或函数 + - `dir` - (可选)排序方向,可为 *"asc"* 或 *"desc"* + +~~~jsx +items: [ + "sort", // 默认排序控件 + // 其他控件 +] +// 或者 +items: [ + { // 自定义排序控件 + type: "sort", + options: [ + { + text: "按标签排序", + by: "label", + dir: "asc" + }, + { + text: "按描述排序", + by: "description", + dir: "desc" + } + ] + }, {...} // 其他控件 +] +~~~ +::: + +- `"spacer"` - 在控件间插入空白间隔 +- `"undo"` - 撤销操作控件(单击回退一步) +- `"redo"` - 重做操作控件(单击前进一步) +- `"addColumn"` - 添加新列控件 +- `"addRow"` - 添加新行控件 +- `custom_control` - (可选)自定义控件,可以是**字符串**或**函数**。详情参见[自定义](/guides/customization#自定义工具栏)章节。 + +### 示例 + +~~~jsx {8-24} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { + type: "search", + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", + "sort", + "undo", + "redo", + "addColumn", + "addRow" + ] +}); +~~~ + +**更新日志:** + +- *"Undo"* 和 *"Redo"* 控件在 v1.3 版本引入 +- **sort** 控件中 ***items.options[0].label*** 参数在 v1.4 版本重命名为 ***items.options[0].text*** +- **"search"** 控件新增了 ***items.searchResult*** 参数,始于 v1.6 版本 + +**相关文档:** [配置](/guides/configuration#工具栏) 和 [自定义](/guides/customization#自定义工具栏) + +**相关示例:** +- [看板。自定义工具栏](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) +- [看板。搜索结果建议的自定义](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md new file mode 100644 index 0000000..538dd66 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md @@ -0,0 +1,47 @@ +--- +sidebar_label: locale +title: locale 配置 +description: 了解如何在 DHTMLX JavaScript 看板库中配置(Toolbar)的 locale。浏览开发者指南和 API 参考,体验代码示例和在线演示,并获得 DHTMLX 看板的免费 30 天试用。 +--- + +# locale + +### 描述 + +@short: 可选。一个定义 Toolbar 自定义语言环境的对象。 + +:::info +**locale** 对象应包含看板和 Toolbar 的所有标签及其翻译。 +::: + +### 用法 + +~~~jsx {} +locale?: object; +~~~ + +### 默认配置 + +默认情况下,Toolbar 使用的是[**英语**](/guides/localization/#默认语言环境)语言环境。您也可以指定自己的自定义语言环境。 + +:::tip +要动态切换语言环境,可以使用 Toolbar 的[**setLocale()**](../../methods/toolbar_setlocale_method)方法。 +::: + +### 示例 + +~~~jsx {8} +// 创建看板 +const board = new kanban.Kanban("#root", { + locale: cn +}); +// 创建 Toolbar +new kanban.Toolbar("#toolbar", { + api: board.api, + locale: cn // 将 "cn" 语言环境应用到 Toolbar +}); +~~~ + +**相关文档:** [本地化](/guides/localization) + +**相关示例:** [看板。 本地化](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md new file mode 100644 index 0000000..e58527e --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md @@ -0,0 +1,85 @@ +--- +sidebar_label: theme +title: theme +description: 探索 DHTMLX JavaScript 看板库中的(工具栏)主题配置。查看开发者指南、API参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费30天试用版本。 +--- + +# 主题 + +### 描述 + +@short: 可选。指定应用于工具栏的主题。 + +### 用法 + +~~~jsx {} +theme?: string; // "material" | "willow" | "willow-dark" +~~~ + +:::important +除了设置 `theme` 属性之外,您还可以通过向控件容器添加相应的 *css* 类来应用所需的主题: + +- **Material 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark 主题** +~~~html {} + +
+ +
+~~~ + +或者,您也可以直接从 skins 文件夹中引入所需主题的样式表: + +~~~html {} + +~~~ +::: + +### 默认配置 + +工具栏默认使用 **Material** 主题。您也可以切换到 **Willow** 或 **Willow-Dark** 主题。 + +:::tip +若要动态更新主题,请使用 [**setConfig()**](../../methods/toolbar_setconfig_method) 方法。 +::: + +### 示例 + +~~~jsx {5,11} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: "willow-dark" // 设置初始主题为 "willow-dark" + // 其他参数 +}); +// 创建工具栏 +new Toolbar("#toolbar", { + api: board.api, + theme: "willow-dark", // 设置初始主题为 "willow-dark" +}); +~~~ + +**更新日志:** 此属性在 v1.4 版本中引入 + +**相关文档:** [样式化](/guides/stylization) + +**相关示例:** +- [看板。使用主题](https://snippet.dhtmlx.com/jnw54xif?tag=kanban) +- [看板。以样式表方式引入主题](https://snippet.dhtmlx.com/k3iw6ti0?tag=kanban) +- [看板。通过 CSS 类切换主题](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md new file mode 100644 index 0000000..5fd3f00 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: add-card +title: add-card 事件 +description: 了解 DHTMLX JavaScript 看板库中 add-card 事件的工作原理。浏览开发者指南、API 参考、测试代码示例,查看实时演示,并获取 DHTMLX 看板的免费 30 天试用。 +--- + +# add-card + +### 描述 + +@short: 当添加新卡片时触发 + +### 用法 + +~~~jsx {} +"add-card": ({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object, + skipProvider?: boolean, +}) => void; +~~~ + +### 参数 + +**add-card** 事件的回调接收一个包含以下属性的对象: + +- `columnId` - (必填)卡片将被添加的列的 ID +- `id` - (可选)新卡片分配的 ID +- `rowId` - (可选)卡片应放置的行的 ID +- `before` - (可选)新卡片将被插入在其前面的卡片的 ID +- `select` - (可选)决定是否选中新添加的卡片 +- `card` - (可选)表示新卡片的数据对象。卡片参数的完整详情请参阅 [这里](/api/config/js_kanban_cards_config.md) +- `skipProvider` - (可选)控制是否跳过向服务器的请求 + +:::info +若要管理内部事件,请参阅 [**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "add-card" 事件 +board.api.on("add-card", (obj) => { + console.log(obj.columnId); +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md new file mode 100644 index 0000000..e4e6468 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-column +title: add-column 事件 +description: 探索 DHTMLX JavaScript 看板库中的 add-column 事件文档。查看开发者指南、API 参考,尝试演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# add-column + +### 描述 + +@short: 当添加新列时触发 + +### 用法 + +~~~jsx {} +"add-column": ({ + id?: string | number, + column?: object, + before?: string | number, + skipProvider?: boolean, +}) => void; +~~~ + +### 参数 + +**add-column** 事件的回调函数接收一个包含以下可选属性的对象: + +- `id` - 分配给新列的 ID +- `column` - 表示新列的数据对象。完整的 **column** 参数列表请参见[**这里**](/api/config/js_kanban_columns_config.md) +- `before` - 新列将插入到其前面的列的 ID +- `skipProvider` - 控制是否阻止向服务器发送请求 + +:::info +要处理内部事件,可以使用[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "add-column" 事件 +board.api.on("add-column", (obj) => { + console.log(obj.label); +}); +~~~ + +**更新日志**:**id**、**before** 和 **column** 参数在 v1.1 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md new file mode 100644 index 0000000..27e2bc6 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: add-comment +title: add-comment 事件 +description: 探索 DHTMLX JavaScript 看板库中的 add-comment 事件文档。查看开发者指南、API 参考,尝试示例和在线演示,并获取 DHTMLX 看板的免费 30 天试用。 +--- + +# add-comment + +### 描述 + +@short: 当添加新评论时触发 + +### 用法 + +~~~jsx {} +"add-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**add-comment** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (可选)新评论的 ID +- `cardId` - (必需)添加评论的卡片 ID +- `comment` - (必需)定义新评论细节的对象。可包含: + - `text` - (可选)评论的文本内容 + - `date` - (可选)评论的日期 + - `html` - (可选)评论的 HTML 内容。若要启用 HTML 渲染而非文本,请在 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-类型参数) 配置中激活 `html` 属性 +- `skipProvider` - (可选)控制是否阻止向服务器发送请求 + +:::info +有关内部事件处理的管理,请参考 [**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "add-comment" 事件 +board.api.on("add-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**更新日志:** 此事件自 v1.4 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md new file mode 100644 index 0000000..41f91a2 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: add-link +title: add-link 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 add-link 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# add-link + +### 描述 + +@short: 当添加新链接时触发 + +### 用法 + +~~~jsx {} +"add-link": ({ + id?: string | number, + link: object, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**add-link** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (可选)分配给新链接的 ID +- `link` - (必需)表示新链接的数据对象。您可以在[这里](/api/config/js_kanban_links_config.md)找到链接参数的完整列表 +- `skipProvider` - (可选)控制是否阻止向服务器发送请求 + +:::info +要管理内部事件,您可以使用[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {8-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// 订阅 "add-link" 事件 +board.api.on("add-link", (obj) => { + console.log(obj.link.masterId); +}); +~~~ + +**更新日志:** 此事件首次引入于 v1.4 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md new file mode 100644 index 0000000..f5e2dc5 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-row +title: add-row 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 add-row 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# add-row + +### 描述 + +@short: 当添加新行时触发 + +### 用法 + +~~~jsx {} +"add-row": ({ + id?: string | number, + row?: object, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**add-row** 事件的回调函数接受一个包含以下可选属性的对象: + +- `id` - 新行的标识符 +- `row` - 表示新行的数据对象。完整的 **row** 参数列表请参见[**这里**](/api/config/js_kanban_rows_config.md) +- `before` - 新行将插入的目标行 ID(即在该行之前插入) +- `skipProvider` - 控制是否阻止或允许向服务器发送请求 + +:::info +若需管理内部事件,请考虑使用[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "add-row" 事件 +board.api.on("add-row", (obj) => { + console.log(obj.id); +}); +~~~ + +**更新日志**:**id**、**before** 和 **row** 参数自 v1.1 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md new file mode 100644 index 0000000..bdd2691 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: add-vote +title: add-vote 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 add-vote 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费30天评估版。 +--- + +# add-vote + +### 描述 + +@short: 当用户添加新投票时触发 + +### 用法 + +~~~jsx {} +"add-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**add-vote** 事件的回调接收一个包含以下属性的对象: + +- `cardId` - (必需)投票被添加的卡片的 ID +- `skipProvider` - (可选)控制是否跳过向服务器发送请求 + +:::info +要处理内部事件,可以参考[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "add-vote" 事件 +board.api.on("add-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**更新日志:** 此事件在 v1.4 版本中引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md new file mode 100644 index 0000000..498e4c8 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-card +title: delete-card 事件 +description: 探索 DHTMLX JavaScript Kanban 库中的 delete-card 事件文档。查找开发者指南、API 参考、代码示例、在线演示,并免费下载 DHTMLX Kanban 30 天试用版。 +--- + +# delete-card + +### 描述 + +@short: 当卡片被删除时触发 + +### 用法 + +~~~jsx {} +"delete-card": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-card** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)被删除卡片的标识符 +- `skipProvider` - (可选)控制是否阻止向服务器发送请求 + +:::info +有关管理内部事件,请参阅 [**Event Bus methods**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "delete-card" 事件 +board.api.on("delete-card", (obj) => { + console.log(obj.id); +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md new file mode 100644 index 0000000..c6950ee --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-column +title: delete-column 事件 +description: 探索 DHTMLX JavaScript Kanban 库中的 delete-column 事件文档。查看开发者指南、API 参考,尝试代码示例和在线演示,并免费下载 30 天试用版的 DHTMLX Kanban。 +--- + +# delete-column + +### 描述 + +@short: 当某列被删除时触发 + +### 用法 + +~~~jsx {} +"delete-column": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-column** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)被删除列的 ID +- `skipProvider` - (可选)控制请求是否发送到服务器 + +:::info +要管理内部事件,请参考[**Event Bus 方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "delete-column" 事件 +board.api.on("delete-column", (obj) => { + console.log(obj.id); +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md new file mode 100644 index 0000000..ac54bbe --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: delete-comment +title: delete-comment 事件 +description: 了解 DHTMLX JavaScript 看板库中的 delete-comment 事件。浏览开发者指南、API 参考,试用代码示例和在线演示,并获得 DHTMLX 看板的免费 30 天试用。 +--- + +# delete-comment + +### 描述 + +@short: 当卡片评论被删除时触发 + +### 用法 + +~~~jsx {} +"delete-comment": ({ + id?: string | number, + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-comment** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (可选)被删除评论的 ID +- `cardId` - (必需)包含该评论的卡片 ID +- `skipProvider` - (可选)控制是否阻止请求发送到服务器 + +:::info +要管理内部事件,可以使用 [**Event Bus 方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "delete-comment" 事件 +board.api.on("delete-comment", (obj) => { + console.log(obj.id); +}); +~~~ + +**更新日志:** 此事件从 v1.4 版本开始引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md new file mode 100644 index 0000000..f19fae1 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md @@ -0,0 +1,48 @@ +--- +sidebar_label: delete-link +title: delete-link 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 delete-link 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费 30 天试用版的 DHTMLX 看板。 +--- + +# delete-link + +### 描述 + +@short: 当链接被删除时触发 + +### 用法 + +~~~jsx {} +"delete-link": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-link** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)被删除链接的 ID +- `skipProvider` - (可选)控制是否阻止向服务器发送请求 + +:::info +要处理内部事件,可以使用[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {8-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// 监听 "delete-link" 事件 +board.api.on("delete-link", (obj) => { + console.log(obj.id); +}); +~~~ + +**更新日志:** 此事件在 v1.4 中引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md new file mode 100644 index 0000000..7b72a1f --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-row +title: delete-row 事件 +description: 了解 DHTMLX JavaScript Kanban 库中 delete-row 事件的工作原理。浏览开发者指南,查看 API 参考,测试代码示例和实时演示,并免费下载 DHTMLX Kanban 的30天试用版。 +--- + +# delete-row + +### 描述 + +@short: 当某一行被删除时触发 + +### 用法 + +~~~jsx {} +"delete-row": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-row** 事件的回调函数接受一个包含以下参数的对象: + +- `id` - (必填)被删除行的 ID +- `skipProvider` - (可选)控制是否将请求发送到服务器 + +:::info +若要使用内部事件,可以参考 [**Event Bus methods**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "delete-row" 事件 +board.api.on("delete-row", (obj) => { + console.log(obj.id); +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md new file mode 100644 index 0000000..5b79177 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: delete-vote +title: delete-vote 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 delete-vote 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# delete-vote + +### 描述 + +@short: 当用户从卡片中移除投票时触发 + +### 用法 + +~~~jsx {} +"delete-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-vote** 事件的回调函数接收一个包含以下属性的对象: + +- `cardId` - (必需)被移除投票的卡片的 ID +- `skipProvider` - (可选)控制是否跳过向服务器发送请求 + +:::info +要管理内部事件,您可以参考[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "delete-vote" 事件 +board.api.on("delete-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**更新日志:** 该事件自 v1.4 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md new file mode 100644 index 0000000..e486714 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: drag-card +title: drag-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 drag-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费 30 天评估版 DHTMLX 看板。 +--- + +# drag-card + +### 描述 + +@short: 当使用拖放操作移动卡片时,此事件会被触发。 + +### 用法 + +~~~jsx {} +"drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source: array +}) => void; +~~~ + +### 参数 + +**drag-card** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)被拖动的卡片的 ID +- `columnId` - (必需)卡片当前所在列的 ID +- `rowId` - (可选)卡片当前所在行的 ID +- `before` - (可选)位于拖动卡片之后的卡片的 ID +- `source` - (可选)包含被移动卡片 ID 的数组 + +:::info +要管理内部事件,可以使用 [**Event Bus methods**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "drag-card" 事件 +board.api.on("drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**更新日志:** 此事件自版本 1.4 起可用 + +**相关示例:** [Kanban. 禁用对特定列的拖放](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md new file mode 100644 index 0000000..9f85224 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: duplicate-card +title: duplicate-card 事件 +description: 了解 DHTMLX JavaScript 看板库中的 duplicate-card 事件。浏览开发者指南、API 参考,尝试代码示例和在线演示,并免费下载 30 天试用版的 DHTMLX 看板。 +--- + +# duplicate-card + +### 描述 + +@short: 当卡片被复制时触发 + +### 用法 + +~~~jsx {} +"duplicate-card": ({ + id: string | number, + card?: object, + select?: boolean +}) => void; +~~~ + +### 参数 + +**duplicate-card** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必填)被复制卡片的 ID +- `card` - (可选)新卡片的数据对象。完整的卡片参数列表请参见 [here](/api/config/js_kanban_cards_config.md) +- `select` - (可选)控制新添加的卡片是否被选中 + +:::info +要处理内部事件,可以使用[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "duplicate-card" 事件 +board.api.on("duplicate-card", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** `select` 参数自 v1.5.10 版本开始支持 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md new file mode 100644 index 0000000..5a84ff4 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: end-drag-card +title: end-drag-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 end-drag-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# end-drag-card + +### 描述 + +@short: 当卡片拖拽操作结束时触发 + +### 用法 + +~~~jsx {} +"end-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### 参数 + +**end-drag-card** 事件的回调函数接收一个包含以下详细信息的对象: + +- `id` - (必填)被拖拽卡片的 ID +- `columnId` - (必填)当前卡片所在列的 ID +- `rowId` - (可选)卡片所在行的 ID +- `before` - (可选)在该卡片之后的卡片 ID +- `source` - (可选)包含移动卡片 ID 的数组 + +:::info +若需管理内部事件,您可以使用[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "end-drag-card" 事件 +board.api.on("end-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**更新日志:** 此事件自 v1.4 版本起支持 + +**相关示例:** [看板。禁用特定列的拖放](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md new file mode 100644 index 0000000..32ed261 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: move-card +title: move-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 move-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# move-card + +### 描述 + +@short: 当卡片被移动时触发 + +### 用法 + +~~~jsx {} +"move-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**move-card** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)被移动的卡片的 ID +- `columnId` - (必需)卡片将被放置的列的 ID +- `rowId` - (可选)卡片将被放置的行的 ID +- `before` - (可选)移动的卡片将插入到其前面的卡片的 ID +- `skipProvider` - (可选)控制是否阻止向服务器发送请求 + +:::info +要管理内部事件,您可以使用 [**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "move-card" 事件 +board.api.on("move-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**相关示例:** [Kanban. 禁用特定列的拖放](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md new file mode 100644 index 0000000..b81956d --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: move-column +title: move-column 事件 +description: 探索 DHTMLX JavaScript Kanban 库中的 move-column 事件。查看开发者指南、API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# move-column + +### 描述 + +@short: 当列被移动时触发 + +### 用法 + +~~~jsx {} +"move-column": ({ + id: string | number, + before: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**move-column** 事件的回调接收一个包含以下属性的对象: + +- `id` - (必需)被移动列的 ID +- `before` - (必需)被移动列将放置于其前的列的 ID +- `skipProvider` - (可选)控制是否跳过向服务器发送请求 + +:::info +要管理内部事件,您可以参考[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "move-column" 事件 +board.api.on("move-column", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** 此事件在 v1.1 中引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md new file mode 100644 index 0000000..24cdd26 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: move-row +title: move-row 事件 +description: 探索 DHTMLX JavaScript Kanban 库中的 move-row 事件。查找开发者指南、API 参考、代码示例、实时演示,并免费下载 DHTMLX Kanban 的 30 天试用版。 +--- + +# move-row + +### 描述 + +@short: 当行被移动时触发 + +### 用法 + +~~~jsx {} +"move-row": ({ + id: string | number, + before: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**move-row** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)被移动行的 ID +- `before` - (必需)被移动行将放置在其前面的行的 ID +- `skipProvider` - (可选)控制是否跳过向服务器的请求 + +:::info +要管理内部事件,您可以使用 [**Event Bus 方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {8-10} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 监听 "move-row" 事件 +board.api.on("move-row", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** 此事件自 v1.1 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md new file mode 100644 index 0000000..371a4fe --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll +title: scroll 事件 +description: 探索 DHTMLX JavaScript 看板库中的 scroll 事件。查阅开发者指南、API 参考,试用代码示例和在线演示,并免费下载 DHTMLX 看板的30天试用版。 +--- + +# scroll + +### 描述 + +@short: 当滚动到指定元素时触发 + +### 用法 + +~~~jsx {} +"scroll": ({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}) => void; +~~~ + +### 参数 + +**scroll** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)目标元素的 ID +- `to` - (必需)指定目标元素类型:*"column"*、*"row"* 或 *"card"* +- `options` - (可选)包含滚动选项的对象。详细参数列表请参见 [这里](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +:::info +要处理内部事件,您可以使用 [**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "scroll" 事件 +board.api.on("scroll", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** 此事件自 v1.2 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md new file mode 100644 index 0000000..50d073a --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: select-card +title: select-card 事件 +description: 了解 DHTMLX JavaScript 看板库中 select-card 事件的工作原理。探索开发者指南和 API 参考,查看代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# select-card + +### 描述 + +@short: 当选中卡片时触发 + +### 用法 + +~~~jsx {} +"select-card": ({ + id: string | number, + groupMode?: boolean +}) => void; +~~~ + +### 参数 + +**select-card** 事件的回调接收一个包含以下属性的对象: + +- `id` - (必需)被选中卡片的 ID +- `groupMode` - (可选)表示多选模式(默认为 false) + +:::info +要管理内部事件,您可以使用 [**Event Bus 方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "select-card" 事件 +board.api.on("select-card", (obj) => { + console.log(obj.id); +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md new file mode 100644 index 0000000..c3e02d7 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md @@ -0,0 +1,52 @@ +--- +sidebar_label: set-edit +title: set-edit 事件 +description: 探索 DHTMLX JavaScript 看板库中的 set-edit 事件文档。查看开发者指南、API 参考,尝试在线演示,并免费下载 DHTMLX 看板的 30 天试用版。 +--- + +# set-edit + +### 描述 + +@short: 当编辑器切换时触发 + +### 用法 + +~~~jsx {} +"set-edit": ({ cardId: string | number, eventSource?: "select-card" } | null) => void; +~~~ + +### 参数 + +**set-edit** 事件的回调函数接受 *null* 或包含以下属性的对象: + +- `cardId` - (必需)正在编辑的卡片 ID +- `eventSource` - (可选)指示触发 ***set-edit*** 事件的 ***"select-card"*** 操作 + +:::note +值为 ***null*** 表示编辑器正在关闭 +::: + +:::info +要管理内部事件,可以使用[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 阻止用户单击卡片时编辑 +board.api.intercept("set-edit", (ev) => { + return ev?.eventSource != "select-card"; +}); +~~~ + +**更新日志:** + - 该事件在 v1.2 版本中引入 + - ***eventSource*** 参数在 v1.6 版本中添加 + +**相关示例:** [Kanban. 通过双击任务打开编辑器](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md new file mode 100644 index 0000000..40bdb73 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: set-search +title: set-search 事件 +description: 了解 DHTMLX JavaScript Kanban 库中的 set-search 事件。查看开发者指南,探索 API 参考,测试代码示例和在线演示,并获取 DHTMLX Kanban 免费 30 天试用。 +--- + +# set-search + +### 描述 + +@short: 当执行卡片搜索时触发 + +### 用法 + +~~~jsx {} +"set-search": ({ + value: string, + by?: string +}) => void; +~~~ + +### 参数 + +**set-search** 事件的回调函数接收一个包含以下参数的对象: + +- `value` - (必填)搜索关键词 +- `by` - (可选)用于搜索的卡片字段 + +:::info +要处理内部事件,可以使用[**Event Bus 方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "set-search" 事件 +board.api.on("set-search", (obj) => { + console.log(obj.value); +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md new file mode 100644 index 0000000..8b147ab --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: set-sort +title: set-sort 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 set-sort 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# set-sort + +### 描述 + +@short: 当卡片被排序时触发。 + +### 用法 + +~~~jsx {} +"set-sort": ( + { + by?: string | ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +) => void; +~~~ + +### 参数 + +**set-sort** 事件的回调函数可以接收 *null* 或包含以下属性的对象: + +- `by` - (可选)指定用于排序的卡片字段(*字符串* 或 *函数*) +- `dir` - (可选)排序方向,取值为 *"asc"* 或 *"desc"* +- `preserve` - (可选)是否保持当前排序状态 +- `columnId` - (可选)标识正在排序的列 + +:::info +有关内部事件的操作,请参阅 [**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "set-sort" 事件 +board.api.on("set-sort", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** 此事件自 v1.2 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md new file mode 100644 index 0000000..004944f --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: start-drag-card +title: start-drag-card 事件 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 start-drag-card 事件。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并免费下载 DHTMLX Kanban 的 30 天免费评估版本。 +--- + +# start-drag-card + +### 描述 + +@short: 当卡片开始被拖动时触发 + +### 用法 + +~~~jsx {} +"start-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### 参数 + +**start-drag-card** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)被拖动卡片的 ID +- `columnId` - (必需)卡片当前所在列的 ID +- `rowId` - (可选)卡片当前所在行的 ID +- `before` - (可选)卡片在列中紧随被拖动卡片之后的卡片 ID +- `source` - (可选)包含被移动卡片 ID 的数组 + +:::info +要操作内部事件,可以使用 [**Event Bus 方法**](/api/overview/main_overview.md/#事件总线方法)。 +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "start-drag-card" 事件 +board.api.on("start-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**更新日志:** 本事件自版本 1.4 起引入 + +**相关示例:** [Kanban. 禁用特定列的拖放功能](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md new file mode 100644 index 0000000..f88c091 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md @@ -0,0 +1,41 @@ +--- +sidebar_label: unselect-card +title: unselect-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 unselect-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费30天试用版。 +--- + +# unselect-card + +### 描述 + +@short: 当卡片被取消选中时触发 + +### 用法 + +~~~jsx {} +"unselect-card": ({ id: string | number }) => void; +~~~ + +### 参数 + +**unselect-card** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)被取消选中的卡片的 ID + +:::info +要管理内部事件,您可以参考 [**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "unselect-card" 事件 +board.api.on("unselect-card", (obj) => { + console.log(obj.id); +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md new file mode 100644 index 0000000..5b40f8e --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-card +title: update-card 事件 +description: 探索 DHTMLX JavaScript 看板库中的 update-card 事件文档。查找开发者指南、API 参考、代码示例、在线演示及 DHTMLX 看板的免费 30 天试用。 +--- + +# update-card + +### 描述 + +@short: 当卡片数据更新时触发 + +### 用法 + +~~~jsx {} +"update-card": ({ + id: string | number, + card?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**update-card** 事件的回调函数接收一个包含以下属性的对象: + +- `id` - (必需)要更新的卡片标识符 +- `card` - (可选)包含新卡片数据的对象。完整的 **card** 属性列表请查看[**这里**](/api/config/js_kanban_cards_config.md) +- `replace` - (可选)决定是否完全替换现有数据 + +:::note +当 `replace` 设置为 *true* 时,旧数据将被新数据完全覆盖。否则,仅更新指定的值。 +::: + +- `skipProvider` - (可选)控制是否将更新发送到服务器 + +:::info +若需管理内部事件,可以使用[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "update-card" 事件 +board.api.on("update-card", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志**: +- v1.1 版本新增了 **id** 和 **card** 参数 +- v1.3 版本新增了 **replace** 参数 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md new file mode 100644 index 0000000..63ef271 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-column +title: update-column 事件 +description: 探索 DHTMLX JavaScript Kanban 库文档中的 update-column 事件。查看开发者指南、API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# update-column + +### 描述 + +@short: 当列数据被更新时触发。 + +### 用法 + +~~~jsx {} +"update-column": ({ + id: string | number, + column?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**update-column** 事件的回调接收一个包含以下属性的对象: + +- `id` - (必需)标识要更新的列 +- `column` - (可选)提供列的新数据对象。完整的 **column** 属性列表请参见[**此处**](/api/config/js_kanban_columns_config.md) +- `replace` - (可选)决定是替换整个数据集还是仅更新指定字段 + +:::note +将 `replace` 设置为 *true* 表示现有数据将被新数据完全替换。如果为 false 或省略,则只更新提供的值。 +::: + +- `skipProvider` - (可选)控制是否发送更新服务器的请求,或跳过此请求 + +:::info +如需管理内部事件,请参阅[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "update-column" 事件 +board.api.on("update-column", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志**: +- **id** 和 **column** 参数在 v1.1 中引入 +- **replace** 参数在 v1.3 中添加 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md new file mode 100644 index 0000000..c7b6ed6 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md @@ -0,0 +1,62 @@ +--- +sidebar_label: update-comment +title: update-comment 事件 +description: 了解 DHTMLX JavaScript 看板库中的 update-comment 事件。查看开发者指南和 API 参考,探索代码示例和在线演示,并免费下载 DHTMLX 看板的 30 天试用版。 +--- + +# update-comment + +### 描述 + +@short: 当评论被更新时触发 + +### 用法 + +~~~jsx {} +"update-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**update-comment** 事件的回调函数接收一个包含以下参数的对象: + +- `id` - (可选)被更新评论的 ID +- `cardId` - (必需)评论所在卡片的 ID +- `comment` - (必需)包含更新后评论详情的对象。可包含: + - `id` - (可选)更新后评论的 ID + - `cardId` - (可选)更新后评论所在的卡片 ID + - `text` - (可选)更新后的评论文本 + - `date` - (可选)更新后的评论日期 + - `html` - (可选)更新后的评论 HTML 标记。若要显示 HTML 而非纯文本,请在 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-类型参数) 配置中启用 `html` 属性 +- `skipProvider` - (可选)控制是否将更新请求发送到服务器 + +:::info +要管理内部事件,您可以使用 [**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "update-comment" 事件 +board.api.on("update-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**更新日志:** 此事件自 v1.4 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md new file mode 100644 index 0000000..39eb425 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-row +title: update-row 事件 +description: 了解 DHTMLX JavaScript 看板库中的 update-row 事件。浏览开发者指南、API 参考,尝试代码示例和在线演示,并获取 DHTMLX 看板的免费 30 天试用。 +--- + +# update-row + +### 描述 + +@short: 当行数据更新时触发 + +### 用法 + +~~~jsx {} +"update-row": ({ + id: string | number, + row?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**update-row** 事件的回调函数接收一个包含以下参数的对象: + +- `id` - (必需)正在更新的行的标识符 +- `row` - (可选)该行的新数据对象。完整的 **row** 参数列表请查看[**这里**](/api/config/js_kanban_rows_config.md) +- `replace` - (可选)控制数据是完全替换还是部分更新 + +:::note +将 `replace` 设置为 *true* 会用新数据完全覆盖旧数据。如果省略或设置为 false,则只更新指定的值。 +::: + +- `skipProvider` - (可选)控制是否抑制向服务器的请求 + +:::info +有关内部事件的管理,请参阅[**事件总线方法**](/api/overview/main_overview.md/#事件总线方法) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 监听 "update-row" 事件 +board.api.on("update-row", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志**: +- **id** 和 **row** 参数于 v1.1 版本引入 +- **replace** 参数于 v1.3 版本新增 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md new file mode 100644 index 0000000..55be1d7 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md @@ -0,0 +1,50 @@ +--- +sidebar_label: api.exec() +title: exec 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 exec 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版 DHTMLX 看板。 +--- + +# api.exec() + +### 描述 + +@short: 此方法允许您在看板内部触发事件。 + +### 用法 + +~~~jsx {} +api.exec( + event: string, + config: object +): void; +~~~ + +### 参数 + +- `event` - (必需)您想要触发的事件名称 +- `config` - (必需)一个包含与触发事件相关参数的对象 + +### 事件 + +:::info +您可以在[**此处**](/api/overview/main_overview.md/#kanban-事件)找到看板内部事件的完整列表 +::: + +### 示例 + +~~~jsx {7,9-12} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 选择 ID 为 1 的卡片 +board.api.exec("select-card", { id: 1 }); +// 添加新卡片但不向服务器发送更改 +board.api.exec("add-card", { + columnId: "backlog", + skipProvider: true, +}); +~~~ + +**相关示例:** [Kanban. Preserve sorting](https://snippet.dhtmlx.com/74nyuv14?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md new file mode 100644 index 0000000..e3a999f --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md @@ -0,0 +1,100 @@ +--- +sidebar_label: api.getReactiveState() +title: getReactiveState 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getReactiveState 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版 DHTMLX 看板。 +--- + +# api.getReactiveState() + +### 描述 + +@short: 获取一个包含看板板块响应式属性的对象。 + +### 用法 + +~~~jsx {} +api.getReactiveState(): object; +~~~ + +### 返回值 + +该方法返回一个包含以下属性的对象: + +~~~jsx {} +{ + areasMeta: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + cardHeight: {...}, + cardShape: {...}, + cards: {...}, + cardsMap: {...}, + cardsMeta: {...}, + columnKey: {...}, + columnShape: {...}, + columns: {...}, + currentUser: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + edit: {...}, + history: {...}, + layout: {...}, + links: {...}, + overAreaId: {...}, + readonly: {...}, + rowKey: {...}, + rowShape: {...}, + rows: {...}, + scroll: {...}, + search: {...}, + selected: {...}, + sort: {...} +} +~~~ + +### 示例 + +~~~jsx {7-37} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 访问看板的响应式状态 +const state = board.api.getReactiveState(); + +// 订阅 columns 的变化,并打印更新后的数组 +state.columns.subscribe((data) => { + console.log(data); +}); + +// 订阅 cards 的变化,并打印更新后的数组 +state.cards.subscribe((data) => { + console.log(data); +}); + +// 订阅 rows 的变化,并打印更新后的数组 +state.rows.subscribe((data) => { + console.log(data); +}); + +// 订阅卡片选择变化,并打印所选卡片的 ID +state.selected.subscribe((data) => { + console.log(data); +}); + +// 设置新的选择 +state.selected.set([1, 2]); + +// 通过添加另一个卡片 ID 更新选择 +state.selected.update((data) => { + data.push(3); + return data; +}); +~~~ + +**更新日志:** 该方法在版本 1.4 中进行了更新 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md new file mode 100644 index 0000000..32cec33 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md @@ -0,0 +1,83 @@ +--- +sidebar_label: api.getState() +title: getState 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getState 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版。 +--- + +# api.getState() + +### 描述 + +@short: 获取包含 Kanban StateStore 属性的对象。 + +### 用法 + +~~~jsx {} +api.getState(): object; +~~~ + +### 返回值 + +此方法返回一个包含以下属性的对象: + +~~~jsx {} +{ + areasMeta: object, + before: string | number, + cardHeight: number | null, + cards: array, + cardShape: object, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + columnShape: object, + currentUser: number | string | null, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + history: object, + layout: string, + links: array, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + rowShape: object, + scroll: object, + search: object, + selected: array, + sort: object, + // 已废弃选项 + fromAreaMeta: object, // 在 v.1.2 中删除 + editorShape: array, // 在 v.1.4 中删除 + dropAreaItemsCoords: array, // v1.4 中废弃 + dropAreasCoords: array, // v1.4 中废弃 + overAreaMeta: object, // v1.4 中废弃 +} +~~~ + +### 示例 + +~~~jsx {7-12} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 获取当前 Kanban 的状态 +const state = board.api.getState(); +console.log(state.cards); // 显示卡片数据 +console.log(state.columns); // 显示列数据 +console.log(state.rows); // 显示行数据 +console.log(state.cardShape); // 显示卡片配置 +//... +~~~ + +**更新日志:** +该方法在 v1.4 版本中进行了更新,以下参数被废弃: +- ***dropAreaItemsCoords*** +- ***dropAreasCoords*** +- ***overAreaMeta*** +***editorShape*** 参数已被移除 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md new file mode 100644 index 0000000..59f00ec --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: api.getStores() +title: getStores 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getStores 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版本。 +--- + +# api.getStores() + +### 描述 + +@short: 获取一个包含看板 DataStore 属性的对象。 + +### 用法 + +~~~jsx {} +api.getStores(): object; +~~~ + +### 返回值 + +该方法返回一个包含 **DataStore** 参数的对象: + +~~~jsx {} +{ + data: DataStore // (参数对象) +} +~~~ + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 获取看板的 DataStore 对象 +const store = board.api.getStores(); +console.log(store); +~~~ + +**更新日志:** 此方法在 v1.2 版本中进行了更新 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md new file mode 100644 index 0000000..b257de7 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md @@ -0,0 +1,47 @@ +--- +sidebar_label: api.intercept() +title: intercept 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 intercept 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载免费的 30 天评估版本的 DHTMLX 看板。 +--- + +# api.intercept() + +### 描述 + +@short: 允许捕获并阻止内部事件在发生之前的执行。 + +### 用法 + +~~~jsx {} +api.intercept( + event: string, + callback: function +): void; +~~~ + +### 参数 + +- `event` - (必需)要监听的事件 +- `callback` - (必需)要执行的函数(其参数取决于被拦截的事件) + +### 事件 + +:::info +您可以在[**这里**](/api/overview/main_overview.md/#kanban-事件)查看完整的看板内部事件列表 +::: + +### 示例 + +~~~jsx {7-11} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 阻止卡片被移动到 ID 为 "done" 的列 +board.api.intercept("move-card", ({ id, columnId }) => { + if(columnId !== "done" ){ + return false; + } +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md new file mode 100644 index 0000000..b1a1ec8 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: export.json() +title: json 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 json 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# export.json() + +### 描述 + +@short: 将看板数据保存为 JSON 文件 + +### 用法 + +~~~jsx {} +export.json(): void; +~~~ + +:::info +该方法将看板数据保存为如下格式的 JSON 文件: +~~~jsx {} +{ + "cards": [], + "columns": [], + "rows": [] +} +~~~ +::: + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 导出看板数据为 JSON () +board.export.json(); // => { "cards": [...], "columns": [...], "rows": [] } +~~~ + +**更新日志:** 该方法自 v1.3 版本起新增 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md new file mode 100644 index 0000000..b6a04b0 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: api.on() +title: on 方法 +description: 了解 DHTMLX JavaScript Kanban 库中的 on 方法。浏览开发者指南、API 参考,试用代码示例和在线演示,并免费下载 DHTMLX Kanban 30 天试用版。 +--- + +# api.on() + +### 描述 + +@short: 允许附加处理函数以监听内部事件 + +### 用法 + +~~~jsx {} +api.on( + event: string, + handler: function +): void; +~~~ + +### 参数 + +- `event` - (必需)要监听的事件名称 +- `handler` - (必需)处理该事件的函数(参数根据触发的事件而异) + +### 事件 + +:::info +您可以在[**这里**](/api/overview/main_overview.md/#kanban-事件)查看 Kanban 内部事件的完整列表 +::: + +### 示例 + +~~~jsx {7-9} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 当卡片被移动时,将卡片数据输出到控制台 +board.api.on("move-card", ({ id, columnId }) => { + console.log({ id, columnId }); +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md new file mode 100644 index 0000000..1686076 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: api.setNext() +title: setNext 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setNext 方法。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# api.setNext() + +### 描述 + +@short: 允许将特定操作插入到事件总线(Event Bus)序列中。 + +### 用法 + +~~~jsx {} +api.setNext(next: any): void; +~~~ + +### 参数 + +- `next` - (必需)要添加到**事件总线**序列中的操作 + +### 示例 + +~~~jsx {15} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row" + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +将 **RestDataProvider** 包含在**事件总线**序列中是处理诸如**添加**、**删除**等数据操作,以及向服务器发送相关请求所必需的。 +::: diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md new file mode 100644 index 0000000..e1307da --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md @@ -0,0 +1,57 @@ +--- +sidebar_label: addCard() +title: addCard 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 addCard 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版。 +--- + +# addCard() + +### 描述 + +@short: 将新卡片插入到看板中 + +### 用法 + +~~~jsx {} +addCard({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object +}): void; +~~~ + +### 参数 + +- `columnId` - (必填)卡片将被添加到的列的 ID +- `id` - (可选)新卡片的标识符 +- `rowId` - (可选)卡片应放置的行的 ID +- `before` - (可选)新卡片将插入到该卡片之前的 ID +- `select` - (可选)指定添加后是否选中新卡片 +- `card` - (可选)表示新卡片的数据对象 + +:::info +完整的 **card** 参数列表请参见 [**这里**](/api/config/js_kanban_cards_config.md) +::: + +### 示例 + +~~~jsx {7-12} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 在 "backlog" 列中添加新卡片 +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" } +}); +~~~ + +:::tip +也可以将卡片 ID 包含在 **card** 对象中 +::: diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md new file mode 100644 index 0000000..a4b03eb --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md @@ -0,0 +1,54 @@ +--- +sidebar_label: addColumn() +title: addColumn 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 addColumn 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费30天试用版的 DHTMLX 看板。 +--- + +# addColumn() + +### 描述 + +@short: 在看板中插入一个新的列 + +### 用法 + +~~~jsx {} +addColumn({ + id?: string | number, + column?: object, + before?: string | number +}): void; +~~~ + +### 参数 + +- `id` - (可选)指定新列的 ID +- `column` - (可选)提供定义新列的数据对象 +- `before` - (可选)指定新列插入位置之前的列的 ID + +:::info +您可以在[**这里**](/api/config/js_kanban_columns_config.md)找到完整的 **column** 参数列表 +::: + +### 示例 + +~~~jsx {7-16} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 添加新列 +board.addColumn({ + id: "extra_column", + column: { + label: "额外列", + limit: 2, + strictLimit: 2, + collapsed: true + }, + before: "column_2" +}); +~~~ + +**更新日志**:参数 **id**、**column** 和 **before** 于 v1.1 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md new file mode 100644 index 0000000..316eebc --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: addComment() +title: addComment 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 addComment 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# addComment() + +### 描述 + +@short: 使用卡片的 ID 向指定卡片插入一个新的评论。 + +### 用法 + +~~~jsx {} +addComment({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### 参数 + +- `id` - (可选)新评论的唯一标识符 +- `cardId` - (必需)将添加评论的卡片的标识符 +- `comment` - (必需)定义新评论的对象。可用字段包括: + - `text` - (可选)评论的纯文本内容 + - `date` - (可选)评论的时间戳 + - `html` - (可选)格式化为 HTML 的评论内容。要显示 HTML 内容而非纯文本,必须在 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-类型参数) 配置中启用 `html` 选项 + +### 示例 + +~~~jsx {7-15} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 添加新评论 +board.addComment({ + id: 1, + cardId: 1, + comment: { + text: "", + date: new Date("01/07/2021"), + html: "重要评论" + } +}); +~~~ + +**更新日志:** 此方法自版本 1.4 起引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md new file mode 100644 index 0000000..9e54ec3 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: addLink() +title: addLink 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 addLink 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# addLink() + +### 描述 + +@short: 在看板中插入一个新的链接。 + +### 用法 + +~~~jsx {} +addLink({ + id?: string | number, + link: object +}): void; +~~~ + +### 参数 + +- `id` - (可选)新链接的标识符 +- `link` - (必需)表示新链接的数据对象。完整的链接参数列表请参见 [这里](/api/config/js_kanban_links_config.md) + +### 示例 + +~~~jsx {7-14} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 添加新链接 +board.addLink({ + id: 3, + link: { + masterId: 4, + slaveId: 6, + relation: "relatesTo", + } +}); +~~~ + +**更新日志:** 此方法自 v1.5 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md new file mode 100644 index 0000000..ffd5172 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: addRow() +title: addRow 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 addRow 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载免费 30 天评估版本的 DHTMLX 看板。 +--- + +# addRow() + +### 描述 + +@short: 在看板中插入一个新行 + +### 用法 + +~~~jsx {} +addRow({ + id?: string | number, + row?: object, + before?: string | number +}): void; +~~~ + +### 参数 + +- `id` - (可选)新行的标识符 +- `row` - (可选)表示新行的数据对象 +- `before` - (可选)新行应插入到其之前的行的 ID + +:::info +完整的 **row** 参数列表请参见[**这里**](/api/config/js_kanban_rows_config.md) +::: + +### 示例 + +~~~jsx {8-15} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 添加新行 +board.addRow({ + id: "extra_row", + row: { + label: "Extra row", + collapsed: false + }, + before: "row_2" +}); +~~~ + +**更新日志**:参数 **id**、**row** 和 **before** 于 v1.1 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md new file mode 100644 index 0000000..040c62a --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteCard() +title: deleteCard 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 deleteCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# deleteCard() + +### 描述 + +@short: 从看板的数据存储中删除指定的卡片。 + +### 用法 + +~~~jsx {} +deleteCard({ id: string | number }): void; +~~~ + +### 参数 + +- `id` - (必需)要删除卡片的唯一标识符 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 通过 id 删除卡片 +board.deleteCard({ id: 1 }); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md new file mode 100644 index 0000000..253b2d6 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteColumn() +title: deleteColumn 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 deleteColumn 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX 看板的30天试用版。 +--- + +# deleteColumn() + +### 描述 + +@short: 从看板数据存储中删除指定的列。 + +### 用法 + +~~~jsx {} +deleteColumn({ id: string | number }): void; +~~~ + +### 参数 + +- `id` - (必填)要删除的列的 ID + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 通过列的 ID 删除该列 +board.deleteColumn({ id: "backlog" }); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md new file mode 100644 index 0000000..ca9dd85 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: deleteComment() +title: deleteComment 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 deleteComment 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# deleteComment() + +### 描述 + +@short: 使用评论的 ID 从卡片中移除评论 + +### 用法 + +~~~jsx {} +deleteComment({ + id?: string | number, + cardId: string | number +}): void; +~~~ + +### 参数 + +- `id` - (可选)需要删除的评论 ID +- `cardId` - (必需)包含该评论的卡片 ID + +### 示例 + +~~~jsx {7-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 删除评论 +board.deleteComment({ + id: 1, + cardId: 1, +}); +~~~ + +**更新日志:** 本方法自 v1.4 版本起新增 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md new file mode 100644 index 0000000..1861187 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md @@ -0,0 +1,36 @@ +--- +sidebar_label: deleteLink() +title: deleteLink 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 deleteLink 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# deleteLink() + +### 描述 + +@short: 从看板数据存储中删除指定的链接。 + +### 用法 + +~~~jsx {} +deleteLink({ id: string | number }): void; +~~~ + +### 参数 + +- `id` - (必需)需要删除的链接的 ID + +### 示例 + +~~~jsx {8} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + links, +}); +// 通过 ID 删除链接 +board.deleteLink({ id: 5 }); +~~~ + +**更新日志:** 该方法在 v1.5 版本中添加 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md new file mode 100644 index 0000000..8f12e80 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteRow() +title: deleteRow 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 deleteRow 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# deleteRow() + +### 描述 + +@short: 从看板数据存储中删除指定的行。 + +### 用法 + +~~~jsx {} +deleteRow({ id: string | number }): void; +~~~ + +### 参数 + +- `id` - (必需)要删除的行的标识符 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 使用行的 id 删除该行 +board.deleteRow({ id: "feature" }); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md new file mode 100644 index 0000000..a75837b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md @@ -0,0 +1,29 @@ +--- +sidebar_label: destructor() +title: destructor 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 destructor 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版 DHTMLX 看板。 +--- + +# destructor() + +### 描述 + +@short: 清除看板的所有 HTML 元素并移除所有相关的事件处理程序。 + +### 用法 + +~~~jsx {} +destructor(): void; +~~~ + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 移除看板 +board.destructor(); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md new file mode 100644 index 0000000..a9c03a3 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: duplicateCard() +title: duplicateCard 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 duplicateCard 方法。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# duplicateCard() + +### 描述 + +@short: 根据给定的 ID 创建卡片的副本 + +### 用法 + +~~~jsx {} +duplicateCard({ + id: string | number, + card?: object, + select?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必填)要复制的卡片的 ID +- `card` - (可选)新卡片的数据对象。您可以在[**这里**](/api/config/js_kanban_cards_config.md)找到卡片参数的完整列表 +- `select` - (可选)决定新添加的卡片是否被选中 + +### 示例 + +~~~jsx {7-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 复制 ID 为 1 的卡片 +board.duplicateCard({ + id: 1, + card: { label: "Duplicated card" }, + select: true +}); +~~~ + +**更新日志:** `select` 参数在 v1.5.10 版本中添加 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md new file mode 100644 index 0000000..20cc114 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md @@ -0,0 +1,47 @@ +--- +sidebar_label: getAreaCards() +title: getAreaCards 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getAreaCards 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# getAreaCards() + +### 描述 + +@short: 获取指定列(以及行)内所有卡片的数据对象数组。 + +### 用法 + +~~~jsx {} +getAreaCards( + columnId: string | number, + rowId?: string | number +): array; +~~~ + +### 参数 + +- `columnId` - (必需)目标列的 ID +- `rowId` - (可选)目标行的 ID + +### 返回值 + +该方法返回一个表示卡片的数据对象数组。 + +:::info +当看板只有**列**而没有**行**时,只需传入***columnId***参数。在这种情况下,方法返回该列中所有卡片的数据对象数组。 + +如果看板同时包含**列**和**行**,则必须同时传入***columnId***和***rowId***参数。方法将返回位于指定列和行中的卡片数据对象数组。 +::: + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 从指定的列和行中获取卡片数据对象数组 +board.getAreaCards("column_id", "row_id"); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md new file mode 100644 index 0000000..8bf201c --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md @@ -0,0 +1,37 @@ +--- +sidebar_label: getCard() +title: getCard 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 getCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费30天评估版。 +--- + +# getCard() + +### 描述 + +@short: 使用指定的 ID 获取卡片的数据对象 + +### 用法 + +~~~jsx {} +getCard(id: string | number): object; +~~~ + +### 参数 + +- `id` - (必需)您想要访问的卡片的 ID + +### 返回值 + +此方法返回与给定 ID 关联的卡片的数据对象 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 获取 ID 为 1 的卡片的数据对象 +board.getCard(1); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md new file mode 100644 index 0000000..2f7198b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: getSelection() +title: getSelection 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getSelection 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# getSelection() + +### 描述 + +@short: 获取包含所选卡片 ID 的数组 + +### 用法 + +~~~jsx {} +getSelection(): array; +~~~ + +### 返回值 + +此方法返回一个数组,包含当前选中卡片的 ID。 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 获取包含所选卡片 ID 的数组 +board.getSelection(); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md new file mode 100644 index 0000000..cdaac36 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md @@ -0,0 +1,52 @@ +--- +sidebar_label: moveCard() +title: moveCard 方法 +description: 探索 DHTMLX JavaScript 看板库中的 moveCard 方法。查看开发者指南、API 参考、代码示例、实时演示,并获得 DHTMLX Kanban 免费 30 天试用。 +--- + +# moveCard() + +### 描述 + +@short: 将卡片移动到指定的列(以及行)。 + +### 用法 + +~~~jsx {} +moveCard({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number +}): void; +~~~ + +### 参数 + +- `id` - (必需)需要移动的卡片 ID +- `columnId` - (必需)卡片将放置的目标列 ID +- `rowId` - (可选)卡片将定位的目标行 ID +- `before` - (可选)在该卡片 ID 之前插入被移动卡片 + +:::info +当组件配置中设置了 **rowKey** 属性时,调用 **moveCard()** 方法时必须提供 **rowId**! +::: + +### 示例 + +~~~jsx {9-14} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 移动 ID 为 1 的卡片 +// 它将被放置到 "inprogress" 列和 "feature" 行中, +// 并定位在 ID 为 8 的卡片之前 +board.moveCard({ + id: 1, + columnId: "inprogress", + rowId: "feature", + before: 8 +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md new file mode 100644 index 0000000..8ef5193 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: moveColumn() +title: moveColumn 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 moveColumn 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费30天评估版。 +--- + +# moveColumn() + +### 描述 + +@short: 将某一列移动到看板中的新位置。 + +### 用法 + +~~~jsx {} +moveColumn({ + id: string | number, + before: string | number +}): void; +~~~ + +### 参数 + +- `id` - (必填)要移动的列的 ID +- `before` - (必填)移动的列将插入到此列之前的列 ID + +### 示例 + +~~~jsx {7-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 将 "backlog" 列移动,并放置到 "done" 列之前 +board.moveColumn({ + id: "backlog", + before: "done" +}); +~~~ + +**更新日志:** 此方法在 v1.1 版本中引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md new file mode 100644 index 0000000..c3900dd --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: moveRow() +title: moveRow 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 moveRow 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版本。 +--- + +# moveRow() + +### 描述 + +@short: 将某一行移动到看板中的新位置。 + +### 用法 + +~~~jsx {} +moveRow({ + id: string | number, + before: string | number +}): void; +~~~ + +### 参数 + +- `id` - (必需)需要移动的行的 ID +- `before` - (必需)将移动行放置在其前面的行的 ID + +### 示例 + +~~~jsx {8-11} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + row +}); +// 将 "task" 泳道移动,并放置在 "feature" 泳道之前 +board.moveRow({ + id: "task", + before: "feature" +}); +~~~ + +**更新日志:** 此方法在 v1.1 版本中添加 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md new file mode 100644 index 0000000..db97d3a --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: parse() +title: parse 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 parse 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# parse() + +### 描述 + +@short: 将数据加载到看板中 + +### 用法 + +~~~jsx {} +parse({ + columns?: array, + rows?: array, + cards?: array +}): void; +~~~ + +### 参数 + +- [`columns`](/api/config/js_kanban_columns_config.md) - (可选)包含列数据对象的数组 +- [`rows`](/api/config/js_kanban_rows_config.md) - (可选)包含行数据对象的数组 +- [`cards`](/api/config/js_kanban_cards_config.md) - (可选)包含卡片数据对象的数组 + +### 示例 + +~~~jsx {4-8} +// 创建看板 +const board = new kanban.Kanban("#root", {}); +// 将数据加载到看板 +board.parse({ + columns, + cards, + rows +}); +~~~ + +**更新日志:** 从 v1.1 版本开始,解析新数据前不再需要在构造函数中重置初始数据 + +**相关文档:** [数据操作](/guides/working_with_data#从本地数据源加载数据) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md new file mode 100644 index 0000000..2601ee6 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: redo() +title: redo 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 redo 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费 30 天评估版本的 DHTMLX 看板。 +--- + +# redo() + +### 描述 + +@short: 重新执行由 undo 方法撤销的操作 + +:::info +`redo()` 方法仅在配置中设置了 [`history: true`](/api/config/js_kanban_history_config.md) 时才有效! +::: + +### 用法 + +~~~jsx {} +redo(): void; +~~~ + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 重做看板历史中最后一次撤销的操作 +board.redo(); +~~~ + +**更新日志:** 此方法自 v1.3 版本引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md new file mode 100644 index 0000000..4a528a0 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll() +title: scroll 方法 +description: 探索 DHTMLX JavaScript Kanban 库中的 scroll 方法文档。查看开发者指南、API 参考、代码示例、在线演示,并免费下载 DHTMLX Kanban 30 天试用版。 +--- + +# scroll() + +### 描述 + +@short: 将看板视图移动到指定元素 + +### 用法 + +~~~jsx {} +scroll({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}): void; +~~~ + +### 参数 + +- `id` - (必填)要滚动到的元素 ID +- `to` - (必填)指定要滚动到的元素类型;可选值为 "column"、"row" 或 "card" +- `options` - (可选)包含滚动选项的对象。完整的可用参数列表见 [这里](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +### 示例 + +~~~jsx {7-15} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 将看板滚动到 ID 为 246 的卡片 +board.scroll({ + id: 246, + to: "card", + options: { + behavior: "smooth", + block: "end", + inline: "nearest" + } +}); +~~~ + +**更新日志:** 该方法自版本 1.2 起引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md new file mode 100644 index 0000000..4b3ce2a --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: selectCard() +title: selectCard 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 selectCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 免费的 30 天评估版本。 +--- + +# selectCard() + +### 描述 + +@short: 根据给定的 ID 高亮显示卡片。 + +### 用法 + +~~~jsx {} +selectCard({ + id: string | number, + groupMode?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必填)要选择的卡片的 ID +- `groupMode` - (可选)切换是否允许一次选择多张卡片(默认为 **false**) + +:::info +当 **groupMode** 设置为 **true** 时,**selectCard()** 方法会保持当前选择不变,同时将新卡片添加到选择中。 +::: + +### 示例 + +~~~jsx {7-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 选择 ID 为 1 的卡片 +board.selectCard({ + id: 1, + groupMode: true +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md new file mode 100644 index 0000000..5df7516 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: serialize() +title: serialize 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 serialize 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# serialize() + +### 描述 + +@short: 将看板数据转换为 JSON 格式。 + +### 用法 + +~~~jsx {} +serialize(): object; +~~~ + +### 返回值 + +该方法返回一个包含看板数据的对象: + +~~~jsx {} +{ + cards: [{...}, {...}, ...], + rows: [{...}, {...}, ...], + columns: [{...}, {...}, ...] +} +~~~ + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 获取看板数据对象 +board.serialize(); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md new file mode 100644 index 0000000..73844f7 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: setConfig() +title: setConfig 方法 +description: 你可以在 DHTMLX JavaScript 看板库的文档中了解 setConfig 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# setConfig() + +### 描述 + +@short: 使用新的配置设置更新看板 + +### 用法 + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### 参数 + +- `config` - (必填)一个包含看板配置选项的对象。查看完整属性列表请访问[这里](/api/overview/main_overview.md#kanban-属性) + +:::tip +此方法允许你调整看板控件的设置并加载数据。请注意,它不会影响历史记录(修改历史记录不被支持)或主题(请使用[`setTheme()`](/api/methods/js_kanban_settheme_method.md)方法来设置主题)。 +::: + +### 示例 + +~~~jsx {10-20,22-23} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +// 创建工具栏 +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + +// 使用新参数更新看板配置 +board.setConfig({ + columnKey: "stage", + rowKey: "type", + cardShape, + editorShape, + editor: { + autoSave: false + }, + /* 其他参数 */ +}); + +// 使用新项目更新工具栏配置 +toolbar.setConfig({ items: ["search", "spacer", "sort"] }); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md new file mode 100644 index 0000000..da2f261 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setEdit() +title: setEdit 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setEdit 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# setEdit() + +### 描述 + +@short: 切换看板卡片编辑器的开启或关闭状态 + +### 用法 + +~~~jsx {} +setEdit({ cardId: string | number } | null): void; +~~~ + +### 参数 + +此方法接受 *null* 或包含以下属性的对象: + +- `cardId` - (必填)要编辑的卡片 ID + +:::note +要关闭编辑器,使用带有 ***null*** 参数的 **setEdit()** 方法 +::: + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 打开指定卡片 ID 的编辑器 +board.setEdit({ cardId: 1 }); +~~~ + +**更新日志:** 此方法在 v1.2 版本中引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md new file mode 100644 index 0000000..f6b68f8 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: setLocale() +title: setLocale 方法 +description: 您可以在 DHTMLX JavaScript 看板库文档中了解 setLocale 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# setLocale() + +### 描述 + +@short: 为看板组件设置新的本地化配置 + +### 用法 + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### 参数 + +- `null` - (可选)将本地化设置重置回默认值(*英语*) +- `locale` - (可选)定义要应用的新本地化数据的对象 + +:::info +`setLocale()` 方法专门用于更新看板的本地化配置。要将看板恢复到默认本地化,只需调用 `setLocale()` 不带任何参数(或传入 *null*)。如果您仅需更改工具栏的本地化,请使用 [`toolbar.setLocale()`](/api/methods/toolbar_setlocale_method.md) 方法。 +::: + +### 示例 + +~~~jsx {7,9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, +}); +// 为看板设置 "de" 本地化 +board.setLocale(de); +// 重置看板为默认本地化 +board.setLocale(); // 或 board.setLocale(null); +~~~ + +**更新日志:** 该方法在版本 1.2 中进行了更新 + +**相关文档:** [本地化](/guides/localization.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md new file mode 100644 index 0000000..6b88c8e --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setSearch() +title: setSearch 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setSearch 方法。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# setSearch() + +### 描述 + +@short: 根据给定的搜索条件查找卡片 + +### 用法 + +~~~jsx {} +setSearch({ + value: string, + by?: string +}): void; +~~~ + +:::info +该方法允许您根据指定的搜索条件查找卡片。调用 **setSearch()** 时不传入任何参数将重置搜索输入并移除所有高亮显示的卡片。 +::: + +### 参数 + +- `value` - (必需)要搜索的文本 +- `by` - (可选)要在特定卡片字段中进行搜索 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 高亮显示符合参数的卡片 +board.setSearch({ value: "Integration", by: "label" }); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md new file mode 100644 index 0000000..ad7ba4c --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: setSort() +title: setSort 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setSort 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# setSort() + +### 描述 + +@short: 根据指定条件对卡片进行排序 + +### 用法 + +~~~jsx {} +setSort( + { + by?: string, // by?: ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +): void; +~~~ + +### 参数 + +该方法接受一个包含排序选项的对象或 *null*。在该对象内,可以定义以下属性: + +- `by` - (可选)用于排序的卡片字段。可以是一个 *字符串*,也可以是一个返回排序值的 *函数* +- `dir` - (可选)排序方向,可以是 *"asc"* 或 *"desc"* +- `columnId` - (可选)应用排序的列的 ID +- `preserve` - (可选)控制是否保持排序状态(默认值为 *false*) + +:::info +当 **preserve** 设置为 *false* 时,排序仅应用一次。也就是说,在添加或移动卡片后,排序顺序不会被保持。如果启用 **preserve**,即使添加或重新排列卡片,排序顺序也会保持一致。要清除保持的排序,请使用带有 ***null*** 参数的 **setSort()**。 +::: + +### 示例 + +~~~jsx {7-12} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 按 "label" 属性对卡片进行升序排序 +board.setSort({ + by: (obj) => obj.label, // 或者 by: "label" + dir: "asc", + columnId: "backlog", + preserve: false +}); +~~~ + +**更新日志:** 该方法自 v1.2 版本起支持 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md new file mode 100644 index 0000000..3beab30 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md @@ -0,0 +1,52 @@ +--- +sidebar_label: setTheme() +title: setTheme 方法 +description: 了解 DHTMLX JavaScript Kanban 库中的 setTheme 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 30 天试用版的 DHTMLX Kanban。 +--- + +# setTheme() + +### 描述 + +@short: 动态地为看板应用新的主题(重新初始化看板)。 + +### 用法 + +~~~jsx {} +setTheme({ + name?: string, // "material"(默认)| "willow" | "willow-dark" + fonts?: boolean +}): void; +~~~ + +### 参数 + +- `name` - (可选)指定要应用于看板的主题。可用选项包括: + - "material"(*默认*) + - "willow" + - "willow-dark" +- `fonts` - (可选)控制是否从 CDN 加载字体(wxi 字体)。 + +:::tip +您可以使用 [`theme`](../../config/js_kanban_theme_config) 属性设置初始主题。 +::: + +### 示例 + +~~~jsx {6} +// 创建看板 +const board = new kanban.Kanban("#root", { + // 初始配置参数 +}); +// 应用 "willow" 主题 +board.setTheme({ name: "willow", font: false }); +~~~ + +**更新日志:** 此方法自 v1.6 版本引入 + +**相关文章:** [样式设定](/guides/stylization) + +**相关示例:** +- [Kanban. 使用主题](https://snippet.dhtmlx.com/jnw54xif?tag=kanban) +- [Kanban. 作为样式表引入主题](https://snippet.dhtmlx.com/k3iw6ti0?tag=kanban) +- [Kanban. 通过 CSS 类更改主题](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md new file mode 100644 index 0000000..cd8ad1d --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: undo() +title: undo 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 undo 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# undo() + +### 描述 + +@short: 撤销看板中的最后一次操作 + +:::info +`undo()` 方法仅在启用 [`history: true`](/api/config/js_kanban_history_config.md) 配置时生效! +::: + +### 用法 + +~~~jsx {} +undo(): void; +~~~ + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 撤销看板历史中的上一步操作 +board.undo(); +~~~ + +**更新日志:** 此方法在 v1.3 版本中新增 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md new file mode 100644 index 0000000..bea604b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md @@ -0,0 +1,37 @@ +--- +sidebar_label: unselectCard() +title: unselectCard 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 unselectCard 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# unselectCard() + +### 描述 + +@short: 取消选中通过其 ID 标识的卡片。 + +### 用法 + +~~~jsx {} +unselectCard({ id: string | number }): void; +~~~ + +:::info +如果调用 **unselectCard()** 时不传入任何参数,将会清除所有卡片的选中状态。 +::: + +### 参数 + +- `id` - (必需)要取消选中的卡片的唯一标识符。 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 取消选中 ID 为 1 的卡片 +board.unselectCard({ id: 1 }); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md new file mode 100644 index 0000000..b22ab1b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateCard() +title: updateCard 方法 +description: 探索 DHTMLX JavaScript 看板库文档中的 updateCard 方法。查看开发者指南、API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 免费 30 天试用版。 +--- + +# updateCard() + +### 描述 + +@short: 通过卡片的 ID 更新卡片数据 + +### 用法 + +~~~jsx {} +updateCard({ + id: string | number, + card?: object, + replace?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必填)要更新的卡片的 ID +- `card` - (可选)包含卡片更新数据的对象。卡片参数的完整列表请查看 [**这里**](/api/config/js_kanban_cards_config.md) +- `replace` - (可选)控制是否完全替换已有数据 + +:::note +将 `replace` 设置为 *true* 会用新数据完全覆盖旧数据。否则,只会更新您提供的属性。 +::: + +### 示例 + +~~~jsx {7-16} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 使用 ID 为 1 的卡片更新数据 +board.updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*其他参数*/ + }, + replace: true +}); +~~~ + +**更新日志**: +- **id** 和 **card** 参数在 v1.1 中引入 +- **replace** 参数在 v1.3 中添加 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md new file mode 100644 index 0000000..c698931 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateColumn() +title: updateColumn 方法 +description: 探索 DHTMLX JavaScript 看板库中的 updateColumn 方法文档。查看开发者指南、API 参考、代码示例、在线演示,并获得 DHTMLX 看板的免费 30 天试用。 +--- + +# updateColumn() + +### 描述 + +@short: 使用列的 ID 修改该列的数据 + +### 用法 + +~~~jsx {} +updateColumn({ + id: string | number, + column?: object, + replace?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必选)指定要更新的列的 ID +- `column` - (可选)一个包含列新数据的对象。完整的 **column** 参数列表请参见[**这里**](/api/config/js_kanban_columns_config.md) +- `replace` - (可选)确定是否完全替换现有数据 + +:::note +当 `replace` 设置为 *true* 时,现有数据将被新数据完全替换。如果未设置,则只更新提供的值。 +::: + +### 示例 + +~~~jsx {7-16} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 使用 ID 为 "backlog" 的列更新列数据 +board.updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +**更新日志**: +- **id** 和 **column** 参数在 v1.1 中引入 +- **replace** 参数在 v1.3 中添加 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md new file mode 100644 index 0000000..dc2c74a --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md @@ -0,0 +1,62 @@ +--- +sidebar_label: updateComment() +title: updateComment 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 updateComment 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# updateComment() + +### 描述 + +@short: 通过指定评论的 ID 来修改卡片评论 + +### 用法 + +~~~jsx {} +updateComment({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### 参数 + +- `id` - (可选)要修改的评论的标识符 +- `cardId` - (必需)包含要更新评论的卡片的标识符 +- `comment` - (必需)描述更新后的评论详情的对象。可以包括: + - `id` - (可选)正在更新的评论的标识符 + - `cardId` - (可选)更新后的评论将放置的卡片的标识符 + - `text` - (可选)评论的新文本内容 + - `date` - (可选)与评论关联的新日期 + - `html` - (可选)评论的新 HTML 内容。若要显示 HTML 而非纯文本,请在 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-类型参数) 配置中启用 `html` 属性 + +### 示例 + +~~~jsx {7-17} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 更新评论 +board.updateComment({ + id: 1, + cardId: 1, + comment: { + id: 2, + cardId: 4, + text: "", + date: new Date("01/08/2021"), + html: "Updated comment" + } +}); +~~~ + +**更新日志:** 此方法自版本 1.4 起引入 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md new file mode 100644 index 0000000..891ca81 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md @@ -0,0 +1,55 @@ +--- +sidebar_label: updateRow() +title: updateRow 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 updateRow 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版。 +--- + +# updateRow() + +### 描述 + +@short: 根据行的 ID 修改该行的数据。 + +### 用法 + +~~~jsx {} +updateRow({ + id: string | number, + row?: object, + replace?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必需)要更新的行的标识符 +- `row` - (可选)包含该行新数据的对象。完整的 **row** 参数列表请参见[**这里**](/api/config/js_kanban_rows_config.md) +- `replace` - (可选)控制是否完全替换现有数据 + +:::note +将 `replace` 参数设置为 *true* 会用新数据完全覆盖旧数据。如果未设置或为 false,则只更新指定的值。 +::: + +### 示例 + +~~~jsx {8-15} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 使用 ID 为 "feature" 的行更新数据 +board.updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +**更新日志**: +- **id** 和 **row** 参数在 v1.1 版本中添加 +- **replace** 参数在 v1.3 版本中添加 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md new file mode 100644 index 0000000..841152a --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md @@ -0,0 +1,28 @@ +--- +sidebar_label: destructor() +title: destructor 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 Toolbar 的 destructor 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版本 DHTMLX Kanban。 +--- + +# destructor() + +### 描述 + +@short: 通过移除所有 Toolbar 的 HTML 元素并解除所有关联事件来进行清理。 + +### 用法 + +~~~jsx {} +destructor(): void; +~~~ + +### 示例 + +~~~jsx {6} +// 创建看板 +const board = new kanban.Kanban("#root", {}); +// 创建工具栏 +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// 移除工具栏 +toolbar.destructor(); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md new file mode 100644 index 0000000..9d1a6fa --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: setConfig() +title: setConfig 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 Toolbar 的 setConfig 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# setConfig() + +### 描述 + +@short: 使用新的配置设置更新 Toolbar + +### 用法 + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### 参数 + +- `config` - (必填)包含 Toolbar 配置选项的对象。完整属性列表请查看 [这里](/api/overview/main_overview.md#工具栏属性) + +:::note +只有对象中提供的参数会被更新。 +::: + +### 示例 + +~~~jsx {6-8} +// 创建看板 +const board = new kanban.Kanban("#root", {}); +// 创建 Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// 使用新参数更新 Toolbar 配置 +toolbar.setConfig({ + items: ["search", "spacer", "sort"] +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md new file mode 100644 index 0000000..5257cce --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: setLocale() +title: setLocale 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 Toolbar 的 setLocale 方法。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# setLocale() + +### 描述 + +@short: 使用新的本地化设置更新看板的 Toolbar + +### 用法 + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### 参数 + +- `null` - (可选)将 Toolbar 重置为默认本地化(*英文*) +- `locale` - (可选)包含要应用到 Toolbar 的新本地化数据的对象 + +:::info +看板中的 **Toolbar** 是一个独立的组件。当您只想更改 Toolbar 的本地化时,请使用 `toolbar.setLocale()` 方法。不带参数(或传入 *null*)调用 `toolbar.setLocale()` 会将其重置为默认本地化。若要更新看板本身的本地化,请使用 [`kanban.setLocale()`](/api/methods/js_kanban_setlocale_method.md) 方法。 +::: + +### 示例 + +~~~jsx {8} +// 创建看板 +const board = new kanban.Kanban("#root", {}); +// 创建 Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// 为看板设置 "de" 本地化 +board.setLocale(de); +// 为 Toolbar 设置 "de" 本地化 +toolbar.setLocale(de); +~~~ + +**更新日志:** `api` 参数在 v1.6 版本中已弃用 + +**相关文档:** [本地化](/guides/localization.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md new file mode 100644 index 0000000..bfccd3b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: 常用设置 +title: 常用设置 +description: 这是 DHTMLX JavaScript Kanban 库文档中 JavaScript 看板常用设置的快速概述。您可以浏览开发者指南,查看 API 参考,测试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# 常用设置 + +| 名称 | 描述 | +| -------------------------------------------- | ------------------------------------------------ | +| [$meta](../../common/js_kanban_meta_parameter/) | @getshort(../common/js_kanban_meta_parameter.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/events_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/events_overview.md new file mode 100644 index 0000000..a1f94d8 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/events_overview.md @@ -0,0 +1,37 @@ +--- +sidebar_label: 事件概览 +title: 事件概览 +description: 探索 DHTMLX JavaScript Kanban 库文档中的 JavaScript 看板事件概览。访问开发者指南、API 参考,试验代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# 事件概览 + +| 名称 | 描述 | +| ---------------------------------------------------------| ------------------------------------------------------ | +| [add-card](../../events/js_kanban_addcard_event/) | @getshort(../events/js_kanban_addcard_event.md) | +| [add-column](../../events/js_kanban_addcolumn_event/) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [add-comment](../../events/js_kanban_addcomment_event/) | @getshort(../events/js_kanban_addcomment_event.md) | +| [add-row](../../events/js_kanban_addrow_event/) | @getshort(../events/js_kanban_addrow_event.md) | +| [add-vote](../../events/js_kanban_addvote_event/) | @getshort(../events/js_kanban_addvote_event.md) | +| [delete-card](../../events/js_kanban_deletecard_event/) | @getshort(../events/js_kanban_deletecard_event.md) | +| [delete-column](../../events/js_kanban_deletecolumn_event/) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [delete-comment](../../events/js_kanban_deletecomment_event/) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [delete-row](../../events/js_kanban_deleterow_event/) | @getshort(../events/js_kanban_deleterow_event.md) | +| [delete-vote](../../events/js_kanban_deletevote_event/) | @getshort(../events/js_kanban_deletevote_event.md) | +| [drag-card](../../events/js_kanban_dragcard_event/) | @getshort(../events/js_kanban_dragcard_event.md) | +| [duplicate-card](../../events/js_kanban_duplicatecard_event/) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [end-drag-card](../../events/js_kanban_enddragcard_event/) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [move-card](../../events/js_kanban_movecard_event/) | @getshort(../events/js_kanban_movecard_event.md) | +| [move-column](../../events/js_kanban_movecolumn_event/) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [move-row](../../events/js_kanban_moverow_event/) | @getshort(../events/js_kanban_moverow_event.md) | +| [scroll](../../events/js_kanban_scroll_event/) | @getshort(../events/js_kanban_scroll_event.md) | +| [select-card](../../events/js_kanban_selectcard_event/) | @getshort(../events/js_kanban_selectcard_event.md) | +| [set-edit](../../events/js_kanban_setedit_event/) | @getshort(../events/js_kanban_setedit_event.md) | +| [set-search](../../events/js_kanban_setsearch_event/) | @getshort(../events/js_kanban_setsearch_event.md) | +| [set-sort](../../events/js_kanban_setsort_event/) | @getshort(../events/js_kanban_setsort_event.md) | +| [start-drag-card](../../events/js_kanban_startdragcard_event/) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [unselect-card](../../events/js_kanban_unselectcard_event/) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [update-card](../../events/js_kanban_updatecard_event/) | @getshort(../events/js_kanban_updatecard_event.md) | +| [update-column](../../events/js_kanban_updatecolumn_event/) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [update-comment](../../events/js_kanban_updatecomment_event/) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [update-row](../../events/js_kanban_updaterow_event/) | @getshort(../events/js_kanban_updaterow_event.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md new file mode 100644 index 0000000..ca201ec --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md @@ -0,0 +1,14 @@ +--- +sidebar_label: 事件总线方法 +title: 事件总线方法 +description: 探索 DHTMLX JavaScript 看板库中 JavaScript 看板内部事件总线方法的概述。查看开发者指南、API 参考,试用代码示例和实时演示,并免费下载 DHTMLX 看板的 30 天免费试用版。 +--- + +# 事件总线方法 + +| 名称 | 描述 | +| ---------------------------------------------------------| ----------------------------------------------------------- | +| [api.exec()](../../internal/js_kanban_exec_method/) | @getshort(../internal/js_kanban_exec_method.md) | +| [api.intercept()](../../internal/js_kanban_intercept_method/) | @getshort(../internal/js_kanban_intercept_method.md) | +| [api.on()](../../internal/js_kanban_on_method/) | @getshort(../internal/js_kanban_on_method.md) | +| [api.setNext()](../../internal/js_kanban_setnext_method/) | @getshort(../internal/js_kanban_setnext_method.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md new file mode 100644 index 0000000..3c3c54e --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: 导出方法 +title: 导出方法 +description: 您可以在 DHTMLX JavaScript 看板库文档中找到 JavaScript 看板内部导出方法的概述。查看开发者指南和 API 参考,浏览代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# 导出方法 + +| 名称 | 描述 | +| -------------------------------------------- | -------------------------------------------------- | +| [export.json()](../../internal/js_kanban_json_method/) | @getshort(../internal/js_kanban_json_method.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md new file mode 100644 index 0000000..0a37dd2 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md @@ -0,0 +1,16 @@ +--- +sidebar_label: RestDataProvider 方法 +title: RestDataProvider 方法 +description: 本节概述了 DHTMLX JavaScript 看板库中 JavaScript 看板的内部 RestDataProvider 方法。浏览开发者指南与 API 参考,查看代码示例和在线演示,并免费下载 DHTMLX 看板的 30 天免费试用版。 +--- + +# RestDataProvider 方法 + +| 名称 | 描述 | +| ------------------------------------------------------------ | ------------------------------------------------------------------ | +| [getCards()](../../provider/rest_methods/js_kanban_getcards_method/) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [getColumns()](../../provider/rest_methods/js_kanban_getcolumns_method/) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md) | +| [getLinks()](../../provider/rest_methods/js_kanban_getlinks_method/) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [getRows()](../../provider/rest_methods/js_kanban_getrows_method/) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [getUsers()](../../provider/rest_methods/js_kanban_getusers_method/) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [send()](../../provider/rest_methods/js_kanban_send_method/) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md new file mode 100644 index 0000000..01e0759 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: 状态方法 +title: 状态方法 +description: 这是 DHTMLX JavaScript Kanban 库中 JavaScript 看板的内部状态方法的快速概览。您可以查看开发者指南和 API 参考,测试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# 状态方法 + +| 名称 | 描述 | +| ---------------------------------------------------------| -------------------------------------------------------------| +| [api.getReactiveState()](../../internal/js_kanban_getreactivestate_method/) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [api.getState()](../../internal/js_kanban_getstate_method/) | @getshort(../internal/js_kanban_getstate_method.md) | +| [api.getStores()](../../internal/js_kanban_getstores_method/) | @getshort(../internal/js_kanban_getstores_method.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/main_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/main_overview.md new file mode 100644 index 0000000..9600dca --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/main_overview.md @@ -0,0 +1,225 @@ +--- +sidebar_label: API 概述 +title: API 概述 +description: 这里是 DHTMLX JavaScript Kanban 库文档中 JavaScript 看板 API 的总体概述。您可以浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# API 概述 + +## Kanban 构造函数 + +~~~js +new kanban.Kanban("#root", { + // 配置参数 +}); +~~~ + +**参数**: + +- HTML 容器(容器的 ID) +- 包含配置参数的对象([详细信息见此](#kanban-属性)) + +## 工具栏构造函数 + +~~~js +new kanban.Toolbar("#toolbar", { + // 配置参数 +}); +~~~ + +**参数**: + +- HTML 容器(容器的 ID) +- 包含配置设置的对象([详细信息见此](#工具栏属性)) + +## Kanban 方法 + +| 名称 | 描述 | +| ---------------------------------------------------------- | --------------------------------------------------------- | +| [addCard()](../../methods/js_kanban_addcard_method/) | @getshort(../methods/js_kanban_addcard_method.md) | +| [addColumn()](../../methods/js_kanban_addcolumn_method/) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [addComment()](../../methods/js_kanban_addcomment_method/) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [addLink()](../../methods/js_kanban_addlink_method/) | @getshort(../methods/js_kanban_addlink_method.md) | +| [addRow()](../../methods/js_kanban_addrow_method/) | @getshort(../methods/js_kanban_addrow_method.md) | +| [deleteCard()](../../methods/js_kanban_deletecard_method/) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [deleteColumn()](../../methods/js_kanban_deletecolumn_method/) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [deleteComment()](../../methods/js_kanban_deletecomment_method/) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [deleteLink()](../../methods/js_kanban_deletelink_method/) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [deleteRow()](../../methods/js_kanban_deleterow_method/) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [destructor()](../../methods/js_kanban_destructor_method/) | @getshort(../methods/js_kanban_destructor_method.md) | +| [duplicateCard()](../../methods/js_kanban_duplicatecard_method/) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [getAreaCards()](../../methods/js_kanban_getareacards_method/) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [getCard()](../../methods/js_kanban_getcard_method/) | @getshort(../methods/js_kanban_getcard_method.md) | +| [getSelection()](../../methods/js_kanban_getselection_method/) | @getshort(../methods/js_kanban_getselection_method.md) | +| [moveCard()](../../methods/js_kanban_movecard_method/) | @getshort(../methods/js_kanban_movecard_method.md) | +| [moveColumn()](../../methods/js_kanban_movecolumn_method/) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [moveRow()](../../methods/js_kanban_moverow_method/) | @getshort(../methods/js_kanban_moverow_method.md) | +| [parse()](../../methods/js_kanban_parse_method/) | @getshort(../methods/js_kanban_parse_method.md) | +| [redo()](../../methods/js_kanban_redo_method/) | @getshort(../methods/js_kanban_redo_method.md) | +| [scroll()](../../methods/js_kanban_scroll_method/) | @getshort(../methods/js_kanban_scroll_method.md) | +| [selectCard()](../../methods/js_kanban_selectcard_method/) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [serialize()](../../methods/js_kanban_serialize_method/) | @getshort(../methods/js_kanban_serialize_method.md) | +| [setConfig()](../../methods/js_kanban_setconfig_method/) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [setEdit()](../../methods/js_kanban_setedit_method/) | @getshort(../methods/js_kanban_setedit_method.md) | +| [setLocale()](../../methods/js_kanban_setlocale_method/) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [setSearch()](../../methods/js_kanban_setsearch_method/) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [setSort()](../../methods/js_kanban_setsort_method/) | @getshort(../methods/js_kanban_setsort_method.md) | +| [setTheme()](../../methods/js_kanban_settheme_method/) | @getshort(../methods/js_kanban_settheme_method.md) | +| [undo()](../../methods/js_kanban_undo_method/) | @getshort(../methods/js_kanban_undo_method.md) | +| [unselectCard()](../../methods/js_kanban_unselectcard_method/) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [updateCard()](../../methods/js_kanban_updatecard_method/) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [updateColumn()](../../methods/js_kanban_updatecolumn_method/) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [updateComment()](../../methods/js_kanban_updatecomment_method/) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [updateRow()](../../methods/js_kanban_updaterow_method/) | @getshort(../methods/js_kanban_updaterow_method.md) | + +## Kanban 内部 API + +### 事件总线方法 + +| 名称 | 描述 | +| ---------------------------------------------------------- | ----------------------------------------------------------- | +| [api.exec()](../../internal/js_kanban_exec_method/) | @getshort(../internal/js_kanban_exec_method.md) | +| [api.intercept()](../../internal/js_kanban_intercept_method/) | @getshort(../internal/js_kanban_intercept_method.md) | +| [api.on()](../../internal/js_kanban_on_method/) | @getshort(../internal/js_kanban_on_method.md) | +| [api.setNext()](../../internal/js_kanban_setnext_method/) | @getshort(../internal/js_kanban_setnext_method.md) | + +### 导出方法 + +| 名称 | 描述 | +| ---------------------------------------------------------- | ----------------------------------------------------------- | +| [export.json()](../../internal/js_kanban_json_method/) | @getshort(../internal/js_kanban_json_method.md) | + +### 状态方法 + +| 名称 | 描述 | +| ---------------------------------------------------------- | ----------------------------------------------------------- | +| [api.getReactiveState()](../../internal/js_kanban_getreactivestate_method/) | @getshort(../internal/js_kanban_getreactivestate_method.md)| +| [api.getState()](../../internal/js_kanban_getstate_method/) | @getshort(../internal/js_kanban_getstate_method.md) | +| [api.getStores()](../../internal/js_kanban_getstores_method/) | @getshort(../internal/js_kanban_getstores_method.md) | + +## Kanban 事件 + +| 名称 | 描述 | +| :--------------------------------------------------------- | :-----------------------------------------------------------| +| [add-card](../../events/js_kanban_addcard_event/) | @getshort(../events/js_kanban_addcard_event.md) | +| [add-column](../../events/js_kanban_addcolumn_event/) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [add-comment](../../events/js_kanban_addcomment_event/) | @getshort(../events/js_kanban_addcomment_event.md) | +| [add-link](../../events/js_kanban_addlink_event/) | @getshort(../events/js_kanban_addlink_event.md) | +| [add-row](../../events/js_kanban_addrow_event/) | @getshort(../events/js_kanban_addrow_event.md) | +| [add-vote](../../events/js_kanban_addvote_event/) | @getshort(../events/js_kanban_addvote_event.md) | +| [delete-card](../../events/js_kanban_deletecard_event/) | @getshort(../events/js_kanban_deletecard_event.md) | +| [delete-column](../../events/js_kanban_deletecolumn_event/) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [delete-comment](../../events/js_kanban_deletecomment_event/) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [delete-link](../../events/js_kanban_deletelink_event/) | @getshort(../events/js_kanban_deletelink_event.md) | +| [delete-row](../../events/js_kanban_deleterow_event/) | @getshort(../events/js_kanban_deleterow_event.md) | +| [delete-vote](../../events/js_kanban_deletevote_event/) | @getshort(../events/js_kanban_deletevote_event.md) | +| [drag-card](../../events/js_kanban_dragcard_event/) | @getshort(../events/js_kanban_dragcard_event.md) | +| [duplicate-card](../../events/js_kanban_duplicatecard_event/) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [end-drag-card](../../events/js_kanban_enddragcard_event/) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [move-card](../../events/js_kanban_movecard_event/) | @getshort(../events/js_kanban_movecard_event.md) | +| [move-column](../../events/js_kanban_movecolumn_event/) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [move-row](../../events/js_kanban_moverow_event/) | @getshort(../events/js_kanban_moverow_event.md) | +| [scroll](../../events/js_kanban_scroll_event/) | @getshort(../events/js_kanban_scroll_event.md) | +| [select-card](../../events/js_kanban_selectcard_event/) | @getshort(../events/js_kanban_selectcard_event.md) | +| [set-edit](../../events/js_kanban_setedit_event/) | @getshort(../events/js_kanban_setedit_event.md) | +| [set-search](../../events/js_kanban_setsearch_event/) | @getshort(../events/js_kanban_setsearch_event.md) | +| [set-sort](../../events/js_kanban_setsort_event/) | @getshort(../events/js_kanban_setsort_event.md) | +| [start-drag-card](../../events/js_kanban_startdragcard_event/) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [unselect-card](../../events/js_kanban_unselectcard_event/) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [update-card](../../events/js_kanban_updatecard_event/) | @getshort(../events/js_kanban_updatecard_event.md) | +| [update-column](../../events/js_kanban_updatecolumn_event/) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [update-comment](../../events/js_kanban_updatecomment_event/) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [update-row](../../events/js_kanban_updaterow_event/) | @getshort(../events/js_kanban_updaterow_event.md) | + +## Kanban 属性 + +| 名称 | 描述 | +| :--------------------------------------------------------- | :-----------------------------------------------------------| +| [cardHeight](../../config/js_kanban_cardheight_config/) | @getshort(../config/js_kanban_cardheight_config.md) | +| [cards](../../config/js_kanban_cards_config/) | @getshort(../config/js_kanban_cards_config.md) | +| [cardShape](../../config/js_kanban_cardshape_config/) | @getshort(../config/js_kanban_cardshape_config.md) | +| [cardTemplate](../../config/js_kanban_cardtemplate_config/) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [columnKey](../../config/js_kanban_columnkey_config/) | @getshort(../config/js_kanban_columnkey_config.md) | +| [columns](../../config/js_kanban_columns_config/) | @getshort(../config/js_kanban_columns_config.md) | +| [columnShape](../../config/js_kanban_columnshape_config/) | @getshort(../config/js_kanban_columnshape_config.md) | +| [currentUser](../../config/js_kanban_currentuser_config/) | @getshort(../config/js_kanban_currentuser_config.md) | +| [editor](../../config/js_kanban_editor_config/) | @getshort(../config/js_kanban_editor_config.md) | +| [~~editorAutoSave~~](/api/config/js_kanban_editorautosave_config.md) | 已废弃! ~~可选。启用或禁用自动保存模式~~ | +| [editorShape](../../config/js_kanban_editorshape_config/) | @getshort(../config/js_kanban_editorshape_config.md) | +| [history](../../config/js_kanban_history_config/) | @getshort(../config/js_kanban_history_config.md) | +| [links](../../config/js_kanban_links_config/) | @getshort(../config/js_kanban_links_config.md) | +| [locale](../../config/js_kanban_locale_config/) | @getshort(../config/js_kanban_locale_config.md) | +| [readonly](../../config/js_kanban_readonly_config/) | @getshort(../config/js_kanban_readonly_config.md) | +| [renderType](../../config/js_kanban_rendertype_config/) | @getshort(../config/js_kanban_rendertype_config.md) | +| [rowKey](../../config/js_kanban_rowkey_config/) | @getshort(../config/js_kanban_rowkey_config.md) | +| [rows](../../config/js_kanban_rows_config/) | @getshort(../config/js_kanban_rows_config.md) | +| [rowShape](../../config/js_kanban_rowshape_config/) | @getshort(../config/js_kanban_rowshape_config.md) | +| [scrollType](../../config/js_kanban_scrolltype_config/) | @getshort(../config/js_kanban_scrolltype_config.md) | +| [主题](../../config/js_kanban_theme_config/) | @getshort(../config/js_kanban_theme_config.md) | + +## 工具栏方法 + +| 名称 | 描述 | +| :--------------------------------------------------------- | ----------------------------------------------------------- | +| [destructor()](../../methods/toolbar_destructor_method/) | @getshort(../methods/toolbar_destructor_method.md) | +| [setConfig()](../../methods/toolbar_setconfig_method/) | @getshort(../methods/toolbar_setconfig_method.md) | +| [setLocale()](../../methods/toolbar_setlocale_method/) | @getshort(../methods/toolbar_setlocale_method.md) | + +## 工具栏属性 + +| 名称 | 描述 | +| :--------------------------------------------------------- | ----------------------------------------------------------- | +| [api](../../config/toolbar_api_config/) | @getshort(../config/toolbar_api_config.md) | +| [items](../../config/toolbar_items_config/) | @getshort(../config/toolbar_items_config.md) | +| [locale](../../config/toolbar_locale_config/) | @getshort(../config/toolbar_locale_config.md) | +| [主题](../../config/toolbar_theme_config/) | @getshort(../config/toolbar_theme_config.md) | + +## 通用设置 + +| 名称 | 描述 | +| :--------------------------------------------------------- | ----------------------------------------------------------- | +| [$meta](../../common/js_kanban_meta_parameter/) | @getshort(../common/js_kanban_meta_parameter.md) | + +## RestDataProvider API + +### RestDataProvider 方法 + +| 名称 | 描述 | +| ---------------------------------------------------------- | ----------------------------------------------------------- | +| [getCards()](../../provider/rest_methods/js_kanban_getcards_method/) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [getColumns()](../../provider/rest_methods/js_kanban_getcolumns_method/)| @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md) | +| [getLinks()](../../provider/rest_methods/js_kanban_getlinks_method/) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [getRows()](../../provider/rest_methods/js_kanban_getrows_method/) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [getUsers()](../../provider/rest_methods/js_kanban_getusers_method/) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [send()](../../provider/rest_methods/js_kanban_send_method/) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | + +### RestDataProvider 路由 + +| 名称 | 描述 | +| ---------------------------------------------------------- | ----------------------------------------------------------- | +| [GET `/cards`](/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | +| [GET `/columns`](/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | +| [GET `/links`](/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_links_route.md) | +| [GET `/rows`](/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | +| [GET `/users`](/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_users_route.md) | +| [GET `/uploads`](/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | +| [POST `/cards`](/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | +| [POST `/cards/{cardId}/comments`](/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | +| [POST `/cards/{cardId}/vote`](/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | +| [POST `/columns`](/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | +| [POST `/links`](/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_links_route.md) | +| [POST `/rows`](/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | +| [POST `/uploads`](/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | +| [PUT `/cards`](/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | +| [PUT `/cards/{id}/move`](/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | +| [PUT `/cards/{cardId}/comments/{cardId}`](/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | +| [PUT `/columns`](/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | +| [PUT `/columns/{id}/move`](/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | +| [PUT `/rows`](/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | +| [PUT `/rows/{id}/move`](/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | +| [DELETE `/cards`](/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | +| [DELETE `/cards/{cardId}/comments/{cardId}`](/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | +| [DELETE `/cards/{cardId}/vote`](/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | +| [DELETE `/columns`](/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | +| [DELETE `/links`](/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | +| [DELETE `/rows`](/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md new file mode 100644 index 0000000..e65c463 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md @@ -0,0 +1,45 @@ +--- +sidebar_label: 方法概览 +title: 方法概览 +description: DHTMLX JavaScript 看板库的文档包含其方法的全面概览。浏览开发者指南、API 参考,试用代码示例和实时演示,并免费下载 DHTMLX 看板的 30 天免费试用版。 +--- + +# 方法概览 + +| 名称 | 描述 | +| -------------------------------------------------------- | -------------------------------------------------------- | +| [addCard()](../../methods/js_kanban_addcard_method/) | @getshort(../methods/js_kanban_addcard_method.md) | +| [addColumn()](../../methods/js_kanban_addcolumn_method/) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [addComment()](../../methods/js_kanban_addcomment_method/) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [addLink()](../../methods/js_kanban_addlink_method/) | @getshort(../methods/js_kanban_addlink_method.md) | +| [addRow()](../../methods/js_kanban_addrow_method/) | @getshort(../methods/js_kanban_addrow_method.md) | +| [deleteCard()](../../methods/js_kanban_deletecard_method/) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [deleteColumn()](../../methods/js_kanban_deletecolumn_method/) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [deleteComment()](../../methods/js_kanban_deletecomment_method/) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [deleteLink()](../../methods/js_kanban_deletelink_method/) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [deleteRow()](../../methods/js_kanban_deleterow_method/) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [destructor()](../../methods/js_kanban_destructor_method/) | @getshort(../methods/js_kanban_destructor_method.md) | +| [duplicateCard()](../../methods/js_kanban_duplicatecard_method/) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [getAreaCards()](../../methods/js_kanban_getareacards_method/) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [getCard()](../../methods/js_kanban_getcard_method/) | @getshort(../methods/js_kanban_getcard_method.md) | +| [getSelection()](../../methods/js_kanban_getselection_method/) | @getshort(../methods/js_kanban_getselection_method.md) | +| [moveCard()](../../methods/js_kanban_movecard_method/) | @getshort(../methods/js_kanban_movecard_method.md) | +| [moveColumn()](../../methods/js_kanban_movecolumn_method/) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [moveRow()](../../methods/js_kanban_moverow_method/) | @getshort(../methods/js_kanban_moverow_method.md) | +| [parse()](../../methods/js_kanban_parse_method/) | @getshort(../methods/js_kanban_parse_method.md) | +| [redo()](../../methods/js_kanban_redo_method/) | @getshort(../methods/js_kanban_redo_method.md) | +| [scroll()](../../methods/js_kanban_scroll_method/) | @getshort(../methods/js_kanban_scroll_method.md) | +| [selectCard()](../../methods/js_kanban_selectcard_method/) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [serialize()](../../methods/js_kanban_serialize_method/) | @getshort(../methods/js_kanban_serialize_method.md) | +| [setConfig()](../../methods/js_kanban_setconfig_method/) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [setEdit()](../../methods/js_kanban_setedit_method/) | @getshort(../methods/js_kanban_setedit_method.md) | +| [setLocale()](../../methods/js_kanban_setlocale_method/) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [setSearch()](../../methods/js_kanban_setsearch_method/) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [setSort()](../../methods/js_kanban_setsort_method/) | @getshort(../methods/js_kanban_setsort_method.md) | +| [setTheme()](../../methods/js_kanban_settheme_method/) | @getshort(../methods/js_kanban_settheme_method.md) | +| [undo()](../../methods/js_kanban_undo_method/) | @getshort(../methods/js_kanban_undo_method.md) | +| [unselectCard()](../../methods/js_kanban_unselectcard_method/) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [updateCard()](../../methods/js_kanban_updatecard_method/) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [updateColumn()](../../methods/js_kanban_updatecolumn_method/) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [updateComment()](../../methods/js_kanban_updatecomment_method/) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [updateRow()](../../methods/js_kanban_updaterow_method/) | @getshort(../methods/js_kanban_updaterow_method.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md new file mode 100644 index 0000000..fe1e1aa --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md @@ -0,0 +1,33 @@ +--- +sidebar_label: 属性概览 +title: 属性概览 +description: 在 DHTMLX JavaScript Kanban 库文档中,探索 JavaScript 看板的属性概览。查找开发者指南、API 参考,试用代码示例和在线演示,并免费下载 DHTMLX Kanban 的30天免费试用版。 +--- + +# Kanban 属性概览 + +有关 **Kanban** 配置的详细信息,请参阅[配置](/guides/configuration)部分。 + +| 名称 | 描述 | +| --------------------------------------------------------- | -------------------------------------------------------- | +| [cardHeight](../../config/js_kanban_cardheight_config/) | @getshort(../config/js_kanban_cardheight_config.md) | +| [cards](../../config/js_kanban_cards_config/) | @getshort(../config/js_kanban_cards_config.md) | +| [cardShape](../../config/js_kanban_cardshape_config/) | @getshort(../config/js_kanban_cardshape_config.md) | +| [cardTemplate](../../config/js_kanban_cardtemplate_config/) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [columnKey](../../config/js_kanban_columnkey_config/) | @getshort(../config/js_kanban_columnkey_config.md) | +| [columns](../../config/js_kanban_columns_config/) | @getshort(../config/js_kanban_columns_config.md) | +| [columnShape](../../config/js_kanban_columnshape_config/) | @getshort(../config/js_kanban_columnshape_config.md) | +| [currentUser](../../config/js_kanban_currentuser_config/) | @getshort(../config/js_kanban_currentuser_config.md) | +| [editor](../../config/js_kanban_editor_config/) | @getshort(../config/js_kanban_editor_config.md) | +| [~~editorAutoSave~~](../../config/js_kanban_editorautosave_config) | 已废弃!~~可选。启用/禁用自动保存模式~~ | +| [editorShape](../../config/js_kanban_editorshape_config/) | @getshort(../config/js_kanban_editorshape_config.md) | +| [history](../../config/js_kanban_history_config/) | @getshort(../config/js_kanban_history_config.md) | +| [links](../../config/js_kanban_links_config/) | @getshort(../config/js_kanban_links_config.md) | +| [locale](../../config/js_kanban_locale_config/) | @getshort(../config/js_kanban_locale_config.md) | +| [readonly](../../config/js_kanban_readonly_config/) | @getshort(../config/js_kanban_readonly_config.md) | +| [renderType](../../config/js_kanban_rendertype_config/) | @getshort(../config/js_kanban_rendertype_config.md) | +| [rowKey](../../config/js_kanban_rowkey_config/) | @getshort(../config/js_kanban_rowkey_config.md) | +| [rows](../../config/js_kanban_rows_config/) | @getshort(../config/js_kanban_rows_config.md) | +| [rowShape](../../config/js_kanban_rowshape_config/) | @getshort(../config/js_kanban_rowshape_config.md) | +| [scrollType](../../config/js_kanban_scrolltype_config/) | @getshort(../config/js_kanban_scrolltype_config.md) | +| [主题](../../config/js_kanban_theme_config/) | @getshort(../config/js_kanban_theme_config.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md new file mode 100644 index 0000000..0b8b9b7 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md @@ -0,0 +1,200 @@ +--- +sidebar_label: REST 路由概览 +title: REST 路由概览 +description: 您可以在 DHTMLX JavaScript 看板库的文档中查看 JavaScript 看板的 Internal RestDataProvider 路由概览。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版 DHTMLX 看板。 +--- + +# REST 路由概览 + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +本页面提供了所有 REST 路由的完整列表,附带简要说明和详细文档链接。
在深入了解每个路由的细节之前,建议先阅读[与服务器交互](/guides/working_with_server.md)。 + +--- + +为了便于导航,您可以使用下面的标签页或侧边菜单: +- 侧边菜单按 HTTP 方法对路由进行分组 +- 下面的标签页可帮助快速识别对应具体操作的路由 + +
+ + +

这些路由处理与卡片相关的操作:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由说明
`GET` /cards获取所有卡片的数据,返回包含卡片对象数组的 JSON 对象
`POST` /cards创建新卡片,返回包含新卡片 ID 的 JSON 对象
`PUT` /cards更新指定卡片的数据,返回空的 JSON 对象
`PUT` /cards/id/move将卡片移动到指定位置
`DELETE` /cards删除指定卡片的数据
+
+ + +

这些路由用于管理行(泳道):

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由说明
`GET` /rows获取所有行的数据,返回包含行(泳道)对象数组的 JSON 对象
`POST` /rows添加新行,返回包含行 ID 的 JSON 对象
`PUT` /rows更新指定行(泳道)数据,返回空的 JSON 对象
`PUT` /rows/id/move将行移动到指定位置
`DELETE` /rows删除指定行的数据
+
+ + +

这些路由允许管理列:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由说明
`GET` /columns获取所有列的数据,返回包含列对象数组的 JSON 对象
`POST` /columns添加新列,返回包含列 ID 的 JSON 对象
`PUT` /columns更新指定列的数据,返回空的 JSON 对象
`PUT` /columns/id/move将列移动到指定位置
`DELETE` /columns删除指定列的数据
+
+ + +

这些路由用于管理链接:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由说明
`GET` /links获取所有链接的数据,返回包含链接对象数组的 JSON 对象
`POST` /links创建新链接,返回包含新链接 ID 的 JSON 对象
`DELETE` /links删除指定链接的数据
+
+ + +

这些路由处理上传(发送到服务器的文件):

+ + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由说明
`GET` /uploads从服务器获取请求的二进制文件
`POST` /uploads上传二进制文件到服务器,返回包含文件 ID、名称和 URL 的 JSON 对象
+
+ +
+
diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md new file mode 100644 index 0000000..4514748 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: 工具栏方法概览 +title: 工具栏方法概览 +description: 本节介绍了 DHTMLX 库中 JavaScript 看板组件的工具栏方法。浏览开发者指南、API 参考,试用代码示例和在线演示,并免费下载 DHTMLX 看板 30 天免费试用版。 +--- + +# 工具栏方法概览 + +| 名称 | 描述 | +| -------------------------------------------------------- | -------------------------------------------------------- | +| [destructor()](../../methods/toolbar_destructor_method/) | @getshort(../methods/toolbar_destructor_method.md) | +| [setConfig()](../../methods/toolbar_setconfig_method/) | @getshort(../methods/toolbar_setconfig_method.md) | +| [setLocale()](../../methods/toolbar_setlocale_method/) | @getshort(../methods/toolbar_setlocale_method.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md new file mode 100644 index 0000000..0336e45 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md @@ -0,0 +1,16 @@ +--- +sidebar_label: 工具栏属性概述 +title: 工具栏属性概述 +description: 探索 DHTMLX JavaScript 看板库中 JavaScript 看板的工具栏属性。查看开发者指南、API 参考、测试代码示例和在线演示,并免费下载 DHTMLX 看板的 30 天试用版。 +--- + +# 工具栏属性概述 + +有关**工具栏**的设置,请参阅[配置](/guides/configuration/#工具栏)部分。 + +| 名称 | 描述 | +| ----------------------------------------------------------| --------------------------------------------------------| +| [api](../../config/toolbar_api_config/) | @getshort(../config/toolbar_api_config.md) | +| [items](../../config/toolbar_items_config/) | @getshort(../config/toolbar_items_config.md) | +| [locale](../../config/toolbar_locale_config/) | @getshort(../config/toolbar_locale_config.md) | +| [主题](../../config/toolbar_theme_config/) | @getshort(../config/toolbar_theme_config.md) | diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md new file mode 100644 index 0000000..fbd41ab --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getCards() +title: getCards REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getCards REST 方法。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# getCards() + +### 描述 + +@short: 获取包含卡片数据的 promise + +:::info +**getCards()** 方法属于 **RestDataProvider** 服务,该服务用于处理与服务器的交互。 +::: + +### 用法 + +~~~jsx {} +getCards(): promise; +~~~ + +### 返回值 + +**getCards()** 方法向服务器发起 **GET** 请求,并返回包含卡片数据的 **promise**。 + +### 示例 + +~~~jsx {2,5} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**相关文档:** [Working with server](../../../../guides/working_with_server) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md new file mode 100644 index 0000000..a550912 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getColumns() +title: getColumns REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getColumns REST 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# getColumns() + +### 描述 + +@short: 获取包含列数据的 promise + +:::info +**getColumns()** 方法是用于服务器交互的 **RestDataProvider** 服务的一部分。 +::: + +### 用法 + +~~~jsx {} +getColumns(): promise; +~~~ + +### 返回值 + +**getColumns()** 方法向服务器发出 **GET** 请求,并返回一个 **promise**,该 promise 解析后包含列数据。 + +### 示例 + +~~~jsx {2,6} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**相关文档:** [Working with server](../../../../guides/working_with_server) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md new file mode 100644 index 0000000..1bf9b16 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: getLinks() +title: getLinks REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getLinks REST 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费30天试用版。 +--- + +# getLinks() + +### 描述 + +@short: 获取包含链接数据的 promise + +:::info +**getLinks()** 方法属于 **RestDataProvider** 服务,用于与服务器交互。 +::: + +### 用法 + +~~~jsx {} +getLinks(): promise; +~~~ + +### 返回值 + +**getLinks()** 方法向服务器发出 **GET** 请求,并返回一个 **promise**,该 promise 解析为链接数据。 + +### 示例 + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), +]).then(([cards, columns, links]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links + }); + board.api.setNext(restProvider); +}); +~~~ + +**更新日志:** 此方法自版本 1.5 起引入 + +**相关文档:** [与服务器交互](../../../../guides/working_with_server) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md new file mode 100644 index 0000000..50abdcc --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getRows() +title: getRows REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getRows REST 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# getRows() + +### 描述 + +@short: 获取一个包含行数据的 promise + +:::info +**getRows()** 方法是用于服务器交互的 **RestDataProvider** 服务的一部分 +::: + +### 用法 + +~~~jsx {} +getRows(): promise; +~~~ + +### 返回值 + +**getRows()** 方法向服务器发送 **GET** 请求,并返回一个解析为行数据的 **promise** + +### 示例 + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type" + }); + board.api.setNext(restProvider); +}); +~~~ + +**相关文档:** [与服务器交互](../../../../guides/working_with_server) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md new file mode 100644 index 0000000..7d4ea1b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md @@ -0,0 +1,60 @@ +--- +sidebar_label: getUsers() +title: getUsers REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getUsers REST 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# getUsers() + +### 描述 + +@short: 获取包含用户数据的 promise + +:::info +**getUsers()** 方法是用于服务器通信的 **RestDataProvider** 服务的一部分 +::: + +### 用法 + +~~~jsx {} +getUsers(): promise; +~~~ + +### 返回值 + +**getUsers()** 方法向服务器发送一个 **GET** 请求,并返回一个解析为用户数据的 **promise** + +### 示例 + +~~~jsx {2,8,21} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows(), + restProvider.getUsers(), +]).then(([cards, columns, rows, users]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +**更新日志:** 此方法在版本 1.3 中引入 + +**相关文档:** [与服务器交互](../../../../guides/working_with_server) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md new file mode 100644 index 0000000..8d98b35 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md @@ -0,0 +1,113 @@ +--- +sidebar_label: send() +title: send() 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 send() 方法。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# send() + +### 描述 + +@short: 此方法负责向服务器发送必要的 HTTP 请求,并返回一个 promise,根据请求类型,promise 可能包含数据。 + +所有服务器请求均通过 [**RestDataProvider**](/guides/working_with_server.md/#restdataprovider) 服务中的 **send()** 方法执行。 + +### 用法 + +~~~js +send( + url: string, + method: "GET" | "POST" | "PUT" | "DELETE" | string, + data?: object, + headers?: object, +): promise; +~~~ + +### 参数 + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `url` | string | *必需*。请求发送的服务器端点。 | +| `method` |string | *必需*。使用的 HTTP 方法(GET、POST、PUT、DELETE)。 | +| `data` | object | *可选*。发送到服务器的参数。默认发送事件参数,但您可以通过自定义对象包含额外参数。详见下方[示例](#示例)。 | +| `headers` |object | *可选*。默认请求头包含 **Content-Type** 设置为 *application/json*。可以通过 **customHeaders** 参数添加额外的请求头。详见下方[示例](#示例)。 | + +### 返回值 + +此方法返回一个 promise,返回的数据取决于请求类型。 + +请求成功时,promise 解析。请求失败时,会抛出错误。 + +您可以通过返回的 promise 的 **catch** 方法控制返回数据和处理失败请求。 + +~~~jsx +restDataProvider.send(url, method, data) +.then(data => { + ... // 成功:处理接收到的数据 +}) +.catch(err => { + ... // 处理错误 +}); +~~~ + +### 示例 + +下面示例演示如何在默认参数之外,附加额外参数发送请求: + +~~~jsx {14-20} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + //配置参数 + }); + + board.api.on("add-card", obj => { + obj.custom = "custom prop"; + restProvider.send(`cards`, "POST", obj).then(data => { + board.api.parse({ cards: data }); + return Promise.resolve(); + }); + }); + + board.api.setNext(restProvider); +}); +~~~ + +下面示例展示如何在使用 **send()** 方法时添加额外的请求头: + +~~~js +const customHeaders = { + "Authorization": "Bearer", + "Custom header": "some value", +}; + +board.api.on("add-cards", obj => { + restDataProvider.send("cards", "POST", obj, customHeaders); +}); +~~~ + +或者,您也可以通过扩展 RestDataProvider 来添加请求头,从而更好地控制发送至服务器的数据: + +~~~jsx {3-8} +const url = "https://some_backend_url"; + +class MyDataProvider extends RestDataProvider { + send(url, method, data, headers) { + headers = { ...headers, "SomeToken": "abc" }; + return super.send(url, methods, data, headers); + } +} + +board.api.setNext(new MyDataProvider(url)); +~~~ + +--- + +**相关文档:** [与服务器交互](../../../../guides/working_with_server) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md new file mode 100644 index 0000000..100a3ef --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md @@ -0,0 +1,44 @@ +--- +sidebar_label: DELETE /cards/{id}/comments/{id} +title: DELETE /cards/{cardId}/comments/{commentId} +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 DELETE /cards/{cardId}/comments/{commentId} REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并免费下载 DHTMLX 看板的30天试用版本。 +--- + +# DELETE `/cards/{cardId}/comments/{commentId}` + +### 描述 + +@short: 删除卡片上的评论 + +此路由处理发送到 `cards/{cardId}/comments/{commentId}` 端点的 **HTTP DELETE** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 说明 | +| ----------- | ----------- | ---- | +| `cardId` | number | *必需*。要删除评论的卡片标识符。 | +| `commentId` | number | *必需*。要删除的评论标识符。 | + +### 请求体 + +此请求无需发送请求体。 + +### 响应 + +服务器会返回一个 JSON 对象,包含删除该评论的用户 ID。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 状态码表示请求结果:200 表示请求成功,500 表示发生错误。 + +--- + +**相关文档**: [与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md new file mode 100644 index 0000000..2d03871 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /cards +title: DELETE /cards +description: 您可以在DHTMLX JavaScript看板库的文档中了解DELETE /cards REST路由。浏览开发者指南和API参考,试用代码示例和实时演示,并下载DHTMLX看板的免费30天评估版。 +--- + +# DELETE `/cards` + +### 描述 + +@short: 从卡片中删除数据 + +此路由处理发送到`/cards/{id}`端点的**HTTP DELETE**请求。 + +### 路径参数 + +请求URL中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | -------------- | +| `id` | number | *必需*。要删除的卡片ID。| + +### 请求体 + +无需发送请求体。 + +### 响应 + +无内容返回。HTTP状态码指示请求是否成功(response.status == 200)或出现错误(response.status == 500)。 + +--- + +**相关文章**: [Working with server](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md new file mode 100644 index 0000000..27c584d --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md @@ -0,0 +1,43 @@ +--- +sidebar_label: DELETE /cards/{id}/vote +title: DELETE /cards/{cardId}/vote +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 DELETE /cards/{cardId}/vote REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费30天试用版。 +--- + +# DELETE `/cards/{cardId}/vote` + +### 描述 + +@short: 从卡片中移除一票,并返回一个包含移除投票的用户 ID 的 JSON 对象 + +此路由处理发送到 `/cards/{cardId}/vote` 的 **HTTP DELETE** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `cardId` | number | *必需*。要移除投票的卡片 ID。| + +### 请求体 + +无需发送请求体。 + +### 响应 + +响应是一个 JSON 对象,包含移除投票的用户 ID。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 状态码指示请求是否成功(response.status == 200)或发生错误(response.status == 500)。 + +--- + +**相关文档**: [Working with server](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md new file mode 100644 index 0000000..0107951 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /columns +title: DELETE /columns +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 DELETE /columns REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# DELETE `/columns` + +### 描述 + +@short: 删除一列的数据 + +此路由处理发送到 `/columns/{id}` 端点的 **HTTP DELETE** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ---------------- | +| `id` | number | *必填*。指定要删除的列的 ID。| + +### 请求体 + +不需要请求体。 + +### 响应 + +无返回内容。状态码表示结果:成功时 response.status == 200,失败时 response.status == 500。 + +--- + +**相关文档**:[与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md new file mode 100644 index 0000000..d60dac1 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: DELETE /links +title: DELETE /links +description: 本节介绍 DHTMLX JavaScript 看板库中的 DELETE /links REST 路由。内容包括开发者指南、API 参考、示例、实时演示以及 DHTMLX 看板的免费 30 天试用。 +--- + +# DELETE `/links` + +### 描述 + +@short: 删除一个链接条目 + +此端点处理发送到 `/links/{id}` 的 **HTTP DELETE** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---- | ------ | --------------------------- | +| `id` | number | *必填*。要删除的链接的标识符。 | + +### 请求体 + +此请求不需要请求体。 + +### 响应 + +无内容返回。HTTP 状态码表示成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: +- [与服务器交互](/guides/working_with_server.md) +- [getLinks()](/api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](/api/config/js_kanban_links_config.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md new file mode 100644 index 0000000..85c9875 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /rows +title: DELETE /rows +description: 您可以在DHTMLX JavaScript看板库的文档中了解DELETE /rows REST路由。浏览开发者指南和API参考,尝试代码示例和在线演示,并下载免费的30天评估版DHTMLX看板。 +--- + +# DELETE `/rows` + +### 描述 + +@short: 从数据中移除一行(泳道)。 + +此路由处理发送到 `/rows/{id}` 端点的 **HTTP DELETE** 请求。 + +### 路径参数 + +请求URL中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ---------------------------- | +| `id` | number | *必填*。要删除的行的唯一标识符。| + +### 请求负载 + +请求不需要发送负载。 + +### 响应 + +无内容返回。HTTP状态码表示结果:状态码200表示删除成功,500表示发生错误。 + +--- + +**相关文档**: [与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md new file mode 100644 index 0000000..3b0c94f --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md @@ -0,0 +1,81 @@ +--- +sidebar_label: GET /cards +title: GET /cards +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 GET /cards REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费30天试用版。 +--- + +# GET `/cards` + +### 描述 + +@short: 获取所有卡片的信息,并返回包含卡片对象数组的 JSON 对象。 + +此路由处理发送到 `/cards` 端点的 **HTTP GET** 请求。 + +### 请求体 + +无需请求体。 + +### 响应 + +响应返回一个包含所有卡片对象数组的 JSON 对象。 + +示例: + +~~~json +[ + { + "id": 4, + "label": "Set the tasks priorities", + "description": "", + "column": 2, + "row": 1, + "start_date": "2018-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, + { + "id": 5, + "label": "Custom icons", + "description": "", + "column": 2, + "row": 2, + "start_date": "2019-01-01T00:00:00Z", + "end_date": null, + "progress": 0, + "attached": [], + "color": "#65D3B3", + "users": [] + }, + { + "id": 6, + "label": "Integration with Gantt", + "description": "", + "column": 2, + "row": 2, + "start_date": "2020-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, +] +~~~ + +:::note +事件的开始和结束日期应遵循 ISO 格式 **yyyy-MM-dd'T'HH:mm:ss.SSSXXX** +::: + +有关返回对象的另一个示例,请参见 [**cards**](/api/config/js_kanban_cards_config.md)。 + +HTTP 状态码表示请求的结果:成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: +- [与服务器交互](/guides/working_with_server.md) +- [getCards()](/api/provider/rest_methods/js_kanban_getcards_method.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md new file mode 100644 index 0000000..31cdfae --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md @@ -0,0 +1,58 @@ +--- +sidebar_label: GET /columns +title: GET /columns +description: 本节涵盖 DHTMLX JavaScript 看板库文档中的 GET /columns REST 路由。内容包括开发者指南、API 参考、代码示例、在线演示,并提供 DHTMLX 看板的免费30天试用。 +--- + +# GET `/columns` + +### 描述 + +@short: 获取所有列的信息,并返回包含列数据数组的 JSON 对象。 + +此路由处理发送到 `/columns` 端点的 **HTTP GET** 请求。 + +### 请求负载 + +无需发送请求负载。 + +### 响应 + +响应包含一个 JSON 对象,其中有一个列数据对象的数组。 + +示例: + +~~~json +[ + { + "id": 1, + "label": "Backlog", + "collapsed": false + }, + { + "id": 2, + "label": "In Progress", + "collapsed": false + }, + { + "id": 3, + "label": "Testing", + "collapsed": false + }, + { + "id": 4, + "label": "Done", + "collapsed": false + } +] +~~~ + +关于返回对象的其他示例,请参见 [**columns**](/api/config/js_kanban_columns_config.md)。 + +HTTP 状态码指示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文章**: +- [与服务器交互](/guides/working_with_server.md) +- [getColumns()](/api/provider/rest_methods/js_kanban_getcolumns_method.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md new file mode 100644 index 0000000..6f87b60 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md @@ -0,0 +1,50 @@ +--- +sidebar_label: GET /links +title: GET /links +description: 浏览 DHTMLX JavaScript 看板库文档中的 GET /links REST 端点。访问开发者指南,查看 API 参考,试用代码示例和在线演示,并免费下载 DHTMLX 看板 30 天试用版。 +--- + +# GET `/links` + +### 描述 + +@short: 获取所有链接的信息,并返回包含链接对象数组的 JSON 对象。 + +此端点响应发送到 `/links` 路径的 **HTTP GET** 请求。 + +### 请求负载 + +此请求无需发送任何负载。 + +### 响应 + +响应包含一个 JSON 对象,该对象包含所有链接对象的数组。 + +示例: + +~~~json +[ + { + "id": 1, + "masterId": 2, + "slaveId": 5, + "relation": "relatesTo", + }, + { + "id": 2, + "masterId": 4, + "slaveId": 9, + "relation": "relatesTo", + }, +] +~~~ + +更多返回对象的示例,请参见 [**links**](/api/config/js_kanban_links_config.md)。 + +HTTP 状态码指示请求是否成功(response.status == 200)或出现错误(response.status == 500)。 + +--- + +**相关文档**: +- [与服务器交互](/guides/working_with_server.md) +- [getLinks()](/api/provider/rest_methods/js_kanban_getlinks_method.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md new file mode 100644 index 0000000..19d8ffb --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md @@ -0,0 +1,48 @@ +--- +sidebar_label: GET /rows +title: GET /rows +description: 浏览 DHTMLX JavaScript 看板库文档中的 GET /rows REST 路由。查看开发者指南、API 参考,尝试在线演示和代码示例,并免费下载 DHTMLX 看板的 30 天试用版。 +--- + +# GET `/rows` + +### 描述 + +@short: 获取所有行的数据,并返回包含行(泳道)数据对象数组的 JSON 对象。 + +此路由响应发送到 `/rows` 端点的 **HTTP GET** 请求。 + +### 请求体 + +请求无需携带请求体。 + +### 响应 + +响应是一个 JSON 对象,包含一个行数据对象数组。 + +示例: + +~~~json +[ + { + "id": 1, + "label": "Feature", + "collapsed": false + }, + { + "id": 2, + "label": "Task", + "collapsed": false + } +] +~~~ + +关于返回对象的另一个示例,请参见 [**rows**](/api/config/js_kanban_rows_config.md)。 + +HTTP 状态码指示请求是否成功(response.status == 200)或发生错误(response.status == 500)。 + +--- + +**相关文档**: +- [与服务器交互](/guides/working_with_server.md) +- [getRows()](/api/provider/rest_methods/js_kanban_getrows_method.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md new file mode 100644 index 0000000..d908073 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: GET /uploads +title: GET /uploads +description: 查看 DHTMLX JavaScript 看板库文档中的 GET /uploads REST 路由。探索开发者指南和 API 参考,尝试示例代码和在线演示,并免费下载 DHTMLX 看板 30 天试用版。 +--- + +# GET `/uploads` + +### 描述 + +@short: 从服务器检索指定的二进制文件 + +此路由处理发送到 `/uploads/{id}/{name}` 端点的 **HTTP GET** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。要获取的文件 ID。| +| `name` | string | *必填*。要检索的文件名。| + +### 请求体 + +不需要请求体。 + +### 响应 + +路由将响应所请求的二进制文件。 + +HTTP 状态码表示成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md new file mode 100644 index 0000000..6cb0ef1 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: GET /users +title: GET /users +description: 探索 DHTMLX JavaScript 看板库文档中的 GET /users REST 端点。查看开发者指南、API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# GET `/users` + +### 描述 + +@short: 获取所有用户的数据,并返回包含用户对象数组的 JSON 对象。 + +此端点处理发送到 `/users` URL 的 **HTTP GET** 请求。 + +### 请求体 + +无需发送请求体。 + +### 响应 + +响应包含一个用户数据对象的 JSON 数组。 + +示例: + +~~~json +[ + { + "id": 1, + "label": "Jhon", + "avatar": "https://serv.com/images/jhon.png" + }, + { + "id": 2, + "label": "Ben", + "avatar": "https://serv.com/images/ben.png" + }, + { + "id": 3, + "label": "Alex", + "avatar": "https://serv.com/images/alex.png" + } +] +~~~ + +有关返回对象的另一个示例,请参见 [**cardShape**](/api/config/js_kanban_cardshape_config.md)。 + +HTTP 状态码指示请求是否成功(response.status == 200)或出现错误(response.status == 500)。 + +--- + +**相关文章**: +- [与服务器交互](/guides/working_with_server.md) +- [getUsers()](/api/provider/rest_methods/js_kanban_getusers_method.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md new file mode 100644 index 0000000..7578251 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /cards/{id}/comments +title: POST /cards/{cardId}/comments +description: 本节介绍了DHTMLX JavaScript看板库中的POST /cards/{cardId}/comments REST接口。内容包括开发者指南、API参考、实用代码示例、在线演示,以及DHTMLX看板的免费30天试用。 +--- + +# POST `/cards/{cardId}/comments` + +### 描述 + +@short: 向指定卡片添加一个或多个新评论,并返回包含新添加评论ID的JSON对象。 + +此接口处理发送到 `/cards/{cardId}/comments` 的 **HTTP POST** 请求。 + +### 请求负载 + +服务器期望接收一个包含以下属性的JSON对象: + +| 名称 | 类型 | 说明 | +| ----------- | ----------- | -------------- | +| `text` | string | *必填*。评论内容。| +| `date` | object | *必填*。评论日期。 | + +示例: + +~~~json +{ + "text": "评论内容", + "date": "2023-05-18T09:13:56.656Z", +} +~~~ + +### 响应 + +响应包含一个JSON对象,包含新添加评论的ID。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP状态码表示请求结果:200表示成功,500表示错误。 + +--- + +**相关文档**: [Working with server](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md new file mode 100644 index 0000000..8061146 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md @@ -0,0 +1,51 @@ +--- +sidebar_label: POST /cards +title: POST /cards +description: 浏览 DHTMLX JavaScript 看板库文档中的 POST /cards REST 端点。访问开发者指南、API 参考、代码示例、在线演示,并获得 DHTMLX 看板的免费 30 天试用。 +--- + +# POST `/cards` + +### 描述 + +@short: 添加一张新卡片,并返回包含该卡片 ID 的 json 对象。 + +此端点处理发送到 `/cards` URL 的 **HTTP POST** 请求。 + +### 请求负载 + +服务器需要一个包含以下字段的 json 对象: + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `label` | string | *必填*。要创建的卡片标题。| +| `column` | number | *必填*。卡片将被放置的列的 ID。| +| `row` | number | *必填*。卡片将被定位的行的 ID。| + +示例: + +~~~json +{ + "label": "New card", + "column": 2, + "row": 1, +} +~~~ + +### 响应 + +该端点返回一个包含新创建卡片 ID 的 json 对象。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 状态码指示请求是否成功(response.status == 200)或是否发生错误(response.status == 500)。 + +--- + +**相关文档**: [Working with server](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md new file mode 100644 index 0000000..b34d3e2 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md @@ -0,0 +1,35 @@ +--- +sidebar_label: POST /cards/{id}/vote +title: POST /cards/{cardId}/vote +description: 您可以在DHTMLX JavaScript看板库的文档中了解POST /cards/{cardId}/vote REST路由。浏览开发者指南和API参考,尝试代码示例和现场演示,并下载DHTMLX Kanban的免费30天试用版。 +--- + +# POST `/cards/{cardId}/vote` + +### 描述 + +@short: 向卡片添加一个新的投票,并返回包含投票用户ID的json对象 + +此路由接受对 `/cards/{cardId}/vote` 端点的**HTTP POST**请求。 + +### 请求体 + +此请求不需要发送任何请求体。 + +### 响应 + +响应包含一个JSON对象,内含投票用户的ID。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP状态码表示请求的结果:状态码200表示请求成功,状态码500表示出现错误。 + +--- + +**相关文档**: [Working with server](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md new file mode 100644 index 0000000..38186a1 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md @@ -0,0 +1,47 @@ +--- +sidebar_label: POST /columns +title: POST /columns +description: 您可以在DHTMLX JavaScript看板库的文档中了解POST /columns REST路由。浏览开发者指南和API参考,试用代码示例和实时演示,并免费下载30天试用版本的DHTMLX看板。 +--- + +# POST `/columns` + +### 描述 + +@short: 添加一个新列并返回包含该列ID的JSON对象。 + +此路由处理发送到`/columns`端点的**HTTP POST**请求。 + +### 请求负载 + +服务器期望接收一个包含以下属性的JSON对象: + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | -------------- | +| `label` | string | *必填*。要创建的新列的名称。| + +示例: + +~~~json +{ + "label": "New column", +} +~~~ + +### 响应 + +响应包含一个包含新创建列ID的JSON对象。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP状态码表示请求是否成功(response.status == 200)或发生错误(response.status == 500)。 + +--- + +**相关文章**:[与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md new file mode 100644 index 0000000..7e0e778 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md @@ -0,0 +1,54 @@ +--- +sidebar_label: POST /links +title: POST /links +description: 探索 DHTMLX JavaScript 看板库文档中的 POST /links REST 路由。查看开发者指南、API 参考、示例代码、在线演示,并免费下载 30 天试用版的 DHTMLX 看板。 +--- + +# POST `/links` + +### 描述 + +@short: 添加一个新的链接并返回包含新链接 ID 的 JSON 对象 + +此路由处理发送到 `/links` 端点的 **HTTP POST** 请求。 + +### 请求体 + +服务器期望接收一个包含以下属性的 JSON 对象: + +| 名称 | 类型 | 描述 | +| ----------- | ---------------------- | ----------- | +| `masterId` | *number* 或 *string* | *必需*。主链接的 ID。 | +| `slaveId` | *number* 或 *string* | *必需*。从链接的 ID。 | +| `relation` | *string* | *必需*。定义链接所表示的关系类型。 | + +示例: + +~~~json +{ + "masterId": 1, + "slaveId": 2, + "relation": "relatesTo", +} +~~~ + +### 响应 + +响应返回一个包含新创建链接 ID 的 JSON 对象。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 状态码指示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: +- [Working with server](/guides/working_with_server.md) +- [getLinks()](/api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](/api/config/js_kanban_links_config.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md new file mode 100644 index 0000000..1a1efe1 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /rows +title: POST /rows +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 POST /rows REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版 DHTMLX 看板。 +--- + +# POST /rows + +### 描述 + +@short: 添加一行新数据,并返回包含该行 ID 的 JSON 对象。 + +此路由处理发送到 **'/rows'** 端点的 **HTTP POST** 请求。 + +### 请求体 + +服务器期望接收一个包含以下属性的 JSON 对象: + +| 名称 | 类型 | 描述 | +| ------------ | ----------- | -------------------------------------------- | +| `label` | string | *必填*。要添加的新行的名称。 | +| `collapsed` | boolean | *可选*。表示行(泳道)的初始状态。默认状态为展开(**false**)。设置为 **true** 表示行初始为折叠状态。| + +示例: + +~~~json +{ + "label": "New row", + "collapsed": "true", +} +~~~ + +### 响应 + +响应包含一个 JSON 对象,内含新创建行的 ID。 + +示例: + +~~~json +{ + "id": 2 +} +~~~ + +HTTP 状态码表示请求是否成功(**200**)或发生错误(**500**)。 + +--- + +**相关文档**:[Working with server](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md new file mode 100644 index 0000000..40584e1 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md @@ -0,0 +1,59 @@ +--- +sidebar_label: POST /uploads +title: POST /uploads +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 POST /uploads REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# POST `/uploads` + +### 描述 + +@short: 上传二进制文件到服务器,并返回包含文件 ID、名称和 URL 的 JSON 对象 + +该路由接受发送到 `/uploads` 端点的 **HTTP POST** 多部分请求。 + +### 请求体 + +服务器期望通过 **multipart/form-data** 请求发送二进制文件。与所有多部分 MIME 请求一样,消息体应包含: + +- 一个 **Content-Disposition** 头,设置为 **form-data** + - 一个值为 **upload** 的 **name** 属性 + - 一个包含上传文件原始名称的 **filename** 字段 +- 一个指定文件数据类型的 **Content-Type** 头 + +每次请求只允许上传一个文件。 + +示例: + +~~~ + +------WebKitFormBoundarySlwgXDBw7kcKSI4p +Content-Disposition: form-data; name="upload"; filename="myImage.png" +Content-Type: image/png + +------WebKitFormBoundarySlwgXDBw7kcKSI4p-- + +~~~ + +### 响应 + +服务器返回一个 JSON 对象,包含文件的 id、名称和 url。 + +**isCover** 属性表示该图片是否为封面图片(`true` 表示是,`false` 表示不是)。 + +示例: + +~~~ json +{ + "id":4, + "name":"myImage.png", + "url":"http://localhost:3000/uploads/4/myImage.png", + "isCover":false +} +~~~ + +HTTP 状态码表示请求是否成功(`response.status == 200`)或发生错误(`response.status == 500`)。 + +--- + +**相关文档**:[Working with server](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md new file mode 100644 index 0000000..1ffa111 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md @@ -0,0 +1,56 @@ +--- +sidebar_label: PUT /cards/{id}/comments/{id} +title: PUT /cards/{cardId}/comments/{commentId} +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /cards/{cardId}/comments/{cardId} REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# PUT `/cards/{cardId}/comments/{commentId}` + +### 描述 + +@short: 此端点用于更新卡片中的现有评论,并返回包含已更新评论 ID 的 JSON 对象。 + +该路由处理发送到 `cards/{cardId}/comments/{commentId}` 的 **HTTP PUT** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 描述 | +| ------------ | ----------- | ------------------------------------ | +| `cardId` | number | *必填*。包含要更新评论的卡片 ID。 | +| `commentId` | number | *必填*。需要更新的评论 ID。 | + +### 请求体 + +服务器期望接收一个包含以下属性的 JSON 对象: + +| 名称 | 类型 | 描述 | +| ------------ | ----------- | ------------------------------------ | +| `text` | string | *必填*。更新后的评论内容。 | + +示例: + +~~~json +{ + "text": "The comment's content" +} +~~~ + +### 响应 + +服务器将返回一个包含已更新评论 ID 的 JSON 对象。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 状态码表示请求的结果:200 表示成功,500 表示失败。 + +--- + +**相关文章**:[与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md new file mode 100644 index 0000000..cc08280 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md @@ -0,0 +1,93 @@ +--- +sidebar_label: PUT /cards/{id}/move +title: PUT /cards/{id}/move +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /cards/{id}/move REST 路由。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX 看板的 30 天试用版。 +--- + +# PUT `/cards/{id}/move` + +### 描述 + +@short: 移动卡片到指定位置 + +此路由处理发送到 `cards/{id}/move` 端点的 **HTTP PUT** 请求。 + +### 路径参数 + +请求 URL 中应包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。要移动的卡片的 ID。若移动多个卡片,id 需设置为 0。| + +:::info +如果要移动多个卡片,`id` 必须设置为 0;否则,如果使用其他值,则仅移动具有该特定 id 的卡片。 +::: + +### 请求负载 + +服务器期望接收一个包含以下属性的 JSON 对象: + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `id` | number |*必填*。正在移动的卡片的 ID。 | +| `columnId` | number | *必填*。卡片所在列的 ID。| +| `rowId` | number | *必填*。卡片所在行的 ID。| +| `before` | number | *可选*。移动的卡片应放置在其之前的卡片 ID。| +| `batch` | object | *多选时必填*。一个包含被移动卡片对象的数组。| + +示例: + +~~~json +{ + "id": 4, + "columnId": 2, + "rowId": 1, + "before": "7" +} +~~~ + +当移动多个卡片时,`batch` 属性应包含所有被移动卡片对象的数组: + +~~~json +{ + "batch": [ + { + "id": 2, + "columnId": 1, + "rowId": 1, + "before": "1" + }, + { + "id": 7, + "columnId": 1, + "rowId": 1, + "before": "1" + } + ] +} +~~~ + +### 响应 + +服务器返回一个 JSON 对象,包含卡片 ID(单个卡片移动时),或在移动多个卡片时 ID 设置为 0。 + +示例: + +~~~json title="单个卡片操作请求的响应" +{ + "id": 4 +} +~~~ + +~~~json title="多个卡片操作请求的响应" +{ + "id": 0 +} +~~~ + +HTTP 状态码指示请求是否成功(response.status == 200)或发生错误(response.status == 500)。 + +--- + +**相关文章**: [与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md new file mode 100644 index 0000000..2072de8 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md @@ -0,0 +1,71 @@ +--- +sidebar_label: PUT /cards +title: PUT /cards +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /cards REST 路由。浏览开发者指南和 API 参考,尝试代码示例和实时演示,下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# PUT `/cards` + +### 描述 + +@short: 更新指定卡片的数据并返回一个空的 JSON 对象。 + +此路由处理发送到 `/cards/{id}` 端点的 **HTTP PUT** 请求。 + +### 路径参数 + +请求路径中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。要更新的卡片 ID。| + +### 请求体 + +服务器期望接收一个包含卡片对象及其所有属性的 JSON 对象,包括未更改和已更新的值。 + +| 名称 | 类型 | 描述 | +| ------------- | ----------- | ----------- | +| `label` | string | *必填*。要更新的卡片名称。| +| `description` | string | *必填*。卡片描述。| +| `column` | number | *必填*。卡片所属列的 ID。| +| `row` | number | *必填*。卡片所属行的 ID。| +| `start_date` | string | *必填*。起始日期,ISO 格式 yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `end_date` | string | *必填*。结束日期,ISO 格式 yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `progress` | number | *必填*。进度值,范围 0 到 100。| +| `attached` | object | *必填*。包含附件文件数据的数组。具体对象示例见 [**cards**](/api/config/js_kanban_cards_config.md) | +| `color` | string | *必填*。卡片顶部线条颜色,HEX 格式。| +| `priority` | number | *必填*。卡片优先级 ID。| +| `users` | object | *必填*。分配用户 ID 数组。具体对象示例见 [**cardShape**](/api/config/js_kanban_cardshape_config.md) | + +示例: + +~~~json +{ + "card": { + "label": "Drag and drop", + "description": "", + "column": 3, + "row": 1, + "start_date": null, + "end_date": "2018-01-01T00:00:00Z", + "progress": 100, + "attached": [], + "color": "#58C3FE", + "priority": 2, + "users": [] + }, +} +~~~ + +卡片对象的另一个示例可见于 [**cards**](/api/config/js_kanban_cards_config.md) 部分。 + +### 响应 + +如果更新成功,服务器返回一个空的 JSON 对象。 + +HTTP 状态码表示请求结果:成功时为 200,失败时为 500。 + +--- + +**相关文档**: [与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md new file mode 100644 index 0000000..a329149 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /columns/{id}/move +title: PUT /columns/{id}/move +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /columns/{id}/move REST 路由。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# PUT `/columns/{id}/move` + +### 描述 + +@short: 通过将列移动到指定位置来更改列的位置。 + +此路由处理发送到 `columns/{id}/move` 的 **HTTP PUT** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。要移动的列的标识符。| + +### 请求体 + +服务器期望接收一个包含以下属性的 JSON 对象: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `before` | number | *可选*。要将移动的列放置在其前面的列的 ID。| + +示例: + +~~~json +{ + "before": 3 +} +~~~ + +### 响应 + +服务器返回一个 JSON 对象,指示被移动列的 ID。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 状态码表示请求的结果:状态码 200 表示成功,500 表示发生错误。 + +--- + +**相关文档**:[Working with server](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md new file mode 100644 index 0000000..9340bbe --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /columns +title: PUT /columns +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /columns REST 路由。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# PUT `/columns` + +### 描述 + +@short: 更新特定列的详细信息并返回一个空的 JSON 对象。 + +此路由处理发送到 `/columns/{id}` 端点的 **HTTP PUT** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。需要更新的列的 ID。| + +### 请求负载 + +服务器期望接收包含列所有属性的 JSON 对象,包括未更改的属性以及新增或修改的属性。 + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `label` | string | *必填*。列的更新名称。| +| `collapsed`| boolean | *可选*。指示列是否初始为折叠状态(**true**),或展开状态(**false**,默认)。| + +示例: + +~~~json +{ + "column": { + "label": "Column 1", + "collapsed": false, + } +} +~~~ + +另一个列对象的示例可以在[**columns**](/api/config/js_kanban_columns_config.md)部分找到。 + +### 响应 + +请求成功时,返回一个空的 JSON 对象。 + +HTTP 状态码表示结果:成功为 200 状态,失败为 500 状态。 + +--- + +**相关文档**: [与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md new file mode 100644 index 0000000..5c25e16 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /rows/{id}/move +title: PUT /rows/{id}/move +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /rows/{id}/move REST 路由。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# PUT `/rows/{id}/move` + +### 描述 + +@short: 通过将行移动到指定位置来更改其位置。 + +此路由处理发送到 `rows/{id}/move` 端点的 **HTTP PUT** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ---------- | +| `id` | number | *必需*。需要移动的行的标识符。| + +### 请求体 + +请求体应包含一个 JSON 对象,具有以下属性: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ---------- | +| `before` | number | *可选*。被移动的行应放置在其之前的行的 ID。| + +示例: + +~~~json +{ + "before": 3 +} +~~~ + +### 响应 + +响应将是一个包含被移动行 ID 的 JSON 对象。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 状态码指示请求是成功(response.status == 200)还是失败(response.status == 500)。 + +--- + +**相关文档**: [与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md new file mode 100644 index 0000000..c095963 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /rows +title: PUT /rows +description: 您可以在DHTMLX JavaScript看板库的文档中了解PUT /rows REST路由。浏览开发者指南和API参考,尝试代码示例和在线演示,并下载DHTMLX看板的免费30天评估版。 +--- + +# PUT `/rows` + +### 描述 + +@short: 更新特定行(泳道)的数据,并返回一个空的JSON对象。 + +此路由处理发送到`/rows/{id}`端点的**HTTP PUT**请求。 + +### 路径参数 + +请求URL中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。需要更新的行(泳道)的ID。| + +### 请求负载 + +服务器期望接收一个包含该行所有属性的JSON对象,包括未更改和已更新的字段。 + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `label` | string | *必填*。要更新的行名称。| +| `collapsed` | boolean | *可选*。指示该行初始是否折叠,值为**true**表示折叠,**false**表示展开(默认值)。| + +示例: + +~~~json +{ + "row": { + "label": "Row 1", + "collapsed": false, + } +} +~~~ + +有关行对象的其他示例,请参见[**rows**](/api/config/js_kanban_rows_config.md)部分。 + +### 响应 + +更新成功时,服务器返回一个空的JSON对象。 + +HTTP状态码反映请求的结果:状态码200表示请求成功,500表示失败。 + +--- + +**相关文档**:[与服务器交互](/guides/working_with_server.md) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png b/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png new file mode 100755 index 0000000..247c695 Binary files /dev/null and b/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png differ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png b/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png new file mode 100755 index 0000000..525d0d0 Binary files /dev/null and b/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png differ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png b/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png new file mode 100644 index 0000000..f6aa948 Binary files /dev/null and b/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png differ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png b/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png new file mode 100755 index 0000000..4c79b7f Binary files /dev/null and b/i18n/cn/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png differ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/assets/trial_kanban.png b/i18n/cn/docusaurus-plugin-content-docs/current/assets/trial_kanban.png new file mode 100644 index 0000000..e71d948 Binary files /dev/null and b/i18n/cn/docusaurus-plugin-content-docs/current/assets/trial_kanban.png differ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png b/i18n/cn/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png new file mode 100644 index 0000000..555b3f1 Binary files /dev/null and b/i18n/cn/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png differ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/configuration.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/configuration.md new file mode 100644 index 0000000..e77754c --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/configuration.md @@ -0,0 +1,577 @@ +--- +sidebar_label: 配置 +title: 配置 +description: 你可以在 DHTMLX JavaScript Kanban 库的文档中了解配置方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费试用版。 +--- + +# 配置 + +*Kanban* 组件可以通过其 API 在外观和功能上进行高度自定义。你可以调整多种选项,例如: + +- 使用 [`cardShape`](/api/config/js_kanban_cardshape_config.md) 属性调整卡片的外观 +- 通过 [`editorShape`](/api/config/js_kanban_editorshape_config.md) 属性设置编辑器字段 +- 使用 [`editor`](/api/config/js_kanban_editor_config.md) 属性控制编辑器行为 +- 通过 [`renderType`](/api/config/js_kanban_rendertype_config.md) 和 [`scrollType`](/api/config/js_kanban_scrolltype_config.md) 管理渲染与滚动方式 +- 使用 [`history`](/api/config/js_kanban_history_config.md) 属性跟踪更改历史 +- 通过 [`cardTemplate`](/api/config/js_kanban_cardtemplate_config.md) 属性个性化卡片外观 + - *(详见 [**自定义**](/guides/customization.md) 部分)* +- 使用 [`locale`](/api/config/js_kanban_locale_config.md) 属性切换语言 + - *(详见 [**本地化**](/guides/localization.md))* +- 通过相应的 [`cards`](/api/config/js_kanban_cards_config.md)、[`columns`](/api/config/js_kanban_columns_config.md)、[`rows`](/api/config/js_kanban_rows_config.md) 和 [`links`](/api/config/js_kanban_links_config.md) 属性加载卡片、列、行和连接的数据 + - *(详见 [**数据操作**](/guides/working_with_data.md))* + +## 卡片 + +在 Kanban 中,卡片被组织在列和行中。你可以通过 [`cardShape`](/api/config/js_kanban_cardshape_config.md) 属性控制卡片的显示内容和样式。你可以选择显示或隐藏多个内置字段,包括: + +- 使用 `label: boolean` 选项显示卡片标题 +- 使用 `description: boolean` 选项显示卡片描述 + +:::tip +**label** 和 **description** 字段都可以通过 Kanban 编辑器进行编辑。启用后,相应的输入框会自动显示。这些输入通过 [**text** 和 **textarea**](#text-和-textarea-类型) 类型配置。 +::: + +- 使用 `progress: boolean` 显示进度条 + +:::tip +**progress** 字段也可以通过 Kanban 编辑器进行管理。启用后,其控件会自动显示。使用 [**progress**](#progress-类型) 类型配置。 +::: + +- 使用 `start_date: boolean` 显示开始日期 +- 使用 `end_date: boolean` 显示结束日期 + +:::tip +**start date** 和 **end date** 都可以通过 Kanban 编辑器中的控件进行管理。启用后,控件会自动显示。通过 [**date**](#date-和-daterange-类型) 类型设置。 +::: + +- 使用 `menu: boolean` 显示卡片右键菜单 +- 使用 `attached: boolean` 支持附件 + +:::tip +卡片可以通过 Kanban 编辑器添加附件文件。这通过 [**files**](#files-类型) 类型实现。 +::: + +- 使用 `color: boolean` 设置卡片颜色 + +:::tip +卡片顶部的颜色线条可通过 Kanban 编辑器中的控件进行管理。启用 **color** 后,会自动显示颜色选择器。使用 [**color**](#color-类型) 类型。 +::: + +- 使用 `cover: boolean` 显示卡片封面图片(预览) +- 使用 `comments: boolean` 支持卡片评论 +- 使用 `confirmDeletion: boolean` 删除卡片时弹出确认对话框 +- 使用 `votes: boolean | { show: boolean, clicable: true }` 支持卡片投票 +- 使用 `users: boolean | { show: boolean, values: object, maxCount: number | false }` 分配用户 + +:::tip +卡片分配用户可通过 Kanban 编辑器控件实现。只允许单人分配时,使用 [**combo** 或 **select**](#comboselect-和-multiselect-类型) 类型。允许多人分配时,使用 [**multiselect**](#comboselect-和-multiselect-类型) 类型。 +::: + +- 使用 `priority: boolean | { show: boolean, values: object }` 字段设置优先级 + +:::tip +卡片 **priority** 可通过 Kanban 编辑器控件设置。启用后控件会自动显示,仅可使用 [**combo** 或 **select**](#comboselect-和-multiselect-类型) 类型。 +::: + +- *自定义字段* 可通过 `headerFields: [ { key: string, label: string, css: string } ]` 添加 + +~~~jsx {12-35,42} +const users = [ // 用户数据 + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // 卡片优先级数据 + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardShape = { // 卡片设置 + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + priority: { + show: true, + values: cardPriority + }, + users: { + show: true, + values: users + }, + headerFields: [ + { + key: "sprint", + label: "Custom field", + css: "custom_css_class" + } + ] +}; + +new kanban.Kanban("#root", { + // 卡片数据 + columns, + cards, + // 卡片设置 + cardShape +}); +~~~ + +:::note +如果你没有通过 [`cardShape`](/api/config/js_kanban_cardshape_config.md) 定义自定义卡片设置,Kanban 会自动采用 [**defaultCardShape**](/api/config/js_kanban_cardshape_config.md#默认配置) 默认配置! +::: + +## 编辑器 + +:::info +你可以通过设置 [`editor.placement`](/api/config/js_kanban_editor_config.md) 属性,让编辑器以 **侧边栏** 或 **弹窗** 的形式显示! +::: + +Kanban *编辑器* 用于管理卡片详细信息。你可以通过 [`editorShape`](/api/config/js_kanban_editorshape_config.md) 属性自定义编辑器中的字段。支持的字段类型有: + +- [**combo**、**select** 和 **multiselect**](#comboselect-和-multiselect-类型) +- [**color**](#color-类型) +- [**text** 和 **textarea**](#text-和-textarea-类型) +- [**progress**](#progress-类型) +- [**files**](#files-类型) +- [**date** 和 **dataRange**](#date-和-daterange-类型) +- [**comments**](#comments-类型) +- [**links**](#links-类型) + +### Combo、Select 和 Multiselect 类型 + +这些类型的编辑器字段配置如下: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", // 或 "select"、"multiselect" + key: "priority", // 优先级字段,需与 cardShape 属性中的 key 对应 + label: "Priority", + values: [ + { id: 1, label: "high" }, + { id: 2, label: "medium" }, + { id: 3, label: "low" } + ] + }, + // 其他字段设置 + ] +}); +~~~ + +:::info +对于 **"multiselect"** 和 **"combo"** 类型的编辑字段,可以通过设置 **avatar** 属性显示预览图片: + +~~~jsx {3,9,13} +editorShape: [ + { + type: "multiselect", // 或 "combo" + key: "users", // 用户字段,需与 cardShape 属性中的 key 对应 + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + { + id: 2, label: "John", + avatar: "preview_image_path_2.png" + } + ] + }, + // 其他字段设置 +] +~~~ + +[**Kanban. 限制只能分配一名用户**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban) +::: + +### Color 类型 + +要在编辑器中添加颜色选择器,配置如下: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "color", + key: "color", // 需与 cardShape 属性中的 key 对应 + label: "Card color", + values: ["#65D3B3", "#FFC975", "#58C3FE"], + config: { + clear: true, + placeholder: "Select color" + } + }, + // 其他字段设置 + ] +}); +~~~ + +### Text 和 Textarea 类型 + +添加文本或多行输入字段配置如下: + +~~~jsx {3-14} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "text", // 或 "textarea" + key: "label", + label: "Label", + config: { + placeholder: "Type your tips here", + readonly: false, + focus: true, + disabled: false, + inputStyle: "height: 50px;" + } + }, + // 其他字段设置 + ] +}); +~~~ + +### Progress 类型 + +在编辑器中添加进度条配置如下: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "progress", + key: "progress", // 需与 cardShape 属性中的 key 对应 + label: "Progress", + config: { + min: 10, + max: 90, + step: 5 + } + }, + // 其他字段设置 + ] +}); +~~~ + +### Files 类型 + +你可以通过两种方式在编辑器中配置文件上传: + +#### 上传 URL 配置为字符串 + +~~~jsx {4-15} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + { + type: "files", + key: "attached", // 需与 cardShape 属性中的 key 对应 + label: "Attachment", + uploadURL: url + "/uploads", // 指定字符串类型的上传 url + config: { + accept: "image/*", // "video/*", "audio/*" + disabled: false, + multiple: true, + folder: false + } + }, + // 其他字段设置 + ] +}); +~~~ + +#### 上传 URL 配置为函数 + +~~~jsx {9-31} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + ...defaultEditorShape, + { + key: "attached", + type: "files", + label: "Files", + uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // 可在此添加 token 或其他 header + } + }; + + return fetch(url + "/uploads", config) // 此处为上传 URL + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); + } + } + ] +}); +~~~ + +### Date 和 DateRange 类型 + +添加日期选择或日期范围选择字段配置如下: + +~~~jsx {3-8} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "date", + key: "start_date", + label: "Start date", + format: "%d/%m/%y" + }, + // 其他字段设置 + ] +}); +~~~ + +日期范围选择配置: + +~~~jsx {3-11} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "dateRange", + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range", + format: "%d/%m/%y" + }, + // 其他字段设置 + ] +}); +~~~ + +### Comments 类型 + +在编辑器中添加评论字段配置如下: + +~~~jsx {3-13} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "comments", + key: "comments", + label: "Comments", + config: { + dateFormat: "%M %d", + placement: "page", // 或 "editor" + html: true, + confirmDeletion: true + } + }, + // 其他字段设置 + ] +}); +~~~ + +### Links 类型 + +在编辑器中添加链接字段配置如下: + +~~~jsx {3-10} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "links", + key: "links", + label: "Links", + config: { + confirmDeletion: true + } + }, + // 其他字段设置 + ] +}); +~~~ + +### 绑定编辑器字段与卡片字段 + +:::info +要将编辑器字段与卡片字段绑定,需要在 [`editorShape`](/api/config/js_kanban_editorshape_config.md) 对象中设置 **key**(`key: "editor_field_key"`)。对于内置卡片字段,需确保该 key 在 [`cardShape`](/api/config/js_kanban_cardshape_config.md) 中设置为 *true*。对于自定义字段,则需要在 **headerFields** 数组中添加。你也可以通过该 key 设置任何字段的初始值。 + +~~~jsx {5,13,22,25,33-34,38-39,45-47} +// 编辑器设置 +const editorShape = [ + { + type: "text", + key: "label", + label: "Label", + config: { + placeholder: "Enter new label here" + } + }, + { + type: "textarea", + key: "note", + label: "Note", + config: { + placeholder: "Enter usefull note here" + } + } +]; +// 卡片设置 +const cardShape = { + label: true, // 内置字段 key + headerFields: [ + { + key: "note", // 自定义字段 key + label: "Note" + } + ] +}; +// 卡片数据 +const cards = [ + { + label: "Volvo", + note: "It is the swedish car", + column: "backlog" + }, + { + label: "Audi", + note: "It is the german car", + column: "backlog" + } +]; +// 创建 Kanban +new kanban.Kanban("#root", { + editorShape, + cardShape, + cards, + columns + // 其他配置参数 +}); +~~~ +::: + +:::note +如果没有通过 [`editorShape`](/api/config/js_kanban_editorshape_config.md) 定义编辑器设置,组件会自动采用 [**defaultEditorShape**](/api/config/js_kanban_editorshape_config.md#默认配置) 默认配置。此时,只有当你在 [`cardShape`](/api/config/js_kanban_cardshape_config.md) 启用了对应的卡片字段,相关输入控件才会显示。 +::: + +### 编辑器行为配置 + +你可以通过 [`editor`](/api/config/js_kanban_editor_config.md) 属性调整编辑器行为: + +- 使用 *`editor.autoSave`* 启用或关闭自动保存功能 +- 通过 *`editor.debounce`* 设置自动保存的延迟时间(仅在 ***autoSave: true*** 时有效) + +~~~jsx {6-9} +// 创建 Kanban +new kanban.Kanban("#root", { + columns, + cards, + editorShape, + editor: { + autoSave: true, + debounce: 2000 + } + // 其他参数 +}); +~~~ + +## 工具栏 + +Kanban **工具栏** 提供卡片搜索、排序、添加新列和新行的控件。要使用工具栏,需要在单独的容器中通过 **kanban.Toolbar()** 初始化。 + +~~~jsx {13} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + // 数据 + columns, + cards, + rows, + // 卡片设置 + cardShape, + // 编辑器设置 + editorShape +}); + +new kanban.Toolbar("#toolbar", { api: board.api }); +~~~ + +工具栏控件可通过 **items** 属性显示、隐藏或自定义: + +~~~jsx {6-51} +// 创建 Kanban +const board = new kanban.Kanban("#root", {...}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { // 自定义搜索栏 + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", // 空白占位 + "undo", // 撤销卡片操作的控件 + "redo", // 重做卡片操作的控件 + { // 自定义排序控件 + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", // 添加新列控件 + "addRow", // 添加新行控件 + // 其他自定义元素 + ] +}); +~~~ + +:::tip +如需隐藏部分工具栏控件,只需将其字符串从 **items** 数组中移除即可。 +::: + +## 示例 + +以下是一个展示如何为 Kanban 配置 **卡片**、**编辑器** 和 **工具栏** 的代码片段: + + diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/customization.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/customization.md new file mode 100644 index 0000000..36f998d --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/customization.md @@ -0,0 +1,42 @@ +--- +sidebar_label: 自定义 +title: 自定义 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解自定义功能。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版。 +--- + +# 自定义 + +除了配置选项之外,Kanban 还为外观和行为的调整提供了丰富的方式。您可以为卡片设置自定义模板,调整卡片、列和行的右键菜单,改变工具栏的布局和功能,并通过自定义 CSS 样式让 Kanban 拥有独特的外观。 + +## 自定义卡片 + +要让卡片显示为自定义样式,可以使用 [`cardTemplate`](/api/config/js_kanban_cardtemplate_config.md) 属性。该属性允许您通过回调函数为 Kanban 添加自有的样式和逻辑。请参考下方代码片段了解其用法: + + + +## 自定义右键菜单 + +如果您需要自定义卡片、列或行的右键菜单,可以使用 [`cardShape`](/api/config/js_kanban_cardshape_config.md)、[`columnShape`](/api/config/js_kanban_columnshape_config.md) 和 [`rowShape`](/api/config/js_kanban_rowshape_config.md) 属性。下方示例展示了如何进行设置: + + + +## 自定义工具栏 + +您可以通过 [`items`](/api/config/toolbar_items_config.md) 属性按需调整工具栏。在其数组中添加您需要的控件,自由排序,并根据需求修改其行为。 + +参考下方代码片段,了解如何自定义如下内容: + +- 控件的顺序 +- 搜索栏及其行为 +- 排序控件及其行为 +- 自定义控件及其功能 + + + +## 自定义样式 + +如果您想更改 Kanban 的外观,可以尝试调整相关的 *CSS 变量*。更多细节请参见 [**样式化**](../stylization) 章节。 + +下方代码片段展示了如何为 Kanban 应用自定义样式: + + diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/initialization.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/initialization.md new file mode 100644 index 0000000..6ee9933 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/initialization.md @@ -0,0 +1,91 @@ +--- +sidebar_label: 初始化 +title: 初始化 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解初始化内容。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 30 天试用版的 DHTMLX Kanban。 +--- + +# 初始化 + +以下是如何快速在页面上设置 Kanban 并为您的应用添加所有看板功能。只需按照以下步骤即可让组件运行: + +1. [在页面中引入 Kanban 源文件](#引入源文件)。 +2. [创建 Kanban 的容器](#创建容器)。 +3. [使用构造函数初始化 Kanban](#初始化-kanban)。 + +## 引入源文件 + +首先,[下载 Kanban 包](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml) 并将其解压到您的项目文件夹中。 + +要使 Kanban 正常工作,只需将以下两个文件添加到页面中: + +- *kanban.js* +- *kanban.css* + +请确保这些文件的路径是正确的: + +~~~html title="index.html" + + +~~~ + +## 创建容器 + +为 Kanban 添加一个容器元素并为其分配一个 ID,例如 *"root"*: + +~~~jsx title="index.html" +
+~~~ + +如果您希望 Kanban 看板带有 *Toolbar*,也请为其添加一个单独的容器: + +~~~jsx {1} title="index.html" +
// Toolbar 的容器 +
// Kanban 的容器 +~~~ + +## 初始化 Kanban + +Kanban 通过 **kanban.Kanban** 构造函数进行初始化。它需要两个参数: + +- 一个 HTML 容器(HTML 容器的 ID) +- 一个包含配置信息的对象。[完整属性列表见此处](#配置属性) + +~~~jsx title="index.html" +// 创建 Kanban +new kanban.Kanban("#root", { + // 配置属性 +}); +~~~ + +如果您还添加了 *Toolbar*,请使用 **kanban.Toolbar** 构造函数单独初始化。它同样需要两个参数: + +- 一个 HTML 容器(HTML 容器的 ID) +- 一个包含配置信息的对象 + +~~~jsx {6-8} title="index.html" +// 创建 Kanban +const board = new kanban.Kanban("#root", { + // 配置属性 +}); + +new kanban.Toolbar("#toolbar", { + // 配置属性 +}); +~~~ + +:::info +有关设置 Kanban Toolbar 的更多信息,请参见 [**Configuration**](/guides/configuration.md/#工具栏) 部分。 +::: + +### 配置属性 + +:::note +完整的 **Kanban** 配置选项列表可在[**此处**](/api/overview/properties_overview.md)查阅。
+Kanban **Toolbar** 的所有属性见[**这里**](/api/overview/toolbar_properties_overview.md)。 +::: + +## 示例 + +以下代码片段演示了如何使用一些初始数据来初始化 Kanban: + + diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration.md new file mode 100644 index 0000000..163f692 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration.md @@ -0,0 +1,17 @@ +--- +sidebar_label: 与DHTML小部件集成 +title: 与DHTML小部件集成 +description: 您可以在DHTMLX JavaScript Kanban库的文档中了解集成方法。浏览开发者指南和API参考,尝试代码示例和在线演示,并下载DHTMLX Kanban的30天免费评估版。 +--- + +# 与DHTML小部件集成 + +DHTMLX Kanban可以很好地与其他DHTMLX小部件配合使用,例如 [Gantt](https://docs.dhtmlx.com/gantt/)、[Scheduler](https://docs.dhtmlx.com/scheduler/) 和 [To Do List](https://docs.dhtmlx.com/todolist/)。以下提供了一些示例。 + +## 与DHTMLX Gantt和Scheduler的集成 + + + +## 与DHTMLX To Do List的集成 + + diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md new file mode 100644 index 0000000..987c29d --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md @@ -0,0 +1,382 @@ +--- +sidebar_label: 与 Angular 集成 +title: 与 Angular 集成 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解与 Angular 的集成。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版。 +--- + +# 与 Angular 集成 + +:::tip +在阅读本指南之前,建议您具备 **Angular** 的基本知识。如果需要复习,请参考 [**Angular documentation**](https://angular.io/docs)。 +::: + +DHTMLX Kanban 可以与 **Angular** 平滑集成。我们提供了代码示例,演示如何将 DHTMLX Kanban 与 **Angular** 搭配使用。详细信息可参见 [**GitHub 示例**](https://github.com/DHTMLX/angular-kanban-demo)。 + +## 创建项目 + +:::info +在开始新项目之前,请确保已安装 [**Angular CLI**](https://angular.io/cli) 和 [**Node.js**](https://nodejs.org/en/)。 +::: + +要使用 Angular CLI 创建名为 **my-angular-kanban-app** 的新项目,只需运行: + +~~~json +ng new my-angular-kanban-app +~~~ + +:::note +如果您正在按照本指南操作,在创建 Angular 应用时请关闭服务端渲染 (SSR) 和静态站点生成 (SSG/Prerendering)! +::: + +此命令会完成所有必要的设置,无需额外命令。 + +### 安装依赖 + +进入新应用的目录: + +~~~json +cd my-angular-kanban-app +~~~ + +接下来,安装依赖并启动开发服务器。可以使用 [**yarn**](https://yarnpkg.com/) 进行如下操作: + +~~~json +yarn +yarn start +~~~ + +您的应用此时应该在本地运行(例如,`http://localhost:3000`)。 + +## 创建 Kanban + +此时,您需要获取 DHTMLX Kanban 的源代码。首先,停止应用并安装 Kanban 包。 + +### 步骤 1. 安装包 + +获取 [**试用 Kanban 包**](/how_to_start/#通过-npm-或-yarn-安装-kanban),并按照 README 中的步骤操作。请注意,试用版有效期为 30 天。 + +### 步骤 2. 创建组件 + +接下来,创建一个 Angular 组件,将 Kanban 及工具栏添加到您的应用。在 **src/app/** 下新建 **kanban** 文件夹,然后添加名为 **kanban.component.ts** 的新文件。 + +#### 导入源文件 + +打开 **kanban.component.ts**,导入 Kanban 的源文件。导入路径如下: + +- 如果是从本地文件夹安装的 PRO 版本: + +~~~jsx +import { Kanban, Toolbar } from 'dhx-kanban-package'; +~~~ + +- 试用版: + +~~~jsx +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +~~~ + +本文档示例采用 **trial** 版本。 + +#### 设置容器并初始化 Kanban 和 Toolbar + +要显示带有工具栏的 Kanban,需要为两者设置容器,并通过构造函数初始化组件: + +~~~jsx {1,8-11,15-18,24-31} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", // 在 "app.component.ts" 文件中以 形式引用的模板名 + styleUrls: ["./kanban.component.css"], // 包含 CSS 文件 + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + // 初始化 Toolbar 容器 + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + // 初始化 Kanban 容器 + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + // 初始化 Kanban 组件 + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + // 初始化 Toolbar 组件 + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // 其他配置项 + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); // 销毁 Kanban + this._toolbar.destructor(); // 销毁 Toolbar + } +} +~~~ + +#### 添加样式 + +为确保 Kanban 正确显示,请添加必要的样式。可在 **src/app/kanban/** 下新建 **kanban.component.css** 文件,并包含如下样式: + +~~~css title="kanban.component.css" +/* 导入 Kanban 样式 */ +@import "@dhx/trial-kanban/dist/kanban.css"; + +/* 页面初始样式 */ +html, +body{ + height: 100%; + padding: 0; + margin: 0; +} + +/* Kanban 和 Toolbar 容器样式 */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Kanban 容器样式 */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### 加载数据 + +要向 Kanban 加载数据,请先准备一组数据。在 **src/app/kanban/** 下新建 **data.ts** 文件,并添加您的数据: + +~~~jsx {2,14,37,48} title="data.ts" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +接下来,打开 ***kanban.component.ts***。导入数据文件,并在 `ngOnInit()` 方法中将数据属性传入 Kanban 的配置: + +~~~jsx {2,23,25-27} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // 导入数据 +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // 初始化数据属性 + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns, // 赋值列数据 + cards, // 赋值卡片数据 + rows, // 赋值行数据 + rowKey: "type", + // 其他配置项 + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // 其他配置项 + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +另一种加载数据到 Kanban 的方法是,在 `ngOnInit()` 方法中使用 [`parse()`](/api/methods/js_kanban_parse_method/) 方法。 + +~~~jsx {2,23,37-42} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // 导入数据 +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // 初始化数据属性 + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // 其他配置项 + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // 其他配置项 + }); + + // 通过 parse() 方法设置数据 + this._kanban.parse({ + columns, + cards, + rows + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +使用 `parse(data)` 方法可以随时重新加载数据。 + +这样,Kanban 组件就配置完成了。将该元素添加到页面后,Kanban 会以数据集初始化。您也可以根据需要调整任何配置项。所有可用属性请参考 [Kanban API 文档](/api/overview/properties_overview/)。 + +#### 事件处理 + +每当有人与 Kanban 交互时,都会触发一个事件。您可以利用这些事件跟踪操作并执行自定义代码。查看 [完整事件列表](/api/overview/events_overview/) 获取详细信息。 + +打开 **kanban.component.ts**,将 `ngOnInit()` 方法修改如下: + +~~~jsx {5-7} title="kanban.component.ts" +// ... +ngOnInit() { + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + this._kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); +} + +ngOnDestroy(): void { + this._kanban.destructor(); +} +~~~ + +### 步骤 3. 将 Kanban 添加到应用 + +要在您的应用中使用 ***KanbanComponent***,请打开 ***src/app/app.component.ts***,并将默认代码替换为: + +~~~jsx {5} title="app.component.ts" +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + template: `` +}) +export class AppComponent { + name = ""; +} +~~~ + +然后,在 ***src/app/*** 下创建 ***app.module.ts***,并声明 *KanbanComponent*: + +~~~jsx {4-5,8} title="app.module.ts" +import { NgModule } from "@angular/core"; +import { BrowserModule } from "@angular/platform-browser"; + +import { AppComponent } from "./app.component"; +import { KanbanComponent } from "./kanban/kanban.component"; + +@NgModule({ + declarations: [AppComponent, KanbanComponent], + imports: [BrowserModule], + bootstrap: [AppComponent] +}) +export class AppModule {} +~~~ + +最后,打开 ***src/main.ts***,使用如下代码: + +~~~jsx title="main.ts" +import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; +import { AppModule } from "./app/app.module"; +platformBrowserDynamic() + .bootstrapModule(AppModule) + .catch((err) => console.error(err)); +~~~ + +此时,您可以启动应用,页面上将显示加载了数据的 Kanban。 + +![Kanban 初始化](/assets/trial_kanban.png) + +以上就是 DHTMLX Kanban 与 Angular 集成的基本步骤。您可根据需求调整代码。更多高级示例请参考 [**GitHub**](https://github.com/DHTMLX/angular-kanban-demo)。 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_react.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_react.md new file mode 100644 index 0000000..1e453f2 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_react.md @@ -0,0 +1,331 @@ +--- +sidebar_label: 与 React 集成 +title: 与 React 集成 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解与 React 的集成。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版本。 +--- + +# 与 React 集成 + +:::tip +在深入阅读本篇文档之前,建议您先了解 [**React**](https://react.dev) 的基础知识。如果您想复习 React,可以访问 [**React 官方文档**](https://reactjs.org/docs/getting-started.html)。 +::: + +DHTMLX Kanban 与 **React** 配合良好。文档中提供了在 React 项目中使用 DHTMLX Kanban 的代码示例。详细内容请参考 [**GitHub 示例**](https://github.com/DHTMLX/react-kanban-demo)。 + +## 创建项目 + +:::info +在开始新项目之前,请确保已安装 [**Vite**](https://vite.dev/)(可选)和 [**Node.js**](https://nodejs.org/en/)。 +::: + +您可以从标准的 **React** 项目开始,或使用 **React 和 Vite** 进行搭建。本指南以 **my-react-kanban-app** 为例: + +~~~json +npx create-react-app my-react-kanban-app +~~~ + +### 安装依赖 + +切换到应用程序目录: + +~~~json +cd my-react-kanban-app +~~~ + +添加依赖并运行开发服务器。您可以选择喜欢的包管理器: + +- 使用 [**yarn**](https://yarnpkg.com/): + +~~~json +yarn +yarn start +~~~ + +- 使用 [**npm**](https://www.npmjs.com/): + +~~~json +npm install +npm run dev +~~~ + +应用通常会在本地 `http://localhost:3000` 可访问。 + +## 创建 Kanban + +接下来,获取 DHTMLX Kanban 源码。首先停止应用并安装 Kanban 包。 + +### 第一步:安装包 + +下载 [**试用版 Kanban 包**](/how_to_start/#通过-npm-或-yarn-安装-kanban),并按照其 README 文件中的说明进行操作。请注意,试用版可用 30 天。 + +### 第二步:创建组件 + +新建一个 React 组件,将 Kanban 看板添加到您的应用中。在 ***src/*** 目录下新建文件 ***Kanban.jsx***。 + +#### 导入源文件 + +打开 ***Kanban.jsx*** 并导入 Kanban 源文件。注意以下事项: + +- 本地安装的 PRO 版本,导入方式如下: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from 'dhx-kanban-package'; +import 'dhx-kanban-package/dist/kanban.css'; +~~~ + +根据包的不同,CSS 文件可能已被压缩,此时请使用 ***kanban.min.css***。 + +- 试用版请使用以下导入路径: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import "@dhx/trial-kanban/dist/kanban.css"; +~~~ + +本指南以 **试用版** 为例进行说明。 + +#### 设置容器并添加 Kanban 和 Toolbar + +要在页面上显示带 Toolbar 的 Kanban,请为二者设置容器并用各自的构造函数初始化: + +~~~jsx {2,6-7,10-11,13-17} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import '@dhx/trial-kanban/dist/kanban.css'; // 引入 Kanban 样式 + +export default function KanbanComponent(props) { + let toolbar_container = useRef(); // 初始化 Toolbar 容器 + let kanban_container = useRef(); // 初始化 Kanban 容器 + + useEffect(() => { + // 初始化 Kanban 组件 + const kanban = new Kanban(kanban_container.current, {}); + + // 初始化 Toolbar 组件 + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, // 提供 Kanban 内部 API + // 其他配置项 + }); + + return () => { + kanban.destructor(); // 销毁 Kanban + toolbar.destructor(); // 销毁 Toolbar + }; + }, []); + + return
+
+
+
+} +~~~ + +#### 添加样式 + +为保证 Kanban 正确显示,请在主 CSS 文件中添加以下关键样式: + +~~~css title="index.css" +/* 初始化页面样式 */ +html, +body, +#root { + height: 100%; + padding: 0; + margin: 0; +} + +/* Kanban 和 Toolbar 容器样式 */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Kanban 容器样式 */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### 加载数据 + +要在 Kanban 中显示数据,需要准备一个数据集。在 ***src/*** 下新建 ***data.js*** 文件,并添加如下内容: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +现在,在 ***App.js*** 中导入数据,并通过 **props** 传递给 `` 组件: + +~~~jsx {2,5-6} title="App.js" +import Kanban from "./Kanban"; +import { getData } from "./data"; + +function App() { + const { columns, cards, rows } = getData(); + return ; +} + +export default App; +~~~ + +在 ***Kanban.jsx*** 中,使用 props 配置 Kanban: + +~~~jsx {5,11-13} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: props.columns, // 设置列数据 + cards: props.cards, // 设置卡片数据 + rows: props.rows, // 设置行数据 + rowKey: "type", + // 其他配置项 + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // 其他配置项 + }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +如果希望在 `useEffect()` 内部使用 [`parse()`](/api/methods/js_kanban_parse_method/) 方法加载数据,方式如下: + +~~~jsx {9-11,27} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + let columns = props.columns; // 列数据 + let cards = props.cards; // 卡片数据 + let rows = props.rows; // 行数据 + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // 其他配置项 + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // 其他配置项 + }); + + kanban.parse({ columns, cards, rows }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +通过使用 `parse(data)` 方法,可以在数据变化时重新加载 Kanban。 + +至此,Kanban 组件已搭建完成。渲染后将根据您的数据进行初始化,您可按需添加更多配置。更多设置请查看 [Kanban API 文档](/api/overview/properties_overview/)。 + +#### 事件处理 + +用户在 Kanban 上的操作会触发不同的事件。通过这些事件,您可以响应用户行为并执行自定义代码。完整事件列表见文档:[事件总览](/api/overview/events_overview/)。 + +以下是在 ***Kanban.jsx*** 中设置简单事件处理的示例: + +~~~jsx {5-7} title="Kanban.jsx" +// ... +useEffect(() => { + const kanban = new Kanban(kanban_container.current, {}); + + kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); + + return () => { + kanban.destructor(); + }; +}, []); +// ... +~~~ + +现在只需运行应用,即可看到已加载数据的 Kanban 看板。 + +![Kanban initialization](/assets/trial_kanban.png) + +通过以上步骤,DHTMLX Kanban 已成功集成进 React。您可根据实际需求调整代码。如需进阶示例,请访问 [**GitHub**](https://github.com/DHTMLX/react-kanban-demo)。 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md new file mode 100644 index 0000000..fe6a55c --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md @@ -0,0 +1,340 @@ +--- +sidebar_label: 与 Svelte 集成 +title: 与 Svelte 集成 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解与 Svelte 的集成。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版本。 +--- + +# 与 Svelte 集成 + +:::tip +在阅读本指南之前,建议您对 **Svelte** 有基本的了解。如需快速回顾,请参考 [**Svelte 文档**](https://svelte.dev/)。 +::: + +DHTMLX Kanban 可以与 **Svelte** 顺畅集成。我们提供了示例代码,展示如何在 Svelte 项目中使用 DHTMLX Kanban。如需了解更多细节,请参阅 [**GitHub 示例**](https://github.com/DHTMLX/svelte-kanban-demo)。 + +## 创建项目 + +:::info +在开始新项目之前,请确保已安装 [**Vite**](https://vite.dev/)(可选)和 [**Node.js**](https://nodejs.org/en/)。 +::: + +有几种方式可以搭建 **Svelte** 项目: + +- 使用 [**SvelteKit**](https://kit.svelte.dev/) + +或 + +- 仅使用 **Svelte 和 Vite**(不使用 SvelteKit): + +~~~json +npm create vite@latest +~~~ + +详细信息可参见此[相关文档](https://svelte.dev/docs/introduction#start-a-new-project-alternatives-to-sveltekit)。 + +### 安装依赖 + +假设项目名为 **my-svelte-kanban-app**,切换到该目录下: + +~~~json +cd my-svelte-kanban-app +~~~ + +选择您喜欢的包管理工具安装依赖并启动开发服务器: + +- 使用 [**yarn**](https://yarnpkg.com/): + +~~~json +yarn +yarn start +~~~ + +- 使用 [**npm**](https://www.npmjs.com/): + +~~~json +npm install +npm run dev +~~~ + +应用随后会在本地启动,通常地址为 `http://localhost:3000`。 + +## 创建 Kanban + +接下来,需要准备好 DHTMLX Kanban 的源代码。此时请先停止应用,然后安装 Kanban 包。 + +### 步骤 1. 安装包 + +下载 [**试用版 Kanban 包**](/how_to_start/#通过-npm-或-yarn-安装-kanban) 并按照 README 指南操作。请注意:试用版有效期为 30 天。 + +### 步骤 2. 创建组件 + +现在可以在应用中新增一个包含 Kanban 及工具栏的 Svelte 组件。在 ***src/*** 目录下新建文件 ***Kanban.svelte***。 + +#### 导入源文件 + +打开 ***Kanban.svelte***,导入 Kanban 的相关源文件。请注意: + +- 如果使用 PRO 版本并从本地包安装,导入路径类似如下: + +~~~html title="Kanban.svelte" + +~~~ + +根据包的不同,源文件可能已被压缩。如果是这种情况,请确保导入 **kanban.min.css**。 + +- 如果使用试用版,导入路径如下: + +~~~html title="Kanban.svelte" + + +
+
+
+
+~~~ + +#### 加载数据 + +要将数据加载到 Kanban,需要准备一个数据集。在 ***src/*** 目录下创建 ***data.js*** 文件,并添加示例数据: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +现在,打开 ***App.svelte***,导入数据,并将其作为 **props** 传递给新的 `` 组件: + +~~~html {3,5,8} title="App.svelte" + + + +~~~ + +然后,在 ***Kanban.svelte*** 中使用这些 **props** 来配置 Kanban: + +~~~html {6-8,15-17} title="Kanban.svelte" + + +
+
+
+
+~~~ + +另外,也可以在 Svelte 的 `onMount()` 生命周期中使用 [`parse()`](/api/methods/js_kanban_parse_method/) 方法为 Kanban 加载数据: + +~~~html {6-8,27} title="Kanban.svelte" + + +
+
+
+
+~~~ + +使用 `parse(data)` 方法有助于在数据发生变化时重新加载。 + +此时,Kanban 组件已经准备就绪。只需将其添加到页面即可自动初始化并载入数据。也可根据实际需求添加其他设置。所有可用选项详见 [Kanban API 文档](/api/overview/properties_overview/)。 + +#### 处理事件 + +每当 Kanban 有动作发生时,都会触发相应事件。可通过这些事件响应用户操作并执行自定义逻辑。完整事件列表请查阅 [事件总览](/api/overview/events_overview/)。 + +如下代码示例展示如何在 `onMount()` 中处理事件,请添加到 ***Kanban.svelte***: + +~~~html {8-10} title="Kanban.svelte" + + +// ... +~~~ + +### 步骤 3. 将 Kanban 添加到应用中 + +要在应用中显示组件,请打开 **App.svelte** 并更新代码: + +~~~html title="App.svelte" + + + +~~~ + +现在,启动应用即可看到 Kanban 组件基于所提供数据正常运行。 + +![Kanban initialization](/assets/trial_kanban.png) + +至此,已将 DHTMLX Kanban 集成到 Svelte 应用中。代码可根据实际需求进行调整。如需进阶示例,请参考 [**GitHub**](https://github.com/DHTMLX/svelte-kanban-demo)。 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md new file mode 100644 index 0000000..4b975c5 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md @@ -0,0 +1,360 @@ +--- +sidebar_label: 与 Vue 集成 +title: 与 Vue 集成 +description: 你可以在 DHTMLX JavaScript Kanban 库的文档中了解与 Vue 的集成。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的30天免费评估版。 +--- + +# 与 Vue 集成 + +:::tip +在开始之前,建议你熟悉 [**Vue**](https://vuejs.org/) 的基本概念和模式。如果需要回顾,可以查看 [**Vue 3 文档**](https://vuejs.org/guide/introduction.html#getting-started)。 +::: + +DHTMLX Kanban 与 **Vue** 配合良好。我们提供了一些代码示例,演示如何在 **Vue 3** 中使用 DHTMLX Kanban。更多细节请参阅 [**GitHub 示例**](https://github.com/DHTMLX/vue-kanban-demo)。 + +## 创建项目 + +:::info +请确保已安装 [**Node.js**](https://nodejs.org/en/),再开始新项目。 +::: + +要创建一个 **Vue** 项目,请运行以下命令: + +~~~json +npm create vue@latest +~~~ + +此命令会安装并启动 `create-vue`,这是官方的 **Vue** 项目脚手架工具。更多信息可参见 [Vue.js 快速开始](https://vuejs.org/guide/quick-start.html#creating-a-vue-application)。 + +你可以将项目命名为 **my-vue-kanban-app**。 + +### 安装依赖 + +进入你的应用文件夹: + +~~~json +cd my-vue-kanban-app +~~~ + +接下来,安装依赖并启动开发服务器。你可以选择使用不同的包管理器: + +- 如果使用 [**yarn**](https://yarnpkg.com/),请运行: + +~~~jsx +yarn +yarn start // 或 yarn dev +~~~ + +- 如果使用 [**npm**](https://www.npmjs.com/),请运行: + +~~~json +npm install +npm run dev +~~~ + +应用现在应该已经在本地运行(例如在 `http://localhost:3000`)。 + +## 创建 Kanban + +要开始使用 DHTMLX Kanban,首先需要获取源码。暂停应用并安装 Kanban 包。 + +### 步骤 1. 安装包 + +下载 [**试用版 Kanban 包**](/how_to_start/#通过-npm-或-yarn-安装-kanban),并按照 README 文件的指引进行操作。试用版有效期为 30 天。 + +### 步骤 2. 创建组件 + +接下来,在你的应用中通过 Vue 组件添加带有 Toolbar 的 Kanban。请在 ***src/components/*** 下创建新文件 ***Kanban.vue***。 + +#### 导入源文件 + +打开 ***Kanban.vue*** 并导入 Kanban 相关文件。方法如下: + +- 如果是 PRO 版本,并且你从本地文件夹安装 Kanban,导入路径如下: + +~~~html title="Kanban.vue" + +~~~ + +如果你的包中带有压缩文件,请确保导入 **kanban.min.css**。 + +- 如果是试用版,请使用以下路径: + +~~~html title="Kanban.vue" + +~~~ + +本指南演示如何设置 **试用版** Kanban。 + +#### 设置容器并添加带 Toolbar 的 Kanban + +要展示 Kanban 和 Toolbar,先设置容器,并通过构造函数初始化这些组件: + +~~~html {2,7-8,10-14} title="Kanban.vue" + + + +~~~ + +#### 添加样式 + +为确保 Kanban 正确显示,请在主 css 文件中为 Kanban 及其容器添加必要样式: + +~~~css title="main.css" +/* 页面初始样式 */ +html, +body, +#app { /* 确保使用 #app 根容器 */ + height: 100%; + padding: 0; + margin: 0; +} + +/* Kanban 和 Toolbar 容器样式 */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Kanban 容器样式 */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### 加载数据 + +要为 Kanban 填充数据,请在 ***src/*** 下创建 ***data.js*** 文件并添加一些示例数据: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +然后,打开 ***App.vue***,导入你的数据,并通过内部的 `data()` 方法进行设置。之后,将数据作为 **props** 传递给 `` 组件: + +~~~html {3,8,10-12,19} title="App.vue" + + + +~~~ + +现在在 ***Kanban.vue*** 中,将这些 **props** 应用于 Kanban 的配置对象: + +~~~html {6,10-12} title="Kanban.vue" + + + +~~~ + +你也可以在 Vue 的 `mounted()` 中使用 [`parse()`](/api/methods/js_kanban_parse_method/) 方法加载数据到 Kanban: + +~~~html {6,22-26} title="Kanban.vue" + + + +~~~ + +`parse(data)` 方法会在每次数据变更时重新加载数据。 + +此时,Kanban 组件已经准备就绪。只要将该组件添加到页面,它就会用你的数据进行初始化。你还可以根据需要添加更多配置。查看所有可用属性,请参考 [Kanban API 文档](/api/overview/properties_overview/)。 + +#### 事件处理 + +每当 Kanban 上有操作发生时,都会触发一个事件。你可以利用这些事件来响应用户行为。完整事件列表请见 [事件文档](/api/overview/events_overview/)。 + +打开 ***Kanban.vue***,如下更新 `mounted()` 方法: + +~~~html {8-10} title="Kanban.vue" + + +// ... +~~~ + +现在你可以启动应用,查看带数据的 Kanban 看板。 + +![Kanban initialization](/assets/trial_kanban.png) + +这就是 DHTMLX Kanban 与 Vue 集成的全部步骤。你可以根据需要调整和扩展代码。更多高级示例见 [**GitHub**](https://github.com/DHTMLX/vue-kanban-demo)。 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/localization.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/localization.md new file mode 100644 index 0000000..b7675e1 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/localization.md @@ -0,0 +1,146 @@ +--- +sidebar_label: 本地化 +title: 本地化 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解本地化。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 免费 30 天评估版。 +--- + +# 本地化 + +JavaScript Kanban 界面中的所有标签都可以进行本地化。您只需设置一个新的 locale 或调整现有的 locale,然后分别为 Kanban 和 Toolbar 设置本地化(这两个组件需要分别设置)。 + +## 默认语言环境 + +默认情况下,界面使用 **英语** 语言环境: + +~~~jsx +const en = { + kanban: { // Kanban 标签的翻译 + Save: "Save", + Send: "Send", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Add new card...": "Add new card...", + "Edit card": "Edit card", + Edit: "Edit", + + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Priority: "Priority", + Progress: "Progress", + Users: "Users", + + Untitled: "Untitled", + Rename: "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + Sort: "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)", + + Duplicate: "Duplicate", + "Duplicate of": "Duplicate of", + + "Relates to": "Relates to", + "Depends on": "Depends on", + "Is required for": "Is required for", + Duplicates: "Duplicates", + "Is duplicated by": "Is duplicated by", + "Parent for": "Parent for", + "SubTask of": "SubTask of", + + Cancel: "Cancel", + "Link task": "Link task", + "Select a relation": "Select a relation", + "Select a task": "Select a task", + + "No comments yet": "No comments yet", + "Would you like to delete this comment?": + "Would you like to delete this comment?", + "Would you like to delete this card?": + "Would you like to delete this card?" + }, + calendar: { // 日历的翻译和设置 + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // 核心元素的翻译 + ok: "OK", + cancel: "Cancel" + } +}; +~~~ + +## 自定义语言环境 + +如果您想使用自己的语言环境,请按照以下步骤操作: + +- 创建自定义 locale(或更新默认 locale),并为您需要使用的所有标签填写翻译(支持任何语言) + +- 在 **Kanban** 中通过 [`locale`](/api/config/js_kanban_locale_config.md) 属性或 [`setLocale()`](/api/methods/js_kanban_setlocale_method.md) 方法设置新的 locale +- 在 **Toolbar** 中通过其 [`locale`](/api/config/toolbar_locale_config.md) 属性或 [`setLocale()`](/api/methods/toolbar_setlocale_method.md) 方法设置新的 locale + +:::info +自 v1.2 起,Kanban 不再导出内置语言环境。如果您需要更多语言环境,请访问 [**github page**](https://github.com/web-widgets/wx-kanban-locales)。您也可以通过 *npm* 安装所需的语言环境并像这样使用: +~~~js +import { de } from "@xbs/wx-kanban-locales" +import { de as coreDe } from "@xbs/wx-core-locales" + +new kanban.Kanban({ + // 其他属性 + locale: { ...coreDe, ...de }, +}); +~~~ +::: + +## 示例 + +以下代码片段展示了如何在不同语言环境之间切换: + + diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/stylization.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/stylization.md new file mode 100644 index 0000000..33aef1e --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/stylization.md @@ -0,0 +1,160 @@ +--- +sidebar_label: 样式化 +title: 样式化 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解样式化相关内容。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX Kanban 的 30 天试用版。 +--- + +# 样式化 + +借助 Kanban,您可以非常轻松地通过 [`columnShape.css`](/api/config/js_kanban_columnshape_config)、[`rowShape.css`](/api/config/js_kanban_rowshape_config) 和 [`cardShape.css`](/api/config/js_kanban_cardshape_config) 属性自定义**列**、**行**和**卡片**的外观。这些选项允许您为列、行和卡片添加条件样式。 + +如果您需要更进一步的自定义,也可以通过 [`columns.css`](/api/config/js_kanban_columns_config)、[`rows.css`](/api/config/js_kanban_rows_config) 和 [`cards.css`](/api/config/js_kanban_cards_config) 属性,为任意特定的**列**、**行**或**卡片**添加自定义 CSS 类。 + +您还可以灵活地对 Kanban 界面的任何部分进行样式调整,以满足项目需求。Kanban 提供了大量 CSS 变量用于样式设置。主要有两类变量: +- 用于**Kanban** 样式化的 CSS 变量 +- 来源于 **WX** 库的 CSS 变量(涵盖控件、日历等 UI 元素) + +:::info +**WX** 库在内部用于部分功能。它负责 Kanban 中诸如控件和日历等小型 UI 组件的实现。 +::: + +## 默认样式 + +~~~css +.wx-material-theme { + /* WX library css variables */ + --wx-field-width: 100%; + --wx-theme-name: material; + /* end of WX library css variables */ + + /* Kanban css variables*/ + --wx-kanban-background: #f1f1f1; + + /* column styles */ + --wx-kanban-column-width: 300px; + --wx-kanban-column-height: 300px; + + /* toolbar styles */ + --wx-kanban-toolbar-height: 56px; + --wx-kanban-toolbar-align: center; + --wx-kanban-toolbar-justify: flex-start; + --wx-kanban-toolbar-control-hover: rgba(0, 0, 0, 0.07); + --wx-kanban-toolbar-control-active: rgba(0, 0, 0, 0.15); + --wx-kanban-toolbar-border: var(--wx-border); + + /* card styles */ + --wx-kanban-card-field-padding: 12px; + --wx-kanban-content-background: var(--wx-background); + --wx-kanban-card-border: var(--wx-border); + --wx-kanban-card-border-radius: 6px; + --wx-kanban-header-border-radius: var(--wx-kanban-card-border-radius); + + /* row styles */ + --wx-kanban-row-line: var(--wx-border); + + /* user icon styles */ + --wx-kanban-user-icon-size: 36px; + + /* editor styles */ + --wx-kanban-header-height: 64px; + --wx-kanban-editor-width: 569px; + --wx-kanban-editor-height: auto; + --wx-kanban-editor-x-padding: 20px; + --wx-kanban-editor-background: var(--wx-kanban-content-background); + --wx-kanban-editor-top-border: none; + + /* column styles */ + --wx-kanban-over-limit-color: var(--wx-color-danger); + --wx-kanban-collapsed-column-width: 44px; + --wx-kanban-z-index: 1; + + /* progress control styles*/ + --wx-progress-height: 4px; + --wx-kanban-progress-inactive-color: #dbdbdb; + + /* menu styles */ + --wx-kanban-menu-min-width: 100px; + + /* box and shadow styles*/ + --wx-kanban-shadow: none; + --wx-kanban-box-border: var(--wx-border); + + /* collapsed column styles */ + --wx-kanban-collapsed-padding: var(--wx-padding); + --wx-kanban-collapsed-margin: 0px; + --wx-kanban-collapsed-background: transparent; + --wx-kanban-collapsed-background-hover: #dfdfdf; + +/* End of Kanban CSS variables*/ +} +~~~ + +:::tip 注意 +未来 Kanban 的版本可能会调整或重命名某些变量。建议您在升级后检查变量名称,确保您的样式依然生效。 +::: + +## 内置主题 + +您可以通过设置 [`theme`](/api/config/js_kanban_theme_config) 属性或调用 [`setTheme()`](/api/methods/js_kanban_settheme_method) 方法,使用内置主题。目前可用的主题有 **material**、**willow** 和 **willow-dark**。 + +:::important +除了通过 `theme` 属性切换主题外,您也可以直接为 Kanban 容器添加对应的 *css* 类名来切换主题: + +- **Material 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark 主题** +~~~html {} + +
+ +
+~~~ + +另外,您也可以直接引入 skins 目录下的对应主题 CSS 文件: + +~~~html {} + +~~~ +::: + +下面是一个展示 **willow-dark** 主题效果的示例: + + +## 滚动条样式 + +Kanban 的滚动条也可以自定义样式。只需为相应容器添加 `.wx-styled-scroll` CSS 类即可。在依赖此功能前,请确保查阅 [浏览器支持情况](https://caniuse.com/css-scrollbar)。 + +~~~html {4} title="index.html" + +
// + +
+~~~ + +## 自定义样式 + +下面示例展示了如何为 Kanban 添加自定义样式: + + + +## 响应式设计 + +此示例展示了如何通过自定义 CSS 样式让 Kanban 实现响应式布局: + + + +**相关文档:** [自定义](../customization) diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/typescript_support.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/typescript_support.md new file mode 100644 index 0000000..457d969 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/typescript_support.md @@ -0,0 +1,19 @@ +--- +sidebar_label: TypeScript 支持 +title: TypeScript 支持 +description: 您可以在文档中了解如何在 DHTMLX JavaScript Kanban 库中使用 TypeScript。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版。 +--- + +# TypeScript 支持 + +从 1.1 版本开始,DHTMLX Kanban 自带 TypeScript 类型定义,因此可以立即与 TypeScript 搭配使用。 + +:::note +欢迎在 Snippet Tool 中进行试用和探索。 +::: + +## 使用 TypeScript 的优势 + +将 DHTMLX Kanban 与 TypeScript 结合使用带来诸多便捷优势。 + +TypeScript 能让开发过程更加顺畅和可靠。通过类型检查和自动补全,可以更容易及早发现错误。此外,在使用 DHTMLX Kanban API 时,TypeScript 还能为所需数据类型提供清晰提示。 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/working_with_data.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/working_with_data.md new file mode 100644 index 0000000..cdaf564 --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/working_with_data.md @@ -0,0 +1,201 @@ +--- +sidebar_label: 数据操作 +title: 数据操作 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解如何操作数据。浏览开发者指南和 API 参考,试用代码示例和在线演示,并免费下载 DHTMLX Kanban 的 30 天试用版。 +--- + +# 数据操作 + +## 初始数据加载 + +在设置 Kanban 时,可以传入 [**columns**](/api/config/js_kanban_columns_config.md)、[**cards**](/api/config/js_kanban_cards_config.md)、[**rows**](/api/config/js_kanban_rows_config.md) 和 [**links**](/api/config/js_kanban_links_config.md) 的初始数据。 + +~~~jsx {1,17,81,94,106-109} +const columns = [ // 列的数据 + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + { + label: "Testing", + id: "testing" + }, + {...} +]; + +const cards = [ // 卡片的数据 + { + id: 1, + label: "Integration with React", + priority: 1, + color: "#65D3B3", + description: "Some description...", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + progress: 25, + users: [1,2,3,4], + sprint: "1.0", + column: "backlog", + type: "feature", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + }, + { + id: 2, + label: "Archive the cards/boards ", + priority: 2, + color: "#FFC975", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + sprint: "1.0", + column: "backlog", + type: "feature" + }, + { + label: "Searching and filtering", + priority: 1, + color: "#65D3B3", + + start_date: new Date("01/05/2021"), + + sprint: "1.2", + column: "backlog", + type: "task" + }, + { + label: "Set the tasks priorities", + priority: 2, + color: "#58C3FE", + + sprint: "1.2", + column: "inprogress", + type: "feature" + }, + {...} +]; + +const rows = [ // 行的数据 + { + label: "Feature", + id: "feature" + }, + { + label: "Task", + id: "task", + collapsed: true + }, + {...} +]; + +const links = [ + { + id: "link_1", + masterId: 1, + slaveId: 2, + relation: "relatesTo", + }, + {...} +]; + +// 使用列、卡片和行的初始数据初始化 Kanban +new kanban.Kanban("#root", { + columns, + cards, + rows, + links +}); +~~~ + +## 从本地数据源加载数据 + +要从本地数据源加载 ***columns***、***rows*** 和 ***cards*** 的数据,可以使用 [`parse()`](/api/methods/js_kanban_parse_method.md) 方法。只需传入包含所需数据的对象即可。 + +~~~js {4} +const board = new kanban.Kanban("#root", {}); + +// 加载数据到 Kanban +board.parse({ columns, cards, rows }); +~~~ + +## 将 Kanban 数据与 Gantt 和 Scheduler 同步 + +下面是一个将 Kanban 数据与其他 DHTMLX 组件(如 [**Gantt**](https://dhtmlx.com/docs/products/dhtmlxGantt/) 和 [**Scheduler**](https://dhtmlx.com/docs/products/dhtmlxScheduler/))同步的示例: + + + +## 获取 Kanban 数据 + +可以通过以下方法访问 Kanban 的数据: + +- [`getAreaCards()`](/api/methods/js_kanban_getareacards_method.md) - 返回指定列(和行)下所有卡片的数据对象数组 +- [`getCard()`](/api/methods/js_kanban_getcard_method.md) - 通过卡片 ID 返回该卡片的数据对象 +- [`serialize()`](/api/methods/js_kanban_serialize_method.md) - 将 Kanban 的数据序列化为 JSON + +## 获取 Kanban 状态 + +要获取 Kanban 的状态,可以使用以下方法: + +- [`api.getReactiveState()`](/api/internal/js_kanban_getreactivestate_method.md) - 返回包含 *StateStore* 响应式属性的对象 +- [`api.getState()`](/api/internal/js_kanban_getstate_method.md) - 获取 *StateStore* 当前属性的对象 +- [`api.getStores()`](/api/internal/js_kanban_getstores_method.md) - 提供包含 *StateStore* 和 *DataStore* 对象的对象 + +## 导出 Kanban 数据 + +导出 Kanban 数据时,可以使用: + +- [`export.json()`](/api/internal/js_kanban_json_method.md) - 以 JSON 文件形式导出 Kanban 数据 + +## 新增项目 + +可以通过以下方法新增 *cards*、*columns* 和 *rows*: + +- [`addCard()`](/api/methods/js_kanban_addcard_method.md) - 在 Kanban 中创建新卡片 +- [`addColumn()`](/api/methods/js_kanban_addcolumn_method.md) - 在 Kanban 中创建新列 +- [`addRow()`](/api/methods/js_kanban_addrow_method.md) - 在 Kanban 中创建新行 + +## 更新项目 + +如需更新 *cards*、*columns* 或 *rows*,可使用以下方法: + +- [`updateCard()`](/api/methods/js_kanban_updatecard_method.md) - 通过 ID 更新卡片数据 +- [`updateColumn()`](/api/methods/js_kanban_updatecolumn_method.md) - 通过 ID 更新列数据 +- [`updateRow()`](/api/methods/js_kanban_updaterow_method.md) - 通过 ID 更新行数据 + +## 删除项目 + +*cards*、*columns* 和 *rows* 可通过以下方法删除: + +- [`deleteCard()`](/api/methods/js_kanban_deletecard_method.md) - 通过 ID 从 Kanban 中删除卡片 +- [`deleteColumn()`](/api/methods/js_kanban_deletecolumn_method.md) - 通过 ID 从 Kanban 中删除列 +- [`deleteRow()`](/api/methods/js_kanban_deleterow_method.md) - 通过 ID 从 Kanban 中删除行 + +## 移动项目 + +如需更改 *cards*、*columns* 或 *rows* 的位置,可以使用: + +- [`moveCard()`](/api/methods/js_kanban_movecard_method.md) - 将卡片移动到指定的列和行 +- [`moveColumn()`](/api/methods/js_kanban_movecolumn_method.md) - 将列移动到指定位置 +- [`moveRow()`](/api/methods/js_kanban_moverow_method.md) - 将行移动到指定位置 + +## 示例 + +以下代码片段展示了如何使用 Kanban API 管理数据: + + diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/guides/working_with_server.md b/i18n/cn/docusaurus-plugin-content-docs/current/guides/working_with_server.md new file mode 100644 index 0000000..609655b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/guides/working_with_server.md @@ -0,0 +1,367 @@ +--- +sidebar_label: 与服务器协作 +title: 与服务器协作 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解如何与服务器协作。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX Kanban 的 30 天评估版。 +--- + +# 与服务器协作 + +JavaScript Kanban 能够处理客户端和服务器端的数据。它没有特殊的后端要求,因此可连接到任何支持 REST API 的后端平台。 + +:::info +该组件内置了 **Go** 和 **Node** 后端选项,同时也支持自定义服务器脚本。 +::: + +## RestDataProvider + +JavaScript Kanban 提供了 **RestDataProvider** 服务,完全支持后端 REST API 操作。该服务便于与服务器通信,并可执行以下数据操作: + +- ***"add-card"*** +- ***"add-column"*** +- ***"add-comment"*** +- ***"add-row"*** +- ***"add-link"*** +- ***"delete-card"*** +- ***"delete-column"*** +- ***"delete-comment"*** +- ***"delete-row"*** +- ***"delete-link"*** +- ***"move-card"*** +- ***"move-column"*** +- ***"move-row"*** +- ***"update-card"*** +- ***"update-column"*** +- ***"update-comment"*** +- ***"update-row"*** + +## REST 方法 + +**RestDataProvider** 服务包含多个用于动态加载数据的 REST 方法: + +- [`getCards()`](/api/provider/rest_methods/js_kanban_getcards_method.md) - 返回 ***cards data*** 的 promise +- [`getColumns()`](/api/provider/rest_methods/js_kanban_getcolumns_method.md) - 返回 ***columns data*** 的 promise +- [`getLinks()`](/api/provider/rest_methods/js_kanban_getlinks_method.md) - 返回 ***links data*** 的 promise +- [`getRows()`](/api/provider/rest_methods/js_kanban_getrows_method.md) - 返回 ***rows data*** 的 promise +- [`getUsers()`](/api/provider/rest_methods/js_kanban_getusers_method.md) - 返回 ***users data*** 的 promise + +## 与后端交互 + +要连接服务器,只需将 **RestDataProvider** 关联到您的服务器脚本。如果使用内置后端,可在以下位置找到: + +- [**Go**](https://github.com/web-widgets/kanban-go) 后端 +- [**Node**](https://github.com/web-widgets/kanban-node) 后端 + +您也可以自行搭建后端。 + +:::tip +如有自定义后端,请参阅 [**REST API routes**](/api/overview/rest_routes_overview/) 部分以获取更多信息。 +::: + +连接 **RestDataProvider** 到后端非常简单:只需使用 **kanban.RestDataProvider** 构造函数,并传入服务器的 **URL**。 + +~~~js {1-2,27} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getUsers(), + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows() +]).then(([users, cards, columns, links, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +要实现添加、删除等数据操作并将请求发送到服务器,**RestDataProvider** 需要通过 [**api.setNext()**](/api/internal/js_kanban_setnext_method.md) 加入 **Event Bus** 链。 +::: + +### 示例 + +下面的代码片段演示如何将 **RestDataProvider** 连接到 **Go** 后端,并从服务器加载数据: + + + +## 多用户后端 + +Kanban 看板广泛应用于各类企业,多用户支持可显著提升协作体验。启用该功能后,多个用户可实时管理同一个看板上的卡片,无需刷新页面。这样可以让协作更加流畅,所有人都能及时看到变更。 + +要设置多用户后端,首先需在初始化看板前在服务器上完成授权。可以使用一个简单的 `login(url: string)` 方法实现: + +~~~js {} +const login = (url) => { + var token = sessionStorage.getItem("login-token"); + if (token) { + return Promise.resolve(token); + } + + return fetch(url + "/login?id=1") + .then(raw => raw.text()) + .then(token => { + sessionStorage.setItem("login-token", token); + return token; + }); +}; +~~~ + +该方法仅为授权演示--所有用户都以 ID 为 1 登录。登录后,服务器返回一个 token,后续请求都需携带该 token。为自动完成此操作,可以使用 `RestDataProvider.setHeaders()` 方法,为每个请求添加自定义请求头。默认情况下,服务器期望 token 在 `"Remote-Token":` 头部: + +~~~js {} +login(url).then(token => { + // rest provider 初始化 + const restProvider = new kanban.RestDataProvider(url); + // 设置自定义请求头 + restProvder.setHeaders({ + "Remote-Token": "eyJpZCI6IjEzMzciLCJ1c2VybmFtZSI6ImJpem9uZSIsImlhdC...", + }); + + // 组件初始化... +}); +~~~ + +获得 token 后,可以如下初始化 Kanban 组件: + +~~~js {} +// 组件初始化... +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows(), +]).then(([cards, columns, links, rows]) => { + const board = new Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "row", + cardShape, + editorShape, + }); + + // 将客户端变更保存到服务器 + board.api.setNext(restProvider); + + // 多用户初始化... +}); +~~~ + +组件设置完毕后,需要添加 WebSocket 监听服务器事件。用法如下: + +~~~js {} +// 多用户初始化... + +// 获取服务器事件的客户端处理器 +const handlers = kanbanUpdates( + board.api, + restProvider.getIDResolver() +); +// 连接服务器事件 +const events = new RemoteEvents(url + "/api/v1", token); +// 将处理器绑定到服务器事件 +events.on(handlers); +~~~ + +- `handlers` - 客户端用于响应服务器事件的处理函数 +- `events` - 该对象连接服务器并监听事件 +- `RemoteEvents.on(handlers)` - 将处理器绑定到服务器事件 + +通过这种方式实现多用户后端,可极大提升协作效率,并让所有用户即时在界面中看到最新更改。 + +### 示例 + +如下代码片段展示如何配置多用户后端,实现用户间实时同步变更: + + + +## 服务器事件自定义 + +您可以自定义服务器事件的处理方式。只需将自定义 **handlers** 对象传递给 `RemoteEvents.on(handlers)` 方法即可。**handlers** 对象结构如下: + +~~~js {} +{ + "cards": cardsHandler: function(obj: any), + "columns": columnsHandler: function(obj: any), + "links": linksHandler: function(obj: any), + "rows": rowsHandler: function(obj: any), +} +~~~ + +每当服务器有变更时,会返回被修改元素的名称,该名称可能因后端逻辑不同而变化。 + +客户端的变更通过 `function(obj: any)` 的 **obj** 参数传递。操作类型通过 `type: string` 字段指定,可能的取值包括: + +- **cards**: `"add-card"`, `"update-card"`, `"delete-card"`, `"move-card"` +- **columns**: `"add-column"`, `"update-column"`, `"delete-column"`, `"move-column"` +- **links**: `"add-link"`, `"delete-link"` +- **rows**: `"add-row"`, `"update-row"`, `"delete-row"`, `"move-row"` + +参考以下代码示例: + +~~~js {} +// 初始化 kanban +const board = new kanban.Kanban(...); +const restProvider = new kanban.RestDataProvider(url); +const idResolver = restProvider.getIDResolver(); +const TypeCard = 1; +const TypeRow = 2; +const TypeCol = 3; + +const cardsHandler = (obj: any) => { + obj.card.id = idResolver(obj.card.id, TypeCard); + obj.card.row = idResolver(obj.card.row, TypeRow); + obj.card.column = idResolver(obj.card.column, TypeColumn); + switch (obj.type) { + case "add-card": + board.api.exec("add-card", { + card: obj.card, + select: false, + skipProvider: true, // 防止客户端再向服务器发送请求 + }) + break; + // 其他操作 + } +} + +// 添加自定义处理器 +const handlers = { + cards: cardsHandler, +}; + +const remoteEvents = new kanban.RemoteEvents(remoteEventsURL, token); +remoteEvents.on(handlers); +~~~ + +`RestDataProvider.getIDResolver()` 方法返回一个函数,用于同步客户端和服务器的 ID。当在客户端新建对象(*card/column/row*)时,先分配一个临时 ID,服务器返回的真实 ID 存储在数据中。`idResolver()` 用于保持 ID 的一致,方法签名为 `idResolver(id: TID, type: number)`。 + +`type` 与实体的对应关系如下: + +- `CardID` - 1, +- `RowID` - 2, +- `ColumnID` - 3 + +如需禁止向服务器发送新请求,可在调用 `board.api.exec()` 时加上 `skipProvider: true` 标志。 + +自定义处理器挂载后,您将完全掌控客户端对服务器事件的处理逻辑。 + +## 将多个状态分组到同一列 + +有时您可能希望在一列中展示不同状态的卡片(例如,将 *To do* 和 *Unassigned* 状态的卡片归为一列)。 + +此时,可以添加一个自定义字段(如 **status**)用于存储卡片当前状态,**column** 字段则用于存储公共状态。 + +然后,定义卡片分组规则。例如,可以将以下状态分组到不同列: + +- *todo*, *unassigned* - 显示在 **Open** 列 +- *dev*, *testing* - 显示在 **Inprogress** 列 +- *merged*, *released* - 显示在 **Done** 列 + +实现方式有两种: + +- [服务器端分组](#服务器端分组) +- [服务器端 + 客户端分组](#服务器端--客户端分组) + +### 服务器端分组 + +如需在服务器端实现分组,后端需支持通过 [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) 向客户端推送数据(参见 [多用户后端](#多用户后端))。 + +当服务器收到卡片更新请求时,需检查 **status** 字段。例如,使用 [Go](https://go.dev/) 可这样写: + +~~~go +func Update(id int, c Card) error { + // ... + oldColumn := c.Column + s := data.Status + if s == "todo" || s == "unassigned" { + c.Column = "open" + } else if s == "dev" || s == "testing" { + c.Column = "inprogress" + } else if s == "merged" || s == "released" { + c.Column = "done" + } + + db.Save(&c) + + if oldColumn != c.Column { + // 如果状态字段导致列发生变化 + // 通知客户端将卡片移动到对应列 + + // 需更新卡片索引 + updateCardIndex(&c) + + // 通知客户端更新列 + ws.Publish("card-update", &c) + } + // ... +} +~~~ + +因此,当卡片状态变更时,服务器逻辑会将其分配到正确的列,并通过 WebSocket 通知客户端移动到相应列。 + +### 服务器端 + 客户端分组 + +采用组合方式时,服务器提供分组规则,客户端根据规则和卡片状态判断归属列。 + +~~~js +const groupingRules = await fetch("http://server.com/rules"); +~~~ + +示例规则如下: + +~~~json +{ + "open": ["todo", "unassigned"], + "progress": ["dev", "testing"], + "done": ["merged", "released"], +} +~~~ + +接下来,在客户端添加逻辑,根据卡片状态自动归入正确列: + +~~~js +const updateColumn = card => { + for (let col in groupingRules) { + if (groupingRules[col].includes(card.status)) { + card.column = col; + break; + } + } +}; + +kanban.api.intercept("move-card", ev => { + kanban.api.exec("update-card", { + id: ev.id, + card: { status: groupingRules[ev.columnId][0], + }); +}); + +kanban.api.intercept("update-card", ev => { + updateColumn(ev.card); +}); +~~~ + +通过这种方式,可以根据其它字段灵活控制卡片所属列。 + +### 示例 + +以下代码片段展示如何用服务器端逻辑实时合并多个状态到同一列: + + diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/how_to_start.md b/i18n/cn/docusaurus-plugin-content-docs/current/how_to_start.md new file mode 100644 index 0000000..19b6f9f --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/how_to_start.md @@ -0,0 +1,123 @@ +--- +sidebar_label: 如何开始 +title: 如何开始 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解如何开始使用 DHTMLX Kanban。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费试用版。 +--- + +# 如何开始 + +以下是一份简明教程,带您逐步在网页上搭建一个完整可用的看板(Kanban)界面。 + +![JS Kanban Main](/assets/js_kanban_editor.png) + +## 第一步:引入源文件 + +首先,新建一个 HTML 文件并命名为 *index.html*。接下来,将 Kanban 的源文件添加到该文件中。 + +您需要引入两个文件: + +- Kanban 的 JS 文件 +- Kanban 的 CSS 文件 + +~~~html {5-6} title="index.html" + + + + How to Start with Kanban + + + + + + + +~~~ + +### 通过 npm 或 yarn 安装 Kanban + +您也可以通过 `yarn` 或 `npm` 将 Kanban 集成到您的项目中。 + +#### 通过 npm 或 yarn 安装试用版 Kanban + +:::info +试用版请下载 [**trial Kanban package**](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml) 并按照 *README* 文件中的说明操作。试用期为 30 天。 +::: + +#### 通过 npm 或 yarn 安装 PRO 版 Kanban + +:::info +访问 DHTMLX 私有 **npm** 的权限在 [Client's Area](https://dhtmlx.com/clients/) 提供,您可以在此生成用于 **npm** 的登录名和密码。安装步骤也在该页面有详细说明。请注意,只有在您的专有 Kanban 许可有效期内,才能访问私有 **npm**。 +::: + +## 第二步:创建 Kanban + +引入文件后,接下来可以将 Kanban 添加到页面上。首先为看板和工具栏分别添加 DIV 容器: + +- 在 *index.html* 文件中添加两个 DIV 容器 +- 使用 **kanban.Kanban** 和 **kanban.Toolbar** 构造函数初始化 Kanban 和工具栏 + +:::info +工具栏在 Kanban 界面中是可选的。如果您只需要看板本身,只需使用一个 DIV 并调用 **kanban.Kanban** 构造函数即可。 +::: + +这些构造函数需要传入 Kanban 和工具栏所在 HTML 容器的 ID,以及它们的配置对象。 + +~~~html {9-10,13-15,17-19} title="index.html" + + + + How to Start with Kanban + + + + +
+
+ + + + +~~~ + +## 第三步:配置 Kanban + +现在,您可以设置 Kanban 的配置属性,定义其初始外观和行为。 + +为了让看板运行起来,需要添加 **cards** 和 **columns** 的初始数据(如有需要,也可以加 *rows*)。 +除了数据之外,还可以调整 [卡片](/guides/configuration#卡片)、[编辑器](/guides/configuration#编辑器) 和 [工具栏](/guides/configuration#工具栏) 的显示效果。 + +~~~jsx {2-7,11-18} +const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row", + cardShape, + editorShape +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" + ] +}); +~~~ + +## 后续操作 + +就这样--只需三步,您就拥有了一个简单的可视化和工作流程管理工具。现在可以开始处理任务,也可以深入探索 JavaScript Kanban 的更多功能。 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/howtos.md b/i18n/cn/docusaurus-plugin-content-docs/current/howtos.md new file mode 100644 index 0000000..3f1631d --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/howtos.md @@ -0,0 +1,199 @@ +--- +sidebar_label: How-tos +title: JavaScript Kanban 操作指南 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中浏览 How-tos 页面。查阅开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版本。 +--- + +# 操作指南 + +本页面为您提供了关于 JavaScript Kanban 的入门、搭建、调整和管理的完整参考。 + +## 基本原则 + +使用 Kanban 时,以下是您需要了解的主要内容。 + +| 主题 | 描述 | +| --------------------------------------------- | ------------------------------------------------- | +| [初始化](/guides/initialization) | 如何设置 Kanban ([示例](https://snippet.dhtmlx.com/gb50vyip?tag=kanban)) | +| [配置](/guides/configuration) | 配置 Kanban 的方法 | +| [自定义](/guides/customization) | 自定义 Kanban 的步骤 | +| [样式化](/guides/stylization) | Kanban 的样式选项 | +| [本地化](/guides/localization) | 如何本地化 Kanban ([示例](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban)) | + +## API 参考 + +以下是您可能需要的 Kanban API 参考。 + +| 主题 | 描述 | +| ----------------------------------------------------- | ------------------------------------------------- | +| [Kanban events](/api/overview/events_overview.md) | 操作 Kanban 事件 | +| [Kanban methods](/api/overview/methods_overview.md) | 使用 Kanban 方法 | +| [Kanban properties](/api/overview/properties_overview.md)| 访问 Kanban 属性 | +| [Event Bus methods](/api/overview/internal_eventbus_overview.md)| Event Bus 方法 | +| [RestDataProvider methods](/api/overview/internal_rest_overview.md)| RestDataProvider 方法 | +| [State methods](/api/overview/internal_state_overview.md)| State 方法 | +| [Toolbar methods](/api/overview/toolbar_methods_overview.md)| Toolbar 方法 | +| [Toolbar properties](/api/overview/toolbar_properties_overview.md)| Toolbar 属性 | + +## 卡片操作指南 + +以下部分介绍如何管理卡片、处理卡片数据,以及如何根据需求设置卡片。 + +### 卡片操作 + +| 主题 | 描述 | +| ------------------------------------------------------------ | ------------------------------------ | +| [Adding new cards](/api/methods/js_kanban_addcard_method.md) | 如何添加新卡片 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Deleting cards](/api/methods/js_kanban_deletecard_method.md) | 如何删除卡片 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Moving cards](/api/methods/js_kanban_movecard_method.md) | 如何移动卡片 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Scrolling to the desired cards](/api/methods/js_kanban_scroll_method.md)| 如何滚动到指定卡片 | +| [Searching for cards](/api/methods/js_kanban_setsearch_method.md)| 如何搜索卡片 | +| [Selecting cards](/api/methods/js_kanban_selectcard_method.md)| 如何选中卡片 | +| [Sorting cards](/api/methods/js_kanban_setsort_method.md) | 如何对卡片排序 | +| [Unselecting cards](/api/methods/js_kanban_unselectcard_method.md)| 如何取消选中卡片 | +| [Adding links between cards](/api/config/js_kanban_links_config.md)| 如何为卡片添加关联 ([示例](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) | + +### 卡片数据操作 + +| 主题 | 描述 | +| ------------------------------------------------------------ | -------------------------------------------- | +| [Getting card data](/api/methods/js_kanban_getcard_method.md) | 如何获取卡片数据 | +| [Getting cards state](/api/internal/js_kanban_getstate_method.md) | 如何获取卡片状态 | +| [Getting cards reactive state](/api/internal/js_kanban_getreactivestate_method.md) | 如何获取卡片响应式状态 | +| [Loading card data](/api/config/js_kanban_cards_config.md) | 如何加载初始卡片数据 | +| [Parsing card data](/api/methods/js_kanban_parse_method.md) | 如何解析卡片数据 | +| [Serializing card data](/api/methods/js_kanban_serialize_method.md)| 如何序列化卡片数据 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Updating card data](/api/methods/js_kanban_updatecard_method.md)| 如何更新卡片数据 | + +### 卡片配置 + +| 主题 | 描述 | +| ------------------------------------------------------------ | -------------------------------------------- | +| [Adding new cards](/api/config/js_kanban_readonly_config.md) | 开启或关闭添加新卡片的功能 | +| [Binding cards into columns](/api/config/js_kanban_columnkey_config.md) | 如何将卡片绑定到列 | +| [Binding cards into rows](/api/config/js_kanban_rowkey_config.md) | 如何将卡片绑定到行 | +| [Configuring a card appearance](/api/config/js_kanban_cardshape_config.md)| 如何设置卡片外观 | +| [Configuring a cards menu](/api/config/js_kanban_cardshape_config.md)| 如何设置卡片菜单 ([示例](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Customizing a card appearance](/api/config/js_kanban_cardtemplate_config.md)| 如何通过模板自定义卡片外观 ([示例](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban))| +| [Dragging cards](/api/config/js_kanban_readonly_config.md) | 开启或关闭卡片拖拽 | +| [Editing cards](/api/config/js_kanban_readonly_config.md) | 开启或关闭卡片编辑 | +| [Lazy rendering](/api/config/js_kanban_rendertype_config.md)| 开启或关闭大量卡片的**懒加载** ([示例](https://snippet.dhtmlx.com/xez9ghqq?text=#kanban))| +| [Limiting cards](/api/config/js_kanban_columns_config.md) | 设置列和泳道的卡片限制(**WIP 校验**) ([示例](https://snippet.dhtmlx.com/2blo6hx8?text=kanban))| +| [Selecting cards](/api/config/js_kanban_readonly_config.md) | 开启或关闭卡片选择 | +| [Setting a fix height of cards](/api/config/js_kanban_cardheight_config.md)| 如何设置卡片固定高度 | +| [Updating card settings](/api/methods/js_kanban_setconfig_method.md)| 如何更新卡片设置 | + +## 卡片编辑器操作 + +请查阅以下内容以了解如何使用卡片编辑器。 + +| 主题 | 描述 | +| ------------------------------------------------------------ | ----------------------------------------------- | +| [Autosaving mode](/api/config/js_kanban_editorautosave_config.md)| 如何开启或关闭编辑器自动保存功能 | +| [Configuring editor fields](/guides/configuration/#编辑器)| 如何设置编辑器字段 | +| [Configuring the editor](/guides/configuration/#编辑器行为配置)| 如何配置编辑器 | +| [Updating editor settings](/api/methods/js_kanban_setconfig_method.md)| 如何更新编辑器设置 | + +## 列操作指南 + +以下内容介绍如何管理列及其数据。 + +### 列操作 + +| 主题 | 描述 | +| --------------------------------------------------------------- | -------------------------------------------- | +| [Adding new columns](/api/methods/js_kanban_addcolumn_method.md) | 如何添加新列 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Configuring a columns menu](/api/config/js_kanban_columnshape_config.md)| 如何设置列菜单 ([示例](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting columns](/api/methods/js_kanban_deletecolumn_method.md)| 如何删除列 | +| [Moving columns](/api/methods/js_kanban_movecolumn_method.md) | 如何移动列 | +| [Scrolling to the desired columns](/api/methods/js_kanban_scroll_method.md)| 如何滚动到指定列 | +| [Separate scrolling for columns](/api/config/js_kanban_scrolltype_config.md)| 如何为每列设置独立滚动条 ([示例](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban))| + +### 列数据操作 + +| 主题 | 描述 | +| --------------------------------------------------------------- | -------------------------------------------- | +| [Getting card data of the column](/api/methods/js_kanban_getareacards_method.md)| 如何获取某列下的卡片数据 | +| [Getting columns state](/api/internal/js_kanban_getstate_method.md) | 如何获取列状态 | +| [Getting columns reactive state](/api/internal/js_kanban_getreactivestate_method.md) | 如何获取列响应式状态 | +| [Loading column data](/api/config/js_kanban_columns_config.md) | 如何加载初始列数据 | +| [Parsing column data](/api/methods/js_kanban_parse_method.md) | 如何解析列数据 | +| [Serializing column data](/api/methods/js_kanban_serialize_method.md)| 如何序列化列数据 | +| [Updating column data](/api/methods/js_kanban_updatecolumn_method.md)| 如何更新列数据 | + +## 行(泳道)操作指南 + +以下部分介绍如何管理行(泳道)及其数据。 + +### 行(泳道)操作 + +| 主题 | 描述 | +| --------------------------------------------------------------- | -------------------------------------------- | +| [Adding new rows](/api/methods/js_kanban_addrow_method.md) | 如何添加新行(泳道) | +| [Configuring a rows menu](/api/config/js_kanban_rowshape_config.md)| 如何设置行(泳道)菜单 ([示例](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting rows](/api/methods/js_kanban_deleterow_method.md) | 如何删除行(泳道) | +| [Moving rows](/api/methods/js_kanban_moverow_method.md) | 如何移动行(泳道) | +| [Scrolling to the desired row](/api/methods/js_kanban_scroll_method.md)| 如何滚动到指定行(泳道) | + +### 行(泳道)数据操作 + +| 主题 | 描述 | +| --------------------------------------------------------------- | -------------------------------------------- | +| [Getting card data of the column and row](/api/methods/js_kanban_getareacards_method.md)| 如何获取某列某行的卡片数据 | +| [Getting rows state](/api/internal/js_kanban_getstate_method.md) | 如何获取行状态 | +| [Getting rows reactive state](/api/internal/js_kanban_getreactivestate_method.md) | 如何获取行响应式状态 | +| [Loading row data](/api/config/js_kanban_rows_config.md) | 如何加载初始行数据 | +| [Parsing row data](/api/methods/js_kanban_parse_method.md) | 如何解析行数据 | +| [Serializing row data](/api/methods/js_kanban_serialize_method.md)| 如何序列化行数据 | +| [Updating row data](/api/methods/js_kanban_updaterow_method.md) | 如何更新行数据 | + +## 事件操作指南 + +| 主题 | 描述 | +| ----------------------------------------------------------- | ------------------------------------------- | +| [Executing events](/api/internal/js_kanban_exec_method.md) | 运行内部事件 | +| [Intercepting events](/api/internal/js_kanban_intercept_method.md)| 如何拦截内部事件 | +| [List of inner events](/api/overview/events_overview.md) | Kanban 内部事件列表 | +| [Reordering events](/api/internal/js_kanban_setnext_method.md)| 如何更改 Event Bus 中的事件顺序 | +| [Subscribing on events](/api/internal/js_kanban_on_method.md)| 如何订阅内部事件 | + +## Kanban REST API 操作 + +| 主题 | 描述 | +| ----------------------------------------------------------- | ------------------------------------------- | +| [Loading server data for cards](/api/provider/rest_methods/js_kanban_getcards_method.md)| 如何从服务器加载卡片数据 | +| [Loading server data for columns](/api/provider/rest_methods/js_kanban_getcolumns_method.md)| 如何从服务器加载列数据 | +| [Loading server data for rows](/api/provider/rest_methods/js_kanban_getrows_method.md)| 如何从服务器加载行数据 | +| [Working with server](/guides/working_with_server.md) | 如何通过 REST API 与服务器交互 ([示例](https://snippet.dhtmlx.com/f25y0809?tag=kanban))| + +## Kanban 状态操作 + +| 主题 | 描述 | +| ----------------------------------------------------------- | ------------------------------------------- | +| [Getting StateStore and DataStore](/api/internal/js_kanban_getstores_method.md)| 如何获取 StateStore 和 DataStore 对象 | +| [Getting StateStore properties](/api/internal/js_kanban_getstate_method.md)| 如何获取 StateStore 属性对象 | +| [Getting StateStore reactive properties](/api/internal/js_kanban_getreactivestate_method.md)| 如何获取 StateStore 响应式属性对象 | + +## Toolbar 操作指南 + +| 主题 | 描述 | +| ----------------------------------------------------------- | --------------------------------------------- | +| [Configuring a searchbar on Toolbar](/api/config/toolbar_items_config.md) | 如何在 Toolbar 上设置搜索栏 ([示例](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring a sort control on Toolbar](/api/config/toolbar_items_config.md) | 如何在 Toolbar 上设置排序控件 ([示例](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring Toolbar controls](/api/config/toolbar_items_config.md)| 如何设置、定制和排序 Toolbar 控件 ([示例](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban)) | +| [Including Kanban API in Toolbar](/api/config/toolbar_api_config.md) | 如何在 Toolbar 中集成并使用 Kanban API | +| [Localizing Toolbar](/api/config/toolbar_locale_config.md) | 如何本地化 Toolbar | + +## TypeScript 使用指南 + +| 主题 | 描述 | +| ----------------------------------------------------------- | ------------------------------------------- | +| [Working with TypeScript](/guides/typescript_support.md) | 如何在 Kanban 中使用 TypeScript | + +## 还有疑问? + + + +:::info +您也可以在下方评论区留言提问! +::: diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/index.md b/i18n/cn/docusaurus-plugin-content-docs/current/index.md new file mode 100644 index 0000000..b042e1b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/index.md @@ -0,0 +1,55 @@ +--- +sidebar_label: Kanban 概览 +title: JavaScript Kanban 概览 +slug: / +description: 您可以在文档中了解 DHTMLX JavaScript Kanban 库的整体概况。浏览开发者指南和 API 参考,试用代码示例和在线演示,并免费下载 DHTMLX Kanban 的 30 天试用版。 +--- + +# DHTMLX Kanban 概览 + +JavaScript Kanban 是一个便捷的工作流程可视化工具。它帮助您更清晰地了解业务流程并掌握团队的工作负载。该工具非常灵活,可以处理任意数量的卡片、列和泳道。由于它基于纯 JavaScript 和 CSS 构建,安装和自定义都非常简单,能够无缝集成到任何网页应用或页面中。 + +## Kanban 结构 + +### 工具栏 + +Kanban 的 **工具栏** 位于界面的独立区域。它内置了卡片搜索框、用于不同方式排序卡片的控件、管理历史记录的撤销/重做按钮,以及添加新列和行的操作控件。您可以灵活调整搜索和排序的方式,也可以通过添加自定义元素或改变内置元素顺序来个性化工具栏。详细内容请参考 [Configuration](./guides/configuration#工具栏) 部分。 + +![Kanban Toolbar](/assets/js_kanban_toolbar.png) + +### 看板 + +**看板** 是 Kanban 的核心操作区。在这里,卡片按照列和行(泳道)进行排列。您可以灵活调整卡片的外观,或使用自定义模板。详情请参阅 [Configuration](./guides/configuration#卡片) 部分。 + +在 **看板** 面板中,您可以通过多种方式与 ***卡片***、***列*** 和 ***行*** 进行交互: + +- 点击加号图标添加新卡片(每列和泳道有 *限制* 时需遵守) +- 通过编辑器面板为任务添加评论和投票([示例](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- 在编辑器中设置任务之间的关联([示例](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- 通过右键菜单(三点图标)删除卡片、列和行 +- 在右键菜单(三点图标)中或通过 `Ctrl (Command)`+`D` 快捷键复制卡片(可一次复制多个卡片) +- 将 Kanban 数据导出为 JSON 文件 +- 使用以下快捷键管理 Kanban 历史记录: + - `Ctrl (Command)`+`Z` 撤销上一个操作(后退到 Kanban 历史的上一步) + - `Ctrl (Command)`+`Y` 或 `Ctrl (Command)`+`Shift`+`Z` 重做刚撤销的操作(前进到 Kanban 历史的下一步) +- 拖拽卡片到任意列或行,实现自由移动 +- 使用右键菜单(三点图标)移动列和行 +- 双击标签或通过右键菜单(三点图标)重命名列和行 +- 点击卡片即可打开卡片编辑器 +- 点击行标签左侧的箭头图标,可折叠或展开行 +- 点击列标签左侧的箭头图标,可折叠或展开列 +- 使用以下快捷键多选卡片: + - `Shift` + 点击,可在同一列选择多张卡片 + - `Ctrl (Command)` + 点击,可跨列选择多张卡片 + +![Kanban Board](/assets/js_kanban_board.png) + +### 编辑器 + +**编辑器** 以弹窗的形式出现,提供用于更新所选卡片详细信息的字段和控件。点击任意卡片即可打开编辑器。您也可以根据需要自定义编辑器,添加新的字段或控件。更多信息请参见 [Configuration](./guides/configuration#编辑器) 部分。 + +![Kanban Editor](/assets/js_kanban_editor.png) + +## 接下来 + +要在您的应用中开始使用 Kanban,请前往 [How to start](./how_to_start) 教程获取详细的分步指导。 diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/news/migration.md b/i18n/cn/docusaurus-plugin-content-docs/current/news/migration.md new file mode 100644 index 0000000..2ef520b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/news/migration.md @@ -0,0 +1,1247 @@ +--- +sidebar_label: 迁移到新版本 +title: 迁移到新版本 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解如何迁移到新版本。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版本。 +--- + +# 迁移到新版本 + +## 1.5.13 -> 1.6.0 + +菜单的 CSS 类名做了如下变更: + +~~~jsx + .menu -> .wx-menu + .item -> .wx-item + .icon -> .wx-icon + .value -> .wx-value +~~~ + +## 1.5.12 -> 1.5.13 + +编辑器使用的 CSS 类名进行了更新: + +~~~jsx + .modal -> .wx-modal + .window -> .wx-window + .modal .window .buttons -> .wx-modal .wx-window .wx-buttons + .combo -> .wx-combo + .combo -> .wx-multicombo + .item -> .wx-item + .color-picker -> .wx-colorselect + .colors -> .wx-colors + .slider -> .wx-slider + .datepicker -> .wx-datepicker + .calendar -> .wx-calendar + .calendar .days .day.out -> .wx-calendar .wx-days .wx-day.wx-out + .combo .tag -> .multicombo .wx-tag + .dropdown -> .wx-dropdown + .dropdown .item -> .wx-dropdown .wx-item + .clear -> .wx-clear +~~~ + +## 1.5.6 -> 1.5.7 + +### Api + +#### 方法 + +- Kanban 工具栏的 [`setLocale`](/api/methods/toolbar_setlocale_method) 方法应用 locale 的方式有了变化: + +~~~jsx {6} title="v1.5.7 之前" + // 创建 Kanban + const board = new kanban.Kanban("#root", {...}); + // 创建 Toolbar + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // 应用 "de" 语言到 Toolbar + toolbar.setLocale(de); // 或传 null 重置为默认语言(en) +~~~ + +~~~jsx {6} title="自 v1.5.7 起" + // 创建 Kanban + const board = new kanban.Kanban("#root", {...}); + // 创建 Toolbar + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // 应用 "de" 语言到 Toolbar + toolbar.setLocale(de, board.api); +~~~ + +## 1.4 -> 1.5 + +### Api + +#### 属性 + +- Kanban 的 [`columnShape`](/api/config/js_kanban_columnshape_config) 属性有如下调整: + +~~~jsx {} title="v1.5 之前" + { + menu: { + show: true, + items: [ + { + label: "Update", ... + } + ] + // 其他参数 + } + } +~~~ + +~~~jsx {11} title="自 v1.5 起" + { + menu: { + show: true, + items: [ + { + text: "Update", ... + } + ] + // 其他参数 + }, + fixedHeaders: true + } +~~~ + +## 1.3 -> 1.4 + +### Api + +#### 属性 + +- Kanban 的 [`editorShape`](/api/config/js_kanban_editorshape_config) 属性现在如下工作: + +~~~jsx {} title="v1.4 之前" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // 其他参数 +~~~ + +~~~jsx {5,7-21} title="自 v1.4 起" + { + type: "date", // 也可以用 "dateRange" 类型 + key: "start_date", + label: "Date Range" + format: "%d/%m/%y" + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", // 或 "editor" + html: true, + }, + }, + { + type: "links", + key: "links", + label: "Links", + }, + // 其他参数 +~~~ + +- [`cardShape`](/api/config/js_kanban_cardshape_config) 属性变更: + +~~~jsx {} title="v1.4 之前" + { + label: true, + description: true, + menu: { + items: [ + { + label: "Delete", ... + } + ] + } + // 其他参数 + } +~~~ + +~~~jsx {7,11-13} title="自 v1.4 起" + { + label: true, + description: true, + menu: { + items: [ + { + text: "Delete", ... + } + ] + }, + votes: true, + comments: true, + css: (card) => card.type == "feature" ? "green" : "red", + // 其他参数 + } +~~~ + +- [`columnShape`](/api/config/js_kanban_columnshape_config) 属性变更: + +~~~jsx {} title="v1.4 之前" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // 其他参数 + } + } +~~~ + +~~~jsx {6,11} title="自 v1.4 起" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // 其他参数 + }, + css: (column, cards) => column.id == "feature" && cards.length < 5 ? "green" : "red" + } +~~~ + +- [`rowShape`](/api/config/js_kanban_rowshape_config) 属性变更: + +~~~jsx {} title="v1.4 之前" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // 其他参数 + } + } +~~~ + +~~~jsx {6,11} title="自 v1.4 起" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // 其他参数 + }, + css: (row, cards) => row.id == "task" && cards.length < 5 ? "green" : "red", + } +~~~ + +- [`cards`](/api/config/js_kanban_cards_config) 属性现在如下: + +~~~jsx {} title="v1.4 之前" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + // 其他参数 + }, ... + ] +~~~ + +~~~jsx {6-18} title="自 v1.4 起" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + // 其他参数 + }, ... + ] +~~~ + +- [`columns`](/api/config/js_kanban_columns_config) 属性新增了一些选项: + +~~~jsx {} title="v1.4 之前" + [ + { + id: "inprogress", + label: "In progress", + // 其他参数 + }, ... + ] +~~~ + +~~~jsx {5-11} title="自 v1.4 起" + [ + { + id: "inprogress", + label: "In progress", + css: "red", + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + // 其他参数 + }, ... + ] +~~~ + +- [`rows`](/api/config/js_kanban_rows_config) 属性现在可设置 css: + +~~~jsx {} title="v1.4 之前" + [ + { + id: "features", + label: "Features", + // 其他参数 + }, ... + ] +~~~ + +~~~jsx {5} title="自 v1.4 起" + [ + { + id: "features", + label: "Features", + css: "green" + // 其他参数 + }, ... + ] +~~~ + +- [`cardTemplate`](/api/config/js_kanban_cardtemplate_config) 属性更新: + +~~~jsx {} title="v1.4 之前" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate + }); +~~~ + +~~~jsx {6-8} title="自 v1.4 起" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+
+ +
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // 其他参数 + }); +~~~ + +- Kanban 工具栏 [`items`](/api/config/toolbar_items_config) 中的 **sort** 控件样式有更新: + +~~~jsx {} title="v1.4 之前" + [ + { // 自定义排序控件 + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] +~~~ + +~~~jsx {6,11} title="自 v1.4 起" + [ + { // 自定义排序控件 + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] +~~~ + +#### 方法 + +- Kanban 的 [`api.getState()`](/api/internal/js_kanban_getstate_method) 方法返回的属性减少了: + +~~~jsx {25-27} title="v1.4 之前" +api.getState(); +// 方法返回如下属性对象 +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, +}*/ +~~~ + +~~~jsx {} title="自 v1.4 起" +api.getState(); +// 方法返回如下属性对象 +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, +}*/ +~~~ + +## 1.2 -> 1.3 + +### Api + +#### 属性 + +- Kanban 的 [`editorShape`](/api/config/js_kanban_editorshape_config) 属性现在支持 ***dateRange*** 参数: + +~~~jsx {} title="v1.3 之前" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // 其他参数 +~~~ + +~~~jsx {} title="自 v1.3 起" + { + type: "dateRange", // 也可用 "date" 类型 + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range" + }, + // 其他参数 +~~~ + +- 工具栏的 [`items`](/api/config/toolbar_items_config) 属性现在包含 "undo" 和 "redo": + +~~~jsx {} title="v1.3 之前" +items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" +] +~~~ + +~~~jsx {4-5} title="自 v1.3 起" +items: [ + "search", + "spacer", + "undo", + "redo", + "sort", + "addColumn", + "addRow" +] +~~~ + +#### 方法 + +- [`updateCard()`](/api/methods/js_kanban_updatecard_method) 方法现在支持额外选项: + +~~~jsx {} title="v1.3 之前" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*其他参数*/ + } +}); +~~~ + +~~~jsx {9} title="自 v1.3 起" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*其他参数*/ + }, + replace: true +}); +~~~ + +- [`updateColumn()`](/api/methods/js_kanban_updatecolumn_method) 方法也新增了新参数: + +~~~jsx {} title="v1.3 之前" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + } +}); +~~~ + +~~~jsx {9} title="自 v1.3 起" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +- [`updateRow()`](/api/methods/js_kanban_updaterow_method) 方法也增加了 replace 选项: + +~~~jsx {} title="v1.3 之前" +updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, +}); +~~~ + +~~~jsx {7} title="自 v1.3 起" +updateColumn({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +## 1.1 -> 1.2 + +### Api + +#### 属性 + +- [`cardShape`](/api/config/js_kanban_cardshape_config) 属性得到改进: + + - ***menu*** 参数的变化 + +~~~jsx {} title="v1.2 之前" + menu: true, + //或 + menu: { show: true } + // 其他参数 +~~~ + +~~~jsx {5-14} title="自 v1.2 起" + menu: true, + // 或 + menu: { + show: true, + items: ({ card, store }) => { + if(card.id === 1){ + return false; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", label: "Edit" }, + { id: "delete-card", icon: "wxi-delete", label: "Delete" } + ]; + } + } + }, + // 其他参数 +~~~ + + - ***users*** 参数的变化 + +~~~jsx {7} title="v1.2 之前" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + path: "../assets/user.jpg" + }, + ] + }, + // 其他参数 +~~~ + +~~~jsx {7} title="自 v1.2 起" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + avatar: "../assets/user.jpg" + }, + ] + }, + // 其他参数 +~~~ + + - ***start_date*** 和 ***end_date*** 参数的变化 + +~~~jsx {} title="v1.2 之前" + start_date: true, + end_date: true, + // 其他参数 +~~~ + +~~~jsx {3,7} title="自 v1.2 起" + start_date: { + show: true, + format: "%d.%m.%Y" + }, + end_date: { + show: true, + format: "%d.%m.%Y" + }, + // 其他参数 +~~~ + +- [`editorShape`](/api/config/js_kanban_editorshape_config) 属性现在使用 "avatar" 替代 "path": + +~~~jsx {8} title="v1.2 之前" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + path: "preview_image_path_1.png" + }, + ] +}, +// 其他字段设置 +~~~ + +~~~jsx {8} title="自 v1.2 起" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + ] +}, +// 其他字段设置 +~~~ + +- 工具栏的 [`items`](/api/config/toolbar_items_config) 属性增加了新特性: + +~~~jsx {} title="v1.2 之前" +items: [ + "search", + "controls" +] +~~~ + +~~~jsx {} title="自 v1.2 起" +items: [ + { // 或 "search", + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ] + }, + "spacer", + { // 或 "sort", + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", + "addRow" +] +~~~ + +#### 方法 + +- Kanban 的 [`setLocale()`](/api/methods/js_kanban_setlocale_method) 方法和 Toolbar 的 [`setLocale()`](/api/methods/toolbar_setlocale_method) 方法略有不同: + +~~~jsx {} title="v1.2 之前" +setLocale(kanban.en); // 重置为默认语言 +~~~ + +~~~jsx {} title="自 v1.2 起" +setLocale(null); // 重置为默认语言 +~~~ + +- Kanban 的 [`api.getReactiveState()`](/api/internal/js_kanban_getreactivestate_method) 方法现在返回更多状态属性: + +~~~jsx {} title="v1.2 之前" +api.getReactiveState(); +// 方法返回如下属性对象 +/*{ + dragItemId: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + dragItemsCoords: {...}, + selected: {...} +}*/ +~~~ + +~~~jsx {} title="自 v1.2 起" +api.getReactiveState(); +// 方法返回如下属性对象 +/*{ + areasMeta: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + cardShape: {...}, + cards: {...}, + cardsMap: {...}, + cardsMeta: {...}, + columnKey: {...}, + columns: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + edit: {...}, + editorShape: {...}, + fromAreaMeta: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + readonly: {...}, + rowKey: {...}, + rows: {...}, + scroll: {...}, + search: {...}, + selected: {...}, + sort: {...} +}*/ +~~~ + +- Kanban 的 [`api.getState()`](/api/internal/js_kanban_getstate_method) 方法现在返回更详尽的状态对象: + +~~~jsx {} title="v1.2 之前" +api.getState(); +// 方法返回如下属性对象 +/*{ + dragItemId: string | number, + before: string | number, + overAreaId: string | number, + overAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + dragItemsCoords: array, + selected: array +}*/ +~~~ + +~~~jsx {} title="自 v1.2 起" +api.getState(); +// 方法返回如下属性对象 +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + dropAreaItemsCoords: array, + dropAreasCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + overAreaMeta: object, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object +}*/ +~~~ + +- Kanban 的 [`api.getStores()`](/api/internal/js_kanban_getstores_method) 方法现在仅返回 state store: + +~~~jsx {} title="v1.2 之前" +api.getStores(); +// 方法返回如下 store 对象 +/*{ + state: StateStore, // ( object ) + data: DataStore // ( object ) +}*/ +~~~ + +~~~jsx {} title="自 v1.2 起" +api.getStores(); +// 方法返回如下属性对象 +/*{ + state: StateStore, // ( object ) +}*/ +~~~ + +### 本地化 + +
+v1.2 之前 + +~~~jsx {} +const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; +const monthsShort = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" +]; +const wx = { + Today: "Today", + Clear: "Clear", + Close: "Close" +}; +const en = { + lang: "en", + __dates: { + months, + monthsShort, + days + }, + wx, + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Untitled: "Untitled", + Rename: "Rename" + } +}; +~~~ +
+ +
+自 v1.2 起 + +~~~jsx {} +const en = { + kanban: { // Kanban 标签的翻译 + "Save": "Save", + "Close": "Close", + "Delete": "Delete", + "Name": "Name", + "Description": "Description", + "Type": "Type", + "Start date": "Start date", + "End date": "End date", + "Result": "Result", + "No results": "No results", + "Search": "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + "Edit": "Edit", + "Everywhere": "Everywhere", + "Label": "Label", + "Status": "Status", + "Color": "Color", + "Date": "Date", + "Untitled": "Untitled", + "Rename": "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + "Sort": "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)" + }, + calendar: { // 日历的翻译和设置 + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // 核心元素的翻译 + ok: "OK", + cancel: "Cancel" + } +}; +~~~ +
+ +## 1.0 -> 1.1 + +### Api + +#### 属性 + +- [`columns`](/api/config/js_kanban_columns_config) 属性自 v1.1 起增加了 ***collapsed, limit*** 和 ***strictLimit*** 参数。 + +~~~jsx title="v1.1 之前" +const columns = [ + { + label: "Backlog", + id: "backlog" + }, ... +]; +~~~ + +~~~jsx {5-7,12} title="自 v1.1 起" +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true + }, ... +]; + +new kanban.Kanban("#root", { + columns, + // 其他参数 +}); +~~~ + +- [`cardShape`](/api/config/js_kanban_cardshape_config) 中的 ***color*** 参数有调整。 + +~~~jsx {4-7} title="v1.1 之前" +const cardShape = { + color: { + show: true, + values: [ + { id: 1, color: "#65D3B3", label: "red" }, + { id: 2, color: "#FFC975", label: "green" } + ] + } +}; +~~~ + +~~~jsx {4,9} title="自 v1.1 起" +const cardShape = { + color: { + show: true, + values: ["#65D3B3", "#FFC975", "#58C3FE"] + } +}; + +new kanban.Kanban("#root", { + cardShape + // 其他参数 +}); +~~~ + +#### 方法 + +- [`addColumn`](/api/methods/js_kanban_addcolumn_method) 方法(以及 [`add-column`](/api/events/js_kanban_addcolumn_event) 事件)初始化方式有更新: + +~~~jsx {} title="v1.1 之前" +addColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="自 v1.1 起" +addColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: false, + ... + } +}); +~~~ + +- [`addRow`](/api/methods/js_kanban_addrow_method) 方法(以及 [`add-row`](/api/events/js_kanban_addrow_event) 事件)也有更新: + +~~~jsx {} title="v1.1 之前" +addRow(row_data_object); +~~~ + +~~~jsx {2-7} title="自 v1.1 起" +addRow({ + id: "feature", + row: { + label: "Feature", + collapsed: false, + ... + } +}); +~~~ + +- [`updateColumn`](/api/methods/js_kanban_updatecolumn_method) 方法(以及 [`update-column`](/api/events/js_kanban_updatecolumn_event) 事件)有如下变化: + +~~~jsx {} title="v1.1 之前" +updateColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="自 v1.1 起" +updateColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: true, + ... + } +}); +~~~ + +- [`updateRow`](/api/methods/js_kanban_updaterow_method) 方法(以及 [`update-row`](/api/events/js_kanban_updaterow_event) 事件)格式有更新: + +~~~jsx {} title="v1.1 之前" +updateRow(row_data_object); +~~~ + +~~~jsx {2-7} title="自 v1.1 起" +updateRow({ + id: "feature", + row: { + label: "Feature", + collapsed: true, + ... + } +}); +~~~ + +- [`updateCard`](/api/methods/js_kanban_updatecard_method) 方法(以及 [`update-card`](/api/events/js_kanban_updatecard_event) 事件)设置方式如下: + +~~~jsx {} title="v1.1 之前" +updateCard(card_data_object); +~~~ + +~~~jsx {2-7} title="自 v1.1 起" +updateCard({ + id: 1, + card: { + label: "Volvo XC 70", + progress: 26 + ... + } +}); +~~~ + +- [`parse`](/api/methods/js_kanban_parse_method) 方法现在无需先重置初始数据即可重新解析: + +~~~jsx {3-5,8-12} title="v1.1 之前" +// 解析新数据前需重置初始数据 +const board = new kanban.Kanban("#root", { + columns: [], + cards: [], + rows: [] +}); + +board.parse({ + columns, + cards, + rows +}); +~~~ + +~~~jsx {} title="自 v1.1 起" +// 解析新数据前无需重置初始数据 +const board = new kanban.Kanban("#root", {}); + +board.parse({ + columns, + cards, + rows +}); +~~~ diff --git a/i18n/cn/docusaurus-plugin-content-docs/current/news/whats_new.md b/i18n/cn/docusaurus-plugin-content-docs/current/news/whats_new.md new file mode 100644 index 0000000..746718b --- /dev/null +++ b/i18n/cn/docusaurus-plugin-content-docs/current/news/whats_new.md @@ -0,0 +1,575 @@ +--- +sidebar_label: 最新动态 +title: 最新动态 +description: 您可以了解 DHTMLX Kanban 的最新特性和更新,查看其版本历史,浏览开发者指南和 API 详情,试用代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费试用版。 +--- + +# 最新动态 + +如果您正在从旧版本升级 Kanban,建议查阅 [迁移到新版本](/news/migration.md) 以获取更多信息。 + +## 版本 1.6.3 + +发布日期:2025 年 4 月 8 日 + +### 修复 + +- 列限制有时会错误地应用到整个列 +- 移动卡片并关闭弹窗编辑器后会弹出错误 +- 删除确认提示会显示在弹窗编辑器后面 +- 工具栏的"更多"图标在窗口慢速缩放时出现和消失 +- `delete-card` 事件总是关闭编辑器 +- 如果优先级设置为未在选项中的 ID,编辑器无法打开 + +## 版本 1.6.2 + +发布日期:2025 年 2 月 14 日 + +### 修复 + +- 试用版的过期时间错误 +- 拖放操作在触屏设备上出现警告 +- 在只读配置中设置 `add: false` 不会从列菜单中移除 **Add** 选项 +- 卡片 ID 为字符串数字时,编辑器无法加载 +- 包中的示例链接已过期 +- 当列滚动和延迟渲染一起使用时,拖放出现问题 +- `setConfig()` 方法未能更新列头的固定状态 + +## 版本 1.6.1 + +发布日期:2024 年 11 月 29 日 + +### 修复 + +- 工具栏的"更多"图标在窄屏下对齐错误 +- `RestDataProvider` 未使用通过 `setHeaders()` 设置的 header +- `RestDataProvider.getIDResolver` 不是函数报错 + +## 版本 1.6 + +发布日期:2024 年 11 月 13 日 + +[博客发布评测](https://dhtmlx.com/blog/dhtmlx-kanban-1-6/) + +### 新功能 + +- 现在可以通过 [`cardShape.users.maxCount`](/api/config/js_kanban_cardshape_config) 设置卡片上显示多少指派用户(参见[**示例**](https://snippet.dhtmlx.com/w205dvzg?tag=kanban)) +- 使用 [`columnShape`](/api/config/js_kanban_columnshape_config) 更改列头内容(参见[**示例**](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban)) +- 通过工具栏搜索控件的 [`items.searchResult`](/api/config/toolbar_items_config) 自定义搜索结果视图(参见[**示例**](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban)) +- 可通过 [`editor.placement`](/api/config/js_kanban_editor_config) 将编辑器以弹窗方式打开(参见[**示例**](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban)) +- 卡片现在支持通过可点击图标投票,使用 [`cardShape.votes.clickable`](/api/config/js_kanban_cardshape_config)(参见[**示例**](https://snippet.dhtmlx.com/en76xvi4?tag=kanban)) +- 可通过 [`setTheme()`](/api/methods/js_kanban_settheme_method) 应用主题 + +### 更新 + +- #### 属性 + + - [`cardShape`](/api/config/js_kanban_cardshape_config) 现在包含 ***users.maxCount*** 和 ***votes.clickable*** + - [`columnShape`](/api/config/js_kanban_columnshape_config) 现在有 ***headerTemplate*** 和 ***collapsedTemplate*** + - [`editor`](/api/config/js_kanban_editor_config) 现在包含 ***placement*** 选项 + - 工具栏的 [`items`](/api/config/toolbar_items_config) 属性中 **search** 现在有 ***searchResult*** + +- #### 事件 + + - [`set-edit`](/api/events/js_kanban_setedit_event) 现在提供 ***eventSource*** 参数(参见[**示例**](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban)) + +- #### 方法 + + - [`setConfig()`](/api/methods/js_kanban_setconfig_method) 行为变更: + - 不会更改历史记录(无法通过该方法更改历史记录) + - 主题不会随此方法更改(请使用 [`setTheme()`](/api/methods/js_kanban_settheme_method)) + - Kanban 数据存储不会被销毁,因此不需要重新创建事件监听器或重新挂载工具栏 + + - [`setLocale()`](/api/methods/js_kanban_setlocale_method) 同样不会销毁数据存储,事件监听和工具栏会保持 + - 工具栏 [`setLocale()`](/api/methods/toolbar_setlocale_method) 方法中的 `api` 参数已废弃 + +### 修复 + +- 在编辑评论时删除评论会导致评论区消失 +- 部分本地化字符串缺失 +- 当同时设置 [`scrollType: "column"`](/api/config/js_kanban_scrolltype_config) 和 [`renderType: "lazy"`](/api/config/js_kanban_rendertype_config) 时拖放无效 +- 无法通过关闭图标关闭编辑器 +- Willow 皮肤下,编辑器右侧与进度条背景色一致 + +## 版本 1.5.13 + +发布日期:2024 年 9 月 12 日 + +### 修复 + +- 文件扩展名为大写时,"Make cover" 按钮不显示 +- 点击禁用的 Multiselect 时引发错误 +- 在使用 [`addCard()`](/api/methods/js_kanban_addcard_method) 后,如果启用列滚动和延迟渲染,滚动会导致错误 +- 没有评论会被保存为空字符串,而不是空数组 +- 编辑器样式会被同名全局样式覆盖。[请查阅迁移部分](/news/migration.md/#1512---1513) + +## 版本 1.5.12 + +发布日期:2024 年 5 月 2 日 + +### 修复 + +- 拦截回归:返回 `false` 未能阻止内部事件 +- 禁用文件后仍允许上传文件 + +## 版本 1.5.11 + +发布日期:2024 年 3 月 25 日 + +### 修复 + +- *Dark willow* 皮肤下 Kanban 的 CSS 变量在工具栏和 Portals 缺失 +- 禁用自动保存时,评论和投票的更改未保存到表单值 +- 自定义列子菜单的 **onClick** 函数收到 `null` 参数 +- 无法将 Datepicker 设置为可编辑 +- Kanban 示例中的控制台警告 + +## 版本 1.5.10 + +发布日期:2024 年 2 月 29 日 + +### 修复 + +- npm 构建损坏 +- 为 [`duplicate-card`](/api/events/js_kanban_duplicatecard_event) 事件和 [`duplicateCard()`](/api/methods/js_kanban_duplicatecard_method) 方法添加 `select` 参数 +- 编辑器中的评论字段样式错误 +- 更换主题导致回归 + +## 版本 1.5.9 + +发布日期:2024 年 2 月 20 日 + +### 修复 + +- Kanban 样式影响了其他控件 +- 自定义列子菜单项设置 `disabled: true` 后仍可点击 +- 无法为 **Uploader** 控件设置自定义上传函数 + +## 版本 1.5.8 + +发布日期:2023 年 11 月 28 日 + +### 修复 + +- **currentUser** 的 TS 定义在 **IKanbanConfig** 中缺失 + +## 版本 1.5.7 + +发布日期:2023 年 11 月 14 日 + +### 更新 + +- 工具栏 [`setLocale()`](/api/methods/toolbar_setlocale_method) 方法现在有 ***api*** 参数 + +### 修复 + +- 卡片菜单项中的 `disabled: true` 无效 +- Kanban 示例中出现多余的控制台警告 +- 任务优先级无法重置 +- 编辑器中的下拉控件点击外部无法关闭 + +## 版本 1.5.6 + +发布日期:2023 年 9 月 13 日 + +### 更新 + +- Kanban 现在可以作为 ES 模块导入 + +### 修复 + +- npm 包回归问题 + +## 版本 1.5.4 + +发布日期:2023 年 8 月 9 日 + +### 修复 + +- 上传的文件在切换卡片后仍留在表单中 +- 拖拽上传文件无效 +- 表单打开时按 Delete 可删除卡片 +- 搜索时选中卡片后,"Search in" 下拉框变为空白 +- 撤销添加链接操作时,新增链接未在后端删除 + +## 版本 1.5.1 + +### 修复 + +- 现在生成了正确的 TypeScript 定义 + +## 版本 1.5 + +发布日期:2023 年 6 月 15 日 + +[博客发布评测](https://dhtmlx.com/blog/dhtmlx-kanban-1-5/) + +### 新功能 + +- 现在可以在运行时创建和删除卡片之间的链接 +- 卡片之间的链接可在服务端管理 +- 列头可以固定(参见[**示例**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) + +### 新 API + +- #### 方法 + + - [`addLink()`](/api/methods/js_kanban_addlink_method) + - [`deleteLink()`](/api/methods/js_kanban_deletelink_method) + - [`getLinks()`](/api/provider/rest_methods/js_kanban_getlinks_method) + +- #### 路由 + + - [`DELETE /links`](/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route) + - [`GET /links`](/api/provider/rest_routes/get_routes/js_kanban_get_links_route) + - [`POST /links`](/api/provider/rest_routes/post_routes/js_kanban_post_links_route) + +### 更新 + +- #### 属性 + + - [`columnShape`](/api/config/js_kanban_columnshape_config) 现在包含 ***fixedHeaders*** 参数 + +### 修复 + +- 链接无法在运行时解析、导出或序列化 +- 如果未启用用户区,创建评论区失败 +- 存储中的链接会更改原始数据,且未能正确保存 +- 延迟渲染导致折叠列的悬停样式失效 +- 移动卡片到新列后消失 +- 新评论文本区在编辑时无法关闭 + +## 版本 1.4.2 + +发布日期:2023 年 4 月 13 日 + +### 修复 + +- 添加后,后端 ID 未保存到本地卡片/列/行数据 +- 部分 TS 定义缺失 +- 深色皮肤样式泄漏到其他元素 + +## 版本 1.4.1 + +发布日期:2023 年 3 月 29 日 + +### 修复 + +- 保持排序功能异常 +- 在 **cardShape**、**columnShape** 或 **rowShape** 中禁用右键菜单无效 +- 编辑器中添加链接功能在无链接数据时无效 +- 列菜单可能与卡片菜单一致或根本不显示 +- 可拖动两个任务而非一个 + +## 版本 1.4 + +发布日期:2023 年 3 月 21 日 + +[博客发布评测](https://dhtmlx.com/blog/dhtmlx-kanban-1-4/) + +### 新功能 + +- 现在可以添加评论(参见[**示例**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- 提供 **material**、**willow** 和 **willow-dark** 主题(参见[**示例**](https://snippet.dhtmlx.com/jnw54xif?tag=kanban)) +- 可以限制用户数量(参见[**示例**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban)) +- 设置卡片间的链接(参见[**示例**](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- 卡片支持投票(参见[**示例**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) + +### 新 API + +- #### 事件 + + - [`add-comment`](/api/events/js_kanban_addcomment_event) + - [`add-link`](/api/events/js_kanban_addlink_event) + - [`delete-comment`](/api/events/js_kanban_deletecomment_event) + - [`delete-link`](/api/events/js_kanban_deletelink_event) + - [`drag-card`](/api/events/js_kanban_dragcard_event) + - [`end-drag-card`](/api/events/js_kanban_enddragcard_event) + - [`start-drag-card`](/api/events/js_kanban_startdragcard_event) + - [`update-comment`](/api/events/js_kanban_updatecomment_event) + +- #### 方法 + + - [`addComment()`](/api/methods/js_kanban_addcomment_method) + - [`deleteComment()`](/api/methods/js_kanban_deletecomment_method) + - [`updateComment()`](/api/methods/js_kanban_updatecomment_method) + +- #### 属性 + + - [`currentUser`](/api/config/js_kanban_currentuser_config) + - [`links`](/api/config/js_kanban_links_config) + - [`theme`](/api/config/js_kanban_theme_config)(Kanban) + - [`theme`](/api/config/toolbar_items_config)(工具栏) + +### 更新 + +- #### 方法 + + - [`api.getState()`](/api/internal/js_kanban_getstate_method) 有新更新 + +- #### 属性 + + - [`cards`](/api/config/js_kanban_cards_config) 现在支持 ***css***、***comments*** 和 ***votes*** + - [`cardShape`](/api/config/js_kanban_cardshape_config) 现在包含 ***comments***、***votes***(参见[**示例**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban))和 ***css***(参见[**示例**](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban)) + - [`cardTemplate`](/api/config/js_kanban_cardtemplate_config) 现在可以显示右键菜单 + - [`columns`](/api/config/js_kanban_columns_config) 现在支持 ***css***(参见[**示例**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban))和 ***overlay***(参见[**示例**](https://snippet.dhtmlx.com/nfv59yif?tag=kanban)) + - [`columnShape`](/api/config/js_kanban_columnshape_config) 现在支持 ***css***(参见[**示例**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)) + - [`editorShape`](/api/config/js_kanban_editorshape_config) 增加了 [***comments***](/guides/configuration/#comments-类型)、[***links***](/guides/configuration/#links-类型) 和日期/日期范围类型的 ***format*** + - [`rows`](/api/config/js_kanban_rows_config) 现在支持 ***css***(参见[**示例**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + - [`rowShape`](/api/config/js_kanban_rowshape_config) 现在包含 ***css***(参见[**示例**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + +### 弃用的 API + +- #### 属性 + + - `cardShape.menu.items`、`columnShape.menu.items` 和 `rowShape.menu.items` 下菜单项对象的 label 已弃用 + +### 修复 + +- Kanban 在带 margin 容器中菜单位置异常 +- 折叠列未能正确定位(自定义宽度时) +- 拖放卡片到折叠列会导致消失 +- 折叠列自定义宽度时定位异常 +- 泳道模式下卡片菜单可能被编辑面板遮挡,导致删除卡片困难 + +## 版本 1.3 + +发布日期:2022 年 9 月 29 日 + +[博客发布评测](https://dhtmlx.com/blog/dhtmlx-kanban-1-3/) + +### 新功能 + +- 通过 API、三点菜单或 `Ctrl (Command)` + `D`(支持多卡)可复制卡片 +- Kanban 数据可导出为 JSON 文件 +- 支持 Kanban 历史管理: + - 工具栏上的撤销和重做控件 + - 快捷键: + - `Ctrl (Command)`+`Z` 撤销 + - `Ctrl (Command)`+`Y` 或 `Ctrl (Command)`+`Shift`+`Z` 重做 + - 通过 API 操作 + +### 新 API + +- **事件:** + [`duplicate-card`](/api/events/js_kanban_duplicatecard_event) + +- **方法:** + [`duplicateCard()`](/api/methods/js_kanban_duplicatecard_method), + [`export.json()`](/api/internal/js_kanban_json_method), + [`getUsers()`](/api/provider/rest_methods/js_kanban_getusers_method), + [`redo()`](/api/methods/js_kanban_redo_method), + [`undo()`](/api/methods/js_kanban_undo_method) + +- **属性:** + [`editor`](/api/config/js_kanban_editor_config), + [`history`](/api/config/js_kanban_history_config) + +- **通用设置:** + [`$meta`](/api/common/js_kanban_meta_parameter) + +### 弃用的 API + +- **属性:** + [`editorAutoSave`](/api/config/js_kanban_editorautosave_config) + +### 更新 + +- #### 事件 + + - [`update-card`](/api/events/js_kanban_updatecard_event) 事件已更新 + - [`update-column`](/api/events/js_kanban_updatecolumn_event) 事件已更新 + - [`update-row`](/api/events/js_kanban_updaterow_event) 事件已更新 + +- #### 方法 + + - [`updateCard()`](/api/methods/js_kanban_updatecard_method) 已更新 + - [`updateColumn()`](/api/methods/js_kanban_updatecolumn_method) 已更新 + - [`updateRow()`](/api/methods/js_kanban_updaterow_method) 已更新 + +- #### 属性 + + - 工具栏 [`items`](/api/config/toolbar_items_config) 现在包含 ***"undo"*** 和 ***"redo"*** 控件 + - [`editorShape`](/api/config/js_kanban_editorshape_config) 增加 ***dateRange*** 类型 + +## 版本 1.2.2 + +发布日期:2022 年 8 月 30 日 + +### 修复 + +- 菜单和工具栏中出现重复图标 + +## 版本 1.2.1 + +发布日期:2022 年 7 月 28 日 + +### 修复 + +- 启用 `scrollType:"column"` 时 `cardHeight` 无效 +- 上传控件未在卡片编辑器中显示已上传文件 +- 编辑器中 "combo" 和 "progress" 字段本地化无效 + +## 版本 1.2 + +发布日期:2022 年 6 月 29 日 + +[博客发布评测](https://dhtmlx.com/blog/dhtmlx-kanban-1-2/) + +### 新功能 + +- 现在可以通过列菜单添加新卡片(参见[**示例**](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban)) +- 支持延迟渲染(参见[**示例**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- 每列可独立滚动(参见[**示例**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- Kanban 在新建卡片、列、行时自动滚动到对应位置(API 和 UI,参见[**示例**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- 卡片支持排序(API 和 UI,参见[**示例**](https://snippet.dhtmlx.com/74nyuv14?tag=kanban)) + +### 新 API + +- **事件:** + [`scroll`](/api/events/js_kanban_scroll_event), + [`set-edit`](/api/events/js_kanban_setedit_event), + [`set-sort`](/api/events/js_kanban_setsort_event) + +- **方法:** + [`scroll()`](/api/methods/js_kanban_scroll_method), + [`setEdit()`](/api/methods/js_kanban_setedit_method), + [`setSort()`](/api/methods/js_kanban_setsort_method) + +- **属性:** + [`cardHeight`](/api/config/js_kanban_cardheight_config), + [`columnShape`](/api/config/js_kanban_columnshape_config), + [`rowShape`](/api/config/js_kanban_rowshape_config), + [`renderType`](/api/config/js_kanban_rendertype_config), + [`scrollType`](/api/config/js_kanban_scrolltype_config) + +### 更新 + +- #### 方法 + + - [`api.getReactiveState()`](/api/internal/js_kanban_getreactivestate_method) 已更新 + - [`api.getState()`](/api/internal/js_kanban_getstate_method) 已更新 + - [`api.getStores()`](/api/internal/js_kanban_getstores_method) 已更新 + - Kanban 的 [`setLocale()`](/api/methods/js_kanban_setlocale_method) 已更新 + - 工具栏的 [`setLocale()`](/api/methods/toolbar_setlocale_method) 已更新 + +- #### 属性 + + - 工具栏 [`items`](/api/config/toolbar_items_config) 已更新 + - [`cardShape`](/api/config/js_kanban_cardshape_config) 更新 ***start_date***、***end_date***、***menu*** 和 ***users*** + - [`editorShape`](/api/config/js_kanban_editorshape_config) 更新 ***multiselect*** 类型 + +#### 通用 + +- CSS 类前缀已更改(*参见 [样式](/guides/stylization)*) +- 本地化结构更新(*参见 [本地化](/guides/localization)*) + +### 修复 + +- 通过 `rowKey` 绑定卡片到泳道无效 +- 点击卡片菜单会打开编辑器 +- 拖拽多卡片行为异常 +- `select: false`(**readonly** 配置)下卡片编辑无效 +- 通过 `addCard()` 添加的新卡片无法正确选中 +- 在 `cardShape` 中设置 `label: false` 和 `menu: false` 无效 + +## 版本 1.1.1 + +发布日期:2022 年 2 月 28 日 + +[博客发布评测](https://dhtmlx.com/blog/maintenance-release-kanban-1-1-1/) + +### 修复 + +- 未在 cardShape 配置中定义自定义编辑器字段时无法使用 +- 在搜索栏下拉中选中正确卡片体验不佳 + +## 版本 1.1 + +发布日期:2022 年 2 月 15 日 + +[博客发布评测](https://dhtmlx.com/blog/dhtmlx-kanban-1-1-wip-validation-new-operations-columns-rows-typescript-support/) + +### 新功能 + +- 可通过标签旁的箭头折叠或展开列 +- 可为列和泳道设置卡片数量限制 +- 列可通过右键菜单(三点图标)移动 +- 行也可通过右键菜单(三点图标)移动 +- 可通过 **Shift** + **点击** 实现同一列多卡片选择 +- Kanban 现已支持 TypeScript 定义 + +### 新 API + +- 新增列、行移动 **事件**: + [`move-column`](/api/events/js_kanban_movecolumn_event), + [`move-row`](/api/events/js_kanban_moverow_event) +- 新增列、行移动 **方法**: + [`moveColumn()`](/api/methods/js_kanban_movecolumn_method), + [`moveRow()`](/api/methods/js_kanban_moverow_method) + +### 更新 + +#### 属性 + +- [`cards`](/api/config/js_kanban_cards_config) 现为可选 + +- [`columns`](/api/config/js_kanban_columns_config) 现为可选,并新增: + - ***collapsed*** + - ***limit*** + - ***strictLimit*** + +- [`cardShape`](/api/config/js_kanban_cardshape_config) 中的 ***color*** 选项已更新 + +#### 方法 + +- [`addColumn`](/api/methods/js_kanban_addcolumn_method) 已更新 +- [`addRow`](/api/methods/js_kanban_addrow_method) 已更新 +- [`updateCard`](/api/methods/js_kanban_updatecard_method) 已更新 +- [`updateColumn`](/api/methods/js_kanban_updatecolumn_method) 已更新 +- [`updateRow`](/api/methods/js_kanban_updaterow_method) 已更新 +- [`parse`](/api/methods/js_kanban_parse_method) 已更新 + +#### 事件 + +- [`add-column`](/api/events/js_kanban_addcolumn_event) 已更新 +- [`add-row`](/api/events/js_kanban_addrow_event) 已更新 +- [`update-card`](/api/events/js_kanban_updatecard_event) 已更新 +- [`update-column`](/api/events/js_kanban_updatecolumn_event) 已更新 +- [`update-row`](/api/events/js_kanban_updaterow_event) 已更新 + +## 版本 1.0 + +发布日期:2021 年 11 月 23 日 + +[博客发布评测](https://dhtmlx.com/blog/releasing-dhtmlx-kanban-board-v-1-0/) + +### 初始功能 + +- **卡片** 功能: + - 添加新卡片 + - 选择卡片(支持多选) + - 删除卡片 + - 卡片搜索 + - 通过拖拽在列和行间排序 + - 使用编辑器编辑卡片详情: + - 标签 + - 描述 + - 进度 + - 开始日期 + - 结束日期 + - 颜色 + - 优先级 + - 附件(*文件* 和 *图片*) + - *自定义字段* + +- **列** 和 **行** 功能: + - 添加新列和新行 + - 删除列和行 + - 重命名列和行 + - 折叠或展开行 + +- [本地化](/guides/localization) +- [后端集成](/guides/working_with_server)(Go 和 Node) +- 跨浏览器兼容 +- 支持触屏设备 diff --git a/i18n/cn/docusaurus-theme-classic/footer.json b/i18n/cn/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..dd91762 --- /dev/null +++ b/i18n/cn/docusaurus-theme-classic/footer.json @@ -0,0 +1,62 @@ +{ + "link.title.Development center": { + "message": "开发中心", + "description": "页脚中标题为开发中心的链接列标题" + }, + "link.title.Community": { + "message": "社区", + "description": "页脚中标题为社区的链接列标题" + }, + "link.title.Company": { + "message": "公司", + "description": "页脚中标题为公司的链接列标题" + }, + "link.item.label.Download JS Kanban": { + "message": "下载 JS 看板", + "description": "页脚中标签为下载 JS 看板的链接,链接到 https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml" + }, + "link.item.label.Examples": { + "message": "示例", + "description": "页脚中标签为示例的链接,链接到 https://snippet.dhtmlx.com/5hcx01h4?tag=kanban" + }, + "link.item.label.Blog": { + "message": "博客", + "description": "页脚中标签为博客的链接,链接到 https://dhtmlx.com/blog/tag/kanban/" + }, + "link.item.label.Forum": { + "message": "论坛", + "description": "页脚中标签为论坛的链接,链接到 https://forum.dhtmlx.com/c/kanban/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "页脚中标签为GitHub的链接,链接到 https://github.com/DHTMLX" + }, + "link.item.label.Youtube": { + "message": "Youtube", + "description": "页脚中标签为Youtube的链接,链接到 https://www.youtube.com/user/dhtmlx" + }, + "link.item.label.Facebook": { + "message": "Facebook", + "description": "页脚中标签为Facebook的链接,链接到 https://www.facebook.com/dhtmlx" + }, + "link.item.label.Twitter": { + "message": "Twitter", + "description": "页脚中标签为Twitter的链接,链接到 https://twitter.com/dhtmlx" + }, + "link.item.label.Linkedin": { + "message": "领英", + "description": "页脚中标签为Linkedin的链接,链接到 https://www.linkedin.com/groups/3345009/" + }, + "link.item.label.About us": { + "message": "关于我们", + "description": "页脚中标签为关于我们的链接,链接到 https://dhtmlx.com/docs/company.shtml" + }, + "link.item.label.Contact us": { + "message": "联系我们", + "description": "页脚中标签为联系我们的链接,链接到 https://dhtmlx.com/docs/contact.shtml" + }, + "link.item.label.Licensing": { + "message": "许可协议", + "description": "页脚中标签为许可协议的链接,链接到 https://dhtmlx.com/docs/products/dhtmlxKanban/#licensing" + } +} \ No newline at end of file diff --git a/i18n/cn/docusaurus-theme-classic/navbar.json b/i18n/cn/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..b7b9a7c --- /dev/null +++ b/i18n/cn/docusaurus-theme-classic/navbar.json @@ -0,0 +1,26 @@ +{ + "title": { + "message": "JavaScript 看板文档", + "description": "导航栏中的标题" + }, + "logo.alt": { + "message": "DHTMLX JavaScript 看板标志", + "description": "导航栏标志的替代文本" + }, + "item.label.Examples": { + "message": "示例", + "description": "带有标签“示例”的导航栏项目" + }, + "item.label.Forum": { + "message": "论坛", + "description": "带有标签“论坛”的导航栏项目" + }, + "item.label.Support": { + "message": "支持", + "description": "带有标签“支持”的导航栏项目" + }, + "item.label.Download": { + "message": "下载", + "description": "带有标签“下载”的导航栏项目" + } +} \ No newline at end of file diff --git a/i18n/de/code.json b/i18n/de/code.json new file mode 100644 index 0000000..faa26a6 --- /dev/null +++ b/i18n/de/code.json @@ -0,0 +1,444 @@ +{ + "theme.ErrorPageContent.title": { + "message": "Diese Seite ist abgestürzt.", + "description": "Der Titel der Ausweichseite, wenn die Seite abgestürzt ist" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Zurück nach oben scrollen", + "description": "Das ARIA-Label für den Zurück-zum-Anfang-Button" + }, + "theme.blog.archive.title": { + "message": "Archiv", + "description": "Der Seiten- & Hero-Titel der Blog-Archivseite" + }, + "theme.blog.archive.description": { + "message": "Archiv", + "description": "Die Seiten- & Hero-Beschreibung der Blog-Archivseite" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Navigation der Blog-Listen-Seite", + "description": "Das ARIA-Label für die Blog-Paginierung" + }, + "theme.blog.paginator.newerEntries": { + "message": "Neuere Einträge", + "description": "Das Label zur Navigation zur Seite mit neueren Blogbeiträgen (vorherige Seite)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Ältere Einträge", + "description": "Das Label zur Navigation zur Seite mit älteren Blogbeiträgen (nächste Seite)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Navigation der Blog-Post-Seite", + "description": "Das ARIA-Label für die Blog-Post-Paginierung" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Neuerer Beitrag", + "description": "Das Label des Blogpost-Buttons zur Navigation zum neueren/vorherigen Beitrag" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Älterer Beitrag", + "description": "Das Label des Blogpost-Buttons zur Navigation zum älteren/nächsten Beitrag" + }, + "theme.tags.tagsPageLink": { + "message": "Alle Tags anzeigen", + "description": "Das Label des Links zur Tag-Übersichtsseite" + }, + "theme.colorToggle.ariaLabel": { + "message": "Wechsel zwischen Dunkel- und Hellmodus (aktuell {mode})", + "description": "Das ARIA-Label für den Farbmodus-Umschalter in der Navigationsleiste" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "Dunkelmodus", + "description": "Der Name für den dunklen Farbmodus" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "Hellmodus", + "description": "Der Name für den hellen Farbmodus" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Brotkrumen", + "description": "Das ARIA-Label für die Brotkrumen-Navigation" + }, + "theme.docs.DocCard.categoryDescription.plurals": { + "message": "1 Element|{count} Elemente", + "description": "Die Standardbeschreibung für eine Kategorie-Karte im generierten Index, wie viele Elemente diese Kategorie enthält" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Dokumentationsseiten", + "description": "Das ARIA-Label für die Dokumentations-Paginierung" + }, + "theme.docs.paginator.previous": { + "message": "Zurück", + "description": "Das Label zum Navigieren zur vorherigen Dokumentation" + }, + "theme.docs.paginator.next": { + "message": "Weiter", + "description": "Das Label zum Navigieren zur nächsten Dokumentation" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "Ein Dokument markiert|{count} Dokumente markiert", + "description": "Pluralisiertes Label für \"{count} Dokumente markiert\". Verwenden Sie so viele Pluralformen (getrennt durch \"|\") wie Ihre Sprache unterstützt (siehe https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} mit \"{tagName}\"", + "description": "Der Titel der Seite für einen Dokumentations-Tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "Dies ist unreleased Dokumentation für {siteTitle} Version {versionLabel}.", + "description": "Das Label, das dem Benutzer mitteilt, dass er eine nicht veröffentlichte Dokumentationsversion durchsucht" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "Dies ist die Dokumentation für {siteTitle} Version {versionLabel}, die nicht mehr aktiv gepflegt wird.", + "description": "Das Label, das dem Benutzer mitteilt, dass er eine nicht mehr gepflegte Dokumentationsversion durchsucht" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "Für aktuelle Dokumentation siehe {latestVersionLink} ({versionLabel}).", + "description": "Das Label, das dem Benutzer empfiehlt, die neueste Version zu prüfen" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "neueste Version", + "description": "Das Label für den Link zur neuesten Version" + }, + "theme.common.editThisPage": { + "message": "Diese Seite bearbeiten", + "description": "Das Link-Label zum Bearbeiten der aktuellen Seite" + }, + "theme.common.headingLinkTitle": { + "message": "Direktlink zu {heading}", + "description": "Titel für den Link zur Überschrift" + }, + "theme.lastUpdated.atDate": { + "message": " am {date}", + "description": "Die Worte, die beschreiben, an welchem Datum eine Seite zuletzt aktualisiert wurde" + }, + "theme.lastUpdated.byUser": { + "message": " von {user}", + "description": "Die Worte, die beschreiben, von wem die Seite zuletzt aktualisiert wurde" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Zuletzt aktualisiert{atDate}{byUser}", + "description": "Der Satz, der anzeigt, wann eine Seite zuletzt aktualisiert wurde und von wem" + }, + "theme.NotFound.title": { + "message": "Seite nicht gefunden", + "description": "Der Titel der 404-Seite" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versionen", + "description": "Das Label für das Versions-Dropdown in der mobilen Navigationsleiste" + }, + "theme.tags.tagsListLabel": { + "message": "Tags:", + "description": "Das Label neben einer Tag-Liste" + }, + "theme.admonition.caution": { + "message": "Vorsicht", + "description": "Das Standard-Label für die Warnung 'Vorsicht' (:::caution)" + }, + "theme.admonition.danger": { + "message": "Gefahr", + "description": "Das Standard-Label für die Warnung 'Gefahr' (:::danger)" + }, + "theme.admonition.info": { + "message": "Info", + "description": "Das Standard-Label für die Warnung 'Info' (:::info)" + }, + "theme.admonition.note": { + "message": "Hinweis", + "description": "Das Standard-Label für die Warnung 'Hinweis' (:::note)" + }, + "theme.admonition.tip": { + "message": "Tipp", + "description": "Das Standard-Label für die Warnung 'Tipp' (:::tip)" + }, + "theme.admonition.warning": { + "message": "Warnung", + "description": "Das Standard-Label für die Warnung 'Warnung' (:::warning)" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Schließen", + "description": "Das ARIA-Label für den Schließen-Button der Ankündigungsleiste" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Navigation der neuesten Blogbeiträge", + "description": "Das ARIA-Label für die neuesten Beiträge in der Blog-Seitenleiste" + }, + "theme.CodeBlock.copied": { + "message": "Kopiert", + "description": "Das Label des Kopieren-Buttons in Codeblöcken" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Code in die Zwischenablage kopieren", + "description": "Das ARIA-Label für den Kopieren-Button von Codeblöcken" + }, + "theme.CodeBlock.copy": { + "message": "Kopieren", + "description": "Das Label des Kopieren-Buttons in Codeblöcken" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Zeilenumbruch umschalten", + "description": "Das title-Attribut für den Button zum Umschalten des Zeilenumbruchs in Codeblöcken" + }, + "theme.DocSidebarItem.expandCategoryAriaLabel": { + "message": "Seitenleisten-Kategorie '{label}' erweitern", + "description": "Das ARIA-Label zum Erweitern der Seitenleisten-Kategorie" + }, + "theme.DocSidebarItem.collapseCategoryAriaLabel": { + "message": "Seitenleisten-Kategorie '{label}' reduzieren", + "description": "Das ARIA-Label zum Reduzieren der Seitenleisten-Kategorie" + }, + "theme.NavBar.navAriaLabel": { + "message": "Hauptnavigation", + "description": "Das ARIA-Label für die Hauptnavigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Sprachen", + "description": "Das Label für das Sprach-Auswahl-Dropdown in der mobilen Ansicht" + }, + "theme.NotFound.p1": { + "message": "Wir konnten nicht finden, wonach Sie gesucht haben.", + "description": "Der erste Absatz der 404-Seite" + }, + "theme.NotFound.p2": { + "message": "Bitte kontaktieren Sie den Besitzer der Website, der Sie zum ursprünglichen URL verlinkt hat, und informieren Sie ihn, dass der Link defekt ist.", + "description": "Der zweite Absatz der 404-Seite" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "Auf dieser Seite", + "description": "Das Label des Buttons für das einklappbare Inhaltsverzeichnis" + }, + "theme.blog.post.readMore": { + "message": "Weiterlesen", + "description": "Das Label in Blogbeitrags-Auszügen, um zum vollständigen Beitrag zu verlinken" + }, + "theme.blog.post.readMoreLabel": { + "message": "Mehr lesen über {title}", + "description": "Das ARIA-Label für den Link zum vollständigen Blogbeitrag aus Auszügen" + }, + "theme.blog.post.readingTime.plurals": { + "message": "Eine Minute lesen|{readingTime} Minuten lesen", + "description": "Pluralisiertes Label für \"{readingTime} Minuten lesen\". Verwenden Sie so viele Pluralformen (getrennt durch \"|\") wie Ihre Sprache unterstützt (siehe https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Startseite", + "description": "Das ARIA-Label für die Startseite in den Brotkrumen" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Seitenleiste einklappen", + "description": "Das title-Attribut für den Einklappen-Button der Dokumentations-Seitenleiste" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Seitenleiste einklappen", + "description": "Das ARIA-Label für den Einklappen-Button der Dokumentations-Seitenleiste" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Dokumentations-Seitenleiste", + "description": "Das ARIA-Label für die Seitenleisten-Navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Navigationsleiste schließen", + "description": "Das ARIA-Label für den Schließen-Button der mobilen Seitenleiste" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Navigationsleiste umschalten", + "description": "Das ARIA-Label für den Hamburger-Menü-Button der mobilen Navigation" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Zurück zum Hauptmenü", + "description": "Das Label des Zurück-Buttons, um zum Hauptmenü zurückzukehren, innerhalb des sekundären Menüs der mobilen Navigationsseitenleiste (insbesondere für die Dokumentations-Seitenleiste)" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Seitenleiste erweitern", + "description": "Das ARIA-Label und title-Attribut für den Erweitern-Button der Dokumentations-Seitenleiste" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Seitenleiste erweitern", + "description": "Das ARIA-Label und title-Attribut für den Erweitern-Button der Dokumentations-Seitenleiste" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "Ein Dokument gefunden|{count} Dokumente gefunden", + "description": "Pluralisiertes Label für \"{count} Dokumente gefunden\". Verwenden Sie so viele Pluralformen (getrennt durch \"|\") wie Ihre Sprache unterstützt (siehe https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Suchergebnisse für „{query}“", + "description": "Der Titel der Suchseite für eine nicht-leere Suche" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Dokumentation durchsuchen", + "description": "Der Titel der Suchseite für eine leere Suche" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Geben Sie hier Ihre Suche ein", + "description": "Der Platzhalter für das Suchfeld auf der Suchseite" + }, + "theme.SearchPage.inputLabel": { + "message": "Suche", + "description": "Das ARIA-Label für das Suchfeld auf der Suchseite" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Suche mit Algolia", + "description": "Das ARIA-Label für den Algolia-Hinweis" + }, + "theme.SearchPage.noResultsText": { + "message": "Keine Ergebnisse gefunden", + "description": "Der Absatz für leere Suchergebnisse" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Lade neue Ergebnisse...", + "description": "Der Absatz beim Laden neuer Suchergebnisse" + }, + "theme.SearchBar.seeAll": { + "message": "Alle {count} Ergebnisse anzeigen" + }, + "theme.SearchBar.label": { + "message": "Suche", + "description": "Das ARIA-Label und Platzhalter für den Suchbutton" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Suchanfrage löschen", + "description": "Das Label und ARIA-Label für den Zurücksetzen-Button im Suchfeld" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Abbrechen", + "description": "Das Label und ARIA-Label für den Abbrechen-Button im Suchfeld" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Zuletzt", + "description": "Der Titel für die letzten Suchanfragen" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "Keine letzten Suchanfragen", + "description": "Der Text, wenn keine letzten Suchanfragen vorliegen" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Diese Suche speichern", + "description": "Das Label für den Button zum Speichern der letzten Suche" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Diese Suche aus dem Verlauf entfernen", + "description": "Das Label für den Button zum Entfernen der letzten Suche" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favoriten", + "description": "Der Titel für die Favoriten-Suchen" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Diese Suche aus den Favoriten entfernen", + "description": "Das Label für den Button zum Entfernen einer Favoriten-Suche" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Ergebnisse konnten nicht geladen werden", + "description": "Der Titel für den Fehlerbildschirm des Such-Modals" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "Bitte prüfen Sie Ihre Netzwerkverbindung.", + "description": "Der Hilfetext für den Fehlerbildschirm des Such-Modals" + }, + "theme.SearchModal.footer.selectText": { + "message": "zum Auswählen", + "description": "Der erklärende Text zur Aktion der Enter-Taste" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter-Taste", + "description": "Das ARIA-Label für den Enter-Tasten-Button, der die Auswahl bestätigt" + }, + "theme.SearchModal.footer.navigateText": { + "message": "zum Navigieren", + "description": "Der erklärende Text zur Aktion der Pfeiltasten nach oben und unten" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Pfeil nach oben", + "description": "Das ARIA-Label für den Pfeil-nach-oben-Tasten-Button, der die Navigation steuert" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Pfeil nach unten", + "description": "Das ARIA-Label für den Pfeil-nach-unten-Tasten-Button, der die Navigation steuert" + }, + "theme.SearchModal.footer.closeText": { + "message": "zum Schließen", + "description": "Der erklärende Text zur Aktion der Escape-Taste" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape-Taste", + "description": "Das ARIA-Label für den Escape-Tasten-Button, der das Modal schließt" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Suche mit", + "description": "Der Text, der erklärt, dass die Suche mit Algolia erfolgt" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "Keine Ergebnisse für", + "description": "Der Text, der erklärt, dass keine Ergebnisse für die folgende Suche gefunden wurden" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Versuchen Sie die Suche nach", + "description": "Der Text für den vorgeschlagenen Suchbegriff, wenn keine Ergebnisse gefunden wurden" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Glauben Sie, diese Suche sollte Ergebnisse liefern?", + "description": "Der Text für die Frage, ob der Benutzer fehlende Ergebnisse vermutet" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Lassen Sie es uns wissen.", + "description": "Der Linktext, um fehlende Ergebnisse zu melden" + }, + "theme.SearchModal.placeholder": { + "message": "Dokumente durchsuchen", + "description": "Der Platzhalter im Eingabefeld des DocSearch-Popup-Modals" + }, + "theme.blog.post.plurals": { + "message": "Ein Beitrag|{count} Beiträge", + "description": "Pluralisiertes Label für \"{count} Beiträge\". Verwenden Sie so viele Pluralformen (getrennt durch \"|\") wie Ihre Sprache unterstützt (siehe https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} markiert mit „{tagName}“", + "description": "Der Titel der Seite für einen Blog-Tag" + }, + "theme.blog.author.pageTitle": { + "message": "{authorName} - {nPosts}", + "description": "Der Titel der Seite für einen Blog-Autor" + }, + "theme.blog.authorsList.pageTitle": { + "message": "Autoren", + "description": "Der Titel der Autoren-Seite" + }, + "theme.blog.authorsList.viewAll": { + "message": "Alle Autoren anzeigen", + "description": "Das Label des Links zur Blog-Autoren-Seite" + }, + "theme.blog.author.noPosts": { + "message": "Dieser Autor hat noch keine Beiträge geschrieben.", + "description": "Der Text für Autoren mit 0 Blogbeiträgen" + }, + "theme.contentVisibility.unlistedBanner.title": { + "message": "Nicht gelistete Seite", + "description": "Der Titel des Banners für nicht gelistete Inhalte" + }, + "theme.contentVisibility.unlistedBanner.message": { + "message": "Diese Seite ist nicht gelistet. Suchmaschinen werden sie nicht indexieren, und nur Benutzer mit direktem Link können darauf zugreifen.", + "description": "Die Nachricht des Banners für nicht gelistete Inhalte" + }, + "theme.contentVisibility.draftBanner.title": { + "message": "Entwurfsseite", + "description": "Der Titel des Banners für Entwurfsinhalte" + }, + "theme.contentVisibility.draftBanner.message": { + "message": "Diese Seite ist ein Entwurf. Sie ist nur in der Entwicklungsumgebung sichtbar und wird im Produktions-Build ausgeschlossen.", + "description": "Die Nachricht des Banners für Entwurfsinhalte" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Erneut versuchen", + "description": "Das Label des Buttons, um das erneute Rendern zu versuchen, wenn die React-Fehlergrenze einen Fehler erfasst" + }, + "theme.common.skipToMainContent": { + "message": "Zum Hauptinhalt springen", + "description": "Das Label zum Überspringen des Inhalts für Barrierefreiheit, ermöglicht schnelles Navigieren zum Hauptinhalt per Tastatur (Tab/Enter)" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "Der Titel der Tag-Übersichtsseite" + } +} \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current.json b/i18n/de/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..449f52f --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,134 @@ +{ + "version.label": { + "message": "Nächste", + "description": "The label for version current" + }, + "sidebar.docs.category.What's new and migration": { + "message": "Neuigkeiten und Migration", + "description": "The label for category What's new and migration in sidebar docs" + }, + "sidebar.docs.category.What's new and migration.link.generated-index.title": { + "message": "Neuigkeiten und Migration", + "description": "The generated-index page title for category What's new and migration in sidebar docs" + }, + "sidebar.docs.category.API": { + "message": "API", + "description": "The label for category API in sidebar docs" + }, + "sidebar.docs.category.Kanban methods": { + "message": "Kanban-Methoden", + "description": "The label for category Kanban methods in sidebar docs" + }, + "sidebar.docs.category.Kanban internal API": { + "message": "Kanban interne API", + "description": "The label for category Kanban internal API in sidebar docs" + }, + "sidebar.docs.category.Kanban internal API.link.generated-index.title": { + "message": "Übersicht interne API", + "description": "The generated-index page title for category Kanban internal API in sidebar docs" + }, + "sidebar.docs.category.Event Bus methods": { + "message": "Event-Bus-Methoden", + "description": "The label for category Event Bus methods in sidebar docs" + }, + "sidebar.docs.category.Export methods": { + "message": "Export-Methoden", + "description": "The label for category Export methods in sidebar docs" + }, + "sidebar.docs.category.State methods": { + "message": "Status-Methoden", + "description": "The label for category State methods in sidebar docs" + }, + "sidebar.docs.category.Kanban events": { + "message": "Kanban-Ereignisse", + "description": "The label for category Kanban events in sidebar docs" + }, + "sidebar.docs.category.Kanban properties": { + "message": "Kanban-Eigenschaften", + "description": "The label for category Kanban properties in sidebar docs" + }, + "sidebar.docs.category.Toolbar methods": { + "message": "Toolbar-Methoden", + "description": "The label for category Toolbar methods in sidebar docs" + }, + "sidebar.docs.category.Toolbar properties": { + "message": "Toolbar-Eigenschaften", + "description": "The label for category Toolbar properties in sidebar docs" + }, + "sidebar.docs.category.Common settings": { + "message": "Allgemeine Einstellungen", + "description": "The label for category Common settings in sidebar docs" + }, + "sidebar.docs.category.Backend API": { + "message": "Backend-API", + "description": "The label for category Backend API in sidebar docs" + }, + "sidebar.docs.category.Backend API.link.generated-index.title": { + "message": "Backend-API", + "description": "The generated-index page title for category Backend API in sidebar docs" + }, + "sidebar.docs.category.RestDataProvider API": { + "message": "RestDataProvider-API", + "description": "The label for category RestDataProvider API in sidebar docs" + }, + "sidebar.docs.category.RestDataProvider API.link.generated-index.title": { + "message": "RestDataProvider-API", + "description": "The generated-index page title for category RestDataProvider API in sidebar docs" + }, + "sidebar.docs.category.REST methods": { + "message": "REST-Methoden", + "description": "The label for category REST methods in sidebar docs" + }, + "sidebar.docs.category.REST routes": { + "message": "REST-Routen", + "description": "The label for category REST routes in sidebar docs" + }, + "sidebar.docs.category.GET routes": { + "message": "GET-Routen", + "description": "The label for category GET routes in sidebar docs" + }, + "sidebar.docs.category.GET routes.link.generated-index.title": { + "message": "GET-Routen", + "description": "The generated-index page title for category GET routes in sidebar docs" + }, + "sidebar.docs.category.POST routes": { + "message": "POST-Routen", + "description": "The label for category POST routes in sidebar docs" + }, + "sidebar.docs.category.POST routes.link.generated-index.title": { + "message": "POST-Routen", + "description": "The generated-index page title for category POST routes in sidebar docs" + }, + "sidebar.docs.category.PUT routes": { + "message": "PUT-Routen", + "description": "The label for category PUT routes in sidebar docs" + }, + "sidebar.docs.category.PUT routes.link.generated-index.title": { + "message": "PUT-Routen", + "description": "The generated-index page title for category PUT routes in sidebar docs" + }, + "sidebar.docs.category.DELETE routes": { + "message": "DELETE-Routen", + "description": "The label for category DELETE routes in sidebar docs" + }, + "sidebar.docs.category.DELETE routes.link.generated-index.title": { + "message": "DELETE-Routen", + "description": "The generated-index page title for category DELETE routes in sidebar docs" + }, + "sidebar.docs.category.Backend and frameworks integration": { + "message": "Backend- und Framework-Integration", + "description": "The label for category Backend and frameworks integration in sidebar docs" + }, + "sidebar.docs.category.Backend and frameworks integration.link.generated-index.title": { + "message": "Backend- und Framework-Integration", + "description": "The generated-index page title for category Backend and frameworks integration in sidebar docs" + }, + "sidebar.docs.category.Guides": { + "message": "Anleitungen", + "description": "The label for category Guides in sidebar docs" + }, + "sidebar.docs.category.Guides.link.generated-index.title": { + "message": "Anleitungen", + "description": "The generated-index page title for category Guides in sidebar docs" + } +} \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md b/i18n/de/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md new file mode 100644 index 0000000..60084a8 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md @@ -0,0 +1,52 @@ +--- +sidebar_label: $meta +title: $meta Parameter +description: Sie können mehr über den $meta Parameter in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# $meta + +### Beschreibung + +@short: Ein Objekt mit zusätzlichen Einstellungen zur Konfiguration von Methoden und Events des Kanban + +:::important +Das `$meta`-Objekt enthält einen zusätzlichen Parametersatz, der zur Konfiguration von Methoden basierend auf den Events des Kanban verwendet wird! +::: + +### Verwendung + +~~~jsx {} +$meta?: { + skipHistory?: boolean +}; +~~~ + +### Parameter + +Das `$meta`-Objekt enthält den folgenden Parameter: + +- `skipHistory` - (optional) aktiviert/deaktiviert das Überspringen von Operationen in der Historie des Kanban + +### Beispiel + +~~~jsx {11-13} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Neue Karte hinzufügen und diese Aktion in der Kanban-Historie überspringen +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "Neue Karte" }, + $meta: { + skipHistory: true + } +}); +~~~ + +**Änderungsprotokoll:** Der `$meta` Parameter wurde in Version 1.3 hinzugefügt + +**Verwandter Artikel:** [`history`](api/config/js_kanban_history_config.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md new file mode 100644 index 0000000..9578fd2 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: cardHeight +title: cardHeight Konfiguration +description: Sie können mehr über die cardHeight-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# cardHeight + +### Beschreibung + +@short: Optional. Die Höhe der Karten + +### Verwendung + +~~~jsx {} +cardHeight?: number; // px +~~~ + +:::important +Wenn Sie die Einstellungen [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) und [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md) kombinieren, vergessen Sie nicht, eine statische Höhe für die Karten über die Eigenschaft `cardHeight` anzugeben. Wenn Sie dies nicht tun, werden die Karten nicht angezeigt. +::: + +### Beispiel + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + cardHeight: 150, // px + // andere Parameter +}); +~~~ + +**Änderungsprotokoll:** Die Eigenschaft wurde in Version v1.2 hinzugefügt + +**Verwandte Artikel:** [Konfiguration](guides/configuration.md#cards) + +**Verwandte Beispiel:** [Kanban. Lazy rendering und Spalten-Scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md new file mode 100644 index 0000000..2705d13 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md @@ -0,0 +1,156 @@ +--- +sidebar_label: karten +title: Karten-Konfiguration +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Karten-Konfiguration. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# karten + +### Beschreibung + +@short: Optional. Ein Array von Objekten mit den Kartendaten + +### Verwendung + +~~~jsx {} +cards?: [ + { + id?: string | number, + label?: string, + description?: string, + progress?: number, + start_date?: Date, + end_date?: Date, + attached?: [ + { + id: string | number, + url?: string, + previewURL?: string, + coverURL?: string, + name?: string, + isCover?: boolean + size?: number + }, {...} + ], + color?: string, + users?: array | string | number, + // users?: array - für mehrere Benutzer, wenn Sie den Editor-Typ "multiselect" verwenden, um Benutzer zuzuweisen + // users?: string | number - für einen einzelnen Benutzer, wenn Sie die Editor-Typen "combo" oder "select" verwenden, um einen Benutzer zuzuweisen + priority?: string | number, + css?: string, + votes?: array, + comments?: [ + { + id: string | number, + userId: string | number, + cardId: string | number, + text?: string, + date?: Date, + }, {...} + ], + [custom_key: string]?: any + }, {...} // weitere Kartendaten +]; +~~~ + +### Parameter + +Für jede Karte können Sie folgende Parameter (Daten) angeben: + +- `id` - (optional) eine Karten-**ID**. Wird zur Verwaltung der Karte über die entsprechenden Methoden verwendet +- `label` - (optional) eine Kartenbezeichnung. Wird im Feld **Label** angezeigt +- `description` - (optional) eine Kartenbeschreibung. Wird im Feld **Beschreibung** angezeigt +- `progress` - (optional) ein Wert für die Fortschrittsanzeige. Sie können einen Wert im Bereich von 0 bis 100 angeben. Wird im Feld **Fortschrittsbalken** angezeigt +- `start_date` - (optional) ein Start-Datum-Objekt (kein String-Datum angeben). Wird im Feld **Startdatum** angezeigt +- `end_date` - (optional) ein End-Datum-Objekt (kein String-Datum angeben). Wird im Feld **Enddatum** angezeigt +- `attached` - (optional) ein Array von Objekten mit Daten der angehängten Datei(en). Wird im Feld **Anhang** angezeigt. Für jedes Objekt können Sie folgende Parameter angeben: + - `id` - (erforderlich) eine **ID** der angehängten Datei + - `url` - (optional) Pfad zur anzuhängenden Datei + - `previewURL` - (optional) Pfad zum Vorschaubild + - `coverURL` - (optional) Pfad zum Bild, das als Cover gesetzt wird + - `name` - (optional) Dateiname + - `isCover` - (optional) aktiviert ein Coverbild. Wenn **true**, wird das Coverbild über die URL "coverURL" geladen + - `size` - (optional) Größe der angehängten Datei (in Bytes) +- `color` - (optional) ein gültiger HEX-Farbcode. Es ist die Farbe der oberen Linie der Karte +- `users` - (optional) ein **Array** mit **IDs** für mehrere zugewiesene Benutzer oder **string | number** für einen einzelnen zugewiesenen Benutzer. Um die zugewiesenen Benutzer anzugeben, müssen Sie ein Array mit Benutzerdaten in der Eigenschaft [cardShape.users](api/config/js_kanban_cardshape_config.md) definieren. Die Benutzer werden im Feld **Benutzer** angezeigt + +:::info +`users?: array` - geben Sie ein **Array** mit Benutzer-**IDs** an, wenn Sie den Editor-Typ [**multiselect**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) verwenden, um mehrere Benutzer zuzuweisen + +`users?: string | number` - geben Sie eine einzelne **ID** an, wenn Sie die Editor-Typen [**combo** oder **select**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) verwenden, um einen einzelnen Benutzer zuzuweisen +::: + +- `priority` - (optional) eine Kartenprioritäts-**ID**. Um die Kartenpriorität anzugeben, müssen Sie ein Array mit Prioritätsdaten in der Eigenschaft [cardShape.priority](api/config/js_kanban_cardshape_config.md) definieren. Wird im Feld **Priorität** angezeigt +- `css` - (optional) definiert CSS-Stile für eine einzelne Karte +- `votes` - (optional) ein Array von Benutzer-IDs +- `comments` - (optional) ein Array von Objekten mit Kommentardaten. Für jedes Kommentarobjekt können Sie folgende Parameter angeben: + - `id` - (erforderlich) eine **ID** des Kommentars + - `userId` - (erforderlich) eine **ID** des Benutzers, der den Kommentar verfasst hat + - `cardId` - (erforderlich) eine **ID** der Karte, zu der der Kommentar gehört + - `text` - (optional) Text des Kommentars. Kann auch HTML-Markup enthalten + - `date` - (optional) ein Date-Objekt (kein String-Datum angeben). Das Datum, an dem der Kommentar verfasst wurde. Wird nach der Bearbeitung nicht aktualisiert +- `custom_key` - (optional) ein benutzerdefinierter Schlüssel der Karte. Sie können benutzerdefinierte Schlüssel angeben, um die Karte in Spalte und Zeile zu platzieren. Siehe die Eigenschaften [columnKey](../js_kanban_columnkey_config) und [rowKey](api/config/js_kanban_rowkey_config.md) + +:::info +Wenn Sie neue Daten für Karten dynamisch laden möchten, können Sie die Methode [**parse()**](api/methods/js_kanban_parse_method.md) verwenden! +::: + +### Beispiel + +~~~jsx {1-41,45} +const cards = [ + { + id: 1, + label: "Integration mit React", + description: "Eine Beschreibung", + progress: 25, + start_date: new Date("02/24/2022"), + end_date: new Date("02/24/2023"), + attached: [ + { + id: 234, + url: "../assets/img-1.jpg", + previewURL: "../assets/img-1.jpg", + coverURL: "../assets/img-1.jpg", + name: "img-1.jpg", + isCover: true, + size: 11979 + }, {...} // weitere angehängte Dateien + ], + color: "#65D3B3", + users: [1,2], + votes: [3,6,8], + comments: [ + { + id: 1, + userId: 1, + cardId: 1, + text: "Grüße, liebe Kollegen. Ich möchte meine Einsichten zu dieser Aufgabe teilen. Ich denke, wir sollten mindestens die Hälfte der Punkte im Plan ohne weitere Verzögerungen erledigen.", + date: new Date(), + }, {...} // weitere Kommentare + ], + priority: 1, + // benutzerdefiniertes Feld, um die Karte in der Zeile "feature" zu platzieren + // die rowKey-Konfiguration muss auf den Wert "type" gesetzt sein + type: "feature", + // benutzerdefiniertes Feld, um die Karte in der Spalte "backlog" zu platzieren + // die columnKey-Konfiguration muss auf den Wert "stage" gesetzt sein + stage: "backlog", + css: "red", + }, {...} // weitere Kartendaten +]; + +new kanban.Kanban("#root", { + columns, + cards, + // weitere Parameter +}); +~~~ + +**Änderungsprotokoll:** Die Parameter ***css***, ***comments*** und ***votes*** wurden in Version 1.4 hinzugefügt + +**Verwandte Artikel:** +- [Arbeiten mit Daten](guides/working_with_data.md) +- [updateCard()](api/methods/js_kanban_updatecard_method.md) + +**Verwandtes Beispiel:** [Kanban. Styling von Karten](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md new file mode 100644 index 0000000..54b95df --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md @@ -0,0 +1,340 @@ +--- +sidebar_label: cardShape +title: cardShape Konfiguration +description: Sie können die cardShape-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# cardShape + +### Beschreibung + +@short: Optional. Ein Objekt mit Einstellungen zur Verwaltung des Aussehens der Karten + +### Verwendung + +~~~jsx {} +cardShape?: { + label?: boolean | { show?: boolean }, + description?: boolean | { show?: boolean }, + progress?: boolean | { show?: boolean }, + attached?: boolean | { show?: boolean }, + cover?: boolean | { show?: boolean }, + comments?: boolean | { show?: boolean }, + confirmDeletion?: boolean | { show?: boolean }, + start_date?: boolean | { + show?: boolean, + format?: string + }, + end_date?: boolean | { + show?: boolean, + format?: string + }, + color?: boolean | { + show?: boolean, + values?: array + }, + menu?: boolean | { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, card }) => void, + data?: array // ein Array von Untermenüpunkten + }, + {...} + ] | ({ card, readonly }) => array | null + }, + users?: boolean | { + show?: boolean, + values: [ + { + id: string | number, + label?: string, + avatar?: string + }, + {...} // weitere Benutzerdaten + ], + maxCount?: number | false + }, + priority?: boolean | { + show?: boolean, + values?: [ + { + id: string | number, + label?: string, + color: string + }, + {...} // weitere Prioritätsdaten + ] + }, + votes?: boolean | { + show?: boolean, + clickable?: boolean + }, + css?: (card) => string, + headerFields?: [ + { + key: string, + label?: string, + css?: string + }, + {...} // weitere Felddaten + ] +}; +~~~ + +### Parameter + +:::info +In manchen Fällen können Sie den Parameter als **kurzen** oder **ausführlichen** Wert setzen. Siehe das folgende Beispiel: + +~~~jsx {3,6} + label: boolean | { show?: boolean } + // kurzer Wert + label: true + // oder + // ausführlicher Wert + label: { show: true } +~~~ +::: + +Um das Aussehen der Karte zu konfigurieren, können Sie im **cardShape**-Objekt die folgenden Parameter (Felder) angeben: + +- `label` - (optional) zeigt/versteckt ein **Label**-Feld +- `description` - (optional) zeigt/versteckt ein **Beschreibung**-Feld +- `progress` - (optional) zeigt/versteckt ein **Fortschritt**-Feld +- `attached` - (optional) zeigt/versteckt ein **Anhang**-Feld +- `cover` - (optional) zeigt/versteckt ein **Kartenbild** +- `comments` - (optional) zeigt/versteckt **Kommentare** auf den Karten +- `confirmDeletion` - (optional) zeigt/versteckt den **Bestätigungsdialog**, der es Benutzern erlaubt, das Löschen einer Karte zu bestätigen oder abzulehnen +- `start_date` - (optional) ein Objekt mit Parametern für ein **Startdatum**-Feld + - `show` - (optional) zeigt/versteckt das Startdatum der Karte + - `format` - (optional) definiert das Format des Startdatums der Karte. Die verfügbaren Parameter finden Sie [hier](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `end_date` - (optional) ein Objekt mit Parametern für ein **Enddatum**-Feld + - `show` - (optional) zeigt/versteckt das Enddatum der Karte + - `format` - (optional) definiert das Format des Enddatums der Karte. Die verfügbaren Parameter finden Sie [hier](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `color` - (optional) ein Objekt mit Parametern für die **obere Farbzeile** der Karte + - `show` - (optional) zeigt/versteckt die obere Farbzeile + - `values` - (optional) ein Array gültiger HEX-Codes +- `menu` - (optional) ein Objekt mit Parametern für das **Kontextmenü der Karte**. Hier können Sie die folgenden Parameter angeben: + - `show` - (optional) aktiviert/deaktiviert das Kontextmenü der Karte + - `items` - (optional) ein Array von Objekten mit Parametern der Menüeinträge der Karten. Für jeden Eintrag können Sie folgende Parameter angeben: + - `id` - (optional) eine ID des Menüeintrags. Um die eingebauten Aktionen zu implementieren, müssen Sie folgende Werte angeben: + - ***"set-edit"*** - definiert die Aktion zum Bearbeiten des Kartennamens + - ***"delete-card"*** - definiert die Aktion zum Löschen einer Karte + - `icon` - (optional) ein Klassenname für das Icon des Menüeintrags. Hier können Sie beliebige Icons aus Icon-Fonts angeben (*mdi-delete*) + - `text` - (optional) ein Name des Menüeintrags + - `disabled` - (optional) der Status des Menüeintrags (*aktiv* oder *deaktiviert* je nach *boolean*-Wert) + - `onClick` - (optional) eine benutzerdefinierte Callback-Funktion, die folgende Argumente erhält: + - ***id*** - eine ID des aktuellen Menüeintrags + - ***item*** - ein Datenobjekt des aktuellen Menüeintrags + - ***card*** - ein Datenobjekt der Zielkarte + - `data` - (optional) ein Array von Objekten, die Untermenüpunkte des Menüs darstellen + + :::info + Sie können den Parameter `menu.items` auch auf eine benutzerdefinierte Funktion setzen, die folgende Argumente erhält: + - ***card*** - ein Datenobjekt der aktuellen Karte + - ***readonly*** - ein Objekt mit readonly [Status-Eigenschaften](api/internal/js_kanban_getstate_method.md) + + Diese Funktion erlaubt es, das Menü für jede Karte anzupassen oder für eine spezifische Karte auszublenden (indem *null* oder *false* zurückgegeben wird): + + ~~~jsx {} + items: ({ card, readonly }) => { + if (card.id === 1){ + return false; + } + + const menu = []; + + if (!readonly.delete){ + menu.push({ + id: "delete-card", icon: "wxi-delete", label: "Delete" + }); + } + + if (!readonly.edit){ + menu.push({ + id: "set-edit", icon: "wxi-edit", label: "Edit" + }); + } + return menu.length ? menu : null; + } + ~~~ + ::: + +- `users` - (optional) ein Objekt mit Parametern für ein **Benutzer**-Feld + - `show` - (optional) zeigt/versteckt die zugewiesenen Benutzer + - `values` - (erforderlich) ein Array von Objekten mit Benutzerdaten. Für jeden Benutzer können Sie folgende Parameter angeben: + - `id` - (erforderlich) eine Benutzer-**ID** + - `label` - (optional) ein Benutzername + - `avatar` - (optional) ein Pfad zum Benutzeravatar + - `maxCount` - (optional) eine maximale Anzahl der auf der Karte angezeigten Benutzer (oder ***false***) + + Sie können die Eigenschaft `maxCount` auf eine Zahl setzen, die angibt, wie viele Benutzer auf der Karte angezeigt werden sollen. + Wenn Sie `maxCount` auf `false` setzen, werden alle zugewiesenen Benutzer auf der Karte angezeigt. + + :::info + Das ***users***-Feld ist standardmäßig deaktiviert. Um es zu aktivieren, müssen Sie den Parameter `show` auf `true` setzen und die entsprechenden Benutzerdaten über den Parameter `values` bereitstellen. Um neue Benutzer über den Editor zuzuweisen, müssen Sie die entsprechende Steuerung über die [`editorShape`](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types)-Eigenschaft konfigurieren. Verwenden Sie den Typ ***select***, um einen oder mehrere Benutzer zuzuweisen, oder den Typ ***multiselect***, um mehrere Benutzer zuzuweisen. + + ~~~jsx {} + cardShape: { + users: { + show: true, + values: [ + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } + ], + maxCount: 4 // nur 4 Benutzer werden auf der Karte angezeigt + } + } + ~~~ + ::: + +- `priority` - (optional) ein Objekt mit Parametern für ein **Prioritäts**-Feld + - `show` - (optional) zeigt/versteckt die Priorität der Karte + - `values` - (optional) ein Array von Objekten mit Prioritätsdaten. Für jede Priorität können Sie folgende Parameter angeben: + - `id` - (erforderlich) eine Prioritäts-**ID** + - `label` - (optional) ein Prioritätsname + - `color` - (erforderlich) ein gültiger HEX-Code +- `votes` - (optional) spezifiziert die **Abstimmungs**-Funktionalität + - `show` - (optional) zeigt/versteckt das Abstimmungssymbol auf der Karte und im Editor + - `clickable` - (optional) macht das Abstimmungssymbol auf der Karte anklickbar. Wenn `true`, können Benutzer für die Karte über das Symbol auf der Karte abstimmen. Andernfalls können Benutzer nur über das Symbol im Editor abstimmen. +- `css` - eine Funktion, die eine CSS-Klasse zurückgibt, die bedingt auf Karten angewendet wird +- `headerFields` - (optional) ein Array von Objekten mit Daten zu **benutzerdefinierten Feldern**. Hier können Sie folgende Parameter angeben: + - `key` - (erforderlich) ein Schlüssel des benutzerdefinierten Felds. Er wird bei der Konfiguration des Editors über die [editorShape](api/config/js_kanban_editorshape_config.md)-Eigenschaft verwendet + - `label` - (optional) ein Label des benutzerdefinierten Felds + - `css` - (optional) eine CSS-Klasse des benutzerdefinierten Felds + +:::info +Sofern Sie die Karteneinstellungen nicht über die **cardShape**-Eigenschaft angeben, verwendet das Widget die Parameter aus dem **defaultCardShape**! +::: + +### Standardkonfiguration + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "Hoch" }, + { id: 2, color: "#F1B941", label: "Mittel" }, + { id: 3, color: "#77D257", label: "Niedrig" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +export const getDefaultCardMenuItems = ({ readonly }: { readonly: DataStore }) => { + const { readonly } = readonly.getState(); + const baseItems = [ + { id: "duplicate-card", icon: "wxi-content-copy", text: "Duplizieren" }, + { id: "delete-card", icon: "wxi-delete-outline", text: "Löschen" } + ]; + + if (!readonly?.select && readonly?.edit) { + return [ + { id: "set-edit", icon: "wxi-edit-outline", text: "Bearbeiten" }, + ...baseItems, + ]; + } + return baseItems; +}; + +const defaultCardShape = { + label: { show: true }, + description: { show: false }, + progress: { show: false }, + start_date: { show: false }, + end_date: { show: false }, + users: { show: false }, + confirmDeletion: { show: true }, + priority: { + show: false, + values: defaultPriorities + }, + color: { + show: false, + values: defaultColors + }, + cover: { show: false }, + attached: { show: false }, + menu: { show: true } +}; +~~~ + +### Beispiel + +~~~jsx {14-49,54} +const users = [ // Benutzerdaten + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // Prioritätsdaten der Karten + { id: 1, color: "#FF5252", label: "hoch" }, + { id: 2, color: "#FFC975", label: "mittel" }, + { id: 3, color: "#0AB169", label: "niedrig" } +]; + +const cardColors = ["#65D3B3", "#FFC975", "#58C3FE"]; + +const cardShape = { // Karteneinstellungen + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + cover: false, + comments: false, + confirmDeletion: false, + color: { + show: true, + values: cardColors + }, + users: { + show: true, + values: users, + maxCount: false + }, + priority: { + show: true, + values: cardPriority + }, + votes: { + show: true, + clickable: true + }, + css: (card) => card.type == "feature" ? "green" : "red", + headerFields: [ + { // benutzerdefiniertes Feld + key: "sprint", + css: "custom_style", + label: "Sprint" + } + ] +}; + +new kanban.Kanban("#root", { + cards, + columns, + cardShape, + // weitere Parameter +}); +~~~ + +**Änderungsprotokoll:** +- Die Parameter ***comments***, ***css*** und ***votes*** wurden in Version 1.4 hinzugefügt +- Der Parameter ***menu.items[0].label*** wurde in Version 1.4 durch ***menu.items[0].text*** ersetzt und als veraltet markiert +- Der Parameter ***menu.items[0].items*** wurde in Version 1.4 durch ***menu.items[0].data*** ersetzt und als veraltet markiert +- Die Parameter ***users.maxCount*** und ***votes.clickable*** wurden in Version 1.6 hinzugefügt +- Die Parameter ***menu.items[0].label*** und ***menu.items[0].items*** wurden in Version 1.7 entfernt +- Die Funktion ***menu.items*** wurde in Version 1.7 aktualisiert. Der Parameter **store** wurde durch **readonly** ersetzt + +**Verwandte Artikel:** [Konfiguration](guides/configuration.md#cards) + +**Verwandte Beispiele:** +- [Kanban. Swimlanes, Kommentare, Abstimmungen](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) +- [Kanban. Hervorhebung veralteter und aktiver Aufgaben](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban) +- [Kanban. Styling von Karten](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) +- [Kanban. Unbegrenzte Benutzerzuweisungen pro Aufgabe](https://snippet.dhtmlx.com/w205dvzg?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md new file mode 100644 index 0000000..7125ed8 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md @@ -0,0 +1,73 @@ +--- +sidebar_label: cardTemplate +title: cardTemplate Konfiguration +description: Sie können mehr über die cardTemplate Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# cardTemplate + +### Beschreibung + +@short: Optional. Gibt eine neue HTML-Vorlage der Karte zurück und wendet sie an. + +### Verwendung + +~~~jsx +function cardTemplate ({ cardFields, selected, dragging, cardShape }){ + return "HTML template of the card"; +}; +~~~ + +### Parameter + +Die Callback-Funktion erhält ein Objekt mit folgenden Parametern: + +- `cardFields` - das Datenobjekt der Karte +- `selected` - der Auswahlstatus der Karte +- `dragging` - der Ziehstatus der Karte +- `cardShape` - das Konfigurationsobjekt der Karte + +:::important +Wenn Sie ein Kontextmenü in die Karten-Vorlage einfügen möchten, geben Sie ein benutzerdefiniertes Icon im Template-Markup an und verwenden Sie den Ausdruck `data-menu-id=${cardFields.id}`, wie im folgenden Beispiel gezeigt. +::: + +### Beispiel + +~~~jsx {1-23,28} +const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + const { label, color, id } = cardFields; + if (selected) { + return ` +
+
+
+ +
+ Selected:${label} +
+ `; + } + return ` +
+
+
+ +
+ ${label} +
+ `; +} + +new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // other parameters +}); +~~~ + +**Änderungsprotokoll:** Die Möglichkeit, ein Kontextmenü anzuzeigen, wurde in Version v1.4 hinzugefügt. + +**Verwandte Artikel:** [Anpassung](guides/customization.md#custom-cards) + +**Verwandtes Beispiel:** [Kanban. Custom card](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md new file mode 100644 index 0000000..1b4bc3b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md @@ -0,0 +1,58 @@ +--- +sidebar_label: columnKey +title: columnKey Konfiguration +description: Sie können mehr über die columnKey-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# columnKey + +### Beschreibung + +@short: Optional. Definiert die Zugehörigkeit der Karte zur Spalte + +:::info +Um die Karten auf die Spalten zu verteilen, müssen Sie einen Schlüssel (**column** oder einen *benutzerdefinierten*) angeben und diesen im Kartendatenobjekt auf die **ID** der gewünschten Spalte setzen. Die Eigenschaft **columnKey** muss im Widget-Konfigurationsobjekt auf diesen Schlüssel gesetzt werden. +::: + +### Verwendung + +~~~jsx {} +columnKey?: string; +~~~ + +### Standardkonfiguration + +:::note +Sofern Sie keinen Spaltenschlüssel über die Eigenschaft **columnKey** registrieren, verwendet das Widget standardmäßig den Schlüssel **"column"**! In diesem Fall müssen Sie den Schlüssel **column** im Kartendatenobjekt auf die benötigte Spalten-**ID** setzen. + +~~~jsx {3} +const cards = [ + { + column: "backlog", + // weitere Daten + } +]; +~~~ +::: + +### Beispiel + +~~~jsx {4,8,15} +const cards = [ + { + label: "Backlog task", + column_custom_key: "backlog" + }, + { + label: "In progress task", + column_custom_key: "inprogress" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + columnKey: "column_custom_key", + // weitere Parameter +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md new file mode 100644 index 0000000..d15ef5e --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md @@ -0,0 +1,125 @@ +--- +sidebar_label: spalten +title: Spalten-Konfiguration +description: Sie können die Spalten-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek nachlesen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Spalten + +### Beschreibung + +@short: Optional. Ein Array von Objekten, das die Spaltendaten enthält + +### Verwendung + +~~~jsx {} +columns?: [ + { + id: string, + label?: string, + collapsed?: boolean, + limit?: number | object, + strictLimit?: boolean, + css?: string, + overlay?: any + }, + {...} // weitere Spaltendaten +]; +~~~ + +### Parameter + +Für jede Spalte können Sie die folgenden Parameter (Daten) angeben: + +- `id` - (erforderlich) eine Spalten-**ID**. Sie wird zur Verwaltung der Spalte über die entsprechenden Methoden verwendet +- `label` - (optional) eine Spaltenbeschriftung. Sie wird im Spaltenbereich angezeigt +- `collapsed` - (optional) der aktuelle Zustand der Spalte. Wenn ***true***, ist die Spalte anfangs eingeklappt. Standardwert ist ***false*** (erweiterter Zustand) +- `limit` - (optional) dieser Parameter kann einen von zwei Werttypen annehmen: + - `number` - eine Begrenzung der Kartenanzahl in der aktuellen Spalte + - `object` - ein Objekt mit Begrenzungen der Kartenanzahl für jede Zeile (Swimlane) anhand ihrer ID +- `strictLimit` - (optional) ein strenger Limit-Modus. Wenn ***true***, kann der Benutzer keine neuen Karten über die durch den **limit**-Parameter angegebene Anzahl hinaus erstellen. Standardwert ist ***false*** +- `css` - (optional) definiert CSS-Stile für eine einzelne Spalte +- `overlay` - (optional) definiert eine Überlagerungsschicht für eine einzelne Spalte. Hier können Sie eine Vorlage angeben, die eine einzelne Spalte wie folgt überdeckt: + + ~~~jsx {} + overlay: template(` +
+ Drop ist nicht erlaubt + Nur Tester können Karten in diese + Spalte verschieben +
`) + ~~~ + +:::info +Wenn Sie neue Daten für Spalten dynamisch laden möchten, können Sie die [`parse()`](../../methods/js_kanban_parse_method) Methode verwenden! +::: + +### Beispiel + +~~~jsx {1-31,34} +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true, + css: "red" + }, + { + label: "In Bearbeitung", + id: "inprogress", + collapsed: false, + limit: { + // Begrenzung der Kartenzahl für die "Feature" und "Task" Zeilen der "In Bearbeitung" Spalte + feature: 3, + task: 2 + }, + strictLimit: false + }, + { + label: "Erledigt", + id: "done", + overlay: template(` +
+ Drop ist nicht erlaubt + Nur Tester können Karten in diese + Spalte verschieben +
`) + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + // weitere Parameter +}); +~~~ + +### Benutzerdefinierte Gestaltung + +Um benutzerdefinierte Stile auf Spalten mit dem `css`-Parameter anzuwenden, fügen Sie CSS-Regeln für Ihre benutzerdefinierte Klasse hinzu. + +```css +.wx-header .wx-column.red, +.wx-column.red { + background: #FFA29C; +} +``` + +Falls die Stile nicht angewendet werden, stellen Sie sicher, dass: + +- Ihr Selektor genügend Kontext enthält (z. B. Eltern- und interne DHTMLX-Klassen) +- Falls die Eigenschaft durch einen Inline-Stil überschrieben wird, können Sie `!important` verwenden + +**Änderungsprotokoll:** Die Parameter **css** und **overlay** wurden in Version v1.4 hinzugefügt + +**Verwandte Artikel:** +- [Arbeiten mit Daten](guides/working_with_data.md) +- [updateColumn()](api/methods/js_kanban_updatecolumn_method.md) + +**Verwandte Beispiele:** +- [Kanban. Limits für Spalten und Swimlanes](https://snippet.dhtmlx.com/2blo6hx8?tag=kanban) +- [Kanban. Farbänderung der Spalte über ein benutzerdefiniertes Menü](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [Kanban. Drag & Drop für bestimmte Spalten deaktivieren](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md new file mode 100644 index 0000000..0f23c51 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md @@ -0,0 +1,216 @@ +--- +sidebar_label: columnShape +title: columnShape Konfiguration +description: Sie können die columnShape-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# columnShape + +### Beschreibung + +@short: Optional. Ein Einstellungsobjekt zur Verwaltung des Erscheinungsbilds der Spalten + +### Verwendung + +~~~jsx {} +columnShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled?: boolean, + onClick?: ({ id, item, column }) => void, + data?: array // ein Array von Untermenüpunkten + }, + {...} + ] | ({ column, columnIndex, columns, readonly }) => array | null + }, + fixedHeaders?: boolean, + css?: (column, cards) => string, + headerTemplate?: template(column => { + return "Die HTML-Vorlage des Spaltenkopfs im erweiterten Zustand"; + }), + collapsedTemplate?: template(column => { + return "Die HTML-Vorlage des Spaltenkopfs im eingeklappten Zustand"; + }), + confirmDeletion?: boolean +}; +~~~ + +### Parameter + +Um das Erscheinungsbild der Spalten zu konfigurieren, können Sie im **columnShape**-Objekt die folgenden Parameter angeben: + +- `menu` - (optional) ein Objekt mit Parametern für das Kontextmenü der Spalten. Hier können Sie folgende Parameter angeben: + - `show` - (optional) aktiviert/deaktiviert das Kontextmenü der Spalte + - `items` - (optional) ein Array von Objekten, die Parameter der Elemente des Kontextmenüs der Spalten enthalten. Für jedes Element können Sie folgende Parameter angeben: + - `id` - (optional) eine ID des Menüpunkts. Um die integrierten Aktionen zu implementieren, müssen Sie folgende Werte angeben: + - ***"add-card"*** - definiert die Aktion zum Hinzufügen einer neuen Karte + - ***"set-edit"*** - definiert die Aktion zum Bearbeiten eines Spaltennamens + - ***"move-column:left"*** - definiert die Aktion, eine Spalte nach links zu verschieben + - ***"move-column:right"*** - definiert die Aktion, eine Spalte nach rechts zu verschieben + - ***"delete-column"*** - definiert die Aktion, eine Spalte zu löschen + + - `icon` - (optional) ein Klassenname des Symbols des Menüpunkts. Hier können Sie beliebige Symbole verwenden, die zu den Icon-Fonts passen (*mdi-delete*) + - `text` - (optional) ein Name des Menüpunkts + - `disabled` - (optional) ein Zustand des Menüpunkts (*aktiv* oder *deaktiviert* abhängig vom *boolean* Wert) + - `onClick` - (optional) eine benutzerdefinierte Callback-Funktion, die folgende Argumente erhält: + - ***id*** - die ID des aktuellen Menüpunkts + - ***item*** - ein Datenobjekt des aktuellen Menüpunkts + - ***column*** - ein Datenobjekt der Zielspalte + + - `data` - (optional) ein Array von Objekten, die Untermenüpunkte repräsentieren + + :::info + Sie können den Parameter `menu.items` auch auf eine benutzerdefinierte Funktion setzen, die folgende Argumente erhält: + - ***column*** - ein Datenobjekt der aktuellen Spalte + - ***columnIndex*** - ein Index der aktuellen Spalte + - ***columns*** - ein Array von Objekten, die alle Spaltendaten enthalten + - ***readonly*** - ein Objekt von readonly [Status-Eigenschaften](api/internal/js_kanban_getstate_method.md) + + Diese Funktion ermöglicht es, das Menü für jede Spalte anzupassen oder für eine bestimmte auszublenden (indem sie *null* oder *false* zurückgibt): + + ~~~jsx {} + items: ({ column }) => { + if(column.id === "inprogress"){ + return null; + } + if (column.id === "backlog"){ + return [ + { id: "set-edit", icon: "wxi-edit", text: "Umbenennen" }, + { + id: "delete-card", + icon: "wxi-delete", + text: "Karte entfernen" + } + ]; + } + } + ~~~ + ::: + +- `fixedHeaders` - (optional) friert die Spaltenüberschriften beim vertikalen Scrollen ein (*true* standardmäßig). Scrollen muss im Kanban selbst aktiviert sein (Höhe muss begrenzt sein) +- `css` - (optional) eine Funktion, die eine CSS-Klasse zurückgibt, die bedingt auf Spalten angewendet wird +- `headerTemplate` - (optional) die HTML-Vorlage des Spaltenkopfs im erweiterten Zustand +- `collapsedTemplate` - (optional) die HTML-Vorlage des Spaltenkopfs im eingeklappten Zustand +- `confirmDeletion` - (optional) zeigt/versteckt den **Bestätigungsdialog**, der es Benutzern erlaubt, das Löschen der Spalte zu bestätigen oder abzulehnen + +### Standardkonfiguration + +~~~jsx {} +const getDefaultColumnMenuItems = ({ column, columnIndex, columns, readonly }) => [ + { id: "add-card", icon: "wxi-plus", text: "Neue Karte hinzufügen" }, + { id: "set-edit", icon: "wxi-edit", text: "Umbenennen" }, + { + id: "move-column:left", + icon: "wxi-arrow-left", + text: "Nach links verschieben", + disabled: columnIndex <= 0 + }, + { + id: "move-column:right", + icon: "wxi-arrow-right", + text: "Nach rechts verschieben", + disabled: columnIndex >= columns.length - 1 + }, + { id: "delete-column", icon: "wxi-delete", text: "Löschen" } +]; +const columnShape = { + menu: { + show: true, + items: getDefaultColumnMenuItems + }, + fixedHeaders: true, + confirmDeletion: true +}; +~~~ + +### Beispiel + +~~~jsx {1-58,64} +const columnShape = { + menu: { + show: true, + items: [ + { + id: "color", + text: "Farbe", + data: [ + { + id:"yellow", + text: "Gelb", + onClick: ({ column }) => changeColumnColor(column, "yellow") + }, + { + id:"red", + text: "Rot", + onClick: ({ column }) => changeColumnColor(column, "red") + }, + { + id:"green", + text: "Grün", + onClick: ({ column }) => changeColumnColor(column, "green") + } + ] + } + ] + }, + fixedHeaders: false, + css: (column, cards) => column.id == "inprogress" && cards.length < 5 ? "green" : "red", + headerTemplate: template(column => { + return `
+ +
+ ${ + !column.column.collapsed + ? `
+ ${escapeHTML(column.column.label)} + (${column.columnState.cardsCount}) +
` + : "" + } + ${ + !column.column.collapsed + ? `
+ +
` + : "" + }`; + }), + collapsedTemplate: template(column => { + return `
+
${escapeHTML(column.column.label)} (${ + column.columnState?.cardsCount + })
+
`; + }), + confirmDeletion: true +}; + +new kanban.Kanban("#root", { + cards, + columns, + rows, + columnShape, + // weitere Parameter +}); +~~~ + +**Änderungsprotokoll:** +- Der ***css***-Parameter wurde in Version 1.4 hinzugefügt +- Der ***menu.items[0].label***-Parameter wurde in Version 1.4 durch den ***menu.items[0].text***-Parameter ersetzt und als veraltet markiert +- Der ***menu.items[0].items***-Parameter wurde in Version 1.4 durch den ***menu.items[0].data***-Parameter ersetzt und als veraltet markiert +- Der ***fixedHeaders***-Parameter wurde in Version 1.5 hinzugefügt +- Die Parameter ***headerTemplate*** und ***collapsedTemplate*** wurden in Version 1.6 hinzugefügt +- Die Parameter ***menu.items[0].label*** und ***menu.items[0].items*** wurden in Version 1.7 entfernt +- Die Funktion ***menu.items*** wurde in Version 1.7 aktualisiert. Der **store**-Parameter wurde durch den **readonly**-Parameter ersetzt + +**Verwandte Artikel:** [Konfiguration](guides/configuration.md) + +**Verwandte Beispiele:** +- [Kanban. Ändern der Spaltenfarbe über benutzerdefiniertes Menü](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [Kanban. Fixierte Überschriften, Lazy Rendering und Spaltenscroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) +- [Kanban. Vorlage für Spaltenüberschriften](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md new file mode 100644 index 0000000..6719c59 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md @@ -0,0 +1,36 @@ +--- +sidebar_label: currentUser +title: currentUser Konfiguration +description: Sie können mehr über die currentUser Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# currentUser + +### Beschreibung + +@short: Optional. Eine ID des aktuellen Benutzers + +:::note +Die ID des aktuellen Benutzers muss mit einer der IDs übereinstimmen, die in der Eigenschaft [`cardShape.users`](api/config/js_kanban_cardshape_config.md) angegeben sind. Wenn Sie diese ID nicht angeben, sind die Kommentare nur lesbar. +::: + +### Verwendung + +~~~jsx {} +currentUser?: string | number; +~~~ + +### Beispiel + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + currentUser: 1, + // andere Parameter +}); +~~~ + +**Änderungsprotokoll:** Die Eigenschaft wurde in Version v1.4 hinzugefügt + +**Verwandtes Beispiel:** [Kanban. Swimlanes, Kommentare, Stimmen](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md new file mode 100644 index 0000000..ccd493b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md @@ -0,0 +1,62 @@ +--- +sidebar_label: editor +title: editor-Konfiguration +description: Sie können mehr über die editor-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# editor + +### Beschreibung + +@short: Optional. Ein Einstellungsobjekt zur Konfiguration des Kanban-Editors + +### Verwendung + +~~~jsx {} +editor?: { + show?: boolean, + autoSave?: boolean, + debounce?: number, + placement?: "sidebar" | "modal" +}; +~~~ + +### Parameter + +- `show` - (optional) - aktiviert/deaktiviert den Editor +- `autoSave` - (optional) aktiviert/deaktiviert den Autospeichermodus des Editors +- `debounce` - (optional) Verzögerungszeit für das automatische Speichern von Daten (funktioniert nur mit dem Parameter ***autoSave: true***) +- `placement` - (optional) gibt die Position des Editors an. Folgende Werte sind möglich: + - `"sidebar"` - zeigt den Editor als Seitenleiste an + - `"modal"` - zeigt den Editor als modales Fenster an + +### Standardkonfiguration + +~~~jsx {} +editor: { + show: true, + debounce: 100, + autoSave: true, + placement: "sidebar" +} +~~~ + +### Beispiel + +~~~jsx {4-8} +new kanban.Kanban("#root", { + columns, + cards, + editor: { + show: true + autoSave: true, + debounce: 2000, + placement: "modal" + } + // andere Parameter +}); +~~~ + +**Änderungsprotokoll:** Der Parameter `placement` wurde in Version 1.6 hinzugefügt + +**Verwandte Beispiele:** [Kanban. Öffnen des Editors in einem modalen Fenster](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md new file mode 100644 index 0000000..1e3d1b1 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md @@ -0,0 +1,44 @@ +--- +sidebar_label: editorAutoSave +title: editorAutoSave Konfiguration +description: Sie können die editorAutoSave-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek nachlesen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# + +

editorAutoSave

+ +:::danger +Ab Version 1.3 ist die Eigenschaft `editorAutoSave` **veraltet**. Um den "Autosave"-Modus zu verwalten, verwenden Sie die Eigenschaft [`editor`](api/config/js_kanban_editor_config.md)! +::: + +### Beschreibung + +@short: Optional. Aktiviert/deaktiviert den Autosave-Modus + +:::info +Mit diesem Parameter können Sie den Autosave-Modus von Kanban aktivieren oder deaktivieren. Wenn Sie die Eigenschaft **editorAutoSave** auf **false** setzen, zeigt der Editor die Schaltfläche "Speichern" an, um die bearbeiteten Daten zu speichern. +::: + +### Verwendung + +~~~jsx {} +editorAutoSave?: boolean; // (standardmäßig true) +~~~ + +### Standardkonfiguration + +~~~jsx {} +editorAutoSave: true +~~~ + +### Beispiel + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + editorAutoSave: false, // Autosave deaktivieren + // weitere Parameter +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md new file mode 100644 index 0000000..a59e1e9 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md @@ -0,0 +1,472 @@ +--- +sidebar_label: editorShape +title: editorShape Konfiguration +description: Sie können mehr über die editorShape-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# editorShape + +### Beschreibung + +@short: Optional. Ein Array von Objekten mit Einstellungen zur Verwaltung des Aussehens und der Funktionalität des Kanban-Editors + +### Verwendung + +~~~jsx {3,8,28,42,52,73,88,97,108,117,125} +editorShape?: [ + { + // allgemeine Parameter für alle Typen + type: string, + key: string, + label?: string, + + // nur für den Typ "dateRange" + key: { + start: string, + end: string + }, + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + done?: boolean, + error?: boolean, + format?: string, + months?: number, + placeholder?: string, + title?: string, + width?: string + }, + + // nur für den Typ "date" + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + error?: boolean, + format?: string, + placeholder?: string, + title?: string, + width?: string + }, + + // nur für den Typ "color" + values?: array, + config?: { + clear?: boolean, + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string + }, + + // nur für die Typen "combo", "select" und "multiselect" + values?: [ + { + id: string | number, + label: string, + avatar?: string // nur für den Typ "multiselect" + }, + {...} // weitere Optionen + ], + config?: { + clear?: boolean, // nur für die Typen "combo" und "color" + label?: string, // nur für den Typ "select" + checkboxes?: boolean, // nur für den Typ "multiselect" + // allgemeine Parameter + disabled?: boolean, + error?: boolean, + placeholder?: string, + textField?: string, + title?: string + }, + + // nur für den Typ "text" + config?: { + css?: string, + disabled?: boolean, + error?: boolean, + focus?: boolean, + icon?: string, + inputStyle?: string, + placeholder?: string, + readonly?: boolean, + select?: boolean, + title?: string, + type?: string + }, + + // nur für den Typ "textarea" + config? { + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string, + readonly?: boolean + }, + + // nur für den Typ "progress" + config?: { + disabled?: boolean, + label?: string, + max?: number, + min?: number, + step?: number, + title?: string, + width?: number + }, + + // nur für den Typ "files" + uploadURL?: string | function, + config?: { + accept?: string, + disabled?: boolean, + multiple?: boolean, + folder?: boolean, + }, + + // nur für den Typ "comments" + config?: { + format?: string, + placement?: "page" | "editor", + html?: boolean, + confirmDeletion?: boolean + }, + + // nur für den Typ "links" + config?: { + confirmDeletion?: boolean + }, + }, { /* weitere Steuerungseinstellungen */ } +]; +~~~ + +### Parameter + +Um das Erscheinungsbild und die Funktionalität des Editors zu konfigurieren, können Sie die folgenden Parameter (Felder) angeben: + +#### - Allgemeine Parameter für alle Typen + +- `type` - (erforderlich) ein Editor-Feldtyp + +:::important +Im Kanban-Editor können Sie die folgenden Feldtypen verwenden: **dateRange**, **date**, **combo**, **select**, **multiselect**, **color**, **text**, **textarea**, **progress**, **files**, **comments** und **links** +::: + +- `key` - (erforderlich) ein Schlüssel für das Editor-Feld. Hier müssen Sie den Wert verwenden, der in der [`cardShape`](api/config/js_kanban_cardshape_config.md) Eigenschaft angegeben ist. Siehe folgendes Beispiel: + +~~~js {8,17} + // Kartendarstellungseinstellungen + const cardShape = { + ...kanban.defaultCardShape, + headerFields: [ + { // benutzerdefiniertes Feld + label: "Custom field", + css: "custom_style", + key: "custom_key" + } + ] + }; + // Editor-Darstellungseinstellungen + const editorShape = [ + { + label: "Custom field", + type: "text", + key: "custom_key" + } + ]; +~~~ + +- `label` - (optional) eine Beschriftung für das Editor-Feld + +#### - Parameter für den Typ "dateRange" + +- `key` - (erforderlich) ein Objekt mit Schlüsseln für das Editor-Feld. Hier können Sie folgende Parameter angeben: + - `start` - (erforderlich) Schlüssel für das Startdatum + - `end` - (erforderlich) Schlüssel für das Enddatum + +:::important +Die Werte dieser Schlüssel werden in der [`cardShape`](api/config/js_kanban_cardshape_config.md) Eigenschaft verwendet! +::: + +- `config` - (optional) ein Konfigurationsobjekt für das Feld **"dateRange"**. Hier können Sie folgende Parameter angeben: + - `align` - (optional) legt die Ausrichtung des Popups mit Kalendern relativ zur Date Range-Steuerung fest + - `editable` - (optional) definiert, ob der Datumsauswahl-Dialog bearbeitbar ist und legt optional ein benutzerdefiniertes Format für die Datumsbearbeitung fest + - `buttons` - (optional) zeigt/versteckt die Schaltflächen Heute und Löschen im unteren Bereich des Popups mit Kalendern + - `css` - (optional) ändert die Position des Symbols in der Date Range-Steuerung + - `disabled` - (optional) definiert, ob die Date Range-Steuerung deaktiviert ist + - `done` - (optional) zeigt/versteckt die Schaltfläche Fertig in der Date Range-Steuerung + - `error` - (optional) definiert, ob die Fehlerstilierung auf die Date Range-Steuerung angewandt wird + - `format` - (optional) legt das Datumsformat der Date Range-Steuerung fest. Verfügbare Parameter finden Sie [hier](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `months` - (optional) legt die Anzahl der Kalender in der Date Range-Steuerung fest + - `placeholder` - (optional) setzt einen Platzhalter für die Date Range-Steuerung + - `title` - (optional) setzt einen Titel mit zusätzlichen Informationen zur Date Range-Steuerung + - `width` - (optional) legt die Breite des Popups mit Kalendern fest + +#### - Parameter für den Typ "date" + +- `config` - (optional) ein Konfigurationsobjekt für das Feld **"date"**. Hier können Sie folgende Parameter angeben: + - `align` - (optional) legt die Ausrichtung des Popups mit Kalendern relativ zur Date-Steuerung fest + - `editable` - (optional) definiert, ob der Datumsauswahl-Dialog bearbeitbar ist und legt optional ein benutzerdefiniertes Format für die Datumsbearbeitung fest + - `buttons` - (optional) zeigt/versteckt die Schaltflächen Heute und Löschen im unteren Bereich des Popups mit Kalendern + - `css` - (optional) ändert die Position des Symbols in der Date-Steuerung + - `disabled` - (optional) definiert, ob die Date-Steuerung deaktiviert ist + - `error` - (optional) definiert, ob die Fehlerstilierung auf die Date-Steuerung angewandt wird + - `format` - (optional) legt das Datumsformat der Date-Steuerung fest. Verfügbare Parameter finden Sie [hier](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placeholder` - (optional) setzt einen Platzhalter für die Date-Steuerung + - `title` - (optional) setzt einen Titel mit zusätzlichen Informationen zur Date-Steuerung + - `width` - (optional) legt die Breite des Popups mit Kalendern fest + +#### - Parameter für den Typ "color" + +- `values` - (optional) ein Array mit gültigen HEX-Farbwerten +- `config` - (optional) ein Konfigurationsobjekt für das Feld **"color"**. Hier können Sie folgende Parameter angeben: + - `placeholder` - (optional) setzt einen Platzhalter für die Farbsteuerung + - `clear` - (optional) zeigt/versteckt ein "Löschen"-Symbol für die Farbsteuerung + - `disabled` - (optional) definiert, ob die Farbsteuerung deaktiviert ist + - `error` - (optional) definiert, ob Fehlerstilierung auf die Farbsteuerung angewandt wird + - `title` - (optional) setzt einen Titel mit zusätzlichen Informationen zur Farbsteuerung + +#### - Parameter für die Typen "combo", "select" und "multiselect" + +- `values` - (optional) ein Array von Objekten mit den Dropdown-Optionen. Hier können Sie folgende Parameter angeben: + - `id` - (erforderlich) eine Options-ID + - `label` - (erforderlich) eine Optionsbeschriftung + - `avatar` - (optional) Pfad zum Vorschaubild der Option (nur für den Typ **"multiselect"**) + +:::important +Um eine Steuerung für die Zuweisung eines einzelnen Benutzers zu setzen, müssen Sie die Typen ***"select"*** oder ***"combo"*** verwenden! Für die Zuweisung mehrerer Benutzer verwenden Sie den Typ ***"multiselect"***. +::: + +- `config` - (optional) ein Konfigurationsobjekt für die Felder **"combo"**, **"select"** und **"multiselect"**. Hier können Sie folgende Parameter angeben: + - `clear` - (optional) fügt die Löschen-Schaltfläche in ein Combo-Eingabefeld ein (**nur für die Typen "combo" und "color"**) + - `label` - (optional) bindet Optionen an das Eingabefeld über den angegebenen Schlüssel (**nur für den Typ "select"**) + - `checkboxes` - (optional) definiert, ob Optionen Kontrollkästchen neben sich haben (**nur für den Typ "multiselect"**) + - `textField` - (optional) bindet Combo-Optionen an das Eingabefeld über den angegebenen Schlüssel (**nur für die Typen "combo" und "multiselect"**) + + - `disabled` - (optional) definiert, ob die Steuerung deaktiviert ist + - `error` - (optional) definiert, ob Fehlerstilierung auf die Steuerung angewandt wird + - `placeholder` - (optional) setzt einen Platzhalter für die Steuerung + - `title` - (optional) setzt einen Titel mit zusätzlichen Informationen zur Steuerung + +#### - Parameter für den Typ "text" + +- `config` - (optional) ein Konfigurationsobjekt für das Feld **"text"**. Hier können Sie folgende Parameter angeben: + - `css` - (optional) setzt die Position des Symbols in der Textsteuerung + - `disabled` - (optional) definiert, ob die Textsteuerung deaktiviert ist + - `error` - (optional) definiert, ob Fehlerstilierung auf die Textsteuerung angewandt wird + - `focus` - (optional) setzt den Fokus in der Textsteuerung + - `icon` - (optional) fügt ein Symbol in die Textsteuerung ein + - `inputStyle` - (optional) wendet einen benutzerdefinierten Stil auf die Textsteuerung an + - `placeholder` - (optional) setzt einen Platzhalter für die Textsteuerung + - `readonly` - (optional) definiert, ob die Textsteuerung schreibgeschützt ist + - `select` - (optional) wählt den Inhalt der Textsteuerung aus + - `title` - (optional) setzt einen Titel mit zusätzlichen Informationen zur Textsteuerung + - `type` - (optional) legt den Typ der Textsteuerung fest + +#### - Parameter für den Typ "textarea" + +- `config` - (optional) ein Konfigurationsobjekt für das Feld **"textarea"**. Hier können Sie folgende Parameter angeben: + - `disabled` - (optional) definiert, ob die Textarea-Steuerung deaktiviert ist + - `error` - (optional) definiert, ob Fehlerstilierung auf die Textarea-Steuerung angewandt wird + - `placeholder` - (optional) setzt einen Platzhalter für die Textarea-Steuerung + - `title` - (optional) setzt einen Titel mit zusätzlichen Informationen zur Textsteuerung + - `readonly` - (optional) definiert, ob die Textsteuerung schreibgeschützt ist + +#### - Parameter für den Typ "progress" + +- `config` - (optional) ein Konfigurationsobjekt für das Feld **"progress"**. Hier können Sie folgende Parameter angeben: + - `disabled` - (optional) definiert, ob die Fortschrittssteuerung deaktiviert ist + - `label` - (optional) setzt eine Beschriftung über der Fortschrittssteuerung + - `max` - (optional) legt den Maximalwert der Fortschrittssteuerung fest + - `min` - (optional) legt den Minimalwert der Fortschrittssteuerung fest + - `step` - (optional) legt den Sprung zwischen Werten der Fortschrittssteuerung fest + - `title` - (optional) setzt einen Titel mit zusätzlichen Informationen zur Fortschrittssteuerung + - `width` - (optional) legt die Breite der Fortschrittssteuerung fest + +#### - Parameter für den Typ "files" + +- `uploadURL` - (optional) eine URL für den Editor-Uploader. Details siehe unten + +
+ +Die Eigenschaft `uploadURL` kann als **String** oder **Funktion** angegeben werden. Das folgende Beispiel zeigt, wie man die Upload-URL über eine Funktion setzt: + +~~~jsx {} +uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // Token oder andere Header hier + } + }; + + return fetch(url + "/uploads", config) // URL hier + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); +} +~~~ + +wobei `rec` der einzige Parameter der Funktion ist und ein erweitertes `PointerEvent`-Objekt (nativ plus 4 eigene Eigenschaften) darstellt: + +~~~jsx {} +interface UploadEvent extends PointerEvent { + id: number; + status: "client" | "server" | "error"; // bedeutet auf Deutsch "noch nicht gesendet", "erfolgreich gesendet", "Fehler, nicht gesendet" + name: string; // der Name der Datei + file: string | Blob; // die Datei +} +~~~ + +
+ +- `config` - (optional) ein Konfigurationsobjekt für das Feld **"files"**. Hier können Sie folgende Parameter angeben: + - `accept` - (optional) ein Dateityp, der hochgeladen werden darf (***"image/\*", "video/\*", "audio/\*"*** *und andere*) + - `disabled` - (optional) aktiviert/deaktiviert das Hochladen von *Dateien* + - `multiple` - (optional) aktiviert/deaktiviert das Hochladen von *mehreren Dateien* + - `folder` - (optional) aktiviert/deaktiviert das Hochladen von *Ordnern* + +#### - Parameter für den Typ "comments" + +- `config` - (optional) ein Konfigurationsobjekt für das Feld **"comments"**. Hier können Sie folgende Parameter angeben: + - `format` - (optional) - ein Datumsformat für Kommentare. Verfügbare Formate finden Sie [hier](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placement` - (optional) - ein Ort, an dem Kommentare angezeigt werden. Diese Eigenschaft kann folgende Werte annehmen: + - `"editor"` - Kommentare werden im Editor angezeigt + - `"page"` - Kommentare werden in einem separaten Bereich angezeigt + - `html` - (optional) - aktiviert/deaktiviert die Verwendung von HTML-Markup in Kommentaren + - `confirmDeletion` - (optional) zeigt/versteckt den **Bestätigungsdialog**, der Benutzern erlaubt, das Löschen eines Kommentars zu bestätigen oder abzulehnen + +#### - Parameter für den Typ "links" + +- `config` - (optional) ein Konfigurationsobjekt für das Feld **"links"**. Hier können Sie folgende Parameter angeben: + - `confirmDeletion` - (optional) zeigt/versteckt den **Bestätigungsdialog**, der Benutzern erlaubt, das Löschen eines Links zu bestätigen oder abzulehnen + +:::info +Wenn Sie die Editor-Einstellungen nicht über die Eigenschaft `editorShape` angeben, verwendet das Widget einen Satz von Parametern namens **defaultEditorShape**! +::: + +### Standardkonfiguration + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "Hoch" }, + { id: 2, color: "#F1B941", label: "Mittel" }, + { id: 3, color: "#77D257", label: "Niedrig" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +const defaultEditorShape = [ + { + key: "label", + type: "text", + label: "Beschriftung" + }, + { + key: "description", + type: "textarea", + label: "Beschreibung" + }, + { + type: "combo", + label: "Priorität", + key: "priority", + config: { + clear: true + } + }, + { + type: "color", + label: "Farbe", + key: "color" + }, + { + type: "progress", + key: "progress", + label: "Fortschritt" + }, + { + type: "date", + key: "start_date", + label: "Startdatum" + }, + { + type: "date", + key: "end_date", + label: "Enddatum" + }, + { + type: "multiselect", + key: "users", + label: "Benutzer" + } +]; +~~~ + +### Beispiel + +~~~jsx {6-33,38} +const users = [ // Benutzerdaten + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const editorShape = [ // Editor-Einstellungen + ...kanban.defaultEditorShape, // Standard-Einstellungen einbinden + { // benutzerdefinierte Felder hinzufügen + type: "multiselect", + key: "users", + label: "Benutzer", + values: users + }, + { + type: "comments", + key: "comments", + label: "Kommentare", + config: { + format: "%M %d", + placement: "page", + html: true, + confirmDeletion: true + } + }, + { + type: "links", + key:"links", + label: "Links", + config: { + confirmDeletion: true + } + } +]; + +new kanban.Kanban("#root", { + cards, + columns, + editorShape, + // weitere Parameter +}); +~~~ + +**Änderungsprotokoll:** + +- Der Typ ***dateRange*** wurde in Version 1.3 hinzugefügt +- Die Typen ***comments*** und ***links*** für den Editor sowie der Parameter ***format*** wurden in Version 1.4 hinzugefügt +- Der Parameter ***clearButton*** wurde durch den Parameter ***clear*** ersetzt + +**Verwandte Artikel:** [Konfiguration](guides/configuration.md/#editor) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md new file mode 100644 index 0000000..cbf874b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: history +title: history Konfiguration +description: Sie können die history-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek nachlesen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# history + +### Beschreibung + +@short: Optional. Aktiviert/deaktiviert die Verwaltung der Änderungsverlaufshistorie + +:::info +Mit der Eigenschaft `history` können Sie die Verwaltung der Kanban-Historie aktivieren oder deaktivieren. Wenn Sie sie auf **false** setzen, können Sie die Historie weder über die API noch über die Steuerelemente in der Toolbar verwalten. +::: + +:::tip +Sie können auch einige Operationen in der Kanban-Historie überspringen, indem Sie den Parameter [`$meta`](api/common/js_kanban_meta_parameter.md) bei Methoden und Events verwenden! +::: + +### Verwendung + +~~~jsx {} +history?: boolean; +~~~ + +### Standardkonfiguration + +~~~jsx {} +history: true +~~~ + +### Beispiel + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + history: false, // Verwaltung der Historie deaktivieren + // weitere Parameter +}); +~~~ + +**Änderungsprotokoll:** Die Eigenschaft wurde in Version v1.3 hinzugefügt + +**Verwandte Artikel:** [`undo()`](api/methods/js_kanban_undo_method.md) und [`redo()`](api/methods/js_kanban_redo_method.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md new file mode 100644 index 0000000..f19b07f --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: links +title: links Konfiguration +description: Sie können mehr über die links Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# links + +### Beschreibung + +@short: Optional. Ein Array von Objekten, die die Link-Daten enthalten + +### Verwendung + +~~~jsx {} +links?: [ + { + id: string | number, + source: string | number, + target: string | number, + relation: "relatesTo" | "requiredFor" | "duplicate" | "parent" + }, {...} // weitere Link-Daten +]; +~~~ + +### Parameter + +Für jeden Link können Sie die folgenden Parameter (Daten) angeben: + +- `id` - (erforderlich) die ID des Links +- `source` – (erforderlich) die Karten-ID am Anfang des Links (z.B. „Aufgabe A ist erforderlich für Aufgabe B“) +- `target` – (erforderlich) die Karten-ID am Ende des Links (z.B. „Aufgabe B hängt von Aufgabe A ab“) +- `relation` - (erforderlich) der Typ des Links. Hier können Sie die folgenden Typen angeben: + - ***"relatesTo"*** - definiert eine Abhängigkeit zwischen Aufgaben, bei der die aktuelle Aufgabe an eine andere gebunden ist + - ***"requiredFor"*** - definiert eine Abhängigkeit zwischen Aufgaben, bei der eine Aufgabe die andere erfordert + - ***"duplicate"*** - definiert eine Abhängigkeit zwischen duplizierten Aufgaben + - ***"parent"*** - definiert eine Abhängigkeit zwischen übergeordneten (Master) und untergeordneten (Slave) Aufgaben + +:::info +Wenn Sie neue Daten für links dynamisch laden möchten, können Sie die [**parse()**](api/methods/js_kanban_parse_method.md) Methode verwenden! +::: + +### Beispiel + +~~~jsx {1-8,13} +const links = [ + { + id: 1, + source: 2, + target: 5, + relation: "relatesTo", + }, {...} // weitere Link-Daten +]; + +new kanban.Kanban("#root", { + columns, + cards, + links + // weitere Parameter +}); +~~~ + +**Änderungsprotokoll:** Die Eigenschaft wurde in Version 1.7 aktualisiert: + - Der Parameter **masterId** wurde durch den Parameter **source** ersetzt + - Der Parameter **slaveId** wurde durch den Parameter **target** ersetzt + +**Verwandte Artikel:** [Arbeiten mit Daten](guides/working_with_data.md) + +**Verwandte Beispiel:** [Kanban. Links zwischen Aufgaben](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md new file mode 100644 index 0000000..92c4325 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md @@ -0,0 +1,45 @@ +--- +sidebar_label: locale +title: locale-Konfiguration +description: Sie können die locale-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# locale + +### Beschreibung + +@short: Optional. Ein Objekt für eine benutzerdefinierte Kanban-Lokalisierung + +:::info +Das **locale**-Objekt muss alle Bezeichnungen von Kanban und der Toolbar mit den entsprechenden Übersetzungen enthalten. +::: + +### Verwendung + +~~~jsx {} +locale?: object; +~~~ + +### Standardkonfiguration + +Standardmäßig verwendet Kanban die [**englische**](guides/localization.md#default-locale) locale. Sie können diese auch auf eine benutzerdefinierte locale einstellen. + +:::tip +Um die aktuelle locale dynamisch zu ändern, können Sie die [**setLocale()**](api/methods/js_kanban_setlocale_method.md)-Methode von Kanban verwenden. +::: + +### Beispiel + +~~~jsx {5} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // die "cn"-locale wird initial gesetzt + // weitere Parameter +}); +~~~ + +**Verwandte Artikel:** [Lokalisierung](guides/localization.md) + +**Verwandtes Beispiel:** [Kanban. Lokalisierung](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md new file mode 100644 index 0000000..c28256b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: readonly +title: readonly Konfiguration +description: Sie können die readonly-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# readonly + +### Beschreibung + +@short: Optional. Aktiviert/deaktiviert das Bearbeiten, Hinzufügen, Auswählen und Ziehen der Karten + +### Verwendung + +~~~js {} +readonly?: boolean; +//oder +readonly?: { + edit?: boolean, + add?: boolean, + select?: boolean, + dnd?: boolean +}; +~~~ + +### Parameter + +Um den **readonly-Modus** zu konfigurieren, können Sie die **kurzen** oder **erweiterten** Parameter verwenden. + +Der **kurze** Parameter: +- `readonly` - (optional) aktiviert/deaktiviert den **readonly-Modus** des Kanban + +Die **erweiterten** Parameter: +- `readonly` - (optional) ein Objekt mit erweiterten Einstellungen. Hier können Sie folgende Parameter angeben: + - `edit` - (optional) aktiviert/deaktiviert das **Bearbeiten** der Karten + - `add` - (optional) aktiviert/deaktiviert das **Hinzufügen** neuer Karten + - `select` - (optional) aktiviert/deaktiviert das **Auswählen** der Karten + - `dnd` - (optional) aktiviert/deaktiviert das **Ziehen** der Karten + +### Standardkonfiguration + +~~~jsx {} +readonly: false // readonly-Modus ist deaktiviert +//oder +readonly: { + edit: true, // Bearbeiten ist aktiviert + add: true, // Hinzufügen ist aktiviert + select: true, // Auswählen ist aktiviert + dnd: true // Ziehen ist aktiviert +} +~~~ + +### Beispiel + +~~~jsx {4-9} +new kanban.Kanban("#root", { + cards, + columns, + readonly: { + edit: false, // Bearbeiten deaktivieren + add: true, // Hinzufügen aktivieren + select: false, // Auswählen deaktivieren + dnd: true // Ziehen aktivieren + }, + // weitere Parameter +}); +~~~ + +**Verwandtes Beispiel:** [Readonly mode](https://snippet.dhtmlx.com/b8x84yln?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md new file mode 100644 index 0000000..bb71556 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: renderType +title: renderType Konfiguration +description: Sie können mehr über die renderType-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerleitfäden und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# renderType + +### Beschreibung + +@short: Optional. Definiert eine Art der Kartenanzeige + +:::info +Diese Eigenschaft wird verwendet, wenn mit einer großen Anzahl von Karten gearbeitet wird. Wenn sie auf *"lazy"* gesetzt wird, rendert das Widget nur den sichtbaren Teil der Karten, die auf dem Board angezeigt werden. Dies kann die Leistung des Widgets erheblich verbessern. +::: + +### Verwendung + +~~~jsx {} +renderType?: "default" | "lazy"; +~~~ + +:::important +Wenn Sie die Einstellungen `renderType: "lazy"` und [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md) kombinieren, vergessen Sie nicht, eine statische Höhe für die Karten über die Eigenschaft [`cardHeight`](api/config/js_kanban_cardheight_config.md) anzugeben. Andernfalls werden die Karten nicht korrekt angezeigt. +::: + +### Standardkonfiguration + +~~~jsx {} +renderType: "default" +~~~ + +### Beispiel + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + renderType: "lazy", + // andere Parameter +}); +~~~ + +**Änderungsprotokoll:** Die Eigenschaft wurde in Version 1.2 hinzugefügt + +**Verwandte Artikel:** [Konfiguration](guides/configuration.md#cards) + +**Verwandtes Beispiel:** [Kanban. Fixierte Überschriften, Lazy Rendering und Spalten-Scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md new file mode 100644 index 0000000..194f9a6 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: rowKey +title: rowKey Konfiguration +description: Sie können mehr über die rowKey Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# rowKey + +### Beschreibung + +@short: Optional. Definiert die Zugehörigkeit der Karte zur Zeile + +:::info +Um die Karten in Zeilen (Swimlanes) zu verteilen, müssen Sie einen **benutzerdefinierten Schlüssel** angeben und ihn auf die **ID** der gewünschten Zeile im Kartendatenobjekt setzen. Die Eigenschaft **rowKey** muss in der Widget-Konfigurationsobjekt auf diesen *benutzerdefinierten Schlüssel* gesetzt werden. +::: + +### Verwendung + +~~~jsx {} +rowKey?: string; +~~~ + +### Beispiel + +~~~jsx {4,8,16} +const cards = [ + { + label: "Backlog task", + row_custom_key: "feature" + }, + { + label: "In progress task", + row_custom_key: "done" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + rowKey: "row_custom_key", + // andere Parameter +}); +~~~ + +**Verwandte Beispiel:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md new file mode 100644 index 0000000..9007341 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md @@ -0,0 +1,65 @@ +--- +sidebar_label: zeilen +title: Zeilen-Konfiguration +description: Sie können mehr über die Zeilen-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# zeilen + +### Beschreibung + +@short: Optional. Ein Array von Objekten, die die Daten der Zeilen (Swimlanes) enthalten. + +### Verwendung + +~~~jsx {} +rows?: [ + { + id: string, + label?: string, + collapsed?: boolean, + css?: string, + }, {...} // andere Zeilendaten +]; +~~~ + +:::info +Um Swimlanes zu erstellen, müssen Sie die entsprechenden Daten im Array der **rows**-Eigenschaft angeben. Sie können Swimlanes über die Benutzeroberfläche oder mit der [entsprechenden API](howtos.md#how-to-work-with-rows-swimlanes) einklappen/ausklappen, umbenennen, löschen und verschieben. +::: + +### Parameter + +Für jede Zeile (Swimlane) können Sie folgende Parameter (Daten) angeben: + +- `id` - (erforderlich) eine Zeilen-(Swimlane-)ID. Sie wird zur Verwaltung der Zeile über die entsprechenden Methoden verwendet. +- `label` - (optional) ein Bezeichner der Zeile (Swimlane). Er wird im Bereich der Zeile angezeigt. +- `collapsed` - (optional) der aktuelle Zustand der Zeile (Swimlane). Ist der Wert ***true***, ist die Zeile initial eingeklappt. Der Standardwert ist ***false*** (ausgeklappter Zustand). +- `css` - (optional) definiert CSS-Stile für eine einzelne Zeile. + +:::info +Wenn Sie neue Daten für Zeilen (Swimlanes) dynamisch laden möchten, können Sie die [**parse()**](api/methods/js_kanban_parse_method.md) Methode verwenden! +::: + +### Beispiel + +~~~jsx {1-4,9} +const rows = [ + { label: "Feature", id: "feature", collapsed: false, css: "red" }, + { label: "Task", id: "task", collapsed: true } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, // Swimlanes-Daten + // andere Parameter +}); +~~~ + +**Änderungsprotokoll:** Der Parameter ***css*** wurde in Version 1.4 hinzugefügt. + +**Verwandte Artikel:** +- [Arbeiten mit Daten](guides/working_with_data.md) +- [updateRow()](api/methods/js_kanban_updaterow_method.md) + +**Verwandte Beispiel:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md new file mode 100644 index 0000000..bd4d57c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md @@ -0,0 +1,188 @@ +--- +sidebar_label: rowShape +title: rowShape Konfiguration +description: Sie können mehr über die rowShape-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Code-Beispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# rowShape + +### Beschreibung + +@short: Optional. Ein Objekt mit Einstellungen zur Verwaltung des Erscheinungsbilds der Zeilen + +### Verwendung + +~~~jsx {} +rowShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, row }) => void, + data?: array // ein Array von Untermenüpunkten + }, {...} // weitere Elementdaten + ] | ({ row, rowIndex, rows, readonly }) => array | null + }, + css?: (row, cards) => string, + confirmDeletion?: boolean +}; +~~~ + +### Parameter + +Um das Erscheinungsbild der Zeilen zu konfigurieren, können Sie im **rowShape**-Objekt folgende Parameter angeben: + +- `menu` - (optional) ein Objekt mit Parametern für das Kontextmenü der Zeilen. Hier können Sie folgende Parameter festlegen: + - `show` - (optional) aktiviert/deaktiviert das Kontextmenü einer Zeile + - `items` - (optional) ein Array von Objekten mit Parametern der Elemente des Kontextmenüs der Zeilen. Für jedes Element können Sie folgende Parameter angeben: + - `id` - (optional) eine ID des Menüelements. Um die eingebauten Aktionen zu verwenden, müssen Sie folgende Werte angeben: + - ***"set-edit"*** - definiert die Aktion zum Bearbeiten eines Zeilennamens + - ***"move-row:up"*** - definiert die Aktion zum Verschieben einer Zeile nach oben + - ***"move-row:down"*** - definiert die Aktion zum Verschieben einer Zeile nach unten + - ***"delete-row"*** - definiert die Aktion zum Löschen einer Zeile + + - `icon` - (optional) ein Klassenname des Icons des Menüelements. Hier können Sie beliebige Icons verwenden, die zu Icon-Fonts passen (*mdi-delete*) + - `text` - (optional) ein Name des Menüelements + - `disabled` - (optional) ein Zustand des Menüelements (*aktiv* oder *deaktiviert* abhängig vom *boolean* Wert) + - `onClick` - (optional) eine benutzerdefinierte Callback-Funktion, die folgende Argumente erhält: + - ***id*** - die ID des aktuellen Menüelements + - ***item*** - ein Datenobjekt des aktuellen Menüelements + - ***row*** - ein Datenobjekt der Zielzeile + + - `data` - (optional) ein Array von Objekten, die Untermenüpunkte des Menüs repräsentieren + + :::info + Sie können den Parameter `menu.items` auch auf eine benutzerdefinierte Funktion setzen, die folgende Argumente erhält: + - ***row*** - ein Datenobjekt der aktuellen Zeile + - ***rowIndex*** - der Index der aktuellen Zeile + - ***rows*** - ein Array von Objekten mit allen Zeilendaten + - ***readonly*** - ein Objekt mit readonly [Status-Eigenschaften](api/internal/js_kanban_getstate_method.md) + + Diese Funktion ermöglicht es, das Menü für jede Zeile anzupassen oder für eine bestimmte Zeile zu verbergen (indem *null* oder *false* zurückgegeben wird): + + ~~~jsx {} + items: ({ rowIndex }) => { + if(rowIndex == 0){ + return null; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", text: "Umbenennen" }, + { + id: "custom-delete-row", + icon: "wxi-delete", + text: "Zeile entfernen" + }, + { + id: "custom-move-row:up", + icon: "wxi-arrow-up", + text: "Nach oben verschieben" + } + ]; + } + } + ~~~ + ::: + +- `css` - eine Funktion, die eine CSS-Klasse zurückgibt, die bedingt auf Zeilen angewendet wird +- `confirmDeletion` - (optional) zeigt/versteckt den **Bestätigungsdialog**, der es Nutzern ermöglicht, das Löschen einer Zeile zu bestätigen oder abzulehnen + +### Standardkonfiguration + +~~~jsx {} +const getDefaultRowMenuItems = ({ row, rowIndex, rows, readonly }) => [ + { id: "set-edit", icon: "wxi-edit", text: "Umbenennen" }, + { + id: "move-row:up", + icon: "wxi-arrow-up", + text: "Nach oben verschieben", + disabled: rowIndex <= 0 + }, + { + id: "move-row:down", + icon: "wxi-arrow-down", + text: "Nach unten verschieben", + disabled: rowIndex >= rows.length - 1 + }, + { id: "delete-row", icon: "wxi-delete", text: "Löschen" } +]; +const rowShape = { + menu: { + show: true, + items: getDefaultRowMenuItems + }, + confirmDeletion: true +}; +~~~ + +### Beispiel + +~~~jsx {10-43,48} +const changeRowColor = (row, cssClass) => board.updateRow({ + id: row.id, + row: { + css: cssClass, + collapsed: false + }, + replace: false +}); + +const rowShape = { + menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + if (rowIndex == 0){ + return false; + } else { + return [ + { + id: "color", + text: "Farbe", + data: [ + { + id:"gray", + text: "Grau", + onClick: ({ id, item, row }) => changeRowColor(row, "gray") + }, + { + id:"yellow", + text: "Gelb", + onClick: ({ id, item, row }) => changeRowColor(row, "yellow") + }, + { + id:"red", + text: "Rot", + onClick: ({ id, item, row }) => changeRowColor(row, "red") + } + ] + } + ]; + } + } + }, + css: (row, cards) => row.id == "task" && cards.length < 3 ? "green" : "red", + confirmDeletion: false +}; + +new kanban.Kanban("#root", { + cards, + rows, + rows, + rowShape, + // weitere Parameter +}); +~~~ + +**Änderungsprotokoll:** +- Der Parameter ***css*** wurde in Version 1.4 hinzugefügt +- Der Parameter ***menu.items[0].label*** wurde in Version 1.4 durch ***menu.items[0].text*** ersetzt und als veraltet markiert +- Der Parameter ***menu.items[0].items*** wurde in Version 1.4 durch ***menu.items[0].data*** ersetzt und als veraltet markiert +- Die Parameter ***menu.items[0].label*** und ***menu.items[0].items*** wurden in Version 1.7 entfernt +- Die Funktion ***menu.items*** wurde aktualisiert. Der **store**-Parameter wurde in Version 1.7 durch den **readonly**-Parameter ersetzt + +**Verwandte Artikel:** [Konfiguration](guides/configuration.md) + +**Verwandtes Beispiel:** [Kanban. Ändern der Farbe von Zeilen über ein benutzerdefiniertes Menü](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md new file mode 100644 index 0000000..b4f8b5a --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scrollType +title: scrollType Konfiguration +description: Sie können die scrollType-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# scrollType + +### Beschreibung + +@short: Optional. Definiert eine Art des Scrollens + +### Verwendung + +~~~jsx {} +scrollType?: "default" | "column"; +~~~ + +:::note +Wenn Sie die Einstellung `scrollType: "column"` verwenden, können Sie jede Spalte separat scrollen. +::: + +### Standardkonfiguration + +~~~jsx {} +scrollType: "default" +~~~ + +:::important +Wenn Sie die Einstellungen [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) und `scrollType: "default"` kombinieren, vergessen Sie nicht, eine statische Höhe für die Karten über die Eigenschaft [`cardHeight`](api/config/js_kanban_cardheight_config.md) anzugeben. Andernfalls werden die Karten nicht angezeigt. +::: + +### Beispiel + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + scrollType: "column", + // andere Parameter +}); +~~~ + +**Änderungsprotokoll:** Die Eigenschaft wurde in Version v1.2 hinzugefügt + +**Verwandte Artikel:** [Konfiguration](guides/configuration.md#cards) + +**Verwandtes Beispiel:** [Kanban. Feste Kopfzeilen, Lazy Rendering und Spaltenscroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md new file mode 100644 index 0000000..4f4cec0 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md @@ -0,0 +1,98 @@ +--- +sidebar_label: theme +title: theme Konfiguration +description: Sie können die theme-Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# theme + +### Beschreibung + +@short: Optional. Ein Theme, das auf Kanban angewendet wird + +### Verwendung + +~~~jsx {} +theme?: { + name: string, // "material" (Standard) | "willow" | "willow-dark" + fonts?: boolean +}; +~~~ + +:::important +Neben der Verwendung der Eigenschaft `theme` können Sie das benötigte Theme auch anwenden, indem Sie die entsprechenden *css*-Klassen zu den Widget-Containern hinzufügen: + +- **Material Theme** +~~~html {} + +
+ +
+~~~ + +- **Willow Theme** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark Theme** +~~~html {} + +
+ +
+~~~ + +oder binden Sie einfach das benötigte Theme von dem skins-Ordner auf der Seite ein: + +~~~html {} + +~~~ +::: + +### Parameter + +Zur Konfiguration des **theme** können Sie folgende Parameter verwenden. + +- `theme` - (optional) ein Objekt mit Theme-Einstellungen. Hier können Sie folgende Parameter angeben: + - `name` - (erforderlich) ein Theme-Name, der auf Kanban angewendet wird + - `fonts` - (optional) aktiviert/deaktiviert das Laden der Schriftarten vom CDN (wxi font) + +:::tip +Sie können auch die Themes **Willow** und **Willow-Dark** anwenden. Um das aktuelle Theme dynamisch zu ändern, können Sie die Methode [`setTheme()`](api/methods/js_kanban_settheme_method.md) verwenden. +::: + +### Standardkonfiguration + +Standardmäßig verwendet Kanban das **Material** Theme. + +~~~jsx {} +theme: { + name: "material", + fonts: true +} +~~~ + +### Beispiel + +~~~jsx {5-8} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: { + name: "willow-dark", // das "willow-dark" Theme wird initial gesetzt + fonts: false + } + // weitere Parameter +}); +~~~ + +**Änderungsprotokoll:** Die Eigenschaft wurde in Version 1.4 hinzugefügt + +**Verwandte Artikel:** [Stylisierung](guides/stylization.md) + +**Verwandtes Beispiel:** [Kanban. Ändern eines Themes über die CSS-Klasse](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md new file mode 100644 index 0000000..90d288c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: api +title: api Konfiguration +description: Sie können die (Toolbar) api Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# api + +### Beschreibung + +@short: Erforderlich. Ein Objekt mit der internen API von Kanban + +:::info +In diesem Fall wird die **interne API von Kanban** für **Steuerelemente** verwendet, die sich auf der Toolbar befinden +::: + +### Verwendung + +~~~jsx {} +api: object; +~~~ + +### Beispiel + +~~~jsx {7} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api +}); +~~~ + +**Verwandte Artikel:** [Konfiguration](guides/configuration.md#toolbar) + +**Verwandte Beispiel:** [Kanban. Benutzerdefinierte Toolbar](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md new file mode 100644 index 0000000..1f49a1c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md @@ -0,0 +1,191 @@ +--- +sidebar_label: items +title: items Konfiguration +description: Sie können die Konfiguration der (Toolbar) items in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek nachlesen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# items + +### Beschreibung + +@short: Optional. Ein Array mit Steuerelementen, die in der Toolbar des Kanban angeordnet sind. + +### Verwendung + +~~~jsx {} +items?: [ + "search" | { + // Suchparameter + type: "search", + options?: [ + { + id: string, + label: string, + searchRule?: (card, value, by) => { + return boolean + } + }, {...} + ], + resultTemplate?: template(searchResult => { + return "Die HTML-Vorlage des Suchergebnisses"; + }) + }, + "sort" | { + // Sortierparameter + type: "sort", + options?: [ + { + text: string, + by?: string, // by?: ((card: object) => any), + dir?: "asc" | "desc" + }, {...} + ] + }, + "spacer", + "undo", + "redo", + "addColumn", + "addRow", + custom_control // string oder function +]; +~~~ + +### Parameter + +Im **items**-Array können Sie folgende Parameter angeben: + +:::info +#### Um eine *Standard-Suchleiste* einzustellen, können Sie den String `"search"` angeben. +#### Um eine *benutzerdefinierte Suchleiste* einzustellen, können Sie ein Objekt mit den folgenden Parametern angeben: + +- `type` - (erforderlich) ein Steuerelementtyp (*"search"*) +- `options` - (optional) ein Array von Objekten, die die Suchparameter definieren. Für jedes Objekt (*Suchoption*) können Sie folgende Parameter spezifizieren: + - `id` - (erforderlich) ein Schlüssel des Kartenfeldes, nach dem die Karten durchsucht werden + - `label` - (erforderlich) ein Name der Option, der in einer Dropdown-Liste des Suchleisten-Selectors verwendet wird + - `searchRule` (optional) - eine benutzerdefinierte Funktion, die Suchregeln definiert. Sie erhält folgende Argumente: + - ***card*** - ein Objekt mit Kartendaten + - ***value*** - ein gesuchter Wert, der in der Suchleiste eingegeben wurde + - ***by*** - ein Schlüssel des Kartenfeldes, nach dem gesucht wird +- `resultTemplate` - (optional) eine Vorlage zur Darstellung des benutzerdefinierten Suchergebnisses + +~~~jsx +items: [ + "search", // Standard-Suchleiste + // andere Steuerelemente +] + +// oder + +items: [ + { // benutzerdefinierte Suchleiste + type: "search", + options: [ + { + id: "label", + label: "Nach Label" + }, + { + id: "start_date", + label: "Nach Datum", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + // andere Steuerelemente +] +~~~ +::: + +:::info +#### Um eine *Standard-Sortiersteuerung* einzustellen, können Sie den String `"sort"` angeben. +#### Um eine *benutzerdefinierte Sortiersteuerung* einzustellen, können Sie ein Objekt mit den folgenden Parametern angeben: + +- `type` - (erforderlich) ein Steuerelementtyp (*"sort"*) +- `options` - (optional) ein Array von Objekten, die die Sortierparameter definieren. Für jedes Objekt (*Sortieroption*) können Sie folgende Parameter angeben: + - `text` - (erforderlich) ein Name der Option, der in einer Dropdown-Liste des Sortier-Selectors verwendet wird + - `by` - (optional) ein Schlüssel des Kartenfeldes, nach dem die Karten sortiert werden. Dieser Parameter kann als *String* oder *Funktion* angegeben werden. Die Funktion muss das Kartenfeld für die Sortierung zurückgeben. + - `dir` - (optional) eine Sortierreihenfolge. Mögliche Werte sind *"asc"* und *"desc"* + +~~~jsx +items: [ + "sort", // Standard-Sortiersteuerung + // andere Steuerelemente +] +// oder +items: [ + { // benutzerdefinierte Sortiersteuerung + type: "sort", + options: [ + { + text: "Sortiere nach Label", + by: "label", + dir: "asc" + }, + { + text: "Sortiere nach Beschreibung", + by: "description", + dir: "desc" + } + ] + }, {...} // andere Steuerelemente +] +~~~ +::: + +- `"spacer"` - ein Leerraum zwischen Steuerelementen +- `"undo"` - eine Steuerung zur Verwaltung der Historie (ein Klick macht einen Schritt zurück) +- `"redo"` - eine Steuerung zur Verwaltung der Historie (ein Klick macht einen Schritt vorwärts) +- `"addColumn"` - eine Steuerung zum Hinzufügen neuer Spalten +- `"addRow"` - eine Steuerung zum Hinzufügen neuer Zeilen +- `custom_control` - (optional) benutzerdefiniertes Steuerelement. Hier können Sie benutzerdefinierte Steuerelemente sowohl als **String** als auch als **Funktion** angeben. Siehe den Abschnitt [Customization](guides/customization.md#custom-toolbar) + +### Beispiel + +~~~jsx {8-24} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { + type: "search", + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", + "sort", + "undo", + "redo", + "addColumn", + "addRow" + ] +}); +~~~ + +**Änderungsprotokoll:** + +- Die Steuerelemente *"Undo"* und *"Redo"* wurden in v1.3 hinzugefügt +- Der Parameter ***items.options[0].label*** der **sort** Steuerung wurde in v1.4 durch den Parameter ***items.options[0].text*** ersetzt +- Der Parameter ***items.searchResult*** der **"search"** Steuerung wurde in v1.6 hinzugefügt + +**Verwandte Artikel:** [Konfiguration](guides/configuration.md#toolbar) und [Anpassung](guides/customization.md#custom-toolbar) + +**Verwandte Beispiele:** +- [Kanban. Benutzerdefinierte Toolbar](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) +- [Kanban. Anpassung der Vorschläge in Suchergebnissen](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md new file mode 100644 index 0000000..bc1a8eb --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md @@ -0,0 +1,47 @@ +--- +sidebar_label: locale +title: locale Konfiguration +description: Sie können mehr über die (Toolbar) locale Konfiguration in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# locale + +### Beschreibung + +@short: Optional. Ein Objekt einer benutzerdefinierten Toolbar-Lokalisierung + +:::info +Das **locale**-Objekt muss alle Bezeichnungen von Kanban und Toolbar mit den entsprechenden Übersetzungen enthalten. +::: + +### Verwendung + +~~~jsx {} +locale?: object; +~~~ + +### Standardkonfiguration + +Standardmäßig verwendet Toolbar die [**englische**](guides/localization.md#default-locale) Lokalisierung. Sie können sie auch auf eine benutzerdefinierte Lokalisierung einstellen. + +:::tip +Um die aktuelle Lokalisierung dynamisch zu ändern, können Sie die [**setLocale()**](api/methods/toolbar_setlocale_method.md) Methode von Toolbar verwenden. +::: + +### Beispiel + +~~~jsx {8} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + locale: cn +}); +// Toolbar erstellen +new kanban.Toolbar("#toolbar", { + api: board.api, + locale: cn // die "cn" Lokalisierung auf Toolbar anwenden +}); +~~~ + +**Verwandte Artikel:** [Lokalisierung](guides/localization.md) + +**Verwandte Beispiel:** [Kanban. Lokalisierung](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md b/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md new file mode 100644 index 0000000..6c7e2d0 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md @@ -0,0 +1,82 @@ +--- +sidebar_label: theme +title: theme Konfiguration +description: Sie können in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek mehr über die (Toolbar) theme Konfiguration erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# theme + +### Beschreibung + +@short: Optional. Ein Theme, das auf die Toolbar angewendet wird + +### Verwendung + +~~~jsx {} +theme?: string; // "material" | "willow" | "willow-dark" +~~~ + +:::important +Neben der Verwendung der Eigenschaft `theme` können Sie das gewünschte Theme auch anwenden, indem Sie die entsprechenden *css*-Klassen zu den Widget-Containern hinzufügen: + +- **Material Theme** +~~~html {} + +
+ +
+~~~ + +- **Willow Theme** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark Theme** +~~~html {} + +
+ +
+~~~ + +oder binden Sie einfach das benötigte Theme von dem skins-Ordner auf der Seite ein: + +~~~html {} + +~~~ +::: + +### Standardkonfiguration + +Standardmäßig verwendet die Toolbar das **Material** Theme. Sie können es auch auf die **Willow** und **Willow-Dark** Themes einstellen. + +:::tip +Um das aktuelle Theme dynamisch zu ändern, können Sie die Methode [**setConfig()**](api/methods/toolbar_setconfig_method.md) verwenden. +::: + +### Beispiel + +~~~jsx {5,11} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: "willow-dark" // das "willow-dark" Theme wird initial gesetzt + // weitere Parameter +}); +// Toolbar erstellen +new Toolbar("#toolbar", { + api: board.api, + theme: "willow-dark", // das "willow-dark" Theme wird initial gesetzt +}); +~~~ + +**Änderungsprotokoll:** Die Eigenschaft wurde in v1.4 hinzugefügt + +**Verwandte Artikel:** [Stylisierung](guides/stylization.md) + +**Verwandtes Beispiel:** [Kanban. Ändern eines Themes über die CSS-Klasse](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md new file mode 100644 index 0000000..efe24af --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: add-card +title: add-card Ereignis +description: Sie können mehr über das add-card Ereignis in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# add-card + +### Beschreibung + +@short: Wird ausgelöst, wenn eine neue Karte hinzugefügt wird + +### Verwendung + +~~~jsx {} +"add-card": ({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object, + skipProvider?: boolean, +}) => void; +~~~ + +### Parameter + +Der Callback des **add-card** Ereignisses kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `columnId` - (erforderlich) die ID der Zielspalte +- `id` - (optional) die ID der neuen Karte +- `rowId` - (optional) die ID der Zielreihe +- `before` - (optional) die ID der Karte, vor der die neue Karte eingefügt wird +- `select` - (optional) aktiviert/deaktiviert die Auswahl der neu hinzugefügten Karte +- `card` - (optional) das Datenobjekt der neuen Karte. Die vollständige Liste der Kartenparameter finden Sie [hier](api/config/js_kanban_cards_config.md) +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Für die Behandlung der internen Ereignisse können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung zum "add-card" Ereignis +board.api.on("add-card", (obj) => { + console.log(obj.columnId); +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md new file mode 100644 index 0000000..254f5f1 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-column +title: add-column Ereignis +description: Sie können das add-column Ereignis in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# add-column + +### Beschreibung + +@short: Wird ausgelöst, wenn eine neue Spalte hinzugefügt wird + +### Verwendung + +~~~jsx {} +"add-column": ({ + id?: string | number, + column?: object, + before?: string | number, + skipProvider?: boolean, +}) => void; +~~~ + +### Parameter + +Der Callback des **add-column** Ereignisses kann ein Objekt mit den folgenden Parametern erhalten: + +- `id` - (optional) die ID der neuen Spalte +- `column` - (optional) das Datenobjekt der neuen Spalte. Die vollständige Liste der **column** Parameter finden Sie [**hier**](api/config/js_kanban_columns_config.md) +- `before` - (optional) die ID der Spalte, vor der die neue Spalte eingefügt wird +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern des Versendens der Anfrage an den Server + +:::info +Für die Behandlung der internen Ereignisse können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung auf das "add-column" Ereignis +board.api.on("add-column", (obj) => { + console.log(obj.label); +}); +~~~ + +**Änderungsprotokoll**: Die Parameter **id**, **before** und **column** wurden in Version v1.1 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md new file mode 100644 index 0000000..7d078bd --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: add-comment +title: add-comment Ereignis +description: Sie können das add-comment Ereignis in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# add-comment + +### Beschreibung + +@short: Wird ausgelöst, wenn ein neuer Kommentar hinzugefügt wird + +### Verwendung + +~~~jsx {} +"add-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **add-comment** Ereignisses kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (optional) die ID des neuen Kommentars +- `cardId` - (erforderlich) die ID der Karte, zu der der Kommentar hinzugefügt werden soll +- `comment` - (erforderlich) das Konfigurationsobjekt des neuen Kommentars. Hier können Sie folgende Parameter angeben: + - `text` - (optional) der Text des neuen Kommentars + - `date` - (optional) das Datum des neuen Kommentars + - `html` - (optional) das HTML-Markup des neuen Kommentars. Aktivieren Sie die `html`-Eigenschaft der [`editorShape`](/api/config/js_kanban_editorshape_config/#--parameter-für-den-typ-comments) Konfiguration, um das HTML-Markup anstelle des Texts anzuzeigen +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Für die Verarbeitung der internen Ereignisse können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung für das "add-comment" Ereignis +board.api.on("add-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**Änderungsprotokoll:** Das Ereignis wurde in Version v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md new file mode 100644 index 0000000..e990e3b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: add-link +title: add-link Event +description: Sie können mehr über das add-link Event in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# add-link + +### Beschreibung + +@short: Wird ausgelöst, wenn ein neuer Link hinzugefügt wird + +### Verwendung + +~~~jsx {} +"add-link": ({ + id?: string | number, + link: object, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **add-link** Events kann ein Objekt mit den folgenden Parametern erhalten: + +- `id` - (optional) die ID des neuen Links +- `link` - (erforderlich) das Datenobjekt des neuen Links. Die vollständige Liste der Link-Parameter finden Sie [hier](api/config/js_kanban_links_config.md) +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {8-10} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// Anmeldung auf das "add-link" Event +board.api.on("add-link", (obj) => { + console.log(obj.link.masterId); +}); +~~~ + +**Änderungsprotokoll:** Das Event wurde in Version v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md new file mode 100644 index 0000000..645d041 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-row +title: add-row Event +description: Sie können mehr über das add-row Event in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# add-row + +### Beschreibung + +@short: Wird ausgelöst, wenn eine neue Zeile hinzugefügt wird + +### Verwendung + +~~~jsx {} +"add-row": ({ + id?: string | number, + row?: object, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **add-row** Events kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (optional) die ID der neuen Zeile +- `row` - (optional) das Datenobjekt der neuen Zeile. Die vollständige Liste der **row**-Parameter finden Sie [**hier**](api/config/js_kanban_rows_config.md) +- `before` - (optional) die ID der Zeile, vor der die neue Zeile eingefügt wird +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zum Verarbeiten der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden. +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung für das "add-row" Event +board.api.on("add-row", (obj) => { + console.log(obj.id); +}); +~~~ + +**Änderungsprotokoll**: Die Parameter **id**, **before** und **row** wurden in Version v1.1 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md new file mode 100644 index 0000000..7d067de --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: add-vote +title: add-vote Event +description: Sie können im Handbuch der DHTMLX JavaScript Kanban-Bibliothek mehr über das add-vote Event erfahren. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# add-vote + +### Beschreibung + +@short: Wird ausgelöst, wenn ein Nutzer eine neue Stimme hinzufügt + +### Verwendung + +~~~jsx {} +"add-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **add-vote** Events kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `cardId` - (erforderlich) die ID der Karte, zu der die Stimme hinzugefügt werden soll +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Auf das "add-vote" Event abonnieren +board.api.on("add-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**Änderungsprotokoll:** Das Event wurde in v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md new file mode 100644 index 0000000..07ba4a6 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-card +title: delete-card Event +description: Sie können im Handbuch der DHTMLX JavaScript Kanban-Bibliothek mehr über das delete-card Event erfahren. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# delete-card + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Karte entfernt wird + +### Verwendung + +~~~jsx {} +"delete-card": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **delete-card** Events kann ein Objekt mit den folgenden Parametern erhalten: + +- `id` - (erforderlich) die ID der zu löschenden Karte +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Auf das "delete-card" Event abonnieren +board.api.on("delete-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md new file mode 100644 index 0000000..f81326e --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-column +title: delete-column Event +description: Sie können im Handbuch der DHTMLX JavaScript Kanban-Bibliothek mehr über das delete-column Event erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# delete-column + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Spalte entfernt wird + +### Verwendung + +~~~jsx {} +"delete-column": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **delete-column** Events kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (erforderlich) die ID der zu löschenden Spalte +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Auf das "delete-column" Event abonnieren +board.api.on("delete-column", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md new file mode 100644 index 0000000..f44c7c6 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: delete-comment +title: delete-comment Ereignis +description: Sie können mehr über das delete-comment Ereignis in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# delete-comment + +### Beschreibung + +@short: Wird ausgelöst, wenn ein Kommentar einer Karte gelöscht wird + +### Verwendung + +~~~jsx {} +"delete-comment": ({ + id?: string | number, + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **delete-comment** Ereignisses kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (optional) die ID des zu löschenden Kommentars +- `cardId` - (erforderlich) die ID der Karte, deren Kommentar gelöscht werden soll +- `skipProvider` - (optional) aktiviert/deaktiviert die Verhinderung, dass die Anfrage an den Server gesendet wird + +:::info +Für die Behandlung der internen Ereignisse können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Auf das "delete-comment" Ereignis abonnieren +board.api.on("delete-comment", (obj) => { + console.log(obj.id); +}); +~~~ + +**Änderungsprotokoll:** Das Ereignis wurde in Version v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md new file mode 100644 index 0000000..d92a13f --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md @@ -0,0 +1,48 @@ +--- +sidebar_label: delete-link +title: delete-link Event +description: Sie können mehr über das delete-link Event in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# delete-link + +### Beschreibung + +@short: Wird ausgelöst, wenn ein Link entfernt wird + +### Verwendung + +~~~jsx {} +"delete-link": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **delete-link** Events kann ein Objekt mit den folgenden Parametern erhalten: + +- `id` - (erforderlich) die ID des zu löschenden Links +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern des Sendens der Anfrage an den Server + +:::info +Zur Verarbeitung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {8-10} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// auf das "delete-link" Event abonnieren +board.api.on("delete-link", (obj) => { + console.log(obj.id); +}); +~~~ + +**Änderungsprotokoll:** Das Event wurde in Version v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md new file mode 100644 index 0000000..11df76c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-row +title: delete-row Event +description: Sie können im Handbuch der DHTMLX JavaScript Kanban-Bibliothek mehr über das delete-row Event erfahren. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# delete-row + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Zeile entfernt wird + +### Verwendung + +~~~jsx {} +"delete-row": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **delete-row** Events kann ein Objekt mit folgenden Parametern erhalten: + +- `id` - (erforderlich) die ID der zu löschenden Zeile +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern des Sendens der Anfrage an den Server + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung auf das "delete-row" Event +board.api.on("delete-row", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md new file mode 100644 index 0000000..bf8a1dd --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: delete-vote +title: delete-vote Event +description: Sie können im Dokumentationsbereich der DHTMLX JavaScript Kanban-Bibliothek mehr über das delete-vote Event erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# delete-vote + +### Beschreibung + +@short: Wird ausgelöst, wenn ein Benutzer eine Stimme von einer Karte löscht + +### Verwendung + +~~~jsx {} +"delete-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **delete-vote** Events kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `cardId` - (erforderlich) die ID der Karte, von der die Stimme gelöscht wird +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung auf das "delete-vote" Event +board.api.on("delete-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**Änderungsprotokoll:** Das Event wurde in Version v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md new file mode 100644 index 0000000..1c2b48c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: drag-card +title: drag-card Event +description: Sie können mehr über das drag-card Ereignis in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchstöbern Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# drag-card + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Karte per Drag & Drop verschoben wird + +### Verwendung + +~~~jsx {} +"drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source: array +}) => void; +~~~ + +### Parameter + +Der Callback des **drag-card** Ereignisses kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (erforderlich) die ID der gezogenen Karte +- `columnId` - (erforderlich) die ID der Spalte, in der sich die Karte aktuell befindet +- `rowId` - (optional) die ID der Zeile, in der sich die Karte aktuell befindet +- `before` - (optional) die ID einer Karte, die sich aktuell nach der gezogenen Karte in der Spalte befindet +- `source` - (optional) das Array der IDs der verschobenen Karten + +:::info +Für die Handhabung der internen Ereignisse können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Auf das "drag-card" Ereignis abonnieren +board.api.on("drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**Änderungsprotokoll:** Das Ereignis wurde in Version v1.4 hinzugefügt + +**Verwandtes Beispiel:** [Kanban. Drag & Drop für bestimmte Spalten deaktivieren](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md new file mode 100644 index 0000000..2c66aae --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: duplicate-card +title: duplicate-card Event +description: Sie können mehr über das duplicate-card Event in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# duplicate-card + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Karte dupliziert wird + +### Verwendung + +~~~jsx {} +"duplicate-card": ({ + id: string | number, + card?: object, + select?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **duplicate-card** Events kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (erforderlich) die ID der zu duplizierenden Karte +- `card` - (optional) das Datenobjekt der neuen Karte. Die vollständige Liste der Kartenparameter finden Sie [hier](api/config/js_kanban_cards_config.md) +- `select` - (optional) aktiviert/deaktiviert die Auswahl der neu hinzugefügten Karte + +:::info +Für die Handhabung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung auf das "duplicate-card" Event +board.api.on("duplicate-card", (obj) => { + console.log(obj); +}); +~~~ + +**Änderungsprotokoll:** Der Parameter `select` wurde in Version v1.5.10 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md new file mode 100644 index 0000000..78336e6 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: end-drag-card +title: end-drag-card Event +description: Sie können mehr über das end-drag-card Event in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# end-drag-card + +### Beschreibung + +@short: Wird ausgelöst, wenn das Ziehen einer Karte beendet wird + +### Verwendung + +~~~jsx {} +"end-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### Parameter + +Der Callback des **end-drag-card** Events kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (erforderlich) die ID der gezogenen Karte +- `columnId` - (erforderlich) die ID der Spalte, in der sich die Karte aktuell befindet +- `rowId` - (optional) die ID der Zeile, in der sich die Karte aktuell befindet +- `before` - (optional) die ID einer Karte, die sich aktuell nach der gezogenen Karte in der Spalte befindet +- `source` - (optional) das Array der IDs der verschobenen Karten + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung für das "end-drag-card" Event +board.api.on("end-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**Änderungsprotokoll:** Das Event wurde in Version v1.4 hinzugefügt + +**Verwandtes Beispiel:** [Kanban. Drag & Drop für bestimmte Spalten deaktivieren](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md new file mode 100644 index 0000000..aa38464 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: move-card +title: move-card Ereignis +description: Sie können mehr über das move-card Ereignis in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# move-card + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Karte verschoben wird + +### Verwendung + +~~~jsx {} +"move-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **move-card** Ereignisses kann ein Objekt mit den folgenden Parametern erhalten: + +- `id` - (erforderlich) die ID der Karte, die verschoben wird +- `columnId` - (erforderlich) die ID der Spalte, in die die Karte eingefügt wird +- `rowId` - (optional) die ID der Zeile, in die die Karte eingefügt wird +- `before` - (optional) die ID der Karte, vor der die neue Karte platziert wird +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern der Anfrage an den Server + +:::info +Zur Handhabung der internen Ereignisse können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Auf das "move-card" Ereignis abonnieren +board.api.on("move-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**Verwandtes Beispiel:** [Kanban. Drag & Drop für bestimmte Spalten deaktivieren](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md new file mode 100644 index 0000000..e2b8f2e --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: move-column +title: move-column Event +description: Sie können mehr über das move-column Event in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# move-column + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Spalte verschoben wird + +### Verwendung + +~~~jsx {} +"move-column": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **move-column** Events kann ein Objekt mit den folgenden Parametern erhalten: + +- `id` - (erforderlich) die ID der zu verschiebenden Spalte +- `before` - (optional) die ID der Spalte, vor der die verschobene Spalte platziert wird. Wenn Sie den Parameter `before` nicht angeben, wird die Spalte am Ende des Boards platziert +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Handhabung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung zum "move-column" Event +board.api.on("move-column", (obj) => { + console.log(obj); +}); +~~~ + +**Änderungsprotokoll:** Dieses Event wurde in Version v1.1 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md new file mode 100644 index 0000000..473eed9 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: move-row +title: move-row Event +description: Sie können mehr über das move-row Event in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# move-row + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Zeile verschoben wird + +### Verwendung + +~~~jsx {} +"move-row": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **move-row** Events kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (erforderlich) die ID der zu verschiebenden Zeile +- `before` - (optional) die ID der Zeile, vor der die verschobene Zeile platziert wird. Wenn der Parameter `before` nicht angegeben wird, wird die Zeile am Ende des Boards eingefügt +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Handhabung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {8-10} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// Anmeldung zum "move-row" Event +board.api.on("move-row", (obj) => { + console.log(obj); +}); +~~~ + +**Änderungsprotokoll:** Dieses Event wurde in Version v1.1 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md new file mode 100644 index 0000000..9437230 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: redo +title: redo Event +description: Sie können mehr über das redo Event in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# redo + +### Beschreibung + +@short: Wird ausgelöst, wenn die Aktion wiederholt wird, die durch die undo Aktion rückgängig gemacht wurde + +### Verwendung + +~~~jsx {} +"redo": () => void; +~~~ + +:::info +Zur Handhabung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden. +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Auf das "redo" Event abonnieren +board.api.on("redo", () => { + console.log("redo operation"); +}); +~~~ + +**Änderungsprotokoll**: Das Event wurde in Version v1.7 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md new file mode 100644 index 0000000..964b516 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll +title: scroll Event +description: Sie können mehr über das scroll Event in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# scroll + +### Beschreibung + +@short: Wird ausgelöst, wenn zu den angegebenen Elementen gescrollt wird + +### Verwendung + +~~~jsx {} +"scroll": ({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}) => void; +~~~ + +### Parameter + +Der Callback des **scroll** Events kann ein Objekt mit den folgenden Parametern erhalten: + +- `id` - (erforderlich) die ID des Ziel-Elements +- `to` - (erforderlich) der Typ des Ziel-Elements. Verfügbare Werte sind *"column"*, *"row"* und *"card"* +- `options` - (optional) das Objekt mit den Scroll-Optionen. Die vollständige Liste der Scroll-Parameter finden Sie [hier](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung zum "scroll" Event +board.api.on("scroll", (obj) => { + console.log(obj); +}); +~~~ + +**Änderungsprotokoll:** Das Event wurde in Version v1.2 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md new file mode 100644 index 0000000..d25613b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: select-card +title: select-card Event +description: Sie können mehr über das select-card Event in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# select-card + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Karte ausgewählt wird + +### Verwendung + +~~~jsx {} +"select-card": ({ + id: string | number, + groupMode?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **select-card** Events kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (erforderlich) die ID der ausgewählten Karte +- `groupMode` - (optional) Mehrfachauswahl (standardmäßig false) + +:::info +Für die Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Auf das "select-card" Event abonnieren +board.api.on("select-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md new file mode 100644 index 0000000..e38fc8c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md @@ -0,0 +1,52 @@ +--- +sidebar_label: set-edit +title: set-edit Event +description: Sie können mehr über das set-edit Event in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# set-edit + +### Beschreibung + +@short: Wird ausgelöst, wenn ein Editor umgeschaltet wird + +### Verwendung + +~~~jsx {} +"set-edit": ({ cardId: string | number, eventSource?: "select-card" } | null) => void; +~~~ + +### Parameter + +Der Callback des **set-edit** Events kann den Wert *null* oder ein Objekt mit den folgenden Parametern annehmen: + +- `cardId` - (erforderlich) die ID der Karte, die bearbeitet werden soll +- `eventSource` - (optional) die Aktion ***"select-card"***, die das ***set-edit*** Event auslöst + +:::note +Der Wert ***null*** wird verwendet, wenn der Editor geschlossen wird +::: + +:::info +Zum Umgang mit internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Bearbeitung verhindern, wenn ein Benutzer die Karte einmal anklickt +board.api.intercept("set-edit", (ev) => { + return ev?.eventSource != "select-card"; +}); +~~~ + +**Änderungsprotokoll:** + - Das Event wurde in Version 1.2 hinzugefügt + - Der Parameter ***eventSource*** wurde in Version 1.6 hinzugefügt + +**Verwandte Beispiele:** [Kanban. Öffnen des Editors durch Doppelklick auf die Aufgabe](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md new file mode 100644 index 0000000..f22fbc9 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: set-search +title: set-search Event +description: Sie können im Handbuch der DHTMLX JavaScript Kanban-Bibliothek mehr über das set-search Event erfahren. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# set-search + +### Beschreibung + +@short: Wird ausgelöst, wenn nach Karten gesucht wird + +### Verwendung + +~~~jsx {} +"set-search": ({ + value: string, + by?: string +}) => void; +~~~ + +### Parameter + +Der Callback des **set-search** Events kann ein Objekt mit den folgenden Parametern erhalten: + +- `value` - (erforderlich) der Suchwert +- `by` - (optional) das Kartenfeld, nach dem gesucht wird + +:::info +Für die Handhabung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung auf das "set-search" Event +board.api.on("set-search", (obj) => { + console.log(obj.value); +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md new file mode 100644 index 0000000..c2cf593 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: set-sort +title: set-sort Ereignis +description: Sie können im Handbuch der DHTMLX JavaScript Kanban-Bibliothek mehr über das set-sort Ereignis erfahren. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# set-sort + +### Beschreibung + +@short: Wird ausgelöst, wenn Karten sortiert werden + +### Verwendung + +~~~jsx {} +"set-sort": ( + { + by?: string | ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +) => void; +~~~ + +### Parameter + +Der Callback des **set-sort** Ereignisses kann den Wert *null* oder ein Objekt mit den folgenden Parametern annehmen: + +- `by` - (optional) das Kartenfeld für die Sortierung (*string* oder *function*) +- `dir` - (optional) die Sortierreihenfolge. Mögliche Werte sind *"asc"* und *"desc"* +- `preserve` - (optional) aktiviert/deaktiviert das Beibehalten des Sortierzustands +- `columnId` - (optional) die ID der zu sortierenden Spalte + +:::info +Zur Behandlung der internen Ereignisse können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung für das "set-sort" Ereignis +board.api.on("set-sort", (obj) => { + console.log(obj); +}); +~~~ + +**Änderungsprotokoll:** Das Ereignis wurde in Version v1.2 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md new file mode 100644 index 0000000..778f08c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: start-drag-card +title: start-drag-card Event +description: Sie können mehr über das start-drag-card Event in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# start-drag-card + +### Beschreibung + +@short: Wird ausgelöst, wenn das Ziehen einer Karte gestartet wird + +### Verwendung + +~~~jsx {} +"start-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### Parameter + +Der Callback des **start-drag-card** Events kann ein Objekt mit folgenden Parametern entgegennehmen: + +- `id` - (erforderlich) die ID der gezogenen Karte +- `columnId` - (erforderlich) die ID der Spalte, in der sich die Karte aktuell befindet +- `rowId` - (optional) die ID der Zeile, in der sich die Karte aktuell befindet +- `before` - (optional) die ID einer Karte, die sich aktuell nach der gezogenen Karte in der Spalte befindet +- `source` - (optional) das Array der IDs der verschobenen Karten + +:::info +Für die Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung für das "start-drag-card" Event +board.api.on("start-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**Änderungsprotokoll:** Das Event wurde in Version v1.4 hinzugefügt + +**Verwandtes Beispiel:** [Kanban. Drag & Drop für bestimmte Spalten deaktivieren](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md new file mode 100644 index 0000000..f1ecaf7 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: rückgängig +title: undo Event +description: Sie können mehr über das undo Event in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# undo + +### Beschreibung + +@short: Wird ausgelöst, wenn die letzte Operation im Kanban rückgängig gemacht wird + +### Verwendung + +~~~jsx {} +"undo": () => void; +~~~ + +:::info +Zur Verarbeitung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung für das "undo" Event +board.api.on("undo", () => { + console.log("Undo operation"); +}); +~~~ + +**Änderungsprotokoll**: Das Event wurde in Version v1.7 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md new file mode 100644 index 0000000..679db92 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md @@ -0,0 +1,41 @@ +--- +sidebar_label: unselect-card +title: unselect-card Event +description: Sie können im Handbuch der DHTMLX JavaScript Kanban-Bibliothek mehr über das unselect-card Event erfahren. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Beispielcode und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# unselect-card + +### Beschreibung + +@short: Wird ausgelöst, wenn eine Karte abgewählt wird + +### Verwendung + +~~~jsx {} +"unselect-card": ({ id: string | number }) => void; +~~~ + +### Parameter + +Der Callback des **unselect-card** Events kann ein Objekt mit folgendem Parameter entgegennehmen: + +- `id` - (erforderlich) die ID der Karte, die abgewählt wird + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Abonnieren des "unselect-card" Events +board.api.on("unselect-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md new file mode 100644 index 0000000..af4c6de --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-card +title: update-card Event +description: Sie können das update-card Event in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# update-card + +### Beschreibung + +@short: Wird ausgelöst, wenn Kartendaten aktualisiert werden + +### Verwendung + +~~~jsx {} +"update-card": ({ + id: string | number, + card?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **update-card** Events kann ein Objekt mit folgenden Parametern entgegennehmen: + +- `id` - (erforderlich) die ID der zu aktualisierenden Karte +- `card` - (optional) das neue Datenobjekt der Karte. Die vollständige Liste der **card**-Parameter finden Sie [**hier**](api/config/js_kanban_cards_config.md) +- `replace` - (optional) aktiviert/deaktiviert das vollständige Ersetzen der Daten + + :::note + Wenn Sie den Parameter `replace` auf *true* setzen, werden die alten Daten vollständig durch die neuen ersetzt. Andernfalls aktualisiert die Methode nur die übergebenen Werte. + ::: + +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung am "update-card" Event +board.api.on("update-card", (obj) => { + console.log(obj); +}); +~~~ + +**Änderungsprotokoll**: +- Die Parameter **id** und **card** wurden in Version v1.1 hinzugefügt +- Der Parameter **replace** wurde in Version v1.3 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md new file mode 100644 index 0000000..9509e1d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-column +title: update-column Event +description: Sie können im Handbuch der DHTMLX JavaScript Kanban-Bibliothek mehr über das update-column Event erfahren. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# update-column + +### Beschreibung + +@short: Wird ausgelöst, wenn Spaltendaten aktualisiert werden + +### Verwendung + +~~~jsx {} +"update-column": ({ + id: string | number, + column?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **update-column** Events kann ein Objekt mit den folgenden Parametern entgegennehmen: + +- `id` - (erforderlich) die ID der zu aktualisierenden Spalte +- `column` - (optional) das neue Datenobjekt der Spalte. Die vollständige Liste der **column**-Parameter finden Sie [**hier**](api/config/js_kanban_columns_config.md) +- `replace` - (optional) aktiviert/deaktiviert das vollständige Ersetzen der Daten + + :::note + Wenn Sie den Parameter `replace` auf *true* setzen, werden die alten Daten vollständig durch die neuen ersetzt. Andernfalls aktualisiert die Methode nur die übergebenen Werte. + ::: + +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Behandlung der internen Events können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden. +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung für das "update-column" Event +board.api.on("update-column", (obj) => { + console.log(obj); +}); +~~~ + +**Änderungsprotokoll**: +- Die Parameter **id** und **column** wurden in Version v1.1 hinzugefügt +- Der Parameter **replace** wurde in Version v1.3 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md new file mode 100644 index 0000000..2954c8b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md @@ -0,0 +1,62 @@ +--- +sidebar_label: update-comment +title: update-comment Ereignis +description: Sie können mehr über das update-comment Ereignis in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# update-comment + +### Beschreibung + +@short: Wird ausgelöst, wenn ein Kommentar aktualisiert wird + +### Verwendung + +~~~jsx {} +"update-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **update-comment** Ereignisses kann ein Objekt mit den folgenden Parametern erhalten: + +- `id` - (optional) die ID des zu aktualisierenden Kommentars +- `cardId` - (erforderlich) die ID der Karte, deren Kommentar aktualisiert wird +- `comment` - (erforderlich) das Konfigurationsobjekt des zu aktualisierenden Kommentars. Hier können Sie folgende Parameter angeben: + - `id` - (optional) die ID des aktualisierten Kommentars + - `cardId` - (optional) die ID der Karte, zu der der aktualisierte Kommentar hinzugefügt wird + - `text` - (optional) der Text des aktualisierten Kommentars + - `date` - (optional) das Datum des aktualisierten Kommentars + - `html` - (optional) das HTML-Markup des aktualisierten Kommentars. Aktivieren Sie die Eigenschaft `html` der [`editorShape`](/api/config/js_kanban_editorshape_config/#--parameter-für-den-typ-comments) Konfiguration, um das HTML-Markup anstelle von Text anzuzeigen +- `skipProvider` - (optional) aktiviert/deaktiviert die Verhinderung, dass die Anfrage an den Server gesendet wird + +:::info +Für die Behandlung der internen Ereignisse können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung für das "update-comment" Ereignis +board.api.on("update-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**Änderungsprotokoll:** Das Ereignis wurde in Version v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md new file mode 100644 index 0000000..79c2533 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-row +title: update-row Ereignis +description: Sie können mehr über das update-row Ereignis in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# update-row + +### Beschreibung + +@short: Wird ausgelöst, wenn Zeilendaten aktualisiert werden + +### Verwendung + +~~~jsx {} +"update-row": ({ + id: string | number, + row?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### Parameter + +Der Callback des **update-row** Ereignisses kann ein Objekt mit den folgenden Parametern erhalten: + +- `id` - (erforderlich) die ID der zu aktualisierenden Zeile +- `row` - (optional) das neue Datenobjekt der Zeile. Die vollständige Liste der **row**-Parameter finden Sie [**hier**](api/config/js_kanban_rows_config.md) +- `replace` - (optional) aktiviert/deaktiviert das vollständige Ersetzen der Daten + + :::note + Wenn Sie den Parameter `replace` auf *true* setzen, werden die alten Daten vollständig durch die neuen ersetzt. Andernfalls aktualisiert die Methode nur die übergebenen Werte. + ::: + +- `skipProvider` - (optional) aktiviert/deaktiviert das Verhindern, dass die Anfrage an den Server gesendet wird + +:::info +Zur Handhabung der internen Ereignisse können Sie die [**Event Bus Methoden**](api/overview/main_overview.md/#event-bus-methods) verwenden. +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Anmeldung für das "update-row" Ereignis +board.api.on("update-row", (obj) => { + console.log(obj); +}); +~~~ + +**Änderungsprotokoll**: +- Die Parameter **id** und **row** wurden in Version 1.1 hinzugefügt +- Der Parameter **replace** wurde in Version 1.3 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md new file mode 100644 index 0000000..89101c3 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md @@ -0,0 +1,39 @@ +--- +sidebar_label: api.detach() +title: detach-Methode +description: Sie können die detach-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# api.detach() + +## Beschreibung + +@short: Ermöglicht das Entfernen/Abtrennen eines Event-Listeners + +## Verwendung + +~~~jsx +api.detach(tag: number | string | symbol ): void; +~~~ + +## Parameter + +- `tag` - das Tag, das zur Identifizierung eines Event-Handlers bei dessen Erstellung verwendet wurde + +### Beispiel + +~~~jsx {11} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +board.api.on("move-card", ({ id, columnId }) => { + console.log("Move the card"); +}, { tag: "move" }); + +board.api.detach("move"); +~~~ + +**Änderungsprotokoll**: Die interne Methode wurde in Version v1.7 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md new file mode 100644 index 0000000..5507ba5 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md @@ -0,0 +1,50 @@ +--- +sidebar_label: api.exec() +title: exec Methode +description: Sie können mehr über die exec Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# api.exec() + +### Beschreibung + +@short: Ermöglicht das Auslösen interner Ereignisse + +### Verwendung + +~~~jsx {} +api.exec( + event: string, + config: object +): void; +~~~ + +### Parameter + +- `event` - (erforderlich) ein auszulösendes Ereignis +- `config` - (erforderlich) das Konfigurationsobjekt mit Parametern (siehe das auszulösende Ereignis) + +### Ereignisse + +:::info +Die vollständige Liste der internen Kanban-Ereignisse finden Sie [**hier**](api/overview/main_overview.md/#kanban-events) +::: + +### Beispiel + +~~~jsx {7,9-12} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Karte mit der ID 1 auswählen +board.api.exec("select-card", { id: 1 }); +// Neue Karte hinzufügen, ohne Änderungen an den Server zu senden +board.api.exec("add-card", { + columnId: "backlog", + skipProvider: true, +}); +~~~ + +**Verwandtes Beispiel:** [Kanban. Sortierung beibehalten](https://snippet.dhtmlx.com/74nyuv14?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md new file mode 100644 index 0000000..39861ce --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md @@ -0,0 +1,104 @@ +--- +sidebar_label: api.getReactiveState() +title: getReactiveState Methode +description: Sie können die Methode getReactiveState in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# api.getReactiveState() + +### Beschreibung + +@short: Gibt ein Objekt mit den reaktiven Eigenschaften von Kanban zurück + +### Verwendung + +~~~jsx {} +api.getReactiveState(): object; +~~~ + +### Rückgabewert + +Die Methode gibt ein Objekt mit den folgenden Parametern zurück: + +~~~jsx {} +{ + cardHeight: {...}, + cardShape: {...}, + cards: {...}, + columnKey: {...}, + columnShape: {...}, + columns: {...}, + currentUser: {...}, + history: {...}, + links: {...}, + readonly: {...}, + rowKey: {...}, + rowShape: {...}, + editorShape: {...}, + rows: {...}, + search: {...}, + selected: {...}, + sort: {...}, + + // entfernte Parameter + /* + fromAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + overAreaMeta: {...}, + before: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + overAreaId: {...}, + /* + + // private Parameter + /* + edit -> _edit: {...}, + layout -> layout: {...}, + cardsMap -> _cardsMap: {...}, + cardsMeta -> _cardsMeta: {...}, + areasMeta -> _areasMeta: {...}, + scroll -> _scroll: {...}, + */ +} +~~~ + +:::warning +Diese Zustands-Eigenschaften sind schreibgeschützt. Ändern Sie sie nicht, um unerwartetes Verhalten zu vermeiden! +::: + +### Beispiel + +~~~jsx {7-37} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// Reaktiven Zustand von Kanban abrufen +const state = board.api.getReactiveState(); + +// Auf Änderungen der Spalten abonnieren und das Array der Spalten ausgeben +state.columns.subscribe((data) => { + console.log(data); +}); + +// Auf Änderungen der Karten abonnieren und das Array der Karten ausgeben +state.cards.subscribe((data) => { + console.log(data); +}); + +// Auf Änderungen der Reihen abonnieren und das Array der Reihen ausgeben +state.rows.subscribe((data) => { + console.log(data); +}); + +// Auf die Kartenauswahl abonnieren und die IDs der ausgewählten Karten ausgeben +state.selected.subscribe((data) => { + console.log(data); +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.7 aktualisiert \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md new file mode 100644 index 0000000..e3bd5fe --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md @@ -0,0 +1,89 @@ +--- +sidebar_label: api.getState() +title: getState-Methode +description: Sie können die getState-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# api.getState() + +### Beschreibung + +@short: Gibt ein Objekt mit den StateStore-Eigenschaften des Kanban zurück + +### Verwendung + +~~~jsx {} +api.getState(): object; +~~~ + +### Rückgabewert + +Die Methode gibt ein Objekt mit den folgenden Parametern zurück: + +~~~jsx {} +{ + cardHeight: number | null, + cards: array, + cardShape: object, + columnKey: string, + columns: array, + columnShape: object, + currentUser: number | string | null, + links: array, + readonly: object, + rowKey: string, + rows: array, + rowShape: object, + editorShape: array, + history: object, + search: object, + selected: array, + sort: object, + + // entfernte Parameter + /* + fromAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, + before: string | number, + dragItemId: string | number, + dragItemsCoords: array, + overAreaId: string | number, + /* + + // private Parameter + /* + edit -> _edit: object, + layout -> layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object, + */ +} +~~~ + +:::warning +Diese Zustands-Eigenschaften sind schreibgeschützt. Ändern Sie sie nicht, um unerwartetes Verhalten zu vermeiden! +::: + +### Beispiel + +~~~jsx {7-12} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// den Zustand des Kanban abrufen +const state = board.api.getState(); +console.log(state.cards); // gibt die Kartendaten aus +console.log(state.columns); // gibt die Spaltendaten aus +console.log(state.rows); // gibt die Zeilendaten aus +console.log(state.cardShape); // gibt die Kartenkonfiguration aus +//... +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.7 aktualisiert \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md new file mode 100644 index 0000000..1031702 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: api.getStores() +title: getStores Methode +description: Sie können mehr über die getStores Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# api.getStores() + +### Beschreibung + +@short: Gibt ein Objekt mit den DataStore-Eigenschaften des Kanban zurück + +### Verwendung + +~~~jsx {} +api.getStores(): object; +~~~ + +### Rückgabewert + +Die Methode gibt ein Objekt mit den **DataStore** Parametern zurück: + +~~~jsx {} +{ + data: DataStore // ( Objekt mit Parametern ) +} +~~~ + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// das DataStore-Objekt des Kanban abrufen +const store = board.api.getStores(); +console.log(store); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.2 aktualisiert \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md new file mode 100644 index 0000000..cb3a209 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: api.intercept() +title: intercept-Methode +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die intercept-Methode. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# api.intercept() + +### Beschreibung + +@short: Ermöglicht das Abfangen und Verhindern von internen Ereignissen + +### Verwendung + +~~~jsx {} +api.intercept( + event: string, + callback: function, + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### Parameter + +- `event` - (erforderlich) ein auszulösendes Ereignis +- `callback` - (erforderlich) eine auszuführende Rückruffunktion (die Argumente des Rückrufs hängen vom auszulösenden Ereignis ab) +- `config` - (optional) ein Objekt, das folgende Parameter enthält: + - `intercept` - (optional) wenn Sie `intercept: true` bei der Erstellung des Ereignis-Listeners setzen, wird dieser Listener vor allen anderen ausgeführt + - `tag` - (optional) ein Aktions-Tag. Sie können den Tag-Namen verwenden, um einen Aktions-Handler über die [`detach`](api/internal/js_kanban_detach_method.md)-Methode zu entfernen + +### Ereignisse + +:::info +Die vollständige Liste der internen Kanban-Ereignisse finden Sie [**hier**](api/overview/main_overview.md/#kanban-events) +::: + +### Beispiel + +~~~jsx {7-11} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Verhindert das Verschieben von Karten in die Spalte mit der ID "done" +board.api.intercept("move-card", ({ id, columnId }) => { + if(columnId !== "done" ){ + return false; + } +}, {tag: "move"}); +~~~ + +**Änderungsprotokoll**: Die Parameter **config.tag** und **config.intercept** wurden in Version v1.7 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md new file mode 100644 index 0000000..7521f1b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: export.json() +title: json Methode +description: Sie können mehr über die json Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# export.json() + +### Beschreibung + +@short: Exportiert Kanban-Daten in eine JSON-Datei + +### Verwendung + +~~~jsx {} +export.json(): void; +~~~ + +:::info +Die Methode exportiert die Daten des Kanban in eine JSON-Datei mit folgender Struktur: +~~~jsx {} +{ + "cards": [], + "columns": [], + "rows": [] +} +~~~ +::: + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kanban-Daten als JSON exportieren +board.export.json(); // => { "cards": [...], "columns": [...], "rows": [] } +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.3 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md new file mode 100644 index 0000000..588bfc0 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md @@ -0,0 +1,51 @@ +--- +sidebar_label: api.on() +title: on Methode +description: Sie können mehr über die on Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# api.on() + +### Beschreibung + +@short: Ermöglicht das Anhängen eines Handlers an interne Ereignisse + +### Verwendung + +~~~jsx {} +api.on( + event: string, + handler: function + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### Parameter + +- `event` - (erforderlich) ein auszulösendes Ereignis +- `handler` - (erforderlich) ein anzuhängender Handler (die Argumente des Handlers hängen vom ausgelösten Ereignis ab) +- `config` - (optional) ein Objekt, das folgende Parameter enthält: + - `intercept` - (optional) wenn Sie beim Erstellen des Ereignis-Listeners `intercept: true` setzen, wird dieser Listener vor allen anderen ausgeführt + - `tag` - (optional) ein Aktions-Tag. Sie können den Tag-Namen verwenden, um einen Aktions-Handler über die [`detach`](api/internal/js_kanban_detach_method.md) Methode zu entfernen + +### Ereignisse + +:::info +Die vollständige Liste der internen Kanban-Ereignisse finden Sie [**hier**](api/overview/main_overview.md/#kanban-events) +::: + +### Beispiel + +~~~jsx {7-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// gibt die Kartendaten in der Konsole aus, wenn sie verschoben wird +board.api.on("move-card", ({ id, columnId }) => { + console.log({ id, columnId }); +}, {tag: "move"}); +~~~ + +**Änderungsprotokoll**: Die Parameter **config.tag** und **config.intercept** wurden in Version 1.7 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md new file mode 100644 index 0000000..4b448a1 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: api.setNext() +title: setNext Methode +description: Sie können die setNext Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# api.setNext() + +### Beschreibung + +@short: Ermöglicht das Hinzufügen einer Aktion in die Reihenfolge des Event Bus + +### Verwendung + +~~~jsx {} +api.setNext(next: any): void; +~~~ + +### Parameter + +- `next` - (erforderlich) die Aktion, die in die Reihenfolge des **Event Bus** aufgenommen werden soll + +### Beispiel + +~~~jsx {15} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row" + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +Sie müssen **RestDataProvider** in die Reihenfolge des **Event Bus** aufnehmen, um Operationen mit Daten (wie **Hinzufügen**, **Löschen** usw.) durchzuführen und die entsprechenden Anfragen an den Server zu senden. +::: \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md new file mode 100644 index 0000000..ff8f9d6 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md @@ -0,0 +1,57 @@ +--- +sidebar_label: addCard() +title: addCard Methode +description: In der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren Sie mehr über die addCard Methode. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# addCard() + +### Beschreibung + +@short: Fügt eine neue Karte in das Kanban-Board ein + +### Verwendung + +~~~jsx {} +addCard({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object +}): void; +~~~ + +### Parameter + +- `columnId` - (erforderlich) die ID der Zielspalte +- `id` - (optional) die ID der neuen Karte +- `rowId` - (optional) die ID der Zielreihe +- `before` - (optional) die ID der Karte, vor der die neue Karte eingefügt wird +- `select` - (optional) aktiviert/deaktiviert die Auswahl der neu hinzugefügten Karte +- `card` - (optional) das Datenobjekt der neuen Karte + +:::info +Die vollständige Liste der **card**-Parameter finden Sie [**hier**](api/config/js_kanban_cards_config.md) +::: + +### Beispiel + +~~~jsx {7-12} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// neue Karte in die Spalte "backlog" einfügen +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "Neue Karte" } +}); +~~~ + +:::tip +Sie können die ID der neuen Karte auch im **card**-Objekt angeben +::: \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md new file mode 100644 index 0000000..3003acc --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md @@ -0,0 +1,54 @@ +--- +sidebar_label: addColumn() +title: addColumn Methode +description: Sie können mehr über die addColumn Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# addColumn() + +### Beschreibung + +@short: Fügt dem Kanban eine neue Spalte hinzu + +### Verwendung + +~~~jsx {} +addColumn({ + id?: string | number, + column?: object, + before?: string | number +}): void; +~~~ + +### Parameter + +- `id` - (optional) die ID der neuen Spalte +- `column` - (optional) das Datenobjekt der neuen Spalte +- `before` - (optional) die ID der Spalte, vor der die neue Spalte eingefügt wird + +:::info +Die vollständige Liste der **column**-Parameter finden Sie [**hier**](api/config/js_kanban_columns_config.md) +::: + +### Beispiel + +~~~jsx {7-16} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// neue Spalte hinzufügen +board.addColumn({ + id: "extra_column", + column: { + label: "Extra column", + limit: 2, + strictLimit: 2, + collapsed: true + }, + before: "column_2" +}); +~~~ + +**Änderungsprotokoll**: Die Parameter **id**, **column** und **before** wurden in Version v1.1 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md new file mode 100644 index 0000000..70fd1c7 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: addComment() +title: addComment Methode +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Methode addComment. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# addComment() + +### Beschreibung + +@short: Fügt der angegebenen Karte anhand ihrer ID einen neuen Kommentar hinzu + +### Verwendung + +~~~jsx {} +addComment({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### Parameter + +- `id` - (optional) die ID des neuen Kommentars +- `cardId` - (erforderlich) die ID der Karte, der der Kommentar hinzugefügt werden soll +- `comment` - (erforderlich) das Konfigurationsobjekt des neuen Kommentars. Hier können Sie folgende Parameter angeben: + - `text` - (optional) der Text des neuen Kommentars + - `date` - (optional) das Datum des neuen Kommentars + - `html` - (optional) das HTML-Markup des neuen Kommentars. Aktivieren Sie die Eigenschaft `html` der [`editorShape`](/api/config/js_kanban_editorshape_config/#--parameter-für-den-typ-comments) Konfiguration, um das HTML-Markup anstelle von Text anzuzeigen + +### Beispiel + +~~~jsx {7-15} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// neuen Kommentar hinzufügen +board.addComment({ + id: 1, + cardId: 1, + comment: { + text: "", + date: new Date("01/07/2021"), + html: "Wichtiger Kommentar" + } +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md new file mode 100644 index 0000000..c42cc67 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: addLink() +title: addLink Methode +description: Sie können mehr über die addLink Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# addLink() + +### Beschreibung + +@short: Fügt einen neuen Link in das Kanban-Board ein + +### Verwendung + +~~~jsx {} +addLink({ + id?: string | number, + link: object +}): void; +~~~ + +### Parameter + +- `id` - (optional) die ID des neuen Links +- `link` - (erforderlich) das Datenobjekt des neuen Links. Die vollständige Liste der Link-Parameter finden Sie [hier](api/config/js_kanban_links_config.md) + +### Beispiel + +~~~jsx {7-14} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// neuen Link hinzufügen +board.addLink({ + id: 3, + link: { + source: 4, + target: 6, + relation: "relatesTo", + } +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.5 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md new file mode 100644 index 0000000..8d7ff1a --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: addRow() +title: Methode addRow +description: Sie können die Methode addRow in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# addRow() + +### Beschreibung + +@short: Fügt eine neue Zeile in das Kanban-Board ein + +### Verwendung + +~~~jsx {} +addRow({ + id?: string | number, + row?: object, + before?: string | number +}): void; +~~~ + +### Parameter + +- `id` - (optional) die ID der neuen Zeile +- `row` - (optional) das Datenobjekt der neuen Zeile +- `before` - (optional) die ID der Zeile, vor der die neue Zeile eingefügt wird + +:::info +Die vollständige Liste der **row**-Parameter finden Sie [**hier**](api/config/js_kanban_rows_config.md) +::: + +### Beispiel + +~~~jsx {8-15} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// neue Zeile hinzufügen +board.addRow({ + id: "extra_row", + row: { + label: "Extra Zeile", + collapsed: false + }, + before: "row_2" +}); +~~~ + +**Änderungsprotokoll**: Die Parameter **id**, **row** und **before** wurden in Version v1.1 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md new file mode 100644 index 0000000..194b4fb --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteCard() +title: Methode deleteCard +description: Sie können die Methode deleteCard in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# deleteCard() + +### Beschreibung + +@short: Entfernt die angegebene Karte aus dem Datenspeicher des Kanban + +### Verwendung + +~~~jsx {} +deleteCard({ id: string | number }): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der zu löschenden Karte + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Karte anhand ihrer ID entfernen +board.deleteCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md new file mode 100644 index 0000000..e80b91c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteColumn() +title: deleteColumn Methode +description: Sie können mehr über die deleteColumn Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# deleteColumn() + +### Beschreibung + +@short: Entfernt die angegebene Spalte aus dem Datenspeicher des Kanban + +### Verwendung + +~~~jsx {} +deleteColumn({ id: string | number }): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der zu löschenden Spalte + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Spalte anhand ihrer ID entfernen +board.deleteColumn({ id: "backlog" }); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md new file mode 100644 index 0000000..718503b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: deleteComment() +title: deleteComment Methode +description: Sie können die deleteComment Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# deleteComment() + +### Beschreibung + +@short: Löschen Sie einen Kommentar einer Karte anhand seiner ID + +### Verwendung + +~~~jsx {} +deleteComment({ + id: string | number, + cardId: string | number +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID des zu löschenden Kommentars +- `cardId` - (erforderlich) die ID der Karte, deren Kommentar gelöscht werden soll + +### Beispiel + +~~~jsx {7-10} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kommentar löschen +board.deleteComment({ + id: 1, + cardId: 1, +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md new file mode 100644 index 0000000..b7e3daa --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md @@ -0,0 +1,36 @@ +--- +sidebar_label: deleteLink() +title: deleteLink-Methode +description: Sie können die deleteLink-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# deleteLink() + +### Beschreibung + +@short: Entfernt den angegebenen Link aus dem Datenspeicher von Kanban + +### Verwendung + +~~~jsx {} +deleteLink({ id: string | number }): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID des zu löschenden Links + +### Beispiel + +~~~jsx {8} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + links, +}); +// Link anhand seiner ID entfernen +board.deleteLink({ id: 5 }); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.5 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md new file mode 100644 index 0000000..2273f1f --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteRow() +title: deleteRow Methode +description: Sie können mehr über die deleteRow Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# deleteRow() + +### Beschreibung + +@short: Entfernt die angegebene Zeile aus dem Datenspeicher des Kanban + +### Verwendung + +~~~jsx {} +deleteRow({ id: string | number }): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der zu löschenden Zeile + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Zeile anhand ihrer ID entfernen +board.deleteRow({ id: "feature" }); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md new file mode 100644 index 0000000..6ac6a4c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md @@ -0,0 +1,29 @@ +--- +sidebar_label: destructor() +title: destructor Methode +description: Sie können mehr über die destructor Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# destructor() + +### Beschreibung + +@short: Entfernt alle HTML-Elemente des Kanban und löst alle zugehörigen Ereignisse. + +### Verwendung + +~~~jsx {} +destructor(): void; +~~~ + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kanban entfernen +board.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md new file mode 100644 index 0000000..17597ae --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: duplicateCard() +title: duplicateCard Methode +description: Sie können die duplicateCard Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# duplicateCard() + +### Beschreibung + +@short: Dupliziert eine Karte anhand der angegebenen ID + +### Verwendung + +~~~jsx {} +duplicateCard({ + id: string | number, + card?: object, + select?: boolean +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der zu duplizierenden Karte +- `card` - (optional) das Datenobjekt der neuen Karte. Die vollständige Liste der Kartenparameter finden Sie [**hier**](api/config/js_kanban_cards_config.md) +- `select` - (optional) aktiviert/deaktiviert die Auswahl der neu hinzugefügten Karte + +### Beispiel + +~~~jsx {7-10} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Karte mit der ID 1 duplizieren +board.duplicateCard({ + id: 1, + card: { label: "Duplicated card" }, + select: true +}); +~~~ + +**Änderungsprotokoll:** Der Parameter `select` wurde in Version v1.5.10 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md new file mode 100644 index 0000000..23340d2 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getAreaCards() +title: getAreaCards Methode +description: Sie können die getAreaCards-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# getAreaCards() + +### Beschreibung + +@short: Gibt ein Array mit Datenobjekten aller Karten der angegebenen Spalte (und Zeile) zurück + +### Verwendung + +~~~jsx {} +getAreaCards( + columnId: string | number, + rowId?: string | number +): array; +~~~ + +### Parameter + +- `columnId` - (erforderlich) die ID der Zielspalte +- `rowId` - (optional) die ID der Zielzeile + +### Rückgabewert + +Die Methode gibt ein Array mit Datenobjekten der Karten zurück + +:::info +Wenn Kanban nur **Spalten** ohne **Zeilen** enthält, müssen Sie nur den Parameter ***columnId*** übergeben. In diesem Fall gibt die Methode ein Array mit Datenobjekten zurück, die alle Karten der angegebenen Spalte enthalten. + +Wenn Kanban **Spalten** und **Zeilen** enthält, können Sie sowohl die Parameter ***columnId*** als auch ***rowId*** übergeben. In diesem Fall gibt die Methode ein Array mit Datenobjekten zurück, die alle Karten der spezifischen Spalte und Zeile enthalten. +::: + +### Beispiel + +~~~jsx {8} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// ein Array mit den Datenobjekten der Karten der angegebenen Spalte und Zeile abrufen +board.getAreaCards("column_id", "row_id"); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md new file mode 100644 index 0000000..000159a --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: getCard() +title: getCard Methode +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die getCard Methode. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# getCard() + +### Beschreibung + +@short: Ruft das Datenobjekt der Karte anhand der angegebenen ID ab + +### Verwendung + +~~~jsx {} +getCard(id: string | number): object; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der Zielkarte + +### Rückgabewert + +Die Methode gibt das Datenobjekt der Karte mit der angegebenen ID zurück + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// das Datenobjekt der Karte mit der ID 1 abrufen +const card_data = board.getCard(1); +console.log(card_data); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md new file mode 100644 index 0000000..cfbfcba --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md @@ -0,0 +1,40 @@ +--- +sidebar_label: getColumnCards() +title: getColumnCards Methode +description: Sie können mehr über die getColumnCards Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# getColumnCards() + +### Beschreibung + +@short: Gibt ein Array zurück, das die Datenobjekte aller Karten in der angegebenen Spalte speichert + +### Verwendung + +~~~jsx {} +getColumnCards(id: string | number): array; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der Zielspalte + +### Rückgabewert + +Die Methode gibt ein Array zurück, das die Datenobjekte aller Karten in der angegebenen Spalte speichert + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Datenobjekte aller Karten innerhalb der Spalte mit der ID 1 abrufen +const cards_data = board.getColumnCards(1); +console.log(cards_data); +~~~ + +**Änderungsprotokoll**: Die Methode wurde in Version v1.7 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md new file mode 100644 index 0000000..9c2352d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: getSelection() +title: getSelection-Methode +description: Sie können die getSelection-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# getSelection() + +### Beschreibung + +@short: Gibt ein Array mit der ID bzw. den IDs der ausgewählten Karte(n) zurück + +### Verwendung + +~~~jsx {} +getSelection(): array; +~~~ + +### Rückgabewert + +Die Methode gibt ein Array mit der ID bzw. den IDs der ausgewählten Karte(n) zurück + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// gibt ein Array mit den IDs der ausgewählten Karten zurück +board.getSelection(); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md new file mode 100644 index 0000000..6973274 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md @@ -0,0 +1,52 @@ +--- +sidebar_label: moveCard() +title: moveCard Methode +description: Erfahren Sie mehr über die moveCard Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# moveCard() + +### Beschreibung + +@short: Verschiebt eine Karte in die angegebene Spalte (und Zeile) + +### Verwendung + +~~~jsx {} +moveCard({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der Karte, die verschoben werden soll +- `columnId` - (erforderlich) die ID der Spalte, in die die Karte eingefügt wird +- `rowId` - (optional) die ID der Zeile, in die die Karte eingefügt wird +- `before` - (optional) die ID der Karte, vor der die neue Karte platziert wird + +:::info +Wenn Sie die Eigenschaft **rowKey** in der Widget-Konfiguration angeben, ist der Parameter **rowId** der Methode **moveCard()** *erforderlich*! +::: + +### Beispiel + +~~~jsx {9-14} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// die Karte mit der ID 1 verschieben +// das Element wird in die Spalte "inprogress" und die Zeile "feature" +// vor der Karte mit der ID 8 eingefügt +board.moveCard({ + id: 1, + columnId: "inprogress", + rowId: "feature", + before: 8 +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md new file mode 100644 index 0000000..b692c10 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: moveColumn() +title: moveColumn Methode +description: Sie können die moveColumn Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# moveColumn() + +### Beschreibung + +@short: Verschiebt eine Spalte an eine neue Position + +### Verwendung + +~~~jsx {} +moveColumn({ + id: string | number, + before?: string | number +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der zu verschiebenden Spalte +- `before` - (optional) die ID der Spalte, vor der die verschobene Spalte platziert wird. Wenn Sie den Parameter `before` nicht angeben, wird die Spalte am Ende des Boards eingefügt + +### Beispiel + +~~~jsx {7-10} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Verschiebt die "backlog"-Spalte und platziert sie vor der "done"-Spalte +board.moveColumn({ + id: "backlog", + before: "done" +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.1 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md new file mode 100644 index 0000000..1820282 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: moveRow() +title: moveRow Methode +description: Sie können mehr über die moveRow Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# moveRow() + +### Beschreibung + +@short: Verschiebt eine Zeile an eine neue Position + +### Verwendung + +~~~jsx {} +moveRow({ + id: string | number, + before?: string | number +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der zu verschiebenden Zeile +- `before` - (optional) die ID der Zeile, vor der die verschobene Zeile platziert wird. Wenn Sie den Parameter `before` nicht angeben, wird die Zeile am Ende des Boards eingefügt. + +### Beispiel + +~~~jsx {8-11} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + row +}); +// Verschiebt die "task" Swimlane und platziert sie vor (über) der "feature" Swimlane +board.moveRow({ + id: "task", + before: "feature" +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.1 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md new file mode 100644 index 0000000..cbe1fcd --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md @@ -0,0 +1,47 @@ +--- +sidebar_label: parse() +title: parse Methode +description: Sie können die parse-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# parse() + +### Beschreibung + +@short: Parst Daten in Kanban + +### Verwendung + +~~~jsx {} +parse({ + columns?: array, + rows?: array, + cards?: array, + links?: array +}): void; +~~~ + +### Parameter + +- [`columns`](api/config/js_kanban_columns_config.md) - (optional) das Array von Objekten mit den Spalten-Daten +- [`rows`](api/config/js_kanban_rows_config.md) - (optional) das Array von Objekten mit den Zeilen-Daten +- [`cards`](api/config/js_kanban_cards_config.md) - (optional) das Array von Objekten mit den Karten-Daten +- [`links`](api/config/js_kanban_links_config.md) - (optional) das Array von Objekten mit den Verknüpfungs-Daten + +### Beispiel + +~~~jsx {4-9} +// Kanban erstellen +const board = new kanban.Kanban("#root", {}); +// Daten in Kanban parsen +board.parse({ + columns, + cards, + rows, + links +}); +~~~ + +**Änderungsprotokoll:** Ab Version v1.1 müssen Sie die Anfangsdaten im Konstruktor nicht mehr zurücksetzen, bevor Sie neue Daten parsen + +**Verwandte Artikel:** [Arbeiten mit Daten](guides/working_with_data.md#loading-data-from-local-source) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md new file mode 100644 index 0000000..95fdb21 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: redo() +title: redo-Methode +description: Sie können die redo-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# redo() + +### Beschreibung + +@short: Wiederholt die Aktion, die durch die Undo-Aktion rückgängig gemacht wurde. + +:::info +Die `redo()`-Methode funktioniert nur mit der [`history: true`](api/config/js_kanban_history_config.md) Konfiguration! +::: + +### Verwendung + +~~~jsx {} +redo(): void; +~~~ + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// macht einen Schritt vorwärts in der Historie des Kanban +board.redo(); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.3 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md new file mode 100644 index 0000000..f4ae666 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll() +title: scroll Methode +description: Sie können die scroll Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# scroll() + +### Beschreibung + +@short: Scrollt das Kanban auf das angegebene Element + +### Verwendung + +~~~jsx {} +scroll({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID des Ziel-Elements +- `to` - (erforderlich) der Typ des Ziel-Elements. Verfügbare Werte sind "column", "row" und "card" +- `options` - (optional) das Objekt mit den Scroll-Optionen. Die vollständige Liste der Scroll-Parameter finden Sie [hier](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +### Beispiel + +~~~jsx {7-15} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Scrolle das Kanban zur Karte mit der ID 246 +board.scroll({ + id: 246, + to: "card", + options: { + behavior: "smooth", + block: "end", + inline: "nearest" + } +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.2 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md new file mode 100644 index 0000000..65e9a0b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: selectCard() +title: selectCard Methode +description: Sie können die selectCard Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# selectCard() + +### Beschreibung + +@short: Wählt eine Karte anhand der angegebenen ID aus + +### Verwendung + +~~~jsx {} +selectCard({ + id: string | number, + groupMode?: boolean +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der auszuwählenden Karte +- `groupMode` - (optional) aktiviert/deaktiviert die Mehrfachauswahl von Karten (**false** standardmäßig) + +:::info +Wenn Sie den Parameter **groupMode** auf **true** setzen, setzt die Methode **selectCard()** die Auswahl der anderen Elemente nicht zurück +::: + +### Beispiel + +~~~jsx {7-10} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Karte mit der ID 1 auswählen +board.selectCard({ + id: 1, + groupMode: true +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md new file mode 100644 index 0000000..c90d260 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: serialize() +title: serialize Methode +description: Sie können mehr über die serialize Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# serialize() + +### Beschreibung + +@short: Serialisiert die Kanban-Daten in JSON + +### Verwendung + +~~~jsx {} +serialize(): object; +~~~ + +### Rückgabewert + +Die Methode gibt das Objekt mit den Kanban-Daten zurück + +~~~jsx {} +{ + cards: [{...}, {...}, ...], + rows: [{...}, {...}, ...], + columns: [{...}, {...}, ...], + links: [{...}, {...}, ...] +} +~~~ + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Das Objekt mit den Kanban-Daten abrufen +board.serialize(); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md new file mode 100644 index 0000000..eca43be --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: setConfig() +title: setConfig Methode +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die setConfig Methode. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# setConfig() + +### Beschreibung + +@short: Setzt neue Konfigurationsparameter für das Kanban + +### Verwendung + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### Parameter + +- `config` - (erforderlich) das Objekt mit der Kanban-Konfiguration. Eine vollständige Liste der Eigenschaften finden Sie [hier](api/overview/main_overview.md#kanban-properties) + +:::tip +Mit dieser Methode können Sie das Kanban-Widget konfigurieren sowie Daten laden. Die Methode ändert nicht die Historie (eine Änderung der Historie ist überhaupt nicht möglich). +::: + +### Beispiel + +~~~jsx {10-20,22-23} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +// Toolbar erstellen +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + +// neue Konfigurationsparameter für das Kanban angeben +board.setConfig({ + columnKey: "stage", + rowKey: "type", + cardShape, + editorShape, + editor: { + autoSave: false + }, + /* weitere Parameter */ +}); + +// neue Konfigurationsparameter für die Toolbar angeben +toolbar.setConfig({ items: ["search", "spacer", "sort"] }); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md new file mode 100644 index 0000000..8ad77fe --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setEdit() +title: setEdit Methode +description: Sie können mehr über die setEdit Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# setEdit() + +### Beschreibung + +@short: Schaltet einen Editor im Kanban um + +### Verwendung + +~~~jsx {} +setEdit({ cardId: string | number } | null): void; +~~~ + +### Parameter + +Die Methode kann einen *null*-Wert oder ein Objekt mit folgendem Parameter annehmen: + +- `cardId` - (erforderlich) die ID der zu bearbeitenden Karte + +:::note +Um einen Editor zu schließen, rufen Sie die **setEdit()** Methode mit dem Wert ***null*** auf +::: + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Editor für die Karte anhand ihrer ID öffnen +board.setEdit({ cardId: 1 }); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.2 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md new file mode 100644 index 0000000..0c6e797 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: setLocale() +title: setLocale Methode +description: Sie können mehr über die setLocale Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# setLocale() + +### Beschreibung + +@short: Wendet eine neue Locale auf Kanban an + +### Verwendung + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### Parameter + +- `null` - (optional) setzt die Locale auf die Standard-Locale (*Englisch*) zurück +- `locale` - (optional) das Objekt mit den Daten der neuen Locale, die angewendet werden soll + +:::info +Verwenden Sie die Methode `setLocale()`, um ausschließlich eine neue Locale auf Kanban anzuwenden. Um Kanban auf die Standard-Locale zurückzusetzen, rufen Sie die Methode `setLocale()` ohne Argumente (oder mit dem Wert *null*) auf. Verwenden Sie die Methode [`toolbar.setLocale()`](api/methods/toolbar_setlocale_method.md), um ausschließlich eine neue Locale auf die Toolbar anzuwenden. +::: + +### Beispiel + +~~~jsx {7,9} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, +}); +// wendet die Locale "de" auf Kanban an +board.setLocale(kanban.locales["de"]); +// wendet die Standard-Locale auf Kanban an +board.setLocale(); // oder board.setLocale(null); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.2 aktualisiert + +**Verwandte Artikel:** [Lokalisierung](guides/localization.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md new file mode 100644 index 0000000..a24ba3a --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setSearch() +title: setSearch Methode +description: Sie können mehr über die setSearch Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# setSearch() + +### Beschreibung + +@short: Sucht nach Karten anhand der angegebenen Parameter + +### Verwendung + +~~~jsx {} +setSearch({ + value: string, + by?: string +}): void; +~~~ + +:::info +Mit dieser Methode können Sie nach den benötigten Karten anhand der angegebenen Parameter suchen. Wenn Sie die **setSearch()** Methode ohne Parameter aufrufen, wird die Suchleiste und die Hervorhebung der Karten gelöscht. +::: + +### Parameter + +- `value` - (erforderlich) der Suchwert +- `by` - (optional) das Kartenfeld, nach dem gesucht wird + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Hervorhebung der Karten, die den Parametern entsprechen +board.setSearch({ value: "Integration", by: "label" }); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md new file mode 100644 index 0000000..77e6039 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: setSort() +title: setSort Methode +description: Sie können die setSort Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# setSort() + +### Beschreibung + +@short: Sortiert Karten nach den angegebenen Parametern + +### Verwendung + +~~~jsx {} +setSort( + { + by?: string | function, // by?: ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +): void; +~~~ + +### Parameter + +Die Methode kann ein Objekt mit Sortierparametern oder den Wert *null* annehmen. Im Objekt können Sie folgende Parameter angeben: + +- `by` - (optional) das Kartenfeld, nach dem sortiert werden soll. Dieser Parameter kann als *string* oder *function* angegeben werden. Die Funktion muss das Kartenfeld zurückgeben, nach dem sortiert werden soll +- `dir` - (optional) die Sortierreihenfolge. Mögliche Werte sind *"asc"* und *"desc"* +- `columnId` - (optional) die ID der zu sortierenden Spalte +- `preserve` - (optional) aktiviert/deaktiviert das Beibehalten des Sortierzustands (standardmäßig *false*) + +:::info +Wenn der **preserve**-Parameter auf *false* gesetzt ist, wird die Sortierung einmalig angewendet. Das bedeutet, dass nach dem Hinzufügen oder Verschieben von Karten der Sortierzustand nicht beibehalten wird (die Reihenfolge ändert sich). Andernfalls bleibt der Sortierzustand auch nach dem Hinzufügen oder Verschieben von Karten erhalten. Um das Beibehalten zurückzusetzen, rufen Sie die **setSort()** Methode mit dem Parameter ***null*** auf. +::: + +### Beispiel + +~~~jsx {7-12} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// sortiere die Karten aufsteigend nach dem Parameter "label" +board.setSort({ + by: (obj) => obj.label, // oder by: "label" + dir: "asc", + columnId: "backlog", + preserve: false +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.2 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md new file mode 100644 index 0000000..941b132 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: setTheme() +title: setTheme Methode +description: Sie können die setTheme-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# setTheme() + +### Beschreibung + +@short: Wendet dynamisch ein neues Theme auf Kanban an (mit Reinitialisierung) + +### Verwendung + +~~~jsx {} +setTheme({ + name?: string, // "material" (Standard) | "willow" | "willow-dark" + fonts?: boolean +}): void; +~~~ + +### Parameter + +- `name` - (optional) ein Theme-Name, der auf Kanban angewendet werden soll. Es gibt 3 verfügbare Themes: + - "material" (*Standard*) + - "willow" + - "willow-dark" +- `fonts` - (optional) aktiviert/deaktiviert das Laden von Schriftarten vom CDN (wxi font) + +:::tip +Um das Anfangs-Theme festzulegen, können Sie die [`theme`](api/config/js_kanban_theme_config.md) Eigenschaft verwenden. +::: + +### Beispiel + +~~~jsx {6} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + // Anfangskonfigurationsparameter +}); +// das "willow"-Theme setzen +board.setTheme({ name: "willow", font: false }); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.6 hinzugefügt + +**Verwandte Artikel:** [Stilisierung](guides/stylization.md) + +**Verwandte Beispiel:** [Kanban. Ändern eines Themes über die CSS-Klasse](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md new file mode 100644 index 0000000..944976a --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: undo() +title: undo Methode +description: Sie können die undo-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek nachlesen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# undo() + +### Beschreibung + +@short: Macht die letzte Operation im Kanban rückgängig + +:::info +Die `undo()` Methode funktioniert nur mit der [`history: true`](api/config/js_kanban_history_config.md) Konfiguration! +::: + +### Verwendung + +~~~jsx {} +undo(): void; +~~~ + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// macht einen Schritt zurück in der Historie des Kanban +board.undo(); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.3 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md new file mode 100644 index 0000000..37a673b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md @@ -0,0 +1,37 @@ +--- +sidebar_label: unselectCard() +title: Methode unselectCard +description: Sie können die Methode unselectCard in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# unselectCard() + +### Beschreibung + +@short: Hebt die Auswahl von Karte(n) anhand ihrer ID auf + +### Verwendung + +~~~jsx {} +unselectCard({ id: string | number }): void; +~~~ + +:::info +Um alle Karten abzuwählen, rufen Sie die Methode **unselectCard()** ohne Parameter auf +::: + +### Parameter + +- `id` - (erforderlich) die ID der Karte, deren Auswahl aufgehoben werden soll + +### Beispiel + +~~~jsx {7} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// hebt die Auswahl der Karte mit der ID 1 auf +board.unselectCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md new file mode 100644 index 0000000..750beda --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateCard() +title: updateCard Methode +description: Sie können mehr über die updateCard Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# updateCard() + +### Beschreibung + +@short: Aktualisiert die Kartendaten anhand ihrer ID + +### Verwendung + +~~~jsx {} +updateCard({ + id: string | number, + card?: object, + replace?: boolean +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der zu aktualisierenden Karte +- `card` - (optional) das neue Datenobjekt der Karte. Die vollständige Liste der Kartenparameter finden Sie [**hier**](api/config/js_kanban_cards_config.md) +- `replace` - (optional) aktiviert/deaktiviert das vollständige Ersetzen der Daten + + :::note + Wenn Sie den Parameter `replace` auf *true* setzen, werden die alten Daten vollständig durch die neuen ersetzt. Andernfalls aktualisiert die Methode nur die Werte, die Sie übergeben haben. + ::: + +### Beispiel + +~~~jsx {7-16} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kartendaten mit der ID 1 aktualisieren +board.updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*andere Parameter*/ + }, + replace: true +}); +~~~ + +**Änderungsprotokoll**: +- Die Parameter **id** und **card** wurden in Version v1.1 hinzugefügt +- Der Parameter **replace** wurde in Version v1.3 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md new file mode 100644 index 0000000..4de0f2d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateColumn() +title: updateColumn Methode +description: Sie können mehr über die updateColumn Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# updateColumn() + +### Beschreibung + +@short: Aktualisiert die Spaltendaten anhand ihrer ID + +### Verwendung + +~~~jsx {} +updateColumn({ + id: string | number, + column?: object, + replace?: boolean +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der zu aktualisierenden Spalte +- `column` - (optional) das neue Datenobjekt der Spalte. Die vollständige Liste der **column**-Parameter finden Sie [**hier**](api/config/js_kanban_columns_config.md) +- `replace` - (optional) aktiviert/deaktiviert das vollständige Ersetzen der Daten + + :::note + Wenn Sie den Parameter `replace` auf *true* setzen, werden die alten Daten vollständig durch die neuen ersetzt. Andernfalls aktualisiert die Methode nur die Werte, die Sie übergeben haben. + ::: + +### Beispiel + +~~~jsx {7-16} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Spaltendaten mit der ID "backlog" aktualisieren +board.updateColumn({ + id: "backlog", + column: { + label: "Aktualisierte Spalte", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +**Änderungsprotokoll**: +- Die Parameter **id** und **column** wurden in Version v1.1 hinzugefügt +- Der Parameter **replace** wurde in Version v1.3 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md new file mode 100644 index 0000000..84f87d7 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md @@ -0,0 +1,62 @@ +--- +sidebar_label: updateComment() +title: updateComment Methode +description: Sie können mehr über die updateComment Methode in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# updateComment() + +### Beschreibung + +@short: Aktualisiert einen Kommentar einer Karte anhand seiner ID + +### Verwendung + +~~~jsx {} +updateComment({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### Parameter + +- `id` - (optional) die ID des zu aktualisierenden Kommentars +- `cardId` - (erforderlich) die ID der Karte, deren Kommentar aktualisiert werden soll +- `comment` - (erforderlich) das Konfigurationsobjekt des zu aktualisierenden Kommentars. Hier können folgende Parameter angegeben werden: + - `id` - (optional) die ID des aktualisierten Kommentars + - `cardId` - (optional) die ID der Karte, zu der der aktualisierte Kommentar hinzugefügt werden soll + - `text` - (optional) der Text des aktualisierten Kommentars + - `date` - (optional) das Datum des aktualisierten Kommentars + - `html` - (optional) das HTML-Markup des aktualisierten Kommentars. Aktivieren Sie die `html`-Eigenschaft der [`editorShape`](/api/config/js_kanban_editorshape_config/#--parameter-für-den-typ-comments) Konfiguration, um das HTML-Markup anstelle des Textes anzuzeigen + +### Beispiel + +~~~jsx {7-17} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kommentar aktualisieren +board.updateComment({ + id: 1, + cardId: 1, + comment: { + id: 2, + cardId: 4, + text: "", + date: new Date("01/08/2021"), + html: "Aktualisierter Kommentar" + } +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.4 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md new file mode 100644 index 0000000..56e0c93 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md @@ -0,0 +1,55 @@ +--- +sidebar_label: updateRow() +title: updateRow-Methode +description: Erfahren Sie mehr über die updateRow-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# updateRow() + +### Beschreibung + +@short: Aktualisiert die Zeilendaten anhand ihrer ID + +### Verwendung + +~~~jsx {} +updateRow({ + id: string | number, + row?: object, + replace?: boolean +}): void; +~~~ + +### Parameter + +- `id` - (erforderlich) die ID der zu aktualisierenden Zeile +- `row` - (optional) das neue Datenobjekt der Zeile. Die vollständige Liste der **row**-Parameter finden Sie [**hier**](api/config/js_kanban_rows_config.md) +- `replace` - (optional) aktiviert/deaktiviert das vollständige Ersetzen der Daten + + :::note + Wenn Sie den Parameter `replace` auf *true* setzen, werden die alten Daten vollständig durch die neuen ersetzt. Andernfalls aktualisiert die Methode nur die übergebenen Werte. + ::: + +### Beispiel + +~~~jsx {8-15} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// Zeilendaten mit der ID "feature" aktualisieren +board.updateRow({ + id: "feature", + row: { + label: "Aktualisierte Zeile", + collapsed: true + }, + replace: true +}); +~~~ + +**Änderungsprotokoll**: +- Die Parameter **id** und **row** wurden in Version 1.1 hinzugefügt +- Der Parameter **replace** wurde in Version 1.3 hinzugefügt \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md new file mode 100644 index 0000000..d7a67c3 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md @@ -0,0 +1,28 @@ +--- +sidebar_label: destructor() +title: destructor Methode +description: Sie erfahren mehr über die destructor Methode der Toolbar in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# destructor() + +### Beschreibung + +@short: Entfernt alle HTML-Elemente der Toolbar und trennt alle zugehörigen Ereignisse + +### Verwendung + +~~~jsx {} +destructor(): void; +~~~ + +### Beispiel + +~~~jsx {6} +// Kanban erstellen +const board = new kanban.Kanban("#root", {}); +// Toolbar erstellen +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// Toolbar entfernen +toolbar.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md new file mode 100644 index 0000000..ca2176b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: setConfig() +title: Methode setConfig +description: Sie können die Methode setConfig der Toolbar in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# setConfig() + +### Beschreibung + +@short: Setzt neue Konfigurationsparameter der Toolbar + +### Verwendung + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### Parameter + +- `config` - (erforderlich) das Objekt der Toolbar-Konfiguration. Die vollständige Liste der Eigenschaften finden Sie [hier](api/overview/main_overview.md#toolbar-properties) + +:::note +Die Methode ändert nur die Parameter, die Sie übergeben haben. +::: + +### Beispiel + +~~~jsx {6-8} +// Kanban erstellen +const board = new kanban.Kanban("#root", {}); +// Toolbar erstellen +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// neue Konfigurationsparameter der Toolbar setzen +toolbar.setConfig({ + items: ["search", "spacer", "sort"] +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md new file mode 100644 index 0000000..0bd2311 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: setLocale() +title: Methode setLocale +description: Sie können die Methode setLocale der Toolbar in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# setLocale() + +### Beschreibung + +@short: Wendet eine neue Locale auf die Toolbar des Kanban an + +### Verwendung + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### Parameter + +- `null` - (optional) setzt die Toolbar auf die Standard-Locale (*Englisch*) zurück +- `locale` - (optional) das Objekt mit neuen Locale-Daten, die auf die Toolbar angewendet werden sollen + +:::info +Die **Toolbar** des Kanban ist eine separate Komponente. Verwenden Sie die Methode `toolbar.setLocale()`, um nur auf die Toolbar eine neue Locale anzuwenden. Um die Toolbar auf die Standard-Locale zurückzusetzen, rufen Sie die Methode `toolbar.setLocale()` ohne Argumente (oder mit dem Wert *null*) auf. Verwenden Sie die Methode [`kanban.setLocale()`](api/methods/js_kanban_setlocale_method.md), um nur auf das Kanban eine neue Locale anzuwenden. +::: + +### Beispiel + +~~~jsx {8} +// Kanban erstellen +const board = new kanban.Kanban("#root", {}); +// Toolbar erstellen +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// die Locale "de" auf Kanban anwenden +board.setLocale(de); +// die Locale "de" auf die Toolbar anwenden +toolbar.setLocale(de); +~~~ + +**Änderungsprotokoll:** Der Parameter **api** wurde in Version 1.6 veraltet + +**Verwandte Artikel:** [Lokalisierung](guides/localization.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md new file mode 100644 index 0000000..cead2f8 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: Allgemeine Einstellungen +title: Allgemeine Einstellungen +description: Sie finden eine Übersicht der allgemeinen Einstellungen von JavaScript Kanban in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Allgemeine Einstellungen + +| Name | Beschreibung | +| --------------------------------------------- | -------------------------------------------------- | +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/events_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/events_overview.md new file mode 100644 index 0000000..3800e6e --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/events_overview.md @@ -0,0 +1,39 @@ +--- +sidebar_label: Ereignisübersicht +title: Ereignisübersicht +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek finden Sie eine Übersicht der Ereignisse von JavaScript Kanban. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Ereignisübersicht + +| Name | Beschreibung | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md new file mode 100644 index 0000000..2b6c2f5 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: Event Bus Methoden +title: Event Bus Methoden +description: Sie erhalten eine Übersicht über die internen Event Bus Methoden von JavaScript Kanban in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Event Bus Methoden + +| Name | Beschreibung | +| -------------------------------------------------------- | ---------------------------------------------------------- | +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md new file mode 100644 index 0000000..def1016 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: Exportmethoden +title: Exportmethoden +description: Sie können eine interne Übersicht der Exportmethoden von JavaScript Kanban in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek finden. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Exportmethoden + +| Name | Beschreibung | +| -------------------------------------------- | -------------------------------------------------- | +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md new file mode 100644 index 0000000..34df88d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md @@ -0,0 +1,16 @@ +--- +sidebar_label: RestDataProvider-Methoden +title: RestDataProvider-Methoden +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek finden Sie eine Übersicht über die internen RestDataProvider-Methoden des JavaScript Kanban. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# RestDataProvider-Methoden + +| Name | Beschreibung | +| ------------------------------------------------------------ | ----------------------------------------------------------------- | +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md)| +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md new file mode 100644 index 0000000..216f5f7 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: State-Methoden +title: State-Methoden +description: Sie finden eine Übersicht der internen State-Methoden von JavaScript Kanban in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# State-Methoden + +| Name | Beschreibung | +| -------------------------------------------------------- | ------------------------------------------------------------ | +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/main_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/main_overview.md new file mode 100644 index 0000000..cec4755 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/main_overview.md @@ -0,0 +1,225 @@ +--- +sidebar_label: API Übersicht +title: API Übersicht +description: Sie finden eine API Übersicht von JavaScript Kanban in der Dokumentation der DHTMLX JavaScript Kanban Bibliothek. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# API Übersicht + +## Kanban Konstruktor + +~~~js +new kanban.Kanban("#root", { + // Konfigurationsparameter +}); +~~~ + +**Parameter**: + +- ein HTML-Container (die ID des HTML-Containers) +- ein Objekt mit den Konfigurationsparametern ([hier prüfen](#kanban-eigenschaften)) + +## Toolbar Konstruktor + +~~~js +new kanban.Toolbar("#toolbar", { + // Konfigurationsparameter +}); +~~~ + +**Parameter**: + +- ein HTML-Container (die ID des HTML-Containers) +- ein Objekt mit den Konfigurationsparametern ([hier prüfen](#toolbar-eigenschaften)) + +## Kanban Methoden + +| Name | Beschreibung | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md) | +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | + +## Kanban interne API + +### Event Bus Methoden + +| Name | Beschreibung | +| --------------------------------------------------------- | ------------------------------------------------------------| +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | + +### Export Methoden + +| Name | Beschreibung | +| -------------------------------------------- | -------------------------------------------------- | +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | + +### Status Methoden + +| Name | Beschreibung | +| --------------------------------------------------------- | -------------------------------------------------------------| +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | + +## Kanban Ereignisse + +| Name | Beschreibung | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addlink_event.md) | @getshort(../events/js_kanban_addlink_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deletelink_event.md) | @getshort(../events/js_kanban_deletelink_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | + +## Kanban Eigenschaften + +| Name | Beschreibung | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | + +## Toolbar Methoden + +| Name | Beschreibung | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | + +## Toolbar Eigenschaften + +| Name | Beschreibung | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | + +## Allgemeine Einstellungen + +| Name | Beschreibung | +| :------------------------------------------ | :------------------------------------------------ | +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | + +## RestDataProvider API + +### RestDataProvider Methoden + +| Name | Beschreibung | +| ------------------------------------------------------------- | ------------------------------------------------------------------ | +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md) | +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | + +### RestDataProvider Routen + +| Name | Beschreibung | +| ----------------------------------------------------------- | ------------------------------------------------------ | +| [GET `/cards`](api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | +| [GET `/columns`](api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | +| [GET `/links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_links_route.md) | +| [GET `/rows`](api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | +| [GET `/users`](api/provider/rest_routes/get_routes/js_kanban_get_users_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_users_route.md) | +| [GET `/uploads`](api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | +| [POST `/cards`](api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | +| [POST `/cards/{cardId}/comments`](api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | +| [POST `/cards/{cardId}/vote`](api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | +| [POST `/columns`](api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | +| [POST `/links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_links_route.md) | +| [POST `/rows`](api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | +| [POST `/uploads`](api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | +| [PUT `/cards`](api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | +| [PUT `/cards/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | +| [PUT `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | +| [PUT `/columns`](api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | +| [PUT `/columns/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | +| [PUT `/rows`](api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | +| [PUT `/rows/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | +| [DELETE `/cards`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | +| [DELETE `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | +| [DELETE `/cards/{cardId}/vote`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | +| [DELETE `/columns`](api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | +| [DELETE `/links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | +| [DELETE `/rows`](api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md new file mode 100644 index 0000000..616cce8 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md @@ -0,0 +1,45 @@ +--- +sidebar_label: Methodenübersicht +title: Methodenübersicht +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek finden Sie eine Methodenübersicht für JavaScript Kanban. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Methodenübersicht + +| Name | Beschreibung | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md) | +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md new file mode 100644 index 0000000..1d7a717 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md @@ -0,0 +1,31 @@ +--- +sidebar_label: Eigenschaften Übersicht +title: Eigenschaften Übersicht +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek finden Sie eine Übersicht der Eigenschaften von JavaScript Kanban. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Kanban Eigenschaften Übersicht + +Zur Konfiguration des **Kanban** siehe den Abschnitt [Configuration](guides/configuration.md). + +| Name | Beschreibung | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md new file mode 100644 index 0000000..f6e69b3 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md @@ -0,0 +1,200 @@ +--- +sidebar_label: Übersicht der REST-Routen +title: Übersicht der REST-Routen +description: Sie finden eine Übersicht der internen RestDataProvider-Routen von JavaScript Kanban in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Übersicht der REST-Routen + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +Diese Seite bietet Ihnen eine Liste aller REST-Routen mit einer kurzen Beschreibung und Links zu Seiten mit weiteren Details.
Bevor Sie sich mit der Beschreibung der einzelnen Routen befassen, wird empfohlen, den Abschnitt [Arbeiten mit dem Server](guides/working_with_server.md) zu lesen. + +--- + +Für eine schnelle Navigation können Sie entweder die untenstehenden Tabs oder das Seitenmenü verwenden: +- Das Seitenmenü zeigt Routen gruppiert nach HTTP-Methoden +- Um schnell zu finden, welche Routen für welche Operationen verwendet werden, nutzen Sie die untenstehenden Tabs + +
+ + +

Verwenden Sie die folgenden Routen, um Operationen an Karten durchzuführen:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP-MethodeRouteBeschreibung
`GET` /cardsErhält Daten aller Karten und gibt ein JSON-Objekt mit einem Array von Kartenobjekten zurück
`POST` /cardsErstellt eine neue Karte und gibt ein JSON-Objekt mit einer neuen Karten-ID zurück
`PUT` /cardsAktualisiert Daten einer angegebenen Karte und gibt ein leeres JSON-Objekt zurück
`PUT` /cards/id/moveVerschiebt Karten an eine angegebene Position
`DELETE` /cardsLöscht Daten einer Karte
+
+ + +

Verwenden Sie die folgenden Routen, um Operationen an Zeilen (Swimlanes) durchzuführen:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP-MethodeRouteBeschreibung
`GET` /rowsErhält Daten aller Zeilen und gibt ein JSON-Objekt mit einem Array von Objekten mit Zeilen- (Swimlanes-) Daten zurück
`POST` /rowsFügt eine neue Zeile hinzu und gibt ein JSON-Objekt mit der Zeilen-ID zurück
`PUT` /rowsAktualisiert Daten einer angegebenen Zeile (Swimlane) und gibt ein leeres JSON-Objekt zurück
`PUT` /rows/id/moveVerschiebt eine Zeile an eine angegebene Position
`DELETE` /rowsLöscht Daten einer Zeile
+
+ + +

Verwenden Sie die folgenden Routen, um Operationen an Spalten durchzuführen:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP-MethodeRouteBeschreibung
`GET` /columnsErhält Daten aller Spalten und gibt ein JSON-Objekt mit einem Array von Objekten mit Spaltendaten zurück
`POST` /columnsFügt eine neue Spalte hinzu und gibt ein JSON-Objekt mit der Zeilen-ID zurück
`PUT` /columnsAktualisiert Daten einer angegebenen Spalte und gibt ein leeres JSON-Objekt zurück
`PUT` /columns/id/moveVerschiebt eine Spalte an eine angegebene Position
`DELETE` /columnsLöscht Daten einer Spalte
+
+ + +

Verwenden Sie die folgenden Routen, um Operationen an Verbindungen durchzuführen:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP-MethodeRouteBeschreibung
`GET` /linksErhält Daten aller Verbindungen und gibt ein JSON-Objekt mit einem Array von Verbindungsobjekten zurück
`POST` /linksErstellt eine neue Verbindung und gibt ein JSON-Objekt mit einer neuen Verbindungs-ID zurück
`DELETE` /linksLöscht Daten einer Verbindung
+
+ + +

Verwenden Sie die folgenden Routen, um Operationen an Uploads (auf den Server hochgeladene Dateien) durchzuführen:

+ + + + + + + + + + + + + + + + + + + + +
HTTP-MethodeRouteBeschreibung
`GET` /uploadsRuft die angeforderte Binärdatei vom Server ab
`POST` /uploadsLädt eine Binärdatei auf den Server hoch und gibt ein JSON-Objekt mit ihrer ID, ihrem Namen und ihrer URL zurück
+
+ +
+
\ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md new file mode 100644 index 0000000..4121287 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: Übersicht der Toolbar-Methoden +title: Übersicht der Toolbar-Methoden +description: Sie können eine Übersicht der Toolbar-Methoden von JavaScript Kanban in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek finden. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Übersicht der Toolbar-Methoden + +| Name | Beschreibung | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md new file mode 100644 index 0000000..d4ec63b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: Übersicht der Toolbar-Eigenschaften +title: Übersicht der Toolbar-Eigenschaften +description: Eine Übersicht der Toolbar-Eigenschaften von JavaScript Kanban finden Sie in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Übersicht der Toolbar-Eigenschaften + +Um die **Toolbar** zu konfigurieren, siehe den Abschnitt [Configuration](guides/configuration.md#toolbar). + +| Name | Beschreibung | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md new file mode 100644 index 0000000..6eb0881 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getCards() +title: getCards REST-Methode +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die getCards REST-Methode. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# getCards() + +### Beschreibung + +@short: Gibt ein Promise mit den Kartendaten zurück + +:::info +Die **getCards()**-Methode ist Teil des **RestDataProvider**-Dienstes, der für die Arbeit mit dem Server vorgesehen ist. +::: + +### Verwendung + +~~~jsx {} +getCards(): promise; +~~~ + +### Rückgabewert + +Die **getCards()**-Methode sendet eine Anfrage an den Server mit der **GET**-Methode und gibt ein **Promise** mit den Kartendaten zurück. + +### Beispiel + +~~~jsx {2,5} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**Verwandte Artikel:** [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md new file mode 100644 index 0000000..9d306c2 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getColumns() +title: getColumns REST-Methode +description: Sie können die getColumns REST-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# getColumns() + +### Beschreibung + +@short: Gibt ein Promise mit den Spaltendaten zurück + +:::info +Die **getColumns()**-Methode ist Teil des **RestDataProvider**-Dienstes, der für die Arbeit mit dem Server vorgesehen ist. +::: + +### Verwendung + +~~~jsx {} +getColumns(): promise; +~~~ + +### Rückgabewert + +Die **getColumns()**-Methode sendet eine Anfrage an den Server mittels der **GET**-Methode und gibt ein **Promise** mit den Spaltendaten zurück. + +### Beispiel + +~~~jsx {2,6} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**Verwandte Artikel:** [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md new file mode 100644 index 0000000..4c0636c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: getLinks() +title: getLinks REST-Methode +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die getLinks REST-Methode. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# getLinks() + +### Beschreibung + +@short: Gibt ein Promise mit den Link-Daten zurück + +:::info +Die **getLinks()** Methode ist Teil des **RestDataProvider**-Dienstes, der für die Arbeit mit dem Server vorgesehen ist. +::: + +### Verwendung + +~~~jsx {} +getLinks(): promise; +~~~ + +### Rückgabewert + +Die **getLinks()** Methode sendet eine Anfrage an den Server mit der **GET**-Methode und gibt ein **Promise** mit den Link-Daten zurück. + +### Beispiel + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), +]).then(([cards, columns, links]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links + }); + board.api.setNext(restProvider); +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.5 hinzugefügt + +**Verwandte Artikel:** [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md new file mode 100644 index 0000000..a95394d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getRows() +title: getRows REST-Methode +description: Sie können in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek mehr über die getRows REST-Methode erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# getRows() + +### Beschreibung + +@short: Gibt ein Promise mit den Zeilendaten zurück + +:::info +Die **getRows()** Methode ist Teil des **RestDataProvider**-Dienstes, der für die Arbeit mit dem Server vorgesehen ist +::: + +### Verwendung + +~~~jsx {} +getRows(): promise; +~~~ + +### Rückgabewert + +Die **getRows()** Methode sendet eine Anfrage an den Server mit der **GET**-Methode und gibt ein **Promise** mit den Zeilendaten zurück. + +### Beispiel + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type" + }); + board.api.setNext(restProvider); +}); +~~~ + +**Verwandte Artikel:** [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md new file mode 100644 index 0000000..f6be5e2 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md @@ -0,0 +1,60 @@ +--- +sidebar_label: getUsers() +title: getUsers REST-Methode +description: Sie können mehr über die getUsers REST-Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# getUsers() + +### Beschreibung + +@short: Liefert ein Promise mit den Benutzerdaten + +:::info +Die **getUsers()** Methode ist Teil des **RestDataProvider**-Dienstes, der für die Arbeit mit dem Server vorgesehen ist. +::: + +### Verwendung + +~~~jsx {} +getUsers(): promise; +~~~ + +### Rückgabe + +Die **getUsers()** Methode sendet eine Anfrage an den Server mit der **GET**-Methode und gibt ein **Promise** mit den Benutzerdaten zurück. + +### Beispiel + +~~~jsx {2,8,21} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows(), + restProvider.getUsers(), +]).then(([cards, columns, rows, users]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +**Änderungsprotokoll:** Die Methode wurde in Version v1.3 hinzugefügt + +**Verwandte Artikel:** [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md new file mode 100644 index 0000000..91b5101 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md @@ -0,0 +1,113 @@ +--- +sidebar_label: send() +title: send() Methode +description: Sie können die send() Methode in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# send() + +### Beschreibung + +@short: Sendet eine erforderliche HTTP-Anfrage an den Server und gibt ein Promise mit oder ohne Daten zurück, abhängig von der Anfrage. + +Alle Anfragen an den Server werden mit der **send()** Methode ausgeführt, die Teil des [**RestDataProvider**](guides/working_with_server.md/#restdataprovider) Dienstes ist. + +### Verwendung + +~~~js +send( + url: string, + method: "GET" | "POST" | "PUT" | "DELETE" | string, + data?: object, + headers?: object, +): promise; +~~~ + +### Parameter + +| Name | Typ | Beschreibung | +| ----------- | ----------- | ------------ | +| `url` | string | *Erforderlich*. Ein Pfad zum Server, an den die Anfrage gesendet wird. | +| `method` | string | *Erforderlich*. Ein HTTP-Methodentyp (GET, POST, PUT, DELETE) | +| `data` | object | *Optional*. Parameter, die an den Server gesendet werden. Standardmäßig werden die Parameter des ausgelösten Events gesendet. Sie können jedoch zusätzliche Parameter mit einem benutzerdefinierten Objekt hinzufügen. Siehe das [Beispiel](#beispiele) unten. | +| `headers` | object | *Optional*. Ein Standard-Header ist der **Content-Type** Header mit dem Wert *application/json*. Weitere optionale Header können mit dem Parameter **customHeaders** hinzugefügt werden. Siehe das [Beispiel](#beispiele) unten. | + +### Antwort + +Die Methode gibt ein Promise-Objekt zurück, mit oder ohne Daten, abhängig von der Anfrage. + +Ein Promise wird bei erfolgreichem Anfragestatus zurückgegeben. Im Falle einer fehlgeschlagenen Anfrage wird ein Fehler ausgelöst. + +Sie können konfigurieren, was zurückgegeben wird. Um eine Antwort auf eine fehlgeschlagene Anfrage zu behandeln, verwenden Sie die **catch** Methode des zurückgegebenen Promise. + +~~~jsx +restDataProvider.send(url, method, data) +.then(data => { + ... // Erfolg: etwas mit den Daten machen +}) +.catch(err => { + ... // Fehlerbehandlung +}); +~~~ + +### Beispiele + +Das folgende Beispiel zeigt, wie eine Anfrage mit zusätzlichen Parametern neben den Standardparametern gesendet wird: + +~~~jsx {14-20} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + // Konfigurationsparameter + }); + + board.api.on("add-card", obj => { + obj.custom = "custom prop"; + restProvider.send(`cards`, "POST", obj).then(data => { + board.api.parse({ cards: data }); + return Promise.resolve(); + }); + }); + + board.api.setNext(restProvider); +}); +~~~ + +Die folgenden Beispiele zeigen, wie Sie der **send()** Methode weitere Header hinzufügen können. + +~~~js +const customHeaders = { + "Authorization": "Bearer", + "Custom header": "some value", +}; + +board.api.on("add-cards", obj => { + restDataProvider.send("cards", "POST", obj, customHeaders); +}); +~~~ + +Oder Sie können Header folgendermaßen hinzufügen, indem Sie RestDataProvider neu definieren, was Ihnen mehr Kontrolle über die an den Server gesendeten Daten gibt: + +~~~jsx {3-8} +const url = "https://some_backend_url"; + +class MyDataProvider extends RestDataProvider { + send(url, method, data, headers) { + headers = { ...headers, "SomeToken": "abc" }; + return super.send(url, methods, data, headers); + } +} + +board.api.setNext(new MyDataProvider(url)); +~~~ + +--- + +**Verwandte Artikel:** [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md new file mode 100644 index 0000000..755f0bb --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md @@ -0,0 +1,44 @@ +--- +sidebar_label: DELETE /cards/{id}/comments/{id} +title: DELETE /cards/{cardId}/comments/{commentId} +description: Sie können die REST-Route DELETE /cards/{cardId}/comments/{commentId} in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# DELETE `/cards/{cardId}/comments/{commentId}` + +### Beschreibung + +@short: Entfernt einen Kommentar von einer Karte + +Die Route verarbeitet die **HTTP DELETE**-Anfrage, die an den Pfad `cards/{cardId}/comments/{commentId}` gesendet wird. + +### Pfadparameter + +Die folgenden Parameter werden in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ----------- | ----------- | ------------ | +| `cardId` | number | *Erforderlich*. Die ID der Karte, von der der Kommentar gelöscht wird. | +| `commentId` | number | *Erforderlich*. Die ID des zu entfernenden Kommentars. | + +### Payload + +Es ist kein Payload erforderlich. + +### Antwort + +Der Server gibt ein JSON-Objekt mit der Benutzer-ID zurück, die den Kommentar entfernt hat. + +Beispiel: + +~~~json +{ + "id": 4 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md new file mode 100644 index 0000000..f07c8fb --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /cards +title: DELETE /cards +description: Sie können mehr über die DELETE /cards REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# DELETE `/cards` + +### Beschreibung + +@short: Löscht Daten auf einer Karte + +Die Route verarbeitet die **HTTP DELETE**-Anfrage, die an den Pfad `/cards/{id}` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der zu löschenden Karte. | + +### Payload + +Kein Payload erforderlich. + +### Antwort + +Es werden keine Daten zurückgegeben. Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md new file mode 100644 index 0000000..b9aaae3 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md @@ -0,0 +1,43 @@ +--- +sidebar_label: DELETE /cards/{id}/vote +title: DELETE /cards/{cardId}/vote +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die REST-Route DELETE /cards/{cardId}/vote. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# DELETE `/cards/{cardId}/vote` + +### Beschreibung + +@short: Entfernt eine Stimme von einer Karte und gibt ein JSON-Objekt mit der Benutzer-ID zurück, die die Stimme entfernt hat. + +Die Route verarbeitet die **HTTP DELETE**-Anfrage, die an den Pfad `/cards/{cardId}/vote` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `cardId` | number | *Erforderlich*. Die ID der Karte, von der die Stimme entfernt wird. | + +### Payload + +Es wird kein Payload benötigt. + +### Antwort + +Die Route gibt ein JSON-Objekt mit der Benutzer-ID zurück, die die Stimme entfernt hat. + +Beispiel: + +~~~json +{ + "id": 1 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md new file mode 100644 index 0000000..1b06e60 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /columns +title: DELETE /columns +description: Sie können mehr über die DELETE /columns REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# DELETE `/columns` + +### Beschreibung + +@short: Löscht Daten einer Spalte + +Die Route verarbeitet die **HTTP DELETE**-Anfrage, die an den Pfad `/columns/{id}` gesendet wird. + +### Pfad-Parameter + +Der folgende Parameter wird in der Anforderungszeile übermittelt: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der zu löschenden Spalte. | + +### Payload + +Es wird keine Payload benötigt. + +### Antwort + +Es werden keine Daten zurückgegeben. Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md new file mode 100644 index 0000000..3714bec --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: DELETE /links +title: DELETE /links +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die REST-Route DELETE /links. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# DELETE `/links` + +### Beschreibung + +@short: Löscht Daten zu einem Link + +Die Route verarbeitet die **HTTP DELETE**-Anfrage, die an den Pfad `/links/{id}` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---- | ------- | --------------------------------------- | +| `id` | number | *Erforderlich*. Die ID des zu löschenden Links. | + +### Payload + +Kein Payload erforderlich. + +### Antwort + +Es werden keine Daten zurückgegeben. Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: +- [Working with server](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md new file mode 100644 index 0000000..6b2e47d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /rows +title: DELETE /rows +description: Sie können mehr über die DELETE /rows REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# DELETE `/rows` + +### Beschreibung + +@short: Löscht Daten in einer Zeile (Swimlane) + +Die Route verarbeitet die **HTTP DELETE**-Anfrage, die an den Pfad `/rows/{id}` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der zu löschenden Zeile. | + +### Payload + +Es ist kein Payload erforderlich. + +### Antwort + +Es werden keine Daten zurückgegeben. Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md new file mode 100644 index 0000000..bc4d577 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md @@ -0,0 +1,81 @@ +--- +sidebar_label: GET /cards +title: GET /cards +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die REST-Route GET /cards. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# GET `/cards` + +### Beschreibung + +@short: Ruft Daten aller Karten ab und gibt ein JSON-Objekt mit einem Array von Kartenobjekten zurück + +Die Route verarbeitet die **HTTP GET**-Anfrage, die an den Pfad `/cards` gesendet wird. + +### Payload + +Es ist kein Payload erforderlich. + +### Antwort + +Die Route gibt ein JSON-Objekt mit einem Array aller Kartenobjekte zurück. + +Beispiel: + +~~~json +[ + { + "id": 4, + "label": "Set the tasks priorities", + "description": "", + "column": 2, + "row": 1, + "start_date": "2018-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, + { + "id": 5, + "label": "Custom icons", + "description": "", + "column": 2, + "row": 2, + "start_date": "2019-01-01T00:00:00Z", + "end_date": null, + "progress": 0, + "attached": [], + "color": "#65D3B3", + "users": [] + }, + { + "id": 6, + "label": "Integration with Gantt", + "description": "", + "column": 2, + "row": 2, + "start_date": "2020-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, +] +~~~ + +:::note +Die Start- und Enddaten des Ereignisses sollten dem ISO-Format **yyyy-MM-dd'T'HH:mm:ss.SSSXXX** entsprechen. +::: + +Für ein weiteres Beispiel des zurückgegebenen Objekts siehe [**cards**](api/config/js_kanban_cards_config.md). + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: +- [Working with server](guides/working_with_server.md) +- [getCards()](api/provider/rest_methods/js_kanban_getcards_method.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md new file mode 100644 index 0000000..e18b608 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md @@ -0,0 +1,58 @@ +--- +sidebar_label: GET /columns +title: GET /columns +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die REST-Route GET /columns. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# GET `/columns` + +### Beschreibung + +@short: Ruft Daten aller Spalten ab und gibt ein JSON-Objekt mit einem Array von Objekten mit Spaltendaten zurück + +Die Route verarbeitet die **HTTP GET**-Anfrage, die an den Pfad `/columns` gesendet wird. + +### Payload + +Es wird kein Payload benötigt. + +### Antwort + +Die Route gibt ein JSON-Objekt mit einem Array von Objekten mit Spaltendaten zurück. + +Beispiel: + +~~~json +[ + { + "id": 1, + "label": "Backlog", + "collapsed": false + }, + { + "id": 2, + "label": "In Progress", + "collapsed": false + }, + { + "id": 3, + "label": "Testing", + "collapsed": false + }, + { + "id": 4, + "label": "Done", + "collapsed": false + } +] +~~~ + +Ein weiteres Beispiel des zurückgegebenen Objekts finden Sie unter [**columns**](api/config/js_kanban_columns_config.md). + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: +- [Arbeiten mit dem Server](guides/working_with_server.md) +- [getColumns()](api/provider/rest_methods/js_kanban_getcolumns_method.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md new file mode 100644 index 0000000..fd37aa5 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md @@ -0,0 +1,50 @@ +--- +sidebar_label: GET /links +title: GET /links +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die REST-Route GET /links. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# GET `/links` + +### Beschreibung + +@short: Ruft Daten zu allen Links ab und gibt ein JSON-Objekt mit einem Array von Link-Objekten zurück + +Die Route verarbeitet die **HTTP GET**-Anfrage, die an den Pfad `/links` gesendet wird. + +### Payload + +Es wird keine Payload benötigt. + +### Antwort + +Die Route gibt ein JSON-Objekt mit einem Array aller Link-Objekte zurück. + +Beispiel: + +~~~json +[ + { + "id": 1, + "source": 2, + "target": 5, + "relation": "relatesTo", + }, + { + "id": 2, + "source": 4, + "target": 9, + "relation": "relatesTo", + }, +] +~~~ + +Ein weiteres Beispiel des zurückgegebenen Objekts finden Sie unter [**links**](api/config/js_kanban_links_config.md). + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: +- [Arbeiten mit dem Server](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md new file mode 100644 index 0000000..69aa4ce --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md @@ -0,0 +1,48 @@ +--- +sidebar_label: GET /rows +title: GET /rows +description: Sie können mehr über die GET /rows REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# GET `/rows` + +### Beschreibung + +@short: Ruft Daten zu allen Zeilen ab und gibt ein JSON-Objekt mit einem Array von Objekten mit Zeilendaten (Swimlanes) zurück. + +Die Route verarbeitet die **HTTP GET**-Anfrage, die an den Pfad `/rows` gesendet wird. + +### Payload + +Es ist keine Payload erforderlich. + +### Antwort + +Die Route gibt ein JSON-Objekt mit einem Array von Objekten mit Zeilendaten zurück. + +Beispiel: + +~~~json +[ + { + "id": 1, + "label": "Feature", + "collapsed": false + }, + { + "id": 2, + "label": "Task", + "collapsed": false + } +] +~~~ + +Für ein weiteres Beispiel des zurückgegebenen Objekts siehe [**rows**](api/config/js_kanban_rows_config.md). + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: +- [Arbeiten mit dem Server](guides/working_with_server.md) +- [getRows()](api/provider/rest_methods/js_kanban_getrows_method.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md new file mode 100644 index 0000000..cc96510 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: GET /uploads +title: GET /uploads +description: Sie können die REST-Route GET /uploads in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# GET `/uploads` + +### Beschreibung + +@short: Ruft die angeforderte Binärdatei vom Server ab + +Die Route verarbeitet die **HTTP GET**-Anfrage, die an den Pfad `/uploads/{id}/{name}` gesendet wird. + +### Pfadparameter + +Die folgenden Parameter werden in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der benötigten Datei. | +| `name` | string | *Erforderlich*. Der Name der angeforderten Datei. | + +### Payload + +Es ist kein Payload erforderlich. + +### Antwort + +Die Route gibt die angeforderte Binärdatei zurück. + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md new file mode 100644 index 0000000..47150a7 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: GET /users +title: GET /users +description: Sie können die REST-Route GET /users in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# GET `/users` + +### Beschreibung + +@short: Ruft Daten aller Benutzer ab und gibt ein JSON-Objekt mit einem Array von Benutzerobjekten zurück + +Die Route verarbeitet die **HTTP GET**-Anfrage, die an den Pfad `/users` gesendet wird. + +### Payload + +Es wird keine Payload benötigt. + +### Antwort + +Die Route gibt ein JSON-Objekt mit einem Array von Objekten mit Benutzerdaten zurück. + +Beispiel: + +~~~json +[ + { + "id": 1, + "label": "Jhon", + "avatar": "https://serv.com/images/jhon.png" + }, + { + "id": 2, + "label": "Ben", + "avatar": "https://serv.com/images/ben.png" + }, + { + "id": 3, + "label": "Alex", + "avatar": "https://serv.com/images/alex.png" + } +] +~~~ + +Ein weiteres Beispiel des zurückgegebenen Objekts finden Sie unter [**cardShape**](api/config/js_kanban_cardshape_config.md). + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: +- [Working with server](guides/working_with_server.md) +- [getUsers()](api/provider/rest_methods/js_kanban_getusers_method.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md new file mode 100644 index 0000000..494bf1d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /cards/{id}/comments +title: POST /cards/{cardId}/comments +description: Sie können die REST-Route POST /cards/{cardId}/comments in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# POST `/cards/{cardId}/comments` + +### Beschreibung + +@short: Fügt dem Kartenobjekt einen neuen Kommentar hinzu und gibt ein JSON-Objekt mit der ID des neu hinzugefügten Kommentars zurück. + +Diese Route verarbeitet die **HTTP POST**-Anfrage an den Pfad `/cards/{cardId}/comments`. + +### Payload + +Der Server erwartet ein JSON-Objekt mit den folgenden Eigenschaften: + +| Name | Typ | Beschreibung | +| ----------- | ----------- | -------------------------------- | +| `text` | string | *Erforderlich*. Der Text des Kommentars. | +| `date` | object | *Erforderlich*. Das Datum des Kommentars. | + +Beispiel: + +~~~json +{ + "text": "The comment content", + "date": "2023-05-18T09:13:56.656Z", +} +~~~ + +### Antwort + +Die Route gibt ein JSON-Objekt mit der ID des neu hinzugefügten Kommentars zurück. + +Beispiel: + +~~~json +{ + "id": 1 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md new file mode 100644 index 0000000..1939f01 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md @@ -0,0 +1,51 @@ +--- +sidebar_label: POST /cards +title: POST /cards +description: Sie können die REST-Route POST /cards in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# POST `/cards` + +### Beschreibung + +@short: Erstellt eine neue Karte und gibt ein JSON-Objekt mit einer neuen Karten-ID zurück. + +Die Route verarbeitet die **HTTP POST**-Anfrage, die an den Pfad `/cards` gesendet wird. + +### Payload + +Der Server erwartet ein JSON-Objekt mit den folgenden Eigenschaften: + +| Name | Typ | Beschreibung | +| ----------- | ----------- | ------------ | +| `label` | string | *Erforderlich*. Der Name der neuen hinzuzufügenden Karte. | +| `column` | number | *Erforderlich*. Die Ziel-Spalten-ID. | +| `row` | number | *Erforderlich*. Die Ziel-Zeilen-ID. | + +Beispiel: + +~~~json +{ + "label": "New card", + "column": 2, + "row": 1, +} +~~~ + +### Antwort + +Die Route gibt ein JSON-Objekt mit einer neuen Karten-ID zurück. + +Beispiel: + +~~~json +{ + "id": 1 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md new file mode 100644 index 0000000..271d1a8 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md @@ -0,0 +1,35 @@ +--- +sidebar_label: POST /cards/{id}/vote +title: POST /cards/{cardId}/vote +description: Sie können mehr über die POST /cards/{cardId}/vote REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# POST `/cards/{cardId}/vote` + +### Beschreibung + +@short: Fügt der Karte eine neue Stimme hinzu und gibt ein JSON-Objekt mit der ID des abstimmenden Benutzers zurück. + +Die Route verarbeitet die **HTTP POST**-Anfrage, die an den Pfad `/cards/{cardId}/vote` gesendet wird. + +### Payload + +Es ist kein Payload erforderlich. + +### Antwort + +Die Route gibt ein JSON-Objekt mit der ID des abstimmenden Benutzers zurück. + +Beispiel: + +~~~json +{ + "id": 1 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md new file mode 100644 index 0000000..d878886 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md @@ -0,0 +1,47 @@ +--- +sidebar_label: POST /columns +title: POST /columns +description: Sie können mehr über die POST /columns REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# POST `/columns` + +### Beschreibung + +@short: Fügt eine neue Spalte hinzu und gibt ein JSON-Objekt mit der Spalten-ID zurück + +Die Route verarbeitet die **HTTP POST**-Anfrage, die an den Pfad `/columns` gesendet wird. + +### Payload + +Der Server erwartet ein JSON-Objekt mit den folgenden Eigenschaften: + +| Name | Typ | Beschreibung | +| ----------- | ----------- | ------------ | +| `label` | string | *Erforderlich*. Der Name der hinzuzufügenden neuen Spalte. | + +Beispiel: + +~~~json +{ + "label": "Neue Spalte", +} +~~~ + +### Antwort + +Die Route gibt ein JSON-Objekt mit der ID der neuen Spalte zurück. + +Beispiel: + +~~~json +{ + "id": 4 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md new file mode 100644 index 0000000..8a4ac9b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md @@ -0,0 +1,54 @@ +--- +sidebar_label: POST /links +title: POST /links +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die REST-Route POST /links. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# POST `/links` + +### Beschreibung + +@short: Erstellt einen neuen Link und gibt ein JSON-Objekt mit einer neuen Link-ID zurück. + +Die Route verarbeitet die **HTTP POST**-Anfrage, die an den Pfad `/links` gesendet wird. + +### Payload + +Der Server erwartet ein JSON-Objekt mit den folgenden Eigenschaften: + +| Name | Typ | Beschreibung | +| ----------- | ---------------------- | ------------ | +| `source` | *number* oder *string* | *Erforderlich*. Die ID des Start-Links. | +| `target` | *number* oder *string* | *Erforderlich*. Die ID des End-Links. | +| `relation` | *string* | *Erforderlich*. Der Typ der durch den Link erstellten Beziehung. | + +Beispiel: + +~~~json +{ + "source": 1, + "target": 2, + "relation": "relatesTo" +} +~~~ + +### Antwort + +Die Route gibt ein JSON-Objekt mit einer neuen Link-ID zurück. + +Beispiel: + +~~~json +{ + "id": 1 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: +- [Working with server](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md new file mode 100644 index 0000000..9289f4b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /rows +title: POST /rows +description: Sie können die REST-Route POST /rows in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# POST /rows + +### Beschreibung + +@short: Fügt eine neue Zeile hinzu und gibt ein JSON-Objekt mit der Zeilen-ID zurück. + +Die Route verarbeitet die **HTTP POST**-Anfrage, die an den Pfad **'/rows'** gesendet wird. + +### Payload + +Der Server erwartet ein JSON-Objekt mit den folgenden Eigenschaften: + +| Name | Typ | Beschreibung | +| ----------- | ----------- | ----------- | +| `label` | string | *Erforderlich*. Der Name der hinzuzufügenden neuen Zeile.| +| `collapsed` | boolean | *Optional*. Der aktuelle Zustand der Zeile (Swimlane). Standardmäßig ist die Zeile erweitert (der Wert ist **false**). Ist der Wert **true**, wird die Zeile initial eingeklappt.| + +Beispiel: + +~~~json +{ + "label": "New row", + "collapsed": "true", +} +~~~ + +### Antwort + +Die Route gibt ein JSON-Objekt mit der neuen Zeilen-ID zurück. + +Beispiel: + +~~~json +{ + "id": 2 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md new file mode 100644 index 0000000..479e4fa --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md @@ -0,0 +1,57 @@ +--- +sidebar_label: POST /uploads +title: POST /uploads +description: Sie können die REST-Route POST /uploads in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek nachlesen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# POST `/uploads` + +### Beschreibung + +@short: Lädt eine Binärdatei auf den Server hoch und gibt ein JSON-Objekt mit der Datei-ID, dem Namen und der URL zurück + +Die Route verarbeitet die **HTTP POST** Multipart-Anfrage, die an den Pfad `/uploads` gesendet wird. + +### Payload + +Der Server muss eine Binärdatei über eine **multipart/form-data**-Anfrage erhalten. Wie bei allen Multipart-MIME-Typen sollte der Anfrage-Body Folgendes enthalten: + +- den **Content-Disposition**-Header, der auf **form-data** gesetzt sein muss + - das **name**-Attribut mit dem Wert **upload** + - **filename** – der ursprüngliche Dateiname der hochgeladenen Datei +- den **Content-Type**-Header – der Typ des Datei-Inhalts + +Pro Anfrage kann nur eine Datei gesendet werden. + +Beispiel: + +~~~ +------WebKitFormBoundarySlwgXDBw7kcKSI4p +Content-Disposition: form-data; name="upload"; filename="myImage.png" +Content-Type: image/png + +------WebKitFormBoundarySlwgXDBw7kcKSI4p-- +~~~ + +### Antwort + +Die Route gibt ein JSON-Objekt mit der Datei-ID, dem Namen und der URL zurück. + +Die Eigenschaft **isCover** zeigt an, ob es sich bei dem Bild um ein Titelbild (true) oder nicht (false) handelt. + +Beispiel: + +~~~ json +{ + "id":4, + "name":"myImage.png", + "url":"http://localhost:3000/uploads/4/myImage.png", + "isCover":false +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md new file mode 100644 index 0000000..94cd7af --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md @@ -0,0 +1,56 @@ +--- +sidebar_label: PUT /cards/{id}/comments/{id} +title: PUT /cards/{cardId}/comments/{commentId} +description: Sie können die REST-Route PUT /cards/{cardId}/comments/{cardId} in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# PUT `/cards/{cardId}/comments/{commentId}` + +### Beschreibung + +@short: Aktualisiert einen Kommentar in einer Karte und gibt ein JSON-Objekt mit der ID des aktualisierten Kommentars zurück. + +Die Route verarbeitet die **HTTP PUT**-Anfrage, die an den Pfad `cards/{cardId}/comments/{commentId}` gesendet wird. + +### Pfadparameter + +Die folgenden Parameter werden in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ----------- | ----------- | ------------ | +| `cardId` | number | *Erforderlich*. Die ID der Karte, deren Kommentar aktualisiert wird. | +| `commentId` | number | *Erforderlich*. Die ID des zu aktualisierenden Kommentars. | + +### Payload + +Der Server erwartet ein JSON-Objekt mit den folgenden Eigenschaften: + +| Name | Typ | Beschreibung | +| ----------- | ----------- | ------------ | +| `text` | string | *Erforderlich*. Der Text des Kommentars.| + +Beispiel: + +~~~json +{ + "text": "The comment's content" +} +~~~ + +### Antwort + +Der Server gibt ein JSON-Objekt mit einer Karten-ID zurück. + +Beispiel: + +~~~json +{ + "id": 4 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md new file mode 100644 index 0000000..5c6263b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md @@ -0,0 +1,93 @@ +--- +sidebar_label: PUT /cards/{id}/move +title: PUT /cards/{id}/move +description: Sie können mehr über die PUT /cards/{id}/move REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchstöbern Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# PUT `/cards/{id}/move` + +### Beschreibung + +@short: Verschiebt Karten an eine bestimmte Position + +Die Route verarbeitet die **HTTP PUT**-Anfrage, die an den Pfad `cards/{id}/move` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der zu verschiebenden Karte. Falls mehrere Karten verschoben werden sollen, muss die id auf 0 gesetzt werden.| + +:::info +Wenn Sie mehrere Karten verschieben, stellen Sie sicher, dass `id` auf 0 gesetzt ist. Andernfalls (wenn ein anderer Wert gesetzt ist) wird nur eine Karte (mit diesem angegebenen id-Wert) verschoben. +::: + +### Payload + +Der Server erwartet ein JSON-Objekt mit den folgenden Eigenschaften: + +| Name | Typ | Beschreibung | +| ----------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der verschobenen Karte. | +| `columnId` | number | *Erforderlich*. Die ID der Spalte, in die die Karte verschoben wird. | +| `rowId` | number | *Erforderlich*. Die ID der Zeile, in die die Karte verschoben wird. | +| `before` | number | *Optional*. Die ID der Karte, vor der die verschobene Karte platziert werden soll. | +| `batch` | object | *Erforderlich bei Mehrfachauswahl*. Ein Array von Kartenobjekten, die verschoben werden. | + +Beispiel: + +~~~json +{ + "id": 4, + "columnId": 2, + "rowId": 1, + "before": "7" +} +~~~ + +Wenn mehrere Karten verschoben werden, sollte die Eigenschaft `batch` ein Array aller zu verschiebenden Kartenobjekte enthalten: + +~~~json +{ + "batch": [ + { + "id": 2, + "columnId": 1, + "rowId": 1, + "before": "1" + }, + { + "id": 7, + "columnId": 1, + "rowId": 1, + "before": "1" + } + ] +} +~~~ + +### Antwort + +Der Server gibt ein JSON-Objekt mit einer Karten-ID zurück (wenn eine einzelne Karte verschoben wird) oder mit der ID auf 0 gesetzt bei einer Operation auf mehreren Karten. + +Beispiel: + +~~~json title="Antwort auf die Anfrage für die einzelne Kartenoperation" +{ + "id": 4 +} +~~~ + +~~~json title="Antwort auf die Anfrage für die Operation mit mehreren Karten" +{ + "id": 0 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md new file mode 100644 index 0000000..cf4e255 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md @@ -0,0 +1,71 @@ +--- +sidebar_label: PUT /cards +title: PUT /cards +description: Sie können die PUT /cards REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# PUT `/cards` + +### Beschreibung + +@short: Aktualisiert Daten auf einer angegebenen Karte und gibt ein leeres JSON-Objekt zurück + +Die Route verarbeitet die **HTTP PUT**-Anfrage, die an den Pfad `/cards/{id}` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der zu aktualisierenden Karte. | + +### Payload + +Der Server muss ein JSON-Objekt erhalten, das das Kartenobjekt enthält und alle Eigenschaften der Karte umfasst (sowohl unveränderte als auch neue/geänderte). + +| Name | Typ | Beschreibung | +| ------------- | ----------- | ------------ | +| `label` | string | *Erforderlich*. Der Name der zu aktualisierenden Karte. | +| `description` | string | *Erforderlich*. Die Beschreibung der Karte. | +| `column` | number | *Erforderlich*. Die ID der Spalte, auf die sich die Karte bezieht. | +| `row` | number | *Erforderlich*. Die ID der Zeile, auf die sich die Karte bezieht. | +| `start_date` | string | *Erforderlich*. Das Startdatum im ISO-Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `end_date` | string | *Erforderlich*. Das Enddatum im ISO-Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `progress` | number | *Erforderlich*. Der Wert der Fortschrittsanzeige im Bereich von 0 bis 100 Punkten. | +| `attached` | object | *Erforderlich*. Ein Array mit Daten der angehängten Datei(en). Siehe das Objektbeispiel hier [**cards**](api/config/js_kanban_cards_config.md) | +| `color` | string | *Erforderlich*. Die Farbe der oberen Kartenlinie im HEX-Format. | +| `priority` | number | *Erforderlich*. Die Prioritäts-ID der Karte. | +| `users` | object | *Erforderlich*. Ein Array mit den IDs der zugewiesenen Benutzer. Siehe das Objektbeispiel hier [**cardShape**](api/config/js_kanban_cardshape_config.md) | + +Beispiel: + +~~~json +{ + "card": { + "label": "Drag and drop", + "description": "", + "column": 3, + "row": 1, + "start_date": null, + "end_date": "2018-01-01T00:00:00Z", + "progress": 100, + "attached": [], + "color": "#58C3FE", + "priority": 2, + "users": [] + }, +} +~~~ + +Ein weiteres Beispiel für das Kartenobjekt finden Sie im Abschnitt [**cards**](api/config/js_kanban_cards_config.md). + +### Antwort + +Im Erfolgsfall wird ein leeres JSON-Objekt zurückgegeben. + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md new file mode 100644 index 0000000..05c3e1b --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /columns/{id}/move +title: PUT /columns/{id}/move +description: Sie können die PUT /columns/{id}/move REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwickleranleitungen und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# PUT `/columns/{id}/move` + +### Beschreibung + +@short: Verschiebt eine Spalte an eine angegebene Position + +Die Route verarbeitet die **HTTP PUT**-Anfrage, die an den Pfad `columns/{id}/move` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der zu verschiebenden Spalte. | + +### Payload + +Der Server erwartet ein JSON-Objekt mit den folgenden Eigenschaften: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `before` | number | *Optional*. Die ID der Spalte, vor der die verschobene Spalte platziert werden soll. | + +Beispiel: + +~~~json +{ + "before": 3 +} +~~~ + +### Antwort + +Der Server gibt ein JSON-Objekt mit der ID der verschobenen Spalte zurück. + +Beispiel: + +~~~json +{ + "id": 4 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md new file mode 100644 index 0000000..c69dcb4 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /columns +title: PUT /columns +description: Sie können die PUT /columns REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek kennenlernen. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# PUT `/columns` + +### Beschreibung + +@short: Aktualisiert Daten einer angegebenen Spalte und gibt ein leeres JSON-Objekt zurück + +Die Route verarbeitet die **HTTP PUT**-Anfrage, die an den Pfad `/columns/{id}` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der zu aktualisierenden Spalte.| + +### Nutzlast + +Der Server muss ein JSON-Objekt mit allen Spalteneigenschaften erhalten (sowohl unveränderte als auch neue/geänderte). + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `label` | string | *Erforderlich*. Der Name der zu aktualisierenden Spalte.| +| `collapsed`| boolean | *Optional*. Der Zustand der Spalte: **true**, wenn die Spalte initial eingeklappt ist, und **false** für den ausgeklappten Zustand (Standard).| + +Beispiel: + +~~~json +{ + "column": { + "label": "Column 1", + "collapsed": false, + } +} +~~~ + +Ein weiteres Beispiel für das Spaltenobjekt finden Sie im Abschnitt [**columns**](api/config/js_kanban_columns_config.md). + +### Antwort + +Im Erfolgsfall wird ein leeres JSON-Objekt zurückgegeben. + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md new file mode 100644 index 0000000..2f1bb36 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /rows/{id}/move +title: PUT /rows/{id}/move +description: Sie können mehr über die PUT /rows/{id}/move REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# PUT `/rows/{id}/move` + +### Beschreibung + +@short: Verschiebt eine Zeile an eine bestimmte Position + +Die Route verarbeitet die **HTTP PUT**-Anfrage, die an den Pfad `rows/{id}/move` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `id` | number | *Erforderlich*. Die ID der zu verschiebenden Zeile.| + +### Payload + +Der Server erwartet ein JSON-Objekt mit den folgenden Eigenschaften: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------ | +| `before` | number | *Optional*. Die ID der Zeile, vor der die verschobene Zeile platziert werden soll.| + +Beispiel: + +~~~json +{ + "before": 3 +} +~~~ + +### Antwort + +Der Server gibt ein JSON-Objekt mit der ID der verschobenen Zeile zurück. + +Beispiel: + +~~~json +{ + "id": 4 +} +~~~ + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md new file mode 100644 index 0000000..419197d --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /rows +title: PUT /rows +description: Sie können mehr über die PUT /rows REST-Route in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren. Durchsuchen Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# PUT `/rows` + +### Beschreibung + +@short: Aktualisiert Daten in einer angegebenen Zeile (Swimlane) und gibt ein leeres JSON-Objekt zurück + +Die Route verarbeitet die **HTTP PUT**-Anfrage, die an den Pfad `/rows/{id}` gesendet wird. + +### Pfadparameter + +Der folgende Parameter wird in der Anforderungszeile übergeben: + +| Name | Typ | Beschreibung | +| ---------- | ----------- | ------------| +| `id` | number | *Erforderlich*. Die ID der Zeile (Swimlane), die aktualisiert werden soll.| + +### Payload + +Der Server muss ein JSON-Objekt mit allen Eigenschaften der Zeile erhalten (sowohl unveränderte als auch neue/geänderte). + +| Name | Typ | Beschreibung | +| ----------- | ----------- | ------------| +| `label` | string | *Erforderlich*. Der Name der zu aktualisierenden Zeile.| +| `collapsed` | boolean | *Optional*. Der Zustand der Zeile: **true**, wenn die Zeile anfangs eingeklappt ist, und **false** für den ausgeklappten Zustand (Standard).| + +Beispiel: + +~~~json +{ + "row": { + "label": "Row 1", + "collapsed": false, + } +} +~~~ + +Ein weiteres Beispiel für das row-Objekt finden Sie im Abschnitt [**rows**](api/config/js_kanban_rows_config.md). + +### Antwort + +Im Erfolgsfall wird ein leeres JSON-Objekt zurückgegeben. + +Der HTTP-Statuscode zeigt an, ob die Anfrage erfolgreich war (response.status == 200) oder fehlgeschlagen ist (response.status == 500). + +--- + +**Verwandte Artikel**: [Arbeiten mit dem Server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png b/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png new file mode 100755 index 0000000..247c695 Binary files /dev/null and b/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png differ diff --git a/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png b/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png new file mode 100755 index 0000000..525d0d0 Binary files /dev/null and b/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png differ diff --git a/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png b/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png new file mode 100644 index 0000000..f6aa948 Binary files /dev/null and b/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png differ diff --git a/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png b/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png new file mode 100755 index 0000000..4c79b7f Binary files /dev/null and b/i18n/de/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png differ diff --git a/i18n/de/docusaurus-plugin-content-docs/current/assets/trial_kanban.png b/i18n/de/docusaurus-plugin-content-docs/current/assets/trial_kanban.png new file mode 100644 index 0000000..e71d948 Binary files /dev/null and b/i18n/de/docusaurus-plugin-content-docs/current/assets/trial_kanban.png differ diff --git a/i18n/de/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png b/i18n/de/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png new file mode 100644 index 0000000..555b3f1 Binary files /dev/null and b/i18n/de/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png differ diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/configuration.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/configuration.md new file mode 100644 index 0000000..f16faa4 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/configuration.md @@ -0,0 +1,577 @@ +--- +sidebar_label: Konfiguration +title: Konfiguration +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Konfiguration. Stöbern Sie in Entwicklerhandbüchern und der API-Referenz, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# Konfiguration + +Das Aussehen und die Funktionalität von *Kanban* können Sie über die entsprechende API konfigurieren. Die verfügbaren Parameter ermöglichen es Ihnen: + +- das Erscheinungsbild der Karten über die [`cardShape`](api/config/js_kanban_cardshape_config.md) Eigenschaft zu konfigurieren +- die Editor-Felder über die [`editorShape`](api/config/js_kanban_editorshape_config.md) Eigenschaft zu konfigurieren +- das Verhalten des Editors über die [`editor`](api/config/js_kanban_editor_config.md) Eigenschaft zu konfigurieren +- Rendering und Scrollen über die Eigenschaften [`renderType`](api/config/js_kanban_rendertype_config.md) und [`scrollType`](api/config/js_kanban_scrolltype_config.md) zu konfigurieren +- die Kanban-Historie über die [`history`](api/config/js_kanban_history_config.md) Eigenschaft zu konfigurieren +- das Erscheinungsbild der Karten über die [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) Eigenschaft anzupassen + - *Details finden Sie im Abschnitt [**Customization**](guides/customization.md)!* +- die gewünschte Sprache über die [`locale`](api/config/js_kanban_locale_config.md) Eigenschaft anzuwenden + - *Details finden Sie im Abschnitt [**Localization**](guides/localization.md)!* +- Daten für Karten, Spalten, Zeilen und Verknüpfungen über die entsprechenden Eigenschaften [`cards`](api/config/js_kanban_cards_config.md), [`columns`](api/config/js_kanban_columns_config.md), [`rows`](api/config/js_kanban_rows_config.md) und [`links`](api/config/js_kanban_links_config.md) zu laden + - *Details finden Sie im Abschnitt [**Working with data**](guides/working_with_data.md)!* + +## Karten + +Das Kanban-Board besteht aus *Karten*, die auf *Spalten* und *Zeilen* verteilt sind. Sie können das Erscheinungsbild der Karten mit der [`cardShape`](api/config/js_kanban_cardshape_config.md) Konfigurationseigenschaft anpassen. Es gibt mehrere vordefinierte Felder, die Sie in die Kartenvorlage einfügen (oder ausschließen) können, nämlich: + +- eine Kartenbezeichnung über die `label: boolean` Konfiguration +- eine Kartenbeschreibung über die `description: boolean` Konfiguration + + :::tip + Sie können die Felder **label** und **description** jeder Karte über die entsprechenden Eingabefelder des Kanban-Editors verwalten. Wenn Sie diese Felder aktivieren, werden die entsprechenden Eingaben im Editor automatisch angezeigt. Zum Konfigurieren dieser Eingaben können Sie die Typen [**text** und **textarea**](#text--und-textarea-typen) verwenden. + ::: + +- einen Kartenfortschritt über die `progress: boolean` Konfiguration + + :::tip + Sie können das **progress**-Feld jeder Karte über das entsprechende Steuerelement des Kanban-Editors verwalten. Wenn Sie dieses Feld aktivieren, wird das entsprechende Steuerelement im Editor automatisch angezeigt. Zum Konfigurieren dieses Steuerelements können Sie den Typ [**progress**](#progress-typ) verwenden. + ::: + +- ein Startdatum über die `start_date: boolean` Konfiguration +- ein Enddatum über die `end_date: boolean` Konfiguration + + :::tip + Sie können die Felder **start date** und **end date** jeder Karte über die entsprechenden Steuerelemente des Kanban-Editors verwalten. Wenn Sie diese Felder aktivieren, werden die entsprechenden Steuerelemente im Editor automatisch angezeigt. Zum Konfigurieren dieser Steuerelemente können Sie den Typ [**date**](#date--und-daterange-typen) verwenden. + ::: + +- ein Kontextmenü für Karten über die `menu: boolean` Konfiguration +- einen Dateianhang über die `attached: boolean` Konfiguration + + :::tip + Sie können **Dateien an jede Karte anhängen** über das entsprechende Feld des Kanban-Editors. Zum Konfigurieren dieses Feldes können Sie den Typ [**files**](#files-typ) verwenden. + ::: + +- eine Kartenfarbe über die `color: boolean` Konfiguration + + :::tip + Sie können die **obere Farblinie** jeder Karte über das entsprechende Steuerelement des Kanban-Editors verwalten. Wenn Sie **color** aktivieren, wird das entsprechende Steuerelement (*colorpicker*) im Editor automatisch angezeigt. Zum Konfigurieren dieses Steuerelements können Sie den Typ [**color**](#color-typ) verwenden. + ::: + +- ein Karten-Cover (*Vorschaubild*) über die `cover: boolean` Konfiguration +- Kommentare zu einer Karte über die `comments: boolean` Konfiguration +- einen Bestätigungsdialog zum Löschen der Karte über die `confirmDeletion: boolean` Konfiguration +- eine Abstimmungsmöglichkeit über die `votes: boolean | { show: boolean, clicable: true }` Konfiguration +- eine Benutzerzuweisung über die `users: boolean | { show: boolean, values: object, maxCount: number | false }` Konfiguration + + :::tip + Sie können einer Karte einen oder mehrere Benutzer über das entsprechende Steuerelement des Kanban-Editors zuweisen. Zum Konfigurieren des Steuerelements für die Zuweisung eines einzelnen Benutzers verwenden Sie die Typen [**combo** oder **select**](#combo--select--und-multiselect-typen). Für die Zuweisung mehrerer Benutzer nutzen Sie den Typ [**multiselect**](#combo--select--und-multiselect-typen). + ::: + +- eine Kartenpriorität über die `priority: boolean | { show: boolean, values: object }` Konfiguration + + :::tip + Sie können die **priority**-Eigenschaft jeder Karte über das entsprechende Steuerelement des Kanban-Editors verwalten. Wenn Sie **priority** aktivieren, wird das entsprechende Steuerelement im Editor automatisch angezeigt. Zum Konfigurieren dieses Steuerelements können Sie nur die Typen [**combo** oder **select**](#combo--select--und-multiselect-typen) verwenden. + ::: + +- *ein benutzerdefiniertes Feld* über die `headerFields: [ { key: string, label: string, css: string } ]` Konfiguration + +~~~jsx {12-35,42} +const users = [ // Nutzerdaten + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // Prioritätsdaten für Karten + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardShape = { // Karteneinstellungen + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + priority: { + show: true, + values: cardPriority + }, + users: { + show: true, + values: users + }, + headerFields: [ + { + key: "sprint", + label: "Custom field", + css: "custom_css_class" + } + ] +}; + +new kanban.Kanban("#root", { + // Kartendaten + columns, + cards, + // Karteneinstellungen + cardShape +}); +~~~ + +:::note +Sofern Sie keine Karteneinstellungen über die [`cardShape`](api/config/js_kanban_cardshape_config.md) Eigenschaft angeben, verwendet das Widget einen [**defaultCardShape**](api/config/js_kanban_cardshape_config.md#default-config) Parametersatz! +::: + +## Editor + +:::info +Sie können den Editor als **Seitenleiste** oder **modales Fenster** anzeigen lassen, indem Sie die [`editor.placement`](api/config/js_kanban_editor_config.md) Eigenschaft verwenden! +::: + +Der *Editor* von Kanban besteht aus Feldern zur Verwaltung der Kartendaten. Zum Konfigurieren der Editor-Felder (Steuerelemente) verwenden Sie die [`editorShape`](api/config/js_kanban_editorshape_config.md) Eigenschaft. Folgende Typen von Editor-Feldern stehen zur Verfügung: + +- [**combo**, **select** und **multiselect**](#combo--select--und-multiselect-typen) +- [**color**](#color-typ) +- [**text** und **textarea**](#text--und-textarea-typen) +- [**progress**](#progress-typ) +- [**files**](#files-typ) +- [**date** und **dataRange**](#date--und-daterange-typen) +- [**comments**](#comments-typ) +- [**links**](#links-typ) + +### Combo-, Select- und Multiselect-Typen + +Die Editor-Felder der Typen **combo**, **select** und **multiselect** können wie folgt gesetzt werden: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", // oder "select" und "multiselect" + key: "priority", // Der "priority"-Schlüssel wird bei der Konfiguration der "cardShape"-Eigenschaft verwendet + label: "Priority", + values: [ + { id: 1, label: "high" }, + { id: 2, label: "medium" }, + { id: 3, label: "low" } + ] + }, + // Einstellungen anderer Felder + ] +}); +~~~ + +:::info +Für Editor-Felder vom Typ **"multiselect"** und **"combo"** können Sie auch einen Pfad zum Vorschaubild über die Eigenschaft **avatar** angeben: + +~~~jsx {3,9,13} +editorShape: [ + { + type: "multiselect", // oder "combo" + key: "users", // Der "users"-Schlüssel wird bei der Konfiguration der "cardShape"-Eigenschaft verwendet + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + { + id: 2, label: "John", + avatar: "preview_image_path_2.png" + } + ] + }, + // Einstellungen anderer Felder +] +~~~ + +[**Kanban. Limiting assignments to one user only**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban) +::: + +### Color-Typ + +Das Editor-Feld vom Typ **color** kann wie folgt gesetzt werden: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "color", + key: "color", // Der "color"-Schlüssel wird bei der Konfiguration der "cardShape"-Eigenschaft verwendet + label: "Card color", + values: ["#65D3B3", "#FFC975", "#58C3FE"], + config: { + clear: true, + placeholder: "Select color" + } + }, + // Einstellungen anderer Felder + ] +}); +~~~ + +### Text- und Textarea-Typen + +Die Editor-Felder der Typen **text** und **textarea** können wie folgt gesetzt werden: + +~~~jsx {3-14} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "text", // oder "textarea" + key: "label", + label: "Label", + config: { + placeholder: "Type your tips here", + readonly: false, + focus: true, + disabled: false, + inputStyle: "height: 50px;" + } + }, + // Einstellungen anderer Felder + ] +}); +~~~ + +### Progress-Typ + +Das Editor-Feld vom Typ **progress** kann wie folgt gesetzt werden: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "progress", + key: "progress", // Der "progress"-Schlüssel wird bei der Konfiguration der "cardShape"-Eigenschaft verwendet + label: "Progress", + config: { + min: 10, + max: 90, + step: 5 + } + }, + // Einstellungen anderer Felder + ] +}); +~~~ + +### Files-Typ + +Das Editor-Feld vom Typ **files** kann wie folgt gesetzt werden: + +#### Upload-URL als String konfigurieren + +~~~jsx {4-15} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + { + type: "files", + key: "attached", // Der "attached"-Schlüssel wird bei der Konfiguration der "cardShape"-Eigenschaft verwendet + label: "Attachment", + uploadURL: url + "/uploads", // URL als String angeben + config: { + accept: "image/*", // "video/*", "audio/*" + disabled: false, + multiple: true, + folder: false + } + }, + // Einstellungen anderer Felder + ] +}); +~~~ + +#### Upload-URL als Funktion konfigurieren + +~~~jsx {9-31} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + ...defaultEditorShape, + { + key: "attached", + type: "files", + label: "Files", + uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // token oder andere Header hier + } + }; + + return fetch(url + "/uploads", config) // URL hier + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); + } + } + ] +}); +~~~ + +### Date- und DateRange-Typen + +Das Editor-Feld vom Typ **date** kann wie folgt gesetzt werden: + +~~~jsx {3-8} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "date", + key: "start_date", + label: "Start date", + format: "%d/%m/%y" + }, + // Einstellungen anderer Felder + ] +}); +~~~ + +Das Editor-Feld vom Typ **dateRange** kann wie folgt gesetzt werden: + +~~~jsx {3-11} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "dateRange", + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range", + format: "%d/%m/%y" + }, + // Einstellungen anderer Felder + ] +}); +~~~ + +### Comments-Typ + +Das Editor-Feld vom Typ **comments** kann wie folgt gesetzt werden: + +~~~jsx {3-13} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "comments", + key: "comments", + label: "Comments", + config: { + dateFormat: "%M %d", + placement: "page", // oder "editor" + html: true, + confirmDeletion: true + } + }, + // Einstellungen anderer Felder + ] +}); +~~~ + +### Links-Typ + +Das Editor-Feld vom Typ **links** kann wie folgt gesetzt werden: + +~~~jsx {3-10} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "links", + key: "links", + label: "Links", + config: { + confirmDeletion: true + } + }, + // Einstellungen anderer Felder + ] +}); +~~~ + +### Editor-Felder an Kartenfelder binden + +:::info +Um das Editor-Feld mit dem entsprechenden Kartenfeld zu verbinden, müssen Sie einen speziellen **key** im Objekt der [`editorShape`](api/config/js_kanban_editorshape_config.md) Eigenschaft angeben (`key: "editor_field_key"`). Der Wert dieses Schlüssels muss auf *true* in der [`cardShape`](api/config/js_kanban_cardshape_config.md) Eigenschaft gesetzt werden (für eingebaute Kartenfelder) oder im **headerFields** Array angegeben werden (für benutzerdefinierte Kartenfelder). Sie können die Anfangsdaten jedes Feldes auch über diesen Schlüssel bereitstellen. + +~~~jsx {5,13,22,25,33-34,38-39,45-47} +// Editor-Einstellungen +const editorShape = [ + { + type: "text", + key: "label", + label: "Label", + config: { + placeholder: "Enter new label here" + } + }, + { + type: "textarea", + key: "note", + label: "Note", + config: { + placeholder: "Enter usefull note here" + } + } +]; +// Karteneinstellungen +const cardShape = { + label: true, // Schlüssel eines eingebauten Feldes + headerFields: [ + { + key: "note", // Schlüssel eines benutzerdefinierten Feldes + label: "Note" + } + ] +}; +// Kartendaten +const cards = [ + { + label: "Volvo", + note: "It is the swedish car", + column: "backlog" + }, + { + label: "Audi", + note: "It is the german car", + column: "backlog" + } +]; +// Kanban erstellen +new kanban.Kanban("#root", { + editorShape, + cardShape, + cards, + columns + // andere Konfigurationsparameter +}); +~~~ +::: + +:::note +Sofern Sie keine Editor-Einstellungen über die [`editorShape`](api/config/js_kanban_editorshape_config.md) Eigenschaft angeben, verwendet das Widget einen [**defaultEditorShape**](api/config/js_kanban_editorshape_config.md#default-config) Parametersatz. In diesem Fall werden die Standard-Steuerelemente und Eingaben im Editor erst angezeigt, nachdem die entsprechenden Felder der Karten über die [`cardShape`](api/config/js_kanban_cardshape_config.md) Eigenschaft aktiviert wurden. +::: + +### Den Editor konfigurieren + +Mit der [`editor`](api/config/js_kanban_editor_config.md) Eigenschaft können Sie den Editor wie folgt konfigurieren: + +- Aktivieren/Deaktivieren des Autosave-Modus des Editors über die *`editor.autoSave`* Eigenschaft +- Angabe einer Verzögerungszeit für das automatische Speichern der Daten über die Eigenschaft *`editor.debounce`* (funktioniert nur mit dem Parameter ***autoSave: true***) + +~~~jsx {6-9} +// Kanban erstellen +new kanban.Kanban("#root", { + columns, + cards, + editorShape, + editor: { + autoSave: true, + debounce: 2000 + } + // weitere Parameter +}); +~~~ + +## Toolbar + +Die **Toolbar** von Kanban besteht aus einer Suchleiste zum *Suchen von Karten* sowie Steuerelementen zum *Sortieren von Karten* und zum *Hinzufügen neuer Spalten und Zeilen*. Um die Toolbar anzuzeigen, müssen Sie sie in einem separaten Container mit dem **kanban.Toolbar()** Konstruktor initialisieren. + +~~~jsx {13} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + // Daten + columns, + cards, + rows, + // Karteneinstellungen + cardShape, + // Editor-Einstellungen + editorShape +}); + +new kanban.Toolbar("#toolbar", { api: board.api }); +~~~ + +Sie können die Steuerelemente der Toolbar (*ausblenden/anzeigen/anpassen*) mit der Eigenschaft **items** verwalten: + +~~~jsx {6-51} +// Kanban erstellen +const board = new kanban.Kanban("#root", {...}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { // benutzerdefinierte Suchleiste + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", // Leerraum + "undo", // Steuerelement zum Rückgängigmachen von Kartenaktionen in der Historie + "redo", // Steuerelement zum Wiederherstellen von Kartenaktionen in der Historie + { // benutzerdefiniertes Sortier-Steuerelement + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", // Steuerelement zum Hinzufügen neuer Spalten + "addRow", // Steuerelement zum Hinzufügen neuer Zeilen + // benutzerdefinierte Elemente + ] +}); +~~~ + +:::tip +Um bestimmte Steuerelemente der Toolbar auszublenden, entfernen Sie die entsprechenden Zeichenfolgen aus dem **items** Array. +::: + +## Beispiel + +In diesem Beispiel sehen Sie, wie Sie **Karten**, **Editor** und **Toolbar** von Kanban konfigurieren können: + + \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/customization.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/customization.md new file mode 100644 index 0000000..4cb1286 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/customization.md @@ -0,0 +1,42 @@ +--- +sidebar_label: Anpassung +title: Anpassung +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Anpassungsmöglichkeiten. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# Anpassung + +Neben der Konfiguration von Kanban können Sie auch das Aussehen und Verhalten individuell anpassen. Das Widget ermöglicht es Ihnen, eine eigene Vorlage für Karten festzulegen, das Kontextmenü für Karten, Spalten und Zeilen zu modifizieren, die Struktur und Funktionalität der Toolbar zu verändern sowie eigene CSS-Stile auf Kanban anzuwenden. + +## Eigene Karten + +Um Karten mit einer eigenen Vorlage darzustellen, können Sie die [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md)-Eigenschaft verwenden. Dies ist eine Callback-Funktion, mit der Sie gewünschte Stile und Logik definieren und auf Kanban anwenden können. Siehe folgendes Beispiel: + + + +## Eigenes Kontextmenü + +Um das Kontextmenü für Karten, Spalten und Zeilen anzupassen, können Sie die entsprechenden Eigenschaften [`cardShape`](api/config/js_kanban_cardshape_config.md), [`columnShape`](api/config/js_kanban_columnshape_config.md) und [`rowShape`](api/config/js_kanban_rowshape_config.md) verwenden. Siehe folgendes Beispiel: + + + +## Eigene Toolbar + +Um die Struktur und Funktionalität der Toolbar anzupassen, können Sie die [`items`](api/config/toolbar_items_config.md)-Eigenschaft verwenden. In diesem Array können Sie die benötigten Steuerelemente definieren, sie in der gewünschten Reihenfolge anordnen und ihr Verhalten anpassen. + +Im folgenden Beispiel sehen Sie, wie Sie Folgendes anpassen können: + +- die Reihenfolge der Steuerelemente +- eine Suchleiste und deren Verhalten +- ein Sortier-Steuerelement und dessen Verhalten +- ein eigenes Steuerelement und dessen Verhalten + + + +## Eigene Stile + +Sie können das Aussehen von Kanban anpassen, indem Sie die Werte der entsprechenden *CSS-Variablen* ändern. Weitere Informationen finden Sie im Abschnitt [**Stilisierung**](guides/stylization.md). + +Im folgenden Beispiel sehen Sie, wie Sie eigene Stile auf Kanban anwenden können: + + \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/initialization.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/initialization.md new file mode 100644 index 0000000..624d9e6 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/initialization.md @@ -0,0 +1,91 @@ +--- +sidebar_label: Initialisierung +title: Initialisierung +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Initialisierung. Durchstöbern Sie Entwicklerhandbücher und API-Referenz, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# Initialisierung + +Diese Anleitung gibt Ihnen eine detaillierte Schritt-für-Schritt-Anleitung, wie Sie Kanban auf einer Seite erstellen, um Ihre Anwendung mit den Funktionen eines Kanban-Boards zu erweitern. Gehen Sie wie folgt vor, um eine einsatzbereite Komponente zu erhalten: + +1. [Binden Sie die Kanban-Quelldateien in die Seite ein](#including-source-files). +2. [Erstellen Sie einen Container für Kanban](#creating-container). +3. [Initialisieren Sie Kanban mit einem Konstruktor](#initializing-kanban). + +## Including source files + +[Laden Sie das Paket herunter](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml) und entpacken Sie es in einen Ordner Ihres Projekts. + +Um Kanban zu erstellen, müssen Sie zwei Quelldateien in Ihre Seite einbinden: + +- *kanban.js* +- *kanban.css* + +Stellen Sie sicher, dass Sie die korrekten relativen Pfade zu den Quelldateien angeben: + +~~~html title="index.html" + + +~~~ + +## Creating container + +Fügen Sie einen Container für Kanban hinzu und geben Sie ihm eine ID, zum Beispiel *"root"*: + +~~~jsx title="index.html" +
+~~~ + +Wenn Sie das Widget zusammen mit der *Toolbar* erstellen möchten, müssen Sie dafür einen separaten Container hinzufügen: + +~~~jsx {1} title="index.html" +
// Container für die Toolbar +
// Container für Kanban +~~~ + +## Initializing Kanban + +Initialisieren Sie Kanban mit dem **kanban.Kanban**-Konstruktor. Er nimmt zwei Parameter entgegen: + +- einen HTML-Container (die ID des HTML-Containers) +- ein Objekt mit Konfigurationseigenschaften. [Siehe die vollständige Liste hier](#configuration-properties) + +~~~jsx title="index.html" +// Kanban erstellen +new kanban.Kanban("#root", { + // Konfigurationseigenschaften +}); +~~~ + +Wenn Sie das Widget zusammen mit der *Toolbar* erstellen möchten, müssen Sie diese separat mit dem **kanban.Toolbar**-Konstruktor initialisieren. Auch dieser nimmt zwei Parameter entgegen: + +- einen HTML-Container (die ID des HTML-Containers) +- ein Objekt mit Konfigurationseigenschaften + +~~~jsx {6-8} title="index.html" +// Kanban erstellen +const board = new kanban.Kanban("#root", { + // Konfigurationseigenschaften +}); + +new kanban.Toolbar("#toolbar", { + // Konfigurationseigenschaften +}); +~~~ + +:::info +Um mehr über die Konfiguration der Toolbar von Kanban zu erfahren, lesen Sie den Abschnitt [**Konfiguration**](guides/configuration.md/#toolbar) +::: + +### Configuration properties + +:::note +Die vollständige Liste der Eigenschaften zur Konfiguration von **Kanban** finden Sie [**hier**](api/overview/properties_overview.md).
+Die vollständige Liste der Eigenschaften zur Konfiguration der **Toolbar von Kanban** finden Sie [**hier**](api/overview/toolbar_properties_overview.md). +::: + +## Beispiel + +In diesem Beispiel sehen Sie, wie **Kanban** mit Anfangsdaten initialisiert wird: + + \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/integration.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration.md new file mode 100644 index 0000000..cdcbfd2 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration.md @@ -0,0 +1,17 @@ +--- +sidebar_label: Integration mit DHTML-Widgets +title: Integration mit DHTML-Widgets +description: Informationen zur Integration finden Sie in der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek. Durchstöbern Sie Entwicklerhandbücher und die API-Referenz, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Integration mit DHTML-Widgets + +Sie können DHTMLX Kanban mit anderen DHTMLX-Widgets integrieren (zum Beispiel mit [Gantt](https://docs.dhtmlx.com/gantt/), [Scheduler](https://docs.dhtmlx.com/scheduler/), [To Do List](https://docs.dhtmlx.com/todolist/)). Sehen Sie sich die folgenden Beispiele an. + +## Integration mit DHTMLX Gantt und Scheduler + + + +## Integration mit DHTMLX To Do List + + \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md new file mode 100644 index 0000000..fce0373 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md @@ -0,0 +1,388 @@ +--- +sidebar_label: Integration mit Angular +title: Integration mit Angular +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Integration mit Angular. Durchstöbern Sie Entwicklerleitfäden und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Integration mit Angular + +:::tip +Sie sollten mit den grundlegenden Konzepten und Mustern von **Angular** vertraut sein, bevor Sie diese Dokumentation lesen. Um Ihr Wissen aufzufrischen, besuchen Sie bitte die [**Angular-Dokumentation**](https://v17.angular.io/docs). +::: + +DHTMLX Kanban ist mit **Angular** kompatibel. Wir haben Codebeispiele vorbereitet, wie Sie DHTMLX Kanban mit **Angular** verwenden können. Weitere Informationen finden Sie im entsprechenden [**Beispiel auf GitHub**](https://github.com/DHTMLX/angular-kanban-demo). + +## Erstellen eines Projekts + +:::info +Bevor Sie beginnen, ein neues Projekt zu erstellen, installieren Sie [**Angular CLI**](https://v17.angular.io/cli) und [**Node.js**](https://nodejs.org/en/). +::: + +Erstellen Sie ein neues **my-angular-kanban-app**-Projekt mit Angular CLI. Führen Sie dazu folgenden Befehl aus: + +~~~json +ng new my-angular-kanban-app +~~~ + +:::note +Wenn Sie dieser Anleitung folgen möchten, deaktivieren Sie bei der Erstellung der neuen Angular-App Server-Side Rendering (SSR) und Static Site Generation (SSG/Prerendering)! +::: + +Der obige Befehl installiert alle notwendigen Tools, sodass keine weiteren Befehle ausgeführt werden müssen. + +### Installation von Abhängigkeiten + +Wechseln Sie in das neu erstellte App-Verzeichnis: + +~~~json +cd my-angular-kanban-app +~~~ + +Installieren Sie die Abhängigkeiten und starten Sie den Entwicklungsserver. Verwenden Sie dafür den [**yarn**](https://yarnpkg.com/) Paketmanager: + +~~~json +yarn +yarn start +~~~ + +Die App sollte nun auf dem lokalen Rechner laufen (zum Beispiel `http://localhost:3000`). + +## Kanban erstellen + +Nun sollten Sie den Quellcode von DHTMLX Kanban beziehen. Stoppen Sie zunächst die App und fahren Sie mit der Installation des Kanban-Pakets fort. + +### Schritt 1. Paketinstallation + +Laden Sie das [**Trial-Kanban-Paket**](/how_to_start/#kanban-mit-npm-oder-yarn-installieren) herunter und folgen Sie den Schritten in der README-Datei. Beachten Sie, dass das Trial-Kanban nur 30 Tage verfügbar ist. + +### Schritt 2. Komponentenerstellung + +Nun müssen Sie eine Angular-Komponente erstellen, um Kanban mit Toolbar zur Anwendung hinzuzufügen. Erstellen Sie den **kanban**-Ordner im Verzeichnis **src/app/** und fügen Sie eine neue Datei mit dem Namen **kanban.component.ts** hinzu. + +#### Quelldateien importieren + +Öffnen Sie die Datei **kanban.component.ts** und importieren Sie die Kanban-Quelldateien. Beachten Sie dabei: + +- Wenn Sie die PRO-Version verwenden und das Kanban-Paket aus einem lokalen Ordner installieren, sieht der Importpfad so aus: + +~~~jsx +import { Kanban, Toolbar } from 'dhx-kanban-package'; +~~~ + +- Wenn Sie die Trial-Version von Kanban verwenden, geben Sie folgenden Pfad an: + +~~~jsx +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +~~~ + +In diesem Tutorial wird gezeigt, wie Sie die **Trial**-Version von Kanban konfigurieren. + +#### Container setzen und Kanban mit Toolbar initialisieren + +Um Kanban mit Toolbar auf der Seite anzuzeigen, müssen Sie Container für Kanban und Toolbar festlegen und diese Komponenten mit den entsprechenden Konstruktoren initialisieren: + +~~~jsx {1,8-11,15-18,24-31} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", // ein Template-Name, der in der Datei "app.component.ts" als verwendet wird + styleUrls: ["./kanban.component.css"], // CSS-Datei einbinden + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + // Container für Toolbar initialisieren + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + // Container für Kanban initialisieren + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + // Kanban-Komponente initialisieren + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + // Toolbar-Komponente initialisieren + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // weitere Konfigurationseigenschaften + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); // Kanban zerstören + this._toolbar.destructor(); // Toolbar zerstören + } +} +~~~ + +#### Styles hinzufügen + +Um Kanban korrekt anzuzeigen, müssen die entsprechenden Styles bereitgestellt werden. Erstellen Sie dazu die Datei **kanban.component.css** im Verzeichnis **src/app/kanban/** und geben Sie wichtige Styles für Kanban und seinen Container an: + +~~~css title="kanban.component.css" +/* Kanban-Styles importieren */ +@import "@dhx/trial-kanban/dist/kanban.css"; + +/* Styles für die Startseite festlegen */ +html, +body{ + height: 100%; + padding: 0; + margin: 0; +} + +/* Styles für Kanban- und Toolbar-Container festlegen */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Styles für Kanban-Container festlegen */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### Daten laden + +Um Daten in Kanban hinzuzufügen, müssen Sie einen Datensatz bereitstellen. Sie können die Datei **data.ts** im Verzeichnis **src/app/kanban/** erstellen und einige Daten darin hinzufügen: + +~~~jsx {2,14,37,48} title="data.ts" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Öffnen Sie dann die Datei ***kanban.component.ts***. Importieren Sie die Datei mit den Daten und geben Sie die entsprechenden Daten-Eigenschaften im Konfigurationsobjekt von Kanban innerhalb der Methode `ngOnInit()` an, wie unten gezeigt: + +~~~jsx {2,23,25-27} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // Daten importieren +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // Daten initialisieren + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns, // Spaltendaten anwenden + cards, // Kartendaten anwenden + rows, // Zeilendaten anwenden + rowKey: "type", + // weitere Konfigurationseigenschaften + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // weitere Konfigurationseigenschaften + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +Sie können auch die [`parse()`](/api/methods/js_kanban_parse_method/)-Methode innerhalb der `ngOnInit()`-Methode von Angular verwenden, um Daten in Kanban zu laden. + +~~~jsx {2,23,37-42} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // Daten importieren +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // Daten initialisieren + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // weitere Konfigurationseigenschaften + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // weitere Konfigurationseigenschaften + }); + + // Daten über die parse()-Methode anwenden + this._kanban.parse({ + columns, + cards, + rows + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +Die Methode `parse(data)` ermöglicht das erneute Laden der Daten bei jeder Änderung. + +Jetzt ist die Kanban-Komponente einsatzbereit. Wenn das Element zur Seite hinzugefügt wird, wird Kanban mit den Daten initialisiert. Sie können auch die erforderlichen Konfigurationseinstellungen vornehmen. Besuchen Sie unsere [Kanban API-Dokumentation](/api/overview/properties_overview/), um die vollständige Liste der verfügbaren Eigenschaften einzusehen. + +#### Ereignisse behandeln + +Wenn ein Benutzer eine Aktion im Kanban ausführt, wird ein Ereignis ausgelöst. Sie können diese Ereignisse verwenden, um die Aktion zu erkennen und den gewünschten Code auszuführen. Siehe die [vollständige Liste der Ereignisse](/api/overview/events_overview/). + +Öffnen Sie die Datei **kanban.component.ts** und ergänzen Sie die Methode `ngOnInit()` wie folgt: + +~~~jsx {5-7} title="kanban.component.ts" +// ... +ngOnInit() { + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + this._kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); +} + +ngOnDestroy(): void { + this._kanban.destructor(); +} +~~~ + +### Schritt 3. Kanban zur App hinzufügen + +Um die ***KanbanComponent***-Komponente zu Ihrer App hinzuzufügen, öffnen Sie die Datei ***src/app/app.component.ts*** und ersetzen Sie den Standardcode durch folgenden: + +~~~jsx {5} title="app.component.ts" +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + template: `` +}) +export class AppComponent { + name = ""; +} +~~~ + +Erstellen Sie dann die Datei ***app.module.ts*** im Verzeichnis ***src/app/*** und geben Sie die *KanbanComponent* wie folgt an: + +~~~jsx {4-5,8} title="app.module.ts" +import { NgModule } from "@angular/core"; +import { BrowserModule } from "@angular/platform-browser"; + +import { AppComponent } from "./app.component"; +import { KanbanComponent } from "./kanban/kanban.component"; + +@NgModule({ + declarations: [AppComponent, KanbanComponent], + imports: [BrowserModule], + bootstrap: [AppComponent] +}) +export class AppModule {} +~~~ + +Der letzte Schritt ist, die Datei ***src/main.ts*** zu öffnen und den bestehenden Code durch den folgenden zu ersetzen: + +~~~jsx title="main.ts" +import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; +import { AppModule } from "./app/app.module"; +platformBrowserDynamic() + .bootstrapModule(AppModule) + .catch((err) => console.error(err)); +~~~ + +Danach können Sie die App starten, um Kanban mit Daten auf einer Seite zu sehen. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban mit Angular + +Jetzt wissen Sie, wie Sie DHTMLX Kanban mit Angular integrieren. Sie können den Code entsprechend Ihren spezifischen Anforderungen anpassen. Das finale erweiterte Beispiel finden Sie auf [**GitHub**](https://github.com/DHTMLX/angular-kanban-demo). \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_react.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_react.md new file mode 100644 index 0000000..31377f1 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_react.md @@ -0,0 +1,337 @@ +--- +sidebar_label: Integration mit React +title: Integration mit React +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Integration mit React. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# Integration mit React + +:::tip +Sie sollten mit den grundlegenden Konzepten und Mustern von [**React**](https://react.dev) vertraut sein, bevor Sie diese Dokumentation lesen. Um Ihr Wissen aufzufrischen, besuchen Sie bitte die [**React Dokumentation**](https://react.dev/learn). +::: + +DHTMLX Kanban ist mit **React** kompatibel. Wir haben Codebeispiele vorbereitet, wie Sie DHTMLX Kanban mit **React** verwenden können. Weitere Informationen finden Sie im entsprechenden [**Beispiel auf GitHub**](https://github.com/DHTMLX/react-kanban-demo). + +## Erstellen eines Projekts + +:::info +Bevor Sie mit der Erstellung eines neuen Projekts beginnen, installieren Sie [**Vite**](https://vite.dev/) (optional) und [**Node.js**](https://nodejs.org/en/). +::: + +Sie können ein grundlegendes **React**-Projekt erstellen oder **React mit Vite** verwenden. Nennen wir das Projekt **my-react-kanban-app**: + +~~~json +npx create-react-app my-react-kanban-app +~~~ + +### Installation der Abhängigkeiten + +Wechseln Sie in das neu erstellte App-Verzeichnis: + +~~~json +cd my-react-kanban-app +~~~ + +Installieren Sie die Abhängigkeiten und starten Sie den Entwicklungsserver. Verwenden Sie dazu einen Paketmanager: + +- Wenn Sie [**yarn**](https://yarnpkg.com/) verwenden, führen Sie folgende Befehle aus: + +~~~json +yarn +yarn start +~~~ + +- Wenn Sie [**npm**](https://www.npmjs.com/) verwenden, führen Sie folgende Befehle aus: + +~~~json +npm install +npm run dev +~~~ + +Die App sollte nun auf einem lokalen Server laufen (zum Beispiel `http://localhost:3000`). + +## Kanban erstellen + +Nun sollten Sie den Quellcode von DHTMLX Kanban beziehen. Beenden Sie zunächst die App und installieren Sie das Kanban-Paket. + +### Schritt 1. Paketinstallation + +Laden Sie das [**Test-Kanban-Paket**](/how_to_start/#kanban-mit-npm-oder-yarn-installieren) herunter und befolgen Sie die Schritte in der README-Datei. Beachten Sie, dass die Testversion von Kanban nur 30 Tage verfügbar ist. + +### Schritt 2. Komponentenerstellung + +Jetzt müssen Sie eine React-Komponente erstellen, um ein Kanban zum Projekt hinzuzufügen. Erstellen Sie eine neue Datei im Verzeichnis ***src/*** und nennen Sie sie ***Kanban.jsx***. + +#### Importieren der Quelldateien + +Öffnen Sie die Datei ***Kanban.jsx*** und importieren Sie die Kanban-Quelldateien. Beachten Sie dabei: + +- Wenn Sie die PRO-Version verwenden und das Kanban-Paket aus einem lokalen Ordner installieren, sehen die Importpfade so aus: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from 'dhx-kanban-package'; +import 'dhx-kanban-package/dist/kanban.css'; +~~~ + +Beachten Sie, dass je nach verwendetem Paket die Quelldateien minifiziert sein können. In diesem Fall stellen Sie sicher, dass Sie die CSS-Datei als ***kanban.min.css*** importieren. + +- Wenn Sie die Testversion von Kanban verwenden, geben Sie folgende Pfade an: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import "@dhx/trial-kanban/dist/kanban.css"; +~~~ + +In diesem Tutorial sehen Sie, wie Sie die **Testversion** von Kanban konfigurieren. + +#### Container setzen und Kanban mit Toolbar hinzufügen + +Um Kanban mit Toolbar auf der Seite anzuzeigen, müssen Sie Container für Kanban und Toolbar anlegen und diese Komponenten mit den entsprechenden Konstruktoren initialisieren: + +~~~jsx {2,6-7,10-11,13-17} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import '@dhx/trial-kanban/dist/kanban.css'; // Kanban-Stile einbinden + +export default function KanbanComponent(props) { + let toolbar_container = useRef(); // Container für Toolbar initialisieren + let kanban_container = useRef(); // Container für Kanban initialisieren + + useEffect(() => { + // Kanban-Komponente initialisieren + const kanban = new Kanban(kanban_container.current, {}); + + // Toolbar-Komponente initialisieren + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, // Kanban-internes API bereitstellen + // weitere Konfigurationseigenschaften + }); + + return () => { + kanban.destructor(); // Kanban zerstören + toolbar.destructor(); // Toolbar zerstören + }; + }, []); + + return
+
+
+
+} +~~~ + +#### Stile hinzufügen + +Damit Kanban korrekt angezeigt wird, müssen Sie wichtige Stile für Kanban und seinen Container in der Haupt-CSS-Datei des Projekts festlegen: + +~~~css title="index.css" +/* Stile für die Startseite festlegen */ +html, +body, +#root { + height: 100%; + padding: 0; + margin: 0; +} + +/* Stile für Kanban- und Toolbar-Container */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Stile für Kanban-Container */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### Daten laden + +Um Daten in das Kanban zu laden, müssen Sie einen Datensatz bereitstellen. Sie können die Datei ***data.js*** im Verzeichnis ***src/*** anlegen und dort einige Daten hinzufügen: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Öffnen Sie dann die Datei ***App.js*** und importieren Sie die Daten. Danach können Sie die Daten per **props** an die neu erstellte ``-Komponente übergeben: + +~~~jsx {2,5-6} title="App.js" +import Kanban from "./Kanban"; +import { getData } from "./data"; + +function App() { + const { columns, cards, rows } = getData(); + return ; +} + +export default App; +~~~ + +Öffnen Sie die Datei ***Kanban.jsx*** und wenden Sie die übergebenen **props** auf das Kanban-Konfigurationsobjekt an: + +~~~jsx {5,11-13} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: props.columns, // Spalten-Daten anwenden + cards: props.cards, // Karten-Daten anwenden + rows: props.rows, // Zeilen-Daten anwenden + rowKey: "type", + // weitere Konfigurationseigenschaften + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // weitere Konfigurationseigenschaften + }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +Sie können auch die [`parse()`](/api/methods/js_kanban_parse_method/)-Methode innerhalb der `useEffect()`-Methode von React verwenden, um Daten in Kanban zu laden: + +~~~jsx {9-11,27} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + let columns = props.columns; // Daten für Spalten + let cards = props.cards; // Daten für Karten + let rows = props.rows; // Daten für Zeilen + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // weitere Konfigurationseigenschaften + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // weitere Konfigurationseigenschaften + }); + + kanban.parse({ columns, cards, rows }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +Die Methode `parse(data)` ermöglicht das Neuladen der Daten bei jeder Änderung. + +Nun ist die Kanban-Komponente einsatzbereit. Sobald das Element zur Seite hinzugefügt wird, wird Kanban mit Daten initialisiert. Sie können auch weitere Konfigurationseinstellungen vornehmen. Besuchen Sie unsere [Kanban API-Dokumentation](/api/overview/properties_overview/), um die vollständige Liste der verfügbaren Eigenschaften zu sehen. + +#### Ereignisse behandeln + +Wenn ein Benutzer eine Aktion im Kanban ausführt, wird ein Ereignis ausgelöst. Sie können diese Ereignisse nutzen, um die Aktion zu erkennen und den gewünschten Code auszuführen. Sehen Sie sich die [vollständige Liste der Ereignisse](/api/overview/events_overview/) an. + +Öffnen Sie ***Kanban.jsx*** und ergänzen Sie die `useEffect()`-Methode wie folgt: + +~~~jsx {5-7} title="Kanban.jsx" +// ... +useEffect(() => { + const kanban = new Kanban(kanban_container.current, {}); + + kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); + + return () => { + kanban.destructor(); + }; +}, []); +// ... +~~~ + +Danach können Sie die App starten, um Kanban mit Daten auf einer Seite zu sehen. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban mit React + +Jetzt wissen Sie, wie Sie DHTMLX Kanban mit React integrieren können. Sie können den Code nach Ihren spezifischen Anforderungen anpassen. Das endgültige, erweiterte Beispiel finden Sie auf [**GitHub**](https://github.com/DHTMLX/react-kanban-demo). \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md new file mode 100644 index 0000000..0642877 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md @@ -0,0 +1,110 @@ +--- +sidebar_label: Integration mit Salesforce +title: Integration mit Salesforce +description: Erfahren Sie, wie Sie DHTMLX Kanban in Salesforce integrieren. Diese Anleitung erklärt das erforderliche HTML-Setup und die Konfiguration der Umgebung für einen reibungslosen Betrieb innerhalb von Salesforce Lightning-Komponenten. +--- + +# Integration mit Salesforce + +:::tip +Sie sollten mit den grundlegenden Konzepten und Mustern von [**Salesforce**](https://www.salesforce.com/) vertraut sein, bevor Sie diese Dokumentation lesen. Um Ihr Wissen aufzufrischen, lesen Sie bitte die [**Salesforce-Dokumentation**](https://developer.salesforce.com/docs). +::: + +DHTMLX Kanban ist mit der [Salesforce](https://www.salesforce.com/) Plattform kompatibel. Wir haben Codebeispiele vorbereitet, die zeigen, wie Sie DHTMLX Kanban in die Salesforce-Umgebung einbinden können. Weitere Informationen finden Sie im entsprechenden [Beispiel auf GitHub](https://github.com/DHTMLX/salesforce-lwc-demo). + +:::note +Das JavaScript Kanban-Widget erkennt automatisch, wenn es innerhalb einer [**Salesforce**](https://www.salesforce.com/) Umgebung ausgeführt wird und konfiguriert die Integrationslogik intern. In den meisten Fällen müssen Sie keine [**Salesforce-spezifischen Methoden**](#salesforce-spezifische-methoden) manuell aufrufen. +::: + +## Vorbereitung der Umgebung + +Wenn Sie Kanban in Ihr Salesforce-Projekt einbinden möchten, müssen Sie den *Root*-Container mit dem HTML-Attribut `data-wx-root="true"` versehen. Dieses Attribut ermöglicht es der Bibliothek, den Hauptknoten für das Mounten der **Kanban**- und **Toolbar**-Widgets zu finden. + +```html title="kanban.html" + +``` + +Verschachtelte Elemente mit dem Attribut `data-wx-portal-root="1"` dienen als Container für DHTMLX-Komponenten (zum Beispiel **Toolbar** und **Kanban**). + +## Salesforce-Umgebungs-API + +DHTMLX Kanban enthält die Hilfsklasse `salesForceEnv`, die Methoden für die manuelle Steuerung der Salesforce-Umgebung bereitstellt. Sie können die Hilfsklasse `salesForceEnv` wie folgt importieren: + +```jsx {4} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; +``` + +:::note +Normalerweise sind Salesforce-spezifische Methoden nicht erforderlich, sie stehen aber als Fallback zur Verfügung, falls die automatische Erkennung fehlschlägt. +::: + +### Salesforce-spezifische Methoden + +Sie können die folgenden Methoden der Hilfsklasse `salesForceEnv` verwenden: + +| Methode | Beschreibung | +| :------------------------------------------------------------- | :-------------------------------------------------------------------------- | +| `salesForceEnv.detect()` | Erkennt, ob Kanban innerhalb von Salesforce ausgeführt wird | +| `salesForceEnv.addGlobalEvent(eventName, handler, htmlElement)`| Hängt ein globales Event an das erste verfügbare HTML-Element an | +| `salesForceEnv.getTopNode()` | Gibt das erste verfügbare HTML-Element innerhalb der Salesforce-DOM-Hierarchie zurück | + +```jsx {4,7} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; + +salesForceEnv.detect(); +``` + +### Zusätzlich exportierte Funktion + +| Funktion | Beschreibung | +| :-------------------- | :--------------------------------------------------------------------------------- | +| `enableSalesForce()` | Setzt die Salesforce-Umgebung manuell, wenn die automatische Erkennung nicht verfügbar ist | + +```jsx {5,8} +import { + Kanban, + Toolbar, + salesForceEnv, + enableSalesForce +} from "@dhx/trial-kanban"; + +enableSalesForce(); +``` + +## Arbeitsablauf + +1. Fügen Sie das Attribut `data-wx-root="true"` zu Ihrem LWC-Container hinzu +2. Importieren und initialisieren Sie DHTMLX Kanban und optional die Toolbar +3. Das JavaScript Kanban-Widget erkennt automatisch den Salesforce-Kontext und wendet die interne Konfiguration an +4. Sie müssen die Funktion `enableSalesForce()` oder Methoden von `salesForceEnv` nur dann aufrufen, wenn Ihre App in einem nicht standardmäßigen Einbettungsszenario läuft + +### Beispiel + +```jsx title="kanban.js" +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default class KanbanLWC { + connectedCallback() { + const kanban_container = this.template.querySelector(".sf_kanban"); + const toolbar_container = this.template.querySelector(".sf_toolbar"); + const kanban = new Kanban(kanban_container, { /* configuration properties */ }); + const toolbar = new Toolbar(toolbar_container, { api: kanban.api }); + } +} +``` + +Nun ist die DHTMLX Kanban-Komponente vollständig in Ihre **Salesforce Lightning**-Umgebung integriert. Das Widget übernimmt automatisch die DOM-Hierarchie und das Event-Binding innerhalb von LWC. Sie können Kanban weiterhin über die Standard-API konfigurieren sowie das Erscheinungsbild und die Logik von Kanban nach den Anforderungen Ihres Projekts anpassen. Das vollständige Beispiel finden Sie auf [**GitHub**](https://github.com/DHTMLX/salesforce-lwc-demo). \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md new file mode 100644 index 0000000..b018344 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md @@ -0,0 +1,346 @@ +--- +sidebar_label: Integration mit Svelte +title: Integration mit Svelte +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Integration mit Svelte. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Integration mit Svelte + +:::tip +Sie sollten mit den grundlegenden Konzepten und Mustern von **Svelte** vertraut sein, bevor Sie diese Dokumentation lesen. Um Ihr Wissen aufzufrischen, besuchen Sie bitte die [**Svelte documentation**](https://svelte.dev/docs/svelte/overview). +::: + +DHTMLX Kanban ist mit **Svelte** kompatibel. Wir haben Codebeispiele vorbereitet, wie Sie DHTMLX Kanban mit **Svelte** verwenden können. Weitere Informationen finden Sie im entsprechenden [**Example on GitHub**](https://github.com/DHTMLX/svelte-kanban-demo). + +## Ein Projekt erstellen + +:::info +Bevor Sie mit der Erstellung eines neuen Projekts beginnen, installieren Sie [**Vite**](https://vite.dev/) (optional) und [**Node.js**](https://nodejs.org/en/). +::: + +Es gibt mehrere Möglichkeiten, ein **Svelte**-Projekt zu erstellen: + +- Sie können [**SvelteKit**](https://kit.svelte.dev/) verwenden + +oder + +- Sie können auch **Svelte mit Vite** (aber ohne SvelteKit) nutzen: + +~~~json +npm create vite@latest +~~~ + +Weitere Details finden Sie im [related article](https://svelte.dev/docs/svelte/overview). + +### Installation der Abhängigkeiten + +Nennen wir das Projekt **my-svelte-kanban-app** und wechseln Sie in das App-Verzeichnis: + +~~~json +cd my-svelte-kanban-app +~~~ + +Installieren Sie die Abhängigkeiten und starten Sie den Entwicklungsserver. Verwenden Sie dazu einen Paketmanager: + +- Wenn Sie [**yarn**](https://yarnpkg.com/) verwenden, führen Sie folgende Befehle aus: + +~~~json +yarn +yarn start +~~~ + +- Wenn Sie [**npm**](https://www.npmjs.com/) verwenden, führen Sie folgende Befehle aus: + +~~~json +npm install +npm run dev +~~~ + +Die App sollte nun auf localhost laufen (zum Beispiel `http://localhost:3000`). + +## Kanban erstellen + +Jetzt sollten Sie den DHTMLX Kanban-Quellcode besorgen. Stoppen Sie zunächst die App und fahren Sie mit der Installation des Kanban-Pakets fort. + +### Schritt 1. Paketinstallation + +Laden Sie das [**trial Kanban package**](/how_to_start/#kanban-mit-npm-oder-yarn-installieren) herunter und folgen Sie den im README aufgeführten Schritten. Beachten Sie, dass die Testversion von Kanban nur 30 Tage verfügbar ist. + +### Schritt 2. Komponentenerstellung + +Nun müssen Sie eine Svelte-Komponente erstellen, um ein Kanban mit Toolbar zur Anwendung hinzuzufügen. Erstellen Sie eine neue Datei im ***src/***-Verzeichnis und nennen Sie sie ***Kanban.svelte***. + +#### Importieren der Quelldateien + +Öffnen Sie die ***Kanban.svelte***-Datei und importieren Sie die Kanban-Quelldateien. Beachten Sie dabei: + +- Wenn Sie die PRO-Version verwenden und das Kanban-Paket aus einem lokalen Ordner installieren, sehen die Importpfade wie folgt aus: + +~~~html title="Kanban.svelte" + +~~~ + +Beachten Sie, dass die Quelldateien, abhängig vom verwendeten Paket, minifiziert sein können. Stellen Sie in diesem Fall sicher, dass Sie die CSS-Datei als **kanban.min.css** importieren. + +- Wenn Sie die Testversion von Kanban nutzen, geben Sie folgende Pfade an: + +~~~html title="Kanban.svelte" + + +
+
+
+
+~~~ + +#### Daten laden + +Um dem Kanban Daten hinzuzufügen, müssen Sie einen Datensatz bereitstellen. Sie können die Datei ***data.js*** im ***src/***-Verzeichnis erstellen und einige Daten hinzufügen: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Öffnen Sie dann die ***App.svelte***-Datei, importieren Sie die Daten und geben Sie sie als **props** an die neu erstellte ``-Komponente weiter: + +~~~html {3,5,8} title="App.svelte" + + + +~~~ + +Wechseln Sie zur ***Kanban.svelte***-Datei und wenden Sie die übergebenen **props** auf das Kanban-Konfigurationsobjekt an: + +~~~html {6-8,15-17} title="Kanban.svelte" + + +
+
+
+
+~~~ + +Sie können auch die [`parse()`](/api/methods/js_kanban_parse_method/)-Methode innerhalb der `onMount()`-Methode von Svelte verwenden, um Daten in Kanban zu laden: + +~~~html {6-8,27} title="Kanban.svelte" + + +
+
+
+
+~~~ + +Die Methode `parse(data)` ermöglicht das erneute Laden der Daten bei jeder Änderung. + +Nun ist die Kanban-Komponente einsatzbereit. Sobald das Element zur Seite hinzugefügt wird, initialisiert es Kanban mit den Daten. Sie können die benötigten Konfigurationseinstellungen ebenfalls angeben. Besuchen Sie unsere [Kanban API docs](/api/overview/properties_overview/), um die vollständige Liste der verfügbaren Eigenschaften zu sehen. + +#### Ereignisse verarbeiten + +Wenn ein Benutzer eine Aktion im Kanban ausführt, wird ein Ereignis ausgelöst. Sie können diese Ereignisse nutzen, um die Aktion zu erkennen und den gewünschten Code auszuführen. Sehen Sie sich die [full list of events](/api/overview/events_overview/) an. + +Öffnen Sie ***Kanban.svelte*** und ergänzen Sie die `onMount()`-Methode wie folgt: + +~~~html {8-10} title="Kanban.svelte" + + +// ... +~~~ + +### Schritt 3. Kanban zur App hinzufügen + +Um die Komponente zur App hinzuzufügen, öffnen Sie die **App.svelte**-Datei und ersetzen Sie den Standardcode durch den folgenden: + +~~~html title="App.svelte" + + + +~~~ + +Danach können Sie die App starten, um Kanban mit Daten auf der Seite zu sehen. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban mit Svelte + +Nun wissen Sie, wie Sie DHTMLX Kanban mit Svelte integrieren können. Sie können den Code an Ihre spezifischen Anforderungen anpassen. Das finale, erweiterte Beispiel finden Sie auf [**GitHub**](https://github.com/DHTMLX/svelte-kanban-demo). \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md new file mode 100644 index 0000000..b9174e0 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md @@ -0,0 +1,366 @@ +--- +sidebar_label: Integration mit Vue +title: Integration mit Vue +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Integration mit Vue. Durchstöbern Sie Entwicklerleitfäden und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# Integration mit Vue + +:::tip +Sie sollten mit den grundlegenden Konzepten und Mustern von [**Vue**](https://vuejs.org/) vertraut sein, bevor Sie diese Dokumentation lesen. Um Ihr Wissen aufzufrischen, lesen Sie bitte die [**Vue 3-Dokumentation**](https://vuejs.org/guide/introduction.html#getting-started). +::: + +DHTMLX Kanban ist mit **Vue** kompatibel. Wir haben Codebeispiele vorbereitet, wie Sie DHTMLX Kanban mit **Vue 3** verwenden können. Weitere Informationen finden Sie im entsprechenden [**Beispiel auf GitHub**](https://github.com/DHTMLX/vue-kanban-demo). + +## Projekt erstellen + +:::info +Bevor Sie mit der Erstellung eines neuen Projekts beginnen, installieren Sie [**Node.js**](https://nodejs.org/en/). +::: + +Um ein **Vue**-Projekt zu erstellen, führen Sie den folgenden Befehl aus: + +~~~json +npm create vue@latest +~~~ + +Dieser Befehl installiert und führt `create-vue` aus, das offizielle **Vue**-Projekt-Scaffolding-Tool. Details finden Sie im [Vue.js Quick Start](https://vuejs.org/guide/quick-start.html#creating-a-vue-application). + +Nennen wir das Projekt **my-vue-kanban-app**. + +### Installation der Abhängigkeiten + +Wechseln Sie in das App-Verzeichnis: + +~~~json +cd my-vue-kanban-app +~~~ + +Installieren Sie die Abhängigkeiten und starten Sie den Dev-Server. Verwenden Sie dazu einen Paketmanager: + +- Wenn Sie [**yarn**](https://yarnpkg.com/) verwenden, führen Sie folgende Befehle aus: + +~~~jsx +yarn +yarn start // oder yarn dev +~~~ + +- Wenn Sie [**npm**](https://www.npmjs.com/) verwenden, führen Sie folgende Befehle aus: + +~~~json +npm install +npm run dev +~~~ + +Die App sollte auf localhost laufen (zum Beispiel `http://localhost:3000`). + +## Kanban erstellen + +Nun sollten Sie den DHTMLX Kanban-Quellcode erhalten. Stoppen Sie zuerst die App und fahren Sie mit der Installation des Kanban-Pakets fort. + +### Schritt 1. Paketinstallation + +Laden Sie das [**Test-Kanban-Paket**](/how_to_start/#kanban-mit-npm-oder-yarn-installieren) herunter und folgen Sie den im README beschriebenen Schritten. Beachten Sie, dass die Testversion von Kanban nur 30 Tage verfügbar ist. + +### Schritt 2. Komponentenerstellung + +Nun müssen Sie eine Vue-Komponente erstellen, um Kanban mit Toolbar in die Anwendung einzufügen. Erstellen Sie eine neue Datei im Verzeichnis ***src/components/*** und nennen Sie sie ***Kanban.vue***. + +#### Quellcode importieren + +Öffnen Sie die Datei ***Kanban.vue*** und importieren Sie die Kanban-Quellcodes. Beachten Sie dabei: + +- Wenn Sie die PRO-Version verwenden und das Kanban-Paket aus einem lokalen Ordner installieren, sehen die Import-Pfade wie folgt aus: + +~~~html title="Kanban.vue" + +~~~ + +Beachten Sie, dass die Quellcodes je nach verwendetem Paket minifiziert sein können. In diesem Fall stellen Sie sicher, dass Sie die CSS-Datei als **kanban.min.css** importieren. + +- Wenn Sie die Testversion von Kanban verwenden, geben Sie folgende Pfade an: + +~~~html title="Kanban.vue" + +~~~ + +In diesem Tutorial sehen Sie, wie Sie die **Testversion** von Kanban konfigurieren. + +#### Container setzen und Kanban mit Toolbar hinzufügen + +Um Kanban mit Toolbar auf der Seite anzuzeigen, müssen Sie Container für Kanban und Toolbar erstellen und diese Komponenten mit den entsprechenden Konstruktoren initialisieren: + +~~~html {2,7-8,10-14} title="Kanban.vue" + + + +~~~ + +#### Styles hinzufügen + +Damit Kanban korrekt angezeigt wird, müssen Sie wichtige Styles für Kanban und seinen Container in der Haupt-CSS-Datei des Projekts angeben: + +~~~css title="main.css" +/* Styles für die Initialseite */ +html, +body, +#app { /* stellen Sie sicher, dass Sie den #app Root-Container verwenden */ + height: 100%; + padding: 0; + margin: 0; +} + +/* Styles für Kanban- und Toolbar-Container */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Styles für Kanban-Container */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### Daten laden + +Um Daten in Kanban hinzuzufügen, müssen Sie einen Datensatz bereitstellen. Sie können die Datei ***data.js*** im Verzeichnis ***src/*** erstellen und dort einige Daten hinzufügen: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Öffnen Sie dann die Datei ***App.vue***, importieren Sie die Daten und initialisieren Sie sie über die interne Methode `data()`. Danach können Sie die Daten als **props** an die neu erstellte ``-Komponente übergeben: + +~~~html {3,8,10-12,19} title="App.vue" + + + +~~~ + +Gehen Sie zur Datei ***Kanban.vue*** und wenden Sie die übergebenen **props** auf das Kanban-Konfigurationsobjekt an: + +~~~html {6,10-12} title="Kanban.vue" + + + +~~~ + +Sie können auch die [`parse()`](/api/methods/js_kanban_parse_method/)-Methode innerhalb der `mounted()`-Methode von Vue verwenden, um Daten in Kanban zu laden: + +~~~html {6,22-26} title="Kanban.vue" + + + +~~~ + +Die Methode `parse(data)` ermöglicht das Nachladen von Daten bei jeder Änderung. + +Nun ist die Kanban-Komponente einsatzbereit. Sobald das Element zur Seite hinzugefügt wird, initialisiert es Kanban mit den Daten. Sie können auch die gewünschten Konfigurationseinstellungen bereitstellen. Besuchen Sie unsere [Kanban API-Dokumentation](/api/overview/properties_overview/), um die vollständige Liste der verfügbaren Eigenschaften zu sehen. + +#### Ereignisse verarbeiten + +Wenn ein Benutzer eine Aktion im Kanban ausführt, wird ein Ereignis ausgelöst. Sie können diese Ereignisse nutzen, um die Aktion zu erkennen und den gewünschten Code auszuführen. Die [vollständige Liste der Ereignisse](/api/overview/events_overview/) finden Sie hier. + +Öffnen Sie ***Kanban.vue*** und vervollständigen Sie die Methode `mounted()`: + +~~~html {8-10} title="Kanban.vue" + + +// ... +~~~ + +Danach können Sie die App starten, um Kanban mit Daten auf der Seite zu sehen. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban mit Vue + +Jetzt wissen Sie, wie Sie DHTMLX Kanban mit Vue integrieren können. Sie können den Code entsprechend Ihren spezifischen Anforderungen anpassen. Das finale, erweiterte Beispiel finden Sie auf [**GitHub**](https://github.com/DHTMLX/vue-kanban-demo). \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/localization.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/localization.md new file mode 100644 index 0000000..4c29eb1 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/localization.md @@ -0,0 +1,173 @@ +--- +sidebar_label: Lokalisierung +title: Lokalisierung +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Lokalisierung. Stöbern Sie in Entwicklerhandbüchern und der API-Referenz, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Lokalisierung + +Sie können alle Beschriftungen in der Oberfläche von JavaScript Kanban lokalisieren. Dazu müssen Sie entweder eine neue Sprachumgebung erstellen oder eine integrierte anpassen und sie auf Kanban und Toolbar (*separat*) anwenden. + +## Standardmäßige Sprachumgebung + +Die **englische** Sprachumgebung wird standardmäßig verwendet: + +~~~jsx +const en = { + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Files: "Files", + B: "B", + KB: "KB", + MB: "MB", + GB: "GB", + TB: "TB", + PB: "PB", + EB: "EB", + "Make cover": "Make cover", + "Remove cover": "Remove cover", + Comments: "Comments", + Links: "Links", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card...": "Add new card...", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Priority: "Priority", + Progress: "Progress", + Users: "Users", + + Untitled: "Untitled", + Rename: "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + Sort: "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)", + + "Add link": "Add link", + Duplicate: "Duplicate", + "Duplicate of": "Duplicate of", + "Relates to": "Relates to", + "Depends on": "Depends on", + "Is required for": "Is required for", + Duplicates: "Duplicates", + "Is duplicated by": "Is duplicated by", + "Is parent for": "Is parent for", + "Is subtask of": "Is subtask of", + + Cancel: "Cancel", + "Link task": "Link task", + "Select a relation": "Select a relation", + "Select a task": "Select a task", + + Send: "Send", + "Would you like to delete this comment?": + "Would you like to delete this comment?", + "No comments yet": "No comments yet", + "Would you like to delete this card?": + "Would you like to delete this card?", + }, + calendar: { // Übersetzungen und Einstellungen des Kalenders + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // Übersetzungen der Kernelemente + ok: "OK", + cancel: "Cancel" + } +}; +~~~ + +## Integrierte Sprachumgebungen + +Kanban stellt die folgenden Sprachumgebungen bereit: + +**"en"** – Englisch +**"de"** – Deutsch +**"cn"** – Chinesisch +**"es"** – Spanisch +**"fr"** – Französisch +**"it"** – Italienisch +**"jp"** – Japanisch +**"pt"** – Portugiesisch +**"ru"** – Russisch + +Sie können eine integrierte Sprachumgebung wie folgt exportieren und anwenden: + +```jsx {5} +// Kanban erstellen +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // die integrierte "cn"-Sprachumgebung wird initial gesetzt + // weitere Parameter +}); + +// die integrierte "de"-Sprachumgebung auf Kanban anwenden +board.setLocale(kanban.locales["de"]); +``` + +## Eigene Sprachumgebung + +Um eine eigene Sprachumgebung zu verwenden, müssen Sie: + +- eine eigene Sprachumgebung erstellen (oder die Standardumgebung anpassen) und Übersetzungen für alle Textbeschriftungen bereitstellen (es kann jede gewünschte Sprache sein) + +- die neue Sprachumgebung für **Kanban** über die [`locale`](api/config/js_kanban_locale_config.md)-Eigenschaft oder mit der [`setLocale()`](api/methods/js_kanban_setlocale_method.md)-Methode anwenden +- die neue Sprachumgebung für **Toolbar** über die [`locale`](api/config/toolbar_locale_config.md)-Eigenschaft oder mit der [`setLocale()`](api/methods/toolbar_setlocale_method.md)-Methode anwenden + +## Beispiel + +Im folgenden Beispiel sehen Sie, wie Sie zwischen mehreren Sprachumgebungen wechseln können: + + \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/stylization.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/stylization.md new file mode 100644 index 0000000..bbe385c --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/stylization.md @@ -0,0 +1,119 @@ +--- +sidebar_label: Stilierung +title: Stilierung +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie mehr über die Stilierung. Durchstöbern Sie Entwicklerhandbücher und API-Referenz, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# Stilierung + +Mit Kanban können Sie das Aussehen von **Spalten**, **Zeilen** und **Karten** über die Eigenschaften [`columnShape.css`](api/config/js_kanban_columnshape_config.md), [`rowShape.css`](api/config/js_kanban_rowshape_config.md) und [`cardShape.css`](api/config/js_kanban_cardshape_config.md) anpassen. Diese Eigenschaften ermöglichen es Ihnen, Spalten, Zeilen und Karten bedingt zu gestalten. + +Sie können außerdem einer einzelnen **Spalte**, **Zeile** oder **Karte** eine benutzerdefinierte CSS-Klasse zuweisen, indem Sie die Eigenschaften [`columns.css`](api/config/js_kanban_columns_config.md), [`rows.css`](api/config/js_kanban_rows_config.md) und [`cards.css`](api/config/js_kanban_cards_config.md) verwenden. + +Darüber hinaus können Sie benutzerdefinierte Stile auf jeden Teil der Kanban-Oberfläche anwenden, um die Anforderungen Ihres Projekts zu erfüllen. Dafür stellt die Bibliothek eine Vielzahl von CSS-Variablen zur Verfügung. Beachten Sie, dass Kanban zwei Arten von Variablen enthält: +- CSS-Variablen, die sich auf den **Kanban**-Stil beziehen +- CSS-Variablen, die sich auf den Stil der **WX**-Bibliothek beziehen (*Steuerelemente, Kalender usw.*) + +:::info +Beachten Sie, dass die **WX**-Bibliothek nur für interne Prozesse verwendet wird. Sie stellt einige kleine Elemente bereit, die in Kanban verwendet werden (*Steuerelemente, Kalender usw.*) +::: + +## Standardstil + +~~~css +.wx-material-theme { + /* WX library css variables */ + --wx-field-width: 100%; + --wx-theme-name: material; + /* end of WX library css variables */ + + /* Kanban css variables*/ + --wx-kanban-background: #f1f1f1; + + /* column styles */ + --wx-kanban-column-width: 300px; + --wx-kanban-column-height: 300px; + + /* toolbar styles */ + --wx-kanban-toolbar-height: 56px; + --wx-kanban-toolbar-align: center; + --wx-kanban-toolbar-justify: flex-start; + --wx-kanban-toolbar-control-hover: rgba(0, 0, 0, 0.07); + --wx-kanban-toolbar-control-active: rgba(0, 0, 0, 0.15); + --wx-kanban-toolbar-border: var(--wx-border); + + /* card styles */ + --wx-kanban-card-field-padding: 12px; + --wx-kanban-content-background: var(--wx-background); + --wx-kanban-card-border: var(--wx-border); + --wx-kanban-card-border-radius: 6px; + --wx-kanban-header-border-radius: var(--wx-kanban-card-border-radius); + + /* row styles */ + --wx-kanban-row-line: var(--wx-border); + + /* user icon styles */ + --wx-kanban-user-icon-size: 36px; + + /* editor styles */ + --wx-kanban-header-height: 64px; + --wx-kanban-editor-width: 569px; + --wx-kanban-editor-height: auto; + --wx-kanban-editor-x-padding: 20px; + --wx-kanban-editor-background: var(--wx-kanban-content-background); + --wx-kanban-editor-top-border: none; + + /* column styles */ + --wx-kanban-over-limit-color: var(--wx-color-danger); + --wx-kanban-collapsed-column-width: 44px; + --wx-kanban-z-index: 1; + + /* progress control styles*/ + --wx-progress-height: 4px; + --wx-kanban-progress-inactive-color: #dbdbdb; + + /* menu styles */ + --wx-kanban-menu-min-width: 100px; + + /* box and shadow styles*/ + --wx-kanban-shadow: none; + --wx-kanban-box-border: var(--wx-border); + + /* collapsed column styles */ + --wx-kanban-collapsed-padding: var(--wx-padding); + --wx-kanban-collapsed-margin: 0px; + --wx-kanban-collapsed-background: transparent; + --wx-kanban-collapsed-background-hover: #dfdfdf; + +/* End of Kanban CSS variables*/ +} +~~~ + +:::tip Hinweis +In zukünftigen Versionen von Kanban können sich die Variablen und deren Namen ändern. Bitte überprüfen Sie nach einem Update die Namen und passen Sie sie in Ihrem Code an, um Darstellungsprobleme der Komponente zu vermeiden. +::: + +## Scroll-Stil + +Sie können auch einen benutzerdefinierten Stil für die Scrollbar von Kanban anwenden. Verwenden Sie dafür die CSS-Klasse `.wx-styled-scroll`. Prüfen Sie vor der Verwendung die Kompatibilität mit modernen Browsern [hier](https://caniuse.com/css-scrollbar). + +~~~html {4} title="index.html" + +
// + +
+~~~ + +## Benutzerdefinierter Stil + +In diesem Beispiel sehen Sie, wie Sie einen benutzerdefinierten Stil auf Kanban anwenden können. + + + +## Adaptivität + +In diesem Beispiel sehen Sie, wie Sie mit benutzerdefinierten CSS-Stilen eine adaptive Version von Kanban erstellen. + + + +**Verwandte Artikel:** [Anpassung](guides/customization.md) \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/typescript_support.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/typescript_support.md new file mode 100644 index 0000000..6e69a89 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/typescript_support.md @@ -0,0 +1,21 @@ +--- +sidebar_label: TypeScript-Unterstützung +title: TypeScript-Unterstützung +description: In der Dokumentation erfahren Sie, wie Sie TypeScript mit der DHTMLX JavaScript Kanban-Bibliothek verwenden. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# TypeScript-Unterstützung + +Ab Version v1.1 bietet die DHTMLX Kanban-Bibliothek die Möglichkeit, TypeScript-Definitionen zu verwenden. Die integrierte Unterstützung für TypeScript funktioniert direkt nach der Installation. + +:::note +Sie können die Funktionalität direkt in unserem Snippet Tool ausprobieren. +::: + +## Vorteile der Verwendung von TypeScript + +Warum sollten Sie DHTMLX Kanban mit TypeScript verwenden? + +Der Hauptvorteil von TypeScript besteht darin, dass es Ihnen ermöglicht, die Effizienz des Entwicklungsprozesses deutlich zu steigern. + +Die Art und Weise, wie eine Anwendung entwickelt wird, wird robuster, da die Überprüfung der Typen zusammen mit der Autovervollständigung hilft, potenzielle Fehler zu vermeiden. Außerdem liefert TypeScript Informationen darüber, welche Datentypen Sie bei der Arbeit mit der API der DHTMLX Kanban-Bibliothek verwenden sollten. \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/working_with_data.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/working_with_data.md new file mode 100644 index 0000000..9cd699f --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/working_with_data.md @@ -0,0 +1,201 @@ +--- +sidebar_label: Arbeiten mit Daten +title: Arbeiten mit Daten +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie, wie Sie mit Daten arbeiten. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Arbeiten mit Daten + +## Initiales Laden von Daten + +Beim Initialisieren von Kanban können Sie die Anfangsdaten für [**Spalten**](api/config/js_kanban_columns_config.md), [**Karten**](api/config/js_kanban_cards_config.md), [**Zeilen**](api/config/js_kanban_rows_config.md) und [**Verknüpfungen**](api/config/js_kanban_links_config.md) bereitstellen. + +~~~jsx {1,17,81,94,106-109} +const columns = [ // Daten für Spalten + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + { + label: "Testing", + id: "testing" + }, + {...} +]; + +const cards = [ // Daten für Karten + { + id: 1, + label: "Integration with React", + priority: 1, + color: "#65D3B3", + description: "Some description...", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + progress: 25, + users: [1,2,3,4], + sprint: "1.0", + column: "backlog", + type: "feature", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + }, + { + id: 2, + label: "Archive the cards/boards ", + priority: 2, + color: "#FFC975", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + sprint: "1.0", + column: "backlog", + type: "feature" + }, + { + label: "Searching and filtering", + priority: 1, + color: "#65D3B3", + + start_date: new Date("01/05/2021"), + + sprint: "1.2", + column: "backlog", + type: "task" + }, + { + label: "Set the tasks priorities", + priority: 2, + color: "#58C3FE", + + sprint: "1.2", + column: "inprogress", + type: "feature" + }, + {...} +]; + +const rows = [ // Daten für Zeilen + { + label: "Feature", + id: "feature" + }, + { + label: "Task", + id: "task", + collapsed: true + }, + {...} +]; + +const links = [ + { + id: "link_1", + source: 1, + target: 2, + relation: "relatesTo", + }, + {...} +]; + +// Initialisierung von Kanban mit den Anfangsdaten für Spalten, Karten und Zeilen +new kanban.Kanban("#root", { + columns, + cards, + rows, + links +}); +~~~ + +## Laden von Daten aus einer lokalen Quelle + +Um Daten für ***columns***, ***rows***, ***cards*** und ***links*** aus einer lokalen Quelle zu laden, können Sie die Methode [`parse()`](api/methods/js_kanban_parse_method.md) verwenden. Sie nimmt ein Objekt mit den benötigten Daten als Parameter entgegen. + +~~~js {4} +const board = new kanban.Kanban("#root", {}); + +// Laden von Daten in Kanban +board.parse({ columns, cards, rows }); +~~~ + +## Kanban-Daten mit Gantt und Scheduler synchronisieren + +In diesem Beispiel sehen Sie, wie Kanban-Daten mit anderen DHTMLX-Widgets, nämlich [**Gantt**](https://dhtmlx.com/docs/products/dhtmlxGantt/) und [**Scheduler**](https://dhtmlx.com/docs/products/dhtmlxScheduler/), synchronisiert werden können: + + + +## Kanban-Daten abrufen + +Um Kanban-Daten abzurufen, können Sie folgende Methoden verwenden: + +- [`getAreaCards()`](api/methods/js_kanban_getareacards_method.md) – gibt ein Array mit Datenobjekten aller Karten der angegebenen Spalte (und Zeile) zurück +- [`getCard()`](api/methods/js_kanban_getcard_method.md) – gibt ein Datenobjekt einer Karte anhand der angegebenen ID zurück +- [`serialize()`](api/methods/js_kanban_serialize_method.md) – serialisiert Kanban-Daten zu JSON + +## Kanban-Status abrufen + +Um den Status von Kanban abzurufen, können Sie folgende Methoden verwenden: + +- [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) – gibt ein Objekt mit den reaktiven Eigenschaften des *StateStore* zurück +- [`api.getState()`](api/internal/js_kanban_getstate_method.md) – gibt ein Objekt mit den aktuellen Eigenschaften des *StateStore* zurück +- [`api.getStores()`](api/internal/js_kanban_getstores_method.md) – gibt ein Objekt mit den *StateStore* und *DataStore* Objekten zurück + +## Kanban-Daten exportieren + +Um Kanban-Daten zu exportieren, können Sie folgende Methode verwenden: + +- [`export.json()`](api/internal/js_kanban_json_method.md) – exportiert die Kanban-Daten in eine JSON-Datei + +## Neue Elemente hinzufügen + +Um neue *cards*, *columns* und *rows* hinzuzufügen, können Sie die folgenden Methoden verwenden: + +- [`addCard()`](api/methods/js_kanban_addcard_method.md) – fügt eine neue Karte zu Kanban hinzu +- [`addColumn()`](api/methods/js_kanban_addcolumn_method.md) – fügt eine neue Spalte zu Kanban hinzu +- [`addRow()`](api/methods/js_kanban_addrow_method.md) – fügt eine neue Zeile zu Kanban hinzu + +## Elemente aktualisieren + +Um *cards*, *columns* und *rows* zu aktualisieren, können Sie die folgenden Methoden verwenden: + +- [`updateCard()`](api/methods/js_kanban_updatecard_method.md) – aktualisiert die Kartendaten anhand der angegebenen ID +- [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) – aktualisiert die Spaltendaten anhand der angegebenen ID +- [`updateRow()`](api/methods/js_kanban_updaterow_method.md) – aktualisiert die Zeilendaten anhand der angegebenen ID + +## Elemente löschen + +Um *cards*, *columns* und *rows* zu entfernen, können Sie die folgenden Methoden verwenden: + +- [`deleteCard()`](api/methods/js_kanban_deletecard_method.md) – entfernt eine Karte aus Kanban anhand der angegebenen ID +- [`deleteColumn()`](api/methods/js_kanban_deletecolumn_method.md) – entfernt eine Spalte aus Kanban anhand der angegebenen ID +- [`deleteRow()`](api/methods/js_kanban_deleterow_method.md) – entfernt eine Zeile aus Kanban anhand der angegebenen ID + +## Elemente verschieben + +Um *cards*, *columns* und *rows* zu verschieben, können Sie die folgenden Methoden verwenden: + +- [`moveCard()`](api/methods/js_kanban_movecard_method.md) – verschiebt eine Karte in die gewünschte Spalte und Zeile +- [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md) – verschiebt eine Spalte an die gewünschte Position +- [`moveRow()`](api/methods/js_kanban_moverow_method.md) – verschiebt eine Zeile an die gewünschte Position + +## Beispiel + +In diesem Beispiel sehen Sie, wie Sie die Kanban-API für die Arbeit mit Daten verwenden können: + + \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/working_with_server.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/working_with_server.md new file mode 100644 index 0000000..5aced14 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/working_with_server.md @@ -0,0 +1,368 @@ +--- +sidebar_label: Arbeiten mit dem Server +title: Arbeiten mit dem Server +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie, wie Sie mit dem Server arbeiten. Stöbern Sie in Entwicklerhandbüchern und der API-Referenz, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Arbeiten mit dem Server + +JavaScript Kanban ermöglicht das Arbeiten sowohl mit Client- als auch mit Serverdaten. Das Widget stellt keine besonderen Anforderungen an das Backend. Es kann einfach mit jeder Backend-Plattform verbunden werden, die die REST API (RESTful API) unterstützt. + +:::info +Standardmäßig wird das Widget mit einem integrierten **Go**- und **Node**-Backend ausgeliefert. Sie können jedoch auch eigene Serverskripte verwenden. +::: + +## RestDataProvider + +JavaScript Kanban bietet den **RestDataProvider**-Service, der die REST API vollständig für die Kommunikation mit dem Backend unterstützt. Damit können Sie mit dem Server interagieren und folgende Datenoperationen ausführen: + +- ***"add-card"*** +- ***"add-column"*** +- ***"add-comment"*** +- ***"add-row"*** +- ***"add-link"*** +- ***"delete-card"*** +- ***"delete-column"*** +- ***"delete-comment"*** +- ***"delete-row"*** +- ***"delete-link"*** +- ***"move-card"*** +- ***"move-column"*** +- ***"move-row"*** +- ***"update-card"*** +- ***"update-column"*** +- ***"update-comment"*** +- ***"update-row"*** + +## REST-Methoden + +Der **RestDataProvider**-Service enthält spezielle REST-Methoden für das dynamische Laden von Daten: + +- [`getCards()`](api/provider/rest_methods/js_kanban_getcards_method.md) – gibt ein Promise mit den ***Karten-Daten*** zurück +- [`getColumns()`](api/provider/rest_methods/js_kanban_getcolumns_method.md) – gibt ein Promise mit den ***Spalten-Daten*** zurück +- [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) – gibt ein Promise mit den ***Verbindungsdaten*** zurück +- [`getRows()`](api/provider/rest_methods/js_kanban_getrows_method.md) – gibt ein Promise mit den ***Zeilen-Daten*** zurück +- [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md) – gibt ein Promise mit den ***Benutzerdaten*** zurück + +## Interaktion mit dem Backend + +Um mit dem Server zu interagieren, müssen Sie den **RestDataProvider** mit den entsprechenden Serverskripten verbinden. Wenn Sie das integrierte Backend verwenden möchten, finden Sie die benötigten Skripte in folgenden Repositories: + +- [**Go**](https://github.com/web-widgets/kanban-go) Backend +- [**Node**](https://github.com/web-widgets/kanban-node) Backend + +Sie können aber auch ein eigenes Backend erstellen. + +:::tip +Wenn Sie ein eigenes Backend verwenden, lesen Sie das Thema [**REST API routes**](api/overview/rest_routes_overview.md) für weitere Informationen! +::: + +Um **RestDataProvider** mit dem Backend zu verbinden, müssen Sie den **kanban.RestDataProvider**-Konstruktor aufrufen und die entsprechende **URL** als Parameter übergeben. + +~~~js {1-2,27} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getUsers(), + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows() +]).then(([users, cards, columns, links, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +Sie müssen **RestDataProvider** in die Reihenfolge des **Event Bus** über die Methode [**api.setNext()**](api/internal/js_kanban_setnext_method.md) einbinden, um Datenoperationen (*Hinzufügen*, *Löschen* usw.) durchzuführen und die entsprechenden Anfragen an den Server zu senden. +::: + +### Beispiel + +Im folgenden Beispiel sehen Sie, wie Sie **RestDataProvider** mit dem **Go**-Backend verbinden und Serverdaten laden: + + + +## Multiuser-Backend + +Projektmanagement-Tools wie unser Kanban sind bei Unternehmen jeder Größe sehr gefragt. Daher ist es wichtig, eine reibungslose Benutzererfahrung für mehrere Nutzer zu ermöglichen. Unser neues Feature erlaubt es, dass mehrere Nutzer dieselben Karten auf dem Kanban-Board in Echtzeit verwalten können, ohne dass die Seite neu geladen werden muss. So können Endnutzer zusammenarbeiten und bleiben stets über die Aktionen der anderen auf dem Laufenden, was die Produktivität und Zufriedenheit steigert. + +Um ein Multiuser-Backend zu implementieren, müssen Sie vor der Kanban-Initialisierung eine Autorisierung am Server durchführen. Dafür können Sie die Funktion `login(url: string)` erstellen: + +~~~js {} +const login = (url) => { + var token = sessionStorage.getItem("login-token"); + if (token) { + return Promise.resolve(token); + } + + return fetch(url + "/login?id=1") + .then(raw => raw.text()) + .then(token => { + sessionStorage.setItem("login-token", token); + return token; + }); +}; +~~~ + +Diese Funktion simuliert lediglich die Autorisierung, und alle Benutzer werden mit der ID 1 autorisiert. Nach erfolgreicher Autorisierung sendet der Server ein Token, das bei jeder weiteren Anfrage an den Server verwendet werden muss. Um das Senden des Tokens zu automatisieren, wird die Funktion `RestDataProvider.setHeaders()` verwendet. Diese Funktion fügt Anfragen benutzerdefinierte Header hinzu. Standardmäßig speichert unser Server das Token im Header `"Remote-Token":`: + +~~~js {} +login(url).then(token => { + // Initialisierung des RestProviders + const restProvider = new kanban.RestDataProvider(url); + // Token als benutzerdefinierten Header setzen + restProvder.setHeaders({ + "Remote-Token": "eyJpZCI6IjEzMzciLCJ1c2VybmFtZSI6ImJpem9uZSIsImlhdC...", + }); + + // Widget-Initialisierung... +}); +~~~ + +Nach Erhalt des Tokens sollten Sie das Widget initialisieren. Dies kann folgendermaßen erfolgen: + +~~~js {} +// Widget-Initialisierung... +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows(), +]).then(([cards, columns, links, rows]) => { + const board = new Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "row", + cardShape, + editorShape, + }); + + // Daten vom Client zum Server speichern + board.api.setNext(restProvider); + + // Multiuser-Initialisierung... +}); +~~~ + +Nach der Widget-Initialisierung müssen Sie einen WebSocket hinzufügen, um Ereignisse vom Server zu empfangen. Dies kann wie folgt umgesetzt werden: + +~~~js {} +// Multiuser-Initialisierung... + +// Client-Handler für Server-Events erhalten +const handlers = kanbanUpdates( + board.api, + restProvider.getIDResolver() +); +// Verbindung zu Server-Events herstellen +const events = new RemoteEvents(url + "/api/v1", token); +// Client-Handler an Server-Events anhängen +events.on(handlers); +~~~ + +- `handlers` – die Client-Handler, die Server-Ereignisse verarbeiten +- `events` – das Objekt, das sich mit dem Server verbindet und alle eingehenden Ereignisse abhört +- `RemoteEvents.on(handlers)` – wendet die Client-Handler auf Server-Ereignisse an + +Nach der Integration des Multiuser-Backends in Ihre App können Sie die Zusammenarbeit zwischen den Nutzern vereinfachen und ermöglichen, dass Änderungen in Echtzeit über die Benutzeroberfläche verfolgt werden. + +### Beispiel + +Der folgende Snippet zeigt, wie Sie das Multiuser-Backend konfigurieren, um Änderungen anderer Nutzer in Echtzeit zu verfolgen: + + + +## Anpassung von Server-Ereignissen + +Sie können Ihre eigene Logik für die Verarbeitung von Server-Ereignissen definieren. Dafür müssen Sie das **handlers**-Objekt an die Methode `RemoteEvents.on(handlers)` übergeben. Das **handlers**-Objekt sollte folgende Struktur haben: + +~~~js {} +{ + "cards": cardsHandler: function(obj: any), + "columns": columnsHandler: function(obj: any), + "links": linksHandler: function(obj: any), + "rows": rowsHandler: function(obj: any), +} +~~~ + +Wenn auf dem Server eine Änderung erfolgt, gibt dieser den Namen des geänderten Elements zurück. Diese Namen können je nach Server-Logik variieren. + +Die auf der Client-Seite aktualisierten Daten werden im **obj**-Argument der Funktion `function(obj: any)` übergeben. Um eine Operation zu kennzeichnen, gibt es das Feld `type: string`. Es kann folgende Werte annehmen: + +- Für **cards**: `"add-card"`, `"update-card"`, `"delete-card"`, `"move-card"` +- Für **columns**: `"add-column"`, `"update-column"`, `"delete-column"`, `"move-column"` +- Für **links**: `"add-link"`, `"delete-link"` +- Für **rows**: `"add-row"`, `"update-row"`, `"delete-row"`, `"move-row"` + +Im folgenden Codebeispiel sehen Sie die Implementierungsdetails: + +~~~js {} +// Kanban initialisieren +const board = new kanban.Kanban(...); +const restProvider = new kanban.RestDataProvider(url); +const idResolver = restProvider.getIDResolver(); +const TypeCard = 1; +const TypeRow = 2; +const TypeCol = 3; + +const cardsHandler = (obj: any) => { + obj.card.id = idResolver(obj.card.id, TypeCard); + obj.card.row = idResolver(obj.card.row, TypeRow); + obj.card.column = idResolver(obj.card.column, TypeColumn); + switch (obj.type) { + case "add-card": + board.api.exec("add-card", { + card: obj.card, + select: false, + skipProvider: true, // verhindert das Senden der Anfrage vom Client an den Server + }) + break; + // weitere Operationen + } +} + +// Eigene Handler hinzufügen +const handlers = { + cards: cardsHandler, +}; + +const remoteEvents = new kanban.RemoteEvents(remoteEventsURL, token); +remoteEvents.on(handlers); +~~~ + +Die Methode `RestDataProvider.getIDResolver()` gibt eine Funktion zurück, die zur Synchronisierung von Client-IDs mit Server-IDs benötigt wird. Wenn ein neues Objekt (*card/column/row/link*) auf der Client-Seite erstellt wird, erhält das Objekt eine temporäre ID und eine entsprechende Server-ID im Store. Die Funktion `idResolver()` ermöglicht die Synchronisierung der Client-ID mit der Server-ID. Diese Funktion hat folgendes Format: `idResolver(id: TID, type: number)` + +Das Argument `type` ist der Modelltyp und nimmt folgende Werte an: + +- `CardID` - 1, +- `RowID` - 2, +- `ColumnID` - 3 +- `LinkID` - 4 + +Um zu verhindern, dass eine Anfrage an den Server gesendet wird, müssen Sie das Flag `skipProvider: true` beim Aufruf der Methode `board.api.exec()` verwenden. + +Im letzten Schritt wenden Sie die eigenen Handler auf die Server-Ereignisse an. So können Sie Ihre eigenen Server-Event-Handler erstellen. + +## Gruppierung von zwei oder mehr Status in einer einzigen Spalte + +In diesem Abschnitt sehen Sie, wie Sie Karten aus verschiedenen Spalten in einer Spalte anzeigen können (zum Beispiel eine gemeinsame Spalte für Karten mit den Status *To do* und *Unassigned*). + +Um eine solche Gruppierung zu implementieren, müssen Sie ein benutzerdefiniertes Feld hinzufügen (zum Beispiel **status**). Dieses Feld speichert den aktuellen Status einer Karte. Das Feld **column** speichert den gemeinsamen Status. + +Anschließend müssen Sie spezielle Regeln für die Gruppierung der Karten erstellen. In unserem Fall werden die Karten in bestimmten Spalten nach folgenden Status gruppiert: + +- *todo*, *unassigned* – Status für die Spalte **Open** +- *dev*, *testing* – Status für die Spalte **Inprogress** +- *merged*, *released* – Status für die Spalte **Done** + +Es gibt zwei Möglichkeiten, wie Sie eine solche Gruppierung von Karten in einer Spalte nach zwei oder mehr Status umsetzen können: + +- [Serverseitig](#serverseitige-gruppierung) +- [Serverseitig + clientseitig](#serverseitige--clientseitige-gruppierung) + +### Serverseitige Gruppierung + +Wenn Sie die serverseitige Gruppierung umsetzen möchten, sollte Ihr Server in der Lage sein, Daten über [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) an den Client zu senden (siehe [Multiuser-Backend](#multiuser-backend)). + +An der Stelle, an der der Server eine Anfrage zur Aktualisierung einer Karte verarbeitet, müssen Sie das **status**-Feld überprüfen. In unserem Beispiel verwenden wir die Programmiersprache [Go](https://go.dev/), aber Sie können auch andere Backend-Technologien verwenden. + +~~~go +func Update(id int, c Card) error { + // ... + oldColumn := c.Column + s := data.Status + if s == "todo" || s == "unassigned" { + c.Column = "open" + } else if s == "dev" || s == "testing" { + c.Column = "inprogress" + } else if s == "merged" || s == "released" { + c.Column = "done" + } + + db.Save(&c) + + if oldColumn != c.Column { + // Wenn die Spalte durch das Statusfeld aktualisiert wurde, + // sollte der Client benachrichtigt werden, die Karte in die entsprechende Spalte zu verschieben + + // Index der Karte aktualisieren + updateCardIndex(&c) + + // Client benachrichtigen, die Spalte zu aktualisieren + ws.Publish("card-update", &c) + } + // ... +} +~~~ + +Wenn der Benutzer den Wert des Statusfelds ändert, prüft die Serverlogik den Wert und platziert die Karte in der entsprechenden Spalte. Anschließend verwendet der Server WebSocket, um dem Client mitzuteilen, dass die Karte in eine andere Spalte verschoben werden muss. + +### Serverseitige + clientseitige Gruppierung + +Für den gemischten Server- + Client-Ansatz sollten Sie Gruppierungsregeln vom Server abrufen. Gemäß diesen Regeln kann der Client bestimmen, in welche Spalte die Karte je nach Wert des Statusfelds verschoben wird. + +~~~js +const groupingRules = await fetch("http://server.com/rules"); +~~~ + +Beispielsweise können Sie folgende Regeln festlegen: + +~~~json +{ + "open": ["todo", "unassigned"], + "progress": ["dev", "testing"], + "done": ["merged", "released"], +} +~~~ + +Anschließend müssen Sie eine Logik definieren, die die Kartenänderungen prüft und die Karte in die gewünschte Spalte verschiebt: + +~~~js +const updateColumn = card => { + for (let col in groupingRules) { + if (groupingRules[col].includes(card.status)) { + card.column = col; + break; + } + } +}; + +kanban.api.intercept("move-card", ev => { + kanban.api.exec("update-card", { + id: ev.id, + card: { status: groupingRules[ev.columnId][0], + }); +}); + +kanban.api.intercept("update-card", ev => { + updateColumn(ev.card); +}); +~~~ + +Auf diese Weise können Sie bestimmte Spalten für Karten abhängig von anderen Feldern festlegen. + +### Beispiel + +Der folgende Snippet zeigt, wie Sie die Serverseite konfigurieren, um zwei oder mehr Status in Echtzeit in einer Spalte zu gruppieren: + + \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/how_to_start.md b/i18n/de/docusaurus-plugin-content-docs/current/how_to_start.md new file mode 100644 index 0000000..28bfd11 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/how_to_start.md @@ -0,0 +1,129 @@ +--- +sidebar_label: Erste Schritte +title: Erste Schritte +description: In der Dokumentation der DHTMLX JavaScript Kanban-Bibliothek erfahren Sie, wie Sie mit DHTMLX Kanban beginnen. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# Erste Schritte + +Dieses übersichtliche und umfassende Tutorial führt Sie durch die notwendigen Schritte, um ein voll funktionsfähiges Kanban auf einer Seite einzubinden. + +import editor from '@site/static/img/js_kanban_editor.png'; + +JS Kanban Main + +## Schritt 1. Einbinden der Quelldateien + +Beginnen Sie mit dem Erstellen einer HTML-Datei und nennen Sie sie *index.html*. Fügen Sie dann die Kanban-Quelldateien in die erstellte Datei ein. + +Es gibt zwei notwendige Dateien: + +- die JS-Datei von Kanban +- die CSS-Datei von Kanban + +~~~html {5-6} title="index.html" + + + + How to Start with Kanban + + + + + + + +~~~ + +### Kanban mit npm oder yarn installieren + +Sie können JavaScript Kanban mit dem Paketmanager `yarn` oder `npm` in Ihr Projekt importieren. + +#### Testversion von Kanban mit npm oder yarn installieren + +:::info +Wenn Sie die Testversion von Kanban verwenden möchten, laden Sie das [**Test-Kanban-Paket**](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml) herunter und folgen Sie den Schritten in der *README*-Datei. Beachten Sie, dass die Testversion von Kanban nur 30 Tage verfügbar ist. +::: + +#### PRO Kanban mit npm oder yarn installieren + +:::info +Sie können direkt im [Kundenbereich](https://dhtmlx.com/clients/) auf das private **npm** von DHTMLX zugreifen, indem Sie Ihre Zugangsdaten für **npm** generieren. Dort finden Sie auch eine ausführliche Installationsanleitung. Bitte beachten Sie, dass der Zugriff auf das private **npm** nur solange verfügbar ist, wie Ihre proprietäre Kanban-Lizenz aktiv ist. +::: + +## Schritt 2. Kanban erstellen + +Nun sind Sie bereit, Kanban auf der Seite hinzuzufügen. Erstellen Sie zunächst die DIV-Container für Kanban und die Toolbar. Gehen Sie dazu wie folgt vor: + +- Fügen Sie zwei DIV-Container in die *index.html* Datei ein +- Initialisieren Sie Kanban und die Toolbar mit den Konstruktoren **kanban.Kanban** und **kanban.Toolbar** + +:::info +Die Toolbar ist ein optionaler Bestandteil der Kanban-Oberfläche. Um Kanban ohne Toolbar zu erstellen, können Sie nur einen DIV-Container angeben und das Widget über den **kanban.Kanban** Konstruktor initialisieren. +::: + +Als Parameter nehmen die Konstruktoren die IDs der HTML-Container, in denen Kanban und Toolbar platziert werden, sowie die entsprechenden Konfigurationsobjekte. + +~~~html {9-10,13-15,17-19} title="index.html" + + + + How to Start with Kanban + + + + +
+
+ + + + +~~~ + +## Schritt 3. Kanban konfigurieren + +Als Nächstes können Sie die gewünschten Konfigurationseigenschaften für die Initialisierung der Kanban-Komponente angeben. + +Um mit Kanban zu arbeiten, müssen Sie zunächst die Anfangsdaten für **cards** und **columns** (und *rows*) bereitstellen. +Neben den Anfangsdaten können Sie das Aussehen der [cards](guides/configuration.md#karten), des [editor](guides/configuration.md#editor) und der [toolbar](guides/configuration.md#toolbar) konfigurieren. + +~~~jsx {2-7,11-18} +const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row", + cardShape, + editorShape +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" + ] +}); +~~~ + +## Wie geht es weiter? + +Das war's! Nur drei einfache Schritte und Sie verfügen über ein praktisches Tool zur Visualisierung und Verwaltung Ihres Workflows. Jetzt können Sie mit Ihren Aufgaben arbeiten oder die Möglichkeiten von JavaScript Kanban weiter erkunden. \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/howtos.md b/i18n/de/docusaurus-plugin-content-docs/current/howtos.md new file mode 100644 index 0000000..8f91f13 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/howtos.md @@ -0,0 +1,199 @@ +--- +sidebar_label: How-tos +title: JavaScript Kanban How-Tos +description: Sie können die How-tos-Seite der DHTMLX JavaScript Kanban-Bibliothek in der Dokumentation erkunden. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# How-tos + +Diese Seite bietet eine umfassende Referenz zur Initialisierung, Konfiguration, Anpassung und Arbeit mit JavaScript Kanban. + +## Grundprinzipien + +In diesem Abschnitt erfahren Sie die grundlegenden Prinzipien der Arbeit mit Kanban. + +| Thema | Beschreibung | +| --------------------------------------------- | ---------------------------------------------------------| +| [](guides/initialization.md) | Lernen Sie, wie Sie Kanban initialisieren ([Beispiel](https://snippet.dhtmlx.com/gb50vyip?tag=kanban))| +| [](guides/configuration.md) | Lernen Sie, wie Sie Kanban konfigurieren | +| [](guides/customization.md) | Lernen Sie, wie Sie Kanban anpassen | +| [](guides/stylization.md) | Lernen Sie, wie Sie Kanban gestalten | +| [](guides/localization.md) | Lernen Sie, wie Sie Kanban lokalisieren ([Beispiel](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban))| + +## API-Referenz + +In diesem Abschnitt finden Sie die entsprechenden Referenzen zur Kanban API. + +| Thema | Beschreibung | +| ----------------------------------------------------- | ---------------------------------------------------------| +| [Kanban events](api/overview/events_overview.md) | Lernen Sie, wie Sie mit Kanban-Events arbeiten | +| [Kanban methods](api/overview/methods_overview.md) | Lernen Sie, wie Sie mit Kanban-Methoden arbeiten | +| [Kanban properties](api/overview/properties_overview.md)| Lernen Sie, wie Sie mit Kanban-Eigenschaften arbeiten | +| [Event Bus methods](api/overview/internal_eventbus_overview.md)| Lernen Sie, wie Sie mit Event Bus-Methoden arbeiten | +| [RestDataProvider methods](api/overview/internal_rest_overview.md)| Lernen Sie, wie Sie mit RestDataProvider-Methoden arbeiten| +| [State methods](api/overview/internal_state_overview.md)| Lernen Sie, wie Sie mit State-Methoden arbeiten | +| [Toolbar methods](api/overview/toolbar_methods_overview.md)| Lernen Sie, wie Sie mit Toolbar-Methoden arbeiten | +| [Toolbar properties](api/overview/toolbar_properties_overview.md)| Lernen Sie, wie Sie mit Toolbar-Eigenschaften arbeiten| + +## Arbeiten mit Karten + +In diesen Abschnitten erfahren Sie, wie Sie Operationen mit Karten durchführen, mit Kartendaten arbeiten und Karten konfigurieren. + +### Operationen mit Karten durchführen + +| Thema | Beschreibung | +| ------------------------------------------------------------ | --------------------------------------------| +| [Adding new cards](api/methods/js_kanban_addcard_method.md) | Lernen Sie, wie Sie neue Karten hinzufügen ([Beispiel](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Deleting cards](api/methods/js_kanban_deletecard_method.md) | Lernen Sie, wie Sie Karten löschen ([Beispiel](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Moving cards](api/methods/js_kanban_movecard_method.md) | Lernen Sie, wie Sie Karten verschieben ([Beispiel](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Scrolling to the desired cards](api/methods/js_kanban_scroll_method.md)| Lernen Sie, wie Sie Kanban zur gewünschten Karte scrollen| +| [Searching for cards](api/methods/js_kanban_setsearch_method.md)| Lernen Sie, wie Sie nach Karten suchen | +| [Selecting cards](api/methods/js_kanban_selectcard_method.md)| Lernen Sie, wie Sie Karten auswählen | +| [Sorting cards](api/methods/js_kanban_setsort_method.md) | Lernen Sie, wie Sie Karten sortieren | +| [Unselecting cards](api/methods/js_kanban_unselectcard_method.md)| Lernen Sie, wie Sie Karten abwählen | +| [Adding links between cards](api/config/js_kanban_links_config.md)| Lernen Sie, wie Sie Verknüpfungen zwischen Karten hinzufügen ([Beispiel](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) | + +### Arbeiten mit Kartendaten + +| Thema | Beschreibung | +| ------------------------------------------------------------ | ----------------------------------------------------| +| [Getting card data](api/methods/js_kanban_getcard_method.md) | Lernen Sie, wie Sie Kartendaten abrufen | +| [Getting cards state](api/internal/js_kanban_getstate_method.md) | Lernen Sie, wie Sie den Kartenstatus abrufen | +| [Getting cards reactive state](api/internal/js_kanban_getreactivestate_method.md) | Lernen Sie, wie Sie den reaktiven Kartenstatus abrufen| +| [Loading card data](api/config/js_kanban_cards_config.md) | Lernen Sie, wie Sie die initialen Kartendaten laden | +| [Parsing card data](api/methods/js_kanban_parse_method.md) | Lernen Sie, wie Sie Kartendaten parsen | +| [Serializing card data](api/methods/js_kanban_serialize_method.md)| Lernen Sie, wie Sie Kartendaten serialisieren ([Beispiel](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Updating card data](api/methods/js_kanban_updatecard_method.md)| Lernen Sie, wie Sie Kartendaten aktualisieren | + +### Karten konfigurieren + +| Thema | Beschreibung | +| ------------------------------------------------------------ | ----------------------------------------------------| +| [Adding new cards](api/config/js_kanban_readonly_config.md) | Lernen Sie, wie Sie das Hinzufügen neuer Karten aktivieren/deaktivieren| +| [Binding cards into columns](api/config/js_kanban_columnkey_config.md) | Lernen Sie, wie Sie Karten an Spalten binden | +| [Binding cards into rows](api/config/js_kanban_rowkey_config.md) | Lernen Sie, wie Sie Karten an Zeilen binden | +| [Configuring a card appearance](api/config/js_kanban_cardshape_config.md)| Lernen Sie, wie Sie das Erscheinungsbild einer Karte konfigurieren| +| [Configuring a cards menu](api/config/js_kanban_cardshape_config.md)| Lernen Sie, wie Sie ein Kontextmenü für Karten konfigurieren ([Beispiel](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Customizing a card appearance](api/config/js_kanban_cardtemplate_config.md)| Lernen Sie, wie Sie das Erscheinungsbild einer Karte mit Vorlagen anpassen ([Beispiel](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban))| +| [Dragging cards](api/config/js_kanban_readonly_config.md) | Lernen Sie, wie Sie das Ziehen und Ablegen von Karten aktivieren/deaktivieren| +| [Editing cards](api/config/js_kanban_readonly_config.md) | Lernen Sie, wie Sie das Bearbeiten von Karten aktivieren/deaktivieren| +| [Lazy rendering](api/config/js_kanban_rendertype_config.md)| Lernen Sie, wie Sie das **Lazy Rendering** für viele Karten aktivieren/deaktivieren ([Beispiel](https://snippet.dhtmlx.com/xez9ghqq?text=#kanban))| +| [Limiting cards](api/config/js_kanban_columns_config.md) | Lernen Sie, wie Sie Karten für Spalten und Swimlanes begrenzen (**WIP-Validierung**) ([Beispiel](https://snippet.dhtmlx.com/2blo6hx8?text=kanban))| +| [Selecting cards](api/config/js_kanban_readonly_config.md) | Lernen Sie, wie Sie das Auswählen von Karten aktivieren/deaktivieren| +| [Setting a fix height of cards](api/config/js_kanban_cardheight_config.md)| Lernen Sie, wie Sie eine feste Höhe für Karten einstellen| +| [Updating card settings](api/methods/js_kanban_setconfig_method.md)| Lernen Sie, wie Sie Karteneinstellungen aktualisieren| + +## Arbeiten mit einem Karteneditor + +In diesem Abschnitt erfahren Sie, wie Sie mit einem Karteneditor arbeiten. + +| Thema | Beschreibung | +| ------------------------------------------------------------ | -------------------------------------------------------| +| [Autosaving mode](api/config/js_kanban_editorautosave_config.md)| Lernen Sie, wie Sie den Auto-Speicher-Modus für den Editor aktivieren/deaktivieren| +| [Configuring editor fields](guides/configuration.md#editor)| Lernen Sie, wie Sie Editorfelder konfigurieren | +| [Configuring the editor](guides/configuration.md#den-editor-konfigurieren)| Lernen Sie, wie Sie den Editor konfigurieren | +| [Updating editor settings](api/methods/js_kanban_setconfig_method.md)| Lernen Sie, wie Sie Editoreinstellungen aktualisieren | + +## Arbeiten mit Spalten + +In diesen Abschnitten erfahren Sie, wie Sie Operationen mit Spalten durchführen und mit Spaltendaten arbeiten. + +### Operationen mit Spalten durchführen + +| Thema | Beschreibung | +| --------------------------------------------------------------- | ----------------------------------------------------| +| [Adding new columns](api/methods/js_kanban_addcolumn_method.md) | Lernen Sie, wie Sie neue Spalten hinzufügen ([Beispiel](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Configuring a columns menu](api/config/js_kanban_columnshape_config.md)| Lernen Sie, wie Sie ein Kontextmenü für Spalten konfigurieren ([Beispiel](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting columns](api/methods/js_kanban_deletecolumn_method.md)| Lernen Sie, wie Sie Spalten löschen | +| [Moving columns](api/methods/js_kanban_movecolumn_method.md) | Lernen Sie, wie Sie Spalten verschieben | +| [Scrolling to the desired columns](api/methods/js_kanban_scroll_method.md)| Lernen Sie, wie Sie Kanban zur gewünschten Spalte scrollen | +| [Separate scrolling for columns](api/config/js_kanban_scrolltype_config.md)| Lernen Sie, wie Sie ein separates Scrollen für jede Spalte einstellen ([Beispiel](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban))| + +### Arbeiten mit Spaltendaten + +| Thema | Beschreibung | +| --------------------------------------------------------------- | ----------------------------------------------------| +| [Getting card data of the column](api/methods/js_kanban_getareacards_method.md)| Lernen Sie, wie Sie die Kartendaten einer Spalte abrufen| +| [Getting columns state](api/internal/js_kanban_getstate_method.md) | Lernen Sie, wie Sie den Spaltenstatus abrufen | +| [Getting columns reactive state](api/internal/js_kanban_getreactivestate_method.md) | Lernen Sie, wie Sie den reaktiven Spaltenstatus abrufen| +| [Loading column data](api/config/js_kanban_columns_config.md) | Lernen Sie, wie Sie die initialen Spaltendaten laden | +| [Parsing column data](api/methods/js_kanban_parse_method.md) | Lernen Sie, wie Sie Spaltendaten parsen | +| [Serializing column data](api/methods/js_kanban_serialize_method.md)| Lernen Sie, wie Sie Spaltendaten serialisieren | +| [Updating column data](api/methods/js_kanban_updatecolumn_method.md)| Lernen Sie, wie Sie Spaltendaten aktualisieren | + +## Arbeiten mit Zeilen (Swimlanes) + +In diesen Abschnitten erfahren Sie, wie Sie Operationen mit Zeilen durchführen und mit Zeilendaten arbeiten. + +### Operationen mit Zeilen (Swimlanes) durchführen + +| Thema | Beschreibung | +| --------------------------------------------------------------- | ----------------------------------------------------| +| [Adding new rows](api/methods/js_kanban_addrow_method.md) | Lernen Sie, wie Sie neue Zeilen (Swimlanes) hinzufügen | +| [Configuring a rows menu](api/config/js_kanban_rowshape_config.md)| Lernen Sie, wie Sie ein Kontextmenü für Zeilen (Swimlanes) konfigurieren ([Beispiel](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting rows](api/methods/js_kanban_deleterow_method.md) | Lernen Sie, wie Sie Zeilen (Swimlanes) löschen | +| [Moving rows](api/methods/js_kanban_moverow_method.md) | Lernen Sie, wie Sie Zeilen (Swimlanes) verschieben | +| [Scrolling to the desired row](api/methods/js_kanban_scroll_method.md)| Lernen Sie, wie Sie Kanban zur gewünschten Zeile (Swimlane) scrollen| + +### Arbeiten mit Zeilen- (Swimlane-) Daten + +| Thema | Beschreibung | +| --------------------------------------------------------------- | ----------------------------------------------------| +| [Getting card data of the column and row](api/methods/js_kanban_getareacards_method.md)| Lernen Sie, wie Sie die Kartendaten einer Spalte und Zeile abrufen| +| [Getting rows state](api/internal/js_kanban_getstate_method.md) | Lernen Sie, wie Sie den Zeilenstatus abrufen | +| [Getting rows reactive state](api/internal/js_kanban_getreactivestate_method.md) | Lernen Sie, wie Sie den reaktiven Zeilenstatus abrufen| +| [Loading row data](api/config/js_kanban_rows_config.md) | Lernen Sie, wie Sie die initialen Zeilendaten laden | +| [Parsing row data](api/methods/js_kanban_parse_method.md) | Lernen Sie, wie Sie Zeilendaten parsen | +| [Serializing row data](api/methods/js_kanban_serialize_method.md)| Lernen Sie, wie Sie Zeilendaten serialisieren | +| [Updating row data](api/methods/js_kanban_updaterow_method.md) | Lernen Sie, wie Sie Zeilendaten aktualisieren | + +## Arbeiten mit Events + +| Thema | Beschreibung | +| ----------------------------------------------------------- | ---------------------------------------------------| +| [Executing events](api/internal/js_kanban_exec_method.md) | Lernen Sie, wie Sie interne Events ausführen | +| [Intercepting events](api/internal/js_kanban_intercept_method.md)| Lernen Sie, wie Sie interne Events abfangen | +| [List of inner events](api/overview/events_overview.md) | Sehen Sie die Liste der Kanban-internen Events | +| [Reordering events](api/internal/js_kanban_setnext_method.md)| Lernen Sie, wie Sie interne Events in die Event Bus-Reihenfolge einfügen| +| [Subscribing on events](api/internal/js_kanban_on_method.md)| Lernen Sie, wie Sie sich auf interne Events abonnieren| + +## Arbeiten mit der Kanban REST API + +| Thema | Beschreibung | +| ----------------------------------------------------------- | ---------------------------------------------------| +| [Loading server data for cards](api/provider/rest_methods/js_kanban_getcards_method.md)| Lernen Sie, wie Sie Serverdaten für Karten laden| +| [Loading server data for columns](api/provider/rest_methods/js_kanban_getcolumns_method.md)| Lernen Sie, wie Sie Serverdaten für Spalten laden| +| [Loading server data for rows](api/provider/rest_methods/js_kanban_getrows_method.md)| Lernen Sie, wie Sie Serverdaten für Zeilen laden| +| [Working with server](guides/working_with_server.md) | Lernen Sie, wie Sie mit dem Server über die REST API arbeiten ([Beispiel](https://snippet.dhtmlx.com/f25y0809?tag=kanban))| + +## Arbeiten mit Kanban-Status + +| Thema | Beschreibung | +| ----------------------------------------------------------- | ---------------------------------------------------| +| [Getting StateStore and DataStore](api/internal/js_kanban_getstores_method.md)| Lernen Sie, wie Sie StateStore- und DataStore-Objekte erhalten| +| [Getting StateStore properties](api/internal/js_kanban_getstate_method.md)| Lernen Sie, wie Sie ein Objekt der StateStore-Eigenschaften erhalten| +| [Getting StateStore reactive properties](api/internal/js_kanban_getreactivestate_method.md)| Lernen Sie, wie Sie ein Objekt der reaktiven StateStore-Eigenschaften erhalten| + +## Arbeiten mit der Toolbar + +| Thema | Beschreibung | +| ----------------------------------------------------------- | ------------------------------------------------------| +| [Configuring a searchbar on Toolbar](api/config/toolbar_items_config.md) | Lernen Sie, wie Sie eine Suchleiste in der Toolbar konfigurieren ([Beispiel](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring a sort control on Toolbar](api/config/toolbar_items_config.md) | Lernen Sie, wie Sie eine Sortiersteuerung in der Toolbar konfigurieren ([Beispiel](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring Toolbar controls](api/config/toolbar_items_config.md)| Lernen Sie, wie Sie die Toolbar-Steuerelemente konfigurieren, anpassen und anordnen ([Beispiel](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Including Kanban API in Toolbar](api/config/toolbar_api_config.md) | Lernen Sie, wie Sie die Kanban API in die Toolbar einbinden und verwenden| +| [Localizing Toolbar](api/config/toolbar_locale_config.md) | Lernen Sie, wie Sie die Toolbar lokalisieren| + +## Arbeiten mit TypeScript + +| Thema | Beschreibung | +| ----------------------------------------------------------- | ---------------------------------------------------| +| [Working with TypeScript](guides/typescript_support.md) | Lernen Sie, wie Sie mit TypeScript arbeiten | + +## Noch Fragen? + + + +:::info +Sie können Ihre Fragen auch unten in den Kommentaren hinterlassen! +::: \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/index.md b/i18n/de/docusaurus-plugin-content-docs/current/index.md new file mode 100644 index 0000000..b77bd0e --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/index.md @@ -0,0 +1,73 @@ +--- +sidebar_label: Kanban-Übersicht +title: JavaScript Kanban Übersicht +slug: / +description: In der Dokumentation erhalten Sie einen Überblick über die DHTMLX JavaScript Kanban-Bibliothek. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Testversion von DHTMLX Kanban herunter. +--- + +# DHTMLX Kanban Übersicht + +JavaScript Kanban ist eine effektive Lösung zur Visualisierung von Workflows. Das Widget hilft Ihnen, Ihre Geschäftsprozesse besser zu verstehen und einen Überblick über die Arbeitsauslastung Ihres Teams zu erhalten. Dieses flexible Tool kann mit beliebig vielen Karten, Spalten und Swimlanes arbeiten. Die Komponente ist vollständig in reinem JavaScript und CSS geschrieben und lässt sich einfach einrichten, anpassen und in jede Webanwendung oder Webseite integrieren. + +## Kanban-Struktur­ + +### Toolbar + +Die **Toolbar** von Kanban ist ein separater Teil der Benutzeroberfläche. Sie beinhaltet eine Suchleiste zum *Suchen* von Karten, eine Steuerung zum *Sortieren* von Karten nach bestimmten Parametern, zwei Steuerelemente zur Verwaltung der Historie (*Undo/Redo*) sowie Steuerelemente zum *Hinzufügen neuer Spalten und Zeilen*. Sie können die Such- und Sortierlogik flexibel steuern sowie die Struktur der Toolbar anpassen, indem Sie eigene Elemente hinzufügen oder die Reihenfolge der eingebauten Elemente verändern. Weitere Informationen finden Sie im Abschnitt [Konfiguration](guides/configuration.md#toolbar). + +import toolbar from '@site/static/img/js_kanban_toolbar.png'; + +Kanban Toolbar + +### Board + +Das **Board** ist der Hauptbestandteil von Kanban. Es besteht aus Karten, die auf Spalten und Zeilen (Swimlanes) verteilt sind. Sie können das Aussehen der Karten flexibel konfigurieren und eine eigene Vorlage anwenden. Weitere Informationen finden Sie im Abschnitt [Konfiguration](guides/configuration.md#karten). + +Auf dem **Board**-Panel können Sie mit den ***Karten***, ***Spalten*** und ***Zeilen*** wie folgt arbeiten: + +- Neue Karten durch Klicken auf das Plus-Symbol hinzufügen (entsprechend den festgelegten *Limits* für jede Spalte und Swimlane) +- Kommentare und Stimmen für Aufgaben über das Editor-Panel hinzufügen ([Beispiel](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- Verknüpfungen zwischen Aufgaben über den Editor setzen ([Beispiel](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- Karten, Spalten und Zeilen über das Kontextmenü (ein 3-Punkte-Symbol) löschen +- Karten über das Kontextmenü (ein 3-Punkte-Symbol) oder die Tastenkombination `Ctrl (Command)`+`D` duplizieren (ermöglicht das Duplizieren mehrerer Karten) +- Kanban-Daten in eine JSON-Datei exportieren +- Die Kanban-Historie mit folgenden Tastenkombinationen verwalten: + - `Ctrl (Command)`+`Z` – macht die letzte Aktion im Kanban rückgängig (ein Schritt zurück in der Kanban-Historie) + - `Ctrl (Command)`+`Y` oder `Ctrl (Command)`+`Shift`+`Z` – wiederholt die mit *Undo* rückgängig gemachte Aktion (ein Schritt vorwärts in der Kanban-Historie) +- Karten per Drag & Drop an die gewünschte Stelle (Zeile und Spalte) verschieben +- Spalten und Zeilen über das Kontextmenü (ein 3-Punkte-Symbol) verschieben +- Spalten und Zeilen durch Doppelklick auf die entsprechenden Beschriftungen oder über das Kontextmenü (ein 3-Punkte-Symbol) umbenennen +- Einen Karten-Editor durch Klicken auf die Karte öffnen +- Zeilen durch Klicken auf das Pfeilsymbol links neben dem Zeilenlabel ein- oder ausklappen +- Spalten durch Klicken auf das Pfeilsymbol links neben dem Spaltenlabel ein- oder ausklappen +- Mehrere Karten mit folgenden Tastenkombinationen auswählen: + - `Shift` + Klick auf die entsprechenden Karten, um mehrere Karten in derselben Spalte auszuwählen + - `Ctrl (Command)` + Klick auf die entsprechenden Karten, um mehrere Karten in verschiedenen Spalten auszuwählen + +import board from '@site/static/img/js_kanban_board.png'; + +Kanban Board + +### Editor + +Der **Editor** ist ein modales Panel, das aus Feldern und Steuerelementen zur Verwaltung der ausgewählten Kartendaten besteht. Um den Editor anzuzeigen, klicken Sie auf die Karte, die Sie bearbeiten möchten. Sie können die Struktur des Editors flexibel anpassen, indem Sie neue Felder und Steuerelemente hinzufügen. Weitere Informationen finden Sie im Abschnitt [Konfiguration](guides/configuration.md#editor). + +import editor from '@site/static/img/js_kanban_editor.png'; + +Kanban Editor + +## Wie geht es weiter? + +Jetzt können Sie Kanban in Ihrer Anwendung verwenden. Folgen Sie der Anleitung im Tutorial [How to start](how_to_start.md) für weitere Hinweise. \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/news/migration.md b/i18n/de/docusaurus-plugin-content-docs/current/news/migration.md new file mode 100644 index 0000000..763da14 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/news/migration.md @@ -0,0 +1,1454 @@ +--- +sidebar_label: Migration zu neueren Versionen +title: Migration zu neueren Versionen +description: Informationen zur Migration zu neueren Versionen finden Sie in der Dokumentation zur DHTMLX JavaScript Kanban Bibliothek. Stöbern Sie in den Entwicklerhandbüchern und der API-Referenz, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-Tage-Testversion von DHTMLX Kanban herunter. +--- + +# Migration zu neueren Versionen + +## 1.6.5 -> 1.7.0 + +### API + +#### Eigenschaften + +- Die [`editorShape`](api/config/js_kanban_editorshape_config.md) Eigenschaft wurde aktualisiert. Der Parameter `clearButton` wurde durch `clear` ersetzt: + +~~~jsx {8} title="Vor v1.7.0" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clearButton: true // legacy + } + }, { /* ... */ } + ] + // weitere Parameter +}); +~~~ + +~~~jsx {8} title="Ab v1.7.0" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clear: true // neu + } + }, { /* ... */ } + ] + // weitere Parameter +}); +~~~ + +- Die Funktion [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) wurde aktualisiert. Der **store** Parameter wurde durch **readonly** ersetzt: + +~~~jsx {3-4} title="Vor v1.7.0" +menu: { + show: true, + items: ({ card, store }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, store }); // der "store" Parameter ist legacy + ... + } +} +~~~ + +~~~jsx {3-4} title="Ab v1.7.0" +menu: { + show: true, + items: ({ card, readonly }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, readonly }); // der "readonly" Parameter ist neu + ... + } +} +~~~ + +- Die Funktion [`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md) wurde aktualisiert. Der **store** Parameter wurde durch **readonly** ersetzt: + +~~~jsx {3-4} title="Vor v1.7.0" +menu: { + show: true, + items: ({ column, columnIndex, columns, store }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, store }); // der "store" Parameter ist legacy + ... + } +} +~~~ + +~~~jsx {3-4} title="Ab v1.7.0" +menu: { + show: true, + items: ({ column, columnIndex, columns, readonly }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, readonly }); // der "readonly" Parameter ist neu + ... + } +} +~~~ + +- Die Funktion [`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) wurde aktualisiert. Der **store** Parameter wurde durch **readonly** ersetzt: + +~~~jsx {3-4} title="Vor v1.7.0" +menu: { + show: true, + items: ({ row, rowIndex, rows, store }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, store }); // der "store" Parameter ist legacy + ... + } +} +~~~ + +~~~jsx {3-4} title="Ab v1.7.0" +menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, readonly }); // der "readonly" Parameter ist neu + ... + } +} +~~~ + +- Die Parameter ***menu.items[0].label*** und ***menu.items[0].items*** sind ab v1.7 für die Eigenschaften [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md), [`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md) und [`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) entfernt worden. + +- Die Eigenschaft `editorAutoSave` wurde in v1.7 entfernt. Verwenden Sie stattdessen die Eigenschaft [`editor.autoSave`](api/config/js_kanban_editor_config.md): + +~~~jsx {2} title="Vor v1.7.0" +new kanban.Kanban("#root", { + editorAutoSave: true, // legacy + // weitere Parameter +}); +~~~ + +~~~jsx {3} title="Ab v1.7.0" +new kanban.Kanban("#root", { + editor: { + autoSave: true // neu + } + // weitere Parameter +}); +~~~ + +- Die [`links`](api/config/js_kanban_links_config.md) Eigenschaft wurde wie folgt aktualisiert: + - Der **masterId** Parameter wurde durch **source** ersetzt + - Der **slaveId** Parameter wurde durch **target** ersetzt + +~~~jsx {5-6,10} title="Vor v1.7.0" +const links = [ + { + id: 1, + // legacy + masterId: 2, + slaveId: 5 + }, {...} // weitere Linkdaten +]; + +new kanban.Kanban("#root", { + links, + // weitere Parameter +}); +~~~ + +~~~jsx {5-6,10} title="Ab v1.7.0" +const links = [ + { + id: 1, + // neu + source: 2, + target: 5 + }, {...} // weitere Linkdaten +]; + +new kanban.Kanban("#root", { + links, + // weitere Parameter +}); +~~~ + +#### Methoden + +- Die Methoden `undo` und `redo` wurden aus den Store-Methoden entfernt: + +~~~jsx {1} title="Vor v1.7.0" +kanban.api.getStores().data.undo() // legacy +~~~ + +~~~jsx {5-6,10} title="Ab v1.7.0" +kanban.undo(); +// oder +kanban.api.exec("undo"); +~~~ + +- Die Methoden [`api.getState()`](api/internal/js_kanban_getstate_method.md) und [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) wurden folgendermaßen aktualisiert: + - Die folgenden Parameter wurden in v1.7.0 entfernt: + + ```js + fromAreaMeta, + dropAreaItemsCoords, + dropAreasCoords, + overAreaMeta, + before, + dragItemId, + dragItemsCoords, + overAreaId + ``` + + - Die folgenden Parameter sind ab v1.7.0 privat: + + ```js + edit -> _edit: object, + layout -> _layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object + ``` + +#### Ereignisse + +- Die Parameter `dragItemsCoords` und `dropAreasCoords` wurden aus dem [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) Ereignis entfernt + +## 1.5.13 -> 1.6.0 + +Die CSS-Klassen für das Menü wurden wie folgt geändert: + +~~~jsx + .menu -> .wx-menu + .item -> .wx-item + .icon -> .wx-icon + .value -> .wx-value +~~~ + +## 1.5.12 -> 1.5.13 + +Die CSS-Klassen für den Editor wurden wie folgt geändert: + +~~~jsx + .modal -> .wx-modal + .window -> .wx-window + .modal .window .buttons -> .wx-modal .wx-window .wx-buttons + .combo -> .wx-combo + .combo -> .wx-multicombo + .item -> .wx-item + .color-picker -> .wx-colorselect + .colors -> .wx-colors + .slider -> .wx-slider + .datepicker -> .wx-datepicker + .calendar -> .wx-calendar + .calendar .days .day.out -> .wx-calendar .wx-days .wx-day.wx-out + .combo .tag -> .multicombo .wx-tag + .dropdown -> .wx-dropdown + .dropdown .item -> .wx-dropdown .wx-item + .clear -> .wx-clear +~~~ + +## 1.5.6 -> 1.5.7 + +### API + +#### Methoden + +- Die [`setLocale`](api/methods/toolbar_setlocale_method.md) Methode der Kanban-Toolbar wurde folgendermaßen geändert: + +~~~jsx {6} title="Vor v1.5.7" + // Kanban erstellen + const board = new kanban.Kanban("#root", {...}); + // Toolbar erstellen + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // Die "de"-Locale auf die Toolbar anwenden + toolbar.setLocale(de); // oder null, um die Locale auf den Standard (en) zurückzusetzen +~~~ + +~~~jsx {6} title="Ab v1.5.7" + // Kanban erstellen + const board = new kanban.Kanban("#root", {...}); + // Toolbar erstellen + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // Die "de"-Locale auf die Toolbar anwenden + toolbar.setLocale(de, board.api); +~~~ + +## 1.4 -> 1.5 + +### API + +#### Eigenschaften + +- Die [`columnShape`](api/config/js_kanban_columnshape_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.5" + { + menu: { + show: true, + items: [ + { + label: "Update", ... + } + ] + // weitere Parameter + } + } + ~~~ + + ~~~jsx {11} title="Ab v1.5" + { + menu: { + show: true, + items: [ + { + text: "Update", ... + } + ] + // weitere Parameter + }, + fixedHeaders: true + } + ~~~ + +## 1.3 -> 1.4 + +### API + +#### Eigenschaften + +- Die [`editorShape`](api/config/js_kanban_editorshape_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.4" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // weitere Parameter + ~~~ + + ~~~jsx {5,7-21} title="Ab v1.4" + { + type: "date", // oder Sie können auch den Typ "dateRange" verwenden + key: "start_date", + label: "Date Range" + format: "%d/%m/%y" + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", // oder "editor" + html: true, + }, + }, + { + type: "links", + key: "links", + label: "Links", + }, + // weitere Parameter + ~~~ + +- Die [`cardShape`](api/config/js_kanban_cardshape_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.4" + { + label: true, + description: true, + menu: { + items: [ + { + label: "Delete", ... + } + ] + } + // weitere Parameter + } + ~~~ + + ~~~jsx {7,11-13} title="Ab v1.4" + { + label: true, + description: true, + menu: { + items: [ + { + text: "Delete", ... + } + ] + }, + votes: true, + comments: true, + css: (card) => card.type == "feature" ? "green" : "red", + // weitere Parameter + } + ~~~ + +- Die [`columnShape`](api/config/js_kanban_columnshape_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.4" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // weitere Parameter + } + } + ~~~ + + ~~~jsx {6,11} title="Ab v1.4" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // weitere Parameter + }, + css: (column, cards) => column.id == "feature" && cards.length < 5 ? "green" : "red" + } + ~~~ + +- Die [`rowShape`](api/config/js_kanban_rowshape_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.4" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // weitere Parameter + } + } + ~~~ + + ~~~jsx {6,11} title="Ab v1.4" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // weitere Parameter + }, + css: (row, cards) => row.id == "task" && cards.length < 5 ? "green" : "red", + } + ~~~ + +- Die [`cards`](api/config/js_kanban_cards_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.4" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + // weitere Parameter + }, ... + ] + ~~~ + + ~~~jsx {6-18} title="Ab v1.4" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + // weitere Parameter + }, ... + ] + ~~~ + +- Die [`columns`](api/config/js_kanban_columns_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.4" + [ + { + id: "inprogress", + label: "In progress", + // weitere Parameter + }, ... + ] + ~~~ + + ~~~jsx {5-11} title="Ab v1.4" + [ + { + id: "inprogress", + label: "In progress", + css: "red", + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + // weitere Parameter + }, ... + ] + ~~~ + +- Die [`rows`](api/config/js_kanban_rows_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.4" + [ + { + id: "features", + label: "Features", + // weitere Parameter + }, ... + ] + ~~~ + + ~~~jsx {5} title="Ab v1.4" + [ + { + id: "features", + label: "Features", + css: "green" + // weitere Parameter + }, ... + ] + ~~~ + +- Die [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.4" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate + }); + ~~~ + + ~~~jsx {6-8} title="Ab v1.4" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+
+ +
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // weitere Parameter + }); + ~~~ + +- Das **sort**-Steuerelement in der [`items`](api/config/toolbar_items_config.md) Eigenschaft der Kanban Toolbar wurde wie folgt aktualisiert: + + ~~~jsx {} title="Vor v1.4" + [ + { // benutzerdefiniertes Sortier-Steuerelement + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + + ~~~jsx {6,11} title="Ab v1.4" + [ + { // benutzerdefiniertes Sortier-Steuerelement + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + +#### Methoden + +- Die [`api.getState()`](api/internal/js_kanban_getstate_method.md) Methode von Kanban wurde aktualisiert: + +~~~jsx {25-27} title="Vor v1.4" +api.getState(); +// die Methode gibt ein Objekt mit folgenden Eigenschaften zurück +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, +}*/ +~~~ + +~~~jsx {} title="Ab v1.4" +api.getState(); +// die Methode gibt ein Objekt mit folgenden Eigenschaften zurück +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, +}*/ +~~~ + +## 1.2 -> 1.3 + +### API + +#### Eigenschaften + +- Die [`editorShape`](api/config/js_kanban_editorshape_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + - der ***dateRange*** Parameter + + ~~~jsx {} title="Vor v1.3" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // weitere Parameter + ~~~ + + ~~~jsx {} title="Ab v1.3" + { + type: "dateRange", // oder Sie können auch den Typ "date" verwenden + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range" + }, + // weitere Parameter + ~~~ + +- Die [`items`](api/config/toolbar_items_config.md) Eigenschaft der Toolbar wurde wie folgt aktualisiert: + +~~~jsx {} title="Vor v1.3" +items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" +] +~~~ + +~~~jsx {4-5} title="Ab v1.3" +items: [ + "search", + "spacer", + "undo", + "redo", + "sort", + "addColumn", + "addRow" +] +~~~ + +#### Methoden + +- Die [`updateCard()`](api/methods/js_kanban_updatecard_method.md) Methode von Kanban wurde aktualisiert: + +~~~jsx {} title="Vor v1.3" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*weitere Parameter*/ + } +}); +~~~ + +~~~jsx {9} title="Ab v1.3" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*weitere Parameter*/ + }, + replace: true +}); +~~~ + +- Die [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) Methode von Kanban wurde aktualisiert: + +~~~jsx {} title="Vor v1.3" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + } +}); +~~~ + +~~~jsx {9} title="Ab v1.3" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +- Die [`updateRow()`](api/methods/js_kanban_updaterow_method.md) Methode von Kanban wurde aktualisiert: + +~~~jsx {} title="Vor v1.3" +updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, +}); +~~~ + +~~~jsx {7} title="Ab v1.3" +updateColumn({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +## 1.1 -> 1.2 + +### API + +#### Eigenschaften + +- Die [`cardShape`](api/config/js_kanban_cardshape_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + + - der ***menu*** Parameter + + ~~~jsx {} title="Vor v1.2" + menu: true, + //oder + menu: { show: true } + // weitere Parameter + ~~~ + + ~~~jsx {5-14} title="Ab v1.2" + menu: true, + // oder + menu: { + show: true, + items: ({ card, store }) => { + if(card.id === 1){ + return false; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", label: "Edit" }, + { id: "delete-card", icon: "wxi-delete", label: "Delete" } + ]; + } + } + }, + // weitere Parameter + ~~~ + + - der ***users*** Parameter + + ~~~jsx {7} title="Vor v1.2" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + path: "../assets/user.jpg" + }, + ] + }, + // weitere Parameter + ~~~ + + ~~~jsx {7} title="Ab v1.2" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + avatar: "../assets/user.jpg" + }, + ] + }, + // weitere Parameter + ~~~ + + - die ***start_date*** und ***end_date*** Parameter + + ~~~jsx {} title="Vor v1.2" + start_date: true, + end_date: true, + // weitere Parameter + ~~~ + + ~~~jsx {3,7} title="Ab v1.2" + start_date: { + show: true, + format: "%d.%m.%Y" + }, + end_date: { + show: true, + format: "%d.%m.%Y" + }, + // weitere Parameter + ~~~ + +- Die [`editorShape`](api/config/js_kanban_editorshape_config.md) Eigenschaft von Kanban wurde wie folgt aktualisiert: + +~~~jsx {8} title="Vor v1.2" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + path: "preview_image_path_1.png" + }, + ] +}, +// Einstellungen weiterer Felder +~~~ + +~~~jsx {8} title="Ab v1.2" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + ] +}, +// Einstellungen weiterer Felder +~~~ + +- Die [`items`](api/config/toolbar_items_config.md) Eigenschaft der Toolbar wurde wie folgt aktualisiert: + +~~~jsx {} title="Vor v1.2" +items: [ + "search", + "controls" +] +~~~ + +~~~jsx {} title="Ab v1.2" +items: [ + { // oder "search", + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ] + }, + "spacer", + { // oder "sort", + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", + "addRow" +] +~~~ + +#### Methoden + +- Die [`setLocale()`](api/methods/js_kanban_setlocale_method.md) Methode von Kanban und [`setLocale()`](api/methods/toolbar_setlocale_method.md) Methode der Toolbar wurden aktualisiert: + +~~~jsx {} title="Vor v1.2" +setLocale(kanban.en); // auf Standard-Übersetzung zurücksetzen +~~~ + +~~~jsx {} title="Ab v1.2" +setLocale(null); // auf Standard-Übersetzung zurücksetzen +~~~ + +- Die [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) Methode von Kanban wurde aktualisiert: + +~~~jsx {} title="Vor v1.2" +api.getReactiveState(); +// die Methode gibt ein Objekt mit folgenden Eigenschaften zurück +/*{ + dragItemId: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + dragItemsCoords: {...}, + selected: {...} +}*/ +~~~ + +~~~jsx {} title="Ab v1.2" +api.getReactiveState(); +// die Methode gibt ein Objekt mit folgenden Eigenschaften zurück +/*{ + areasMeta: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + cardShape: {...}, + cards: {...}, + cardsMap: {...}, + cardsMeta: {...}, + columnKey: {...}, + columns: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + edit: {...}, + editorShape: {...}, + fromAreaMeta: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + readonly: {...}, + rowKey: {...}, + rows: {...}, + scroll: {...}, + search: {...}, + selected: {...}, + sort: {...} +}*/ +~~~ + +- Die [`api.getState()`](api/internal/js_kanban_getstate_method.md) Methode von Kanban wurde aktualisiert: + +~~~jsx {} title="Vor v1.2" +api.getState(); +// die Methode gibt ein Objekt mit folgenden Eigenschaften zurück +/*{ + dragItemId: string | number, + before: string | number, + overAreaId: string | number, + overAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + dragItemsCoords: array, + selected: array +}*/ +~~~ + +~~~jsx {} title="Ab v1.2" +api.getState(); +// die Methode gibt ein Objekt mit folgenden Eigenschaften zurück +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + dropAreaItemsCoords: array, + dropAreasCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + overAreaMeta: object, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object +}*/ +~~~ + +- Die [`api.getStores()`](api/internal/js_kanban_getstores_method.md) Methode von Kanban wurde aktualisiert: + +~~~jsx {} title="Vor v1.2" +api.getStores(); +// die Methode gibt ein Objekt mit folgenden Stores zurück +/*{ + state: StateStore, // ( object ) + data: DataStore // ( object ) +}*/ +~~~ + +~~~jsx {} title="Ab v1.2" +api.getStores(); +// die Methode gibt ein Objekt mit folgenden Eigenschaften zurück +/*{ + state: StateStore, // ( object ) +}*/ +~~~ + +### Lokalisierung + +
+Vor v1.2 + +~~~jsx {} +const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; +const monthsShort = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" +]; +const wx = { + Today: "Today", + Clear: "Clear", + Close: "Close" +}; +const en = { + lang: "en", + __dates: { + months, + monthsShort, + days + }, + wx, + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Untitled: "Untitled", + Rename: "Rename" + } +}; +~~~ +
+ +
+Ab v1.2 + +~~~jsx {} +const en = { + kanban: { // Übersetzungen der Kanban-Beschriftungen + "Save": "Save", + "Close": "Close", + "Delete": "Delete", + "Name": "Name", + "Description": "Description", + "Type": "Type", + "Start date": "Start date", + "End date": "End date", + "Result": "Result", + "No results": "No results", + "Search": "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + "Edit": "Edit", + "Everywhere": "Everywhere", + "Label": "Label", + "Status": "Status", + "Color": "Color", + "Date": "Date", + "Untitled": "Untitled", + "Rename": "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + "Sort": "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)" + }, + calendar: { // Übersetzungen und Einstellungen des Kalenders + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // Übersetzungen der Core-Elemente + ok: "OK", + cancel: "Cancel" + } +}; +~~~ +
+ +## 1.0 -> 1.1 + +### API + +#### Eigenschaften + +- Die [`columns`](api/config/js_kanban_columns_config.md) Eigenschaft wurde um neue Parameter erweitert. Ab v1.1 können Sie die Konfigurationen ***collapsed, limit*** und ***strictLimit*** verwenden. + +~~~jsx title="Vor v1.1" +const columns = [ + { + label: "Backlog", + id: "backlog" + }, ... +]; +~~~ + +~~~jsx {5-7,12} title="Ab v1.1" +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true + }, ... +]; + +new kanban.Kanban("#root", { + columns, + // weitere Parameter +}); +~~~ + +- Der ***color*** Parameter der [`cardShape`](api/config/js_kanban_cardshape_config.md) Eigenschaft wurde aktualisiert. + +~~~jsx {4-7} title="Vor v1.1" +const cardShape = { + color: { + show: true, + values: [ + { id: 1, color: "#65D3B3", label: "red" }, + { id: 2, color: "#FFC975", label: "green" } + ] + } +}; +~~~ + +~~~jsx {4,9} title="Ab v1.1" +const cardShape = { + color: { + show: true, + values: ["#65D3B3", "#FFC975", "#58C3FE"] + } +}; + +new kanban.Kanban("#root", { + cardShape + // weitere Parameter +}); +~~~ + +#### Methoden + +- Die [`addColumn`](api/methods/js_kanban_addcolumn_method.md) Methode (und [`add-column`](api/events/js_kanban_addcolumn_event.md) Ereignis.md) wurde aktualisiert: + +~~~jsx {} title="Vor v1.1" +addColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="Ab v1.1" +addColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: false, + ... + } +}); +~~~ + +- Die [`addRow`](api/methods/js_kanban_addrow_method.md) Methode (und [`add-row`](api/events/js_kanban_addrow_event.md) Ereignis.md) wurde aktualisiert: + +~~~jsx {} title="Vor v1.1" +addRow(row_data_object); +~~~ + +~~~jsx {2-7} title="Ab v1.1" +addRow({ + id: "feature", + row: { + label: "Feature", + collapsed: false, + ... + } +}); +~~~ + +- Die [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) Methode (und [`update-column`](api/events/js_kanban_updatecolumn_event.md) Ereignis.md) wurde aktualisiert: + +~~~jsx {} title="Vor v1.1" +updateColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="Ab v1.1" +updateColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: true, + ... + } +}); +~~~ + +- Die [`updateRow`](api/methods/js_kanban_updaterow_method.md) Methode (und [`update-row`](api/events/js_kanban_updaterow_event.md) Ereignis.md) wurde aktualisiert: + +~~~jsx {} title="Vor v1.1" +updateRow(row_data_object); +~~~ + +~~~jsx {2-7} title="Ab v1.1" +updateRow({ + id: "feature", + row: { + label: "Feature", + collapsed: true, + ... + } +}); +~~~ + +- Die [`updateCard`](api/methods/js_kanban_updatecard_method.md) Methode (und [`update-card`](api/events/js_kanban_updatecard_event.md) Ereignis.md) wurde aktualisiert: + +~~~jsx {} title="Vor v1.1" +updateCard(card_data_object); +~~~ + +~~~jsx {2-7} title="Ab v1.1" +updateCard({ + id: 1, + card: { + label: "Volvo XC 70", + progress: 26 + ... + } +}); +~~~ + +- Die [`parse`](api/methods/js_kanban_parse_method.md) Methode wurde aktualisiert: + +~~~jsx {3-5,8-12} title="Vor v1.1" +// Sie müssen die Anfangsdaten zurücksetzen, bevor Sie neue parsen +const board = new kanban.Kanban("#root", { + columns: [], + cards: [], + rows: [] +}); + +board.parse({ + columns, + cards, + rows +}); +~~~ + +~~~jsx {} title="Ab v1.1" +// Sie müssen die Anfangsdaten nicht mehr zurücksetzen, bevor Sie neue parsen +const board = new kanban.Kanban("#root", {}); + +board.parse({ + columns, + cards, + rows +}); +~~~ \ No newline at end of file diff --git a/i18n/de/docusaurus-plugin-content-docs/current/news/whats_new.md b/i18n/de/docusaurus-plugin-content-docs/current/news/whats_new.md new file mode 100644 index 0000000..6942cf6 --- /dev/null +++ b/i18n/de/docusaurus-plugin-content-docs/current/news/whats_new.md @@ -0,0 +1,648 @@ +--- +sidebar_label: Was ist neu +title: Was ist neu +description: Entdecken Sie die Neuerungen in DHTMLX Kanban sowie die Release-Historie in der Dokumentation der DHTMLX JavaScript UI-Bibliothek. Durchstöbern Sie Entwicklerhandbücher und API-Referenzen, probieren Sie Codebeispiele und Live-Demos aus und laden Sie eine kostenlose 30-tägige Evaluierungsversion von DHTMLX Kanban herunter. +--- + +# Was ist neu + +Wenn Sie Kanban von einer älteren Version aktualisieren, beachten Sie bitte [Migration zu neueren Versionen](news/migration.md) für Details. + +## Version 1.7.0 + +Veröffentlicht am 14. Oktober 2025 + +[Release-Bewertung im Blog](https://dhtmlx.com/blog/meet-dhtmlx-kanban-1-7/) + +### Salesforce-Integration + +Ab Version 1.7 können Sie das JavaScript Kanban innerhalb der Salesforce-Umgebung nutzen. Weitere Informationen finden Sie im folgenden Leitfaden: [**Integration mit Salesforce**](guides/integration_with_salesforce.md). + +Sie können auch unser [**GitHub-Beispiel**](https://github.com/DHTMLX/salesforce-lwc-demo) erkunden oder die [**Online-Demo**](https://dhtmlx-dev-ed.develop.lightning.force.com/) ausführen (*Login*: ***user***, *Passwort*: ***demo***). + +### Neue API + +- #### Events + + - [`undo`](api/events/js_kanban_undo_event.md) + - [`redo`](api/events/js_kanban_redo_event.md) + +- #### Methoden + + - [`getColumnCards()`](api/methods/js_kanban_getcolumncards_method.md) + - [`detach()`](api/internal/js_kanban_detach_method.md) + +### Updates + +- #### Methoden + + - Die interne Methode [`on`](api/internal/js_kanban_on_method.md) wurde um die Parameter `config.tag` und `config.intercept` erweitert. + - Die interne Methode [`intercept`](api/internal/js_kanban_intercept_method.md) wurde um die Parameter `config.tag` und `config.intercept` erweitert. + +- #### Eigenschaften + + - Die Eigenschaft [`links`](api/config/js_kanban_links_config.md) wurde wie folgt aktualisiert: + - Der Parameter `masterId` wurde durch den Parameter `source` ersetzt. + - Der Parameter `slaveId` wurde durch den Parameter `target` ersetzt. + + - Die Eigenschaft [`editorShape`](api/config/js_kanban_editorshape_config.md) wurde aktualisiert. Der Parameter `clearButton` wurde durch `clear` ersetzt. + + - Die Funktion [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) wurde aktualisiert. Der Parameter `store` wurde durch `readonly` ersetzt. + + - Die Eigenschaft [`cards[i].attached[i]`](api/config/js_kanban_cards_config.md) wurde um den Parameter `size` erweitert. + +### Entfernte API + +- Die Eigenschaft `editorAutoSave` wurde entfernt. Verwenden Sie stattdessen die Eigenschaft [`editor.autoSave`](api/config/js_kanban_editor_config.md). + +- Die Parameter `dragItemsCoords` und `dropAreasCoords` wurden aus dem Event [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) entfernt. + +### Fehlerbehebungen + +- Beim Hochladen eines Stapels von Dateien oder mehrerer großer Dateien wird das Formular aktualisiert, bevor alle Dateien vollständig auf den Server geladen wurden. In diesem Fall werden die Kartendaten fehlerhaft an den Server gesendet. +- Dateigröße wird nur für neu geladene Dateien angezeigt. +- Jahr- und Monatswerte werden nach Klick auf den **Fertig**-Button im Editor nicht aktualisiert. +- Das erweiterbare Textfeld für Kommentare verschiebt den Button außerhalb des Klickbereichs. +- Ein Skriptfehler tritt auf, wenn eine Karte geöffnet wird, die mit einer gelöschten Karte verknüpft ist. + +## Version 1.6.5 + +Veröffentlicht am 14. Juli 2025 + +### Fehlerbehebungen + +- Die Konfiguration `disabled: true` funktioniert nicht für Menüeinträge. +- Wenn Sie eine Zeile zu Kanban hinzufügen, ohne eine vordefinierte Zeilenstruktur, erscheinen keine Zeilenköpfe. + +## Version 1.6.4 + +Veröffentlicht am 12. Juni 2025 + +### Fehlerbehebungen + +- Karten gehen verloren, wenn sie zu Spalten/Zeilen hinzugefügt werden, die entfernt und dann wiederhergestellt wurden. +- Fehlende lokale Bezeichnungen für Uploader-Listen-Buttons. +- Fehlende Readmes in kommerziellen Versionen. + +## Version 1.6.3 + +Veröffentlicht am 8. April 2025 + +### Fehlerbehebungen + +- Limit wird fälschlicherweise auf die gesamte Spalte angewendet. +- Fehler tritt auf, wenn eine Karte nach Schließen des Modal-Editors verschoben wird. +- Bestätigung für das Löschen wird unterhalb des Modal-Editors angezeigt. +- Das Symbol "mehr" in der Toolbar erscheint und verschwindet unerwartet bei langsamer Fenstergrößenänderung. +- Das Event `delete-card` schließt immer den Editor. +- Der Editor kann nicht geöffnet werden, wenn die Priorität auf eine ID außerhalb der bereitgestellten Optionen gesetzt ist. + +## Version 1.6.2 + +Veröffentlicht am 14. Februar 2025 + +### Fehlerbehebungen + +- Falsches Ablaufdatum im Testpaket. +- Warnung beim Drag & Drop auf Touchgeräten. +- Readonly-Konfiguration `add: false` entfernt die **Hinzufügen**-Option nicht aus dem Spaltenmenü. +- Der Editor wird für Karten mit numerischen IDs als Strings nicht gerendert. +- Veralteter Link zu Beispielen im Paket. +- Spaltenscrollen mit Lazy Rendering hat Drag & Drop-Probleme. +- Die Methode `setConfig()` aktualisiert den festen Zustand der Spaltenköpfe nicht. + +## Version 1.6.1 + +Veröffentlicht am 29. November 2024 + +### Fehlerbehebungen + +- Die Toolbar auf schmalen Bildschirmen hat ein falsch ausgerichtetes "mehr"-Symbol. +- `RestDataProvider` ignoriert Header, die über `setHeaders()` definiert wurden. +- Fehler "`RestDataProvider.getIDResolver` ist keine Funktion". + +## Version 1.6 + +Veröffentlicht am 13. November 2024 + +[Release-Bewertung im Blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-6/) + +### Neue Funktionalität + +- Möglichkeit, wie viele zugewiesene Benutzer auf einer Karte angezeigt werden, über die Eigenschaft [`cardShape.users.maxCount`](api/config/js_kanban_cardshape_config.md) zu ändern (siehe [**Beispiel**](https://snippet.dhtmlx.com/w205dvzg?tag=kanban)) +- Möglichkeit, den Inhalt von Spaltenköpfen über die Eigenschaft [`columnShape`](api/config/js_kanban_columnshape_config.md) zu ändern (siehe [**Beispiel**](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban)) +- Möglichkeit, Ansicht und Inhalt der Suchergebnisse über die Eigenschaft [`items.searchResult`](api/config/toolbar_items_config.md) der Toolbar-**Suche**-Steuerung zu ändern (siehe [**Beispiel**](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban)) +- Möglichkeit, den Editor als modales Fenster über die Eigenschaft [`editor.placement`](api/config/js_kanban_editor_config.md) anzuzeigen (siehe [**Beispiel**](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban)) +- Möglichkeit, das Voting für eine Karte (mit dem Abstimmungs-Icon auf der Karte) über die Eigenschaft [`cardShape.votes.clickable`](api/config/js_kanban_cardshape_config.md) zu aktivieren (siehe [**Beispiel**](https://snippet.dhtmlx.com/en76xvi4?tag=kanban)) + +### Updates + +- #### Eigenschaften + + - Die Eigenschaft [`cardShape`](api/config/js_kanban_cardshape_config.md) wurde um die Parameter ***users.maxCount*** und ***votes.clickable*** erweitert. + - Die Eigenschaft [`columnShape`](api/config/js_kanban_columnshape_config.md) wurde um die Parameter ***headerTemplate*** und ***collapsedTemplate*** erweitert. + - Die Eigenschaft [`editor`](api/config/js_kanban_editor_config.md) wurde um den Parameter ***placement*** erweitert. + - Die Eigenschaft [`items`](api/config/toolbar_items_config.md) der Toolbar-**Suche**-Steuerung wurde um den Parameter ***searchResult*** erweitert. + +- #### Events + + - Das Event [`set-edit`](api/events/js_kanban_setedit_event.md) wurde um den Parameter ***eventSource*** erweitert (siehe [**Beispiel**](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban)). + +- #### Methoden + + - Die Funktionalität der Methode [`setConfig()`](api/methods/js_kanban_setconfig_method.md) wurde wie folgt aktualisiert: + + - Die Methode ändert nicht die Historie (Sie können die Historie überhaupt nicht ändern). + - Die Methode zerstört nicht den Kanban-Datenspeicher. Sie müssen Event-Listener und Toolbar nicht neu erstellen oder erneut anhängen. + + - Die Methode [`setLocale()`](api/methods/js_kanban_setlocale_method.md) zerstört nicht den Kanban-Datenspeicher. Sie müssen Event-Listener und Toolbar nicht neu erstellen oder erneut anhängen. + - Der Parameter `api` der Toolbar-Methode [`setLocale()`](api/methods/toolbar_setlocale_method.md) wurde als veraltet markiert. + +### Fehlerbehebungen + +- Ein Kommentar, der gerade bearbeitet wird, kann entfernt werden und das Textfeld für neue Kommentare verschwindet. +- Fehlende Lokalisierungsstrings wurden hinzugefügt. +- Drag-n-Drop funktioniert nicht, wenn die Einstellungen [`scrollType: "column"`](api/config/js_kanban_scrolltype_config.md) und [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) kombiniert werden. +- Der Editor kann nicht über das Schließen-Symbol geschlossen werden. +- Der rechte Bereich des Editors hat die gleiche Farbe wie der Hintergrund der Fortschrittsleiste (nur im Willow-Skin). + +## Version 1.5.13 + +Veröffentlicht am 12. September 2024 + +### Fehlerbehebungen + +- Der Button "Als Titelbild festlegen" erscheint nicht, wenn die Erweiterung großgeschrieben ist. +- Ein Klick auf ein deaktiviertes Multiselect-Steuerelement verursacht einen Fehler. +- Nach dem Aufruf der Methode [`addCard()`](api/methods/js_kanban_addcard_method.md) führt das Scrollen bei [Spaltenscroll](api/config/js_kanban_scrolltype_config.md) und [Lazy Rendering](api/config/js_kanban_rendertype_config.md) zu einem Fehler. +- Es werden keine Kommentare gespeichert, sondern "" statt []. +- Der Editorstil wird durch globale Styles mit einem gleichnamigen nicht eindeutigen Klassenselektor überschrieben. [Siehe den Migrationsabschnitt](news/migration.md/#1512---1513). + +## Version 1.5.12 + +Veröffentlicht am 2. Mai 2024 + +### Fehlerbehebungen + +- Intercept-Regression: `return false` verhindert keine internen Events. +- Deaktivierte Dateien erlauben Dateien. + +## Version 1.5.11 + +Veröffentlicht am 25. März 2024 + +### Fehlerbehebungen + +- Kanban-CSS-Variablen des *Dark willow*-Skins fehlen für Toolbar und Portale. +- Änderungen an Kommentaren und Abstimmungen werden nicht auf die Formularwerte angewendet, wenn Autosave deaktiviert ist. +- Benutzerdefiniertes Spaltenuntermenü erhält `null` im Argument der **onClick**-Funktion. +- Es ist nicht möglich, den bearbeitbaren Modus für Datepicker im Editor zu setzen. +- Konsolenwarnungen in Kanban-Beispielen. + +## Version 1.5.10 + +Veröffentlicht am 29. Februar 2024 + +### Fehlerbehebungen + +- Fehlerhafter Build auf dem npm-Server. +- Der Parameter `select` wurde dem Event [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) und der Methode [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md) hinzugefügt. +- Falsche Stile für das Kommentarfeld im Kanban-Editor. + +## Version 1.5.9 + +Veröffentlicht am 20. Februar 2024 + +### Fehlerbehebungen + +- Kanban beeinflusst die Styles anderer Widgets. +- Benutzerdefinierte Spaltenuntermenüeinträge mit `disabled: true` sind weiterhin aktiv. +- Es ist nicht möglich, eine benutzerdefinierte Upload-Funktion für das **Uploader**-Steuerelement festzulegen. + +## Version 1.5.8 + +Veröffentlicht am 28. November 2023 + +### Fehlerbehebungen + +- Fehlende **currentUser**-TS-Definition in der **IKanbanConfig**-Typdefinition. + +## Version 1.5.7 + +Veröffentlicht am 14. November 2023 + +### Updates + +- Die Methode [`setLocale()`](api/methods/toolbar_setlocale_method.md) der Toolbar wurde um den Parameter ***api*** erweitert. + +### Fehlerbehebungen + +- Die Konfiguration `disabled: true` funktioniert nicht für Kartenmenüeinträge. +- Unerwünschte Konsolenwarnungen in Kanban-Beispielen. +- Es ist nicht möglich, die Priorität einer Aufgabe zurückzusetzen. +- Dropdown-Steuerelemente im Kanban-Editor schließen sich nicht beim Klick außerhalb. + +## Version 1.5.6 + +Veröffentlicht am 13. September 2023 + +### Updates + +- Möglichkeit, die Komponente als ES-Modul zu importieren. + +### Fehlerbehebungen + +- Regression in npm-Paketen. + +## Version 1.5.4 + +Veröffentlicht am 9. August 2023 + +### Fehlerbehebungen + +- Zuvor hochgeladene Dateien bleiben im Formular, nachdem zu einer anderen Karte gewechselt wurde. +- Datei-Upload via Drag-and-Drop funktioniert nicht. +- Unerwartetes Löschen von Karten, während der Benutzer die Entf-Taste drückt und das Formular geöffnet ist. +- Das Dropdown "Suche in" wird leer, nachdem eine Karte über die Suche ausgewählt wurde. +- Hinzugefügte Links werden im Backend nicht gelöscht, wenn die Hinzufügen-Link-Operation rückgängig gemacht wird. + +## Version 1.5.1 + +### Fehlerbehebungen + +- Korrekte Generierung von TypeScript-Definitionen. + +## Version 1.5 + +Veröffentlicht am 15. Juni 2023 + +[Release-Bewertung im Blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-5/) + +### Neue Funktionalität + +- Möglichkeit, Verknüpfungen zwischen Karten zur Laufzeit zu setzen und zu löschen. +- Möglichkeit, Verknüpfungen zwischen Karten serverseitig zu verwalten. +- Möglichkeit, Spaltenköpfe zu fixieren (siehe [**Beispiel**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)). + +### Neue API + +- #### Methoden + + - [`addLink()`](api/methods/js_kanban_addlink_method.md) + - [`deleteLink()`](api/methods/js_kanban_deletelink_method.md) + - [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) + +- #### Routen + + - [`DELETE /links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) + - [`GET /links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md) + - [`POST /links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md) + +### Updates + +- #### Eigenschaften + + - Die Eigenschaft [`columnShape`](api/config/js_kanban_columnshape_config.md) wurde um den Parameter ***fixedHeaders*** erweitert. + +### Fehlerbehebungen + +- Verknüpfungen können zur Laufzeit nicht geparst, exportiert oder serialisiert werden. +- Erstellen des Kommentarbereichs schlägt fehl, wenn der Benutzerbereich nicht aktiviert wurde. +- Verknüpfungen im Store verändern die Originaldaten und werden nicht korrekt gespeichert. +- Lazy Rendering zerstört die Styles des Hover-Bereichs eingeklappter Spalten. +- Karten, die in neu erstellte Spalten verschoben werden, verschwinden. +- Das Textfeld für einen neuen Kommentar wird beim Bearbeiten nicht geschlossen. + +## Version 1.4.2 + +Veröffentlicht am 13. April 2023 + +### Fehlerbehebungen + +- Backend-ID wird nach Hinzufügeaktionen nicht zu lokalen Karten-/Spalten-/Zeilendaten gespeichert. +- Fehlende TS-Definitionen ergänzt. +- Dark Skin verliert seine Styles. + +## Version 1.4.1 + +Veröffentlicht am 29. März 2023 + +### Fehlerbehebungen + +- Falsches Verhalten beim Beibehalten der Sortierung. +- Falsches Verhalten, wenn ein Kontextmenü über die Eigenschaften **cardShape**, **columnShape** oder **rowShape** deaktiviert wird. +- Falsches Verhalten, wenn Sie im Editor Links hinzufügen, aber keine Links in den Daten bereitstellen. +- Das Menü auf der Spalte kann wie auf der Karte sein oder nicht angezeigt werden. +- Zwei Aufgaben werden anstelle von einer gezogen. + +## Version 1.4 + +Veröffentlicht am 21. März 2023 + +[Release-Bewertung im Blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-4/) + +### Neue Funktionalität + +- Möglichkeit, Kommentare hinzuzufügen (siehe [**Beispiel**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- Möglichkeit, Benutzer zu begrenzen (siehe [**Beispiel**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban)) +- Möglichkeit, Verknüpfungen zwischen Karten zu setzen (siehe [**Beispiel**](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- Möglichkeit, für eine Karte abzustimmen (siehe [**Beispiel**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) + +### Neue API + +- #### Events + + - [`add-comment`](api/events/js_kanban_addcomment_event.md) + - [`add-link`](api/events/js_kanban_addlink_event.md) + - [`delete-comment`](api/events/js_kanban_deletecomment_event.md) + - [`delete-link`](api/events/js_kanban_deletelink_event.md) + - [`drag-card`](api/events/js_kanban_dragcard_event.md) + - [`end-drag-card`](api/events/js_kanban_enddragcard_event.md) + - [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) + - [`update-comment`](api/events/js_kanban_updatecomment_event.md) + +- #### Methoden + + - [`addComment()`](api/methods/js_kanban_addcomment_method.md) + - [`deleteComment()`](api/methods/js_kanban_deletecomment_method.md) + - [`updateComment()`](api/methods/js_kanban_updatecomment_method.md) + +- #### Eigenschaften + + - [`currentUser`](api/config/js_kanban_currentuser_config.md) + - [`links`](api/config/js_kanban_links_config.md) + +### Updates + +- #### Methoden + + - Die Methode [`api.getState()`](api/internal/js_kanban_getstate_method.md) wurde aktualisiert. + +- #### Eigenschaften + + - Die Eigenschaft [`cards`](api/config/js_kanban_cards_config.md) wurde um die Parameter ***css***, ***comments*** und ***votes*** erweitert. + - Die Eigenschaft [`cardShape`](api/config/js_kanban_cardshape_config.md) wurde um die Parameter ***comments***, ***votes*** (siehe [**Beispiel**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) und ***css*** (siehe [**Beispiel**](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban)) erweitert. + - Die Eigenschaft [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) kann jetzt das Kontextmenü anzeigen. + - Die Eigenschaft [`columns`](api/config/js_kanban_columns_config.md) wurde um die Parameter ***css*** (siehe [**Beispiel**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)) und ***overlay*** (siehe [**Beispiel**](https://snippet.dhtmlx.com/nfv59yif?tag=kanban)) erweitert. + - Die Eigenschaft [`columnShape`](api/config/js_kanban_columnshape_config.md) wurde um den Parameter ***css*** (siehe [**Beispiel**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)) erweitert. + - Die Eigenschaft [`editorShape`](api/config/js_kanban_editorshape_config.md) wurde um die Typen [***comments***](guides/configuration.md#comments-type) und [***links***](guides/configuration.md#links-type) sowie den Parameter ***format*** für *date/dateRange*-Typen erweitert. + - Die Eigenschaft [`rows`](api/config/js_kanban_rows_config.md) wurde um den Parameter ***css*** (siehe [**Beispiel**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) erweitert. + - Die Eigenschaft [`rowShape`](api/config/js_kanban_rowshape_config.md) wurde um den Parameter ***css*** (siehe [**Beispiel**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) erweitert. + +### Veraltete API + +- #### Eigenschaften + + - Label in Menüeintragsobjekten in `cardShape.menu.items`, `columnShape.menu.items` und `rowShape.menu.items`. + +### Fehlerbehebungen + +- Die Position des Menüs ist falsch, wenn Kanban in einem Container mit Rändern platziert ist. +- Falsche Position eingeklappter Spalten bei benutzerdefinierter Spaltenbreite. +- Das Ablegen einer Karte in eine eingeklappte Spalte führt dazu, dass die Karte verschwindet. +- Falsche Position eingeklappter Spalten bei benutzerdefinierter Spaltenbreite. +- Swimlanes: Das Kontextmenü der Karte wird vom Bearbeitungsbereich überlagert und die Karte kann daher nicht gelöscht werden. + +## Version 1.3 + +Veröffentlicht am 29. September 2022 + +[Release-Bewertung im Blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-3/) + +### Neue Funktionalität + +- Duplizieren von Karten über die API, ein Kontextmenü (3-Punkte-Symbol) oder die Tastenkombinationen `Ctrl (Command)` + `D` (ermöglicht das Duplizieren mehrerer Karten). +- Exportieren von Kanban-Daten in eine JSON-Datei. +- Verwalten der Kanban-Historie: + - Über *Undo*- und *Redo*-Steuerelemente in der Toolbar. + - Über Tastenkombinationen: + - `Ctrl (Command)`+`Z` - Aktion rückgängig machen + - `Ctrl (Command)`+`Y` oder `Ctrl (Command)`+`Shift`+`Z` - Aktion wiederholen + - Über die API + +### Neue API + +- **Events:** + [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) + +- **Methoden:** + [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md), + [`export.json()`](api/internal/js_kanban_json_method.md), + [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md), + [`redo()`](api/methods/js_kanban_redo_method.md) und + [`undo()`](api/methods/js_kanban_undo_method.md) + +- **Eigenschaften:** + [`editor`](api/config/js_kanban_editor_config.md) und + [`history`](api/config/js_kanban_history_config.md) + +- **Allgemeine Einstellungen:** + [`$meta`](api/common/js_kanban_meta_parameter.md) + +### Veraltete API + +- **Eigenschaften:** + [`editorAutoSave`](api/config/js_kanban_editorautosave_config.md) + +### Updates + +- #### Events + + - Das Event [`update-card`](api/events/js_kanban_updatecard_event.md) von Kanban wurde aktualisiert. + - Das Event [`update-column`](api/events/js_kanban_updatecolumn_event.md) von Kanban wurde aktualisiert. + - Das Event [`update-row`](api/events/js_kanban_updaterow_event.md) von Kanban wurde aktualisiert. + +- #### Methoden + + - Die Methode [`updateCard()`](api/methods/js_kanban_updatecard_method.md) von Kanban wurde aktualisiert. + - Die Methode [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) von Kanban wurde aktualisiert. + - Die Methode [`updateRow()`](api/methods/js_kanban_updaterow_method.md) von Kanban wurde aktualisiert. + +- #### Eigenschaften + + - Die Eigenschaft [`items`](api/config/toolbar_items_config.md) der Toolbar wurde um die Parameter ***"undo"*** und ***"redo"*** (Steuerelemente) erweitert. + - Die Eigenschaft [`editorShape`](api/config/js_kanban_editorshape_config.md) wurde um den Typ ***dateRange*** erweitert. + +## Version 1.2.2 + +Veröffentlicht am 30. August 2022 + +### Fehlerbehebungen + +- Doppelte Anzeige einiger Symbole in Menü und Toolbar. + +## Version 1.2.1 + +Veröffentlicht am 28. Juli 2022 + +### Fehlerbehebungen​ + +- Die Eigenschaft `cardHeight` funktioniert nicht mit aktiviertem `scrollType:"column"`. +- Uploader zeigt hochgeladene Dateien im Karteneditor nicht an. +- Lokalisierung funktioniert nicht für "combo"- und "progress"-Felder im Karteneditor. + +## Version 1.2 + +Veröffentlicht am 29. Juni 2022 + +[Release-Bewertung im Blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-2/) + +### Neue Funktionalität + +- Hinzufügen neuer Karten über das Spaltenmenü (siehe [**Beispiel**](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban)) +- Lazy Rendering (siehe [**Beispiel**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- Scrollen für einzelne Spalten (siehe [**Beispiel**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- Kanban zu neuen Karten, Spalten und Zeilen scrollen (API und UI) (siehe [**Beispiel**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- Karten sortieren (API und UI) (siehe [**Beispiel**](https://snippet.dhtmlx.com/74nyuv14?tag=kanban)) + +### Neue API + +- **Events:** + [`scroll`](api/events/js_kanban_scroll_event.md), + [`set-edit`](api/events/js_kanban_setedit_event.md) und + [`set-sort`](api/events/js_kanban_setsort_event.md) + +- **Methoden:** + [`scroll()`](api/methods/js_kanban_scroll_method.md), + [`setEdit()`](api/methods/js_kanban_setedit_method.md) und + [`setSort()`](api/methods/js_kanban_setsort_method.md) + +- **Eigenschaften:** + [`cardHeight`](api/config/js_kanban_cardheight_config.md), + [`columnShape`](api/config/js_kanban_columnshape_config.md), + [`rowShape`](api/config/js_kanban_rowshape_config.md), + [`renderType`](api/config/js_kanban_rendertype_config.md) und + [`scrollType`](api/config/js_kanban_scrolltype_config.md) + +### Updates + +- #### Methoden + + - Die Methode [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) wurde aktualisiert. + - Die Methode [`api.getState()`](api/internal/js_kanban_getstate_method.md) wurde aktualisiert. + - Die Methode [`api.getStores()`](api/internal/js_kanban_getstores_method.md) wurde aktualisiert. + - Die Methode [`setLocale()`](api/methods/js_kanban_setlocale_method.md) von Kanban wurde aktualisiert. + - Die Methode [`setLocale()`](api/methods/toolbar_setlocale_method.md) von Toolbar wurde aktualisiert. + +- #### Eigenschaften + + - Die Eigenschaft [`items`](api/config/toolbar_items_config.md) der Toolbar wurde aktualisiert. + - Die Parameter ***start_date***, ***end_date***, ***menu*** und ***users*** der Eigenschaft [`cardShape`](api/config/js_kanban_cardshape_config.md) wurden aktualisiert. + - Der Typ ***multiselect*** der Eigenschaft [`editorShape`](api/config/js_kanban_editorshape_config.md) wurde aktualisiert. + +#### Allgemein + +- Präfixe der CSS-Klassen (*siehe den Abschnitt [Stilisierung](guides/stylization.md)*) +- Locale-Struktur (*siehe den Abschnitt [Lokalisierung](guides/localization.md)*) + +### Fehlerbehebungen + +- Das Binden von Karten an Swimlanes über die Konfiguration `rowKey` funktioniert nicht korrekt. +- Klick auf Kartenmenü öffnet den Editor. +- Das Ziehen mehrerer Karten funktioniert nicht korrekt. +- Das Bearbeiten von Karten bei `select: false` (**readonly** config.md) funktioniert nicht korrekt. +- Das Auswählen neu hinzugefügter Karten über die Methode `addCard()` funktioniert nicht korrekt. +- Die Parameter `label: false` und `menu: false` der Eigenschaft `cardShape` funktionieren nicht korrekt. + +## Version 1.1.1 + +Veröffentlicht am 28. Februar 2022 + +[Release-Bewertung im Blog](https://dhtmlx.com/blog/maintenance-release-kanban-1-1-1/) + +### Fehlerbehebungen + +- Benutzerdefiniertes Editor-Feld funktioniert nicht ohne Definition im cardShape-Config. +- Auswahl der gewünschten Karte aus dem Dropdown-Menü der Suchleiste. + +## Version 1.1 + +Veröffentlicht am 15. Februar 2022 + +[Release-Bewertung im Blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-1-wip-validation-new-operations-columns-rows-typescript-support/) + +### Neue Funktionalität + +- Möglichkeit, Spalten mit einem Pfeil links neben dem Spaltenlabel ein- und auszuklappen. +- Möglichkeit, die Anzahl der Karten für Spalten und Swimlanes zu begrenzen. +- Möglichkeit, Spalten über das Kontextmenü (3-Punkte-Symbol) zu verschieben. +- Möglichkeit, Zeilen über das Kontextmenü (3-Punkte-Symbol) zu verschieben. +- Möglichkeit, mehrere Karten derselben Spalte mit **Shift** + **Klick** auszuwählen. +- Möglichkeit, [TypeScript-Definitionen](guides/typescript_support.md) von Kanban zu verwenden. + +### Neue API + +- Neue **Events** zum Verschieben von Spalten und Zeilen: + [`move-column`](api/events/js_kanban_movecolumn_event.md) + und + [`move-row`](api/events/js_kanban_moverow_event.md) +- Neue **Methoden** zum Verschieben von Spalten und Zeilen: + [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md) + und + [`moveRow()`](api/methods/js_kanban_moverow_method.md) + +### Updates + +#### Eigenschaften + +- Die Eigenschaft [`cards`](api/config/js_kanban_cards_config.md) ist jetzt optional. + +- Die Eigenschaft [`columns`](api/config/js_kanban_columns_config.md) ist jetzt optional und wurde um folgende Parameter erweitert: + - ***collapsed*** + - ***limit*** + - ***strictLimit*** + +- Der Parameter ***color*** der Eigenschaft [`cardShape`](api/config/js_kanban_cardshape_config.md) wurde aktualisiert. + +#### Methoden + +- Die Methode [`addColumn`](api/methods/js_kanban_addcolumn_method.md) wurde aktualisiert. +- Die Methode [`addRow`](api/methods/js_kanban_addrow_method.md) wurde aktualisiert. +- Die Methode [`updateCard`](api/methods/js_kanban_updatecard_method.md) wurde aktualisiert. +- Die Methode [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) wurde aktualisiert. +- Die Methode [`updateRow`](api/methods/js_kanban_updaterow_method.md) wurde aktualisiert. +- Die Methode [`parse`](api/methods/js_kanban_parse_method.md) wurde aktualisiert. + +#### Events + +- Das Event [`add-column`](api/events/js_kanban_addcolumn_event.md) wurde aktualisiert. +- Das Event [`add-row`](api/events/js_kanban_addrow_event.md) wurde aktualisiert. +- Das Event [`update-card`](api/events/js_kanban_updatecard_event.md) wurde aktualisiert. +- Das Event [`update-column`](api/events/js_kanban_updatecolumn_event.md) wurde aktualisiert. +- Das Event [`update-row`](api/events/js_kanban_updaterow_event.md) wurde aktualisiert. + +## Version 1.0 + +Veröffentlicht am 23. November 2021 + +[Release-Bewertung im Blog](https://dhtmlx.com/blog/releasing-dhtmlx-kanban-board-v-1-0/) + +### Grundfunktionalität + +- Möglichkeit, mit **Karten** wie folgt zu arbeiten: + - Neue Karten hinzufügen + - Karten auswählen (Mehrfachauswahl) + - Karten löschen + - Nach Karten suchen + - Karten durch Ziehen in die gewünschte Spalte (und Zeile) umsortieren + - Kartendaten über den Editor verwalten: + - Label + - Beschreibung + - Fortschritt + - Startdatum + - Enddatum + - Farbe + - Priorität + - Anhang (*Dateien* und *Bilder*) + - *Benutzerdefinierte Felder* + +- Möglichkeit, mit **Spalten** und **Zeilen** wie folgt zu arbeiten: + - Neue Spalten und Zeilen hinzufügen + - Spalten und Zeilen löschen + - Spalten und Zeilen umbenennen + - Zeilen ein- und ausklappen + +- [Lokalisierung](guides/localization.md) +- [Integration mit Backend](guides/working_with_server.md) (Go und Node) +- Kompatibilität mit verschiedenen Browsern +- Touch-Unterstützung \ No newline at end of file diff --git a/i18n/de/docusaurus-theme-classic/footer.json b/i18n/de/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..09faad8 --- /dev/null +++ b/i18n/de/docusaurus-theme-classic/footer.json @@ -0,0 +1,62 @@ +{ + "link.title.Development center": { + "message": "Entwicklungszentrum", + "description": "Der Titel der Fußzeilen-Linkspalte mit dem Titel=Entwicklungszentrum in der Fußzeile" + }, + "link.title.Community": { + "message": "Community", + "description": "Der Titel der Fußzeilen-Linkspalte mit dem Titel=Community in der Fußzeile" + }, + "link.title.Company": { + "message": "Unternehmen", + "description": "Der Titel der Fußzeilen-Linkspalte mit dem Titel=Unternehmen in der Fußzeile" + }, + "link.item.label.Download JS Kanban": { + "message": "JS Kanban herunterladen", + "description": "Das Label des Fußzeilen-Links mit dem Label=JS Kanban herunterladen, der auf https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml verweist" + }, + "link.item.label.Examples": { + "message": "Beispiele", + "description": "Das Label des Fußzeilen-Links mit dem Label=Beispiele, der auf https://snippet.dhtmlx.com/5hcx01h4?tag=kanban verweist" + }, + "link.item.label.Blog": { + "message": "Blog", + "description": "Das Label des Fußzeilen-Links mit dem Label=Blog, der auf https://dhtmlx.com/blog/tag/kanban/ verweist" + }, + "link.item.label.Forum": { + "message": "Forum", + "description": "Das Label des Fußzeilen-Links mit dem Label=Forum, der auf https://forum.dhtmlx.com/c/kanban/ verweist" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "Das Label des Fußzeilen-Links mit dem Label=GitHub, der auf https://github.com/DHTMLX verweist" + }, + "link.item.label.Youtube": { + "message": "Youtube", + "description": "Das Label des Fußzeilen-Links mit dem Label=Youtube, der auf https://www.youtube.com/user/dhtmlx verweist" + }, + "link.item.label.Facebook": { + "message": "Facebook", + "description": "Das Label des Fußzeilen-Links mit dem Label=Facebook, der auf https://www.facebook.com/dhtmlx verweist" + }, + "link.item.label.Twitter": { + "message": "Twitter", + "description": "Das Label des Fußzeilen-Links mit dem Label=Twitter, der auf https://twitter.com/dhtmlx verweist" + }, + "link.item.label.Linkedin": { + "message": "Linkedin", + "description": "Das Label des Fußzeilen-Links mit dem Label=Linkedin, der auf https://www.linkedin.com/groups/3345009/ verweist" + }, + "link.item.label.About us": { + "message": "Über uns", + "description": "Das Label des Fußzeilen-Links mit dem Label=Über uns, der auf https://dhtmlx.com/docs/company.shtml verweist" + }, + "link.item.label.Contact us": { + "message": "Kontakt", + "description": "Das Label des Fußzeilen-Links mit dem Label=Kontakt, der auf https://dhtmlx.com/docs/contact.shtml verweist" + }, + "link.item.label.Licensing": { + "message": "Lizenzierung", + "description": "Das Label des Fußzeilen-Links mit dem Label=Lizenzierung, der auf https://dhtmlx.com/docs/products/dhtmlxKanban/#licensing verweist" + } +} \ No newline at end of file diff --git a/i18n/de/docusaurus-theme-classic/navbar.json b/i18n/de/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..c056157 --- /dev/null +++ b/i18n/de/docusaurus-theme-classic/navbar.json @@ -0,0 +1,26 @@ +{ + "title": { + "message": "JavaScript Kanban Dokumentation", + "description": "Der Titel in der Navigationsleiste" + }, + "logo.alt": { + "message": "DHTMLX JavaScript Kanban Logo", + "description": "Der Alt-Text des Logos in der Navigationsleiste" + }, + "item.label.Examples": { + "message": "Beispiele", + "description": "Navigationsleisten-Element mit der Bezeichnung Beispiele" + }, + "item.label.Forum": { + "message": "Forum", + "description": "Navigationsleisten-Element mit der Bezeichnung Forum" + }, + "item.label.Support": { + "message": "Support", + "description": "Navigationsleisten-Element mit der Bezeichnung Support" + }, + "item.label.Download": { + "message": "Download", + "description": "Navigationsleisten-Element mit der Bezeichnung Download" + } +} \ No newline at end of file diff --git a/i18n/en/code.json b/i18n/en/code.json new file mode 100644 index 0000000..a817b07 --- /dev/null +++ b/i18n/en/code.json @@ -0,0 +1,444 @@ +{ + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Scroll back to top", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Archive", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Archive", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Blog list page navigation", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Newer entries", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Older entries", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Blog post page navigation", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Newer post", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Older post", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.tags.tagsPageLink": { + "message": "View all tags", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.DocCard.categoryDescription.plurals": { + "message": "1 item|{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs pages", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Previous", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Next", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "One doc tagged|{count} docs tagged", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} with \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "latest version", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "Edit this page", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Direct link to {heading}", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " on {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " by {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Last updated{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.NotFound.title": { + "message": "Page Not Found", + "description": "The title of the 404 page" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "Tags:", + "description": "The label alongside a tag list" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.warning": { + "message": "warning", + "description": "The default label used for the Warning admonition (:::warning)" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Close", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "Copied", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Copy code to clipboard", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Copy", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.expandCategoryAriaLabel": { + "message": "Expand sidebar category '{label}'", + "description": "The ARIA label to expand the sidebar category" + }, + "theme.DocSidebarItem.collapseCategoryAriaLabel": { + "message": "Collapse sidebar category '{label}'", + "description": "The ARIA label to collapse the sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.NotFound.p1": { + "message": "We could not find what you were looking for.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "On this page", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Read more", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "One min read|{readingTime} min read", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Back to main menu", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "One document found|{count} documents found", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Search results for \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Search the documentation", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Type your search here", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Search", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Search by Algolia", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "No results were found", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Fetching new results...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchBar.label": { + "message": "Search", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.blog.post.plurals": { + "message": "One post|{count} posts", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} tagged with \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.blog.author.pageTitle": { + "message": "{authorName} - {nPosts}", + "description": "The title of the page for a blog author" + }, + "theme.blog.authorsList.pageTitle": { + "message": "Authors", + "description": "The title of the authors page" + }, + "theme.blog.authorsList.viewAll": { + "message": "View all authors", + "description": "The label of the link targeting the blog authors page" + }, + "theme.blog.author.noPosts": { + "message": "This author has not written any posts yet.", + "description": "The text for authors with 0 blog post" + }, + "theme.contentVisibility.unlistedBanner.title": { + "message": "Unlisted page", + "description": "The unlisted content banner title" + }, + "theme.contentVisibility.unlistedBanner.message": { + "message": "This page is unlisted. Search engines will not index it, and only users having a direct link can access it.", + "description": "The unlisted content banner message" + }, + "theme.contentVisibility.draftBanner.title": { + "message": "Draft page", + "description": "The draft content banner title" + }, + "theme.contentVisibility.draftBanner.message": { + "message": "This page is a draft. It will only be visible in dev and be excluded from the production build.", + "description": "The draft content banner message" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "Skip to main content", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "The title of the tag list page" + } +} diff --git a/i18n/en/docusaurus-plugin-content-docs/current.json b/i18n/en/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..3cefdb5 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,134 @@ +{ + "version.label": { + "message": "Next", + "description": "The label for version current" + }, + "sidebar.docs.category.What's new and migration": { + "message": "What's new and migration", + "description": "The label for category What's new and migration in sidebar docs" + }, + "sidebar.docs.category.What's new and migration.link.generated-index.title": { + "message": "What's new and migration", + "description": "The generated-index page title for category What's new and migration in sidebar docs" + }, + "sidebar.docs.category.API": { + "message": "API", + "description": "The label for category API in sidebar docs" + }, + "sidebar.docs.category.Kanban methods": { + "message": "Kanban methods", + "description": "The label for category Kanban methods in sidebar docs" + }, + "sidebar.docs.category.Kanban internal API": { + "message": "Kanban internal API", + "description": "The label for category Kanban internal API in sidebar docs" + }, + "sidebar.docs.category.Kanban internal API.link.generated-index.title": { + "message": "Internal API overview", + "description": "The generated-index page title for category Kanban internal API in sidebar docs" + }, + "sidebar.docs.category.Event Bus methods": { + "message": "Event Bus methods", + "description": "The label for category Event Bus methods in sidebar docs" + }, + "sidebar.docs.category.Export methods": { + "message": "Export methods", + "description": "The label for category Export methods in sidebar docs" + }, + "sidebar.docs.category.State methods": { + "message": "State methods", + "description": "The label for category State methods in sidebar docs" + }, + "sidebar.docs.category.Kanban events": { + "message": "Kanban events", + "description": "The label for category Kanban events in sidebar docs" + }, + "sidebar.docs.category.Kanban properties": { + "message": "Kanban properties", + "description": "The label for category Kanban properties in sidebar docs" + }, + "sidebar.docs.category.Toolbar methods": { + "message": "Toolbar methods", + "description": "The label for category Toolbar methods in sidebar docs" + }, + "sidebar.docs.category.Toolbar properties": { + "message": "Toolbar properties", + "description": "The label for category Toolbar properties in sidebar docs" + }, + "sidebar.docs.category.Common settings": { + "message": "Common settings", + "description": "The label for category Common settings in sidebar docs" + }, + "sidebar.docs.category.Backend API": { + "message": "Backend API", + "description": "The label for category Backend API in sidebar docs" + }, + "sidebar.docs.category.Backend API.link.generated-index.title": { + "message": "Backend API", + "description": "The generated-index page title for category Backend API in sidebar docs" + }, + "sidebar.docs.category.RestDataProvider API": { + "message": "RestDataProvider API", + "description": "The label for category RestDataProvider API in sidebar docs" + }, + "sidebar.docs.category.RestDataProvider API.link.generated-index.title": { + "message": "RestDataProvider API", + "description": "The generated-index page title for category RestDataProvider API in sidebar docs" + }, + "sidebar.docs.category.REST methods": { + "message": "REST methods", + "description": "The label for category REST methods in sidebar docs" + }, + "sidebar.docs.category.REST routes": { + "message": "REST routes", + "description": "The label for category REST routes in sidebar docs" + }, + "sidebar.docs.category.GET routes": { + "message": "GET routes", + "description": "The label for category GET routes in sidebar docs" + }, + "sidebar.docs.category.GET routes.link.generated-index.title": { + "message": "GET routes", + "description": "The generated-index page title for category GET routes in sidebar docs" + }, + "sidebar.docs.category.POST routes": { + "message": "POST routes", + "description": "The label for category POST routes in sidebar docs" + }, + "sidebar.docs.category.POST routes.link.generated-index.title": { + "message": "POST routes", + "description": "The generated-index page title for category POST routes in sidebar docs" + }, + "sidebar.docs.category.PUT routes": { + "message": "PUT routes", + "description": "The label for category PUT routes in sidebar docs" + }, + "sidebar.docs.category.PUT routes.link.generated-index.title": { + "message": "PUT routes", + "description": "The generated-index page title for category PUT routes in sidebar docs" + }, + "sidebar.docs.category.DELETE routes": { + "message": "DELETE routes", + "description": "The label for category DELETE routes in sidebar docs" + }, + "sidebar.docs.category.DELETE routes.link.generated-index.title": { + "message": "DELETE routes", + "description": "The generated-index page title for category DELETE routes in sidebar docs" + }, + "sidebar.docs.category.Backend and frameworks integration": { + "message": "Backend and frameworks integration", + "description": "The label for category Backend and frameworks integration in sidebar docs" + }, + "sidebar.docs.category.Backend and frameworks integration.link.generated-index.title": { + "message": "Backend and frameworks integration", + "description": "The generated-index page title for category Backend and frameworks integration in sidebar docs" + }, + "sidebar.docs.category.Guides": { + "message": "Guides", + "description": "The label for category Guides in sidebar docs" + }, + "sidebar.docs.category.Guides.link.generated-index.title": { + "message": "Guides", + "description": "The generated-index page title for category Guides in sidebar docs" + } +} diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md b/i18n/en/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md new file mode 100644 index 0000000..91372f6 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md @@ -0,0 +1,52 @@ +--- +sidebar_label: $meta +title: $meta parameter +description: You can learn about the $meta parameter in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# $meta + +### Description + +@short: An object containing extra settings to customize Kanban methods and events + +:::important +The `$meta` object provides additional parameters that help configure methods related to Kanban events. +::: + +### Usage + +~~~jsx {} +$meta?: { + skipHistory?: boolean +}; +~~~ + +### Parameters + +The `$meta` object includes the following parameter: + +- `skipHistory` - (optional) controls whether an operation is recorded in the Kanban history or not + +### Example + +~~~jsx {11-13} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// add new card and skip this action in history of Kanban +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" }, + $meta: { + skipHistory: true + } +}); +~~~ + +**Change log:** The `$meta` parameter was introduced in v1.3 + +**Related article:** [`history`](api/config/js_kanban_history_config.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md new file mode 100644 index 0000000..de9bd05 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: cardHeight +title: cardHeight Config +description: You can learn about the cardHeight config in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# cardHeight + +### Description + +@short: Optional. Sets the height of the cards. + +### Usage + +~~~jsx {} +cardHeight?: number; // px +~~~ + +:::important +When using [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) together with [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md), it's important to define a fixed height for cards using the `cardHeight` property. Without this, cards won’t be visible. +::: + +### Example + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + cardHeight: 150, // px + // other parameters +}); +~~~ + +**Change log:** This property was introduced in version 1.2 + +**Related articles:** [Configuration](guides/configuration.md#cards) + +**Related sample:** [Kanban. Lazy rendering and column scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md new file mode 100644 index 0000000..c3e8f28 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md @@ -0,0 +1,156 @@ +--- +sidebar_label: cards +title: cards Config +description: Explore the cards configuration in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try live demos and code examples, and download a free 30-day trial of DHTMLX Kanban. +--- + +# cards + +### Description + +@short: Optional. An array of objects holding the cards data + +### Usage + +~~~jsx {} +cards?: [ + { + id?: string | number, + label?: string, + description?: string, + progress?: number, + start_date?: Date, + end_date?: Date, + attached?: [ + { + id: string | number, + url?: string, + previewURL?: string, + coverURL?: string, + name?: string, + isCover?: boolean + size?: number + }, {...} + ], + color?: string, + users?: array | string | number, + // users?: array - for multiple users, if you use the "multiselect" editor type to assign users + // users?: string | number - for a single user, if you use the "combo" or "select" editor type to assign a user + priority?: string | number, + css?: string, + votes?: array, + comments?: [ + { + id: string | number, + userId: string | number, + cardId: string | number, + text?: string, + date?: Date, + }, {...} + ], + [custom_key: string]?: any + }, {...} // other cards data +]; +~~~ + +### Parameters + +Each card can include the following parameters (data): + +- `id` - (optional) the card's **ID**. This is used for managing the card through related methods +- `label` - (optional) the card's label, shown in the **Label** field +- `description` - (optional) a description for the card, displayed in the **Description** field +- `progress` - (optional) progress bar value from 0 to 100. Displayed in the **Progress bar** field +- `start_date` - (optional) a Date object representing the start date (avoid using string dates). Shown in the **Start date** field +- `end_date` - (optional) a Date object representing the end date (avoid using string dates). Shown in the **End date** field +- `attached` - (optional) an array of objects representing attached files. Shown in the **Attachment** field. Each object can include: + - `id` - (required) the **ID** of the attached file + - `url` - (optional) the file path + - `previewURL` - (optional) path to the preview image + - `coverURL` - (optional) path to the cover image + - `name` - (optional) file name + - `isCover` - (optional) if **true**, sets the cover image using the "coverURL" + - `size` - (optional) file size in bytes +- `color` - (optional) a HEX color code, which sets the color of the card's top line +- `users` - (optional) either an **array** of user IDs for multiple assigned users or a **string | number** for a single assigned user. To assign users, define an array of user data in the [cardShape.users](api/config/js_kanban_cardshape_config.md) property. These users appear in the **Users** field + +:::info +`users?: array` - use an **array** of user **ID**s when using the [**multiselect**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) editor type to assign multiple users + +`users?: string | number` - use a single **ID** when using the [**combo** or **select**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) editor types to assign one user +::: + +- `priority` - (optional) the card's priority **ID**. Define an array with priority data in the [cardShape.priority](api/config/js_kanban_cardshape_config.md) property. Displayed in the **Priority** field +- `css` - (optional) custom CSS styles for the individual card +- `votes` - (optional) an array of user IDs representing votes +- `comments` - (optional) an array of comment objects. Each comment can have: + - `id` - (required) the comment's **ID** + - `userId` - (required) user **ID** who posted the comment + - `cardId` - (required) the card's **ID** the comment belongs to + - `text` - (optional) the comment text, which may include HTML markup + - `date` - (optional) a Date object representing when the comment was posted (not updated after edits) +- `custom_key` - (optional) custom keys for placing the card into specific columns or rows. See [columnKey](../js_kanban_columnkey_config) and [rowKey](api/config/js_kanban_rowkey_config.md) properties + +:::info +To dynamically load new card data, you can use the [**parse()**](api/methods/js_kanban_parse_method.md) method! +::: + +### Example + +~~~jsx {1-41,45} +const cards = [ + { + id: 1, + label: "Integration with React", + description: "Some description", + progress: 25, + start_date: new Date("02/24/2022"), + end_date: new Date("02/24/2023"), + attached: [ + { + id: 234, + url: "../assets/img-1.jpg", + previewURL: "../assets/img-1.jpg", + coverURL: "../assets/img-1.jpg", + name: "img-1.jpg", + isCover: true, + size: 11979 + }, {...} // other attached files data + ], + color: "#65D3B3", + users: [1,2], + votes: [3,6,8], + comments: [ + { + id: 1, + userId: 1, + cardId: 1, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays. ", + date: new Date(), + }, {...} // other comments + ], + priority: 1, + // custom field to place the card into the "feature" row + // the rowKey config needs to be set to the "type" value + type: "feature", + // custom field to place the card into the "backlog" column + // the columnKey config needs to be set to the "stage" value + stage: "backlog", + css: "red", + }, {...} // other cards data +]; + +new kanban.Kanban("#root", { + columns, + cards, + // other parameters +}); +~~~ + +**Change log:** The ***css***, ***comments***, and ***votes*** parameters were introduced in v1.4 + +**Related articles:** +- [Working with data](guides/working_with_data.md) +- [updateCard()](api/methods/js_kanban_updatecard_method.md) + +**Related sample:** [Kanban. Styling cards](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md new file mode 100644 index 0000000..7148956 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md @@ -0,0 +1,339 @@ +--- +sidebar_label: cardShape +title: cardShape Config +description: Explore the cardShape configuration in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, live demos, and grab a free 30-day trial of DHTMLX Kanban. +--- + +# cardShape + +### Description + +@short: Optional. Settings object to customize the appearance of cards + +### Usage + +~~~jsx {} +cardShape?: { + label?: boolean | { show?: boolean }, + description?: boolean | { show?: boolean }, + progress?: boolean | { show?: boolean }, + attached?: boolean | { show?: boolean }, + cover?: boolean | { show?: boolean }, + comments?: boolean | { show?: boolean }, + confirmDeletion?: boolean | { show?: boolean }, + start_date?: boolean | { + show?: boolean, + format?: string + }, + end_date?: boolean | { + show?: boolean, + format?: string + }, + color?: boolean | { + show?: boolean, + values?: array + }, + menu?: boolean | { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, card }) => void, + data?: array // an array of menu subitems + }, + {...} + ] | ({ card, readonly }) => array | null + }, + users?: boolean | { + show?: boolean, + values: [ + { + id: string | number, + label?: string, + avatar?: string + }, + {...} // other users data + ], + maxCount?: number | false + }, + priority?: boolean | { + show?: boolean, + values?: [ + { + id: string | number, + label?: string, + color: string + }, + {...} // other priorities data + ] + }, + votes?: boolean | { + show?: boolean, + clickable?: boolean + }, + css?: (card) => string, + headerFields?: [ + { + key: string, + label?: string, + css?: string + }, + {...} // other fields data + ] +}; +~~~ + +### Parameters + +:::info +Sometimes, parameters can be set using either a **short** or **extended** format. Here's how it looks: + +~~~jsx {3,6} + label: boolean | { show?: boolean } + // short format + label: true + // or + // extended format + label: { show: true } +~~~ +::: + +The **cardShape** object lets you customize various aspects of the card's look through these options: + +- `label` - (optional) toggles visibility of the **label** field +- `description` - (optional) toggles visibility of the **description** field +- `progress` - (optional) toggles visibility of the **progress** field +- `attached` - (optional) toggles visibility of the **attachment** field +- `cover` - (optional) toggles visibility of the **card image** +- `comments` - (optional) toggles visibility of **comments** on cards +- `confirmDeletion` - (optional) toggles the **confirmation dialog** for deleting cards +- `start_date` - (optional) settings for the **start date** field + - `show` - (optional) toggles visibility of the start date + - `format` - (optional) defines the date format, with options listed [here](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `end_date` - (optional) settings for the **end date** field + - `show` - (optional) toggles visibility of the end date + - `format` - (optional) defines the date format, with options listed [here](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `color` - (optional) settings for the **top color line** on the card + - `show` - (optional) toggles visibility of the top color line + - `values` - (optional) array of valid HEX color codes +- `menu` - (optional) settings for the **card context menu**, including: + - `show` - (optional) enables or disables the context menu + - `items` - (optional) array of menu item objects, each supporting: + - `id` - (optional) menu item ID. Built-in actions include: + - ***"set-edit"*** for editing the card name + - ***"delete-card"*** for deleting the card + - `icon` - (optional) icon class name (e.g., *mdi-delete*) + - `text` - (optional) menu item label + - `disabled` - (optional) boolean to enable or disable the item + - `onClick` - (optional) callback function receiving: + - ***id*** - current menu item ID + - ***item*** - current menu item data object + - ***card*** - target card data object + - `data` - (optional) array of submenu items + + :::info + You can also provide a function for `menu.items` that receives: + - ***card*** - current card data object + - ***readonly*** - readonly state properties ([details](api/internal/js_kanban_getstate_method.md)) + + This function lets you customize or disable the menu for specific cards by returning an array or *null*/*false*: + + ~~~jsx {} + items: ({ card, readonly }) => { + if (card.id === 1){ + return false; + } + + const menu = []; + + if (!readonly.delete){ + menu.push({ + id: "delete-card", icon: "wxi-delete", label: "Delete" + }); + } + + if (!readonly.edit){ + menu.push({ + id: "set-edit", icon: "wxi-edit", label: "Edit" + }); + } + return menu.length ? menu : null; + } + ~~~ + ::: + +- `users` - (optional) settings for the **users** field + - `show` - (optional) toggles visibility of assigned users + - `values` - (required) array of user objects, each including: + - `id` - (required) user ID + - `label` - (optional) user name + - `avatar` - (optional) user avatar image path + - `maxCount` - (optional) maximum number of users shown on the card, or ***false*** to show all + + You can specify a number for `maxCount` to limit how many users appear on a card. Setting it to `false` will display all assigned users. + + :::info + The ***users*** field is off by default. To activate it, set `show` to `true` and provide user data in `values`. To assign users through the editor, configure the relevant control via the [`editorShape`](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) property. Use the ***select*** type for single user assignment or ***multiselect*** for multiple users. + + ~~~jsx {} + cardShape: { + users: { + show: true, + values: [ + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } + ], + maxCount: 4 // only 4 users shown on the card + } + } + ~~~ + ::: + +- `priority` - (optional) settings for the **priority** field + - `show` - (optional) toggles visibility of the card priority + - `values` - (optional) array of priority objects, each including: + - `id` - (required) priority ID + - `label` - (optional) priority name + - `color` - (required) valid HEX color code +- `votes` - (optional) controls the **votes** feature + - `show` - (optional) toggles visibility of the vote icon on cards and in the editor + - `clickable` - (optional) if true, users can vote directly on the card; otherwise, voting is only available via the editor +- `css` - a function that returns a CSS class name to apply conditionally to cards +- `headerFields` - (optional) array of custom field objects, each with: + - `key` - (required) custom field key, used in editor configuration via [editorShape](api/config/js_kanban_editorshape_config.md) + - `label` - (optional) custom field label + - `css` - (optional) CSS class for the custom field + +:::info +If you don't specify card settings via **cardShape**, the widget uses the **defaultCardShape** parameters automatically. +::: + +### Default config + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "High" }, + { id: 2, color: "#F1B941", label: "Medium" }, + { id: 3, color: "#77D257", label: "Low" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +export const getDefaultCardMenuItems = ({ readonly }: { readonly: DataStore }) => { + const { readonly } = readonly.getState(); + const baseItems = [ + { id: "duplicate-card", icon: "wxi-content-copy", text: "Duplicate" }, + { id: "delete-card", icon: "wxi-delete-outline", text: "Delete" } + ]; + + if (!readonly?.select && readonly?.edit) { + return [ + { id: "set-edit", icon: "wxi-edit-outline", text: "Edit" }, + ...baseItems, + ]; + } + return baseItems; +}; + +const defaultCardShape = { + label: { show: true }, + description: { show: false }, + progress: { show: false }, + start_date: { show: false }, + end_date: { show: false }, + users: { show: false }, + confirmDeletion: { show: true }, + priority: { + show: false, + values: defaultPriorities + }, + color: { + show: false, + values: defaultColors + }, + cover: { show: false }, + attached: { show: false }, + menu: { show: true } +}; +~~~ + +### Example + +~~~jsx {14-49,54} +const users = [ // users data + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // card priority data + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardColors = ["#65D3B3", "#FFC975", "#58C3FE"]; + +const cardShape = { // card settings + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + cover: false, + comments: false, + confirmDeletion: false, + color: { + show: true, + values: cardColors + }, + users: { + show: true, + values: users, + maxCount: false + }, + priority: { + show: true, + values: cardPriority + }, + votes: { + show: true, + clickable: true + }, + css: (card) => card.type == "feature" ? "green" : "red", + headerFields: [ + { // custom field + key: "sprint", + css: "custom_style", + label: "Sprint" + } + ] +}; + +new kanban.Kanban("#root", { + cards, + columns, + cardShape, + // other parameters +}); +~~~ + +**Change log:** +- Added ***comments***, ***css***, and ***votes*** parameters in v1.4 +- Replaced ***menu.items[0].label*** with ***menu.items[0].text*** in v1.4 +- Replaced ***menu.items[0].items*** with ***menu.items[0].data*** in v1.4 +- Introduced ***users.maxCount*** and ***votes.clickable*** in v1.6 +- Removed ***menu.items[0].label*** and ***menu.items[0].items*** in v1.7 +- Updated ***menu.items*** function: replaced **store** parameter with **readonly** in v1.7 + +**Related articles:** [Configuration](guides/configuration.md#cards) + +**Related samples:** +- [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) +- [Kanban. Highlighting outdated and active tasks](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban) +- [Kanban. Styling cards](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) +- [Kanban. Unlimited user assignments per task](https://snippet.dhtmlx.com/w205dvzg?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md new file mode 100644 index 0000000..6b05eca --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md @@ -0,0 +1,73 @@ +--- +sidebar_label: cardTemplate +title: cardTemplate Config +description: Find out how to use the cardTemplate config in the DHTMLX JavaScript Kanban library documentation. Explore developer guides and API references, check out code examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# cardTemplate + +### Description + +@short: Optional. Returns and applies a custom HTML template for the card. + +### Usage + +~~~jsx +function cardTemplate ({ cardFields, selected, dragging, cardShape }){ + return "HTML template of the card"; +}; +~~~ + +### Parameters + +The callback function receives an object containing these parameters: + +- `cardFields` - the card's data object +- `selected` - indicates if the card is selected +- `dragging` - indicates if the card is being dragged +- `cardShape` - the card's configuration object + +:::important +To add a context menu inside the card template, include a custom icon in the template markup and use the `data-menu-id=${cardFields.id}` attribute as demonstrated in the example below. +::: + +### Example + +~~~jsx {1-23,28} +const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + const { label, color, id } = cardFields; + if (selected) { + return ` +
+
+
+ +
+ Selected:${label} +
+ `; + } + return ` +
+
+
+ +
+ ${label} +
+ `; +} + +new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // other parameters +}); +~~~ + +**Change log:** Support for displaying a context menu was introduced in v1.4 + +**Related articles:** [Customization](guides/customization.md#custom-cards) + +**Related sample:** [Kanban. Custom card](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md new file mode 100644 index 0000000..c4de662 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md @@ -0,0 +1,58 @@ +--- +sidebar_label: columnKey +title: columnKey Config +description: Explore the columnKey configuration in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# columnKey + +### Description + +@short: Optional. Specifies which column a card belongs to. + +:::info +To organize cards into columns, assign a key (**column** or a *custom* one) to the **ID** of the target column within the card data object. The **columnKey** property in the widget configuration should be set to this key. +::: + +### Usage + +~~~jsx {} +columnKey?: string; +~~~ + +### Default config + +:::note +If you don’t set a column key using the **columnKey** property, the widget defaults to using the **"column"** key. In that case, the **column** key in the card data object must be set to the appropriate column **ID**. + +~~~jsx {3} +const cards = [ + { + column: "backlog", + // other data + } +]; +~~~ +::: + +### Example + +~~~jsx {4,8,15} +const cards = [ + { + label: "Backlog task", + column_custom_key: "backlog" + }, + { + label: "In progress task", + column_custom_key: "inprogress" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + columnKey: "column_custom_key", + // other parameters +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md new file mode 100644 index 0000000..9ef0893 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md @@ -0,0 +1,125 @@ +--- +sidebar_label: columns +title: columns Config +description: Discover how to configure columns in the DHTMLX JavaScript Kanban library. Explore developer guides, API references, try code samples and live demos, and get a free 30-day trial of DHTMLX Kanban. +--- + +# columns + +### Description + +@short: Optional. An array of objects holding the columns data + +### Usage + +~~~jsx {} +columns?: [ + { + id: string, + label?: string, + collapsed?: boolean, + limit?: number | object, + strictLimit?: boolean, + css?: string, + overlay?: any + }, + {...} // other columns data +]; +~~~ + +### Parameters + +Each column can include the following properties (data): + +- `id` - (required) the column **ID** used to manage the column via its methods +- `label` - (optional) the column label shown in the column header +- `collapsed` - (optional) the column's initial state. If ***true***, the column starts collapsed. Default is ***false*** (expanded) +- `limit` - (optional) this can be either: + - `number` - maximum number of cards allowed in the column + - `object` - an object specifying card limits per row (swimlane) by ID +- `strictLimit` - (optional) enforces the limit strictly. If ***true***, users cannot add cards beyond the set **limit**. Default is ***false*** +- `css` - (optional) applies custom CSS styles to the column +- `overlay` - (optional) adds an overlay layer to the column. You can specify a template that covers the column like this: + + ~~~jsx {} + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + ~~~ + +:::info +To load new column data dynamically, the [`parse()`](../../methods/js_kanban_parse_method) method can be used. +::: + +### Example + +~~~jsx {1-31,34} +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true, + css: "red" + }, + { + label: "In progress", + id: "inprogress", + collapsed: false, + limit: { + // limits cards in the "Feature" and "Task" rows of the "In progress" column + feature: 3, + task: 2 + }, + strictLimit: false + }, + { + label: "Done", + id: "done", + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + // other parameters +}); +~~~ + +### Custom styling + +To style columns with the `css` parameter, define CSS rules for your custom class. + +```css +.wx-header .wx-column.red, +.wx-column.red { + background: #FFA29C; +} +``` + +If your styles don't apply, check that: + +- The selector includes enough context (like parent and DHTMLX internal classes) +- If inline styles override your styles, consider using `!important` + +**Change log:** The **css** and **overlay** options were introduced in v1.4 + +**Related article:** +- [Working with data](guides/working_with_data.md) +- [updateColumn()](api/methods/js_kanban_updatecolumn_method.md) + +**Related samples:** +- [Kanban. Limits for columns and swimlanes](https://snippet.dhtmlx.com/2blo6hx8?tag=kanban) +- [Kanban. Changing color of column via custom menu](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [Kanban. Disabling drag and drop to specific columns](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md new file mode 100644 index 0000000..6fc4aa0 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md @@ -0,0 +1,216 @@ +--- +sidebar_label: columnShape +title: columnShape Config +description: Discover the columnShape config in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, API references, try code examples and live demos, and get a free 30-day evaluation version of DHTMLX Kanban. +--- + +# columnShape + +### Description + +@short: Optional. A settings object to customize the appearance of columns. + +### Usage + +~~~jsx {} +columnShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled?: boolean, + onClick?: ({ id, item, column }) => void, + data?: array // an array of menu subitems + }, + {...} + ] | ({ column, columnIndex, columns, readonly }) => array | null + }, + fixedHeaders?: boolean, + css?: (column, cards) => string, + headerTemplate?: template(column => { + return "The HTML template of the column header in the expanded state"; + }), + collapsedTemplate?: template(column => { + return "The HTML template of the column header in the collapsed state"; + }), + confirmDeletion?: boolean +}; +~~~ + +### Parameters + +To control how columns look, the **columnShape** object lets you set these options: + +- `menu` - (optional) an object defining the column context menu. It includes: + - `show` - (optional) toggles the column context menu on or off + - `items` - (optional) an array of menu item objects. Each item can have: + - `id` - (optional) the menu item's ID. Use these values for built-in actions: + - ***"add-card"*** - adds a new card + - ***"set-edit"*** - edits the column name + - ***"move-column:left"*** - moves the column left + - ***"move-column:right"*** - moves the column right + - ***"delete-column"*** - deletes the column + + - `icon` - (optional) the icon class name for the menu item, compatible with icon fonts (e.g., *mdi-delete*) + - `text` - (optional) the menu item's label + - `disabled` - (optional) whether the menu item is active or disabled (boolean) + - `onClick` - (optional) a custom callback function receiving: + - ***id*** - the current menu item's ID + - ***item*** - the current menu item's data object + - ***column*** - the target column's data object + + - `data` - (optional) an array of submenu item objects + + :::info + Alternatively, `menu.items` can be a custom function receiving: + - ***column*** - the current column data object + - ***columnIndex*** - the index of the current column + - ***columns*** - an array of all columns data + - ***readonly*** - an object with readonly [state properties](api/internal/js_kanban_getstate_method.md) + + This lets you customize the menu for each column or disable it for specific columns by returning *null* or *false*: + + ~~~jsx {} + items: ({ column }) => { + if(column.id === "inprogress"){ + return null; + } + if (column.id === "backlog"){ + return [ + { id: "set-edit", icon: "wxi-edit", text: "Rename" }, + { + id: "delete-card", + icon: "wxi-delete", + text: "Remove card" + } + ]; + } + } + ~~~ + ::: + +- `fixedHeaders` - (optional) keeps column headers visible during vertical scrolling (*true* by default). Requires scroll enabled in Kanban (limited height) +- `css` - (optional) a function returning a CSS class to apply conditionally to columns +- `headerTemplate` - (optional) HTML template for the column header when expanded +- `collapsedTemplate` - (optional) HTML template for the column header when collapsed +- `confirmDeletion` - (optional) toggles a confirmation dialog for deleting columns + +### Default config + +~~~jsx {} +const getDefaultColumnMenuItems = ({ column, columnIndex, columns, readonly }) => [ + { id: "add-card", icon: "wxi-plus", text: "Add new card" }, + { id: "set-edit", icon: "wxi-edit", text: "Rename" }, + { + id: "move-column:left", + icon: "wxi-arrow-left", + text: "Move left", + disabled: columnIndex <= 0 + }, + { + id: "move-column:right", + icon: "wxi-arrow-right", + text: "Move right", + disabled: columnIndex >= columns.length - 1 + }, + { id: "delete-column", icon: "wxi-delete", text: "Delete" } +]; +const columnShape = { + menu: { + show: true, + items: getDefaultColumnMenuItems + }, + fixedHeaders: true, + confirmDeletion: true +}; +~~~ + +### Example + +~~~jsx {1-58,64} +const columnShape = { + menu: { + show: true, + items: [ + { + id: "color", + text: "Color", + data: [ + { + id:"yellow", + text: "Yellow", + onClick: ({ column }) => changeColumnColor(column, "yellow") + }, + { + id:"red", + text: "Red", + onClick: ({ column }) => changeColumnColor(column, "red") + }, + { + id:"green", + text: "Green", + onClick: ({ column }) => changeColumnColor(column, "green") + } + ] + } + ] + }, + fixedHeaders: false, + css: (column, cards) => column.id == "inprogress" && cards.length < 5 ? "green" : "red", + headerTemplate: template(column => { + return `
+ +
+ ${ + !column.column.collapsed + ? `
+ ${escapeHTML(column.column.label)} + (${column.columnState.cardsCount}) +
` + : "" + } + ${ + !column.column.collapsed + ? `
+ +
` + : "" + }`; + }), + collapsedTemplate: template(column => { + return `
+
${escapeHTML(column.column.label)} (${ + column.columnState?.cardsCount + })
+
`; + }), + confirmDeletion: true +}; + +new kanban.Kanban("#root", { + cards, + columns, + rows, + columnShape, + // other parameters +}); +~~~ + +**Change log:** +- The ***css*** parameter was introduced in v1.4 +- The ***menu.items[0].label*** parameter was replaced by ***menu.items[0].text*** in v1.4 +- The ***menu.items[0].items*** parameter was replaced by ***menu.items[0].data*** in v1.4 +- The ***fixedHeaders*** parameter was added in v1.5 +- The ***headerTemplate*** and ***collapsedTemplate*** parameters were added in v1.6 +- The ***menu.items[0].label*** and ***menu.items[0].items*** parameters were removed in v1.7 +- The ***menu.items*** function was updated, replacing the **store** parameter with **readonly** in v1.7 + +**Related articles:** [Configuration](guides/configuration.md) + +**Related samples:** +- [Kanban. Changing color of column via custom menu](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [Kanban. Fixed headers, lazy rendering and column scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) +- [Kanban. Template for column headers](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md new file mode 100644 index 0000000..2bec79e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md @@ -0,0 +1,36 @@ +--- +sidebar_label: currentUser +title: currentUser Config +description: Explore the currentUser configuration in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try live demos and code samples, and download a free 30-day trial of DHTMLX Kanban. +--- + +# currentUser + +### Description + +@short: Optional. Specifies the ID of the current user. + +:::note +The current user ID should match one of the IDs listed in the [`cardShape.users`](api/config/js_kanban_cardshape_config.md) property. If this ID is not set, comments will be available in read-only mode. +::: + +### Usage + +~~~jsx {} +currentUser?: string | number; +~~~ + +### Example + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + currentUser: 1, + // other parameters +}); +~~~ + +**Change log:** This property was introduced in v1.4 + +**Related sample:** [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md new file mode 100644 index 0000000..fd76206 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md @@ -0,0 +1,62 @@ +--- +sidebar_label: editor +title: editor Config +description: You can find details about the editor config in the DHTMLX JavaScript Kanban library documentation. Explore developer guides and API reference, check out code examples and live demos, and download a free 30-day trial version of DHTMLX Kanban. +--- + +# editor + +### Description + +@short: Optional. Contains settings to customize the Kanban editor + +### Usage + +~~~jsx {} +editor?: { + show?: boolean, + autoSave?: boolean, + debounce?: number, + placement?: "sidebar" | "modal" +}; +~~~ + +### Parameters + +- `show` - (optional) - turns the editor on or off +- `autoSave` - (optional) toggles the autosave feature of the editor +- `debounce` - (optional) sets the delay time for autosaving data (only applies when ***autoSave: true***) +- `placement` - (optional) defines where the editor appears. Possible values: + - `"sidebar"` - shows the editor as a sidebar + - `"modal"` - shows the editor in a modal window + +### Default config + +~~~jsx {} +editor: { + show: true, + debounce: 100, + autoSave: true, + placement: "sidebar" +} +~~~ + +### Example + +~~~jsx {4-8} +new kanban.Kanban("#root", { + columns, + cards, + editor: { + show: true + autoSave: true, + debounce: 2000, + placement: "modal" + } + // other parameters +}); +~~~ + +**Change log:** The `placement` option was introduced in version 1.6 + +**Related samples:** [Kanban. Opening the editor in a modal window](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md new file mode 100644 index 0000000..3f76a60 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md @@ -0,0 +1,44 @@ +--- +sidebar_label: editorAutoSave +title: editorAutoSave Config +description: You can learn about the editorAutoSave config in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# + +

editorAutoSave

+ +:::danger +Starting with version 1.3, the `editorAutoSave` property is **deprecated**. To control the "autosave" mode, please use the [`editor`](api/config/js_kanban_editor_config.md) property instead. +::: + +### Description + +@short: Optional. Turns autosave mode on or off + +:::info +This setting lets you switch the Kanban autosave feature on or off. When **editorAutoSave** is set to **false**, the editor will show a "Save" button for manually saving changes. +::: + +### Usage + +~~~jsx {} +editorAutoSave?: boolean; // (true by default) +~~~ + +### Default config + +~~~jsx {} +editorAutoSave: true +~~~ + +### Example + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + editorAutoSave: false, // disable autosave + // other parameters +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md new file mode 100644 index 0000000..bae326f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md @@ -0,0 +1,471 @@ +--- +sidebar_label: editorShape +title: editorShape Config +description: Find out how to configure editorShape in the DHTMLX JavaScript Kanban library. Explore developer guides, API references, try code samples and live demos, and get a free 30-day trial of DHTMLX Kanban. +--- + +# editorShape + +### Description + +@short: Optional. This is an array of objects that lets you control how the Kanban editor looks and works. + +### Usage + +~~~jsx {3,8,28,42,52,73,88,97,108,117,125} +editorShape?: [ + { + // common parameters for all types + type: string, + key: string, + label?: string, + + // for the "dateRange" type only + key: { + start: string, + end: string + }, + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + done?: boolean, + error?: boolean, + format?: string, + months?: number, + placeholder?: string, + title?: string, + width?: string + }, + + // for the "date" type only + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + error?: boolean, + format?: string, + placeholder?: string, + title?: string, + width?: string + }, + + // for the "color" type only + values?: array, + config?: { + clear?: boolean, + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string + }, + + // for "combo", "select", and "multiselect" types only + values?: [ + { + id: string | number, + label: string, + avatar?: string // for a "multiselect" type only + }, + {...} // other options + ], + config?: { + clear?: boolean, // for "combo" and "color" types + label?: string, // for a "select" type only + checkboxes?: boolean, // for a "multiselect" type only + // common parameters + disabled?: boolean, + error?: boolean, + placeholder?: string, + textField?: string, + title?: string + }, + + // for a "text" type only + config?: { + css?: string, + disabled?: boolean, + error?: boolean, + focus?: boolean, + icon?: string, + inputStyle?: string, + placeholder?: string, + readonly?: boolean, + select?: boolean, + title?: string, + type?: string + }, + + // for a "textarea" type only + config? { + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string, + readonly?: boolean + }, + + // for a "progress" type only + config?: { + disabled?: boolean, + label?: string, + max?: number, + min?: number, + step?: number, + title?: string, + width?: number + }, + + // for a "files" type only + uploadURL?: string | function, + config?: { + accept?: string, + disabled?: boolean, + multiple?: boolean, + folder?: boolean, + }, + + // for a "comments" type only + config?: { + format?: string, + placement?: "page" | "editor", + html?: boolean, + confirmDeletion?: boolean + }, + + // for a "links" type only + config?: { + confirmDeletion?: boolean + }, + }, { /* other control settings */ } +]; +~~~ + +### Parameters + +These are the parameters you can use to set up the editor's look and behavior: + +#### - Common parameters for all types + +- `type` - (required) specifies the editor field type. + +:::important +The editor supports these field types: **dateRange**, **date**, **combo**, **select**, **multiselect**, **color**, **text**, **textarea**, **progress**, **files**, **comments**, and **links**. +::: + +- `key` - (required) the editor field key. This should match the value used in the [`cardShape`](api/config/js_kanban_cardshape_config.md) property. Here's an example: + +~~~js {8,17} + // card appearance settings + const cardShape = { + ...kanban.defaultCardShape, + headerFields: [ + { // custom field + label: "Custom field", + css: "custom_style", + key: "custom_key" + } + ] + }; + // editor appearance settings + const editorShape = [ + { + label: "Custom field", + type: "text", + key: "custom_key" + } + ]; +~~~ + +- `label` - (optional) the label for the editor field. + +#### - Parameters for a "dateRange" type + +- `key` - (required) an object defining keys for the editor field: + - `start` - (required) the key for the start date + - `end` - (required) the key for the end date + +:::important +These keys should match those used in the [`cardShape`](api/config/js_kanban_cardshape_config.md) property. +::: + +- `config` - (optional) configuration options for the **"dateRange"** field: + - `align` - (optional) controls how the calendar popup aligns relative to the Date Range control + - `editable` - (optional) controls if the date picker can be edited and optionally sets a custom date format + - `buttons` - (optional) toggles visibility of Today and Clear buttons in the calendar popup + - `css` - (optional) adjusts the icon position in the Date Range control + - `disabled` - (optional) disables the Date Range control when true + - `done` - (optional) shows or hides the Done button + - `error` - (optional) applies error styling if true + - `format` - (optional) sets the date format; see [here](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) for available formats + - `months` - (optional) sets how many calendars appear in the Date Range control + - `placeholder` - (optional) placeholder text for the control + - `title` - (optional) a title with extra info for the control + - `width` - (optional) width of the calendar popup + +#### - Parameters for a "date" type + +- `config` - (optional) configuration options for the **"date"** field: + - `align` - (optional) controls popup alignment relative to the Date control + - `editable` - (optional) controls editability and custom date format + - `buttons` - (optional) toggles Today and Clear buttons in the popup + - `css` - (optional) changes icon position + - `disabled` - (optional) disables the control + - `error` - (optional) applies error styling + - `format` - (optional) sets date format, with options listed [here](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placeholder` - (optional) placeholder text + - `title` - (optional) additional info title + - `width` - (optional) popup width + +#### - Parameters for a "color" type + +- `values` - (optional) an array of valid HEX color codes +- `config` - (optional) configuration options for the **"color"** field: + - `placeholder` - (optional) placeholder text + - `clear` - (optional) shows or hides a clear icon + - `disabled` - (optional) disables the control + - `error` - (optional) applies error styling + - `title` - (optional) extra info title + +#### - Parameters for "combo", "select" and "multiselect" types + +- `values` - (optional) an array of option objects, each with: + - `id` - (required) option ID + - `label` - (required) option label + - `avatar` - (optional) path to an image (only for **"multiselect"**) + +:::important +To assign a single user, use ***"select"*** or ***"combo"*** types. To assign multiple users, use ***"multiselect"***. +::: + +- `config` - (optional) configuration options for these types: + - `clear` - (optional) adds a Clear button (**only for "combo" and "color"**) + - `label` - (optional) binds options to the input field by this key (**only for "select"**) + - `checkboxes` - (optional) shows checkboxes next to options (**only for "multiselect"**) + - `textField` - (optional) binds combo options to input by this key (**for "combo" and "multiselect"**) + - `disabled` - (optional) disables the control + - `error` - (optional) applies error styling + - `placeholder` - (optional) placeholder text + - `title` - (optional) extra info title + +#### - Parameters for a "text" type + +- `config` - (optional) configuration options for the **"text"** field: + - `css` - (optional) icon position in the control + - `disabled` - (optional) disables the control + - `error` - (optional) applies error styling + - `focus` - (optional) sets focus on the control + - `icon` - (optional) adds an icon inside the control + - `inputStyle` - (optional) custom style for the control + - `placeholder` - (optional) placeholder text + - `readonly` - (optional) makes the control read-only + - `select` - (optional) selects the control's content + - `title` - (optional) extra info title + - `type` - (optional) sets the input type + +#### - Parameters for a "textarea" type + +- `config` - (optional) configuration options for the **"textarea"** field: + - `disabled` - (optional) disables the control + - `error` - (optional) applies error styling + - `placeholder` - (optional) placeholder text + - `title` - (optional) extra info title + - `readonly` - (optional) makes the control read-only + +#### - Parameters for a "progress" type + +- `config` - (optional) configuration options for the **"progress"** field: + - `disabled` - (optional) disables the control + - `label` - (optional) label displayed above the control + - `max` - (optional) maximum value + - `min` - (optional) minimum value + - `step` - (optional) value increments + - `title` - (optional) extra info title + - `width` - (optional) control width + +#### - Parameters for a "files" type + +- `uploadURL` - (optional) URL or function for file uploading; details below + +
+ +The `uploadURL` can be a **string** or a **function**. Here’s an example using a function: + +~~~jsx {} +uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // include token or other headers here + } + }; + + return fetch(url + "/uploads", config) // specify URL here + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); +} +~~~ + +The `rec` parameter is an extended `PointerEvent` object with these extra properties: + +~~~jsx {} +interface UploadEvent extends PointerEvent { + id: number; + status: "client" | "server" | "error"; // indicates upload status: "not sent yet", "sent successfully", or "error" + name: string; // file name + file: string | Blob; // the file itself +} +~~~ + +
+ +- `config` - (optional) configuration options for the **"files"** field: + - `accept` - (optional) file types allowed (e.g., ***"image/\*", "video/\*", "audio/\*"*** and others) + - `disabled` - (optional) disables uploading + - `multiple` - (optional) enables uploading multiple files at once + - `folder` - (optional) enables uploading folders + +#### - Parameters for a "comments" type + +- `config` - (optional) configuration options for the **"comments"** field: + - `format` - (optional) date format for comments; see available options [here](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placement` - (optional) where comments appear: + - `"editor"` — inside the editor + - `"page"` — in a separate panel + - `html` - (optional) allows HTML markup in comments + - `confirmDeletion` - (optional) shows a confirmation dialog before deleting comments + +#### - Parameters for a "links" type + +- `config` - (optional) configuration options for the **"links"** field: + - `confirmDeletion` - (optional) shows a confirmation dialog before deleting links + +:::info +If you don’t set editor options via the `editorShape` property, the widget will use the **defaultEditorShape** settings. +::: + +### Default config + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "High" }, + { id: 2, color: "#F1B941", label: "Medium" }, + { id: 3, color: "#77D257", label: "Low" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +const defaultEditorShape = [ + { + key: "label", + type: "text", + label: "Label" + }, + { + key: "description", + type: "textarea", + label: "Description" + }, + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clear: true + } + }, + { + type: "color", + label: "Color", + key: "color" + }, + { + type: "progress", + key: "progress", + label: "Progress" + }, + { + type: "date", + key: "start_date", + label: "Start date" + }, + { + type: "date", + key: "end_date", + label: "End date" + }, + { + type: "multiselect", + key: "users", + label: "Users" + } +]; +~~~ + +### Example + +~~~jsx {6-33,38} +const users = [ // user data + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const editorShape = [ // editor settings + ...kanban.defaultEditorShape, // include the default settings + { // add custom fields + type: "multiselect", + key: "users", + label: "Users", + values: users + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", + html: true, + confirmDeletion: true + } + }, + { + type: "links", + key:"links", + label: "Links", + config: { + confirmDeletion: true + } + } +]; + +new kanban.Kanban("#root", { + cards, + columns, + editorShape, + // other parameters +}); +~~~ + +**Change log:** + +- The ***dateRange*** type was introduced in v1.3 +- The ***comments*** and ***links*** editor types, along with the ***format*** parameter, were added in v1.4 +- The ***clearButton*** parameter was renamed to ***clear*** + +**Related articles:** [Configuration](guides/configuration.md/#editor) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md new file mode 100644 index 0000000..13c5136 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: history +title: history Config +description: Check out the history config in the DHTMLX JavaScript Kanban library docs. Explore developer guides, API references, try code samples and live demos, and get a free 30-day trial of DHTMLX Kanban. +--- + +# history + +### Description + +@short: Optional. Turns history tracking on or off + +:::info +The `history` property lets you enable or disable the Kanban history feature. Setting it to **false** means you won’t be able to use the API or Toolbar controls to manage history. +::: + +:::tip +You can also exclude certain actions from the Kanban history by using the [`$meta`](api/common/js_kanban_meta_parameter.md) parameter with methods and events! +::: + +### Usage + +~~~jsx {} +history?: boolean; +~~~ + +### Default config + +~~~jsx {} +history: true +~~~ + +### Example + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + history: false, // turn off history management + // other parameters +}); +~~~ + +**Change log:** This property was introduced in v1.3 + +**Related articles:** [`undo()`](api/methods/js_kanban_undo_method.md) and [`redo()`](api/methods/js_kanban_redo_method.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md new file mode 100644 index 0000000..3f33ab6 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: links +title: links Config +description: Explore the links configuration in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# links + +### Description + +@short: Optional. This is an array of objects that holds the links data. + +### Usage + +~~~jsx {} +links?: [ + { + id: string | number, + source: string | number, + target: string | number, + relation: "relatesTo" | "requiredFor" | "duplicate" | "parent" + }, {...} // other links data +]; +~~~ + +### Parameters + +Each link can include the following details: + +- `id` - (required) the unique identifier of the link +- `source` – (required) the card ID where the link starts (for example, “Task A is required for Task B”) +- `target` – (required) the card ID where the link ends (for example, “Task B depends on Task A”) +- `relation` - (required) the type of link. You can choose from these types: + - ***"relatesTo"*** - indicates a dependency where the current task is connected to another + - ***"requiredFor"*** - shows that one task must be completed before the other + - ***"duplicate"*** - marks tasks that are duplicates of each other + - ***"parent"*** - indicates a parent (master) and child (slave) task relationship + +:::info +To update links data dynamically, you can use the [**parse()**](api/methods/js_kanban_parse_method.md) method! +::: + +### Example + +~~~jsx {1-8,13} +const links = [ + { + id: 1, + source: 2, + target: 5, + relation: "relatesTo", + }, {...} // other link data +]; + +new kanban.Kanban("#root", { + columns, + cards, + links + // other parameters +}); +~~~ + +**Change log:** This property was updated in v1.7: + - The **masterId** parameter was replaced by **source** + - The **slaveId** parameter was replaced by **target** + +**Related articles:** [Working with data](guides/working_with_data.md) + +**Related sample:** [Kanban. Links between tasks](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md new file mode 100644 index 0000000..1499bb6 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md @@ -0,0 +1,45 @@ +--- +sidebar_label: locale +title: locale Config +description: Explore the locale configuration in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code samples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# locale + +### Description + +@short: Optional. An object defining a custom locale for Kanban + +:::info +The **locale** object should contain all Kanban and Toolbar labels along with their translations. +::: + +### Usage + +~~~jsx {} +locale?: object; +~~~ + +### Default config + +Kanban uses the [**English**](guides/localization.md#default-locale) locale by default. You can also specify a custom locale if needed. + +:::tip +To switch the locale on the fly, use the [**setLocale()**](api/methods/js_kanban_setlocale_method.md) method provided by Kanban. +::: + +### Example + +~~~jsx {5} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // sets the initial locale to "cn" + // other parameters +}); +~~~ + +**Related articles:** [Localization](guides/localization.md) + +**Related sample:** [Kanban. Localization](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md new file mode 100644 index 0000000..a068cfc --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: readonly +title: readonly Config +description: Explore the readonly config in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code samples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# readonly + +### Description + +@short: Optional. Controls whether editing, adding, selecting, and dragging cards are enabled or disabled. + +### Usage + +~~~js {} +readonly?: boolean; +//or +readonly?: { + edit?: boolean, + add?: boolean, + select?: boolean, + dnd?: boolean +}; +~~~ + +### Parameters + +There are two ways to set up the **readonly mode**: using a **short** or an **extended** configuration. + +The **short** option: +- `readonly` - (optional) toggles the **readonly mode** for Kanban on or off. + +The **extended** option: +- `readonly` - (optional) an object with detailed settings, where you can specify: + - `edit` - (optional) enables or disables **editing** of cards + - `add` - (optional) enables or disables **adding** new cards + - `select` - (optional) enables or disables **selecting** cards + - `dnd` - (optional) enables or disables **dragging** cards + +### Default config + +~~~jsx {} +readonly: false // readonly mode is off by default +//or +readonly: { + edit: true, // editing is allowed + add: true, // adding is allowed + select: true, // selecting is allowed + dnd: true // dragging is allowed +} +~~~ + +### Example + +~~~jsx {4-9} +new kanban.Kanban("#root", { + cards, + columns, + readonly: { + edit: false, // editing is turned off + add: true, // adding is turned on + select: false, // selecting is turned off + dnd: true // dragging is turned on + }, + // other parameters +}); +~~~ + +**Related sample:** [Readonly mode](https://snippet.dhtmlx.com/b8x84yln?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md new file mode 100644 index 0000000..0dbf535 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: renderType +title: renderType Config +description: You can learn about the renderType config in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# renderType + +### Description + +@short: Optional. Specifies the way cards are rendered. + +:::info +This setting is useful when dealing with a large number of cards. When set to *"lazy"*, the widget renders only the cards visible on the board, which can greatly improve performance. +::: + +### Usage + +~~~jsx {} +renderType?: "default" | "lazy"; +~~~ + +:::important +When using `renderType: "lazy"` together with [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md), make sure to set a fixed height for cards using the [`cardHeight`](api/config/js_kanban_cardheight_config.md) option. Without this, cards may not display properly. +::: + +### Default config + +~~~jsx {} +renderType: "default" +~~~ + +### Example + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + renderType: "lazy", + // other parameters +}); +~~~ + +**Change log:** This property was introduced in v1.2 + +**Related articles:** [Configuration](guides/configuration.md#cards) + +**Related sample:** [Kanban. Fixed headers, lazy rendering and column scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md new file mode 100644 index 0000000..0a5d042 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: rowKey +title: rowKey Config +description: You can learn about the rowKey config in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# rowKey + +### Description + +@short: Optional. Specifies which row a card belongs to. + +:::info +To organize cards into rows (swimlanes), you need to define a **custom key** in the card data object that matches the **ID** of the target row. Then, set the **rowKey** property in the widget configuration to this *custom key*. +::: + +### Usage + +~~~jsx {} +rowKey?: string; +~~~ + +### Example + +~~~jsx {4,8,16} +const cards = [ + { + label: "Backlog task", + row_custom_key: "feature" + }, + { + label: "In progress task", + row_custom_key: "done" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + rowKey: "row_custom_key", + // other parameters +}); +~~~ + +**Related sample:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md new file mode 100644 index 0000000..2fde2b3 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md @@ -0,0 +1,65 @@ +--- +sidebar_label: rows +title: rows Config +description: Explore the rows configuration in the DHTMLX JavaScript Kanban library documentation. Find developer guides, API references, code samples, live demos, and a free 30-day trial of DHTMLX Kanban. +--- + +# rows + +### Description + +@short: Optional. An array of objects representing the rows (swimlanes) data. + +### Usage + +~~~jsx {} +rows?: [ + { + id: string, + label?: string, + collapsed?: boolean, + css?: string, + }, {...} // other row data +]; +~~~ + +:::info +To set up Swimlanes, provide the relevant data in the **rows** array. Swimlanes can be collapsed/expanded, renamed, deleted, or moved either through the UI or by using the [related API](howtos.md#how-to-work-with-rows-swimlanes). +::: + +### Parameters + +Each row (swimlane) can include the following properties: + +- `id` - (required) the unique ID of the row (swimlane), used for managing it through the available methods. +- `label` - (optional) the label shown in the row section. +- `collapsed` - (optional) indicates whether the row (swimlane) starts collapsed. If ***true***, it will be collapsed initially. The default is ***false*** (expanded). +- `css` - (optional) applies custom CSS styles to the individual row. + +:::info +To update rows (swimlanes) data dynamically, the [**parse()**](api/methods/js_kanban_parse_method.md) method can be used. +::: + +### Example + +~~~jsx {1-4,9} +const rows = [ + { label: "Feature", id: "feature", collapsed: false, css: "red" }, + { label: "Task", id: "task", collapsed: true } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, // swimlanes data + // other parameters +}); +~~~ + +**Change log:** The ***css*** parameter was introduced in v1.4 + +**Related articles:** +- [Working with data](guides/working_with_data.md) +- [updateRow()](api/methods/js_kanban_updaterow_method.md) + +**Related sample:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md new file mode 100644 index 0000000..2aae3bb --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md @@ -0,0 +1,188 @@ +--- +sidebar_label: rowShape +title: rowShape Config +description: Explore the rowShape config in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try live demos and code examples, and download a free 30-day trial of DHTMLX Kanban. +--- + +# rowShape + +### Description + +@short: Optional. An object to customize how rows look and behave. + +### Usage + +~~~jsx {} +rowShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, row }) => void, + data?: array // an array of menu subitems + }, {...} // other item data + ] | ({ row, rowIndex, rows, readonly }) => array | null + }, + css?: (row, cards) => string, + confirmDeletion?: boolean +}; +~~~ + +### Parameters + +The **rowShape** object lets you tweak how rows appear and behave by specifying these options: + +- `menu` - (optional) settings for the rows’ context menu. This includes: + - `show` - (optional) turns the row context menu on or off + - `items` - (optional) an array defining the menu items for rows. Each item can include: + - `id` - (optional) menu item ID. Use these IDs for built-in actions: + - ***"set-edit"*** - edits the row name + - ***"move-row:up"*** - moves the row up + - ***"move-row:down"*** - moves the row down + - ***"delete-row"*** - deletes the row + + - `icon` - (optional) icon class name for the menu item, compatible with icon fonts (like *mdi-delete*) + - `text` - (optional) label for the menu item + - `disabled` - (optional) whether the menu item is active or disabled based on a boolean + - `onClick` - (optional) custom callback function with these arguments: + - ***id*** - the menu item’s ID + - ***item*** - the menu item’s data object + - ***row*** - the target row’s data object + + - `data` - (optional) array of subitems for nested menus + + :::info + The `menu.items` option can also be a custom function receiving: + - ***row*** - the current row’s data object + - ***rowIndex*** - the current row’s index + - ***rows*** - array of all rows data + - ***readonly*** - an object with readonly [state properties](api/internal/js_kanban_getstate_method.md) + + This function lets you customize the menu per row or hide it for specific rows by returning *null* or *false*: + + ~~~jsx {} + items: ({ rowIndex }) => { + if(rowIndex == 0){ + return null; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", text: "Rename" }, + { + id: "custom-delete-row", + icon: "wxi-delete", + text: "Remove row" + }, + { + id: "custom-move-row:up", + icon: "wxi-arrow-up", + text: "Move up" + } + ]; + } + } + ~~~ + ::: + +- `css` - a function that returns a CSS class name to apply conditionally to rows +- `confirmDeletion` - (optional) enables or disables a confirmation dialog when deleting a row + +### Default config + +~~~jsx {} +const getDefaultRowMenuItems = ({ row, rowIndex, rows, readonly }) => [ + { id: "set-edit", icon: "wxi-edit", text: "Rename" }, + { + id: "move-row:up", + icon: "wxi-arrow-up", + text: "Move up", + disabled: rowIndex <= 0 + }, + { + id: "move-row:down", + icon: "wxi-arrow-down", + text: "Move down", + disabled: rowIndex >= rows.length - 1 + }, + { id: "delete-row", icon: "wxi-delete", text: "Delete" } +]; +const rowShape = { + menu: { + show: true, + items: getDefaultRowMenuItems + }, + confirmDeletion: true +}; +~~~ + +### Example + +~~~jsx {10-43,48} +const changeRowColor = (row, cssClass) => board.updateRow({ + id: row.id, + row: { + css: cssClass, + collapsed: false + }, + replace: false +}); + +const rowShape = { + menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + if (rowIndex == 0){ + return false; + } else { + return [ + { + id: "color", + text: "Color", + data: [ + { + id:"gray", + text: "Gray", + onClick: ({ id, item, row }) => changeRowColor(row, "gray") + }, + { + id:"yellow", + text: "Yellow", + onClick: ({ id, item, row }) => changeRowColor(row, "yellow") + }, + { + id:"red", + text: "Red", + onClick: ({ id, item, row }) => changeRowColor(row, "red") + } + ] + } + ]; + } + } + }, + css: (row, cards) => row.id == "task" && cards.length < 3 ? "green" : "red", + confirmDeletion: false +}; + +new kanban.Kanban("#root", { + cards, + rows, + rows, + rowShape, + // other parameters +}); +~~~ + +**Change log:** +- The ***css*** option was introduced in v1.4 +- The ***menu.items[0].label*** option was replaced by ***menu.items[0].text*** in v1.4 +- The ***menu.items[0].items*** option was replaced by ***menu.items[0].data*** in v1.4 +- The ***menu.items[0].label*** and ***menu.items[0].items*** options were removed in v1.7 +- The ***menu.items*** function was updated: the **store** parameter was replaced by **readonly** in v1.7 + +**Related articles:** [Configuration](guides/configuration.md) + +**Related sample:** [Kanban. Changing color of rows via custom menu](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md new file mode 100644 index 0000000..7e814a0 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scrollType +title: scrollType Config +description: You can learn about the scrollType config in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# scrollType + +### Description + +@short: Optional. Specifies the scrolling behavior type + +### Usage + +~~~jsx {} +scrollType?: "default" | "column"; +~~~ + +:::note +Using `scrollType: "column"` allows each column to be scrolled independently. +::: + +### Default config + +~~~jsx {} +scrollType: "default" +~~~ + +:::important +When combining [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) with `scrollType: "default"`, make sure to set a fixed height for cards using the [`cardHeight`](api/config/js_kanban_cardheight_config.md) property. Without this, cards won’t appear properly. +::: + +### Example + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + scrollType: "column", + // other parameters +}); +~~~ + +**Change log:** This property was introduced in v1.2 + +**Related articles:** [Configuration](guides/configuration.md#cards) + +**Related sample:** [Kanban. Fixed headers, lazy rendering and column scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md new file mode 100644 index 0000000..fcf4163 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md @@ -0,0 +1,98 @@ +--- +sidebar_label: theme +title: theme Config +description: Explore the theme configuration options in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# theme + +### Description + +@short: Optional. Sets a theme for the Kanban component. + +### Usage + +~~~jsx {} +theme?: { + name: string, // "material" (default) | "willow" | "willow-dark" + fonts?: boolean +}; +~~~ + +:::important +In addition to using the `theme` property, themes can be applied by adding the appropriate *css* classes to the widget containers: + +- **Material theme** +~~~html {} + +
+ +
+~~~ + +- **Willow theme** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark theme** +~~~html {} + +
+ +
+~~~ + +Alternatively, you can include the desired theme directly on the page from the skins folder: + +~~~html {} + +~~~ +::: + +### Parameters + +The **theme** configuration accepts the following parameters: + +- `theme` - (optional) an object containing theme settings: + - `name` - (required) specifies the theme name to apply to Kanban + - `fonts` - (optional) controls whether fonts are loaded from the CDN (wxi font) + +:::tip +The **Willow** and **Willow-Dark** themes are also available. To switch themes dynamically, use the [`setTheme()`](api/methods/js_kanban_settheme_method.md) method. +::: + +### Default config + +By default, the Kanban uses the **Material** theme. + +~~~jsx {} +theme: { + name: "material", + fonts: true +} +~~~ + +### Example + +~~~jsx {5-8} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: { + name: "willow-dark", // sets the initial theme to "willow-dark" + fonts: false + } + // other parameters +}); +~~~ + +**Change log:** This property was introduced in v1.4 + +**Related articles:** [Stylization](guides/stylization.md) + +**Related sample:** [Kanban. Changing a theme via the CSS class](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md new file mode 100644 index 0000000..24c1718 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: api +title: api Config +description: Explore the (Toolbar) api config in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, code samples, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# api + +### Description + +@short: Required. An object representing the internal API of Kanban. + +:::info +Here, the **internal API of Kanban** refers to the **controls** that are part of the Toolbar. +::: + +### Usage + +~~~jsx {} +api: object; +~~~ + +### Example + +~~~jsx {7} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api +}); +~~~ + +**Related articles:** [Configuration](guides/configuration.md#toolbar) + +**Related sample:** [Kanban. Custom toolbar](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md new file mode 100644 index 0000000..1863d88 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md @@ -0,0 +1,191 @@ +--- +sidebar_label: items +title: items Config +description: Explore the (Toolbar) items configuration in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# items + +### Description + +@short: Optional. An array containing controls arranged on the Kanban Toolbar + +### Usage + +~~~jsx {} +items?: [ + "search" | { + // search parameters + type: "search", + options?: [ + { + id: string, + label: string, + searchRule?: (card, value, by) => { + return boolean + } + }, {...} + ], + resultTemplate?: template(searchResult => { + return "The HTML template of the search result"; + }) + }, + "sort" | { + // sort parameters + type: "sort", + options?: [ + { + text: string, + by?: string, // by?: ((card: object) => any), + dir?: "asc" | "desc" + }, {...} + ] + }, + "spacer", + "undo", + "redo", + "addColumn", + "addRow", + custom_control // string or function +]; +~~~ + +### Parameters + +The **items** array accepts the following options: + +:::info +#### To use a *default search bar*, simply specify the `"search"` string. +#### To use a *custom search bar*, provide an object with these properties: + +- `type` - (required) control type (*"search"*) +- `options` - (optional) an array defining search parameters. Each object (*search option*) can include: + - `id` - (required) key of the card field to search by + - `label` - (required) name shown in the search bar selector dropdown + - `searchRule` (optional) - a custom function to define search logic. It receives: + - ***card*** - the card data object + - ***value*** - the search input value + - ***by*** - the card field key being searched +- `searchResult` - (optional) a template for customizing search result display + +~~~jsx +items: [ + "search", // default search bar + // other controls +] + +// or + +items: [ + { // custom search bar + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + // other controls +] +~~~ +::: + +:::info +#### To use a *default sort control*, just specify the `"sort"` string. +#### To use a *custom sort control*, provide an object with these options: + +- `type` - (required) control type (*"sort"*) +- `options` - (optional) an array defining sort parameters. Each object (*sort option*) can include: + - `text` - (required) name shown in the sort selector dropdown + - `by` - (optional) card field key to sort by, either a *string* or *function* returning the field + - `dir` - (optional) sort direction, either *"asc"* or *"desc"* + +~~~jsx +items: [ + "sort", // default sort control + // other controls +] +// or +items: [ + { // custom sort control + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, {...} // other controls +] +~~~ +::: + +- `"spacer"` - adds empty space between controls +- `"undo"` - control for undoing the last action (one click steps back) +- `"redo"` - control for redoing the last undone action (one click steps forward) +- `"addColumn"` - control for adding new columns +- `"addRow"` - control for adding new rows +- `custom_control` - (optional) custom control(s) can be added as a **string** or **function**. See the [Customization](guides/customization.md#custom-toolbar) section for details. + +### Example + +~~~jsx {8-24} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { + type: "search", + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", + "sort", + "undo", + "redo", + "addColumn", + "addRow" + ] +}); +~~~ + +**Change log:** + +- The *"Undo"* and *"Redo"* controls were introduced in v1.3 +- The ***items.options[0].label*** parameter for the **sort** control was renamed to ***items.options[0].text*** in v1.4 +- The ***items.searchResult*** parameter for the **"search"** control was added in v1.6 + +**Related articles:** [Configuration](guides/configuration.md#toolbar) and [Customization](guides/customization.md#custom-toolbar) + +**Related samples:** +- [Kanban. Custom toolbar](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) +- [Kanban. Customization of suggestions in search results](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md new file mode 100644 index 0000000..19cb148 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md @@ -0,0 +1,47 @@ +--- +sidebar_label: locale +title: locale Config +description: Explore the (Toolbar) locale configuration in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, code samples, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# locale + +### Description + +@short: Optional. An object defining a custom locale for the Toolbar + +:::info +The **locale** object should contain all the Kanban and Toolbar labels along with their translations. +::: + +### Usage + +~~~jsx {} +locale?: object; +~~~ + +### Default config + +By default, the Toolbar uses the [**English**](guides/localization.md#default-locale) locale. You can also configure it to use a custom locale. + +:::tip +To switch the locale on the fly, use the [**setLocale()**](api/methods/toolbar_setlocale_method.md) method of the Toolbar. +::: + +### Example + +~~~jsx {8} +// create Kanban +const board = new kanban.Kanban("#root", { + locale: cn +}); +// create Toolbar +new kanban.Toolbar("#toolbar", { + api: board.api, + locale: cn // apply the "cn" locale to Toolbar +}); +~~~ + +**Related articles:** [Localization](guides/localization.md) + +**Related sample:** [Kanban. Localization](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md b/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md new file mode 100644 index 0000000..eacccdc --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md @@ -0,0 +1,82 @@ +--- +sidebar_label: theme +title: theme Config +description: Here’s an overview of the (Toolbar) theme configuration in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, API references, try code examples, check out live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# theme + +### Description + +@short: Optional. Specifies a theme to apply to the Toolbar. + +### Usage + +~~~jsx {} +theme?: string; // "material" | "willow" | "willow-dark" +~~~ + +:::important +In addition to setting the `theme` property, you can also apply the desired theme by adding the corresponding *css* classes directly to the widget containers: + +- **Material theme** +~~~html {} + +
+ +
+~~~ + +- **Willow theme** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark theme** +~~~html {} + +
+ +
+~~~ + +Alternatively, you can include the required theme stylesheet from the skins folder: + +~~~html {} + +~~~ +::: + +### Default config + +By default, the Toolbar uses the **Material** theme. You can switch to the **Willow** or **Willow-Dark** themes as needed. + +:::tip +To update the theme on the fly, you can use the [**setConfig()**](api/methods/toolbar_setconfig_method.md) method. +::: + +### Example + +~~~jsx {5,11} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: "willow-dark" // initially applies the "willow-dark" theme + // other parameters +}); +// create Toolbar +new Toolbar("#toolbar", { + api: board.api, + theme: "willow-dark", // initially applies the "willow-dark" theme +}); +~~~ + +**Change log:** This property was introduced in v1.4 + +**Related articles:** [Stylization](guides/stylization.md) + +**Related sample:** [Kanban. Changing a theme via the CSS class](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md new file mode 100644 index 0000000..9cf1115 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: add-card +title: add-card Event +description: You can learn about the add-card event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# add-card + +### Description + +@short: Triggered when a new card is added + +### Usage + +~~~jsx {} +"add-card": ({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object, + skipProvider?: boolean, +}) => void; +~~~ + +### Parameters + +The callback for the **add-card** event receives an object with these properties: + +- `columnId` - (required) the ID of the column where the card will be added +- `id` - (optional) the ID assigned to the new card +- `rowId` - (optional) the ID of the row where the card will be placed +- `before` - (optional) the ID of the card before which the new card should be inserted +- `select` - (optional) controls whether the newly added card is selected +- `card` - (optional) the data object representing the new card. You can find the full list of card parameters [here](api/config/js_kanban_cards_config.md) +- `skipProvider` - (optional) controls whether the request to the server is skipped + +:::info +To manage internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "add-card" event +board.api.on("add-card", (obj) => { + console.log(obj.columnId); +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md new file mode 100644 index 0000000..e5a5719 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-column +title: add-column Event +description: Explore the add-column event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code samples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# add-column + +### Description + +@short: Triggered when a new column is added + +### Usage + +~~~jsx {} +"add-column": ({ + id?: string | number, + column?: object, + before?: string | number, + skipProvider?: boolean, +}) => void; +~~~ + +### Parameters + +The callback for the **add-column** event receives an object with these optional properties: + +- `id` - the ID of the new column, if specified +- `column` - the data object for the new column. You can find the complete list of **column** parameters [**here**](api/config/js_kanban_columns_config.md) +- `before` - the ID of the column before which the new column will be inserted +- `skipProvider` - controls whether the request to the server is prevented or allowed + +:::info +To manage internal events, you can refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "add-column" event +board.api.on("add-column", (obj) => { + console.log(obj.label); +}); +~~~ + +**Change log**: Starting from v1.1, the **id**, **before**, and **column** parameters were introduced \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md new file mode 100644 index 0000000..267fa48 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: add-comment +title: add-comment Event +description: You can learn about the add-comment event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# add-comment + +### Description + +@short: Triggered when a new comment is added + +### Usage + +~~~jsx {} +"add-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **add-comment** event receives an object with these properties: + +- `id` - (optional) the ID assigned to the new comment +- `cardId` - (required) the ID of the card where the comment is being added +- `comment` - (required) an object describing the new comment. It can include: + - `text` - (optional) the comment’s text content + - `date` - (optional) the date associated with the comment + - `html` - (optional) the HTML markup for the comment. To show HTML instead of plain text, enable the `html` option in the [`editorShape`](/api/config/js_kanban_editorshape_config/#--parameters-for-a-comments-type) configuration +- `skipProvider` - (optional) controls whether the request to the server is skipped or not + +:::info +To work with internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "add-comment" event +board.api.on("add-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**Change log:** This event was introduced in version 1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md new file mode 100644 index 0000000..001ba95 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: add-link +title: add-link Event +description: Explore the add-link event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code samples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# add-link + +### Description + +@short: Triggered when a new link is added + +### Usage + +~~~jsx {} +"add-link": ({ + id?: string | number, + link: object, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **add-link** event receives an object with the following properties: + +- `id` - (optional) the ID assigned to the new link +- `link` - (required) the data object representing the new link. You can find the full list of link parameters [here](api/config/js_kanban_links_config.md) +- `skipProvider` - (optional) controls whether the request to the server is suppressed or not + +:::info +To manage internal events, you can make use of the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {8-10} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// listen for the "add-link" event +board.api.on("add-link", (obj) => { + console.log(obj.link.masterId); +}); +~~~ + +**Change log:** This event was introduced in v1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md new file mode 100644 index 0000000..5709ab2 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-row +title: add-row Event +description: Explore the add-row event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API reference, try sample code and live demos, and get a free 30-day trial of DHTMLX Kanban. +--- + +# add-row + +### Description + +@short: Triggered when a new row is added + +### Usage + +~~~jsx {} +"add-row": ({ + id?: string | number, + row?: object, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **add-row** event accepts an object with these options: + +- `id` - (optional) the identifier for the new row +- `row` - (optional) the data object representing the new row. You can find the full list of **row** parameters [**here**](api/config/js_kanban_rows_config.md) +- `before` - (optional) the ID of the existing row that the new row will be inserted before +- `skipProvider` - (optional) controls whether the request to the server is prevented or allowed + +:::info +To work with internal events, you can refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// subscribe to the "add-row" event +board.api.on("add-row", (obj) => { + console.log(obj.id); +}); +~~~ + +**Change log**: The **id**, **before**, and **row** parameters were introduced in v1.1 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md new file mode 100644 index 0000000..4179382 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: add-vote +title: add-vote Event +description: You can learn about the add-vote event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# add-vote + +### Description + +@short: Triggered when a user casts a new vote + +### Usage + +~~~jsx {} +"add-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **add-vote** event receives an object with these properties: + +- `cardId` - (required) the ID of the card where the vote is being added +- `skipProvider` - (optional) controls whether the request to the server should be skipped + +:::info +To manage internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// subscribe on the "add-vote" event +board.api.on("add-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**Change log:** The event was added in v1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md new file mode 100644 index 0000000..e8bb652 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-card +title: delete-card Event +description: You can learn about the delete-card event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# delete-card + +### Description + +@short: This event triggers when a card is removed. + +### Usage + +~~~jsx {} +"delete-card": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **delete-card** event receives an object containing the following properties: + +- `id` - (required) the identifier of the card being deleted +- `skipProvider` - (optional) controls whether the request to the server should be skipped + +:::info +To manage internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// subscribe on the "delete-card" event +board.api.on("delete-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md new file mode 100644 index 0000000..d0ff248 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-column +title: delete-column Event +description: Explore the delete-column event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, code examples, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# delete-column + +### Description + +@short: Triggered when a column is removed + +### Usage + +~~~jsx {} +"delete-column": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **delete-column** event receives an object with these properties: + +- `id` - (required) the identifier of the column being deleted +- `skipProvider` - (optional) controls whether the request is sent to the server or not + +:::info +To manage internal events, refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "delete-column" event +board.api.on("delete-column", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md new file mode 100644 index 0000000..577a269 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: delete-comment +title: delete-comment Event +description: Explore the delete-comment event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code samples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# delete-comment + +### Description + +@short: Triggered when a card comment is deleted + +### Usage + +~~~jsx {} +"delete-comment": ({ + id?: string | number, + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **delete-comment** event receives an object containing these parameters: + +- `id` - (optional) the ID of the comment being deleted +- `cardId` - (required) the ID of the card from which the comment is deleted +- `skipProvider` - (optional) controls whether the request to the server is sent or not + +:::info +To manage internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen to the "delete-comment" event +board.api.on("delete-comment", (obj) => { + console.log(obj.id); +}); +~~~ + +**Change log:** This event was introduced in v1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md new file mode 100644 index 0000000..e9f0c32 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md @@ -0,0 +1,48 @@ +--- +sidebar_label: delete-link +title: delete-link Event +description: Explore the delete-link event in the DHTMLX JavaScript Kanban library documentation. Access developer guides, API references, try code examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# delete-link + +### Description + +@short: Triggered when a link is removed + +### Usage + +~~~jsx {} +"delete-link": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **delete-link** event receives an object with these properties: + +- `id` - (required) the ID of the link being deleted +- `skipProvider` - (optional) controls whether the request to the server is prevented + +:::info +To manage internal events, refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {8-10} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// listen for the "delete-link" event +board.api.on("delete-link", (obj) => { + console.log(obj.id); +}); +~~~ + +**Change log:** This event was introduced in v1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md new file mode 100644 index 0000000..3bd3319 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-row +title: delete-row Event +description: You can learn about the delete-row event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# delete-row + +### Description + +@short: Triggers when a row is being removed + +### Usage + +~~~jsx {} +"delete-row": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **delete-row** event receives an object with the following properties: + +- `id` - (required) specifies the ID of the row that will be deleted +- `skipProvider` - (optional) controls whether the request to the server should be skipped + +:::info +To work with internal events, you can refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "delete-row" event +board.api.on("delete-row", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md new file mode 100644 index 0000000..641a865 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: delete-vote +title: delete-vote Event +description: You can learn about the delete-vote event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# delete-vote + +### Description + +@short: Triggered when a user removes a vote from a card + +### Usage + +~~~jsx {} +"delete-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **delete-vote** event receives an object with these properties: + +- `cardId` - (required) the ID of the card from which the vote will be removed +- `skipProvider` - (optional) controls whether the request to the server should be skipped + +:::info +To work with internal events, you can refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// subscribe on the "delete-vote" event +board.api.on("delete-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**Change log:** The event was introduced in v1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md new file mode 100644 index 0000000..77341e9 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: drag-card +title: drag-card Event +description: You can learn about the drag-card event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# drag-card + +### Description + +@short: Triggered when a card is moved using drag and drop + +### Usage + +~~~jsx {} +"drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source: array +}) => void; +~~~ + +### Parameters + +The callback for the **drag-card** event receives an object with the following properties: + +- `id` - (required) the ID of the card being dragged +- `columnId` - (required) the ID of the column where the card is currently located +- `rowId` - (optional) the ID of the row where the card is currently located +- `before` - (optional) the ID of the card that follows the dragged card in the column +- `source` - (optional) an array containing the IDs of the moved cards + +:::info +To manage internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// subscribe on the "drag-card" event +board.api.on("drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**Change log:** The event was introduced in v1.4 + +**Related sample:** [Kanban. Disabling drag and drop to specific columns](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md new file mode 100644 index 0000000..f0595fb --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: duplicate-card +title: duplicate-card Event +description: Explore the duplicate-card event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# duplicate-card + +### Description + +@short: Triggered when a card is duplicated + +### Usage + +~~~jsx {} +"duplicate-card": ({ + id: string | number, + card?: object, + select?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **duplicate-card** event receives an object with these properties: + +- `id` - (required) the ID of the card being duplicated +- `card` - (optional) the data object for the new card. You can find the full list of card parameters [here](api/config/js_kanban_cards_config.md) +- `select` - (optional) controls whether the newly added card is selected + +:::info +To manage internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "duplicate-card" event +board.api.on("duplicate-card", (obj) => { + console.log(obj); +}); +~~~ + +**Change log:** The `select` parameter was introduced in v1.5.10 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md new file mode 100644 index 0000000..73d393a --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: end-drag-card +title: end-drag-card Event +description: You can learn about the end-drag-card event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# end-drag-card + +### Description + +@short: Triggered when a card stops being dragged + +### Usage + +~~~jsx {} +"end-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### Parameters + +The callback for the **end-drag-card** event receives an object containing the following properties: + +- `id` - (required) the ID of the card that was dragged +- `columnId` - (required) the ID of the column where the card is now located +- `rowId` - (optional) the ID of the row where the card is currently placed +- `before` - (optional) the ID of the card that comes immediately after the dragged card in the column +- `source` - (optional) an array of IDs representing the moved cards + +:::info +To manage internal events, the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) can be used +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "end-drag-card" event +board.api.on("end-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**Change log:** This event was introduced in v1.4 + +**Related sample:** [Kanban. Disabling drag and drop to specific columns](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md new file mode 100644 index 0000000..4bca744 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: move-card +title: move-card Event +description: You can learn about the move-card event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# move-card + +### Description + +@short: Triggered when a card is moved + +### Usage + +~~~jsx {} +"move-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **move-card** event receives an object with the following properties: + +- `id` - (required) the ID of the card being moved +- `columnId` - (required) the ID of the column where the card will be placed +- `rowId` - (optional) the ID of the row where the card will be placed +- `before` - (optional) the ID of the card that the moved card will be placed before +- `skipProvider` - (optional) controls whether the request to the server should be skipped or not + +:::info +To work with internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "move-card" event +board.api.on("move-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**Related sample:** [Kanban. Disabling drag and drop to specific columns](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md new file mode 100644 index 0000000..ed9ce08 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: move-column +title: move-column Event +description: Learn about the move-column event in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, API references, try out examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# move-column + +### Description + +@short: Triggered when a column is moved + +### Usage + +~~~jsx {} +"move-column": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **move-column** event receives an object with these properties: + +- `id` - (required) the ID of the column being moved +- `before` - (optional) the ID of the column before which the moved column will be inserted. If this isn’t specified, the column will be placed at the end of the board +- `skipProvider` - (optional) controls whether the request to the server is suppressed + +:::info +To manage internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// subscribe on the "move-column" event +board.api.on("move-column", (obj) => { + console.log(obj); +}); +~~~ + +**Change log:** This event was introduced in v1.1 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md new file mode 100644 index 0000000..b79afbc --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: move-row +title: move-row Event +description: Explore the move-row event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code samples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# move-row + +### Description + +@short: Triggered when a row is moved + +### Usage + +~~~jsx {} +"move-row": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **move-row** event receives an object with these properties: + +- `id` - (required) the ID of the row being moved +- `before` - (optional) the ID of the row before which the moved row will be inserted. If omitted, the row will be added at the end of the board +- `skipProvider` - (optional) controls whether the request to the server is prevented or allowed + +:::info +To manage internal events, you can refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {8-10} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// listen for the "move-row" event +board.api.on("move-row", (obj) => { + console.log(obj); +}); +~~~ + +**Change log:** This event was introduced in v1.1 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md new file mode 100644 index 0000000..ecb7145 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: redo +title: redo Event +description: Explore the redo event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, code samples, live demos, and get a free 30-day trial of DHTMLX Kanban. +--- + +# redo + +### Description + +@short: Triggered when an action that was undone gets repeated + +### Usage + +~~~jsx {} +"redo": () => void; +~~~ + +:::info +To work with internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "redo" event +board.api.on("redo", () => { + console.log("redo operation"); +}); +~~~ + +**Change log**: This event was introduced in v1.7 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md new file mode 100644 index 0000000..c7d86c3 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll +title: scroll Event +description: Explore the scroll event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# scroll + +### Description + +@short: Triggered when scrolling to specific elements + +### Usage + +~~~jsx {} +"scroll": ({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}) => void; +~~~ + +### Parameters + +The callback for the **scroll** event receives an object with these parameters: + +- `id` - (required) the ID of the element to scroll to +- `to` - (required) the type of element to scroll to. Possible values: *"column"*, *"row"*, or *"card"* +- `options` - (optional) an object with scrolling options. You can find the full list of parameters [here](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +:::info +To work with inner events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "scroll" event +board.api.on("scroll", (obj) => { + console.log(obj); +}); +~~~ + +**Change log:** This event was introduced in v1.2 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md new file mode 100644 index 0000000..b3fb50e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: select-card +title: select-card Event +description: Discover the select-card event in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, API references, try out code samples and live demos, and get a free 30-day trial of DHTMLX Kanban. +--- + +# select-card + +### Description + +@short: Triggered when a card is selected + +### Usage + +~~~jsx {} +"select-card": ({ + id: string | number, + groupMode?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **select-card** event receives an object with the following properties: + +- `id` - (required) the selected card's ID +- `groupMode` - (optional) indicates multiselect mode (defaults to false) + +:::info +To manage internal events, you can refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "select-card" event +board.api.on("select-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md new file mode 100644 index 0000000..9000b58 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md @@ -0,0 +1,52 @@ +--- +sidebar_label: set-edit +title: set-edit Event +description: Explore the set-edit event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# set-edit + +### Description + +@short: Triggered when the editor is toggled + +### Usage + +~~~jsx {} +"set-edit": ({ cardId: string | number, eventSource?: "select-card" } | null) => void; +~~~ + +### Parameters + +The callback for the **set-edit** event can either be *null* or an object containing: + +- `cardId` - (required) the ID of the card being edited +- `eventSource` - (optional) the ***"select-card"*** action that triggers the ***set-edit*** event + +:::note +The ***null*** value indicates that the editor is being closed +::: + +:::info +To manage internal events, you can utilize the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// block editing when a card is clicked once +board.api.intercept("set-edit", (ev) => { + return ev?.eventSource != "select-card"; +}); +~~~ + +**Change log:** + - The event was introduced in v1.2 + - The ***eventSource*** parameter was added in v1.6 + +**Related samples:** [Kanban. Open the editor by double-clicking on the task](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md new file mode 100644 index 0000000..8057ed4 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: set-search +title: set-search Event +description: Find out about the set-search event in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, API references, try code examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# set-search + +### Description + +@short: Triggered when a search is performed on cards + +### Usage + +~~~jsx {} +"set-search": ({ + value: string, + by?: string +}) => void; +~~~ + +### Parameters + +The callback for the **set-search** event receives an object containing these parameters: + +- `value` - (required) the search term +- `by` - (optional) the card field to search within + +:::info +To work with internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen to the "set-search" event +board.api.on("set-search", (obj) => { + console.log(obj.value); +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md new file mode 100644 index 0000000..8e6424a --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: set-sort +title: set-sort Event +description: You can learn about the set-sort event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# set-sort + +### Description + +@short: Triggered when cards are sorted + +### Usage + +~~~jsx {} +"set-sort": ( + { + by?: string | ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +) => void; +~~~ + +### Parameters + +The callback for the **set-sort** event accepts either *null* or an object containing the following options: + +- `by` - (optional) specifies the card field used for sorting (*string* or *function*) +- `dir` - (optional) defines the sorting direction, either *"asc"* or *"desc"* +- `preserve` - (optional) controls whether the sorting state is kept +- `columnId` - (optional) identifies the column to be sorted by its ID + +:::info +To work with internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// subscribe on the "set-sort" event +board.api.on("set-sort", (obj) => { + console.log(obj); +}); +~~~ + +**Change log:** This event was introduced in v1.2 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md new file mode 100644 index 0000000..6c8533b --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: start-drag-card +title: start-drag-card Event +description: You can learn about the start-drag-card event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# start-drag-card + +### Description + +@short: Triggered when a card drag operation begins + +### Usage + +~~~jsx {} +"start-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### Parameters + +The callback for the **start-drag-card** event receives an object containing these properties: + +- `id` - (required) the ID of the card being dragged +- `columnId` - (required) the ID of the column where the card is currently located +- `rowId` - (optional) the ID of the row where the card is currently located +- `before` - (optional) the ID of the card that comes immediately after the dragged card in the column +- `source` - (optional) an array of IDs representing the cards being moved + +:::info +To work with internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// subscribe on the "start-drag-card" event +board.api.on("start-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**Change log:** The event was introduced in v1.4 + +**Related sample:** [Kanban. Disabling drag and drop to specific columns](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md new file mode 100644 index 0000000..fddb032 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: undo +title: undo Event +description: Discover the undo event in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, API references, try code samples and live demos, and get a free 30-day trial of DHTMLX Kanban. +--- + +# undo + +### Description + +@short: Triggered when the last action in Kanban is undone + +### Usage + +~~~jsx {} +"undo": () => void; +~~~ + +:::info +To manage internal events, you can utilize the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "undo" event +board.api.on("undo", () => { + console.log("Undo operation"); +}); +~~~ + +**Change log**: This event was introduced in v1.7 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md new file mode 100644 index 0000000..99ed5db --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md @@ -0,0 +1,41 @@ +--- +sidebar_label: unselect-card +title: unselect-card Event +description: You can learn about the unselect-card event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# unselect-card + +### Description + +@short: Triggered when a card is unselected + +### Usage + +~~~jsx {} +"unselect-card": ({ id: string | number }) => void; +~~~ + +### Parameters + +The callback for the **unselect-card** event receives an object with the following property: + +- `id` - (required) the ID of the card that was unselected + +:::info +To manage internal events, you can refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "unselect-card" event +board.api.on("unselect-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md new file mode 100644 index 0000000..9175a33 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-card +title: update-card Event +description: Discover the update-card event in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, API references, try code examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# update-card + +### Description + +@short: Triggered when card data is updated + +### Usage + +~~~jsx {} +"update-card": ({ + id: string | number, + card?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **update-card** event accepts an object with these properties: + +- `id` - (required) the ID of the card that will be updated +- `card` - (optional) the new card data object. You can find the complete list of **card** parameters [**here**](api/config/js_kanban_cards_config.md) +- `replace` - (optional) controls whether the data is fully replaced or partially updated + + :::note + When `replace` is set to *true*, the existing data is completely replaced by the new data. If not, only the provided values will be updated. + ::: + +- `skipProvider` - (optional) controls whether the update request is sent to the server or not + +:::info +To manage internal events, refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "update-card" event +board.api.on("update-card", (obj) => { + console.log(obj); +}); +~~~ + +**Change log**: +- The **id** and **card** parameters were introduced in v1.1 +- The **replace** parameter was introduced in v1.3 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md new file mode 100644 index 0000000..83a5491 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-column +title: update-column Event +description: You can learn about the update-column event in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# update-column + +### Description + +@short: Triggered when a column's data is updated + +### Usage + +~~~jsx {} +"update-column": ({ + id: string | number, + column?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **update-column** event receives an object with the following properties: + +- `id` - (required) the identifier of the column to update +- `column` - (optional) an object containing the new data for the column. You can find the full list of **column** properties [**here**](api/config/js_kanban_columns_config.md) +- `replace` - (optional) controls whether the data should be completely replaced or partially updated + + :::note + Setting `replace` to *true* will overwrite the old data entirely. If omitted or set to false, only the provided values will be updated. + ::: + +- `skipProvider` - (optional) controls whether the update request should be sent to the server or not + +:::info +To manage internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "update-column" event +board.api.on("update-column", (obj) => { + console.log(obj); +}); +~~~ + +**Change log**: +- The **id** and **column** parameters were introduced in v1.1 +- The **replace** parameter was added in v1.3 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md new file mode 100644 index 0000000..ab895ce --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md @@ -0,0 +1,62 @@ +--- +sidebar_label: update-comment +title: update-comment Event +description: Find out about the update-comment event in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, API references, try code samples and live demos, and get a free 30-day trial of DHTMLX Kanban. +--- + +# update-comment + +### Description + +@short: Triggered when a comment is updated + +### Usage + +~~~jsx {} +"update-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **update-comment** event receives an object with these properties: + +- `id` - (optional) the ID of the comment being updated +- `cardId` - (required) the ID of the card where the comment is located +- `comment` - (required) an object describing the updated comment, which may include: + - `id` - (optional) the ID of the comment after update + - `cardId` - (optional) the ID of the card the updated comment belongs to + - `text` - (optional) the updated comment text + - `date` - (optional) the updated comment date + - `html` - (optional) the updated comment’s HTML markup. To display HTML instead of text, enable the `html` option in the [`editorShape`](/api/config/js_kanban_editorshape_config/#--parameters-for-a-comments-type) config +- `skipProvider` - (optional) controls whether the request to the server is skipped or not + +:::info +To manage internal events, you can use the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen for the "update-comment" event +board.api.on("update-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**Change log:** This event was introduced in v1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md new file mode 100644 index 0000000..98ace73 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-row +title: update-row Event +description: Explore the update-row event in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, code samples, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# update-row + +### Description + +@short: Triggered when a row's data is updated + +### Usage + +~~~jsx {} +"update-row": ({ + id: string | number, + row?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### Parameters + +The callback for the **update-row** event accepts an object with these properties: + +- `id` - (required) identifies the row to update +- `row` - (optional) contains the new data for the row. You can find all available **row** parameters [**here**](api/config/js_kanban_rows_config.md) +- `replace` - (optional) controls whether the existing data is completely replaced + + :::note + Setting `replace` to *true* will overwrite all old data with the new data. If not set, only the specified values will be updated. + ::: + +- `skipProvider` - (optional) controls whether to skip sending the update request to the server + +:::info +To work with internal events, refer to the [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// listen to the "update-row" event +board.api.on("update-row", (obj) => { + console.log(obj); +}); +~~~ + +**Change log**: +- Added **id** and **row** parameters in v1.1 +- Added **replace** parameter in v1.3 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md new file mode 100644 index 0000000..4bafac0 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md @@ -0,0 +1,39 @@ +--- +sidebar_label: api.detach() +title: detach Method +description: You can learn about the detach method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# api.detach() + +## Description + +@short: This method lets you remove or detach an event listener. + +## Usage + +~~~jsx +api.detach(tag: number | string | symbol ): void; +~~~ + +## Parameters + +- `tag` - the identifier used to reference an event handler when it was created + +### Example + +~~~jsx {11} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +board.api.on("move-card", ({ id, columnId }) => { + console.log("Move the card"); +}, { tag: "move" }); + +board.api.detach("move"); +~~~ + +**Change log**: The internal method was added in v1.7 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md new file mode 100644 index 0000000..7db4518 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md @@ -0,0 +1,50 @@ +--- +sidebar_label: api.exec() +title: exec Method +description: You can learn about the exec method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# api.exec() + +### Description + +@short: This method lets you trigger internal events within the Kanban board. + +### Usage + +~~~jsx {} +api.exec( + event: string, + config: object +): void; +~~~ + +### Parameters + +- `event` - (required) the name of the event to trigger +- `config` - (required) an object containing parameters related to the event being triggered + +### Events + +:::info +You can find the complete list of Kanban internal events [**here**](api/overview/main_overview.md/#kanban-events) +::: + +### Example + +~~~jsx {7,9-12} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// select the card with the 1 ID +board.api.exec("select-card", { id: 1 }); +// add new card without sending changes to the server +board.api.exec("add-card", { + columnId: "backlog", + skipProvider: true, +}); +~~~ + +**Related sample:** [Kanban. Preserve sorting](https://snippet.dhtmlx.com/74nyuv14?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md new file mode 100644 index 0000000..2584d7c --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md @@ -0,0 +1,104 @@ +--- +sidebar_label: api.getReactiveState() +title: getReactiveState Method +description: You can learn about the getReactiveState method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# api.getReactiveState() + +### Description + +@short: Retrieves an object containing the reactive properties of the Kanban board. + +### Usage + +~~~jsx {} +api.getReactiveState(): object; +~~~ + +### Returns + +This method returns an object with the following properties: + +~~~jsx {} +{ + cardHeight: {...}, + cardShape: {...}, + cards: {...}, + columnKey: {...}, + columnShape: {...}, + columns: {...}, + currentUser: {...}, + history: {...}, + links: {...}, + readonly: {...}, + rowKey: {...}, + rowShape: {...}, + editorShape: {...}, + rows: {...}, + search: {...}, + selected: {...}, + sort: {...}, + + // removed parameters + /* + fromAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + overAreaMeta: {...}, + before: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + overAreaId: {...}, + /* + + // private parameters + /* + edit -> _edit: {...}, + layout -> layout: {...}, + cardsMap -> _cardsMap: {...}, + cardsMeta -> _cardsMeta: {...}, + areasMeta -> _areasMeta: {...}, + scroll -> _scroll: {...}, + */ +} +~~~ + +:::warning +These state properties are read-only. Modifying them may lead to unexpected behavior! +::: + +### Example + +~~~jsx {7-37} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// retrieve the reactive state of the Kanban board +const state = board.api.getReactiveState(); + +// listen for changes in columns and log the updated array +state.columns.subscribe((data) => { + console.log(data); +}); + +// listen for changes in cards and log the updated array +state.cards.subscribe((data) => { + console.log(data); +}); + +// listen for changes in rows and log the updated array +state.rows.subscribe((data) => { + console.log(data); +}); + +// listen for changes in card selection and log the IDs of selected cards +state.selected.subscribe((data) => { + console.log(data); +}); +~~~ + +**Change log:** This method was updated in v1.7 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md new file mode 100644 index 0000000..aabf2c5 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md @@ -0,0 +1,89 @@ +--- +sidebar_label: api.getState() +title: getState Method +description: You can learn about the getState method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# api.getState() + +### Description + +@short: Retrieves an object containing the StateStore properties of the Kanban board. + +### Usage + +~~~jsx {} +api.getState(): object; +~~~ + +### Returns + +This method returns an object with the following properties: + +~~~jsx {} +{ + cardHeight: number | null, + cards: array, + cardShape: object, + columnKey: string, + columns: array, + columnShape: object, + currentUser: number | string | null, + links: array, + readonly: object, + rowKey: string, + rows: array, + rowShape: object, + editorShape: array, + history: object, + search: object, + selected: array, + sort: object, + + // removed parameters + /* + fromAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, + before: string | number, + dragItemId: string | number, + dragItemsCoords: array, + overAreaId: string | number, + /* + + // private parameters + /* + edit -> _edit: object, + layout -> layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object, + */ +} +~~~ + +:::warning +These state properties are read-only. Modifying them may cause unexpected issues! +::: + +### Example + +~~~jsx {7-12} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// retrieve the current State of the Kanban board +const state = board.api.getState(); +console.log(state.cards); // display the cards data +console.log(state.columns); // display the columns data +console.log(state.rows); // display the rows data +console.log(state.cardShape); // display the card configuration +//... +~~~ + +**Change log:** The method was updated in v1.7 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md new file mode 100644 index 0000000..b0fc79e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: api.getStores() +title: getStores Method +description: You can learn about the getStores method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# api.getStores() + +### Description + +@short: Retrieves an object containing the DataStore properties of the Kanban. + +### Usage + +~~~jsx {} +api.getStores(): object; +~~~ + +### Returns + +This method returns an object that includes the **DataStore** parameters: + +~~~jsx {} +{ + data: DataStore // ( object of parameters ) +} +~~~ + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// get the DataStore object of Kanban +const store = board.api.getStores(); +console.log(store); +~~~ + +**Change log:** The method was updated in v1.2 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md new file mode 100644 index 0000000..6f27194 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: api.intercept() +title: intercept Method +description: You can learn about the intercept method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# api.intercept() + +### Description + +@short: Provides a way to capture and block internal events before they proceed. + +### Usage + +~~~jsx {} +api.intercept( + event: string, + callback: function, + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### Parameters + +- `event` - (required) the event to listen for +- `callback` - (required) the function to execute when the event occurs (arguments depend on the specific event) +- `config` - (optional) an object that can include: + - `intercept` - (optional) when set to `true`, this listener runs before others + - `tag` - (optional) a label for the action, useful for removing the handler later with the [`detach`](api/internal/js_kanban_detach_method.md) method + +### Events + +:::info +You can find the complete list of internal Kanban events [**here**](api/overview/main_overview.md/#kanban-events) +::: + +### Example + +~~~jsx {7-11} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// block moving cards into the column with the "done" ID +board.api.intercept("move-card", ({ id, columnId }) => { + if(columnId !== "done" ){ + return false; + } +}, {tag: "move"}); +~~~ + +**Change log**: The **config.tag** and **config.intercept** options were introduced in version 1.7 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md new file mode 100644 index 0000000..8407ead --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: export.json() +title: json Method +description: You can learn about the json method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# export.json() + +### Description + +@short: Outputs Kanban data as a JSON file + +### Usage + +~~~jsx {} +export.json(): void; +~~~ + +:::info +This method saves the Kanban data into a JSON file formatted like this: +~~~jsx {} +{ + "cards": [], + "columns": [], + "rows": [] +} +~~~ +::: + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// export the Kanban data to JSON () +board.export.json(); // => { "cards": [...], "columns": [...], "rows": [] } +~~~ + +**Change log:** The method was added in v1.3 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md new file mode 100644 index 0000000..e9f0bc3 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md @@ -0,0 +1,51 @@ +--- +sidebar_label: api.on() +title: on Method +description: You can learn about the on method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# api.on() + +### Description + +@short: Provides a way to attach handlers to internal events. + +### Usage + +~~~jsx {} +api.on( + event: string, + handler: function + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### Parameters + +- `event` - (required) the event that will trigger the handler +- `handler` - (required) the function to execute when the event occurs (its arguments depend on the specific event) +- `config` - (optional) an object that can include: + - `intercept` - (optional) setting `intercept: true` makes this listener run before others + - `tag` - (optional) a label for the handler, which can be used to remove it later via the [`detach`](api/internal/js_kanban_detach_method.md) method + +### Events + +:::info +You can find the complete list of Kanban internal events [**here**](api/overview/main_overview.md/#kanban-events) +::: + +### Example + +~~~jsx {7-9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// log card data to the console when a card is moved +board.api.on("move-card", ({ id, columnId }) => { + console.log({ id, columnId }); +}, {tag: "move"}); +~~~ + +**Change log**: The **config.tag** and **config.intercept** options were introduced in v1.7 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md new file mode 100644 index 0000000..55de94e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: api.setNext() +title: setNext Method +description: You can learn about the setNext method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# api.setNext() + +### Description + +@short: Enables adding an action into the Event Bus sequence + +### Usage + +~~~jsx {} +api.setNext(next: any): void; +~~~ + +### Parameters + +- `next` - (required) the action to be added into the **Event Bus** sequence + +### Example + +~~~jsx {15} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row" + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +Including **RestDataProvider** in the **Event Bus** sequence is necessary to handle data operations like **adding** and **deleting**, and to send the related requests to the server. +::: \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md new file mode 100644 index 0000000..ebbf410 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md @@ -0,0 +1,57 @@ +--- +sidebar_label: addCard() +title: addCard Method +description: You can learn about the addCard method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# addCard() + +### Description + +@short: Inserts a new card into the Kanban board + +### Usage + +~~~jsx {} +addCard({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object +}): void; +~~~ + +### Parameters + +- `columnId` - (required) the ID of the column where the card will be added +- `id` - (optional) the ID to assign to the new card +- `rowId` - (optional) the ID of the row where the card should be placed +- `before` - (optional) the ID of an existing card that the new card will be inserted before +- `select` - (optional) whether the newly added card should be selected +- `card` - (optional) the data object defining the new card + +:::info +You can find the complete list of **card** parameters [**here**](api/config/js_kanban_cards_config.md) +::: + +### Example + +~~~jsx {7-12} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// add new card into the "backlog" column +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" } +}); +~~~ + +:::tip +The ID of the new card can also be specified inside the **card** object +::: \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md new file mode 100644 index 0000000..d8b73e6 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md @@ -0,0 +1,54 @@ +--- +sidebar_label: addColumn() +title: addColumn Method +description: You can learn about the addColumn method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# addColumn() + +### Description + +@short: Inserts a new column into the Kanban board + +### Usage + +~~~jsx {} +addColumn({ + id?: string | number, + column?: object, + before?: string | number +}): void; +~~~ + +### Parameters + +- `id` - (optional) specifies the ID for the new column +- `column` - (optional) provides the data object defining the new column +- `before` - (optional) indicates the ID of the column before which the new column will be inserted + +:::info +You can find the complete list of **column** parameters [**here**](api/config/js_kanban_columns_config.md) +::: + +### Example + +~~~jsx {7-16} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// add new column +board.addColumn({ + id: "extra_column", + column: { + label: "Extra column", + limit: 2, + strictLimit: 2, + collapsed: true + }, + before: "column_2" +}); +~~~ + +**Change log**: The **id**, **column**, and **before** parameters were introduced in v1.1 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md new file mode 100644 index 0000000..2f265ed --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: addComment() +title: addComment Method +description: You can learn about the addComment method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# addComment() + +### Description + +@short: Inserts a new comment into the specified card using its ID + +### Usage + +~~~jsx {} +addComment({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### Parameters + +- `id` - (optional) identifier for the new comment +- `cardId` - (required) identifier of the card where the comment will be added +- `comment` - (required) object defining the new comment's details. It can include: + - `text` - (optional) the comment's text content + - `date` - (optional) the date associated with the comment + - `html` - (optional) HTML content for the comment. To display HTML instead of plain text, enable the `html` property in the [`editorShape`](/api/config/js_kanban_editorshape_config/#--parameters-for-a-comments-type) configuration + +### Example + +~~~jsx {7-15} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// add new comment +board.addComment({ + id: 1, + cardId: 1, + comment: { + text: "", + date: new Date("01/07/2021"), + html: "Important comment" + } +}); +~~~ + +**Change log:** This method was introduced in version 1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md new file mode 100644 index 0000000..e982514 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: addLink() +title: addLink Method +description: You can learn about the addLink method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# addLink() + +### Description + +@short: Inserts a new link into the Kanban board + +### Usage + +~~~jsx {} +addLink({ + id?: string | number, + link: object +}): void; +~~~ + +### Parameters + +- `id` - (optional) the identifier for the new link +- `link` - (required) the data object representing the new link. You can find the complete list of link parameters [here](api/config/js_kanban_links_config.md) + +### Example + +~~~jsx {7-14} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// add new link +board.addLink({ + id: 3, + link: { + source: 4, + target: 6, + relation: "relatesTo", + } +}); +~~~ + +**Change log:** This method was introduced in version 1.5 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md new file mode 100644 index 0000000..95cf08a --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: addRow() +title: addRow Method +description: You can learn about the addRow method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# addRow() + +### Description + +@short: Inserts a new row into the Kanban board + +### Usage + +~~~jsx {} +addRow({ + id?: string | number, + row?: object, + before?: string | number +}): void; +~~~ + +### Parameters + +- `id` - (optional) specifies the ID for the new row +- `row` - (optional) provides the data object representing the new row +- `before` - (optional) indicates the ID of the row before which the new row will be inserted + +:::info +You can find the complete list of **row** parameters [**here**](api/config/js_kanban_rows_config.md) +::: + +### Example + +~~~jsx {8-15} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// add new row +board.addRow({ + id: "extra_row", + row: { + label: "Extra row", + collapsed: false + }, + before: "row_2" +}); +~~~ + +**Change log**: The **id**, **row**, and **before** parameters were introduced in v1.1 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md new file mode 100644 index 0000000..9188fcd --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteCard() +title: deleteCard Method +description: You can learn about the deleteCard method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# deleteCard() + +### Description + +@short: Deletes the specified card from the Kanban datastore. + +### Usage + +~~~jsx {} +deleteCard({ id: string | number }): void; +~~~ + +### Parameters + +- `id` - (required) the ID of the card to remove + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// delete a card using its id +board.deleteCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md new file mode 100644 index 0000000..9ef9152 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteColumn() +title: deleteColumn Method +description: You can learn about the deleteColumn method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# deleteColumn() + +### Description + +@short: Deletes a specific column from the Kanban datastore + +### Usage + +~~~jsx {} +deleteColumn({ id: string | number }): void; +~~~ + +### Parameters + +- `id` - (required) the identifier of the column that needs to be removed + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// remove column by its id +board.deleteColumn({ id: "backlog" }); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md new file mode 100644 index 0000000..9451ea8 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: deleteComment() +title: deleteComment Method +description: You can learn about the deleteComment method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# deleteComment() + +### Description + +@short: Removes a comment from a card by specifying its ID + +### Usage + +~~~jsx {} +deleteComment({ + id: string | number, + cardId: string | number +}): void; +~~~ + +### Parameters + +- `id` - (required) the identifier of the comment that should be removed +- `cardId` - (required) the identifier of the card containing the comment + +### Example + +~~~jsx {7-10} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// delete comment +board.deleteComment({ + id: 1, + cardId: 1, +}); +~~~ + +**Change log:** The method was added in v1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md new file mode 100644 index 0000000..adfb86b --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md @@ -0,0 +1,36 @@ +--- +sidebar_label: deleteLink() +title: deleteLink Method +description: You can learn about the deleteLink method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# deleteLink() + +### Description + +@short: Deletes a specific link from the Kanban datastore. + +### Usage + +~~~jsx {} +deleteLink({ id: string | number }): void; +~~~ + +### Parameters + +- `id` - (required) the ID of the link that needs to be removed + +### Example + +~~~jsx {8} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + links, +}); +// remove link by its id +board.deleteLink({ id: 5 }); +~~~ + +**Change log:** This method was introduced in version 1.5 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md new file mode 100644 index 0000000..7ba2db1 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteRow() +title: deleteRow Method +description: You can learn about the deleteRow method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# deleteRow() + +### Description + +@short: Deletes the specified row from the Kanban datastore. + +### Usage + +~~~jsx {} +deleteRow({ id: string | number }): void; +~~~ + +### Parameters + +- `id` - (required) the ID of the row you want to delete + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// remove row by its id +board.deleteRow({ id: "feature" }); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md new file mode 100644 index 0000000..5c10798 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md @@ -0,0 +1,29 @@ +--- +sidebar_label: destructor() +title: destructor Method +description: You can learn about the destructor method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# destructor() + +### Description + +@short: Clears all HTML elements of the Kanban and removes all associated event handlers. + +### Usage + +~~~jsx {} +destructor(): void; +~~~ + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// remove Kanban +board.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md new file mode 100644 index 0000000..4d7a762 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: duplicateCard() +title: duplicateCard Method +description: You can learn about the duplicateCard method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# duplicateCard() + +### Description + +@short: Creates a copy of a card using its specified ID. + +### Usage + +~~~jsx {} +duplicateCard({ + id: string | number, + card?: object, + select?: boolean +}): void; +~~~ + +### Parameters + +- `id` - (required) the ID of the card to be duplicated +- `card` - (optional) the data object for the new card. You can find the full list of card parameters [**here**](api/config/js_kanban_cards_config.md) +- `select` - (optional) determines whether the newly added card should be selected + +### Example + +~~~jsx {7-10} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// duplicate a card with the 1 ID +board.duplicateCard({ + id: 1, + card: { label: "Duplicated card" }, + select: true +}); +~~~ + +**Change log:** The `select` parameter was introduced in v1.5.10 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md new file mode 100644 index 0000000..b531c09 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getAreaCards() +title: getAreaCards Method +description: Explore the getAreaCards method in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, try code samples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# getAreaCards() + +### Description + +@short: Retrieves an array containing data objects for all cards within the specified column (and row, if provided). + +### Usage + +~~~jsx {} +getAreaCards( + columnId: string | number, + rowId?: string | number +): array; +~~~ + +### Parameters + +- `columnId` - (required) the ID of the column to target +- `rowId` - (optional) the ID of the row to target + +### Returns + +This method returns an array of data objects representing the cards. + +:::info +When the Kanban board has only **columns** and no **rows**, provide just the ***columnId***. The method will return all card data objects within that column. + +If the Kanban board includes both **columns** and **rows**, you can specify both ***columnId*** and ***rowId***. This will return all card data objects located in the specified column and row. +::: + +### Example + +~~~jsx {8} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// retrieve an array of card data objects for the given column and row +board.getAreaCards("column_id", "row_id"); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md new file mode 100644 index 0000000..106ff37 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: getCard() +title: getCard Method +description: You can learn about the getCard method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# getCard() + +### Description + +@short: Retrieves the data object of a card using its specified ID + +### Usage + +~~~jsx {} +getCard(id: string | number): object; +~~~ + +### Parameters + +- `id` - (required) the ID of the card to retrieve + +### Returns + +This method returns the data object associated with the card that matches the given ID + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// retrieve the data object of the card with ID 1 +const card_data = board.getCard(1); +console.log(card_data); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md new file mode 100644 index 0000000..71abf6e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md @@ -0,0 +1,40 @@ +--- +sidebar_label: getColumnCards() +title: getColumnCards Method +description: You can learn about the getColumnCards method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# getColumnCards() + +### Description + +@short: Retrieves an array containing data objects for all cards within a specified column + +### Usage + +~~~jsx {} +getColumnCards(id: string | number): array; +~~~ + +### Parameters + +- `id` - (required) the ID of the column you want to access + +### Returns + +This method returns an array filled with data objects representing all the cards in the specified column + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// retrieve data objects for all cards in the column with ID 1 +const cards_data = board.getColumnCards(1); +console.log(cards_data); +~~~ + +**Change log**: The method was added in v1.7 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md new file mode 100644 index 0000000..eac17e5 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: getSelection() +title: getSelection Method +description: You can learn about the getSelection method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# getSelection() + +### Description + +@short: Retrieves an array containing the ID(s) of the currently selected card(s). + +### Usage + +~~~jsx {} +getSelection(): array; +~~~ + +### Returns + +This method returns an array with the ID(s) of the selected card(s). + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// retrieves an array of IDs for the selected cards +board.getSelection(); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md new file mode 100644 index 0000000..a95e7f7 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md @@ -0,0 +1,52 @@ +--- +sidebar_label: moveCard() +title: moveCard Method +description: You can learn about the moveCard method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# moveCard() + +### Description + +@short: Moves a card to a specified column (and row) + +### Usage + +~~~jsx {} +moveCard({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number +}): void; +~~~ + +### Parameters + +- `id` - (required) the ID of the card to be moved +- `columnId` - (required) the ID of the column where the card will be placed +- `rowId` - (optional) the ID of the row where the card will be positioned +- `before` - (optional) the ID of the card before which the moved card will be inserted + +:::info +If the **rowKey** property is set in the widget configuration, the **rowId** parameter in the **moveCard()** method must be provided. +::: + +### Example + +~~~jsx {9-14} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// move the card with ID 1 +// it will be placed into the "inprogress" column and the "feature" row, +// before the card with ID 8 +board.moveCard({ + id: 1, + columnId: "inprogress", + rowId: "feature", + before: 8 +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md new file mode 100644 index 0000000..c777ab8 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: moveColumn() +title: moveColumn Method +description: You can learn about the moveColumn method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# moveColumn() + +### Description + +@short: Shifts a column to a new spot on the board. + +### Usage + +~~~jsx {} +moveColumn({ + id: string | number, + before?: string | number +}): void; +~~~ + +### Parameters + +- `id` - (required) the ID of the column that needs to be moved +- `before` - (optional) the ID of the column that the moved column should be placed ahead of. If this parameter is left out, the column will be moved to the end of the board. + +### Example + +~~~jsx {7-10} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// move the "backlog" column and place it before the "done" one +board.moveColumn({ + id: "backlog", + before: "done" +}); +~~~ + +**Change log:** The method was added in v1.1 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md new file mode 100644 index 0000000..45afe5c --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: moveRow() +title: moveRow Method +description: You can learn about the moveRow method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# moveRow() + +### Description + +@short: Shifts a row to a new position + +### Usage + +~~~jsx {} +moveRow({ + id: string | number, + before?: string | number +}): void; +~~~ + +### Parameters + +- `id` - (required) the ID of the row that needs to be moved +- `before` - (optional) the ID of the row that the moved row will be placed in front of. If this parameter is omitted, the row will be moved to the end of the board + +### Example + +~~~jsx {8-11} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + row +}); +// move the "task" swimlane and place it before (above) the "feature" one +board.moveRow({ + id: "task", + before: "feature" +}); +~~~ + +**Change log:** The method was added in v1.1 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md new file mode 100644 index 0000000..00c32f9 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md @@ -0,0 +1,47 @@ +--- +sidebar_label: parse() +title: parse Method +description: You can learn about the parse method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# parse() + +### Description + +@short: Loads data into the Kanban board + +### Usage + +~~~jsx {} +parse({ + columns?: array, + rows?: array, + cards?: array, + links?: array +}): void; +~~~ + +### Parameters + +- [`columns`](api/config/js_kanban_columns_config.md) - (optional) an array containing column data objects +- [`rows`](api/config/js_kanban_rows_config.md) - (optional) an array containing row data objects +- [`cards`](api/config/js_kanban_cards_config.md) - (optional) an array containing card data objects +- [`links`](api/config/js_kanban_links_config.md) - (optional) an array containing link data objects + +### Example + +~~~jsx {4-9} +// create Kanban +const board = new kanban.Kanban("#root", {}); +// load data into Kanban +board.parse({ + columns, + cards, + rows, + links +}); +~~~ + +**Change log:** Since version 1.1, it's no longer necessary to reset the initial data in the constructor before loading new data + +**Related articles:** [Working with Data](guides/working_with_data.md#loading-data-from-local-source) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md new file mode 100644 index 0000000..221990b --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: redo() +title: redo Method +description: You can learn about the redo method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# redo() + +### Description + +@short: Reapplies the action that was undone by the undo command + +:::info +The `redo()` method only works when the [`history: true`](api/config/js_kanban_history_config.md) configuration is enabled! +::: + +### Usage + +~~~jsx {} +redo(): void; +~~~ + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// redoes the last undone action in Kanban's history +board.redo(); +~~~ + +**Change log:** The method was introduced in v1.3 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md new file mode 100644 index 0000000..9a8823d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll() +title: scroll Method +description: You can learn about the scroll method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# scroll() + +### Description + +@short: Moves the Kanban view to bring the specified element into focus. + +### Usage + +~~~jsx {} +scroll({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}): void; +~~~ + +### Parameters + +- `id` - (required) the identifier of the element to scroll to +- `to` - (required) specifies the type of element to scroll to. Options include "column", "row", or "card" +- `options` - (optional) an object with scrolling settings. You can find the full list of parameters for scrolling [here](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +### Example + +~~~jsx {7-15} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// scroll Kanban to the card with the 246 ID +board.scroll({ + id: 246, + to: "card", + options: { + behavior: "smooth", + block: "end", + inline: "nearest" + } +}); +~~~ + +**Change log:** The method was introduced in v1.2 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md new file mode 100644 index 0000000..0d1aefb --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: selectCard() +title: selectCard Method +description: You can learn about the selectCard method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# selectCard() + +### Description + +@short: Highlights a card using the given ID. + +### Usage + +~~~jsx {} +selectCard({ + id: string | number, + groupMode?: boolean +}): void; +~~~ + +### Parameters + +- `id` - (required) the ID of the card to be selected +- `groupMode` - (optional) turns on or off the ability to select multiple cards at once (**false** by default) + +:::info +When **groupMode** is set to **true**, calling **selectCard()** won’t clear the selection of other cards +::: + +### Example + +~~~jsx {7-10} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// select the card with the 1 ID +board.selectCard({ + id: 1, + groupMode: true +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md new file mode 100644 index 0000000..394d87f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: serialize() +title: serialize Method +description: You can learn about the serialize method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# serialize() + +### Description + +@short: Converts the Kanban data into a JSON format + +### Usage + +~~~jsx {} +serialize(): object; +~~~ + +### Returns + +This method returns an object containing the Kanban data + +~~~jsx {} +{ + cards: [{...}, {...}, ...], + rows: [{...}, {...}, ...], + columns: [{...}, {...}, ...], + links: [{...}, {...}, ...] +} +~~~ + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// retrieve the Kanban data as an object +board.serialize(); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md new file mode 100644 index 0000000..3c92f62 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: setConfig() +title: setConfig Method +description: You can learn about the setConfig method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# setConfig() + +### Description + +@short: Updates the Kanban with new configuration settings + +### Usage + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### Parameters + +- `config` - (required) an object containing the Kanban configuration options. Check out the full list of properties [here](api/overview/main_overview.md#kanban-properties) + +:::tip +This method allows you to adjust the Kanban widget's settings and load data into it. Keep in mind that it does not affect the history (changing history is not supported). +::: + +### Example + +~~~jsx {10-20,22-23} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +// create Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + +// update Kanban configuration +board.setConfig({ + columnKey: "stage", + rowKey: "type", + cardShape, + editorShape, + editor: { + autoSave: false + }, + /* other parameters */ +}); + +// update Toolbar configuration +toolbar.setConfig({ items: ["search", "spacer", "sort"] }); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md new file mode 100644 index 0000000..6b3a792 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setEdit() +title: setEdit Method +description: You can learn about the setEdit method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# setEdit() + +### Description + +@short: Enables or disables the Kanban card editor + +### Usage + +~~~jsx {} +setEdit({ cardId: string | number } | null): void; +~~~ + +### Parameters + +This method accepts either *null* or an object containing the following property: + +- `cardId` - (required) the identifier of the card to be edited + +:::note +To close the editor, simply call **setEdit()** with ***null*** +::: + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// open the editor for a specific card by its ID +board.setEdit({ cardId: 1 }); +~~~ + +**Change log:** The method was introduced in v1.2 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md new file mode 100644 index 0000000..ef53028 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: setLocale() +title: setLocale Method +description: You can learn about the setLocale method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# setLocale() + +### Description + +@short: Changes the locale settings for Kanban + +### Usage + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### Parameters + +- `null` - (optional) resets Kanban to the default locale (*English*) +- `locale` - (optional) an object containing the new locale data to be applied + +:::info +The `setLocale()` method is used to update the locale for Kanban only. To revert Kanban back to the default locale, call `setLocale()` without any arguments or pass *null*. For changing the locale of the Toolbar, use the [`toolbar.setLocale()`](api/methods/toolbar_setlocale_method.md) method instead. +::: + +### Example + +~~~jsx {7,9} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, +}); +// set Kanban locale to "de" +board.setLocale(kanban.locales["de"]); +// reset Kanban locale to default +board.setLocale(); // or board.setLocale(null); +~~~ + +**Change log:** The method was updated in v1.2 + +**Related articles:** [Localization](guides/localization.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md new file mode 100644 index 0000000..526c154 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setSearch() +title: setSearch Method +description: You can learn about the setSearch method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# setSearch() + +### Description + +@short: Finds cards based on the specified criteria + +### Usage + +~~~jsx {} +setSearch({ + value: string, + by?: string +}): void; +~~~ + +:::info +This method allows searching for cards using the given parameters. If you call **setSearch()** without any arguments, it will clear the search input and remove any card highlighting. +::: + +### Parameters + +- `value` - (required) the text to search for +- `by` - (optional) the card field to perform the search on + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// highlight the cards that match the parameters +board.setSearch({ value: "Integration", by: "label" }); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md new file mode 100644 index 0000000..650e74f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: setSort() +title: setSort Method +description: You can learn about the setSort method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# setSort() + +### Description + +@short: Organizes cards based on the given sorting criteria + +### Usage + +~~~jsx {} +setSort( + { + by?: string | function, // by?: ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +): void; +~~~ + +### Parameters + +This method accepts either an object with sorting options or *null*. Within the object, you can define the following: + +- `by` - (optional) specifies the card property to sort by. It can be a *string* or a *function* that returns the value to sort on +- `dir` - (optional) sets the sorting direction, either *"asc"* or *"desc"* +- `columnId` - (optional) identifies the column whose cards should be sorted +- `preserve` - (optional) controls whether the sorting order is maintained (*false* by default) + +:::info +When **preserve** is set to *false*, sorting applies only once. This means that if cards are added or moved afterward, the sorting won’t be kept and the order may change. If set to *true*, the sorting will stay consistent even after cards are added or moved. To turn off preserving, call **setSort()** with *null*. +::: + +### Example + +~~~jsx {7-12} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// sort the cards in ascending order by the "label" parameter +board.setSort({ + by: (obj) => obj.label, // or by: "label" + dir: "asc", + columnId: "backlog", + preserve: false +}); +~~~ + +**Change log:** The method was added in v1.2 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md new file mode 100644 index 0000000..05b8005 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: setTheme() +title: setTheme Method +description: You can learn about the setTheme method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# setTheme() + +### Description + +@short: Allows you to change the Kanban theme on the fly (reinitializes the component). + +### Usage + +~~~jsx {} +setTheme({ + name?: string, // "material" (default) | "willow" | "willow-dark" + fonts?: boolean +}): void; +~~~ + +### Parameters + +- `name` - (optional) the theme to apply to the Kanban board. There are three themes available: + - "material" (*default*) + - "willow" + - "willow-dark" +- `fonts` - (optional) toggles loading of fonts from the CDN (wxi font). + +:::tip +You can set the initial theme using the [`theme`](api/config/js_kanban_theme_config.md) property. +::: + +### Example + +~~~jsx {6} +// create Kanban +const board = new kanban.Kanban("#root", { + // initial configuration parameters +}); +// apply the "willow" theme +board.setTheme({ name: "willow", font: false }); +~~~ + +**Change log:** This method was introduced in v1.6 + +**Related articles:** [Stylization](guides/stylization.md) + +**Related sample:** [Kanban. Changing a theme via the CSS class](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md new file mode 100644 index 0000000..29d0b4c --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: undo() +title: undo Method +description: You can learn about the undo method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# undo() + +### Description + +@short: Reverts the last operation in Kanban + +:::info +The `undo()` method works only when the [`history: true`](api/config/js_kanban_history_config.md) configuration is enabled! +::: + +### Usage + +~~~jsx {} +undo(): void; +~~~ + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// steps back one action in the Kanban's history +board.undo(); +~~~ + +**Change log:** The method was introduced in v1.3 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md new file mode 100644 index 0000000..923491e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md @@ -0,0 +1,37 @@ +--- +sidebar_label: unselectCard() +title: unselectCard Method +description: You can learn about the unselectCard method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# unselectCard() + +### Description + +@short: Deselects card(s) based on their ID + +### Usage + +~~~jsx {} +unselectCard({ id: string | number }): void; +~~~ + +:::info +Calling the **unselectCard()** method without any parameters will clear the selection of all cards +::: + +### Parameters + +- `id` - (required) the ID of the card to be deselected + +### Example + +~~~jsx {7} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// deselect the card with ID 1 +board.unselectCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md new file mode 100644 index 0000000..ed50b2d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateCard() +title: updateCard Method +description: You can learn about the updateCard method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# updateCard() + +### Description + +@short: Modifies the card data using its ID + +### Usage + +~~~jsx {} +updateCard({ + id: string | number, + card?: object, + replace?: boolean +}): void; +~~~ + +### Parameters + +- `id` - (required) the ID of the card to update +- `card` - (optional) the new data object for the card. You can find the complete list of card parameters [**here**](api/config/js_kanban_cards_config.md) +- `replace` - (optional) controls whether to completely replace the existing data + + :::note + Setting the `replace` parameter to *true* will overwrite the old data entirely with the new one. If not set or false, only the provided fields will be updated. + ::: + +### Example + +~~~jsx {7-16} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// update card data with the 1 ID +board.updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*other parameters*/ + }, + replace: true +}); +~~~ + +**Change log**: +- The **id** and **card** parameters were added in v1.1 +- The **replace** parameter was added in v1.3 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md new file mode 100644 index 0000000..a62444d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateColumn() +title: updateColumn Method +description: You can learn about the updateColumn method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# updateColumn() + +### Description + +@short: Modifies the data of a column using its ID + +### Usage + +~~~jsx {} +updateColumn({ + id: string | number, + column?: object, + replace?: boolean +}): void; +~~~ + +### Parameters + +- `id` - (required) the unique identifier of the column to update +- `column` - (optional) an object containing the new data for the column. You can find the complete list of **column** parameters [**here**](api/config/js_kanban_columns_config.md) +- `replace` - (optional) determines whether to completely replace the existing data + + :::note + Setting `replace` to *true* will overwrite the old data entirely with the new data. If omitted or set to false, only the specified values will be updated. + ::: + +### Example + +~~~jsx {7-16} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// update column data with the "backlog" ID +board.updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +**Change log**: +- The **id** and **column** parameters were introduced in v1.1 +- The **replace** parameter was introduced in v1.3 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md new file mode 100644 index 0000000..e54d4f2 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md @@ -0,0 +1,62 @@ +--- +sidebar_label: updateComment() +title: updateComment Method +description: You can learn about the updateComment method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# updateComment() + +### Description + +@short: Modify a card comment by its ID + +### Usage + +~~~jsx {} +updateComment({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### Parameters + +- `id` - (optional) the ID of the comment that needs to be updated +- `cardId` - (required) the ID of the card containing the comment to update +- `comment` - (required) an object defining the updated comment details. This can include: + - `id` - (optional) the ID of the comment being updated + - `cardId` - (optional) the ID of the card where the updated comment will be placed + - `text` - (optional) the new text content of the comment + - `date` - (optional) the date associated with the updated comment + - `html` - (optional) the HTML content for the updated comment. To show HTML instead of plain text, make sure the `html` property is enabled in the [`editorShape`](/api/config/js_kanban_editorshape_config/#--parameters-for-a-comments-type) configuration + +### Example + +~~~jsx {7-17} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// update comment +board.updateComment({ + id: 1, + cardId: 1, + comment: { + id: 2, + cardId: 4, + text: "", + date: new Date("01/08/2021"), + html: "Updated comment" + } +}); +~~~ + +**Change log:** This method was introduced in version 1.4 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md new file mode 100644 index 0000000..bb43aef --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md @@ -0,0 +1,55 @@ +--- +sidebar_label: updateRow() +title: updateRow Method +description: You can learn about the updateRow method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# updateRow() + +### Description + +@short: Modifies the data of a row by its ID + +### Usage + +~~~jsx {} +updateRow({ + id: string | number, + row?: object, + replace?: boolean +}): void; +~~~ + +### Parameters + +- `id` - (required) the identifier of the row you want to update +- `row` - (optional) an object containing the new data for the row. You can find the complete list of **row** parameters [**here**](api/config/js_kanban_rows_config.md) +- `replace` - (optional) controls whether the existing data is fully replaced or partially updated + + :::note + Setting the `replace` parameter to *true* will completely overwrite the old data with the new one. If it's false or omitted, only the specified values will be updated. + ::: + +### Example + +~~~jsx {8-15} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// update row data with the "feature" ID +board.updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +**Change log**: +- The **id** and **row** parameters were added in v1.1 +- The **replace** parameter was added in v1.3 \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md new file mode 100644 index 0000000..004e6cf --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md @@ -0,0 +1,28 @@ +--- +sidebar_label: destructor() +title: destructor Method +description: You can learn about the destructor method of Toolbar in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# destructor() + +### Description + +@short: Clears all HTML elements of the Toolbar and detaches any associated events. + +### Usage + +~~~jsx {} +destructor(): void; +~~~ + +### Example + +~~~jsx {6} +// create Kanban +const board = new kanban.Kanban("#root", {}); +// create Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// remove Toolbar +toolbar.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md new file mode 100644 index 0000000..86a0aa4 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: setConfig() +title: setConfig Method +description: You can learn about the setConfig method of Toolbar in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# setConfig() + +### Description + +@short: Updates the Toolbar with new configuration settings. + +### Usage + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### Parameters + +- `config` - (required) an object containing the Toolbar configuration. Check out the full list of properties [here](api/overview/main_overview.md#toolbar-properties) + +:::note +Only the parameters you provide will be updated. +::: + +### Example + +~~~jsx {6-8} +// create Kanban +const board = new kanban.Kanban("#root", {}); +// create Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// update Toolbar configuration +toolbar.setConfig({ + items: ["search", "spacer", "sort"] +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md new file mode 100644 index 0000000..dea560e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: setLocale() +title: setLocale Method +description: You can learn about the setLocale method of Toolbar in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# setLocale() + +### Description + +@short: Updates the Toolbar of Kanban with a new locale + +### Usage + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### Parameters + +- `null` - (optional) resets the Toolbar back to the default locale (*English*) +- `locale` - (optional) an object containing the new locale data to apply to the Toolbar + +:::info +The **Toolbar** in Kanban is a standalone component. To change the locale for the Toolbar only, use the `toolbar.setLocale()` method. Calling `toolbar.setLocale()` without any arguments (or with *null*) will reset the Toolbar to its default locale. For changing the locale of the Kanban board itself, use the [`kanban.setLocale()`](api/methods/js_kanban_setlocale_method.md) method. +::: + +### Example + +~~~jsx {8} +// create Kanban +const board = new kanban.Kanban("#root", {}); +// create Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// apply the "de" locale to Kanban +board.setLocale(de); +// apply the "de" locale to the Toolbar +toolbar.setLocale(de); +~~~ + +**Change log:** The **api** parameter was deprecated in v1.6 + +**Related articles:** [Localization](guides/localization.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md new file mode 100644 index 0000000..0a33c5b --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: Common settings +title: Common settings +description: Here’s an overview of the common settings for JavaScript Kanban in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, check out the API reference, try sample code and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# Common settings + +| Name | Description | +| --------------------------------------------- | -------------------------------------------------- | +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/events_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/events_overview.md new file mode 100644 index 0000000..7b721c8 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/events_overview.md @@ -0,0 +1,39 @@ +--- +sidebar_label: Events overview +title: Events Overview +description: Explore the Events overview for JavaScript Kanban in the DHTMLX JavaScript Kanban library documentation. Check out developer guides and API references, experiment with code samples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# Events overview + +| Name | Description | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md new file mode 100644 index 0000000..c3319d1 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: Event Bus methods +title: Event Bus Methods +description: Here’s an overview of the Internal Event Bus methods for JavaScript Kanban, found in the DHTMLX JavaScript Kanban library documentation. You’ll find developer guides, API references, code samples, live demos, and a free 30-day trial version of DHTMLX Kanban. +--- + +# Event Bus methods + +| Name | Description | +| -------------------------------------------------------- | ----------------------------------------------------------- | +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md new file mode 100644 index 0000000..74ee7e3 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: Export methods +title: Export methods +description: The documentation for the DHTMLX JavaScript Kanban library includes an overview of Internal Export methods. It offers developer guides, API references, code samples, live demos, and a free 30-day trial of DHTMLX Kanban. +--- + +# Export methods + +| Name | Description | +| -------------------------------------------- | -------------------------------------------------- | +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md new file mode 100644 index 0000000..3982503 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md @@ -0,0 +1,16 @@ +--- +sidebar_label: RestDataProvider methods +title: RestDataProvider methods +description: You can have an Internal RestDataProvider methods overview of JavaScript Kanban in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# RestDataProvider methods + +| Name | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------------ | +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md) | +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md new file mode 100644 index 0000000..41f4a1f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: State methods +title: State methods +description: Here’s a quick overview of Internal State methods in the JavaScript Kanban documentation for the DHTMLX JavaScript Kanban library. Check out developer guides, API references, try sample code and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# State methods + +| Name | Description | +| -------------------------------------------------------- | ------------------------------------------------------------ | +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/main_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/main_overview.md new file mode 100644 index 0000000..95389ca --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/main_overview.md @@ -0,0 +1,225 @@ +--- +sidebar_label: API overview +title: API Overview +description: Here is an overview of the JavaScript Kanban API found in the DHTMLX JavaScript Kanban library documentation. Explore developer guides, API references, try code samples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# API overview + +## Kanban constructor + +~~~js +new kanban.Kanban("#root", { + // configuration parameters +}); +~~~ + +**Parameters**: + +- the HTML container (specified by the container's ID) +- an object containing configuration options ([see details](#kanban-properties)) + +## Toolbar constructor + +~~~js +new kanban.Toolbar("#toolbar", { + // configuration parameters +}); +~~~ + +**Parameters**: + +- the HTML container (specified by the container's ID) +- an object containing configuration options ([see details](#toolbar-properties)) + +## Kanban methods + +| Name | Description | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md) | +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | + +## Kanban internal API + +### Event Bus methods + +| Name | Description | +| --------------------------------------------------------- | ----------------------------------------------------------- | +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | + +### Export methods + +| Name | Description | +| -------------------------------------------- | -------------------------------------------------- | +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | + +### State methods + +| Name | Description | +| --------------------------------------------------------- | ------------------------------------------------------------ | +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | + +## Kanban events + +| Name | Description | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addlink_event.md) | @getshort(../events/js_kanban_addlink_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deletelink_event.md) | @getshort(../events/js_kanban_deletelink_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | + +## Kanban properties + +| Name | Description | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | + +## Toolbar methods + +| Name | Description | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | + +## Toolbar properties + +| Name | Description | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | + +## Common settings + +| Name | Description | +| :------------------------------------------ | :------------------------------------------------ | +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | + +## RestDataProvider API + +### RestDataProvider methods + +| Name | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------------ | +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md) | +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | + +### RestDataProvider routes + +| Name | Description | +| ----------------------------------------------------------- | ------------------------------------------------------ | +| [GET `/cards`](api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | +| [GET `/columns`](api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | +| [GET `/links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_links_route.md) | +| [GET `/rows`](api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | +| [GET `/users`](api/provider/rest_routes/get_routes/js_kanban_get_users_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_users_route.md) | +| [GET `/uploads`](api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | +| [POST `/cards`](api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | +| [POST `/cards/{cardId}/comments`](api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | +| [POST `/cards/{cardId}/vote`](api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | +| [POST `/columns`](api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | +| [POST `/links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_links_route.md) | +| [POST `/rows`](api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | +| [POST `/uploads`](api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | +| [PUT `/cards`](api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | +| [PUT `/cards/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | +| [PUT `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | +| [PUT `/columns`](api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | +| [PUT `/columns/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | +| [PUT `/rows`](api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | +| [PUT `/rows/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | +| [DELETE `/cards`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | +| [DELETE `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | +| [DELETE `/cards/{cardId}/vote`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | +| [DELETE `/columns`](api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | +| [DELETE `/links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | +| [DELETE `/rows`](api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md new file mode 100644 index 0000000..4cfa219 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md @@ -0,0 +1,45 @@ +--- +sidebar_label: Methods overview +title: Methods Overview +description: Here’s a Methods overview for JavaScript Kanban in the DHTMLX JavaScript Kanban library documentation. Check out developer guides and API references, explore code examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# Methods overview + +| Name | Description | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md) | +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md new file mode 100644 index 0000000..0a39a5b --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md @@ -0,0 +1,31 @@ +--- +sidebar_label: Properties overview +title: Properties Overview +description: Explore the Properties overview of JavaScript Kanban in the DHTMLX JavaScript Kanban library documentation. Check out developer guides and API references, experiment with code samples and live demos, and download a free 30-day trial version of DHTMLX Kanban. +--- + +# Kanban properties overview + +For setting up the **Kanban**, see the [Configuration](guides/configuration.md) section. + +| Name | Description | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md new file mode 100644 index 0000000..401b1d2 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md @@ -0,0 +1,200 @@ +--- +sidebar_label: REST routes overview +title: REST routes overview +description: You can find an overview of Internal RestDataProvider routes for JavaScript Kanban in the DHTMLX JavaScript Kanban library documentation. Explore developer guides and API references, experiment with code samples and live demos, and download a free 30-day trial version of DHTMLX Kanban. +--- + +# REST routes overview + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This page lists all REST routes along with brief descriptions and links to detailed pages.
It’s a good idea to check out [Working with Server](guides/working_with_server.md) before exploring the individual routes. + +--- + +For easy navigation, you can use either the tabs below or the side menu: +- The side menu organizes routes by HTTP methods +- The tabs below help you quickly identify which routes correspond to different operations + +
+ + +

These routes handle operations related to cards:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP methodRouteDescription
`GET` /cardsRetrieves all cards and returns a JSON object containing an array of card objects
`POST` /cardsAdds a new card and returns a JSON object with the new card’s ID
`PUT` /cardsUpdates a specific card’s data and returns an empty JSON object
`PUT` /cards/id/moveMoves cards to a designated position
`DELETE` /cardsRemoves a card’s data
+
+ + +

These routes cover operations on rows (swimlanes):

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP methodRouteDescription
`GET` /rowsRetrieves all rows and returns a JSON object with an array of swimlane data objects
`POST` /rowsAdds a new row and returns a JSON object containing the row ID
`PUT` /rowsUpdates a specific row’s data and returns an empty JSON object
`PUT` /rows/id/moveMoves a row to a specified position
`DELETE` /rowsDeletes data for a row
+
+ + +

These routes handle operations on columns:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP methodRouteDescription
`GET` /columnsRetrieves all columns and returns a JSON object with an array of column data objects
`POST` /columnsAdds a new column and returns a JSON object with the column ID
`PUT` /columnsUpdates data for a specific column and returns an empty JSON object
`PUT` /columns/id/moveMoves a column to a chosen position
`DELETE` /columnsDeletes a column’s data
+
+ + +

These routes are for managing links:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP methodRouteDescription
`GET` /linksRetrieves all links and returns a JSON object with an array of link objects
`POST` /linksCreates a new link and returns a JSON object with the new link ID
`DELETE` /linksDeletes a link’s data
+
+ + +

These routes manage uploads (files sent to the server):

+ + + + + + + + + + + + + + + + + + + + +
HTTP methodRouteDescription
`GET` /uploadsFetches a requested binary file from the server
`POST` /uploadsUploads a binary file to the server and returns a JSON object with its ID, name, and URL
+
+ +
+
\ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md new file mode 100644 index 0000000..e0ecb71 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: Toolbar methods overview +title: Toolbar Methods Overview +description: This section provides an overview of Toolbar methods available in the DHTMLX JavaScript Kanban library. Explore developer guides, API references, try out examples and live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# Toolbar methods overview + +| Name | Description | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md new file mode 100644 index 0000000..4a70efd --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: Toolbar properties overview +title: Toolbar Properties Overview +description: You can have a Toolbar Properties overview of JavaScript Kanban in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Toolbar properties overview + +For setting up the **Toolbar**, take a look at the [Configuration](guides/configuration.md#toolbar) section. + +| Name | Description | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md new file mode 100644 index 0000000..8d509b2 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getCards() +title: getCards REST Method +description: You can learn about the getCards REST method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# getCards() + +### Description + +@short: Retrieves a promise containing the cards data + +:::info +The **getCards()** method is part of the **RestDataProvider** service designed for server interactions +::: + +### Usage + +~~~jsx {} +getCards(): promise; +~~~ + +### Returns + +The **getCards()** method initiates a **GET** request to the server and returns a **promise** that resolves with the cards data + +### Example + +~~~jsx {2,5} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**Related articles:** [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md new file mode 100644 index 0000000..24f9cb3 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getColumns() +title: getColumns REST Method +description: You can learn about the getColumns REST method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# getColumns() + +### Description + +@short: Retrieves a promise containing the columns data + +:::info +The **getColumns()** method belongs to the **RestDataProvider** service, which is designed to handle server interactions. +::: + +### Usage + +~~~jsx {} +getColumns(): promise; +~~~ + +### Returns + +The **getColumns()** method makes a **GET** request to the server and returns a **promise** that resolves with the columns data. + +### Example + +~~~jsx {2,6} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**Related articles:** [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md new file mode 100644 index 0000000..895b781 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: getLinks() +title: getLinks REST Method +description: You can learn about the getLinks REST method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# getLinks() + +### Description + +@short: Retrieves a promise containing the links data + +:::info +The **getLinks()** method is included in the **RestDataProvider** service, which is designed for server interactions +::: + +### Usage + +~~~jsx {} +getLinks(): promise; +~~~ + +### Returns + +The **getLinks()** method performs a **GET** request to the server and returns a **promise** that resolves with the links data. + +### Example + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), +]).then(([cards, columns, links]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links + }); + board.api.setNext(restProvider); +}); +~~~ + +**Change log:** This method was introduced in version 1.5 + +**Related articles:** [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md new file mode 100644 index 0000000..fa52eab --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getRows() +title: getRows REST Method +description: You can learn about the getRows REST method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# getRows() + +### Description + +@short: Retrieves a promise containing the rows data + +:::info +The **getRows()** method is part of the **RestDataProvider** service designed for server interactions +::: + +### Usage + +~~~jsx {} +getRows(): promise; +~~~ + +### Returns + +The **getRows()** method makes a **GET** request to the server and returns a **promise** that resolves with the rows data + +### Example + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type" + }); + board.api.setNext(restProvider); +}); +~~~ + +**Related articles:** [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md new file mode 100644 index 0000000..258b87b --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md @@ -0,0 +1,60 @@ +--- +sidebar_label: getUsers() +title: getUsers REST Method +description: You can learn about the getUsers REST method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# getUsers() + +### Description + +@short: Retrieves a promise containing the users data + +:::info +The **getUsers()** method belongs to the **RestDataProvider** service designed for server communication +::: + +### Usage + +~~~jsx {} +getUsers(): promise; +~~~ + +### Returns + +The **getUsers()** method makes a **GET** request to the server and returns a **promise** that resolves with the users data + +### Example + +~~~jsx {2,8,21} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows(), + restProvider.getUsers(), +]).then(([cards, columns, rows, users]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +**Change log:** The method was introduced in v1.3 + +**Related articles:** [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md new file mode 100644 index 0000000..8bfa5ad --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md @@ -0,0 +1,113 @@ +--- +sidebar_label: send() +title: send() Method +description: You can learn about the send() method in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# send() + +### Description + +@short: Sends an HTTP request to the server and returns a promise, which may include data depending on the request. + +All communication with the server happens through the **send()** method, which is part of the [**RestDataProvider**](guides/working_with_server.md/#restdataprovider) service. + +### Usage + +~~~js +send( + url: string, + method: "GET" | "POST" | "PUT" | "DELETE" | string, + data?: object, + headers?: object, +): promise; +~~~ + +### Parameters + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `url` | string | *Required*. The server endpoint where the request is sent. | +| `method` | string | *Required*. The HTTP method to use (GET, POST, PUT, DELETE). | +| `data` | object | *Optional*. Parameters to send along with the request. By default, parameters from the triggered event are sent, but you can add extra ones with a custom object. See the [Example](#examples) below. | +| `headers` | object | *Optional*. The default header is **Content-Type** set to *application/json*. Additional headers can be included via the **customHeaders** parameter. See the [Example](#examples) below. | + +### Response + +This method returns a promise that may include data depending on the request type. + +The promise resolves on a successful request. If the request fails, an error is thrown. + +You can customize the response handling. To manage errors, use the **catch** method on the returned promise. + +~~~jsx +restDataProvider.send(url, method, data) +.then(data => { + ... // success: handle the data +}) +.catch(err => { + ... // error handling +}); +~~~ + +### Examples + +This example shows how to send a request with extra parameters beyond the defaults: + +~~~jsx {14-20} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + //configuration parameters + }); + + board.api.on("add-card", obj => { + obj.custom = "custom prop"; + restProvider.send(`cards`, "POST", obj).then(data => { + board.api.parse({ cards: data }); + return Promise.resolve(); + }); + }); + + board.api.setNext(restProvider); +}); +~~~ + +Here’s how you can add extra headers when using the **send()** method: + +~~~js +const customHeaders = { + "Authorization": "Bearer", + "Custom header": "some value", +}; + +board.api.on("add-cards", obj => { + restDataProvider.send("cards", "POST", obj, customHeaders); +}); +~~~ + +Alternatively, you can override RestDataProvider to add headers, giving you more control over the data sent to the server: + +~~~jsx {3-8} +const url = "https://some_backend_url"; + +class MyDataProvider extends RestDataProvider { + send(url, method, data, headers) { + headers = { ...headers, "SomeToken": "abc" }; + return super.send(url, method, data, headers); + } +} + +board.api.setNext(new MyDataProvider(url)); +~~~ + +--- + +**Related articles:** [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md new file mode 100644 index 0000000..48ce8d8 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md @@ -0,0 +1,44 @@ +--- +sidebar_label: DELETE /cards/{id}/comments/{id} +title: DELETE /cards/{cardId}/comments/{commentId} +description: You can learn about the DELETE /cards/{cardId}/comments/{commentId} REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# DELETE `/cards/{cardId}/comments/{commentId}` + +### Description + +@short: Deletes a comment from a card + +This route processes an **HTTP DELETE** request sent to the `cards/{cardId}/comments/{commentId}` endpoint. + +### Path parameters + +The following parameters are included in the request URL: + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `cardId` | number | *Required*. The ID of the card from which the comment will be deleted. | +| `commentId` | number | *Required*. The ID of the comment that needs to be removed. | + +### Payload + +No payload is needed for this request. + +### Response + +The server responds with a JSON object containing the user ID of the person who deleted the comment. + +Example: + +~~~json +{ + "id": 4 +} +~~~ + +The HTTP status code indicates whether the request was successful (response.status == 200) or if it failed (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md new file mode 100644 index 0000000..7e5a270 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /cards +title: DELETE /cards +description: You can learn about the DELETE /cards REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# DELETE `/cards` + +### Description + +@short: Removes data from a card + +This route processes an **HTTP DELETE** request sent to the `/cards/{id}` endpoint. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The ID of the card to be removed.| + +### Payload + +No payload needs to be sent. + +### Response + +No content is returned. The HTTP status code indicates the outcome: success if the status is 200, or failure if it’s 500. + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md new file mode 100644 index 0000000..22ab515 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md @@ -0,0 +1,43 @@ +--- +sidebar_label: DELETE /cards/{id}/vote +title: DELETE /cards/{cardId}/vote +description: You can learn about the DELETE /cards/{cardId}/vote REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# DELETE `/cards/{cardId}/vote` + +### Description + +@short: This endpoint removes a vote from a specified card and responds with a JSON object containing the user ID who removed the vote. + +This route processes an **HTTP DELETE** request sent to the `/cards/{cardId}/vote` URL. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `cardId` | number | *Required*. The ID of the card from which the vote will be removed.| + +### Payload + +No payload is necessary for this request. + +### Response + +The response returns a JSON object with the user ID that removed the vote. + +Example: + +~~~json +{ + "id": 1 +} +~~~ + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md new file mode 100644 index 0000000..ce8df1d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /columns +title: DELETE /columns +description: You can learn about the DELETE /columns REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# DELETE `/columns` + +### Description + +@short: Removes a column's data + +This route processes the **HTTP DELETE** request sent to the `/columns/{id}` endpoint. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The ID of the column to be removed.| + +### Payload + +No payload is necessary. + +### Response + +No content is returned. The HTTP status code indicates the outcome: success with status 200 or failure with status 500. + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md new file mode 100644 index 0000000..cc6c2fc --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: DELETE /links +title: DELETE /links +description: You can learn about the DELETE /links REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# DELETE `/links` + +### Description + +@short: Removes a link's data + +This route processes an **HTTP DELETE** request sent to the `/links/{id}` endpoint. + +### Path parameters + +The following parameter should be included in the request URL: + +| Name | Type | Description | +| ---- | ------- | ----------- | +| `id` | number | *Required*. The identifier of the link to be removed. | + +### Payload + +No payload is necessary. + +### Response + +No content is returned. The HTTP status code indicates whether the operation was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: +- [Working with server](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md new file mode 100644 index 0000000..5242b69 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /rows +title: DELETE /rows +description: You can learn about the DELETE /rows REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# DELETE `/rows` + +### Description + +@short: Removes data from a row (swimlane) + +This route processes the **HTTP DELETE** request sent to the `/rows/{id}` endpoint. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The ID of the row to delete.| + +### Payload + +No payload needs to be sent. + +### Response + +No content is returned. The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md new file mode 100644 index 0000000..cffe3cb --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md @@ -0,0 +1,81 @@ +--- +sidebar_label: GET /cards +title: GET /cards +description: Explore the GET /cards REST route in the DHTMLX JavaScript Kanban library documentation. Check out developer guides, API references, sample code, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# GET `/cards` + +### Description + +@short: Retrieves data for all cards and returns a JSON object containing an array of card objects. + +This route processes an **HTTP GET** request sent to the `/cards` endpoint. + +### Payload + +No payload is needed. + +### Response + +The route responds with a JSON object that includes an array of all card objects. + +Example: + +~~~json +[ + { + "id": 4, + "label": "Set the tasks priorities", + "description": "", + "column": 2, + "row": 1, + "start_date": "2018-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, + { + "id": 5, + "label": "Custom icons", + "description": "", + "column": 2, + "row": 2, + "start_date": "2019-01-01T00:00:00Z", + "end_date": null, + "progress": 0, + "attached": [], + "color": "#65D3B3", + "users": [] + }, + { + "id": 6, + "label": "Integration with Gantt", + "description": "", + "column": 2, + "row": 2, + "start_date": "2020-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, +] +~~~ + +:::note +The start and end dates for events must follow the ISO format **yyyy-MM-dd'T'HH:mm:ss.SSSXXX** +::: + +For a different example of the returned object, see [**cards**](api/config/js_kanban_cards_config.md). + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: +- [Working with server](guides/working_with_server.md) +- [getCards()](api/provider/rest_methods/js_kanban_getcards_method.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md new file mode 100644 index 0000000..a504c05 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md @@ -0,0 +1,58 @@ +--- +sidebar_label: GET /columns +title: GET /columns +description: This section covers the GET /columns REST route in the DHTMLX JavaScript Kanban library documentation. It includes developer guides, API reference, code examples, live demos, and a free 30-day trial download of DHTMLX Kanban. +--- + +# GET `/columns` + +### Description + +@short: Retrieves data for all columns and returns a JSON object containing an array of column data objects. + +This route responds to an **HTTP GET** request sent to the `/columns` endpoint. + +### Payload + +No payload needs to be sent. + +### Response + +The response is a JSON object that includes an array of column data objects. + +Example: + +~~~json +[ + { + "id": 1, + "label": "Backlog", + "collapsed": false + }, + { + "id": 2, + "label": "In Progress", + "collapsed": false + }, + { + "id": 3, + "label": "Testing", + "collapsed": false + }, + { + "id": 4, + "label": "Done", + "collapsed": false + } +] +~~~ + +For another example of the returned object, check out [**columns**](api/config/js_kanban_columns_config.md). + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: +- [Working with server](guides/working_with_server.md) +- [getColumns()](api/provider/rest_methods/js_kanban_getcolumns_method.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md new file mode 100644 index 0000000..790e016 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md @@ -0,0 +1,50 @@ +--- +sidebar_label: GET /links +title: GET /links +description: Explore the GET /links REST route in the DHTMLX JavaScript Kanban library documentation. Find developer guides, API references, code samples, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# GET `/links` + +### Description + +@short: Retrieves data for all links and returns a JSON object containing an array of link objects. + +This route processes **HTTP GET** requests sent to the `/links` endpoint. + +### Payload + +No payload is needed. + +### Response + +The response includes a JSON object with an array of all link objects. + +Example: + +~~~json +[ + { + "id": 1, + "source": 2, + "target": 5, + "relation": "relatesTo", + }, + { + "id": 2, + "source": 4, + "target": 9, + "relation": "relatesTo", + }, +] +~~~ + +For another example of the returned object, see [**links**](api/config/js_kanban_links_config.md). + +The HTTP status code indicates success (response.status == 200) or failure (response.status == 500). + +--- + +**Related articles**: +- [Working with server](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md new file mode 100644 index 0000000..7344aea --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md @@ -0,0 +1,48 @@ +--- +sidebar_label: GET /rows +title: GET /rows +description: Explore the GET /rows REST route in the DHTMLX JavaScript Kanban library documentation. Find developer guides, API references, sample code, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# GET `/rows` + +### Description + +@short: Retrieves data for all rows and returns a JSON object containing an array of row (swimlane) data objects. + +This route processes **HTTP GET** requests sent to the `/rows` endpoint. + +### Payload + +No payload is needed. + +### Response + +The response includes a JSON object with an array of row data objects. + +Example: + +~~~json +[ + { + "id": 1, + "label": "Feature", + "collapsed": false + }, + { + "id": 2, + "label": "Task", + "collapsed": false + } +] +~~~ + +For a different example of the returned object, see [**rows**](api/config/js_kanban_rows_config.md). + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: +- [Working with server](guides/working_with_server.md) +- [getRows()](api/provider/rest_methods/js_kanban_getrows_method.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md new file mode 100644 index 0000000..04dade1 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: GET /uploads +title: GET /uploads +description: Explore the GET /uploads REST endpoint in the DHTMLX JavaScript Kanban library documentation. Find developer guides, API references, sample code, live demos, and download a free 30-day trial of DHTMLX Kanban. +--- + +# GET `/uploads` + +### Description + +@short: Retrieves the specified binary file from the server + +This route processes an **HTTP GET** request directed to the `/uploads/{id}/{name}` URL. + +### Path parameters + +The request URL includes the following parameters: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The unique identifier of the file to retrieve.| +| `name` | string | *Required*. The filename of the file being requested.| + +### Payload + +No payload is needed for this request. + +### Response + +The server responds with the requested binary file. + +The HTTP status code indicates the outcome: 200 means success, while 500 indicates an error. + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md new file mode 100644 index 0000000..ea393e5 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: GET /users +title: GET /users +description: You can learn about the GET /users REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# GET `/users` + +### Description + +@short: Retrieves data for all users and returns a JSON object containing an array of user objects. + +This route processes an **HTTP GET** request sent to the `/users` endpoint. + +### Payload + +No payload is necessary. + +### Response + +The response includes a JSON object with an array of user data objects. + +Example: + +~~~json +[ + { + "id": 1, + "label": "Jhon", + "avatar": "https://serv.com/images/jhon.png" + }, + { + "id": 2, + "label": "Ben", + "avatar": "https://serv.com/images/ben.png" + }, + { + "id": 3, + "label": "Alex", + "avatar": "https://serv.com/images/alex.png" + } +] +~~~ + +For another example of the returned object, see [**cardShape**](api/config/js_kanban_cardshape_config.md). + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: +- [Working with server](guides/working_with_server.md) +- [getUsers()](api/provider/rest_methods/js_kanban_getusers_method.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md new file mode 100644 index 0000000..effdeaf --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /cards/{id}/comments +title: POST /cards/{cardId}/comments +description: You can learn about the POST /cards/{cardId}/comments REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# POST `/cards/{cardId}/comments` + +### Description + +@short: Adds one or more new comments to a card and returns a JSON object containing the ID of the newly added comment. + +This route processes **HTTP POST** requests sent to the `/cards/{cardId}/comments` endpoint. + +### Payload + +The server expects a JSON object with the following properties: + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `text` | string | *Required*. The content of the comment. | +| `date` | object | *Required*. The date when the comment was made. | + +Example: + +~~~json +{ + "text": "The comment content", + "date": "2023-05-18T09:13:56.656Z", +} +~~~ + +### Response + +The response includes a JSON object with the ID of the newly added comment. + +Example: + +~~~json +{ + "id": 1 +} +~~~ + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md new file mode 100644 index 0000000..d3c2b82 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md @@ -0,0 +1,51 @@ +--- +sidebar_label: POST /cards +title: POST /cards +description: You can learn about the POST /cards REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# POST `/cards` + +### Description + +@short: Adds a new card and responds with a json object containing the new card ID + +This route processes an **HTTP POST** request sent to the `/cards` endpoint. + +### Payload + +The server expects a json object with the following properties: + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `label` | string | *Required*. The title for the new card. | +| `column` | number | *Required*. The ID of the column where the card will be placed. | +| `row` | number | *Required*. The ID of the row where the card will be positioned. | + +Example: + +~~~json +{ + "label": "New card", + "column": 2, + "row": 1, +} +~~~ + +### Response + +The response returns a json object containing the newly created card ID. + +Example: + +~~~json +{ + "id": 1 +} +~~~ + +The HTTP status code indicates if the request was successful (response.status == 200) or if it failed (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md new file mode 100644 index 0000000..fd0fc9f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md @@ -0,0 +1,35 @@ +--- +sidebar_label: POST /cards/{id}/vote +title: POST /cards/{cardId}/vote +description: You can learn about the POST /cards/{cardId}/vote REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# POST `/cards/{cardId}/vote` + +### Description + +@short: Adds a vote to the specified card and returns a JSON object containing the ID of the user who voted. + +This route processes an **HTTP POST** request sent to the `/cards/{cardId}/vote` endpoint. + +### Payload + +No payload needs to be sent with the request. + +### Response + +The response includes a JSON object with the ID of the user who cast the vote. + +Example: + +~~~json +{ + "id": 1 +} +~~~ + +The HTTP status code indicates the result of the request: 200 means success, while 500 indicates a failure. + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md new file mode 100644 index 0000000..8691ba7 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md @@ -0,0 +1,47 @@ +--- +sidebar_label: POST /columns +title: POST /columns +description: You can learn about the POST /columns REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# POST `/columns` + +### Description + +@short: Creates a new column and returns a JSON object containing the column id. + +This route processes an **HTTP POST** request sent to the `/columns` endpoint. + +### Payload + +The server expects a JSON object with the following property: + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `label` | string | *Required*. The name for the new column to be created.| + +Example: + +~~~json +{ + "label": "New column", +} +~~~ + +### Response + +The response returns a JSON object with the id of the newly created column. + +Example: + +~~~json +{ + "id": 4 +} +~~~ + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md new file mode 100644 index 0000000..4f10857 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md @@ -0,0 +1,54 @@ +--- +sidebar_label: POST /links +title: POST /links +description: You can learn about the POST /links REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# POST `/links` + +### Description + +@short: Adds a new link and returns a JSON object containing the newly created link ID. + +This route processes **HTTP POST** requests sent to the `/links` endpoint. + +### Payload + +The server expects a JSON object with the following properties: + +| Name | Type | Description | +| ----------- | ---------------------- | ----------- | +| `source` | *number* or *string* | *Required*. The ID of the starting point of the link. | +| `target` | *number* or *string* | *Required*. The ID of the ending point of the link. | +| `relation` | *string* | *Required*. Specifies the type of relationship the link represents. | + +Example: + +~~~json +{ + "source": 1, + "target": 2, + "relation": "relatesTo" +} +~~~ + +### Response + +The response returns a JSON object with the ID of the newly created link. + +Example: + +~~~json +{ + "id": 1 +} +~~~ + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: +- [Working with server](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md new file mode 100644 index 0000000..bd8bf92 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /rows +title: POST /rows +description: You can learn about the POST /rows REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# POST /rows + +### Description + +@short: Adds a new row and returns a JSON object containing the row ID. + +This route processes an **HTTP POST** request sent to the **'/rows'** endpoint. + +### Payload + +The server expects a JSON object with the following properties: + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `label` | string | *Required*. The name for the new row to be created.| +| `collapsed` | boolean | *Optional*. Indicates the initial state of the row (swimlane). By default, the row is expanded (value is **false**). If set to **true**, the row is initially collapsed.| + +Example: + +~~~json +{ + "label": "New row", + "collapsed": "true", +} +~~~ + +### Response + +The response includes a JSON object with the newly created row's ID. + +Example: + +~~~json +{ + "id": 2 +} +~~~ + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md new file mode 100644 index 0000000..74284b7 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md @@ -0,0 +1,59 @@ +--- +sidebar_label: POST /uploads +title: POST /uploads +description: You can learn about the POST /uploads REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# POST `/uploads` + +### Description + +@short: Uploads a binary file to the server and returns a json object with the file id, name, and url + +This route processes an **HTTP POST** multipart request sent to the `/uploads` endpoint. + +### Payload + +The server expects to receive a binary file through a **multipart/form-data** request. As with all multipart MIME types, the request body should include: + +- the **Content-Disposition** header set to **form-data** + - the **name** attribute set to **upload** + - **filename** - the original name of the uploaded file +- the **Content-Type** header specifying the file data type + +Only one file is allowed per request. + +Example: + +~~~ + +------WebKitFormBoundarySlwgXDBw7kcKSI4p +Content-Disposition: form-data; name="upload"; filename="myImage.png" +Content-Type: image/png + +------WebKitFormBoundarySlwgXDBw7kcKSI4p-- + +~~~ + +### Response + +The route responds with a JSON object containing the file id, name, and url. + +The **isCover** property indicates if the image is a cover image (true) or not (false). + +Example: + +~~~ json +{ + "id":4, + "name":"myImage.png", + "url":"http://localhost:3000/uploads/4/myImage.png", + "isCover":false +} +~~~ + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md new file mode 100644 index 0000000..d22f760 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md @@ -0,0 +1,56 @@ +--- +sidebar_label: PUT /cards/{id}/comments/{id} +title: PUT /cards/{cardId}/comments/{commentId} +description: You can learn about the PUT /cards/{cardId}/comments/{cardId} REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# PUT `/cards/{cardId}/comments/{commentId}` + +### Description + +@short: Updates a comment within a card and returns a JSON object containing the ID of the updated comment. + +This route processes an **HTTP PUT** request sent to the `cards/{cardId}/comments/{commentId}` endpoint. + +### Path parameters + +The following parameters are included in the request URL: + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `cardId` | number | *Required*. The ID of the card containing the comment to update. | +| `commentId` | number | *Required*. The ID of the comment that needs to be updated. | + +### Payload + +The request body should contain a JSON object with the following property: + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `text` | string | *Required*. The updated text of the comment.| + +Example: + +~~~json +{ + "text": "The comment's content" +} +~~~ + +### Response + +The server responds with a JSON object containing the ID of the updated comment. + +Example: + +~~~json +{ + "id": 4 +} +~~~ + +The HTTP status code indicates the outcome of the request: a status of 200 means success, while 500 indicates a failure. + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md new file mode 100644 index 0000000..d60f77a --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md @@ -0,0 +1,93 @@ +--- +sidebar_label: PUT /cards/{id}/move +title: PUT /cards/{id}/move +description: You can learn about the PUT /cards/{id}/move REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# PUT `/cards/{id}/move` + +### Description + +@short: Moves cards to a specified position + +This route processes an **HTTP PUT** request sent to the `cards/{id}/move` endpoint. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The ID of the card to move. If moving multiple cards, set the id to 0.| + +:::info +When moving multiple cards, ensure the `id` is set to 0. If it’s set to any other value, only the card with that specific id will be moved. +::: + +### Payload + +The server expects a JSON object with these properties: + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `id` | number |*Required*. The ID of the card being moved. | +| `columnId` | number | *Required*. The ID of the column where the card will be placed.| +| `rowId` | number | *Required*. The ID of the row where the card will be placed.| +| `before` | number | *Optional*. The ID of the card before which the moved card should be inserted.| +| `batch` | object | *Required for multiselect*. An array of card objects being moved.| + +Example: + +~~~json +{ + "id": 4, + "columnId": 2, + "rowId": 1, + "before": "7" +} +~~~ + +When moving multiple cards, the `batch` property should include an array of all the card objects being moved: + +~~~json +{ + "batch": [ + { + "id": 2, + "columnId": 1, + "rowId": 1, + "before": "1" + }, + { + "id": 7, + "columnId": 1, + "rowId": 1, + "before": "1" + } + ] +} +~~~ + +### Response + +The server responds with a JSON object containing the card ID if a single card was moved, or with an ID of 0 if multiple cards were moved. + +Example: + +~~~json title="Response to the request for the single card operation" +{ + "id": 4 +} +~~~ + +~~~json title="Response to the request for the multiple cards operation" +{ + "id": 0 +} +~~~ + +The HTTP status code indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md new file mode 100644 index 0000000..e9a89c6 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md @@ -0,0 +1,71 @@ +--- +sidebar_label: PUT /cards +title: PUT /cards +description: You can learn about the PUT /cards REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# PUT `/cards` + +### Description + +@short: Updates the details of a specific card and returns an empty JSON object. + +This route processes an **HTTP PUT** request sent to the `/cards/{id}` endpoint. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The unique identifier of the card to update.| + +### Payload + +The server expects a JSON object containing the card details, including both existing and updated properties. + +| Name | Type | Description | +| ------------- | ----------- | ----------- | +| `label` | string | *Required*. The title of the card being updated.| +| `description` | string | *Required*. A description of the card.| +| `column` | number | *Required*. The ID of the column where the card is located.| +| `row` | number | *Required*. The ID of the row where the card is placed.| +| `start_date` | string | *Required*. The start date in ISO format yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `end_date` | string | *Required*. The end date in ISO format yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `progress` | number | *Required*. The progress percentage, ranging from 0 to 100.| +| `attached` | object | *Required*. An array containing information about attached files. Refer to the example in [**cards**](api/config/js_kanban_cards_config.md)| +| `color` | string | *Required*. The HEX color code for the card's top border.| +| `priority` | number | *Required*. The ID representing the card's priority. | +| `users` | object | *Required*. An array with IDs of users assigned to the card. See example in [**cardShape**](api/config/js_kanban_cardshape_config.md)| + +Example: + +~~~json +{ + "card": { + "label": "Drag and drop", + "description": "", + "column": 3, + "row": 1, + "start_date": null, + "end_date": "2018-01-01T00:00:00Z", + "progress": 100, + "attached": [], + "color": "#58C3FE", + "priority": 2, + "users": [] + }, +} +~~~ + +Additional examples of the card object can be found in the [**cards**](api/config/js_kanban_cards_config.md) section. + +### Response + +On success, the server responds with an empty JSON object. + +The HTTP status code indicates the result of the request: 200 for success, or 500 if an error occurs. + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md new file mode 100644 index 0000000..e18ef3f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /columns/{id}/move +title: PUT /columns/{id}/move +description: You can learn about the PUT /columns/{id}/move REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# PUT `/columns/{id}/move` + +### Description + +@short: Moves a column to a specified position + +This route handles an **HTTP PUT** request sent to the `columns/{id}/move` endpoint. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The ID of the column that needs to be moved.| + +### Payload + +The server expects a JSON object containing the following property: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `before` | number | *Optional*. The ID of the column before which the moved column should be inserted.| + +Example: + +~~~json +{ + "before": 3 +} +~~~ + +### Response + +The server responds with a JSON object containing the ID of the column that was moved. + +Example: + +~~~json +{ + "id": 4 +} +~~~ + +The HTTP status code indicates whether the request was successful (response.status == 200) or if it encountered an error (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md new file mode 100644 index 0000000..1d99b43 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /columns +title: PUT /columns +description: You can learn about the PUT /columns REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# PUT `/columns` + +### Description + +@short: Updates the details of a specified column and returns an empty JSON object. + +This route processes **HTTP PUT** requests sent to the `/columns/{id}` endpoint. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The ID of the column to update.| + +### Payload + +The server expects a JSON object containing all the properties of the column, including both unchanged and updated values. + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `label` | string | *Required*. The new name for the column.| +| `collapsed`| boolean | *Optional*. Indicates the column’s initial state: **true** if collapsed, **false** if expanded (default).| + +Example: + +~~~json +{ + "column": { + "label": "Column 1", + "collapsed": false, + } +} +~~~ + +You can find another example of the column object in the [**columns**](api/config/js_kanban_columns_config.md) section. + +### Response + +On success, the server returns an empty JSON object. + +The HTTP status code indicates the result: a status of 200 means the request was successful, while 500 indicates a failure. + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md new file mode 100644 index 0000000..d16a49e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /rows/{id}/move +title: PUT /rows/{id}/move +description: You can learn about the PUT /rows/{id}/move REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# PUT `/rows/{id}/move` + +### Description + +@short: Moves a row to a new position + +This route processes an **HTTP PUT** request sent to the `rows/{id}/move` endpoint. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The identifier of the row to be moved.| + +### Payload + +The server expects a JSON object containing the following property: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `before` | number | *Optional*. The ID of the row that the moved row should be positioned before.| + +Example: + +~~~json +{ + "before": 3 +} +~~~ + +### Response + +The server responds with a JSON object indicating the ID of the row that was moved. + +Example: + +~~~json +{ + "id": 4 +} +~~~ + +The HTTP status code indicates if the request was successful (response.status == 200) or if it failed (response.status == 500). + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md new file mode 100644 index 0000000..f529a80 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /rows +title: PUT /rows +description: You can learn about the PUT /rows REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# PUT `/rows` + +### Description + +@short: Updates the data for a specific row (swimlane) and returns an empty JSON object. + +This route processes an **HTTP PUT** request sent to the `/rows/{id}` endpoint. + +### Path parameters + +The following parameter is included in the request URL: + +| Name | Type | Description | +| ---------- | ----------- | ----------- | +| `id` | number | *Required*. The ID of the row (swimlane) that needs to be updated.| + +### Payload + +The server expects a JSON object containing all properties of the row, including both unchanged and updated values. + +| Name | Type | Description | +| ----------- | ----------- | ----------- | +| `label` | string | *Required*. The name of the row to update.| +| `collapsed` | boolean | *Optional*. Indicates the row's state: **true** if the row is initially collapsed, or **false** if expanded (default).| + +Example: + +~~~json +{ + "row": { + "label": "Row 1", + "collapsed": false, + } +} +~~~ + +For another example of the row object, see the [**rows**](api/config/js_kanban_rows_config.md) section. + +### Response + +If the update is successful, the server returns an empty JSON object. + +The HTTP status code indicates the result of the request: 200 for success and 500 for failure. + +--- + +**Related articles**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/configuration.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/configuration.md new file mode 100644 index 0000000..ed80ec4 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/configuration.md @@ -0,0 +1,577 @@ +--- +sidebar_label: Configuration +title: Configuration +description: You can learn about the configuration in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Configuration + +The *Kanban* board can be customized in both looks and features using its API. There are plenty of parameters to help set things up the way you want: + +- Change how cards look using the [`cardShape`](api/config/js_kanban_cardshape_config.md) property +- Set up which fields appear in the editor with the [`editorShape`](api/config/js_kanban_editorshape_config.md) property +- Adjust how the editor works using the [`editor`](api/config/js_kanban_editor_config.md) property +- Choose how Kanban renders and scrolls with [`renderType`](api/config/js_kanban_rendertype_config.md) and [`scrollType`](api/config/js_kanban_scrolltype_config.md) +- Manage Kanban’s history through the [`history`](api/config/js_kanban_history_config.md) property +- Personalize card templates using [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) + - *For more details, check out the [**Customization**](guides/customization.md) section* +- Set the language with the [`locale`](api/config/js_kanban_locale_config.md) property + - *For more about this, see the [**Localization**](guides/localization.md) section* +- Load cards, columns, rows, and links by passing data to the [`cards`](api/config/js_kanban_cards_config.md), [`columns`](api/config/js_kanban_columns_config.md), [`rows`](api/config/js_kanban_rows_config.md), and [`links`](api/config/js_kanban_links_config.md) properties + - *More info can be found in the [**Working with data**](guides/working_with_data.md) section* + +## Cards + +On a Kanban board, *cards* are organized into *columns* and *rows*. The [`cardShape`](api/config/js_kanban_cardshape_config.md) property lets you decide what fields appear on each card. Some common fields you can toggle on or off include: + +- Card label, using `label: boolean` +- Card description, using `description: boolean` + + :::tip + The **label** and **description** fields can be edited right in the Kanban editor. If you turn these on, matching inputs will show up in the editor automatically. To fine-tune these inputs, you can use the [**text** and **textarea**](#text-and-textarea-types) field types. + ::: + +- Card progress, with `progress: boolean` + + :::tip + The **progress** field is controlled through the Kanban editor as well. If enabled, a matching control shows up in the editor. To customize it, use the [**progress**](#progress-type) type. + ::: + +- Start date, using `start_date: boolean` +- End date, using `end_date: boolean` + + :::tip + Both **start date** and **end date** fields are managed through the editor. If you enable them, controls appear automatically. To configure them, use the [**date**](#date-and-daterange-types) type. + ::: + +- Card context menu, with `menu: boolean` +- Card attachment, using `attached: boolean` + + :::tip + You can attach files to a card using the editor’s field. To set this up, use the [**files**](#files-type) type. + ::: + +- Card color, with `color: boolean` + + :::tip + The color line at the top of a card can be set in the editor. If **color** is enabled, a color picker appears in the editor. To adjust this, use the [**color**](#color-type) type. + ::: + +- Card cover image, with `cover: boolean` +- Card comments, using `comments: boolean` +- Confirmation dialog for card deletion, with `confirmDeletion: boolean` +- Card voting, using `votes: boolean | { show: boolean, clicable: true }` +- Card assignment (users), with `users: boolean | { show: boolean, values: object, maxCount: number | false }` + + :::tip + Assigning users to a card is done through the editor. To assign one user, use the [**combo** or **select**](#combo-select-and-multiselect-types) types. For multiple users, go with [**multiselect**](#combo-select-and-multiselect-types). + ::: + +- Card priority, with `priority: boolean | { show: boolean, values: object }` + + :::tip + Priorities can be managed through the editor too. With **priority** enabled, a control appears in the editor. Only [**combo** or **select**](#combo-select-and-multiselect-types) types work for this. + ::: + +- *Custom fields*, using `headerFields: [ { key: string, label: string, css: string } ]` + +~~~jsx {12-35,42} +const users = [ // users data + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // card priority data + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardShape = { // cards settings + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + priority: { + show: true, + values: cardPriority + }, + users: { + show: true, + values: users + }, + headerFields: [ + { + key: "sprint", + label: "Custom field", + css: "custom_css_class" + } + ] +}; + +new kanban.Kanban("#root", { + // cards data + columns, + cards, + // cards settings + cardShape +}); +~~~ + +:::note +If you don’t set up card fields using [`cardShape`](api/config/js_kanban_cardshape_config.md), Kanban will use its [**defaultCardShape**](api/config/js_kanban_cardshape_config.md#default-config) settings! +::: + +## Editor + +:::info +The Editor can show up as a **sidebar** or a **modal window**. Use the [`editor.placement`](api/config/js_kanban_editor_config.md) property to pick which one! +::: + +The Kanban *Editor* is where card details are managed. To set up which fields show up in the editor, use the [`editorShape`](api/config/js_kanban_editorshape_config.md) property. Here are the editor field types you can use: + +- [**combo**, **select**, and **multiselect**](#combo-select-and-multiselect-types) +- [**color**](#color-type) +- [**text** and **textarea**](#text-and-textarea-types) +- [**progress**](#progress-type) +- [**files**](#files-type) +- [**date** and **dataRange**](#date-and-daterange-types) +- [**comments**](#comments-type) +- [**links**](#links-type) + +### Combo, Select and Multiselect types + +Editor fields for **combo**, **select**, and **multiselect** are set up like this: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", // or "select" and "multiselect" + key: "priority", // the "priority" key is used when configuring the "cardShape" property + label: "Priority", + values: [ + { id: 1, label: "high" }, + { id: 2, label: "medium" }, + { id: 3, label: "low" } + ] + }, + // settings of other fields + ] +}); +~~~ + +:::info +For **"multiselect"** and **"combo"** fields, you can also add a preview image using the **avatar** property: + +~~~jsx {3,9,13} +editorShape: [ + { + type: "multiselect", // or "combo" + key: "users", // the "users" key is used when configuring the "cardShape" property + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + { + id: 2, label: "John", + avatar: "preview_image_path_2.png" + } + ] + }, + // settings of other fields +] +~~~ + +[**Kanban. Limiting assignments to one user only**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban) +::: + +### Color type + +To add a **color** picker field in the editor, set it up like this: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "color", + key: "color", // the "color" key is used when configuring the "cardShape" property + label: "Card color", + values: ["#65D3B3", "#FFC975", "#58C3FE"], + config: { + clear: true, + placeholder: "Select color" + } + }, + // settings of other fields + ] +}); +~~~ + +### Text and Textarea types + +To add **text** or **textarea** fields to the editor, use this setup: + +~~~jsx {3-14} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "text", // or "textarea" + key: "label", + label: "Label", + config: { + placeholder: "Type your tips here", + readonly: false, + focus: true, + disabled: false, + inputStyle: "height: 50px;" + } + }, + // settings of other fields + ] +}); +~~~ + +### Progress type + +A **progress** field in the editor can be configured like this: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "progress", + key: "progress", // the "progress" key is used when configuring the "cardShape" property + label: "Progress", + config: { + min: 10, + max: 90, + step: 5 + } + }, + // settings of other fields + ] +}); +~~~ + +### Files type + +To let users attach files, set up a **files** field in one of two ways: + +#### Configuring Upload Url as String + +~~~jsx {4-15} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + { + type: "files", + key: "attached", // the "attached" key is used when configuring the "cardShape" property + label: "Attachment", + uploadURL: url + "/uploads", // specify url as string + config: { + accept: "image/*", // "video/*", "audio/*" + disabled: false, + multiple: true, + folder: false + } + }, + // settings of other fields + ] +}); +~~~ + +#### Configuring Upload Url as Function + +~~~jsx {9-31} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + ...defaultEditorShape, + { + key: "attached", + type: "files", + label: "Files", + uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // token or other headers here + } + }; + + return fetch(url + "/uploads", config) // URL here + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); + } + } + ] +}); +~~~ + +### Date and DateRange types + +To add a **date** field to the editor: + +~~~jsx {3-8} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "date", + key: "start_date", + label: "Start date", + format: "%d/%m/%y" + }, + // settings of other fields + ] +}); +~~~ + +For a **dateRange** field, use: + +~~~jsx {3-11} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "dateRange", + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range", + format: "%d/%m/%y" + }, + // settings of other fields + ] +}); +~~~ + +### Comments type + +To enable **comments** in the editor: + +~~~jsx {3-13} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "comments", + key: "comments", + label: "Comments", + config: { + dateFormat: "%M %d", + placement: "page", // or "editor" + html: true, + confirmDeletion: true + } + }, + // settings of other fields + ] +}); +~~~ + +### Links type + +To let users add **links** in the editor: + +~~~jsx {3-10} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "links", + key: "links", + label: "Links", + config: { + confirmDeletion: true + } + }, + // settings of other fields + ] +}); +~~~ + +### Binding editor fields to card fields + +:::info +To connect an editor field to a card field, set the **key** in the [`editorShape`](api/config/js_kanban_editorshape_config.md) property (like `key: "editor_field_key"`). For built-in fields, that key should be set to *true* in [`cardShape`](api/config/js_kanban_cardshape_config.md). For custom fields, add it to the **headerFields** array. You can also use this key to set initial data for a field. + +~~~jsx {5,13,22,25,33-34,38-39,45-47} +// editor settings +const editorShape = [ + { + type: "text", + key: "label", + label: "Label", + config: { + placeholder: "Enter new label here" + } + }, + { + type: "textarea", + key: "note", + label: "Note", + config: { + placeholder: "Enter usefull note here" + } + } +]; +// cards settings +const cardShape = { + label: true, // a key of built-in field + headerFields: [ + { + key: "note", // a key of custom field + label: "Note" + } + ] +}; +// cards data +const cards = [ + { + label: "Volvo", + note: "It is the swedish car", + column: "backlog" + }, + { + label: "Audi", + note: "It is the german car", + column: "backlog" + } +]; +// create Kanban +new kanban.Kanban("#root", { + editorShape, + cardShape, + cards, + columns + // other configuration parameters +}); +~~~ +::: + +:::note +If you don’t set up editor fields with [`editorShape`](api/config/js_kanban_editorshape_config.md), Kanban uses its [**defaultEditorShape**](api/config/js_kanban_editorshape_config.md#default-config) settings. In this case, default controls and inputs only show up in the editor after you enable the matching card fields using [`cardShape`](api/config/js_kanban_cardshape_config.md). +::: + +### Configuring the editor + +The [`editor`](api/config/js_kanban_editor_config.md) property can be used to tweak how the editor works: + +- Turn on/off autosave with *`editor.autoSave`* +- Set a delay for autosaving via *`editor.debounce`* (only works if ***autoSave: true*** is set) + +~~~jsx {6-9} +// create Kanban +new kanban.Kanban("#root", { + columns, + cards, + editorShape, + editor: { + autoSave: true, + debounce: 2000 + } + // other parameters +}); +~~~ + +## Toolbar + +The Kanban **Toolbar** includes a search bar for finding cards, as well as controls for sorting cards and adding new columns or rows. To show the Toolbar, initialize it in a separate container using **kanban.Toolbar()**. + +~~~jsx {13} +// create Kanban +const board = new kanban.Kanban("#root", { + // data + columns, + cards, + rows, + // card settings + cardShape, + // editor settings + editorShape +}); + +new kanban.Toolbar("#toolbar", { api: board.api }); +~~~ + +Toolbar controls (showing, hiding, or customizing them) are managed through the **items** property: + +~~~jsx {6-51} +// create Kanban +const board = new kanban.Kanban("#root", {...}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { // custom search bar + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", // empty space + "undo", // control to undo the card operations in the history + "redo", // control to redo the card operations in the history + { // custom sort control + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", // control for adding new columns + "addRow", // control for adding new rows + // custom elements + ] +}); +~~~ + +:::tip +To hide Toolbar controls, just remove their strings from the **items** array. +::: + +## Example + +Here’s a snippet that shows how to set up **Cards**, the **Editor**, and the **Toolbar** in Kanban: + + \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/customization.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/customization.md new file mode 100644 index 0000000..714c6d1 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/customization.md @@ -0,0 +1,42 @@ +--- +sidebar_label: Customization +title: Customization +description: You can learn about the customization in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Customization + +Along with configuring Kanban, there are plenty of ways to tweak how it looks and works. You can set up a custom card template, adjust the context menu for cards, columns, and rows, change up the Toolbar’s layout and actions, and use your own CSS styles to give Kanban a personal touch. + +## Custom cards + +If you want your cards to look a certain way, the [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) property comes in handy. This callback function lets you define your own styles and logic for displaying cards in Kanban. Here’s a quick example: + + + +## Custom context menu + +For those times when you want to change up the context menu for cards, columns, or rows, you’ll want to use the [`cardShape`](api/config/js_kanban_cardshape_config.md), [`columnShape`](api/config/js_kanban_columnshape_config.md), and [`rowShape`](api/config/js_kanban_rowshape_config.md) properties. Here’s how you can do it: + + + +## Custom toolbar + +To switch up the Toolbar’s layout and what it can do, the [`items`](api/config/toolbar_items_config.md) property is the one to use. You can list out the controls you want in the array, put them in any order, and change how each one works. + +Check out the snippet below to see how to: + +- rearrange the controls +- set up the searchbar and adjust how it works +- tweak the sort control and its behavior +- add a custom control and set up what it does + + + +## Custom styles + +If you’d like to change how Kanban looks, you can do that by updating the relevant *CSS variables*. For more details, take a look at the [**Stylization**](guides/stylization.md) section. + +Here’s a snippet showing how to apply your own styles to Kanban: + + \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/initialization.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/initialization.md new file mode 100644 index 0000000..3982108 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/initialization.md @@ -0,0 +1,91 @@ +--- +sidebar_label: Initialization +title: Initialization +description: You can learn about the initialization in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Initialization + +This guide walks through the process of adding a Kanban board to a web page, so you can easily bring Kanban functionality into your app. Here’s how to get everything set up and ready to use: + +1. [Include the Kanban source files on a page](#including-source-files). +2. [Create a container for Kanban](#creating-container). +3. [Initialize Kanban with a constructor](#initializing-kanban). + +## Including source files + +First, [download the package](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml) and unzip it somewhere in your project folder. + +To get Kanban working, just include these two files in your HTML: + +- *kanban.js* +- *kanban.css* + +Be sure the paths to the files are correct for your project: + +~~~html title="index.html" + + +~~~ + +## Creating container + +Set up a container for Kanban in your HTML and give it an ID, like *"root"*: + +~~~jsx title="index.html" +
+~~~ + +If you want to add a *Toolbar* along with the Kanban board, set up a separate container for it as well: + +~~~jsx {1} title="index.html" +
// container for Toolbar +
// container for Kanban +~~~ + +## Initializing Kanban + +To get Kanban up and running, use the **kanban.Kanban** constructor. It needs two things: + +- the HTML container (just pass the container’s ID) +- an object with configuration options. [Check out the full list here](#configuration-properties) + +~~~jsx title="index.html" +// create Kanban +new kanban.Kanban("#root", { + // configuration properties +}); +~~~ + +If you’re adding a *Toolbar* too, it gets initialized separately with the **kanban.Toolbar** constructor. The setup is similar: + +- the HTML container (the ID) +- an object with configuration options + +~~~jsx {6-8} title="index.html" +// create Kanban +const board = new kanban.Kanban("#root", { + // configuration properties +}); + +new kanban.Toolbar("#toolbar", { + // configuration properties +}); +~~~ + +:::info +For more details on setting up the Kanban Toolbar, check out the [**Configuration**](guides/configuration.md/#toolbar) section. +::: + +### Configuration properties + +:::note +A complete list of configuration options for **Kanban** is available [**here**](api/overview/properties_overview.md).
+You’ll find all the Toolbar configuration options [**here**](api/overview/toolbar_properties_overview.md). +::: + +## Example + +Here’s a quick example showing how to set up **Kanban** with some starter data: + + \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/integration.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration.md new file mode 100644 index 0000000..2871807 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration.md @@ -0,0 +1,17 @@ +--- +sidebar_label: Integration with DHTML widgets +title: Integration with DHTML widgets +description: You can learn about the integration in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Integration with DHTML widgets + +DHTMLX Kanban works smoothly with other DHTMLX widgets, like [Gantt](https://docs.dhtmlx.com/gantt/), [Scheduler](https://docs.dhtmlx.com/scheduler/), and [To Do List](https://docs.dhtmlx.com/todolist/). Some example setups are shown below. + +## Integration with DHTMLX Gantt and Scheduler + + + +## Integration with DHTMLX To Do List + + \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md new file mode 100644 index 0000000..4a94e8d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md @@ -0,0 +1,388 @@ +--- +sidebar_label: Integration with Angular +title: Integration with Angular +description: You can learn about the integration with Angular in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Integration with Angular + +:::tip +It's helpful to have a basic understanding of **Angular** before jumping in here. If you need a quick refresher, check out the [**Angular documentation**](https://v17.angular.io/docs). +::: + +DHTMLX Kanban works well with **Angular**. There are code samples available that show how to use DHTMLX Kanban in Angular projects. For more details, take a look at the [**Example on GitHub**](https://github.com/DHTMLX/angular-kanban-demo). + +## Creating a project + +:::info +Make sure you have [**Angular CLI**](https://v17.angular.io/cli) and [**Node.js**](https://nodejs.org/en/) installed before getting started. +::: + +To set up a new **my-angular-kanban-app** project, just use Angular CLI with this command: + +~~~json +ng new my-angular-kanban-app +~~~ + +:::note +If you want to follow along with this guide, remember to turn off Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) when setting up your Angular app! +::: + +This command will set up everything you need, so there’s no need to run any extra commands afterwards. + +### Installation of dependencies + +Head into your new app’s directory: + +~~~json +cd my-angular-kanban-app +~~~ + +Next, install the dependencies and start up the dev server. The [**yarn**](https://yarnpkg.com/) package manager works well for this: + +~~~json +yarn +yarn start +~~~ + +Your app should now be running locally (for example, at `http://localhost:3000`). + +## Creating Kanban + +To get started with DHTMLX Kanban, you’ll need the source code. First, stop your app and install the Kanban package. + +### Step 1. Package installation + +Download the [**trial Kanban package**](/how_to_start/#installing-kanban-via-npm-or-yarn) and follow the instructions in the README file. Just a heads up: the trial version works for 30 days. + +### Step 2. Component creation + +Next, set up an Angular component to include Kanban with a Toolbar in your app. Create a **kanban** folder inside **src/app/**, then add a new file called **kanban.component.ts**. + +#### Import source files + +Open up **kanban.component.ts** and import the Kanban source files. Here’s what to keep in mind: + +- If you’re using the PRO version and installed Kanban from a local folder, your import will look like this: + +~~~jsx +import { Kanban, Toolbar } from 'dhx-kanban-package'; +~~~ + +- If you’re using the trial version, the import should be: + +~~~jsx +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +~~~ + +This guide shows how to work with the **trial** version. + +#### Set containers and initialize the Kanban with Toolbar + +To get Kanban and the Toolbar on your page, set up containers and initialize these components using their constructors: + +~~~jsx {1,8-11,15-18,24-31} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", // a template name used in the "app.component.ts" file as + styleUrls: ["./kanban.component.css"], // include the css file + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + // initialize container for Toolbar + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + // initialize container for Kanban + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + // initialize the Kanban component + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + // initialize the Toolbar component + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // other configuration properties + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); // destruct Kanban + this._toolbar.destructor(); // destruct Toolbar + } +} +~~~ + +#### Adding styles + +To make sure Kanban displays properly, add the right styles. You can create a **kanban.component.css** file in **src/app/kanban/** and include these styles for Kanban and its container: + +~~~css title="kanban.component.css" +/* import Kanban styles */ +@import "@dhx/trial-kanban/dist/kanban.css"; + +/* specify styles for initial page */ +html, +body{ + height: 100%; + padding: 0; + margin: 0; +} + +/* specify styles for Kanban and Toolbar container*/ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* specify styles for Kanban container */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### Loading data + +To fill Kanban with data, you’ll need a data set. Create a **data.ts** file in **src/app/kanban/** and add some sample data like this: + +~~~jsx {2,14,37,48} title="data.ts" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Now, open ***kanban.component.ts***. Import your data file and add the data properties to the Kanban configuration object inside `ngOnInit()` like this: + +~~~jsx {2,23,25-27} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // import data +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // initialize data properties + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns, // apply column data + cards, // apply card data + rows, // apply row data + rowKey: "type", + // other configuration properties + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // other configuration properties + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +You can also load data into Kanban using the [`parse()`](/api/methods/js_kanban_parse_method/) method inside the `ngOnInit()` method. + +~~~jsx {2,23,37-42} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // import data +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // initialize data properties + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // other configuration properties + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // other configuration properties + }); + + // apply the data via the parse() method + this._kanban.parse({ + columns, + cards, + rows + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +The `parse(data)` method lets you reload data whenever you need to update it. + +At this point, the Kanban component is good to go. When you add the element to a page, Kanban will initialize with your data. You can also tweak the configuration as needed. For all available options, check out the [Kanban API docs](/api/overview/properties_overview/). + +#### Handling events + +Whenever someone interacts with Kanban, events get fired. You can use these events to react and run your own code. The [full list of events](/api/overview/events_overview/) is available in the docs. + +To handle events, open **kanban.component.ts** and add the following to `ngOnInit()`: + +~~~jsx {5-7} title="kanban.component.ts" +// ... +ngOnInit() { + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + this._kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); +} + +ngOnDestroy(): void { + this._kanban.destructor(); +} +~~~ + +### Step 3. Adding Kanban into the app + +To use the ***KanbanComponent*** in your app, open ***src/app/app.component.ts*** and replace the default code with this: + +~~~jsx {5} title="app.component.ts" +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + template: `` +}) +export class AppComponent { + name = ""; +} +~~~ + +Next, create ***app.module.ts*** in ***src/app/*** and add *KanbanComponent* as shown here: + +~~~jsx {4-5,8} title="app.module.ts" +import { NgModule } from "@angular/core"; +import { BrowserModule } from "@angular/platform-browser"; + +import { AppComponent } from "./app.component"; +import { KanbanComponent } from "./kanban/kanban.component"; + +@NgModule({ + declarations: [AppComponent, KanbanComponent], + imports: [BrowserModule], + bootstrap: [AppComponent] +}) +export class AppModule {} +~~~ + +Finally, open ***src/main.ts*** and update it like this: + +~~~jsx title="main.ts" +import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; +import { AppModule } from "./app/app.module"; +platformBrowserDynamic() + .bootstrapModule(AppModule) + .catch((err) => console.error(err)); +~~~ + +Now you can start the app and see Kanban loaded with your data. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Angular + +That’s it for integrating DHTMLX Kanban with Angular. Feel free to adjust the code to fit your project’s needs. There’s a more advanced example available on [**GitHub**](https://github.com/DHTMLX/angular-kanban-demo). \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_react.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_react.md new file mode 100644 index 0000000..e155d8c --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_react.md @@ -0,0 +1,337 @@ +--- +sidebar_label: Integration with React +title: Integration with React +description: You can learn about the integration with React in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Integration with React + +:::tip +It's helpful to know the basics of [**React**](https://react.dev) before jumping into this guide. If a refresher is needed, the [**React documentation**](https://react.dev/learn) covers all the essentials. +::: + +DHTMLX Kanban works well with **React**. There are some ready-to-use code examples showing how to set up DHTMLX Kanban in a **React** environment. For more details, check out this [**Example on GitHub**](https://github.com/DHTMLX/react-kanban-demo). + +## Creating a project + +:::info +It's a good idea to have [**Vite**](https://vite.dev/) (optional) and [**Node.js**](https://nodejs.org/en/) installed before starting a new project. +::: + +A basic **React** project can be created, or you can use **React with Vite**. The example project here is called **my-react-kanban-app**: + +~~~json +npx create-react-app my-react-kanban-app +~~~ + +### Installation of dependencies + +Move into the new app folder: + +~~~json +cd my-react-kanban-app +~~~ + +Next, install the dependencies and start the development server. Just pick your package manager: + +- For [**yarn**](https://yarnpkg.com/): + +~~~json +yarn +yarn start +~~~ + +- For [**npm**](https://www.npmjs.com/): + +~~~json +npm install +npm run dev +~~~ + +The app will start on localhost, usually at something like `http://localhost:3000`. + +## Creating Kanban + +To get started with DHTMLX Kanban, grab the source code. It's best to stop the app first, then install the Kanban package. + +### Step 1. Package installation + +Download the [**trial Kanban package**](/how_to_start/#installing-kanban-via-npm-or-yarn) and follow the README instructions. The trial version is available for 30 days. + +### Step 2. Component creation + +A React component is needed to add Kanban to the app. Create a new file named ***Kanban.jsx*** in the ***src/*** directory. + +#### Importing source files + +Open ***Kanban.jsx*** and import the Kanban files. There are a couple of options depending on the version: + +- For the PRO version installed from a local folder, the imports look like this: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from 'dhx-kanban-package'; +import 'dhx-kanban-package/dist/kanban.css'; +~~~ + +Depending on the package, you might need to import ***kanban.min.css*** if the files are minified. + +- For the trial version, use these paths: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import "@dhx/trial-kanban/dist/kanban.css"; +~~~ + +This guide shows how to set up the **trial** version. + +#### Setting containers and adding Kanban with Toolbar + +To show Kanban with a Toolbar, create containers for both and initialize them using their constructors: + +~~~jsx {2,6-7,10-11,13-17} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import '@dhx/trial-kanban/dist/kanban.css'; // include Kanban styles + +export default function KanbanComponent(props) { + let toolbar_container = useRef(); // initialize container for Toolbar + let kanban_container = useRef(); // initialize container for Kanban + + useEffect(() => { + // initialize the Kanban component + const kanban = new Kanban(kanban_container.current, {}); + + // initialize the Toolbar component + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, // provide Kanban inner API + // other configuration properties + }); + + return () => { + kanban.destructor(); // destruct Kanban + toolbar.destructor(); // destruct Toolbar + }; + }, []); + + return
+
+
+
+} +~~~ + +#### Adding styles + +To make sure Kanban displays correctly, add some necessary styles for Kanban and its container in the main CSS file: + +~~~css title="index.css" +/* specify styles for initial page */ +html, +body, +#root { + height: 100%; + padding: 0; + margin: 0; +} + +/* specify styles for Kanban and Toolbar container */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* specify styles for Kanban container */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### Loading data + +Kanban needs some data to work with. Make a ***data.js*** file in the ***src/*** directory and add some sample data: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Next, open ***App.js*** and import the data. Then, pass the data into the `` component as **props**: + +~~~jsx {2,5-6} title="App.js" +import Kanban from "./Kanban"; +import { getData } from "./data"; + +function App() { + const { columns, cards, rows } = getData(); + return ; +} + +export default App; +~~~ + +Head over to ***Kanban.jsx*** and use the passed **props** in the Kanban configuration: + +~~~jsx {5,11-13} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: props.columns, // apply column data + cards: props.cards, // apply card data + rows: props.rows, // apply row data + rowKey: "type", + // other configuration properties + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // other configuration properties + }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +Another way to load data is by using the [`parse()`](/api/methods/js_kanban_parse_method/) method inside React's `useEffect()`: + +~~~jsx {9-11,27} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + let columns = props.columns; // data for columns + let cards = props.cards; // data for cards + let rows = props.rows; // data for rows + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // other configuration properties + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // other configuration properties + }); + + kanban.parse({ columns, cards, rows }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +The `parse(data)` method can be handy for reloading data when changes are made. + +At this point, the Kanban component is set up. When the component is added to the page, it initializes Kanban with the provided data. You can also adjust the configuration as needed. The [Kanban API docs](/api/overview/properties_overview/) have the full list of available options. + +#### Handling events + +Kanban fires events whenever something happens—like a card is added or moved. These events can be used to trigger custom code. The [complete list of events](/api/overview/events_overview/) is available for reference. + +To handle an event, update ***Kanban.jsx*** and add the following to the `useEffect()`: + +~~~jsx {5-7} title="Kanban.jsx" +// ... +useEffect(() => { + const kanban = new Kanban(kanban_container.current, {}); + + kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); + + return () => { + kanban.destructor(); + }; +}, []); +// ... +~~~ + +Now, the app can be started, and Kanban will show up on the page with data loaded. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with React + +This is how DHTMLX Kanban can be integrated with React. The code can be tweaked as needed. For a more advanced example, take a look at the [**GitHub**](https://github.com/DHTMLX/react-kanban-demo) repository. \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md new file mode 100644 index 0000000..446a375 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md @@ -0,0 +1,110 @@ +--- +sidebar\_label: Integration with Salesforce +title: Integration with Salesforce +description: Learn how to integrate DHTMLX Kanban into Salesforce. This guide explains the required HTML setup and environment configuration for smooth operation inside Salesforce Lightning components. +--- + +# Integration with Salesforce + +:::tip +It helps to know the basics of [**Salesforce**](https://www.salesforce.com/) before checking out this guide. If you want to brush up, take a look at the [**Salesforce documentation**](https://developer.salesforce.com/docs). +::: + +DHTMLX Kanban works well with the [Salesforce](https://www.salesforce.com/) platform. There are some code examples below that show how to bring DHTMLX Kanban into a Salesforce environment. If you want to see more, check out the [Example on GitHub](https://github.com/DHTMLX/salesforce-lwc-demo). + +:::note +The JavaScript Kanban widget can tell when it's running inside [**Salesforce**](https://www.salesforce.com/) and sets up the integration on its own. Usually, there's no need to use any [**Salesforce-specific methods**](#salesforce-specific-methods) by hand. +::: + +## Preparing environment + +To add Kanban to a Salesforce project, just add the *root* container with the `data-wx-root="true"` HTML attribute. This helps the library find the main spot for mounting the **Kanban** and **Toolbar** widgets. + +```html title="kanban.html" + +``` + +Any child elements with the `data-wx-portal-root="1"` attribute are used as containers for DHTMLX components like **Toolbar** and **Kanban**. + +## Salesforce environment API + +DHTMLX Kanban comes with a `salesForceEnv` helper class with methods for managing the Salesforce environment manually. To use it, import the `salesForceEnv` helper like this: + +```jsx {4} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; +``` + +:::note +Normally, you won't need these Salesforce-specific methods, but they're there if the automatic detection doesn't work out. +::: + +### Salesforce-specific methods + +Here are the methods you get with the `salesForceEnv` helper class: + +| Method | Description | +| :--------------------------------------------------------------- | :----------------------------------------------------------------------------- | +| `salesForceEnv.detect()` | Checks if Kanban is running inside Salesforce | +| `salesForceEnv.addGlobalEvent(eventName, handler, htmlElement)` | Adds a global event to the first available HTML element | +| `salesForceEnv.getTopNode()` | Gets the first available HTML element inside the Salesforce DOM hierarchy | + +```jsx {4,7} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; + +salesForceEnv.detect(); +``` + +### Additional exported function + +| Function | Description | +| :------------------- | :-------------------------------------------------------------------------------- | +| `enableSalesForce()` | Lets you manually set the Salesforce environment if automatic detection doesn't work | + +```jsx {5,8} +import { + Kanban, + Toolbar, + salesForceEnv, + enableSalesForce +} from "@dhx/trial-kanban"; + +enableSalesForce(); +``` + +## Workflow steps + +1. Add the `data-wx-root="true"` attribute to your LWC container +2. Import and set up DHTMLX Kanban and Toolbar (this part's optional) +3. The JavaScript Kanban widget will spot the Salesforce context and configure itself +4. There's no need to use `enableSalesForce()` or the `salesForceEnv` methods unless you're dealing with a special embedding situation + +### Example + +```jsx title="kanban.js" +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default class KanbanLWC { + connectedCallback() { + const kanban_container = this.template.querySelector(".sf_kanban"); + const toolbar_container = this.template.querySelector(".sf_toolbar"); + const kanban = new Kanban(kanban_container, { /* configuration properties */ }); + const toolbar = new Toolbar(toolbar_container, { api: kanban.api }); + } +} +``` + +With this setup, DHTMLX Kanban is fully integrated into your **Salesforce Lightning** environment. The widget takes care of DOM hierarchy and event binding inside LWC for you. You can keep customizing Kanban through its regular API and tweak its look and logic to fit your project. If you want to see a finished example, head over to [**GitHub**](https://github.com/DHTMLX/salesforce-lwc-demo). \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md new file mode 100644 index 0000000..582543c --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md @@ -0,0 +1,346 @@ +--- +sidebar_label: Integration with Svelte +title: Integration with Svelte +description: You can learn about the integration with Svelte in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Integration with Svelte + +:::tip +It's helpful to know the basics of **Svelte** before jumping in here. If you want to brush up, check out the [**Svelte documentation**](https://svelte.dev/docs/svelte/overview). +::: + +DHTMLX Kanban works well with **Svelte**. There are some code samples showing how to use DHTMLX Kanban in a Svelte project. For more details, check out the [**Example on GitHub**](https://github.com/DHTMLX/svelte-kanban-demo). + +## Creating a project + +:::info +Before starting a new project, make sure you have [**Vite**](https://vite.dev/) (optional) and [**Node.js**](https://nodejs.org/en/) installed. +::: + +There are a couple of ways to set up a **Svelte** project: + +- You can use [**SvelteKit**](https://kit.svelte.dev/) + +or + +- You can use **Svelte with Vite** (without SvelteKit): + +~~~json +npm create vite@latest +~~~ + +You can find more info in the [related article](https://svelte.dev/docs/svelte/overview). + +### Installation of dependencies + +Let's call the project **my-svelte-kanban-app** and move into the app directory: + +~~~json +cd my-svelte-kanban-app +~~~ + +Install the dependencies and start the development server. You can use your preferred package manager: + +- For [**yarn**](https://yarnpkg.com/), use these commands: + +~~~json +yarn +yarn start +~~~ + +- For [**npm**](https://www.npmjs.com/), use these commands: + +~~~json +npm install +npm run dev +~~~ + +The app should now be running locally (for example at `http://localhost:3000`). + +## Creating Kanban + +Next, you'll need to get the DHTMLX Kanban source code. Stop the app for a moment and install the Kanban package. + +### Step 1. Package installation + +Download the [**trial Kanban package**](/how_to_start/#installing-kanban-via-npm-or-yarn) and follow the README instructions. Just a heads up, the trial Kanban works for 30 days. + +### Step 2. Component creation + +Now it's time to make a Svelte component to add Kanban with a Toolbar to the app. Create a new file in the ***src/*** directory and call it ***Kanban.svelte***. + +#### Importing source files + +Open up ***Kanban.svelte*** and import the Kanban source files. Here are a couple of things to keep in mind: + +- If you're using the PRO version and installed Kanban from a local folder, your import paths would look like this: + +~~~html title="Kanban.svelte" + +~~~ + +Depending on the package, the CSS might be minified, so you might need to import **kanban.min.css** instead. + +- If you're using the trial version, use these paths: + +~~~html title="Kanban.svelte" + + +
+
+
+
+~~~ + +#### Loading data + +To get data into Kanban, you'll need to provide a data set. You can create a ***data.js*** file in the ***src/*** directory and add some sample data: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Then, in ***App.svelte***, import the data and pass it as **props** to your `` component: + +~~~html {3,5,8} title="App.svelte" + + + +~~~ + +Now, open ***Kanban.svelte*** and use the passed **props** in the Kanban configuration: + +~~~html {6-8,15-17} title="Kanban.svelte" + + +
+
+
+
+~~~ + +If you want, you can also use the [`parse()`](/api/methods/js_kanban_parse_method/) method in Svelte's `onMount()` to load data into Kanban: + +~~~html {6-8,27} title="Kanban.svelte" + + +
+
+
+
+~~~ + +The `parse(data)` method is handy for reloading data whenever something changes. + +At this point, the Kanban component is good to go. Once it's on the page, it will initialize with your data. You can tweak the configuration as needed. To see all the available settings, check out the [Kanban API docs](/api/overview/properties_overview/). + +#### Handling events + +Whenever something happens in Kanban (like a user action), an event is triggered. You can use these events to run your own code. The [full list of events](/api/overview/events_overview/) is available. + +In ***Kanban.svelte***, update the `onMount()` method like this: + +~~~html {8-10} title="Kanban.svelte" + + +// ... +~~~ + +### Step 3. Adding Kanban into the app + +To bring the component into your app, open **App.svelte** and swap out the default code for this: + +~~~html title="App.svelte" + + + +~~~ + +Now you can start the app and see Kanban loaded with your data. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Svelte + +This is the basic setup for integrating DHTMLX Kanban with Svelte. Feel free to customize things to fit your needs. For a more advanced example, check out the [**GitHub**](https://github.com/DHTMLX/svelte-kanban-demo) repo. \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md new file mode 100644 index 0000000..9d9cb1d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md @@ -0,0 +1,366 @@ +--- +sidebar_label: Integration with Vue +title: Integration with Vue +description: You can learn about the integration with Vue in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Integration with Vue + +:::tip +It's helpful to know the basics of [**Vue**](https://vuejs.org/) before diving into this guide. If you need a refresher, check out the [**Vue 3 documentation**](https://vuejs.org/guide/introduction.html#getting-started). +::: + +DHTMLX Kanban works smoothly with **Vue**. There are sample code snippets demonstrating how to use DHTMLX Kanban with **Vue 3**. For more details, see the [**Example on GitHub**](https://github.com/DHTMLX/vue-kanban-demo). + +## Creating a project + +:::info +Make sure [**Node.js**](https://nodejs.org/en/) is installed before starting a new project. +::: + +To spin up a **Vue** project, just use: + +~~~json +npm create vue@latest +~~~ + +This command sets up and runs `create-vue`, which is the official **Vue** project starter. For more info, take a look at the [Vue.js Quick Start](https://vuejs.org/guide/quick-start.html#creating-a-vue-application). + +In this example, the project is named **my-vue-kanban-app**. + +### Installation of dependencies + +Move into your app’s folder: + +~~~json +cd my-vue-kanban-app +~~~ + +Install the dependencies and start up the development server. Depending on your package manager, use one of these: + +- For [**yarn**](https://yarnpkg.com/): + +~~~jsx +yarn +yarn start // or yarn dev +~~~ + +- For [**npm**](https://www.npmjs.com/): + +~~~json +npm install +npm run dev +~~~ + +The app should now be running locally (for example, at `http://localhost:3000`). + +## Creating Kanban + +Next, grab the DHTMLX Kanban source code. Stop the app for now, and install the Kanban package. + +### Step 1. Package installation + +Download the [**trial Kanban package**](/how_to_start/#installing-kanban-via-npm-or-yarn) and follow the steps in the README. The trial version is available for 30 days. + +### Step 2. Component creation + +Create a new Vue component to add Kanban with a Toolbar to your app. In the ***src/components/*** directory, make a new file called ***Kanban.vue***. + +#### Import source files + +Open ***Kanban.vue*** and import the Kanban source files. Keep in mind: + +- If you’re using the PRO version and installed the Kanban package from a local folder, your imports will look like this: + +~~~html title="Kanban.vue" + +~~~ + +Depending on your package, the source files might be minified. In that case, make sure to import **kanban.min.css** instead. + +- If you’re using the trial version, use these paths: + +~~~html title="Kanban.vue" + +~~~ + +This guide shows how to set up the **trial** version of Kanban. + +#### Setting containers and adding Kanban with Toolbar + +To show Kanban with a Toolbar, set up containers for both and initialize them with their constructors: + +~~~html {2,7-8,10-14} title="Kanban.vue" + + + +~~~ + +#### Adding styles + +To make Kanban display properly, add these styles to your main CSS file: + +~~~css title="main.css" +/* specify styles for initial page */ +html, +body, +#app { /* make sure that you use the #app root container */ + height: 100%; + padding: 0; + margin: 0; +} + +/* specify styles for Kanban and Toolbar container */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* specify styles for Kanban container */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### Loading data + +To provide data for Kanban, create a ***data.js*** file in the ***src/*** directory and add your data like this: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Now, open ***App.vue***, import the data, and set it up using the `data()` method. Then pass it to the `` component as **props**: + +~~~html {3,8,10-12,19} title="App.vue" + + + +~~~ + +Then, in ***Kanban.vue***, use these **props** in the Kanban configuration object: + +~~~html {6,10-12} title="Kanban.vue" + + + +~~~ + +Alternatively, you can use the [`parse()`](/api/methods/js_kanban_parse_method/) method in the `mounted()` hook to load data into Kanban: + +~~~html {6,22-26} title="Kanban.vue" + + + +~~~ + +The `parse(data)` method lets you reload data whenever changes are made. + +At this point, the Kanban component is set up and ready. Once you add it to the page, it initializes with your data. You can also pass in any extra configuration you need. To see all available properties, visit the [Kanban API docs](/api/overview/properties_overview/). + +#### Handling events + +When actions happen in Kanban, events are triggered. You can listen for these events and run your own code in response. Check out the [full list of events](/api/overview/events_overview/). + +In ***Kanban.vue***, update the `mounted()` method like this: + +~~~html {8-10} title="Kanban.vue" + + +// ... +~~~ + +Now, go ahead and run the app to see the Kanban board loaded with your data. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Vue + +This is the basic setup for integrating DHTMLX Kanban with Vue. The code can be tweaked as needed. For a more advanced example, check out the project on [**GitHub**](https://github.com/DHTMLX/vue-kanban-demo). \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/localization.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/localization.md new file mode 100644 index 0000000..ba262c9 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/localization.md @@ -0,0 +1,173 @@ +--- +sidebar_label: Localization +title: Localization +description: You can learn about the localization in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Localization + +All the labels in the JavaScript Kanban interface can be customized for different languages. To do this, it's possible to either create a new locale or tweak an existing one, then set it up for both Kanban and Toolbar (these need to be done separately). + +## Default locale + +By default, Kanban uses the **English** locale: + +~~~jsx +const en = { + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Files: "Files", + B: "B", + KB: "KB", + MB: "MB", + GB: "GB", + TB: "TB", + PB: "PB", + EB: "EB", + "Make cover": "Make cover", + "Remove cover": "Remove cover", + Comments: "Comments", + Links: "Links", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card...": "Add new card...", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Priority: "Priority", + Progress: "Progress", + Users: "Users", + + Untitled: "Untitled", + Rename: "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + Sort: "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)", + + "Add link": "Add link", + Duplicate: "Duplicate", + "Duplicate of": "Duplicate of", + "Relates to": "Relates to", + "Depends on": "Depends on", + "Is required for": "Is required for", + Duplicates: "Duplicates", + "Is duplicated by": "Is duplicated by", + "Is parent for": "Is parent for", + "Is subtask of": "Is subtask of", + + Cancel: "Cancel", + "Link task": "Link task", + "Select a relation": "Select a relation", + "Select a task": "Select a task", + + Send: "Send", + "Would you like to delete this comment?": + "Would you like to delete this comment?", + "No comments yet": "No comments yet", + "Would you like to delete this card?": + "Would you like to delete this card?", + }, + calendar: { // translations and settings of the calendar + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // translations of the core elements + ok: "OK", + cancel: "Cancel" + } +}; +~~~ + +## Built-in locales + +Kanban comes with several ready-to-use locales: + +**"en"** - English +**"de"** - German +**"cn"** - Chinese +**"es"** - Spanish +**"fr"** - French +**"it"** - Italian +**"jp"** - Japanese +**"pt"** - Portuguese +**"ru"** - Russian + +A built-in locale can be imported and set up like this: + +```jsx {5} +// create Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // the built-it "cn" locale will be set initially + // other parameters +}); + +// apply the built-in "de" locale to Kanban +board.setLocale(kanban.locales["de"]); +``` + +## Custom locale + +For a custom locale, a few steps are needed: + +- Make a new locale (or change the default one) and translate all text labels as needed + +- Set the new locale for **Kanban** using its [`locale`](api/config/js_kanban_locale_config.md) property or the [`setLocale()`](api/methods/js_kanban_setlocale_method.md) method +- Set the new locale for **Toolbar** using its [`locale`](api/config/toolbar_locale_config.md) property or the [`setLocale()`](api/methods/toolbar_setlocale_method.md) method + +## Example + +Here's a snippet that shows how to switch between different locales: + + \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/stylization.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/stylization.md new file mode 100644 index 0000000..a140958 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/stylization.md @@ -0,0 +1,119 @@ +--- +sidebar_label: Stylization +title: Stylization +description: You can learn about the stylization in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Stylization + +With Kanban, it’s easy to tweak the look of **columns**, **rows**, and **cards** by using the [`columnShape.css`](api/config/js_kanban_columnshape_config.md), [`rowShape.css`](api/config/js_kanban_rowshape_config.md), and [`cardShape.css`](api/config/js_kanban_cardshape_config.md) properties. These options let you style columns, rows, and cards based on certain conditions. + +If you want to add a custom CSS class to a specific **column**, **row**, or **card**, you can do that with the [`columns.css`](api/config/js_kanban_columns_config.md), [`rows.css`](api/config/js_kanban_rows_config.md), and [`cards.css`](api/config/js_kanban_cards_config.md) properties. + +It’s also possible to add your own styles to any part of the Kanban interface to better fit your project’s needs. The library comes with lots of CSS variables for easy customization. There are two main sets of variables: +- CSS variables for the **Kanban** style +- CSS variables for the **WX** library style (like controls, calendars, etc.) + +:::info +The **WX** library is used under the hood for some internal features. It covers smaller elements in Kanban, such as controls and calendars. +::: + +## Default style + +~~~css +.wx-material-theme { + /* WX library css variables */ + --wx-field-width: 100%; + --wx-theme-name: material; + /* end of WX library css variables */ + + /* Kanban css variables*/ + --wx-kanban-background: #f1f1f1; + + /* column styles */ + --wx-kanban-column-width: 300px; + --wx-kanban-column-height: 300px; + + /* toolbar styles */ + --wx-kanban-toolbar-height: 56px; + --wx-kanban-toolbar-align: center; + --wx-kanban-toolbar-justify: flex-start; + --wx-kanban-toolbar-control-hover: rgba(0, 0, 0, 0.07); + --wx-kanban-toolbar-control-active: rgba(0, 0, 0, 0.15); + --wx-kanban-toolbar-border: var(--wx-border); + + /* card styles */ + --wx-kanban-card-field-padding: 12px; + --wx-kanban-content-background: var(--wx-background); + --wx-kanban-card-border: var(--wx-border); + --wx-kanban-card-border-radius: 6px; + --wx-kanban-header-border-radius: var(--wx-kanban-card-border-radius); + + /* row styles */ + --wx-kanban-row-line: var(--wx-border); + + /* user icon styles */ + --wx-kanban-user-icon-size: 36px; + + /* editor styles */ + --wx-kanban-header-height: 64px; + --wx-kanban-editor-width: 569px; + --wx-kanban-editor-height: auto; + --wx-kanban-editor-x-padding: 20px; + --wx-kanban-editor-background: var(--wx-kanban-content-background); + --wx-kanban-editor-top-border: none; + + /* column styles */ + --wx-kanban-over-limit-color: var(--wx-color-danger); + --wx-kanban-collapsed-column-width: 44px; + --wx-kanban-z-index: 1; + + /* progress control styles*/ + --wx-progress-height: 4px; + --wx-kanban-progress-inactive-color: #dbdbdb; + + /* menu styles */ + --wx-kanban-menu-min-width: 100px; + + /* box and shadow styles*/ + --wx-kanban-shadow: none; + --wx-kanban-box-border: var(--wx-border); + + /* collapsed column styles */ + --wx-kanban-collapsed-padding: var(--wx-padding); + --wx-kanban-collapsed-margin: 0px; + --wx-kanban-collapsed-background: transparent; + --wx-kanban-collapsed-background-hover: #dfdfdf; + +/* End of Kanban CSS variables*/ +} +~~~ + +:::tip Note +Future Kanban releases might update some variables or their names. It’s a good idea to double-check the variable names after upgrading to a new version and update your code if needed to make sure everything displays correctly. +::: + +## Scroll style + +The scroll bar in Kanban can be styled too. Just use the `.wx-styled-scroll` CSS class. Before adding it, it’s worth checking if it works with the browsers you’re targeting — you can do that [here](https://caniuse.com/css-scrollbar). + +~~~html {4} title="index.html" + +
// + +
+~~~ + +## Custom style + +Here’s a snippet that shows how to set up a custom style for Kanban. + + + +## Adaptivity + +This snippet demonstrates how to make Kanban adapt to different screen sizes using custom CSS. + + + +**Related articles:** [Customization](guides/customization.md) \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/typescript_support.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/typescript_support.md new file mode 100644 index 0000000..32bad9e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/typescript_support.md @@ -0,0 +1,19 @@ +--- +sidebar_label: TypeScript support +title: TypeScript support +description: You can learn about using typescript with the DHTMLX JavaScript Kanban library in the documentation. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# TypeScript support + +From version 1.1, DHTMLX Kanban comes with TypeScript definitions included. TypeScript works right out of the box with the library. + +:::note +The Snippet Tool is a great place to check out how everything works. +::: + +## Advantages of using TypeScript + +So, what's good about using DHTMLX Kanban with TypeScript? + +TypeScript helps make development smoother and more efficient. With type checking and autocomplete, catching mistakes early becomes much easier. Plus, TypeScript gives clear hints about what kind of data to use with the DHTMLX Kanban API, which helps keep things on track while building apps. \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/working_with_data.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/working_with_data.md new file mode 100644 index 0000000..37b1cf8 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/working_with_data.md @@ -0,0 +1,201 @@ +--- +sidebar_label: Working with data +title: Working with Data +description: You can explore how to work with Data in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Working with data + +## Initial data loading + +When setting up Kanban, it's possible to pass in the initial data for [**columns**](api/config/js_kanban_columns_config.md), [**cards**](api/config/js_kanban_cards_config.md), [**rows**](api/config/js_kanban_rows_config.md), and [**links**](api/config/js_kanban_links_config.md). + +~~~jsx {1,17,81,94,106-109} +const columns = [ // data for columns + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + { + label: "Testing", + id: "testing" + }, + {...} +]; + +const cards = [ // data for cards + { + id: 1, + label: "Integration with React", + priority: 1, + color: "#65D3B3", + description: "Some description...", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + progress: 25, + users: [1,2,3,4], + sprint: "1.0", + column: "backlog", + type: "feature", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + }, + { + id: 2, + label: "Archive the cards/boards ", + priority: 2, + color: "#FFC975", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + sprint: "1.0", + column: "backlog", + type: "feature" + }, + { + label: "Searching and filtering", + priority: 1, + color: "#65D3B3", + + start_date: new Date("01/05/2021"), + + sprint: "1.2", + column: "backlog", + type: "task" + }, + { + label: "Set the tasks priorities", + priority: 2, + color: "#58C3FE", + + sprint: "1.2", + column: "inprogress", + type: "feature" + }, + {...} +]; + +const rows = [ // data for rows + { + label: "Feature", + id: "feature" + }, + { + label: "Task", + id: "task", + collapsed: true + }, + {...} +]; + +const links = [ + { + id: "link_1", + source: 1, + target: 2, + relation: "relatesTo", + }, + {...} +]; + +// initializing Kanban with the initial data for columns, cards and rows +new kanban.Kanban("#root", { + columns, + cards, + rows, + links +}); +~~~ + +## Loading data from local source + +To bring in data for ***columns***, ***rows***, ***cards***, and ***links*** from a local source, the [`parse()`](api/methods/js_kanban_parse_method.md) method works well. Just pass an object with the data you want to load. + +~~~js {4} +const board = new kanban.Kanban("#root", {}); + +// loading data into Kanban +board.parse({ columns, cards, rows }); +~~~ + +## Syncing Kanban data with Gantt and Scheduler + +Here's a quick look at how Kanban data can sync up with other DHTMLX widgets like [**Gantt**](https://dhtmlx.com/docs/products/dhtmlxGantt/) and [**Scheduler**](https://dhtmlx.com/docs/products/dhtmlxScheduler/): + + + +## Getting Kanban data + +There are a few methods available for grabbing Kanban data: + +- [`getAreaCards()`](api/methods/js_kanban_getareacards_method.md) - returns an array of card data objects for a specific column (and row) +- [`getCard()`](api/methods/js_kanban_getcard_method.md) - returns the data object for a card by its ID +- [`serialize()`](api/methods/js_kanban_serialize_method.md) - serializes all Kanban data to JSON + +## Getting Kanban state + +To check the state of Kanban, these methods come in handy: + +- [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) - gets an object with the reactive properties from *StateStore* +- [`api.getState()`](api/internal/js_kanban_getstate_method.md) - gets an object with the current properties from *StateStore* +- [`api.getStores()`](api/internal/js_kanban_getstores_method.md) - gets an object with both *StateStore* and *DataStore* + +## Exporting Kanban data + +When exporting Kanban data, this method is available: + +- [`export.json()`](api/internal/js_kanban_json_method.md) - exports Kanban data into a JSON file + +## Adding new items + +To add new *cards*, *columns*, or *rows*, these methods are useful: + +- [`addCard()`](api/methods/js_kanban_addcard_method.md) - creates a new card in Kanban +- [`addColumn()`](api/methods/js_kanban_addcolumn_method.md) - creates a new column in Kanban +- [`addRow()`](api/methods/js_kanban_addrow_method.md) - creates a new row in Kanban + +## Updating items + +To make changes to *cards*, *columns*, or *rows*, try these methods: + +- [`updateCard()`](api/methods/js_kanban_updatecard_method.md) - updates card data by its ID +- [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) - updates column data by its ID +- [`updateRow()`](api/methods/js_kanban_updaterow_method.md) - updates row data by its ID + +## Deleting items + +To remove *cards*, *columns*, or *rows*, the following methods are available: + +- [`deleteCard()`](api/methods/js_kanban_deletecard_method.md) - deletes a card from Kanban by its ID +- [`deleteColumn()`](api/methods/js_kanban_deletecolumn_method.md) - deletes a column from Kanban by its ID +- [`deleteRow()`](api/methods/js_kanban_deleterow_method.md) - deletes a row from Kanban by its ID + +## Moving items + +To move *cards*, *columns*, or *rows* around, these methods will help: + +- [`moveCard()`](api/methods/js_kanban_movecard_method.md) - moves a card to another column and row +- [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md) - moves a column to a new position +- [`moveRow()`](api/methods/js_kanban_moverow_method.md) - moves a row to a new position + +## Example + +Here's a snippet showing how the Kanban API can be used for working with data: + + \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/guides/working_with_server.md b/i18n/en/docusaurus-plugin-content-docs/current/guides/working_with_server.md new file mode 100644 index 0000000..5951f6d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/guides/working_with_server.md @@ -0,0 +1,368 @@ +--- +sidebar_label: Working with server +title: Working with Server +description: You can explore how to work with Server in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Working with server + +JavaScript Kanban makes it easy to work with both client and server data. The widget doesn’t have strict backend requirements and can connect to any backend platform that supports the REST API (RESTful API). + +:::info +The widget comes with built-in **Go** and **Node** backends, but you’re free to use your own server scripts too. +::: + +## RestDataProvider + +JavaScript Kanban includes the **RestDataProvider** service, which is fully compatible with REST APIs for backend integration. With it, you can interact with your server and perform these data operations: + +- ***"add-card"*** +- ***"add-column"*** +- ***"add-comment"*** +- ***"add-row"*** +- ***"add-link"*** +- ***"delete-card"*** +- ***"delete-column"*** +- ***"delete-comment"*** +- ***"delete-row"*** +- ***"delete-link"*** +- ***"move-card"*** +- ***"move-column"*** +- ***"move-row"*** +- ***"update-card"*** +- ***"update-column"*** +- ***"update-comment"*** +- ***"update-row"*** + +## REST methods + +The **RestDataProvider** service offers special REST methods for loading data dynamically: + +- [`getCards()`](api/provider/rest_methods/js_kanban_getcards_method.md) - returns a promise with ***cards data*** +- [`getColumns()`](api/provider/rest_methods/js_kanban_getcolumns_method.md) - returns a promise with ***columns data*** +- [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) - returns a promise with ***links data*** +- [`getRows()`](api/provider/rest_methods/js_kanban_getrows_method.md) - returns a promise with ***rows data*** +- [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md) - returns a promise with ***users data*** + +## Interacting with backend + +To work with the server, just connect **RestDataProvider** to your server scripts. If you’re using the built-in backend, you’ll find the scripts here: + +- [**Go**](https://github.com/web-widgets/kanban-go) backend +- [**Node**](https://github.com/web-widgets/kanban-node) backend + +Or you can set up your own backend. + +:::tip +If you’re using a custom backend, check out the [**REST API routes**](api/overview/rest_routes_overview.md) for more details. +::: + +To hook up **RestDataProvider** to your backend, just call the **kanban.RestDataProvider** constructor and pass in the backend **URL**. + +~~~js {1-2,27} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getUsers(), + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows() +]).then(([users, cards, columns, links, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +Make sure to include **RestDataProvider** in the **Event Bus** chain with [**api.setNext()**](api/internal/js_kanban_setnext_method.md) so you can add, delete, and update data—and send requests to your server. +::: + +### Example + +Here’s a snippet showing how to connect **RestDataProvider** to the **Go** backend and load data from the server: + + + +## Multiuser backend + +Kanban boards are popular for all kinds of teams and companies. To make collaboration smooth for multiple users, there’s a feature that lets everyone manage the same cards in real-time—no page reloads needed. This means users can work together and instantly see each other’s changes, which helps keep everyone in sync. + +To set up a multiuser backend, you’ll need to handle authorization on the server before initializing Kanban. Here’s a simple `login(url: string)` function for that: + +~~~js {} +const login = (url) => { + var token = sessionStorage.getItem("login-token"); + if (token) { + return Promise.resolve(token); + } + + return fetch(url + "/login?id=1") + .then(raw => raw.text()) + .then(token => { + sessionStorage.setItem("login-token", token); + return token; + }); +}; +~~~ + +This function just simulates login, and everyone gets authorized with ID 1. After logging in, the server sends back a token. You’ll need to include this token in every request. The `RestDataProvider.setHeaders()` function makes this easy by adding custom headers. By default, the token goes into the `"Remote-Token":` header: + +~~~js {} +login(url).then(token => { + // rest provider initialization + const restProvider = new kanban.RestDataProvider(url); + // set token as the custom header + restProvder.setHeaders({ + "Remote-Token": "eyJpZCI6IjEzMzciLCJ1c2VybmFtZSI6ImJpem9uZSIsImlhdC...", + }); + + // widget initialization... +}); +~~~ + +Once you have the token, you can initialize the widget like this: + +~~~js {} +// widget initialization... +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows(), +]).then(([cards, columns, links, rows]) => { + const board = new Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "row", + cardShape, + editorShape, + }); + + // save data from client to server + board.api.setNext(restProvider); + + // multiuser initialization... +}); +~~~ + +After setting up the widget, you’ll want to add a WebSocket to listen for server events. Here’s how to do it: + +~~~js {} +// multiuser initialization... + +// get client handlers for server events +const handlers = kanbanUpdates( + board.api, + restProvider.getIDResolver() +); +// connect to server events +const events = new RemoteEvents(url + "/api/v1", token); +// attach client handlers on server events +events.on(handlers); +~~~ + +- `handlers` - these handle events coming from the server +- `events` - this connects to the server and listens for incoming events +- `RemoteEvents.on(handlers)` - applies your handlers to server events + +With the multiuser backend in place, it’s much easier for teams to collaborate and see updates in real-time right in the UI. + +### Example + +Check out this snippet to see how to set up a multiuser backend and track changes from other users in real-time: + + + +## Customization of server events + +You can set up your own logic for handling server events. To do this, just pass a **handlers** object to the `RemoteEvents.on(handlers)` method. The **handlers** object should look like this: + +~~~js {} +{ + "cards": cardsHandler: function(obj: any), + "columns": columnsHandler: function(obj: any), + "links": linksHandler: function(obj: any), + "rows": rowsHandler: function(obj: any), +} +~~~ + +Whenever something changes on the server, it sends back the name of the changed element. These names might vary depending on how your server works. + +Any data updated on the client side will be passed as the **obj** argument to `function(obj: any)`. The `type: string` field tells you what operation happened, and can be one of these: + +- For **cards**: `"add-card"`, `"update-card"`, `"delete-card"`, `"move-card"` +- For **columns**: `"add-column"`, `"update-column"`, `"delete-column"`, `"move-column"` +- For **links**: `"add-link"`, `"delete-link"` +- For **rows**: `"add-row"`, `"update-row"`, `"delete-row"`, `"move-row"` + +Here’s an example showing how this works: + +~~~js {} +// initialize kanban +const board = new kanban.Kanban(...); +const restProvider = new kanban.RestDataProvider(url); +const idResolver = restProvider.getIDResolver(); +const TypeCard = 1; +const TypeRow = 2; +const TypeCol = 3; + +const cardsHandler = (obj: any) => { + obj.card.id = idResolver(obj.card.id, TypeCard); + obj.card.row = idResolver(obj.card.row, TypeRow); + obj.card.column = idResolver(obj.card.column, TypeColumn); + switch (obj.type) { + case "add-card": + board.api.exec("add-card", { + card: obj.card, + select: false, + skipProvider: true, // prevent the client from sending request to the server + }) + break; + // other operations + } +} + +// add custom handlers +const handlers = { + cards: cardsHandler, +}; + +const remoteEvents = new kanban.RemoteEvents(remoteEventsURL, token); +remoteEvents.on(handlers); +~~~ + +The `RestDataProvider.getIDResolver()` method gives you a function to keep client and server IDs in sync. When you create a new object (card/column/row/link) on the client, it gets a temporary ID and a server ID in the store. The `idResolver()` function helps match up the client ID with the server ID. Here’s how it looks: `idResolver(id: TID, type: number)` + +The `type` argument is the model type: + +- `CardID` - 1, +- `RowID` - 2, +- `ColumnID` - 3 +- `LinkID` - 4 + +To keep the client from sending a duplicate request to the server, use `skipProvider: true` when calling `board.api.exec()`. + +Once you’ve set up your custom handlers, you can handle server events however you like. + +## Grouping two or more statuses into a single column + +Sometimes you might want to show cards from different columns all together in a single column (like combining *To do* and *Unassigned* statuses into one column). + +To do this, you can add a custom field (for example, **status**) that keeps track of the card’s current status. The **column** field will hold the general column status. + +Next, set up rules for grouping cards. For example, you might group cards into columns like this: + +- *todo*, *unassigned* go into the **Open** column +- *dev*, *testing* go into the **Inprogress** column +- *merged*, *released* go into the **Done** column + +There are a couple of ways to group cards by status into a single column: + +- [Server side](#server-side-grouping) +- [Server side + client side](#server-side--client-side-grouping) + +### Server side grouping + +If you want to do the grouping on the server, your backend needs to send data to the client using [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) (see [Multiuser backend](#multiuser-backend)). + +When the server handles an update for a card, check the **status** field. Here’s how you might do it in [Go](https://go.dev/), but you can use any backend tech you like. + +~~~go +func Update(id int, c Card) error { + // ... + oldColumn := c.Column + s := data.Status + if s == "todo" || s == "unassigned" { + c.Column = "open" + } else if s == "dev" || s == "testing" { + c.Column = "inprogress" + } else if s == "merged" || s == "released" { + c.Column = "done" + } + + db.Save(&c) + + if oldColumn != c.Column { + // if the column has been updated by the status field, + // the client should be notified to move the card to the corresponding column + + // need to update the index of the card + updateCardIndex(&c) + + // notify client to update the column + ws.Publish("card-update", &c) + } + // ... +} +~~~ + +So when a user changes the status, the server checks it and puts the card in the right column. Then, the server uses WebSocket to let the client know the card needs to move. + +### Server side + client side grouping + +For a mixed approach, get the grouping rules from the server. Then, the client can figure out which column a card belongs to based on its status. + +~~~js +const groupingRules = await fetch("http://server.com/rules"); +~~~ + +Here’s what the rules might look like: + +~~~json +{ + "open": ["todo", "unassigned"], + "progress": ["dev", "testing"], + "done": ["merged", "released"], +} +~~~ + +Now, set up logic to check for changes and move cards to the right column: + +~~~js +const updateColumn = card => { + for (let col in groupingRules) { + if (groupingRules[col].includes(card.status)) { + card.column = col; + break; + } + } +}; + +kanban.api.intercept("move-card", ev => { + kanban.api.exec("update-card", { + id: ev.id, + card: { status: groupingRules[ev.columnId][0], + }); +}); + +kanban.api.intercept("update-card", ev => { + updateColumn(ev.card); +}); +~~~ + +This way, you can group cards into columns based on other fields. + +### Example + +Here’s a snippet showing how to set up the server to group two or more statuses into a single column in real-time: + + \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/how_to_start.md b/i18n/en/docusaurus-plugin-content-docs/current/how_to_start.md new file mode 100644 index 0000000..094783b --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/how_to_start.md @@ -0,0 +1,129 @@ +--- +sidebar_label: How to start +title: How to Start +description: You can explore how to start working with DHTMLX Kanban in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# How to start + +Here's a straightforward walkthrough for getting a working Kanban board up and running on your page. + +import editor from '@site/static/img/js_kanban_editor.png'; + +JS Kanban Main + +## Step 1. Including source files + +Start by creating an HTML file named *index.html*. After that, add the Kanban source files into your new file. + +You'll need two files: + +- the Kanban JS file +- the Kanban CSS file + +~~~html {5-6} title="index.html" + + + + How to Start with Kanban + + + + + + + +~~~ + +### Installing Kanban via npm or yarn + +It's easy to add JavaScript Kanban to your project using either `yarn` or `npm`. + +#### Installing trial Kanban via npm or yarn + +:::info +If you're interested in the trial version, just download the [**trial Kanban package**](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml) and follow the steps in the *README* file. Keep in mind, the trial lasts for 30 days. +::: + +#### Installing PRO Kanban via npm or yarn + +:::info +The DHTMLX private **npm** is available in the [Client's Area](https://dhtmlx.com/clients/), where you can generate your login and password for **npm**. There’s also a detailed installation guide there. Remember, access to the private **npm** is only available while your Kanban license is active. +::: + +## Step 2. Creating Kanban + +Now it's time to add Kanban to the page. First, set up the DIV containers for Kanban and its Toolbar. Here’s what to do: + +- Add two DIV containers to your *index.html* file +- Initialize Kanban and its Toolbar using the **kanban.Kanban** and **kanban.Toolbar** constructors + +:::info +The Toolbar is optional. If you want Kanban without a Toolbar, just use a single DIV container and initialize the widget with the **kanban.Kanban** constructor. +::: + +The constructors take the IDs of the HTML containers where Kanban and the Toolbar will go, along with their configuration objects. + +~~~html {9-10,13-15,17-19} title="index.html" + + + + How to Start with Kanban + + + + +
+
+ + + + +~~~ + +## Step 3. Configuring Kanban + +Now you can set up the configuration properties you want Kanban to use when it starts. + +To get going, you'll need to provide some initial data for **cards** and **columns** (and *rows* if needed). +Besides the initial data, you can also tweak the look and feel of [cards](guides/configuration.md#cards), the [editor](guides/configuration.md#editor), and the [toolbar](guides/configuration.md#toolbar). + +~~~jsx {2-7,11-18} +const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row", + cardShape, + editorShape +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" + ] +}); +~~~ + +## What's next + +That’s it—just three easy steps and the Kanban board is ready for action. You can start managing your tasks or dive deeper into what JavaScript Kanban has to offer. \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/howtos.md b/i18n/en/docusaurus-plugin-content-docs/current/howtos.md new file mode 100644 index 0000000..683cc72 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/howtos.md @@ -0,0 +1,199 @@ +--- +sidebar_label: How-tos +title: JavaScript Kanban How-Tos +description: You can explore the How-tos page of DHTMLX JavaScript Kanban library in the documentation. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# How-tos + +Here’s a handy reference for getting started with JavaScript Kanban, including setup, configuration, customization, and everyday use. + +## Basic principles + +This section covers the essentials for working with Kanban. + +| Topic | Description | +| --------------------------------------------- | ---------------------------------------------------------| +| [](guides/initialization.md) | How to get Kanban up and running ([Example](https://snippet.dhtmlx.com/gb50vyip?tag=kanban))| +| [](guides/configuration.md) | How to tweak Kanban settings | +| [](guides/customization.md) | Ways to adjust Kanban to fit your needs | +| [](guides/stylization.md) | Options for changing Kanban’s look and feel | +| [](guides/localization.md) | How to set up Kanban for different languages ([Example](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban))| + +## API reference + +Here you’ll find links to all the main Kanban API docs. + +| Topic | Description | +| ----------------------------------------------------- | ---------------------------------------------------------| +| [Kanban events](api/overview/events_overview.md) | Details on handling Kanban events | +| [Kanban methods](api/overview/methods_overview.md) | Overview of available Kanban methods | +| [Kanban properties](api/overview/properties_overview.md)| Info on Kanban properties | +| [Event Bus methods](api/overview/internal_eventbus_overview.md)| Working with Event Bus methods | +| [RestDataProvider methods](api/overview/internal_rest_overview.md)| Using RestDataProvider methods | +| [State methods](api/overview/internal_state_overview.md)| Managing state with State methods | +| [Toolbar methods](api/overview/toolbar_methods_overview.md)| Toolbar method options | +| [Toolbar properties](api/overview/toolbar_properties_overview.md)| Toolbar property details | + +## How to work with cards + +These sections break down how to manage cards, handle card data, and adjust card settings. + +### Performing operations with cards + +| Topic | Description | +| ------------------------------------------------------------ | --------------------------------------------| +| [Adding new cards](api/methods/js_kanban_addcard_method.md) | Steps for adding new cards ([Example](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Deleting cards](api/methods/js_kanban_deletecard_method.md) | How to remove cards ([Example](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Moving cards](api/methods/js_kanban_movecard_method.md) | How to move cards around ([Example](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Scrolling to the desired cards](api/methods/js_kanban_scroll_method.md)| How to scroll to a specific card| +| [Searching for cards](api/methods/js_kanban_setsearch_method.md)| How to find cards quickly | +| [Selecting cards](api/methods/js_kanban_selectcard_method.md)| How to select cards | +| [Sorting cards](api/methods/js_kanban_setsort_method.md) | How to sort cards | +| [Unselecting cards](api/methods/js_kanban_unselectcard_method.md)| How to unselect cards | +| [Adding links between cards](api/config/js_kanban_links_config.md)| How to link cards together ([Example](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) | + +### Working with card data + +| Topic | Description | +| ------------------------------------------------------------ | ----------------------------------------------------| +| [Getting card data](api/methods/js_kanban_getcard_method.md) | How to access card data | +| [Getting cards state](api/internal/js_kanban_getstate_method.md) | How to check the current state of cards | +| [Getting cards reactive state](api/internal/js_kanban_getreactivestate_method.md) | How to get the reactive state for cards | +| [Loading card data](api/config/js_kanban_cards_config.md) | How to load initial card info | +| [Parsing card data](api/methods/js_kanban_parse_method.md) | How to parse card data | +| [Serializing card data](api/methods/js_kanban_serialize_method.md)| How to serialize card data ([Example](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Updating card data](api/methods/js_kanban_updatecard_method.md)| How to update card info | + +### Configuring cards + +| Topic | Description | +| ------------------------------------------------------------ | ----------------------------------------------------| +| [Adding new cards](api/config/js_kanban_readonly_config.md) | Enable or disable adding new cards| +| [Binding cards into columns](api/config/js_kanban_columnkey_config.md) | How to assign cards to columns | +| [Binding cards into rows](api/config/js_kanban_rowkey_config.md) | How to assign cards to rows | +| [Configuring a card appearance](api/config/js_kanban_cardshape_config.md)| Options for card appearance| +| [Configuring a cards menu](api/config/js_kanban_cardshape_config.md)| How to set up a context menu for cards ([Example](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Customizing a card appearance](api/config/js_kanban_cardtemplate_config.md)| How to use templates for card appearance ([Example](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban))| +| [Dragging cards](api/config/js_kanban_readonly_config.md) | Enable or disable drag-and-drop for cards| +| [Editing cards](api/config/js_kanban_readonly_config.md) | Enable or disable editing for cards| +| [Lazy rendering](api/config/js_kanban_rendertype_config.md)| Enable or disable lazy rendering for lots of cards ([Example](https://snippet.dhtmlx.com/xez9ghqq?text=#kanban))| +| [Limiting cards](api/config/js_kanban_columns_config.md) | Set limits for cards in columns or swimlanes (**WIP validation**) ([Example](https://snippet.dhtmlx.com/2blo6hx8?text=kanban))| +| [Selecting cards](api/config/js_kanban_readonly_config.md) | Enable or disable card selection| +| [Setting a fix height of cards](api/config/js_kanban_cardheight_config.md)| How to set a fixed card height | +| [Updating card settings](api/methods/js_kanban_setconfig_method.md)| How to update card settings | + +## How to work with a card editor + +Here’s how to use and configure the card editor. + +| Topic | Description | +| ------------------------------------------------------------ | -------------------------------------------------------| +| [Autosaving mode](api/config/js_kanban_editorautosave_config.md)| Enable or disable autosave for the editor | +| [Configuring editor fields](guides/configuration.md#editor)| How to set up editor fields | +| [Configuring the editor](guides/configuration.md#configuring-the-editor)| How to adjust editor settings | +| [Updating editor settings](api/methods/js_kanban_setconfig_method.md)| How to update editor settings | + +## How to work with columns + +These sections explain how to manage columns and deal with their data. + +### Performing operations with columns + +| Topic | Description | +| --------------------------------------------------------------- | ----------------------------------------------------| +| [Adding new columns](api/methods/js_kanban_addcolumn_method.md) | How to add columns ([Example](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Configuring a columns menu](api/config/js_kanban_columnshape_config.md)| How to set up a context menu for columns ([Example](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting columns](api/methods/js_kanban_deletecolumn_method.md)| How to remove columns | +| [Moving columns](api/methods/js_kanban_movecolumn_method.md) | How to move columns | +| [Scrolling to the desired columns](api/methods/js_kanban_scroll_method.md)| How to scroll to a specific column | +| [Separate scrolling for columns](api/config/js_kanban_scrolltype_config.md)| How to enable separate scrolling for each column ([Example](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban))| + +### Working with column data + +| Topic | Description | +| --------------------------------------------------------------- | ----------------------------------------------------| +| [Getting card data of the column](api/methods/js_kanban_getareacards_method.md)| How to get cards for a specific column | +| [Getting columns state](api/internal/js_kanban_getstate_method.md) | How to check the current state of columns | +| [Getting columns reactive state](api/internal/js_kanban_getreactivestate_method.md) | How to get the reactive state for columns | +| [Loading column data](api/config/js_kanban_columns_config.md) | How to load initial column data | +| [Parsing column data](api/methods/js_kanban_parse_method.md) | How to parse column data | +| [Serializing column data](api/methods/js_kanban_serialize_method.md)| How to serialize column data | +| [Updating column data](api/methods/js_kanban_updatecolumn_method.md)| How to update column info | + +## How to work with rows (swimlanes) + +These sections go over row (swimlane) operations and data management. + +### Performing operations with rows (swimlanes) + +| Topic | Description | +| --------------------------------------------------------------- | ----------------------------------------------------| +| [Adding new rows](api/methods/js_kanban_addrow_method.md) | How to add rows (swimlanes) | +| [Configuring a rows menu](api/config/js_kanban_rowshape_config.md)| How to set up a context menu for rows ([Example](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting rows](api/methods/js_kanban_deleterow_method.md) | How to remove rows (swimlanes) | +| [Moving rows](api/methods/js_kanban_moverow_method.md) | How to move rows (swimlanes) | +| [Scrolling to the desired row](api/methods/js_kanban_scroll_method.md)| How to scroll to a specific row (swimlane)| + +### Working with row (swimlane) data + +| Topic | Description | +| --------------------------------------------------------------- | ----------------------------------------------------| +| [Getting card data of the column and row](api/methods/js_kanban_getareacards_method.md)| How to get cards for a specific column and row | +| [Getting rows state](api/internal/js_kanban_getstate_method.md) | How to check the current state of rows | +| [Getting rows reactive state](api/internal/js_kanban_getreactivestate_method.md) | How to get the reactive state for rows | +| [Loading row data](api/config/js_kanban_rows_config.md) | How to load initial row data | +| [Parsing row data](api/methods/js_kanban_parse_method.md) | How to parse row data | +| [Serializing row data](api/methods/js_kanban_serialize_method.md)| How to serialize row data | +| [Updating row data](api/methods/js_kanban_updaterow_method.md) | How to update row info | + +## How to work with events + +| Topic | Description | +| ----------------------------------------------------------- | ---------------------------------------------------| +| [Executing events](api/internal/js_kanban_exec_method.md) | How to trigger inner events | +| [Intercepting events](api/internal/js_kanban_intercept_method.md)| How to intercept inner events | +| [List of inner events](api/overview/events_overview.md) | List of Kanban’s built-in events | +| [Reordering events](api/internal/js_kanban_setnext_method.md)| How to change the order of inner events in the Event Bus | +| [Subscribing on events](api/internal/js_kanban_on_method.md)| How to subscribe to inner events | + +## How to work with Kanban REST API + +| Topic | Description | +| ----------------------------------------------------------- | ---------------------------------------------------| +| [Loading server data for cards](api/provider/rest_methods/js_kanban_getcards_method.md)| How to pull card data from the server | +| [Loading server data for columns](api/provider/rest_methods/js_kanban_getcolumns_method.md)| How to pull column data from the server | +| [Loading server data for rows](api/provider/rest_methods/js_kanban_getrows_method.md)| How to pull row data from the server | +| [Working with server](guides/working_with_server.md) | How to use the REST API with Kanban ([Example](https://snippet.dhtmlx.com/f25y0809?tag=kanban))| + +## How to work with Kanban state + +| Topic | Description | +| ----------------------------------------------------------- | ---------------------------------------------------| +| [Getting StateStore and DataStore](api/internal/js_kanban_getstores_method.md)| How to access StateStore and DataStore objects | +| [Getting StateStore properties](api/internal/js_kanban_getstate_method.md)| How to get StateStore property objects | +| [Getting StateStore reactive properties](api/internal/js_kanban_getreactivestate_method.md)| How to get StateStore’s reactive property objects | + +## How to work with Toolbar + +| Topic | Description | +| ----------------------------------------------------------- | ------------------------------------------------------| +| [Configuring a searchbar on Toolbar](api/config/toolbar_items_config.md) | How to add a searchbar to the Toolbar ([Example](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring a sort control on Toolbar](api/config/toolbar_items_config.md) | How to add a sort control to the Toolbar ([Example](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring Toolbar controls](api/config/toolbar_items_config.md)| How to set up, customize, and reorder Toolbar controls ([Example](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban)) | +| [Including Kanban API in Toolbar](api/config/toolbar_api_config.md) | How to use Kanban API features in the Toolbar | +| [Localizing Toolbar](api/config/toolbar_locale_config.md) | How to localize the Toolbar | + +## How to work with TypeScript + +| Topic | Description | +| ----------------------------------------------------------- | ---------------------------------------------------| +| [Working with TypeScript](guides/typescript_support.md) | How to use Kanban with TypeScript | + +## Any questions left? + + + +:::info +Questions can also be posted in the comments below! +::: \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/index.md b/i18n/en/docusaurus-plugin-content-docs/current/index.md new file mode 100644 index 0000000..51e6234 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/index.md @@ -0,0 +1,73 @@ +--- +sidebar_label: Kanban overview +title: JavaScript Kanban Overview +slug: / +description: You can have an overview of DHTMLX JavaScript Kanban library in the documentation. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# DHTMLX Kanban overview + +JavaScript Kanban is a handy tool for visualizing workflows. It makes it easier to see how business processes are going and gives a clear picture of how much work is on each team member's plate. The widget is flexible—use as many cards, columns, or swimlanes as needed. Since it’s built entirely with JavaScript and CSS, it’s simple to set up, customize, and plug into any web app or website. + +## Kanban structure­ + +### Toolbar + +The **Toolbar** is a separate part of the Kanban interface. It comes with a search bar for finding cards, a control to sort cards by different parameters, undo/redo buttons for managing history, and options for adding new columns and rows. The searching and sorting logic can be tailored, and the Toolbar layout is easy to update—add your own elements or rearrange the built-in ones. More details are in the [Configuration](guides/configuration.md#toolbar) section. + +import toolbar from '@site/static/img/js_kanban_toolbar.png'; + +Kanban Toolbar + +### Board + +The **Board** is the main area in Kanban. Here, cards are organized into columns and rows (swimlanes). The look of the cards can be changed as needed, and custom templates are supported. More info is available in the [Configuration](guides/configuration.md#cards) section. + +On the **Board** panel, there are several things you can do with ***cards***, ***columns***, and ***rows***: + +- Add cards by hitting the plus icon (as long as column and swimlane limits allow) +- Leave comments and votes on tasks through the editor panel ([Example](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- Create links between tasks using the editor ([Example](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- Remove cards, columns, or rows from the context menu (three dots icon) +- Duplicate cards using the context menu or with the `Ctrl (Command)`+`D` shortcut (works for multiple cards) +- Export Kanban data to a JSON file +- Use keyboard shortcuts for Kanban history: + - `Ctrl (Command)`+`Z` to undo the last action + - `Ctrl (Command)`+`Y` or `Ctrl (Command)`+`Shift`+`Z` to redo an action +- Move cards around by dragging them to new spots (across rows and columns) +- Move columns and rows using the context menu (three dots icon) +- Rename columns and rows by double-clicking labels or using the context menu +- Open the card editor by clicking any card +- Collapse or expand rows by clicking the arrow next to the row label +- Collapse or expand columns by clicking the arrow next to the column label +- Select multiple cards: + - Hold `Shift` and click to select several cards in the same column + - Hold `Ctrl (Command)` and click to select cards in different columns + +import board from '@site/static/img/js_kanban_board.png'; + +Kanban Board + +### Editor + +The **Editor** is a modal panel with fields and controls for updating a selected card. Just click a card to bring up the editor. The layout and fields of the editor can be changed to fit your needs. More about this is in the [Configuration](guides/configuration.md#editor) section. + +import editor from '@site/static/img/js_kanban_editor.png'; + +Kanban Editor + +## What's next + +To start using Kanban in your project, check out the [How to start](how_to_start.md) tutorial for step-by-step help. \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/news/migration.md b/i18n/en/docusaurus-plugin-content-docs/current/news/migration.md new file mode 100644 index 0000000..9bccda3 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/news/migration.md @@ -0,0 +1,1452 @@ +--- +sidebar_label: Migration to newer versions +title: Migration to Newer Versions +description: You can learn about the Migration to Newer Versions in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# Migration to newer versions + +## 1.6.5 -> 1.7.0 + +### Api + +#### Properties + +- The [`editorShape`](api/config/js_kanban_editorshape_config.md) property got an update. The `clearButton` parameter was swapped out for `clear`: + +~~~jsx {8} title="Before v1.7.0" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clearButton: true // legacy + } + }, { /* ... */ } + ] + // other parameters +}); +~~~ + +~~~jsx {8} title="From v1.7.0" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clear: true // new + } + }, { /* ... */ } + ] + // other parameters +}); +~~~ + +- The [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) function changed — the **store** parameter was replaced by **readonly**: + +~~~jsx {3-4} title="Before v1.7.0" +menu: { + show: true, + items: ({ card, store }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, store }); // the "store" parameter is legacy + ... + } +} +~~~ + +~~~jsx {3-4} title="From v1.7.0" +menu: { + show: true, + items: ({ card, readonly }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, readonly }); // the "readonly" parameter is new + ... + } +} +~~~ + +- The [`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md) function also had the **store** parameter swapped for **readonly**: + +~~~jsx {3-4} title="Before v1.7.0" +menu: { + show: true, + items: ({ column, columnIndex, columns, store }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, store }); // the "store" parameter is legacy + ... + } +} +~~~ + +~~~jsx {3-4} title="From v1.7.0" +menu: { + show: true, + items: ({ column, columnIndex, columns, readonly }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, readonly }); // the "readonly" parameter is new + ... + } +} +~~~ + +- The [`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) function received the same update, so **store** is now **readonly**: + +~~~jsx {3-4} title="Before v1.7.0" +menu: { + show: true, + items: ({ row, rowIndex, rows, store }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, store }); // the "store" parameter is legacy + ... + } +} +~~~ + +~~~jsx {3-4} title="From v1.7.0" +menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, readonly }); // the "readonly" parameter is new + ... + } +} +~~~ + +- The ***menu.items[0].label*** and ***menu.items[0].items*** parameters are no longer supported for [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md), [`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md), and [`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) as of v1.7. + +- The `editorAutoSave` property was removed in v1.7. Now, use [`editor.autoSave`](api/config/js_kanban_editor_config.md) instead: + +~~~jsx {2} title="Before v1.7.0" +new kanban.Kanban("#root", { + editorAutoSave: true, // legacy + // other parameters +}); +~~~ + +~~~jsx {3} title="From v1.7.0" +new kanban.Kanban("#root", { + editor: { + autoSave: true // new + } + // other parameters +}); +~~~ + +- The [`links`](api/config/js_kanban_links_config.md) property changed: + - **masterId** is now **source** + - **slaveId** is now **target** + +~~~jsx {5-6,10} title="Before v1.7.0" +const links = [ + { + id: 1, + // legacy + masterId: 2, + slaveId: 5 + }, {...} // other link data +]; + +new kanban.Kanban("#root", { + links, + // other parameters +}); +~~~ + +~~~jsx {5-6,10} title="From v1.7.0" +const links = [ + { + id: 1, + // new + source: 2, + target: 5 + }, {...} // other link data +]; + +new kanban.Kanban("#root", { + links, + // other parameters +}); +~~~ + +#### Methods + +- The `undo` and `redo` methods are no longer available on store methods: + +~~~jsx {1} title="Before v1.7.0" +kanban.api.getStores().data.undo() // legacy +~~~ + +~~~jsx {5-6,10} title="From v1.7.0" +kanban.undo(); +// or +kanban.api.exec("undo"); +~~~ + +- The [`api.getState()`](api/internal/js_kanban_getstate_method.md) and [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) methods had some changes: + - These parameters were removed in v1.7.0: + + ```js + fromAreaMeta, + dropAreaItemsCoords, + dropAreasCoords, + overAreaMeta, + before, + dragItemId, + dragItemsCoords, + overAreaId + ``` + + - These parameters are now private in v1.7.0: + + ```js + edit -> _edit: object, + layout -> _layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object + ``` + +#### Events + +- The `dragItemsCoords` and `dropAreasCoords` parameters were dropped from the [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) event + +## 1.5.13 -> 1.6.0 + +The CSS classes for the menu were renamed as follows: + +~~~jsx + .menu -> .wx-menu + .item -> .wx-item + .icon -> .wx-icon + .value -> .wx-value +~~~ + +## 1.5.12 -> 1.5.13 + +The editor-related CSS classes were renamed like this: + +~~~jsx + .modal -> .wx-modal + .window -> .wx-window + .modal .window .buttons -> .wx-modal .wx-window .wx-buttons + .combo -> .wx-combo + .combo -> .wx-multicombo + .item -> .wx-item + .color-picker -> .wx-colorselect + .colors -> .wx-colors + .slider -> .wx-slider + .datepicker -> .wx-datepicker + .calendar -> .wx-calendar + .calendar .days .day.out -> .wx-calendar .wx-days .wx-day.wx-out + .combo .tag -> .multicombo .wx-tag + .dropdown -> .wx-dropdown + .dropdown .item -> .wx-dropdown .wx-item + .clear -> .wx-clear +~~~ + +## 1.5.6 -> 1.5.7 + +### Api + +#### Methods + +- The [`setLocale`](api/methods/toolbar_setlocale_method.md) method for the Kanban toolbar was updated: + +~~~jsx {6} title="Before v1.5.7" + // create Kanban + const board = new kanban.Kanban("#root", {...}); + // create Toolbar + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // apply the "de" locale to Toolbar + toolbar.setLocale(de); // or null to reset the locale to the default one (en) +~~~ + +~~~jsx {6} title="From v1.5.7" + // create Kanban + const board = new kanban.Kanban("#root", {...}); + // create Toolbar + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // apply the "de" locale to the Toolbar + toolbar.setLocale(de, board.api); +~~~ + +## 1.4 -> 1.5 + +### Api + +#### Properties + +- The [`columnShape`](api/config/js_kanban_columnshape_config.md) property got a tweak: + + ~~~jsx {} title="Before v1.5" + { + menu: { + show: true, + items: [ + { + label: "Update", ... + } + ] + // other parameters + } + } + ~~~ + + ~~~jsx {11} title="From v1.5" + { + menu: { + show: true, + items: [ + { + text: "Update", ... + } + ] + // other parameters + }, + fixedHeaders: true + } + ~~~ + +## 1.3 -> 1.4 + +### Api + +#### Properties + +- The [`editorShape`](api/config/js_kanban_editorshape_config.md) property got some new options: + + ~~~jsx {} title="Before v1.4" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // other parameters + ~~~ + + ~~~jsx {5,7-21} title="From v1.4" + { + type: "date", // or you can also use the "dateRange" type + key: "start_date", + label: "Date Range" + format: "%d/%m/%y" + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", // or "editor" + html: true, + }, + }, + { + type: "links", + key: "links", + label: "Links", + }, + // other parameters + ~~~ + +- The [`cardShape`](api/config/js_kanban_cardshape_config.md) property was updated to support more features: + + ~~~jsx {} title="Before v1.4" + { + label: true, + description: true, + menu: { + items: [ + { + label: "Delete", ... + } + ] + } + // other parameters + } + ~~~ + + ~~~jsx {7,11-13} title="From v1.4" + { + label: true, + description: true, + menu: { + items: [ + { + text: "Delete", ... + } + ] + }, + votes: true, + comments: true, + css: (card) => card.type == "feature" ? "green" : "red", + // other parameters + } + ~~~ + +- The [`columnShape`](api/config/js_kanban_columnshape_config.md) property also got some changes: + + ~~~jsx {} title="Before v1.4" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // other parameters + } + } + ~~~ + + ~~~jsx {6,11} title="From v1.4" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // other parameters + }, + css: (column, cards) => column.id == "feature" && cards.length < 5 ? "green" : "red" + } + ~~~ + +- The [`rowShape`](api/config/js_kanban_rowshape_config.md) property was updated as well: + + ~~~jsx {} title="Before v1.4" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // other parameters + } + } + ~~~ + + ~~~jsx {6,11} title="From v1.4" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // other parameters + }, + css: (row, cards) => row.id == "task" && cards.length < 5 ? "green" : "red", + } + ~~~ + +- The [`cards`](api/config/js_kanban_cards_config.md) property now supports more fields: + + ~~~jsx {} title="Before v1.4" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + // other parameters + }, ... + ] + ~~~ + + ~~~jsx {6-18} title="From v1.4" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + // other parameters + }, ... + ] + ~~~ + +- The [`columns`](api/config/js_kanban_columns_config.md) property got some new options too: + + ~~~jsx {} title="Before v1.4" + [ + { + id: "inprogress", + label: "In progress", + // other parameters + }, ... + ] + ~~~ + + ~~~jsx {5-11} title="From v1.4" + [ + { + id: "inprogress", + label: "In progress", + css: "red", + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + // other parameters + }, ... + ] + ~~~ + +- The [`rows`](api/config/js_kanban_rows_config.md) property now includes a css option: + + ~~~jsx {} title="Before v1.4" + [ + { + id: "features", + label: "Features", + // other parameters + }, ... + ] + ~~~ + + ~~~jsx {5} title="From v1.4" + [ + { + id: "features", + label: "Features", + css: "green" + // other parameters + }, ... + ] + ~~~ + +- The [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) property was updated to support menu controls: + + ~~~jsx {} title="Before v1.4" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate + }); + ~~~ + + ~~~jsx {6-8} title="From v1.4" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+
+ +
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // other parameters + }); + ~~~ + +- The **sort** control in the [`items`](api/config/toolbar_items_config.md) property for Kanban Toolbar was updated: + + ~~~jsx {} title="Before v1.4" + [ + { // custom sort control + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + + ~~~jsx {6,11} title="From v1.4" + [ + { // custom sort control + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + +#### Methods + +- The [`api.getState()`](api/internal/js_kanban_getstate_method.md) method changed to drop some parameters: + +~~~jsx {25-27} title="Before v1.4" +api.getState(); +// the method returns an object with the following properties +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, +}*/ +~~~ + +~~~jsx {} title="From v1.4" +api.getState(); +// the method returns an object with the following properties +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, +}*/ +~~~ + +## 1.2 -> 1.3 + +### Api + +#### Properties + +- The [`editorShape`](api/config/js_kanban_editorshape_config.md) property now supports the ***dateRange*** parameter: + + ~~~jsx {} title="Before v1.3" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // other parameters + ~~~ + + ~~~jsx {} title="From v1.3" + { + type: "dateRange", // or you can also use the "date" type + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range" + }, + // other parameters + ~~~ + +- The [`items`](api/config/toolbar_items_config.md) property of Toolbar got new options: + +~~~jsx {} title="Before v1.3" +items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" +] +~~~ + +~~~jsx {4-5} title="From v1.3" +items: [ + "search", + "spacer", + "undo", + "redo", + "sort", + "addColumn", + "addRow" +] +~~~ + +#### Methods + +- The [`updateCard()`](api/methods/js_kanban_updatecard_method.md) method now supports a `replace` option: + +~~~jsx {} title="Before v1.3" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*other parameters*/ + } +}); +~~~ + +~~~jsx {9} title="From v1.3" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*other parameters*/ + }, + replace: true +}); +~~~ + +- The [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) method now also supports `replace`: + +~~~jsx {} title="Before v1.3" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + } +}); +~~~ + +~~~jsx {9} title="From v1.3" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +- The [`updateRow()`](api/methods/js_kanban_updaterow_method.md) method got a similar update: + +~~~jsx {} title="Before v1.3" +updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, +}); +~~~ + +~~~jsx {7} title="From v1.3" +updateColumn({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +## 1.1 -> 1.2 + +### Api + +#### Properties + +- The [`cardShape`](api/config/js_kanban_cardshape_config.md) property picked up some changes: + + - The ***menu*** parameter now supports more options + + ~~~jsx {} title="Before v1.2" + menu: true, + //or + menu: { show: true } + // other parameters + ~~~ + + ~~~jsx {5-14} title="From v1.2" + menu: true, + // or + menu: { + show: true, + items: ({ card, store }) => { + if(card.id === 1){ + return false; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", label: "Edit" }, + { id: "delete-card", icon: "wxi-delete", label: "Delete" } + ]; + } + } + }, + // other parameters + ~~~ + + - The ***users*** parameter now uses `avatar` instead of `path`: + + ~~~jsx {7} title="Before v1.2" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + path: "../assets/user.jpg" + }, + ] + }, + // other parameters + ~~~ + + ~~~jsx {7} title="From v1.2" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + avatar: "../assets/user.jpg" + }, + ] + }, + // other parameters + ~~~ + + - The ***start_date*** and ***end_date*** parameters now support formatting: + + ~~~jsx {} title="Before v1.2" + start_date: true, + end_date: true, + // other parameters + ~~~ + + ~~~jsx {3,7} title="From v1.2" + start_date: { + show: true, + format: "%d.%m.%Y" + }, + end_date: { + show: true, + format: "%d.%m.%Y" + }, + // other parameters + ~~~ + +- The [`editorShape`](api/config/js_kanban_editorshape_config.md) property now uses `avatar` instead of `path` for user images: + +~~~jsx {8} title="Before v1.2" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + path: "preview_image_path_1.png" + }, + ] +}, +// settings of other fields +~~~ + +~~~jsx {8} title="From v1.2" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + ] +}, +// settings of other fields +~~~ + +- The [`items`](api/config/toolbar_items_config.md) property of Toolbar got expanded search and sort options: + +~~~jsx {} title="Before v1.2" +items: [ + "search", + "controls" +] +~~~ + +~~~jsx {} title="From v1.2" +items: [ + { // or "search", + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ] + }, + "spacer", + { // or "sort", + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", + "addRow" +] +~~~ + +#### Methods + +- The [`setLocale()`](api/methods/js_kanban_setlocale_method.md) and [`setLocale()`](api/methods/toolbar_setlocale_method.md) methods were updated for resetting the locale: + +~~~jsx {} title="Before v1.2" +setLocale(kanban.en); // reset to default locale +~~~ + +~~~jsx {} title="From v1.2" +setLocale(null); // reset to default locale +~~~ + +- The [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) method now returns more properties: + +~~~jsx {} title="Before v1.2" +api.getReactiveState(); +// the method returns an object with the following properties +/*{ + dragItemId: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + dragItemsCoords: {...}, + selected: {...} +}*/ +~~~ + +~~~jsx {} title="From v1.2" +api.getReactiveState(); +// the method returns an object with the following properties +/*{ + areasMeta: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + cardShape: {...}, + cards: {...}, + cardsMap: {...}, + cardsMeta: {...}, + columnKey: {...}, + columns: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + edit: {...}, + editorShape: {...}, + fromAreaMeta: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + readonly: {...}, + rowKey: {...}, + rows: {...}, + scroll: {...}, + search: {...}, + selected: {...}, + sort: {...} +}*/ +~~~ + +- The [`api.getState()`](api/internal/js_kanban_getstate_method.md) method now returns more detailed state: + +~~~jsx {} title="Before v1.2" +api.getState(); +// the method returns an object with the following properties +/*{ + dragItemId: string | number, + before: string | number, + overAreaId: string | number, + overAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + dragItemsCoords: array, + selected: array +}*/ +~~~ + +~~~jsx {} title="From v1.2" +api.getState(); +// the method returns an object with the following properties +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + dropAreaItemsCoords: array, + dropAreasCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + overAreaMeta: object, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object +}*/ +~~~ + +- The [`api.getStores()`](api/internal/js_kanban_getstores_method.md) method now just returns the `state` store: + +~~~jsx {} title="Before v1.2" +api.getStores(); +// the method returns an object with the following stores +/*{ + state: StateStore, // ( object ) + data: DataStore // ( object ) +}*/ +~~~ + +~~~jsx {} title="From v1.2" +api.getStores(); +// the method returns an object with the following properties +/*{ + state: StateStore, // ( object ) +}*/ +~~~ + +### Localization + +
+Before v1.2 + +~~~jsx {} +const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; +const monthsShort = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" +]; +const wx = { + Today: "Today", + Clear: "Clear", + Close: "Close" +}; +const en = { + lang: "en", + __dates: { + months, + monthsShort, + days + }, + wx, + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Untitled: "Untitled", + Rename: "Rename" + } +}; +~~~ +
+ +
+From v1.2 + +~~~jsx {} +const en = { + kanban: { // translations of the Kanban labels + "Save": "Save", + "Close": "Close", + "Delete": "Delete", + "Name": "Name", + "Description": "Description", + "Type": "Type", + "Start date": "Start date", + "End date": "End date", + "Result": "Result", + "No results": "No results", + "Search": "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + "Edit": "Edit", + "Everywhere": "Everywhere", + "Label": "Label", + "Status": "Status", + "Color": "Color", + "Date": "Date", + "Untitled": "Untitled", + "Rename": "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + "Sort": "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)" + }, + calendar: { // translations and settings of the calendar + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // translations of the core elements + ok: "OK", + cancel: "Cancel" + } +}; +~~~ +
+ +## 1.0 -> 1.1 + +### Api + +#### Properties + +- The [`columns`](api/config/js_kanban_columns_config.md) property now includes ***collapsed, limit*** and ***strictLimit*** options starting from v1.1. + +~~~jsx title="Before v1.1" +const columns = [ + { + label: "Backlog", + id: "backlog" + }, ... +]; +~~~ + +~~~jsx {5-7,12} title="From v1.1" +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true + }, ... +]; + +new kanban.Kanban("#root", { + columns, + // other parameters +}); +~~~ + +- The ***color*** parameter of the [`cardShape`](api/config/js_kanban_cardshape_config.md) property was simplified: + +~~~jsx {4-7} title="Before v1.1" +const cardShape = { + color: { + show: true, + values: [ + { id: 1, color: "#65D3B3", label: "red" }, + { id: 2, color: "#FFC975", label: "green" } + ] + } +}; +~~~ + +~~~jsx {4,9} title="From v1.1" +const cardShape = { + color: { + show: true, + values: ["#65D3B3", "#FFC975", "#58C3FE"] + } +}; + +new kanban.Kanban("#root", { + cardShape + // other parameters +}); +~~~ + +#### Methods + +- The [`addColumn`](api/methods/js_kanban_addcolumn_method.md) method (and [`add-column`](api/events/js_kanban_addcolumn_event.md) event.md) now expects an object with `id` and `column` fields: + +~~~jsx {} title="Before v1.1" +addColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="From v1.1" +addColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: false, + ... + } +}); +~~~ + +- The [`addRow`](api/methods/js_kanban_addrow_method.md) method (and [`add-row`](api/events/js_kanban_addrow_event.md) event.md) now expects an object with `id` and `row` fields: + +~~~jsx {} title="Before v1.1" +addRow(row_data_object); +~~~ + +~~~jsx {2-7} title="From v1.1" +addRow({ + id: "feature", + row: { + label: "Feature", + collapsed: false, + ... + } +}); +~~~ + +- The [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) method (and [`update-column`](api/events/js_kanban_updatecolumn_event.md) event.md) now expects an object with `id` and `column` fields: + +~~~jsx {} title="Before v1.1" +updateColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="From v1.1" +updateColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: true, + ... + } +}); +~~~ + +- The [`updateRow`](api/methods/js_kanban_updaterow_method.md) method (and [`update-row`](api/events/js_kanban_updaterow_event.md) event.md) now expects an object with `id` and `row` fields: + +~~~jsx {} title="Before v1.1" +updateRow(row_data_object); +~~~ + +~~~jsx {2-7} title="From v1.1" +updateRow({ + id: "feature", + row: { + label: "Feature", + collapsed: true, + ... + } +}); +~~~ + +- The [`updateCard`](api/methods/js_kanban_updatecard_method.md) method (and [`update-card`](api/events/js_kanban_updatecard_event.md) event.md) now expects an object with `id` and `card` fields: + +~~~jsx {} title="Before v1.1" +updateCard(card_data_object); +~~~ + +~~~jsx {2-7} title="From v1.1" +updateCard({ + id: 1, + card: { + label: "Volvo XC 70", + progress: 26 + ... + } +}); +~~~ + +- The [`parse`](api/methods/js_kanban_parse_method.md) method now takes care of initial data reset, so there's no need to reset initial data before parsing new data: + +~~~jsx {3-5,8-12} title="Before v1.1" +// you need to reset initial data befor parsing new one +const board = new kanban.Kanban("#root", { + columns: [], + cards: [], + rows: [] +}); + +board.parse({ + columns, + cards, + rows +}); +~~~ + +~~~jsx {} title="From v1.1" +// you don't need to reset initial data befor parsing new one +const board = new kanban.Kanban("#root", {}); + +board.parse({ + columns, + cards, + rows +}); +~~~ \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/news/whats_new.md b/i18n/en/docusaurus-plugin-content-docs/current/news/whats_new.md new file mode 100644 index 0000000..39f6d52 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/news/whats_new.md @@ -0,0 +1,647 @@ +--- +sidebar_label: What's new +title: What's New +description: You can explore what's new in DHTMLX Kanban and its release history in the documentation of the DHTMLX JavaScript UI library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban. +--- + +# What's new + +If you're moving to a newer version of Kanban, you might want to look at [Migration to newer versions](news/migration.md) for more info. + +## Version 1.7.0 + +Released October 14, 2025 + +[Review of release on the blog](https://dhtmlx.com/blog/meet-dhtmlx-kanban-1-7/) + +### Salesforce Integration + +From v1.7, JavaScript Kanban can now be used inside Salesforce. Check out this guide for more details: [**Integration with Salesforce**](guides/integration_with_salesforce.md). + +There's also a [**GitHub example**](https://github.com/DHTMLX/salesforce-lwc-demo) and an [**Online demo**](https://dhtmlx-dev-ed.develop.lightning.force.com/) (*Login*: ***user***, *Password*: ***demo***). + +### New API + +- #### Events + + - [`undo`](api/events/js_kanban_undo_event.md) + - [`redo`](api/events/js_kanban_redo_event.md) + +- #### Methods + + - [`getColumnCards()`](api/methods/js_kanban_getcolumncards_method.md) + - [`detach()`](api/internal/js_kanban_detach_method.md) + +### Updates + +- #### Methods + + - The [`on`](api/internal/js_kanban_on_method.md) internal method now supports `config.tag` and `config.intercept` parameters + - The [`intercept`](api/internal/js_kanban_intercept_method.md) internal method now supports `config.tag` and `config.intercept` parameters + +- #### Properties + + - The [`links`](api/config/js_kanban_links_config.md) property has changed: + - `masterId` is now `source` + - `slaveId` is now `target` + + - The [`editorShape`](api/config/js_kanban_editorshape_config.md) property has changed: `clearButton` is now just `clear` + + - The [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) function now uses `readonly` instead of `store` + + - The [`cards[i].attached[i]`](api/config/js_kanban_cards_config.md) property now has a `size` parameter + +### Removed API + +- The `editorAutoSave` property is gone. You can use [`editor.autoSave`](api/config/js_kanban_editor_config.md) instead + +- The `dragItemsCoords` and `dropAreasCoords` parameters are no longer in the [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) + +### Fixes + +- If someone uploads a batch of files or several large files, the form might update before everything is fully uploaded, and the card data sent to the server is off +- File size only shows up for newly loaded files +- Year and month fields don't update after clicking **Done** in the editor +- When the comment textarea expands, it pushes the button out of the clickable area +- There's a script error if you open a card that's linked to a deleted card + +## Version 1.6.5 + +Released July 14, 2025 + +### Fixes + +- Setting `disabled: true` on menu items wasn't working +- Adding a row to Kanban with no row structure didn't show row headers + +## Version 1.6.4 + +Released June 12, 2025 + +### Fixes + +- Cards would disappear when added to columns/rows that got removed and then brought back +- Locale labels were missing for uploader list buttons +- Commercial version packages were missing readmes + +## Version 1.6.3 + +Released April 8, 2025 + +### Fixes + +- Limits were applying to the whole column in the wrong way +- Moving a card after closing the modal editor caused an error +- Deletion confirmation popped up under the modal editor +- The toolbar "more" icon would flicker during slow window resizing +- The `delete-card` event always closed the editor +- Couldn't open the editor if the priority was set to an ID not in the options + +## Version 1.6.2 + +Released February 14, 2025 + +### Fixes + +- Trial package had the wrong expiration date +- There was a warning during drag and drop on touch devices +- Setting readonly `add: false` didn't remove the **Add** option from the column menu +- Editor didn't show up for cards with number IDs as strings +- Package had an outdated link to samples +- Column scroll with lazy rendering had drag and drop glitches +- The `setConfig()` method didn't update the fixed state of column headers + +## Version 1.6.1 + +Released November 29, 2024 + +### Fixes + +- Toolbar's "more" icon was misaligned on narrow screens +- `RestDataProvider` ignored headers set via `setHeaders()` +- Calling `RestDataProvider.getIDResolver` gave a "not a function" error + +## Version 1.6 + +Released November 13, 2024 + +[Review of release on the blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-6/) + +### New functionality + +- You can now set how many assigned users are shown on a card using [`cardShape.users.maxCount`](api/config/js_kanban_cardshape_config.md) ([**example**](https://snippet.dhtmlx.com/w205dvzg?tag=kanban)) +- Column headers can be customized with [`columnShape`](api/config/js_kanban_columnshape_config.md) ([**example**](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban)) +- Search results view and content can be adjusted using [`items.searchResult`](api/config/toolbar_items_config.md) in the Toolbar's **search** control ([**example**](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban)) +- Editor can now show up as a modal window via [`editor.placement`](api/config/js_kanban_editor_config.md) ([**example**](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban)) +- Voting for a card is available through the vote icon, controlled by [`cardShape.votes.clickable`](api/config/js_kanban_cardshape_config.md) ([**example**](https://snippet.dhtmlx.com/en76xvi4?tag=kanban)) + +### Updates + +- #### Properties + + - [`cardShape`](api/config/js_kanban_cardshape_config.md) now has ***users.maxCount*** and ***votes.clickable*** + - [`columnShape`](api/config/js_kanban_columnshape_config.md) now has ***headerTemplate*** and ***collapsedTemplate*** + - [`editor`](api/config/js_kanban_editor_config.md) now has ***placement*** + - [`items`](api/config/toolbar_items_config.md) for Toolbar **search** now has ***searchResult*** + +- #### Events + + - [`set-edit`](api/events/js_kanban_setedit_event.md) now includes ***eventSource*** ([**example**](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban)) + +- #### Methods + + - The [`setConfig()`](api/methods/js_kanban_setconfig_method.md) method now: + - Doesn't affect history (history can't be changed) + - Doesn't destroy the Kanban datastore, so event listeners and Toolbar stay attached + + - [`setLocale()`](api/methods/js_kanban_setlocale_method.md) also keeps the Kanban datastore intact, so Toolbar and listeners stay as they are + - The `api` parameter for Toolbar's [`setLocale()`](api/methods/toolbar_setlocale_method.md) is now deprecated + +### Fixes + +- If you're editing a comment and remove it, the textarea for new comments disappears +- Missing localization strings are now included +- Drag-and-drop didn't work when using [`scrollType: "column"`](api/config/js_kanban_scrolltype_config.md) with [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) +- Couldn't close the editor with the close icon +- In the Willow skin, the right part of the editor matched the progress bar background color + +## Version 1.5.13 + +Released September 12, 2024 + +### Fixes + +- "Make cover" button didn't show up if the file extension was uppercase +- Clicking a disabled Multiselect control caused an error +- Scrolling after calling [`addCard()`](api/methods/js_kanban_addcard_method.md) would throw an error with [column scroll](api/config/js_kanban_scrolltype_config.md) and [lazy rendering](api/config/js_kanban_rendertype_config.md) +- No comments were saved as "" instead of [] +- Editor styles could be overridden by global styles with a non-unique class selector. [See migration section](news/migration.md/#1512---1513) + +## Version 1.5.12 + +Released May 2, 2024 + +### Fixes + +- Intercept regression: returning `false` didn't stop inner events +- Disabled files could still be uploaded + +## Version 1.5.11 + +Released March 25, 2024 + +### Fixes + +- Kanban CSS variables for the *Dark willow* skin were missing for Toolbar and Portals +- Changes to comments and votes weren't saved to form values when autosave was off +- Custom column submenu got `null` in the **onClick** function argument +- Couldn't set editable mode for Datepickers in Editor +- Console warnings showed up in Kanban examples + +## Version 1.5.10 + +Released February 29, 2024 + +### Fixes + +- npm server had a broken build +- Added the `select` parameter to the [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) event and [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md) method +- Comment field styles in the Kanban editor were off + +## Version 1.5.9 + +Released February 20, 2024 + +### Fixes + +- Kanban was affecting styles of other widgets +- Custom column submenu items with `disabled: true` were still clickable +- Couldn't set a custom upload function for the **Uploader** control + +## Version 1.5.8 + +Released November 28, 2023 + +### Fixes + +- The **currentUser** TS definition was missing in the **IKanbanConfig** type + +## Version 1.5.7 + +Released November 14, 2023 + +### Updates + +- Toolbar's [`setLocale()`](api/methods/toolbar_setlocale_method.md) now has an ***api*** parameter + +### Fixes + +- `disabled: true` didn't work for card menu items +- Console warnings appeared in Kanban examples +- Couldn't reset task priority +- Drop-down controls in the Kanban editor didn't close when clicking outside + +## Version 1.5.6 + +Released September 13, 2023 + +### Updates + +- You can now import the component as an ES module + +### Fixes + +- Regression in npm packages + +## Version 1.5.4 + +Released August 9, 2023 + +### Fixes + +- Files uploaded earlier stuck around in the form after switching to another card +- File upload via drag-and-drop wasn't working +- Cards could be unexpectedly deleted if the Delete key was pressed while the form was open +- The "Search in" dropdown went blank after selecting a card through search +- Added links weren't deleted on the backend when undoing the add-link operation + +## Version 1.5.1 + +### Fixes + +- TypeScript definitions are now generated properly + +## Version 1.5 + +Released June 15, 2023 + +[Review of release on the blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-5/) + +### New functionality + +- It's now possible to set and remove links between cards on the fly +- Links between cards can be managed on the server +- Column headers can be fixed ([**example**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) + +### New API + +- #### Methods + + - [`addLink()`](api/methods/js_kanban_addlink_method.md) + - [`deleteLink()`](api/methods/js_kanban_deletelink_method.md) + - [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) + +- #### Routes + + - [`DELETE /links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) + - [`GET /links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md) + - [`POST /links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md) + +### Updates + +- #### Properties + + - [`columnShape`](api/config/js_kanban_columnshape_config.md) now has ***fixedHeaders*** + +### Fixes + +- Links couldn't be parsed, exported, or serialized at runtime +- Creating the comments section failed if users weren't activated +- Links in store would change the original data and not save right +- Lazy rendering messed up styles for collapsed columns' hover area +- Cards moved to new columns disappeared +- Textarea for a new comment stayed open when editing started + +## Version 1.4.2 + +Released April 13, 2023 + +### Fixes + +- Backend ID wasn't saved to local card/column/row data after adding +- Missing TS definitions are now included +- Dark skin styles were leaking + +## Version 1.4.1 + +Released March 29, 2023 + +### Fixes + +- Sorting wasn't preserved as expected +- Disabling a context menu through **cardShape**, **columnShape**, or **rowShape** didn't work right +- Adding links in the editor without providing links in data caused issues +- The menu on a column could be the same as on a card, or not show up at all +- Dragging two tasks instead of one + +## Version 1.4 + +Released March 21, 2023 + +[Review of release on the blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-4/) + +### New functionality + +- Comments can be added ([**example**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- User limits can be set ([**example**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban)) +- Links between cards can be set ([**example**](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- Cards can be voted on ([**example**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) + +### New API + +- #### Events + + - [`add-comment`](api/events/js_kanban_addcomment_event.md) + - [`add-link`](api/events/js_kanban_addlink_event.md) + - [`delete-comment`](api/events/js_kanban_deletecomment_event.md) + - [`delete-link`](api/events/js_kanban_deletelink_event.md) + - [`drag-card`](api/events/js_kanban_dragcard_event.md) + - [`end-drag-card`](api/events/js_kanban_enddragcard_event.md) + - [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) + - [`update-comment`](api/events/js_kanban_updatecomment_event.md) + +- #### Methods + + - [`addComment()`](api/methods/js_kanban_addcomment_method.md) + - [`deleteComment()`](api/methods/js_kanban_deletecomment_method.md) + - [`updateComment()`](api/methods/js_kanban_updatecomment_method.md) + +- #### Properties + + - [`currentUser`](api/config/js_kanban_currentuser_config.md) + - [`links`](api/config/js_kanban_links_config.md) + +### Updates + +- #### Methods + + - [`api.getState()`](api/internal/js_kanban_getstate_method.md) is updated + +- #### Properties + + - [`cards`](api/config/js_kanban_cards_config.md) now has ***css***, ***comments***, and ***votes*** + - [`cardShape`](api/config/js_kanban_cardshape_config.md) now has ***comments***, ***votes*** ([**example**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)), and ***css*** ([**example**](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban)) + - [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) can now show a context menu + - [`columns`](api/config/js_kanban_columns_config.md) now has ***css*** ([**example**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)) and ***overlay*** ([**example**](https://snippet.dhtmlx.com/nfv59yif?tag=kanban)) + - [`columnShape`](api/config/js_kanban_columnshape_config.md) now has ***css*** ([**example**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)) + - [`editorShape`](api/config/js_kanban_editorshape_config.md) now supports [***comments***](guides/configuration.md#comments-type), [***links***](guides/configuration.md#links-type), and the ***format*** parameter for *date/dateRange* types + - [`rows`](api/config/js_kanban_rows_config.md) now has ***css*** ([**example**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + - [`rowShape`](api/config/js_kanban_rowshape_config.md) now has ***css*** ([**example**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + +### Deprecated API + +- #### Properties + + - The label in menu item objects in `cardShape.menu.items`, `columnShape.menu.items`, and `rowShape.menu.items` is now deprecated + +### Fixes + +- Menu position was off when Kanban was inside a container with margins +- Collapsed columns were in the wrong place if you set a custom column width +- Dropping a card into a collapsed column made it disappear +- Collapsed columns were in the wrong place if you set a custom column width +- In swimlanes, the card context menu was covered by the editing panel, so you couldn't delete the card + +## Version 1.3 + +Released September 29, 2022 + +[Review of release on the blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-3/) + +### New functionality + +- Cards can be duplicated using API, a context menu (3 dots icon), or `Ctrl (Command)` + `D` shortcuts (multiple cards can be duplicated at once) +- Kanban data can be exported to a JSON file +- Kanban history can be managed: + - With *Undo* and *Redo* controls on the Toolbar + - With shortcuts: + - `Ctrl (Command)`+`Z` - undo + - `Ctrl (Command)`+`Y` or `Ctrl (Command)`+`Shift`+`Z` - redo + - Using API + +### New API + +- **Events:** + [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) + +- **Methods:** + [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md), + [`export.json()`](api/internal/js_kanban_json_method.md), + [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md), + [`redo()`](api/methods/js_kanban_redo_method.md), and + [`undo()`](api/methods/js_kanban_undo_method.md) + +- **Properties:** + [`editor`](api/config/js_kanban_editor_config.md) and + [`history`](api/config/js_kanban_history_config.md) + +- **Common settings:** + [`$meta`](api/common/js_kanban_meta_parameter.md) + +### Deprecated API + +- **Properties:** + [`editorAutoSave`](api/config/js_kanban_editorautosave_config.md) + +### Updates + +- #### Events + + - [`update-card`](api/events/js_kanban_updatecard_event.md) is updated + - [`update-column`](api/events/js_kanban_updatecolumn_event.md) is updated + - [`update-row`](api/events/js_kanban_updaterow_event.md) is updated + +- #### Methods + + - [`updateCard()`](api/methods/js_kanban_updatecard_method.md) is updated + - [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) is updated + - [`updateRow()`](api/methods/js_kanban_updaterow_method.md) is updated + +- #### Properties + + - [`items`](api/config/toolbar_items_config.md) for Toolbar now includes ***"undo"*** and ***"redo"*** controls + - [`editorShape`](api/config/js_kanban_editorshape_config.md) now supports ***dateRange*** type + +## Version 1.2.2 + +Released August 30, 2022 + +### Fixes + +- Some icons were duplicated in menu and toolbar + +## Version 1.2.1 + +Released July 28, 2022 + +### Fixes​ + +- The `cardHeight` property didn't work with `scrollType:"column"` +- Uploader didn't show uploaded files in the card editor +- Localization didn't work for "combo" and "progress" fields in the card editor + +## Version 1.2 + +Released June 29, 2022 + +[Review of release on the blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-2/) + +### New functionality + +- New cards can be added via a column menu ([**example**](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban)) +- Lazy rendering is available ([**example**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- Columns can be scrolled separately ([**example**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- Kanban scrolls to newly created cards, columns, and rows (API and UI) ([**example**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- Cards can be sorted (API and UI) ([**example**](https://snippet.dhtmlx.com/74nyuv14?tag=kanban)) + +### New API + +- **Events:** + [`scroll`](api/events/js_kanban_scroll_event.md), + [`set-edit`](api/events/js_kanban_setedit_event.md), and + [`set-sort`](api/events/js_kanban_setsort_event.md) + +- **Methods:** + [`scroll()`](api/methods/js_kanban_scroll_method.md), + [`setEdit()`](api/methods/js_kanban_setedit_method.md), and + [`setSort()`](api/methods/js_kanban_setsort_method.md) + +- **Properties:** + [`cardHeight`](api/config/js_kanban_cardheight_config.md), + [`columnShape`](api/config/js_kanban_columnshape_config.md), + [`rowShape`](api/config/js_kanban_rowshape_config.md), + [`renderType`](api/config/js_kanban_rendertype_config.md), and + [`scrollType`](api/config/js_kanban_scrolltype_config.md) + +### Updates + +- #### Methods + + - [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) is updated + - [`api.getState()`](api/internal/js_kanban_getstate_method.md) is updated + - [`api.getStores()`](api/internal/js_kanban_getstores_method.md) is updated + - [`setLocale()`](api/methods/js_kanban_setlocale_method.md) for Kanban is updated + - [`setLocale()`](api/methods/toolbar_setlocale_method.md) for Toolbar is updated + +- #### Properties + + - [`items`](api/config/toolbar_items_config.md) for Toolbar is updated + - The ***start_date***, ***end_date***, ***menu***, and ***users*** fields of [`cardShape`](api/config/js_kanban_cardshape_config.md) are updated + - The ***multiselect*** type of [`editorShape`](api/config/js_kanban_editorshape_config.md) is updated + +#### Common + +- CSS class prefixes changed (*see the [Stylization](guides/stylization.md) section*) +- Locale structure updated (*see the [Localization](guides/localization.md) section*) + +### Fixes + +- Binding cards to swimlanes using `rowKey` didn't work right +- Clicking the card menu opened the editor +- Dragging several cards didn't work right +- Editing cards with `select: false` (**readonly** config.md) was broken +- Selecting newly added cards with `addCard()` didn't work as expected +- The `label: false` and `menu: false` parameters in `cardShape` didn't behave correctly + +## Version 1.1.1 + +Released February 28, 2022 + +[Review of release on the blog](https://dhtmlx.com/blog/maintenance-release-kanban-1-1-1/) + +### Fixes + +- Custom editor field didn't work unless it was defined in cardShape config +- Selecting the right card from the search bar dropdown menu + +## Version 1.1 + +Released February 15, 2022 + +[Review of release on the blog](https://dhtmlx.com/blog/dhtmlx-kanban-1-1-wip-validation-new-operations-columns-rows-typescript-support/) + +### New functionality + +- Columns can be *collapsed/expanded* using an arrow next to the label +- Columns and swimlanes can have a card *limit* +- Columns can be *moved* via the context menu (3 dots icon) +- Rows can be *moved* via the context menu (3 dots icon) +- Multiple cards in a column can be selected using **Shift** + **click** +- [TypeScript definitions](guides/typescript_support.md) for Kanban are now available + +### New API + +- New **events** for moving columns and rows: + [`move-column`](api/events/js_kanban_movecolumn_event.md) + and + [`move-row`](api/events/js_kanban_moverow_event.md) +- New **methods** for moving columns and rows: + [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md) + and + [`moveRow()`](api/methods/js_kanban_moverow_method.md) + +### Updates + +#### Properties + +- [`cards`](api/config/js_kanban_cards_config.md) is now optional + +- [`columns`](api/config/js_kanban_columns_config.md) is now optional and has: + - ***collapsed*** + - ***limit*** + - ***strictLimit*** + +- The ***color*** parameter in [`cardShape`](api/config/js_kanban_cardshape_config.md) has been updated + +#### Methods + +- [`addColumn`](api/methods/js_kanban_addcolumn_method.md) is updated +- [`addRow`](api/methods/js_kanban_addrow_method.md) is updated +- [`updateCard`](api/methods/js_kanban_updatecard_method.md) is updated +- [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) is updated +- [`updateRow`](api/methods/js_kanban_updaterow_method.md) is updated +- [`parse`](api/methods/js_kanban_parse_method.md) is updated + +#### Events + +- [`add-column`](api/events/js_kanban_addcolumn_event.md) is updated +- [`add-row`](api/events/js_kanban_addrow_event.md) is updated +- [`update-card`](api/events/js_kanban_updatecard_event.md) is updated +- [`update-column`](api/events/js_kanban_updatecolumn_event.md) is updated +- [`update-row`](api/events/js_kanban_updaterow_event.md) is updated + +## Version 1.0 + +Released November 23, 2021 + +[Review of release on the blog](https://dhtmlx.com/blog/releasing-dhtmlx-kanban-board-v-1-0/) + +### Initial functionality + +- Cards can be managed in these ways: + - add new cards + - select cards (including multiselection) + - delete cards + - search for cards + - reorder cards by dragging to another column or row + - edit card data in the editor: + - label + - description + - progress + - start date + - end date + - color + - priority + - attachments (*files* and *pictures*) + - *custom fields* + +- Columns and rows can be managed like this: + - add new columns and rows + - delete columns and rows + - rename columns and rows + - collapse/expand rows + +- [Localization](guides/localization.md) +- [Integration with backend](guides/working_with_server.md) (Go and Node) +- Works in all major browsers +- Supports touch devices \ No newline at end of file diff --git a/i18n/en/docusaurus-theme-classic/footer.json b/i18n/en/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..339b5da --- /dev/null +++ b/i18n/en/docusaurus-theme-classic/footer.json @@ -0,0 +1,62 @@ +{ + "link.title.Development center": { + "message": "Development center", + "description": "The title of the footer links column with title=Development center in the footer" + }, + "link.title.Community": { + "message": "Community", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.title.Company": { + "message": "Company", + "description": "The title of the footer links column with title=Company in the footer" + }, + "link.item.label.Download JS Kanban": { + "message": "Download JS Kanban", + "description": "The label of footer link with label=Download JS Kanban linking to https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml" + }, + "link.item.label.Examples": { + "message": "Examples", + "description": "The label of footer link with label=Examples linking to https://snippet.dhtmlx.com/5hcx01h4?tag=kanban" + }, + "link.item.label.Blog": { + "message": "Blog", + "description": "The label of footer link with label=Blog linking to https://dhtmlx.com/blog/tag/kanban/" + }, + "link.item.label.Forum": { + "message": "Forum", + "description": "The label of footer link with label=Forum linking to https://forum.dhtmlx.com/c/kanban/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/DHTMLX" + }, + "link.item.label.Youtube": { + "message": "Youtube", + "description": "The label of footer link with label=Youtube linking to https://www.youtube.com/user/dhtmlx" + }, + "link.item.label.Facebook": { + "message": "Facebook", + "description": "The label of footer link with label=Facebook linking to https://www.facebook.com/dhtmlx" + }, + "link.item.label.Twitter": { + "message": "Twitter", + "description": "The label of footer link with label=Twitter linking to https://twitter.com/dhtmlx" + }, + "link.item.label.Linkedin": { + "message": "Linkedin", + "description": "The label of footer link with label=Linkedin linking to https://www.linkedin.com/groups/3345009/" + }, + "link.item.label.About us": { + "message": "About us", + "description": "The label of footer link with label=About us linking to https://dhtmlx.com/docs/company.shtml" + }, + "link.item.label.Contact us": { + "message": "Contact us", + "description": "The label of footer link with label=Contact us linking to https://dhtmlx.com/docs/contact.shtml" + }, + "link.item.label.Licensing": { + "message": "Licensing", + "description": "The label of footer link with label=Licensing linking to https://dhtmlx.com/docs/products/dhtmlxKanban/#licensing" + } +} diff --git a/i18n/en/docusaurus-theme-classic/navbar.json b/i18n/en/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..3f15fb6 --- /dev/null +++ b/i18n/en/docusaurus-theme-classic/navbar.json @@ -0,0 +1,26 @@ +{ + "title": { + "message": "JavaScript Kanban Documentation", + "description": "The title in the navbar" + }, + "logo.alt": { + "message": "DHTMLX JavaScript Kanban Logo", + "description": "The alt text of navbar logo" + }, + "item.label.Examples": { + "message": "Examples", + "description": "Navbar item with label Examples" + }, + "item.label.Forum": { + "message": "Forum", + "description": "Navbar item with label Forum" + }, + "item.label.Support": { + "message": "Support", + "description": "Navbar item with label Support" + }, + "item.label.Download": { + "message": "Download", + "description": "Navbar item with label Download" + } +} diff --git a/i18n/ko/code.json b/i18n/ko/code.json new file mode 100644 index 0000000..8aa1645 --- /dev/null +++ b/i18n/ko/code.json @@ -0,0 +1,444 @@ +{ + "theme.ErrorPageContent.title": { + "message": "이 페이지가 중단되었습니다.", + "description": "페이지가 중단되었을 때 대체 페이지의 제목" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "맨 위로 스크롤", + "description": "맨 위로 버튼의 ARIA 레이블" + }, + "theme.blog.archive.title": { + "message": "보관함", + "description": "블로그 보관 페이지의 페이지 및 히어로 제목" + }, + "theme.blog.archive.description": { + "message": "보관함", + "description": "블로그 보관 페이지의 페이지 및 히어로 설명" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "블로그 목록 페이지 내비게이션", + "description": "블로그 페이지 번호 매김에 대한 ARIA 레이블" + }, + "theme.blog.paginator.newerEntries": { + "message": "새로운 항목", + "description": "더 새로운 블로그 게시물 페이지로 이동하는 데 사용되는 레이블(이전 페이지)" + }, + "theme.blog.paginator.olderEntries": { + "message": "이전 항목", + "description": "더 오래된 블로그 게시물 페이지로 이동하는 데 사용되는 레이블(다음 페이지)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "블로그 게시물 페이지 내비게이션", + "description": "블로그 게시물 페이지 번호 매김에 대한 ARIA 레이블" + }, + "theme.blog.post.paginator.newerPost": { + "message": "새로운 게시물", + "description": "더 새로운/이전 게시물로 이동하는 블로그 게시물 버튼 레이블" + }, + "theme.blog.post.paginator.olderPost": { + "message": "이전 게시물", + "description": "더 오래된/다음 게시물로 이동하는 블로그 게시물 버튼 레이블" + }, + "theme.tags.tagsPageLink": { + "message": "모든 태그 보기", + "description": "태그 목록 페이지를 대상으로 하는 링크의 레이블" + }, + "theme.colorToggle.ariaLabel": { + "message": "다크 모드와 라이트 모드 전환 (현재 {mode})", + "description": "내비게이션 바 색상 모드 토글에 대한 ARIA 레이블" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "다크 모드", + "description": "다크 색상 모드의 이름" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "라이트 모드", + "description": "라이트 색상 모드의 이름" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "경로 표시", + "description": "경로 표시(breadcrumbs)에 대한 ARIA 레이블" + }, + "theme.docs.DocCard.categoryDescription.plurals": { + "message": "{count}개 항목", + "description": "생성된 인덱스의 카테고리 카드에서 이 카테고리에 포함된 항목 수에 대한 기본 설명" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "문서 페이지", + "description": "문서 페이지 번호 매김에 대한 ARIA 레이블" + }, + "theme.docs.paginator.previous": { + "message": "이전", + "description": "이전 문서로 이동하는 데 사용되는 레이블" + }, + "theme.docs.paginator.next": { + "message": "다음", + "description": "다음 문서로 이동하는 데 사용되는 레이블" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "{count}개 문서 태그됨", + "description": "\"{count}개 문서 태그됨\"에 대한 복수형 레이블. 언어가 지원하는 복수형 형태(|로 구분)를 최대한 사용하세요 (https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html 참고)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "\"{tagName}\" 태그가 붙은 {nDocsTagged}", + "description": "문서 태그 페이지의 제목" + }, + "theme.docs.versionBadge.label": { + "message": "버전: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "{siteTitle} {versionLabel} 버전의 미출시 문서입니다.", + "description": "사용자에게 미출시 문서 버전을 보고 있음을 알리는 레이블" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "{siteTitle} {versionLabel} 버전의 문서이며 더 이상 적극적으로 유지 관리되지 않습니다.", + "description": "사용자에게 유지 관리되지 않는 문서 버전을 보고 있음을 알리는 레이블" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "최신 문서는 {latestVersionLink} ({versionLabel})을 참조하세요.", + "description": "사용자에게 최신 버전을 확인하도록 알리는 레이블" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "최신 버전", + "description": "최신 버전 제안 링크 레이블" + }, + "theme.common.editThisPage": { + "message": "이 페이지 편집하기", + "description": "현재 페이지를 편집하는 링크 레이블" + }, + "theme.common.headingLinkTitle": { + "message": "{heading}로 직접 연결", + "description": "제목으로 연결되는 링크의 제목" + }, + "theme.lastUpdated.atDate": { + "message": " {date}에", + "description": "페이지가 마지막으로 업데이트된 날짜를 설명하는 문구" + }, + "theme.lastUpdated.byUser": { + "message": " {user}에 의해", + "description": "페이지가 마지막으로 업데이트된 사용자를 설명하는 문구" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "마지막 업데이트{atDate}{byUser}", + "description": "페이지가 언제, 누가 마지막으로 업데이트했는지 표시하는 문장" + }, + "theme.NotFound.title": { + "message": "페이지를 찾을 수 없습니다", + "description": "404 페이지의 제목" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "버전", + "description": "모바일 보기에서 내비게이션 바 버전 드롭다운의 레이블" + }, + "theme.tags.tagsListLabel": { + "message": "태그:", + "description": "태그 목록 옆의 레이블" + }, + "theme.admonition.caution": { + "message": "주의", + "description": "Caution 알림(:::caution)에 사용되는 기본 레이블" + }, + "theme.admonition.danger": { + "message": "위험", + "description": "Danger 알림(:::danger)에 사용되는 기본 레이블" + }, + "theme.admonition.info": { + "message": "정보", + "description": "Info 알림(:::info)에 사용되는 기본 레이블" + }, + "theme.admonition.note": { + "message": "노트", + "description": "Note 알림(:::note)에 사용되는 기본 레이블" + }, + "theme.admonition.tip": { + "message": "팁", + "description": "Tip 알림(:::tip)에 사용되는 기본 레이블" + }, + "theme.admonition.warning": { + "message": "경고", + "description": "Warning 알림(:::warning)에 사용되는 기본 레이블" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "닫기", + "description": "공지사항 바 닫기 버튼의 ARIA 레이블" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "블로그 최근 게시물 내비게이션", + "description": "블로그 사이드바의 최근 게시물에 대한 ARIA 레이블" + }, + "theme.CodeBlock.copied": { + "message": "복사됨", + "description": "코드 블록의 복사 버튼 레이블" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "코드를 클립보드에 복사", + "description": "코드 블록 복사 버튼에 대한 ARIA 레이블" + }, + "theme.CodeBlock.copy": { + "message": "복사", + "description": "코드 블록의 복사 버튼 레이블" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "단어 줄바꿈 전환", + "description": "코드 블록 줄의 단어 줄바꿈 전환 버튼의 타이틀 속성" + }, + "theme.DocSidebarItem.expandCategoryAriaLabel": { + "message": "사이드바 카테고리 '{label}' 확장", + "description": "사이드바 카테고리 확장에 대한 ARIA 레이블" + }, + "theme.DocSidebarItem.collapseCategoryAriaLabel": { + "message": "사이드바 카테고리 '{label}' 축소", + "description": "사이드바 카테고리 축소에 대한 ARIA 레이블" + }, + "theme.NavBar.navAriaLabel": { + "message": "메인", + "description": "메인 내비게이션에 대한 ARIA 레이블" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "언어", + "description": "모바일 언어 전환 드롭다운의 레이블" + }, + "theme.NotFound.p1": { + "message": "찾으려던 내용을 찾을 수 없습니다.", + "description": "404 페이지의 첫 번째 문단" + }, + "theme.NotFound.p2": { + "message": "원본 URL에 연결된 사이트 소유자에게 연락하여 링크가 끊어졌음을 알려주세요.", + "description": "404 페이지의 두 번째 문단" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "이 페이지 내", + "description": "접이식 TOC 컴포넌트의 버튼에 사용되는 레이블" + }, + "theme.blog.post.readMore": { + "message": "더 읽기", + "description": "블로그 게시물 항목 요약에서 전체 게시물로 연결하는 레이블" + }, + "theme.blog.post.readMoreLabel": { + "message": "{title}에 대해 더 읽기", + "description": "요약에서 전체 블로그 게시물로 연결하는 링크의 ARIA 레이블" + }, + "theme.blog.post.readingTime.plurals": { + "message": "{readingTime}분 읽기", + "description": "\"{readingTime}분 읽기\"에 대한 복수형 레이블. 언어가 지원하는 복수형 형태(|로 구분)를 최대한 사용하세요 (https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html 참고)" + }, + "theme.docs.breadcrumbs.home": { + "message": "홈 페이지", + "description": "경로 표시에서 홈 페이지에 대한 ARIA 레이블" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "사이드바 축소", + "description": "문서 사이드바 축소 버튼의 타이틀 속성" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "사이드바 축소", + "description": "문서 사이드바 축소 버튼의 ARIA 레이블" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "문서 사이드바", + "description": "사이드바 내비게이션에 대한 ARIA 레이블" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "내비게이션 바 닫기", + "description": "모바일 사이드바 닫기 버튼에 대한 ARIA 레이블" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "내비게이션 바 전환", + "description": "모바일 내비게이션 햄버거 메뉴 버튼에 대한 ARIA 레이블" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← 메인 메뉴로 돌아가기", + "description": "모바일 내비게이션 바 사이드바 보조 메뉴 내에서 메인 메뉴로 돌아가는 뒤로 가기 버튼 레이블 (주로 문서 사이드바 표시용)" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "사이드바 확장", + "description": "문서 사이드바 확장 버튼의 ARIA 레이블 및 타이틀 속성" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "사이드바 확장", + "description": "문서 사이드바 확장 버튼의 ARIA 레이블 및 타이틀 속성" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "{count}개 문서 발견", + "description": "\"{count}개 문서 발견\"에 대한 복수형 레이블. 언어가 지원하는 복수형 형태(|로 구분)를 최대한 사용하세요 (https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html 참고)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "\"{query}\" 검색 결과", + "description": "검색어가 비어 있지 않은 경우 검색 페이지 제목" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "문서 검색", + "description": "검색어가 비어 있을 때 검색 페이지 제목" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "검색어를 입력하세요", + "description": "검색 페이지 입력란의 플레이스홀더" + }, + "theme.SearchPage.inputLabel": { + "message": "검색", + "description": "검색 페이지 입력란의 ARIA 레이블" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Algolia 검색", + "description": "Algolia 언급에 대한 ARIA 레이블" + }, + "theme.SearchPage.noResultsText": { + "message": "결과를 찾을 수 없습니다", + "description": "검색 결과가 없을 때의 문단" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "새 결과를 가져오는 중...", + "description": "새 검색 결과를 가져오는 중일 때의 문단" + }, + "theme.SearchBar.seeAll": { + "message": "모든 {count}개 결과 보기" + }, + "theme.SearchBar.label": { + "message": "검색", + "description": "검색 버튼의 ARIA 레이블 및 플레이스홀더" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "검색어 지우기", + "description": "검색 상자 초기화 버튼의 레이블 및 ARIA 레이블" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "취소", + "description": "검색 상자 취소 버튼의 레이블 및 ARIA 레이블" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "최근 검색어", + "description": "최근 검색어 제목" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "최근 검색어가 없습니다", + "description": "최근 검색어가 없을 때의 텍스트" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "이 검색 저장", + "description": "최근 검색어 저장 버튼의 레이블" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "이 검색을 기록에서 제거", + "description": "최근 검색어 제거 버튼의 레이블" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "즐겨찾기", + "description": "즐겨찾기 검색어 제목" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "이 검색을 즐겨찾기에서 제거", + "description": "즐겨찾기 검색어 제거 버튼의 레이블" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "결과를 가져올 수 없습니다", + "description": "검색 모달 오류 화면의 제목" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "네트워크 연결을 확인해 보세요.", + "description": "검색 모달 오류 화면의 도움말 텍스트" + }, + "theme.SearchModal.footer.selectText": { + "message": "선택하려면", + "description": "Enter 키 동작에 대한 설명 텍스트" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter 키", + "description": "선택을 수행하는 Enter 키 버튼의 ARIA 레이블" + }, + "theme.SearchModal.footer.navigateText": { + "message": "이동하려면", + "description": "위/아래 화살표 키 동작에 대한 설명 텍스트" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "위쪽 화살표", + "description": "내비게이션을 수행하는 위쪽 화살표 키 버튼의 ARIA 레이블" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "아래쪽 화살표", + "description": "내비게이션을 수행하는 아래쪽 화살표 키 버튼의 ARIA 레이블" + }, + "theme.SearchModal.footer.closeText": { + "message": "닫으려면", + "description": "Escape 키 동작에 대한 설명 텍스트" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape 키", + "description": "모달을 닫는 Escape 키 버튼의 ARIA 레이블" + }, + "theme.SearchModal.footer.searchByText": { + "message": "검색 제공", + "description": "검색이 Algolia로 제공됨을 설명하는 텍스트" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "다음에 대한 결과가 없습니다", + "description": "검색 결과가 없음을 설명하는 텍스트" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "다음으로 검색해 보세요", + "description": "결과가 없을 때 제안하는 검색어 텍스트" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "이 쿼리가 결과를 반환해야 한다고 생각하나요?", + "description": "사용자가 누락된 결과가 있다고 생각할 때 묻는 질문 텍스트" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "알려주세요.", + "description": "누락된 결과를 보고하는 링크 텍스트" + }, + "theme.SearchModal.placeholder": { + "message": "문서 검색", + "description": "DocSearch 팝업 모달 입력란의 플레이스홀더" + }, + "theme.blog.post.plurals": { + "message": "{count}개 게시물", + "description": "\"{count}개 게시물\"에 대한 복수형 레이블. 언어가 지원하는 복수형 형태(|로 구분)를 최대한 사용하세요 (https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html 참고)" + }, + "theme.blog.tagTitle": { + "message": "\"{tagName}\" 태그가 붙은 {nPosts}개 게시물", + "description": "블로그 태그 페이지의 제목" + }, + "theme.blog.author.pageTitle": { + "message": "{authorName} - {nPosts}개 게시물", + "description": "블로그 저자 페이지의 제목" + }, + "theme.blog.authorsList.pageTitle": { + "message": "저자", + "description": "저자 페이지의 제목" + }, + "theme.blog.authorsList.viewAll": { + "message": "모든 저자 보기", + "description": "블로그 저자 페이지로 연결되는 링크 레이블" + }, + "theme.blog.author.noPosts": { + "message": "이 저자는 아직 게시물을 작성하지 않았습니다.", + "description": "게시물이 0개인 저자를 위한 텍스트" + }, + "theme.contentVisibility.unlistedBanner.title": { + "message": "비공개 페이지", + "description": "비공개 콘텐츠 배너 제목" + }, + "theme.contentVisibility.unlistedBanner.message": { + "message": "이 페이지는 비공개입니다. 검색 엔진에 인덱싱되지 않으며 직접 링크를 가진 사용자만 접근할 수 있습니다.", + "description": "비공개 콘텐츠 배너 메시지" + }, + "theme.contentVisibility.draftBanner.title": { + "message": "초안 페이지", + "description": "초안 콘텐츠 배너 제목" + }, + "theme.contentVisibility.draftBanner.message": { + "message": "이 페이지는 초안입니다. 개발 환경에서만 볼 수 있으며 프로덕션 빌드에서는 제외됩니다.", + "description": "초안 콘텐츠 배너 메시지" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "다시 시도", + "description": "React 오류 경계에서 오류를 포착했을 때 다시 렌더링 시도 버튼 레이블" + }, + "theme.common.skipToMainContent": { + "message": "주요 콘텐츠로 건너뛰기", + "description": "키보드 탭/엔터 내비게이션으로 주요 콘텐츠로 빠르게 이동할 수 있게 하는 접근성용 건너뛰기 레이블" + }, + "theme.tags.tagsPageTitle": { + "message": "태그", + "description": "태그 목록 페이지의 제목" + } +} diff --git a/i18n/ko/docusaurus-plugin-content-docs/current.json b/i18n/ko/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..abaa114 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,134 @@ +{ + "version.label": { + "message": "다음", + "description": "현재 버전의 레이블" + }, + "sidebar.docs.category.What's new and migration": { + "message": "새로운 기능 및 마이그레이션", + "description": "사이드바 문서에서 '새로운 기능 및 마이그레이션' 카테고리의 레이블" + }, + "sidebar.docs.category.What's new and migration.link.generated-index.title": { + "message": "새로운 기능 및 마이그레이션", + "description": "사이드바 문서에서 '새로운 기능 및 마이그레이션' 카테고리의 생성된 인덱스 페이지 제목" + }, + "sidebar.docs.category.API": { + "message": "API", + "description": "사이드바 문서에서 API 카테고리의 레이블" + }, + "sidebar.docs.category.Kanban methods": { + "message": "칸반 메서드", + "description": "사이드바 문서에서 칸반 메서드 카테고리의 레이블" + }, + "sidebar.docs.category.Kanban internal API": { + "message": "칸반 내부 API", + "description": "사이드바 문서에서 칸반 내부 API 카테고리의 레이블" + }, + "sidebar.docs.category.Kanban internal API.link.generated-index.title": { + "message": "내부 API 개요", + "description": "사이드바 문서에서 칸반 내부 API 카테고리의 생성된 인덱스 페이지 제목" + }, + "sidebar.docs.category.Event Bus methods": { + "message": "이벤트 버스 메서드", + "description": "사이드바 문서에서 이벤트 버스 메서드 카테고리의 레이블" + }, + "sidebar.docs.category.Export methods": { + "message": "내보내기 메서드", + "description": "사이드바 문서에서 내보내기 메서드 카테고리의 레이블" + }, + "sidebar.docs.category.State methods": { + "message": "상태 메서드", + "description": "사이드바 문서에서 상태 메서드 카테고리의 레이블" + }, + "sidebar.docs.category.Kanban events": { + "message": "칸반 이벤트", + "description": "사이드바 문서에서 칸반 이벤트 카테고리의 레이블" + }, + "sidebar.docs.category.Kanban properties": { + "message": "칸반 속성", + "description": "사이드바 문서에서 칸반 속성 카테고리의 레이블" + }, + "sidebar.docs.category.Toolbar methods": { + "message": "툴바 메서드", + "description": "사이드바 문서에서 툴바 메서드 카테고리의 레이블" + }, + "sidebar.docs.category.Toolbar properties": { + "message": "툴바 속성", + "description": "사이드바 문서에서 툴바 속성 카테고리의 레이블" + }, + "sidebar.docs.category.Common settings": { + "message": "공통 설정", + "description": "사이드바 문서에서 공통 설정 카테고리의 레이블" + }, + "sidebar.docs.category.Backend API": { + "message": "백엔드 API", + "description": "사이드바 문서에서 백엔드 API 카테고리의 레이블" + }, + "sidebar.docs.category.Backend API.link.generated-index.title": { + "message": "백엔드 API", + "description": "사이드바 문서에서 백엔드 API 카테고리의 생성된 인덱스 페이지 제목" + }, + "sidebar.docs.category.RestDataProvider API": { + "message": "RestDataProvider API", + "description": "사이드바 문서에서 RestDataProvider API 카테고리의 레이블" + }, + "sidebar.docs.category.RestDataProvider API.link.generated-index.title": { + "message": "RestDataProvider API", + "description": "사이드바 문서에서 RestDataProvider API 카테고리의 생성된 인덱스 페이지 제목" + }, + "sidebar.docs.category.REST methods": { + "message": "REST 메서드", + "description": "사이드바 문서에서 REST 메서드 카테고리의 레이블" + }, + "sidebar.docs.category.REST routes": { + "message": "REST 경로", + "description": "사이드바 문서에서 REST 경로 카테고리의 레이블" + }, + "sidebar.docs.category.GET routes": { + "message": "GET 경로", + "description": "사이드바 문서에서 GET 경로 카테고리의 레이블" + }, + "sidebar.docs.category.GET routes.link.generated-index.title": { + "message": "GET 경로", + "description": "사이드바 문서에서 GET 경로 카테고리의 생성된 인덱스 페이지 제목" + }, + "sidebar.docs.category.POST routes": { + "message": "POST 경로", + "description": "사이드바 문서에서 POST 경로 카테고리의 레이블" + }, + "sidebar.docs.category.POST routes.link.generated-index.title": { + "message": "POST 경로", + "description": "사이드바 문서에서 POST 경로 카테고리의 생성된 인덱스 페이지 제목" + }, + "sidebar.docs.category.PUT routes": { + "message": "PUT 경로", + "description": "사이드바 문서에서 PUT 경로 카테고리의 레이블" + }, + "sidebar.docs.category.PUT routes.link.generated-index.title": { + "message": "PUT 경로", + "description": "사이드바 문서에서 PUT 경로 카테고리의 생성된 인덱스 페이지 제목" + }, + "sidebar.docs.category.DELETE routes": { + "message": "DELETE 경로", + "description": "사이드바 문서에서 DELETE 경로 카테고리의 레이블" + }, + "sidebar.docs.category.DELETE routes.link.generated-index.title": { + "message": "DELETE 경로", + "description": "사이드바 문서에서 DELETE 경로 카테고리의 생성된 인덱스 페이지 제목" + }, + "sidebar.docs.category.Backend and frameworks integration": { + "message": "백엔드 및 프레임워크 통합", + "description": "사이드바 문서에서 백엔드 및 프레임워크 통합 카테고리의 레이블" + }, + "sidebar.docs.category.Backend and frameworks integration.link.generated-index.title": { + "message": "백엔드 및 프레임워크 통합", + "description": "사이드바 문서에서 백엔드 및 프레임워크 통합 카테고리의 생성된 인덱스 페이지 제목" + }, + "sidebar.docs.category.Guides": { + "message": "가이드", + "description": "사이드바 문서에서 가이드 카테고리의 레이블" + }, + "sidebar.docs.category.Guides.link.generated-index.title": { + "message": "가이드", + "description": "사이드바 문서에서 가이드 카테고리의 생성된 인덱스 페이지 제목" + } +} \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md new file mode 100644 index 0000000..17b1308 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md @@ -0,0 +1,52 @@ +--- +sidebar_label: $meta +title: $meta 매개변수 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 $meta 매개변수에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# $meta + +### 설명 + +@short: Kanban의 메서드 및 이벤트 구성을 위한 추가 설정 객체 + +:::important +`$meta` 객체는 Kanban 이벤트를 기반으로 메서드를 구성하는 데 사용되는 추가 매개변수 세트를 포함합니다! +::: + +### 사용법 + +~~~jsx {} +$meta?: { + skipHistory?: boolean +}; +~~~ + +### 매개변수 + +`$meta` 객체는 다음 매개변수를 포함합니다: + +- `skipHistory` - (선택 사항) Kanban의 히스토리에서 작업을 건너뛸지 여부를 활성화/비활성화합니다 + +### 예제 + +~~~jsx {11-13} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 새 카드를 추가하고 Kanban 히스토리에서 이 작업을 건너뜁니다 +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" }, + $meta: { + skipHistory: true + } +}); +~~~ + +**변경 로그:** `$meta` 매개변수는 v1.3에 추가되었습니다 + +**관련 문서:** [`history`](api/config/js_kanban_history_config.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md new file mode 100644 index 0000000..f5d29cf --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: cardHeight +title: cardHeight 설정 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 cardHeight 설정에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# cardHeight + +### 설명 + +@short: 선택 사항입니다. 카드의 높이입니다. + +### 사용법 + +~~~jsx {} +cardHeight?: number; // px +~~~ + +:::important +[`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md)와 [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md) 설정을 함께 사용하는 경우, `cardHeight` 속성을 통해 카드의 고정 높이를 반드시 지정해야 합니다. 지정하지 않으면 카드가 표시되지 않습니다. +::: + +### 예제 + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + cardHeight: 150, // px + // 기타 매개변수 +}); +~~~ + +**변경 내역:** 이 속성은 v1.2에 추가되었습니다. + +**관련 문서:** [설정](guides/configuration.md#cards) + +**관련 샘플:** [Kanban. Lazy rendering and column scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md new file mode 100644 index 0000000..d5d6c68 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md @@ -0,0 +1,156 @@ +--- +sidebar_label: 카드 +title: 카드 설정 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 카드 설정에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며 DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# 카드 + +### 설명 + +@short: 선택 사항입니다. 카드 데이터를 포함하는 객체 배열입니다. + +### 사용법 + +~~~jsx {} +cards?: [ + { + id?: string | number, + label?: string, + description?: string, + progress?: number, + start_date?: Date, + end_date?: Date, + attached?: [ + { + id: string | number, + url?: string, + previewURL?: string, + coverURL?: string, + name?: string, + isCover?: boolean + size?: number + }, {...} + ], + color?: string, + users?: array | string | number, + // users?: array - 여러 사용자를 지정할 때 "multiselect" 편집기 타입을 사용하는 경우 + // users?: string | number - 단일 사용자를 지정할 때 "combo" 또는 "select" 편집기 타입을 사용하는 경우 + priority?: string | number, + css?: string, + votes?: array, + comments?: [ + { + id: string | number, + userId: string | number, + cardId: string | number, + text?: string, + date?: Date, + }, {...} + ], + [custom_key: string]?: any + }, {...} // 다른 카드 데이터 +]; +~~~ + +### 매개변수 + +각 카드에 대해 다음 매개변수(데이터)를 지정할 수 있습니다: + +- `id` - (선택 사항) 카드 **ID**입니다. 해당 메서드를 통해 카드를 관리할 때 사용됩니다. +- `label` - (선택 사항) 카드 라벨입니다. **Label** 필드에 표시됩니다. +- `description` - (선택 사항) 카드 설명입니다. **Description** 필드에 표시됩니다. +- `progress` - (선택 사항) 진행률 바 값입니다. 0에서 100 사이의 값을 지정할 수 있습니다. **Progress bar** 필드에 표시됩니다. +- `start_date` - (선택 사항) 시작 날짜 객체입니다(문자열 날짜는 지정하지 마십시오). **Start date** 필드에 표시됩니다. +- `end_date` - (선택 사항) 종료 날짜 객체입니다(문자열 날짜는 지정하지 마십시오). **End date** 필드에 표시됩니다. +- `attached` - (선택 사항) 첨부 파일 데이터가 포함된 객체 배열입니다. **Attachment** 필드에 표시됩니다. 각 객체에 대해 다음 매개변수를 지정할 수 있습니다: + - `id` - (필수) 첨부 파일의 **ID** + - `url` - (선택 사항) 첨부할 파일 경로 + - `previewURL` - (선택 사항) 미리보기 이미지 경로 + - `coverURL` - (선택 사항) 커버 이미지로 설정할 이미지 경로 + - `name` - (선택 사항) 파일 이름 + - `isCover` - (선택 사항) 커버 이미지 활성화. **true**일 경우 "coverURL" 경로를 통해 커버 이미지가 다운로드됩니다. + - `size` - (선택 사항) 첨부 파일 크기(바이트 단위) +- `color` - (선택 사항) 유효한 HEX 색상 코드입니다. 카드 상단 라인의 색상입니다. +- `users` - (선택 사항) 여러 할당 사용자의 **ID** 배열 또는 단일 할당 사용자의 **string | number**입니다. 할당된 사용자를 지정하려면 [cardShape.users](api/config/js_kanban_cardshape_config.md) 속성에 사용자 데이터 배열을 정의해야 합니다. 사용자는 **Users** 필드에 표시됩니다. + +:::info +`users?: array` - 여러 사용자를 지정할 때 [**multiselect**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) 편집기 타입을 사용하는 경우 사용자 **ID** 배열을 지정합니다. + +`users?: string | number` - 단일 사용자를 지정할 때 [**combo** 또는 **select**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) 편집기 타입을 사용하는 경우 단일 **ID**를 지정합니다. +::: + +- `priority` - (선택 사항) 카드 우선순위 **ID**입니다. 카드 우선순위를 지정하려면 [cardShape.priority](api/config/js_kanban_cardshape_config.md) 속성에 우선순위 데이터 배열을 정의해야 합니다. **Priority** 필드에 표시됩니다. +- `css` - (선택 사항) 개별 카드에 대한 CSS 스타일을 정의합니다. +- `votes` - (선택 사항) 사용자 ID 배열입니다. +- `comments` - (선택 사항) 댓글 데이터가 포함된 객체 배열입니다. 각 댓글 객체에 대해 다음 매개변수를 지정할 수 있습니다: + - `id` - (필수) 댓글의 **ID** + - `userId` - (필수) 댓글을 작성한 사용자의 **ID** + - `cardId` - (필수) 댓글이 속한 카드의 **ID** + - `text` - (선택 사항) 댓글 텍스트입니다. HTML 마크업도 포함할 수 있습니다. + - `date` - (선택 사항) 댓글 작성 날짜 객체입니다(문자열 날짜는 지정하지 마십시오). 수정 후에는 업데이트되지 않습니다. +- `custom_key` - (선택 사항) 카드의 사용자 정의 키입니다. 카드를 열(column)과 행(row)에 배치하기 위해 사용자 정의 키를 지정할 수 있습니다. 자세한 내용은 [columnKey](../js_kanban_columnkey_config) 및 [rowKey](api/config/js_kanban_rowkey_config.md) 속성을 참조하십시오. + +:::info +카드 데이터를 동적으로 새로 불러오려면 [**parse()**](api/methods/js_kanban_parse_method.md) 메서드를 사용할 수 있습니다! +::: + +### 예제 + +~~~jsx {1-41,45} +const cards = [ + { + id: 1, + label: "Integration with React", + description: "Some description", + progress: 25, + start_date: new Date("02/24/2022"), + end_date: new Date("02/24/2023"), + attached: [ + { + id: 234, + url: "../assets/img-1.jpg", + previewURL: "../assets/img-1.jpg", + coverURL: "../assets/img-1.jpg", + name: "img-1.jpg", + isCover: true, + size: 11979 + }, {...} // 다른 첨부 파일 데이터 + ], + color: "#65D3B3", + users: [1,2], + votes: [3,6,8], + comments: [ + { + id: 1, + userId: 1, + cardId: 1, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays. ", + date: new Date(), + }, {...} // 다른 댓글 + ], + priority: 1, + // "feature" 행에 카드를 배치하기 위한 사용자 정의 필드 + // rowKey 설정은 "type" 값으로 해야 합니다 + type: "feature", + // "backlog" 열에 카드를 배치하기 위한 사용자 정의 필드 + // columnKey 설정은 "stage" 값으로 해야 합니다 + stage: "backlog", + css: "red", + }, {...} // 다른 카드 데이터 +]; + +new kanban.Kanban("#root", { + columns, + cards, + // 기타 매개변수 +}); +~~~ + +**변경 로그:** ***css***, ***comments*** 및 ***votes*** 매개변수는 v1.4에서 추가되었습니다. + +**관련 문서:** +- [데이터 작업하기](guides/working_with_data.md) +- [updateCard()](api/methods/js_kanban_updatecard_method.md) + +**관련 샘플:** [Kanban. 카드 스타일링](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md new file mode 100644 index 0000000..ab59022 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md @@ -0,0 +1,340 @@ +--- +sidebar_label: cardShape +title: cardShape 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 cardShape 구성에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# cardShape + +### 설명 + +@short: 선택 사항입니다. 카드의 외관을 관리하기 위한 설정 객체입니다. + +### 사용법 + +~~~jsx {} +cardShape?: { + label?: boolean | { show?: boolean }, + description?: boolean | { show?: boolean }, + progress?: boolean | { show?: boolean }, + attached?: boolean | { show?: boolean }, + cover?: boolean | { show?: boolean }, + comments?: boolean | { show?: boolean }, + confirmDeletion?: boolean | { show?: boolean }, + start_date?: boolean | { + show?: boolean, + format?: string + }, + end_date?: boolean | { + show?: boolean, + format?: string + }, + color?: boolean | { + show?: boolean, + values?: array + }, + menu?: boolean | { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, card }) => void, + data?: array // 메뉴 하위 항목 배열 + }, + {...} + ] | ({ card, readonly }) => array | null + }, + users?: boolean | { + show?: boolean, + values: [ + { + id: string | number, + label?: string, + avatar?: string + }, + {...} // 기타 사용자 데이터 + ], + maxCount?: number | false + }, + priority?: boolean | { + show?: boolean, + values?: [ + { + id: string | number, + label?: string, + color: string + }, + {...} // 기타 우선순위 데이터 + ] + }, + votes?: boolean | { + show?: boolean, + clickable?: boolean + }, + css?: (card) => string, + headerFields?: [ + { + key: string, + label?: string, + css?: string + }, + {...} // 기타 필드 데이터 + ] +}; +~~~ + +### 매개변수 + +:::info +경우에 따라 매개변수를 **간단한(short)** 값 또는 **확장된(extended)** 값으로 설정할 수 있습니다. 아래 코드를 참고하세요: + +~~~jsx {3,6} + label: boolean | { show?: boolean } + // 간단한 값 + label: true + // 또는 + // 확장된 값 + label: { show: true } +~~~ +::: + +카드 외관을 구성하려면 **cardShape** 객체 내에서 다음 매개변수(필드)를 지정할 수 있습니다: + +- `label` - (선택 사항) **라벨** 필드 표시/숨김 +- `description` - (선택 사항) **설명** 필드 표시/숨김 +- `progress` - (선택 사항) **진행률** 필드 표시/숨김 +- `attached` - (선택 사항) **첨부파일** 필드 표시/숨김 +- `cover` - (선택 사항) **카드 이미지** 표시/숨김 +- `comments` - (선택 사항) 카드에 대한 **댓글** 표시/숨김 +- `confirmDeletion` - (선택 사항) 카드 삭제 시 사용자에게 삭제 확인 대화상자를 표시/숨김 +- `start_date` - (선택 사항) **시작 날짜** 필드의 매개변수 객체 + - `show` - (선택 사항) 카드 시작 날짜 표시/숨김 + - `format` - (선택 사항) 카드 시작 날짜 형식 정의. 사용 가능한 매개변수는 [여기](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/)에서 확인할 수 있습니다. +- `end_date` - (선택 사항) **종료 날짜** 필드의 매개변수 객체 + - `show` - (선택 사항) 카드 종료 날짜 표시/숨김 + - `format` - (선택 사항) 카드 종료 날짜 형식 정의. 사용 가능한 매개변수는 [여기](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/)에서 확인할 수 있습니다. +- `color` - (선택 사항) 카드 상단 색상 라인의 매개변수 객체 + - `show` - (선택 사항) 상단 색상 라인 표시/숨김 + - `values` - (선택 사항) 유효한 HEX 코드 배열 +- `menu` - (선택 사항) 카드 컨텍스트 메뉴의 매개변수 객체. 다음 매개변수를 지정할 수 있습니다: + - `show` - (선택 사항) 카드 컨텍스트 메뉴 활성화/비활성화 + - `items` - (선택 사항) 카드 컨텍스트 메뉴 항목의 매개변수를 포함하는 객체 배열. 각 항목에 대해 다음 매개변수를 지정할 수 있습니다: + - `id` - (선택 사항) 메뉴 항목 ID. 내장 동작을 구현하려면 다음 값을 지정해야 합니다: + - ***"set-edit"*** - 카드 이름 편집 동작 정의 + - ***"delete-card"*** - 카드 삭제 동작 정의 + - `icon` - (선택 사항) 메뉴 항목 아이콘 클래스 이름. 아이콘 폰트 관련 아이콘 지정 가능 (*mdi-delete* 등) + - `text` - (선택 사항) 메뉴 항목 이름 + - `disabled` - (선택 사항) 메뉴 항목 상태 (*활성* 또는 *비활성*, boolean 값에 따라 다름) + - `onClick` - (선택 사항) 다음 인수를 받는 사용자 정의 콜백 함수: + - ***id*** - 현재 메뉴 항목 ID + - ***item*** - 현재 메뉴 항목 데이터 객체 + - ***card*** - 대상 카드 데이터 객체 + - `data` - (선택 사항) 메뉴 하위 항목을 나타내는 객체 배열 + + :::info + `menu.items` 매개변수에 다음 인수를 받는 사용자 정의 함수를 설정할 수도 있습니다: + - ***card*** - 현재 카드 데이터 객체 + - ***readonly*** - 읽기 전용 [상태 속성](api/internal/js_kanban_getstate_method.md) 객체 + + 이 함수는 특정 카드에 대해 메뉴를 맞춤 설정하거나 특정 카드에 대해 메뉴를 숨길 수 있습니다(함수에서 *null* 또는 *false* 반환): + + ~~~jsx {} + items: ({ card, readonly }) => { + if (card.id === 1){ + return false; + } + + const menu = []; + + if (!readonly.delete){ + menu.push({ + id: "delete-card", icon: "wxi-delete", label: "Delete" + }); + } + + if (!readonly.edit){ + menu.push({ + id: "set-edit", icon: "wxi-edit", label: "Edit" + }); + } + return menu.length ? menu : null; + } + ~~~ + ::: + +- `users` - (선택 사항) **사용자** 필드 매개변수 객체 + - `show` - (선택 사항) 할당된 사용자 표시/숨김 + - `values` - (필수) 사용자 데이터 객체 배열. 각 사용자에 대해 다음 매개변수를 지정할 수 있습니다: + - `id` - (필수) 사용자 **ID** + - `label` - (선택 사항) 사용자 이름 + - `avatar` - (선택 사항) 사용자 아바타 경로 + - `maxCount` - (선택 사항) 카드에 표시할 최대 사용자 수 (또는 ***false***) + + `maxCount` 속성을 카드에 표시할 사용자 수로 설정할 수 있습니다. + `maxCount`를 `false`로 설정하면 카드에 할당된 모든 사용자가 표시됩니다. + + :::info + ***users*** 필드는 기본적으로 비활성화되어 있습니다. 활성화하려면 `show` 매개변수를 `true`로 설정하고 `values` 매개변수를 통해 해당 사용자 데이터를 제공해야 합니다. 편집기에서 새 사용자를 할당하려면 [`editorShape`](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) 속성을 통해 해당 컨트롤을 구성해야 합니다. 한 명 또는 여러 명의 사용자를 할당하려면 ***select*** 유형 또는 ***multiselect*** 유형을 사용하세요. + + ~~~jsx {} + cardShape: { + users: { + show: true, + values: [ + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } + ], + maxCount: 4 // 카드에 최대 4명만 표시 + } + } + ~~~ + ::: + +- `priority` - (선택 사항) **우선순위** 필드 매개변수 객체 + - `show` - (선택 사항) 카드 우선순위 표시/숨김 + - `values` - (선택 사항) 우선순위 데이터 객체 배열. 각 우선순위에 대해 다음 매개변수를 지정할 수 있습니다: + - `id` - (필수) 우선순위 **ID** + - `label` - (선택 사항) 우선순위 이름 + - `color` - (필수) 유효한 HEX 코드 +- `votes` - (선택 사항) **투표** 기능 지정 + - `show` - (선택 사항) 카드 및 편집기에서 투표 아이콘 표시/숨김 + - `clickable` - (선택 사항) 카드 위의 투표 아이콘 클릭 가능 여부. `true`면 사용자가 카드 위의 아이콘으로 투표 가능, 그렇지 않으면 편집기 내 아이콘으로만 투표 가능 +- `css` - 카드에 조건부로 적용할 css 클래스를 반환하는 함수 +- `headerFields` - (선택 사항) **사용자 정의 필드** 데이터 객체 배열. 다음 매개변수를 지정할 수 있습니다: + - `key` - (필수) 사용자 정의 필드 키. [editorShape](api/config/js_kanban_editorshape_config.md) 속성으로 편집기를 구성할 때 사용 + - `label` - (선택 사항) 사용자 정의 필드 라벨 + - `css` - (선택 사항) 사용자 정의 필드 css 클래스 + +:::info +**cardShape** 속성으로 카드 설정을 지정하지 않으면 위젯은 **defaultCardShape** 기본 매개변수 집합을 적용합니다! +::: + +### 기본 구성 + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "High" }, + { id: 2, color: "#F1B941", label: "Medium" }, + { id: 3, color: "#77D257", label: "Low" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +export const getDefaultCardMenuItems = ({ readonly }: { readonly: DataStore }) => { + const { readonly } = readonly.getState(); + const baseItems = [ + { id: "duplicate-card", icon: "wxi-content-copy", text: "Duplicate" }, + { id: "delete-card", icon: "wxi-delete-outline", text: "Delete" } + ]; + + if (!readonly?.select && readonly?.edit) { + return [ + { id: "set-edit", icon: "wxi-edit-outline", text: "Edit" }, + ...baseItems, + ]; + } + return baseItems; +}; + +const defaultCardShape = { + label: { show: true }, + description: { show: false }, + progress: { show: false }, + start_date: { show: false }, + end_date: { show: false }, + users: { show: false }, + confirmDeletion: { show: true }, + priority: { + show: false, + values: defaultPriorities + }, + color: { + show: false, + values: defaultColors + }, + cover: { show: false }, + attached: { show: false }, + menu: { show: true } +}; +~~~ + +### 예제 + +~~~jsx {14-49,54} +const users = [ // 사용자 데이터 + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // 카드 우선순위 데이터 + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardColors = ["#65D3B3", "#FFC975", "#58C3FE"]; + +const cardShape = { // 카드 설정 + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + cover: false, + comments: false, + confirmDeletion: false, + color: { + show: true, + values: cardColors + }, + users: { + show: true, + values: users, + maxCount: false + }, + priority: { + show: true, + values: cardPriority + }, + votes: { + show: true, + clickable: true + }, + css: (card) => card.type == "feature" ? "green" : "red", + headerFields: [ + { // 사용자 정의 필드 + key: "sprint", + css: "custom_style", + label: "Sprint" + } + ] +}; + +new kanban.Kanban("#root", { + cards, + columns, + cardShape, + // 기타 매개변수 +}); +~~~ + +**변경 로그:** +- ***comments***, ***css*** 및 ***votes*** 매개변수가 v1.4에 추가됨 +- ***menu.items[0].label*** 매개변수가 v1.4에서 폐기되고 ***menu.items[0].text*** 매개변수로 대체됨 +- ***menu.items[0].items*** 매개변수가 v1.4에서 폐기되고 ***menu.items[0].data*** 매개변수로 대체됨 +- ***users.maxCount*** 및 ***votes.clickable*** 매개변수가 v1.6에 추가됨 +- ***menu.items[0].label*** 및 ***menu.items[0].items*** 매개변수가 v1.7에서 제거됨 +- ***menu.items*** 함수가 업데이트되어 v1.7에서 **store** 매개변수가 **readonly**로 대체됨 + +**관련 문서:** [구성](guides/configuration.md#cards) + +**관련 샘플:** +- [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) +- [Kanban. Highlighting outdated and active tasks](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban) +- [Kanban. Styling cards](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) +- [Kanban. Unlimited user assignments per task](https://snippet.dhtmlx.com/w205dvzg?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md new file mode 100644 index 0000000..20db616 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md @@ -0,0 +1,73 @@ +--- +sidebar_label: cardTemplate +title: cardTemplate 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 cardTemplate 구성에 대해 알아볼 수 있습니다. 개발자 가이드 및 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드하세요. +--- + +# cardTemplate + +### 설명 + +@short: 선택 사항입니다. 카드의 새로운 HTML 템플릿을 반환하고 적용합니다. + +### 사용법 + +~~~jsx +function cardTemplate ({ cardFields, selected, dragging, cardShape }){ + return "카드의 HTML 템플릿"; +}; +~~~ + +### 매개변수 + +콜백 함수는 다음 매개변수를 가진 객체를 받습니다: + +- `cardFields` - 카드의 데이터 객체 +- `selected` - 카드의 선택 상태 +- `dragging` - 카드의 드래그 상태 +- `cardShape` - 카드의 구성 객체 + +:::important +카드 템플릿에 컨텍스트 메뉴를 포함해야 하는 경우, 템플릿 마크업에 사용자 지정 아이콘을 지정하고 아래 예제처럼 `data-menu-id=${cardFields.id}` 표현식을 제공하세요. +::: + +### 예제 + +~~~jsx {1-23,28} +const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + const { label, color, id } = cardFields; + if (selected) { + return ` +
+
+
+ +
+ Selected:${label} +
+ `; + } + return ` +
+
+
+ +
+ ${label} +
+ `; +} + +new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // 기타 매개변수 +}); +~~~ + +**변경 로그:** 컨텍스트 메뉴를 표시하는 기능은 v1.4에서 추가되었습니다. + +**관련 문서:** [커스터마이징](guides/customization.md#custom-cards) + +**관련 샘플:** [Kanban. Custom card](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md new file mode 100644 index 0000000..81e2dfa --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md @@ -0,0 +1,58 @@ +--- +sidebar_label: columnKey +title: columnKey 설정 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 columnKey 설정에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# columnKey + +### 설명 + +@short: 선택 사항입니다. 카드가 어느 열에 속하는지 정의합니다. + +:::info +카드를 열에 분배하려면 키(**column** 또는 *사용자 정의* 키)를 지정하고 카드 데이터 객체 내에서 원하는 열의 **ID**로 설정해야 합니다. 위젯 구성 객체에서 **columnKey** 속성은 이 키로 설정되어야 합니다. +::: + +### 사용법 + +~~~jsx {} +columnKey?: string; +~~~ + +### 기본 설정 + +:::note +**columnKey** 속성을 통해 열 키를 등록하지 않으면, 위젯은 기본적으로 **"column"** 키를 사용합니다! 이 경우 카드 데이터 객체 내에서 필요한 열의 **ID**를 **column** 키에 설정해야 합니다. + +~~~jsx {3} +const cards = [ + { + column: "backlog", + // 기타 데이터 + } +]; +~~~ +::: + +### 예제 + +~~~jsx {4,8,15} +const cards = [ + { + label: "Backlog task", + column_custom_key: "backlog" + }, + { + label: "In progress task", + column_custom_key: "inprogress" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + columnKey: "column_custom_key", + // 기타 매개변수 +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md new file mode 100644 index 0000000..024c0ab --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md @@ -0,0 +1,123 @@ +--- +sidebar_label: columns +title: columns 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 columns 구성에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# columns + +### 설명 + +@short: 선택 사항입니다. 열 데이터를 포함하는 객체 배열입니다. + +### 사용법 + +~~~jsx {} +columns?: [ + { + id: string, + label?: string, + collapsed?: boolean, + limit?: number | object, + strictLimit?: boolean, + css?: string, + overlay?: any + }, + {...} // 다른 열 데이터 +]; +~~~ + +### 매개변수 + +각 열에 대해 다음 매개변수(데이터)를 지정할 수 있습니다: + +- `id` - (필수) 열 **ID**입니다. 해당 메서드를 통해 열을 관리할 때 사용됩니다. +- `label` - (선택) 열 레이블입니다. 열 섹션에 표시됩니다. +- `collapsed` - (선택) 열의 현재 상태입니다. ***true***이면 열이 처음에 접혀 있습니다. 기본값은 ***false*** (확장 상태)입니다. +- `limit` - (선택) 이 매개변수는 두 가지 유형의 값을 가질 수 있습니다: + - `number` - 현재 열의 카드 수 제한 + - `object` - 각 행(swimlane)의 ID별 카드 제한을 가진 객체 +- `strictLimit` - (선택) 엄격한 제한 모드입니다. ***true***이면 사용자가 **limit** 매개변수를 통해 지정된 수를 초과하여 새 카드를 생성할 수 없습니다. 기본값은 ***false***입니다. +- `css` - (선택) 개별 열에 적용할 CSS 스타일을 정의합니다. +- `overlay` - (선택) 개별 열에 오버레이 레이어를 정의합니다. 다음과 같이 별도의 열을 덮는 템플릿을 지정할 수 있습니다: + + ~~~jsx {} + overlay: template(` +
+ 드롭이 허용되지 않습니다 + 테스터만 이 열로 카드를 이동할 수 있습니다 +
`) + ~~~ + +:::info +열에 대한 새 데이터를 동적으로 로드하려면 [`parse()`](../../methods/js_kanban_parse_method) 메서드를 사용할 수 있습니다! +::: + +### 예제 + +~~~jsx {1-31,34} +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true, + css: "red" + }, + { + label: "In progress", + id: "inprogress", + collapsed: false, + limit: { + // "In progress" 열의 "Feature" 및 "Task" 행에 대한 카드 수 제한 + feature: 3, + task: 2 + }, + strictLimit: false + }, + { + label: "Done", + id: "done", + overlay: template(` +
+ 드롭이 허용되지 않습니다 + 테스터만 이 열로 카드를 이동할 수 있습니다 +
`) + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + // 기타 매개변수 +}); +~~~ + +### 사용자 정의 스타일링 + +`css` 매개변수를 사용하여 열에 사용자 정의 스타일을 적용하려면, 사용자 정의 클래스에 대한 CSS 규칙을 추가하세요. + +```css +.wx-header .wx-column.red, +.wx-column.red { + background: #FFA29C; +} +``` + +스타일이 적용되지 않는 경우 다음을 확인하세요: + +- 선택자가 충분한 컨텍스트(예: 상위 요소 및 내부 DHTMLX 클래스)를 포함하는지 +- 인라인 스타일에 의해 속성이 덮어씌워졌다면 `!important`를 사용할 수 있습니다. + +**변경 기록:** **css** 및 **overlay** 매개변수는 v1.4에 추가되었습니다. + +**관련 문서:** +- [데이터 작업하기](guides/working_with_data.md) +- [updateColumn()](api/methods/js_kanban_updatecolumn_method.md) + +**관련 샘플:** +- [Kanban. 열 및 swimlane 제한](https://snippet.dhtmlx.com/2blo6hx8?tag=kanban) +- [Kanban. 사용자 정의 메뉴를 통한 열 색상 변경](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [Kanban. 특정 열로의 드래그 앤 드롭 비활성화](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md new file mode 100644 index 0000000..1bb75f4 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md @@ -0,0 +1,216 @@ +--- +sidebar_label: columnShape +title: columnShape 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 columnShape 구성에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# columnShape + +### 설명 + +@short: 선택 사항입니다. 컬럼 모양 관리를 위한 설정 객체입니다. + +### 사용법 + +~~~jsx {} +columnShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled?: boolean, + onClick?: ({ id, item, column }) => void, + data?: array // 메뉴 하위 항목 배열 + }, + {...} + ] | ({ column, columnIndex, columns, readonly }) => array | null + }, + fixedHeaders?: boolean, + css?: (column, cards) => string, + headerTemplate?: template(column => { + return "확장된 상태의 컬럼 헤더 HTML 템플릿"; + }), + collapsedTemplate?: template(column => { + return "축소된 상태의 컬럼 헤더 HTML 템플릿"; + }), + confirmDeletion?: boolean +}; +~~~ + +### 매개변수 + +컬럼 모양을 구성하려면 **columnShape** 객체에서 다음 매개변수를 지정할 수 있습니다: + +- `menu` - (선택 사항) 컬럼 컨텍스트 메뉴의 매개변수 객체입니다. 다음 매개변수를 지정할 수 있습니다: + - `show` - (선택 사항) 컬럼 컨텍스트 메뉴 활성화/비활성화 + - `items` - (선택 사항) 컬럼 컨텍스트 메뉴 항목 매개변수를 담은 객체 배열입니다. 각 항목에 대해 다음 매개변수를 지정할 수 있습니다: + - `id` - (선택 사항) 메뉴 항목 ID입니다. 내장 동작을 구현하려면 다음 값을 지정해야 합니다: + - ***"add-card"*** - 새 카드 추가 동작 정의 + - ***"set-edit"*** - 컬럼 이름 편집 동작 정의 + - ***"move-column:left"*** - 컬럼을 왼쪽으로 이동하는 동작 정의 + - ***"move-column:right"*** - 컬럼을 오른쪽으로 이동하는 동작 정의 + - ***"delete-column"*** - 컬럼 삭제 동작 정의 + + - `icon` - (선택 사항) 메뉴 항목 아이콘 클래스 이름입니다. 아이콘 폰트 관련 아이콘을 지정할 수 있습니다 (*mdi-delete* 등) + - `text` - (선택 사항) 메뉴 항목 이름 + - `disabled` - (선택 사항) 메뉴 항목 상태 (*active* 또는 *disabled*, boolean 값에 따라 결정) + - `onClick` - (선택 사항) 다음 인자를 받는 사용자 정의 콜백 함수: + - ***id*** - 현재 메뉴 항목 ID + - ***item*** - 현재 메뉴 항목 데이터 객체 + - ***column*** - 대상 컬럼 데이터 객체 + + - `data` - (선택 사항) 메뉴 하위 항목을 나타내는 객체 배열 + + :::info + `menu.items` 매개변수에 다음 인자를 받는 사용자 정의 함수도 지정할 수 있습니다: + - ***column*** - 현재 컬럼 데이터 객체 + - ***columnIndex*** - 현재 컬럼 인덱스 + - ***columns*** - 모든 컬럼 데이터를 담은 객체 배열 + - ***readonly*** - 읽기 전용 [상태 속성](api/internal/js_kanban_getstate_method.md) 객체 + + 이 함수는 특정 컬럼에 대해 메뉴를 맞춤 설정하거나 특정 컬럼에 대해 메뉴를 숨길 수 있습니다 (null 또는 false 반환): + + ~~~jsx {} + items: ({ column }) => { + if(column.id === "inprogress"){ + return null; + } + if (column.id === "backlog"){ + return [ + { id: "set-edit", icon: "wxi-edit", text: "이름 변경" }, + { + id: "delete-card", + icon: "wxi-delete", + text: "카드 제거" + } + ]; + } + } + ~~~ + ::: + +- `fixedHeaders` - (선택 사항) 수직 스크롤 시 컬럼 헤더 고정 (기본값 *true*). Kanban 자체에서 스크롤이 활성화되어야 하며 (높이 제한 필요) +- `css` - (선택 사항) 조건에 따라 컬럼에 적용할 CSS 클래스를 반환하는 함수 +- `headerTemplate` - (선택 사항) 확장된 상태의 컬럼 헤더 HTML 템플릿 +- `collapsedTemplate` - (선택 사항) 축소된 상태의 컬럼 헤더 HTML 템플릿 +- `confirmDeletion` - (선택 사항) 컬럼 삭제 확인 대화상자 표시 여부 + +### 기본 구성 + +~~~jsx {} +const getDefaultColumnMenuItems = ({ column, columnIndex, columns, readonly }) => [ + { id: "add-card", icon: "wxi-plus", text: "새 카드 추가" }, + { id: "set-edit", icon: "wxi-edit", text: "이름 변경" }, + { + id: "move-column:left", + icon: "wxi-arrow-left", + text: "왼쪽으로 이동", + disabled: columnIndex <= 0 + }, + { + id: "move-column:right", + icon: "wxi-arrow-right", + text: "오른쪽으로 이동", + disabled: columnIndex >= columns.length - 1 + }, + { id: "delete-column", icon: "wxi-delete", text: "삭제" } +]; +const columnShape = { + menu: { + show: true, + items: getDefaultColumnMenuItems + }, + fixedHeaders: true, + confirmDeletion: true +}; +~~~ + +### 예제 + +~~~jsx {1-58,64} +const columnShape = { + menu: { + show: true, + items: [ + { + id: "color", + text: "색상", + data: [ + { + id:"yellow", + text: "노란색", + onClick: ({ column }) => changeColumnColor(column, "yellow") + }, + { + id:"red", + text: "빨간색", + onClick: ({ column }) => changeColumnColor(column, "red") + }, + { + id:"green", + text: "초록색", + onClick: ({ column }) => changeColumnColor(column, "green") + } + ] + } + ] + }, + fixedHeaders: false, + css: (column, cards) => column.id == "inprogress" && cards.length < 5 ? "green" : "red", + headerTemplate: template(column => { + return `
+ +
+ ${ + !column.column.collapsed + ? `
+ ${escapeHTML(column.column.label)} + (${column.columnState.cardsCount}) +
` + : "" + } + ${ + !column.column.collapsed + ? `
+ +
` + : "" + }`; + }), + collapsedTemplate: template(column => { + return `
+
${escapeHTML(column.column.label)} (${ + column.columnState?.cardsCount + })
+
`; + }), + confirmDeletion: true +}; + +new kanban.Kanban("#root", { + cards, + columns, + rows, + columnShape, + // 기타 매개변수 +}); +~~~ + +**변경 기록:** +- ***css*** 매개변수가 v1.4에 추가됨 +- ***menu.items[0].label*** 매개변수가 v1.4에 ***menu.items[0].text*** 매개변수로 대체됨 +- ***menu.items[0].items*** 매개변수가 v1.4에 ***menu.items[0].data*** 매개변수로 대체됨 +- ***fixedHeaders*** 매개변수가 v1.5에 추가됨 +- ***headerTemplate*** 및 ***collapsedTemplate*** 매개변수가 v1.6에 추가됨 +- ***menu.items[0].label*** 및 ***menu.items[0].items*** 매개변수가 v1.7에 제거됨 +- ***menu.items*** 함수가 업데이트되어 v1.7에서 **store** 매개변수가 **readonly**로 대체됨 + +**관련 문서:** [구성](guides/configuration.md) + +**관련 샘플:** +- [Kanban. 사용자 정의 메뉴를 통한 컬럼 색상 변경](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [Kanban. 고정 헤더, 지연 렌더링 및 컬럼 스크롤](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) +- [Kanban. 컬럼 헤더 템플릿](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md new file mode 100644 index 0000000..736603e --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md @@ -0,0 +1,36 @@ +--- +sidebar_label: currentUser +title: currentUser 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 currentUser 구성에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# currentUser + +### 설명 + +@short: 선택 사항입니다. 현재 사용자의 ID입니다. + +:::note +현재 사용자 ID는 [`cardShape.users`](api/config/js_kanban_cardshape_config.md) 속성에 지정된 ID 중 하나와 일치해야 합니다. 이 ID를 지정하지 않으면 댓글은 읽기 전용으로만 사용할 수 있습니다. +::: + +### 사용법 + +~~~jsx {} +currentUser?: string | number; +~~~ + +### 예제 + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + currentUser: 1, + // 기타 매개변수 +}); +~~~ + +**변경 로그:** 이 속성은 v1.4에서 추가되었습니다. + +**관련 샘플:** [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md new file mode 100644 index 0000000..0f16137 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md @@ -0,0 +1,62 @@ +--- +sidebar_label: editor +title: editor 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 editor 구성에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# editor + +### 설명 + +@short: 선택 사항입니다. Kanban 편집기를 구성하기 위한 설정 객체입니다. + +### 사용법 + +~~~jsx {} +editor?: { + show?: boolean, + autoSave?: boolean, + debounce?: number, + placement?: "sidebar" | "modal" +}; +~~~ + +### 매개변수 + +- `show` - (선택 사항) - 편집기 활성화/비활성화 +- `autoSave` - (선택 사항) 편집기의 자동 저장 모드 활성화/비활성화 +- `debounce` - (선택 사항) 자동 저장 지연 시간 (***autoSave: true*** 매개변수와 함께 작동) +- `placement` - (선택 사항) 편집기 위치 지정. 다음 값을 설정할 수 있습니다: + - `"sidebar"` - 편집기를 사이드바로 표시 + - `"modal"` - 편집기를 모달 창으로 표시 + +### 기본 구성 + +~~~jsx {} +editor: { + show: true, + debounce: 100, + autoSave: true, + placement: "sidebar" +} +~~~ + +### 예제 + +~~~jsx {4-8} +new kanban.Kanban("#root", { + columns, + cards, + editor: { + show: true + autoSave: true, + debounce: 2000, + placement: "modal" + } + // 기타 매개변수 +}); +~~~ + +**변경 기록:** `placement` 매개변수는 v1.6에서 추가되었습니다. + +**관련 샘플:** [Kanban. 모달 창에서 편집기 열기](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md new file mode 100644 index 0000000..cc07eb5 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md @@ -0,0 +1,44 @@ +--- +sidebar_label: editorAutoSave +title: editorAutoSave 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 editorAutoSave 구성에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# + +

editorAutoSave

+ +:::danger +버전 1.3부터 `editorAutoSave` 속성은 **더 이상 사용되지 않습니다**. "autosave" 모드를 관리하려면 [`editor`](api/config/js_kanban_editor_config.md) 속성을 사용하세요! +::: + +### 설명 + +@short: 선택 사항입니다. 자동 저장 모드를 활성화/비활성화합니다. + +:::info +이 매개변수를 사용하여 Kanban의 자동 저장 모드를 활성화하거나 비활성화할 수 있습니다. **editorAutoSave** 속성을 **false**로 설정하면, 편집기가 편집된 데이터를 저장하는 "저장" 버튼을 표시합니다. +::: + +### 사용법 + +~~~jsx {} +editorAutoSave?: boolean; // (기본값은 true) +~~~ + +### 기본 구성 + +~~~jsx {} +editorAutoSave: true +~~~ + +### 예제 + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + editorAutoSave: false, // 자동 저장 비활성화 + // 기타 매개변수 +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md new file mode 100644 index 0000000..d1d090f --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md @@ -0,0 +1,472 @@ +--- +sidebar_label: editorShape +title: editorShape 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 editorShape 구성을 학습할 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# editorShape + +### 설명 + +@short: 선택 사항입니다. Kanban 편집기의 외관과 기능을 관리하는 설정이 포함된 객체 배열입니다. + +### 사용법 + +~~~jsx {3,8,28,42,52,73,88,97,108,117,125} +editorShape?: [ + { + // 모든 유형에 공통적인 매개변수 + type: string, + key: string, + label?: string, + + // "dateRange" 유형에만 해당 + key: { + start: string, + end: string + }, + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + done?: boolean, + error?: boolean, + format?: string, + months?: number, + placeholder?: string, + title?: string, + width?: string + }, + + // "date" 유형에만 해당 + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + error?: boolean, + format?: string, + placeholder?: string, + title?: string, + width?: string + }, + + // "color" 유형에만 해당 + values?: array, + config?: { + clear?: boolean, + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string + }, + + // "combo", "select", "multiselect" 유형에만 해당 + values?: [ + { + id: string | number, + label: string, + avatar?: string // "multiselect" 유형에만 해당 + }, + {...} // 기타 옵션 + ], + config?: { + clear?: boolean, // "combo" 및 "color" 유형에만 해당 + label?: string, // "select" 유형에만 해당 + checkboxes?: boolean, // "multiselect" 유형에만 해당 + // 공통 매개변수 + disabled?: boolean, + error?: boolean, + placeholder?: string, + textField?: string, + title?: string + }, + + // "text" 유형에만 해당 + config?: { + css?: string, + disabled?: boolean, + error?: boolean, + focus?: boolean, + icon?: string, + inputStyle?: string, + placeholder?: string, + readonly?: boolean, + select?: boolean, + title?: string, + type?: string + }, + + // "textarea" 유형에만 해당 + config? { + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string, + readonly?: boolean + }, + + // "progress" 유형에만 해당 + config?: { + disabled?: boolean, + label?: string, + max?: number, + min?: number, + step?: number, + title?: string, + width?: number + }, + + // "files" 유형에만 해당 + uploadURL?: string | function, + config?: { + accept?: string, + disabled?: boolean, + multiple?: boolean, + folder?: boolean, + }, + + // "comments" 유형에만 해당 + config?: { + format?: string, + placement?: "page" | "editor", + html?: boolean, + confirmDeletion?: boolean + }, + + // "links" 유형에만 해당 + config?: { + confirmDeletion?: boolean + }, + }, { /* 기타 컨트롤 설정 */ } +]; +~~~ + +### 매개변수 + +편집기 외관과 기능을 구성하려면 다음 매개변수(필드)를 지정할 수 있습니다: + +#### - 모든 유형에 공통적인 매개변수 + +- `type` - (필수) 편집기 필드 유형 + +:::important +Kanban 편집기에서는 다음 필드 유형을 사용할 수 있습니다: **dateRange**, **date**, **combo**, **select**, **multiselect**, **color**, **text**, **textarea**, **progress**, **files**, **comments**, **links** +::: + +- `key` - (필수) 편집기 필드 키. 이 값은 [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성에 지정된 값을 사용해야 합니다. 아래 예시를 참고하세요: + +~~~js {8,17} + // 카드 외관 설정 + const cardShape = { + ...kanban.defaultCardShape, + headerFields: [ + { // 사용자 정의 필드 + label: "Custom field", + css: "custom_style", + key: "custom_key" + } + ] + }; + // 편집기 외관 설정 + const editorShape = [ + { + label: "Custom field", + type: "text", + key: "custom_key" + } + ]; +~~~ + +- `label` - (선택 사항) 편집기 필드 레이블 + +#### - "dateRange" 유형 매개변수 + +- `key` - (필수) 편집기 필드 키 객체. 다음 매개변수를 지정할 수 있습니다: + - `start` - (필수) 시작 날짜 키 + - `end` - (필수) 종료 날짜 키 + +:::important +이 키 값들은 [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성에서 사용됩니다! +::: + +- `config` - (선택 사항) **"dateRange"** 필드의 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `align` - (선택 사항) 달력 팝업의 정렬 위치 설정 + - `editable` - (선택 사항) 날짜 선택기가 편집 가능한지 여부 및 선택적 사용자 지정 형식 설정 + - `buttons` - (선택 사항) 달력 팝업 하단의 Today 및 Clear 버튼 표시 여부 + - `css` - (선택 사항) Date Range 컨트롤 내 아이콘 위치 변경 + - `disabled` - (선택 사항) Date Range 컨트롤 비활성화 여부 + - `done` - (선택 사항) Date Range 컨트롤 내 Done 버튼 표시 여부 + - `error` - (선택 사항) 오류 스타일 적용 여부 + - `format` - (선택 사항) 날짜 형식 설정. 사용 가능한 매개변수는 [여기](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/)에서 확인 + - `months` - (선택 사항) Date Range 컨트롤에 표시할 달력 수 + - `placeholder` - (선택 사항) 플레이스홀더 설정 + - `title` - (선택 사항) 추가 정보용 타이틀 설정 + - `width` - (선택 사항) 달력 팝업 너비 설정 + +#### - "date" 유형 매개변수 + +- `config` - (선택 사항) **"date"** 필드의 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `align` - (선택 사항) 달력 팝업 정렬 위치 + - `editable` - (선택 사항) 날짜 선택기 편집 가능 여부 및 사용자 지정 형식 설정 + - `buttons` - (선택 사항) Today 및 Clear 버튼 표시 여부 + - `css` - (선택 사항) 아이콘 위치 변경 + - `disabled` - (선택 사항) 컨트롤 비활성화 여부 + - `error` - (선택 사항) 오류 스타일 적용 여부 + - `format` - (선택 사항) 날짜 형식 설정. 자세한 내용은 [여기](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) 참조 + - `placeholder` - (선택 사항) 플레이스홀더 설정 + - `title` - (선택 사항) 추가 정보용 타이틀 설정 + - `width` - (선택 사항) 달력 팝업 너비 설정 + +#### - "color" 유형 매개변수 + +- `values` - (선택 사항) 유효한 HEX 코드 배열 +- `config` - (선택 사항) **"color"** 필드 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `placeholder` - (선택 사항) 플레이스홀더 설정 + - `clear` - (선택 사항) Color 컨트롤의 "clear" 아이콘 표시 여부 + - `disabled` - (선택 사항) 컨트롤 비활성화 여부 + - `error` - (선택 사항) 오류 스타일 적용 여부 + - `title` - (선택 사항) 추가 정보용 타이틀 설정 + +#### - "combo", "select", "multiselect" 유형 매개변수 + +- `values` - (선택 사항) 드롭다운 옵션 데이터 객체 배열. 다음 매개변수를 지정할 수 있습니다: + - `id` - (필수) 옵션 ID + - `label` - (필수) 옵션 레이블 + - `avatar` - (선택 사항) 옵션 미리보기 이미지 경로 ("multiselect" 유형에만 해당) + +:::important +단일 사용자 할당 컨트롤은 ***"select"*** 또는 ***"combo"*** 유형을 사용해야 합니다! 여러 사용자 할당은 ***"multiselect"*** 유형을 사용하세요. +::: + +- `config` - (선택 사항) **"combo"**, **"select"**, **"multiselect"** 필드 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `clear` - (선택 사항) 콤보 입력에 Clear 버튼 추가 (**"combo" 및 "color" 유형에만 해당**) + - `label` - (선택 사항) 지정된 키로 옵션을 입력 필드에 바인딩 (**"select" 유형에만 해당**) + - `checkboxes` - (선택 사항) 옵션 옆에 체크박스 표시 여부 (**"multiselect" 유형에만 해당**) + - `textField` - (선택 사항) 지정된 키로 콤보 옵션을 입력 필드에 바인딩 (**"combo" 및 "multiselect" 유형에만 해당**) + + - `disabled` - (선택 사항) 컨트롤 비활성화 여부 + - `error` - (선택 사항) 오류 스타일 적용 여부 + - `placeholder` - (선택 사항) 플레이스홀더 설정 + - `title` - (선택 사항) 추가 정보용 타이틀 설정 + +#### - "text" 유형 매개변수 + +- `config` - (선택 사항) **"text"** 필드 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `css` - (선택 사항) Text 컨트롤 내 아이콘 위치 설정 + - `disabled` - (선택 사항) 컨트롤 비활성화 여부 + - `error` - (선택 사항) 오류 스타일 적용 여부 + - `focus` - (선택 사항) Text 컨트롤에 포커스 설정 + - `icon` - (선택 사항) Text 컨트롤에 아이콘 추가 + - `inputStyle` - (선택 사항) Text 컨트롤에 사용자 지정 스타일 적용 + - `placeholder` - (선택 사항) 플레이스홀더 설정 + - `readonly` - (선택 사항) 읽기 전용 여부 설정 + - `select` - (선택 사항) Text 컨트롤 내용 선택 여부 + - `title` - (선택 사항) 추가 정보용 타이틀 설정 + - `type` - (선택 사항) Text 컨트롤 타입 설정 + +#### - "textarea" 유형 매개변수 + +- `config` - (선택 사항) **"textarea"** 필드 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `disabled` - (선택 사항) 컨트롤 비활성화 여부 + - `error` - (선택 사항) 오류 스타일 적용 여부 + - `placeholder` - (선택 사항) 플레이스홀더 설정 + - `title` - (선택 사항) 추가 정보용 타이틀 설정 + - `readonly` - (선택 사항) 읽기 전용 여부 설정 + +#### - "progress" 유형 매개변수 + +- `config` - (선택 사항) **"progress"** 필드 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `disabled` - (선택 사항) 컨트롤 비활성화 여부 + - `label` - (선택 사항) Progress 컨트롤 위 레이블 설정 + - `max` - (선택 사항) 최대값 설정 + - `min` - (선택 사항) 최소값 설정 + - `step` - (선택 사항) 값 간 증분 설정 + - `title` - (선택 사항) 추가 정보용 타이틀 설정 + - `width` - (선택 사항) Progress 컨트롤 너비 설정 + +#### - "files" 유형 매개변수 + +- `uploadURL` - (선택 사항) 편집기 업로더 URL. 자세한 내용은 아래 참조 + +
+ +`uploadURL` 속성은 **문자열** 또는 **함수**로 지정할 수 있습니다. 다음 예시는 함수로 업로드 URL을 설정하는 방법입니다: + +~~~jsx {} +uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // 토큰 또는 기타 헤더 + } + }; + + return fetch(url + "/uploads", config) // URL 지정 + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); +} +~~~ + +여기서 `rec`는 함수의 유일한 매개변수이며 확장된 `PointerEvent` 객체입니다 (기본 타입에 4가지 속성 추가): + +~~~jsx {} +interface UploadEvent extends PointerEvent { + id: number; + status: "client" | "server" | "error"; // 각각 "아직 전송 안 됨", "성공적으로 전송됨", "오류 발생" 의미 + name: string; // 파일 이름 + file: string | Blob; // 파일 +} +~~~ + +
+ +- `config` - (선택 사항) **"files"** 필드 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `accept` - (선택 사항) 업로드할 파일 유형 (예: ***"image/*", "video/*", "audio/*"*** 등) + - `disabled` - (선택 사항) 파일 업로드 활성화/비활성화 + - `multiple` - (선택 사항) 다중 파일 업로드 활성화/비활성화 + - `folder` - (선택 사항) 폴더 업로드 활성화/비활성화 + +#### - "comments" 유형 매개변수 + +- `config` - (선택 사항) **"comments"** 필드 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `format` - (선택 사항) 댓글 날짜 형식. 가능한 형식은 [여기](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/)에서 확인 + - `placement` - (선택 사항) 댓글 표시 위치. 다음 값 중 하나를 설정할 수 있습니다: + - `"editor"` - 편집기 내에 댓글 표시 + - `"page"` - 별도 패널에 댓글 표시 + - `html` - (선택 사항) 댓글에 HTML 마크업 사용 활성화/비활성화 + - `confirmDeletion` - (선택 사항) 댓글 삭제 확인 대화상자 표시 여부 + +#### - "links" 유형 매개변수 + +- `config` - (선택 사항) **"links"** 필드 구성 객체. 다음 매개변수를 지정할 수 있습니다: + - `confirmDeletion` - (선택 사항) 링크 삭제 확인 대화상자 표시 여부 + +:::info +`editorShape` 속성을 통해 편집기 설정을 지정하지 않으면, 위젯은 **defaultEditorShape** 기본 설정 매개변수 집합을 적용합니다! +::: + +### 기본 구성 + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "High" }, + { id: 2, color: "#F1B941", label: "Medium" }, + { id: 3, color: "#77D257", label: "Low" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +const defaultEditorShape = [ + { + key: "label", + type: "text", + label: "Label" + }, + { + key: "description", + type: "textarea", + label: "Description" + }, + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clear: true + } + }, + { + type: "color", + label: "Color", + key: "color" + }, + { + type: "progress", + key: "progress", + label: "Progress" + }, + { + type: "date", + key: "start_date", + label: "Start date" + }, + { + type: "date", + key: "end_date", + label: "End date" + }, + { + type: "multiselect", + key: "users", + label: "Users" + } +]; +~~~ + +### 예시 + +~~~jsx {6-33,38} +const users = [ // 사용자 데이터 + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const editorShape = [ // 편집기 설정 + ...kanban.defaultEditorShape, // 기본 설정 포함 + { // 사용자 정의 필드 추가 + type: "multiselect", + key: "users", + label: "Users", + values: users + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", + html: true, + confirmDeletion: true + } + }, + { + type: "links", + key:"links", + label: "Links", + config: { + confirmDeletion: true + } + } +]; + +new kanban.Kanban("#root", { + cards, + columns, + editorShape, + // 기타 매개변수 +}); +~~~ + +**변경 이력:** + +- v1.3에서 ***dateRange*** 유형 추가 +- v1.4에서 ***comments*** 및 ***links*** 편집기 유형과 ***format*** 매개변수 추가 +- ***clearButton*** 매개변수가 ***clear*** 매개변수로 대체됨 + +**관련 문서:** [구성](guides/configuration.md/#editor) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md new file mode 100644 index 0000000..e6c429c --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: history +title: history 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 history 구성에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# history + +### 설명 + +@short: 선택 사항입니다. 변경 이력 관리를 활성화/비활성화합니다. + +:::info +`history` 속성을 사용하여 Kanban의 변경 이력 관리를 활성화하거나 비활성화할 수 있습니다. 이를 **false**로 설정하면 API 및 툴바 컨트롤을 통해 이력 관리를 할 수 없습니다. +::: + +:::tip +메서드와 이벤트에서 [`$meta`](api/common/js_kanban_meta_parameter.md) 파라미터를 사용하여 Kanban 이력에서 일부 작업을 건너뛸 수도 있습니다! +::: + +### 사용법 + +~~~jsx {} +history?: boolean; +~~~ + +### 기본 구성 + +~~~jsx {} +history: true +~~~ + +### 예제 + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + history: false, // 이력 관리 비활성화 + // 기타 파라미터 +}); +~~~ + +**변경 로그:** 이 속성은 v1.3에 추가되었습니다. + +**관련 문서:** [`undo()`](api/methods/js_kanban_undo_method.md) 및 [`redo()`](api/methods/js_kanban_redo_method.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md new file mode 100644 index 0000000..36be860 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: 링크 +title: links 구성 +description: DHTMLX JavaScript Kanban 라이브러리의 links 구성에 대해 문서에서 배울 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# links + +### 설명 + +@short: 선택 사항입니다. 링크 데이터를 포함하는 객체 배열입니다. + +### 사용법 + +~~~jsx {} +links?: [ + { + id: string | number, + source: string | number, + target: string | number, + relation: "relatesTo" | "requiredFor" | "duplicate" | "parent" + }, {...} // 다른 링크 데이터 +]; +~~~ + +### 매개변수 + +각 링크에 대해 다음 매개변수(데이터)를 지정할 수 있습니다: + +- `id` - (필수) 링크의 ID +- `source` – (필수) 링크 시작점에 있는 카드의 ID (예: “작업 A가 작업 B에 필요함”) +- `target` – (필수) 링크 끝점에 있는 카드의 ID (예: “작업 B가 작업 A에 의존함”) +- `relation` - (필수) 링크 유형. 다음 유형 중 하나를 지정할 수 있습니다: + - ***"relatesTo"*** - 현재 작업이 다른 작업과 연결된 의존 관계를 정의합니다. + - ***"requiredFor"*** - 한 작업이 다른 작업이 완료되어야 함을 요구하는 의존 관계를 정의합니다. + - ***"duplicate"*** - 중복 작업 간의 의존 관계를 정의합니다. + - ***"parent"*** - 상위(마스터) 작업과 하위(슬레이브) 작업 간의 의존 관계를 정의합니다. + +:::info +링크에 대한 새 데이터를 동적으로 로드하려면 [**parse()**](api/methods/js_kanban_parse_method.md) 메서드를 사용할 수 있습니다! +::: + +### 예제 + +~~~jsx {1-8,13} +const links = [ + { + id: 1, + source: 2, + target: 5, + relation: "relatesTo", + }, {...} // 다른 링크 데이터 +]; + +new kanban.Kanban("#root", { + columns, + cards, + links + // 기타 매개변수 +}); +~~~ + +**변경 로그:** 이 속성은 v1.7에서 업데이트되었습니다: + - **masterId** 매개변수가 **source** 매개변수로 대체되었습니다. + - **slaveId** 매개변수가 **target** 매개변수로 대체되었습니다. + +**관련 문서:** [데이터 작업하기](guides/working_with_data.md) + +**관련 샘플:** [Kanban. 작업 간 링크](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md new file mode 100644 index 0000000..79dee54 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md @@ -0,0 +1,45 @@ +--- +sidebar_label: locale +title: locale 설정 +description: DHTMLX JavaScript Kanban 라이브러리의 locale 설정에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# locale + +### 설명 + +@short: 선택 사항입니다. Kanban의 사용자 정의 locale 객체입니다. + +:::info +**locale** 객체는 Kanban과 Toolbar의 모든 레이블과 해당 번역을 포함해야 합니다. +::: + +### 사용법 + +~~~jsx {} +locale?: object; +~~~ + +### 기본 설정 + +기본적으로 Kanban은 [**영어**](guides/localization.md#default-locale) locale을 사용합니다. 사용자 정의 locale로 설정할 수도 있습니다. + +:::tip +현재 locale을 동적으로 변경하려면 Kanban의 [**setLocale()**](api/methods/js_kanban_setlocale_method.md) 메서드를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {5} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // 초기 설정은 "cn" locale입니다. + // 기타 매개변수 +}); +~~~ + +**관련 문서:** [Localization](guides/localization.md) + +**관련 샘플:** [Kanban. Localization](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md new file mode 100644 index 0000000..6d534ac --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: readonly +title: readonly 구성 +description: DHTMLX JavaScript Kanban 라이브러리의 readonly 구성에 대해 문서에서 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# readonly + +### 설명 + +@short: 선택 사항입니다. 카드의 편집, 추가, 선택, 드래그 기능을 활성화/비활성화합니다. + +### 사용법 + +~~~js {} +readonly?: boolean; +//또는 +readonly?: { + edit?: boolean, + add?: boolean, + select?: boolean, + dnd?: boolean +}; +~~~ + +### 매개변수 + +**readonly 모드**를 구성하려면 **단축형** 또는 **확장형** 매개변수를 사용할 수 있습니다. + +**단축형** 매개변수: +- `readonly` - (선택 사항) Kanban의 **readonly 모드**를 활성화/비활성화합니다. + +**확장형** 매개변수: +- `readonly` - (선택 사항) 확장 설정을 포함하는 객체입니다. 다음 매개변수를 지정할 수 있습니다: + - `edit` - (선택 사항) 카드의 **편집** 기능을 활성화/비활성화합니다. + - `add` - (선택 사항) 새 카드의 **추가** 기능을 활성화/비활성화합니다. + - `select` - (선택 사항) 카드의 **선택** 기능을 활성화/비활성화합니다. + - `dnd` - (선택 사항) 카드의 **드래그** 기능을 활성화/비활성화합니다. + +### 기본 구성 + +~~~jsx {} +readonly: false // readonly 모드가 비활성화됨 +//또는 +readonly: { + edit: true, // 편집이 활성화됨 + add: true, // 추가가 활성화됨 + select: true, // 선택이 활성화됨 + dnd: true // 드래그가 활성화됨 +} +~~~ + +### 예제 + +~~~jsx {4-9} +new kanban.Kanban("#root", { + cards, + columns, + readonly: { + edit: false, // 편집 비활성화 + add: true, // 추가 활성화 + select: false, // 선택 비활성화 + dnd: true // 드래그 활성화 + }, + // 기타 매개변수 +}); +~~~ + +**관련 샘플:** [Readonly mode](https://snippet.dhtmlx.com/b8x84yln?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md new file mode 100644 index 0000000..cc2f439 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: renderType +title: renderType 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 renderType 구성에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# renderType + +### 설명 + +@short: 선택 사항입니다. 카드 렌더링 유형을 정의합니다. + +:::info +이 속성은 많은 수의 카드를 다룰 때 사용됩니다. *"lazy"*로 설정하면 위젯은 보드에서 볼 수 있는 카드의 시각적 부분만 렌더링합니다. 이는 위젯 성능을 크게 향상시킬 수 있습니다. +::: + +### 사용법 + +~~~jsx {} +renderType?: "default" | "lazy"; +~~~ + +:::important +`renderType: "lazy"`와 [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md) 설정을 함께 사용할 경우, 반드시 [`cardHeight`](api/config/js_kanban_cardheight_config.md) 속성을 통해 카드의 고정 높이를 지정해야 합니다. 지정하지 않으면 카드가 올바르게 표시되지 않습니다. +::: + +### 기본 구성 + +~~~jsx {} +renderType: "default" +~~~ + +### 예제 + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + renderType: "lazy", + // 기타 매개변수 +}); +~~~ + +**변경 로그:** 이 속성은 v1.2에서 추가되었습니다. + +**관련 문서:** [구성](guides/configuration.md#cards) + +**관련 샘플:** [Kanban. 고정 헤더, 지연 렌더링 및 컬럼 스크롤](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md new file mode 100644 index 0000000..b4e15c6 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: rowKey +title: rowKey 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 rowKey 구성에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# rowKey + +### 설명 + +@short: 선택 사항입니다. 카드가 특정 행에 속함을 정의합니다. + +:::info +카드를 행(스윔레인)으로 분배하려면, **사용자 정의 키**를 지정하고 카드 데이터 객체 내에 원하는 행의 **ID**로 설정해야 합니다. 위젯 구성 객체에서 **rowKey** 속성을 이 *사용자 정의 키*로 설정해야 합니다. +::: + +### 사용법 + +~~~jsx {} +rowKey?: string; +~~~ + +### 예제 + +~~~jsx {4,8,16} +const cards = [ + { + label: "Backlog task", + row_custom_key: "feature" + }, + { + label: "In progress task", + row_custom_key: "done" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + rowKey: "row_custom_key", + // 기타 매개변수 +}); +~~~ + +**관련 샘플:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md new file mode 100644 index 0000000..9fb7162 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md @@ -0,0 +1,65 @@ +--- +sidebar_label: rows +title: rows 설정 +description: DHTMLX JavaScript Kanban 라이브러리의 rows 설정에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# rows + +### 설명 + +@short: 선택 사항입니다. 행(스윔레인) 데이터를 포함하는 객체 배열입니다. + +### 사용법 + +~~~jsx {} +rows?: [ + { + id: string, + label?: string, + collapsed?: boolean, + css?: string, + }, {...} // 다른 행 데이터 +]; +~~~ + +:::info +스윔레인을 생성하려면 **rows** 속성 배열에 해당 데이터를 지정해야 합니다. UI를 통해 또는 [관련 API](howtos.md#how-to-work-with-rows-swimlanes)를 사용하여 스윔레인을 접거나 펼치고, 이름을 변경하고, 삭제하거나 이동할 수 있습니다. +::: + +### 매개변수 + +각 행(스윔레인)에 대해 다음 매개변수(데이터)를 지정할 수 있습니다: + +- `id` - (필수) 행(스윔레인)의 **ID**입니다. 해당 메서드를 통해 행을 관리할 때 사용됩니다. +- `label` - (선택 사항) 행(스윔레인) 레이블입니다. 행 섹션에 표시됩니다. +- `collapsed` - (선택 사항) 행(스윔레인)의 현재 상태입니다. ***true***인 경우, 행이 처음에 접혀 있습니다. 기본값은 ***false*** (펼쳐진 상태)입니다. +- `css` - (선택 사항) 개별 행에 적용할 CSS 스타일을 정의합니다. + +:::info +행(스윔레인)의 새 데이터를 동적으로 로드하려면 [**parse()**](api/methods/js_kanban_parse_method.md) 메서드를 사용할 수 있습니다! +::: + +### 예제 + +~~~jsx {1-4,9} +const rows = [ + { label: "Feature", id: "feature", collapsed: false, css: "red" }, + { label: "Task", id: "task", collapsed: true } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, // 스윔레인 데이터 + // 기타 매개변수 +}); +~~~ + +**변경 내역:** ***css*** 매개변수는 v1.4에서 추가되었습니다. + +**관련 문서:** +- [데이터 작업하기](guides/working_with_data.md) +- [updateRow()](api/methods/js_kanban_updaterow_method.md) + +**관련 샘플:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md new file mode 100644 index 0000000..41b0d8a --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md @@ -0,0 +1,188 @@ +--- +sidebar_label: rowShape +title: rowShape 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 rowShape 구성에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며 DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# rowShape + +### 설명 + +@short: 선택 사항입니다. 행의 외관을 관리하기 위한 설정 객체입니다. + +### 사용법 + +~~~jsx {} +rowShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, row }) => void, + data?: array // 메뉴 하위 항목 배열 + }, {...} // 다른 항목 데이터 + ] | ({ row, rowIndex, rows, readonly }) => array | null + }, + css?: (row, cards) => string, + confirmDeletion?: boolean +}; +~~~ + +### 매개변수 + +행의 외관을 구성하려면 **rowShape** 객체에 다음 매개변수를 지정할 수 있습니다: + +- `menu` - (선택 사항) 행 컨텍스트 메뉴의 매개변수 객체입니다. 다음 매개변수를 지정할 수 있습니다: + - `show` - (선택 사항) 행 컨텍스트 메뉴 활성화/비활성화 + - `items` - (선택 사항) 행 컨텍스트 메뉴 항목의 매개변수를 포함하는 객체 배열입니다. 각 항목에 대해 다음 매개변수를 지정할 수 있습니다: + - `id` - (선택 사항) 메뉴 항목의 ID입니다. 내장 동작을 구현하려면 다음 값을 지정해야 합니다: + - ***"set-edit"*** - 행 이름 편집 동작 정의 + - ***"move-row:up"*** - 행 위로 이동 동작 정의 + - ***"move-row:down"*** - 행 아래로 이동 동작 정의 + - ***"delete-row"*** - 행 삭제 동작 정의 + + - `icon` - (선택 사항) 메뉴 항목 아이콘의 클래스 이름입니다. 아이콘 폰트 관련 아이콘(*mdi-delete*)을 지정할 수 있습니다. + - `text` - (선택 사항) 메뉴 항목 이름 + - `disabled` - (선택 사항) 메뉴 항목 상태 (*활성* 또는 *비활성*, *boolean* 값에 따라 결정) + - `onClick` - (선택 사항) 다음 인수를 받는 사용자 정의 콜백 함수: + - ***id*** - 현재 메뉴 항목 ID + - ***item*** - 현재 메뉴 항목 데이터 객체 + - ***row*** - 대상 행 데이터 객체 + + - `data` - (선택 사항) 메뉴 하위 항목을 나타내는 객체 배열 + + :::info + `menu.items` 매개변수에 다음 인수를 받는 사용자 정의 함수도 설정할 수 있습니다: + - ***row*** - 현재 행 데이터 객체 + - ***rowIndex*** - 현재 행 인덱스 + - ***rows*** - 모든 행 데이터를 포함하는 객체 배열 + - ***readonly*** - 읽기 전용 [상태 속성](api/internal/js_kanban_getstate_method.md) 객체 + + 이 함수는 특정 행에 맞게 메뉴를 맞춤 설정하거나 특정 행에 대해 메뉴를 숨길 수 있습니다(*null* 또는 *false* 반환): + + ~~~jsx {} + items: ({ rowIndex }) => { + if(rowIndex == 0){ + return null; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", text: "이름 변경" }, + { + id: "custom-delete-row", + icon: "wxi-delete", + text: "행 제거" + }, + { + id: "custom-move-row:up", + icon: "wxi-arrow-up", + text: "위로 이동" + } + ]; + } + } + ~~~ + ::: + +- `css` - 조건에 따라 행에 적용할 CSS 클래스를 반환하는 함수 +- `confirmDeletion` - (선택 사항) 행 삭제를 사용자에게 확인 또는 취소할 수 있는 **확인 대화상자** 표시 여부 + +### 기본 구성 + +~~~jsx {} +const getDefaultRowMenuItems = ({ row, rowIndex, rows, readonly }) => [ + { id: "set-edit", icon: "wxi-edit", text: "이름 변경" }, + { + id: "move-row:up", + icon: "wxi-arrow-up", + text: "위로 이동", + disabled: rowIndex <= 0 + }, + { + id: "move-row:down", + icon: "wxi-arrow-down", + text: "아래로 이동", + disabled: rowIndex >= rows.length - 1 + }, + { id: "delete-row", icon: "wxi-delete", text: "삭제" } +]; +const rowShape = { + menu: { + show: true, + items: getDefaultRowMenuItems + }, + confirmDeletion: true +}; +~~~ + +### 예제 + +~~~jsx {10-43,48} +const changeRowColor = (row, cssClass) => board.updateRow({ + id: row.id, + row: { + css: cssClass, + collapsed: false + }, + replace: false +}); + +const rowShape = { + menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + if (rowIndex == 0){ + return false; + } else { + return [ + { + id: "color", + text: "색상", + data: [ + { + id:"gray", + text: "회색", + onClick: ({ id, item, row }) => changeRowColor(row, "gray") + }, + { + id:"yellow", + text: "노란색", + onClick: ({ id, item, row }) => changeRowColor(row, "yellow") + }, + { + id:"red", + text: "빨간색", + onClick: ({ id, item, row }) => changeRowColor(row, "red") + } + ] + } + ]; + } + } + }, + css: (row, cards) => row.id == "task" && cards.length < 3 ? "green" : "red", + confirmDeletion: false +}; + +new kanban.Kanban("#root", { + cards, + rows, + rows, + rowShape, + // 기타 매개변수 +}); +~~~ + +**변경 사항:** +- ***css*** 매개변수가 v1.4에 추가되었습니다. +- ***menu.items[0].label*** 매개변수는 v1.4에서 폐지되고 ***menu.items[0].text*** 매개변수로 대체되었습니다. +- ***menu.items[0].items*** 매개변수는 v1.4에서 폐지되고 ***menu.items[0].data*** 매개변수로 대체되었습니다. +- ***menu.items[0].label***과 ***menu.items[0].items*** 매개변수는 v1.7에서 제거되었습니다. +- ***menu.items*** 함수가 업데이트되어 v1.7에서 **store** 매개변수가 **readonly**로 대체되었습니다. + +**관련 문서:** [구성](guides/configuration.md) + +**관련 샘플:** [Kanban. 사용자 정의 메뉴를 통한 행 색상 변경](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md new file mode 100644 index 0000000..debc451 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scrollType +title: scrollType 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 scrollType 구성에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# scrollType + +### 설명 + +@short: 선택 사항입니다. 스크롤 유형을 정의합니다. + +### 사용법 + +~~~jsx {} +scrollType?: "default" | "column"; +~~~ + +:::note +`scrollType: "column"` 설정을 사용하면 각 열을 개별적으로 스크롤할 수 있습니다. +::: + +### 기본 구성 + +~~~jsx {} +scrollType: "default" +~~~ + +:::important +[`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md)와 `scrollType: "default"` 설정을 함께 사용할 경우, [`cardHeight`](api/config/js_kanban_cardheight_config.md) 속성을 통해 카드의 고정 높이를 반드시 지정해야 합니다. 지정하지 않으면 카드가 표시되지 않습니다. +::: + +### 예제 + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + scrollType: "column", + // 기타 매개변수 +}); +~~~ + +**변경 로그:** 이 속성은 v1.2에서 추가되었습니다. + +**관련 문서:** [구성](guides/configuration.md#cards) + +**관련 샘플:** [Kanban. 고정 헤더, 지연 렌더링 및 열 스크롤](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md new file mode 100644 index 0000000..eabfdd1 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md @@ -0,0 +1,98 @@ +--- +sidebar_label: 테마 +title: 테마 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 테마 구성에 대해 배울 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# 테마 + +### 설명 + +@short: 선택 사항입니다. Kanban에 적용할 테마입니다. + +### 사용법 + +~~~jsx {} +theme?: { + name: string, // "material" (기본값) | "willow" | "willow-dark" + fonts?: boolean +}; +~~~ + +:::important +`theme` 속성을 사용하는 것 외에도, 위젯 컨테이너에 해당 *css* 클래스를 추가하여 필요한 테마를 적용할 수 있습니다: + +- **Material 테마** +~~~html {} + +
+ +
+~~~ + +- **Willow 테마** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark 테마** +~~~html {} + +
+ +
+~~~ + +또는 skins 폴더에서 필요한 테마를 페이지에 포함시킬 수 있습니다: + +~~~html {} + +~~~ +::: + +### 매개변수 + +**theme**를 구성할 때 다음 매개변수를 사용할 수 있습니다. + +- `theme` - (선택 사항) 테마 설정이 포함된 객체입니다. 다음 매개변수를 지정할 수 있습니다: + - `name` - (필수) Kanban에 적용할 테마 이름 + - `fonts` - (선택 사항) CDN에서 글꼴(wxi 글꼴) 로딩을 활성화/비활성화합니다. + +:::tip +**Willow** 및 **Willow-Dark** 테마도 적용할 수 있습니다. 현재 테마를 동적으로 변경하려면 [`setTheme()`](api/methods/js_kanban_settheme_method.md) 메서드를 사용하세요. +::: + +### 기본 구성 + +기본적으로 Kanban은 **Material** 테마를 사용합니다. + +~~~jsx {} +theme: { + name: "material", + fonts: true +} +~~~ + +### 예제 + +~~~jsx {5-8} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: { + name: "willow-dark", // 초기 설정되는 "willow-dark" 테마 + fonts: false + } + // 기타 매개변수 +}); +~~~ + +**변경 기록:** 이 속성은 v1.4에서 추가되었습니다. + +**관련 문서:** [스타일링](guides/stylization.md) + +**관련 샘플:** [Kanban. CSS 클래스를 통한 테마 변경](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md new file mode 100644 index 0000000..9b1acbb --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: api +title: api 구성 +description: DHTMLX 자바스크립트 칸반 라이브러리의 (Toolbar) api 구성에 대해 문서에서 배울 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# api + +### 설명 + +@short: 필수입니다. Kanban의 내부 API가 포함된 객체입니다. + +:::info +이 경우, **Kanban의 내부 API**는 Toolbar에 위치한 **컨트롤**에 사용됩니다. +::: + +### 사용법 + +~~~jsx {} +api: object; +~~~ + +### 예제 + +~~~jsx {7} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api +}); +~~~ + +**관련 문서:** [구성](guides/configuration.md#toolbar) + +**관련 샘플:** [Kanban. 사용자 정의 툴바](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md new file mode 100644 index 0000000..0b04001 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md @@ -0,0 +1,191 @@ +--- +sidebar_label: items +title: items 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 (Toolbar) items 구성에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# items + +### 설명 + +@short: 선택 사항입니다. Kanban의 Toolbar에 배치된 컨트롤 배열입니다. + +### 사용법 + +~~~jsx {} +items?: [ + "search" | { + // 검색 매개변수 + type: "search", + options?: [ + { + id: string, + label: string, + searchRule?: (card, value, by) => { + return boolean + } + }, {...} + ], + resultTemplate?: template(searchResult => { + return "검색 결과의 HTML 템플릿"; + }) + }, + "sort" | { + // 정렬 매개변수 + type: "sort", + options?: [ + { + text: string, + by?: string, // by?: ((card: object) => any), + dir?: "asc" | "desc" + }, {...} + ] + }, + "spacer", + "undo", + "redo", + "addColumn", + "addRow", + custom_control // 문자열 또는 함수 +]; +~~~ + +### 매개변수 + +**items** 배열에서 다음 매개변수를 지정할 수 있습니다: + +:::info +#### *기본 검색바*를 설정하려면 `"search"` 문자열을 지정할 수 있습니다. +#### *사용자 정의 검색바*를 설정하려면 다음 매개변수를 포함하는 객체를 지정할 수 있습니다: + +- `type` - (필수) 컨트롤 유형 (*"search"*) +- `options` - (선택) 검색 매개변수를 정의하는 객체 배열입니다. 각 객체(*검색 옵션*)에 대해 다음 매개변수를 지정할 수 있습니다: + - `id` - (필수) 카드 필드의 키로, 이 키를 기준으로 카드가 검색됩니다. + - `label` - (필수) 검색바 선택기의 드롭다운 목록에 사용되는 옵션 이름입니다. + - `searchRule` (선택) - 검색 규칙을 정의하는 사용자 정의 함수입니다. 다음 인수를 받습니다: + - ***card*** - 카드 데이터 객체 + - ***value*** - 검색바에 입력된 검색 값 + - ***by*** - 카드가 검색될 카드 필드 키 +- `searchResult` - (선택) 사용자 정의 검색 결과를 표시하기 위한 템플릿 + +~~~jsx +items: [ + "search", // 기본 검색바 + // 기타 컨트롤 +] + +// 또는 + +items: [ + { // 사용자 정의 검색바 + type: "search", + options: [ + { + id: "label", + label: "라벨로 검색" + }, + { + id: "start_date", + label: "날짜로 검색", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + // 기타 컨트롤 +] +~~~ +::: + +:::info +#### *기본 정렬 컨트롤*을 설정하려면 `"sort"` 문자열을 지정할 수 있습니다. +#### *사용자 정의 정렬 컨트롤*을 설정하려면 다음 매개변수를 포함하는 객체를 지정할 수 있습니다: + +- `type` - (필수) 컨트롤 유형 (*"sort"*) +- `options` - (선택) 정렬 매개변수를 정의하는 객체 배열입니다. 각 객체(*정렬 옵션*)에 대해 다음 매개변수를 지정할 수 있습니다: + - `text` - (필수) 정렬 선택기 드롭다운 목록에 사용되는 옵션 이름입니다. + - `by` - (선택) 카드를 정렬할 카드 필드의 키입니다. 이 매개변수는 *문자열* 또는 *함수* 값으로 설정할 수 있습니다. 함수는 정렬에 사용할 카드 필드를 반환해야 합니다. + - `dir` - (선택) 정렬 순서입니다. 가능한 값은 *"asc"* 와 *"desc"* 입니다. + +~~~jsx +items: [ + "sort", // 기본 정렬 컨트롤 + // 기타 컨트롤 +] +// 또는 +items: [ + { // 사용자 정의 정렬 컨트롤 + type: "sort", + options: [ + { + text: "라벨로 정렬", + by: "label", + dir: "asc" + }, + { + text: "설명으로 정렬", + by: "description", + dir: "desc" + } + ] + }, {...} // 기타 컨트롤 +] +~~~ +::: + +- `"spacer"` - 컨트롤 사이의 빈 공간 +- `"undo"` - 히스토리 관리 컨트롤 (한 번 클릭 시 한 단계 이전으로 이동) +- `"redo"` - 히스토리 관리 컨트롤 (한 번 클릭 시 한 단계 이후로 이동) +- `"addColumn"` - 새 열 추가 컨트롤 +- `"addRow"` - 새 행 추가 컨트롤 +- `custom_control` - (선택) 사용자 정의 컨트롤. 여기에는 **문자열** 또는 **함수** 형태로 사용자 정의 컨트롤을 지정할 수 있습니다. 자세한 내용은 [Customization](guides/customization.md#custom-toolbar) 섹션을 참조하세요. + +### 예제 + +~~~jsx {8-24} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { + type: "search", + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", + "sort", + "undo", + "redo", + "addColumn", + "addRow" + ] +}); +~~~ + +**변경 내역:** + +- *"Undo"* 및 *"Redo"* 컨트롤이 v1.3에 추가되었습니다. +- **sort** 컨트롤의 ***items.options[0].label*** 매개변수가 v1.4에서 ***items.options[0].text*** 매개변수로 변경되었습니다. +- **"search"** 컨트롤의 ***items.searchResult*** 매개변수가 v1.6에 추가되었습니다. + +**관련 문서:** [구성](guides/configuration.md#toolbar) 및 [커스터마이징](guides/customization.md#custom-toolbar) + +**관련 샘플:** +- [Kanban. Custom toolbar](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) +- [Kanban. Customization of suggestions in search results](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md new file mode 100644 index 0000000..011dea6 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md @@ -0,0 +1,47 @@ +--- +sidebar_label: locale +title: locale 구성 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 (Toolbar) locale 구성에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# locale + +### 설명 + +@short: 선택 사항입니다. Toolbar의 사용자 지정 locale 객체입니다. + +:::info +**locale** 객체는 Kanban과 Toolbar의 모든 레이블을 해당 번역과 함께 포함해야 합니다. +::: + +### 사용법 + +~~~jsx {} +locale?: object; +~~~ + +### 기본 구성 + +기본적으로 Toolbar는 [**영어**](guides/localization.md#default-locale) locale을 사용합니다. 사용자 지정 locale로 설정할 수도 있습니다. + +:::tip +현재 locale을 동적으로 변경하려면 Toolbar의 [**setLocale()**](api/methods/toolbar_setlocale_method.md) 메서드를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {8} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + locale: cn +}); +// Toolbar 생성 +new kanban.Toolbar("#toolbar", { + api: board.api, + locale: cn // Toolbar에 "cn" locale 적용 +}); +~~~ + +**관련 문서:** [Localization](guides/localization.md) + +**관련 샘플:** [Kanban. Localization](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md new file mode 100644 index 0000000..bbced2b --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md @@ -0,0 +1,82 @@ +--- +sidebar_label: 테마 +title: 테마 설정 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 (Toolbar) 테마 설정에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# 테마 + +### 설명 + +@short: 선택 사항입니다. Toolbar에 적용할 테마입니다. + +### 사용법 + +~~~jsx {} +theme?: string; // "material" | "willow" | "willow-dark" +~~~ + +:::important +`theme` 속성을 사용하는 것 외에도, 위젯 컨테이너에 해당 *css* 클래스를 추가하여 필요한 테마를 적용할 수 있습니다: + +- **Material 테마** +~~~html {} + +
+ +
+~~~ + +- **Willow 테마** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark 테마** +~~~html {} + +
+ +
+~~~ + +또는 skins 폴더에서 필요한 테마를 페이지에 포함할 수도 있습니다: + +~~~html {} + +~~~ +::: + +### 기본 설정 + +기본적으로 Toolbar는 **Material** 테마를 사용합니다. **Willow** 및 **Willow-Dark** 테마로도 설정할 수 있습니다. + +:::tip +현재 테마를 동적으로 변경하려면 [**setConfig()**](api/methods/toolbar_setconfig_method.md) 메서드를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {5,11} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: "willow-dark" // 초기에는 "willow-dark" 테마가 설정됩니다 + // 기타 매개변수 +}); +// Toolbar 생성 +new Toolbar("#toolbar", { + api: board.api, + theme: "willow-dark", // 초기에는 "willow-dark" 테마가 설정됩니다 +}); +~~~ + +**변경 로그:** 이 속성은 v1.4에 추가되었습니다. + +**관련 문서:** [스타일링](guides/stylization.md) + +**관련 샘플:** [Kanban. CSS 클래스를 통한 테마 변경](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md new file mode 100644 index 0000000..0b8cb42 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: add-card +title: add-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 add-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# add-card + +### 설명 + +@short: 새 카드를 추가할 때 발생합니다. + +### 사용법 + +~~~jsx {} +"add-card": ({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object, + skipProvider?: boolean, +}) => void; +~~~ + +### 매개변수 + +**add-card** 이벤트의 콜백은 다음 매개변수를 가진 객체를 받을 수 있습니다: + +- `columnId` - (필수) 대상 열의 ID +- `id` - (선택) 새 카드의 ID +- `rowId` - (선택) 대상 행의 ID +- `before` - (선택) 새 카드가 배치될 기존 카드의 ID +- `select` - (선택) 새로 추가된 카드 선택 활성화/비활성화 +- `card` - (선택) 새 카드의 데이터 객체. 카드 매개변수 전체 목록은 [여기](api/config/js_kanban_cards_config.md)에서 확인할 수 있습니다. +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지하는 기능 활성화/비활성화 + +:::info +내부 이벤트를 처리하려면 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "add-card" 이벤트 구독 +board.api.on("add-card", (obj) => { + console.log(obj.columnId); +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md new file mode 100644 index 0000000..9572f12 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-column +title: add-column 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 add-column 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# add-column + +### 설명 + +@short: 새 열이 추가될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"add-column": ({ + id?: string | number, + column?: object, + before?: string | number, + skipProvider?: boolean, +}) => void; +~~~ + +### 매개변수 + +**add-column** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (선택 사항) 새 열의 ID +- `column` - (선택 사항) 새 열의 데이터 객체. **column** 매개변수의 전체 목록은 [**여기**](api/config/js_kanban_columns_config.md)에서 확인할 수 있습니다. +- `before` - (선택 사항) 새 열이 위치할 대상 열의 ID +- `skipProvider` - (선택 사항) 서버로 요청이 전송되는 것을 방지할지 여부를 설정합니다. + +:::info +내부 이벤트 처리를 위해 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "add-column" 이벤트 구독 +board.api.on("add-column", (obj) => { + console.log(obj.label); +}); +~~~ + +**변경 로그**: v1.1 버전에서 **id**, **before**, **column** 매개변수가 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md new file mode 100644 index 0000000..15c1800 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: add-comment +title: add-comment 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 add-comment 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# add-comment + +### 설명 + +@short: 새로운 댓글이 추가될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"add-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**add-comment** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (선택 사항) 새 댓글의 ID +- `cardId` - (필수) 댓글이 추가될 카드의 ID +- `comment` - (필수) 새 댓글의 구성 객체로, 다음 매개변수를 지정할 수 있습니다: + - `text` - (선택 사항) 새 댓글의 텍스트 + - `date` - (선택 사항) 새 댓글의 날짜 + - `html` - (선택 사항) 새 댓글의 HTML 마크업. 텍스트 대신 HTML 마크업을 표시하려면 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-유형-매개변수) 구성의 `html` 속성을 활성화하세요. +- `skipProvider` - (선택 사항) 서버로 요청이 전송되는 것을 방지할지 여부를 설정합니다. + +:::info +내부 이벤트를 처리하려면 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "add-comment" 이벤트 구독 +board.api.on("add-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.4에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md new file mode 100644 index 0000000..832b967 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: add-link +title: add-link 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 add-link 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# add-link + +### 설명 + +@short: 새 링크를 추가할 때 발생합니다 + +### 사용법 + +~~~jsx {} +"add-link": ({ + id?: string | number, + link: object, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**add-link** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (선택 사항) 새 링크의 ID +- `link` - (필수) 새 링크의 데이터 객체. 링크 매개변수 전체 목록은 [여기](api/config/js_kanban_links_config.md)에서 확인할 수 있습니다. +- `skipProvider` - (선택 사항) 서버로 요청이 전송되는 것을 방지할지 여부를 설정합니다 + +:::info +내부 이벤트를 처리할 때는 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다 +::: + +### 예제 + +~~~jsx {8-10} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// "add-link" 이벤트 구독 +board.api.on("add-link", (obj) => { + console.log(obj.link.masterId); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.4에 추가되었습니다 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md new file mode 100644 index 0000000..ea47773 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-row +title: add-row 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 add-row 이벤트에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# add-row + +### 설명 + +@short: 새 행이 추가될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"add-row": ({ + id?: string | number, + row?: object, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**add-row** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (선택 사항) 새 행의 ID +- `row` - (선택 사항) 새 행의 데이터 객체. **row** 매개변수 전체 목록은 [**여기**](api/config/js_kanban_rows_config.md)에서 확인할 수 있습니다. +- `before` - (선택 사항) 새 행이 배치될 이전 행의 ID +- `skipProvider` - (선택 사항) 서버로 요청 전송을 방지할지 여부를 활성화/비활성화합니다. + +:::info +내부 이벤트를 처리할 때는 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "add-row" 이벤트 구독 +board.api.on("add-row", (obj) => { + console.log(obj.id); +}); +~~~ + +**변경 로그**: **id**, **before**, **row** 매개변수는 v1.1에서 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md new file mode 100644 index 0000000..874c1f2 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: add-vote +title: add-vote 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 add-vote 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# add-vote + +### 설명 + +@short: 사용자가 새 투표를 추가할 때 발생합니다. + +### 사용법 + +~~~jsx {} +"add-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**add-vote** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `cardId` - (필수) 투표가 추가될 카드의 ID +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지할지 여부를 활성화/비활성화 + +:::info +내부 이벤트 처리를 위해 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "add-vote" 이벤트 구독 +board.api.on("add-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.4에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md new file mode 100644 index 0000000..bc0f5a0 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-card +title: delete-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리의 delete-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# delete-card + +### 설명 + +@short: 카드가 삭제될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"delete-card": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**delete-card** 이벤트 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 삭제할 카드의 ID +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지할지 여부를 설정합니다. + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "delete-card" 이벤트 구독 +board.api.on("delete-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md new file mode 100644 index 0000000..6cf311a --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-column +title: delete-column 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 delete-column 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# delete-column + +### 설명 + +@short: 컬럼이 삭제될 때 발생합니다 + +### 사용법 + +~~~jsx {} +"delete-column": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**delete-column** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 삭제할 컬럼의 ID +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지할지 여부를 설정 + +:::info +내부 이벤트를 처리하려면 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다 +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "delete-column" 이벤트 구독 +board.api.on("delete-column", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md new file mode 100644 index 0000000..5b59697 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: delete-comment +title: delete-comment 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 delete-comment 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# delete-comment + +### 설명 + +@short: 카드 댓글을 삭제할 때 발생합니다. + +### 사용법 + +~~~jsx {} +"delete-comment": ({ + id?: string | number, + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**delete-comment** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (선택 사항) 삭제할 댓글의 ID +- `cardId` - (필수) 댓글이 삭제될 카드의 ID +- `skipProvider` - (선택 사항) 서버로 요청 전송을 방지할지 여부를 활성화/비활성화 + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "delete-comment" 이벤트 구독 +board.api.on("delete-comment", (obj) => { + console.log(obj.id); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.4에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md new file mode 100644 index 0000000..72d10bc --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md @@ -0,0 +1,48 @@ +--- +sidebar_label: delete-link +title: delete-link 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 delete-link 이벤트에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# delete-link + +### 설명 + +@short: 링크가 제거될 때 발생합니다 + +### 사용법 + +~~~jsx {} +"delete-link": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**delete-link** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 삭제할 링크의 ID +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지할지 여부를 설정합니다 + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다 +::: + +### 예제 + +~~~jsx {8-10} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// "delete-link" 이벤트 구독 +board.api.on("delete-link", (obj) => { + console.log(obj.id); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.4에 추가되었습니다 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md new file mode 100644 index 0000000..7852937 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-row +title: delete-row 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 delete-row 이벤트에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# delete-row + +### 설명 + +@short: 행이 삭제될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"delete-row": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**delete-row** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 삭제할 행의 ID +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지할지 여부를 설정합니다. + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "delete-row" 이벤트 구독 +board.api.on("delete-row", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md new file mode 100644 index 0000000..abe562d --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: delete-vote +title: delete-vote 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리의 delete-vote 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# delete-vote + +### 설명 + +@short: 사용자가 카드에서 투표를 삭제할 때 발생합니다. + +### 사용법 + +~~~jsx {} +"delete-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**delete-vote** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `cardId` - (필수) 투표가 삭제될 카드의 ID +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지할지 여부를 설정 + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "delete-vote" 이벤트 구독 +board.api.on("delete-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.4에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md new file mode 100644 index 0000000..ea62f55 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: drag-card +title: drag-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 drag-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# drag-card + +### 설명 + +@short: dnd를 통해 카드를 이동할 때 발생합니다. + +### 사용법 + +~~~jsx {} +"drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source: array +}) => void; +~~~ + +### 매개변수 + +**drag-card** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 드래그된 카드의 ID +- `columnId` - (필수) 카드가 현재 위치한 열의 ID +- `rowId` - (선택) 카드가 현재 위치한 행의 ID +- `before` - (선택) 현재 열에서 드래그된 카드 뒤에 위치한 카드의 ID +- `source` - (선택) 이동된 카드 ID들의 배열 + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "drag-card" 이벤트 구독 +board.api.on("drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.4 버전에 추가되었습니다. + +**관련 샘플:** [Kanban. 특정 열에 대한 드래그 앤 드롭 비활성화](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md new file mode 100644 index 0000000..f70bd71 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: duplicate-card +title: duplicate-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 duplicate-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# duplicate-card + +### 설명 + +@short: 카드 복제 시 발생하는 이벤트입니다. + +### 사용법 + +~~~jsx {} +"duplicate-card": ({ + id: string | number, + card?: object, + select?: boolean +}) => void; +~~~ + +### 매개변수 + +**duplicate-card** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 복제할 카드의 ID +- `card` - (선택) 새 카드의 데이터 객체. 카드 매개변수 전체 목록은 [여기](api/config/js_kanban_cards_config.md)에서 확인할 수 있습니다. +- `select` - (선택) 새로 추가된 카드 선택 활성화/비활성화 + +:::info +내부 이벤트 처리를 위해 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "duplicate-card" 이벤트 구독 +board.api.on("duplicate-card", (obj) => { + console.log(obj); +}); +~~~ + +**변경 사항:** `select` 매개변수는 v1.5.10에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md new file mode 100644 index 0000000..2af52a7 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: end-drag-card +title: end-drag-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 end-drag-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# end-drag-card + +### 설명 + +@short: 카드 드래그를 중지할 때 발생합니다. + +### 사용법 + +~~~jsx {} +"end-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### 매개변수 + +**end-drag-card** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 드래그된 카드의 ID +- `columnId` - (필수) 카드가 현재 위치한 열의 ID +- `rowId` - (선택) 카드가 현재 위치한 행의 ID +- `before` - (선택) 드래그된 카드 뒤에 현재 위치한 카드의 ID +- `source` - (선택) 이동된 카드들의 ID 배열 + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "end-drag-card" 이벤트 구독 +board.api.on("end-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**변경 내역:** 이 이벤트는 v1.4에서 추가되었습니다. + +**관련 샘플:** [Kanban. 특정 열에 드래그 앤 드롭 비활성화](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md new file mode 100644 index 0000000..95bbbd8 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: move-card +title: move-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 move-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# move-card + +### 설명 + +@short: 카드 이동 시 발생하는 이벤트 + +### 사용법 + +~~~jsx {} +"move-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**move-card** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 이동할 카드의 ID +- `columnId` - (필수) 카드를 배치할 열의 ID +- `rowId` - (선택) 카드를 배치할 행의 ID +- `before` - (선택) 새 카드가 배치될 카드의 ID (이 카드 앞에 위치) +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지할지 여부를 설정 + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "move-card" 이벤트 구독 +board.api.on("move-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**관련 샘플:** [Kanban. 특정 열에 대한 드래그 앤 드롭 비활성화](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md new file mode 100644 index 0000000..9c91756 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: move-column +title: move-column 이벤트 +description: DHTMLX 자바스크립트 칸반 라이브러리 문서에서 move-column 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# move-column + +### 설명 + +@short: 컬럼 이동 시 발생하는 이벤트 + +### 사용법 + +~~~jsx {} +"move-column": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**move-column** 이벤트의 콜백은 다음 매개변수를 가진 객체를 받을 수 있습니다: + +- `id` - (필수) 이동할 컬럼의 ID +- `before` - (선택) 이동할 컬럼이 위치할 대상 컬럼의 ID. `before` 매개변수를 지정하지 않으면 컬럼은 보드의 끝에 배치됩니다. +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지할지 여부를 설정합니다. + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "move-column" 이벤트 구독 +board.api.on("move-column", (obj) => { + console.log(obj); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.1에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md new file mode 100644 index 0000000..2399225 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: move-row +title: move-row 이벤트 +description: DHTMLX 자바스크립트 칸반 라이브러리 문서에서 move-row 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# move-row + +### 설명 + +@short: 행이 이동될 때 발생합니다 + +### 사용법 + +~~~jsx {} +"move-row": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**move-row** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 이동할 행의 ID +- `before` - (선택) 이동할 행이 위치할 대상 행의 ID. `before` 매개변수를 지정하지 않으면 행이 보드의 끝에 배치됩니다. +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지할지 여부를 설정합니다. + +:::info +내부 이벤트 처리를 위해 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {8-10} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// "move-row" 이벤트 구독 +board.api.on("move-row", (obj) => { + console.log(obj); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.1에서 추가되었습니다 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md new file mode 100644 index 0000000..dd3216b --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: redo +title: redo 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 redo 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# redo + +### 설명 + +@short: undo 작업으로 되돌린 동작을 다시 실행할 때 발생합니다. + +### 사용법 + +~~~jsx {} +"redo": () => void; +~~~ + +:::info +내부 이벤트 처리를 위해 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "redo" 이벤트 구독 +board.api.on("redo", () => { + console.log("redo operation"); +}); +~~~ + +**변경 로그**: 이 이벤트는 v1.7에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md new file mode 100644 index 0000000..ca5ed46 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll +title: scroll 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 scroll 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# scroll + +### 설명 + +@short: 지정된 요소로 스크롤할 때 발생합니다 + +### 사용법 + +~~~jsx {} +"scroll": ({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}) => void; +~~~ + +### 매개변수 + +**scroll** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 대상 요소의 ID +- `to` - (필수) 대상 요소의 유형. 가능한 값은 *"column"*, *"row"*, *"card"* 입니다 +- `options` - (선택) 스크롤 옵션 객체. 스크롤 매개변수의 전체 목록은 [여기](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters)에서 확인할 수 있습니다 + +:::info +내부 이벤트 처리를 위해 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다 +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "scroll" 이벤트 구독 +board.api.on("scroll", (obj) => { + console.log(obj); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.2에 추가되었습니다 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md new file mode 100644 index 0000000..c9c4cdd --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: select-card +title: select-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 select-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# select-card + +### 설명 + +@short: 카드가 선택될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"select-card": ({ + id: string | number, + groupMode?: boolean +}) => void; +~~~ + +### 매개변수 + +**select-card** 이벤트의 콜백은 다음 매개변수를 가진 객체를 받을 수 있습니다: + +- `id` - (필수) 선택된 카드의 ID +- `groupMode` - (선택) 다중 선택 여부 (기본값은 false) + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "select-card" 이벤트 구독 +board.api.on("select-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md new file mode 100644 index 0000000..d0b6598 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md @@ -0,0 +1,52 @@ +--- +sidebar_label: set-edit +title: set-edit 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 set-edit 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# set-edit + +### 설명 + +@short: 에디터 전환 시 발생합니다. + +### 사용법 + +~~~jsx {} +"set-edit": ({ cardId: string | number, eventSource?: "select-card" } | null) => void; +~~~ + +### 매개변수 + +**set-edit** 이벤트의 콜백은 *null* 값이거나 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `cardId` - (필수) 편집할 카드의 ID +- `eventSource` - (선택) ***"select-card"*** 액션으로, ***set-edit*** 이벤트를 호출하는 경우 + +:::note +에디터를 닫을 때는 ***null*** 값이 사용됩니다. +::: + +:::info +내부 이벤트를 처리하려면 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 사용자가 카드를 한 번 클릭했을 때 편집을 방지 +board.api.intercept("set-edit", (ev) => { + return ev?.eventSource != "select-card"; +}); +~~~ + +**변경 로그:** + - 이벤트는 v1.2에 추가되었습니다. + - ***eventSource*** 매개변수는 v1.6에 추가되었습니다. + +**관련 샘플:** [Kanban. 작업을 더블 클릭하여 에디터 열기](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md new file mode 100644 index 0000000..e498747 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: set-search +title: set-search 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리의 set-search 이벤트에 대해 알아보세요. 개발자 가이드 및 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# set-search + +### 설명 + +@short: 카드 검색 시 발생하는 이벤트 + +### 사용법 + +~~~jsx {} +"set-search": ({ + value: string, + by?: string +}) => void; +~~~ + +### 매개변수 + +**set-search** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `value` - (필수) 검색할 값 +- `by` - (선택) 검색할 카드 필드 + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "set-search" 이벤트 구독 +board.api.on("set-search", (obj) => { + console.log(obj.value); +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md new file mode 100644 index 0000000..8b838c7 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: set-sort +title: set-sort 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 set-sort 이벤트에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# set-sort + +### 설명 + +@short: 카드 정렬 시 발생하는 이벤트 + +### 사용법 + +~~~jsx {} +"set-sort": ( + { + by?: string | ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +) => void; +~~~ + +### 매개변수 + +**set-sort** 이벤트의 콜백은 *null* 값 또는 다음 매개변수를 가진 객체를 받을 수 있습니다: + +- `by` - (선택 사항) 정렬에 사용할 카드 필드 (*string* 또는 *function*) +- `dir` - (선택 사항) 정렬 순서. 가능한 값은 *"asc"* 와 *"desc"* +- `preserve` - (선택 사항) 정렬 상태 유지 활성화/비활성화 +- `columnId` - (선택 사항) 정렬할 열의 ID + +:::info +내부 이벤트 처리를 위해서는 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "set-sort" 이벤트 구독 +board.api.on("set-sort", (obj) => { + console.log(obj); +}); +~~~ + +**변경 이력:** 이 이벤트는 v1.2에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md new file mode 100644 index 0000000..6258668 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: start-drag-card +title: start-drag-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 start-drag-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# start-drag-card + +### 설명 + +@short: 카드 드래그 시작 시 발생합니다. + +### 사용법 + +~~~jsx {} +"start-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### 매개변수 + +**start-drag-card** 이벤트의 콜백은 다음과 같은 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 드래그 중인 카드의 ID +- `columnId` - (필수) 카드가 현재 위치한 열의 ID +- `rowId` - (선택) 카드가 현재 위치한 행의 ID +- `before` - (선택) 카드가 위치한 열에서 드래그 중인 카드 바로 뒤에 있는 카드의 ID +- `source` - (선택) 이동 중인 카드들의 ID 배열 + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "start-drag-card" 이벤트 구독 +board.api.on("start-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.4에 추가되었습니다. + +**관련 샘플:** [Kanban. 특정 열에 대한 드래그 앤 드롭 비활성화](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md new file mode 100644 index 0000000..c8f8368 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: undo +title: undo 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리의 undo 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# undo + +### 설명 + +@short: Kanban에서 마지막 작업을 되돌릴 때 발생합니다. + +### 사용법 + +~~~jsx {} +"undo": () => void; +~~~ + +:::info +내부 이벤트를 처리하려면 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "undo" 이벤트 구독 +board.api.on("undo", () => { + console.log("Undo operation"); +}); +~~~ + +**변경 로그**: 이 이벤트는 v1.7에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md new file mode 100644 index 0000000..3ae285c --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md @@ -0,0 +1,41 @@ +--- +sidebar_label: unselect-card +title: unselect-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 unselect-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# unselect-card + +### 설명 + +@short: 카드 선택 해제 시 발생하는 이벤트 + +### 사용법 + +~~~jsx {} +"unselect-card": ({ id: string | number }) => void; +~~~ + +### 매개변수 + +**unselect-card** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 선택 해제할 카드의 ID + +:::info +내부 이벤트를 처리하려면 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "unselect-card" 이벤트 구독 +board.api.on("unselect-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md new file mode 100644 index 0000000..d6e51f4 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-card +title: update-card 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 update-card 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# update-card + +### 설명 + +@short: 카드 데이터가 업데이트될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"update-card": ({ + id: string | number, + card?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**update-card** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 업데이트할 카드의 ID +- `card` - (선택) 카드의 새로운 데이터 객체. **card** 매개변수 전체 목록은 [**여기**](api/config/js_kanban_cards_config.md)에서 확인할 수 있습니다. +- `replace` - (선택) 데이터 전체 교체 활성화/비활성화 + + :::note + `replace` 매개변수를 *true*로 설정하면 이전 데이터가 완전히 새 데이터로 교체됩니다. 그렇지 않으면 메서드는 전달한 값만 업데이트합니다. + ::: + +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지하는 기능 활성화/비활성화 + +:::info +내부 이벤트를 처리할 때는 [**Event Bus methods**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "update-card" 이벤트 구독 +board.api.on("update-card", (obj) => { + console.log(obj); +}); +~~~ + +**변경 로그**: +- **id** 및 **card** 매개변수가 v1.1에 추가됨 +- **replace** 매개변수가 v1.3에 추가됨 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md new file mode 100644 index 0000000..8149bf1 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-column +title: update-column 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 update-column 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# update-column + +### 설명 + +@short: 컬럼 데이터가 업데이트될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"update-column": ({ + id: string | number, + column?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**update-column** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 업데이트할 컬럼의 ID +- `column` - (선택) 컬럼의 새 데이터 객체. **column** 매개변수 전체 목록은 [**여기**](api/config/js_kanban_columns_config.md)에서 확인할 수 있습니다. +- `replace` - (선택) 데이터 전체 교체 활성화/비활성화 + + :::note + `replace` 매개변수를 *true*로 설정하면 기존 데이터가 새 데이터로 완전히 교체됩니다. 그렇지 않으면 메서드는 전달된 값만 업데이트합니다. + ::: + +- `skipProvider` - (선택) 서버로 요청 전송을 방지하는 기능 활성화/비활성화 + +:::info +내부 이벤트를 처리하려면 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "update-column" 이벤트 구독 +board.api.on("update-column", (obj) => { + console.log(obj); +}); +~~~ + +**변경 로그**: +- v1.1에서 **id**와 **column** 매개변수가 추가되었습니다. +- v1.3에서 **replace** 매개변수가 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md new file mode 100644 index 0000000..3f9cb39 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md @@ -0,0 +1,62 @@ +--- +sidebar_label: update-comment +title: update-comment 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리의 update-comment 이벤트에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# update-comment + +### 설명 + +@short: 댓글이 업데이트될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"update-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**update-comment** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (선택 사항) 업데이트할 댓글의 ID +- `cardId` - (필수) 댓글이 업데이트될 카드의 ID +- `comment` - (필수) 업데이트할 댓글의 설정 객체로, 다음 매개변수를 지정할 수 있습니다: + - `id` - (선택 사항) 업데이트된 댓글의 ID + - `cardId` - (선택 사항) 업데이트된 댓글이 추가될 카드의 ID + - `text` - (선택 사항) 업데이트된 댓글의 텍스트 + - `date` - (선택 사항) 업데이트된 댓글의 날짜 + - `html` - (선택 사항) 업데이트된 댓글의 HTML 마크업. 텍스트 대신 HTML 마크업을 표시하려면 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-유형-매개변수) 설정의 `html` 속성을 활성화하세요. +- `skipProvider` - (선택 사항) 서버로 요청이 전송되는 것을 방지할지 여부를 설정합니다. + +:::info +내부 이벤트를 처리하려면 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "update-comment" 이벤트 구독 +board.api.on("update-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**변경 로그:** 이 이벤트는 v1.4에서 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md new file mode 100644 index 0000000..e4f09c7 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-row +title: update-row 이벤트 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 update-row 이벤트에 대해 알아보세요. 개발자 가이드 및 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# update-row + +### 설명 + +@short: 행 데이터가 업데이트될 때 발생합니다. + +### 사용법 + +~~~jsx {} +"update-row": ({ + id: string | number, + row?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### 매개변수 + +**update-row** 이벤트의 콜백은 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `id` - (필수) 업데이트할 행의 ID +- `row` - (선택) 행의 새로운 데이터 객체. **row** 매개변수의 전체 목록은 [**여기**](api/config/js_kanban_rows_config.md)에서 확인할 수 있습니다. +- `replace` - (선택) 데이터 전체 교체 활성화/비활성화 + + :::note + `replace` 매개변수를 *true*로 설정하면 기존 데이터가 새 데이터로 완전히 대체됩니다. 그렇지 않으면 전달한 값만 업데이트됩니다. + ::: + +- `skipProvider` - (선택) 서버로 요청이 전송되는 것을 방지하는 기능 활성화/비활성화 + +:::info +내부 이벤트를 처리하려면 [**Event Bus 메서드**](api/overview/main_overview.md/#event-bus-methods)를 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "update-row" 이벤트 구독 +board.api.on("update-row", (obj) => { + console.log(obj); +}); +~~~ + +**변경 내역**: +- **id** 및 **row** 매개변수는 v1.1에 추가되었습니다. +- **replace** 매개변수는 v1.3에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md new file mode 100644 index 0000000..4999a5a --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md @@ -0,0 +1,39 @@ +--- +sidebar_label: api.detach() +title: detach 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 detach 메서드에 대해 알아보세요. 개발자 가이드 및 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# api.detach() + +## 설명 + +@short: 이벤트 리스너를 제거/분리할 수 있습니다. + +## 사용법 + +~~~jsx +api.detach(tag: number | string | symbol ): void; +~~~ + +## 매개변수 + +- `tag` - 이벤트 핸들러 생성 시 식별에 사용된 태그 + +### 예제 + +~~~jsx {11} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +board.api.on("move-card", ({ id, columnId }) => { + console.log("카드를 이동합니다"); +}, { tag: "move" }); + +board.api.detach("move"); +~~~ + +**변경 로그**: 내부 메서드는 v1.7에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md new file mode 100644 index 0000000..6dbec27 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md @@ -0,0 +1,50 @@ +--- +sidebar_label: api.exec() +title: exec 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 exec 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# api.exec() + +### 설명 + +@short: 내부 이벤트를 트리거할 수 있습니다. + +### 사용법 + +~~~jsx {} +api.exec( + event: string, + config: object +): void; +~~~ + +### 매개변수 + +- `event` - (필수) 발생시킬 이벤트 이름 +- `config` - (필수) 이벤트에 전달할 매개변수를 포함하는 설정 객체 (발생시킬 이벤트 참조) + +### 이벤트 + +:::info +Kanban 내부 이벤트 전체 목록은 [**여기**](api/overview/main_overview.md/#kanban-events)에서 확인할 수 있습니다. +::: + +### 예제 + +~~~jsx {7,9-12} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID가 1인 카드를 선택 +board.api.exec("select-card", { id: 1 }); +// 서버에 변경 사항을 전송하지 않고 새 카드 추가 +board.api.exec("add-card", { + columnId: "backlog", + skipProvider: true, +}); +~~~ + +**관련 샘플:** [Kanban. Preserve sorting](https://snippet.dhtmlx.com/74nyuv14?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md new file mode 100644 index 0000000..c779193 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md @@ -0,0 +1,104 @@ +--- +sidebar_label: api.getReactiveState() +title: getReactiveState 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getReactiveState 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# api.getReactiveState() + +### 설명 + +@short: Kanban의 반응형 속성을 포함하는 객체를 가져옵니다. + +### 사용법 + +~~~jsx {} +api.getReactiveState(): object; +~~~ + +### 반환값 + +이 메서드는 다음과 같은 매개변수를 포함하는 객체를 반환합니다: + +~~~jsx {} +{ + cardHeight: {...}, + cardShape: {...}, + cards: {...}, + columnKey: {...}, + columnShape: {...}, + columns: {...}, + currentUser: {...}, + history: {...}, + links: {...}, + readonly: {...}, + rowKey: {...}, + rowShape: {...}, + editorShape: {...}, + rows: {...}, + search: {...}, + selected: {...}, + sort: {...}, + + // 제거된 매개변수 + /* + fromAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + overAreaMeta: {...}, + before: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + overAreaId: {...}, + /* + + // 비공개 매개변수 + /* + edit -> _edit: {...}, + layout -> layout: {...}, + cardsMap -> _cardsMap: {...}, + cardsMeta -> _cardsMeta: {...}, + areasMeta -> _areasMeta: {...}, + scroll -> _scroll: {...}, + */ +} +~~~ + +:::warning +이 상태 속성들은 읽기 전용입니다. 예기치 않은 동작을 방지하기 위해 변경하지 마십시오! +::: + +### 예제 + +~~~jsx {7-37} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// Kanban의 반응형 상태 가져오기 +const state = board.api.getReactiveState(); + +// columns 변경 구독 및 columns 배열 출력 +state.columns.subscribe((data) => { + console.log(data); +}); + +// cards 변경 구독 및 cards 배열 출력 +state.cards.subscribe((data) => { + console.log(data); +}); + +// rows 변경 구독 및 rows 배열 출력 +state.rows.subscribe((data) => { + console.log(data); +}); + +// 카드 선택 구독 및 선택된 카드 ID 출력 +state.selected.subscribe((data) => { + console.log(data); +}); +~~~ + +**변경 로그:** 이 메서드는 v1.7에서 업데이트되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md new file mode 100644 index 0000000..baa231d --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md @@ -0,0 +1,89 @@ +--- +sidebar_label: api.getState() +title: getState 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getState 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# api.getState() + +### 설명 + +@short: Kanban의 StateStore 속성을 가진 객체를 가져옵니다. + +### 사용법 + +~~~jsx {} +api.getState(): object; +~~~ + +### 반환값 + +이 메서드는 다음과 같은 매개변수를 포함하는 객체를 반환합니다: + +~~~jsx {} +{ + cardHeight: number | null, + cards: array, + cardShape: object, + columnKey: string, + columns: array, + columnShape: object, + currentUser: number | string | null, + links: array, + readonly: object, + rowKey: string, + rows: array, + rowShape: object, + editorShape: array, + history: object, + search: object, + selected: array, + sort: object, + + // 제거된 매개변수 + /* + fromAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, + before: string | number, + dragItemId: string | number, + dragItemsCoords: array, + overAreaId: string | number, + /* + + // 비공개 매개변수 + /* + edit -> _edit: object, + layout -> layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object, + */ +} +~~~ + +:::warning +이 상태 속성들은 읽기 전용입니다. 예기치 않은 동작을 방지하기 위해 변경하지 마세요! +::: + +### 예제 + +~~~jsx {7-12} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// Kanban 상태 가져오기 +const state = board.api.getState(); +console.log(state.cards); // 카드 데이터 출력 +console.log(state.columns); // 컬럼 데이터 출력 +console.log(state.rows); // 행 데이터 출력 +console.log(state.cardShape); // 카드 구성 출력 +//... +~~~ + +**변경 로그:** 이 메서드는 v1.7에서 업데이트되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md new file mode 100644 index 0000000..a0206ad --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: api.getStores() +title: getStores 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getStores 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# api.getStores() + +### 설명 + +@short: Kanban의 DataStore 속성을 가진 객체를 가져옵니다. + +### 사용법 + +~~~jsx {} +api.getStores(): object; +~~~ + +### 반환값 + +이 메서드는 **DataStore** 매개변수를 포함하는 객체를 반환합니다: + +~~~jsx {} +{ + data: DataStore // ( 매개변수 객체 ) +} +~~~ + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kanban의 DataStore 객체 가져오기 +const store = board.api.getStores(); +console.log(store); +~~~ + +**변경 로그:** 이 메서드는 v1.2에서 업데이트되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md new file mode 100644 index 0000000..3cb7311 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: api.intercept() +title: intercept 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 intercept 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# api.intercept() + +### 설명 + +@short: 내부 이벤트를 가로채고 방지할 수 있습니다 + +### 사용법 + +~~~jsx {} +api.intercept( + event: string, + callback: function, + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### 매개변수 + +- `event` - (필수) 발생할 이벤트 이름 +- `callback` - (필수) 실행할 콜백 함수 (콜백 인자는 발생하는 이벤트에 따라 다릅니다) +- `config` - (선택) 다음 매개변수를 포함하는 객체: + - `intercept` - (선택) 이벤트 리스너 생성 시 `intercept: true`로 설정하면, 이 이벤트 리스너가 다른 모든 리스너보다 먼저 실행됩니다 + - `tag` - (선택) 액션 태그. [`detach`](api/internal/js_kanban_detach_method.md) 메서드를 통해 액션 핸들러를 제거할 때 태그 이름을 사용할 수 있습니다 + +### 이벤트 + +:::info +Kanban 내부 이벤트 전체 목록은 [**여기**](api/overview/main_overview.md/#kanban-events)에서 확인할 수 있습니다 +::: + +### 예제 + +~~~jsx {7-11} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "done" ID 컬럼으로 카드 이동 금지 +board.api.intercept("move-card", ({ id, columnId }) => { + if(columnId !== "done" ){ + return false; + } +}, {tag: "move"}); +~~~ + +**변경 로그**: **config.tag** 및 **config.intercept** 매개변수는 v1.7에 추가되었습니다 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md new file mode 100644 index 0000000..a10e7ec --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: export.json() +title: json 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 json 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# export.json() + +### 설명 + +@short: Kanban 데이터를 JSON 파일로 내보냅니다. + +### 사용법 + +~~~jsx {} +export.json(): void; +~~~ + +:::info +이 메서드는 Kanban 데이터를 다음과 같은 구조의 JSON 파일로 내보냅니다: +~~~jsx {} +{ + "cards": [], + "columns": [], + "rows": [] +} +~~~ +::: + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kanban 데이터를 JSON으로 내보내기 +board.export.json(); // => { "cards": [...], "columns": [...], "rows": [] } +~~~ + +**변경 로그:** 이 메서드는 v1.3 버전에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md new file mode 100644 index 0000000..70fa0a1 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md @@ -0,0 +1,51 @@ +--- +sidebar_label: api.on() +title: on 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 on 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# api.on() + +### 설명 + +@short: 내부 이벤트에 핸들러를 연결할 수 있습니다. + +### 사용법 + +~~~jsx {} +api.on( + event: string, + handler: function + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### 매개변수 + +- `event` - (필수) 발생할 이벤트 이름 +- `handler` - (필수) 연결할 핸들러 함수 (핸들러 인자는 발생하는 이벤트에 따라 다릅니다) +- `config` - (선택) 다음 매개변수를 포함하는 객체: + - `intercept` - (선택) 이벤트 리스너 생성 시 `intercept: true`로 설정하면, 이 이벤트 리스너가 다른 모든 리스너보다 먼저 실행됩니다. + - `tag` - (선택) 액션 태그. [`detach`](api/internal/js_kanban_detach_method.md) 메서드를 통해 액션 핸들러를 제거할 때 태그 이름을 사용할 수 있습니다. + +### 이벤트 + +:::info +Kanban 내부 이벤트의 전체 목록은 [**여기**](api/overview/main_overview.md/#kanban-events)에서 확인할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 카드가 이동할 때 카드 데이터를 콘솔에 출력 +board.api.on("move-card", ({ id, columnId }) => { + console.log({ id, columnId }); +}, {tag: "move"}); +~~~ + +**변경 로그**: **config.tag** 및 **config.intercept** 매개변수는 v1.7에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md new file mode 100644 index 0000000..d77b41a --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: api.setNext() +title: setNext 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 setNext 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# api.setNext() + +### 설명 + +@short: Event Bus 순서에 특정 작업을 추가할 수 있습니다. + +### 사용법 + +~~~jsx {} +api.setNext(next: any): void; +~~~ + +### 매개변수 + +- `next` - (필수) **Event Bus** 순서에 포함할 작업 + +### 예제 + +~~~jsx {15} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row" + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +데이터에 대한 작업(**추가**, **삭제** 등)을 수행하고 해당 요청을 서버에 전송하려면 **RestDataProvider**를 **Event Bus** 순서에 포함해야 합니다. +::: \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md new file mode 100644 index 0000000..b880d23 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md @@ -0,0 +1,57 @@ +--- +sidebar_label: addCard() +title: addCard 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 addCard 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# addCard() + +### 설명 + +@short: Kanban에 새 카드를 추가합니다. + +### 사용법 + +~~~jsx {} +addCard({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object +}): void; +~~~ + +### 매개변수 + +- `columnId` - (필수) 대상 열의 ID +- `id` - (선택) 새 카드의 ID +- `rowId` - (선택) 대상 행의 ID +- `before` - (선택) 새 카드가 배치될 카드의 ID +- `select` - (선택) 새로 추가된 카드 선택 활성화/비활성화 +- `card` - (선택) 새 카드의 데이터 객체 + +:::info +**card** 매개변수의 전체 목록은 [**여기**](api/config/js_kanban_cards_config.md)에서 확인할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-12} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "backlog" 열에 새 카드 추가 +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" } +}); +~~~ + +:::tip +**card** 객체 내에 새 카드의 ID를 지정할 수도 있습니다. +::: \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md new file mode 100644 index 0000000..1eec75f --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md @@ -0,0 +1,54 @@ +--- +sidebar_label: addColumn() +title: addColumn 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 addColumn 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 확인하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# addColumn() + +### 설명 + +@short: Kanban에 새 컬럼을 추가합니다. + +### 사용법 + +~~~jsx {} +addColumn({ + id?: string | number, + column?: object, + before?: string | number +}): void; +~~~ + +### 매개변수 + +- `id` - (선택 사항) 새 컬럼의 ID +- `column` - (선택 사항) 새 컬럼의 데이터 객체 +- `before` - (선택 사항) 새 컬럼이 위치할 기존 컬럼의 ID + +:::info +**column** 매개변수의 전체 목록은 [**여기**](api/config/js_kanban_columns_config.md)에서 확인할 수 있습니다. +::: + +### 예제 + +~~~jsx {7-16} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 새 컬럼 추가 +board.addColumn({ + id: "extra_column", + column: { + label: "Extra column", + limit: 2, + strictLimit: 2, + collapsed: true + }, + before: "column_2" +}); +~~~ + +**변경 로그**: **id**, **column**, **before** 매개변수는 v1.1 버전에서 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md new file mode 100644 index 0000000..4595779 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: addComment() +title: addComment 메서드 +description: DHTMLX JavaScript Kanban 라이브러리의 addComment 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# addComment() + +### 설명 + +@short: 지정된 카드 ID에 새 댓글을 추가합니다. + +### 사용법 + +~~~jsx {} +addComment({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### 매개변수 + +- `id` - (선택 사항) 새 댓글의 ID +- `cardId` - (필수) 댓글을 추가할 카드의 ID +- `comment` - (필수) 새 댓글의 구성 객체로, 다음 매개변수를 지정할 수 있습니다: + - `text` - (선택 사항) 새 댓글의 텍스트 + - `date` - (선택 사항) 새 댓글의 날짜 + - `html` - (선택 사항) 새 댓글의 HTML 마크업. 텍스트 대신 HTML 마크업을 표시하려면 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-유형-매개변수) 구성의 `html` 속성을 활성화하세요. + +### 예제 + +~~~jsx {7-15} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 새 댓글 추가 +board.addComment({ + id: 1, + cardId: 1, + comment: { + text: "", + date: new Date("01/07/2021"), + html: "중요한 댓글" + } +}); +~~~ + +**변경 로그:** 이 메서드는 v1.4에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md new file mode 100644 index 0000000..4a30478 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: addLink() +title: addLink 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 addLink 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# addLink() + +### 설명 + +@short: Kanban에 새 링크를 추가합니다. + +### 사용법 + +~~~jsx {} +addLink({ + id?: string | number, + link: object +}): void; +~~~ + +### 매개변수 + +- `id` - (선택 사항) 새 링크의 ID +- `link` - (필수) 새 링크의 데이터 객체입니다. 링크 매개변수 전체 목록은 [여기](api/config/js_kanban_links_config.md)에서 확인할 수 있습니다. + +### 예제 + +~~~jsx {7-14} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 새 링크 추가 +board.addLink({ + id: 3, + link: { + source: 4, + target: 6, + relation: "relatesTo", + } +}); +~~~ + +**변경 로그:** 이 메서드는 v1.5에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md new file mode 100644 index 0000000..fd98fe7 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: addRow() +title: addRow 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 addRow 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# addRow() + +### 설명 + +@short: Kanban에 새 행을 추가합니다. + +### 사용법 + +~~~jsx {} +addRow({ + id?: string | number, + row?: object, + before?: string | number +}): void; +~~~ + +### 매개변수 + +- `id` - (선택 사항) 새 행의 ID +- `row` - (선택 사항) 새 행의 데이터 객체 +- `before` - (선택 사항) 새 행이 배치될 기존 행의 ID + +:::info +**row** 매개변수의 전체 목록은 [**여기**](api/config/js_kanban_rows_config.md)에서 확인할 수 있습니다. +::: + +### 예제 + +~~~jsx {8-15} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 새 행 추가 +board.addRow({ + id: "extra_row", + row: { + label: "Extra row", + collapsed: false + }, + before: "row_2" +}); +~~~ + +**변경 로그**: **id**, **row**, **before** 매개변수는 v1.1에서 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md new file mode 100644 index 0000000..af7b391 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteCard() +title: deleteCard 메서드 +description: DHTMLX JavaScript Kanban 라이브러리의 deleteCard 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# deleteCard() + +### 설명 + +@short: Kanban의 데이터 저장소에서 지정된 카드를 제거합니다. + +### 사용법 + +~~~jsx {} +deleteCard({ id: string | number }): void; +~~~ + +### 매개변수 + +- `id` - (필수) 삭제할 카드의 ID + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 카드 ID로 카드 제거 +board.deleteCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md new file mode 100644 index 0000000..1c00453 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteColumn() +title: deleteColumn 메서드 +description: DHTMLX JavaScript Kanban 라이브러리의 deleteColumn 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# deleteColumn() + +### 설명 + +@short: Kanban의 데이터스토어에서 지정된 열을 제거합니다. + +### 사용법 + +~~~jsx {} +deleteColumn({ id: string | number }): void; +~~~ + +### 매개변수 + +- `id` - (필수) 삭제할 열의 ID + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID로 열 삭제 +board.deleteColumn({ id: "backlog" }); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md new file mode 100644 index 0000000..f05b380 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: deleteComment() +title: deleteComment 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 deleteComment 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# deleteComment() + +### 설명 + +@short: ID로 카드 댓글을 삭제합니다 + +### 사용법 + +~~~jsx {} +deleteComment({ + id: string | number, + cardId: string | number +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 삭제할 댓글의 ID +- `cardId` - (필수) 댓글이 속한 카드의 ID + +### 예제 + +~~~jsx {7-10} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 댓글 삭제 +board.deleteComment({ + id: 1, + cardId: 1, +}); +~~~ + +**변경 로그:** 이 메서드는 v1.4에서 추가되었습니다 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md new file mode 100644 index 0000000..ff69aa8 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md @@ -0,0 +1,36 @@ +--- +sidebar_label: deleteLink() +title: deleteLink 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 deleteLink 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# deleteLink() + +### 설명 + +@short: Kanban의 데이터 저장소에서 지정된 링크를 제거합니다. + +### 사용법 + +~~~jsx {} +deleteLink({ id: string | number }): void; +~~~ + +### 매개변수 + +- `id` - (필수) 삭제할 링크의 ID + +### 예제 + +~~~jsx {8} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + links, +}); +// ID로 링크 삭제 +board.deleteLink({ id: 5 }); +~~~ + +**변경 로그:** 이 메서드는 v1.5에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md new file mode 100644 index 0000000..0ff08ae --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteRow() +title: deleteRow 메서드 +description: DHTMLX JavaScript Kanban 라이브러리의 deleteRow 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# deleteRow() + +### 설명 + +@short: Kanban의 데이터 저장소에서 지정된 행을 제거합니다. + +### 사용법 + +~~~jsx {} +deleteRow({ id: string | number }): void; +~~~ + +### 매개변수 + +- `id` - (필수) 삭제할 행의 ID + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID로 행 제거 +board.deleteRow({ id: "feature" }); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md new file mode 100644 index 0000000..87ab159 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md @@ -0,0 +1,29 @@ +--- +sidebar_label: destructor() +title: destructor 메서드 +description: DHTMLX JavaScript Kanban 라이브러리의 destructor 메서드에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# destructor() + +### 설명 + +@short: Kanban의 모든 HTML 요소를 제거하고 관련된 모든 이벤트를 분리합니다. + +### 사용법 + +~~~jsx {} +destructor(): void; +~~~ + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kanban 제거 +board.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md new file mode 100644 index 0000000..219ddee --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: duplicateCard() +title: duplicateCard 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 duplicateCard 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# duplicateCard() + +### 설명 + +@short: 지정된 ID의 카드를 복제합니다. + +### 사용법 + +~~~jsx {} +duplicateCard({ + id: string | number, + card?: object, + select?: boolean +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 복제할 카드의 ID +- `card` - (선택) 새 카드의 데이터 객체입니다. 카드 매개변수 전체 목록은 [**여기**](api/config/js_kanban_cards_config.md)에서 확인할 수 있습니다. +- `select` - (선택) 새로 추가된 카드를 선택할지 여부를 설정합니다. + +### 예제 + +~~~jsx {7-10} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID가 1인 카드를 복제 +board.duplicateCard({ + id: 1, + card: { label: "Duplicated card" }, + select: true +}); +~~~ + +**변경 로그:** `select` 매개변수는 v1.5.10 버전에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md new file mode 100644 index 0000000..29bfa24 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getAreaCards() +title: getAreaCards 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getAreaCards 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# getAreaCards() + +### 설명 + +@short: 지정된 열(column)과 행(row)의 모든 카드 데이터 객체를 배열로 가져옵니다. + +### 사용법 + +~~~jsx {} +getAreaCards( + columnId: string | number, + rowId?: string | number +): array; +~~~ + +### 매개변수 + +- `columnId` - (필수) 대상 열의 ID +- `rowId` - (선택) 대상 행의 ID + +### 반환값 + +이 메서드는 카드들의 데이터 객체를 포함하는 배열을 반환합니다. + +:::info +Kanban에 **행(rows)** 없이 **열(columns)** 만 포함된 경우, ***columnId*** 매개변수만 전달하면 됩니다. 이 경우, 메서드는 지정된 열의 모든 카드를 포함하는 데이터 객체 배열을 반환합니다. + +Kanban에 **열(columns)** 과 **행(rows)** 이 모두 포함된 경우, ***columnId*** 와 ***rowId*** 두 매개변수를 모두 전달할 수 있습니다. 이 경우, 메서드는 특정 열과 행의 모든 카드를 포함하는 데이터 객체 배열을 반환합니다. +::: + +### 예제 + +~~~jsx {8} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 지정된 열과 행의 카드 데이터 객체 배열 가져오기 +board.getAreaCards("column_id", "row_id"); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md new file mode 100644 index 0000000..ac4ef39 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: getCard() +title: getCard 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getCard 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 둘러보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# getCard() + +### 설명 + +@short: 지정된 ID로 카드의 데이터 객체를 가져옵니다. + +### 사용법 + +~~~jsx {} +getCard(id: string | number): object; +~~~ + +### 매개변수 + +- `id` - (필수) 대상 카드의 ID + +### 반환값 + +지정된 ID를 가진 카드의 데이터 객체를 반환합니다. + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID가 1인 카드의 데이터 객체를 가져옵니다 +const card_data = board.getCard(1); +console.log(card_data); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md new file mode 100644 index 0000000..2673c5a --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md @@ -0,0 +1,40 @@ +--- +sidebar_label: getColumnCards() +title: getColumnCards 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getColumnCards 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# getColumnCards() + +### 설명 + +@short: 특정 열에 있는 모든 카드의 데이터 객체를 저장하는 배열을 가져옵니다. + +### 사용법 + +~~~jsx {} +getColumnCards(id: string | number): array; +~~~ + +### 매개변수 + +- `id` - (필수) 대상 열의 ID + +### 반환값 + +이 메서드는 특정 열에 있는 모든 카드의 데이터 객체를 저장하는 배열을 반환합니다. + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID가 1인 열 내 모든 카드의 데이터 객체 가져오기 +const cards_data = board.getColumnCards(1); +console.log(cards_data); +~~~ + +**변경 로그**: 이 메서드는 v1.7에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md new file mode 100644 index 0000000..0dae69a --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: getSelection() +title: getSelection 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getSelection 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# getSelection() + +### 설명 + +@short: 선택된 카드의 ID를 배열로 가져옵니다. + +### 사용법 + +~~~jsx {} +getSelection(): array; +~~~ + +### 반환값 + +선택된 카드의 ID가 담긴 배열을 반환합니다. + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 선택된 카드의 ID 배열을 가져옵니다. +board.getSelection(); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md new file mode 100644 index 0000000..a7a7bd0 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md @@ -0,0 +1,52 @@ +--- +sidebar_label: moveCard() +title: moveCard 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 moveCard 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# moveCard() + +### 설명 + +@short: 카드를 지정한 열(및 행)로 이동합니다. + +### 사용법 + +~~~jsx {} +moveCard({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 이동할 카드의 ID +- `columnId` - (필수) 카드를 배치할 열의 ID +- `rowId` - (선택) 카드를 배치할 행의 ID +- `before` - (선택) 새 카드가 배치될 카드의 ID (이 카드 앞에 배치됨) + +:::info +위젯 구성에서 **rowKey** 속성을 지정한 경우, **moveCard()** 메서드의 **rowId** 매개변수는 *필수*입니다! +::: + +### 예제 + +~~~jsx {9-14} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID가 1인 카드를 이동 +// 아이템은 "inprogress" 열과 "feature" 행에 배치되며, +// ID가 8인 카드 앞에 위치합니다. +board.moveCard({ + id: 1, + columnId: "inprogress", + rowId: "feature", + before: 8 +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md new file mode 100644 index 0000000..d88a3a3 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: moveColumn() +title: moveColumn 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 moveColumn 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# moveColumn() + +### 설명 + +@short: 컬럼을 새로운 위치로 이동합니다. + +### 사용법 + +~~~jsx {} +moveColumn({ + id: string | number, + before?: string | number +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 이동할 컬럼의 ID +- `before` - (선택) 이동할 컬럼이 위치할 대상 컬럼의 ID. `before` 파라미터를 지정하지 않으면 컬럼은 보드의 끝에 배치됩니다. + +### 예제 + +~~~jsx {7-10} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "backlog" 컬럼을 이동하여 "done" 컬럼 앞에 배치 +board.moveColumn({ + id: "backlog", + before: "done" +}); +~~~ + +**변경 로그:** 이 메서드는 v1.1에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md new file mode 100644 index 0000000..6e7faf2 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: moveRow() +title: moveRow 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 moveRow 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# moveRow() + +### 설명 + +@short: 행을 새 위치로 이동합니다 + +### 사용법 + +~~~jsx {} +moveRow({ + id: string | number, + before?: string | number +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 이동할 행의 ID +- `before` - (선택) 이동된 행이 위치할 대상 행의 ID. `before` 매개변수를 지정하지 않으면 행은 보드의 끝에 배치됩니다. + +### 예제 + +~~~jsx {8-11} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + row +}); +// "task" 스윔레인을 "feature" 스윔레인 위(앞)에 배치하여 이동 +board.moveRow({ + id: "task", + before: "feature" +}); +~~~ + +**변경 이력:** 이 메서드는 v1.1에 추가되었습니다 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md new file mode 100644 index 0000000..00f9a4e --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md @@ -0,0 +1,47 @@ +--- +sidebar_label: parse() +title: parse 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 parse 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# parse() + +### 설명 + +@short: 데이터를 Kanban으로 파싱합니다. + +### 사용법 + +~~~jsx {} +parse({ + columns?: array, + rows?: array, + cards?: array, + links?: array +}): void; +~~~ + +### 매개변수 + +- [`columns`](api/config/js_kanban_columns_config.md) - (선택 사항) 열 데이터 객체들의 배열 +- [`rows`](api/config/js_kanban_rows_config.md) - (선택 사항) 행 데이터 객체들의 배열 +- [`cards`](api/config/js_kanban_cards_config.md) - (선택 사항) 카드 데이터 객체들의 배열 +- [`links`](api/config/js_kanban_links_config.md) - (선택 사항) 링크 데이터 객체들의 배열 + +### 예제 + +~~~jsx {4-9} +// Kanban 생성 +const board = new kanban.Kanban("#root", {}); +// 데이터를 Kanban으로 파싱 +board.parse({ + columns, + cards, + rows, + links +}); +~~~ + +**변경 로그:** v1.1 버전부터는 새 데이터를 파싱하기 전에 생성자에서 초기 데이터를 재설정할 필요가 없습니다. + +**관련 문서:** [데이터 작업하기](guides/working_with_data.md#loading-data-from-local-source) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md new file mode 100644 index 0000000..e47c015 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: redo() +title: redo 메서드 +description: DHTMLX JavaScript Kanban 라이브러리의 redo 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# redo() + +### 설명 + +@short: undo 작업으로 되돌린 동작을 다시 실행합니다. + +:::info +`redo()` 메서드는 [`history: true`](api/config/js_kanban_history_config.md) 설정에서만 작동합니다! +::: + +### 사용법 + +~~~jsx {} +redo(): void; +~~~ + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kanban의 히스토리에서 한 단계 앞으로 이동 +board.redo(); +~~~ + +**변경 로그:** 이 메서드는 v1.3에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md new file mode 100644 index 0000000..125f6a8 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll() +title: scroll 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 scroll 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# scroll() + +### 설명 + +@short: Kanban을 지정된 요소로 스크롤합니다. + +### 사용법 + +~~~jsx {} +scroll({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 대상 요소의 ID +- `to` - (필수) 대상 요소의 유형. 가능한 값은 "column", "row", "card"입니다. +- `options` - (선택) 스크롤 옵션 객체. 스크롤 매개변수 전체 목록은 [여기](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters)에서 확인할 수 있습니다. + +### 예제 + +~~~jsx {7-15} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID가 246인 카드로 Kanban을 스크롤 +board.scroll({ + id: 246, + to: "card", + options: { + behavior: "smooth", + block: "end", + inline: "nearest" + } +}); +~~~ + +**변경 로그:** 이 메서드는 v1.2에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md new file mode 100644 index 0000000..2efae53 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: selectCard() +title: selectCard 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 selectCard 메서드에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# selectCard() + +### 설명 + +@short: 지정된 ID로 카드를 선택합니다. + +### 사용법 + +~~~jsx {} +selectCard({ + id: string | number, + groupMode?: boolean +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 선택할 카드의 ID +- `groupMode` - (선택) 카드 다중 선택 활성화/비활성화 (기본값은 **false**) + +:::info +**groupMode** 매개변수를 **true**로 설정하면, **selectCard()** 메서드는 다른 요소들의 선택 상태를 초기화하지 않습니다. +::: + +### 예제 + +~~~jsx {7-10} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID가 1인 카드 선택 +board.selectCard({ + id: 1, + groupMode: true +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md new file mode 100644 index 0000000..7d46684 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: serialize() +title: serialize 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 serialize 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# serialize() + +### 설명 + +@short: Kanban 데이터를 JSON으로 직렬화합니다 + +### 사용법 + +~~~jsx {} +serialize(): object; +~~~ + +### 반환값 + +이 메서드는 Kanban 데이터 객체를 반환합니다 + +~~~jsx {} +{ + cards: [{...}, {...}, ...], + rows: [{...}, {...}, ...], + columns: [{...}, {...}, ...], + links: [{...}, {...}, ...] +} +~~~ + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kanban 데이터 객체 가져오기 +board.serialize(); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md new file mode 100644 index 0000000..728b664 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: setConfig() +title: setConfig 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 setConfig 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# setConfig() + +### 설명 + +@short: Kanban의 새로운 구성 매개변수를 설정합니다. + +### 사용법 + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### 매개변수 + +- `config` - (필수) Kanban 구성 객체입니다. 전체 속성 목록은 [여기](api/overview/main_overview.md#kanban-properties)에서 확인하세요. + +:::tip +이 메서드를 사용하여 Kanban 위젯을 구성하고 데이터를 로드할 수 있습니다. 이 메서드는 히스토리를 변경하지 않습니다(히스토리는 전혀 변경할 수 없습니다). +::: + +### 예제 + +~~~jsx {10-20,22-23} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +// 툴바 생성 +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + +// Kanban의 새로운 구성 매개변수 지정 +board.setConfig({ + columnKey: "stage", + rowKey: "type", + cardShape, + editorShape, + editor: { + autoSave: false + }, + /* 기타 매개변수 */ +}); + +// 툴바의 새로운 구성 매개변수 지정 +toolbar.setConfig({ items: ["search", "spacer", "sort"] }); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md new file mode 100644 index 0000000..b410875 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setEdit() +title: setEdit 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 setEdit 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# setEdit() + +### 설명 + +@short: Kanban의 편집기를 토글합니다 + +### 사용법 + +~~~jsx {} +setEdit({ cardId: string | number } | null): void; +~~~ + +### 매개변수 + +이 메서드는 *null* 값 또는 다음 매개변수를 포함하는 객체를 받을 수 있습니다: + +- `cardId` - (필수) 편집할 카드의 ID + +:::note +편집기를 닫으려면 **setEdit()** 메서드를 ***null*** 값과 함께 호출하세요 +::: + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 카드 ID로 편집기 열기 +board.setEdit({ cardId: 1 }); +~~~ + +**변경 로그:** 이 메서드는 v1.2에 추가되었습니다 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md new file mode 100644 index 0000000..254c5c5 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: setLocale() +title: setLocale 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 setLocale 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# setLocale() + +### 설명 + +@short: Kanban에 새 로케일을 적용합니다. + +### 사용법 + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### 매개변수 + +- `null` - (선택 사항) 기본 로케일(*영어*)로 재설정합니다. +- `locale` - (선택 사항) 적용할 새 로케일 데이터 객체입니다. + +:::info +`setLocale()` 메서드는 Kanban에만 새 로케일을 적용할 때 사용하세요. Kanban을 기본 로케일로 재설정하려면 인수 없이(또는 *null* 값과 함께) `setLocale()` 메서드를 호출하면 됩니다. Toolbar에만 새 로케일을 적용하려면 [`toolbar.setLocale()`](api/methods/toolbar_setlocale_method.md) 메서드를 사용하세요. +::: + +### 예제 + +~~~jsx {7,9} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, +}); +// Kanban에 "de" 로케일 적용 +board.setLocale(kanban.locales["de"]); +// Kanban에 기본 로케일 적용 +board.setLocale(); // 또는 board.setLocale(null); +~~~ + +**변경 내역:** 이 메서드는 v1.2에서 업데이트되었습니다. + +**관련 문서:** [Localization](guides/localization.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md new file mode 100644 index 0000000..d8fc5af --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setSearch() +title: setSearch 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 setSearch 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 둘러보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# setSearch() + +### 설명 + +@short: 지정된 매개변수로 카드를 검색합니다 + +### 사용법 + +~~~jsx {} +setSearch({ + value: string, + by?: string +}): void; +~~~ + +:::info +이 메서드를 사용하면 지정된 매개변수로 필요한 카드를 검색할 수 있습니다. **setSearch()** 메서드를 매개변수 없이 호출하면 검색창과 카드 하이라이트가 초기화됩니다. +::: + +### 매개변수 + +- `value` - (필수) 검색할 값 +- `by` - (선택) 검색할 카드 필드 + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 매개변수에 맞는 카드를 하이라이트 +board.setSearch({ value: "Integration", by: "label" }); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md new file mode 100644 index 0000000..c037d0c --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: setSort() +title: setSort 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 setSort 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# setSort() + +### 설명 + +@short: 지정된 매개변수로 카드를 정렬합니다. + +### 사용법 + +~~~jsx {} +setSort( + { + by?: string | function, // by?: ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +): void; +~~~ + +### 매개변수 + +이 메서드는 정렬 매개변수 객체 또는 *null* 값을 받을 수 있습니다. 객체 내에서 다음 매개변수를 지정할 수 있습니다: + +- `by` - (선택 사항) 정렬할 카드 필드입니다. 이 매개변수는 *string* 또는 *function* 값으로 설정할 수 있습니다. 함수는 정렬할 카드 필드를 반환해야 합니다. +- `dir` - (선택 사항) 정렬 순서입니다. 가능한 값은 *"asc"* 와 *"desc"* 입니다. +- `columnId` - (선택 사항) 정렬할 열의 ID입니다. +- `preserve` - (선택 사항) 정렬 상태 유지 활성화/비활성화입니다 (*기본값은 false*) + +:::info +**preserve** 매개변수가 *false* 로 설정된 경우, 정렬은 한 번만 적용됩니다. 즉, 카드를 추가하거나 이동한 후에는 정렬 상태가 유지되지 않고 순서가 변경됩니다. 반면, 정렬 상태를 유지하면 새 카드를 추가하거나 이동해도 정렬 상태가 유지됩니다. 정렬 상태 유지를 해제하려면 ***null*** 매개변수로 **setSort()** 메서드를 호출하세요. +::: + +### 예제 + +~~~jsx {7-12} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "label" 매개변수로 카드를 오름차순 정렬 +board.setSort({ + by: (obj) => obj.label, // 또는 by: "label" + dir: "asc", + columnId: "backlog", + preserve: false +}); +~~~ + +**변경 로그:** 이 메서드는 v1.2에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md new file mode 100644 index 0000000..b095132 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: setTheme() +title: setTheme 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 setTheme 메서드에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# setTheme() + +### 설명 + +@short: Kanban에 새로운 테마를 동적으로 적용합니다 (재초기화 포함) + +### 사용법 + +~~~jsx {} +setTheme({ + name?: string, // "material" (기본값) | "willow" | "willow-dark" + fonts?: boolean +}): void; +~~~ + +### 매개변수 + +- `name` - (선택 사항) Kanban에 적용할 테마 이름입니다. 사용 가능한 테마는 3가지입니다: + - "material" (*기본값*) + - "willow" + - "willow-dark" +- `fonts` - (선택 사항) CDN에서 폰트(wxi 폰트)를 불러오는 것을 활성화하거나 비활성화합니다. + +:::tip +초기 테마를 지정하려면 [`theme`](api/config/js_kanban_theme_config.md) 속성을 사용할 수 있습니다. +::: + +### 예제 + +~~~jsx {6} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + // 초기 구성 매개변수 +}); +// "willow" 테마 설정 +board.setTheme({ name: "willow", font: false }); +~~~ + +**변경 로그:** 이 메서드는 v1.6에 추가되었습니다. + +**관련 문서:** [스타일링](guides/stylization.md) + +**관련 샘플:** [Kanban. CSS 클래스 변경을 통한 테마 변경](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md new file mode 100644 index 0000000..8886643 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: undo() +title: undo 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 undo 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# undo() + +### 설명 + +@short: Kanban에서 마지막 작업을 되돌립니다. + +:::info +`undo()` 메서드는 [`history: true`](api/config/js_kanban_history_config.md) 설정과 함께 사용할 때만 작동합니다! +::: + +### 사용법 + +~~~jsx {} +undo(): void; +~~~ + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// Kanban의 히스토리에서 한 단계 되돌리기 +board.undo(); +~~~ + +**변경 로그:** 이 메서드는 v1.3에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md new file mode 100644 index 0000000..eec5739 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md @@ -0,0 +1,37 @@ +--- +sidebar_label: unselectCard() +title: unselectCard 메서드 +description: DHTMLX JavaScript Kanban 라이브러리의 unselectCard 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# unselectCard() + +### 설명 + +@short: 카드의 ID로 카드 선택을 해제합니다. + +### 사용법 + +~~~jsx {} +unselectCard({ id: string | number }): void; +~~~ + +:::info +모든 카드의 선택을 해제하려면 매개변수 없이 **unselectCard()** 메서드를 호출하세요. +::: + +### 매개변수 + +- `id` - (필수) 선택 해제할 카드의 ID + +### 예제 + +~~~jsx {7} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID가 1인 카드 선택 해제 +board.unselectCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md new file mode 100644 index 0000000..8c1da38 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateCard() +title: updateCard 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 updateCard 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# updateCard() + +### 설명 + +@short: ID로 카드 데이터를 업데이트합니다. + +### 사용법 + +~~~jsx {} +updateCard({ + id: string | number, + card?: object, + replace?: boolean +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 업데이트할 카드의 ID +- `card` - (선택) 카드의 새 데이터 객체입니다. 카드 매개변수 전체 목록은 [**여기**](api/config/js_kanban_cards_config.md)에서 확인할 수 있습니다. +- `replace` - (선택) 데이터 전체 교체 활성화/비활성화 + + :::note + `replace` 매개변수를 *true*로 설정하면 기존 데이터가 새 데이터로 완전히 교체됩니다. 그렇지 않으면, 메서드는 전달한 값만 업데이트합니다. + ::: + +### 예제 + +~~~jsx {7-16} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// ID가 1인 카드 데이터 업데이트 +board.updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*기타 매개변수*/ + }, + replace: true +}); +~~~ + +**변경 로그**: +- **id** 및 **card** 매개변수가 v1.1에 추가됨 +- **replace** 매개변수가 v1.3에 추가됨 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md new file mode 100644 index 0000000..fc8507d --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateColumn() +title: updateColumn 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 updateColumn 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# updateColumn() + +### 설명 + +@short: ID로 컬럼 데이터를 업데이트합니다. + +### 사용법 + +~~~jsx {} +updateColumn({ + id: string | number, + column?: object, + replace?: boolean +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 업데이트할 컬럼의 ID +- `column` - (선택) 컬럼의 새 데이터 객체. **column** 매개변수의 전체 목록은 [**여기**](api/config/js_kanban_columns_config.md)에서 확인할 수 있습니다. +- `replace` - (선택) 데이터 전체 교체 활성화/비활성화 + + :::note + `replace` 매개변수를 *true*로 설정하면 기존 데이터가 새 데이터로 완전히 교체됩니다. 그렇지 않으면, 메서드는 전달한 값만 업데이트합니다. + ::: + +### 예제 + +~~~jsx {7-16} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// "backlog" ID를 가진 컬럼 데이터 업데이트 +board.updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +**변경 로그**: +- **id** 및 **column** 매개변수는 v1.1에서 추가됨 +- **replace** 매개변수는 v1.3에서 추가됨 \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md new file mode 100644 index 0000000..e4a54e9 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md @@ -0,0 +1,62 @@ +--- +sidebar_label: updateComment() +title: updateComment 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 updateComment 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# updateComment() + +### 설명 + +@short: 카드 댓글을 ID로 업데이트합니다. + +### 사용법 + +~~~jsx {} +updateComment({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### 매개변수 + +- `id` - (선택 사항) 업데이트할 댓글의 ID +- `cardId` - (필수) 댓글을 업데이트할 카드의 ID +- `comment` - (필수) 업데이트할 댓글의 구성 객체로, 다음 매개변수를 지정할 수 있습니다: + - `id` - (선택 사항) 업데이트할 댓글의 ID + - `cardId` - (선택 사항) 업데이트된 댓글이 추가될 카드의 ID + - `text` - (선택 사항) 업데이트된 댓글의 텍스트 + - `date` - (선택 사항) 업데이트된 댓글의 날짜 + - `html` - (선택 사항) 업데이트된 댓글의 HTML 마크업. 텍스트 대신 HTML 마크업을 표시하려면 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-유형-매개변수) 구성의 `html` 속성을 활성화하세요. + +### 예제 + +~~~jsx {7-17} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 댓글 업데이트 +board.updateComment({ + id: 1, + cardId: 1, + comment: { + id: 2, + cardId: 4, + text: "", + date: new Date("01/08/2021"), + html: "Updated comment" + } +}); +~~~ + +**변경 로그:** 이 메서드는 v1.4에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md new file mode 100644 index 0000000..197bfff --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md @@ -0,0 +1,55 @@ +--- +sidebar_label: updateRow() +title: updateRow 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 updateRow 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# updateRow() + +### 설명 + +@short: ID로 행 데이터를 업데이트합니다. + +### 사용법 + +~~~jsx {} +updateRow({ + id: string | number, + row?: object, + replace?: boolean +}): void; +~~~ + +### 매개변수 + +- `id` - (필수) 업데이트할 행의 ID +- `row` - (선택) 행의 새 데이터 객체입니다. **row** 매개변수의 전체 목록은 [**여기**](api/config/js_kanban_rows_config.md)에서 확인할 수 있습니다. +- `replace` - (선택) 전체 데이터를 완전히 교체할지 여부를 설정합니다. + + :::note + `replace` 매개변수를 *true*로 설정하면 기존 데이터가 새 데이터로 완전히 교체됩니다. 그렇지 않으면 메서드는 전달한 값만 업데이트합니다. + ::: + +### 예제 + +~~~jsx {8-15} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// "feature" ID를 가진 행 데이터 업데이트 +board.updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +**변경 로그**: +- **id** 및 **row** 매개변수는 v1.1에 추가되었습니다. +- **replace** 매개변수는 v1.3에 추가되었습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md new file mode 100644 index 0000000..71296f9 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md @@ -0,0 +1,28 @@ +--- +sidebar_label: destructor() +title: destructor 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 Toolbar의 destructor 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# destructor() + +### 설명 + +@short: Toolbar의 모든 HTML 요소를 제거하고 관련된 모든 이벤트를 분리합니다. + +### 사용법 + +~~~jsx {} +destructor(): void; +~~~ + +### 예제 + +~~~jsx {6} +// Kanban 생성 +const board = new kanban.Kanban("#root", {}); +// Toolbar 생성 +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// Toolbar 제거 +toolbar.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md new file mode 100644 index 0000000..eb6aff5 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: setConfig() +title: setConfig 메서드 +description: DHTMLX JavaScript Kanban 라이브러리의 Toolbar에 대한 setConfig 메서드를 학습할 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# setConfig() + +### 설명 + +@short: Toolbar의 새로운 구성 매개변수를 설정합니다. + +### 사용법 + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### 매개변수 + +- `config` - (필수) Toolbar 구성 객체입니다. 전체 속성 목록은 [여기](api/overview/main_overview.md#toolbar-properties)를 참조하세요. + +:::note +이 메서드는 전달한 매개변수만 변경합니다. +::: + +### 예제 + +~~~jsx {6-8} +// Kanban 생성 +const board = new kanban.Kanban("#root", {}); +// Toolbar 생성 +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// Toolbar의 새로운 구성 매개변수 설정 +toolbar.setConfig({ + items: ["search", "spacer", "sort"] +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md new file mode 100644 index 0000000..2ffabbd --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: setLocale() +title: setLocale 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 Toolbar의 setLocale 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# setLocale() + +### 설명 + +@short: Kanban의 Toolbar에 새로운 로케일을 적용합니다. + +### 사용법 + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### 매개변수 + +- `null` - (선택 사항) Toolbar를 기본 로케일(*영어*)로 재설정합니다. +- `locale` - (선택 사항) Toolbar에 적용할 새로운 로케일 데이터 객체입니다. + +:::info +Kanban의 **Toolbar**는 별도의 컴포넌트입니다. Toolbar에만 새로운 로케일을 적용하려면 `toolbar.setLocale()` 메서드를 사용하세요. Toolbar를 기본 로케일로 재설정하려면 인수 없이(또는 *null* 값과 함께) `toolbar.setLocale()` 메서드를 호출하세요. Kanban에만 새로운 로케일을 적용하려면 [`kanban.setLocale()`](api/methods/js_kanban_setlocale_method.md) 메서드를 사용하세요. +::: + +### 예제 + +~~~jsx {8} +// Kanban 생성 +const board = new kanban.Kanban("#root", {}); +// Toolbar 생성 +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// Kanban에 "de" 로케일 적용 +board.setLocale(de); +// Toolbar에 "de" 로케일 적용 +toolbar.setLocale(de); +~~~ + +**변경 내역:** **api** 매개변수는 v1.6에서 더 이상 권장되지 않습니다. + +**관련 문서:** [Localization](guides/localization.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md new file mode 100644 index 0000000..44f7c0e --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: 공통 설정 +title: 공통 설정 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 공통 설정 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드하세요. +--- + +# 공통 설정 + +| 이름 | 설명 | +| --------------------------------------------- | -------------------------------------------------- | +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/events_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/events_overview.md new file mode 100644 index 0000000..560bc6e --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/events_overview.md @@ -0,0 +1,39 @@ +--- +sidebar_label: 이벤트 개요 +title: 이벤트 개요 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 이벤트 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# 이벤트 개요 + +| 이름 | 설명 | +| --------------------------------------------------------- | -------------------------------------------------------- | +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md new file mode 100644 index 0000000..65adff8 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: 이벤트 버스 메서드 +title: 이벤트 버스 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 내부 이벤트 버스 메서드 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# 이벤트 버스 메서드 + +| 이름 | 설명 | +| -------------------------------------------------------- | ----------------------------------------------------------- | +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md new file mode 100644 index 0000000..082b316 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: 내보내기 메서드 +title: 내보내기 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 내부 내보내기 메서드 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# 내보내기 메서드 + +| 이름 | 설명 | +| -------------------------------------------- | -------------------------------------------------- | +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md new file mode 100644 index 0000000..d403953 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md @@ -0,0 +1,16 @@ +--- +sidebar_label: RestDataProvider 메서드 +title: RestDataProvider 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 내부 RestDataProvider 메서드 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# RestDataProvider 메서드 + +| 이름 | 설명 | +| ------------------------------------------------------------ | ----------------------------------------------------------------- | +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md)| +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md new file mode 100644 index 0000000..b5de8c7 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: 상태 메서드 +title: 상태 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 내부 상태 메서드 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# 상태 메서드 + +| 이름 | 설명 | +| -------------------------------------------------------- | ------------------------------------------------------------ | +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/main_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/main_overview.md new file mode 100644 index 0000000..b03470d --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/main_overview.md @@ -0,0 +1,225 @@ +--- +sidebar_label: API 개요 +title: API 개요 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 API 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# API 개요 + +## Kanban 생성자 + +~~~js +new kanban.Kanban("#root", { + // 구성 매개변수 +}); +~~~ + +**매개변수**: + +- HTML 컨테이너 (HTML 컨테이너의 ID) +- 구성 매개변수 객체 ([여기서 확인](#kanban-속성)) + +## Toolbar 생성자 + +~~~js +new kanban.Toolbar("#toolbar", { + // 구성 매개변수 +}); +~~~ + +**매개변수**: + +- HTML 컨테이너 (HTML 컨테이너의 ID) +- 구성 매개변수 객체 ([여기서 확인](#toolbar-속성)) + +## Kanban 메서드 + +| 이름 | 설명 | +| ---------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md) | +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | + +## Kanban 내부 API + +### 이벤트 버스 메서드 + +| 이름 | 설명 | +| ---------------------------------------------------------- | ---------------------------------------------------------- | +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | + +### 내보내기 메서드 + +| 이름 | 설명 | +| --------------------------------------------------------- | --------------------------------------------------------- | +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | + +### 상태 메서드 + +| 이름 | 설명 | +| ---------------------------------------------------------- | ----------------------------------------------------------- | +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | + +## Kanban 이벤트 + +| 이름 | 설명 | +| :--------------------------------------------------------- | :--------------------------------------------------------- | +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addlink_event.md) | @getshort(../events/js_kanban_addlink_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deletelink_event.md) | @getshort(../events/js_kanban_deletelink_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | + +## Kanban 속성 + +| 이름 | 설명 | +| :--------------------------------------------------------- | :------------------------------------------------------- | +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | + +## Toolbar 메서드 + +| 이름 | 설명 | +| :--------------------------------------------------------- | :------------------------------------------------------- | +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | + +## Toolbar 속성 + +| 이름 | 설명 | +| :--------------------------------------------------------- | :------------------------------------------------------- | +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | + +## 공통 설정 + +| 이름 | 설명 | +| :--------------------------------------------------------- | :------------------------------------------------------- | +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | + +## RestDataProvider API + +### RestDataProvider 메서드 + +| 이름 | 설명 | +| ----------------------------------------------------------- | ---------------------------------------------------------- | +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md) | +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | + +### RestDataProvider 라우트 + +| 이름 | 설명 | +| ----------------------------------------------------------- | ---------------------------------------------------------- | +| [GET `/cards`](api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | +| [GET `/columns`](api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | +| [GET `/links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_links_route.md) | +| [GET `/rows`](api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | +| [GET `/users`](api/provider/rest_routes/get_routes/js_kanban_get_users_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_users_route.md) | +| [GET `/uploads`](api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | +| [POST `/cards`](api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | +| [POST `/cards/{cardId}/comments`](api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | +| [POST `/cards/{cardId}/vote`](api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | +| [POST `/columns`](api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | +| [POST `/links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_links_route.md) | +| [POST `/rows`](api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | +| [POST `/uploads`](api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | +| [PUT `/cards`](api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | +| [PUT `/cards/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | +| [PUT `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | +| [PUT `/columns`](api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | +| [PUT `/columns/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | +| [PUT `/rows`](api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | +| [PUT `/rows/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | +| [DELETE `/cards`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | +| [DELETE `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | +| [DELETE `/cards/{cardId}/vote`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | +| [DELETE `/columns`](api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | +| [DELETE `/links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | +| [DELETE `/rows`](api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md new file mode 100644 index 0000000..4905065 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md @@ -0,0 +1,45 @@ +--- +sidebar_label: 메서드 개요 +title: 메서드 개요 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 메서드 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 둘러보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# 메서드 개요 + +| 이름 | 설명 | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md) | +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md new file mode 100644 index 0000000..fd481d5 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md @@ -0,0 +1,31 @@ +--- +sidebar_label: 속성 개요 +title: 속성 개요 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 속성 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# Kanban 속성 개요 + +**Kanban**을 구성하려면 [구성](guides/configuration.md) 섹션을 참조하세요. + +| 이름 | 설명 | +| ----------------------------------------------------------- | --------------------------------------------------------- | +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md new file mode 100644 index 0000000..1f05ff0 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md @@ -0,0 +1,200 @@ +--- +sidebar_label: REST 경로 개요 +title: REST 경로 개요 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 Internal RestDataProvider 경로 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드하세요. +--- + +# REST 경로 개요 + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +이 페이지에서는 모든 REST 경로 목록과 간단한 설명, 그리고 자세한 내용을 확인할 수 있는 페이지 링크를 제공합니다.
각 경로 설명을 살펴보기 전에 [서버 작업하기](guides/working_with_server.md)를 읽는 것을 권장합니다. + +--- + +빠른 탐색을 위해 아래 탭이나 사이드 메뉴를 사용할 수 있습니다: +- 사이드 메뉴는 HTTP 메서드별로 그룹화된 경로를 보여줍니다. +- 어떤 작업에 어떤 경로를 사용할지 빠르게 찾으려면 아래 탭을 이용하세요. + +
+ + +

카드 작업을 수행하려면 다음 경로를 사용하세요:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 메서드경로설명
`GET` /cards모든 카드 데이터를 가져오며, 카드 객체 배열이 포함된 json 객체를 반환합니다
`POST` /cards새 카드를 생성하며, 새 카드 ID가 포함된 json 객체를 반환합니다
`PUT` /cards지정된 카드 데이터를 업데이트하며, 빈 json 객체를 반환합니다
`PUT` /cards/id/move카드를 지정된 위치로 이동합니다
`DELETE` /cards카드 데이터를 삭제합니다
+
+ + +

행(스윔레인) 작업을 수행하려면 다음 경로를 사용하세요:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 메서드경로설명
`GET` /rows모든 행 데이터를 가져오며, 행(스윔레인) 데이터 객체 배열이 포함된 json 객체를 반환합니다
`POST` /rows새 행을 추가하며, 행 ID가 포함된 json 객체를 반환합니다
`PUT` /rows지정된 행(스윔레인) 데이터를 업데이트하며, 빈 json 객체를 반환합니다
`PUT` /rows/id/move행을 지정된 위치로 이동합니다
`DELETE` /rows행 데이터를 삭제합니다
+
+ + +

열 작업을 수행하려면 다음 경로를 사용하세요:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 메서드경로설명
`GET` /columns모든 열 데이터를 가져오며, 열 데이터 객체 배열이 포함된 json 객체를 반환합니다
`POST` /columns새 열을 추가하며, 행 ID가 포함된 json 객체를 반환합니다
`PUT` /columns지정된 열 데이터를 업데이트하며, 빈 json 객체를 반환합니다
`PUT` /columns/id/move열을 지정된 위치로 이동합니다
`DELETE` /columns열 데이터를 삭제합니다
+
+ + +

링크 작업을 수행하려면 다음 경로를 사용하세요:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 메서드경로설명
`GET` /links모든 링크 데이터를 가져오며, 링크 객체 배열이 포함된 json 객체를 반환합니다
`POST` /links새 링크를 생성하며, 새 링크 ID가 포함된 json 객체를 반환합니다
`DELETE` /links링크 데이터를 삭제합니다
+
+ + +

업로드(서버에 업로드된 파일) 작업을 수행하려면 다음 경로를 사용하세요:

+ + + + + + + + + + + + + + + + + + + + +
HTTP 메서드경로설명
`GET` /uploads서버에서 요청된 이진 파일을 가져옵니다
`POST` /uploads서버에 이진 파일을 업로드하며, 파일의 id, 이름, url이 포함된 json 객체를 반환합니다
+
+ +
+
\ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md new file mode 100644 index 0000000..fce3901 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: 툴바 메서드 개요 +title: 툴바 메서드 개요 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 툴바 메서드 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# 툴바 메서드 개요 + +| 이름 | 설명 | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md new file mode 100644 index 0000000..bee5107 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: 툴바 속성 개요 +title: 툴바 속성 개요 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 JavaScript Kanban의 툴바 속성 개요를 확인할 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# 툴바 속성 개요 + +**Toolbar**를 구성하려면 [설정](guides/configuration.md#toolbar) 섹션을 참조하세요. + +| 이름 | 설명 | +| --------------------------------------------------------- | --------------------------------------------------------- | +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md new file mode 100644 index 0000000..df6e727 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getCards() +title: getCards REST 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getCards REST 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# getCards() + +### 설명 + +@short: 카드 데이터를 포함하는 프로미스를 반환합니다. + +:::info +**getCards()** 메서드는 서버와 작업하기 위해 설계된 **RestDataProvider** 서비스의 일부입니다. +::: + +### 사용법 + +~~~jsx {} +getCards(): promise; +~~~ + +### 반환값 + +**getCards()** 메서드는 **GET** 메서드로 서버에 요청을 보내고 카드 데이터를 포함하는 **프로미스**를 반환합니다. + +### 예제 + +~~~jsx {2,5} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**관련 문서:** [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md new file mode 100644 index 0000000..dabb61b --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getColumns() +title: getColumns REST 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getColumns REST 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# getColumns() + +### 설명 + +@short: 컬럼 데이터를 포함하는 프로미스를 반환합니다. + +:::info +**getColumns()** 메서드는 서버와의 작업을 위해 설계된 **RestDataProvider** 서비스의 일부입니다. +::: + +### 사용법 + +~~~jsx {} +getColumns(): promise; +~~~ + +### 반환값 + +**getColumns()** 메서드는 **GET** 메서드를 사용하여 서버에 요청을 보내고 컬럼 데이터가 포함된 **프로미스**를 반환합니다. + +### 예제 + +~~~jsx {2,6} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**관련 문서:** [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md new file mode 100644 index 0000000..d113386 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: getLinks() +title: getLinks REST 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getLinks REST 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# getLinks() + +### 설명 + +@short: 링크 데이터를 포함하는 프라미스를 반환합니다. + +:::info +**getLinks()** 메서드는 서버와 작업하기 위한 **RestDataProvider** 서비스의 일부입니다. +::: + +### 사용법 + +~~~jsx {} +getLinks(): promise; +~~~ + +### 반환값 + +**getLinks()** 메서드는 **GET** 메서드로 서버에 요청을 보내고, 링크 데이터를 포함하는 **프라미스**를 반환합니다. + +### 예제 + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), +]).then(([cards, columns, links]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links + }); + board.api.setNext(restProvider); +}); +~~~ + +**변경 로그:** 이 메서드는 v1.5에 추가되었습니다. + +**관련 문서:** [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md new file mode 100644 index 0000000..037b833 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getRows() +title: getRows REST 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getRows REST 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# getRows() + +### 설명 + +@short: 행 데이터가 포함된 프로미스를 반환합니다. + +:::info +**getRows()** 메서드는 서버와 작업하기 위한 **RestDataProvider** 서비스의 일부입니다. +::: + +### 사용법 + +~~~jsx {} +getRows(): promise; +~~~ + +### 반환값 + +**getRows()** 메서드는 **GET** 메서드로 서버에 요청을 보내고, 행 데이터가 포함된 **프로미스**를 반환합니다. + +### 예제 + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type" + }); + board.api.setNext(restProvider); +}); +~~~ + +**관련 문서:** [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md new file mode 100644 index 0000000..b099cc4 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md @@ -0,0 +1,60 @@ +--- +sidebar_label: getUsers() +title: getUsers REST 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 getUsers REST 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# getUsers() + +### 설명 + +@short: 사용자 데이터를 포함하는 프로미스를 반환합니다. + +:::info +**getUsers()** 메서드는 서버와 작업하기 위한 **RestDataProvider** 서비스의 일부입니다. +::: + +### 사용법 + +~~~jsx {} +getUsers(): promise; +~~~ + +### 반환값 + +**getUsers()** 메서드는 **GET** 방식으로 서버에 요청을 보내고 사용자 데이터가 포함된 **프로미스**를 반환합니다. + +### 예제 + +~~~jsx {2,8,21} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows(), + restProvider.getUsers(), +]).then(([cards, columns, rows, users]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +**변경 로그:** 이 메서드는 v1.3 버전에 추가되었습니다. + +**관련 문서:** [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md new file mode 100644 index 0000000..6b431dd --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md @@ -0,0 +1,113 @@ +--- +sidebar_label: send() +title: send() 메서드 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 send() 메서드에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# send() + +### 설명 + +@short: 서버에 필요한 HTTP 요청을 보내며, 요청에 따라 데이터가 포함되거나 포함되지 않은 프로미스를 반환합니다. + +서버로의 모든 요청은 [**RestDataProvider**](guides/working_with_server.md/#restdataprovider) 서비스의 일부인 **send()** 메서드를 통해 이루어집니다. + +### 사용법 + +~~~js +send( + url: string, + method: "GET" | "POST" | "PUT" | "DELETE" | string, + data?: object, + headers?: object, +): promise; +~~~ + +### 매개변수 + +| 이름 | 타입 | 설명 | +| ----------- | ----------- | ----------- | +| `url` | string | *필수*. 요청을 보낼 서버 경로입니다. | +| `method` | string | *필수*. HTTP 메서드 타입 (GET, POST, PUT, DELETE)입니다. | +| `data` | object | *선택*. 서버로 전송할 매개변수입니다. 기본적으로 발생한 이벤트의 매개변수가 전송되지만, 사용자 정의 객체로 추가 매개변수를 넣을 수 있습니다. 아래 [예제](#예제)를 참고하세요. | +| `headers` | object | *선택*. 기본 헤더는 **Content-Type** 헤더로 *application/json*이 설정되어 있습니다. 추가적인 헤더는 **customHeaders** 매개변수로 넣을 수 있습니다. 아래 [예제](#예제)를 참고하세요. | + +### 응답 + +이 메서드는 요청에 따라 데이터가 포함되거나 포함되지 않은 프로미스 객체를 반환합니다. + +성공적인 요청 상태에서 프로미스가 반환됩니다. 요청이 실패할 경우 클라이언트는 오류를 발생시킵니다. + +반환값을 구성할 수 있으며, 실패한 요청에 대한 응답 처리는 반환된 프로미스의 **catch** 메서드를 사용하세요. + +~~~jsx +restDataProvider.send(url, method, data) +.then(data => { + ... // 성공 시: 데이터를 처리 +}) +.catch(err => { + ... // 오류 처리기 +}); +~~~ + +### 예제 + +아래 예제는 기본 매개변수 외에 추가 매개변수를 포함하여 요청을 보내는 방법을 보여줍니다: + +~~~jsx {14-20} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + //구성 매개변수 + }); + + board.api.on("add-card", obj => { + obj.custom = "custom prop"; + restProvider.send(`cards`, "POST", obj).then(data => { + board.api.parse({ cards: data }); + return Promise.resolve(); + }); + }); + + board.api.setNext(restProvider); +}); +~~~ + +다음 예제들은 **send()** 메서드에 추가 헤더를 넣는 방법을 보여줍니다. + +~~~js +const customHeaders = { + "Authorization": "Bearer", + "Custom header": "some value", +}; + +board.api.on("add-cards", obj => { + restDataProvider.send("cards", "POST", obj, customHeaders); +}); +~~~ + +또는 아래처럼 RestDataProvider를 재정의하여 헤더를 추가할 수도 있습니다. 이렇게 하면 서버로 보내는 데이터에 대해 더 많은 제어가 가능합니다: + +~~~jsx {3-8} +const url = "https://some_backend_url"; + +class MyDataProvider extends RestDataProvider { + send(url, method, data, headers) { + headers = { ...headers, "SomeToken": "abc" }; + return super.send(url, methods, data, headers); + } +} + +board.api.setNext(new MyDataProvider(url)); +~~~ + +--- + +**관련 문서:** [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md new file mode 100644 index 0000000..69620e1 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md @@ -0,0 +1,44 @@ +--- +sidebar_label: DELETE /cards/{id}/comments/{id} +title: DELETE /cards/{cardId}/comments/{commentId} +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 DELETE /cards/{cardId}/comments/{commentId} REST 경로에 대해 알아보세요. 개발자 가이드 및 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# DELETE `/cards/{cardId}/comments/{commentId}` + +### 설명 + +@short: 카드에서 댓글을 삭제합니다 + +이 경로는 `cards/{cardId}/comments/{commentId}` 경로로 전송된 **HTTP DELETE** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 전달됩니다: + +| 이름 | 유형 | 설명 | +| ----------- | ----------- | ----------------------------------------- | +| `cardId` | number | *필수*. 댓글이 삭제될 카드의 ID입니다. | +| `commentId` | number | *필수*. 삭제할 댓글의 ID입니다. | + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +서버는 댓글을 삭제한 사용자의 ID가 포함된 JSON 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200은 성공, response.status == 500은 실패). + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md new file mode 100644 index 0000000..01cc38b --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /cards +title: DELETE /cards +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 DELETE /cards REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# DELETE `/cards` + +### 설명 + +@short: 카드의 데이터를 삭제합니다 + +이 경로는 `/cards/{id}` 경로에 대해 **HTTP DELETE** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함되어 전송됩니다: + +| 이름 | 유형 | 설명 | +| ---------- | ----------- | ----------- | +| `id` | number | *필수*. 삭제할 카드의 ID입니다.| + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +데이터는 반환되지 않습니다. HTTP 상태 코드를 통해 요청 성공 여부를 알 수 있습니다 (response.status == 200이면 성공, response.status == 500이면 실패). + +--- + +**관련 문서**: [서버 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md new file mode 100644 index 0000000..76464cd --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md @@ -0,0 +1,43 @@ +--- +sidebar_label: DELETE /cards/{id}/vote +title: DELETE /cards/{cardId}/vote +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 DELETE /cards/{cardId}/vote REST 경로에 대해 알아보실 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# DELETE `/cards/{cardId}/vote` + +### 설명 + +@short: 카드에서 투표를 제거하고 투표를 제거한 사용자 ID가 포함된 JSON 객체를 반환합니다. + +이 경로는 `/cards/{cardId}/vote` 경로에 대한 **HTTP DELETE** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함됩니다: + +| 이름 | 유형 | 설명 | +| ----------- | ----------- | -------------------------------- | +| `cardId` | number | *필수*. 투표가 제거될 카드의 ID입니다. | + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +이 경로는 투표를 제거한 사용자 ID가 포함된 JSON 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 상태 코드는 요청이 성공했는지(response.status == 200) 실패했는지(response.status == 500)를 나타냅니다. + +--- + +**관련 문서**: [서버 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md new file mode 100644 index 0000000..ce6c3b1 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /columns +title: DELETE /columns +description: DHTMLX JavaScript Kanban 라이브러리의 DELETE /columns REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# DELETE `/columns` + +### 설명 + +@short: 컬럼의 데이터를 삭제합니다. + +이 경로는 `/columns/{id}` 경로로 전송된 **HTTP DELETE** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함되어 전송됩니다: + +| 이름 | 타입 | 설명 | +| ---------- | ----------- | ----------- | +| `id` | number | *필수*. 삭제할 컬럼의 ID입니다.| + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +응답 데이터는 반환되지 않습니다. HTTP 상태 코드로 요청 성공 여부를 알 수 있으며, 성공 시 (response.status == 200), 실패 시 (response.status == 500)로 표시됩니다. + +--- + +**관련 문서**: [서버 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md new file mode 100644 index 0000000..15e222e --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: DELETE /links +title: DELETE /links +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 DELETE /links REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# DELETE `/links` + +### 설명 + +@short: 링크의 데이터를 삭제합니다. + +이 경로는 `/links/{id}` 경로에 대해 **HTTP DELETE** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함됩니다: + +| 이름 | 타입 | 설명 | +| ------ | ------- | ------------------------------------- | +| `id` | number | *필수*. 삭제할 링크의 ID입니다. | + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +데이터는 반환되지 않습니다. HTTP 상태 코드를 통해 요청 성공 여부를 알 수 있습니다 (response.status == 200이면 성공, response.status == 500이면 실패). + +--- + +**관련 문서**: +- [서버 작업하기](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md new file mode 100644 index 0000000..e9efc27 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /rows +title: DELETE /rows +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 DELETE /rows REST 경로에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# DELETE `/rows` + +### 설명 + +@short: 행(스윔레인)의 데이터를 삭제합니다. + +이 경로는 `/rows/{id}` 경로로 이루어진 **HTTP DELETE** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 전송됩니다: + +| 이름 | 유형 | 설명 | +| ---------- | ----------- | ----------- | +| `id` | number | *필수*. 삭제할 행의 ID입니다.| + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +데이터는 반환되지 않습니다. HTTP 상태 코드를 통해 요청 성공 여부를 알 수 있습니다 (response.status == 200이면 성공, response.status == 500이면 실패). + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md new file mode 100644 index 0000000..34ce614 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md @@ -0,0 +1,81 @@ +--- +sidebar_label: GET /cards +title: GET /cards +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 GET /cards REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# GET `/cards` + +### 설명 + +@short: 모든 카드에 대한 데이터를 가져오며, 카드 객체 배열을 포함한 json 객체를 반환합니다. + +이 경로는 `/cards` 경로에 대한 **HTTP GET** 요청을 처리합니다. + +### 요청 본문 + +요청 본문은 필요하지 않습니다. + +### 응답 + +이 경로는 모든 카드 객체 배열을 포함하는 json 객체를 반환합니다. + +예시: + +~~~json +[ + { + "id": 4, + "label": "Set the tasks priorities", + "description": "", + "column": 2, + "row": 1, + "start_date": "2018-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, + { + "id": 5, + "label": "Custom icons", + "description": "", + "column": 2, + "row": 2, + "start_date": "2019-01-01T00:00:00Z", + "end_date": null, + "progress": 0, + "attached": [], + "color": "#65D3B3", + "users": [] + }, + { + "id": 6, + "label": "Integration with Gantt", + "description": "", + "column": 2, + "row": 2, + "start_date": "2020-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, +] +~~~ + +:::note +이벤트 시작 및 종료 날짜는 ISO 형식 **yyyy-MM-dd'T'HH:mm:ss.SSSXXX**을 준수해야 합니다. +::: + +반환되는 객체의 다른 예시는 [**cards**](api/config/js_kanban_cards_config.md)에서 확인할 수 있습니다. + +HTTP 상태 코드는 요청 성공 여부를 나타내며, 성공 시 (response.status == 200), 실패 시 (response.status == 500)입니다. + +--- + +**관련 문서**: +- [서버와 작업하기](guides/working_with_server.md) +- [getCards()](api/provider/rest_methods/js_kanban_getcards_method.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md new file mode 100644 index 0000000..e1969eb --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md @@ -0,0 +1,58 @@ +--- +sidebar_label: GET /columns +title: GET /columns +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 GET /columns REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# GET `/columns` + +### 설명 + +@short: 모든 컬럼에 대한 데이터를 가져와 컬럼 데이터 객체 배열을 포함하는 json 객체를 반환합니다. + +이 경로는 `/columns` 경로로 들어오는 **HTTP GET** 요청을 처리합니다. + +### 요청 본문 + +요청 본문은 필요하지 않습니다. + +### 응답 + +이 경로는 컬럼 데이터 객체 배열을 포함하는 json 객체를 반환합니다. + +예시: + +~~~json +[ + { + "id": 1, + "label": "Backlog", + "collapsed": false + }, + { + "id": 2, + "label": "In Progress", + "collapsed": false + }, + { + "id": 3, + "label": "Testing", + "collapsed": false + }, + { + "id": 4, + "label": "Done", + "collapsed": false + } +] +~~~ + +반환되는 객체의 다른 예시는 [**columns**](api/config/js_kanban_columns_config.md)에서 확인할 수 있습니다. + +HTTP 상태 코드는 요청 성공 시 (response.status == 200), 실패 시 (response.status == 500)를 나타냅니다. + +--- + +**관련 문서**: +- [서버와 작업하기](guides/working_with_server.md) +- [getColumns()](api/provider/rest_methods/js_kanban_getcolumns_method.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md new file mode 100644 index 0000000..83b78d2 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md @@ -0,0 +1,50 @@ +--- +sidebar_label: GET /links +title: GET /links +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 GET /links REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# GET `/links` + +### 설명 + +@short: 모든 링크에 대한 데이터를 가져오고 링크 객체 배열을 포함한 json 객체를 반환합니다. + +이 경로는 `/links` 경로로 이루어진 **HTTP GET** 요청을 처리합니다. + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +이 경로는 모든 링크 객체의 배열을 포함하는 json 객체를 반환합니다. + +예시: + +~~~json +[ + { + "id": 1, + "source": 2, + "target": 5, + "relation": "relatesTo", + }, + { + "id": 2, + "source": 4, + "target": 9, + "relation": "relatesTo", + }, +] +~~~ + +반환된 객체의 다른 예시는 [**links**](api/config/js_kanban_links_config.md)에서 확인할 수 있습니다. + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200은 성공, response.status == 500은 실패). + +--- + +**관련 문서**: +- [서버와 작업하기](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md new file mode 100644 index 0000000..5199df9 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md @@ -0,0 +1,48 @@ +--- +sidebar_label: GET /rows +title: GET /rows +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 GET /rows REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# GET `/rows` + +### 설명 + +@short: 모든 행에 대한 데이터를 가져오며, 행(스윔레인) 데이터가 포함된 객체 배열을 가진 json 객체를 반환합니다. + +이 경로는 `/rows` 경로에 대한 **HTTP GET** 요청을 처리합니다. + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +이 경로는 행 데이터가 포함된 객체 배열을 가진 json 객체를 반환합니다. + +예시: + +~~~json +[ + { + "id": 1, + "label": "Feature", + "collapsed": false + }, + { + "id": 2, + "label": "Task", + "collapsed": false + } +] +~~~ + +반환되는 객체의 다른 예시는 [**rows**](api/config/js_kanban_rows_config.md)에서 확인할 수 있습니다. + +HTTP 상태 코드는 요청 성공(response.status == 200) 또는 실패(response.status == 500)를 나타냅니다. + +--- + +**관련 문서**: +- [서버와 작업하기](guides/working_with_server.md) +- [getRows()](api/provider/rest_methods/js_kanban_getrows_method.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md new file mode 100644 index 0000000..ffc66be --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: GET /uploads +title: GET /uploads +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 GET /uploads REST 경로에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# GET `/uploads` + +### 설명 + +@short: 서버에서 요청한 바이너리 파일을 가져옵니다 + +이 경로는 `/uploads/{id}/{name}` 경로로 이루어진 **HTTP GET** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함됩니다: + +| 이름 | 타입 | 설명 | +| ---------- | ----------- | ----------- | +| `id` | number | *필수*. 필요한 파일의 ID입니다.| +| `name` | string | *필수*. 요청한 파일의 이름입니다.| + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +이 경로는 요청한 바이너리 파일을 반환합니다. + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200은 성공, response.status == 500은 실패). + +--- + +**관련 문서**: [서버 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md new file mode 100644 index 0000000..498f972 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: GET /users +title: GET /users +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 GET /users REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# GET `/users` + +### 설명 + +@short: 모든 사용자에 대한 데이터를 가져오며, 사용자 객체 배열을 포함하는 json 객체를 반환합니다. + +이 경로는 `/users` 경로로 들어오는 **HTTP GET** 요청을 처리합니다. + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +이 경로는 사용자 데이터 객체 배열이 포함된 json 객체를 반환합니다. + +예시: + +~~~json +[ + { + "id": 1, + "label": "Jhon", + "avatar": "https://serv.com/images/jhon.png" + }, + { + "id": 2, + "label": "Ben", + "avatar": "https://serv.com/images/ben.png" + }, + { + "id": 3, + "label": "Alex", + "avatar": "https://serv.com/images/alex.png" + } +] +~~~ + +반환되는 객체의 또 다른 예시는 [**cardShape**](api/config/js_kanban_cardshape_config.md)에서 확인할 수 있습니다. + +HTTP 상태 코드는 요청 성공 시 (response.status == 200), 실패 시 (response.status == 500)를 나타냅니다. + +--- + +**관련 문서**: +- [서버와 작업하기](guides/working_with_server.md) +- [getUsers()](api/provider/rest_methods/js_kanban_getusers_method.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md new file mode 100644 index 0000000..9fdebee --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /cards/{id}/comments +title: POST /cards/{cardId}/comments +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 POST /cards/{cardId}/comments REST 경로에 대해 알아보실 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 체험해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# POST `/cards/{cardId}/comments` + +### 설명 + +@short: 카드에 새 댓글을 추가하고 새로 추가된 댓글의 ID가 포함된 json 객체를 반환합니다. + +이 경로는 `/cards/{cardId}/comments` 경로로 전송된 **HTTP POST** 요청을 처리합니다. + +### 요청 본문 (Payload) + +서버는 다음 속성을 포함하는 json 객체를 받기를 기대합니다: + +| 이름 | 유형 | 설명 | +| ----------- | ----------- | ----------- | +| `text` | string | *필수*. 댓글의 내용입니다. | +| `date` | object | *필수*. 댓글 작성 날짜입니다. | + +예시: + +~~~json +{ + "text": "The comment content", + "date": "2023-05-18T09:13:56.656Z", +} +~~~ + +### 응답 (Response) + +이 경로는 새로 추가된 댓글의 ID가 포함된 json 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200 이면 성공, response.status == 500 이면 실패). + +--- + +**관련 문서**: [서버 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md new file mode 100644 index 0000000..56020e3 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md @@ -0,0 +1,51 @@ +--- +sidebar_label: POST /cards +title: POST /cards +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 POST /cards REST 경로에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# POST `/cards` + +### 설명 + +@short: 새 카드를 생성하고 새 카드 ID가 포함된 json 객체를 반환합니다. + +이 경로는 `/cards` 경로로 전송된 **HTTP POST** 요청을 처리합니다. + +### 페이로드 + +서버는 다음 속성을 포함한 json 객체를 받기를 기대합니다: + +| 이름 | 유형 | 설명 | +| ----------- | ----------- | ----------- | +| `label` | string | *필수*. 추가할 새 카드의 이름입니다.| +| `column` | number | *필수*. 대상 열 ID입니다.| +| `row` | number | *필수*. 대상 행 ID입니다.| + +예시: + +~~~json +{ + "label": "New card", + "column": 2, + "row": 1, +} +~~~ + +### 응답 + +경로는 새 카드 ID가 포함된 json 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200 이면 성공, response.status == 500 이면 실패). + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md new file mode 100644 index 0000000..9ce1b5a --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md @@ -0,0 +1,35 @@ +--- +sidebar_label: POST /cards/{id}/vote +title: POST /cards/{cardId}/vote +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 POST /cards/{cardId}/vote REST 경로에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제 및 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# POST `/cards/{cardId}/vote` + +### 설명 + +@short: 카드에 새 투표를 추가하고 투표한 사용자 ID가 포함된 json 객체를 반환합니다. + +이 경로는 `/cards/{cardId}/vote` 경로로 이루어진 **HTTP POST** 요청을 처리합니다. + +### 페이로드 + +페이로드는 필요하지 않습니다. + +### 응답 + +이 경로는 투표한 사용자 ID가 포함된 json 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 상태 코드는 요청이 성공했는지(response.status == 200) 실패했는지(response.status == 500)를 나타냅니다. + +--- + +**관련 문서**: [서버 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md new file mode 100644 index 0000000..893fd53 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md @@ -0,0 +1,47 @@ +--- +sidebar_label: POST /columns +title: POST /columns +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 POST /columns REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# POST `/columns` + +### 설명 + +@short: 새 컬럼을 추가하고 컬럼 ID가 포함된 json 객체를 반환합니다. + +이 경로는 `/columns` 경로에 대한 **HTTP POST** 요청을 처리합니다. + +### 페이로드 + +서버는 다음 속성을 가진 json 객체를 받기를 기대합니다: + +| 이름 | 타입 | 설명 | +| ----------- | ----------- | ----------- | +| `label` | string | *필수*. 추가할 새 컬럼의 이름입니다.| + +예시: + +~~~json +{ + "label": "New column", +} +~~~ + +### 응답 + +이 경로는 새 컬럼 ID가 포함된 json 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 상태 코드는 요청이 성공했는지 (response.status == 200) 실패했는지 (response.status == 500)를 나타냅니다. + +--- + +**관련 문서**: [서버 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md new file mode 100644 index 0000000..07014d6 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md @@ -0,0 +1,54 @@ +--- +sidebar_label: POST /links +title: POST /links +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 POST /links REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제 및 라이브 데모를 체험하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# POST `/links` + +### 설명 + +@short: 새 링크를 생성하고 새 링크 ID가 포함된 json 객체를 반환합니다. + +이 경로는 `/links` 경로로 이루어진 **HTTP POST** 요청을 처리합니다. + +### 페이로드 + +서버는 다음 속성을 가진 json 객체를 받기를 기대합니다: + +| 이름 | 타입 | 설명 | +| ----------- | ---------------------- | ----------- | +| `source` | *number* 또는 *string* | *필수*. 시작 링크의 ID입니다. | +| `target` | *number* 또는 *string* | *필수*. 끝 링크의 ID입니다. | +| `relation` | *string* | *필수*. 링크가 생성하는 관계의 유형입니다. | + +예시: + +~~~json +{ + "source": 1, + "target": 2, + "relation": "relatesTo" +} +~~~ + +### 응답 + +이 경로는 새 링크 ID가 포함된 json 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 상태 코드는 요청이 성공했는지 (response.status == 200) 실패했는지 (response.status == 500)를 나타냅니다. + +--- + +**관련 문서**: +- [Working with server](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md new file mode 100644 index 0000000..12180c1 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /rows +title: POST /rows +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 POST /rows REST 경로에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# POST /rows + +### 설명 + +@short: 새 행을 추가하고 행 ID가 포함된 json 객체를 반환합니다. + +이 경로는 **'/rows'** 경로에 대한 **HTTP POST** 요청을 처리합니다. + +### 페이로드 + +서버는 다음 속성을 가진 json 객체를 받기를 기대합니다: + +| 이름 | 타입 | 설명 | +| ----------- | ----------- | ----------- | +| `label` | string | *필수*. 추가할 새 행의 이름입니다. | +| `collapsed` | boolean | *선택 사항*. 행(스윔레인)의 현재 상태입니다. 기본값은 행이 확장된 상태(값은 **false**)입니다. **true**인 경우, 행이 처음에 접힌 상태로 시작합니다. | + +예시: + +~~~json +{ + "label": "New row", + "collapsed": "true", +} +~~~ + +### 응답 + +경로는 새 행 ID가 포함된 json 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 2 +} +~~~ + +HTTP 상태 코드는 요청이 성공했는지 (response.status == 200) 또는 실패했는지 (response.status == 500)를 나타냅니다. + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md new file mode 100644 index 0000000..43e6b92 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md @@ -0,0 +1,59 @@ +--- +sidebar_label: POST /uploads +title: POST /uploads +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 POST /uploads REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# POST `/uploads` + +### 설명 + +@short: 이 경로는 서버에 이진 파일을 업로드하고 파일 ID, 이름, URL이 포함된 json 객체를 반환합니다. + +이 경로는 `/uploads` 경로로 전송되는 **HTTP POST** 멀티파트 요청을 처리합니다. + +### 페이로드 + +서버는 **multipart/form-data** 요청을 통해 이진 파일을 받아야 합니다. 모든 멀티파트 MIME 타입과 마찬가지로, 요청 본문에는 다음이 포함되어야 합니다: + +- **Content-Disposition** 헤더가 **form-data**로 설정되어야 하며, + - **name** 속성은 **upload** 값을 가져야 합니다. + - **filename** - 업로드된 파일의 원본 파일 이름 +- **Content-Type** 헤더 - 파일 데이터 콘텐츠의 유형 + +요청당 하나의 파일만 전송할 수 있습니다. + +예시: + +~~~ + +------WebKitFormBoundarySlwgXDBw7kcKSI4p +Content-Disposition: form-data; name="upload"; filename="myImage.png" +Content-Type: image/png + +------WebKitFormBoundarySlwgXDBw7kcKSI4p-- + +~~~ + +### 응답 + +이 경로는 파일 ID, 이름, URL이 포함된 json 객체를 반환합니다. + +**isCover** 속성은 이미지가 커버 이미지인지 여부를 나타냅니다 (true는 커버 이미지, false는 아님). + +예시: + +~~~ json +{ + "id":4, + "name":"myImage.png", + "url":"http://localhost:3000/uploads/4/myImage.png", + "isCover":false +} +~~~ + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200은 성공, response.status == 500은 실패). + +--- + +**관련 문서**: [서버 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md new file mode 100644 index 0000000..fac9113 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md @@ -0,0 +1,56 @@ +--- +sidebar_label: PUT /cards/{id}/comments/{id} +title: PUT /cards/{cardId}/comments/{commentId} +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 PUT /cards/{cardId}/comments/{cardId} REST 경로에 대해 알아보실 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# PUT `/cards/{cardId}/comments/{commentId}` + +### 설명 + +@short: 카드 내 댓글을 업데이트하고, 업데이트된 댓글의 ID를 포함한 JSON 객체를 반환합니다. + +이 경로는 `cards/{cardId}/comments/{commentId}` 경로로 전송된 **HTTP PUT** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수들이 요청 라인에 포함되어 전송됩니다: + +| 이름 | 타입 | 설명 | +| ------------- | ----------- | ---------------------------------- | +| `cardId` | number | *필수*. 댓글이 업데이트될 카드의 ID입니다. | +| `commentId` | number | *필수*. 업데이트할 댓글의 ID입니다. | + +### 페이로드 + +서버는 다음 속성을 포함한 JSON 객체를 받기를 기대합니다: + +| 이름 | 타입 | 설명 | +| ------------- | ----------- | ------------------------- | +| `text` | string | *필수*. 댓글의 텍스트 내용입니다. | + +예시: + +~~~json +{ + "text": "The comment's content" +} +~~~ + +### 응답 + +서버는 카드 ID가 포함된 JSON 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200 은 성공, response.status == 500 은 실패). + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md new file mode 100644 index 0000000..0927008 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md @@ -0,0 +1,93 @@ +--- +sidebar_label: PUT /cards/{id}/move +title: PUT /cards/{id}/move +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 PUT /cards/{id}/move REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도하며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# PUT `/cards/{id}/move` + +### 설명 + +@short: 카드를 지정된 위치로 이동합니다 + +이 경로는 `cards/{id}/move` 경로로 전송되는 **HTTP PUT** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함되어 전송됩니다: + +| 이름 | 타입 | 설명 | +| ---------- | ----------- | ----------- | +| `id` | number | *필수*. 이동할 카드의 ID입니다. 여러 카드를 이동하려는 경우, id는 0으로 설정해야 합니다.| + +:::info +여러 카드를 이동할 때는 반드시 `id`를 0으로 설정해야 합니다. 그렇지 않고 다른 값으로 설정하면 지정된 id 값을 가진 카드 한 장만 이동됩니다. +::: + +### 페이로드 + +서버는 다음 속성을 가진 JSON 객체를 받기를 기대합니다: + +| 이름 | 타입 | 설명 | +| ----------- | ----------- | ----------- | +| `id` | number |*필수*. 이동할 카드의 ID입니다. | +| `columnId` | number | *필수*. 카드가 이동할 열의 ID입니다.| +| `rowId` | number | *필수*. 카드가 이동할 행의 ID입니다.| +| `before` | number | *선택*. 이동한 카드가 위치할 카드의 바로 앞에 놓일 카드의 ID입니다.| +| `batch` | object | *다중 선택 시 필수*. 이동할 카드 객체들의 배열입니다.| + +예제: + +~~~json +{ + "id": 4, + "columnId": 2, + "rowId": 1, + "before": "7" +} +~~~ + +여러 카드를 이동하는 경우, `batch` 속성은 이동할 모든 카드 객체의 배열을 포함해야 합니다: + +~~~json +{ + "batch": [ + { + "id": 2, + "columnId": 1, + "rowId": 1, + "before": "1" + }, + { + "id": 7, + "columnId": 1, + "rowId": 1, + "before": "1" + } + ] +} +~~~ + +### 응답 + +서버는 카드 ID가 포함된 JSON 객체를 반환합니다(한 장의 카드가 이동된 경우) 또는 다중 카드 작업의 경우 ID가 0으로 설정된 객체를 반환합니다. + +예제: + +~~~json title="단일 카드 작업에 대한 응답" +{ + "id": 4 +} +~~~ + +~~~json title="다중 카드 작업에 대한 응답" +{ + "id": 0 +} +~~~ + +HTTP 상태 코드는 요청이 성공했는지(response.status == 200) 실패했는지(response.status == 500)를 나타냅니다. + +--- + +**관련 문서**: [서버 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md new file mode 100644 index 0000000..c927adc --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md @@ -0,0 +1,71 @@ +--- +sidebar_label: PUT /cards +title: PUT /cards +description: DHTMLX JavaScript Kanban 라이브러리의 PUT /cards REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 실행해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# PUT `/cards` + +### 설명 + +@short: 지정된 카드의 데이터를 업데이트하고 빈 JSON 객체를 반환합니다. + +이 경로는 `/cards/{id}` 경로에 대한 **HTTP PUT** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함됩니다: + +| 이름 | 타입 | 설명 | +| ----------- | ----------- | -------------------------------- | +| `id` | number | *필수*. 업데이트할 카드의 ID입니다.| + +### 페이로드 + +서버는 카드 객체를 포함하는 JSON 객체를 받아야 하며, 이 객체에는 변경되지 않은 속성과 새로 추가되거나 수정된 모든 카드 속성이 포함되어야 합니다. + +| 이름 | 타입 | 설명 | +| ------------- | ----------- | ------------------------------------------------------------------------------------------------ | +| `label` | string | *필수*. 업데이트할 카드의 이름입니다. | +| `description` | string | *필수*. 카드 설명입니다. | +| `column` | number | *필수*. 카드가 참조하는 열의 ID입니다. | +| `row` | number | *필수*. 카드가 참조하는 행의 ID입니다. | +| `start_date` | string | *필수*. ISO 형식 yyyy-MM-dd'T'HH:mm:ss.SSSXXX의 시작 날짜입니다. | +| `end_date` | string | *필수*. ISO 형식 yyyy-MM-dd'T'HH:mm:ss.SSSXXX의 종료 날짜입니다. | +| `progress` | number | *필수*. 0에서 100 사이의 값으로 진행률 표시줄 값을 나타냅니다. | +| `attached` | object | *필수*. 첨부된 파일 데이터 배열입니다. 자세한 객체 예시는 [**cards**](api/config/js_kanban_cards_config.md)에서 확인하세요. | +| `color` | string | *필수*. 카드 상단 라인의 색상(HEX)입니다. | +| `priority` | number | *필수*. 카드 우선순위 ID입니다. | +| `users` | object | *필수*. 할당된 사용자 ID 배열입니다. 자세한 객체 예시는 [**cardShape**](api/config/js_kanban_cardshape_config.md)에서 확인하세요. | + +예시: + +~~~json +{ + "card": { + "label": "Drag and drop", + "description": "", + "column": 3, + "row": 1, + "start_date": null, + "end_date": "2018-01-01T00:00:00Z", + "progress": 100, + "attached": [], + "color": "#58C3FE", + "priority": 2, + "users": [] + }, +} +~~~ + +카드 객체의 다른 예시는 [**cards**](api/config/js_kanban_cards_config.md) 섹션에서 확인할 수 있습니다. + +### 응답 + +성공 시, 빈 JSON 객체가 반환됩니다. + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200은 성공, response.status == 500은 실패). + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md new file mode 100644 index 0000000..c930880 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /columns/{id}/move +title: PUT /columns/{id}/move +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 PUT /columns/{id}/move REST 경로에 대해 알아볼 수 있습니다. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해 보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드하세요. +--- + +# PUT `/columns/{id}/move` + +### 설명 + +@short: 열을 지정된 위치로 이동합니다 + +이 경로는 `columns/{id}/move` 경로로 전송된 **HTTP PUT** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함됩니다: + +| 이름 | 유형 | 설명 | +| ---------- | ----------- | --------------------------- | +| `id` | number | *필수*. 이동할 열의 ID입니다.| + +### 페이로드 + +서버는 다음 속성을 가진 json 객체를 받기를 기대합니다: + +| 이름 | 유형 | 설명 | +| ---------- | ----------- | -------------------------------------------------- | +| `before` | number | *선택사항*. 이동할 열이 위치할 대상 열의 바로 앞 열 ID입니다.| + +예시: + +~~~json +{ + "before": 3 +} +~~~ + +### 응답 + +서버는 이동된 열의 ID를 포함한 json 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 상태 코드는 요청의 성공 여부를 나타냅니다 (response.status == 200 이면 성공, response.status == 500 이면 실패). + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md new file mode 100644 index 0000000..341ef83 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /columns +title: PUT /columns +description: DHTMLX JavaScript Kanban 라이브러리의 PUT /columns REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# PUT `/columns` + +### 설명 + +@short: 지정된 컬럼의 데이터를 업데이트하고 빈 json 객체를 반환합니다. + +이 경로는 `/columns/{id}` 경로에 대한 **HTTP PUT** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함됩니다: + +| 이름 | 타입 | 설명 | +| ---------- | ----------- | -------------------------- | +| `id` | number | *필수*. 업데이트할 컬럼의 ID입니다.| + +### 페이로드 + +서버는 모든 컬럼 속성(변경되지 않은 속성과 새로 추가되거나 수정된 속성 모두)을 포함한 json 객체를 받아야 합니다. + +| 이름 | 타입 | 설명 | +| ----------- | ----------- | ----------------------------------------------------------------- | +| `label` | string | *필수*. 업데이트할 컬럼의 이름입니다. | +| `collapsed` | boolean | *선택*. 컬럼의 상태: 컬럼이 처음에 접혀 있으면 **true**, 확장 상태(기본값)면 **false**입니다.| + +예시: + +~~~json +{ + "column": { + "label": "Column 1", + "collapsed": false, + } +} +~~~ + +컬럼 객체의 다른 예시는 [**columns**](api/config/js_kanban_columns_config.md) 섹션에서 확인할 수 있습니다. + +### 응답 + +성공 상태인 경우, 빈 json 객체가 반환됩니다. + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200 이면 성공, response.status == 500 이면 실패). + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md new file mode 100644 index 0000000..c6facd0 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /rows/{id}/move +title: PUT /rows/{id}/move +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 PUT /rows/{id}/move REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 탐색하고, 코드 예제와 라이브 데모를 시도해보며, DHTMLX Kanban의 무료 30일 평가판을 다운로드할 수 있습니다. +--- + +# PUT `/rows/{id}/move` + +### 설명 + +@short: 행을 지정된 위치로 이동합니다. + +이 경로는 `rows/{id}/move` 경로에 대해 **HTTP PUT** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함됩니다: + +| 이름 | 유형 | 설명 | +| ---------- | ----------- | ----------- | +| `id` | number | *필수*. 이동할 행의 ID입니다.| + +### 페이로드 + +서버는 다음 속성을 가진 JSON 객체를 받기를 기대합니다: + +| 이름 | 유형 | 설명 | +| ---------- | ----------- | ----------- | +| `before` | number | *선택 사항*. 이동할 행이 위치해야 하는 대상 행의 ID입니다.| + +예시: + +~~~json +{ + "before": 3 +} +~~~ + +### 응답 + +서버는 이동된 행의 ID를 포함하는 JSON 객체를 반환합니다. + +예시: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200 은 성공, response.status == 500 은 실패). + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md new file mode 100644 index 0000000..3892cb5 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /rows +title: PUT /rows +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 PUT /rows REST 경로에 대해 알아보세요. 개발자 가이드와 API 참조를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# PUT `/rows` + +### 설명 + +@short: 지정된 행(스윔레인)의 데이터를 업데이트하고 빈 json 객체를 반환합니다. + +이 경로는 `/rows/{id}` 경로에 대한 **HTTP PUT** 요청을 처리합니다. + +### 경로 매개변수 + +다음 매개변수가 요청 라인에 포함됩니다: + +| 이름 | 타입 | 설명 | +| ---------- | ----------- | ----------- | +| `id` | number | *필수*. 업데이트할 행(스윔레인)의 ID입니다.| + +### 페이로드 + +서버는 모든 행 속성(변경되지 않은 속성 및 새로 변경된 속성 모두)을 포함한 json 객체를 받아야 합니다. + +| 이름 | 타입 | 설명 | +| ----------- | ----------- | ----------- | +| `label` | string | *필수*. 업데이트할 행의 이름입니다.| +| `collapsed` | boolean | *선택*. 행의 상태입니다: 행이 처음에 접혀 있으면 **true**, 확장된 상태(기본값)면 **false**.| + +예시: + +~~~json +{ + "row": { + "label": "Row 1", + "collapsed": false, + } +} +~~~ + +행 객체의 다른 예시는 [**rows**](api/config/js_kanban_rows_config.md) 섹션에서 확인할 수 있습니다. + +### 응답 + +성공 상태인 경우, 빈 json 객체가 반환됩니다. + +HTTP 상태 코드는 요청 성공 여부를 나타냅니다 (response.status == 200이면 성공, response.status == 500이면 실패). + +--- + +**관련 문서**: [서버와 작업하기](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png b/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png new file mode 100755 index 0000000..247c695 Binary files /dev/null and b/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png differ diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png b/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png new file mode 100755 index 0000000..525d0d0 Binary files /dev/null and b/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png differ diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png b/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png new file mode 100644 index 0000000..f6aa948 Binary files /dev/null and b/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png differ diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png b/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png new file mode 100755 index 0000000..4c79b7f Binary files /dev/null and b/i18n/ko/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png differ diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/assets/trial_kanban.png b/i18n/ko/docusaurus-plugin-content-docs/current/assets/trial_kanban.png new file mode 100644 index 0000000..e71d948 Binary files /dev/null and b/i18n/ko/docusaurus-plugin-content-docs/current/assets/trial_kanban.png differ diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png b/i18n/ko/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png new file mode 100644 index 0000000..555b3f1 Binary files /dev/null and b/i18n/ko/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png differ diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/configuration.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/configuration.md new file mode 100644 index 0000000..722d1d4 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/configuration.md @@ -0,0 +1,577 @@ +--- +sidebar_label: 구성 +title: 구성 +description: DHTMLX JavaScript Kanban 라이브러리의 문서에서 구성 방법을 확인할 수 있습니다. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제와 라이브 데모를 직접 체험해보세요. DHTMLX Kanban의 30일 무료 평가판도 다운로드할 수 있습니다. +--- + +# 구성 + +*Kanban*의 외관과 기능은 관련 API를 통해 구성할 수 있습니다. 사용 가능한 파라미터를 통해 다음과 같은 작업이 가능합니다: + +- [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성으로 카드의 외관을 구성 +- [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성으로 에디터 필드 구성 +- [`editor`](api/config/js_kanban_editor_config.md) 속성으로 에디터 동작 구성 +- [`renderType`](api/config/js_kanban_rendertype_config.md) 및 [`scrollType`](api/config/js_kanban_scrolltype_config.md) 속성으로 렌더링 및 스크롤 설정 +- [`history`](api/config/js_kanban_history_config.md) 속성으로 Kanban 기록 설정 +- [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) 속성으로 카드 외관 커스터마이즈 + - 자세한 내용은 [**커스터마이징**](guides/customization.md) 섹션을 참고하세요! +- [`locale`](api/config/js_kanban_locale_config.md) 속성으로 원하는 로케일 적용 + - 자세한 내용은 [**로컬라이제이션**](guides/localization.md) 섹션을 참고하세요! +- [`cards`](api/config/js_kanban_cards_config.md), [`columns`](api/config/js_kanban_columns_config.md), [`rows`](api/config/js_kanban_rows_config.md), [`links`](api/config/js_kanban_links_config.md) 속성으로 카드, 컬럼, 행, 링크 데이터 로드 + - 자세한 내용은 [**데이터 작업**](guides/working_with_data.md) 섹션을 참고하세요! + +## 카드 + +Kanban 보드는 *카드*가 *컬럼*과 *행*에 분배되어 구성됩니다. 카드의 외관은 [`cardShape`](api/config/js_kanban_cardshape_config.md) 구성 속성으로 설정할 수 있습니다. 카드 템플릿에 포함(또는 제외)할 수 있는 사전 정의 필드는 다음과 같습니다: + +- `label: boolean` 설정으로 카드 레이블 +- `description: boolean` 설정으로 카드 설명 + + :::tip + Kanban 에디터의 입력란을 통해 **label**과 **description** 필드를 관리할 수 있습니다. 해당 필드를 활성화하면 자동으로 에디터에 입력란이 표시됩니다. 이러한 입력란은 [**text** 및 **textarea**](#text-textarea-타입) 타입으로 설정할 수 있습니다. + ::: + +- `progress: boolean` 설정으로 카드 진행률 + + :::tip + **progress** 필드는 Kanban 에디터의 컨트롤로 관리할 수 있습니다. 이 필드를 활성화하면 관련 컨트롤이 자동으로 에디터에 표시됩니다. 해당 컨트롤은 [**progress**](#progress-타입) 타입으로 설정할 수 있습니다. + ::: + +- `start_date: boolean` 설정으로 시작일 +- `end_date: boolean` 설정으로 종료일 + + :::tip + **start date**와 **end date** 필드는 Kanban 에디터의 컨트롤로 관리할 수 있습니다. 필드를 활성화하면 관련 컨트롤이 자동으로 표시됩니다. 해당 컨트롤은 [**date**](#date-daterange-타입) 타입으로 설정할 수 있습니다. + ::: + +- `menu: boolean` 설정으로 카드 컨텍스트 메뉴 +- `attached: boolean` 설정으로 카드 첨부파일 + + :::tip + Kanban 에디터의 해당 필드를 통해 **파일 첨부**가 가능합니다. 이 필드는 [**files**](#files-타입) 타입으로 설정할 수 있습니다. + ::: + +- `color: boolean` 설정으로 카드 색상 + + :::tip + 카드의 **상단 색상 라인**은 Kanban 에디터의 컨트롤로 관리할 수 있습니다. **color**를 활성화하면 관련 컨트롤(*colorpicker*)이 자동으로 에디터에 표시됩니다. 이 컨트롤은 [**color**](#color-타입) 타입으로 설정할 수 있습니다. + ::: + +- `cover: boolean` 설정으로 카드 커버(미리보기 이미지) +- `comments: boolean` 설정으로 카드 댓글 +- `confirmDeletion: boolean` 설정으로 카드 삭제 확인 다이얼로그 +- `votes: boolean | { show: boolean, clicable: true }` 설정으로 카드 투표 +- `users: boolean | { show: boolean, values: object, maxCount: number | false }` 설정으로 카드 담당자(사용자) 지정 + + :::tip + Kanban 에디터의 컨트롤을 통해 한 명 또는 여러 명의 사용자를 카드에 할당할 수 있습니다. 단일 사용자 지정은 [**combo** 또는 **select**](#combo-select-multiselect-타입) 타입, 복수 사용자 지정은 [**multiselect**](#combo-select-multiselect-타입) 타입을 사용하세요. + ::: + +- `priority: boolean | { show: boolean, values: object }` 설정으로 카드 우선순위 + + :::tip + **priority** 필드는 Kanban 에디터의 컨트롤로 관리할 수 있습니다. **priority**를 활성화하면 관련 컨트롤이 자동으로 표시됩니다. 이 컨트롤은 [**combo** 또는 **select**](#combo-select-multiselect-타입) 타입만 사용할 수 있습니다. + ::: + +- *커스텀 필드*는 `headerFields: [ { key: string, label: string, css: string } ]` 설정으로 추가 + +~~~jsx {12-35,42} +const users = [ // 사용자 데이터 + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // 카드 우선순위 데이터 + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardShape = { // 카드 설정 + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + priority: { + show: true, + values: cardPriority + }, + users: { + show: true, + values: users + }, + headerFields: [ + { + key: "sprint", + label: "Custom field", + css: "custom_css_class" + } + ] +}; + +new kanban.Kanban("#root", { + // 카드 데이터 + columns, + cards, + // 카드 설정 + cardShape +}); +~~~ + +:::note +[`cardShape`](api/config/js_kanban_cardshape_config.md) 속성으로 카드 설정을 지정하지 않으면, 위젯은 [**defaultCardShape**](api/config/js_kanban_cardshape_config.md#default-config) 파라미터 세트를 적용합니다! +::: + +## 에디터 + +:::info +[`editor.placement`](api/config/js_kanban_editor_config.md) 속성으로 에디터를 **사이드바** 또는 **모달 창**으로 표시할 수 있습니다! +::: + +Kanban의 *에디터*는 카드 데이터 관리를 위한 필드로 구성되어 있습니다. 에디터 필드(컨트롤)는 [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성으로 설정할 수 있습니다. 사용할 수 있는 에디터 필드 타입은 다음과 같습니다: + +- [**combo**, **select**, **multiselect**](#combo-select-multiselect-타입) +- [**color**](#color-타입) +- [**text**, **textarea**](#text-textarea-타입) +- [**progress**](#progress-타입) +- [**files**](#files-타입) +- [**date**, **dataRange**](#date-daterange-타입) +- [**comments**](#comments-타입) +- [**links**](#links-타입) + +### Combo, Select, Multiselect 타입 + +**combo**, **select**, **multiselect** 타입의 에디터 필드는 다음과 같이 설정할 수 있습니다: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", // 또는 "select", "multiselect" + key: "priority", // "cardShape" 속성에서 사용하는 "priority" 키 + label: "Priority", + values: [ + { id: 1, label: "high" }, + { id: 2, label: "medium" }, + { id: 3, label: "low" } + ] + }, + // 다른 필드 설정 + ] +}); +~~~ + +:::info +**"multiselect"** 및 **"combo"** 타입의 에디터 필드는 **avatar** 속성으로 미리보기 이미지 경로를 지정할 수 있습니다: + +~~~jsx {3,9,13} +editorShape: [ + { + type: "multiselect", // 또는 "combo" + key: "users", // "cardShape" 속성에서 사용하는 "users" 키 + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + { + id: 2, label: "John", + avatar: "preview_image_path_2.png" + } + ] + }, + // 다른 필드 설정 +] +~~~ + +[**Kanban. Limiting assignments to one user only**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban) +::: + +### Color 타입 + +**color** 타입의 에디터 필드는 다음과 같이 설정할 수 있습니다: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "color", + key: "color", // "cardShape" 속성에서 사용하는 "color" 키 + label: "Card color", + values: ["#65D3B3", "#FFC975", "#58C3FE"], + config: { + clear: true, + placeholder: "Select color" + } + }, + // 다른 필드 설정 + ] +}); +~~~ + +### Text, Textarea 타입 + +**text**, **textarea** 타입의 에디터 필드는 다음과 같이 설정할 수 있습니다: + +~~~jsx {3-14} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "text", // 또는 "textarea" + key: "label", + label: "Label", + config: { + placeholder: "Type your tips here", + readonly: false, + focus: true, + disabled: false, + inputStyle: "height: 50px;" + } + }, + // 다른 필드 설정 + ] +}); +~~~ + +### Progress 타입 + +**progress** 타입의 에디터 필드는 다음과 같이 설정할 수 있습니다: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "progress", + key: "progress", // "cardShape" 속성에서 사용하는 "progress" 키 + label: "Progress", + config: { + min: 10, + max: 90, + step: 5 + } + }, + // 다른 필드 설정 + ] +}); +~~~ + +### Files 타입 + +**files** 타입의 에디터 필드는 다음과 같이 설정할 수 있습니다: + +#### 문자열로 업로드 URL 설정 + +~~~jsx {4-15} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + { + type: "files", + key: "attached", // "cardShape" 속성에서 사용하는 "attached" 키 + label: "Attachment", + uploadURL: url + "/uploads", // 문자열로 URL 지정 + config: { + accept: "image/*", // "video/*", "audio/*" + disabled: false, + multiple: true, + folder: false + } + }, + // 다른 필드 설정 + ] +}); +~~~ + +#### 함수로 업로드 URL 설정 + +~~~jsx {9-31} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + ...defaultEditorShape, + { + key: "attached", + type: "files", + label: "Files", + uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // 토큰 또는 기타 헤더 + } + }; + + return fetch(url + "/uploads", config) // URL + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); + } + } + ] +}); +~~~ + +### Date, DateRange 타입 + +**date** 타입의 에디터 필드는 다음과 같이 설정할 수 있습니다: + +~~~jsx {3-8} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "date", + key: "start_date", + label: "Start date", + format: "%d/%m/%y" + }, + // 다른 필드 설정 + ] +}); +~~~ + +**dateRange** 타입의 에디터 필드는 다음과 같이 설정할 수 있습니다: + +~~~jsx {3-11} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "dateRange", + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range", + format: "%d/%m/%y" + }, + // 다른 필드 설정 + ] +}); +~~~ + +### Comments 타입 + +**comments** 타입의 에디터 필드는 다음과 같이 설정할 수 있습니다: + +~~~jsx {3-13} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "comments", + key: "comments", + label: "Comments", + config: { + dateFormat: "%M %d", + placement: "page", // 또는 "editor" + html: true, + confirmDeletion: true + } + }, + // 다른 필드 설정 + ] +}); +~~~ + +### Links 타입 + +**links** 타입의 에디터 필드는 다음과 같이 설정할 수 있습니다: + +~~~jsx {3-10} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "links", + key: "links", + label: "Links", + config: { + confirmDeletion: true + } + }, + // 다른 필드 설정 + ] +}); +~~~ + +### 에디터 필드와 카드 필드 바인딩 + +:::info +에디터 필드를 해당 카드 필드에 연결하려면, [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성 객체에 **key**를 지정해야 합니다 (`key: "editor_field_key"`). 이 키의 값은 [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성(내장 카드 필드의 경우)에서 *true*로 설정하거나, (커스텀 카드 필드의 경우) **headerFields** 배열에 명시해야 합니다. 해당 키를 통해 각 필드의 초기 데이터도 제공할 수 있습니다. + +~~~jsx {5,13,22,25,33-34,38-39,45-47} +// 에디터 설정 +const editorShape = [ + { + type: "text", + key: "label", + label: "Label", + config: { + placeholder: "Enter new label here" + } + }, + { + type: "textarea", + key: "note", + label: "Note", + config: { + placeholder: "Enter usefull note here" + } + } +]; +// 카드 설정 +const cardShape = { + label: true, // 내장 필드 키 + headerFields: [ + { + key: "note", // 커스텀 필드 키 + label: "Note" + } + ] +}; +// 카드 데이터 +const cards = [ + { + label: "Volvo", + note: "It is the swedish car", + column: "backlog" + }, + { + label: "Audi", + note: "It is the german car", + column: "backlog" + } +]; +// Kanban 생성 +new kanban.Kanban("#root", { + editorShape, + cardShape, + cards, + columns + // 기타 구성 파라미터 +}); +~~~ +::: + +:::note +[`editorShape`](api/config/js_kanban_editorshape_config.md) 속성으로 에디터 설정을 지정하지 않으면, 위젯은 [**defaultEditorShape**](api/config/js_kanban_editorshape_config.md#default-config) 파라미터 세트를 적용합니다. 이 경우, [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성으로 카드 필드를 활성화한 후에만 에디터에 기본 컨트롤과 입력란이 표시됩니다. +::: + +### 에디터 설정 + +[`editor`](api/config/js_kanban_editor_config.md) 속성을 사용하여 에디터를 다음과 같이 설정할 수 있습니다: + +- *`editor.autoSave`* 속성으로 에디터의 자동 저장 모드 활성화/비활성화 +- *`editor.debounce`* 속성으로 자동 저장 지연 시간 지정(***autoSave: true*** 파라미터에서만 동작) + +~~~jsx {6-9} +// Kanban 생성 +new kanban.Kanban("#root", { + columns, + cards, + editorShape, + editor: { + autoSave: true, + debounce: 2000 + } + // 기타 파라미터 +}); +~~~ + +## 툴바 + +Kanban의 **툴바**는 *카드 검색*을 위한 검색창, *카드 정렬* 및 *새 컬럼/행 추가* 컨트롤로 구성됩니다. 툴바를 표시하려면 **kanban.Toolbar()** 생성자를 사용해 별도의 컨테이너에서 초기화해야 합니다. + +~~~jsx {13} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + // 데이터 + columns, + cards, + rows, + // 카드 설정 + cardShape, + // 에디터 설정 + editorShape +}); + +new kanban.Toolbar("#toolbar", { api: board.api }); +~~~ + +**items** 속성으로 툴바의 컨트롤을 관리(숨김/노출/커스터마이즈)할 수 있습니다: + +~~~jsx {6-51} +// Kanban 생성 +const board = new kanban.Kanban("#root", {...}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { // 커스텀 검색바 + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", // 빈 공간 + "undo", // 기록에서 카드 작업 실행 취소 + "redo", // 기록에서 카드 작업 다시 실행 + { // 커스텀 정렬 컨트롤 + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", // 새 컬럼 추가 + "addRow", // 새 행 추가 + // 커스텀 요소 + ] +}); +~~~ + +:::tip +툴바의 일부 컨트롤을 숨기려면 **items** 배열에서 해당 문자열을 제거하면 됩니다. +::: + +## 예제 + +이 스니펫에서는 Kanban의 **카드**, **에디터** 및 **툴바**를 구성하는 방법을 확인할 수 있습니다: + + \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/customization.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/customization.md new file mode 100644 index 0000000..e169f5d --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/customization.md @@ -0,0 +1,42 @@ +--- +sidebar_label: 사용자 정의 +title: 사용자 정의 +description: DHTMLX JavaScript Kanban 라이브러리의 문서에서 사용자 정의에 대해 알아보실 수 있습니다. 개발자 가이드와 API 레퍼런스를 둘러보고, 코드 예제와 라이브 데모를 직접 시도해 보며, DHTMLX Kanban의 30일 무료 평가판도 다운로드해보세요. +--- + +# 사용자 정의 + +Kanban을 구성하는 것 외에도, 외관과 동작을 자유롭게 사용자 정의할 수 있습니다. 위젯에서는 카드에 대한 사용자 정의 템플릿 지정, 카드·컬럼·행에 대한 컨텍스트 메뉴 수정, 툴바 구조 및 기능 변경, Kanban에 맞춤형 CSS 스타일 적용이 가능합니다. + +## 사용자 정의 카드 + +카드를 사용자 정의 템플릿으로 표시하려면 [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) 속성을 사용할 수 있습니다. 이 속성은 원하는 스타일과 로직을 정의하여 Kanban에 적용할 수 있는 콜백 함수입니다. 아래의 예제를 참고하세요: + + + +## 사용자 정의 컨텍스트 메뉴 + +카드, 컬럼, 행에 대한 컨텍스트 메뉴를 사용자 정의하려면 [`cardShape`](api/config/js_kanban_cardshape_config.md), [`columnShape`](api/config/js_kanban_columnshape_config.md), [`rowShape`](api/config/js_kanban_rowshape_config.md)와 같은 관련 속성을 사용할 수 있습니다. 아래의 예제를 참고하세요: + + + +## 사용자 정의 툴바 + +툴바의 구조와 기능을 사용자 정의하려면 [`items`](api/config/toolbar_items_config.md) 속성을 사용할 수 있습니다. 이 설정의 배열 내에서 필요한 컨트롤을 정의하고, 원하는 순서로 배치하며, 동작도 변경할 수 있습니다. + +아래 예제에서는 다음과 같은 사용자 정의 방법을 확인할 수 있습니다: + +- 컨트롤 배치 순서 변경 +- 검색바 및 그 동작 +- 정렬 컨트롤 및 그 동작 +- 사용자 정의 컨트롤 및 그 동작 + + + +## 사용자 정의 스타일 + +Kanban의 외관은 관련 *CSS 변수* 값을 변경하여 자유롭게 꾸밀 수 있습니다. 자세한 내용은 [**Stylization**](guides/stylization.md) 섹션을 참고하세요. + +아래 예제에서는 Kanban에 사용자 정의 스타일을 적용하는 방법을 볼 수 있습니다: + + \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/initialization.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/initialization.md new file mode 100644 index 0000000..92cb02b --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/initialization.md @@ -0,0 +1,91 @@ +--- +sidebar_label: 초기화 +title: 초기화 +description: DHTMLX JavaScript Kanban 라이브러리의 초기화에 대해 알아보세요. 개발자 가이드와 API 레퍼런스를 둘러보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# 초기화 + +이 가이드는 Kanban 보드의 기능으로 애플리케이션을 확장할 수 있도록 페이지에 Kanban을 생성하는 방법을 단계별로 안내합니다. 아래 단계를 따라 사용 준비가 완료된 컴포넌트를 만들 수 있습니다. + +1. [Kanban 소스 파일을 페이지에 포함하기](#소스-파일-포함하기) +2. [Kanban 컨테이너 생성하기](#컨테이너-생성하기) +3. [생성자를 사용해 Kanban 초기화하기](#kanban-초기화하기) + +## 소스 파일 포함하기 + +[패키지 다운로드](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml) 후 프로젝트의 폴더에 압축을 해제합니다. + +Kanban을 생성하려면 두 개의 소스 파일을 페이지에 포함해야 합니다. + +- *kanban.js* +- *kanban.css* + +소스 파일의 상대 경로가 올바른지 확인하세요. + +~~~html title="index.html" + + +~~~ + +## 컨테이너 생성하기 + +Kanban을 위한 컨테이너를 추가하고, 예를 들어 *"root"*와 같은 ID를 지정하세요. + +~~~jsx title="index.html" +
+~~~ + +*Toolbar*와 함께 위젯을 생성하려면, 별도의 컨테이너도 추가해야 합니다. + +~~~jsx {1} title="index.html" +
// Toolbar용 컨테이너 +
// Kanban용 컨테이너 +~~~ + +## Kanban 초기화하기 + +**kanban.Kanban** 생성자를 사용해 Kanban을 초기화합니다. 이 생성자는 두 개의 파라미터를 받습니다. + +- HTML 컨테이너 (HTML 컨테이너의 ID) +- 설정 속성이 포함된 객체. [전체 속성 목록 보기](#설정-속성) + +~~~jsx title="index.html" +// Kanban 생성 +new kanban.Kanban("#root", { + // 설정 속성 +}); +~~~ + +*Toolbar*와 함께 위젯을 생성하려면, **kanban.Toolbar** 생성자를 별도로 사용해 초기화해야 합니다. 이 생성자도 두 개의 파라미터를 받습니다. + +- HTML 컨테이너 (HTML 컨테이너의 ID) +- 설정 속성이 포함된 객체 + +~~~jsx {6-8} title="index.html" +// Kanban 생성 +const board = new kanban.Kanban("#root", { + // 설정 속성 +}); + +new kanban.Toolbar("#toolbar", { + // 설정 속성 +}); +~~~ + +:::info +Kanban의 Toolbar 구성에 대해 더 자세히 알고 싶다면 [**Configuration**](guides/configuration.md/#toolbar) 섹션을 참고하세요. +::: + +### 설정 속성 + +:::note +**Kanban**의 전체 설정 속성 목록은 [**여기**](api/overview/properties_overview.md)에서 확인할 수 있습니다.
+**Kanban의 Toolbar** 설정 속성 전체 목록은 [**여기**](api/overview/toolbar_properties_overview.md)에서 확인할 수 있습니다. +::: + +## 예제 + +아래 코드 스니펫에서는 초기 데이터와 함께 **Kanban**을 초기화하는 방법을 확인할 수 있습니다. + + \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration.md new file mode 100644 index 0000000..4ae86ed --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration.md @@ -0,0 +1,17 @@ +--- +sidebar_label: DHTML 위젯과의 통합 +title: DHTML 위젯과의 통합 +description: DHTMLX JavaScript Kanban 라이브러리의 문서에서 통합 방법을 확인할 수 있습니다. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드해 보세요. +--- + +# DHTML 위젯과의 통합 + +DHTMLX Kanban은 다른 DHTMLX 위젯(예: [Gantt](https://docs.dhtmlx.com/gantt/), [Scheduler](https://docs.dhtmlx.com/scheduler/), [To Do List](https://docs.dhtmlx.com/todolist/))과 통합하여 사용할 수 있습니다. 아래 예제를 참고하세요. + +## DHTMLX Gantt 및 Scheduler와의 통합 + + + +## DHTMLX To Do List와의 통합 + + \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md new file mode 100644 index 0000000..a4cc84f --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md @@ -0,0 +1,388 @@ +--- +sidebar_label: Angular와의 통합 +title: Angular와의 통합 +description: DHTMLX JavaScript Kanban 라이브러리의 문서에서 Angular와의 통합에 대해 알아보세요. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제와 라이브 데모를 직접 시도해보고, DHTMLX Kanban의 무료 30일 평가판도 다운로드해보세요. +--- + +# Angular와의 통합 + +:::tip +이 문서를 읽기 전에 **Angular**의 기본 개념과 패턴에 익숙해야 합니다. 지식을 다시 확인하려면 [**Angular documentation**](https://v17.angular.io/docs)을 참고하세요. +::: + +DHTMLX Kanban은 **Angular**와 호환됩니다. DHTMLX Kanban을 **Angular**에서 사용하는 방법에 대한 코드 예제가 준비되어 있습니다. 자세한 내용은 [**GitHub의 예제**](https://github.com/DHTMLX/angular-kanban-demo)를 참고하세요. + +## 프로젝트 생성 + +:::info +새 프로젝트를 생성하기 전에 [**Angular CLI**](https://v17.angular.io/cli)와 [**Node.js**](https://nodejs.org/en/)를 설치하세요. +::: + +Angular CLI를 사용하여 **my-angular-kanban-app** 프로젝트를 생성합니다. 아래 명령어를 실행하세요: + +~~~json +ng new my-angular-kanban-app +~~~ + +:::note +이 가이드를 따르려면, 새 Angular 앱을 생성할 때 서버 사이드 렌더링(SSR)과 정적 사이트 생성(SSG/Prerendering)을 비활성화하세요! +::: + +위 명령어는 필요한 모든 도구를 설치하므로 추가 명령어를 실행할 필요가 없습니다. + +### 의존성 설치 + +새로 생성한 앱 디렉토리로 이동하세요: + +~~~json +cd my-angular-kanban-app +~~~ + +의존성을 설치하고 개발 서버를 시작합니다. [**yarn**](https://yarnpkg.com/) 패키지 관리자를 사용하세요: + +~~~json +yarn +yarn start +~~~ + +앱은 로컬호스트(예: `http://localhost:3000`)에서 실행됩니다. + +## Kanban 생성 + +이제 DHTMLX Kanban 소스 코드를 받아야 합니다. 먼저 앱을 중지하고 Kanban 패키지를 설치하세요. + +### 1단계. 패키지 설치 + +[**평가판 Kanban 패키지**](/how_to_start/#npm-또는-yarn을-통한-kanban-설치)를 다운로드하고, README 파일에 안내된 단계를 따르세요. 평가판 Kanban은 30일간만 사용 가능합니다. + +### 2단계. 컴포넌트 생성 + +이제 Angular 컴포넌트를 생성하여 Kanban과 Toolbar를 애플리케이션에 추가해야 합니다. **src/app/** 디렉토리에 **kanban** 폴더를 만들고, 그 안에 **kanban.component.ts** 파일을 추가하세요. + +#### 소스 파일 임포트 + +**kanban.component.ts** 파일을 열고 Kanban 소스 파일을 임포트하세요. 참고: + +- PRO 버전을 사용하고 Kanban 패키지를 로컬 폴더에서 설치한 경우, 임포트 경로는 다음과 같습니다: + +~~~jsx +import { Kanban, Toolbar } from 'dhx-kanban-package'; +~~~ + +- 평가판 Kanban을 사용하는 경우, 아래 경로를 명시하세요: + +~~~jsx +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +~~~ + +이 튜토리얼에서는 **평가판** Kanban의 구성 방법을 안내합니다. + +#### 컨테이너 설정 및 Toolbar와 함께 Kanban 초기화 + +페이지에 Kanban과 Toolbar를 표시하려면, Kanban과 Toolbar의 컨테이너를 설정하고 해당 생성자를 사용하여 컴포넌트를 초기화해야 합니다: + +~~~jsx {1,8-11,15-18,24-31} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", // "app.component.ts" 파일에서 형태로 사용하는 템플릿 이름 + styleUrls: ["./kanban.component.css"], // css 파일 포함 + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + // Toolbar 컨테이너 초기화 + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + // Kanban 컨테이너 초기화 + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + // Kanban 컴포넌트 초기화 + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + // Toolbar 컴포넌트 초기화 + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // 기타 구성 속성 + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); // Kanban 파괴 + this._toolbar.destructor(); // Toolbar 파괴 + } +} +~~~ + +#### 스타일 추가 + +Kanban이 올바르게 표시되도록 관련 스타일을 지정해야 합니다. **src/app/kanban/** 디렉토리에 **kanban.component.css** 파일을 생성하고 Kanban 및 컨테이너에 필요한 스타일을 지정하세요: + +~~~css title="kanban.component.css" +/* Kanban 스타일 임포트 */ +@import "@dhx/trial-kanban/dist/kanban.css"; + +/* 초기 페이지 스타일 지정 */ +html, +body{ + height: 100%; + padding: 0; + margin: 0; +} + +/* Kanban 및 Toolbar 컨테이너 스타일 */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Kanban 컨테이너 스타일 */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### 데이터 로딩 + +Kanban에 데이터를 추가하려면 데이터 세트를 제공해야 합니다. **src/app/kanban/** 디렉토리에 **data.ts** 파일을 생성하고 데이터를 추가하세요: + +~~~jsx {2,14,37,48} title="data.ts" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +이제 ***kanban.component.ts*** 파일을 열고, 데이터를 임포트한 다음 Kanban의 설정 객체에 데이터 속성을 `ngOnInit()` 메서드 내에서 지정하세요: + +~~~jsx {2,23,25-27} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // 데이터 임포트 +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // 데이터 속성 초기화 + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns, // 컬럼 데이터 적용 + cards, // 카드 데이터 적용 + rows, // 행 데이터 적용 + rowKey: "type", + // 기타 구성 속성 + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // 기타 구성 속성 + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +또한 Angular의 `ngOnInit()` 메서드 내에서 [`parse()`](/api/methods/js_kanban_parse_method/) 메서드를 사용해 Kanban에 데이터를 로드할 수 있습니다. + +~~~jsx {2,23,37-42} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // 데이터 임포트 +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // 데이터 속성 초기화 + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // 기타 구성 속성 + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // 기타 구성 속성 + }); + + // parse() 메서드로 데이터 적용 + this._kanban.parse({ + columns, + cards, + rows + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +`parse(data)` 메서드는 변경 사항이 적용될 때마다 데이터 리로딩을 제공합니다. + +이제 Kanban 컴포넌트를 사용할 준비가 되었습니다. 요소가 페이지에 추가되면 데이터와 함께 Kanban이 초기화됩니다. 필요한 구성 설정도 제공할 수 있습니다. 사용 가능한 전체 속성 목록은 [Kanban API docs](/api/overview/properties_overview/)를 참고하세요. + +#### 이벤트 처리 + +사용자가 Kanban에서 어떤 동작을 하면 이벤트가 발생합니다. 이러한 이벤트를 활용하여 동작을 감지하고 원하는 코드를 실행할 수 있습니다. [이벤트 전체 목록](/api/overview/events_overview/)을 확인하세요. + +**kanban.component.ts** 파일을 열고 아래와 같이 `ngOnInit()` 메서드를 완성하세요: + +~~~jsx {5-7} title="kanban.component.ts" +// ... +ngOnInit() { + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + this._kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); +} + +ngOnDestroy(): void { + this._kanban.destructor(); +} +~~~ + +### 3단계. Kanban을 앱에 추가 + +***KanbanComponent***를 앱에 추가하려면, ***src/app/app.component.ts*** 파일을 열고 아래 코드로 교체하세요: + +~~~jsx {5} title="app.component.ts" +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + template: `` +}) +export class AppComponent { + name = ""; +} +~~~ + +그 다음, ***src/app/*** 디렉토리에 ***app.module.ts*** 파일을 만들고 *KanbanComponent*를 아래와 같이 지정하세요: + +~~~jsx {4-5,8} title="app.module.ts" +import { NgModule } from "@angular/core"; +import { BrowserModule } from "@angular/platform-browser"; + +import { AppComponent } from "./app.component"; +import { KanbanComponent } from "./kanban/kanban.component"; + +@NgModule({ + declarations: [AppComponent, KanbanComponent], + imports: [BrowserModule], + bootstrap: [AppComponent] +}) +export class AppModule {} +~~~ + +마지막으로, ***src/main.ts*** 파일을 열고 기존 코드를 아래와 같이 교체하세요: + +~~~jsx title="main.ts" +import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; +import { AppModule } from "./app/app.module"; +platformBrowserDynamic() + .bootstrapModule(AppModule) + .catch((err) => console.error(err)); +~~~ + +이제 앱을 시작하면 Kanban이 데이터와 함께 페이지에 표시됩니다. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Angular + +이제 DHTMLX Kanban을 Angular와 통합하는 방법을 알게 되었습니다. 필요에 따라 코드를 자유롭게 커스터마이즈할 수 있습니다. 최종 고급 예제는 [**GitHub**](https://github.com/DHTMLX/angular-kanban-demo)에서 확인할 수 있습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_react.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_react.md new file mode 100644 index 0000000..1a0bf9c --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_react.md @@ -0,0 +1,337 @@ +--- +sidebar_label: React와의 통합 +title: React와의 통합 +description: DHTMLX JavaScript Kanban 라이브러리의 문서에서 React와의 통합 방법을 확인할 수 있습니다. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제와 라이브 데모를 체험해보며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# React와의 통합 + +:::tip +이 문서를 읽기 전에 [**React**](https://react.dev)의 기본 개념과 패턴에 익숙해야 합니다. 지식이 필요하다면 [**React 문서**](https://react.dev/learn)를 참고하세요. +::: + +DHTMLX Kanban은 **React**와 호환됩니다. DHTMLX Kanban을 **React**에서 사용하는 방법에 대한 코드 예제를 준비해두었습니다. 더 자세한 내용은 [**GitHub의 예제**](https://github.com/DHTMLX/react-kanban-demo)를 참고하세요. + +## 프로젝트 생성 + +:::info +새 프로젝트를 만들기 전에 [**Vite**](https://vite.dev/) (선택 사항)와 [**Node.js**](https://nodejs.org/en/)를 설치하세요. +::: + +기본 **React** 프로젝트를 생성하거나 **Vite와 함께 React**를 사용할 수 있습니다. 프로젝트 이름은 **my-react-kanban-app**으로 지정하겠습니다: + +~~~json +npx create-react-app my-react-kanban-app +~~~ + +### 의존성 설치 + +새로 생성된 앱 디렉터리로 이동합니다: + +~~~json +cd my-react-kanban-app +~~~ + +의존성을 설치하고 개발 서버를 시작하세요. 패키지 매니저를 사용합니다: + +- [**yarn**](https://yarnpkg.com/)을 사용하는 경우, 다음 명령어를 실행하세요: + +~~~json +yarn +yarn start +~~~ + +- [**npm**](https://www.npmjs.com/)을 사용하는 경우, 다음 명령어를 실행하세요: + +~~~json +npm install +npm run dev +~~~ + +앱이 로컬호스트(예: `http://localhost:3000`)에서 실행되어야 합니다. + +## Kanban 생성 + +이제 DHTMLX Kanban 소스 코드를 받아야 합니다. 먼저 앱을 중지하고 Kanban 패키지를 설치합니다. + +### 1단계. 패키지 설치 + +[**평가판 Kanban 패키지**](/how_to_start/#npm-또는-yarn을-통한-kanban-설치)를 다운로드하고 README 파일의 지침을 따르세요. 평가판 Kanban은 30일 동안만 사용할 수 있습니다. + +### 2단계. 컴포넌트 생성 + +이제 React 컴포넌트를 만들어 애플리케이션에 Kanban을 추가해야 합니다. ***src/*** 디렉터리에 새 파일을 만들고 이름을 ***Kanban.jsx***로 지정하세요. + +#### 소스 파일 가져오기 + +***Kanban.jsx*** 파일을 열고 Kanban 소스 파일을 import 하세요. 다음 사항에 유의하세요: + +- PRO 버전을 사용하고 Kanban 패키지를 로컬 폴더에서 설치한 경우, import 경로는 다음과 같습니다: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from 'dhx-kanban-package'; +import 'dhx-kanban-package/dist/kanban.css'; +~~~ + +사용하는 패키지에 따라 소스 파일이 minify 되어 있을 수 있습니다. 이 경우 CSS 파일을 ***kanban.min.css***로 import하는지 확인하세요. + +- Kanban 평가판을 사용하는 경우, 다음 경로를 지정하세요: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import "@dhx/trial-kanban/dist/kanban.css"; +~~~ + +이 튜토리얼에서는 **평가판** Kanban을 구성하는 방법을 설명합니다. + +#### 컨테이너 설정 및 Kanban과 Toolbar 추가 + +페이지에 Kanban과 Toolbar를 표시하려면 Kanban과 Toolbar를 위한 컨테이너를 만들고, 해당 생성자를 사용하여 컴포넌트를 초기화해야 합니다: + +~~~jsx {2,6-7,10-11,13-17} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import '@dhx/trial-kanban/dist/kanban.css'; // Kanban 스타일 포함 + +export default function KanbanComponent(props) { + let toolbar_container = useRef(); // Toolbar용 컨테이너 초기화 + let kanban_container = useRef(); // Kanban용 컨테이너 초기화 + + useEffect(() => { + // Kanban 컴포넌트 초기화 + const kanban = new Kanban(kanban_container.current, {}); + + // Toolbar 컴포넌트 초기화 + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, // Kanban 내부 API 제공 + // 기타 설정 속성 + }); + + return () => { + kanban.destructor(); // Kanban 해제 + toolbar.destructor(); // Toolbar 해제 + }; + }, []); + + return
+
+
+
+} +~~~ + +#### 스타일 추가 + +Kanban이 올바르게 표시되도록, 프로젝트의 메인 css 파일에 Kanban 및 컨테이너에 대한 주요 스타일을 지정해야 합니다: + +~~~css title="index.css" +/* 초기 페이지 스타일 지정 */ +html, +body, +#root { + height: 100%; + padding: 0; + margin: 0; +} + +/* Kanban과 Toolbar 컨테이너 스타일 */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Kanban 컨테이너 스타일 */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### 데이터 로딩 + +Kanban에 데이터를 추가하려면 데이터 셋을 제공해야 합니다. ***src/*** 디렉터리에 ***data.js*** 파일을 만들고 데이터를 추가하세요: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +그런 다음 ***App.js*** 파일을 열고 데이터를 import 하세요. 이후 새로 생성한 `` 컴포넌트에 **props**로 데이터를 전달할 수 있습니다: + +~~~jsx {2,5-6} title="App.js" +import Kanban from "./Kanban"; +import { getData } from "./data"; + +function App() { + const { columns, cards, rows } = getData(); + return ; +} + +export default App; +~~~ + +***Kanban.jsx*** 파일로 이동하여 전달된 **props**를 Kanban 설정 객체에 적용하세요: + +~~~jsx {5,11-13} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: props.columns, // 컬럼 데이터 적용 + cards: props.cards, // 카드 데이터 적용 + rows: props.rows, // 행 데이터 적용 + rowKey: "type", + // 기타 설정 속성 + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // 기타 설정 속성 + }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +또한 React의 `useEffect()` 안에서 [`parse()`](/api/methods/js_kanban_parse_method/) 메서드를 사용하여 Kanban에 데이터를 로드할 수 있습니다: + +~~~jsx {9-11,27} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + let columns = props.columns; // 컬럼 데이터 + let cards = props.cards; // 카드 데이터 + let rows = props.rows; // 행 데이터 + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // 기타 설정 속성 + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // 기타 설정 속성 + }); + + kanban.parse({ columns, cards, rows }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +`parse(data)` 메서드는 변경 사항이 적용될 때마다 데이터를 다시 로드할 수 있도록 해줍니다. + +이제 Kanban 컴포넌트가 준비되었습니다. 요소가 페이지에 추가되면 데이터를 가진 Kanban이 초기화됩니다. 필요한 설정 옵션도 제공할 수 있습니다. 사용 가능한 전체 속성 목록은 [Kanban API 문서](/api/overview/properties_overview/)를 참고하세요. + +#### 이벤트 처리 + +사용자가 Kanban에서 어떤 동작을 하면 이벤트가 발생합니다. 이러한 이벤트를 활용하여 동작을 감지하고 원하는 코드를 실행할 수 있습니다. [이벤트 전체 목록](/api/overview/events_overview/)을 참고하세요. + +***Kanban.jsx*** 파일을 열고 `useEffect()` 메서드를 다음과 같이 완성하세요: + +~~~jsx {5-7} title="Kanban.jsx" +// ... +useEffect(() => { + const kanban = new Kanban(kanban_container.current, {}); + + kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); + + return () => { + kanban.destructor(); + }; +}, []); +// ... +~~~ + +이제 앱을 시작하면 Kanban이 데이터와 함께 페이지에 표시됩니다. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with React + +이제 DHTMLX Kanban을 React에 통합하는 방법을 알게 되었습니다. 필요에 따라 코드를 자유롭게 커스터마이즈할 수 있습니다. 최종 고급 예제는 [**GitHub**](https://github.com/DHTMLX/react-kanban-demo)에서 확인하실 수 있습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md new file mode 100644 index 0000000..d6356b4 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md @@ -0,0 +1,110 @@ +--- +sidebar_label: Salesforce와의 통합 +title: Salesforce와의 통합 +description: DHTMLX Kanban을 Salesforce에 통합하는 방법을 알아보세요. 이 가이드는 Salesforce Lightning 컴포넌트 내에서 원활하게 동작하기 위한 HTML 설정과 환경 구성을 설명합니다. +--- + +# Salesforce와의 통합 + +:::tip +이 문서를 읽기 전에 [**Salesforce**](https://www.salesforce.com/)의 기본 개념과 패턴에 익숙해야 합니다. 지식이 필요하다면 [**Salesforce 문서**](https://developer.salesforce.com/docs)를 참고하세요. +::: + +DHTMLX Kanban은 [Salesforce](https://www.salesforce.com/) 플랫폼과 호환됩니다. Salesforce 환경에 DHTMLX Kanban을 추가하는 방법에 대한 코드 예제를 준비했습니다. 자세한 내용은 관련 [GitHub 예제](https://github.com/DHTMLX/salesforce-lwc-demo)를 참고하세요. + +:::note +JavaScript Kanban 위젯은 [**Salesforce**](https://www.salesforce.com/) 환경에서 동작하고 있음을 자동으로 감지하여 내부적으로 통합 로직을 구성합니다. 대부분의 경우 [**Salesforce 전용 메서드**](#salesforce-전용-메서드)를 수동으로 호출할 필요가 없습니다. +::: + +## 환경 준비 + +Salesforce 프로젝트에 Kanban을 추가하려면, *루트* 컨테이너에 `data-wx-root="true"` HTML 속성을 지정해야 합니다. 이 속성은 라이브러리가 **Kanban** 및 **Toolbar** 위젯을 마운트할 주요 노드를 찾을 수 있도록 도와줍니다. + +```html title="kanban.html" + +``` + +`data-wx-portal-root="1"` 속성으로 표시된 하위 요소들은 DHTMLX 컴포넌트(**Toolbar** 및 **Kanban** 등)를 위한 컨테이너 역할을 합니다. + +## Salesforce 환경 API + +DHTMLX Kanban에는 Salesforce 환경을 수동으로 제어할 수 있는 메서드를 저장하는 `salesForceEnv` 헬퍼 클래스가 포함되어 있습니다. 아래와 같이 `salesForceEnv` 헬퍼 클래스를 가져올 수 있습니다: + +```jsx {4} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; +``` + +:::note +일반적으로 salesforce 전용 메서드는 필요하지 않지만, 자동 감지가 실패할 경우에만 예외적으로 사용할 수 있습니다. +::: + +### Salesforce 전용 메서드 + +`salesForceEnv` 헬퍼 클래스의 다음 메서드를 사용할 수 있습니다: + +| 메서드 | 설명 | +| :--------------------------------------------------------------- | :----------------------------------------------------------------------------- | +| `salesForceEnv.detect()` | Kanban이 Salesforce 내부에서 실행 중인지 감지합니다. | +| `salesForceEnv.addGlobalEvent(eventName, handler, htmlElement)` | 첫 번째 사용 가능한 HTML 요소에 전역 이벤트를 연결합니다. | +| `salesForceEnv.getTopNode()` | Salesforce DOM 계층 내에서 첫 번째 사용 가능한 HTML 요소를 반환합니다. | + +```jsx {4,7} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; + +salesForceEnv.detect(); +``` + +### 추가로 내보내는 함수 + +| 함수 | 설명 | +| :--------------------- | :-------------------------------------------------------------------------------- | +| `enableSalesForce()` | 자동 감지가 불가능할 때 Salesforce 환경을 수동으로 설정합니다. | + +```jsx {5,8} +import { + Kanban, + Toolbar, + salesForceEnv, + enableSalesForce +} from "@dhx/trial-kanban"; + +enableSalesForce(); +``` + +## 작업 흐름 단계 + +1. LWC 컨테이너에 `data-wx-root="true"` 속성을 추가합니다. +2. DHTMLX Kanban 및 Toolbar를 가져오고(선택적으로) 초기화합니다. +3. JavaScript Kanban 위젯이 Salesforce 컨텍스트를 자동으로 감지하고 내부 구성을 적용합니다. +4. 비표준 임베딩 시나리오가 아니라면 `enableSalesForce()` 함수나 `salesForceEnv` 메서드를 호출할 필요가 없습니다. + +### 예제 + +```jsx title="kanban.js" +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default class KanbanLWC { + connectedCallback() { + const kanban_container = this.template.querySelector(".sf_kanban"); + const toolbar_container = this.template.querySelector(".sf_toolbar"); + const kanban = new Kanban(kanban_container, { /* configuration properties */ }); + const toolbar = new Toolbar(toolbar_container, { api: kanban.api }); + } +} +``` + +이제 DHTMLX Kanban 컴포넌트가 **Salesforce Lightning** 환경에 완전히 통합되었습니다. 위젯은 LWC 내부에서 DOM 계층 구조와 이벤트 바인딩을 자동으로 처리합니다. 표준 API를 통해 Kanban을 계속 구성할 수 있으며, 프로젝트 요구 사항에 따라 Kanban의 외관과 로직을 사용자 정의할 수 있습니다. 최종 예제는 [**GitHub**](https://github.com/DHTMLX/salesforce-lwc-demo)에서 확인할 수 있습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md new file mode 100644 index 0000000..6e16559 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md @@ -0,0 +1,346 @@ +--- +sidebar_label: Svelte와의 통합 +title: Svelte와의 통합 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 Svelte와의 통합에 대해 알아보세요. 개발자 가이드와 API 레퍼런스를 둘러보고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# Svelte와의 통합 + +:::tip +이 문서를 읽기 전에 **Svelte**의 기본 개념과 패턴에 익숙해야 합니다. 지식을 다시 확인하려면 [**Svelte documentation**](https://svelte.dev/docs/svelte/overview)을 참고하세요. +::: + +DHTMLX Kanban은 **Svelte**와 호환됩니다. DHTMLX Kanban을 **Svelte**와 함께 사용하는 방법에 대한 코드 예제를 준비했습니다. 자세한 내용은 [**Example on GitHub**](https://github.com/DHTMLX/svelte-kanban-demo)를 참고하세요. + +## 프로젝트 생성 + +:::info +새 프로젝트를 만들기 전에 [**Vite**](https://vite.dev/) (선택 사항)와 [**Node.js**](https://nodejs.org/en/)를 설치해야 합니다. +::: + +**Svelte** 프로젝트를 만드는 방법은 여러 가지가 있습니다: + +- [**SvelteKit**](https://kit.svelte.dev/)을 사용할 수 있습니다. + +또는 + +- **Svelte와 Vite**를 사용할 수도 있습니다(SvelteKit 없이): + +~~~json +npm create vite@latest +~~~ + +자세한 내용은 [관련 문서](https://svelte.dev/docs/svelte/overview)를 참고하세요. + +### 의존성 설치 + +프로젝트 이름을 **my-svelte-kanban-app**으로 지정하고 앱 디렉터리로 이동합니다: + +~~~json +cd my-svelte-kanban-app +~~~ + +의존성을 설치하고 개발 서버를 실행합니다. 패키지 매니저를 사용하세요: + +- [**yarn**](https://yarnpkg.com/)을 사용하는 경우, 다음 명령어를 실행하세요: + +~~~json +yarn +yarn start +~~~ + +- [**npm**](https://www.npmjs.com/)을 사용하는 경우, 다음 명령어를 실행하세요: + +~~~json +npm install +npm run dev +~~~ + +앱은 localhost에서 실행됩니다(예: `http://localhost:3000`). + +## Kanban 생성 + +이제 DHTMLX Kanban 소스 코드를 받아야 합니다. 먼저 앱을 중지하고 Kanban 패키지 설치를 진행하세요. + +### 1단계. 패키지 설치 + +[**trial Kanban package**](/how_to_start/#npm-또는-yarn을-통한-kanban-설치)를 다운로드하고, README 파일에 안내된 단계를 따르세요. trial Kanban은 30일 동안만 사용할 수 있습니다. + +### 2단계. 컴포넌트 생성 + +이제 Svelte 컴포넌트를 만들어 애플리케이션에 Toolbar가 포함된 Kanban을 추가해야 합니다. ***src/*** 디렉터리에 새 파일을 만들고 이름을 ***Kanban.svelte***로 지정합니다. + +#### 소스 파일 가져오기 + +***Kanban.svelte*** 파일을 열고 Kanban 소스 파일을 import 합니다. 참고: + +- PRO 버전을 사용하고 Kanban 패키지를 로컬 폴더에서 설치한 경우, import 경로는 다음과 같습니다: + +~~~html title="Kanban.svelte" + +~~~ + +사용하는 패키지에 따라 소스 파일이 minified 되어 있을 수 있습니다. 이 경우 **kanban.min.css** 파일을 import하는지 확인하세요. + +- trial 버전을 사용하는 경우, 다음 경로를 지정하세요: + +~~~html title="Kanban.svelte" + + +
+
+
+
+~~~ + +#### 데이터 로딩 + +Kanban에 데이터를 추가하려면 데이터 세트를 제공해야 합니다. ***src/*** 디렉터리에 ***data.js*** 파일을 만들고 데이터를 추가하세요: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +그런 다음 ***App.svelte*** 파일을 열고, 데이터를 import하여 새로 만든 `` 컴포넌트에 **props**로 전달하세요: + +~~~html {3,5,8} title="App.svelte" + + + +~~~ + +***Kanban.svelte*** 파일로 이동하여 전달된 **props**를 Kanban 설정 객체에 적용하세요: + +~~~html {6-8,15-17} title="Kanban.svelte" + + +
+
+
+
+~~~ + +또한 Svelte의 `onMount()` 메서드 내에서 [`parse()`](/api/methods/js_kanban_parse_method/) 메서드를 사용해 Kanban에 데이터를 로드할 수 있습니다: + +~~~html {6-8,27} title="Kanban.svelte" + + +
+
+
+
+~~~ + +`parse(data)` 메서드는 변경 사항이 적용될 때마다 데이터 리로딩을 제공합니다. + +이제 Kanban 컴포넌트를 사용할 준비가 되었습니다. 요소가 페이지에 추가되면 Kanban이 데이터와 함께 초기화됩니다. 필요에 따라 설정을 추가할 수 있습니다. 사용 가능한 전체 속성 목록은 [Kanban API docs](/api/overview/properties_overview/)를 참고하세요. + +#### 이벤트 처리 + +사용자가 Kanban에서 작업을 수행하면 이벤트가 발생합니다. 이러한 이벤트를 사용하여 작업을 감지하고 원하는 코드를 실행할 수 있습니다. [이벤트 전체 목록](/api/overview/events_overview/)을 참고하세요. + +***Kanban.svelte***를 열고 `onMount()` 메서드를 다음과 같이 완성하세요: + +~~~html {8-10} title="Kanban.svelte" + + +// ... +~~~ + +### 3단계. Kanban을 앱에 추가 + +컴포넌트를 앱에 추가하려면 **App.svelte** 파일을 열고 기본 코드를 다음과 같이 교체하세요: + +~~~html title="App.svelte" + + + +~~~ + +이제 앱을 실행하면 Kanban이 데이터와 함께 페이지에 로드됩니다. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Svelte + +이제 DHTMLX Kanban을 Svelte와 통합하는 방법을 알게 되었습니다. 필요에 맞게 코드를 커스터마이즈할 수 있습니다. 최종 고급 예제는 [**GitHub**](https://github.com/DHTMLX/svelte-kanban-demo)에서 확인할 수 있습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md new file mode 100644 index 0000000..f31ff1c --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md @@ -0,0 +1,366 @@ +--- +sidebar_label: Vue와의 통합 +title: Vue와의 통합 +description: DHTMLX JavaScript Kanban 라이브러리의 문서에서 Vue와의 통합 방법을 확인할 수 있습니다. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제 및 라이브 데모를 시도해보며, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# Vue와의 통합 + +:::tip +이 문서를 읽기 전에 [**Vue**](https://vuejs.org/)의 기본 개념과 패턴에 익숙해야 합니다. 지식을 다시 확인하려면 [**Vue 3 문서**](https://vuejs.org/guide/introduction.html#getting-started)를 참고하세요. +::: + +DHTMLX Kanban은 **Vue**와 호환됩니다. **Vue 3**에서 DHTMLX Kanban을 사용하는 방법에 대한 코드 예제가 준비되어 있습니다. 자세한 내용은 [**GitHub의 예제**](https://github.com/DHTMLX/vue-kanban-demo)를 참고하세요. + +## 프로젝트 생성 + +:::info +새 프로젝트를 생성하기 전에 [**Node.js**](https://nodejs.org/en/)를 설치하세요. +::: + +**Vue** 프로젝트를 생성하려면 다음 명령어를 실행하세요: + +~~~json +npm create vue@latest +~~~ + +이 명령어는 공식 **Vue** 프로젝트 스캐폴딩 툴인 `create-vue`를 설치하고 실행합니다. 자세한 내용은 [Vue.js 빠른 시작](https://vuejs.org/guide/quick-start.html#creating-a-vue-application)을 참고하세요. + +프로젝트 이름은 **my-vue-kanban-app**으로 지정하겠습니다. + +### 의존성 설치 + +앱 디렉토리로 이동하세요: + +~~~json +cd my-vue-kanban-app +~~~ + +의존성을 설치하고 개발 서버를 시작하세요. 패키지 매니저에 따라 아래 명령어를 사용합니다: + +- [**yarn**](https://yarnpkg.com/)을 사용하는 경우: + +~~~jsx +yarn +yarn start // 또는 yarn dev +~~~ + +- [**npm**](https://www.npmjs.com/)을 사용하는 경우: + +~~~json +npm install +npm run dev +~~~ + +앱은 로컬호스트(예: `http://localhost:3000`)에서 실행됩니다. + +## Kanban 생성 + +이제 DHTMLX Kanban 소스 코드를 준비해야 합니다. 먼저 앱을 중지한 후 Kanban 패키지를 설치하세요. + +### 1단계. 패키지 설치 + +[**평가판 Kanban 패키지**](/how_to_start/#npm-또는-yarn을-통한-kanban-설치)를 다운로드하고, README 파일에 안내된 단계를 따르세요. 평가판 Kanban은 30일간만 사용 가능합니다. + +### 2단계. 컴포넌트 생성 + +이제 Kanban과 Toolbar를 앱에 추가할 Vue 컴포넌트를 생성해야 합니다. ***src/components/*** 디렉토리에 ***Kanban.vue*** 파일을 새로 만드세요. + +#### 소스 파일 가져오기 + +***Kanban.vue*** 파일을 열고 Kanban 소스 파일을 import 하세요. 참고: + +- PRO 버전을 사용하고 Kanban 패키지를 로컬 폴더에서 설치한 경우, import 경로는 다음과 같습니다: + +~~~html title="Kanban.vue" + +~~~ + +패키지에 따라 소스 파일이 minified 되어 있을 수 있습니다. 이 경우 CSS 파일을 **kanban.min.css**로 import 해야 합니다. + +- Kanban 평가판을 사용하는 경우, 아래와 같이 경로를 지정하세요: + +~~~html title="Kanban.vue" + +~~~ + +이 튜토리얼에서는 **평가판** Kanban의 설정 방법을 보여줍니다. + +#### 컨테이너 설정 및 Kanban + Toolbar 추가 + +Kanban과 Toolbar를 페이지에 표시하려면 각 컨테이너를 생성하고, 해당 생성자를 사용해 컴포넌트를 초기화해야 합니다: + +~~~html {2,7-8,10-14} title="Kanban.vue" + + + +~~~ + +#### 스타일 추가 + +Kanban이 올바르게 표시되도록, 프로젝트의 메인 css 파일에 Kanban 및 컨테이너에 대한 중요한 스타일을 지정해야 합니다: + +~~~css title="main.css" +/* 초기 페이지 스타일 지정 */ +html, +body, +#app { /* #app 루트 컨테이너 사용 확인 */ + height: 100%; + padding: 0; + margin: 0; +} + +/* Kanban 및 Toolbar 컨테이너 스타일 */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Kanban 컨테이너 스타일 */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### 데이터 로딩 + +Kanban에 데이터를 추가하려면 데이터셋을 제공해야 합니다. ***src/*** 디렉토리에 ***data.js*** 파일을 만들고 데이터를 추가하세요: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +그 다음 ***App.vue*** 파일을 열고, 데이터를 import 한 뒤 내부 `data()` 메서드로 초기화하세요. 이후 새로 만든 `` 컴포넌트에 **props**로 데이터를 전달할 수 있습니다: + +~~~html {3,8,10-12,19} title="App.vue" + + + +~~~ + +***Kanban.vue*** 파일을 열고 전달받은 **props**를 Kanban 설정 객체에 적용하세요: + +~~~html {6,10-12} title="Kanban.vue" + + + +~~~ + +Vue의 `mounted()` 메서드 내에서 [`parse()`](/api/methods/js_kanban_parse_method/) 메서드를 사용해 Kanban에 데이터를 로드할 수도 있습니다: + +~~~html {6,22-26} title="Kanban.vue" + + + +~~~ + +`parse(data)` 메서드는 변경 사항이 적용될 때마다 데이터 리로딩을 제공합니다. + +이제 Kanban 컴포넌트 사용 준비가 완료되었습니다. 요소가 페이지에 추가되면, 데이터와 함께 Kanban이 초기화됩니다. 필요한 설정을 추가로 지정할 수 있습니다. 사용 가능한 속성의 전체 목록은 [Kanban API 문서](/api/overview/properties_overview/)를 참고하세요. + +#### 이벤트 처리 + +사용자가 Kanban에서 어떤 동작을 하면 이벤트가 발생합니다. 이 이벤트를 활용해 동작을 감지하고 원하는 코드를 실행할 수 있습니다. [이벤트 전체 목록](/api/overview/events_overview/)을 확인하세요. + +***Kanban.vue*** 파일을 열고 `mounted()` 메서드를 다음과 같이 완성하세요: + +~~~html {8-10} title="Kanban.vue" + + +// ... +~~~ + +이제 앱을 실행하면 Kanban이 데이터와 함께 페이지에 로드되는 것을 확인할 수 있습니다. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Vue + +이제 DHTMLX Kanban을 Vue와 통합하는 방법을 알게 되었습니다. 필요에 따라 코드를 커스터마이즈할 수 있습니다. 최종 고급 예제는 [**GitHub**](https://github.com/DHTMLX/vue-kanban-demo)에서 확인할 수 있습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/localization.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/localization.md new file mode 100644 index 0000000..c4f4998 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/localization.md @@ -0,0 +1,173 @@ +--- +sidebar_label: 로컬라이제이션 +title: 로컬라이제이션 +description: DHTMLX JavaScript Kanban 라이브러리의 문서에서 로컬라이제이션에 대해 알아보세요. 개발자 가이드와 API 레퍼런스를 둘러보고, 코드 예제와 라이브 데모를 시도해보고, DHTMLX Kanban의 30일 무료 평가판을 다운로드할 수 있습니다. +--- + +# 로컬라이제이션 + +JavaScript Kanban 인터페이스의 모든 라벨을 현지화할 수 있습니다. 이를 위해 새로운 로케일을 생성하거나 내장된 로케일을 수정한 뒤 Kanban과 Toolbar에 *별도로* 적용해야 합니다. + +## 기본 로케일 + +**영어** 로케일이 기본적으로 사용됩니다: + +~~~jsx +const en = { + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Files: "Files", + B: "B", + KB: "KB", + MB: "MB", + GB: "GB", + TB: "TB", + PB: "PB", + EB: "EB", + "Make cover": "Make cover", + "Remove cover": "Remove cover", + Comments: "Comments", + Links: "Links", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card...": "Add new card...", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Priority: "Priority", + Progress: "Progress", + Users: "Users", + + Untitled: "Untitled", + Rename: "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + Sort: "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)", + + "Add link": "Add link", + Duplicate: "Duplicate", + "Duplicate of": "Duplicate of", + "Relates to": "Relates to", + "Depends on": "Depends on", + "Is required for": "Is required for", + Duplicates: "Duplicates", + "Is duplicated by": "Is duplicated by", + "Is parent for": "Is parent for", + "Is subtask of": "Is subtask of", + + Cancel: "Cancel", + "Link task": "Link task", + "Select a relation": "Select a relation", + "Select a task": "Select a task", + + Send: "Send", + "Would you like to delete this comment?": + "Would you like to delete this comment?", + "No comments yet": "No comments yet", + "Would you like to delete this card?": + "Would you like to delete this card?", + }, + calendar: { // 달력의 번역 및 설정 + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // 코어 요소의 번역 + ok: "OK", + cancel: "Cancel" + } +}; +~~~ + +## 내장 로케일 + +Kanban은 다음과 같은 로케일을 내보냅니다: + +**"en"** - 영어 +**"de"** - 독일어 +**"cn"** - 중국어 +**"es"** - 스페인어 +**"fr"** - 프랑스어 +**"it"** - 이탈리아어 +**"jp"** - 일본어 +**"pt"** - 포르투갈어 +**"ru"** - 러시아어 + +내장 로케일을 내보내고 적용하는 방법은 다음과 같습니다: + +```jsx {5} +// Kanban 생성 +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // 내장 "cn" 로케일이 초기 설정됨 + // 기타 파라미터 +}); + +// Kanban에 내장 "de" 로케일 적용 +board.setLocale(kanban.locales["de"]); +``` + +## 커스텀 로케일 + +커스텀 로케일을 적용하려면 다음을 수행해야 합니다: + +- 커스텀 로케일을 생성(또는 기본 로케일 수정)하고 모든 텍스트 라벨에 대한 번역을 제공합니다(필요한 언어로 설정 가능) + +- 새 로케일을 **Kanban**의 [`locale`](api/config/js_kanban_locale_config.md) 속성에 지정하거나 [`setLocale()`](api/methods/js_kanban_setlocale_method.md) 메서드를 사용해 적용합니다. +- 새 로케일을 **Toolbar**의 [`locale`](api/config/toolbar_locale_config.md) 속성에 지정하거나 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 메서드를 사용해 적용합니다. + +## 예제 + +아래 스니펫에서는 여러 로케일을 전환하는 방법을 볼 수 있습니다: + + \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/stylization.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/stylization.md new file mode 100644 index 0000000..9f1c7fe --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/stylization.md @@ -0,0 +1,119 @@ +--- +sidebar_label: 스타일링 +title: 스타일링 +description: DHTMLX JavaScript Kanban 라이브러리의 문서에서 스타일링에 대해 알아보세요. 개발자 가이드와 API 레퍼런스를 둘러보고, 코드 예제와 라이브 데모를 직접 시도해보며, DHTMLX Kanban의 30일 무료 평가판도 다운로드할 수 있습니다. +--- + +# 스타일링 + +Kanban을 사용하면 [`columnShape.css`](api/config/js_kanban_columnshape_config.md), [`rowShape.css`](api/config/js_kanban_rowshape_config.md), [`cardShape.css`](api/config/js_kanban_cardshape_config.md) 속성을 통해 **컬럼**, **행**, **카드**의 외관을 스타일링할 수 있습니다. 이 속성들은 컬럼, 행, 카드에 조건부로 스타일을 적용할 수 있게 해줍니다. + +또한, [`columns.css`](api/config/js_kanban_columns_config.md), [`rows.css`](api/config/js_kanban_rows_config.md), [`cards.css`](api/config/js_kanban_cards_config.md) 속성을 통해 개별 **컬럼**, **행**, **카드**에 커스텀 css 클래스를 적용할 수도 있습니다. + +이 외에도 프로젝트 요구사항에 맞게 Kanban 인터페이스의 어느 부분이든 커스텀 스타일을 적용할 수 있습니다. 이를 위해 라이브러리에서는 다양한 CSS 변수를 제공합니다. Kanban에는 다음 두 가지 유형의 변수가 포함되어 있습니다: +- **Kanban** 스타일과 관련된 CSS 변수 +- **WX** 라이브러리 스타일과 관련된 CSS 변수 (*컨트롤, 캘린더 등*) + +:::info +참고로, **WX** 라이브러리는 내부 프로세스에서만 사용됩니다. Kanban에서 사용되는 일부 작은 요소들(*컨트롤, 캘린더 등*)을 제공합니다. +::: + +## 기본 스타일 + +~~~css +.wx-material-theme { + /* WX 라이브러리 css 변수 */ + --wx-field-width: 100%; + --wx-theme-name: material; + /* WX 라이브러리 css 변수 끝 */ + + /* Kanban css 변수 */ + --wx-kanban-background: #f1f1f1; + + /* 컬럼 스타일 */ + --wx-kanban-column-width: 300px; + --wx-kanban-column-height: 300px; + + /* 툴바 스타일 */ + --wx-kanban-toolbar-height: 56px; + --wx-kanban-toolbar-align: center; + --wx-kanban-toolbar-justify: flex-start; + --wx-kanban-toolbar-control-hover: rgba(0, 0, 0, 0.07); + --wx-kanban-toolbar-control-active: rgba(0, 0, 0, 0.15); + --wx-kanban-toolbar-border: var(--wx-border); + + /* 카드 스타일 */ + --wx-kanban-card-field-padding: 12px; + --wx-kanban-content-background: var(--wx-background); + --wx-kanban-card-border: var(--wx-border); + --wx-kanban-card-border-radius: 6px; + --wx-kanban-header-border-radius: var(--wx-kanban-card-border-radius); + + /* 행 스타일 */ + --wx-kanban-row-line: var(--wx-border); + + /* 사용자 아이콘 스타일 */ + --wx-kanban-user-icon-size: 36px; + + /* 에디터 스타일 */ + --wx-kanban-header-height: 64px; + --wx-kanban-editor-width: 569px; + --wx-kanban-editor-height: auto; + --wx-kanban-editor-x-padding: 20px; + --wx-kanban-editor-background: var(--wx-kanban-content-background); + --wx-kanban-editor-top-border: none; + + /* 컬럼 스타일 */ + --wx-kanban-over-limit-color: var(--wx-color-danger); + --wx-kanban-collapsed-column-width: 44px; + --wx-kanban-z-index: 1; + + /* 프로그레스 컨트롤 스타일 */ + --wx-progress-height: 4px; + --wx-kanban-progress-inactive-color: #dbdbdb; + + /* 메뉴 스타일 */ + --wx-kanban-menu-min-width: 100px; + + /* 박스 및 그림자 스타일 */ + --wx-kanban-shadow: none; + --wx-kanban-box-border: var(--wx-border); + + /* 접힌 컬럼 스타일 */ + --wx-kanban-collapsed-padding: var(--wx-padding); + --wx-kanban-collapsed-margin: 0px; + --wx-kanban-collapsed-background: transparent; + --wx-kanban-collapsed-background-hover: #dfdfdf; + +/* Kanban CSS 변수 끝 */ +} +~~~ + +:::tip 참고 +향후 Kanban의 버전에서는 변수 및 변수명이 변경될 수 있습니다. 새 버전으로 업데이트 한 후에는 변수명을 반드시 확인하고, 컴포넌트의 표시 문제를 방지하기 위해 코드에서 수정해주시기 바랍니다. +::: + +## 스크롤 스타일 + +Kanban의 스크롤 바에도 커스텀 스타일을 적용할 수 있습니다. 이를 위해 `.wx-styled-scroll` CSS 클래스를 사용할 수 있습니다. 사용하기 전에 [여기](https://caniuse.com/css-scrollbar)에서 최신 브라우저와의 호환성을 확인하세요. + +~~~html {4} title="index.html" + +
// + +
+~~~ + +## 커스텀 스타일 + +이 스니펫에서는 Kanban에 커스텀 스타일을 적용하는 방법을 볼 수 있습니다. + + + +## 반응형 스타일 + +이 스니펫에서는 커스텀 CSS 스타일을 사용하여 Kanban의 반응형 버전을 만드는 방법을 볼 수 있습니다. + + + +**관련 문서:** [커스터마이징](guides/customization.md) \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/typescript_support.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/typescript_support.md new file mode 100644 index 0000000..efdd7e9 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/typescript_support.md @@ -0,0 +1,21 @@ +--- +sidebar_label: TypeScript 지원 +title: TypeScript 지원 +description: DHTMLX JavaScript Kanban 라이브러리에서 TypeScript를 사용하는 방법에 대해 문서에서 확인할 수 있습니다. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제와 라이브 데모를 직접 시도해 보며, DHTMLX Kanban의 30일 무료 평가판도 다운로드할 수 있습니다. +--- + +# TypeScript 지원 + +v1.1부터 DHTMLX Kanban 라이브러리는 TypeScript 정의를 사용할 수 있는 기능을 제공합니다. 내장된 TypeScript 지원은 별도의 설정 없이 바로 사용할 수 있습니다. + +:::note +기능은 Snippet Tool에서 바로 체험해 볼 수 있습니다. +::: + +## TypeScript 사용의 장점 + +왜 DHTMLX Kanban을 TypeScript와 함께 사용해야 할까요? + +TypeScript의 주요 장점은 개발 과정의 효율성을 크게 높일 수 있다는 점입니다. + +타입 확인과 자동 완성 기능을 통해 애플리케이션을 더 견고하게 개발할 수 있으며, 잠재적인 실수를 방지할 수 있습니다. 또한, TypeScript는 DHTMLX Kanban 라이브러리의 API를 사용할 때 어떤 데이터 타입을 사용해야 하는지에 대한 정보를 제공합니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/working_with_data.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/working_with_data.md new file mode 100644 index 0000000..c1b51dd --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/working_with_data.md @@ -0,0 +1,201 @@ +--- +sidebar_label: 데이터 작업하기 +title: 데이터 작업하기 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 데이터 작업 방법을 확인할 수 있습니다. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제와 라이브 데모를 직접 사용해보세요. DHTMLX Kanban의 30일 무료 평가판도 다운로드할 수 있습니다. +--- + +# 데이터 작업하기 + +## 초기 데이터 로딩 + +Kanban을 초기화할 때, [**columns**](api/config/js_kanban_columns_config.md), [**cards**](api/config/js_kanban_cards_config.md), [**rows**](api/config/js_kanban_rows_config.md), [**links**](api/config/js_kanban_links_config.md)에 대한 초기 데이터를 제공할 수 있습니다. + +~~~jsx {1,17,81,94,106-109} +const columns = [ // 컬럼 데이터 + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + { + label: "Testing", + id: "testing" + }, + {...} +]; + +const cards = [ // 카드 데이터 + { + id: 1, + label: "Integration with React", + priority: 1, + color: "#65D3B3", + description: "Some description...", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + progress: 25, + users: [1,2,3,4], + sprint: "1.0", + column: "backlog", + type: "feature", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + }, + { + id: 2, + label: "Archive the cards/boards ", + priority: 2, + color: "#FFC975", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + sprint: "1.0", + column: "backlog", + type: "feature" + }, + { + label: "Searching and filtering", + priority: 1, + color: "#65D3B3", + + start_date: new Date("01/05/2021"), + + sprint: "1.2", + column: "backlog", + type: "task" + }, + { + label: "Set the tasks priorities", + priority: 2, + color: "#58C3FE", + + sprint: "1.2", + column: "inprogress", + type: "feature" + }, + {...} +]; + +const rows = [ // 행 데이터 + { + label: "Feature", + id: "feature" + }, + { + label: "Task", + id: "task", + collapsed: true + }, + {...} +]; + +const links = [ + { + id: "link_1", + source: 1, + target: 2, + relation: "relatesTo", + }, + {...} +]; + +// 컬럼, 카드, 행의 초기 데이터로 Kanban 초기화 +new kanban.Kanban("#root", { + columns, + cards, + rows, + links +}); +~~~ + +## 로컬 소스에서 데이터 로딩 + +***columns***, ***rows***, ***cards***, ***links***에 대한 데이터를 로컬 소스에서 불러오려면 [`parse()`](api/methods/js_kanban_parse_method.md) 메서드를 사용할 수 있습니다. 이 메서드는 필요한 데이터가 담긴 객체를 파라미터로 받습니다. + +~~~js {4} +const board = new kanban.Kanban("#root", {}); + +// Kanban에 데이터 로딩 +board.parse({ columns, cards, rows }); +~~~ + +## Kanban 데이터를 Gantt 및 Scheduler와 동기화 + +아래 스니펫에서는 Kanban 데이터를 [**Gantt**](https://dhtmlx.com/docs/products/dhtmlxGantt/) 및 [**Scheduler**](https://dhtmlx.com/docs/products/dhtmlxScheduler/)와 같은 다른 DHTMLX 위젯과 동기화하는 방법을 볼 수 있습니다: + + + +## Kanban 데이터 가져오기 + +Kanban 데이터를 가져오려면 다음 메서드를 사용할 수 있습니다: + +- [`getAreaCards()`](api/methods/js_kanban_getareacards_method.md) - 지정한 컬럼(및 행)의 모든 카드 데이터 객체 배열을 반환합니다 +- [`getCard()`](api/methods/js_kanban_getcard_method.md) - 지정한 ID로 카드 데이터 객체를 반환합니다 +- [`serialize()`](api/methods/js_kanban_serialize_method.md) - Kanban 데이터를 JSON으로 직렬화합니다 + +## Kanban 상태 가져오기 + +Kanban 상태를 가져오려면 다음 메서드를 사용할 수 있습니다: + +- [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) - *StateStore*의 반응형 속성이 담긴 객체를 반환합니다 +- [`api.getState()`](api/internal/js_kanban_getstate_method.md) - *StateStore*의 현재 속성이 담긴 객체를 반환합니다 +- [`api.getStores()`](api/internal/js_kanban_getstores_method.md) - *StateStore*와 *DataStore* 객체를 반환합니다 + +## Kanban 데이터 내보내기 + +Kanban 데이터를 내보내려면 다음 메서드를 사용할 수 있습니다: + +- [`export.json()`](api/internal/js_kanban_json_method.md) - Kanban의 데이터를 JSON 파일로 내보냅니다 + +## 새 항목 추가 + +새로운 *cards*, *columns*, *rows*를 추가하려면 다음 메서드를 사용할 수 있습니다: + +- [`addCard()`](api/methods/js_kanban_addcard_method.md) - Kanban에 새 카드를 추가합니다 +- [`addColumn()`](api/methods/js_kanban_addcolumn_method.md) - Kanban에 새 컬럼을 추가합니다 +- [`addRow()`](api/methods/js_kanban_addrow_method.md) - Kanban에 새 행을 추가합니다 + +## 항목 업데이트 + +*cards*, *columns*, *rows*를 업데이트하려면 다음 메서드를 사용할 수 있습니다: + +- [`updateCard()`](api/methods/js_kanban_updatecard_method.md) - 지정한 ID로 카드 데이터를 업데이트합니다 +- [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) - 지정한 ID로 컬럼 데이터를 업데이트합니다 +- [`updateRow()`](api/methods/js_kanban_updaterow_method.md) - 지정한 ID로 행 데이터를 업데이트합니다 + +## 항목 삭제 + +*cards*, *columns*, *rows*를 삭제하려면 다음 메서드를 사용할 수 있습니다: + +- [`deleteCard()`](api/methods/js_kanban_deletecard_method.md) - 지정한 ID로 Kanban에서 카드를 삭제합니다 +- [`deleteColumn()`](api/methods/js_kanban_deletecolumn_method.md) - 지정한 ID로 Kanban에서 컬럼을 삭제합니다 +- [`deleteRow()`](api/methods/js_kanban_deleterow_method.md) - 지정한 ID로 Kanban에서 행을 삭제합니다 + +## 항목 이동 + +*cards*, *columns*, *rows*를 이동하려면 다음 메서드를 사용할 수 있습니다: + +- [`moveCard()`](api/methods/js_kanban_movecard_method.md) - 카드를 원하는 컬럼과 행으로 이동합니다 +- [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md) - 컬럼을 원하는 위치로 이동합니다 +- [`moveRow()`](api/methods/js_kanban_moverow_method.md) - 행을 원하는 위치로 이동합니다 + +## 예제 + +아래 스니펫에서 Kanban API를 사용하여 데이터 작업을 수행하는 방법을 확인할 수 있습니다: + + \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/guides/working_with_server.md b/i18n/ko/docusaurus-plugin-content-docs/current/guides/working_with_server.md new file mode 100644 index 0000000..b24112a --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/guides/working_with_server.md @@ -0,0 +1,368 @@ +--- +sidebar_label: 서버와 함께 작업하기 +title: 서버와 함께 작업하기 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 서버와 함께 작업하는 방법을 알아보세요. 개발자 가이드와 API 레퍼런스를 확인하고, 코드 예제와 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판도 다운로드할 수 있습니다. +--- + +# 서버와 함께 작업하기 + +JavaScript Kanban은 클라이언트와 서버 데이터 모두와 함께 작업할 수 있습니다. 이 위젯은 백엔드에 대한 특별한 요구 사항이 없으며, REST API(RESTful API)를 지원하는 모든 백엔드 플랫폼과 손쉽게 연동할 수 있습니다. + +:::info +기본적으로, 위젯에는 내장된 **Go** 및 **Node** 백엔드가 함께 제공됩니다. 하지만, 직접 만든 서버 스크립트도 사용할 수 있습니다. +::: + +## RestDataProvider + +JavaScript Kanban에는 백엔드와의 통신을 위한 REST API를 완벽하게 지원하는 **RestDataProvider** 서비스가 있습니다. 이를 통해 서버와 상호작용하며 다음과 같은 데이터 작업을 수행할 수 있습니다: + +- ***"add-card"*** +- ***"add-column"*** +- ***"add-comment"*** +- ***"add-row"*** +- ***"add-link"*** +- ***"delete-card"*** +- ***"delete-column"*** +- ***"delete-comment"*** +- ***"delete-row"*** +- ***"delete-link"*** +- ***"move-card"*** +- ***"move-column"*** +- ***"move-row"*** +- ***"update-card"*** +- ***"update-column"*** +- ***"update-comment"*** +- ***"update-row"*** + +## REST 메서드 + +**RestDataProvider** 서비스에는 동적 데이터 로딩을 위한 특별한 REST 메서드가 포함되어 있습니다: + +- [`getCards()`](api/provider/rest_methods/js_kanban_getcards_method.md) - ***카드 데이터***에 대한 promise를 반환합니다 +- [`getColumns()`](api/provider/rest_methods/js_kanban_getcolumns_method.md) - ***컬럼 데이터***에 대한 promise를 반환합니다 +- [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) - ***링크 데이터***에 대한 promise를 반환합니다 +- [`getRows()`](api/provider/rest_methods/js_kanban_getrows_method.md) - ***행 데이터***에 대한 promise를 반환합니다 +- [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md) - ***사용자 데이터***에 대한 promise를 반환합니다 + +## 백엔드와의 상호작용 + +서버와 상호작용하려면 **RestDataProvider**를 해당 서버 스크립트에 연결해야 합니다. 내장 백엔드를 사용하고 싶다면, 다음 저장소에서 필요한 스크립트를 찾을 수 있습니다: + +- [**Go**](https://github.com/web-widgets/kanban-go) 백엔드 +- [**Node**](https://github.com/web-widgets/kanban-node) 백엔드 + +또는 직접 커스텀 서버를 만들 수도 있습니다. + +:::tip +커스텀 백엔드를 사용하는 경우, [**REST API 라우트**](api/overview/rest_routes_overview.md) 항목을 참고하세요! +::: + +**RestDataProvider**를 백엔드에 연결하려면, 해당 **URL**을 파라미터로 전달하여 **kanban.RestDataProvider** 생성자를 호출해야 합니다. + +~~~js {1-2,27} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getUsers(), + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows() +]).then(([users, cards, columns, links, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +데이터 작업(*추가*, *삭제* 등) 및 서버로의 요청 전송을 위해 [**api.setNext()**](api/internal/js_kanban_setnext_method.md) 메서드를 사용하여 **RestDataProvider**를 **Event Bus** 순서에 포함시켜야 합니다. +::: + +### 예제 + +이 코드 스니펫에서는 **RestDataProvider**를 **Go** 백엔드에 연결하고 서버 데이터를 로드하는 방법을 보여줍니다: + + + +## 다중 사용자 백엔드 + +Kanban과 같은 프로젝트 관리 도구는 다양한 규모의 기업에서 많이 사용됩니다. 이런 점을 고려하여, 여러 사용자가 원활하게 협업할 수 있도록 하는 것이 중요합니다. 새로운 기능을 통해 사용자는 페이지를 새로 고침하지 않고도 Kanban 보드에서 동일한 카드를 실시간으로 효율적으로 관리할 수 있습니다. 그 결과, 최종 사용자는 서로의 작업을 실시간으로 확인하고 협업할 수 있어 생산성과 만족도가 높아집니다. + +다중 사용자 백엔드를 구현하려면 Kanban 초기화 전에 서버에서 인증을 받아야 합니다. 이를 위해 `login(url: string)` 함수를 생성할 수 있습니다: + +~~~js {} +const login = (url) => { + var token = sessionStorage.getItem("login-token"); + if (token) { + return Promise.resolve(token); + } + + return fetch(url + "/login?id=1") + .then(raw => raw.text()) + .then(token => { + sessionStorage.setItem("login-token", token); + return token; + }); +}; +~~~ + +이 함수는 인증을 시뮬레이션하며, 모든 사용자는 ID 1로 인증됩니다. 인증이 성공하면 서버는 토큰을 반환하며, 이후 모든 요청에 이 토큰을 사용해야 합니다. 토큰 전송을 자동화하려면 `RestDataProvider.setHeaders()` 함수를 사용합니다. 이 함수는 요청에 커스텀 헤더를 추가합니다. 기본적으로, 서버는 `"Remote-Token":` 헤더에 토큰을 저장합니다: + +~~~js {} +login(url).then(token => { + // rest provider 초기화 + const restProvider = new kanban.RestDataProvider(url); + // 토큰을 커스텀 헤더로 설정 + restProvder.setHeaders({ + "Remote-Token": "eyJpZCI6IjEzMzciLCJ1c2VybmFtZSI6ImJpem9uZSIsImlhdC...", + }); + + // 위젯 초기화... +}); +~~~ + +토큰을 받은 후에는 위젯을 초기화해야 합니다. 아래와 같이 할 수 있습니다: + +~~~js {} +// 위젯 초기화... +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows(), +]).then(([cards, columns, links, rows]) => { + const board = new Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "row", + cardShape, + editorShape, + }); + + // 클라이언트 데이터를 서버에 저장 + board.api.setNext(restProvider); + + // 다중 사용자 초기화... +}); +~~~ + +위젯 초기화 후에는 서버에서 발생하는 이벤트를 수신하기 위해 WebSocket을 추가해야 합니다. 다음과 같이 할 수 있습니다: + +~~~js {} +// 다중 사용자 초기화... + +// 서버 이벤트에 대한 클라이언트 핸들러 가져오기 +const handlers = kanbanUpdates( + board.api, + restProvider.getIDResolver() +); +// 서버 이벤트에 연결 +const events = new RemoteEvents(url + "/api/v1", token); +// 서버 이벤트에 클라이언트 핸들러 연결 +events.on(handlers); +~~~ + +- `handlers` - 서버 이벤트를 처리하는 클라이언트 핸들러 +- `events` - 서버에 연결하여 모든 수신 이벤트를 듣는 객체 +- `RemoteEvents.on(handlers)` - 서버 이벤트에 클라이언트 핸들러를 적용 + +다중 사용자 백엔드를 앱에 통합하면, 사용자 간 협업을 간소화하고 UI를 통해 실시간으로 변경 사항을 추적할 수 있습니다. + +### 예제 + +아래 스니펫은 다중 사용자 백엔드를 구성하여 다른 사용자의 변경 사항을 실시간으로 추적하는 방법을 보여줍니다: + + + +## 서버 이벤트 커스터마이징 + +서버 이벤트를 처리하는 자체 로직을 정의할 수 있습니다. 이를 위해 **handlers** 객체를 `RemoteEvents.on(handlers)` 메서드에 전달해야 합니다. **handlers** 객체는 다음과 같은 구조를 가져야 합니다: + +~~~js {} +{ + "cards": cardsHandler: function(obj: any), + "columns": columnsHandler: function(obj: any), + "links": linksHandler: function(obj: any), + "rows": rowsHandler: function(obj: any), +} +~~~ + +서버에서 변경이 발생하면, 수정된 요소의 이름을 반환합니다. 이 이름은 서버 로직에 따라 달라질 수 있습니다. + +클라이언트에서 업데이트된 데이터는 `function(obj: any)` 함수의 **obj** 인자에 전달됩니다. 작업을 지정하려면 `type: string` 필드를 사용합니다. 가능한 값은 다음과 같습니다: + +- **카드**: `"add-card"`, `"update-card"`, `"delete-card"`, `"move-card"` +- **컬럼**: `"add-column"`, `"update-column"`, `"delete-column"`, `"move-column"` +- **링크**: `"add-link"`, `"delete-link"` +- **행**: `"add-row"`, `"update-row"`, `"delete-row"`, `"move-row"` + +아래 코드 스니펫에서 구현 예시를 확인할 수 있습니다: + +~~~js {} +// kanban 초기화 +const board = new kanban.Kanban(...); +const restProvider = new kanban.RestDataProvider(url); +const idResolver = restProvider.getIDResolver(); +const TypeCard = 1; +const TypeRow = 2; +const TypeCol = 3; + +const cardsHandler = (obj: any) => { + obj.card.id = idResolver(obj.card.id, TypeCard); + obj.card.row = idResolver(obj.card.row, TypeRow); + obj.card.column = idResolver(obj.card.column, TypeColumn); + switch (obj.type) { + case "add-card": + board.api.exec("add-card", { + card: obj.card, + select: false, + skipProvider: true, // 클라이언트에서 서버로 요청 전송 방지 + }) + break; + // 기타 작업 + } +} + +// 커스텀 핸들러 추가 +const handlers = { + cards: cardsHandler, +}; + +const remoteEvents = new kanban.RemoteEvents(remoteEventsURL, token); +remoteEvents.on(handlers); +~~~ + +`RestDataProvider.getIDResolver()` 메서드는 클라이언트 ID와 서버 ID를 동기화하는 데 필요한 함수를 반환합니다. 클라이언트에서 새 객체(*카드/컬럼/행/링크*)를 생성하면, 해당 객체에는 임시 ID와 저장소의 서버 ID가 함께 존재합니다. `idResolver()` 함수는 클라이언트 ID와 서버 ID를 동기화할 수 있습니다. 이 함수의 형식은 `idResolver(id: TID, type: number)`입니다. + +`type` 인자는 다음 값을 가집니다: + +- `CardID` - 1, +- `RowID` - 2, +- `ColumnID` - 3 +- `LinkID` - 4 + +서버로의 요청 전송을 방지하려면, `board.api.exec()` 메서드 호출 시 `skipProvider: true` 플래그를 사용해야 합니다. + +마지막으로, 커스텀 핸들러를 서버 이벤트에 적용하면 자체 서버 이벤트 핸들러를 만들 수 있습니다. + +## 두 개 이상의 상태(status)를 하나의 컬럼으로 그룹화하기 + +이 섹션에서는 서로 다른 컬럼의 카드를 하나의 컬럼에서 표시하는 방법(예: *To do*와 *Unassigned* 상태를 가진 카드의 공통 컬럼)을 설명합니다. + +이런 그룹화를 구현하려면, 커스텀 필드(예: **status**)를 추가해야 합니다. 이 필드는 카드의 현재 상태를 저장합니다. **column** 필드는 공통 상태를 저장합니다. + +이후 카드 그룹화를 위한 특정 규칙을 만들어야 합니다. 예를 들어, 다음과 같이 상태별로 특정 컬럼에 카드를 그룹화할 수 있습니다: + +- *todo*, *unassigned* - **Open** 컬럼의 상태 +- *dev*, *testing* - **Inprogress** 컬럼의 상태 +- *merged*, *released* - **Done** 컬럼의 상태 + +두 개 이상의 상태를 하나의 컬럼으로 그룹화하는 방법은 두 가지가 있습니다: + +- [서버 사이드](#서버-사이드-그룹화) +- [서버 사이드 + 클라이언트 사이드](#서버-사이드--클라이언트-사이드-그룹화) + +### 서버 사이드 그룹화 + +서버 사이드 그룹화를 구현하려면, 서버가 [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)를 통해 클라이언트에 데이터를 전송할 수 있어야 합니다([다중 사용자 백엔드](#다중-사용자-백엔드) 참고). + +서버에서 카드 업데이트 쿼리를 처리하는 부분에서 **status** 필드를 확인해야 합니다. 여기서는 [Go](https://go.dev/) 언어를 예시로 사용하지만, 다른 백엔드 기술도 사용할 수 있습니다. + +~~~go +func Update(id int, c Card) error { + // ... + oldColumn := c.Column + s := data.Status + if s == "todo" || s == "unassigned" { + c.Column = "open" + } else if s == "dev" || s == "testing" { + c.Column = "inprogress" + } else if s == "merged" || s == "released" { + c.Column = "done" + } + + db.Save(&c) + + if oldColumn != c.Column { + // status 필드로 컬럼이 변경되면, + // 클라이언트에 해당 카드의 컬럼 이동을 알림 + + // 카드의 인덱스 업데이트 필요 + updateCardIndex(&c) + + // 클라이언트에 컬럼 업데이트 알림 + ws.Publish("card-update", &c) + } + // ... +} +~~~ + +이렇게 하면, 사용자가 status 필드의 값을 변경할 때 서버 로직이 값을 확인하여 해당 컬럼에 카드를 배치합니다. 이후 서버는 WebSocket을 통해 클라이언트에 카드 이동을 알립니다. + +### 서버 사이드 + 클라이언트 사이드 그룹화 + +서버와 클라이언트 혼합 방식을 사용하려면, 서버로부터 그룹화 규칙을 받아와야 합니다. 이 규칙에 따라 클라이언트가 status 필드 값에 따라 카드를 어느 컬럼으로 이동시킬지 결정할 수 있습니다. + +~~~js +const groupingRules = await fetch("http://server.com/rules"); +~~~ + +예를 들어, 다음과 같이 규칙을 지정할 수 있습니다: + +~~~json +{ + "open": ["todo", "unassigned"], + "progress": ["dev", "testing"], + "done": ["merged", "released"], +} +~~~ + +다음으로, 카드 변경을 확인하고 필요한 컬럼으로 이동시키는 로직을 정의해야 합니다: + +~~~js +const updateColumn = card => { + for (let col in groupingRules) { + if (groupingRules[col].includes(card.status)) { + card.column = col; + break; + } + } +}; + +kanban.api.intercept("move-card", ev => { + kanban.api.exec("update-card", { + id: ev.id, + card: { status: groupingRules[ev.columnId][0], + }); +}); + +kanban.api.intercept("update-card", ev => { + updateColumn(ev.card); +}); +~~~ + +이렇게 하면, 다른 필드 값에 따라 특정 컬럼에 카드를 배치할 수 있습니다. + +### 예제 + +아래 스니펫은 서버 사이드에서 두 개 이상의 상태를 하나의 컬럼으로 그룹화하는 방법을 실시간으로 보여줍니다: + + \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/how_to_start.md b/i18n/ko/docusaurus-plugin-content-docs/current/how_to_start.md new file mode 100644 index 0000000..847b9c7 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/how_to_start.md @@ -0,0 +1,129 @@ +--- +sidebar_label: 시작하기 +title: 시작하기 +description: DHTMLX JavaScript Kanban 라이브러리의 문서에서 DHTMLX Kanban을 시작하는 방법을 확인할 수 있습니다. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제와 라이브 데모를 체험해 보세요. DHTMLX Kanban의 30일 무료 평가판도 다운로드할 수 있습니다. +--- + +# 시작하기 + +이 명확하고 종합적인 튜토리얼은 페이지에 완전한 기능의 Kanban을 구현하기 위해 거쳐야 할 단계들을 안내합니다. + +import editor from '@site/static/img/js_kanban_editor.png'; + +JS Kanban Main + +## 1단계. 소스 파일 포함하기 + +먼저 *index.html*이라는 HTML 파일을 생성하세요. 그런 다음 생성한 파일에 Kanban 소스 파일을 포함합니다. + +필수 파일은 두 가지입니다: + +- Kanban의 JS 파일 +- Kanban의 CSS 파일 + +~~~html {5-6} title="index.html" + + + + How to Start with Kanban + + + + + + + +~~~ + +### npm 또는 yarn을 통한 Kanban 설치 + +`yarn` 또는 `npm` 패키지 관리자를 사용하여 JavaScript Kanban을 프로젝트에 가져올 수 있습니다. + +#### npm 또는 yarn을 통한 평가판 Kanban 설치 + +:::info +Kanban의 평가판을 사용하려면 [**trial Kanban package**](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml)를 다운로드하고 *README* 파일에 안내된 단계를 따르세요. 평가판 Kanban은 30일 동안만 사용 가능합니다. +::: + +#### npm 또는 yarn을 통한 PRO Kanban 설치 + +:::info +[Client's Area](https://dhtmlx.com/clients/)에서 **npm**용 로그인과 비밀번호를 생성하여 DHTMLX의 프라이빗 **npm**에 직접 접근할 수 있습니다. 자세한 설치 가이드도 그곳에서 확인할 수 있습니다. 프라이빗 **npm** 접근은 Kanban 라이선스가 활성화된 기간 동안만 제공됩니다. +::: + +## 2단계. Kanban 생성하기 + +이제 페이지에 Kanban을 추가할 준비가 되었습니다. 먼저 Kanban과 Toolbar를 위한 DIV 컨테이너를 만듭니다. 다음 단계를 따라주세요: + +- *index.html* 파일에 두 개의 DIV 컨테이너를 지정합니다. +- **kanban.Kanban** 및 **kanban.Toolbar** 생성자를 사용해 Kanban과 Toolbar를 초기화합니다. + +:::info +Toolbar는 Kanban 인터페이스의 선택적 요소입니다. Toolbar 없이 Kanban을 만들고 싶다면, 단 하나의 DIV 컨테이너만 지정하고 **kanban.Kanban** 생성자를 통해 위젯을 초기화하면 됩니다. +::: + +생성자는 Kanban과 Toolbar가 배치될 HTML 컨테이너의 ID와 관련 설정 객체를 매개변수로 받습니다. + +~~~html {9-10,13-15,17-19} title="index.html" + + + + How to Start with Kanban + + + + +
+
+ + + + +~~~ + +## 3단계. Kanban 설정하기 + +이제 Kanban 컴포넌트가 초기화될 때 적용할 설정 속성을 지정할 수 있습니다. + +Kanban을 사용하려면 먼저 **cards**와 **columns**(그리고 *rows*)에 대한 초기 데이터를 제공해야 합니다. +초기 데이터 외에도 [cards](guides/configuration.md#카드), [editor](guides/configuration.md#에디터), [toolbar](guides/configuration.md#툴바)의 외관을 설정할 수 있습니다. + +~~~jsx {2-7,11-18} +const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row", + cardShape, + editorShape +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" + ] +}); +~~~ + +## 다음 단계 + +이제 끝입니다. 세 단계만 거치면 시각적으로 워크플로우를 관리할 수 있는 편리한 도구를 갖추게 됩니다. 이제 작업을 시작하거나 JavaScript Kanban의 다양한 기능을 더 탐색해 볼 수 있습니다. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/howtos.md b/i18n/ko/docusaurus-plugin-content-docs/current/howtos.md new file mode 100644 index 0000000..b05cc53 --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/howtos.md @@ -0,0 +1,199 @@ +--- +sidebar_label: How-tos +title: JavaScript Kanban How-Tos +description: DHTMLX JavaScript Kanban 라이브러리의 How-tos 페이지를 문서에서 확인하실 수 있습니다. 개발자 가이드와 API 레퍼런스를 둘러보고, 코드 예제와 라이브 데모를 직접 체험해 보며, DHTMLX Kanban의 30일 무료 평가판도 다운로드할 수 있습니다. +--- + +# How-tos + +이 페이지에서는 JavaScript Kanban을 초기화, 구성, 커스터마이즈 및 사용하는 방법에 대한 완벽한 레퍼런스를 제공합니다. + +## 기본 원칙 + +이 섹션에서는 Kanban을 사용하는 기본 원칙을 확인할 수 있습니다. + +| 주제 | 설명 | +| --------------------------------------------- | --------------------------------------------------| +| [](guides/initialization.md) | Kanban을 초기화하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/gb50vyip?tag=kanban))| +| [](guides/configuration.md) | Kanban을 구성하는 방법을 알아보세요 | +| [](guides/customization.md) | Kanban을 커스터마이즈하는 방법을 알아보세요 | +| [](guides/stylization.md) | Kanban을 스타일링하는 방법을 알아보세요 | +| [](guides/localization.md) | Kanban을 현지화하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban))| + +## API 레퍼런스 + +이 섹션에서는 Kanban API에 대한 관련 레퍼런스를 확인할 수 있습니다. + +| 주제 | 설명 | +| ----------------------------------------------------- | --------------------------------------------------| +| [Kanban events](api/overview/events_overview.md) | Kanban 이벤트를 다루는 방법을 알아보세요 | +| [Kanban methods](api/overview/methods_overview.md) | Kanban 메서드를 사용하는 방법을 알아보세요 | +| [Kanban properties](api/overview/properties_overview.md)| Kanban 속성을 사용하는 방법을 알아보세요 | +| [Event Bus methods](api/overview/internal_eventbus_overview.md)| Event Bus 메서드를 사용하는 방법을 알아보세요 | +| [RestDataProvider methods](api/overview/internal_rest_overview.md)| RestDataProvider 메서드를 사용하는 방법을 알아보세요| +| [State methods](api/overview/internal_state_overview.md)| State 메서드를 사용하는 방법을 알아보세요 | +| [Toolbar methods](api/overview/toolbar_methods_overview.md)| Toolbar 메서드를 사용하는 방법을 알아보세요 | +| [Toolbar properties](api/overview/toolbar_properties_overview.md)| Toolbar 속성을 사용하는 방법을 알아보세요 | + +## 카드 작업 방법 + +이 섹션에서는 카드에 대한 작업 수행, 카드 데이터 관리 및 카드 설정 방법을 확인할 수 있습니다. + +### 카드 작업 수행 + +| 주제 | 설명 | +| ------------------------------------------------------------ | ---------------------------------------| +| [Adding new cards](api/methods/js_kanban_addcard_method.md) | 새 카드를 추가하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Deleting cards](api/methods/js_kanban_deletecard_method.md) | 카드를 삭제하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Moving cards](api/methods/js_kanban_movecard_method.md) | 카드를 이동하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Scrolling to the desired cards](api/methods/js_kanban_scroll_method.md)| 원하는 카드로 Kanban을 스크롤하는 방법을 알아보세요| +| [Searching for cards](api/methods/js_kanban_setsearch_method.md)| 카드를 검색하는 방법을 알아보세요 | +| [Selecting cards](api/methods/js_kanban_selectcard_method.md)| 카드를 선택하는 방법을 알아보세요 | +| [Sorting cards](api/methods/js_kanban_setsort_method.md) | 카드를 정렬하는 방법을 알아보세요 | +| [Unselecting cards](api/methods/js_kanban_unselectcard_method.md)| 카드 선택 해제 방법을 알아보세요 | +| [Adding links between cards](api/config/js_kanban_links_config.md)| 카드 간 링크를 추가하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) | + +### 카드 데이터 작업 + +| 주제 | 설명 | +| ------------------------------------------------------------ | --------------------------------------------| +| [Getting card data](api/methods/js_kanban_getcard_method.md) | 카드 데이터를 가져오는 방법을 알아보세요 | +| [Getting cards state](api/internal/js_kanban_getstate_method.md) | 카드 상태를 가져오는 방법을 알아보세요 | +| [Getting cards reactive state](api/internal/js_kanban_getreactivestate_method.md) | 카드의 반응형 상태를 가져오는 방법을 알아보세요 | +| [Loading card data](api/config/js_kanban_cards_config.md) | 초기 카드 데이터를 불러오는 방법을 알아보세요| +| [Parsing card data](api/methods/js_kanban_parse_method.md) | 카드 데이터를 파싱하는 방법을 알아보세요 | +| [Serializing card data](api/methods/js_kanban_serialize_method.md)| 카드 데이터를 직렬화하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Updating card data](api/methods/js_kanban_updatecard_method.md)| 카드 데이터를 업데이트하는 방법을 알아보세요 | + +### 카드 설정 + +| 주제 | 설명 | +| ------------------------------------------------------------ | --------------------------------------------| +| [Adding new cards](api/config/js_kanban_readonly_config.md) | 새 카드 추가 가능/불가 설정 방법을 알아보세요| +| [Binding cards into columns](api/config/js_kanban_columnkey_config.md) | 카드를 컬럼에 바인딩하는 방법을 알아보세요 | +| [Binding cards into rows](api/config/js_kanban_rowkey_config.md) | 카드를 행에 바인딩하는 방법을 알아보세요 | +| [Configuring a card appearance](api/config/js_kanban_cardshape_config.md)| 카드의 외관을 설정하는 방법을 알아보세요| +| [Configuring a cards menu](api/config/js_kanban_cardshape_config.md)| 카드 컨텍스트 메뉴를 설정하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Customizing a card appearance](api/config/js_kanban_cardtemplate_config.md)| 템플릿을 사용하여 카드 외관을 커스터마이즈하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban))| +| [Dragging cards](api/config/js_kanban_readonly_config.md) | 카드 드래그 앤 드롭 가능/불가 설정 방법을 알아보세요| +| [Editing cards](api/config/js_kanban_readonly_config.md) | 카드 편집 가능/불가 설정 방법을 알아보세요 | +| [Lazy rendering](api/config/js_kanban_rendertype_config.md)| 많은 카드의 **lazy rendering**을 활성화/비활성화하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/xez9ghqq?text=#kanban))| +| [Limiting cards](api/config/js_kanban_columns_config.md) | 컬럼 및 스윔레인별 카드 개수 제한 (**WIP 검증**) 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/2blo6hx8?text=kanban))| +| [Selecting cards](api/config/js_kanban_readonly_config.md) | 카드 선택 가능/불가 설정 방법을 알아보세요 | +| [Setting a fix height of cards](api/config/js_kanban_cardheight_config.md)| 카드의 고정 높이 설정 방법을 알아보세요 | +| [Updating card settings](api/methods/js_kanban_setconfig_method.md)| 카드 설정을 업데이트하는 방법을 알아보세요 | + +## 카드 에디터 사용 방법 + +이 섹션에서는 카드 에디터를 사용하는 방법을 확인할 수 있습니다. + +| 주제 | 설명 | +| ------------------------------------------------------------ | -----------------------------------------------| +| [Autosaving mode](api/config/js_kanban_editorautosave_config.md)| 에디터 자동 저장 모드 활성화/비활성화 방법을 알아보세요 | +| [Configuring editor fields](guides/configuration.md#에디터)| 에디터 필드 설정 방법을 알아보세요 | +| [Configuring the editor](guides/configuration.md#에디터-설정)| 에디터 설정 방법을 알아보세요 | +| [Updating editor settings](api/methods/js_kanban_setconfig_method.md)| 에디터 설정을 업데이트하는 방법을 알아보세요 | + +## 컬럼 작업 방법 + +이 섹션에서는 컬럼에 대한 작업 수행 및 컬럼 데이터 작업 방법을 확인할 수 있습니다. + +### 컬럼 작업 수행 + +| 주제 | 설명 | +| --------------------------------------------------------------- | --------------------------------------------| +| [Adding new columns](api/methods/js_kanban_addcolumn_method.md) | 새 컬럼을 추가하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Configuring a columns menu](api/config/js_kanban_columnshape_config.md)| 컬럼 컨텍스트 메뉴를 설정하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting columns](api/methods/js_kanban_deletecolumn_method.md)| 컬럼을 삭제하는 방법을 알아보세요 | +| [Moving columns](api/methods/js_kanban_movecolumn_method.md) | 컬럼을 이동하는 방법을 알아보세요 | +| [Scrolling to the desired columns](api/methods/js_kanban_scroll_method.md)| 원하는 컬럼으로 Kanban을 스크롤하는 방법을 알아보세요 | +| [Separate scrolling for columns](api/config/js_kanban_scrolltype_config.md)| 각 컬럼별로 별도의 스크롤을 설정하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban))| + +### 컬럼 데이터 작업 + +| 주제 | 설명 | +| --------------------------------------------------------------- | --------------------------------------------| +| [Getting card data of the column](api/methods/js_kanban_getareacards_method.md)| 컬럼의 카드 데이터를 가져오는 방법을 알아보세요 | +| [Getting columns state](api/internal/js_kanban_getstate_method.md) | 컬럼 상태를 가져오는 방법을 알아보세요 | +| [Getting columns reactive state](api/internal/js_kanban_getreactivestate_method.md) | 컬럼의 반응형 상태를 가져오는 방법을 알아보세요 | +| [Loading column data](api/config/js_kanban_columns_config.md) | 초기 컬럼 데이터를 불러오는 방법을 알아보세요| +| [Parsing column data](api/methods/js_kanban_parse_method.md) | 컬럼 데이터를 파싱하는 방법을 알아보세요 | +| [Serializing column data](api/methods/js_kanban_serialize_method.md)| 컬럼 데이터를 직렬화하는 방법을 알아보세요| +| [Updating column data](api/methods/js_kanban_updatecolumn_method.md)| 컬럼 데이터를 업데이트하는 방법을 알아보세요 | + +## 행(스윔레인) 작업 방법 + +이 섹션에서는 행(스윔레인)에 대한 작업 수행 및 행 데이터 작업 방법을 확인할 수 있습니다. + +### 행(스윔레인) 작업 수행 + +| 주제 | 설명 | +| --------------------------------------------------------------- | --------------------------------------------| +| [Adding new rows](api/methods/js_kanban_addrow_method.md) | 새 행(스윔레인)을 추가하는 방법을 알아보세요 | +| [Configuring a rows menu](api/config/js_kanban_rowshape_config.md)| 행(스윔레인) 컨텍스트 메뉴를 설정하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting rows](api/methods/js_kanban_deleterow_method.md) | 행(스윔레인)을 삭제하는 방법을 알아보세요 | +| [Moving rows](api/methods/js_kanban_moverow_method.md) | 행(스윔레인)을 이동하는 방법을 알아보세요 | +| [Scrolling to the desired row](api/methods/js_kanban_scroll_method.md)| 원하는 행(스윔레인)으로 Kanban을 스크롤하는 방법을 알아보세요| + +### 행(스윔레인) 데이터 작업 + +| 주제 | 설명 | +| --------------------------------------------------------------- | --------------------------------------------| +| [Getting card data of the column and row](api/methods/js_kanban_getareacards_method.md)| 컬럼과 행의 카드 데이터를 가져오는 방법을 알아보세요 | +| [Getting rows state](api/internal/js_kanban_getstate_method.md) | 행 상태를 가져오는 방법을 알아보세요 | +| [Getting rows reactive state](api/internal/js_kanban_getreactivestate_method.md) | 행의 반응형 상태를 가져오는 방법을 알아보세요 | +| [Loading row data](api/config/js_kanban_rows_config.md) | 초기 행 데이터를 불러오는 방법을 알아보세요 | +| [Parsing row data](api/methods/js_kanban_parse_method.md) | 행 데이터를 파싱하는 방법을 알아보세요 | +| [Serializing row data](api/methods/js_kanban_serialize_method.md)| 행 데이터를 직렬화하는 방법을 알아보세요 | +| [Updating row data](api/methods/js_kanban_updaterow_method.md) | 행 데이터를 업데이트하는 방법을 알아보세요 | + +## 이벤트 작업 방법 + +| 주제 | 설명 | +| ----------------------------------------------------------- | -------------------------------------------| +| [Executing events](api/internal/js_kanban_exec_method.md) | 내부 이벤트를 실행하는 방법을 알아보세요 | +| [Intercepting events](api/internal/js_kanban_intercept_method.md)| 내부 이벤트를 가로채는 방법을 알아보세요| +| [List of inner events](api/overview/events_overview.md) | Kanban 내부 이벤트 목록을 확인하세요 | +| [Reordering events](api/internal/js_kanban_setnext_method.md)| 내부 이벤트를 Event Bus 순서에 추가하는 방법을 알아보세요 | +| [Subscribing on events](api/internal/js_kanban_on_method.md)| 내부 이벤트를 구독하는 방법을 알아보세요 | + +## Kanban REST API 사용 방법 + +| 주제 | 설명 | +| ----------------------------------------------------------- | -------------------------------------------| +| [Loading server data for cards](api/provider/rest_methods/js_kanban_getcards_method.md)| 카드의 서버 데이터를 불러오는 방법을 알아보세요 | +| [Loading server data for columns](api/provider/rest_methods/js_kanban_getcolumns_method.md)| 컬럼의 서버 데이터를 불러오는 방법을 알아보세요 | +| [Loading server data for rows](api/provider/rest_methods/js_kanban_getrows_method.md)| 행의 서버 데이터를 불러오는 방법을 알아보세요 | +| [Working with server](guides/working_with_server.md) | REST API를 통해 서버와 연동하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/f25y0809?tag=kanban))| + +## Kanban 상태 작업 방법 + +| 주제 | 설명 | +| ----------------------------------------------------------- | -------------------------------------------| +| [Getting StateStore and DataStore](api/internal/js_kanban_getstores_method.md)| StateStore 및 DataStore 객체를 가져오는 방법을 알아보세요 | +| [Getting StateStore properties](api/internal/js_kanban_getstate_method.md)| StateStore 속성 객체를 가져오는 방법을 알아보세요 | +| [Getting StateStore reactive properties](api/internal/js_kanban_getreactivestate_method.md)| StateStore의 반응형 속성 객체를 가져오는 방법을 알아보세요 | + +## Toolbar 작업 방법 + +| 주제 | 설명 | +| ----------------------------------------------------------- | ----------------------------------------------| +| [Configuring a searchbar on Toolbar](api/config/toolbar_items_config.md) | Toolbar에 검색바를 설정하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring a sort control on Toolbar](api/config/toolbar_items_config.md) | Toolbar에 정렬 컨트롤을 설정하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring Toolbar controls](api/config/toolbar_items_config.md)| Toolbar 컨트롤을 구성, 커스터마이즈 및 순서 변경하는 방법을 알아보세요 ([예제](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban)) | +| [Including Kanban API in Toolbar](api/config/toolbar_api_config.md) | Toolbar에서 Kanban API를 포함하고 사용하는 방법을 알아보세요 | +| [Localizing Toolbar](api/config/toolbar_locale_config.md) | Toolbar를 현지화하는 방법을 알아보세요 | + +## TypeScript 사용 방법 + +| 주제 | 설명 | +| ----------------------------------------------------------- | -------------------------------------------| +| [Working with TypeScript](guides/typescript_support.md) | TypeScript와 함께 사용하는 방법을 알아보세요| + +## 추가 질문이 있으신가요? + + + +:::info +아래 댓글에 질문을 남기실 수도 있습니다! +::: \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/index.md b/i18n/ko/docusaurus-plugin-content-docs/current/index.md new file mode 100644 index 0000000..cdf1b7f --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/index.md @@ -0,0 +1,73 @@ +--- +sidebar_label: Kanban overview +title: JavaScript Kanban Overview +slug: / +description: DHTMLX JavaScript Kanban 라이브러리에 대한 개요를 문서에서 확인하실 수 있습니다. 개발자 가이드와 API 레퍼런스를 둘러보고, 코드 예제와 라이브 데모를 체험해 보세요. DHTMLX Kanban의 30일 무료 평가판도 다운로드할 수 있습니다. +--- + +# DHTMLX Kanban 개요 + +JavaScript Kanban은 워크플로우 시각화를 위한 효과적인 솔루션입니다. 이 위젯을 사용하면 비즈니스 프로세스를 더 잘 이해하고 팀의 작업량을 한눈에 파악할 수 있습니다. 유연한 이 도구는 카드, 컬럼, 스윔레인(swimlane)의 개수에 제한 없이 동작합니다. 순수 JavaScript와 CSS로 완전히 작성되어 있어 손쉽게 설정, 커스터마이즈, 그리고 어떤 웹 앱이나 웹 페이지에도 통합할 수 있습니다. + +## Kanban 구조­ + +### Toolbar + +Kanban의 **Toolbar**는 인터페이스의 별도 부분입니다. 여기에는 카드를 *검색*할 수 있는 검색창, 지정된 파라미터로 카드를 *정렬*하는 컨트롤, 기록을 관리하는 두 개의 컨트롤(*undo/redo*), 그리고 *새 컬럼 및 행 추가*를 위한 컨트롤이 포함되어 있습니다. 검색 및 정렬 로직을 유연하게 제어할 수 있고, 커스텀 요소를 추가하거나 내장 요소의 순서를 변경하여 Toolbar 구조를 변경할 수 있습니다. 자세한 내용은 [Configuration](guides/configuration.md#툴바) 섹션을 참고하세요. + +import toolbar from '@site/static/img/js_kanban_toolbar.png'; + +Kanban Toolbar + +### Board + +**Board**는 Kanban의 주요 부분입니다. 카드들이 컬럼과 행(스윔레인)으로 나뉘어 배치되어 있습니다. 카드의 외관을 유연하게 설정할 수 있으며, 커스텀 템플릿도 적용할 수 있습니다. 자세한 내용은 [Configuration](guides/configuration.md#카드) 섹션을 참고하세요. + +**Board** 패널에서는 ***카드***, ***컬럼***, ***행***을 다음과 같이 관리할 수 있습니다: + +- 각 컬럼 및 스윔레인에 지정된 *제한*에 따라 플러스 아이콘을 클릭해 새 카드를 추가 +- 에디터 패널을 통해 작업에 대한 댓글 및 투표 추가 ([예시](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- 에디터를 통해 작업 간의 링크 설정 ([예시](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- 컨텍스트 메뉴(3점 아이콘)를 사용해 카드, 컬럼, 행 삭제 +- 컨텍스트 메뉴(3점 아이콘) 또는 `Ctrl (Command)`+`D` 단축키로 카드 복제 (여러 카드 복제 가능) +- Kanban 데이터를 JSON 파일로 내보내기 +- 다음 단축키로 Kanban 기록 관리: + - `Ctrl (Command)`+`Z` - Kanban에서 마지막 작업을 되돌림(히스토리에서 한 단계 뒤로) + - `Ctrl (Command)`+`Y` 또는 `Ctrl (Command)`+`Shift`+`Z` - *undo*로 되돌린 작업을 다시 실행(히스토리에서 한 단계 앞으로) +- 카드를 원하는 위치(행 및 컬럼)로 드래그하여 이동 +- 컨텍스트 메뉴(3점 아이콘)로 컬럼 및 행 이동 +- 해당 레이블을 더블 클릭하거나 컨텍스트 메뉴(3점 아이콘)로 컬럼 및 행 이름 변경 +- 카드를 클릭하여 카드 에디터 표시 +- 행 레이블 왼쪽의 화살표 아이콘을 클릭하여 행을 접거나 펼치기 +- 컬럼 레이블 왼쪽의 화살표 아이콘을 클릭하여 컬럼을 접거나 펼치기 +- 다음 단축키로 여러 카드 선택: + - 같은 컬럼 내에서 여러 카드를 선택하려면 `Shift` + 해당 카드 클릭 + - 다른 컬럼의 여러 카드를 선택하려면 `Ctrl (Command)` + 해당 카드 클릭 + +import board from '@site/static/img/js_kanban_board.png'; + +Kanban Board + +### Editor + +**Editor**는 선택한 카드 데이터를 관리할 수 있는 필드와 컨트롤로 구성된 모달 패널입니다. 변경하려는 카드를 클릭하면 에디터가 표시됩니다. 새로운 필드와 컨트롤을 추가하여 에디터 구조를 유연하게 설정할 수 있습니다. 자세한 내용은 [Configuration](guides/configuration.md#에디터) 섹션을 참고하세요. + +import editor from '@site/static/img/js_kanban_editor.png'; + +Kanban Editor + +## 다음 단계 + +이제 Kanban을 애플리케이션에 적용할 준비가 되었습니다. 자세한 안내는 [How to start](how_to_start.md) 튜토리얼을 참고하세요. \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/news/migration.md b/i18n/ko/docusaurus-plugin-content-docs/current/news/migration.md new file mode 100644 index 0000000..c21d9ec --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/news/migration.md @@ -0,0 +1,1454 @@ +--- +sidebar_label: 최신 버전으로의 마이그레이션 +title: 최신 버전으로의 마이그레이션 +description: DHTMLX JavaScript Kanban 라이브러리 문서에서 최신 버전으로의 마이그레이션에 대해 알아보실 수 있습니다. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제와 라이브 데모를 사용해보며, DHTMLX Kanban의 30일 무료 평가판을 다운로드해보세요. +--- + +# 최신 버전으로의 마이그레이션 + +## 1.6.5 -> 1.7.0 + +### Api + +#### Properties + +- [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성이 업데이트되었습니다. `clearButton` 파라미터가 `clear`로 교체되었습니다: + +~~~jsx {8} title="v1.7.0 이전" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clearButton: true // legacy + } + }, { /* ... */ } + ] + // 기타 파라미터 +}); +~~~ + +~~~jsx {8} title="v1.7.0부터" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clear: true // new + } + }, { /* ... */ } + ] + // 기타 파라미터 +}); +~~~ + +- [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) 함수가 업데이트되었습니다. **store** 파라미터가 **readonly**로 교체되었습니다: + +~~~jsx {3-4} title="v1.7.0 이전" +menu: { + show: true, + items: ({ card, store }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, store }); // "store" 파라미터는 legacy + ... + } +} +~~~ + +~~~jsx {3-4} title="v1.7.0부터" +menu: { + show: true, + items: ({ card, readonly }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, readonly }); // "readonly" 파라미터는 신규 + ... + } +} +~~~ + +- [`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md) 함수가 업데이트되었습니다. **store** 파라미터가 **readonly**로 교체되었습니다: + +~~~jsx {3-4} title="v1.7.0 이전" +menu: { + show: true, + items: ({ column, columnIndex, columns, store }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, store }); // "store" 파라미터는 legacy + ... + } +} +~~~ + +~~~jsx {3-4} title="v1.7.0부터" +menu: { + show: true, + items: ({ column, columnIndex, columns, readonly }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, readonly }); // "readonly" 파라미터는 신규 + ... + } +} +~~~ + +- [`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) 함수가 업데이트되었습니다. **store** 파라미터가 **readonly**로 교체되었습니다: + +~~~jsx {3-4} title="v1.7.0 이전" +menu: { + show: true, + items: ({ row, rowIndex, rows, store }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, store }); // "store" 파라미터는 legacy + ... + } +} +~~~ + +~~~jsx {3-4} title="v1.7.0부터" +menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, readonly }); // "readonly" 파라미터는 신규 + ... + } +} +~~~ + +- v1.7에서 [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md), [`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md), [`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) 속성의 ***menu.items[0].label*** 및 ***menu.items[0].items*** 파라미터가 제거되었습니다. + +- v1.7에서 `editorAutoSave` 속성이 제거되었습니다. 대신 [`editor.autoSave`](api/config/js_kanban_editor_config.md) 속성을 사용하세요: + +~~~jsx {2} title="v1.7.0 이전" +new kanban.Kanban("#root", { + editorAutoSave: true, // legacy + // 기타 파라미터 +}); +~~~ + +~~~jsx {3} title="v1.7.0부터" +new kanban.Kanban("#root", { + editor: { + autoSave: true // new + } + // 기타 파라미터 +}); +~~~ + +- [`links`](api/config/js_kanban_links_config.md) 속성이 다음과 같이 변경되었습니다: + - **masterId** 파라미터가 **source**로 교체됨 + - **slaveId** 파라미터가 **target**으로 교체됨 + +~~~jsx {5-6,10} title="v1.7.0 이전" +const links = [ + { + id: 1, + // legacy + masterId: 2, + slaveId: 5 + }, {...} // 기타 링크 데이터 +]; + +new kanban.Kanban("#root", { + links, + // 기타 파라미터 +}); +~~~ + +~~~jsx {5-6,10} title="v1.7.0부터" +const links = [ + { + id: 1, + // new + source: 2, + target: 5 + }, {...} // 기타 링크 데이터 +]; + +new kanban.Kanban("#root", { + links, + // 기타 파라미터 +}); +~~~ + +#### Methods + +- store 메서드에서 `undo` 및 `redo` 메서드가 제거되었습니다: + +~~~jsx {1} title="v1.7.0 이전" +kanban.api.getStores().data.undo() // legacy +~~~ + +~~~jsx {5-6,10} title="v1.7.0부터" +kanban.undo(); +// 또는 +kanban.api.exec("undo"); +~~~ + +- [`api.getState()`](api/internal/js_kanban_getstate_method.md) 및 [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) 메서드가 다음과 같이 변경되었습니다: + - v1.7.0에서 다음 파라미터가 제거되었습니다: + + ```js + fromAreaMeta, + dropAreaItemsCoords, + dropAreasCoords, + overAreaMeta, + before, + dragItemId, + dragItemsCoords, + overAreaId + ``` + + - v1.7.0에서 다음 파라미터가 private로 변경되었습니다: + + ```js + edit -> _edit: object, + layout -> _layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object + ``` + +#### Events + +- [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) 이벤트에서 `dragItemsCoords` 및 `dropAreasCoords` 파라미터가 제거되었습니다. + +## 1.5.13 -> 1.6.0 + +메뉴와 관련된 CSS 클래스가 다음과 같이 변경되었습니다: + +~~~jsx + .menu -> .wx-menu + .item -> .wx-item + .icon -> .wx-icon + .value -> .wx-value +~~~ + +## 1.5.12 -> 1.5.13 + +에디터와 관련된 CSS 클래스가 다음과 같이 변경되었습니다: + +~~~jsx + .modal -> .wx-modal + .window -> .wx-window + .modal .window .buttons -> .wx-modal .wx-window .wx-buttons + .combo -> .wx-combo + .combo -> .wx-multicombo + .item -> .wx-item + .color-picker -> .wx-colorselect + .colors -> .wx-colors + .slider -> .wx-slider + .datepicker -> .wx-datepicker + .calendar -> .wx-calendar + .calendar .days .day.out -> .wx-calendar .wx-days .wx-day.wx-out + .combo .tag -> .multicombo .wx-tag + .dropdown -> .wx-dropdown + .dropdown .item -> .wx-dropdown .wx-item + .clear -> .wx-clear +~~~ + +## 1.5.6 -> 1.5.7 + +### Api + +#### Methods + +- Kanban 툴바의 [`setLocale`](api/methods/toolbar_setlocale_method.md) 메서드가 다음과 같이 변경되었습니다: + +~~~jsx {6} title="v1.5.7 이전" + // Kanban 생성 + const board = new kanban.Kanban("#root", {...}); + // Toolbar 생성 + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // Toolbar에 "de" 로케일 적용 + toolbar.setLocale(de); // 또는 null로 초기 로케일(en)로 리셋 +~~~ + +~~~jsx {6} title="v1.5.7부터" + // Kanban 생성 + const board = new kanban.Kanban("#root", {...}); + // Toolbar 생성 + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // Toolbar에 "de" 로케일 적용 + toolbar.setLocale(de, board.api); +~~~ + +## 1.4 -> 1.5 + +### Api + +#### Properties + +- Kanban의 [`columnShape`](api/config/js_kanban_columnshape_config.md) 속성이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.5 이전" + { + menu: { + show: true, + items: [ + { + label: "Update", ... + } + ] + // 기타 파라미터 + } + } + ~~~ + + ~~~jsx {11} title="v1.5부터" + { + menu: { + show: true, + items: [ + { + text: "Update", ... + } + ] + // 기타 파라미터 + }, + fixedHeaders: true + } + ~~~ + +## 1.3 -> 1.4 + +### Api + +#### Properties + +- Kanban의 [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.4 이전" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // 기타 파라미터 + ~~~ + + ~~~jsx {5,7-21} title="v1.4부터" + { + type: "date", // 또는 "dateRange" 타입도 사용 가능 + key: "start_date", + label: "Date Range" + format: "%d/%m/%y" + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", // 또는 "editor" + html: true, + }, + }, + { + type: "links", + key: "links", + label: "Links", + }, + // 기타 파라미터 + ~~~ + +- Kanban의 [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.4 이전" + { + label: true, + description: true, + menu: { + items: [ + { + label: "Delete", ... + } + ] + } + // 기타 파라미터 + } + ~~~ + + ~~~jsx {7,11-13} title="v1.4부터" + { + label: true, + description: true, + menu: { + items: [ + { + text: "Delete", ... + } + ] + }, + votes: true, + comments: true, + css: (card) => card.type == "feature" ? "green" : "red", + // 기타 파라미터 + } + ~~~ + +- Kanban의 [`columnShape`](api/config/js_kanban_columnshape_config.md) 속성이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.4 이전" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // 기타 파라미터 + } + } + ~~~ + + ~~~jsx {6,11} title="v1.4부터" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // 기타 파라미터 + }, + css: (column, cards) => column.id == "feature" && cards.length < 5 ? "green" : "red" + } + ~~~ + +- Kanban의 [`rowShape`](api/config/js_kanban_rowshape_config.md) 속성이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.4 이전" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // 기타 파라미터 + } + } + ~~~ + + ~~~jsx {6,11} title="v1.4부터" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // 기타 파라미터 + }, + css: (row, cards) => row.id == "task" && cards.length < 5 ? "green" : "red", + } + ~~~ + +- Kanban의 [`cards`](api/config/js_kanban_cards_config.md) 속성이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.4 이전" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + // 기타 파라미터 + }, ... + ] + ~~~ + + ~~~jsx {6-18} title="v1.4부터" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + // 기타 파라미터 + }, ... + ] + ~~~ + +- Kanban의 [`columns`](api/config/js_kanban_columns_config.md) 속성이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.4 이전" + [ + { + id: "inprogress", + label: "In progress", + // 기타 파라미터 + }, ... + ] + ~~~ + + ~~~jsx {5-11} title="v1.4부터" + [ + { + id: "inprogress", + label: "In progress", + css: "red", + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + // 기타 파라미터 + }, ... + ] + ~~~ + +- Kanban의 [`rows`](api/config/js_kanban_rows_config.md) 속성이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.4 이전" + [ + { + id: "features", + label: "Features", + // 기타 파라미터 + }, ... + ] + ~~~ + + ~~~jsx {5} title="v1.4부터" + [ + { + id: "features", + label: "Features", + css: "green" + // 기타 파라미터 + }, ... + ] + ~~~ + +- Kanban의 [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) 속성이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.4 이전" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate + }); + ~~~ + + ~~~jsx {6-8} title="v1.4부터" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+
+ +
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // 기타 파라미터 + }); + ~~~ + +- [`items`](api/config/toolbar_items_config.md) 속성의 **sort** 컨트롤이 다음과 같이 변경되었습니다: + + ~~~jsx {} title="v1.4 이전" + [ + { // 커스텀 sort 컨트롤 + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + + ~~~jsx {6,11} title="v1.4부터" + [ + { // 커스텀 sort 컨트롤 + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + +#### Methods + +- Kanban의 [`api.getState()`](api/internal/js_kanban_getstate_method.md) 메서드가 변경되었습니다: + +~~~jsx {25-27} title="v1.4 이전" +api.getState(); +// 메서드는 다음 속성들을 포함한 객체를 반환합니다 +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, +}*/ +~~~ + +~~~jsx {} title="v1.4부터" +api.getState(); +// 메서드는 다음 속성들을 포함한 객체를 반환합니다 +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, +}*/ +~~~ + +## 1.2 -> 1.3 + +### Api + +#### Properties + +- Kanban의 [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성이 다음과 같이 변경되었습니다: + + - ***dateRange*** 파라미터 + + ~~~jsx {} title="v1.3 이전" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // 기타 파라미터 + ~~~ + + ~~~jsx {} title="v1.3부터" + { + type: "dateRange", // 또는 "date" 타입도 사용 가능 + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range" + }, + // 기타 파라미터 + ~~~ + +- Toolbar의 [`items`](api/config/toolbar_items_config.md) 속성이 다음과 같이 변경되었습니다: + +~~~jsx {} title="v1.3 이전" +items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" +] +~~~ + +~~~jsx {4-5} title="v1.3부터" +items: [ + "search", + "spacer", + "undo", + "redo", + "sort", + "addColumn", + "addRow" +] +~~~ + +#### Methods + +- Kanban의 [`updateCard()`](api/methods/js_kanban_updatecard_method.md) 메서드가 변경되었습니다: + +~~~jsx {} title="v1.3 이전" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*기타 파라미터*/ + } +}); +~~~ + +~~~jsx {9} title="v1.3부터" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*기타 파라미터*/ + }, + replace: true +}); +~~~ + +- Kanban의 [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) 메서드가 변경되었습니다: + +~~~jsx {} title="v1.3 이전" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + } +}); +~~~ + +~~~jsx {9} title="v1.3부터" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +- Kanban의 [`updateRow()`](api/methods/js_kanban_updaterow_method.md) 메서드가 변경되었습니다: + +~~~jsx {} title="v1.3 이전" +updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, +}); +~~~ + +~~~jsx {7} title="v1.3부터" +updateColumn({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +## 1.1 -> 1.2 + +### Api + +#### Properties + +- Kanban의 [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성이 다음과 같이 변경되었습니다: + + - ***menu*** 파라미터 + + ~~~jsx {} title="v1.2 이전" + menu: true, + //또는 + menu: { show: true } + // 기타 파라미터 + ~~~ + + ~~~jsx {5-14} title="v1.2부터" + menu: true, + // 또는 + menu: { + show: true, + items: ({ card, store }) => { + if(card.id === 1){ + return false; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", label: "Edit" }, + { id: "delete-card", icon: "wxi-delete", label: "Delete" } + ]; + } + } + }, + // 기타 파라미터 + ~~~ + + - ***users*** 파라미터 + + ~~~jsx {7} title="v1.2 이전" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + path: "../assets/user.jpg" + }, + ] + }, + // 기타 파라미터 + ~~~ + + ~~~jsx {7} title="v1.2부터" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + avatar: "../assets/user.jpg" + }, + ] + }, + // 기타 파라미터 + ~~~ + + - ***start_date*** 및 ***end_date*** 파라미터 + + ~~~jsx {} title="v1.2 이전" + start_date: true, + end_date: true, + // 기타 파라미터 + ~~~ + + ~~~jsx {3,7} title="v1.2부터" + start_date: { + show: true, + format: "%d.%m.%Y" + }, + end_date: { + show: true, + format: "%d.%m.%Y" + }, + // 기타 파라미터 + ~~~ + +- Kanban의 [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성이 다음과 같이 변경되었습니다: + +~~~jsx {8} title="v1.2 이전" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + path: "preview_image_path_1.png" + }, + ] +}, +// 기타 필드 설정 +~~~ + +~~~jsx {8} title="v1.2부터" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + ] +}, +// 기타 필드 설정 +~~~ + +- Toolbar의 [`items`](api/config/toolbar_items_config.md) 속성이 다음과 같이 변경되었습니다: + +~~~jsx {} title="v1.2 이전" +items: [ + "search", + "controls" +] +~~~ + +~~~jsx {} title="v1.2부터" +items: [ + { // 또는 "search", + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ] + }, + "spacer", + { // 또는 "sort", + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", + "addRow" +] +~~~ + +#### Methods + +- Kanban의 [`setLocale()`](api/methods/js_kanban_setlocale_method.md) 및 Toolbar의 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 메서드가 변경되었습니다: + +~~~jsx {} title="v1.2 이전" +setLocale(kanban.en); // 기본 로케일로 리셋 +~~~ + +~~~jsx {} title="v1.2부터" +setLocale(null); // 기본 로케일로 리셋 +~~~ + +- Kanban의 [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) 메서드가 변경되었습니다: + +~~~jsx {} title="v1.2 이전" +api.getReactiveState(); +// 메서드는 다음 속성들을 포함한 객체를 반환합니다 +/*{ + dragItemId: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + dragItemsCoords: {...}, + selected: {...} +}*/ +~~~ + +~~~jsx {} title="v1.2부터" +api.getReactiveState(); +// 메서드는 다음 속성들을 포함한 객체를 반환합니다 +/*{ + areasMeta: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + cardShape: {...}, + cards: {...}, + cardsMap: {...}, + cardsMeta: {...}, + columnKey: {...}, + columns: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + edit: {...}, + editorShape: {...}, + fromAreaMeta: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + readonly: {...}, + rowKey: {...}, + rows: {...}, + scroll: {...}, + search: {...}, + selected: {...}, + sort: {...} +}*/ +~~~ + +- Kanban의 [`api.getState()`](api/internal/js_kanban_getstate_method.md) 메서드가 변경되었습니다: + +~~~jsx {} title="v1.2 이전" +api.getState(); +// 메서드는 다음 속성들을 포함한 객체를 반환합니다 +/*{ + dragItemId: string | number, + before: string | number, + overAreaId: string | number, + overAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + dragItemsCoords: array, + selected: array +}*/ +~~~ + +~~~jsx {} title="v1.2부터" +api.getState(); +// 메서드는 다음 속성들을 포함한 객체를 반환합니다 +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + dropAreaItemsCoords: array, + dropAreasCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + overAreaMeta: object, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object +}*/ +~~~ + +- Kanban의 [`api.getStores()`](api/internal/js_kanban_getstores_method.md) 메서드가 변경되었습니다: + +~~~jsx {} title="v1.2 이전" +api.getStores(); +// 메서드는 다음 스토어 객체를 반환합니다 +/*{ + state: StateStore, // ( object ) + data: DataStore // ( object ) +}*/ +~~~ + +~~~jsx {} title="v1.2부터" +api.getStores(); +// 메서드는 다음 속성들을 포함한 객체를 반환합니다 +/*{ + state: StateStore, // ( object ) +}*/ +~~~ + +### Localization + +
+v1.2 이전 + +~~~jsx {} +const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; +const monthsShort = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" +]; +const wx = { + Today: "Today", + Clear: "Clear", + Close: "Close" +}; +const en = { + lang: "en", + __dates: { + months, + monthsShort, + days + }, + wx, + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Untitled: "Untitled", + Rename: "Rename" + } +}; +~~~ +
+ +
+v1.2부터 + +~~~jsx {} +const en = { + kanban: { // Kanban 라벨 번역 + "Save": "Save", + "Close": "Close", + "Delete": "Delete", + "Name": "Name", + "Description": "Description", + "Type": "Type", + "Start date": "Start date", + "End date": "End date", + "Result": "Result", + "No results": "No results", + "Search": "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + "Edit": "Edit", + "Everywhere": "Everywhere", + "Label": "Label", + "Status": "Status", + "Color": "Color", + "Date": "Date", + "Untitled": "Untitled", + "Rename": "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + "Sort": "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)" + }, + calendar: { // 캘린더 번역 및 설정 + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // 코어 요소 번역 + ok: "OK", + cancel: "Cancel" + } +}; +~~~ +
+ +## 1.0 -> 1.1 + +### Api + +#### Properties + +- [`columns`](api/config/js_kanban_columns_config.md) 속성이 신규 파라미터로 확장되었습니다. v1.1부터 ***collapsed, limit***, ***strictLimit*** 설정을 사용할 수 있습니다. + +~~~jsx title="v1.1 이전" +const columns = [ + { + label: "Backlog", + id: "backlog" + }, ... +]; +~~~ + +~~~jsx {5-7,12} title="v1.1부터" +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true + }, ... +]; + +new kanban.Kanban("#root", { + columns, + // 기타 파라미터 +}); +~~~ + +- [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성의 ***color*** 파라미터가 변경되었습니다. + +~~~jsx {4-7} title="v1.1 이전" +const cardShape = { + color: { + show: true, + values: [ + { id: 1, color: "#65D3B3", label: "red" }, + { id: 2, color: "#FFC975", label: "green" } + ] + } +}; +~~~ + +~~~jsx {4,9} title="v1.1부터" +const cardShape = { + color: { + show: true, + values: ["#65D3B3", "#FFC975", "#58C3FE"] + } +}; + +new kanban.Kanban("#root", { + cardShape + // 기타 파라미터 +}); +~~~ + +#### Methods + +- [`addColumn`](api/methods/js_kanban_addcolumn_method.md) 메서드(및 [`add-column`](api/events/js_kanban_addcolumn_event.md) 이벤트)가 변경되었습니다: + +~~~jsx {} title="v1.1 이전" +addColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="v1.1부터" +addColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: false, + ... + } +}); +~~~ + +- [`addRow`](api/methods/js_kanban_addrow_method.md) 메서드(및 [`add-row`](api/events/js_kanban_addrow_event.md) 이벤트)가 변경되었습니다: + +~~~jsx {} title="v1.1 이전" +addRow(row_data_object); +~~~ + +~~~jsx {2-7} title="v1.1부터" +addRow({ + id: "feature", + row: { + label: "Feature", + collapsed: false, + ... + } +}); +~~~ + +- [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) 메서드(및 [`update-column`](api/events/js_kanban_updatecolumn_event.md) 이벤트)가 변경되었습니다: + +~~~jsx {} title="v1.1 이전" +updateColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="v1.1부터" +updateColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: true, + ... + } +}); +~~~ + +- [`updateRow`](api/methods/js_kanban_updaterow_method.md) 메서드(및 [`update-row`](api/events/js_kanban_updaterow_event.md) 이벤트)가 변경되었습니다: + +~~~jsx {} title="v1.1 이전" +updateRow(row_data_object); +~~~ + +~~~jsx {2-7} title="v1.1부터" +updateRow({ + id: "feature", + row: { + label: "Feature", + collapsed: true, + ... + } +}); +~~~ + +- [`updateCard`](api/methods/js_kanban_updatecard_method.md) 메서드(및 [`update-card`](api/events/js_kanban_updatecard_event.md) 이벤트)가 변경되었습니다: + +~~~jsx {} title="v1.1 이전" +updateCard(card_data_object); +~~~ + +~~~jsx {2-7} title="v1.1부터" +updateCard({ + id: 1, + card: { + label: "Volvo XC 70", + progress: 26 + ... + } +}); +~~~ + +- [`parse`](api/methods/js_kanban_parse_method.md) 메서드가 변경되었습니다: + +~~~jsx {3-5,8-12} title="v1.1 이전" +// 새로운 데이터를 파싱하기 전에 초기 데이터를 리셋해야 합니다 +const board = new kanban.Kanban("#root", { + columns: [], + cards: [], + rows: [] +}); + +board.parse({ + columns, + cards, + rows +}); +~~~ + +~~~jsx {} title="v1.1부터" +// 새로운 데이터를 파싱하기 전에 초기 데이터를 리셋할 필요가 없습니다 +const board = new kanban.Kanban("#root", {}); + +board.parse({ + columns, + cards, + rows +}); +~~~ \ No newline at end of file diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/news/whats_new.md b/i18n/ko/docusaurus-plugin-content-docs/current/news/whats_new.md new file mode 100644 index 0000000..4d12c6c --- /dev/null +++ b/i18n/ko/docusaurus-plugin-content-docs/current/news/whats_new.md @@ -0,0 +1,645 @@ +--- +sidebar_label: 새로운 소식 +title: 새로운 소식 +description: DHTMLX JavaScript UI 라이브러리의 문서에서 DHTMLX Kanban의 새로운 기능과 릴리즈 이력을 확인할 수 있습니다. 개발자 가이드와 API 레퍼런스를 살펴보고, 코드 예제 및 라이브 데모를 체험하며, DHTMLX Kanban의 30일 무료 평가판도 다운로드해보세요. +--- + +# 새로운 소식 + +이전 버전에서 Kanban을 업데이트하는 경우, 자세한 내용은 [Migration to newer versions](news/migration.md) 문서를 참고하세요. + +## 버전 1.7.0 + +2025년 10월 14일 출시 + +[블로그 릴리즈 리뷰](https://dhtmlx.com/blog/meet-dhtmlx-kanban-1-7/) + +### Salesforce 연동 + +v1.7부터 JavaScript Kanban을 Salesforce 환경에서 사용할 수 있습니다. 자세한 내용은 다음 가이드를 참고하세요: [**Integration with Salesforce**](guides/integration_with_salesforce.md). + +또한 [**GitHub 예제**](https://github.com/DHTMLX/salesforce-lwc-demo)를 확인하거나, [**온라인 데모**](https://dhtmlx-dev-ed.develop.lightning.force.com/)를 실행해볼 수 있습니다. (*Login*: ***user***, *Password*: ***demo***) + +### 신규 API + +- #### 이벤트 + + - [`undo`](api/events/js_kanban_undo_event.md) + - [`redo`](api/events/js_kanban_redo_event.md) + +- #### 메서드 + + - [`getColumnCards()`](api/methods/js_kanban_getcolumncards_method.md) + - [`detach()`](api/internal/js_kanban_detach_method.md) + +### 업데이트 + +- #### 메서드 + + - [`on`](api/internal/js_kanban_on_method.md) 내부 메서드에 `config.tag` 및 `config.intercept` 파라미터가 추가되었습니다. + - [`intercept`](api/internal/js_kanban_intercept_method.md) 내부 메서드에 `config.tag` 및 `config.intercept` 파라미터가 추가되었습니다. + +- #### 속성 + + - [`links`](api/config/js_kanban_links_config.md) 속성이 다음과 같이 변경되었습니다: + - `masterId` 파라미터가 `source`로 대체됨 + - `slaveId` 파라미터가 `target`으로 대체됨 + + - [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성이 업데이트되었습니다. `clearButton` 파라미터가 `clear`로 대체됨 + + - [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) 함수가 업데이트되었습니다. `store` 파라미터가 `readonly`로 대체됨 + + - [`cards[i].attached[i]`](api/config/js_kanban_cards_config.md) 속성에 `size` 파라미터가 추가됨 + +### 제거된 API + +- `editorAutoSave` 속성이 제거되었습니다. 대신 [`editor.autoSave`](api/config/js_kanban_editor_config.md) 속성을 사용하세요. + +- [`start-drag-card`](api/events/js_kanban_startdragcard_event.md)에서 `dragItemsCoords` 및 `dropAreasCoords` 파라미터가 제거되었습니다. + +### 버그 수정 + +- 대용량 파일 또는 파일 여러 개를 업로드할 때, 모든 파일이 서버에 완전히 업로드되기 전에 폼이 업데이트되어 카드 데이터가 잘못 전송되는 문제 +- 파일 크기가 새로 업로드된 파일에만 표시되는 문제 +- 에디터에서 **Done** 버튼 클릭 후 연도 및 월 값이 갱신되지 않는 문제 +- 댓글 입력 영역이 확장되면서 버튼이 클릭 영역 밖으로 이동하는 문제 +- 삭제된 카드에 연결된 카드를 열 때 스크립트 오류가 발생하는 문제 + +## 버전 1.6.5 + +2025년 7월 14일 출시 + +### 버그 수정 + +- `disabled: true` 설정이 메뉴 항목에 적용되지 않는 문제 +- 사전 정의된 행 구조가 없는 Kanban에 행을 추가할 때 행 헤더가 나타나지 않는 문제 + +## 버전 1.6.4 + +2025년 6월 12일 출시 + +### 버그 수정 + +- 삭제 후 복원된 컬럼/행에 카드를 추가하면 카드가 사라지는 문제 +- 업로더 리스트 버튼의 로케일 라벨 누락 +- 상용 버전 패키지에 readme 파일 누락 + +## 버전 1.6.3 + +2025년 4월 8일 출시 + +### 버그 수정 + +- 제한이 전체 컬럼에 잘못 적용되는 문제 +- 모달 에디터를 닫은 후 카드를 이동하면 오류 발생 +- 삭제 확인 창이 모달 에디터 아래에 표시되는 문제 +- 툴바 "더보기" 아이콘이 창 크기 조절 시 나타났다가 사라지는 문제 +- `delete-card` 이벤트가 항상 에디터를 닫는 문제 +- 제공된 옵션 외의 ID로 우선순위가 설정된 경우 에디터를 열 수 없는 문제 + +## 버전 1.6.2 + +2025년 2월 14일 출시 + +### 버그 수정 + +- 트라이얼 패키지의 만료일이 잘못된 문제 +- 터치 디바이스에서 드래그 앤 드롭 시 경고 발생 +- 읽기 전용 `add: false` 설정이 컬럼 메뉴에서 **Add** 옵션을 제거하지 않는 문제 +- 카드 ID가 문자열 숫자인 경우 에디터가 렌더링되지 않는 문제 +- 패키지 내 샘플 링크가 오래된 문제 +- 컬럼 스크롤과 lazy 렌더링 사용 시 드래그 앤 드롭 문제 +- [`setConfig()`](api/methods/js_kanban_setconfig_method.md) 메서드가 컬럼 헤더의 고정 상태를 업데이트하지 못하는 문제 + +## 버전 1.6.1 + +2024년 11월 29일 출시 + +### 버그 수정 + +- 좁은 화면에서 툴바의 "더보기" 아이콘 정렬이 잘못됨 +- `RestDataProvider`가 `setHeaders()`로 정의한 헤더를 무시하는 문제 +- `RestDataProvider.getIDResolver`가 함수가 아니라는 오류 + +## 버전 1.6 + +2024년 11월 13일 출시 + +[블로그 릴리즈 리뷰](https://dhtmlx.com/blog/dhtmlx-kanban-1-6/) + +### 새로운 기능 + +- [`cardShape.users.maxCount`](api/config/js_kanban_cardshape_config.md) 속성을 통해 카드에 표시되는 할당 사용자 수를 변경할 수 있음 ([**예제**](https://snippet.dhtmlx.com/w205dvzg?tag=kanban) 참고) +- [`columnShape`](api/config/js_kanban_columnshape_config.md) 속성을 통해 컬럼 헤더의 내용을 변경할 수 있음 ([**예제**](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban) 참고) +- 툴바 **search** 컨트롤의 [`items.searchResult`](api/config/toolbar_items_config.md) 속성을 통해 검색 결과의 보기 및 내용을 변경할 수 있음 ([**예제**](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban) 참고) +- [`editor.placement`](api/config/js_kanban_editor_config.md) 속성을 통해 에디터를 모달 창으로 표시할 수 있음 ([**예제**](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban) 참고) +- [`cardShape.votes.clickable`](api/config/js_kanban_cardshape_config.md) 속성을 통해 카드에 투표 기능을 활성화할 수 있음 ([**예제**](https://snippet.dhtmlx.com/en76xvi4?tag=kanban) 참고) + +### 업데이트 + +- #### 속성 + + - [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성에 ***users.maxCount*** 및 ***votes.clickable*** 파라미터가 추가됨 + - [`columnShape`](api/config/js_kanban_columnshape_config.md) 속성에 ***headerTemplate*** 및 ***collapsedTemplate*** 파라미터가 추가됨 + - [`editor`](api/config/js_kanban_editor_config.md) 속성에 ***placement*** 파라미터가 추가됨 + - 툴바 **search** 컨트롤의 [`items`](api/config/toolbar_items_config.md) 속성에 ***searchResult*** 파라미터가 추가됨 + +- #### 이벤트 + + - [`set-edit`](api/events/js_kanban_setedit_event.md) 이벤트에 ***eventSource*** 파라미터가 추가됨 ([**예제**](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban) 참고) + +- #### 메서드 + + - [`setConfig()`](api/methods/js_kanban_setconfig_method.md) 메서드의 동작이 다음과 같이 변경됨: + - 이 메서드는 히스토리를 변경하지 않음 (히스토리 자체를 변경할 수 없음) + - Kanban 데이터 저장소를 파괴하지 않음. 이벤트 리스너 재생성 및 툴바 재연결이 불필요함 + + - [`setLocale()`](api/methods/js_kanban_setlocale_method.md) 메서드는 Kanban 데이터 저장소를 파괴하지 않음. 이벤트 리스너 재생성 및 툴바 재연결이 불필요함 + - 툴바 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 메서드의 `api` 파라미터가 deprecated됨 + +### 버그 수정 + +- 편집 중인 댓글이 삭제되면 새 댓글 입력 영역이 사라지는 문제 +- 누락된 로케일 문자열 추가 +- [`scrollType: "column"`](api/config/js_kanban_scrolltype_config.md)과 [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) 설정을 동시에 사용할 때 드래그 앤 드롭이 작동하지 않는 문제 +- 에디터를 닫기 아이콘으로 닫을 수 없는 문제 +- Willow 스킨에서 에디터 오른쪽 부분의 배경색이 진행률 바 배경색과 동일한 문제 + +## 버전 1.5.13 + +2024년 9월 12일 출시 + +### 버그 수정 + +- 확장자가 대문자인 경우 "Make cover" 버튼이 나타나지 않는 문제 +- 비활성화된 Multiselect 컨트롤 클릭 시 오류 발생 +- [`addCard()`](api/methods/js_kanban_addcard_method.md) 호출 후 [컬럼 스크롤](api/config/js_kanban_scrolltype_config.md) 및 [lazy 렌더링](api/config/js_kanban_rendertype_config.md)에서 스크롤 시 오류 발생 +- 댓글이 저장되지 않고 ""로 남는 문제 ([]로 저장되어야 함) +- 에디터 스타일이 전역 스타일의 동일 이름 클래스 선택자에 의해 덮어써지는 문제. [migration 섹션 참고](news/migration.md/#1512---1513) + +## 버전 1.5.12 + +2024년 5월 2일 출시 + +### 버그 수정 + +- Intercept 회귀: `false`를 반환해도 내부 이벤트가 차단되지 않는 문제 +- 비활성화된 파일이 파일을 허용하는 문제 + +## 버전 1.5.11 + +2024년 3월 25일 출시 + +### 버그 수정 + +- *Dark willow* 스킨의 Kanban CSS 변수들이 툴바 및 포털에서 사라지는 문제 +- autosave 비활성화 시 댓글 및 투표 변경이 폼 값에 반영되지 않는 문제 +- 커스텀 컬럼 서브메뉴의 **onClick** 함수 인자에 `null` 전달 +- 에디터에서 Datepickers를 편집 모드로 설정할 수 없는 문제 +- Kanban 예제에서 콘솔 경고 발생 + +## 버전 1.5.10 + +2024년 2월 29일 출시 + +### 버그 수정 + +- npm 서버에서 빌드가 깨지는 문제 +- [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) 이벤트와 [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md) 메서드에 `select` 파라미터 추가 +- Kanban 에디터에서 댓글 필드 스타일이 올바르지 않음 + +## 버전 1.5.9 + +2024년 2월 20일 출시 + +### 버그 수정 + +- Kanban이 다른 위젯 스타일에 영향을 주는 문제 +- `disabled: true`가 지정된 커스텀 컬럼 서브메뉴 항목이 여전히 활성화되는 문제 +- **Uploader** 컨트롤에 커스텀 업로드 함수를 설정할 수 없는 문제 + +## 버전 1.5.8 + +2023년 11월 28일 출시 + +### 버그 수정 + +- **IKanbanConfig** 타입의 **currentUser** TS 정의 누락 + +## 버전 1.5.7 + +2023년 11월 14일 출시 + +### 업데이트 + +- 툴바의 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 메서드에 ***api*** 파라미터 추가 + +### 버그 수정 + +- 카드 메뉴 항목에 `disabled: true` 설정이 적용되지 않는 문제 +- Kanban 예제에서 원하지 않는 콘솔 경고 발생 +- 태스크 우선순위를 재설정할 수 없음 +- Kanban 에디터의 드롭다운 컨트롤이 외부 클릭 시 닫히지 않음 + +## 버전 1.5.6 + +2023년 9월 13일 출시 + +### 업데이트 + +- ES 모듈로 컴포넌트 import 가능 + +### 버그 수정 + +- npm 패키지에서 회귀 현상 + +## 버전 1.5.4 + +2023년 8월 9일 출시 + +### 버그 수정 + +- 다른 카드로 전환 시 이전에 업로드된 파일이 폼에 남아있는 문제 +- 드래그 앤 드롭으로 파일 업로드가 작동하지 않는 문제 +- 폼이 열린 상태에서 Delete 키를 누르면 카드가 예기치 않게 삭제되는 문제 +- 검색을 통해 카드를 선택한 후 "Search in" 드롭다운 입력이 비어있는 문제 +- add-link 작업을 되돌릴 때 백엔드에서 추가된 링크가 삭제되지 않는 문제 + +## 버전 1.5.1 + +### 버그 수정 + +- 올바른 TypeScript 정의 생성 + +## 버전 1.5 + +2023년 6월 15일 출시 + +[블로그 릴리즈 리뷰](https://dhtmlx.com/blog/dhtmlx-kanban-1-5/) + +### 새로운 기능 + +- 런타임에 카드 간 링크 설정 및 삭제 기능 +- 서버 측에서 카드 간 링크 관리 기능 +- 컬럼 헤더 고정 기능 ([**예제**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) 참고) + +### 신규 API + +- #### 메서드 + + - [`addLink()`](api/methods/js_kanban_addlink_method.md) + - [`deleteLink()`](api/methods/js_kanban_deletelink_method.md) + - [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) + +- #### 라우트 + + - [`DELETE /links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) + - [`GET /links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md) + - [`POST /links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md) + +### 업데이트 + +- #### 속성 + + - [`columnShape`](api/config/js_kanban_columnshape_config.md) 속성에 ***fixedHeaders*** 파라미터 추가 + +### 버그 수정 + +- 런타임에서 링크를 파싱, 내보내기, 직렬화하지 못하는 문제 +- 사용자 섹션이 활성화되지 않은 경우 댓글 섹션 생성 실패 +- store의 링크가 원본 데이터를 변형시키고 제대로 저장되지 않는 문제 +- lazy 렌더링 시 접힌 컬럼의 hover 영역 스타일이 깨지는 문제 +- 새로 생성된 컬럼으로 이동한 카드가 사라지는 문제 +- 새 댓글 입력 textarea가 닫히지 않는 문제 + +## 버전 1.4.2 + +2023년 4월 13일 출시 + +### 버그 수정 + +- 추가 작업 후 로컬 카드/컬럼/행 데이터에 백엔드 ID가 저장되지 않는 문제 +- 누락된 TS 정의 추가 +- 다크 스킨의 스타일이 누수되는 문제 + +## 버전 1.4.1 + +2023년 3월 29일 출시 + +### 버그 수정 + +- 정렬 유지 동작이 올바르지 않은 문제 +- **cardShape**, **columnShape** 또는 **rowShape** 속성으로 컨텍스트 메뉴를 비활성화할 때 동작이 올바르지 않은 문제 +- 에디터에서 링크를 추가하지만 데이터에 링크를 제공하지 않으면 동작이 올바르지 않은 문제 +- 컬럼의 메뉴가 카드와 동일하거나 표시되지 않을 수 있음 +- 하나가 아닌 두 개의 태스크가 드래그되는 문제 + +## 버전 1.4 + +2023년 3월 21일 출시 + +[블로그 릴리즈 리뷰](https://dhtmlx.com/blog/dhtmlx-kanban-1-4/) + +### 새로운 기능 + +- 댓글 추가 기능 ([**예제**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) 참고) +- 사용자 제한 기능 ([**예제**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban) 참고) +- 카드 간 링크 설정 기능 ([**예제**](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban) 참고) +- 카드에 투표 기능 ([**예제**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) 참고) + +### 신규 API + +- #### 이벤트 + + - [`add-comment`](api/events/js_kanban_addcomment_event.md) + - [`add-link`](api/events/js_kanban_addlink_event.md) + - [`delete-comment`](api/events/js_kanban_deletecomment_event.md) + - [`delete-link`](api/events/js_kanban_deletelink_event.md) + - [`drag-card`](api/events/js_kanban_dragcard_event.md) + - [`end-drag-card`](api/events/js_kanban_enddragcard_event.md) + - [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) + - [`update-comment`](api/events/js_kanban_updatecomment_event.md) + +- #### 메서드 + + - [`addComment()`](api/methods/js_kanban_addcomment_method.md) + - [`deleteComment()`](api/methods/js_kanban_deletecomment_method.md) + - [`updateComment()`](api/methods/js_kanban_updatecomment_method.md) + +- #### 속성 + + - [`currentUser`](api/config/js_kanban_currentuser_config.md) + - [`links`](api/config/js_kanban_links_config.md) + +### 업데이트 + +- #### 메서드 + + - [`api.getState()`](api/internal/js_kanban_getstate_method.md) 메서드가 업데이트됨 + +- #### 속성 + + - [`cards`](api/config/js_kanban_cards_config.md) 속성에 ***css***, ***comments***, ***votes*** 파라미터가 추가됨 + - [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성에 ***comments***, ***votes*** ([**예제**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)), ***css*** ([**예제**](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban)) 파라미터가 추가됨 + - [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) 속성에 컨텍스트 메뉴 표시 기능 추가 + - [`columns`](api/config/js_kanban_columns_config.md) 속성에 ***css*** ([**예제**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)), ***overlay*** ([**예제**](https://snippet.dhtmlx.com/nfv59yif?tag=kanban)) 파라미터가 추가됨 + - [`columnShape`](api/config/js_kanban_columnshape_config.md) 속성에 ***css*** 파라미터 추가 ([**예제**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)) + - [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성에 [***comments***](guides/configuration.md#comments-type), [***links***](guides/configuration.md#links-type) 타입 및 *date/dateRange* 타입의 ***format*** 파라미터 추가 + - [`rows`](api/config/js_kanban_rows_config.md) 속성에 ***css*** 파라미터 추가 ([**예제**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + - [`rowShape`](api/config/js_kanban_rowshape_config.md) 속성에 ***css*** 파라미터 추가 ([**예제**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + +### Deprecated API + +- #### 속성 + + - `cardShape.menu.items`, `columnShape.menu.items`, `rowShape.menu.items`의 메뉴 항목 객체 내 label + +### 버그 수정 + +- Kanban이 마진이 있는 컨테이너 내부에 있을 때 메뉴 위치가 잘못됨 +- 커스텀 컬럼 폭 사용 시 접힌 컬럼의 위치가 잘못됨 +- 접힌 컬럼에 카드를 드롭하면 카드가 사라지는 문제 +- 커스텀 컬럼 폭 사용 시 접힌 컬럼의 위치가 잘못됨 +- 스윔레인에서 카드의 컨텍스트 메뉴가 편집 패널에 가려져 카드 삭제가 불가능한 문제 + +## 버전 1.3 + +2022년 9월 29일 출시 + +[블로그 릴리즈 리뷰](https://dhtmlx.com/blog/dhtmlx-kanban-1-3/) + +### 새로운 기능 + +- API, 컨텍스트 메뉴(3점 아이콘), `Ctrl (Command)` + `D` 단축키로 카드 복제 (여러 카드 복제 가능) +- Kanban 데이터를 JSON 파일로 내보내기 +- Kanban 히스토리 관리: + - 툴바의 *Undo*, *Redo* 컨트롤 + - 단축키: + - `Ctrl (Command)`+`Z` - 실행 취소 + - `Ctrl (Command)`+`Y` 또는 `Ctrl (Command)`+`Shift`+`Z` - 다시 실행 + - API를 통한 관리 + +### 신규 API + +- **이벤트:** + [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) + +- **메서드:** + [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md), + [`export.json()`](api/internal/js_kanban_json_method.md), + [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md), + [`redo()`](api/methods/js_kanban_redo_method.md), + [`undo()`](api/methods/js_kanban_undo_method.md) + +- **속성:** + [`editor`](api/config/js_kanban_editor_config.md), + [`history`](api/config/js_kanban_history_config.md) + +- **공통 설정:** + [`$meta`](api/common/js_kanban_meta_parameter.md) + +### Deprecated API + +- **속성:** + [`editorAutoSave`](api/config/js_kanban_editorautosave_config.md) + +### 업데이트 + +- #### 이벤트 + + - Kanban의 [`update-card`](api/events/js_kanban_updatecard_event.md) 이벤트 업데이트 + - Kanban의 [`update-column`](api/events/js_kanban_updatecolumn_event.md) 이벤트 업데이트 + - Kanban의 [`update-row`](api/events/js_kanban_updaterow_event.md) 이벤트 업데이트 + +- #### 메서드 + + - Kanban의 [`updateCard()`](api/methods/js_kanban_updatecard_method.md) 메서드 업데이트 + - Kanban의 [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) 메서드 업데이트 + - Kanban의 [`updateRow()`](api/methods/js_kanban_updaterow_method.md) 메서드 업데이트 + +- #### 속성 + + - 툴바의 [`items`](api/config/toolbar_items_config.md) 속성에 ***"undo"***, ***"redo"*** 파라미터(컨트롤) 추가 + - [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성에 ***dateRange*** 타입 추가 + +## 버전 1.2.2 + +2022년 8월 30일 출시 + +### 버그 수정 + +- 메뉴 및 툴바에 일부 아이콘이 중복 표시되는 문제 + +## 버전 1.2.1 + +2022년 7월 28일 출시 + +### 버그 수정 + +- `cardHeight` 속성이 `scrollType:"column"` 설정과 함께 작동하지 않는 문제 +- 업로더가 카드 에디터에서 업로드된 파일을 표시하지 않는 문제 +- 카드 에디터에서 "combo" 및 "progress" 필드의 로케일 적용이 안 되는 문제 + +## 버전 1.2 + +2022년 6월 29일 출시 + +[블로그 릴리즈 리뷰](https://dhtmlx.com/blog/dhtmlx-kanban-1-2/) + +### 새로운 기능 + +- 컬럼 메뉴를 통한 새 카드 추가 ([**예제**](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban) 참고) +- lazy 렌더링 ([**예제**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) 참고) +- 컬럼별 스크롤 ([**예제**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) 참고) +- Kanban을 새로 생성된 카드, 컬럼, 행으로 스크롤(API 및 UI) ([**예제**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) 참고) +- 카드 정렬 (API 및 UI) ([**예제**](https://snippet.dhtmlx.com/74nyuv14?tag=kanban) 참고) + +### 신규 API + +- **이벤트:** + [`scroll`](api/events/js_kanban_scroll_event.md), + [`set-edit`](api/events/js_kanban_setedit_event.md), + [`set-sort`](api/events/js_kanban_setsort_event.md) + +- **메서드:** + [`scroll()`](api/methods/js_kanban_scroll_method.md), + [`setEdit()`](api/methods/js_kanban_setedit_method.md), + [`setSort()`](api/methods/js_kanban_setsort_method.md) + +- **속성:** + [`cardHeight`](api/config/js_kanban_cardheight_config.md), + [`columnShape`](api/config/js_kanban_columnshape_config.md), + [`rowShape`](api/config/js_kanban_rowshape_config.md), + [`renderType`](api/config/js_kanban_rendertype_config.md), + [`scrollType`](api/config/js_kanban_scrolltype_config.md) + +### 업데이트 + +- #### 메서드 + + - [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) 메서드 업데이트 + - [`api.getState()`](api/internal/js_kanban_getstate_method.md) 메서드 업데이트 + - [`api.getStores()`](api/internal/js_kanban_getstores_method.md) 메서드 업데이트 + - Kanban의 [`setLocale()`](api/methods/js_kanban_setlocale_method.md) 메서드 업데이트 + - 툴바의 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 메서드 업데이트 + +- #### 속성 + + - 툴바의 [`items`](api/config/toolbar_items_config.md) 속성 업데이트 + - [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성의 ***start_date***, ***end_date***, ***menu***, ***users*** 파라미터(필드) 업데이트 + - [`editorShape`](api/config/js_kanban_editorshape_config.md) 속성의 ***multiselect*** 타입 업데이트 + +#### 공통 + +- CSS 클래스 접두사 (*[Stylization](guides/stylization.md) 섹션 참고*) +- 로케일 구조 (*[Localization](guides/localization.md) 섹션 참고*) + +### 버그 수정 + +- `rowKey` 설정을 통한 카드의 스윔레인 바인딩이 올바르지 않음 +- 카드 메뉴 클릭 시 에디터가 열림 +- 여러 카드 드래그 동작이 올바르지 않음 +- `select: false` (**readonly** config.md)에서 카드 편집 동작이 올바르지 않음 +- [`addCard()`](api/methods/js_kanban_addcard_method.md) 메서드로 추가된 카드 선택 동작이 올바르지 않음 +- `label: false`, `menu: false`가 `cardShape` 속성에서 올바르게 동작하지 않음 + +## 버전 1.1.1 + +2022년 2월 28일 출시 + +[블로그 릴리즈 리뷰](https://dhtmlx.com/blog/maintenance-release-kanban-1-1-1/) + +### 버그 수정 + +- cardShape 설정에 정의되지 않은 커스텀 에디터 필드가 작동하지 않는 문제 +- 검색 바 드롭다운 메뉴에서 원하는 카드 선택 + +## 버전 1.1 + +2022년 2월 15일 출시 + +[블로그 릴리즈 리뷰](https://dhtmlx.com/blog/dhtmlx-kanban-1-1-wip-validation-new-operations-columns-rows-typescript-support/) + +### 새로운 기능 + +- 컬럼 라벨 왼쪽의 화살표로 컬럼 *접기/펼치기* 기능 +- 컬럼 및 스윔레인의 카드 수 *제한* 기능 +- 컨텍스트 메뉴(3점 아이콘)로 컬럼 이동 기능 +- 컨텍스트 메뉴(3점 아이콘)로 행 이동 기능 +- **Shift** + **클릭**으로 동일 컬럼의 여러 카드 선택 +- Kanban의 [TypeScript 정의](guides/typescript_support.md) 지원 + +### 신규 API + +- 컬럼/행 이동용 새 **이벤트**: + [`move-column`](api/events/js_kanban_movecolumn_event.md), + [`move-row`](api/events/js_kanban_moverow_event.md) +- 컬럼/행 이동용 새 **메서드**: + [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md), + [`moveRow()`](api/methods/js_kanban_moverow_method.md) + +### 업데이트 + +#### 속성 + +- [`cards`](api/config/js_kanban_cards_config.md) 속성이 선택 사항이 됨 + +- [`columns`](api/config/js_kanban_columns_config.md) 속성이 선택 사항이 되고, 다음 파라미터가 추가됨: + - ***collapsed*** + - ***limit*** + - ***strictLimit*** + +- [`cardShape`](api/config/js_kanban_cardshape_config.md) 속성의 ***color*** 파라미터 업데이트 + +#### 메서드 + +- [`addColumn`](api/methods/js_kanban_addcolumn_method.md) 메서드 업데이트 +- [`addRow`](api/methods/js_kanban_addrow_method.md) 메서드 업데이트 +- [`updateCard`](api/methods/js_kanban_updatecard_method.md) 메서드 업데이트 +- [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) 메서드 업데이트 +- [`updateRow`](api/methods/js_kanban_updaterow_method.md) 메서드 업데이트 +- [`parse`](api/methods/js_kanban_parse_method.md) 메서드 업데이트 + +#### 이벤트 + +- [`add-column`](api/events/js_kanban_addcolumn_event.md) 이벤트 업데이트 +- [`add-row`](api/events/js_kanban_addrow_event.md) 이벤트 업데이트 +- [`update-card`](api/events/js_kanban_updatecard_event.md) 이벤트 업데이트 +- [`update-column`](api/events/js_kanban_updatecolumn_event.md) 이벤트 업데이트 +- [`update-row`](api/events/js_kanban_updaterow_event.md) 이벤트 업데이트 + +## 버전 1.0 + +2021년 11월 23일 출시 + +[블로그 릴리즈 리뷰](https://dhtmlx.com/blog/releasing-dhtmlx-kanban-board-v-1-0/) + +### 초기 기능 + +- **카드** 관련 기능: + - 새 카드 추가 + - 카드 선택(다중 선택) + - 카드 삭제 + - 카드 검색 + - 원하는 컬럼(및 행)으로 카드 드래그로 순서 변경 + - 에디터를 통한 카드 데이터 관리: + - 라벨 + - 설명 + - 진행률 + - 시작일 + - 종료일 + - 색상 + - 우선순위 + - 첨부파일(*files*, *pictures*) + - *커스텀 필드* + +- **컬럼** 및 **행** 관련 기능: + - 새 컬럼 및 행 추가 + - 컬럼 및 행 삭제 + - 컬럼 및 행 이름 변경 + - 행 접기/펼치기 + +- [로컬라이제이션](guides/localization.md) +- [백엔드 연동](guides/working_with_server.md) (Go 및 Node) +- 크로스 브라우저 호환성 +- 터치 지원 \ No newline at end of file diff --git a/i18n/ko/docusaurus-theme-classic/footer.json b/i18n/ko/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..a1caed5 --- /dev/null +++ b/i18n/ko/docusaurus-theme-classic/footer.json @@ -0,0 +1,62 @@ +{ + "link.title.Development center": { + "message": "개발 센터", + "description": "푸터에 있는 'Development center' 제목의 링크 열 제목" + }, + "link.title.Community": { + "message": "커뮤니티", + "description": "푸터에 있는 'Community' 제목의 링크 열 제목" + }, + "link.title.Company": { + "message": "회사", + "description": "푸터에 있는 'Company' 제목의 링크 열 제목" + }, + "link.item.label.Download JS Kanban": { + "message": "JS 칸반 다운로드", + "description": "https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml 로 연결되는 'Download JS Kanban' 라벨의 푸터 링크" + }, + "link.item.label.Examples": { + "message": "예제", + "description": "https://snippet.dhtmlx.com/5hcx01h4?tag=kanban 로 연결되는 'Examples' 라벨의 푸터 링크" + }, + "link.item.label.Blog": { + "message": "블로그", + "description": "https://dhtmlx.com/blog/tag/kanban/ 로 연결되는 'Blog' 라벨의 푸터 링크" + }, + "link.item.label.Forum": { + "message": "포럼", + "description": "https://forum.dhtmlx.com/c/kanban/ 로 연결되는 'Forum' 라벨의 푸터 링크" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "https://github.com/DHTMLX 로 연결되는 'GitHub' 라벨의 푸터 링크" + }, + "link.item.label.Youtube": { + "message": "유튜브", + "description": "https://www.youtube.com/user/dhtmlx 로 연결되는 'Youtube' 라벨의 푸터 링크" + }, + "link.item.label.Facebook": { + "message": "페이스북", + "description": "https://www.facebook.com/dhtmlx 로 연결되는 'Facebook' 라벨의 푸터 링크" + }, + "link.item.label.Twitter": { + "message": "트위터", + "description": "https://twitter.com/dhtmlx 로 연결되는 'Twitter' 라벨의 푸터 링크" + }, + "link.item.label.Linkedin": { + "message": "링크드인", + "description": "https://www.linkedin.com/groups/3345009/ 로 연결되는 'Linkedin' 라벨의 푸터 링크" + }, + "link.item.label.About us": { + "message": "회사 소개", + "description": "https://dhtmlx.com/docs/company.shtml 로 연결되는 'About us' 라벨의 푸터 링크" + }, + "link.item.label.Contact us": { + "message": "문의하기", + "description": "https://dhtmlx.com/docs/contact.shtml 로 연결되는 'Contact us' 라벨의 푸터 링크" + }, + "link.item.label.Licensing": { + "message": "라이선스", + "description": "https://dhtmlx.com/docs/products/dhtmlxKanban/#licensing 로 연결되는 'Licensing' 라벨의 푸터 링크" + } +} \ No newline at end of file diff --git a/i18n/ko/docusaurus-theme-classic/navbar.json b/i18n/ko/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..3882cd5 --- /dev/null +++ b/i18n/ko/docusaurus-theme-classic/navbar.json @@ -0,0 +1,26 @@ +{ + "title": { + "message": "자바스크립트 칸반 문서", + "description": "네비게이션 바의 제목" + }, + "logo.alt": { + "message": "DHTMLX 자바스크립트 칸반 로고", + "description": "네비게이션 바 로고의 대체 텍스트" + }, + "item.label.Examples": { + "message": "예제", + "description": "예제 라벨이 있는 네비게이션 바 항목" + }, + "item.label.Forum": { + "message": "포럼", + "description": "포럼 라벨이 있는 네비게이션 바 항목" + }, + "item.label.Support": { + "message": "지원", + "description": "지원 라벨이 있는 네비게이션 바 항목" + }, + "item.label.Download": { + "message": "다운로드", + "description": "다운로드 라벨이 있는 네비게이션 바 항목" + } +} \ No newline at end of file diff --git a/i18n/ru/code.json b/i18n/ru/code.json new file mode 100644 index 0000000..983efcc --- /dev/null +++ b/i18n/ru/code.json @@ -0,0 +1,444 @@ +{ + "theme.ErrorPageContent.title": { + "message": "Эта страница упала.", + "description": "Заголовок резервной страницы при падении страницы" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Прокрутить обратно наверх", + "description": "ARIA метка для кнопки возврата наверх" + }, + "theme.blog.archive.title": { + "message": "Архив", + "description": "Заголовок страницы и героя архивной страницы блога" + }, + "theme.blog.archive.description": { + "message": "Архив", + "description": "Описание страницы и героя архивной страницы блога" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Навигация по списку страниц блога", + "description": "ARIA метка для пагинации блога" + }, + "theme.blog.paginator.newerEntries": { + "message": "Новые записи", + "description": "Метка для навигации к странице с более новыми записями блога (предыдущая страница)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Старые записи", + "description": "Метка для навигации к странице с более старыми записями блога (следующая страница)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Навигация по страницам записей блога", + "description": "ARIA метка для пагинации записей блога" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Новая запись", + "description": "Метка кнопки записи блога для навигации к новой/предыдущей записи" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Старая запись", + "description": "Метка кнопки записи блога для навигации к старой/следующей записи" + }, + "theme.tags.tagsPageLink": { + "message": "Посмотреть все теги", + "description": "Метка ссылки, направляющей на страницу списка тегов" + }, + "theme.colorToggle.ariaLabel": { + "message": "Переключить между темным и светлым режимом (сейчас {mode})", + "description": "ARIA метка для переключателя цветового режима в навигационной панели" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "темный режим", + "description": "Название темного цветового режима" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "светлый режим", + "description": "Название светлого цветового режима" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Хлебные крошки", + "description": "ARIA метка для хлебных крошек" + }, + "theme.docs.DocCard.categoryDescription.plurals": { + "message": "1 элемент|{count} элемента|{count} элементов", + "description": "Описание по умолчанию для карточки категории в сгенерированном индексе о количестве элементов в этой категории" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Страницы документации", + "description": "ARIA метка для пагинации документации" + }, + "theme.docs.paginator.previous": { + "message": "Предыдущая", + "description": "Метка для навигации к предыдущему документу" + }, + "theme.docs.paginator.next": { + "message": "Следующая", + "description": "Метка для навигации к следующему документу" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "Один документ отмечен|{count} документа отмечены|{count} документов отмечены", + "description": "Множественная метка для \"{count} docs tagged\". Используйте столько множественных форм (разделенных \"|\"), сколько поддерживает ваш язык" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} с \"{tagName}\"", + "description": "Заголовок страницы для тега документации" + }, + "theme.docs.versionBadge.label": { + "message": "Версия: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "Это неопубликованная документация для {siteTitle} версии {versionLabel}.", + "description": "Метка, сообщающая пользователю, что он просматривает неопубликованную версию документации" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "Это документация для {siteTitle} {versionLabel}, которая больше не поддерживается активно.", + "description": "Метка, сообщающая пользователю, что он просматривает неподдерживаемую версию документации" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "Для актуальной документации смотрите {latestVersionLink} ({versionLabel}).", + "description": "Метка, предлагающая пользователю проверить последнюю версию" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "последняя версия", + "description": "Метка ссылки на предложение последней версии" + }, + "theme.common.editThisPage": { + "message": "Редактировать эту страницу", + "description": "Метка ссылки для редактирования текущей страницы" + }, + "theme.common.headingLinkTitle": { + "message": "Прямая ссылка на {heading}", + "description": "Заголовок для ссылки на заголовок" + }, + "theme.lastUpdated.atDate": { + "message": " {date}", + "description": "Слова, описывающие дату последнего обновления страницы" + }, + "theme.lastUpdated.byUser": { + "message": " пользователем {user}", + "description": "Слова, описывающие, кем была обновлена страница в последний раз" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Последнее обновление{atDate}{byUser}", + "description": "Предложение для отображения времени последнего обновления страницы и кем" + }, + "theme.NotFound.title": { + "message": "Страница не найдена", + "description": "Заголовок страницы 404" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Версии", + "description": "Метка для выпадающего списка версий в мобильном виде навигационной панели" + }, + "theme.tags.tagsListLabel": { + "message": "Теги:", + "description": "Метка рядом со списком тегов" + }, + "theme.admonition.caution": { + "message": "осторожно", + "description": "Метка по умолчанию для предупреждения Caution (:::caution)" + }, + "theme.admonition.danger": { + "message": "опасность", + "description": "Метка по умолчанию для предупреждения Danger (:::danger)" + }, + "theme.admonition.info": { + "message": "информация", + "description": "Метка по умолчанию для предупреждения Info (:::info)" + }, + "theme.admonition.note": { + "message": "заметка", + "description": "Метка по умолчанию для предупреждения Note (:::note)" + }, + "theme.admonition.tip": { + "message": "совет", + "description": "Метка по умолчанию для предупреждения Tip (:::tip)" + }, + "theme.admonition.warning": { + "message": "предупреждение", + "description": "Метка по умолчанию для предупреждения Warning (:::warning)" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Закрыть", + "description": "ARIA метка для кнопки закрытия панели объявлений" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Навигация по последним записям блога", + "description": "ARIA метка для последних записей в боковой панели блога" + }, + "theme.CodeBlock.copied": { + "message": "Скопировано", + "description": "Метка кнопки копирования в блоках кода" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Скопировать код в буфер обмена", + "description": "ARIA метка для кнопки копирования блоков кода" + }, + "theme.CodeBlock.copy": { + "message": "Копировать", + "description": "Метка кнопки копирования в блоках кода" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Переключить перенос слов", + "description": "Атрибут title для кнопки переключения переноса слов в строках блока кода" + }, + "theme.DocSidebarItem.expandCategoryAriaLabel": { + "message": "Развернуть категорию боковой панели '{label}'", + "description": "ARIA метка для разворачивания категории боковой панели" + }, + "theme.DocSidebarItem.collapseCategoryAriaLabel": { + "message": "Свернуть категорию боковой панели '{label}'", + "description": "ARIA метка для сворачивания категории боковой панели" + }, + "theme.NavBar.navAriaLabel": { + "message": "Главная", + "description": "ARIA метка для основной навигации" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Языки", + "description": "Метка для выпадающего списка переключения языка в мобильном виде" + }, + "theme.NotFound.p1": { + "message": "Мы не смогли найти то, что вы искали.", + "description": "Первый абзац страницы 404" + }, + "theme.NotFound.p2": { + "message": "Пожалуйста, свяжитесь с владельцем сайта, который направил вас на исходный URL, и сообщите им, что их ссылка не работает.", + "description": "Второй абзац страницы 404" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "На этой странице", + "description": "Метка кнопки сворачиваемого компонента оглавления" + }, + "theme.blog.post.readMore": { + "message": "Читать далее", + "description": "Метка, используемая в отрывках записей блога для ссылки на полные записи блога" + }, + "theme.blog.post.readMoreLabel": { + "message": "Читать далее о {title}", + "description": "ARIA метка для ссылки на полные записи блога из отрывков" + }, + "theme.blog.post.readingTime.plurals": { + "message": "Одна минута чтения|{readingTime} минуты чтения|{readingTime} минут чтения", + "description": "Множественная метка для \"{readingTime} min read\". Используйте столько множественных форм (разделенных \"|\"), сколько поддерживает ваш язык" + }, + "theme.docs.breadcrumbs.home": { + "message": "Главная страница", + "description": "ARIA метка для главной страницы в хлебных крошках" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Свернуть боковую панель", + "description": "Атрибут title для кнопки сворачивания боковой панели документации" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Свернуть боковую панель", + "description": "Атрибут title для кнопки сворачивания боковой панели документации" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Боковая панель документации", + "description": "ARIA метка для навигации боковой панели" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Закрыть панель навигации", + "description": "ARIA метка для кнопки закрытия мобильной боковой панели" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Переключить панель навигации", + "description": "ARIA метка для кнопки гамбургер-меню мобильной навигации" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Вернуться в главное меню", + "description": "Метка кнопки возврата в главное меню внутри вторичного меню мобильной боковой панели навигации" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Развернуть боковую панель", + "description": "ARIA метка и атрибут title для кнопки разворачивания боковой панели документации" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Развернуть боковую панель", + "description": "ARIA метка и атрибут title для кнопки разворачивания боковой панели документации" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "Найден один документ|Найдено {count} документа|Найдено {count} документов", + "description": "Множественная метка для \"{count} documents found\". Используйте столько множественных форм (разделенных \"|\"), сколько поддерживает ваш язык" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Результаты поиска для \"{query}\"", + "description": "Заголовок страницы поиска для непустого запроса" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Поиск в документации", + "description": "Заголовок страницы поиска для пустого запроса" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Введите ваш поисковый запрос здесь", + "description": "Заполнитель для поля ввода страницы поиска" + }, + "theme.SearchPage.inputLabel": { + "message": "Поиск", + "description": "ARIA метка для поля ввода страницы поиска" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Поиск от Algolia", + "description": "ARIA метка для упоминания Algolia" + }, + "theme.SearchPage.noResultsText": { + "message": "Результаты не найдены", + "description": "Абзац для пустого результата поиска" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Получение новых результатов...", + "description": "Абзац для получения новых результатов поиска" + }, + "theme.SearchBar.seeAll": { + "message": "Посмотреть все {count} результатов" + }, + "theme.SearchBar.label": { + "message": "Поиск", + "description": "ARIA метка и заполнитель для кнопки поиска" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Очистить запрос", + "description": "Метка и ARIA метка для кнопки сброса поискового поля" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Отмена", + "description": "Метка и ARIA метка для кнопки отмены поискового поля" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Недавние", + "description": "Заголовок для недавних поисков" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "Нет недавних поисков", + "description": "Текст при отсутствии недавних поисков" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Сохранить этот поиск", + "description": "Метка для кнопки сохранения недавнего поиска" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Удалить этот поиск из истории", + "description": "Метка для кнопки удаления недавнего поиска" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Избранное", + "description": "Заголовок для избранных поисков" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Удалить этот поиск из избранного", + "description": "Метка для кнопки удаления избранного поиска" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Не удалось получить результаты", + "description": "Заголовок экрана ошибки модального окна поиска" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "Возможно, стоит проверить ваше сетевое соединение.", + "description": "Текст помощи для экрана ошибки модального окна поиска" + }, + "theme.SearchModal.footer.selectText": { + "message": "для выбора", + "description": "Пояснительный текст действия для клавиши Enter" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Клавиша Enter", + "description": "ARIA метка для кнопки клавиши Enter, которая делает выбор" + }, + "theme.SearchModal.footer.navigateText": { + "message": "для навигации", + "description": "Пояснительный текст действия для клавиш стрелки вверх и вниз" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Стрелка вверх", + "description": "ARIA метка для кнопки клавиши стрелка вверх для навигации" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Стрелка вниз", + "description": "ARIA метка для кнопки клавиши стрелка вниз для навигации" + }, + "theme.SearchModal.footer.closeText": { + "message": "для закрытия", + "description": "Пояснительный текст действия для клавиши Escape" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Клавиша Escape", + "description": "ARIA метка для кнопки клавиши Escape, которая закрывает модальное окно" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Поиск от", + "description": "Текст, объясняющий, что поиск осуществляется через Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "Нет результатов для", + "description": "Текст, объясняющий, что нет результатов для следующего поиска" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Попробуйте поискать", + "description": "Текст для предлагаемого запроса, когда не найдены результаты для следующего поиска" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Считаете, что этот запрос должен вернуть результаты?", + "description": "Текст вопроса, где пользователь думает, что отсутствуют результаты" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Сообщите нам.", + "description": "Текст ссылки для сообщения о недостающих результатах" + }, + "theme.SearchModal.placeholder": { + "message": "Поиск в документации", + "description": "Заполнитель поля ввода всплывающего модального окна DocSearch" + }, + "theme.blog.post.plurals": { + "message": "Одна запись|{count} записи|{count} записей", + "description": "Множественная метка для \"{count} posts\". Используйте столько множественных форм (разделенных \"|\"), сколько поддерживает ваш язык" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} отмечены тегом \"{tagName}\"", + "description": "Заголовок страницы для тега блога" + }, + "theme.blog.author.pageTitle": { + "message": "{authorName} - {nPosts}", + "description": "Заголовок страницы для автора блога" + }, + "theme.blog.authorsList.pageTitle": { + "message": "Авторы", + "description": "Заголовок страницы авторов" + }, + "theme.blog.authorsList.viewAll": { + "message": "Посмотреть всех авторов", + "description": "Метка ссылки, направляющей на страницу авторов блога" + }, + "theme.blog.author.noPosts": { + "message": "Этот автор еще не написал ни одной записи.", + "description": "Текст для авторов с 0 записями в блоге" + }, + "theme.contentVisibility.unlistedBanner.title": { + "message": "Неперечисленная страница", + "description": "Заголовок баннера неперечисленного контента" + }, + "theme.contentVisibility.unlistedBanner.message": { + "message": "Эта страница не перечислена. Поисковые системы не будут индексировать ее, и только пользователи с прямой ссылкой могут получить к ней доступ.", + "description": "Сообщение баннера неперечисленного контента" + }, + "theme.contentVisibility.draftBanner.title": { + "message": "Черновик страницы", + "description": "Заголовок баннера черновика контента" + }, + "theme.contentVisibility.draftBanner.message": { + "message": "Эта страница является черновиком. Она будет видна только в разработке и исключена из продакшн сборки.", + "description": "Сообщение баннера черновика контента" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Попробовать снова", + "description": "Метка кнопки для повторной попытки рендеринга, когда граница ошибки React перехватывает ошибку" + }, + "theme.common.skipToMainContent": { + "message": "Перейти к основному содержимому", + "description": "Метка перехода к содержимому, используемая для доступности, позволяющая быстро перейти к основному содержимому с помощью навигации клавиатурой tab/enter" + }, + "theme.tags.tagsPageTitle": { + "message": "Теги", + "description": "Заголовок страницы списка тегов" + } + } \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current.json b/i18n/ru/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..902b93d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,134 @@ +{ + "version.label": { + "message": "Следующий", + "description": "Метка для текущей версии" + }, + "sidebar.docs.category.What's new and migration": { + "message": "Что нового и миграция", + "description": "Метка для категории 'Что нового и миграция' в боковой панели документации" + }, + "sidebar.docs.category.What's new and migration.link.generated-index.title": { + "message": "Что нового и миграция", + "description": "Заголовок автосгенерированной страницы индекса для категории 'Что нового и миграция' в боковой панели документации" + }, + "sidebar.docs.category.API": { + "message": "API", + "description": "Метка для категории API в боковой панели документации" + }, + "sidebar.docs.category.Kanban methods": { + "message": "Методы Kanban", + "description": "Метка для категории 'Методы Kanban' в боковой панели документации" + }, + "sidebar.docs.category.Kanban internal API": { + "message": "Внутренний API Kanban", + "description": "Метка для категории 'Внутренний API Kanban' в боковой панели документации" + }, + "sidebar.docs.category.Kanban internal API.link.generated-index.title": { + "message": "Обзор внутреннего API", + "description": "Заголовок автосгенерированной страницы индекса для категории 'Внутренний API Kanban' в боковой панели документации" + }, + "sidebar.docs.category.Event Bus methods": { + "message": "Методы Event Bus", + "description": "Метка для категории 'Методы Event Bus' в боковой панели документации" + }, + "sidebar.docs.category.Export methods": { + "message": "Методы экспорта", + "description": "Метка для категории 'Методы экспорта' в боковой панели документации" + }, + "sidebar.docs.category.State methods": { + "message": "Методы состояния", + "description": "Метка для категории 'Методы состояния' в боковой панели документации" + }, + "sidebar.docs.category.Kanban events": { + "message": "События Kanban", + "description": "Метка для категории 'События Kanban' в боковой панели документации" + }, + "sidebar.docs.category.Kanban properties": { + "message": "Свойства Kanban", + "description": "Метка для категории 'Свойства Kanban' в боковой панели документации" + }, + "sidebar.docs.category.Toolbar methods": { + "message": "Методы панели инструментов", + "description": "Метка для категории 'Методы панели инструментов' в боковой панели документации" + }, + "sidebar.docs.category.Toolbar properties": { + "message": "Свойства панели инструментов", + "description": "Метка для категории 'Свойства панели инструментов' в боковой панели документации" + }, + "sidebar.docs.category.Common settings": { + "message": "Общие настройки", + "description": "Метка для категории 'Общие настройки' в боковой панели документации" + }, + "sidebar.docs.category.Backend API": { + "message": "Backend API", + "description": "Метка для категории Backend API в боковой панели документации" + }, + "sidebar.docs.category.Backend API.link.generated-index.title": { + "message": "Backend API", + "description": "Заголовок автосгенерированной страницы индекса для категории Backend API в боковой панели документации" + }, + "sidebar.docs.category.RestDataProvider API": { + "message": "RestDataProvider API", + "description": "Метка для категории RestDataProvider API в боковой панели документации" + }, + "sidebar.docs.category.RestDataProvider API.link.generated-index.title": { + "message": "RestDataProvider API", + "description": "Заголовок автосгенерированной страницы индекса для категории RestDataProvider API в боковой панели документации" + }, + "sidebar.docs.category.REST methods": { + "message": "REST методы", + "description": "Метка для категории 'REST методы' в боковой панели документации" + }, + "sidebar.docs.category.REST routes": { + "message": "REST маршруты", + "description": "Метка для категории 'REST маршруты' в боковой панели документации" + }, + "sidebar.docs.category.GET routes": { + "message": "GET маршруты", + "description": "Метка для категории 'GET маршруты' в боковой панели документации" + }, + "sidebar.docs.category.GET routes.link.generated-index.title": { + "message": "GET маршруты", + "description": "Заголовок автосгенерированной страницы индекса для категории 'GET маршруты' в боковой панели документации" + }, + "sidebar.docs.category.POST routes": { + "message": "POST маршруты", + "description": "Метка для категории 'POST маршруты' в боковой панели документации" + }, + "sidebar.docs.category.POST routes.link.generated-index.title": { + "message": "POST маршруты", + "description": "Заголовок автосгенерированной страницы индекса для категории 'POST маршруты' в боковой панели документации" + }, + "sidebar.docs.category.PUT routes": { + "message": "PUT маршруты", + "description": "Метка для категории 'PUT маршруты' в боковой панели документации" + }, + "sidebar.docs.category.PUT routes.link.generated-index.title": { + "message": "PUT маршруты", + "description": "Заголовок автосгенерированной страницы индекса для категории 'PUT маршруты' в боковой панели документации" + }, + "sidebar.docs.category.DELETE routes": { + "message": "DELETE маршруты", + "description": "Метка для категории 'DELETE маршруты' в боковой панели документации" + }, + "sidebar.docs.category.DELETE routes.link.generated-index.title": { + "message": "DELETE маршруты", + "description": "Заголовок автосгенерированной страницы индекса для категории 'DELETE маршруты' в боковой панели документации" + }, + "sidebar.docs.category.Backend and frameworks integration": { + "message": "Интеграция с Backend и фреймворками", + "description": "Метка для категории 'Интеграция с Backend и фреймворками' в боковой панели документации" + }, + "sidebar.docs.category.Backend and frameworks integration.link.generated-index.title": { + "message": "Интеграция с Backend и фреймворками", + "description": "Заголовок автосгенерированной страницы индекса для категории 'Интеграция с Backend и фреймворками' в боковой панели документации" + }, + "sidebar.docs.category.Guides": { + "message": "Руководства", + "description": "Метка для категории 'Руководства' в боковой панели документации" + }, + "sidebar.docs.category.Guides.link.generated-index.title": { + "message": "Руководства", + "description": "Заголовок автосгенерированной страницы индекса для категории 'Руководства' в боковой панели документации" + } + } \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md new file mode 100644 index 0000000..1fc4983 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md @@ -0,0 +1,52 @@ +--- +sidebar_label: $meta +title: Параметр $meta +description: Узнайте о параметре $meta в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# $meta + +### Описание + +@short: Объект дополнительных настроек для конфигурации методов и событий Kanban + +:::important +Объект `$meta` содержит дополнительный набор параметров, используемых для настройки методов на основе событий Kanban! +::: + +### Использование + +~~~jsx {} +$meta?: { + skipHistory?: boolean +}; +~~~ + +### Параметры + +Объект `$meta` включает следующий параметр: + +- `skipHistory` - (необязательный) включает или отключает пропуск операций в истории Kanban + +### Пример + +~~~jsx {11-13} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// добавляем новую карточку и пропускаем это действие в истории Kanban +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" }, + $meta: { + skipHistory: true + } +}); +~~~ + +**Журнал изменений:** Параметр `$meta` был добавлен в версии v1.3 + +**Связанный материал:** [`history`](api/config/js_kanban_history_config.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md new file mode 100644 index 0000000..a4df5b4 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: cardHeight +title: Конфигурация cardHeight +description: Вы можете узнать о конфигурации cardHeight в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# cardHeight + +### Описание + +@short: Необязательно. Высота карточек + +### Использование + +~~~jsx {} +cardHeight?: number; // px +~~~ + +:::important +Если вы используете настройки [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) и [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md) одновременно, не забудьте указать статическую высоту карточек через свойство `cardHeight`. Если не указать, карточки не будут отображаться. +::: + +### Пример + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + cardHeight: 150, // px + // другие параметры +}); +~~~ + +**История изменений:** Свойство добавлено в версии v1.2 + +**Связанные статьи:** [Конфигурация](guides/configuration.md#cards) + +**Связанный пример:** [Kanban. Ленивый рендеринг и прокрутка колонок](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md new file mode 100644 index 0000000..769ee89 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md @@ -0,0 +1,156 @@ +--- +sidebar_label: cards +title: Конфигурация cards +description: Вы можете узнать о конфигурации cards в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# cards + +### Описание + +@short: Необязательно. Массив объектов, содержащих данные карточек + +### Использование + +~~~jsx {} +cards?: [ + { + id?: string | number, + label?: string, + description?: string, + progress?: number, + start_date?: Date, + end_date?: Date, + attached?: [ + { + id: string | number, + url?: string, + previewURL?: string, + coverURL?: string, + name?: string, + isCover?: boolean + size?: number + }, {...} + ], + color?: string, + users?: array | string | number, + // users?: array - для нескольких пользователей, если вы используете редактор типа "multiselect" для назначения пользователей + // users?: string | number - для одного пользователя, если вы используете редактор типа "combo" или "select" для назначения пользователя + priority?: string | number, + css?: string, + votes?: array, + comments?: [ + { + id: string | number, + userId: string | number, + cardId: string | number, + text?: string, + date?: Date, + }, {...} + ], + [custom_key: string]?: any + }, {...} // данные других карточек +]; +~~~ + +### Параметры + +Для каждой карточки можно указать следующие параметры (данные): + +- `id` - (необязательно) **ID** карточки. Используется для управления карточкой через соответствующие методы +- `label` - (необязательно) метка карточки. Отображается в поле **Label** +- `description` - (необязательно) описание карточки. Отображается в поле **Description** +- `progress` - (необязательно) значение индикатора прогресса. Можно указать значение в диапазоне от 0 до 100. Отображается в поле **Progress bar** +- `start_date` - (необязательно) объект Date начала задачи (не указывайте строку с датой). Отображается в поле **Start date** +- `end_date` - (необязательно) объект Date окончания задачи (не указывайте строку с датой). Отображается в поле **End date** +- `attached` - (необязательно) массив объектов с данными вложенных файлов. Отображается в поле **Attachment**. Для каждого объекта можно указать следующие параметры: + - `id` - (обязательно) **ID** вложенного файла + - `url` - (необязательно) путь к файлу для вложения + - `previewURL` - (необязательно) путь к превью изображения + - `coverURL` - (необязательно) путь к изображению для установки в качестве обложки + - `name` - (необязательно) имя файла + - `isCover` - (необязательно) включает изображение обложки. Если **true**, изображение обложки будет загружено по url из "coverURL" + - `size` - (необязательно) размер вложенного файла (в байтах) +- `color` - (необязательно) корректный HEX-код цвета. Это цвет верхней линии карточки +- `users` - (необязательно) **массив** с **ID** нескольких назначенных пользователей или **string | number** для одного назначенного пользователя. Для указания назначенных пользователей нужно определить массив с данными пользователей в свойстве [cardShape.users](api/config/js_kanban_cardshape_config.md). Пользователи отображаются в поле **Users** + +:::info +`users?: array` - указывайте **массив** с ID пользователей, если используете редактор типа [**multiselect**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) для назначения нескольких пользователей + +`users?: string | number` - указывайте один ID, если используете редакторы типа [**combo** или **select**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) для назначения одного пользователя +::: + +- `priority` - (необязательно) **ID** приоритета карточки. Для указания приоритетов карточек нужно определить массив с данными приоритетов в свойстве [cardShape.priority](api/config/js_kanban_cardshape_config.md). Отображается в поле **Priority** +- `css` - (необязательно) определяет CSS-стили для отдельной карточки +- `votes` - (необязательно) массив с ID пользователей +- `comments` - (необязательно) массив объектов с данными комментариев. Для каждого объекта комментария можно указать следующие параметры: + - `id` - (обязательно) **ID** комментария + - `userId` - (обязательно) **ID** пользователя, который оставил комментарий + - `cardId` - (обязательно) **ID** карточки, к которой относится комментарий + - `text` - (необязательно) текст комментария. Может содержать HTML-разметку + - `date` - (необязательно) объект Date (не указывайте строку с датой). Дата добавления комментария. Не обновляется при редактировании +- `custom_key` - (необязательно) пользовательский ключ карточки. Можно указать пользовательские ключи для размещения карточки в колонке и строке. См. свойства [columnKey](../js_kanban_columnkey_config) и [rowKey](api/config/js_kanban_rowkey_config.md) + +:::info +Если вы хотите динамически загружать новые данные для карточек, можно использовать метод [**parse()**](api/methods/js_kanban_parse_method.md)! +::: + +### Пример + +~~~jsx {1-41,45} +const cards = [ + { + id: 1, + label: "Integration with React", + description: "Some description", + progress: 25, + start_date: new Date("02/24/2022"), + end_date: new Date("02/24/2023"), + attached: [ + { + id: 234, + url: "../assets/img-1.jpg", + previewURL: "../assets/img-1.jpg", + coverURL: "../assets/img-1.jpg", + name: "img-1.jpg", + isCover: true, + size: 11979 + }, {...} // данные других вложенных файлов + ], + color: "#65D3B3", + users: [1,2], + votes: [3,6,8], + comments: [ + { + id: 1, + userId: 1, + cardId: 1, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays. ", + date: new Date(), + }, {...} // другие комментарии + ], + priority: 1, + // пользовательское поле для размещения карточки в строке "feature" + // конфигурация rowKey должна быть установлена в значение "type" + type: "feature", + // пользовательское поле для размещения карточки в колонке "backlog" + // конфигурация columnKey должна быть установлена в значение "stage" + stage: "backlog", + css: "red", + }, {...} // данные других карточек +]; + +new kanban.Kanban("#root", { + columns, + cards, + // другие параметры +}); +~~~ + +**История изменений:** Параметры ***css***, ***comments*** и ***votes*** были добавлены в версии v1.4 + +**Связанные статьи:** +- [Работа с данными](guides/working_with_data.md) +- [updateCard()](api/methods/js_kanban_updatecard_method.md) + +**Связанный пример:** [Kanban. Styling cards](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md new file mode 100644 index 0000000..8d2fe1f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md @@ -0,0 +1,339 @@ +--- +sidebar_label: cardShape +title: Конфигурация cardShape +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете узнать о конфигурации cardShape. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# cardShape + +### Описание + +@short: Необязательно. Объект настроек для управления внешним видом карточек + +### Использование + +~~~jsx {} +cardShape?: { + label?: boolean | { show?: boolean }, + description?: boolean | { show?: boolean }, + progress?: boolean | { show?: boolean }, + attached?: boolean | { show?: boolean }, + cover?: boolean | { show?: boolean }, + comments?: boolean | { show?: boolean }, + confirmDeletion?: boolean | { show?: boolean }, + start_date?: boolean | { + show?: boolean, + format?: string + }, + end_date?: boolean | { + show?: boolean, + format?: string + }, + color?: boolean | { + show?: boolean, + values?: array + }, + menu?: boolean | { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, card }) => void, + data?: array // массив подэлементов меню + }, + {...} + ] | ({ card, readonly }) => array | null + }, + users?: boolean | { + show?: boolean, + values: [ + { + id: string | number, + label?: string, + avatar?: string + }, + {...} // данные других пользователей + ], + maxCount?: number | false + }, + priority?: boolean | { + show?: boolean, + values?: [ + { + id: string | number, + label?: string, + color: string + }, + {...} // данные других приоритетов + ] + }, + votes?: boolean | { + show?: boolean, + clickable?: boolean + }, + css?: (card) => string, + headerFields?: [ + { + key: string, + label?: string, + css?: string + }, + {...} // данные других полей + ] +}; +~~~ + +### Параметры + +:::info +В некоторых случаях параметр можно задать в **коротком** или **расширенном** виде. См. пример ниже: + +~~~jsx {3,6} + label: boolean | { show?: boolean } + // короткое значение + label: true + // или + // полное значение + label: { show: true } +~~~ +::: + +Для настройки внешнего вида карточек в объекте **cardShape** можно указать следующие параметры (поля): + +- `label` - (необязательно) показать/скрыть поле **label** +- `description` - (необязательно) показать/скрыть поле **description** +- `progress` - (необязательно) показать/скрыть поле **progress** +- `attached` - (необязательно) показать/скрыть поле с **вложениями** +- `cover` - (необязательно) показать/скрыть **картинку карточки** +- `comments` - (необязательно) показать/скрыть **комментарии** к карточкам +- `confirmDeletion` - (необязательно) показать/скрыть **диалог подтверждения**, позволяющий пользователям подтвердить или отменить удаление карточки +- `start_date` - (необязательно) объект параметров для поля **дата начала** + - `show` - (необязательно) показать/скрыть дату начала карточки + - `format` - (необязательно) формат даты начала карточки. Доступные параметры описаны [здесь](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `end_date` - (необязательно) объект параметров для поля **дата окончания** + - `show` - (необязательно) показать/скрыть дату окончания карточки + - `format` - (необязательно) формат даты окончания карточки. Доступные параметры описаны [здесь](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `color` - (необязательно) объект параметров для **верхней цветной линии** карточки + - `show` - (необязательно) показать/скрыть верхнюю цветную линию + - `values` - (необязательно) массив допустимых HEX-кодов +- `menu` - (необязательно) объект параметров для **контекстного меню карточки**. Здесь можно указать следующие параметры: + - `show` - (необязательно) включить/отключить контекстное меню карточки + - `items` - (необязательно) массив объектов с параметрами пунктов меню карточки. Для каждого пункта можно указать следующие параметры: + - `id` - (необязательно) ID пункта меню. Для реализации встроенных действий нужно указать следующие значения: + - ***"set-edit"*** - действие редактирования названия карточки + - ***"delete-card"*** - действие удаления карточки + - `icon` - (необязательно) класс иконки пункта меню. Здесь можно указать любую иконку из икон-шрифтов (*mdi-delete*) + - `text` - (необязательно) название пункта меню + - `disabled` - (необязательно) состояние пункта меню (*активен* или *отключен* в зависимости от значения *boolean*) + - `onClick` - (необязательно) пользовательская функция обратного вызова, принимающая аргументы: + - ***id*** - ID текущего пункта меню + - ***item*** - объект данных текущего пункта меню + - ***card*** - объект данных целевой карточки + - `data` - (необязательно) массив объектов, представляющих подменю + + :::info + Также параметр `menu.items` можно задать в виде пользовательской функции, принимающей аргументы: + - ***card*** - объект данных текущей карточки + - ***readonly*** - объект с readonly [свойствами состояния](api/internal/js_kanban_getstate_method.md) + + Эта функция позволяет настроить меню для любой карточки или скрыть его для конкретной (возвращая *null* или *false*): + + ~~~jsx {} + items: ({ card, readonly }) => { + if (card.id === 1){ + return false; + } + + const menu = []; + + if (!readonly.delete){ + menu.push({ + id: "delete-card", icon: "wxi-delete", label: "Delete" + }); + } + + if (!readonly.edit){ + menu.push({ + id: "set-edit", icon: "wxi-edit", label: "Edit" + }); + } + return menu.length ? menu : null; + } + ~~~ + ::: + +- `users` - (необязательно) объект параметров для поля **пользователи** + - `show` - (необязательно) показать/скрыть назначенных пользователей + - `values` - (обязательно) массив объектов с данными пользователей. Для каждого пользователя можно указать следующие параметры: + - `id` - (обязательно) **ID** пользователя + - `label` - (необязательно) имя пользователя + - `avatar` - (необязательно) путь к аватару пользователя + - `maxCount` - (необязательно) максимальное количество пользователей, отображаемых на карточке (или ***false***) + + Свойство `maxCount` можно установить в число пользователей, которые должны отображаться на карточке. Если `maxCount` равно `false`, на карточке будут видны все назначенные пользователи. + + :::info + Поле ***users*** по умолчанию отключено. Чтобы включить его, нужно установить параметр `show` в `true` и предоставить соответствующие данные пользователей через параметр `values`. Для назначения новых пользователей через редактор необходимо настроить соответствующий контрол через свойство [`editorShape`](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types). Используйте тип ***select*** для назначения одного пользователя или ***multiselect*** для назначения нескольких. + + ~~~jsx {} + cardShape: { + users: { + show: true, + values: [ + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } + ], + maxCount: 4 // на карточке отображаются только 4 пользователя + } + } + ~~~ + ::: + +- `priority` - (необязательно) объект параметров для поля **приоритет** + - `show` - (необязательно) показать/скрыть приоритет карточки + - `values` - (необязательно) массив объектов с данными приоритетов. Для каждого приоритета можно указать следующие параметры: + - `id` - (обязательно) **ID** приоритета + - `label` - (необязательно) имя приоритета + - `color` - (обязательно) допустимый HEX-код +- `votes` - (необязательно) задаёт функционал **голосования** + - `show` - (необязательно) показать/скрыть иконку голосования на карточке и в редакторе + - `clickable` - (необязательно) делает иконку голосования на карточке кликабельной. Если `true`, пользователи могут голосовать за карточку, используя иконку голосования на карточке. Иначе голосовать можно только через иконку в редакторе +- `css` - функция, возвращающая CSS класс, который условно применяется к карточкам +- `headerFields` - (необязательно) массив объектов с данными **пользовательских полей**. Здесь можно указать следующие параметры: + - `key` - (обязательно) ключ пользовательского поля. Используется при настройке редактора через свойство [editorShape](api/config/js_kanban_editorshape_config.md) + - `label` - (необязательно) название пользовательского поля + - `css` - (необязательно) CSS класс пользовательского поля + +:::info +Если вы не зададите настройки карточек через свойство **cardShape**, виджет применит набор параметров **defaultCardShape** по умолчанию! +::: + +### Конфигурация по умолчанию + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "High" }, + { id: 2, color: "#F1B941", label: "Medium" }, + { id: 3, color: "#77D257", label: "Low" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +export const getDefaultCardMenuItems = ({ readonly }: { readonly: DataStore }) => { + const { readonly } = readonly.getState(); + const baseItems = [ + { id: "duplicate-card", icon: "wxi-content-copy", text: "Duplicate" }, + { id: "delete-card", icon: "wxi-delete-outline", text: "Delete" } + ]; + + if (!readonly?.select && readonly?.edit) { + return [ + { id: "set-edit", icon: "wxi-edit-outline", text: "Edit" }, + ...baseItems, + ]; + } + return baseItems; +}; + +const defaultCardShape = { + label: { show: true }, + description: { show: false }, + progress: { show: false }, + start_date: { show: false }, + end_date: { show: false }, + users: { show: false }, + confirmDeletion: { show: true }, + priority: { + show: false, + values: defaultPriorities + }, + color: { + show: false, + values: defaultColors + }, + cover: { show: false }, + attached: { show: false }, + menu: { show: true } +}; +~~~ + +### Пример + +~~~jsx {14-49,54} +const users = [ // данные пользователей + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // данные приоритетов карточек + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardColors = ["#65D3B3", "#FFC975", "#58C3FE"]; + +const cardShape = { // настройки карточек + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + cover: false, + comments: false, + confirmDeletion: false, + color: { + show: true, + values: cardColors + }, + users: { + show: true, + values: users, + maxCount: false + }, + priority: { + show: true, + values: cardPriority + }, + votes: { + show: true, + clickable: true + }, + css: (card) => card.type == "feature" ? "green" : "red", + headerFields: [ + { // пользовательское поле + key: "sprint", + css: "custom_style", + label: "Sprint" + } + ] +}; + +new kanban.Kanban("#root", { + cards, + columns, + cardShape, + // другие параметры +}); +~~~ + +**История изменений:** +- Параметры ***comments***, ***css*** и ***votes*** добавлены в версии 1.4 +- Параметр ***menu.items[0].label*** устарел и заменён на ***menu.items[0].text*** в версии 1.4 +- Параметр ***menu.items[0].items*** устарел и заменён на ***menu.items[0].data*** в версии 1.4 +- Параметры ***users.maxCount*** и ***votes.clickable*** добавлены в версии 1.6 +- Параметры ***menu.items[0].label*** и ***menu.items[0].items*** удалены в версии 1.7 +- Функция ***menu.items*** обновлена. Параметр **store** заменён на **readonly** в версии 1.7 + +**Связанные статьи:** [Конфигурация](guides/configuration.md#cards) + +**Связанные примеры:** +- [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) +- [Kanban. Highlighting outdated and active tasks](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban) +- [Kanban. Styling cards](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) +- [Kanban. Unlimited user assignments per task](https://snippet.dhtmlx.com/w205dvzg?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md new file mode 100644 index 0000000..4a88bff --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md @@ -0,0 +1,73 @@ +--- +sidebar_label: cardTemplate +title: Конфигурация cardTemplate +description: Вы можете узнать о конфигурации cardTemplate в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# cardTemplate + +### Описание + +@short: Необязательно. Возвращает и применяет новый HTML-шаблон карточки + +### Использование + +~~~jsx +function cardTemplate ({ cardFields, selected, dragging, cardShape }){ + return "HTML шаблон карточки"; +}; +~~~ + +### Параметры + +Функция обратного вызова принимает объект со следующими параметрами: + +- `cardFields` — объект данных карточки +- `selected` — состояние выбора карточки +- `dragging` — состояние перетаскивания карточки +- `cardShape` — объект конфигурации карточки + +:::important +Если необходимо включить контекстное меню в шаблон карточки, укажите в разметке шаблона пользовательскую иконку и добавьте выражение `data-menu-id=${cardFields.id}`, как показано в примере ниже. +::: + +### Пример + +~~~jsx {1-23,28} +const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + const { label, color, id } = cardFields; + if (selected) { + return ` +
+
+
+ +
+ Selected:${label} +
+ `; + } + return ` +
+
+
+ +
+ ${label} +
+ `; +} + +new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // другие параметры +}); +~~~ + +**История изменений:** Возможность отображения контекстного меню добавлена в версии v1.4 + +**Связанные статьи:** [Настройка](guides/customization.md#custom-cards) + +**Связанный пример:** [Kanban. Пользовательская карточка](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md new file mode 100644 index 0000000..a90d01a --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md @@ -0,0 +1,58 @@ +--- +sidebar_label: columnKey +title: Конфигурация columnKey +description: Вы можете узнать о конфигурации columnKey в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# columnKey + +### Описание + +@short: Необязательно. Определяет принадлежность карточки к колонке + +:::info +Для распределения карточек по колонкам необходимо указать ключ (**column** или *пользовательский*) и задать его значением **ID** нужной колонки в объекте данных карточки. Свойство **columnKey** должно быть установлено в этот ключ в объекте конфигурации виджета. +::: + +### Использование + +~~~jsx {} +columnKey?: string; +~~~ + +### Конфигурация по умолчанию + +:::note +Если вы не укажете ключ колонки через свойство **columnKey**, виджет по умолчанию будет использовать ключ **"column"**! В этом случае необходимо установить ключ **column** в объекте данных карточки с нужным **ID** колонки. + +~~~jsx {3} +const cards = [ + { + column: "backlog", + // другие данные + } +]; +~~~ +::: + +### Пример + +~~~jsx {4,8,15} +const cards = [ + { + label: "Задача в бэклоге", + column_custom_key: "backlog" + }, + { + label: "Задача в процессе", + column_custom_key: "inprogress" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + columnKey: "column_custom_key", + // другие параметры +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md new file mode 100644 index 0000000..f16109d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md @@ -0,0 +1,125 @@ +--- +sidebar_label: columns +title: columns Config +description: Вы можете узнать о конфигурации columns в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# columns + +### Описание + +@short: Необязательно. Массив объектов, содержащих данные колонок + +### Использование + +~~~jsx {} +columns?: [ + { + id: string, + label?: string, + collapsed?: boolean, + limit?: number | object, + strictLimit?: boolean, + css?: string, + overlay?: any + }, + {...} // другие данные колонок +]; +~~~ + +### Параметры + +Для каждой колонки можно указать следующие параметры (данные): + +- `id` - (обязательно) **ID** колонки. Используется для управления колонкой через соответствующие методы +- `label` - (необязательно) метка колонки. Отображается в секции колонки +- `collapsed` - (необязательно) текущее состояние колонки. Если ***true***, колонка изначально свернута. Значение по умолчанию — ***false*** (развернутое состояние) +- `limit` - (необязательно) этот параметр может принимать одно из двух значений: + - `number` - ограничение по количеству карточек в текущей колонке + - `object` - объект с ограничениями по количеству карточек для каждой строки (swimlane) по её ID +- `strictLimit` - (необязательно) режим строгого ограничения. Если ***true***, пользователь не сможет создавать новые карточки сверх указанного значения в параметре **limit**. Значение по умолчанию — ***false*** +- `css` - (необязательно) задаёт CSS-стили для отдельной колонки +- `overlay` - (необязательно) задаёт слой оверлея для отдельной колонки. Здесь можно указать шаблон, который накрывает отдельную колонку следующим образом: + + ~~~jsx {} + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + ~~~ + +:::info +Если вы хотите динамически загружать новые данные для колонок, вы можете использовать метод [`parse()`](../../methods/js_kanban_parse_method)! +::: + +### Пример + +~~~jsx {1-31,34} +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true, + css: "red" + }, + { + label: "In progress", + id: "inprogress", + collapsed: false, + limit: { + // ограничение количества карточек для строк "Feature" и "Task" в колонке "In progress" + feature: 3, + task: 2 + }, + strictLimit: false + }, + { + label: "Done", + id: "done", + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + // другие параметры +}); +~~~ + +### Пользовательское оформление + +Чтобы применить пользовательские стили к колонкам с помощью параметра `css`, добавьте CSS-правила для вашего кастомного класса. + +```css +.wx-header .wx-column.red, +.wx-column.red { + background: #FFA29C; +} +``` + +Если стили не применяются, убедитесь, что: + +- Ваш селектор содержит достаточный контекст (например, родительские и внутренние классы DHTMLX) +- Если свойство переопределяется встроенным стилем, можно использовать `!important` + +**История изменений:** Параметры **css** и **overlay** были добавлены в версии v1.4 + +**Связанные статьи:** +- [Работа с данными](guides/working_with_data.md) +- [updateColumn()](api/methods/js_kanban_updatecolumn_method.md) + +**Связанные примеры:** +- [Kanban. Ограничения для колонок и swimlanes](https://snippet.dhtmlx.com/2blo6hx8?tag=kanban) +- [Kanban. Изменение цвета колонки через кастомное меню](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [Kanban. Отключение drag and drop для конкретных колонок](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md new file mode 100644 index 0000000..e6682c3 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md @@ -0,0 +1,216 @@ +--- +sidebar_label: columnShape +title: Конфигурация columnShape +description: Вы можете узнать о конфигурации columnShape в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# columnShape + +### Описание + +@short: Необязательно. Объект настроек для управления внешним видом колонок + +### Использование + +~~~jsx {} +columnShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled?: boolean, + onClick?: ({ id, item, column }) => void, + data?: array // массив подэлементов меню + }, + {...} + ] | ({ column, columnIndex, columns, readonly }) => array | null + }, + fixedHeaders?: boolean, + css?: (column, cards) => string, + headerTemplate?: template(column => { + return "HTML-шаблон заголовка колонки в развернутом состоянии"; + }), + collapsedTemplate?: template(column => { + return "HTML-шаблон заголовка колонки в свернутом состоянии"; + }), + confirmDeletion?: boolean +}; +~~~ + +### Параметры + +Для настройки внешнего вида колонок в объекте **columnShape** можно указать следующие параметры: + +- `menu` - (необязательно) объект параметров контекстного меню колонок. Здесь можно указать следующие параметры: + - `show` - (необязательно) включает/отключает контекстное меню колонки + - `items` - (необязательно) массив объектов с параметрами элементов контекстного меню колонок. Для каждого элемента можно указать следующие параметры: + - `id` - (необязательно) ID элемента меню. Для реализации встроенных действий необходимо указать следующие значения: + - ***"add-card"*** - действие добавления новой карточки + - ***"set-edit"*** - действие редактирования названия колонки + - ***"move-column:left"*** - действие перемещения колонки влево + - ***"move-column:right"*** - действие перемещения колонки вправо + - ***"delete-column"*** - действие удаления колонки + + - `icon` - (необязательно) класс иконки элемента меню. Здесь можно указать любую иконку из икон-шрифтов (*mdi-delete*) + - `text` - (необязательно) название элемента меню + - `disabled` - (необязательно) состояние элемента меню (*активен* или *отключен* в зависимости от *boolean* значения) + - `onClick` - (необязательно) пользовательская функция обратного вызова, принимающая следующие аргументы: + - ***id*** - ID текущего элемента меню + - ***item*** - объект данных текущего элемента меню + - ***column*** - объект данных целевой колонки + + - `data` - (необязательно) массив объектов, представляющих подэлементы меню + + :::info + Также параметр `menu.items` может быть задан в виде пользовательской функции, принимающей следующие аргументы: + - ***column*** - объект данных текущей колонки + - ***columnIndex*** - индекс текущей колонки + - ***columns*** - массив объектов со всеми данными колонок + - ***readonly*** - объект только для чтения с [свойствами состояния](api/internal/js_kanban_getstate_method.md) + + Эта функция позволяет настраивать меню для любой колонки или скрывать его для конкретной (возвращая *null* или *false*): + + ~~~jsx {} + items: ({ column }) => { + if(column.id === "inprogress"){ + return null; + } + if (column.id === "backlog"){ + return [ + { id: "set-edit", icon: "wxi-edit", text: "Переименовать" }, + { + id: "delete-card", + icon: "wxi-delete", + text: "Удалить карточку" + } + ]; + } + } + ~~~ + ::: + +- `fixedHeaders` - (необязательно) фиксирует заголовки колонок при вертикальной прокрутке (*true* по умолчанию). Прокрутка должна быть включена в самом Kanban (высота должна быть ограничена) +- `css` - (необязательно) функция, возвращающая CSS-класс, который применяется к колонкам условно +- `headerTemplate` - (необязательно) HTML-шаблон заголовка колонки в развернутом состоянии +- `collapsedTemplate` - (необязательно) HTML-шаблон заголовка колонки в свернутом состоянии +- `confirmDeletion` - (необязательно) отображает/скрывает **диалог подтверждения**, который позволяет пользователям подтвердить или отклонить удаление колонки + +### Конфигурация по умолчанию + +~~~jsx {} +const getDefaultColumnMenuItems = ({ column, columnIndex, columns, readonly }) => [ + { id: "add-card", icon: "wxi-plus", text: "Добавить новую карточку" }, + { id: "set-edit", icon: "wxi-edit", text: "Переименовать" }, + { + id: "move-column:left", + icon: "wxi-arrow-left", + text: "Переместить влево", + disabled: columnIndex <= 0 + }, + { + id: "move-column:right", + icon: "wxi-arrow-right", + text: "Переместить вправо", + disabled: columnIndex >= columns.length - 1 + }, + { id: "delete-column", icon: "wxi-delete", text: "Удалить" } +]; +const columnShape = { + menu: { + show: true, + items: getDefaultColumnMenuItems + }, + fixedHeaders: true, + confirmDeletion: true +}; +~~~ + +### Пример + +~~~jsx {1-58,64} +const columnShape = { + menu: { + show: true, + items: [ + { + id: "color", + text: "Цвет", + data: [ + { + id:"yellow", + text: "Желтый", + onClick: ({ column }) => changeColumnColor(column, "yellow") + }, + { + id:"red", + text: "Красный", + onClick: ({ column }) => changeColumnColor(column, "red") + }, + { + id:"green", + text: "Зеленый", + onClick: ({ column }) => changeColumnColor(column, "green") + } + ] + } + ] + }, + fixedHeaders: false, + css: (column, cards) => column.id == "inprogress" && cards.length < 5 ? "green" : "red", + headerTemplate: template(column => { + return `
+ +
+ ${ + !column.column.collapsed + ? `
+ ${escapeHTML(column.column.label)} + (${column.columnState.cardsCount}) +
` + : "" + } + ${ + !column.column.collapsed + ? `
+ +
` + : "" + }`; + }), + collapsedTemplate: template(column => { + return `
+
${escapeHTML(column.column.label)} (${ + column.columnState?.cardsCount + })
+
`; + }), + confirmDeletion: true +}; + +new kanban.Kanban("#root", { + cards, + columns, + rows, + columnShape, + // другие параметры +}); +~~~ + +**История изменений:** +- Параметр ***css*** добавлен в версии 1.4 +- Параметр ***menu.items[0].label*** устарел и заменён на ***menu.items[0].text*** в версии 1.4 +- Параметр ***menu.items[0].items*** устарел и заменён на ***menu.items[0].data*** в версии 1.4 +- Параметр ***fixedHeaders*** добавлен в версии 1.5 +- Параметры ***headerTemplate*** и ***collapsedTemplate*** добавлены в версии 1.6 +- Параметры ***menu.items[0].label*** и ***menu.items[0].items*** удалены в версии 1.7 +- Функция ***menu.items*** обновлена: параметр **store** заменён на **readonly** в версии 1.7 + +**Связанные статьи:** [Конфигурация](guides/configuration.md) + +**Связанные примеры:** +- [Kanban. Изменение цвета колонки через кастомное меню](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [Kanban. Фиксированные заголовки, ленивый рендеринг и прокрутка колонок](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) +- [Kanban. Шаблон для заголовков колонок](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md new file mode 100644 index 0000000..b8d2c58 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md @@ -0,0 +1,36 @@ +--- +sidebar_label: currentUser +title: currentUser Конфигурация +description: Вы можете узнать о конфигурации currentUser в документации по библиотеке DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# currentUser + +### Описание + +@short: Необязательно. ID текущего пользователя + +:::note +ID текущего пользователя должен соответствовать одному из ID, указанных в свойстве [`cardShape.users`](api/config/js_kanban_cardshape_config.md). Если этот ID не указан, комментарии будут доступны только для чтения. +::: + +### Использование + +~~~jsx {} +currentUser?: string | number; +~~~ + +### Пример + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + currentUser: 1, + // другие параметры +}); +~~~ + +**История изменений:** Свойство было добавлено в версии v1.4 + +**Связанный пример:** [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md new file mode 100644 index 0000000..ed02a8c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md @@ -0,0 +1,62 @@ +--- +sidebar_label: редактор +title: конфигурация editor +description: Вы можете узнать о конфигурации редактора в документации по библиотеке DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# editor + +### Описание + +@short: Необязательно. Объект настроек для конфигурации редактора Kanban + +### Использование + +~~~jsx {} +editor?: { + show?: boolean, + autoSave?: boolean, + debounce?: number, + placement?: "sidebar" | "modal" +}; +~~~ + +### Параметры + +- `show` - (необязательно) - включает/отключает редактор +- `autoSave` - (необязательно) включает/отключает режим автосохранения редактора +- `debounce` - (необязательно) время задержки автосохранения данных (работает только с параметром ***autoSave: true***) +- `placement` - (необязательно) задаёт расположение редактора. Можно установить следующие значения: + - `"sidebar"` - отображает редактор в виде боковой панели + - `"modal"` - отображает редактор в виде модального окна + +### Конфигурация по умолчанию + +~~~jsx {} +editor: { + show: true, + debounce: 100, + autoSave: true, + placement: "sidebar" +} +~~~ + +### Пример + +~~~jsx {4-8} +new kanban.Kanban("#root", { + columns, + cards, + editor: { + show: true + autoSave: true, + debounce: 2000, + placement: "modal" + } + // другие параметры +}); +~~~ + +**Изменения:** Параметр `placement` был добавлен в версии v1.6 + +**Связанные примеры:** [Kanban. Открытие редактора в модальном окне](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md new file mode 100644 index 0000000..850aae0 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md @@ -0,0 +1,44 @@ +--- +sidebar_label: editorAutoSave +title: Конфигурация editorAutoSave +description: Вы можете узнать о конфигурации editorAutoSave в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# + +

editorAutoSave

+ +:::danger +Начиная с версии 1.3, свойство `editorAutoSave` **устарело**. Для управления режимом "автосохранения" используйте свойство [`editor`](api/config/js_kanban_editor_config.md)! +::: + +### Описание + +@short: Необязательно. Включает/отключает режим автосохранения + +:::info +С помощью этого параметра можно включить или отключить режим автосохранения в Kanban. Если установить свойство **editorAutoSave** в значение **false**, редактор будет отображать кнопку "Сохранить" для сохранения отредактированных данных. +::: + +### Использование + +~~~jsx {} +editorAutoSave?: boolean; // (по умолчанию true) +~~~ + +### Конфигурация по умолчанию + +~~~jsx {} +editorAutoSave: true +~~~ + +### Пример + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + editorAutoSave: false, // отключить автосохранение + // другие параметры +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md new file mode 100644 index 0000000..581fd0d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md @@ -0,0 +1,472 @@ +--- +sidebar_label: editorShape +title: Конфигурация editorShape +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете узнать о конфигурации editorShape. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# editorShape + +### Описание + +@short: Необязательно. Массив объектов с настройками для управления внешним видом и функциональностью редактора Kanban + +### Использование + +~~~jsx {3,8,28,42,52,73,88,97,108,117,125} +editorShape?: [ + { + // общие параметры для всех типов + type: string, + key: string, + label?: string, + + // только для типа "dateRange" + key: { + start: string, + end: string + }, + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + done?: boolean, + error?: boolean, + format?: string, + months?: number, + placeholder?: string, + title?: string, + width?: string + }, + + // только для типа "date" + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + error?: boolean, + format?: string, + placeholder?: string, + title?: string, + width?: string + }, + + // только для типа "color" + values?: array, + config?: { + clear?: boolean, + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string + }, + + // только для типов "combo", "select" и "multiselect" + values?: [ + { + id: string | number, + label: string, + avatar?: string // только для типа "multiselect" + }, + {...} // другие опции + ], + config?: { + clear?: boolean, // для типов "combo" и "color" + label?: string, // только для типа "select" + checkboxes?: boolean, // только для типа "multiselect" + // общие параметры + disabled?: boolean, + error?: boolean, + placeholder?: string, + textField?: string, + title?: string + }, + + // только для типа "text" + config?: { + css?: string, + disabled?: boolean, + error?: boolean, + focus?: boolean, + icon?: string, + inputStyle?: string, + placeholder?: string, + readonly?: boolean, + select?: boolean, + title?: string, + type?: string + }, + + // только для типа "textarea" + config? { + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string, + readonly?: boolean + }, + + // только для типа "progress" + config?: { + disabled?: boolean, + label?: string, + max?: number, + min?: number, + step?: number, + title?: string, + width?: number + }, + + // только для типа "files" + uploadURL?: string | function, + config?: { + accept?: string, + disabled?: boolean, + multiple?: boolean, + folder?: boolean, + }, + + // только для типа "comments" + config?: { + format?: string, + placement?: "page" | "editor", + html?: boolean, + confirmDeletion?: boolean + }, + + // только для типа "links" + config?: { + confirmDeletion?: boolean + }, + }, { /* другие настройки контролов */ } +]; +~~~ + +### Параметры + +Для настройки внешнего вида и функциональности редактора можно указать следующие параметры (поля): + +#### - Общие параметры для всех типов + +- `type` - (обязательно) тип поля редактора + +:::important +В редакторе Kanban можно использовать следующие типы полей: **dateRange**, **date**, **combo**, **select**, **multiselect**, **color**, **text**, **textarea**, **progress**, **files**, **comments** и **links** +::: + +- `key` - (обязательно) ключ поля редактора. Здесь нужно использовать значение, указанное в свойстве [`cardShape`](api/config/js_kanban_cardshape_config.md). Пример ниже: + +~~~js {8,17} + // настройки внешнего вида карточки + const cardShape = { + ...kanban.defaultCardShape, + headerFields: [ + { // пользовательское поле + label: "Custom field", + css: "custom_style", + key: "custom_key" + } + ] + }; + // настройки внешнего вида редактора + const editorShape = [ + { + label: "Custom field", + type: "text", + key: "custom_key" + } + ]; +~~~ + +- `label` - (необязательно) метка поля редактора + +#### - Параметры для типа "dateRange" + +- `key` - (обязательно) объект с ключами поля редактора. Здесь можно указать следующие параметры: + - `start` - (обязательно) ключ даты начала + - `end` - (обязательно) ключ даты окончания + +:::important +Значения этих ключей используются в свойстве [`cardShape`](api/config/js_kanban_cardshape_config.md)! +::: + +- `config` - (необязательно) объект конфигурации поля **"dateRange"**. Здесь можно указать следующие параметры: + - `align` - (необязательно) задаёт выравнивание всплывающего окна с календарями относительно элемента Date Range + - `editable` - (необязательно) определяет, можно ли редактировать дату, и опционально задаёт формат для редактирования даты + - `buttons` - (необязательно) показывает/скрывает кнопки Today и Clear в нижней части всплывающего окна с календарями + - `css` - (необязательно) изменяет позицию иконки в контроле Date Range + - `disabled` - (необязательно) определяет, отключён ли контрол Date Range + - `done` - (необязательно) показывает/скрывает кнопку Done в контроле Date Range + - `error` - (необязательно) применяет стили для отображения ошибки в контроле Date Range + - `format` - (необязательно) задаёт формат даты для контрола Date Range. Доступные параметры описаны [здесь](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `months` - (необязательно) задаёт количество календарей в контроле Date Range + - `placeholder` - (необязательно) задаёт плейсхолдер для контрола Date Range + - `title` - (необязательно) задаёт заголовок с дополнительной информацией о контроле Date Range + - `width` - (необязательно) задаёт ширину всплывающего окна с календарями + +#### - Параметры для типа "date" + +- `config` - (необязательно) объект конфигурации поля **"date"**. Здесь можно указать следующие параметры: + - `align` - (необязательно) задаёт выравнивание всплывающего окна с календарями относительно элемента Date + - `editable` - (необязательно) определяет, можно ли редактировать дату, и опционально задаёт формат для редактирования даты + - `buttons` - (необязательно) показывает/скрывает кнопки Today и Clear в нижней части всплывающего окна с календарями + - `css` - (необязательно) изменяет позицию иконки в контроле Date + - `disabled` - (необязательно) определяет, отключён ли контрол Date + - `error` - (необязательно) применяет стили для отображения ошибки в контроле Date + - `format` - (необязательно) задаёт формат даты для контрола Date. Доступные параметры описаны [здесь](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placeholder` - (необязательно) задаёт плейсхолдер для контрола Date + - `title` - (необязательно) задаёт заголовок с дополнительной информацией о контроле Date + - `width` - (необязательно) задаёт ширину всплывающего окна с календарями + +#### - Параметры для типа "color" + +- `values` - (необязательно) массив с допустимыми HEX-кодами +- `config` - (необязательно) объект конфигурации поля **"color"**. Здесь можно указать следующие параметры: + - `placeholder` - (необязательно) задаёт плейсхолдер для контрола Color + - `clear` - (необязательно) показывает/скрывает иконку "очистить" для контрола Color + - `disabled` - (необязательно) определяет, отключён ли контрол Color + - `error` - (необязательно) применяет стили для отображения ошибки в контроле Color + - `title` - (необязательно) задаёт заголовок с дополнительной информацией, связанной с контролом Color + +#### - Параметры для типов "combo", "select" и "multiselect" + +- `values` - (необязательно) массив объектов с данными для выпадающего списка. Здесь можно указать следующие параметры: + - `id` - (обязательно) ID опции + - `label` - (обязательно) метка опции + - `avatar` - (необязательно) путь к изображению для превью опции (только для типа **"multiselect"**) + +:::important +Для выбора одного пользователя используйте типы ***"select"*** или ***"combo"***! Для выбора нескольких пользователей — тип ***"multiselect"***. +::: + +- `config` - (необязательно) объект конфигурации для полей **"combo"**, **"select"** и **"multiselect"**. Здесь можно указать следующие параметры: + - `clear` - (необязательно) добавляет кнопку Очистить в поле ввода combo (**только для типов "combo" и "color"**) + - `label` - (необязательно) связывает опции с полем ввода по указанному ключу (**только для типа "select"**) + - `checkboxes` - (необязательно) отображает чекбоксы рядом с опциями (**только для типа "multiselect"**) + - `textField` - (необязательно) связывает опции combo с полем ввода по указанному ключу (**для типов "combo" и "multiselect"**) + + - `disabled` - (необязательно) определяет, отключён ли контрол + - `error` - (необязательно) применяет стили для отображения ошибки в контроле + - `placeholder` - (необязательно) задаёт плейсхолдер для контрола + - `title` - (необязательно) задаёт заголовок с дополнительной информацией о контроле + +#### - Параметры для типа "text" + +- `config` - (необязательно) объект конфигурации поля **"text"**. Здесь можно указать следующие параметры: + - `css` - (необязательно) задаёт позицию иконки в контроле Text + - `disabled` - (необязательно) определяет, отключён ли контрол Text + - `error` - (необязательно) применяет стили для отображения ошибки в контроле Text + - `focus` - (необязательно) устанавливает фокус в контроле Text + - `icon` - (необязательно) добавляет иконку в контрол Text + - `inputStyle` - (необязательно) применяет пользовательский стиль к контролу Text + - `placeholder` - (необязательно) задаёт плейсхолдер для контрола Text + - `readonly` - (необязательно) делает контрол Text только для чтения + - `select` - (необязательно) выделяет содержимое контрола Text + - `title` - (необязательно) задаёт заголовок с дополнительной информацией, связанной с контролом Text + - `type` - (необязательно) задаёт тип контрола Text + +#### - Параметры для типа "textarea" + +- `config` - (необязательно) объект конфигурации поля **"textarea"**. Здесь можно указать следующие параметры: + - `disabled` - (необязательно) определяет, отключён ли контрол Textarea + - `error` - (необязательно) применяет стили для отображения ошибки в контроле Textarea + - `placeholder` - (необязательно) задаёт плейсхолдер для контрола Textarea + - `title` - (необязательно) задаёт заголовок с дополнительной информацией, связанной с контролом Textarea + - `readonly` - (необязательно) делает контрол Textarea только для чтения + +#### - Параметры для типа "progress" + +- `config` - (необязательно) объект конфигурации поля **"progress"**. Здесь можно указать следующие параметры: + - `disabled` - (необязательно) определяет, отключён ли контрол Progress + - `label` - (необязательно) задаёт метку над контролом Progress + - `max` - (необязательно) задаёт максимальное значение контрола Progress + - `min` - (необязательно) задаёт минимальное значение контрола Progress + - `step` - (необязательно) задаёт шаг изменения значения контрола Progress + - `title` - (необязательно) задаёт заголовок с дополнительной информацией, связанной с контролом Progress + - `width` - (необязательно) задаёт ширину контрола Progress + +#### - Параметры для типа "files" + +- `uploadURL` - (необязательно) URL загрузчика редактора. Подробнее ниже + +
+ +Свойство `uploadURL` может быть указано как **строка**, так и **функция**. Пример установки URL загрузки через функцию: + +~~~jsx {} +uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // токен или другие заголовки + } + }; + + return fetch(url + "/uploads", config) // URL здесь + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); +} +~~~ + +где `rec` — единственный параметр функции, расширенный объект `PointerEvent` (нативный тип плюс 4 наших свойства): + +~~~jsx {} +interface UploadEvent extends PointerEvent { + id: number; + status: "client" | "server" | "error"; // означает "ещё не отправлено", "успешно отправлено", "произошла ошибка, не отправлено" + name: string; // имя файла + file: string | Blob; // файл +} +~~~ + +
+ +- `config` - (необязательно) объект конфигурации поля **"files"**. Здесь можно указать следующие параметры: + - `accept` - (необязательно) типы файлов для загрузки (***"image/*", "video/*", "audio/*"*** и другие) + - `disabled` - (необязательно) включение/отключение загрузки *файлов* + - `multiple` - (необязательно) включение/отключение загрузки *нескольких файлов* + - `folder` - (необязательно) включение/отключение загрузки *папок* + +#### - Параметры для типа "comments" + +- `config` - (необязательно) объект конфигурации поля **"comments"**. Здесь можно указать следующие параметры: + - `format` - (необязательно) формат даты комментариев. Доступные форматы описаны [здесь](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placement` - (необязательно) место отображения комментариев. Можно задать следующие значения: + - `"editor"` - комментарии отображаются в редакторе + - `"page"` - комментарии отображаются в отдельной панели + - `html` - (необязательно) включение/отключение использования HTML-разметки в комментариях + - `confirmDeletion` - (необязательно) показывает/скрывает **диалог подтверждения**, позволяющий пользователям подтвердить или отменить удаление комментария + +#### - Параметры для типа "links" + +- `config` - (необязательно) объект конфигурации поля **"links"**. Здесь можно указать следующие параметры: + - `confirmDeletion` - (необязательно) показывает/скрывает **диалог подтверждения**, позволяющий пользователям подтвердить или отменить удаление ссылки + +:::info +Если вы не указываете настройки редактора через свойство `editorShape`, виджет применит набор параметров **defaultEditorShape** по умолчанию! +::: + +### Конфигурация по умолчанию + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "High" }, + { id: 2, color: "#F1B941", label: "Medium" }, + { id: 3, color: "#77D257", label: "Low" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +const defaultEditorShape = [ + { + key: "label", + type: "text", + label: "Label" + }, + { + key: "description", + type: "textarea", + label: "Description" + }, + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clear: true + } + }, + { + type: "color", + label: "Color", + key: "color" + }, + { + type: "progress", + key: "progress", + label: "Progress" + }, + { + type: "date", + key: "start_date", + label: "Start date" + }, + { + type: "date", + key: "end_date", + label: "End date" + }, + { + type: "multiselect", + key: "users", + label: "Users" + } +]; +~~~ + +### Пример + +~~~jsx {6-33,38} +const users = [ // данные пользователей + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const editorShape = [ // настройки редактора + ...kanban.defaultEditorShape, // включаем настройки по умолчанию + { // добавляем пользовательские поля + type: "multiselect", + key: "users", + label: "Users", + values: users + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", + html: true, + confirmDeletion: true + } + }, + { + type: "links", + key:"links", + label: "Links", + config: { + confirmDeletion: true + } + } +]; + +new kanban.Kanban("#root", { + cards, + columns, + editorShape, + // другие параметры +}); +~~~ + +**История изменений:** + +- Тип ***dateRange*** добавлен в версии v1.3 +- Типы редактора ***comments*** и ***links***, а также параметр ***format*** добавлены в версии v1.4 +- Параметр ***clearButton*** заменён на ***clear*** + +**Связанные статьи:** [Конфигурация](guides/configuration.md/#editor) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md new file mode 100644 index 0000000..b51fa9f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: history +title: history Config +description: Вы можете узнать о конфигурации history в документации библиотеки DHTMLX JavaScript Kanban. Просматривайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# history + +### Описание + +@short: Необязательно. Включает/отключает управление историей изменений + +:::info +С помощью свойства `history` вы можете включить или отключить управление историей Kanban. Если установить его в **false**, вы не сможете управлять историей через API и элементы управления на Панели инструментов. +::: + +:::tip +Вы также можете пропускать некоторые операции в истории Kanban, используя параметр [`$meta`](api/common/js_kanban_meta_parameter.md) с методами и событиями! +::: + +### Использование + +~~~jsx {} +history?: boolean; +~~~ + +### Конфигурация по умолчанию + +~~~jsx {} +history: true +~~~ + +### Пример + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + history: false, // отключить управление историей + // другие параметры +}); +~~~ + +**История изменений:** Свойство добавлено в версии v1.3 + +**Связанные статьи:** [`undo()`](api/methods/js_kanban_undo_method.md) и [`redo()`](api/methods/js_kanban_redo_method.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md new file mode 100644 index 0000000..2d05140 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: links +title: Конфигурация links +description: Вы можете узнать о конфигурации links в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную оценочную версию DHTMLX Kanban. +--- + +# links + +### Описание + +@short: Необязательный параметр. Массив объектов, содержащих данные связей (links). + +### Использование + +~~~jsx {} +links?: [ + { + id: string | number, + source: string | number, + target: string | number, + relation: "relatesTo" | "requiredFor" | "duplicate" | "parent" + }, {...} // другие данные связей +]; +~~~ + +### Параметры + +Для каждой связи (link) можно указать следующие параметры (данные): + +- `id` - (обязательный) идентификатор связи +- `source` – (обязательный) ID карточки в начале связи (например, «Задача A требуется для Задачи B») +- `target` – (обязательный) ID карточки в конце связи (например, «Задача B зависит от Задачи A») +- `relation` - (обязательный) тип связи. Можно указать следующие типы: + - ***"relatesTo"*** - определяет зависимость между задачами, где текущая задача связана с другой + - ***"requiredFor"*** - определяет зависимость между задачами, где одна задача требует выполнения другой + - ***"duplicate"*** - определяет зависимость между дублированными задачами + - ***"parent"*** - определяет зависимость между родительской (мастер) и дочерней (слейв) задачами + +:::info +Если вы хотите динамически загружать новые данные для links, вы можете использовать метод [**parse()**](api/methods/js_kanban_parse_method.md)! +::: + +### Пример + +~~~jsx {1-8,13} +const links = [ + { + id: 1, + source: 2, + target: 5, + relation: "relatesTo", + }, {...} // другие данные связи +]; + +new kanban.Kanban("#root", { + columns, + cards, + links + // другие параметры +}); +~~~ + +**Журнал изменений:** Свойство обновлено в версии v1.7: + - Параметр **masterId** заменён на **source** + - Параметр **slaveId** заменён на **target** + +**Связанные статьи:** [Работа с данными](guides/working_with_data.md) + +**Связанный пример:** [Kanban. Связи между задачами](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md new file mode 100644 index 0000000..d2a2cb5 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md @@ -0,0 +1,45 @@ +--- +sidebar_label: locale +title: locale Конфигурация +description: Вы можете ознакомиться с конфигурацией locale в документации по библиотеке DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# locale + +### Описание + +@short: Необязательно. Объект с пользовательской локалью Kanban + +:::info +Объект **locale** должен содержать все метки Kanban и Toolbar с соответствующими переводами. +::: + +### Использование + +~~~jsx {} +locale?: object; +~~~ + +### Конфигурация по умолчанию + +По умолчанию Kanban использует локаль [**английский**](guides/localization.md#default-locale). Вы также можете установить пользовательскую локаль. + +:::tip +Для динамического изменения текущей локали можно использовать метод [**setLocale()**](api/methods/js_kanban_setlocale_method.md) Kanban +::: + +### Пример + +~~~jsx {5} +// создание Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // изначально будет установлена локаль "cn" + // другие параметры +}); +~~~ + +**Связанные статьи:** [Локализация](guides/localization.md) + +**Связанный пример:** [Kanban. Локализация](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md new file mode 100644 index 0000000..e4c419c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: readonly +title: readonly Конфигурация +description: Вы можете ознакомиться с конфигурацией readonly в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# readonly + +### Описание + +@short: Необязательно. Включает/отключает редактирование, добавление, выделение и перетаскивание карточек + +### Использование + +~~~js {} +readonly?: boolean; +//или +readonly?: { + edit?: boolean, + add?: boolean, + select?: boolean, + dnd?: boolean +}; +~~~ + +### Параметры + +Для настройки **readonly режима** можно использовать **короткий** или **расширенный** параметры. + +**Короткий** параметр: +- `readonly` - (необязательно) включает/отключает **readonly режим** Kanban + +**Расширенные** параметры: +- `readonly` - (необязательно) объект с расширенными настройками. Здесь можно указать следующие параметры: + - `edit` - (необязательно) включает/отключает **редактирование** карточек + - `add` - (необязательно) включает/отключает **добавление** новых карточек + - `select` - (необязательно) включает/отключает **выделение** карточек + - `dnd` - (необязательно) включает/отключает **перетаскивание** карточек + +### Конфигурация по умолчанию + +~~~jsx {} +readonly: false // readonly режим отключён +//или +readonly: { + edit: true, // редактирование включено + add: true, // добавление включено + select: true, // выделение включено + dnd: true // перетаскивание включено +} +~~~ + +### Пример + +~~~jsx {4-9} +new kanban.Kanban("#root", { + cards, + columns, + readonly: { + edit: false, // отключить редактирование + add: true, // включить добавление + select: false, // отключить выделение + dnd: true // включить перетаскивание + }, + // другие параметры +}); +~~~ + +**Связанный пример:** [Readonly mode](https://snippet.dhtmlx.com/b8x84yln?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md new file mode 100644 index 0000000..1bd876e --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: renderType +title: renderType Конфигурация +description: Вы можете узнать о конфигурации renderType в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# renderType + +### Описание + +@short: Опционально. Определяет тип рендеринга карточек + +:::info +Это свойство используется при работе с большим количеством карточек. Если установить значение *"lazy"*, виджет будет рендерить только визуальную часть карточек, которые видны на доске. Это может значительно повысить производительность виджета. +::: + +### Использование + +~~~jsx {} +renderType?: "default" | "lazy"; +~~~ + +:::important +Если вы используете настройки `renderType: "lazy"` и [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md) вместе, не забудьте указать статическую высоту карточек через свойство [`cardHeight`](api/config/js_kanban_cardheight_config.md). Если этого не сделать, карточки будут отображаться некорректно. +::: + +### Конфигурация по умолчанию + +~~~jsx {} +renderType: "default" +~~~ + +### Пример + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + renderType: "lazy", + // другие параметры +}); +~~~ + +**История изменений:** Свойство добавлено в версии v1.2 + +**Связанные статьи:** [Конфигурация](guides/configuration.md#cards) + +**Связанный пример:** [Kanban. Фиксированные заголовки, ленивый рендеринг и прокрутка колонок](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md new file mode 100644 index 0000000..fc181e6 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: rowKey +title: Конфигурация rowKey +description: Вы можете ознакомиться с конфигурацией rowKey в документации JavaScript-библиотеки DHTMLX Kanban. Изучите руководства для разработчиков и справочник API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# rowKey + +### Описание + +@short: Необязательно. Определяет принадлежность карточки к строке + +:::info +Для распределения карточек по строкам (swimlanes) необходимо указать **пользовательский ключ** и установить его в **ID** нужной строки в объекте данных карточки. Свойство **rowKey** должно быть установлено в этот *пользовательский ключ* в объекте конфигурации виджета. +::: + +### Использование + +~~~jsx {} +rowKey?: string; +~~~ + +### Пример + +~~~jsx {4,8,16} +const cards = [ + { + label: "Backlog task", + row_custom_key: "feature" + }, + { + label: "In progress task", + row_custom_key: "done" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + rowKey: "row_custom_key", + // другие параметры +}); +~~~ + +**Связанный пример:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md new file mode 100644 index 0000000..5d12cca --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md @@ -0,0 +1,65 @@ +--- +sidebar_label: rows +title: Конфигурация rows +description: Вы можете узнать о конфигурации rows в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# rows + +### Описание + +@short: Необязательно. Массив объектов, содержащих данные строк (swimlanes) + +### Использование + +~~~jsx {} +rows?: [ + { + id: string, + label?: string, + collapsed?: boolean, + css?: string, + }, {...} // другие данные строки +]; +~~~ + +:::info +Для создания Swimlanes необходимо указать соответствующие данные в массиве свойства **rows**. Вы можете сворачивать/разворачивать, переименовывать, удалять и перемещать swimlanes через UI или используя [соответствующий API](howtos.md#how-to-work-with-rows-swimlanes) +::: + +### Параметры + +Для каждой строки (swimlane) можно указать следующие параметры (данные): + +- `id` - (обязательно) **ID** строки (swimlane). Используется для управления строкой через соответствующие методы +- `label` - (необязательно) метка строки (swimlane). Отображается в разделе строки +- `collapsed` - (необязательно) текущее состояние строки (swimlane). Если ***true***, строка изначально свернута. Значение по умолчанию — ***false*** (развернутое состояние) +- `css` - (необязательно) задаёт CSS-стили для отдельной строки + +:::info +Если вы хотите динамически загружать новые данные для строк (swimlanes), вы можете использовать метод [**parse()**](api/methods/js_kanban_parse_method.md)! +::: + +### Пример + +~~~jsx {1-4,9} +const rows = [ + { label: "Feature", id: "feature", collapsed: false, css: "red" }, + { label: "Task", id: "task", collapsed: true } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, // данные swimlanes + // другие параметры +}); +~~~ + +**История изменений:** Параметр ***css*** был добавлен в версии v1.4 + +**Связанные статьи:** +- [Работа с данными](guides/working_with_data.md) +- [updateRow()](api/methods/js_kanban_updaterow_method.md) + +**Связанный пример:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md new file mode 100644 index 0000000..f52cd5e --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md @@ -0,0 +1,188 @@ +--- +sidebar_label: rowShape +title: Конфигурация rowShape +description: Вы можете узнать о конфигурации rowShape в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# rowShape + +### Описание + +@short: Необязательно. Объект настроек для управления внешним видом строк + +### Использование + +~~~jsx {} +rowShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, row }) => void, + data?: array // массив подменю элементов меню + }, {...} // данные других элементов + ] | ({ row, rowIndex, rows, readonly }) => array | null + }, + css?: (row, cards) => string, + confirmDeletion?: boolean +}; +~~~ + +### Параметры + +Для настройки внешнего вида строк в объекте **rowShape** можно указать следующие параметры: + +- `menu` - (необязательно) объект параметров контекстного меню строк. Здесь можно указать следующие параметры: + - `show` - (необязательно) включает/отключает контекстное меню строки + - `items` - (необязательно) массив объектов с параметрами элементов контекстного меню строк. Для каждого элемента можно указать следующие параметры: + - `id` - (необязательно) ID элемента меню. Для реализации встроенных действий необходимо указать следующие значения: + - ***"set-edit"*** - определяет действие редактирования имени строки + - ***"move-row:up"*** - определяет действие перемещения строки вверх + - ***"move-row:down"*** - определяет действие перемещения строки вниз + - ***"delete-row"*** - определяет действие удаления строки + + - `icon` - (необязательно) класс иконки элемента меню. Здесь можно указать любую иконку из икон шрифтов (*mdi-delete*) + - `text` - (необязательно) название элемента меню + - `disabled` - (необязательно) состояние элемента меню (*активен* или *отключен* в зависимости от *boolean* значения) + - `onClick` - (необязательно) пользовательская функция обратного вызова, принимающая следующие аргументы: + - ***id*** - ID текущего элемента меню + - ***item*** - объект данных текущего элемента меню + - ***row*** - объект данных целевой строки + + - `data` - (необязательно) массив объектов, представляющих подэлементы меню + + :::info + Также параметр `menu.items` можно задать в виде пользовательской функции, которая принимает следующие аргументы: + - ***row*** - объект данных текущей строки + - ***rowIndex*** - индекс текущей строки + - ***rows*** - массив объектов со всеми данными строк + - ***readonly*** - объект с [readonly свойствами состояния](api/internal/js_kanban_getstate_method.md) + + Эта функция позволяет настраивать меню для любой строки или скрывать его для конкретной (возвращая *null* или *false*): + + ~~~jsx {} + items: ({ rowIndex }) => { + if(rowIndex == 0){ + return null; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", text: "Переименовать" }, + { + id: "custom-delete-row", + icon: "wxi-delete", + text: "Удалить строку" + }, + { + id: "custom-move-row:up", + icon: "wxi-arrow-up", + text: "Переместить вверх" + } + ]; + } + } + ~~~ + ::: + +- `css` - функция, возвращающая css-класс, который применяется к строкам условно +- `confirmDeletion` - (необязательно) показывает/скрывает **диалог подтверждения**, который позволяет пользователям подтвердить или отменить удаление строки + +### Конфигурация по умолчанию + +~~~jsx {} +const getDefaultRowMenuItems = ({ row, rowIndex, rows, readonly }) => [ + { id: "set-edit", icon: "wxi-edit", text: "Переименовать" }, + { + id: "move-row:up", + icon: "wxi-arrow-up", + text: "Переместить вверх", + disabled: rowIndex <= 0 + }, + { + id: "move-row:down", + icon: "wxi-arrow-down", + text: "Переместить вниз", + disabled: rowIndex >= rows.length - 1 + }, + { id: "delete-row", icon: "wxi-delete", text: "Удалить" } +]; +const rowShape = { + menu: { + show: true, + items: getDefaultRowMenuItems + }, + confirmDeletion: true +}; +~~~ + +### Пример + +~~~jsx {10-43,48} +const changeRowColor = (row, cssClass) => board.updateRow({ + id: row.id, + row: { + css: cssClass, + collapsed: false + }, + replace: false +}); + +const rowShape = { + menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + if (rowIndex == 0){ + return false; + } else { + return [ + { + id: "color", + text: "Цвет", + data: [ + { + id:"gray", + text: "Серый", + onClick: ({ id, item, row }) => changeRowColor(row, "gray") + }, + { + id:"yellow", + text: "Жёлтый", + onClick: ({ id, item, row }) => changeRowColor(row, "yellow") + }, + { + id:"red", + text: "Красный", + onClick: ({ id, item, row }) => changeRowColor(row, "red") + } + ] + } + ]; + } + } + }, + css: (row, cards) => row.id == "task" && cards.length < 3 ? "green" : "red", + confirmDeletion: false +}; + +new kanban.Kanban("#root", { + cards, + rows, + rows, + rowShape, + // другие параметры +}); +~~~ + +**История изменений:** +- Параметр ***css*** был добавлен в версии v1.4 +- Параметр ***menu.items[0].label*** устарел и был заменён на ***menu.items[0].text*** в версии v1.4 +- Параметр ***menu.items[0].items*** устарел и был заменён на ***menu.items[0].data*** в версии v1.4 +- Параметры ***menu.items[0].label*** и ***menu.items[0].items*** были удалены в версии v1.7 +- Функция ***menu.items*** была обновлена. Параметр **store** был заменён на **readonly** в версии v1.7 + +**Связанные статьи:** [Конфигурация](guides/configuration.md) + +**Связанный пример:** [Kanban. Изменение цвета строк через пользовательское меню](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md new file mode 100644 index 0000000..55125a7 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scrollType +title: Конфигурация scrollType +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете узнать о конфигурации scrollType. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# scrollType + +### Описание + +@short: Необязательно. Определяет тип прокрутки + +### Использование + +~~~jsx {} +scrollType?: "default" | "column"; +~~~ + +:::note +Если вы используете настройку `scrollType: "column"`, вы сможете прокручивать каждую колонку отдельно. +::: + +### Конфигурация по умолчанию + +~~~jsx {} +scrollType: "default" +~~~ + +:::important +Если вы комбинируете настройки [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) и `scrollType: "default"`, не забудьте указать статическую высоту для карточек через свойство [`cardHeight`](api/config/js_kanban_cardheight_config.md). Если не указать это, карточки не будут отображаться. +::: + +### Пример + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + scrollType: "column", + // другие параметры +}); +~~~ + +**Изменения:** Свойство добавлено в версии v1.2 + +**Связанные статьи:** [Конфигурация](guides/configuration.md#cards) + +**Связанный пример:** [Kanban. Фиксированные заголовки, ленивый рендеринг и прокрутка колонок](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md new file mode 100644 index 0000000..a8bd5f6 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md @@ -0,0 +1,98 @@ +--- +sidebar_label: theme +title: Конфигурация темы +description: Вы можете ознакомиться с конфигурацией темы в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# theme + +### Описание + +@short: Необязательно. Тема, которая будет применена к Kanban + +### Использование + +~~~jsx {} +theme?: { + name: string, // "material" (по умолчанию) | "willow" | "willow-dark" + fonts?: boolean +}; +~~~ + +:::important +Помимо использования свойства `theme`, нужную тему можно применить, добавив соответствующие *css* классы к контейнерам виджета: + +- **Тема Material** +~~~html {} + +
+ +
+~~~ + +- **Тема Willow** +~~~html {} + +
+ +
+~~~ + +- **Тема Willow-Dark** +~~~html {} + +
+ +
+~~~ + +или просто подключите нужную тему на страницу из папки skins: + +~~~html {} + +~~~ +::: + +### Параметры + +Для настройки **theme** можно использовать следующие параметры. + +- `theme` - (необязательно) объект с настройками темы. Здесь можно указать следующие параметры: + - `name` - (обязательно) имя темы, которая будет применена к Kanban + - `fonts` - (необязательно) включает или отключает загрузку шрифтов с CDN (шрифт wxi) + +:::tip +Вы также можете применять темы **Willow** и **Willow-Dark**. Для динамического изменения текущей темы используйте метод [`setTheme()`](api/methods/js_kanban_settheme_method.md). +::: + +### Конфигурация по умолчанию + +По умолчанию Kanban использует тему **Material**. + +~~~jsx {} +theme: { + name: "material", + fonts: true +} +~~~ + +### Пример + +~~~jsx {5-8} +// создание Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: { + name: "willow-dark", // изначально будет установлена тема "willow-dark" + fonts: false + } + // другие параметры +}); +~~~ + +**История изменений:** Свойство добавлено в версии v1.4 + +**Связанные статьи:** [Стилизация](guides/stylization.md) + +**Связанный пример:** [Kanban. Изменение темы через CSS класс](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md new file mode 100644 index 0000000..0fd58cc --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: api +title: api Config +description: Вы можете ознакомиться с конфигурацией api (Toolbar) в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# api + +### Описание + +@short: Обязательно. Объект с внутренним API Kanban + +:::info +В данном случае **внутренний API Kanban** используется для **элементов управления**, расположенных на Toolbar +::: + +### Использование + +~~~jsx {} +api: object; +~~~ + +### Пример + +~~~jsx {7} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api +}); +~~~ + +**Связанные статьи:** [Конфигурация](guides/configuration.md#toolbar) + +**Связанный пример:** [Kanban. Пользовательский toolbar](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md new file mode 100644 index 0000000..38dc18f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md @@ -0,0 +1,191 @@ +--- +sidebar_label: items +title: Конфигурация items +description: Вы можете узнать о конфигурации элементов (Toolbar) в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# items + +### Описание + +@short: Необязательно. Массив с элементами управления, расположенными на Toolbar Kanban. + +### Использование + +~~~jsx {} +items?: [ + "search" | { + // параметры поиска + type: "search", + options?: [ + { + id: string, + label: string, + searchRule?: (card, value, by) => { + return boolean + } + }, {...} + ], + resultTemplate?: template(searchResult => { + return "HTML-шаблон результата поиска"; + }) + }, + "sort" | { + // параметры сортировки + type: "sort", + options?: [ + { + text: string, + by?: string, // by?: ((card: object) => any), + dir?: "asc" | "desc" + }, {...} + ] + }, + "spacer", + "undo", + "redo", + "addColumn", + "addRow", + custom_control // строка или функция +]; +~~~ + +### Параметры + +В массиве **items** вы можете указать следующие параметры: + +:::info +#### Для установки *стандартной панели поиска* можно указать строку `"search"`. +#### Для установки *пользовательской панели поиска* можно указать объект со следующими параметрами: + +- `type` - (обязательно) тип элемента управления (*"search"*) +- `options` - (необязательно) массив объектов, определяющих параметры поиска. Для каждого объекта (*опции поиска*) можно указать следующие параметры: + - `id` - (обязательно) ключ поля карточки, по которому будет осуществляться поиск + - `label` - (обязательно) название опции, используемое в выпадающем списке выбора в панели поиска + - `searchRule` (необязательно) - пользовательская функция, позволяющая определить правила поиска. Принимает следующие аргументы: + - ***card*** - объект с данными карточки + - ***value*** - искомое значение, введённое в строку поиска + - ***by*** - ключ поля карточки, по которому осуществляется поиск +- `resultTemplate` - (необязательно) шаблон для отображения пользовательского результата поиска + +~~~jsx +items: [ + "search", // стандартная панель поиска + // другие элементы управления +] + +// или + +items: [ + { // пользовательская панель поиска + type: "search", + options: [ + { + id: "label", + label: "По названию" + }, + { + id: "start_date", + label: "По дате", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + // другие элементы управления +] +~~~ +::: + +:::info +#### Для установки *стандартного элемента сортировки* можно указать строку `"sort"`. +#### Для установки *пользовательского элемента сортировки* можно указать объект со следующими параметрами: + +- `type` - (обязательно) тип элемента управления (*"sort"*) +- `options` - (необязательно) массив объектов, определяющих параметры сортировки. Для каждого объекта (*опции сортировки*) можно указать следующие параметры: + - `text` - (обязательно) название опции, используемое в выпадающем списке выбора сортировки + - `by` - (необязательно) ключ поля карточки, по которому будет производиться сортировка. Этот параметр может быть строкой или функцией. Функция должна возвращать поле карточки для сортировки + - `dir` - (необязательно) порядок сортировки. Возможные значения: *"asc"* и *"desc"* + +~~~jsx +items: [ + "sort", // стандартный элемент сортировки + // другие элементы управления +] +// или +items: [ + { // пользовательский элемент сортировки + type: "sort", + options: [ + { + text: "Сортировать по названию", + by: "label", + dir: "asc" + }, + { + text: "Сортировать по описанию", + by: "description", + dir: "desc" + } + ] + }, {...} // другие элементы управления +] +~~~ +::: + +- `"spacer"` - пустое пространство между элементами управления +- `"undo"` - элемент управления для работы с историей (один клик — шаг назад) +- `"redo"` - элемент управления для работы с историей (один клик — шаг вперёд) +- `"addColumn"` - элемент управления для добавления новых колонок +- `"addRow"` - элемент управления для добавления новых строк +- `custom_control` - (необязательно) пользовательский элемент управления. Здесь можно указать пользовательские элементы как **строку**, так и **функцию**. Подробнее смотрите раздел [Customization](guides/customization.md#custom-toolbar) + +### Пример + +~~~jsx {8-24} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { + type: "search", + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", + "sort", + "undo", + "redo", + "addColumn", + "addRow" + ] +}); +~~~ + +**История изменений:** + +- Элементы *"Undo"* и *"Redo"* были добавлены в версии v1.3 +- Параметр ***items.options[0].label*** элемента **sort** был заменён на ***items.options[0].text*** в версии v1.4 +- Параметр ***items.searchResult*** элемента **"search"** был добавлен в версии v1.6 + +**Связанные статьи:** [Конфигурация](guides/configuration.md#toolbar) и [Настройка](guides/customization.md#custom-toolbar) + +**Связанные примеры:** +- [Kanban. Пользовательский Toolbar](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) +- [Kanban. Настройка подсказок в результатах поиска](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md new file mode 100644 index 0000000..5efe890 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md @@ -0,0 +1,47 @@ +--- +sidebar_label: locale +title: Конфигурация locale +description: Вы можете узнать о конфигурации locale (панели инструментов) в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# locale + +### Описание + +@short: Необязательно. Объект с пользовательской локализацией панели инструментов (Toolbar) + +:::info +Объект **locale** должен содержать все метки Kanban и Toolbar с соответствующими переводами. +::: + +### Использование + +~~~jsx {} +locale?: object; +~~~ + +### Конфигурация по умолчанию + +По умолчанию Toolbar использует локаль [**английский**](guides/localization.md#default-locale). Вы также можете задать пользовательскую локаль. + +:::tip +Чтобы динамически изменить текущую локаль, используйте метод [**setLocale()**](api/methods/toolbar_setlocale_method.md) панели инструментов (Toolbar). +::: + +### Пример + +~~~jsx {8} +// создаём Kanban +const board = new kanban.Kanban("#root", { + locale: cn +}); +// создаём Toolbar +new kanban.Toolbar("#toolbar", { + api: board.api, + locale: cn // применяем локаль "cn" к Toolbar +}); +~~~ + +**Связанные статьи:** [Локализация](guides/localization.md) + +**Связанный пример:** [Kanban. Локализация](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md new file mode 100644 index 0000000..ccd7604 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md @@ -0,0 +1,82 @@ +--- +sidebar_label: theme +title: Конфигурация theme +description: Вы можете узнать о конфигурации темы (Toolbar) в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# theme + +### Описание + +@short: Необязательно. Тема, которая будет применена к Toolbar + +### Использование + +~~~jsx {} +theme?: string; // "material" | "willow" | "willow-dark" +~~~ + +:::important +Помимо использования свойства `theme`, нужную тему можно применить, добавив соответствующие *css* классы к контейнерам виджетов: + +- **Тема Material** +~~~html {} + +
+ +
+~~~ + +- **Тема Willow** +~~~html {} + +
+ +
+~~~ + +- **Тема Willow-Dark** +~~~html {} + +
+ +
+~~~ + +или просто подключите нужную тему на странице из папки skins: + +~~~html {} + +~~~ +::: + +### Конфигурация по умолчанию + +По умолчанию Toolbar использует тему **Material**. Вы также можете установить темы **Willow** и **Willow-Dark**. + +:::tip +Чтобы динамически изменить текущую тему, вы можете использовать метод [**setConfig()**](api/methods/toolbar_setconfig_method.md). +::: + +### Пример + +~~~jsx {5,11} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: "willow-dark" // изначально будет установлена тема "willow-dark" + // другие параметры +}); +// создаём Toolbar +new Toolbar("#toolbar", { + api: board.api, + theme: "willow-dark", // изначально будет установлена тема "willow-dark" +}); +~~~ + +**История изменений:** Свойство добавлено в версии v1.4 + +**Связанные статьи:** [Стилизация](guides/stylization.md) + +**Связанный пример:** [Kanban. Изменение темы через CSS класс](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md new file mode 100644 index 0000000..8bf4c4c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: add-card +title: Событие add-card +description: Вы можете ознакомиться с событием add-card в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# add-card + +### Описание + +@short: Срабатывает при добавлении новой карточки + +### Использование + +~~~jsx {} +"add-card": ({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object, + skipProvider?: boolean, +}) => void; +~~~ + +### Параметры + +Обработчик события **add-card** принимает объект со следующими параметрами: + +- `columnId` - (обязательный) ID целевой колонки +- `id` - (необязательный) ID новой карточки +- `rowId` - (необязательный) ID целевой строки +- `before` - (необязательный) ID карточки, перед которой будет размещена новая карточка +- `select` - (необязательный) включает/отключает выделение вновь добавленной карточки +- `card` - (необязательный) объект данных новой карточки. Полный список параметров карточки доступен [здесь](api/config/js_kanban_cards_config.md) +- `skipProvider` - (необязательный) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий можно использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "add-card" +board.api.on("add-card", (obj) => { + console.log(obj.columnId); +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md new file mode 100644 index 0000000..1b35823 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-column +title: Событие add-column +description: Вы можете узнать о событии add-column в документации по библиотеке DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демонстрации, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# add-column + +### Описание + +@short: Срабатывает при добавлении новой колонки + +### Использование + +~~~jsx {} +"add-column": ({ + id?: string | number, + column?: object, + before?: string | number, + skipProvider?: boolean, +}) => void; +~~~ + +### Параметры + +Колбэк события **add-column** может принимать объект со следующими параметрами: + +- `id` - (необязательно) ID новой колонки +- `column` - (необязательно) объект данных новой колонки. Полный список параметров **column** можно найти [**здесь**](api/config/js_kanban_columns_config.md) +- `before` - (необязательно) ID колонки, перед которой будет размещена новая колонка +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий можно использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "add-column" +board.api.on("add-column", (obj) => { + console.log(obj.label); +}); +~~~ + +**История изменений**: параметры **id**, **before** и **column** были добавлены в версии v1.1 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md new file mode 100644 index 0000000..3f96bec --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: add-comment +title: Событие add-comment +description: Вы можете узнать о событии add-comment в документации JavaScript-библиотеки DHTMLX Kanban. Просмотрите руководства для разработчиков и справочник API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# add-comment + +### Описание + +@short: Срабатывает при добавлении нового комментария + +### Использование + +~~~jsx {} +"add-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **add-comment** принимает объект со следующими параметрами: + +- `id` - (необязательный) ID нового комментария +- `cardId` - (обязательный) ID карточки, к которой добавляется комментарий +- `comment` - (обязательный) объект конфигурации нового комментария. Здесь можно указать следующие параметры: + - `text` - (необязательный) текст нового комментария + - `date` - (необязательный) дата нового комментария + - `html` - (необязательный) HTML-разметка нового комментария. Включите свойство `html` в конфигурации [`editorShape`](/api/config/js_kanban_editorshape_config/#--параметры-для-типа-comments), чтобы отображать HTML-разметку вместо текста +- `skipProvider` - (необязательный) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "add-comment" +board.api.on("add-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**Журнал изменений:** Событие добавлено в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md new file mode 100644 index 0000000..6aabf93 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: add-link +title: Событие add-link +description: Вы можете узнать о событии add-link в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# add-link + +### Описание + +@short: Срабатывает при добавлении новой ссылки + +### Использование + +~~~jsx {} +"add-link": ({ + id?: string | number, + link: object, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **add-link** принимает объект со следующими параметрами: + +- `id` - (необязательно) идентификатор новой ссылки +- `link` - (обязательно) объект данных новой ссылки. Полный список параметров ссылки доступен [здесь](api/config/js_kanban_links_config.md) +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {8-10} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// подписываемся на событие "add-link" +board.api.on("add-link", (obj) => { + console.log(obj.link.masterId); +}); +~~~ + +**Журнал изменений:** Событие добавлено в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md new file mode 100644 index 0000000..9d2e361 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-row +title: Событие add-row +description: Вы можете узнать о событии add-row в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# add-row + +### Описание + +@short: Срабатывает при добавлении новой строки + +### Использование + +~~~jsx {} +"add-row": ({ + id?: string | number, + row?: object, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Обработчик события **add-row** может принимать объект со следующими параметрами: + +- `id` - (необязательно) ID новой строки +- `row` - (необязательно) объект данных новой строки. Полный список параметров **row** можно найти [**здесь**](api/config/js_kanban_rows_config.md) +- `before` - (необязательно) ID строки, перед которой будет размещена новая строка +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "add-row" +board.api.on("add-row", (obj) => { + console.log(obj.id); +}); +~~~ + +**История изменений**: параметры **id**, **before** и **row** были добавлены в версии v1.1 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md new file mode 100644 index 0000000..ebaab80 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: add-vote +title: Событие add-vote +description: Вы можете ознакомиться с событием add-vote в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# add-vote + +### Описание + +@short: Срабатывает, когда пользователь добавляет новый голос + +### Использование + +~~~jsx {} +"add-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Обработчик события **add-vote** принимает объект со следующими параметрами: + +- `cardId` - (обязательно) ID карточки, к которой добавляется голос +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "add-vote" +board.api.on("add-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**История изменений:** Событие было добавлено в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md new file mode 100644 index 0000000..dd0d8b1 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-card +title: Событие delete-card +description: Вы можете узнать о событии delete-card в документации по JavaScript библиотеке Kanban от DHTMLX. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# delete-card + +### Описание + +@short: Срабатывает при удалении карточки + +### Использование + +~~~jsx {} +"delete-card": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **delete-card** принимает объект со следующими параметрами: + +- `id` - (обязательный) ID карточки, которую необходимо удалить +- `skipProvider` - (необязательный) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "delete-card" +board.api.on("delete-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md new file mode 100644 index 0000000..acab4b8 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-column +title: Событие delete-column +description: Вы можете узнать о событии delete-column в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# delete-column + +### Описание + +@short: Срабатывает при удалении колонки + +### Использование + +~~~jsx {} +"delete-column": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Обратный вызов события **delete-column** принимает объект со следующими параметрами: + +- `id` - (обязательный) ID колонки, которую нужно удалить +- `skipProvider` - (необязательный) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "delete-column" +board.api.on("delete-column", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md new file mode 100644 index 0000000..58eb7ac --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: delete-comment +title: Событие delete-comment +description: Вы можете узнать о событии delete-comment в документации JavaScript-библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# delete-comment + +### Описание + +@short: Срабатывает при удалении комментария к карточке + +### Использование + +~~~jsx {} +"delete-comment": ({ + id?: string | number, + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Обратный вызов события **delete-comment** принимает объект со следующими параметрами: + +- `id` - (необязательно) ID комментария, который нужно удалить +- `cardId` - (обязательно) ID карточки, комментарий которой нужно удалить +- `skipProvider` - (необязательно) включает или отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "delete-comment" +board.api.on("delete-comment", (obj) => { + console.log(obj.id); +}); +~~~ + +**История изменений:** Событие добавлено в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md new file mode 100644 index 0000000..b3d147f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md @@ -0,0 +1,48 @@ +--- +sidebar_label: delete-link +title: Событие delete-link +description: Вы можете узнать о событии delete-link в документации JavaScript-библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# delete-link + +### Описание + +@short: Срабатывает при удалении ссылки + +### Использование + +~~~jsx {} +"delete-link": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Обратный вызов события **delete-link** принимает объект со следующими параметрами: + +- `id` - (обязательно) ID удаляемой ссылки +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {8-10} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// подписываемся на событие "delete-link" +board.api.on("delete-link", (obj) => { + console.log(obj.id); +}); +~~~ + +**История изменений:** Событие добавлено в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md new file mode 100644 index 0000000..ce73d49 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-row +title: Событие delete-row +description: Узнайте, как работает событие delete-row в JavaScript библиотеке DHTMLX Kanban. Изучите руководства для разработчиков, ознакомьтесь с API, протестируйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# delete-row + +### Описание + +@short: Срабатывает при удалении строки + +### Использование + +~~~jsx {} +"delete-row": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Обработчик события **delete-row** принимает объект с следующими параметрами: + +- `id` - (обязательный) ID строки, которая удаляется +- `skipProvider` - (необязательный) контролирует, отправляется ли запрос на сервер + +:::info +Для работы с внутренними событиями вы можете обратиться к [**методам Event Bus**](/api/overview/main_overview.md/#методы-event-bus) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// слушаем событие "delete-row" +board.api.on("delete-row", (obj) => { + console.log(obj.id); +}); +~~~ diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md new file mode 100644 index 0000000..64f6603 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: delete-vote +title: Событие delete-vote +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете узнать о событии delete-vote. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# delete-vote + +### Описание + +@short: Срабатывает, когда пользователь удаляет голос с карточки + +### Использование + +~~~jsx {} +"delete-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Обработчик события **delete-vote** принимает объект со следующими параметрами: + +- `cardId` - (обязательно) ID карточки, с которой нужно удалить голос +- `skipProvider` - (необязательно) включает или отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "delete-vote" +board.api.on("delete-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**История изменений:** Событие было добавлено в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md new file mode 100644 index 0000000..4693faa --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: drag-card +title: Событие drag-card +description: Вы можете узнать о событии drag-card в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# drag-card + +### Описание + +@short: Срабатывает при перемещении карточки с помощью dnd + +### Использование + +~~~jsx {} +"drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source: array +}) => void; +~~~ + +### Параметры + +Колбэк события **drag-card** принимает объект со следующими параметрами: + +- `id` - (обязательный) ID перетаскиваемой карточки +- `columnId` - (обязательный) ID колонки, в которой в данный момент находится карточка +- `rowId` - (необязательный) ID строки, в которой в данный момент находится карточка +- `before` - (необязательный) ID карточки, которая в колонке находится после перетаскиваемой карточки +- `source` - (необязательный) массив ID перемещаемых карточек + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "drag-card" +board.api.on("drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**История изменений:** Событие добавлено в версии v1.4 + +**Связанный пример:** [Kanban. Отключение drag and drop для определённых колонок](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md new file mode 100644 index 0000000..ce98d45 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: duplicate-card +title: Событие duplicate-card +description: Вы можете узнать о событии duplicate-card в документации к JavaScript библиотеке DHTMLX Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# duplicate-card + +### Описание + +@short: Срабатывает при дублировании карточки + +### Использование + +~~~jsx {} +"duplicate-card": ({ + id: string | number, + card?: object, + select?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **duplicate-card** принимает объект со следующими параметрами: + +- `id` - (обязательный) ID карточки, которую нужно продублировать +- `card` - (необязательный) объект с данными новой карточки. Полный список параметров карточки доступен [здесь](api/config/js_kanban_cards_config.md) +- `select` - (необязательный) включает/выключает выделение вновь добавленной карточки + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "duplicate-card" +board.api.on("duplicate-card", (obj) => { + console.log(obj); +}); +~~~ + +**История изменений:** Параметр `select` был добавлен в версии v1.5.10 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md new file mode 100644 index 0000000..3fc04af --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: end-drag-card +title: Событие end-drag-card +description: Вы можете узнать о событии end-drag-card в документации по JavaScript библиотеке DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# end-drag-card + +### Описание + +@short: Срабатывает при прекращении перетаскивания карточки + +### Использование + +~~~jsx {} +"end-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### Параметры + +Коллбэк события **end-drag-card** принимает объект со следующими параметрами: + +- `id` - (обязательно) ID перетаскиваемой карточки +- `columnId` - (обязательно) ID колонки, в которой в данный момент находится карточка +- `rowId` - (необязательно) ID строки, в которой в данный момент находится карточка +- `before` - (необязательно) ID карточки, которая сейчас находится после перетаскиваемой карточки в колонке +- `source` - (необязательно) массив ID перемещённых карточек + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "end-drag-card" +board.api.on("end-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**История изменений:** Событие добавлено в версии v1.4 + +**Связанный пример:** [Kanban. Отключение перетаскивания в определённые колонки](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md new file mode 100644 index 0000000..5b2fab5 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: move-card +title: Событие move-card +description: Вы можете узнать о событии move-card в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# move-card + +### Описание + +@short: Срабатывает при перемещении карточки + +### Использование + +~~~jsx {} +"move-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **move-card** принимает объект со следующими параметрами: + +- `id` - (обязательно) ID карточки, которая будет перемещена +- `columnId` - (обязательно) ID колонки, в которую будет помещена карточка +- `rowId` - (необязательно) ID строки, в которую будет помещена карточка +- `before` - (необязательно) ID карточки, перед которой будет размещена новая карточка +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "move-card" +board.api.on("move-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**Связанный пример:** [Kanban. Отключение drag and drop для определённых колонок](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md new file mode 100644 index 0000000..272ce3f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: move-column +title: Событие move-column +description: Вы можете узнать о событии move-column в документации JavaScript библиотеки DHTMLX Kanban. Просматривайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# move-column + +### Описание + +@short: Срабатывает при перемещении колонки + +### Использование + +~~~jsx {} +"move-column": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **move-column** принимает объект со следующими параметрами: + +- `id` - (обязательно) ID колонки, которую нужно переместить +- `before` - (необязательно) ID колонки, перед которой будет размещена перемещаемая колонка. Если параметр `before` не указан, колонка будет размещена в конце доски +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "move-column" +board.api.on("move-column", (obj) => { + console.log(obj); +}); +~~~ + +**История изменений:** Событие добавлено в версии v1.1 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md new file mode 100644 index 0000000..eb8e77d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: move-row +title: Событие move-row +description: Вы можете узнать о событии move-row в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# move-row + +### Описание + +@short: Срабатывает при перемещении строки + +### Использование + +~~~jsx {} +"move-row": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Обратный вызов события **move-row** принимает объект со следующими параметрами: + +- `id` - (обязательно) ID строки, которую нужно переместить +- `before` - (необязательно) ID строки, перед которой будет размещена перемещаемая строка. Если параметр `before` не указан, строка будет размещена в конце доски +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {8-10} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// подписываемся на событие "move-row" +board.api.on("move-row", (obj) => { + console.log(obj); +}); +~~~ + +**История изменений:** Это событие было добавлено в версии v1.1 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md new file mode 100644 index 0000000..0a003cd --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: redo +title: событие redo +description: Вы можете узнать о событии redo в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# redo + +### Описание + +@short: Срабатывает при повторении действия, отменённого с помощью undo + +### Использование + +~~~jsx {} +"redo": () => void; +~~~ + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "redo" +board.api.on("redo", () => { + console.log("redo operation"); +}); +~~~ + +**История изменений**: событие добавлено в версии v1.7 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md new file mode 100644 index 0000000..c8a5d42 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll +title: Событие scroll +description: Вы можете ознакомиться с событием scroll в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# scroll + +### Описание + +@short: Срабатывает при прокрутке к указанным элементам + +### Использование + +~~~jsx {} +"scroll": ({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}) => void; +~~~ + +### Параметры + +Колбэк события **scroll** принимает объект со следующими параметрами: + +- `id` - (обязательный) ID целевого элемента +- `to` - (обязательный) тип целевого элемента. Доступные значения: *"column"*, *"row"* и *"card"* +- `options` - (необязательный) объект с параметрами прокрутки. Полный список параметров прокрутки доступен [здесь](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +:::info +Для обработки внутренних событий можно использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "scroll" +board.api.on("scroll", (obj) => { + console.log(obj); +}); +~~~ + +**Журнал изменений:** Событие было добавлено в версии v1.2 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md new file mode 100644 index 0000000..1760ca0 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: select-card +title: Событие select-card +description: Вы можете узнать о событии select-card в документации JavaScript-библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# select-card + +### Описание + +@short: Срабатывает при выборе карточки + +### Использование + +~~~jsx {} +"select-card": ({ + id: string | number, + groupMode?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **select-card** принимает объект со следующими параметрами: + +- `id` - (обязательно) ID выбранной карточки +- `groupMode` - (необязательно) мультивыбор (по умолчанию false) + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "select-card" +board.api.on("select-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md new file mode 100644 index 0000000..f35f023 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md @@ -0,0 +1,52 @@ +--- +sidebar_label: set-edit +title: Событие set-edit +description: Вы можете узнать о событии set-edit в документации по библиотеке DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# set-edit + +### Описание + +@short: Срабатывает при переключении редактора + +### Использование + +~~~jsx {} +"set-edit": ({ cardId: string | number, eventSource?: "select-card" } | null) => void; +~~~ + +### Параметры + +Колбэк события **set-edit** может принимать значение *null* или объект со следующими параметрами: + +- `cardId` - (обязательный) ID карточки, которую нужно отредактировать +- `eventSource` - (необязательный) действие ***"select-card"***, вызывающее событие ***set-edit*** + +:::note +Значение ***null*** используется при закрытии редактора +::: + +:::info +Для обработки внутренних событий вы можете использовать [**Event Bus методы**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// запрещаем редактирование при одиночном клике по карточке +board.api.intercept("set-edit", (ev) => { + return ev?.eventSource != "select-card"; +}); +~~~ + +**История изменений:** + - Событие добавлено в версии v1.2 + - Параметр ***eventSource*** добавлен в версии v1.6 + +**Связанные примеры:** [Kanban. Открытие редактора двойным кликом по задаче](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md new file mode 100644 index 0000000..b165b30 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: set-search +title: Событие set-search +description: Вы можете узнать о событии set-search в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# set-search + +### Описание + +@short: Срабатывает при поиске карточек + +### Использование + +~~~jsx {} +"set-search": ({ + value: string, + by?: string +}) => void; +~~~ + +### Параметры + +Колбэк события **set-search** принимает объект со следующими параметрами: + +- `value` - (обязательный) значение для поиска +- `by` - (необязательный) поле карточки, по которому выполняется поиск + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "set-search" +board.api.on("set-search", (obj) => { + console.log(obj.value); +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md new file mode 100644 index 0000000..8c3bf89 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: set-sort +title: Событие set-sort +description: Вы можете узнать о событии set-sort в документации библиотеки DHTMLX JavaScript Kanban. Просматривайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# set-sort + +### Описание + +@short: Срабатывает при сортировке карточек + +### Использование + +~~~jsx {} +"set-sort": ( + { + by?: string | ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +) => void; +~~~ + +### Параметры + +Коллбэк события **set-sort** может принимать значение *null* или объект со следующими параметрами: + +- `by` - (необязательный) поле карточки для сортировки (*string* или *function*) +- `dir` - (необязательный) порядок сортировки. Возможные значения: *"asc"* и *"desc"* +- `preserve` - (необязательный) включает/отключает сохранение состояния сортировки +- `columnId` - (необязательный) ID колонки, которую нужно отсортировать + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "set-sort" +board.api.on("set-sort", (obj) => { + console.log(obj); +}); +~~~ + +**История изменений:** Событие добавлено в версии v1.2 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md new file mode 100644 index 0000000..9517582 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: start-drag-card +title: Событие start-drag-card +description: Вы можете узнать о событии start-drag-card в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# start-drag-card + +### Описание + +@short: Срабатывает при начале перетаскивания карточки + +### Использование + +~~~jsx {} +"start-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### Параметры + +Обработчик события **start-drag-card** принимает объект со следующими параметрами: + +- `id` - (обязательно) ID перетаскиваемой карточки +- `columnId` - (обязательно) ID колонки, в которой в данный момент находится карточка +- `rowId` - (необязательно) ID строки, в которой в данный момент находится карточка +- `before` - (необязательно) ID карточки, которая в колонке находится после перетаскиваемой карточки +- `source` - (необязательно) массив ID перемещаемых карточек + +:::info +Для работы с внутренними событиями вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "start-drag-card" +board.api.on("start-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**История изменений:** Событие добавлено в версии v1.4 + +**Связанный пример:** [Kanban. Отключение drag and drop для определённых колонок](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md new file mode 100644 index 0000000..073a848 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: undo +title: Событие undo +description: Вы можете узнать о событии undo в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демонстрации, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# undo + +### Описание + +@short: Срабатывает при отмене последней операции в Kanban + +### Использование + +~~~jsx {} +"undo": () => void; +~~~ + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "undo" +board.api.on("undo", () => { + console.log("Операция отменена"); +}); +~~~ + +**История изменений**: Событие было добавлено в версии v1.7 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md new file mode 100644 index 0000000..fee4785 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md @@ -0,0 +1,41 @@ +--- +sidebar_label: unselect-card +title: Событие unselect-card +description: Вы можете узнать о событии unselect-card в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# unselect-card + +### Описание + +@short: Срабатывает при снятии выделения с карточки + +### Использование + +~~~jsx {} +"unselect-card": ({ id: string | number }) => void; +~~~ + +### Параметры + +Callback события **unselect-card** принимает объект со следующим параметром: + +- `id` - (обязательный) ID карточки, с которой снимается выделение + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "unselect-card" +board.api.on("unselect-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md new file mode 100644 index 0000000..d3400c0 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-card +title: Событие update-card +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете узнать о событии update-card. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# update-card + +### Описание + +@short: Срабатывает при обновлении данных карточки + +### Использование + +~~~jsx {} +"update-card": ({ + id: string | number, + card?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **update-card** принимает объект со следующими параметрами: + +- `id` - (обязательно) ID карточки, которую нужно обновить +- `card` - (необязательно) новый объект данных карточки. Полный список параметров **card** можно найти [**здесь**](api/config/js_kanban_cards_config.md) +- `replace` - (необязательно) включает/отключает полную замену данных + + :::note + Если параметр `replace` установлен в *true*, старые данные будут полностью заменены новыми. В противном случае метод обновит только переданные значения. + ::: + +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий можно использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "update-card" +board.api.on("update-card", (obj) => { + console.log(obj); +}); +~~~ + +**История изменений**: +- Параметры **id** и **card** были добавлены в версии v1.1 +- Параметр **replace** был добавлен в версии v1.3 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md new file mode 100644 index 0000000..02affb0 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-column +title: Событие update-column +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете узнать о событии update-column. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# update-column + +### Описание + +@short: Срабатывает при обновлении данных колонки + +### Использование + +~~~jsx {} +"update-column": ({ + id: string | number, + column?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **update-column** принимает объект со следующими параметрами: + +- `id` - (обязательный) ID колонки, которую нужно обновить +- `column` - (необязательный) новый объект данных колонки. Полный список параметров **column** можно найти [**здесь**](api/config/js_kanban_columns_config.md) +- `replace` - (необязательный) включает/отключает полную замену данных + + :::note + Если параметр `replace` установлен в *true*, старые данные будут полностью заменены новыми. В противном случае метод обновит только переданные значения. + ::: + +- `skipProvider` - (необязательный) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "update-column" +board.api.on("update-column", (obj) => { + console.log(obj); +}); +~~~ + +**История изменений**: +- Параметры **id** и **column** были добавлены в версии v1.1 +- Параметр **replace** был добавлен в версии v1.3 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md new file mode 100644 index 0000000..66ef56d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md @@ -0,0 +1,62 @@ +--- +sidebar_label: update-comment +title: Событие update-comment +description: Вы можете узнать о событии update-comment в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# update-comment + +### Описание + +@short: Срабатывает при обновлении комментария + +### Использование + +~~~jsx {} +"update-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Обратный вызов события **update-comment** принимает объект со следующими параметрами: + +- `id` - (необязательный) ID комментария, который будет обновлён +- `cardId` - (обязательный) ID карточки, в которой будет обновлён комментарий +- `comment` - (обязательный) объект конфигурации обновляемого комментария. Здесь можно указать следующие параметры: + - `id` - (необязательный) ID обновляемого комментария + - `cardId` - (необязательный) ID карточки, к которой будет добавлен обновлённый комментарий + - `text` - (необязательный) текст обновлённого комментария + - `date` - (необязательный) дата обновлённого комментария + - `html` - (необязательный) HTML-разметка обновлённого комментария. Включите свойство `html` в конфиге [`editorShape`](/api/config/js_kanban_editorshape_config/#--параметры-для-типа-comments), чтобы отображать HTML-разметку вместо текста +- `skipProvider` - (необязательный) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "update-comment" +board.api.on("update-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**История изменений:** Событие добавлено в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md new file mode 100644 index 0000000..45c34d0 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-row +title: Событие update-row +description: Вы можете узнать о событии update-row в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# update-row + +### Описание + +@short: Срабатывает при обновлении данных строки + +### Использование + +~~~jsx {} +"update-row": ({ + id: string | number, + row?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### Параметры + +Колбэк события **update-row** принимает объект со следующими параметрами: + +- `id` - (обязательно) ID строки, которую необходимо обновить +- `row` - (необязательно) новый объект данных строки. Полный список параметров **row** доступен [**здесь**](api/config/js_kanban_rows_config.md) +- `replace` - (необязательно) включает/отключает полную замену данных + + :::note + Если параметр `replace` установлен в *true*, старые данные будут полностью заменены новыми. В противном случае метод обновит только переданные значения. + ::: + +- `skipProvider` - (необязательно) включает/отключает предотвращение отправки запроса на сервер + +:::info +Для обработки внутренних событий вы можете использовать [**методы Event Bus**](api/overview/main_overview.md/#event-bus-methods) +::: + +### Пример + +~~~jsx {7-9} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// подписываемся на событие "update-row" +board.api.on("update-row", (obj) => { + console.log(obj); +}); +~~~ + +**История изменений**: +- Параметры **id** и **row** были добавлены в версии v1.1 +- Параметр **replace** был добавлен в версии v1.3 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md new file mode 100644 index 0000000..bebc595 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md @@ -0,0 +1,39 @@ +--- +sidebar_label: api.detach() +title: Метод detach +description: Вы можете узнать о методе detach в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# api.detach() + +## Описание + +@short: Позволяет удалить/отсоединить обработчик события + +## Использование + +~~~jsx +api.detach(tag: number | string | symbol ): void; +~~~ + +## Параметры + +- `tag` - тег, используемый для идентификации обработчика события при его создании + +### Пример + +~~~jsx {11} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +board.api.on("move-card", ({ id, columnId }) => { + console.log("Переместить карточку"); +}, { tag: "move" }); + +board.api.detach("move"); +~~~ + +**История изменений**: Внутренний метод был добавлен в версии v1.7 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md new file mode 100644 index 0000000..0d3280f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md @@ -0,0 +1,50 @@ +--- +sidebar_label: api.exec() +title: Метод exec +description: Вы можете ознакомиться с методом exec в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# api.exec() + +### Описание + +@short: Позволяет запускать внутренние события + +### Использование + +~~~jsx {} +api.exec( + event: string, + config: object +): void; +~~~ + +### Параметры + +- `event` - (обязательный) событие, которое нужно вызвать +- `config` - (обязательный) объект конфигурации с параметрами (см. событие, которое нужно вызвать) + +### События + +:::info +Полный список внутренних событий Kanban можно найти [**здесь**](api/overview/main_overview.md/#kanban-events) +::: + +### Пример + +~~~jsx {7,9-12} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// выбираем карточку с ID 1 +board.api.exec("select-card", { id: 1 }); +// добавляем новую карточку без отправки изменений на сервер +board.api.exec("add-card", { + columnId: "backlog", + skipProvider: true, +}); +~~~ + +**Связанный пример:** [Kanban. Сохранение сортировки](https://snippet.dhtmlx.com/74nyuv14?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md new file mode 100644 index 0000000..cc50a81 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md @@ -0,0 +1,104 @@ +--- +sidebar_label: api.getReactiveState() +title: Метод getReactiveState +description: Вы можете узнать о методе getReactiveState в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# api.getReactiveState() + +### Описание + +@short: Получает объект с реактивными свойствами Kanban + +### Использование + +~~~jsx {} +api.getReactiveState(): object; +~~~ + +### Возвращаемое значение + +Метод возвращает объект со следующими параметрами: + +~~~jsx {} +{ + cardHeight: {...}, + cardShape: {...}, + cards: {...}, + columnKey: {...}, + columnShape: {...}, + columns: {...}, + currentUser: {...}, + history: {...}, + links: {...}, + readonly: {...}, + rowKey: {...}, + rowShape: {...}, + editorShape: {...}, + rows: {...}, + search: {...}, + selected: {...}, + sort: {...}, + + // удалённые параметры + /* + fromAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + overAreaMeta: {...}, + before: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + overAreaId: {...}, + /* + + // приватные параметры + /* + edit -> _edit: {...}, + layout -> layout: {...}, + cardsMap -> _cardsMap: {...}, + cardsMeta -> _cardsMeta: {...}, + areasMeta -> _areasMeta: {...}, + scroll -> _scroll: {...}, + */ +} +~~~ + +:::warning +Эти свойства состояния доступны только для чтения. Не изменяйте их, чтобы избежать непредвиденного поведения! +::: + +### Пример + +~~~jsx {7-37} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// получаем реактивное состояние Kanban +const state = board.api.getReactiveState(); + +// подписываемся на изменения columns и выводим массив колонок +state.columns.subscribe((data) => { + console.log(data); +}); + +// подписываемся на изменения cards и выводим массив карточек +state.cards.subscribe((data) => { + console.log(data); +}); + +// подписываемся на изменения rows и выводим массив рядов +state.rows.subscribe((data) => { + console.log(data); +}); + +// подписываемся на выбор карточек и выводим ID выбранных карточек +state.selected.subscribe((data) => { + console.log(data); +}); +~~~ + +**История изменений:** Метод был обновлён в версии v1.7 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md new file mode 100644 index 0000000..93ba2f0 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md @@ -0,0 +1,89 @@ +--- +sidebar_label: api.getState() +title: Метод getState +description: Вы можете ознакомиться с методом getState в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# api.getState() + +### Описание + +@short: Получает объект с свойствами StateStore Kanban + +### Использование + +~~~jsx {} +api.getState(): object; +~~~ + +### Возвращаемое значение + +Метод возвращает объект со следующими параметрами: + +~~~jsx {} +{ + cardHeight: number | null, + cards: array, + cardShape: object, + columnKey: string, + columns: array, + columnShape: object, + currentUser: number | string | null, + links: array, + readonly: object, + rowKey: string, + rows: array, + rowShape: object, + editorShape: array, + history: object, + search: object, + selected: array, + sort: object, + + // удалённые параметры + /* + fromAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, + before: string | number, + dragItemId: string | number, + dragItemsCoords: array, + overAreaId: string | number, + /* + + // приватные параметры + /* + edit -> _edit: object, + layout -> layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object, + */ +} +~~~ + +:::warning +Эти свойства состояния доступны только для чтения. Не изменяйте их, чтобы избежать непредсказуемого поведения! +::: + +### Пример + +~~~jsx {7-12} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// получаем состояние Kanban +const state = board.api.getState(); +console.log(state.cards); // вывод данных карточек +console.log(state.columns); // вывод данных колонок +console.log(state.rows); // вывод данных строк +console.log(state.cardShape); // вывод конфигурации карточек +//... +~~~ + +**Изменения:** Метод был обновлён в версии v1.7 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md new file mode 100644 index 0000000..1d40bb9 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: api.getStores() +title: Метод getStores +description: Вы можете узнать о методе getStores в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# api.getStores() + +### Описание + +@short: Получает объект с параметрами DataStore Kanban + +### Использование + +~~~jsx {} +api.getStores(): object; +~~~ + +### Возвращает + +Метод возвращает объект с параметрами **DataStore**: + +~~~jsx {} +{ + data: DataStore // ( объект параметров ) +} +~~~ + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// получаем объект DataStore Kanban +const store = board.api.getStores(); +console.log(store); +~~~ + +**Изменения:** Метод был обновлён в версии v1.2 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md new file mode 100644 index 0000000..89cc942 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: api.intercept() +title: Метод intercept +description: Вы можете узнать о методе intercept в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства разработчика и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# api.intercept() + +### Описание + +@short: Позволяет перехватывать и предотвращать внутренние события + +### Использование + +~~~jsx {} +api.intercept( + event: string, + callback: function, + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### Параметры + +- `event` - (обязательно) событие, которое должно быть вызвано +- `callback` - (обязательно) функция обратного вызова, которая будет выполнена (аргументы callback зависят от вызываемого события) +- `config` - (необязательно) объект, содержащий следующие параметры: + - `intercept` - (необязательно) если при создании слушателя события установить `intercept: true`, этот слушатель будет выполнен раньше всех остальных + - `tag` - (необязательно) тег действия. Вы можете использовать имя тега для удаления обработчика действия через метод [`detach`](api/internal/js_kanban_detach_method.md) + +### События + +:::info +Полный список внутренних событий Kanban доступен [**здесь**](api/overview/main_overview.md/#kanban-events) +::: + +### Пример + +~~~jsx {7-11} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// запрещаем перемещать карточки в колонку с ID "done" +board.api.intercept("move-card", ({ id, columnId }) => { + if(columnId !== "done" ){ + return false; + } +}, {tag: "move"}); +~~~ + +**История изменений**: параметры **config.tag** и **config.intercept** были добавлены в версии v1.7 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md new file mode 100644 index 0000000..0e2b8ac --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: export.json() +title: Метод json +description: Вы можете узнать о методе json в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# export.json() + +### Описание + +@short: Экспортирует данные Kanban в JSON-файл + +### Использование + +~~~jsx {} +export.json(): void; +~~~ + +:::info +Метод экспортирует данные Kanban в JSON-файл со следующей структурой: +~~~jsx {} +{ + "cards": [], + "columns": [], + "rows": [] +} +~~~ +::: + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// экспортируем данные Kanban в JSON +board.export.json(); // => { "cards": [...], "columns": [...], "rows": [] } +~~~ + +**История изменений:** Метод был добавлен в версии v1.3 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md new file mode 100644 index 0000000..b3f9f24 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md @@ -0,0 +1,51 @@ +--- +sidebar_label: api.on() +title: Метод on +description: Вы можете ознакомиться с методом on в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# api.on() + +### Описание + +@short: Позволяет прикреплять обработчик к внутренним событиям + +### Использование + +~~~jsx {} +api.on( + event: string, + handler: function + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### Параметры + +- `event` - (обязательно) событие, которое будет вызвано +- `handler` - (обязательно) обработчик, который будет прикреплён (аргументы обработчика зависят от вызываемого события) +- `config` - (необязательно) объект, содержащий следующие параметры: + - `intercept` - (необязательно) если при создании слушателя события указать `intercept: true`, этот слушатель будет выполнен раньше всех остальных + - `tag` - (необязательно) тег действия. Вы можете использовать имя тега для удаления обработчика действия с помощью метода [`detach`](api/internal/js_kanban_detach_method.md) + +### События + +:::info +Полный список внутренних событий Kanban доступен [**здесь**](api/overview/main_overview.md/#kanban-events) +::: + +### Пример + +~~~jsx {7-9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// выводим данные карточки в консоль при её перемещении +board.api.on("move-card", ({ id, columnId }) => { + console.log({ id, columnId }); +}, {tag: "move"}); +~~~ + +**Журнал изменений**: параметры **config.tag** и **config.intercept** были добавлены в версии v1.7 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md new file mode 100644 index 0000000..9e80983 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: api.setNext() +title: Метод setNext +description: Вы можете узнать о методе setNext в документации по библиотеке DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# api.setNext() + +### Описание + +@short: Позволяет добавить некоторое действие в порядок Event Bus + +### Использование + +~~~jsx {} +api.setNext(next: any): void; +~~~ + +### Параметры + +- `next` - (обязательный) действие, которое нужно включить в порядок **Event Bus** + +### Пример + +~~~jsx {15} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row" + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +Необходимо включить **RestDataProvider** в порядок **Event Bus**, чтобы выполнять операции с данными (**добавление**, **удаление** и т.д.) и отправлять соответствующие запросы на сервер +::: \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md new file mode 100644 index 0000000..bec9e02 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md @@ -0,0 +1,57 @@ +--- +sidebar_label: addCard() +title: Метод addCard +description: Вы можете узнать о методе addCard в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# addCard() + +### Описание + +@short: Добавляет новую карточку в Kanban + +### Использование + +~~~jsx {} +addCard({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object +}): void; +~~~ + +### Параметры + +- `columnId` - (обязательный) ID целевой колонки +- `id` - (необязательный) ID новой карточки +- `rowId` - (необязательный) ID целевой строки +- `before` - (необязательный) ID карточки, перед которой будет размещена новая карточка +- `select` - (необязательный) включает/отключает выделение вновь добавленной карточки +- `card` - (необязательный) объект с данными новой карточки + +:::info +Полный список параметров **card** доступен [**здесь**](api/config/js_kanban_cards_config.md) +::: + +### Пример + +~~~jsx {7-12} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// добавляем новую карточку в колонку "backlog" +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" } +}); +~~~ + +:::tip +Вы также можете указать ID новой карточки в объекте **card** +::: \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md new file mode 100644 index 0000000..cbfbac4 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md @@ -0,0 +1,54 @@ +--- +sidebar_label: addColumn() +title: Метод addColumn +description: Вы можете узнать о методе addColumn в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную оценочную версию DHTMLX Kanban. +--- + +# addColumn() + +### Описание + +@short: Добавляет новую колонку в Kanban + +### Использование + +~~~jsx {} +addColumn({ + id?: string | number, + column?: object, + before?: string | number +}): void; +~~~ + +### Параметры + +- `id` - (необязательно) ID новой колонки +- `column` - (необязательно) объект с данными новой колонки +- `before` - (необязательно) ID колонки, перед которой будет вставлена новая колонка + +:::info +Полный список параметров **column** можно найти [**здесь**](api/config/js_kanban_columns_config.md) +::: + +### Пример + +~~~jsx {7-16} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// добавляем новую колонку +board.addColumn({ + id: "extra_column", + column: { + label: "Дополнительная колонка", + limit: 2, + strictLimit: 2, + collapsed: true + }, + before: "column_2" +}); +~~~ + +**История изменений**: Параметры **id**, **column** и **before** были добавлены в версии v1.1 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md new file mode 100644 index 0000000..190b11b --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: addComment() +title: Метод addComment +description: Вы можете узнать о методе addComment в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# addComment() + +### Описание + +@short: Добавляет новый комментарий к указанной карточке по её ID + +### Использование + +~~~jsx {} +addComment({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### Параметры + +- `id` - (необязательно) ID нового комментария +- `cardId` - (обязательно) ID карточки, к которой нужно добавить комментарий +- `comment` - (обязательно) объект конфигурации нового комментария. Здесь можно указать следующие параметры: + - `text` - (необязательно) текст нового комментария + - `date` - (необязательно) дата нового комментария + - `html` - (необязательно) HTML-разметка нового комментария. Включите свойство `html` в конфигурации [`editorShape`](/api/config/js_kanban_editorshape_config/#--параметры-для-типа-comments), чтобы отображать HTML-разметку вместо текста + +### Пример + +~~~jsx {7-15} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// добавляем новый комментарий +board.addComment({ + id: 1, + cardId: 1, + comment: { + text: "", + date: new Date("01/07/2021"), + html: "Важный комментарий" + } +}); +~~~ + +**История изменений:** Метод был добавлен в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md new file mode 100644 index 0000000..8a371d8 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: addLink() +title: Метод addLink +description: Вы можете узнать о методе addLink в документации библиотеки DHTMLX JavaScript Kanban. Просматривайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# addLink() + +### Описание + +@short: Добавляет новую ссылку в Kanban + +### Использование + +~~~jsx {} +addLink({ + id?: string | number, + link: object +}): void; +~~~ + +### Параметры + +- `id` - (необязательный) ID новой ссылки +- `link` - (обязательный) объект данных новой ссылки. Полный список параметров ссылки доступен [здесь](api/config/js_kanban_links_config.md) + +### Пример + +~~~jsx {7-14} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// добавляем новую ссылку +board.addLink({ + id: 3, + link: { + source: 4, + target: 6, + relation: "relatesTo", + } +}); +~~~ + +**История изменений:** Метод добавлен в версии v1.5 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md new file mode 100644 index 0000000..bf617ce --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: addRow() +title: Метод addRow +description: Вы можете узнать о методе addRow в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# addRow() + +### Описание + +@short: Добавляет новую строку в Kanban + +### Использование + +~~~jsx {} +addRow({ + id?: string | number, + row?: object, + before?: string | number +}): void; +~~~ + +### Параметры + +- `id` - (необязательно) идентификатор новой строки +- `row` - (необязательно) объект данных новой строки +- `before` - (необязательно) идентификатор строки, перед которой будет размещена новая строка + +:::info +Полный список параметров **row** можно найти [**здесь**](api/config/js_kanban_rows_config.md) +::: + +### Пример + +~~~jsx {8-15} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// добавляем новую строку +board.addRow({ + id: "extra_row", + row: { + label: "Дополнительная строка", + collapsed: false + }, + before: "row_2" +}); +~~~ + +**История изменений**: Параметры **id**, **row** и **before** были добавлены в версии v1.1 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md new file mode 100644 index 0000000..6130185 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteCard() +title: Метод deleteCard +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете узнать о методе deleteCard. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# deleteCard() + +### Описание + +@short: Удаляет указанную карточку из хранилища данных Kanban + +### Использование + +~~~jsx {} +deleteCard({ id: string | number }): void; +~~~ + +### Параметры + +- `id` - (обязательный) идентификатор карточки, которую необходимо удалить + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// удаляем карточку по её id +board.deleteCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md new file mode 100644 index 0000000..3f8f629 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteColumn() +title: Метод deleteColumn +description: Вы можете узнать о методе deleteColumn в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# deleteColumn() + +### Описание + +@short: Удаляет указанную колонку из хранилища данных Kanban + +### Использование + +~~~jsx {} +deleteColumn({ id: string | number }): void; +~~~ + +### Параметры + +- `id` - (обязательно) ID колонки, которую необходимо удалить + +### Пример + +~~~jsx {7} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// удаляем колонку по её id +board.deleteColumn({ id: "backlog" }); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md new file mode 100644 index 0000000..b1fa17a --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: deleteComment() +title: Метод deleteComment +description: Вы можете узнать о методе deleteComment в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# deleteComment() + +### Описание + +@short: Удаляет комментарий карточки по его ID + +### Использование + +~~~jsx {} +deleteComment({ + id: string | number, + cardId: string | number +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID комментария, который нужно удалить +- `cardId` - (обязательный) ID карточки, у которой нужно удалить комментарий + +### Пример + +~~~jsx {7-10} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// удаляем комментарий +board.deleteComment({ + id: 1, + cardId: 1, +}); +~~~ + +**История изменений:** Метод был добавлен в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md new file mode 100644 index 0000000..921c270 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md @@ -0,0 +1,36 @@ +--- +sidebar_label: deleteLink() +title: Метод deleteLink +description: Вы можете узнать о методе deleteLink в документации JavaScript библиотеки DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# deleteLink() + +### Описание + +@short: Удаляет указанный линк из хранилища данных Kanban + +### Использование + +~~~jsx {} +deleteLink({ id: string | number }): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID линка, который нужно удалить + +### Пример + +~~~jsx {8} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + links, +}); +// удаляем линк по его id +board.deleteLink({ id: 5 }); +~~~ + +**История изменений:** Метод был добавлен в версии v1.5 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md new file mode 100644 index 0000000..09ab65e --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteRow() +title: Метод deleteRow +description: Вы можете узнать о методе deleteRow в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# deleteRow() + +### Описание + +@short: Удаляет указанную строку из хранилища данных Kanban + +### Использование + +~~~jsx {} +deleteRow({ id: string | number }): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID строки, которую нужно удалить + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// удаляем строку по её id +board.deleteRow({ id: "feature" }); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md new file mode 100644 index 0000000..1d438cf --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md @@ -0,0 +1,29 @@ +--- +sidebar_label: destructor() +title: Метод destructor +description: Вы можете узнать о методе destructor в документации JavaScript-библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# destructor() + +### Описание + +@short: Удаляет все HTML-элементы Kanban и отключает все связанные события + +### Использование + +~~~jsx {} +destructor(): void; +~~~ + +### Пример + +~~~jsx {7} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// удаляем Kanban +board.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md new file mode 100644 index 0000000..1409c16 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: duplicateCard() +title: Метод duplicateCard +description: Вы можете узнать о методе duplicateCard в документации JavaScript-библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# duplicateCard() + +### Описание + +@short: Дублирует карточку по заданному ID + +### Использование + +~~~jsx {} +duplicateCard({ + id: string | number, + card?: object, + select?: boolean +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID карточки, которую нужно дублировать +- `card` - (необязательный) объект данных новой карточки. Полный список параметров карточки доступен [**здесь**](api/config/js_kanban_cards_config.md) +- `select` - (необязательный) включает или отключает выделение вновь добавленной карточки + +### Пример + +~~~jsx {7-10} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// дублируем карточку с ID 1 +board.duplicateCard({ + id: 1, + card: { label: "Duplicated card" }, + select: true +}); +~~~ + +**История изменений:** Параметр `select` был добавлен в версии v1.5.10 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md new file mode 100644 index 0000000..2f528df --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getAreaCards() +title: Метод getAreaCards +description: Вы можете узнать о методе getAreaCards в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# getAreaCards() + +### Описание + +@short: Получает массив с объектами данных всех карточек указанной колонки (и строки) + +### Использование + +~~~jsx {} +getAreaCards( + columnId: string | number, + rowId?: string | number +): array; +~~~ + +### Параметры + +- `columnId` - (обязательный) ID целевой колонки +- `rowId` - (необязательный) ID целевой строки + +### Возвращаемое значение + +Метод возвращает массив с объектами данных карточек + +:::info +Если Kanban содержит только **колонки** без **строк**, необходимо передавать только параметр ***columnId***. В этом случае метод возвращает массив с объектами данных, включающими все карточки указанной колонки. + +Если Kanban содержит **колонки** и **строки**, можно передать оба параметра ***columnId*** и ***rowId***. В этом случае метод возвращает массив с объектами данных, включающими все карточки конкретной колонки и строки. +::: + +### Пример + +~~~jsx {8} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// получаем массив с объектами данных карточек указанной колонки и строки +board.getAreaCards("column_id", "row_id"); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md new file mode 100644 index 0000000..c3a30fe --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: getCard() +title: Метод getCard +description: Вы можете узнать о методе getCard в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# getCard() + +### Описание + +@short: Получает объект данных карточки по указанному ID + +### Использование + +~~~jsx {} +getCard(id: string | number): object; +~~~ + +### Параметры + +- `id` - (обязательный) ID целевой карточки + +### Возвращаемое значение + +Метод возвращает объект данных карточки с указанным ID + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// получаем объект данных карточки с ID 1 +const card_data = board.getCard(1); +console.log(card_data); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md new file mode 100644 index 0000000..68c74d1 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md @@ -0,0 +1,40 @@ +--- +sidebar_label: getColumnCards() +title: Метод getColumnCards +description: Вы можете узнать о методе getColumnCards в документации библиотеки DHTMLX JavaScript Kanban. Просматривайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# getColumnCards() + +### Описание + +@short: Получает массив, содержащий объекты данных всех карточек в указанной колонке + +### Использование + +~~~jsx {} +getColumnCards(id: string | number): array; +~~~ + +### Параметры + +- `id` - (обязательный) ID целевой колонки + +### Возвращаемое значение + +Метод возвращает массив, содержащий объекты данных всех карточек в указанной колонке + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// получаем объекты данных всех карточек в колонке с ID 1 +const cards_data = board.getColumnCards(1); +console.log(cards_data); +~~~ + +**История изменений**: Метод был добавлен в версии v1.7 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md new file mode 100644 index 0000000..5486210 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: getSelection() +title: Метод getSelection +description: Вы можете узнать о методе getSelection в документации JavaScript-библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и интерактивные демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# getSelection() + +### Описание + +@short: Возвращает массив с ID выбранных карточек + +### Использование + +~~~jsx {} +getSelection(): array; +~~~ + +### Возвращаемое значение + +Метод возвращает массив с ID выбранных карточек + +### Пример + +~~~jsx {7} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// получает массив с ID выбранных карточек +board.getSelection(); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md new file mode 100644 index 0000000..24b2bb1 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md @@ -0,0 +1,52 @@ +--- +sidebar_label: moveCard() +title: Метод moveCard +description: Вы можете ознакомиться с методом moveCard в документации библиотеки DHTMLX JavaScript Kanban. Просматривайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# moveCard() + +### Описание + +@short: Перемещает карточку в указанный столбец (и строку) + +### Использование + +~~~jsx {} +moveCard({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID карточки, которая будет перемещена +- `columnId` - (обязательный) ID столбца, в который будет помещена карточка +- `rowId` - (необязательный) ID строки, в которую будет помещена карточка +- `before` - (необязательный) ID карточки, перед которой будет размещена новая карточка + +:::info +Если в конфигурации виджета указан параметр **rowKey**, то параметр **rowId** метода **moveCard()** является *обязательным*! +::: + +### Пример + +~~~jsx {9-14} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// перемещаем карточку с ID 1 +// элемент будет помещён в столбец "inprogress" и строку "feature", +// перед карточкой с ID 8 +board.moveCard({ + id: 1, + columnId: "inprogress", + rowId: "feature", + before: 8 +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md new file mode 100644 index 0000000..3f3c90f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: moveColumn() +title: Метод moveColumn +description: Вы можете узнать о методе moveColumn в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# moveColumn() + +### Описание + +@short: Перемещает колонку на новую позицию + +### Использование + +~~~jsx {} +moveColumn({ + id: string | number, + before?: string | number +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID колонки, которую нужно переместить +- `before` - (необязательный) ID колонки, перед которой будет размещена перемещаемая колонка. Если параметр `before` не указан, колонка будет помещена в конец доски + +### Пример + +~~~jsx {7-10} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// перемещаем колонку "backlog" и размещаем её перед колонкой "done" +board.moveColumn({ + id: "backlog", + before: "done" +}); +~~~ + +**История изменений:** Метод был добавлен в версии v1.1 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md new file mode 100644 index 0000000..0a53469 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: moveRow() +title: Метод moveRow +description: Вы можете узнать о методе moveRow в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# moveRow() + +### Описание + +@short: Перемещает строку на новую позицию + +### Использование + +~~~jsx {} +moveRow({ + id: string | number, + before?: string | number +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID строки, которую нужно переместить +- `before` - (необязательный) ID строки, перед которой будет размещена перемещаемая строка. Если параметр `before` не указан, строка будет помещена в конец доски + +### Пример + +~~~jsx {8-11} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + row +}); +// перемещаем дорожку "task" и размещаем её перед (выше) дорожки "feature" +board.moveRow({ + id: "task", + before: "feature" +}); +~~~ + +**История изменений:** Метод был добавлен в версии v1.1 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md new file mode 100644 index 0000000..f746405 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md @@ -0,0 +1,47 @@ +--- +sidebar_label: parse() +title: Метод parse +description: Вы можете узнать о методе parse в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# parse() + +### Описание + +@short: Выполняет парсинг данных в Kanban + +### Использование + +~~~jsx {} +parse({ + columns?: array, + rows?: array, + cards?: array, + links?: array +}): void; +~~~ + +### Параметры + +- [`columns`](api/config/js_kanban_columns_config.md) - (необязательно) массив объектов с данными колонок +- [`rows`](api/config/js_kanban_rows_config.md) - (необязательно) массив объектов с данными строк +- [`cards`](api/config/js_kanban_cards_config.md) - (необязательно) массив объектов с данными карточек +- [`links`](api/config/js_kanban_links_config.md) - (необязательно) массив объектов с данными связей + +### Пример + +~~~jsx {4-9} +// создаём Kanban +const board = new kanban.Kanban("#root", {}); +// парсим данные в Kanban +board.parse({ + columns, + cards, + rows, + links +}); +~~~ + +**История изменений:** Начиная с версии v1.1 нет необходимости сбрасывать исходные данные в конструкторе перед парсингом новых данных + +**Связанные статьи:** [Работа с данными](guides/working_with_data.md#loading-data-from-local-source) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md new file mode 100644 index 0000000..acb70e3 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: redo() +title: Метод redo +description: Вы можете узнать о методе redo в документации по библиотеке DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и интерактивные демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# redo() + +### Описание + +@short: Повторяет действие, которое было отменено с помощью undo + +:::info +Метод `redo()` работает только с конфигурацией [`history: true`](api/config/js_kanban_history_config.md)! +::: + +### Использование + +~~~jsx {} +redo(): void; +~~~ + +### Пример + +~~~jsx {7} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// делает один шаг вперед в истории Kanban +board.redo(); +~~~ + +**История изменений:** Метод был добавлен в версии v1.3 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md new file mode 100644 index 0000000..b961e42 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll() +title: Метод scroll +description: Вы можете узнать о методе scroll в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# scroll() + +### Описание + +@short: Прокручивает Kanban к указанному элементу + +### Использование + +~~~jsx {} +scroll({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID целевого элемента +- `to` - (обязательный) тип целевого элемента. Доступные значения: "column", "row" и "card" +- `options` - (необязательный) объект с параметрами прокрутки. Полный список параметров прокрутки можно найти [здесь](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +### Пример + +~~~jsx {7-15} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// прокручиваем Kanban к карточке с ID 246 +board.scroll({ + id: 246, + to: "card", + options: { + behavior: "smooth", + block: "end", + inline: "nearest" + } +}); +~~~ + +**История изменений:** Метод был добавлен в версии v1.2 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md new file mode 100644 index 0000000..fc8fda5 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: selectCard() +title: Метод selectCard +description: Вы можете ознакомиться с методом selectCard в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# selectCard() + +### Описание + +@short: Выбирает карточку по указанному ID + +### Использование + +~~~jsx {} +selectCard({ + id: string | number, + groupMode?: boolean +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID выбранной карточки +- `groupMode` - (необязательный) включает/отключает множественный выбор карточек (**false** по умолчанию) + +:::info +Если параметр **groupMode** установлен в **true**, метод **selectCard()** не сбросит выбор других элементов +::: + +### Пример + +~~~jsx {7-10} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// выбираем карточку с ID 1 +board.selectCard({ + id: 1, + groupMode: true +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md new file mode 100644 index 0000000..412b1dc --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: serialize() +title: Метод serialize +description: Вы можете узнать о методе serialize в документации JavaScript-библиотеки DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демонстрации, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# serialize() + +### Описание + +@short: Сериализует данные Kanban в JSON + +### Использование + +~~~jsx {} +serialize(): object; +~~~ + +### Возвращает + +Метод возвращает объект с данными Kanban + +~~~jsx {} +{ + cards: [{...}, {...}, ...], + rows: [{...}, {...}, ...], + columns: [{...}, {...}, ...], + links: [{...}, {...}, ...] +} +~~~ + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// получаем объект с данными Kanban +board.serialize(); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md new file mode 100644 index 0000000..3bd3e07 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: setConfig() +title: Метод setConfig +description: Вы можете ознакомиться с методом setConfig в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# setConfig() + +### Описание + +@short: Устанавливает новые параметры конфигурации Kanban + +### Использование + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### Параметры + +- `config` - (обязательный) объект конфигурации Kanban. Полный список свойств смотрите [здесь](api/overview/main_overview.md#kanban-properties) + +:::tip +С помощью этого метода вы можете настроить виджет Kanban, а также загрузить в него данные. Метод не изменяет историю (изменение истории невозможно). +::: + +### Пример + +~~~jsx {10-20,22-23} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +// создаём Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + +// задаём новые параметры конфигурации Kanban +board.setConfig({ + columnKey: "stage", + rowKey: "type", + cardShape, + editorShape, + editor: { + autoSave: false + }, + /* другие параметры */ +}); + +// задаём новые параметры конфигурации Toolbar +toolbar.setConfig({ items: ["search", "spacer", "sort"] }); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md new file mode 100644 index 0000000..58d89de --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setEdit() +title: Метод setEdit +description: Вы можете узнать о методе setEdit в документации по JavaScript библиотеке DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# setEdit() + +### Описание + +@short: Переключает редактор Kanban + +### Использование + +~~~jsx {} +setEdit({ cardId: string | number } | null): void; +~~~ + +### Параметры + +Метод может принимать значение *null* или объект со следующим параметром: + +- `cardId` - (обязательный) ID карточки, которую нужно отредактировать + +:::note +Чтобы закрыть редактор, вызовите метод **setEdit()** со значением ***null*** +::: + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// открыть редактор для карточки по её ID +board.setEdit({ cardId: 1 }); +~~~ + +**История изменений:** Метод был добавлен в версии v1.2 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md new file mode 100644 index 0000000..cc9545a --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: setLocale() +title: Метод setLocale +description: Вы можете узнать о методе setLocale в документации по JavaScript библиотеке DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демонстрации, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# setLocale() + +### Описание + +@short: Применяет новую локаль к Kanban + +### Использование + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### Параметры + +- `null` - (опционально) сбрасывает локаль на значение по умолчанию (*английский*) +- `locale` - (опционально) объект данных новой локали, которая будет применена + +:::info +Используйте метод `setLocale()` для применения новой локали только к Kanban. Чтобы сбросить Kanban на локаль по умолчанию, вызовите метод `setLocale()` без аргументов (или с значением *null*). Для применения новой локали только к Toolbar используйте метод [`toolbar.setLocale()`](api/methods/toolbar_setlocale_method.md). +::: + +### Пример + +~~~jsx {7,9} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, +}); +// применяем локаль "de" к Kanban +board.setLocale(kanban.locales["de"]); +// применяем локаль по умолчанию к Kanban +board.setLocale(); // или board.setLocale(null); +~~~ + +**Журнал изменений:** Метод обновлён в версии v1.2 + +**Связанные статьи:** [Локализация](guides/localization.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md new file mode 100644 index 0000000..828b55c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setSearch() +title: Метод setSearch +description: Вы можете узнать о методе setSearch в документации JavaScript-библиотеки DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демонстрации, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# setSearch() + +### Описание + +@short: Выполняет поиск карточек по заданным параметрам + +### Использование + +~~~jsx {} +setSearch({ + value: string, + by?: string +}): void; +~~~ + +:::info +С помощью этого метода вы можете искать нужные карточки по заданным параметрам. Если вызвать метод **setSearch()** без параметров, будет очищена строка поиска и снято выделение с карточек. +::: + +### Параметры + +- `value` - (обязательно) значение для поиска +- `by` - (необязательно) поле карточки, по которому выполняется поиск + +### Пример + +~~~jsx {7} +// создаем Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// выделяем карточки, соответствующие параметрам +board.setSearch({ value: "Integration", by: "label" }); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md new file mode 100644 index 0000000..2a64257 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: setSort() +title: Метод setSort +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете ознакомиться с методом setSort. Изучайте руководства разработчика и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# setSort() + +### Описание + +@short: Сортирует карточки по заданным параметрам + +### Использование + +~~~jsx {} +setSort( + { + by?: string | function, // by?: ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +): void; +~~~ + +### Параметры + +Метод может принимать объект с параметрами сортировки или значение *null*. В объекте можно указать следующие параметры: + +- `by` - (необязательно) поле карточки для сортировки. Параметр может быть строкой или функцией. Функция должна возвращать поле карточки для сортировки +- `dir` - (необязательно) порядок сортировки. Возможные значения: *"asc"* и *"desc"* +- `columnId` - (необязательно) ID колонки, которую нужно отсортировать +- `preserve` - (необязательно) включает или отключает сохранение состояния сортировки (по умолчанию *false*) + +:::info +Если параметр **preserve** установлен в *false*, сортировка применяется однократно. Это значит, что после добавления или перемещения карточек состояние сортировки не сохраняется (порядок изменится). В противном случае состояние сортировки сохраняется даже после добавления новых карточек или их перемещения. Чтобы сбросить сохранение, вызовите метод **setSort()** с параметром ***null***. +::: + +### Пример + +~~~jsx {7-12} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// сортируем карточки в порядке возрастания по параметру "label" +board.setSort({ + by: (obj) => obj.label, // или by: "label" + dir: "asc", + columnId: "backlog", + preserve: false +}); +~~~ + +**История изменений:** Метод был добавлен в версии v1.2 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md new file mode 100644 index 0000000..78b4780 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: setTheme() +title: Метод setTheme +description: Вы можете узнать о методе setTheme в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# setTheme() + +### Описание + +@short: Динамически применяет новую тему к Kanban (с переинициализацией) + +### Использование + +~~~jsx {} +setTheme({ + name?: string, // "material" (по умолчанию) | "willow" | "willow-dark" + fonts?: boolean +}): void; +~~~ + +### Параметры + +- `name` - (необязательный) имя темы, которая будет применена к Kanban. Доступно 3 темы: + - "material" (*по умолчанию*) + - "willow" + - "willow-dark" +- `fonts` - (необязательный) включает или отключает загрузку шрифтов с CDN (шрифт wxi) + +:::tip +Для задания начальной темы можно использовать свойство [`theme`](api/config/js_kanban_theme_config.md). +::: + +### Пример + +~~~jsx {6} +// создаём Kanban +const board = new kanban.Kanban("#root", { + // начальные параметры конфигурации +}); +// устанавливаем тему "willow" +board.setTheme({ name: "willow", font: false }); +~~~ + +**Изменения:** Метод добавлен в версии v1.6 + +**Связанные статьи:** [Стилизация](guides/stylization.md) + +**Связанный пример:** [Kanban. Изменение темы через CSS-класс](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md new file mode 100644 index 0000000..ea8907f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: undo() +title: Метод undo +description: Вы можете узнать о методе undo в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# undo() + +### Описание + +@short: Отменяет последнее действие в Kanban + +:::info +Метод `undo()` работает только с конфигурацией [`history: true`](api/config/js_kanban_history_config.md)! +::: + +### Использование + +~~~jsx {} +undo(): void; +~~~ + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// делает один шаг назад в истории Kanban +board.undo(); +~~~ + +**Изменения:** Метод был добавлен в версии v1.3 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md new file mode 100644 index 0000000..7e566c8 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md @@ -0,0 +1,37 @@ +--- +sidebar_label: unselectCard() +title: Метод unselectCard +description: Вы можете узнать о методе unselectCard в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# unselectCard() + +### Описание + +@short: Снимает выделение с карточки(ек) по её ID + +### Использование + +~~~jsx {} +unselectCard({ id: string | number }): void; +~~~ + +:::info +Чтобы снять выделение со всех карточек, вызовите метод **unselectCard()** без параметров +::: + +### Параметры + +- `id` - (обязательный) ID карточки, с которой нужно снять выделение + +### Пример + +~~~jsx {7} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// снимаем выделение с карточки с ID 1 +board.unselectCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md new file mode 100644 index 0000000..741862a --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateCard() +title: Метод updateCard +description: Вы можете узнать о методе updateCard в документации JavaScript-библиотеки DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и демо в реальном времени, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# updateCard() + +### Описание + +@short: Обновляет данные карточки по её ID + +### Использование + +~~~jsx {} +updateCard({ + id: string | number, + card?: object, + replace?: boolean +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID карточки, которую необходимо обновить +- `card` - (необязательный) новый объект данных карточки. Полный список параметров карточки доступен [**здесь**](api/config/js_kanban_cards_config.md) +- `replace` - (необязательный) включает/отключает полную замену данных + + :::note + Если параметр `replace` установлен в *true*, старые данные будут полностью заменены новыми. В противном случае метод обновит только переданные значения. + ::: + +### Пример + +~~~jsx {7-16} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// обновляем данные карточки с ID 1 +board.updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*другие параметры*/ + }, + replace: true +}); +~~~ + +**История изменений**: +- Параметры **id** и **card** были добавлены в версии v1.1 +- Параметр **replace** был добавлен в версии v1.3 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md new file mode 100644 index 0000000..3a204d8 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateColumn() +title: Метод updateColumn +description: Вы можете узнать о методе updateColumn в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# updateColumn() + +### Описание + +@short: Обновляет данные колонки по её ID + +### Использование + +~~~jsx {} +updateColumn({ + id: string | number, + column?: object, + replace?: boolean +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID колонки, которую необходимо обновить +- `column` - (необязательный) новый объект данных колонки. Полный список параметров **column** можно найти [**здесь**](api/config/js_kanban_columns_config.md) +- `replace` - (необязательный) включает/отключает полную замену данных + + :::note + Если параметр `replace` установлен в *true*, старые данные будут полностью заменены новыми. В противном случае метод обновит только переданные значения. + ::: + +### Пример + +~~~jsx {7-16} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// обновляем данные колонки с ID "backlog" +board.updateColumn({ + id: "backlog", + column: { + label: "Обновлённая колонка", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +**История изменений**: +- Параметры **id** и **column** были добавлены в версии v1.1 +- Параметр **replace** был добавлен в версии v1.3 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md new file mode 100644 index 0000000..6fd89b0 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md @@ -0,0 +1,62 @@ +--- +sidebar_label: updateComment() +title: Метод updateComment +description: Ознакомьтесь с методом updateComment в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# updateComment() + +### Описание + +@short: Обновляет комментарий карточки по его ID + +### Использование + +~~~jsx {} +updateComment({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### Параметры + +- `id` - (необязательно) ID комментария, который нужно обновить +- `cardId` - (обязательно) ID карточки, комментарий которой нужно обновить +- `comment` - (обязательно) объект конфигурации обновляемого комментария. Здесь можно указать следующие параметры: + - `id` - (необязательно) ID обновляемого комментария + - `cardId` - (необязательно) ID карточки, к которой будет добавлен обновлённый комментарий + - `text` - (необязательно) текст обновляемого комментария + - `date` - (необязательно) дата обновляемого комментария + - `html` - (необязательно) HTML-разметка обновляемого комментария. Включите свойство `html` в конфигурации [`editorShape`](/api/config/js_kanban_editorshape_config/#--параметры-для-типа-comments), чтобы отображать HTML-разметку вместо текста + +### Пример + +~~~jsx {7-17} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// обновляем комментарий +board.updateComment({ + id: 1, + cardId: 1, + comment: { + id: 2, + cardId: 4, + text: "", + date: new Date("01/08/2021"), + html: "Updated comment" + } +}); +~~~ + +**История изменений:** Метод добавлен в версии v1.4 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md new file mode 100644 index 0000000..4ff51c6 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md @@ -0,0 +1,55 @@ +--- +sidebar_label: updateRow() +title: Метод updateRow +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете узнать о методе updateRow. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# updateRow() + +### Описание + +@short: Обновляет данные строки по её ID + +### Использование + +~~~jsx {} +updateRow({ + id: string | number, + row?: object, + replace?: boolean +}): void; +~~~ + +### Параметры + +- `id` - (обязательный) ID строки, которую нужно обновить +- `row` - (необязательный) новый объект данных строки. Полный список параметров **row** доступен [**здесь**](api/config/js_kanban_rows_config.md) +- `replace` - (необязательный) включает или отключает полную замену данных + + :::note + Если параметр `replace` установлен в *true*, старые данные будут полностью заменены новыми. В противном случае метод обновит только переданные значения. + ::: + +### Пример + +~~~jsx {8-15} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// обновляем данные строки с ID "feature" +board.updateRow({ + id: "feature", + row: { + label: "Обновленная строка", + collapsed: true + }, + replace: true +}); +~~~ + +**История изменений**: +- Параметры **id** и **row** были добавлены в версии v1.1 +- Параметр **replace** был добавлен в версии v1.3 \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md new file mode 100644 index 0000000..73e7c7d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md @@ -0,0 +1,28 @@ +--- +sidebar_label: destructor() +title: Метод destructor +description: Вы можете узнать о методе destructor в Toolbar в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демонстрации, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# destructor() + +### Описание + +@short: Удаляет все HTML-элементы Toolbar и отключает все связанные события + +### Использование + +~~~jsx {} +destructor(): void; +~~~ + +### Пример + +~~~jsx {6} +// создаём Kanban +const board = new kanban.Kanban("#root", {}); +// создаём Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// удаляем Toolbar +toolbar.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md new file mode 100644 index 0000000..4bbe699 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: setConfig() +title: Метод setConfig +description: Вы можете узнать о методе setConfig панели инструментов (Toolbar) в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# setConfig() + +### Описание + +@short: Устанавливает новые параметры конфигурации панели инструментов (Toolbar) + +### Использование + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### Параметры + +- `config` - (обязательный) объект конфигурации Toolbar. Полный список свойств смотрите [здесь](api/overview/main_overview.md#toolbar-properties) + +:::note +Метод изменяет только те параметры, которые вы передали. +::: + +### Пример + +~~~jsx {6-8} +// создаём Kanban +const board = new kanban.Kanban("#root", {}); +// создаём Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// устанавливаем новые параметры конфигурации Toolbar +toolbar.setConfig({ + items: ["search", "spacer", "sort"] +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md new file mode 100644 index 0000000..4d40664 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: setLocale() +title: Метод setLocale +description: В документации по библиотеке DHTMLX JavaScript Kanban вы можете узнать о методе setLocale компонента Toolbar. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# setLocale() + +### Описание + +@short: Применяет новую локализацию к Toolbar компонента Kanban + +### Использование + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### Параметры + +- `null` - (необязательно) сбрасывает локализацию Toolbar на значение по умолчанию (*английский*) +- `locale` - (необязательно) объект с данными новой локализации, который будет применён к Toolbar + +:::info +**Toolbar** Kanban — это отдельный компонент. Используйте метод `toolbar.setLocale()` для применения новой локализации только к Toolbar. Чтобы сбросить локализацию Toolbar на значение по умолчанию, вызовите метод `toolbar.setLocale()` без аргументов (или с *null*). Для применения новой локализации только к Kanban используйте метод [`kanban.setLocale()`](api/methods/js_kanban_setlocale_method.md). +::: + +### Пример + +~~~jsx {8} +// создаём Kanban +const board = new kanban.Kanban("#root", {}); +// создаём Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// применяем локализацию "de" к Kanban +board.setLocale(de); +// применяем локализацию "de" к Toolbar +toolbar.setLocale(de); +~~~ + +**Изменения:** Параметр **api** был устаревшим начиная с версии v1.6 + +**Связанные статьи:** [Локализация](guides/localization.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md new file mode 100644 index 0000000..38dec38 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: Общие настройки +title: Общие настройки +description: Вы можете ознакомиться с обзором Общих настроек JavaScript Kanban в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Общие настройки + +| Название | Описание | +| --------------------------------------------- | -------------------------------------------------- | +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/events_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/events_overview.md new file mode 100644 index 0000000..5593d58 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/events_overview.md @@ -0,0 +1,39 @@ +--- +sidebar_label: Обзор событий +title: Обзор событий +description: В документации библиотеки DHTMLX JavaScript Kanban доступен обзор событий JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Обзор событий + +| Название | Описание | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md new file mode 100644 index 0000000..fea779c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: Методы Event Bus +title: Методы Event Bus +description: В документации библиотеки DHTMLX JavaScript Kanban вы найдете обзор внутренних методов Event Bus. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Методы Event Bus + +| Название | Описание | +| -------------------------------------------------------- | ---------------------------------------------------------- | +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md new file mode 100644 index 0000000..d89e8a7 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: Методы экспорта +title: Методы экспорта +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете ознакомиться с внутренним обзором методов экспорта JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Методы экспорта + +| Название | Описание | +| -------------------------------------------- | ------------------------------------------------ | +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md new file mode 100644 index 0000000..e0d0dc8 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md @@ -0,0 +1,16 @@ +--- +sidebar_label: Методы RestDataProvider +title: Методы RestDataProvider +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете ознакомиться с внутренним обзором методов RestDataProvider. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Методы RestDataProvider + +| Название | Описание | +| ----------------------------------------------------------- | ----------------------------------------------------------------- | +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md)| +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md new file mode 100644 index 0000000..5699cd9 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: Методы состояния +title: Методы состояния +description: Вы можете ознакомиться с обзором внутренних методов состояния JavaScript Kanban в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Методы состояния + +| Название | Описание | +| -------------------------------------------------------- | ------------------------------------------------------------ | +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/main_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/main_overview.md new file mode 100644 index 0000000..eb1f8a3 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/main_overview.md @@ -0,0 +1,225 @@ +--- +sidebar_label: Обзор API +title: Обзор API +description: Вы можете ознакомиться с обзором API JavaScript Kanban в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Обзор API + +## Конструктор Kanban + +~~~js +new kanban.Kanban("#root", { + // параметры конфигурации +}); +~~~ + +**Параметры**: + +- HTML контейнер (ID HTML контейнера) +- объект параметров конфигурации ([см. здесь](#свойства-kanban)) + +## Конструктор Toolbar + +~~~js +new kanban.Toolbar("#toolbar", { + // параметры конфигурации +}); +~~~ + +**Параметры**: + +- HTML контейнер (ID HTML контейнера) +- объект параметров конфигурации ([см. здесь](#свойства-toolbar)) + +## Методы Kanban + +| Название | Описание | +| ---------------------------------------------------------| ------------------------------------------------------| +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md)| +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md)| +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md)| +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md)| +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md)| +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md)| +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md)| +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md)| +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | + +## Внутренний API Kanban + +### Методы Event Bus + +| Название | Описание | +| ---------------------------------------------------------| ------------------------------------------------------| +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | + +### Методы экспорта + +| Название | Описание | +| ---------------------------------------------------------| ------------------------------------------------------| +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | + +### Методы состояния + +| Название | Описание | +| ---------------------------------------------------------| ------------------------------------------------------| +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | + +## События Kanban + +| Название | Описание | +| :--------------------------------------------------------| :-----------------------------------------------------| +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addlink_event.md) | @getshort(../events/js_kanban_addlink_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deletelink_event.md) | @getshort(../events/js_kanban_deletelink_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | + +## Свойства Kanban + +| Название | Описание | +| :--------------------------------------------------------| :-----------------------------------------------------| +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | + +## Методы Toolbar + +| Название | Описание | +| :--------------------------------------------------------| :-----------------------------------------------------| +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | + +## Свойства Toolbar + +| Название | Описание | +| :--------------------------------------------------------| :-----------------------------------------------------| +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | + +## Общие настройки + +| Название | Описание | +| :--------------------------------------------------------| :-----------------------------------------------------| +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | + +## API RestDataProvider + +### Методы RestDataProvider + +| Название | Описание | +| ---------------------------------------------------------| ------------------------------------------------------| +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md) | +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | + +### Маршруты RestDataProvider + +| Название | Описание | +| ---------------------------------------------------------| ------------------------------------------------------| +| [GET `/cards`](api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | +| [GET `/columns`](api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | +| [GET `/links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_links_route.md) | +| [GET `/rows`](api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | +| [GET `/users`](api/provider/rest_routes/get_routes/js_kanban_get_users_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_users_route.md) | +| [GET `/uploads`](api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | +| [POST `/cards`](api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | +| [POST `/cards/{cardId}/comments`](api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | +| [POST `/cards/{cardId}/vote`](api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | +| [POST `/columns`](api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | +| [POST `/links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_links_route.md) | +| [POST `/rows`](api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | +| [POST `/uploads`](api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | @getshort(../provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | +| [PUT `/cards`](api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | +| [PUT `/cards/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | +| [PUT `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | +| [PUT `/columns`](api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | +| [PUT `/columns/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | +| [PUT `/rows`](api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | +| [PUT `/rows/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | +| [DELETE `/cards`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | +| [DELETE `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | +| [DELETE `/cards/{cardId}/vote`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | +| [DELETE `/columns`](api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | +| [DELETE `/links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | +| [DELETE `/rows`](api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md new file mode 100644 index 0000000..0fc19d3 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md @@ -0,0 +1,45 @@ +--- +sidebar_label: Обзор методов +title: Обзор методов +description: В документации библиотеки DHTMLX JavaScript Kanban доступен обзор методов JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Обзор методов + +| Название | Описание | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md) | +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md new file mode 100644 index 0000000..9a89dda --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md @@ -0,0 +1,31 @@ +--- +sidebar_label: Обзор свойств +title: Обзор свойств +description: В документации по библиотеке DHTMLX JavaScript Kanban вы найдете обзор свойств Kanban на JavaScript. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Обзор свойств Kanban + +Для настройки **Kanban** обратитесь к разделу [Configuration](guides/configuration.md). + +| Название | Описание | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md new file mode 100644 index 0000000..45d1662 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md @@ -0,0 +1,200 @@ +--- +sidebar_label: Обзор REST маршрутов +title: Обзор REST маршрутов +description: В документации библиотеки DHTMLX JavaScript Kanban вы можете ознакомиться с внутренними маршрутами Internal RestDataProvider JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Обзор REST маршрутов + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +На этой странице представлен список всех REST маршрутов с кратким описанием и ссылками на страницы с подробной информацией.
Перед тем как изучать описание каждого маршрута, рекомендуется ознакомиться с разделом [Работа с сервером](guides/working_with_server.md). + +--- + +Для быстрой навигации вы можете использовать либо вкладки ниже, либо боковое меню: +- Боковое меню показывает маршруты, сгруппированные по HTTP методам +- Чтобы быстро найти нужные маршруты для определённых операций, используйте вкладки ниже + +
+ + +

Используйте следующие маршруты для операций с карточками:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP методМаршрутОписание
`GET` /cardsПолучает данные по всем карточкам и возвращает JSON объект с массивом объектов карточек
`POST` /cardsСоздаёт новую карточку и возвращает JSON объект с ID новой карточки
`PUT` /cardsОбновляет данные указанной карточки и возвращает пустой JSON объект
`PUT` /cards/id/moveПеремещает карточки на указанную позицию
`DELETE` /cardsУдаляет данные карточки
+
+ + +

Используйте следующие маршруты для операций с рядами (swimlanes):

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP методМаршрутОписание
`GET` /rowsПолучает данные по всем рядам и возвращает JSON объект с массивом объектов с данными рядов (swimlanes)
`POST` /rowsДобавляет новый ряд и возвращает JSON объект с ID ряда
`PUT` /rowsОбновляет данные указанного ряда (swimlane) и возвращает пустой JSON объект
`PUT` /rows/id/moveПеремещает ряд на указанную позицию
`DELETE` /rowsУдаляет данные ряда
+
+ + +

Используйте следующие маршруты для операций с колонками:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP методМаршрутОписание
`GET` /columnsПолучает данные по всем колонкам и возвращает JSON объект с массивом объектов с данными колонок
`POST` /columnsДобавляет новую колонку и возвращает JSON объект с ID ряда
`PUT` /columnsОбновляет данные указанной колонки и возвращает пустой JSON объект
`PUT` /columns/id/moveПеремещает колонку на указанную позицию
`DELETE` /columnsУдаляет данные колонки
+
+ + +

Используйте следующие маршруты для операций со ссылками:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP методМаршрутОписание
`GET` /linksПолучает данные по всем ссылкам и возвращает JSON объект с массивом объектов ссылок
`POST` /linksСоздаёт новую ссылку и возвращает JSON объект с ID новой ссылки
`DELETE` /linksУдаляет данные ссылки
+
+ + +

Используйте следующие маршруты для операций с загрузками (файлы, загруженные на сервер):

+ + + + + + + + + + + + + + + + + + + + +
HTTP методМаршрутОписание
`GET` /uploadsПолучает запрашиваемый бинарный файл с сервера
`POST` /uploadsЗагружает бинарный файл на сервер и возвращает JSON объект с его id, именем и url
+
+ +
+
\ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md new file mode 100644 index 0000000..3e02806 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: Обзор методов Toolbar +title: Обзор методов Toolbar +description: В документации библиотеки DHTMLX JavaScript Kanban доступен обзор методов Toolbar JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Обзор методов Toolbar + +| Название | Описание | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md new file mode 100644 index 0000000..6bf358a --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: Обзор свойств Toolbar +title: Обзор свойств Toolbar +description: Вы можете ознакомиться с обзором свойств Toolbar в JavaScript Kanban в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Обзор свойств Toolbar + +Для настройки **Toolbar** обратитесь к разделу [Configuration](guides/configuration.md#toolbar). + +| Название | Описание | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md new file mode 100644 index 0000000..9f518f1 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getCards() +title: REST метод getCards +description: Вы можете узнать о REST методе getCards в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# getCards() + +### Описание + +@short: Возвращает промис с данными карточек + +:::info +Метод **getCards()** является частью сервиса **RestDataProvider**, предназначенного для работы с сервером +::: + +### Использование + +~~~jsx {} +getCards(): promise; +~~~ + +### Возвращаемое значение + +Метод **getCards()** отправляет запрос на сервер с помощью метода **GET** и возвращает **промис** с данными карточек + +### Пример + +~~~jsx {2,5} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**Связанные статьи:** [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md new file mode 100644 index 0000000..65d312e --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getColumns() +title: REST метод getColumns +description: Вы можете узнать о REST методе getColumns в документации JavaScript библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# getColumns() + +### Описание + +@short: Получает promise с данными колонок + +:::info +Метод **getColumns()** является частью сервиса **RestDataProvider**, предназначенного для работы с сервером +::: + +### Использование + +~~~jsx {} +getColumns(): promise; +~~~ + +### Возвращает + +Метод **getColumns()** отправляет запрос на сервер методом **GET** и возвращает **promise** с данными колонок + +### Пример + +~~~jsx {2,6} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**Связанные статьи:** [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md new file mode 100644 index 0000000..43d7e93 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: getLinks() +title: REST-метод getLinks +description: Вы можете ознакомиться с REST-методом getLinks в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# getLinks() + +### Описание + +@short: Возвращает promise с данными ссылок + +:::info +Метод **getLinks()** является частью сервиса **RestDataProvider**, предназначенного для работы с сервером +::: + +### Использование + +~~~jsx {} +getLinks(): promise; +~~~ + +### Возвращает + +Метод **getLinks()** отправляет запрос на сервер с использованием метода **GET** и возвращает **promise** с данными ссылок. + +### Пример + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), +]).then(([cards, columns, links]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links + }); + board.api.setNext(restProvider); +}); +~~~ + +**История изменений:** Метод был добавлен в версии v1.5 + +**Связанные статьи:** [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md new file mode 100644 index 0000000..a16d8d0 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getRows() +title: REST метод getRows +description: Вы можете ознакомиться с REST методом getRows в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# getRows() + +### Описание + +@short: Получает promise с данными строк + +:::info +Метод **getRows()** является частью сервиса **RestDataProvider**, предназначенного для работы с сервером +::: + +### Использование + +~~~jsx {} +getRows(): promise; +~~~ + +### Возвращает + +Метод **getRows()** отправляет запрос на сервер методом **GET** и возвращает **promise** с данными строк + +### Пример + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type" + }); + board.api.setNext(restProvider); +}); +~~~ + +**Связанные статьи:** [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md new file mode 100644 index 0000000..dec5ffd --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md @@ -0,0 +1,60 @@ +--- +sidebar_label: getUsers() +title: REST-метод getUsers +description: Вы можете ознакомиться с REST-методом getUsers в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# getUsers() + +### Описание + +@short: Возвращает promise с данными пользователей + +:::info +Метод **getUsers()** является частью сервиса **RestDataProvider**, предназначенного для работы с сервером +::: + +### Использование + +~~~jsx {} +getUsers(): promise; +~~~ + +### Возвращаемое значение + +Метод **getUsers()** отправляет запрос на сервер методом **GET** и возвращает **promise** с данными пользователей. + +### Пример + +~~~jsx {2,8,21} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows(), + restProvider.getUsers(), +]).then(([cards, columns, rows, users]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +**Журнал изменений:** Метод был добавлен в версии v1.3 + +**Связанные статьи:** [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md new file mode 100644 index 0000000..dbf15a6 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md @@ -0,0 +1,113 @@ +--- +sidebar_label: send() +title: Метод send() +description: Вы можете узнать о методе send() в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# send() + +### Описание + +@short: Отправляет необходимый HTTP-запрос на сервер и возвращает promise с данными или без них в зависимости от запроса + +Все запросы к серверу выполняются с помощью метода **send()**, который является частью сервиса [**RestDataProvider**](guides/working_with_server.md/#restdataprovider). + +### Использование + +~~~js +send( + url: string, + method: "GET" | "POST" | "PUT" | "DELETE" | string, + data?: object, + headers?: object, +): promise; +~~~ + +### Параметры + +| Имя | Тип | Описание | +| ----------- | ----------- | -------- | +| `url` | string | *Обязательный*. Путь к серверу, на который отправляется запрос. | +| `method` | string | *Обязательный*. Тип HTTP-метода (GET, POST, PUT, DELETE). | +| `data` | object | *Необязательный*. Параметры, отправляемые на сервер. По умолчанию отправляются параметры из срабатывающего события. Вы можете добавить дополнительные параметры с помощью пользовательского объекта. См. [Пример](#примеры) ниже. | +| `headers` | object | *Необязательный*. Заголовок по умолчанию — **Content-Type** с значением *application/json*. Дополнительные заголовки можно добавить через параметр **customHeaders**. См. [Пример](#примеры) ниже. | + +### Ответ + +Метод возвращает объект promise с данными или без них, в зависимости от запроса. + +Promise возвращается при успешном статусе запроса. В случае неудачного запроса клиент выбрасывает ошибку. + +Вы можете настроить, что будет возвращено. Для обработки ответа при неудачном запросе используйте метод **catch** возвращаемого promise. + +~~~jsx +restDataProvider.send(url, method, data) +.then(data => { + ... // успех: обработать данные +}) +.catch(err => { + ... // обработчик ошибок +}); +~~~ + +### Примеры + +Ниже приведён пример, как отправить запрос с дополнительными параметрами помимо стандартных: + +~~~jsx {14-20} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + // параметры конфигурации + }); + + board.api.on("add-card", obj => { + obj.custom = "custom prop"; + restProvider.send(`cards`, "POST", obj).then(data => { + board.api.parse({ cards: data }); + return Promise.resolve(); + }); + }); + + board.api.setNext(restProvider); +}); +~~~ + +Следующие примеры показывают, как добавить дополнительные заголовки в метод **send()**. + +~~~js +const customHeaders = { + "Authorization": "Bearer", + "Custom header": "some value", +}; + +board.api.on("add-cards", obj => { + restDataProvider.send("cards", "POST", obj, customHeaders); +}); +~~~ + +Или вы можете добавить заголовки, переопределив RestDataProvider, что даст вам больше контроля над данными, которые вы отправляете на сервер: + +~~~jsx {3-8} +const url = "https://some_backend_url"; + +class MyDataProvider extends RestDataProvider { + send(url, method, data, headers) { + headers = { ...headers, "SomeToken": "abc" }; + return super.send(url, method, data, headers); + } +} + +board.api.setNext(new MyDataProvider(url)); +~~~ + +--- + +**Связанные статьи:** [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md new file mode 100644 index 0000000..979029e --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md @@ -0,0 +1,44 @@ +--- +sidebar_label: DELETE /cards/{id}/comments/{id} +title: DELETE /cards/{cardId}/comments/{commentId} +description: Вы можете ознакомиться с REST маршрутом DELETE /cards/{cardId}/comments/{commentId} в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# DELETE `/cards/{cardId}/comments/{commentId}` + +### Описание + +@short: Удаляет комментарий с карточки + +Этот маршрут обрабатывает **HTTP DELETE** запрос, отправленный по пути `cards/{cardId}/comments/{commentId}`. + +### Параметры пути + +В строке запроса передаются следующие параметры: + +| Имя | Тип | Описание | +| ------------ | ----------- | -------- | +| `cardId` | number | *Обязательно*. ID карточки, из которой будет удалён комментарий. | +| `commentId` | number | *Обязательно*. ID комментария, который необходимо удалить. | + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Сервер возвращает JSON объект с ID пользователя, который удалил комментарий. + +Пример: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP статус код указывает, был ли запрос успешным (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md new file mode 100644 index 0000000..99e2b6f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /cards +title: DELETE /cards +description: Вы можете узнать о REST-маршруте DELETE /cards в документации JavaScript-библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# DELETE `/cards` + +### Описание + +@short: Удаляет данные на карточке + +Маршрут обрабатывает **HTTP DELETE** запрос, отправленный по пути `/cards/{id}`. + +### Параметры пути + +В строке запроса передается следующий параметр: + +| Имя | Тип | Описание | +| ---------- | ----------- | ---------- | +| `id` | number | *Обязательный*. ID карточки, которую нужно удалить.| + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Данные не возвращаются. HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md new file mode 100644 index 0000000..557cb60 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md @@ -0,0 +1,43 @@ +--- +sidebar_label: DELETE /cards/{id}/vote +title: DELETE /cards/{cardId}/vote +description: Вы можете ознакомиться с REST маршрутом DELETE /cards/{cardId}/vote в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# DELETE `/cards/{cardId}/vote` + +### Описание + +@short: Удаляет голос с карточки и возвращает json объект с ID пользователя, который удалил голос. + +Маршрут обрабатывает **HTTP DELETE** запрос, отправленный на путь `/cards/{cardId}/vote`. + +### Параметры пути + +В строке запроса передается следующий параметр: + +| Название | Тип | Описание | +| --------- | ----------- | ------------------------------------------------------ | +| `cardId` | number | *Обязательный*. ID карточки, с которой будет удалён голос.| + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Маршрут возвращает json объект с ID пользователя, который удалил голос. + +Пример: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md new file mode 100644 index 0000000..9c7b7e3 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /columns +title: DELETE /columns +description: Вы можете узнать о REST-маршруте DELETE /columns в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# DELETE `/columns` + +### Описание + +@short: Удаляет данные по колонке + +Маршрут обрабатывает **HTTP DELETE** запрос, отправленный на путь `/columns/{id}`. + +### Параметры пути + +В строке запроса передается следующий параметр: + +| Название | Тип | Описание | +| --------- | ----------- | ----------------------------| +| `id` | number | *Обязательный*. ID колонки, которую нужно удалить.| + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Данные в ответе не возвращаются. HTTP статус код показывает, успешно ли выполнен запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md new file mode 100644 index 0000000..3c0082c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: DELETE /links +title: DELETE /links +description: Вы можете узнать о REST-маршруте DELETE /links в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# DELETE `/links` + +### Описание + +@short: Удаляет данные о связи + +Маршрут обрабатывает **HTTP DELETE** запрос, отправленный по пути `/links/{id}`. + +### Параметры пути + +Следующий параметр передается в строке запроса: + +| Имя | Тип | Описание | +| ---- | ------- | --------------------------------- | +| `id` | number | *Обязательный*. ID связи для удаления. | + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Данные в ответе не возвращаются. HTTP статус код указывает, успешно ли выполнен запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: +- [Работа с сервером](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md new file mode 100644 index 0000000..4eaec52 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /rows +title: DELETE /rows +description: Вы можете узнать о REST-маршруте DELETE /rows в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# DELETE `/rows` + +### Описание + +@short: Удаляет данные в строке (swimlane) + +Маршрут обрабатывает **HTTP DELETE** запрос, отправленный на путь `/rows/{id}`. + +### Параметры пути + +Следующий параметр передается в строке запроса: + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `id` | number | *Обязательный*. ID строки, которую нужно удалить.| + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Данные в ответе не возвращаются. HTTP статус код показывает, успешно ли выполнен запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md new file mode 100644 index 0000000..e56f611 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md @@ -0,0 +1,81 @@ +--- +sidebar_label: GET /cards +title: GET /cards +description: Вы можете ознакомиться с REST-маршрутом GET /cards в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# GET `/cards` + +### Описание + +@short: Получает данные обо всех карточках и возвращает json-объект с массивом объектов карточек + +Маршрут обрабатывает **HTTP GET** запрос, сделанный по пути `/cards`. + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Маршрут возвращает json-объект с массивом всех объектов карточек. + +Пример: + +~~~json +[ + { + "id": 4, + "label": "Set the tasks priorities", + "description": "", + "column": 2, + "row": 1, + "start_date": "2018-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, + { + "id": 5, + "label": "Custom icons", + "description": "", + "column": 2, + "row": 2, + "start_date": "2019-01-01T00:00:00Z", + "end_date": null, + "progress": 0, + "attached": [], + "color": "#65D3B3", + "users": [] + }, + { + "id": 6, + "label": "Integration with Gantt", + "description": "", + "column": 2, + "row": 2, + "start_date": "2020-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, +] +~~~ + +:::note +Даты начала и окончания события должны соответствовать ISO формату **yyyy-MM-dd'T'HH:mm:ss.SSSXXX** +::: + +Для другого примера возвращаемого объекта смотрите раздел [**cards**](api/config/js_kanban_cards_config.md). + +HTTP статус-код показывает, был ли запрос успешным (response.status == 200) или завершился с ошибкой (response.status == 500). + +--- + +**Связанные статьи**: +- [Работа с сервером](guides/working_with_server.md) +- [getCards()](api/provider/rest_methods/js_kanban_getcards_method.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md new file mode 100644 index 0000000..1a65859 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md @@ -0,0 +1,58 @@ +--- +sidebar_label: GET /columns +title: GET /columns +description: Вы можете узнать о REST маршруте GET /columns в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# GET `/columns` + +### Описание + +@short: Получает данные обо всех колонках и возвращает json объект с массивом объектов с данными колонок + +Маршрут обрабатывает **HTTP GET** запрос, сделанный по пути `/columns`. + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Маршрут возвращает json объект с массивом объектов с данными колонок. + +Пример: + +~~~json +[ + { + "id": 1, + "label": "Backlog", + "collapsed": false + }, + { + "id": 2, + "label": "In Progress", + "collapsed": false + }, + { + "id": 3, + "label": "Testing", + "collapsed": false + }, + { + "id": 4, + "label": "Done", + "collapsed": false + } +] +~~~ + +Для другого примера возвращаемого объекта перейдите к разделу [**columns**](api/config/js_kanban_columns_config.md). + +HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: +- [Работа с сервером](guides/working_with_server.md) +- [getColumns()](api/provider/rest_methods/js_kanban_getcolumns_method.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md new file mode 100644 index 0000000..0e2282c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md @@ -0,0 +1,50 @@ +--- +sidebar_label: GET /links +title: GET /links +description: Вы можете ознакомиться с REST маршрутом GET /links в документации JavaScript библиотеки DHTMLX Kanban. Просмотрите руководства для разработчиков и справочник API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# GET `/links` + +### Описание + +@short: Получает данные обо всех ссылках и возвращает json объект с массивом объектов ссылок + +Этот маршрут обрабатывает **HTTP GET** запрос, сделанный по пути `/links`. + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Маршрут возвращает json объект с массивом всех объектов ссылок. + +Пример: + +~~~json +[ + { + "id": 1, + "source": 2, + "target": 5, + "relation": "relatesTo", + }, + { + "id": 2, + "source": 4, + "target": 9, + "relation": "relatesTo", + }, +] +~~~ + +Для другого примера возвращаемого объекта перейдите к разделу [**links**](api/config/js_kanban_links_config.md). + +HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: +- [Работа с сервером](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md new file mode 100644 index 0000000..541b2ac --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md @@ -0,0 +1,48 @@ +--- +sidebar_label: GET /rows +title: GET /rows +description: Вы можете узнать о REST-маршруте GET /rows в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# GET `/rows` + +### Описание + +@short: Получает данные обо всех строках и возвращает json-объект с массивом объектов с данными строк (swimlanes) + +Маршрут обрабатывает **HTTP GET** запрос, отправленный на путь `/rows`. + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Маршрут возвращает json-объект с массивом объектов с данными строк. + +Пример: + +~~~json +[ + { + "id": 1, + "label": "Feature", + "collapsed": false + }, + { + "id": 2, + "label": "Task", + "collapsed": false + } +] +~~~ + +Другой пример возвращаемого объекта смотрите в разделе [**rows**](api/config/js_kanban_rows_config.md). + +HTTP статус-код показывает, успешно ли выполнен запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: +- [Работа с сервером](guides/working_with_server.md) +- [getRows()](api/provider/rest_methods/js_kanban_getrows_method.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md new file mode 100644 index 0000000..22b5f22 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: GET /uploads +title: GET /uploads +description: Вы можете узнать о REST-маршруте GET /uploads в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# GET `/uploads` + +### Описание + +@short: Получает запрошенный бинарный файл с сервера + +Маршрут обрабатывает **HTTP GET** запрос, сделанный по пути `/uploads/{id}/{name}`. + +### Параметры пути + +В строке запроса передаются следующие параметры: + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `id` | number | *Обязательно*. ID требуемого файла. | +| `name` | string | *Обязательно*. Имя запрашиваемого файла. | + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Маршрут возвращает запрошенный бинарный файл. + +HTTP статус код указывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md new file mode 100644 index 0000000..db63dfd --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: GET /users +title: GET /users +description: Вы можете узнать о REST-маршруте GET /users в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# GET `/users` + +### Описание + +@short: Получает данные обо всех пользователях и возвращает json-объект с массивом объектов пользователей + +Маршрут обрабатывает **HTTP GET** запрос, сделанный по пути `/users`. + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Маршрут возвращает json-объект с массивом объектов, содержащих данные пользователей. + +Пример: + +~~~json +[ + { + "id": 1, + "label": "Jhon", + "avatar": "https://serv.com/images/jhon.png" + }, + { + "id": 2, + "label": "Ben", + "avatar": "https://serv.com/images/ben.png" + }, + { + "id": 3, + "label": "Alex", + "avatar": "https://serv.com/images/alex.png" + } +] +~~~ + +Другой пример возвращаемого объекта смотрите в разделе [**cardShape**](api/config/js_kanban_cardshape_config.md). + +HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: +- [Работа с сервером](guides/working_with_server.md) +- [getUsers()](api/provider/rest_methods/js_kanban_getusers_method.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md new file mode 100644 index 0000000..e061d85 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /cards/{id}/comments +title: POST /cards/{cardId}/comments +description: Вы можете узнать о REST маршруте POST /cards/{cardId}/comments в документации JavaScript библиотеки DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# POST `/cards/{cardId}/comments` + +### Описание + +@short: Добавляет новый(ые) комментарий(и) к карточке и возвращает json объект с ID добавленного комментария + +Маршрут обрабатывает **HTTP POST** запрос, отправленный на путь `/cards/{cardId}/comments`. + +### Тело запроса + +Сервер ожидает получить json объект со следующими свойствами: + +| Имя | Тип | Описание | +| ----------- | ----------- | ----------- | +| `text` | string | *Обязательно*. Текст комментария. | +| `date` | object | *Обязательно*. Дата комментария. | + +Пример: + +~~~json +{ + "text": "The comment content", + "date": "2023-05-18T09:13:56.656Z", +} +~~~ + +### Ответ + +Маршрут возвращает json объект с ID добавленного комментария. + +Пример: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP статус код показывает, успешно ли выполнен запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md new file mode 100644 index 0000000..ac5fb23 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md @@ -0,0 +1,51 @@ +--- +sidebar_label: POST /cards +title: POST /cards +description: Вы можете ознакомиться с REST маршрутом POST /cards в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# POST `/cards` + +### Описание + +@short: Создаёт новую карточку и возвращает json объект с ID новой карточки + +Маршрут обрабатывает **HTTP POST** запрос, направленный на путь `/cards`. + +### Тело запроса + +Сервер ожидает получить json объект со следующими свойствами: + +| Имя | Тип | Описание | +| ----------- | ----------- | ----------- | +| `label` | string | *Обязательное*. Название новой карточки, которую нужно добавить. | +| `column` | number | *Обязательное*. ID целевой колонки. | +| `row` | number | *Обязательное*. ID целевой строки. | + +Пример: + +~~~json +{ + "label": "New card", + "column": 2, + "row": 1, +} +~~~ + +### Ответ + +Маршрут возвращает json объект с ID новой карточки. + +Пример: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP статус код показывает, успешно ли выполнен запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md new file mode 100644 index 0000000..cc5385c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md @@ -0,0 +1,35 @@ +--- +sidebar_label: POST /cards/{id}/vote +title: POST /cards/{cardId}/vote +description: Вы можете узнать о REST-маршруте POST /cards/{cardId}/vote в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# POST `/cards/{cardId}/vote` + +### Описание + +@short: Добавляет новый голос к карточке и возвращает json-объект с ID пользователя, проголосовавшего + +Этот маршрут обрабатывает **HTTP POST** запрос, отправленный по пути `/cards/{cardId}/vote`. + +### Тело запроса + +Тело запроса не требуется. + +### Ответ + +Маршрут возвращает json-объект с ID пользователя, который проголосовал. + +Пример: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP-статус код показывает, был ли запрос успешным (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md new file mode 100644 index 0000000..cec578f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md @@ -0,0 +1,47 @@ +--- +sidebar_label: POST /columns +title: POST /columns +description: Вы можете ознакомиться с маршрутом REST POST /columns в документации JavaScript-библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демонстрации, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# POST `/columns` + +### Описание + +@short: Добавляет новую колонку и возвращает json-объект с id колонки + +Маршрут обрабатывает **HTTP POST** запрос, отправленный на путь `/columns`. + +### Тело запроса + +Сервер ожидает получить json-объект со следующими свойствами: + +| Название | Тип | Описание | +| ----------- | ------------ | -------- | +| `label` | string | *Обязательно*. Название новой колонки, которую нужно добавить.| + +Пример: + +~~~json +{ + "label": "New column", +} +~~~ + +### Ответ + +Маршрут возвращает json-объект с id новой колонки. + +Пример: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md new file mode 100644 index 0000000..1b15760 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md @@ -0,0 +1,54 @@ +--- +sidebar_label: POST /links +title: POST /links +description: Вы можете ознакомиться с REST маршрутом POST /links в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# POST `/links` + +### Описание + +@short: Создаёт новую ссылку и возвращает json объект с новым ID ссылки + +Маршрут обрабатывает **HTTP POST** запрос, отправленный на путь `/links`. + +### Тело запроса + +Сервер ожидает получить json объект со следующими свойствами: + +| Имя | Тип | Описание | +| ----------- | ---------------------- | --------------------------------| +| `source` | *number* или *string* | *Обязательно*. ID начальной ссылки. | +| `target` | *number* или *string* | *Обязательно*. ID конечной ссылки. | +| `relation` | *string* | *Обязательно*. Тип связи, создаваемой ссылкой. | + +Пример: + +~~~json +{ + "source": 1, + "target": 2, + "relation": "relatesTo" +} +~~~ + +### Ответ + +Маршрут возвращает json объект с новым ID ссылки. + +Пример: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: +- [Работа с сервером](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md new file mode 100644 index 0000000..35b857f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /rows +title: POST /rows +description: Вы можете узнать о REST-маршруте POST /rows в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демонстрации, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# POST /rows + +### Описание + +@short: Добавляет новую строку и возвращает json-объект с ID строки. + +Маршрут обрабатывает **HTTP POST** запрос, отправленный по пути **'/rows'**. + +### Тело запроса + +Сервер ожидает получить json-объект со следующими свойствами: + +| Название | Тип | Описание | +| ----------- | ----------- | ----------- | +| `label` | string | *Обязательно*. Название новой строки, которую нужно добавить. | +| `collapsed` | boolean | *Необязательно*. Текущее состояние строки (swimlane). По умолчанию строка развёрнута (значение **false**). Если **true**, строка изначально свернута. | + +Пример: + +~~~json +{ + "label": "New row", + "collapsed": "true", +} +~~~ + +### Ответ + +Маршрут возвращает json-объект с ID новой строки. + +Пример: + +~~~json +{ + "id": 2 +} +~~~ + +HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md new file mode 100644 index 0000000..70b060f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md @@ -0,0 +1,57 @@ +--- +sidebar_label: POST /uploads +title: POST /uploads +description: Вы можете ознакомиться с REST маршрутом POST /uploads в документации JavaScript библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# POST `/uploads` + +### Описание + +@short: Загружает бинарный файл на сервер и возвращает JSON объект с id файла, именем и URL + +Этот маршрут обрабатывает **HTTP POST** multipart-запрос, отправляемый на путь `/uploads`. + +### Тело запроса + +Сервер должен получить бинарный файл через запрос с типом **multipart/form-data**. Как и во всех multipart MIME типах, тело запроса должно содержать: + +- заголовок **Content-Disposition**, который должен быть установлен в значение **form-data** + - атрибут **name** со значением **upload** + - **filename** — оригинальное имя загружаемого файла +- заголовок **Content-Type** — тип содержимого файла + +За один запрос можно отправить только один файл. + +Пример: + +~~~ +------WebKitFormBoundarySlwgXDBw7kcKSI4p +Content-Disposition: form-data; name="upload"; filename="myImage.png" +Content-Type: image/png + +------WebKitFormBoundarySlwgXDBw7kcKSI4p-- +~~~ + +### Ответ + +Маршрут возвращает JSON объект с id файла, именем и URL. + +Свойство **isCover** указывает, является ли изображение обложкой (true) или нет (false). + +Пример: + +~~~ json +{ + "id":4, + "name":"myImage.png", + "url":"http://localhost:3000/uploads/4/myImage.png", + "isCover":false +} +~~~ + +HTTP статус код показывает, успешно ли выполнен запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md new file mode 100644 index 0000000..42903d7 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md @@ -0,0 +1,56 @@ +--- +sidebar_label: PUT /cards/{id}/comments/{id} +title: PUT /cards/{cardId}/comments/{commentId} +description: Вы можете узнать о REST маршруте PUT /cards/{cardId}/comments/{cardId} в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# PUT `/cards/{cardId}/comments/{commentId}` + +### Описание + +@short: Обновляет комментарий в карточке и возвращает json объект с ID обновлённого комментария + +Этот маршрут обрабатывает **HTTP PUT** запрос, отправленный по пути `cards/{cardId}/comments/{commentId}`. + +### Параметры пути + +Следующие параметры передаются в строке запроса: + +| Название | Тип | Описание | +| ----------- | ----------- | ----------- | +| `cardId` | number | *Обязательный*. ID карточки, в которой обновляется комментарий. | +| `commentId` | number | *Обязательный*. ID комментария, который нужно обновить. | + +### Тело запроса + +Сервер ожидает получить json объект со следующими свойствами: + +| Название | Тип | Описание | +| ----------- | ----------- | ----------- | +| `text` | string | *Обязательный*. Текст комментария.| + +Пример: + +~~~json +{ + "text": "Содержимое комментария" +} +~~~ + +### Ответ + +Сервер возвращает json объект с ID карточки. + +Пример: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP статус код показывает, был ли запрос успешным (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md new file mode 100644 index 0000000..f670481 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md @@ -0,0 +1,93 @@ +--- +sidebar_label: PUT /cards/{id}/move +title: PUT /cards/{id}/move +description: Вы можете узнать о REST маршруте PUT /cards/{id}/move в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# PUT `/cards/{id}/move` + +### Описание + +@short: Перемещает карточки на указанную позицию + +Этот маршрут обрабатывает **HTTP PUT** запрос, отправляемый по пути `cards/{id}/move`. + +### Параметры пути + +В строке запроса передаётся следующий параметр: + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `id` | number | *Обязательный*. ID карточки, которую нужно переместить. Если требуется переместить несколько карточек, `id` должен быть равен 0 | + +:::info +При перемещении нескольких карточек убедитесь, что `id` установлен в 0, иначе (если задано другое значение) будет перемещена только одна карточка с указанным `id`. +::: + +### Тело запроса + +Сервер ожидает получить JSON-объект со следующими свойствами: + +| Имя | Тип | Описание | +| ----------- | ----------- | -------- | +| `id` | number | *Обязательный*. ID перемещаемой карточки. | +| `columnId` | number | *Обязательный*. ID колонки, в которую перемещается карточка. | +| `rowId` | number | *Обязательный*. ID строки, в которую перемещается карточка. | +| `before` | number | *Необязательный*. ID карточки, перед которой должна быть размещена перемещаемая карточка. | +| `batch` | object | *Обязательный для мультивыбора*. Массив объектов карточек, которые перемещаются. | + +Пример: + +~~~json +{ + "id": 4, + "columnId": 2, + "rowId": 1, + "before": "7" +} +~~~ + +Если перемещается несколько карточек, свойство `batch` должно содержать массив всех перемещаемых объектов карточек: + +~~~json +{ + "batch": [ + { + "id": 2, + "columnId": 1, + "rowId": 1, + "before": "1" + }, + { + "id": 7, + "columnId": 1, + "rowId": 1, + "before": "1" + } + ] +} +~~~ + +### Ответ + +Сервер возвращает JSON-объект с ID карточки (если перемещается одна карточка) или с ID, равным 0, при операции с несколькими карточками. + +Пример: + +~~~json title="Ответ на запрос при операции с одной карточкой" +{ + "id": 4 +} +~~~ + +~~~json title="Ответ на запрос при операции с несколькими карточками" +{ + "id": 0 +} +~~~ + +HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md new file mode 100644 index 0000000..ae76ffa --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md @@ -0,0 +1,71 @@ +--- +sidebar_label: PUT /cards +title: PUT /cards +description: Вы можете узнать о REST-маршруте PUT /cards в документации библиотеки DHTMLX JavaScript Kanban. Просматривайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# PUT `/cards` + +### Описание + +@short: Обновляет данные указанной карточки и возвращает пустой json объект. + +Этот маршрут обрабатывает **HTTP PUT** запрос, отправленный на путь `/cards/{id}`. + +### Параметры пути + +Следующий параметр передается в строке запроса: + +| Название | Тип | Описание | +| ---------- | ----------- | -------- | +| `id` | number | *Обязательный*. ID карточки, которую нужно обновить.| + +### Тело запроса + +Сервер должен получить json объект с объектом карточки, содержащим все свойства карточки (как неизменённые, так и новые/изменённые). + +| Название | Тип | Описание | +| ------------- | ----------- | -------- | +| `label` | string | *Обязательный*. Название карточки, которую нужно обновить.| +| `description` | string | *Обязательный*. Описание карточки.| +| `column` | number | *Обязательный*. ID колонки, к которой относится карточка.| +| `row` | number | *Обязательный*. ID строки, к которой относится карточка.| +| `start_date` | string | *Обязательный*. Дата начала в формате ISO yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `end_date` | string | *Обязательный*. Дата окончания в формате ISO yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `progress` | number | *Обязательный*. Значение прогресс-бара в диапазоне от 0 до 100.| +| `attached` | object | *Обязательный*. Массив с данными прикрепленных файлов. Пример объекта смотрите в разделе [**cards**](api/config/js_kanban_cards_config.md)| +| `color` | string | *Обязательный*. Цвет верхней линии карточки в HEX формате.| +| `priority` | number | *Обязательный*. ID приоритета карточки. | +| `users` | object | *Обязательный*. Массив с ID назначенных пользователей. Пример объекта смотрите в разделе [**cardShape**](api/config/js_kanban_cardshape_config.md)| + +Пример: + +~~~json +{ + "card": { + "label": "Drag and drop", + "description": "", + "column": 3, + "row": 1, + "start_date": null, + "end_date": "2018-01-01T00:00:00Z", + "progress": 100, + "attached": [], + "color": "#58C3FE", + "priority": 2, + "users": [] + }, +} +~~~ + +Другой пример объекта карточки вы можете найти в разделе [**cards**](api/config/js_kanban_cards_config.md). + +### Ответ + +В случае успешного выполнения возвращается пустой json объект. + +HTTP статус-код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md new file mode 100644 index 0000000..8b4fe41 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /columns/{id}/move +title: PUT /columns/{id}/move +description: Вы можете узнать о REST-маршруте PUT /columns/{id}/move в документации библиотеки DHTMLX JavaScript Kanban. Просматривайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# PUT `/columns/{id}/move` + +### Описание + +@short: Перемещает колонку на указанную позицию + +Маршрут обрабатывает **HTTP PUT** запрос, отправленный по пути `columns/{id}/move`. + +### Параметры пути + +В строке запроса передается следующий параметр: + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `id` | number | *Обязательный*. ID колонки, которую нужно переместить.| + +### Тело запроса + +Сервер ожидает получить JSON-объект со следующими свойствами: + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `before` | number | *Необязательный*. ID колонки, перед которой должна быть размещена перемещаемая колонка.| + +Пример: + +~~~json +{ + "before": 3 +} +~~~ + +### Ответ + +Сервер возвращает JSON-объект с ID перемещённой колонки. + +Пример: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP статус код показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md new file mode 100644 index 0000000..b785836 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /columns +title: PUT /columns +description: Вы можете ознакомиться с REST маршрутом PUT /columns в документации библиотеки DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# PUT `/columns` + +### Описание + +@short: Обновляет данные указанной колонки и возвращает пустой JSON объект + +Маршрут обрабатывает **HTTP PUT** запрос, направленный по пути `/columns/{id}`. + +### Параметры пути + +Следующий параметр передаётся в строке запроса: + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `id` | number | *Обязательный*. ID колонки, которую необходимо обновить.| + +### Тело запроса + +Сервер должен получить JSON объект со всеми свойствами колонки (как неизменёнными, так и новыми/изменёнными). + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `label` | string | *Обязательное*. Название колонки для обновления.| +| `collapsed`| boolean | *Необязательное*. Состояние колонки: **true**, если колонка изначально свернута, и **false** для развёрнутого состояния (по умолчанию).| + +Пример: + +~~~json +{ + "column": { + "label": "Column 1", + "collapsed": false, + } +} +~~~ + +Другой пример объекта колонки можно найти в разделе [**columns**](api/config/js_kanban_columns_config.md). + +### Ответ + +В случае успешного выполнения возвращается пустой JSON объект. + +HTTP статус код указывает на успешность запроса (response.status == 200) или ошибку (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md new file mode 100644 index 0000000..ea8a031 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /rows/{id}/move +title: PUT /rows/{id}/move +description: Вы можете узнать о REST-маршруте PUT /rows/{id}/move в документации библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# PUT `/rows/{id}/move` + +### Описание + +@short: Перемещает строку на указанную позицию + +Маршрут обрабатывает **HTTP PUT** запрос, направленный по пути `rows/{id}/move`. + +### Параметры пути + +В строке запроса передается следующий параметр: + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `id` | number | *Обязательный*. ID строки, которую нужно переместить.| + +### Тело запроса + +Сервер ожидает получить JSON-объект со следующими свойствами: + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `before` | number | *Необязательно*. ID строки, перед которой должна быть размещена перемещаемая строка.| + +Пример: + +~~~json +{ + "before": 3 +} +~~~ + +### Ответ + +Сервер возвращает JSON-объект с ID перемещенной строки. + +Пример: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP статус-код указывает, успешно ли выполнен запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md new file mode 100644 index 0000000..a7bc8e9 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /rows +title: PUT /rows +description: Вы можете узнать о REST-маршруте PUT /rows в документации к JavaScript-библиотеке DHTMLX Kanban. Просматривайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачивайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# PUT `/rows` + +### Описание + +@short: Обновляет данные в указанной строке (swimlane) и возвращает пустой JSON-объект + +Маршрут обрабатывает **HTTP PUT** запрос, направленный на путь `/rows/{id}`. + +### Параметры пути + +Следующий параметр передается в строке запроса: + +| Имя | Тип | Описание | +| ---------- | ----------- | -------- | +| `id` | number | *Обязательный*. ID строки (swimlane), которую необходимо обновить.| + +### Тело запроса + +Сервер должен получить JSON-объект со всеми свойствами строки (как неизменёнными, так и новыми/изменёнными). + +| Имя | Тип | Описание | +| ----------- | ----------- | -------- | +| `label` | string | *Обязательный*. Название строки, которую нужно обновить.| +| `collapsed` | boolean | *Необязательный*. Состояние строки: **true**, если строка изначально свернута, и **false** — если развернута (значение по умолчанию).| + +Пример: + +~~~json +{ + "row": { + "label": "Row 1", + "collapsed": false, + } +} +~~~ + +Другой пример объекта строки можно найти в разделе [**rows**](api/config/js_kanban_rows_config.md). + +### Ответ + +В случае успешного выполнения возвращается пустой JSON-объект. + +HTTP-код статуса показывает, успешен ли запрос (response.status == 200) или произошла ошибка (response.status == 500). + +--- + +**Связанные статьи**: [Работа с сервером](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png b/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png new file mode 100755 index 0000000..247c695 Binary files /dev/null and b/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png differ diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png b/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png new file mode 100755 index 0000000..525d0d0 Binary files /dev/null and b/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png differ diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png b/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png new file mode 100644 index 0000000..f6aa948 Binary files /dev/null and b/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png differ diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png b/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png new file mode 100755 index 0000000..4c79b7f Binary files /dev/null and b/i18n/ru/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png differ diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/assets/trial_kanban.png b/i18n/ru/docusaurus-plugin-content-docs/current/assets/trial_kanban.png new file mode 100644 index 0000000..e71d948 Binary files /dev/null and b/i18n/ru/docusaurus-plugin-content-docs/current/assets/trial_kanban.png differ diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png b/i18n/ru/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png new file mode 100644 index 0000000..555b3f1 Binary files /dev/null and b/i18n/ru/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png differ diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/configuration.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/configuration.md new file mode 100644 index 0000000..711cd4d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/configuration.md @@ -0,0 +1,577 @@ +--- +sidebar_label: Конфигурация +title: Конфигурация +description: Ознакомьтесь с возможностями настройки в документации по JavaScript-библиотеке DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Конфигурация + +Вы можете настраивать внешний вид и функциональность *Kanban* с помощью соответствующего API. Доступные параметры позволят вам: + +- настроить внешний вид карточек через свойство [`cardShape`](api/config/js_kanban_cardshape_config.md) +- настроить поля редактора через свойство [`editorShape`](api/config/js_kanban_editorshape_config.md) +- настроить поведение редактора через свойство [`editor`](api/config/js_kanban_editor_config.md) +- настроить рендеринг и прокрутку через свойства [`renderType`](api/config/js_kanban_rendertype_config.md) и [`scrollType`](api/config/js_kanban_scrolltype_config.md) +- настроить историю Kanban через свойство [`history`](api/config/js_kanban_history_config.md) +- кастомизировать внешний вид карточек через свойство [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) + - *Смотрите раздел [**Кастомизация**](guides/customization.md) для подробностей!* +- применить нужную локализацию через свойство [`locale`](api/config/js_kanban_locale_config.md) + - *Смотрите раздел [**Локализация**](guides/localization.md) для подробностей!* +- загрузить данные для карточек, колонок, строк и связей через соответствующие свойства [`cards`](api/config/js_kanban_cards_config.md), [`columns`](api/config/js_kanban_columns_config.md), [`rows`](api/config/js_kanban_rows_config.md) и [`links`](api/config/js_kanban_links_config.md) + - *Смотрите раздел [**Работа с данными**](guides/working_with_data.md) для подробностей!* + +## Карточки + +Доска Kanban состоит из *карточек*, распределённых по *колонкам* и *строкам*. Вы можете настроить внешний вид карточек с помощью свойства конфигурации [`cardShape`](api/config/js_kanban_cardshape_config.md). Доступно несколько предустановленных полей, которые можно включить или исключить из шаблона карточки, а именно: + +- метка карточки через конфиг `label: boolean` +- описание карточки через конфиг `description: boolean` + + :::tip + Вы можете управлять полями **label** и **description** любой карточки через соответствующие поля редактора Kanban. Если эти поля активированы, соответствующие инпуты автоматически появятся в редакторе. Для их настройки используйте типы [**text** и **textarea**](#типы-text-и-textarea). + ::: + +- прогресс карточки через конфиг `progress: boolean` + + :::tip + Вы можете управлять полем **progress** любой карточки через соответствующий контрол редактора Kanban. Если поле активировано, контрол появится в редакторе автоматически. Для настройки используйте тип [**progress**](#тип-progress). + ::: + +- дата начала через конфиг `start_date: boolean` +- дата окончания через конфиг `end_date: boolean` + + :::tip + Вы можете управлять полями **start date** и **end date** любой карточки через соответствующие контролы редактора Kanban. Если поля активированы, контролы появятся в редакторе автоматически. Для их настройки используйте тип [**date**](#типы-date-и-daterange). + ::: + +- контекстное меню карточки через конфиг `menu: boolean` +- вложения карточки через конфиг `attached: boolean` + + :::tip + Вы можете **прикреплять файлы** к любой карточке через соответствующее поле редактора Kanban. Для настройки этого поля используйте тип [**files**](#тип-files). + ::: + +- цвет карточки через конфиг `color: boolean` + + :::tip + Вы можете управлять **верхней цветной полоской** любой карточки через соответствующий контрол редактора Kanban. При активации **color** контрол (**colorpicker**) появится в редакторе автоматически. Для настройки используйте тип [**color**](#тип-color). + ::: + +- обложка карточки (*превью-изображение*) через конфиг `cover: boolean` +- комментарии к карточке через конфиг `comments: boolean` +- диалог подтверждения удаления карточки через конфиг `confirmDeletion: boolean` +- голосование по карточке через конфиг `votes: boolean | { show: boolean, clicable: true }` +- назначение пользователей на карточку через конфиг `users: boolean | { show: boolean, values: object, maxCount: number | false }` + + :::tip + Вы можете назначать одного или нескольких пользователей на любую карточку через соответствующий контрол редактора Kanban. Для назначения одного пользователя используйте типы редактора [**combo** или **select**](#типы-combo-select-и-multiselect), для нескольких — [**multiselect**](#типы-combo-select-и-multiselect). + ::: + +- приоритет карточки через конфиг `priority: boolean | { show: boolean, values: object }` + + :::tip + Вы можете управлять **приоритетом** любой карточки через соответствующий контрол редактора Kanban. Если **priority** активирован, контрол появится в редакторе автоматически. Для настройки используйте только типы [**combo** или **select**](#типы-combo-select-и-multiselect). + ::: + +- *кастомное поле* через конфиг `headerFields: [ { key: string, label: string, css: string } ]` + +~~~jsx {12-35,42} +const users = [ // данные пользователей + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // данные приоритета карточек + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardShape = { // настройки карточек + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + priority: { + show: true, + values: cardPriority + }, + users: { + show: true, + values: users + }, + headerFields: [ + { + key: "sprint", + label: "Custom field", + css: "custom_css_class" + } + ] +}; + +new kanban.Kanban("#root", { + // данные карточек + columns, + cards, + // настройки карточек + cardShape +}); +~~~ + +:::note +Если вы не укажете настройки карточек через свойство [`cardShape`](api/config/js_kanban_cardshape_config.md), виджет применит набор параметров [**defaultCardShape**](api/config/js_kanban_cardshape_config.md#default-config)! +::: + +## Редактор + +:::info +Вы можете отображать редактор как **боковую панель** или **модальное окно** с помощью свойства [`editor.placement`](api/config/js_kanban_editor_config.md)! +::: + +*Редактор* Kanban состоит из полей для управления данными карточек. Для настройки полей (контролов) редактора используйте свойство [`editorShape`](api/config/js_kanban_editorshape_config.md). Доступны следующие типы полей редактора: + +- [**combo**, **select** и **multiselect**](#типы-combo-select-и-multiselect) +- [**color**](#тип-color) +- [**text** и **textarea**](#типы-text-и-textarea) +- [**progress**](#тип-progress) +- [**files**](#тип-files) +- [**date** и **dataRange**](#типы-date-и-daterange) +- [**comments**](#тип-comments) +- [**links**](#тип-links) + +### Типы Combo, Select и Multiselect + +Поля редактора типов **combo**, **select** и **multiselect** можно задать следующим образом: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", // или "select" и "multiselect" + key: "priority", // ключ "priority" используется при настройке свойства "cardShape" + label: "Priority", + values: [ + { id: 1, label: "high" }, + { id: 2, label: "medium" }, + { id: 3, label: "low" } + ] + }, + // настройки других полей + ] +}); +~~~ + +:::info +Для поля редактора типа **"multiselect"** и **"combo"** вы также можете указать путь к превью-изображению через свойство **avatar**: + +~~~jsx {3,9,13} +editorShape: [ + { + type: "multiselect", // или "combo" + key: "users", // ключ "users" используется при настройке свойства "cardShape" + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + { + id: 2, label: "John", + avatar: "preview_image_path_2.png" + } + ] + }, + // настройки других полей +] +~~~ + +[**Kanban. Ограничение назначения только одним пользователем**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban) +::: + +### Тип Color + +Поле редактора типа **color** можно задать следующим образом: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "color", + key: "color", // ключ "color" используется при настройке свойства "cardShape" + label: "Card color", + values: ["#65D3B3", "#FFC975", "#58C3FE"], + config: { + clear: true, + placeholder: "Select color" + } + }, + // настройки других полей + ] +}); +~~~ + +### Типы Text и Textarea + +Поля редактора типов **text** и **textarea** можно задать следующим образом: + +~~~jsx {3-14} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "text", // или "textarea" + key: "label", + label: "Label", + config: { + placeholder: "Type your tips here", + readonly: false, + focus: true, + disabled: false, + inputStyle: "height: 50px;" + } + }, + // настройки других полей + ] +}); +~~~ + +### Тип Progress + +Поле редактора типа **progress** можно задать следующим образом: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "progress", + key: "progress", // ключ "progress" используется при настройке свойства "cardShape" + label: "Progress", + config: { + min: 10, + max: 90, + step: 5 + } + }, + // настройки других полей + ] +}); +~~~ + +### Тип Files + +Поле редактора типа **files** можно задать следующим образом: + +#### Настройка uploadURL как строки + +~~~jsx {4-15} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + { + type: "files", + key: "attached", // ключ "attached" используется при настройке свойства "cardShape" + label: "Attachment", + uploadURL: url + "/uploads", // указать url как строку + config: { + accept: "image/*", // "video/*", "audio/*" + disabled: false, + multiple: true, + folder: false + } + }, + // настройки других полей + ] +}); +~~~ + +#### Настройка uploadURL как функции + +~~~jsx {9-31} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + ...defaultEditorShape, + { + key: "attached", + type: "files", + label: "Files", + uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // token или другие заголовки + } + }; + + return fetch(url + "/uploads", config) // URL + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); + } + } + ] +}); +~~~ + +### Типы Date и DateRange + +Поле редактора типа **date** можно задать следующим образом: + +~~~jsx {3-8} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "date", + key: "start_date", + label: "Start date", + format: "%d/%m/%y" + }, + // настройки других полей + ] +}); +~~~ + +Поле редактора типа **dateRange** можно задать следующим образом: + +~~~jsx {3-11} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "dateRange", + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range", + format: "%d/%m/%y" + }, + // настройки других полей + ] +}); +~~~ + +### Тип Comments + +Поле редактора типа **comments** можно задать следующим образом: + +~~~jsx {3-13} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "comments", + key: "comments", + label: "Comments", + config: { + dateFormat: "%M %d", + placement: "page", // или "editor" + html: true, + confirmDeletion: true + } + }, + // настройки других полей + ] +}); +~~~ + +### Тип Links + +Поле редактора типа **links** можно задать следующим образом: + +~~~jsx {3-10} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "links", + key: "links", + label: "Links", + config: { + confirmDeletion: true + } + }, + // настройки других полей + ] +}); +~~~ + +### Привязка полей редактора к полям карточки + +:::info +Чтобы связать поле редактора с соответствующим полем карточки, укажите специальный **key** в объекте свойства [`editorShape`](api/config/js_kanban_editorshape_config.md) (`key: "editor_field_key"`). Значение этого ключа должно быть установлено в *true* в свойстве [`cardShape`](api/config/js_kanban_cardshape_config.md) (для встроенных полей карточки) или указано в массиве **headerFields** (для кастомных полей карточки). Начальные данные любого поля также можно задать через этот ключ. + +~~~jsx {5,13,22,25,33-34,38-39,45-47} +// настройки редактора +const editorShape = [ + { + type: "text", + key: "label", + label: "Label", + config: { + placeholder: "Enter new label here" + } + }, + { + type: "textarea", + key: "note", + label: "Note", + config: { + placeholder: "Enter usefull note here" + } + } +]; +// настройки карточек +const cardShape = { + label: true, // ключ встроенного поля + headerFields: [ + { + key: "note", // ключ кастомного поля + label: "Note" + } + ] +}; +// данные карточек +const cards = [ + { + label: "Volvo", + note: "It is the swedish car", + column: "backlog" + }, + { + label: "Audi", + note: "It is the german car", + column: "backlog" + } +]; +// создать Kanban +new kanban.Kanban("#root", { + editorShape, + cardShape, + cards, + columns + // другие параметры конфигурации +}); +~~~ +::: + +:::note +Если вы не укажете настройки редактора через свойство [`editorShape`](api/config/js_kanban_editorshape_config.md), виджет применит набор параметров [**defaultEditorShape**](api/config/js_kanban_editorshape_config.md#default-config). В этом случае стандартные контролы и поля появятся в редакторе только после активации соответствующих полей карточек через свойство [`cardShape`](api/config/js_kanban_cardshape_config.md). +::: + +### Настройка редактора + +С помощью свойства [`editor`](api/config/js_kanban_editor_config.md) вы можете настроить редактор следующим образом: + +- включить/отключить режим автосохранения редактора через свойство *`editor.autoSave`* +- указать задержку автосохранения данных через свойство *`editor.debounce`* (работает только с параметром ***autoSave: true***) + +~~~jsx {6-9} +// создать Kanban +new kanban.Kanban("#root", { + columns, + cards, + editorShape, + editor: { + autoSave: true, + debounce: 2000 + } + // другие параметры +}); +~~~ + +## Toolbar + +**Toolbar** Kanban состоит из строки поиска для *поиска карточек* и контролов для *сортировки карточек* и *добавления новых колонок и строк*. Для отображения Toolbar необходимо инициализировать его в отдельном контейнере с помощью конструктора **kanban.Toolbar()**. + +~~~jsx {13} +// создать Kanban +const board = new kanban.Kanban("#root", { + // данные + columns, + cards, + rows, + // настройки карточек + cardShape, + // настройки редактора + editorShape +}); + +new kanban.Toolbar("#toolbar", { api: board.api }); +~~~ + +Вы можете управлять (*скрывать/отображать/кастомизировать*) контролами Toolbar с помощью свойства **items**: + +~~~jsx {6-51} +// создать Kanban +const board = new kanban.Kanban("#root", {...}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { // кастомная строка поиска + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", // пустое пространство + "undo", // контрол для отмены операций с карточками из истории + "redo", // контрол для повтора операций с карточками из истории + { // кастомный контрол сортировки + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", // контрол для добавления новых колонок + "addRow", // контрол для добавления новых строк + // кастомные элементы + ] +}); +~~~ + +:::tip +Чтобы скрыть некоторые контролы Toolbar, удалите соответствующие строки из массива **items**. +::: + +## Пример + +В этом сниппете показано, как настроить **Карточки**, **Редактор** и **Toolbar** Kanban: + + diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/customization.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/customization.md new file mode 100644 index 0000000..77d87b8 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/customization.md @@ -0,0 +1,42 @@ +--- +sidebar_label: Кастомизация +title: Кастомизация +description: Вы можете узнать о возможностях кастомизации в документации по DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Кастомизация + +Помимо настройки Kanban, вы можете кастомизировать его внешний вид и поведение. Виджет позволяет задать собственный шаблон для карточек, изменить контекстное меню для карточек, колонок и строк, изменить структуру и функциональность Toolbar, а также применить собственные css-стили к Kanban. + +## Кастомные карточки + +Для отображения карточек по собственному шаблону вы можете использовать свойство [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md). Это функция-колбэк, которая позволяет определить нужные стили и логику и применить их к Kanban. Пример ниже: + + + +## Кастомное контекстное меню + +Для кастомизации контекстного меню карточек, колонок и строк вы можете использовать соответствующие свойства: [`cardShape`](api/config/js_kanban_cardshape_config.md), [`columnShape`](api/config/js_kanban_columnshape_config.md) и [`rowShape`](api/config/js_kanban_rowshape_config.md). Пример ниже: + + + +## Кастомный Toolbar + +Для изменения структуры Toolbar и его функциональности используйте свойство [`items`](api/config/toolbar_items_config.md). В массиве этой настройки вы можете определить необходимые элементы управления, расположить их в нужном порядке, а также изменить их поведение. + +В примере ниже показано, как можно кастомизировать следующее: + +- порядок расположения элементов управления +- поисковую строку и её поведение +- элемент сортировки и его поведение +- кастомный элемент и его поведение + + + +## Кастомные стили + +Вы можете изменить внешний вид Kanban, изменяя значения соответствующих *CSS-переменных*. Подробнее смотрите в разделе [**Стилизация**](guides/stylization.md). + +В этом примере показано, как применить кастомные стили к Kanban: + + \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/initialization.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/initialization.md new file mode 100644 index 0000000..7956e1b --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/initialization.md @@ -0,0 +1,91 @@ +--- +sidebar_label: Инициализация +title: Инициализация +description: Вы можете узнать об инициализации в документации по DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Инициализация + +В этом руководстве вы найдете подробные инструкции по созданию Kanban на странице для расширения вашего приложения возможностями Kanban-доски. Выполните следующие шаги, чтобы получить готовый к использованию компонент: + +1. [Подключите исходные файлы Kanban на страницу](#подключение-исходных-файлов). +2. [Создайте контейнер для Kanban](#создание-контейнера). +3. [Инициализируйте Kanban с помощью конструктора](#инициализация-kanban). + +## Подключение исходных файлов + +[Скачайте пакет](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml) и распакуйте его в папку вашего проекта. + +Для создания Kanban необходимо подключить 2 исходных файла на страницу: + +- *kanban.js* +- *kanban.css* + +Убедитесь, что вы указали правильные относительные пути к исходным файлам: + +~~~html title="index.html" + + +~~~ + +## Создание контейнера + +Добавьте контейнер для Kanban и задайте ему идентификатор, например, *"root"*: + +~~~jsx title="index.html" +
+~~~ + +Если вы хотите создать виджет вместе с *Toolbar*, необходимо добавить для него отдельный контейнер: + +~~~jsx {1} title="index.html" +
// контейнер для Toolbar +
// контейнер для Kanban +~~~ + +## Инициализация Kanban + +Инициализируйте Kanban с помощью конструктора **kanban.Kanban**. Он принимает два параметра: + +- HTML-контейнер (ID HTML-контейнера) +- объект с конфигурационными свойствами. [Полный список смотрите здесь](#конфигурационные-свойства) + +~~~jsx title="index.html" +// создание Kanban +new kanban.Kanban("#root", { + // конфигурационные свойства +}); +~~~ + +Если вы хотите создать виджет вместе с *Toolbar*, его необходимо инициализировать отдельно с помощью конструктора **kanban.Toolbar**. Он также принимает два параметра: + +- HTML-контейнер (ID HTML-контейнера) +- объект с конфигурационными свойствами + +~~~jsx {6-8} title="index.html" +// создание Kanban +const board = new kanban.Kanban("#root", { + // конфигурационные свойства +}); + +new kanban.Toolbar("#toolbar", { + // конфигурационные свойства +}); +~~~ + +:::info +Чтобы узнать больше о настройке Toolbar для Kanban, прочитайте раздел [**Configuration**](guides/configuration.md/#toolbar) +::: + +### Конфигурационные свойства + +:::note +Полный список свойств для настройки **Kanban** можно найти [**здесь**](api/overview/properties_overview.md).
+Полный список свойств для настройки **Toolbar для Kanban** можно найти [**здесь**](api/overview/toolbar_properties_overview.md). +::: + +## Пример + +В этом примере показано, как инициализировать **Kanban** с начальными данными: + + \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration.md new file mode 100644 index 0000000..12075a1 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration.md @@ -0,0 +1,17 @@ +--- +sidebar_label: Интеграция с DHTML виджетами +title: Интеграция с DHTML виджетами +description: Вы можете узнать об интеграции в документации по JavaScript библиотеке DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Интеграция с DHTML виджетами + +Вы можете интегрировать DHTMLX Kanban с другими виджетами DHTMLX (например, [Gantt](https://docs.dhtmlx.com/gantt/), [Scheduler](https://docs.dhtmlx.com/scheduler/), [To Do List](https://docs.dhtmlx.com/todolist/)). Ознакомьтесь с примерами ниже. + +## Интеграция с DHTMLX Gantt и Scheduler + + + +## Интеграция с DHTMLX To Do List + + \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md new file mode 100644 index 0000000..306a8d3 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md @@ -0,0 +1,388 @@ +--- +sidebar_label: Интеграция с Angular +title: Интеграция с Angular +description: Вы можете узнать об интеграции с Angular в документации по JavaScript-библиотеке DHTMLX Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Интеграция с Angular + +:::tip +Перед прочтением данной документации рекомендуется ознакомиться с базовыми концепциями и паттернами **Angular**. Для обновления знаний обратитесь к [**Angular documentation**](https://v17.angular.io/docs). +::: + +DHTMLX Kanban совместим с **Angular**. Мы подготовили примеры кода по использованию DHTMLX Kanban с **Angular**. Для получения дополнительной информации обратитесь к соответствующему [**Example on GitHub**](https://github.com/DHTMLX/angular-kanban-demo). + +## Создание проекта + +:::info +Перед началом создания нового проекта установите [**Angular CLI**](https://v17.angular.io/cli) и [**Node.js**](https://nodejs.org/en/). +::: + +Создайте новый проект **my-angular-kanban-app** с помощью Angular CLI. Для этого выполните следующую команду: + +~~~json +ng new my-angular-kanban-app +~~~ + +:::note +Если вы хотите следовать этому руководству, отключите Server-Side Rendering (SSR) и Static Site Generation (SSG/Prerendering) при создании нового приложения Angular! +::: + +Команда выше установит все необходимые инструменты, поэтому дополнительные команды запускать не требуется. + +### Установка зависимостей + +Перейдите в директорию только что созданного приложения: + +~~~json +cd my-angular-kanban-app +~~~ + +Установите зависимости и запустите dev-сервер. Для этого используйте менеджер пакетов [**yarn**](https://yarnpkg.com/): + +~~~json +yarn +yarn start +~~~ + +Приложение будет доступно на localhost (например, `http://localhost:3000`). + +## Создание Kanban + +Теперь необходимо получить исходный код DHTMLX Kanban. Для начала остановите приложение и установите пакет Kanban. + +### Шаг 1. Установка пакета + +Скачайте [**trial Kanban package**](/how_to_start/#установка-kanban-через-npm-или-yarn) и следуйте инструкциям из файла README. Обратите внимание, что пробная версия Kanban доступна только 30 дней. + +### Шаг 2. Создание компонента + +Теперь нужно создать Angular-компонент, чтобы добавить Kanban с Toolbar в приложение. Создайте папку **kanban** в директории **src/app/**, добавьте в неё новый файл и назовите его **kanban.component.ts**. + +#### Импорт исходных файлов + +Откройте файл **kanban.component.ts** и импортируйте исходные файлы Kanban. Обратите внимание: + +- если вы используете PRO-версию и устанавливаете пакет Kanban из локальной папки, импорт будет выглядеть так: + +~~~jsx +import { Kanban, Toolbar } from 'dhx-kanban-package'; +~~~ + +- если вы используете пробную версию Kanban, укажите следующий путь: + +~~~jsx +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +~~~ + +В этом руководстве показано, как настроить **trial** версию Kanban. + +#### Задание контейнеров и инициализация Kanban с Toolbar + +Чтобы отобразить Kanban с Toolbar на странице, нужно задать контейнеры для Kanban и Toolbar, а также инициализировать эти компоненты с помощью соответствующих конструкторов: + +~~~jsx {1,8-11,15-18,24-31} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", // имя шаблона, используемого в файле "app.component.ts" как + styleUrls: ["./kanban.component.css"], // подключение css-файла + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + // инициализация контейнера для Toolbar + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + // инициализация контейнера для Kanban + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + // инициализация компонента Kanban + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + // инициализация компонента Toolbar + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // другие параметры конфигурации + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); // уничтожение Kanban + this._toolbar.destructor(); // уничтожение Toolbar + } +} +~~~ + +#### Добавление стилей + +Для корректного отображения Kanban необходимо добавить соответствующие стили. Для этого создайте файл **kanban.component.css** в директории **src/app/kanban/** и пропишите в нём основные стили для Kanban и его контейнера: + +~~~css title="kanban.component.css" +/* импорт стилей Kanban */ +@import "@dhx/trial-kanban/dist/kanban.css"; + +/* стили для начальной страницы */ +html, +body{ + height: 100%; + padding: 0; + margin: 0; +} + +/* стили для контейнера Kanban и Toolbar */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* стили для контейнера Kanban */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### Загрузка данных + +Чтобы добавить данные в Kanban, необходимо предоставить набор данных. Вы можете создать файл **data.ts** в директории **src/app/kanban/** и добавить туда данные: + +~~~jsx {2,14,37,48} title="data.ts" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Далее откройте файл ***kanban.component.ts***. Импортируйте файл с данными и укажите соответствующие свойства данных в объекте конфигурации Kanban внутри метода `ngOnInit()`, как показано ниже: + +~~~jsx {2,23,25-27} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // импорт данных +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // инициализация данных + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns, // данные по колонкам + cards, // данные по карточкам + rows, // данные по строкам + rowKey: "type", + // другие параметры конфигурации + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // другие параметры конфигурации + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +Также вы можете использовать метод [`parse()`](/api/methods/js_kanban_parse_method/) внутри метода `ngOnInit()` компонента Angular для загрузки данных в Kanban. + +~~~jsx {2,23,37-42} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // импорт данных +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // инициализация данных + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // другие параметры конфигурации + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // другие параметры конфигурации + }); + + // загрузка данных с помощью метода parse() + this._kanban.parse({ + columns, + cards, + rows + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +Метод `parse(data)` позволяет перезагружать данные при каждом изменении. + +Теперь компонент Kanban готов к использованию. После добавления элемента на страницу Kanban будет инициализирован с данными. Вы также можете задать необходимые параметры конфигурации. Посетите [Kanban API docs](/api/overview/properties_overview/), чтобы ознакомиться с полным списком доступных свойств. + +#### Обработка событий + +Когда пользователь выполняет какое-либо действие в Kanban, вызывается событие. Вы можете использовать эти события для отслеживания действий и запуска необходимого кода. Ознакомьтесь с [полным списком событий](/api/overview/events_overview/). + +Откройте файл **kanban.component.ts** и дополните метод `ngOnInit()` следующим образом: + +~~~jsx {5-7} title="kanban.component.ts" +// ... +ngOnInit() { + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + this._kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); +} + +ngOnDestroy(): void { + this._kanban.destructor(); +} +~~~ + +### Шаг 3. Добавление Kanban в приложение + +Чтобы добавить компонент ***KanbanComponent*** в ваше приложение, откройте файл ***src/app/app.component.ts*** и замените стандартный код следующим образом: + +~~~jsx {5} title="app.component.ts" +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + template: `` +}) +export class AppComponent { + name = ""; +} +~~~ + +Затем создайте файл ***app.module.ts*** в директории ***src/app/*** и укажите компонент *KanbanComponent* следующим образом: + +~~~jsx {4-5,8} title="app.module.ts" +import { NgModule } from "@angular/core"; +import { BrowserModule } from "@angular/platform-browser"; + +import { AppComponent } from "./app.component"; +import { KanbanComponent } from "./kanban/kanban.component"; + +@NgModule({ + declarations: [AppComponent, KanbanComponent], + imports: [BrowserModule], + bootstrap: [AppComponent] +}) +export class AppModule {} +~~~ + +Последний шаг — откройте файл ***src/main.ts*** и замените существующий код следующим: + +~~~jsx title="main.ts" +import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; +import { AppModule } from "./app/app.module"; +platformBrowserDynamic() + .bootstrapModule(AppModule) + .catch((err) => console.error(err)); +~~~ + +После этого вы можете запустить приложение и увидеть Kanban с загруженными данными на странице. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Angular + +Теперь вы знаете, как интегрировать DHTMLX Kanban с Angular. Вы можете доработать код под свои задачи. Финальный продвинутый пример доступен на [**GitHub**](https://github.com/DHTMLX/angular-kanban-demo). \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_react.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_react.md new file mode 100644 index 0000000..65161f9 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_react.md @@ -0,0 +1,337 @@ +--- +sidebar_label: Интеграция с React +title: Интеграция с React +description: Ознакомьтесь с интеграцией с React в документации по JavaScript Kanban библиотеке DHTMLX. Изучайте руководства для разработчиков, справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Интеграция с React + +:::tip +Перед чтением этой документации рекомендуется ознакомиться с базовыми концепциями и паттернами [**React**](https://react.dev). Для обновления знаний обратитесь к [**документации React**](https://react.dev/learn). +::: + +DHTMLX Kanban совместим с **React**. Мы подготовили примеры кода, показывающие, как использовать DHTMLX Kanban с **React**. Подробности смотрите в соответствующем [**примере на GitHub**](https://github.com/DHTMLX/react-kanban-demo). + +## Создание проекта + +:::info +Перед созданием нового проекта установите [**Vite**](https://vite.dev/) (опционально) и [**Node.js**](https://nodejs.org/en/). +::: + +Вы можете создать базовый проект **React** или использовать **React с Vite**. Назовём проект **my-react-kanban-app**: + +~~~json +npx create-react-app my-react-kanban-app +~~~ + +### Установка зависимостей + +Перейдите в директорию созданного приложения: + +~~~json +cd my-react-kanban-app +~~~ + +Установите зависимости и запустите dev-сервер. Для этого используйте менеджер пакетов: + +- если вы используете [**yarn**](https://yarnpkg.com/), выполните следующие команды: + +~~~json +yarn +yarn start +~~~ + +- если вы используете [**npm**](https://www.npmjs.com/), выполните следующие команды: + +~~~json +npm install +npm run dev +~~~ + +Приложение будет работать на локальном сервере (например, `http://localhost:3000`). + +## Создание Kanban + +Теперь необходимо получить исходный код DHTMLX Kanban. Сначала остановите приложение и приступайте к установке пакета Kanban. + +### Шаг 1. Установка пакета + +Скачайте [**пробный пакет Kanban**](/how_to_start/#установка-kanban-через-npm-или-yarn) и выполните шаги, описанные в файле README. Обратите внимание, что пробная версия Kanban доступна только 30 дней. + +### Шаг 2. Создание компонента + +Теперь необходимо создать компонент React, чтобы добавить Kanban в приложение. Создайте новый файл в директории ***src/*** и назовите его ***Kanban.jsx***. + +#### Импорт исходных файлов + +Откройте файл ***Kanban.jsx*** и импортируйте исходные файлы Kanban. Обратите внимание: + +- если вы используете PRO-версию и устанавливаете пакет Kanban из локальной папки, пути к импортам будут следующими: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from 'dhx-kanban-package'; +import 'dhx-kanban-package/dist/kanban.css'; +~~~ + +Учтите, что в зависимости от используемого пакета исходные файлы могут быть минифицированы. В этом случае убедитесь, что импортируете CSS-файл как ***kanban.min.css***. + +- если вы используете пробную версию Kanban, укажите следующие пути: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import "@dhx/trial-kanban/dist/kanban.css"; +~~~ + +В этом руководстве показано, как настроить **пробную** версию Kanban. + +#### Задание контейнеров и добавление Kanban с Toolbar + +Чтобы отобразить Kanban с Toolbar на странице, необходимо создать контейнеры для Kanban и Toolbar и инициализировать эти компоненты с помощью соответствующих конструкторов: + +~~~jsx {2,6-7,10-11,13-17} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import '@dhx/trial-kanban/dist/kanban.css'; // подключение стилей Kanban + +export default function KanbanComponent(props) { + let toolbar_container = useRef(); // инициализация контейнера для Toolbar + let kanban_container = useRef(); // инициализация контейнера для Kanban + + useEffect(() => { + // инициализация компонента Kanban + const kanban = new Kanban(kanban_container.current, {}); + + // инициализация компонента Toolbar + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, // передача внутреннего API Kanban + // другие параметры конфигурации + }); + + return () => { + kanban.destructor(); // уничтожение Kanban + toolbar.destructor(); // уничтожение Toolbar + }; + }, []); + + return
+
+
+
+} +~~~ + +#### Добавление стилей + +Для корректного отображения Kanban необходимо задать основные стили для Kanban и его контейнера в основном css-файле проекта: + +~~~css title="index.css" +/* стили для начальной страницы */ +html, +body, +#root { + height: 100%; + padding: 0; + margin: 0; +} + +/* стили для контейнера Kanban и Toolbar */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* стили для контейнера Kanban */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### Загрузка данных + +Чтобы добавить данные в Kanban, необходимо предоставить набор данных. Вы можете создать файл ***data.js*** в директории ***src/*** и добавить в него данные: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Затем откройте файл ***App.js*** и импортируйте данные. После этого можно передать данные в созданный компонент `` через **props**: + +~~~jsx {2,5-6} title="App.js" +import Kanban from "./Kanban"; +import { getData } from "./data"; + +function App() { + const { columns, cards, rows } = getData(); + return ; +} + +export default App; +~~~ + +Перейдите в файл ***Kanban.jsx*** и примените переданные **props** к объекту конфигурации Kanban: + +~~~jsx {5,11-13} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: props.columns, // данные для колонок + cards: props.cards, // данные для карточек + rows: props.rows, // данные для строк + rowKey: "type", + // другие параметры конфигурации + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // другие параметры конфигурации + }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +Также можно использовать метод [`parse()`](/api/methods/js_kanban_parse_method/) внутри метода `useEffect()` в React для загрузки данных в Kanban: + +~~~jsx {9-11,27} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + let columns = props.columns; // данные для колонок + let cards = props.cards; // данные для карточек + let rows = props.rows; // данные для строк + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // другие параметры конфигурации + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // другие параметры конфигурации + }); + + kanban.parse({ columns, cards, rows }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +Метод `parse(data)` позволяет перезагружать данные при каждом изменении. + +Теперь компонент Kanban готов. Когда элемент будет добавлен на страницу, он инициализирует Kanban с данными. Вы также можете задать необходимые настройки конфигурации. Посетите [документацию по API Kanban](/api/overview/properties_overview/), чтобы ознакомиться с полным списком доступных свойств. + +#### Обработка событий + +Когда пользователь выполняет действие в Kanban, возникает событие. Вы можете использовать эти события для определения действия и запуска необходимого кода. Ознакомьтесь с [полным списком событий](/api/overview/events_overview/). + +Откройте ***Kanban.jsx*** и дополните метод `useEffect()` следующим образом: + +~~~jsx {5-7} title="Kanban.jsx" +// ... +useEffect(() => { + const kanban = new Kanban(kanban_container.current, {}); + + kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); + + return () => { + kanban.destructor(); + }; +}, []); +// ... +~~~ + +После этого вы можете запустить приложение и увидеть Kanban с загруженными данными на странице. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban с React + +Теперь вы знаете, как интегрировать DHTMLX Kanban с React. Вы можете доработать код в соответствии с вашими требованиями. Финальный расширенный пример доступен на [**GitHub**](https://github.com/DHTMLX/react-kanban-demo). \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md new file mode 100644 index 0000000..7d06dee --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md @@ -0,0 +1,110 @@ +--- +sidebar_label: Интеграция с Salesforce +title: Интеграция с Salesforce +description: Узнайте, как интегрировать DHTMLX Kanban в Salesforce. В этом руководстве описывается необходимая HTML-разметка и настройка окружения для корректной работы внутри компонентов Salesforce Lightning. +--- + +# Интеграция с Salesforce + +:::tip +Перед прочтением этой документации рекомендуется ознакомиться с базовыми концепциями и паттернами работы с [**Salesforce**](https://www.salesforce.com/). Для повторения материала воспользуйтесь [**официальной документацией Salesforce**](https://developer.salesforce.com/docs). +::: + +DHTMLX Kanban совместим с платформой [Salesforce](https://www.salesforce.com/). Мы подготовили примеры кода по добавлению DHTMLX Kanban в окружение Salesforce. Дополнительную информацию можно найти в соответствующем [примере на GitHub](https://github.com/DHTMLX/salesforce-lwc-demo). + +:::note +Виджет Kanban на JavaScript автоматически определяет, что работает в окружении [**Salesforce**](https://www.salesforce.com/) и настраивает внутреннюю логику интеграции. В большинстве случаев вам не нужно вручную вызывать какие-либо [**специфические методы Salesforce**](#специфические-методы-salesforce). +::: + +## Подготовка окружения + +Если вы хотите добавить Kanban в свой проект Salesforce, необходимо пометить *корневой* контейнер HTML-атрибутом `data-wx-root="true"`. Этот атрибут позволяет библиотеке определить основной узел для монтирования виджетов **Kanban** и **Toolbar**. + +```html title="kanban.html" + +``` + +Вложенные элементы с атрибутом `data-wx-portal-root="1"` служат контейнерами для компонентов DHTMLX (например, **Toolbar** и **Kanban**). + +## API окружения Salesforce + +DHTMLX Kanban включает вспомогательный класс `salesForceEnv`, который содержит методы для ручного управления окружением Salesforce. Вы можете импортировать класс `salesForceEnv` следующим образом: + +```jsx {4} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; +``` + +:::note +Обычно специфические для Salesforce методы не требуются, но они доступны как запасной вариант на случай, если автоматическое определение не сработает. +::: + +### Специфические методы Salesforce + +Вы можете использовать следующие методы вспомогательного класса `salesForceEnv`: + +| Метод | Описание | +| :------------------------------------------------------------- | :----------------------------------------------------------------------- | +| `salesForceEnv.detect()` | Определяет, работает ли Kanban внутри Salesforce | +| `salesForceEnv.addGlobalEvent(eventName, handler, htmlElement)`| Подключает глобальное событие к первому доступному HTML-элементу | +| `salesForceEnv.getTopNode()` | Возвращает первый доступный HTML-элемент в DOM-иерархии Salesforce | + +```jsx {4,7} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; + +salesForceEnv.detect(); +``` + +### Дополнительная экспортируемая функция + +| Функция | Описание | +| :------------------- | :-------------------------------------------------------------------------------- | +| `enableSalesForce()` | Ручная установка окружения Salesforce, если автоматическое определение недоступно | + +```jsx {5,8} +import { + Kanban, + Toolbar, + salesForceEnv, + enableSalesForce +} from "@dhx/trial-kanban"; + +enableSalesForce(); +``` + +## Этапы работы + +1. Добавьте атрибут `data-wx-root="true"` в ваш LWC-контейнер +2. Импортируйте и инициализируйте DHTMLX Kanban и Toolbar (опционально) +3. Виджет Kanban на JavaScript автоматически определяет контекст Salesforce и применяет внутреннюю конфигурацию +4. Нет необходимости вызывать функцию `enableSalesForce()` или использовать методы `salesForceEnv`, если ваше приложение не работает в нестандартном сценарии встраивания + +### Пример + +```jsx title="kanban.js" +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default class KanbanLWC { + connectedCallback() { + const kanban_container = this.template.querySelector(".sf_kanban"); + const toolbar_container = this.template.querySelector(".sf_toolbar"); + const kanban = new Kanban(kanban_container, { /* configuration properties */ }); + const toolbar = new Toolbar(toolbar_container, { api: kanban.api }); + } +} +``` + +Теперь компонент DHTMLX Kanban полностью интегрирован в ваше окружение **Salesforce Lightning**. Виджет автоматически обрабатывает DOM-иерархию и привязку событий внутри LWC. Вы можете продолжить настройку Kanban через его стандартный API, а также изменять внешний вид и логику Kanban в соответствии с требованиями вашего проекта. Финальный пример вы найдете на [**GitHub**](https://github.com/DHTMLX/salesforce-lwc-demo). \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md new file mode 100644 index 0000000..644441f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md @@ -0,0 +1,346 @@ +--- +sidebar_label: Интеграция с Svelte +title: Интеграция с Svelte +description: Ознакомьтесь с документацией по интеграции с Svelte для JavaScript-библиотеки DHTMLX Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Интеграция с Svelte + +:::tip +Перед чтением этой документации рекомендуется ознакомиться с базовыми понятиями и паттернами **Svelte**. Для обновления знаний обратитесь к [**документации Svelte**](https://svelte.dev/docs/svelte/overview). +::: + +DHTMLX Kanban совместим с **Svelte**. Мы подготовили примеры кода по использованию DHTMLX Kanban с **Svelte**. Для получения дополнительной информации смотрите соответствующий [**пример на GitHub**](https://github.com/DHTMLX/svelte-kanban-demo). + +## Создание проекта + +:::info +Перед началом создания нового проекта установите [**Vite**](https://vite.dev/) (опционально) и [**Node.js**](https://nodejs.org/en/). +::: + +Существует несколько способов создания проекта на **Svelte**: + +- можно использовать [**SvelteKit**](https://kit.svelte.dev/) + +или + +- можно также использовать **Svelte с Vite** (без SvelteKit): + +~~~json +npm create vite@latest +~~~ + +Подробнее смотрите в [связанной статье](https://svelte.dev/docs/svelte/overview). + +### Установка зависимостей + +Назовём проект **my-svelte-kanban-app** и перейдём в директорию приложения: + +~~~json +cd my-svelte-kanban-app +~~~ + +Установите зависимости и запустите dev-сервер. Для этого используйте менеджер пакетов: + +- если вы используете [**yarn**](https://yarnpkg.com/), выполните следующие команды: + +~~~json +yarn +yarn start +~~~ + +- если вы используете [**npm**](https://www.npmjs.com/), выполните следующие команды: + +~~~json +npm install +npm run dev +~~~ + +Приложение должно запуститься на localhost (например, `http://localhost:3000`). + +## Создание Kanban + +Теперь необходимо получить исходный код DHTMLX Kanban. Сначала остановите приложение и установите пакет Kanban. + +### Шаг 1. Установка пакета + +Скачайте [**пробный пакет Kanban**](/how_to_start/#установка-kanban-через-npm-или-yarn) и следуйте шагам, описанным в файле README. Обратите внимание, что пробная версия Kanban доступна только 30 дней. + +### Шаг 2. Создание компонента + +Теперь нужно создать компонент Svelte, чтобы добавить Kanban с Toolbar в приложение. Создайте новый файл в директории ***src/*** и назовите его ***Kanban.svelte***. + +#### Импорт исходных файлов + +Откройте файл ***Kanban.svelte*** и импортируйте исходные файлы Kanban. Обратите внимание: + +- если вы используете PRO-версию и устанавливаете Kanban из локальной папки, пути для импорта будут такими: + +~~~html title="Kanban.svelte" + +~~~ + +В зависимости от используемого пакета исходные файлы могут быть минифицированы. В этом случае убедитесь, что импортируете CSS-файл как **kanban.min.css**. + +- если вы используете пробную версию Kanban, укажите следующие пути: + +~~~html title="Kanban.svelte" + + +
+
+
+
+~~~ + +#### Загрузка данных + +Чтобы добавить данные в Kanban, необходимо предоставить набор данных. Вы можете создать файл ***data.js*** в директории ***src/*** и добавить в него данные: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Затем откройте файл ***App.svelte***, импортируйте данные и передайте их в созданный компонент `` через **props**: + +~~~html {3,5,8} title="App.svelte" + + + +~~~ + +Перейдите в файл ***Kanban.svelte*** и примените переданные **props** к объекту конфигурации Kanban: + +~~~html {6-8,15-17} title="Kanban.svelte" + + +
+
+
+
+~~~ + +Также вы можете использовать метод [`parse()`](/api/methods/js_kanban_parse_method/) внутри метода `onMount()` Svelte для загрузки данных в Kanban: + +~~~html {6-8,27} title="Kanban.svelte" + + +
+
+
+
+~~~ + +Метод `parse(data)` обеспечивает перезагрузку данных при каждом внесённом изменении. + +Теперь компонент Kanban готов к использованию. Когда элемент будет добавлен на страницу, он инициализирует Kanban с данными. Вы также можете указать необходимые параметры конфигурации. Посетите [документацию по API Kanban](/api/overview/properties_overview/), чтобы ознакомиться с полным списком доступных свойств. + +#### Обработка событий + +Когда пользователь выполняет какое-либо действие в Kanban, вызывается событие. Вы можете использовать эти события для отслеживания действий и запуска необходимого кода. Смотрите [полный список событий](/api/overview/events_overview/). + +Откройте ***Kanban.svelte*** и дополните метод `onMount()` следующим образом: + +~~~html {8-10} title="Kanban.svelte" + + +// ... +~~~ + +### Шаг 3. Добавление Kanban в приложение + +Чтобы добавить компонент в приложение, откройте файл **App.svelte** и замените стандартный код следующим: + +~~~html title="App.svelte" + + + +~~~ + +После этого вы можете запустить приложение и увидеть Kanban с загруженными данными на странице. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Svelte + +Теперь вы знаете, как интегрировать DHTMLX Kanban с Svelte. Вы можете настроить код под свои задачи. Финальный расширенный пример доступен на [**GitHub**](https://github.com/DHTMLX/svelte-kanban-demo). \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md new file mode 100644 index 0000000..001583a --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md @@ -0,0 +1,366 @@ +--- +sidebar_label: Интеграция с Vue +title: Интеграция с Vue +description: Узнайте об интеграции с Vue в документации по JavaScript-библиотеке DHTMLX Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Интеграция с Vue + +:::tip +Перед чтением этой документации рекомендуется ознакомиться с базовыми концепциями и паттернами [**Vue**](https://vuejs.org/). Для повторения знаний обратитесь к [**документации по Vue 3**](https://vuejs.org/guide/introduction.html#getting-started). +::: + +DHTMLX Kanban совместим с **Vue**. Мы подготовили примеры кода по использованию DHTMLX Kanban с **Vue 3**. Подробнее смотрите в соответствующем [**примере на GitHub**](https://github.com/DHTMLX/vue-kanban-demo). + +## Создание проекта + +:::info +Перед созданием нового проекта установите [**Node.js**](https://nodejs.org/en/). +::: + +Для создания проекта на **Vue** выполните следующую команду: + +~~~json +npm create vue@latest +~~~ + +Эта команда установит и запустит `create-vue`, официальный инструмент для создания проектов на **Vue**. Подробнее смотрите в разделе [Vue.js Quick Start](https://vuejs.org/guide/quick-start.html#creating-a-vue-application). + +Назовём проект **my-vue-kanban-app**. + +### Установка зависимостей + +Перейдите в директорию приложения: + +~~~json +cd my-vue-kanban-app +~~~ + +Установите зависимости и запустите dev-сервер. Для этого используйте менеджер пакетов: + +- если используете [**yarn**](https://yarnpkg.com/), выполните следующие команды: + +~~~jsx +yarn +yarn start // или yarn dev +~~~ + +- если используете [**npm**](https://www.npmjs.com/), выполните следующие команды: + +~~~json +npm install +npm run dev +~~~ + +Приложение будет доступно на localhost (например, `http://localhost:3000`). + +## Создание Kanban + +Теперь необходимо получить исходный код DHTMLX Kanban. Сначала остановите приложение и установите пакет Kanban. + +### Шаг 1. Установка пакета + +Скачайте [**триальную версию Kanban**](/how_to_start/#установка-kanban-через-npm-или-yarn) и следуйте инструкциям из файла README. Обратите внимание, что триальная версия Kanban доступна только 30 дней. + +### Шаг 2. Создание компонента + +Теперь нужно создать компонент Vue, чтобы добавить Kanban с Toolbar в приложение. Создайте новый файл в директории ***src/components/*** и назовите его ***Kanban.vue***. + +#### Импорт исходных файлов + +Откройте файл ***Kanban.vue*** и импортируйте исходные файлы Kanban. Обратите внимание: + +- если вы используете PRO-версию и устанавливаете пакет Kanban из локальной папки, пути к импортам будут такими: + +~~~html title="Kanban.vue" + +~~~ + +Обратите внимание, что в зависимости от используемого пакета исходные файлы могут быть минифицированы. В этом случае убедитесь, что импортируете CSS-файл как **kanban.min.css**. + +- если вы используете триальную версию Kanban, укажите следующие пути: + +~~~html title="Kanban.vue" + +~~~ + +В этом руководстве показано, как настроить **триальную** версию Kanban. + +#### Установка контейнеров и добавление Kanban с Toolbar + +Чтобы отобразить Kanban с Toolbar на странице, необходимо создать контейнеры для Kanban и Toolbar и инициализировать эти компоненты с помощью соответствующих конструкторов: + +~~~html {2,7-8,10-14} title="Kanban.vue" + + + +~~~ + +#### Добавление стилей + +Для корректного отображения Kanban необходимо задать важные стили для Kanban и его контейнера в основном css-файле проекта: + +~~~css title="main.css" +/* стили для начальной страницы */ +html, +body, +#app { /* убедитесь, что используется корневой контейнер #app */ + height: 100%; + padding: 0; + margin: 0; +} + +/* стили для контейнера Kanban и Toolbar */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* стили для контейнера Kanban */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### Загрузка данных + +Чтобы добавить данные в Kanban, необходимо предоставить набор данных. Можно создать файл ***data.js*** в директории ***src/*** и добавить туда данные: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +Далее откройте файл ***App.vue***, импортируйте данные и инициализируйте их через внутренний метод `data()`. После этого можно передать данные в созданный компонент `` как **props**: + +~~~html {3,8,10-12,19} title="App.vue" + + + +~~~ + +Перейдите в файл ***Kanban.vue*** и примените переданные **props** к объекту конфигурации Kanban: + +~~~html {6,10-12} title="Kanban.vue" + + + +~~~ + +Вы также можете использовать метод [`parse()`](/api/methods/js_kanban_parse_method/) внутри метода `mounted()` компонента Vue для загрузки данных в Kanban: + +~~~html {6,22-26} title="Kanban.vue" + + + +~~~ + +Метод `parse(data)` обеспечивает перезагрузку данных при каждом изменении. + +Теперь компонент Kanban готов к использованию. При добавлении элемента на страницу он инициализирует Kanban с данными. Также можно задать необходимые параметры конфигурации. Ознакомьтесь с полным списком доступных свойств в [документации по Kanban API](/api/overview/properties_overview/). + +#### Обработка событий + +Когда пользователь выполняет какое-либо действие в Kanban, срабатывает событие. Вы можете использовать эти события для отслеживания действий и запуска нужного кода. См. [полный список событий](/api/overview/events_overview/). + +Откройте ***Kanban.vue*** и дополните метод `mounted()`: + +~~~html {8-10} title="Kanban.vue" + + +// ... +~~~ + +После этого можно запустить приложение и увидеть Kanban с загруженными данными на странице. + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Vue + +Теперь вы знаете, как интегрировать DHTMLX Kanban с Vue. Вы можете адаптировать код под свои задачи. Финальный продвинутый пример доступен на [**GitHub**](https://github.com/DHTMLX/vue-kanban-demo). \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/localization.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/localization.md new file mode 100644 index 0000000..767ca00 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/localization.md @@ -0,0 +1,173 @@ +--- +sidebar_label: Локализация +title: Локализация +description: Вы можете узнать о локализации в документации к DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Локализация + +Вы можете локализовать все надписи в интерфейсе JavaScript Kanban. Для этого необходимо создать новую локаль или изменить встроенную и применить её к Kanban и Toolbar (*отдельно*). + +## Локаль по умолчанию + +По умолчанию используется локаль **English**: + +~~~jsx +const en = { + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Files: "Files", + B: "B", + KB: "KB", + MB: "MB", + GB: "GB", + TB: "TB", + PB: "PB", + EB: "EB", + "Make cover": "Make cover", + "Remove cover": "Remove cover", + Comments: "Comments", + Links: "Links", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card...": "Add new card...", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Priority: "Priority", + Progress: "Progress", + Users: "Users", + + Untitled: "Untitled", + Rename: "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + Sort: "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)", + + "Add link": "Add link", + Duplicate: "Duplicate", + "Duplicate of": "Duplicate of", + "Relates to": "Relates to", + "Depends on": "Depends on", + "Is required for": "Is required for", + Duplicates: "Duplicates", + "Is duplicated by": "Is duplicated by", + "Is parent for": "Is parent for", + "Is subtask of": "Is subtask of", + + Cancel: "Cancel", + "Link task": "Link task", + "Select a relation": "Select a relation", + "Select a task": "Select a task", + + Send: "Send", + "Would you like to delete this comment?": + "Would you like to delete this comment?", + "No comments yet": "No comments yet", + "Would you like to delete this card?": + "Would you like to delete this card?", + }, + calendar: { // переводы и настройки календаря + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // переводы основных элементов + ok: "OK", + cancel: "Cancel" + } +}; +~~~ + +## Встроенные локали + +Kanban экспортирует следующие локали: + +**"en"** - English +**"de"** - German +**"cn"** - Chinese +**"es"** - Spanish +**"fr"** - French +**"it"** - Italian +**"jp"** - Japanese +**"pt"** - Portugese +**"ru"** - Russian + +Вы можете экспортировать и применить встроенную локаль следующим образом: + +```jsx {5} +// создаём Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // изначально будет установлена встроенная локаль "cn" + // другие параметры +}); + +// применяем встроенную локаль "de" к Kanban +board.setLocale(kanban.locales["de"]); +``` + +## Пользовательская локаль + +Чтобы применить пользовательскую локаль, нужно: + +- создать пользовательскую локаль (или изменить локаль по умолчанию) и указать переводы для всех текстовых меток (это может быть любой нужный вам язык) + +- применить новую локаль к **Kanban** через свойство [`locale`](api/config/js_kanban_locale_config.md) или использовать метод [`setLocale()`](api/methods/js_kanban_setlocale_method.md) +- применить новую локаль к **Toolbar** через свойство [`locale`](api/config/toolbar_locale_config.md) или использовать метод [`setLocale()`](api/methods/toolbar_setlocale_method.md) + +## Пример + +В этом примере показано, как переключаться между несколькими локалями: + + \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/stylization.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/stylization.md new file mode 100644 index 0000000..d24c01c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/stylization.md @@ -0,0 +1,119 @@ +--- +sidebar_label: Стилизация +title: Стилизация +description: Ознакомьтесь с возможностями стилизации в документации по DHTMLX JavaScript Kanban. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Стилизация + +В Kanban вы можете стилизовать внешний вид **колонок**, **строк** и **карточек** с помощью свойств [`columnShape.css`](api/config/js_kanban_columnshape_config.md), [`rowShape.css`](api/config/js_kanban_rowshape_config.md) и [`cardShape.css`](api/config/js_kanban_cardshape_config.md). Эти свойства позволяют условно применять стили к колонкам, строкам и карточкам. + +Также вы можете применить собственный CSS-класс к отдельной **колонке**, **строке** или **карточке** с помощью свойств [`columns.css`](api/config/js_kanban_columns_config.md), [`rows.css`](api/config/js_kanban_rows_config.md) и [`cards.css`](api/config/js_kanban_cards_config.md). + +Кроме того, вы можете применять пользовательские стили к любой части интерфейса Kanban, чтобы соответствовать требованиям вашего проекта. Для этого библиотека предоставляет широкий набор CSS-переменных. Обратите внимание, что Kanban включает два типа переменных: +- CSS-переменные, связанные со стилем **Kanban** +- CSS-переменные, связанные со стилем библиотеки **WX** (*элементы управления, календари и т.д.*) + +:::info +Обратите внимание, что библиотека **WX** используется только для внутренних процессов. Она предоставляет некоторые небольшие элементы, используемые в Kanban (*элементы управления, календари и т.д.*) +::: + +## Стиль по умолчанию + +~~~css +.wx-material-theme { + /* CSS-переменные библиотеки WX */ + --wx-field-width: 100%; + --wx-theme-name: material; + /* конец CSS-переменных библиотеки WX */ + + /* CSS-переменные Kanban */ + --wx-kanban-background: #f1f1f1; + + /* стили колонок */ + --wx-kanban-column-width: 300px; + --wx-kanban-column-height: 300px; + + /* стили панели инструментов */ + --wx-kanban-toolbar-height: 56px; + --wx-kanban-toolbar-align: center; + --wx-kanban-toolbar-justify: flex-start; + --wx-kanban-toolbar-control-hover: rgba(0, 0, 0, 0.07); + --wx-kanban-toolbar-control-active: rgba(0, 0, 0, 0.15); + --wx-kanban-toolbar-border: var(--wx-border); + + /* стили карточек */ + --wx-kanban-card-field-padding: 12px; + --wx-kanban-content-background: var(--wx-background); + --wx-kanban-card-border: var(--wx-border); + --wx-kanban-card-border-radius: 6px; + --wx-kanban-header-border-radius: var(--wx-kanban-card-border-radius); + + /* стили строк */ + --wx-kanban-row-line: var(--wx-border); + + /* стили иконки пользователя */ + --wx-kanban-user-icon-size: 36px; + + /* стили редактора */ + --wx-kanban-header-height: 64px; + --wx-kanban-editor-width: 569px; + --wx-kanban-editor-height: auto; + --wx-kanban-editor-x-padding: 20px; + --wx-kanban-editor-background: var(--wx-kanban-content-background); + --wx-kanban-editor-top-border: none; + + /* стили колонок */ + --wx-kanban-over-limit-color: var(--wx-color-danger); + --wx-kanban-collapsed-column-width: 44px; + --wx-kanban-z-index: 1; + + /* стили элемента прогресса */ + --wx-progress-height: 4px; + --wx-kanban-progress-inactive-color: #dbdbdb; + + /* стили меню */ + --wx-kanban-menu-min-width: 100px; + + /* стили тени и рамки */ + --wx-kanban-shadow: none; + --wx-kanban-box-border: var(--wx-border); + + /* стили свернутых колонок */ + --wx-kanban-collapsed-padding: var(--wx-padding); + --wx-kanban-collapsed-margin: 0px; + --wx-kanban-collapsed-background: transparent; + --wx-kanban-collapsed-background-hover: #dfdfdf; + +/* Конец CSS-переменных Kanban */ +} +~~~ + +:::tip Примечание +В будущих версиях Kanban могут быть изменены некоторые переменные и их имена. Пожалуйста, не забывайте проверять их после обновления на новую версию и вносить изменения в ваш код, чтобы избежать проблем с отображением компонента. +::: + +## Стилизация скролла + +Вы также можете применить пользовательский стиль к полосе прокрутки Kanban. Для этого можно использовать CSS-класс `.wx-styled-scroll`. Перед использованием проверьте совместимость с современными браузерами [здесь](https://caniuse.com/css-scrollbar). + +~~~html {4} title="index.html" + +
// + +
+~~~ + +## Пользовательский стиль + +В этом примере показано, как применить пользовательский стиль к Kanban + + + +## Адаптивность + +В этом примере показано, как создать адаптивную версию Kanban с использованием пользовательских CSS-стилей + + + +**Связанные статьи:** [Кастомизация](guides/customization.md) \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/typescript_support.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/typescript_support.md new file mode 100644 index 0000000..889c13a --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/typescript_support.md @@ -0,0 +1,21 @@ +--- +sidebar_label: Поддержка TypeScript +title: Поддержка TypeScript +description: В данной документации вы узнаете, как использовать typescript с библиотекой DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Поддержка TypeScript + +Начиная с версии v1.1, библиотека DHTMLX Kanban предоставляет возможность использовать определения TypeScript. Встроенная поддержка TypeScript работает из коробки. + +:::note +Вы можете опробовать функциональность прямо в нашем Snippet Tool. +::: + +## Преимущества использования TypeScript + +Почему стоит использовать DHTMLX Kanban с TypeScript? + +Основное преимущество TypeScript заключается в том, что он позволяет значительно повысить эффективность процесса разработки. + +Построение приложения становится более надёжным, так как проверка типов вместе с автодополнением позволяют избежать потенциальных ошибок. Кроме того, TypeScript предоставляет информацию о типах данных, которые следует использовать при работе с API библиотеки DHTMLX Kanban. \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/working_with_data.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/working_with_data.md new file mode 100644 index 0000000..d7f0af0 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/working_with_data.md @@ -0,0 +1,201 @@ +--- +sidebar_label: Работа с данными +title: Работа с данными +description: Изучите, как работать с данными в документации по DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником по API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Работа с данными + +## Загрузка начальных данных + +При инициализации Kanban вы можете передать начальные данные для [**columns**](api/config/js_kanban_columns_config.md), [**cards**](api/config/js_kanban_cards_config.md), [**rows**](api/config/js_kanban_rows_config.md) и [**links**](api/config/js_kanban_links_config.md). + +~~~jsx {1,17,81,94,106-109} +const columns = [ // данные для columns + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + { + label: "Testing", + id: "testing" + }, + {...} +]; + +const cards = [ // данные для cards + { + id: 1, + label: "Integration with React", + priority: 1, + color: "#65D3B3", + description: "Some description...", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + progress: 25, + users: [1,2,3,4], + sprint: "1.0", + column: "backlog", + type: "feature", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + }, + { + id: 2, + label: "Archive the cards/boards ", + priority: 2, + color: "#FFC975", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + sprint: "1.0", + column: "backlog", + type: "feature" + }, + { + label: "Searching and filtering", + priority: 1, + color: "#65D3B3", + + start_date: new Date("01/05/2021"), + + sprint: "1.2", + column: "backlog", + type: "task" + }, + { + label: "Set the tasks priorities", + priority: 2, + color: "#58C3FE", + + sprint: "1.2", + column: "inprogress", + type: "feature" + }, + {...} +]; + +const rows = [ // данные для rows + { + label: "Feature", + id: "feature" + }, + { + label: "Task", + id: "task", + collapsed: true + }, + {...} +]; + +const links = [ + { + id: "link_1", + source: 1, + target: 2, + relation: "relatesTo", + }, + {...} +]; + +// инициализация Kanban с начальными данными для columns, cards и rows +new kanban.Kanban("#root", { + columns, + cards, + rows, + links +}); +~~~ + +## Загрузка данных из локального источника + +Чтобы загрузить данные для ***columns***, ***rows***, ***cards*** и ***links*** из локального источника, используйте метод [`parse()`](api/methods/js_kanban_parse_method.md). Он принимает объект с необходимыми данными в качестве параметра. + +~~~js {4} +const board = new kanban.Kanban("#root", {}); + +// загрузка данных в Kanban +board.parse({ columns, cards, rows }); +~~~ + +## Синхронизация данных Kanban с Gantt и Scheduler + +В этом примере показано, как синхронизировать данные Kanban с другими виджетами DHTMLX, а именно с [**Gantt**](https://dhtmlx.com/docs/products/dhtmlxGantt/) и [**Scheduler**](https://dhtmlx.com/docs/products/dhtmlxScheduler/): + + + +## Получение данных Kanban + +Для получения данных Kanban вы можете использовать следующие методы: + +- [`getAreaCards()`](api/methods/js_kanban_getareacards_method.md) – возвращает массив с объектами данных всех cards указанной колонки (и строки) +- [`getCard()`](api/methods/js_kanban_getcard_method.md) – возвращает объект данных card по заданному ID +- [`serialize()`](api/methods/js_kanban_serialize_method.md) – сериализует данные Kanban в JSON + +## Получение состояния Kanban + +Для получения состояния Kanban вы можете использовать следующие методы: + +- [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) – возвращает объект с реактивными свойствами *StateStore* +- [`api.getState()`](api/internal/js_kanban_getstate_method.md) – возвращает объект с текущими свойствами *StateStore* +- [`api.getStores()`](api/internal/js_kanban_getstores_method.md) – возвращает объект с *StateStore* и *DataStore* + +## Экспорт данных Kanban + +Для экспорта данных Kanban вы можете использовать следующий метод: + +- [`export.json()`](api/internal/js_kanban_json_method.md) – экспортирует данные Kanban в JSON-файл + +## Добавление новых элементов + +Для добавления новых *cards*, *columns* и *rows* используйте следующие методы: + +- [`addCard()`](api/methods/js_kanban_addcard_method.md) – добавляет новую card в Kanban +- [`addColumn()`](api/methods/js_kanban_addcolumn_method.md) – добавляет новую column в Kanban +- [`addRow()`](api/methods/js_kanban_addrow_method.md) – добавляет новую row в Kanban + +## Обновление элементов + +Для обновления *cards*, *columns* и *rows* используйте следующие методы: + +- [`updateCard()`](api/methods/js_kanban_updatecard_method.md) – обновляет данные card по заданному ID +- [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) – обновляет данные column по заданному ID +- [`updateRow()`](api/methods/js_kanban_updaterow_method.md) – обновляет данные row по заданному ID + +## Удаление элементов + +Для удаления *cards*, *columns* и *rows* используйте следующие методы: + +- [`deleteCard()`](api/methods/js_kanban_deletecard_method.md) – удаляет card из Kanban по заданному ID +- [`deleteColumn()`](api/methods/js_kanban_deletecolumn_method.md) – удаляет column из Kanban по заданному ID +- [`deleteRow()`](api/methods/js_kanban_deleterow_method.md) – удаляет row из Kanban по заданному ID + +## Перемещение элементов + +Для перемещения *cards*, *columns* и *rows* используйте следующие методы: + +- [`moveCard()`](api/methods/js_kanban_movecard_method.md) – перемещает card в нужную column и row +- [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md) – перемещает column в нужную позицию +- [`moveRow()`](api/methods/js_kanban_moverow_method.md) – перемещает row в нужную позицию + +## Пример + +В этом примере показано, как использовать API Kanban для работы с данными: + + \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/guides/working_with_server.md b/i18n/ru/docusaurus-plugin-content-docs/current/guides/working_with_server.md new file mode 100644 index 0000000..417797f --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/guides/working_with_server.md @@ -0,0 +1,368 @@ +--- +sidebar_label: Работа с сервером +title: Работа с сервером +description: Вы можете узнать, как работать с сервером, в документации по JavaScript Kanban от DHTMLX. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Работа с сервером + +JavaScript Kanban позволяет работать как с клиентскими, так и с серверными данными. Виджет не предъявляет особых требований к backend-части. Его можно легко подключить к любой серверной платформе, поддерживающей REST API (RESTful API). + +:::info +По умолчанию виджет поставляется с встроенным backend на **Go** и **Node**. Однако вы также можете использовать свои собственные серверные скрипты. +::: + +## RestDataProvider + +В JavaScript Kanban имеется сервис **RestDataProvider**, который полностью поддерживает REST API для взаимодействия с backend. Он позволяет работать с сервером и выполнять следующие операции с данными: + +- ***"add-card"*** +- ***"add-column"*** +- ***"add-comment"*** +- ***"add-row"*** +- ***"add-link"*** +- ***"delete-card"*** +- ***"delete-column"*** +- ***"delete-comment"*** +- ***"delete-row"*** +- ***"delete-link"*** +- ***"move-card"*** +- ***"move-column"*** +- ***"move-row"*** +- ***"update-card"*** +- ***"update-column"*** +- ***"update-comment"*** +- ***"update-row"*** + +## REST-методы + +Сервис **RestDataProvider** включает специальные REST-методы для динамической загрузки данных: + +- [`getCards()`](api/provider/rest_methods/js_kanban_getcards_method.md) – возвращает promise с ***данными карточек*** +- [`getColumns()`](api/provider/rest_methods/js_kanban_getcolumns_method.md) – возвращает promise с ***данными колонок*** +- [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) – возвращает promise с ***данными связей*** +- [`getRows()`](api/provider/rest_methods/js_kanban_getrows_method.md) – возвращает promise с ***данными строк*** +- [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md) – возвращает promise с ***данными пользователей*** + +## Взаимодействие с backend + +Чтобы взаимодействовать с сервером, необходимо подключить **RestDataProvider** к соответствующим серверным скриптам. Если вы хотите использовать встроенный backend, необходимые скрипты можно найти в следующих репозиториях: + +- backend на [**Go**](https://github.com/web-widgets/kanban-go) +- backend на [**Node**](https://github.com/web-widgets/kanban-node) + +или создать свой собственный backend. + +:::tip +Если вы используете собственный backend, обратитесь к разделу [**REST API routes**](api/overview/rest_routes_overview.md) для получения дополнительной информации! +::: + +Для подключения **RestDataProvider** к backend необходимо вызвать конструктор **kanban.RestDataProvider**, передав соответствующий **URL** в качестве параметра. + +~~~js {1-2,27} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getUsers(), + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows() +]).then(([users, cards, columns, links, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +Для выполнения операций с данными (*добавление*, *удаление* и др.) и отправки соответствующих запросов на сервер необходимо включить **RestDataProvider** в порядок **Event Bus** с помощью метода [**api.setNext()**](api/internal/js_kanban_setnext_method.md). +::: + +### Пример + +В этом примере показано, как подключить **RestDataProvider** к backend на **Go** и загрузить данные с сервера: + + + +## Мультипользовательский backend + +Инструменты управления проектами, такие как наш Kanban, востребованы компаниями любого размера. Поэтому важно обеспечить удобную работу для нескольких пользователей. Новая функция позволяет пользователям эффективно управлять одними и теми же карточками на доске Kanban в реальном времени, без перезагрузки страницы. Благодаря этому конечные пользователи могут совместно работать и быть в курсе действий друг друга, что повышает продуктивность и удовлетворенность. + +Для реализации мультипользовательского backend необходимо пройти авторизацию на сервере до инициализации Kanban. Для этого можно создать функцию `login(url: string)`: + +~~~js {} +const login = (url) => { + var token = sessionStorage.getItem("login-token"); + if (token) { + return Promise.resolve(token); + } + + return fetch(url + "/login?id=1") + .then(raw => raw.text()) + .then(token => { + sessionStorage.setItem("login-token", token); + return token; + }); +}; +~~~ + +Эта функция только симулирует авторизацию, и все пользователи будут авторизованы с ID 1. После успешной авторизации сервер отправляет токен, который необходимо использовать в каждом последующем запросе к серверу. Для автоматической передачи токена используется функция `RestDataProvider.setHeaders()`. Она добавляет пользовательские заголовки к запросам. По умолчанию наш сервер сохраняет токен в заголовке `"Remote-Token":`: + +~~~js {} +login(url).then(token => { + // инициализация rest provider + const restProvider = new kanban.RestDataProvider(url); + // установка токена в пользовательский заголовок + restProvder.setHeaders({ + "Remote-Token": "eyJpZCI6IjEzMzciLCJ1c2VybmFtZSI6ImJpem9uZSIsImlhdC...", + }); + + // инициализация виджета... +}); +~~~ + +После получения токена необходимо инициализировать виджет. Это можно сделать следующим образом: + +~~~js {} +// инициализация виджета... +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows(), +]).then(([cards, columns, links, rows]) => { + const board = new Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "row", + cardShape, + editorShape, + }); + + // сохранение данных с клиента на сервер + board.api.setNext(restProvider); + + // инициализация мультипользовательского режима... +}); +~~~ + +После инициализации виджета необходимо добавить WebSocket для прослушивания событий от сервера. Это можно сделать так: + +~~~js {} +// инициализация мультипользовательского режима... + +// получить клиентские обработчики для серверных событий +const handlers = kanbanUpdates( + board.api, + restProvider.getIDResolver() +); +// подключение к серверным событиям +const events = new RemoteEvents(url + "/api/v1", token); +// назначить клиентские обработчики на серверные события +events.on(handlers); +~~~ + +- `handlers` — клиентские обработчики, реагирующие на события сервера +- `events` — объект, который подключается к серверу и слушает все входящие события +- `RemoteEvents.on(handlers)` — применяет клиентские обработчики к серверным событиям + +После интеграции мультипользовательского backend в ваше приложение вы сможете упростить совместную работу пользователей и позволить им отслеживать любые изменения через UI в реальном времени. + +### Пример + +В этом примере показано, как настроить мультипользовательский backend для отслеживания изменений других пользователей в реальном времени: + + + +## Кастомизация серверных событий + +Вы можете определить собственную логику обработки серверных событий. Для этого нужно передать объект **handlers** в метод `RemoteEvents.on(handlers)`. Объект **handlers** должен иметь следующую структуру: + +~~~js {} +{ + "cards": cardsHandler: function(obj: any), + "columns": columnsHandler: function(obj: any), + "links": linksHandler: function(obj: any), + "rows": rowsHandler: function(obj: any), +} +~~~ + +Когда на сервере происходит какое-либо изменение, он возвращает имя измененного элемента. Эти имена могут различаться в зависимости от серверной логики. + +Обновлённые на клиенте данные будут находиться в аргументе **obj** функции `function(obj: any)`. Для указания операции есть поле `type: string`. Оно может принимать следующие значения: + +- Для **cards**: `"add-card"`, `"update-card"`, `"delete-card"`, `"move-card"` +- Для **columns**: `"add-column"`, `"update-column"`, `"delete-column"`, `"move-column"` +- Для **links**: `"add-link"`, `"delete-link"` +- Для **rows**: `"add-row"`, `"update-row"`, `"delete-row"`, `"move-row"` + +В следующем примере кода показаны детали реализации: + +~~~js {} +// инициализация kanban +const board = new kanban.Kanban(...); +const restProvider = new kanban.RestDataProvider(url); +const idResolver = restProvider.getIDResolver(); +const TypeCard = 1; +const TypeRow = 2; +const TypeCol = 3; + +const cardsHandler = (obj: any) => { + obj.card.id = idResolver(obj.card.id, TypeCard); + obj.card.row = idResolver(obj.card.row, TypeRow); + obj.card.column = idResolver(obj.card.column, TypeColumn); + switch (obj.type) { + case "add-card": + board.api.exec("add-card", { + card: obj.card, + select: false, + skipProvider: true, // предотвращает отправку запроса на сервер с клиента + }) + break; + // другие операции + } +} + +// добавление пользовательских обработчиков +const handlers = { + cards: cardsHandler, +}; + +const remoteEvents = new kanban.RemoteEvents(remoteEventsURL, token); +remoteEvents.on(handlers); +~~~ + +Метод `RestDataProvider.getIDResolver()` возвращает функцию, необходимую для синхронизации client ID с server ID. Когда на клиенте создаётся новый объект (*card/column/row/link*), у него будет временный ID и соответствующий server ID в хранилище. Функция `idResolver()` позволяет синхронизировать client ID с server ID. Формат функции: `idResolver(id: TID, type: number)` + +Аргумент `type` — это тип модели, который принимает следующие значения: + +- `CardID` — 1, +- `RowID` — 2, +- `ColumnID` — 3 +- `LinkID` — 4 + +Чтобы предотвратить отправку запроса на сервер, при вызове метода `board.api.exec()` используйте флаг `skipProvider: true`. + +И последний шаг — применить пользовательские обработчики к серверным событиям. Таким образом, вы можете создавать свои обработчики серверных событий. + +## Группировка двух и более статусов в одну колонку + +В этом разделе показано, как отобразить карточки из разных колонок в одной колонке (например, общая колонка для карточек со статусами *To do* и *Unassigned*). + +Для реализации такой группировки нужно добавить пользовательское поле (например, **status**). Это поле будет хранить текущий статус карточки. В поле **column** будет храниться общий статус. + +Далее необходимо создать определённые правила группировки карточек. В нашем случае карточки будут группироваться в определённые колонки по следующим статусам: + +- *todo*, *unassigned* — статусы для колонки **Open** +- *dev*, *testing* — статусы для колонки **Inprogress** +- *merged*, *released* — статусы для колонки **Done** + +Есть два способа реализовать такую группировку карточек в одну колонку по двум и более статусам: + +- [На стороне сервера](#группировка-на-стороне-сервера) +- [На стороне сервера + клиента](#группировка-на-стороне-сервера--клиента) + +### Группировка на стороне сервера + +Если вы хотите реализовать группировку на стороне сервера, ваш сервер должен иметь возможность отправлять данные на клиент через [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) (см. раздел [Мультипользовательский backend](#мультипользовательский-backend)). + +В месте, где сервер обрабатывает запрос на обновление карточки, необходимо проверить поле **status**. В нашем примере используется язык [Go](https://go.dev/), но вы можете применять любые backend-технологии. + +~~~go +func Update(id int, c Card) error { + // ... + oldColumn := c.Column + s := data.Status + if s == "todo" || s == "unassigned" { + c.Column = "open" + } else if s == "dev" || s == "testing" { + c.Column = "inprogress" + } else if s == "merged" || s == "released" { + c.Column = "done" + } + + db.Save(&c) + + if oldColumn != c.Column { + // если колонка была обновлена по полю status, + // клиенту нужно сообщить, что карточку надо переместить в соответствующую колонку + + // нужно обновить индекс карточки + updateCardIndex(&c) + + // уведомить клиента о необходимости обновления колонки + ws.Publish("card-update", &c) + } + // ... +} +~~~ + +Таким образом, когда пользователь меняет значение поля status, серверная логика проверяет значение и помещает карточку в нужную колонку. После этого сервер через WebSocket уведомляет клиента, что карточку нужно переместить в другую колонку. + +### Группировка на стороне сервера + клиента + +Для смешанного подхода сервер + клиент необходимо получить правила группировки с сервера. Согласно этим правилам клиент сможет определить, в какую колонку переместить карточку в зависимости от значения поля status. + +~~~js +const groupingRules = await fetch("http://server.com/rules"); +~~~ + +Например, можно задать такие правила: + +~~~json +{ + "open": ["todo", "unassigned"], + "progress": ["dev", "testing"], + "done": ["merged", "released"], +} +~~~ + +Далее нужно реализовать логику, которая будет проверять изменения карточки и перемещать её в нужную колонку: + +~~~js +const updateColumn = card => { + for (let col in groupingRules) { + if (groupingRules[col].includes(card.status)) { + card.column = col; + break; + } + } +}; + +kanban.api.intercept("move-card", ev => { + kanban.api.exec("update-card", { + id: ev.id, + card: { status: groupingRules[ev.columnId][0], + }); +}); + +kanban.api.intercept("update-card", ev => { + updateColumn(ev.card); +}); +~~~ + +Таким образом, можно определить определённые колонки для карточек в зависимости от других полей. + +### Пример + +В этом примере показано, как настроить серверную часть для группировки двух и более статусов в одну колонку в реальном времени: + + \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/how_to_start.md b/i18n/ru/docusaurus-plugin-content-docs/current/how_to_start.md new file mode 100644 index 0000000..f5bfd1d --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/how_to_start.md @@ -0,0 +1,129 @@ +--- +sidebar_label: Как начать +title: Как начать +description: Ознакомьтесь с тем, как начать работу с DHTMLX Kanban в документации к JavaScript библиотеке DHTMLX Kanban. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Как начать + +Этот подробный и понятный учебник проведет вас по основным шагам, которые необходимо выполнить, чтобы разместить полнофункциональный Kanban на странице. + +import editor from '@site/static/img/js_kanban_editor.png'; + +JS Kanban Main + +## Шаг 1. Подключение исходных файлов + +Начните с создания HTML-файла и назовите его *index.html*. Затем подключите исходные файлы Kanban к созданному файлу. + +Необходимы два файла: + +- JS-файл Kanban +- CSS-файл Kanban + +~~~html {5-6} title="index.html" + + + + How to Start with Kanban + + + + + + + +~~~ + +### Установка Kanban через npm или yarn + +Вы можете импортировать JavaScript Kanban в свой проект с помощью менеджера пакетов `yarn` или `npm`. + +#### Установка пробной версии Kanban через npm или yarn + +:::info +Если вы хотите использовать пробную версию Kanban, скачайте [**trial Kanban package**](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml) и выполните шаги, описанные в файле *README*. Обратите внимание, что пробная версия Kanban доступна только 30 дней. +::: + +#### Установка PRO Kanban через npm или yarn + +:::info +Вы можете получить доступ к приватному **npm** DHTMLX напрямую в [Client's Area](https://dhtmlx.com/clients/), сгенерировав свой логин и пароль для **npm**. Подробная инструкция по установке также доступна там. Обратите внимание, что доступ к приватному **npm** возможен только при активной лицензии на Kanban. +::: + +## Шаг 2. Создание Kanban + +Теперь вы готовы добавить Kanban на страницу. Сначала создайте DIV-контейнеры для Kanban и его Toolbar. Выполните следующие шаги: + +- укажите два DIV-контейнера в файле *index.html* +- инициализируйте Kanban и его Toolbar с помощью конструкторов **kanban.Kanban** и **kanban.Toolbar** + +:::info +Toolbar — это необязательная часть интерфейса Kanban. Чтобы создать Kanban без Toolbar, вы можете указать только один DIV-контейнер и инициализировать виджет через конструктор **kanban.Kanban** +::: + +В качестве параметров конструкторы принимают ID HTML-контейнеров, в которые будут помещены Kanban и Toolbar, а также соответствующие объекты конфигурации. + +~~~html {9-10,13-15,17-19} title="index.html" + + + + How to Start with Kanban + + + + +
+
+ + + + +~~~ + +## Шаг 3. Настройка Kanban + +Далее вы можете задать свойства конфигурации, которые должен иметь компонент Kanban при инициализации. + +Для начала работы с Kanban необходимо предоставить исходные данные для **cards** и **columns** (и *rows*). +Помимо исходных данных, вы можете настроить внешний вид [cards](guides/configuration.md#карточки), [editor](guides/configuration.md#редактор) и [toolbar](guides/configuration.md#toolbar). + +~~~jsx {2-7,11-18} +const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row", + cardShape, + editorShape +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" + ] +}); +~~~ + +## Что дальше + +Вот и все. Всего три простых шага — и у вас есть удобный инструмент для визуализации и управления рабочими процессами. Теперь вы можете приступить к работе со своими задачами или продолжить изучение возможностей JavaScript Kanban. \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/howtos.md b/i18n/ru/docusaurus-plugin-content-docs/current/howtos.md new file mode 100644 index 0000000..b2afb21 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/howtos.md @@ -0,0 +1,199 @@ +--- +sidebar_label: Решения +title: JavaScript Kanban — решения +description: На этой странице документации библиотеки DHTMLX JavaScript Kanban вы найдете раздел Решения. Изучайте руководства для разработчиков и справочник по API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную версию DHTMLX Kanban. +--- + +# Решения + +Эта страница содержит полную справочную информацию по инициализации, настройке, кастомизации и работе с JavaScript Kanban. + +## Основные принципы + +В этом разделе вы узнаете основные принципы работы с Kanban + +| Тема | Описание | +| --------------------------------------------- | ----------------------------------------------------- | +| [](guides/initialization.md) | Узнайте, как инициализировать Kanban ([Пример](https://snippet.dhtmlx.com/gb50vyip?tag=kanban))| +| [](guides/configuration.md) | Узнайте, как настраивать Kanban | +| [](guides/customization.md) | Узнайте, как кастомизировать Kanban | +| [](guides/stylization.md) | Узнайте, как стилизовать Kanban | +| [](guides/localization.md) | Узнайте, как локализовать Kanban ([Пример](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban))| + +## Справочник по API + +В этом разделе вы найдете соответствующие справочники по API Kanban + +| Тема | Описание | +| ----------------------------------------------------- | ----------------------------------------------------- | +| [Kanban events](api/overview/events_overview.md) | Узнайте, как работать с событиями Kanban | +| [Kanban methods](api/overview/methods_overview.md) | Узнайте, как работать с методами Kanban | +| [Kanban properties](api/overview/properties_overview.md)| Узнайте, как работать со свойствами Kanban | +| [Event Bus methods](api/overview/internal_eventbus_overview.md)| Узнайте, как работать с методами Event Bus | +| [RestDataProvider methods](api/overview/internal_rest_overview.md)| Узнайте, как работать с методами RestDataProvider| +| [State methods](api/overview/internal_state_overview.md)| Узнайте, как работать с методами State | +| [Toolbar methods](api/overview/toolbar_methods_overview.md)| Узнайте, как работать с методами Toolbar | +| [Toolbar properties](api/overview/toolbar_properties_overview.md)| Узнайте, как работать со свойствами Toolbar | + +## Работа с карточками + +В этих разделах вы узнаете, как выполнять операции с карточками, работать с их данными и настраивать карточки + +### Операции с карточками + +| Тема | Описание | +| ----------------------------------------------------------- | ---------------------------------------- | +| [Adding new cards](api/methods/js_kanban_addcard_method.md) | Узнайте, как добавлять новые карточки ([Пример](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Deleting cards](api/methods/js_kanban_deletecard_method.md) | Узнайте, как удалять карточки ([Пример](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Moving cards](api/methods/js_kanban_movecard_method.md) | Узнайте, как перемещать карточки ([Пример](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Scrolling to the desired cards](api/methods/js_kanban_scroll_method.md)| Узнайте, как прокручивать Kanban до нужной карточки| +| [Searching for cards](api/methods/js_kanban_setsearch_method.md)| Узнайте, как искать карточки | +| [Selecting cards](api/methods/js_kanban_selectcard_method.md)| Узнайте, как выделять карточки | +| [Sorting cards](api/methods/js_kanban_setsort_method.md) | Узнайте, как сортировать карточки | +| [Unselecting cards](api/methods/js_kanban_unselectcard_method.md)| Узнайте, как снимать выделение с карточек| +| [Adding links between cards](api/config/js_kanban_links_config.md)| Узнайте, как добавлять связи между карточками ([Пример](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) | + +### Работа с данными карточек + +| Тема | Описание | +| ----------------------------------------------------------- | ------------------------------------------------ | +| [Getting card data](api/methods/js_kanban_getcard_method.md) | Узнайте, как получать данные карточки | +| [Getting cards state](api/internal/js_kanban_getstate_method.md) | Узнайте, как получать состояние карточек | +| [Getting cards reactive state](api/internal/js_kanban_getreactivestate_method.md) | Узнайте, как получать реактивное состояние карточек | +| [Loading card data](api/config/js_kanban_cards_config.md) | Узнайте, как загружать начальные данные карточек | +| [Parsing card data](api/methods/js_kanban_parse_method.md) | Узнайте, как парсить данные карточек | +| [Serializing card data](api/methods/js_kanban_serialize_method.md)| Узнайте, как сериализовать данные карточек ([Пример](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Updating card data](api/methods/js_kanban_updatecard_method.md)| Узнайте, как обновлять данные карточек | + +### Настройка карточек + +| Тема | Описание | +| ----------------------------------------------------------- | ------------------------------------------------ | +| [Adding new cards](api/config/js_kanban_readonly_config.md) | Узнайте, как включить/отключить возможность добавления новых карточек| +| [Binding cards into columns](api/config/js_kanban_columnkey_config.md) | Узнайте, как привязывать карточки к колонкам| +| [Binding cards into rows](api/config/js_kanban_rowkey_config.md) | Узнайте, как привязывать карточки к строкам | +| [Configuring a card appearance](api/config/js_kanban_cardshape_config.md)| Узнайте, как настраивать внешний вид карточки| +| [Configuring a cards menu](api/config/js_kanban_cardshape_config.md)| Узнайте, как настраивать контекстное меню карточки ([Пример](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Customizing a card appearance](api/config/js_kanban_cardtemplate_config.md)| Узнайте, как кастомизировать внешний вид карточки с помощью шаблонов ([Пример](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban))| +| [Dragging cards](api/config/js_kanban_readonly_config.md) | Узнайте, как включить/отключить возможность перетаскивания карточек| +| [Editing cards](api/config/js_kanban_readonly_config.md) | Узнайте, как включить/отключить возможность редактирования карточек| +| [Lazy rendering](api/config/js_kanban_rendertype_config.md)| Узнайте, как включить/отключить **ленивый рендеринг** большого количества карточек ([Пример](https://snippet.dhtmlx.com/xez9ghqq?text=#kanban))| +| [Limiting cards](api/config/js_kanban_columns_config.md) | Узнайте, как ограничивать количество карточек в колонках и дорожках (**валидация WIP**) ([Пример](https://snippet.dhtmlx.com/2blo6hx8?text=kanban))| +| [Selecting cards](api/config/js_kanban_readonly_config.md) | Узнайте, как включить/отключить возможность выделения карточек| +| [Setting a fix height of cards](api/config/js_kanban_cardheight_config.md)| Узнайте, как задать фиксированную высоту карточек| +| [Updating card settings](api/methods/js_kanban_setconfig_method.md)| Узнайте, как обновлять настройки карточек | + +## Работа с редактором карточек + +В этом разделе вы узнаете, как работать с редактором карточек + +| Тема | Описание | +| ----------------------------------------------------------- | --------------------------------------------------- | +| [Autosaving mode](api/config/js_kanban_editorautosave_config.md)| Узнайте, как включить/отключить автосохранение редактора | +| [Configuring editor fields](guides/configuration.md#редактор)| Узнайте, как настраивать поля редактора | +| [Configuring the editor](guides/configuration.md#настройка-редактора)| Узнайте, как настраивать редактор | +| [Updating editor settings](api/methods/js_kanban_setconfig_method.md)| Узнайте, как обновлять настройки редактора | + +## Работа с колонками + +В этих разделах вы узнаете, как выполнять операции с колонками и работать с их данными + +### Операции с колонками + +| Тема | Описание | +| -------------------------------------------------------------- | ------------------------------------------------ | +| [Adding new columns](api/methods/js_kanban_addcolumn_method.md) | Узнайте, как добавлять новые колонки ([Пример](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Configuring a columns menu](api/config/js_kanban_columnshape_config.md)| Узнайте, как настраивать контекстное меню колонок ([Пример](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting columns](api/methods/js_kanban_deletecolumn_method.md)| Узнайте, как удалять колонки | +| [Moving columns](api/methods/js_kanban_movecolumn_method.md) | Узнайте, как перемещать колонки | +| [Scrolling to the desired columns](api/methods/js_kanban_scroll_method.md)| Узнайте, как прокручивать Kanban до нужной колонки| +| [Separate scrolling for columns](api/config/js_kanban_scrolltype_config.md)| Узнайте, как задать отдельную прокрутку для каждой колонки ([Пример](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban))| + +### Работа с данными колонок + +| Тема | Описание | +| -------------------------------------------------------------- | ------------------------------------------------ | +| [Getting card data of the column](api/methods/js_kanban_getareacards_method.md)| Узнайте, как получать данные карточек колонки | +| [Getting columns state](api/internal/js_kanban_getstate_method.md) | Узнайте, как получать состояние колонок | +| [Getting columns reactive state](api/internal/js_kanban_getreactivestate_method.md) | Узнайте, как получать реактивное состояние колонок | +| [Loading column data](api/config/js_kanban_columns_config.md) | Узнайте, как загружать начальные данные колонок | +| [Parsing column data](api/methods/js_kanban_parse_method.md) | Узнайте, как парсить данные колонок | +| [Serializing column data](api/methods/js_kanban_serialize_method.md)| Узнайте, как сериализовать данные колонок | +| [Updating column data](api/methods/js_kanban_updatecolumn_method.md)| Узнайте, как обновлять данные колонок | + +## Работа со строками (swimlanes) + +В этих разделах вы узнаете, как выполнять операции со строками и работать с их данными + +### Операции со строками (swimlanes) + +| Тема | Описание | +| -------------------------------------------------------------- | ------------------------------------------------------ | +| [Adding new rows](api/methods/js_kanban_addrow_method.md) | Узнайте, как добавлять новые строки (swimlanes) | +| [Configuring a rows menu](api/config/js_kanban_rowshape_config.md)| Узнайте, как настраивать контекстное меню строк (swimlanes) ([Пример](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting rows](api/methods/js_kanban_deleterow_method.md) | Узнайте, как удалять строки (swimlanes) | +| [Moving rows](api/methods/js_kanban_moverow_method.md) | Узнайте, как перемещать строки (swimlanes) | +| [Scrolling to the desired row](api/methods/js_kanban_scroll_method.md)| Узнайте, как прокручивать Kanban до нужной строки (swimlane)| + +### Работа с данными строк (swimlanes) + +| Тема | Описание | +| -------------------------------------------------------------- | ------------------------------------------------------ | +| [Getting card data of the column and row](api/methods/js_kanban_getareacards_method.md)| Узнайте, как получать данные карточек колонки и строки | +| [Getting rows state](api/internal/js_kanban_getstate_method.md) | Узнайте, как получать состояние строк | +| [Getting rows reactive state](api/internal/js_kanban_getreactivestate_method.md) | Узнайте, как получать реактивное состояние строк | +| [Loading row data](api/config/js_kanban_rows_config.md) | Узнайте, как загружать начальные данные строк | +| [Parsing row data](api/methods/js_kanban_parse_method.md) | Узнайте, как парсить данные строк | +| [Serializing row data](api/methods/js_kanban_serialize_method.md)| Узнайте, как сериализовать данные строк | +| [Updating row data](api/methods/js_kanban_updaterow_method.md) | Узнайте, как обновлять данные строк | + +## Работа с событиями + +| Тема | Описание | +| ---------------------------------------------------------- | ----------------------------------------------- | +| [Executing events](api/internal/js_kanban_exec_method.md) | Узнайте, как выполнять внутренние события | +| [Intercepting events](api/internal/js_kanban_intercept_method.md)| Узнайте, как перехватывать внутренние события| +| [List of inner events](api/overview/events_overview.md) | Смотрите список внутренних событий Kanban | +| [Reordering events](api/internal/js_kanban_setnext_method.md)| Узнайте, как добавлять внутреннее событие в порядок Event Bus | +| [Subscribing on events](api/internal/js_kanban_on_method.md)| Узнайте, как подписываться на внутренние события| + +## Работа с Kanban REST API + +| Тема | Описание | +| ---------------------------------------------------------- | ----------------------------------------------- | +| [Loading server data for cards](api/provider/rest_methods/js_kanban_getcards_method.md)| Узнайте, как загружать серверные данные карточек | +| [Loading server data for columns](api/provider/rest_methods/js_kanban_getcolumns_method.md)| Узнайте, как загружать серверные данные колонок | +| [Loading server data for rows](api/provider/rest_methods/js_kanban_getrows_method.md)| Узнайте, как загружать серверные данные строк | +| [Working with server](guides/working_with_server.md) | Узнайте, как работать с сервером через REST API ([Пример](https://snippet.dhtmlx.com/f25y0809?tag=kanban))| + +## Работа с состоянием Kanban + +| Тема | Описание | +| ---------------------------------------------------------- | ----------------------------------------------- | +| [Getting StateStore and DataStore](api/internal/js_kanban_getstores_method.md)| Узнайте, как получить объекты StateStore и DataStore | +| [Getting StateStore properties](api/internal/js_kanban_getstate_method.md)| Узнайте, как получить объект свойств StateStore | +| [Getting StateStore reactive properties](api/internal/js_kanban_getreactivestate_method.md)| Узнайте, как получить объект реактивных свойств StateStore | + +## Работа с Toolbar + +| Тема | Описание | +| ---------------------------------------------------------- | -------------------------------------------------- | +| [Configuring a searchbar on Toolbar](api/config/toolbar_items_config.md) | Узнайте, как настроить строку поиска в Toolbar ([Пример](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring a sort control on Toolbar](api/config/toolbar_items_config.md) | Узнайте, как настроить элемент сортировки в Toolbar ([Пример](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring Toolbar controls](api/config/toolbar_items_config.md)| Узнайте, как настраивать, кастомизировать и менять порядок элементов Toolbar ([Пример](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban)) | +| [Including Kanban API in Toolbar](api/config/toolbar_api_config.md) | Узнайте, как подключать и использовать Kanban API в Toolbar | +| [Localizing Toolbar](api/config/toolbar_locale_config.md) | Узнайте, как локализовать Toolbar | + +## Работа с TypeScript + +| Тема | Описание | +| ---------------------------------------------------------- | ----------------------------------------------- | +| [Working with TypeScript](guides/typescript_support.md) | Узнайте, как работать с TypeScript | + +## Остались вопросы? + + + +:::info +Вы также можете оставить свои вопросы в комментариях ниже! +::: \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/index.md b/i18n/ru/docusaurus-plugin-content-docs/current/index.md new file mode 100644 index 0000000..d65df3c --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/index.md @@ -0,0 +1,73 @@ +--- +sidebar_label: Обзор Kanban +title: Обзор JavaScript Kanban +slug: / +description: В данной документации представлен обзор библиотеки DHTMLX JavaScript Kanban. Ознакомьтесь с руководствами для разработчиков и справочником API, попробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Обзор DHTMLX Kanban + +JavaScript Kanban — это эффективное решение для визуализации рабочих процессов. Этот виджет помогает лучше понять бизнес-процессы и получить общее представление о загрузке команды. Гибкий инструмент поддерживает любое количество карточек, колонок и дорожек (swimlanes). Компонент полностью написан на чистом JavaScript и CSS, легко настраивается и интегрируется в любое веб-приложение или веб-страницу. + +## Структура Kanban + +### Панель инструментов + +**Панель инструментов** Kanban является отдельной частью интерфейса. Она включает строку поиска для *поиска* карточек, элемент управления для *сортировки* карточек по заданным параметрам, два элемента для управления историей (*отмена/повтор*) и элементы для *добавления новых колонок и строк*. Вы можете гибко управлять логикой поиска и сортировки, а также изменять структуру панели инструментов, добавляя собственные элементы или меняя порядок встроенных. Подробнее читайте в разделе [Конфигурация](guides/configuration.md#toolbar). + +import toolbar from '@site/static/img/js_kanban_toolbar.png'; + +Kanban Toolbar + +### Доска + +**Доска** — основная часть Kanban. Она состоит из карточек, распределённых по колонкам и строкам (swimlanes). Вы можете гибко настраивать внешний вид карточек, а также использовать собственные шаблоны. Подробнее читайте в разделе [Конфигурация](guides/configuration.md#карточки). + +На панели **Доска** вы можете работать с ***карточками***, ***колонками*** и ***строками*** следующим образом: + +- добавлять новые карточки, нажимая на значок плюса (в соответствии с заданными *ограничениями* для каждой колонки и дорожки) +- добавлять комментарии и голоса к задачам через панель редактора ([Пример](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- устанавливать связи между задачами через редактор ([Пример](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- удалять карточки, колонки и строки с помощью контекстного меню (значок с тремя точками) +- дублировать карточки с помощью контекстного меню (значок с тремя точками) или сочетания клавиш `Ctrl (Command)`+`D` (позволяет дублировать несколько карточек) +- экспортировать данные Kanban в файл JSON +- управлять историей Kanban с помощью следующих сочетаний клавиш: + - `Ctrl (Command)`+`Z` — отменить последнее действие в Kanban (шаг назад в истории Kanban) + - `Ctrl (Command)`+`Y` или `Ctrl (Command)`+`Shift`+`Z` — повторить действие, отменённое с помощью *undo* (шаг вперёд в истории Kanban) +- перемещать карточки перетаскиванием в нужное место (строку и колонку) +- перемещать колонки и строки через контекстное меню (значок с тремя точками) +- переименовывать колонки и строки двойным щелчком по соответствующим меткам или через контекстное меню (значок с тремя точками) +- открывать редактор карточки по клику на карточку +- сворачивать/разворачивать строки, нажимая на стрелку слева от метки строки +- сворачивать/разворачивать колонки, нажимая на стрелку слева от метки колонки +- выделять несколько карточек с помощью следующих сочетаний: + - `Shift` + клик по нужным карточкам для выделения нескольких карточек в одной колонке + - `Ctrl (Command)` + клик по нужным карточкам для выделения нескольких карточек в разных колонках + +import board from '@site/static/img/js_kanban_board.png'; + +Kanban Board + +### Редактор + +**Редактор** — это модальная панель, состоящая из полей и элементов управления для редактирования данных выбранной карточки. Для отображения редактора нажмите на нужную карточку. Структуру редактора можно гибко настраивать, добавляя новые поля и элементы управления. Подробнее читайте в разделе [Конфигурация](guides/configuration.md#редактор). + +import editor from '@site/static/img/js_kanban_editor.png'; + +Kanban Editor + +## Что дальше + +Теперь вы можете приступить к использованию Kanban в своём приложении. Следуйте инструкциям из руководства [Как начать](how_to_start.md) для получения подробной информации. \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/news/migration.md b/i18n/ru/docusaurus-plugin-content-docs/current/news/migration.md new file mode 100644 index 0000000..41f89e8 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/news/migration.md @@ -0,0 +1,1454 @@ +--- +sidebar_label: Миграция на новые версии +title: Миграция на новые версии +description: Узнайте о миграции на новые версии в документации по JavaScript-библиотеке DHTMLX Kanban. Просматривайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную ознакомительную версию DHTMLX Kanban. +--- + +# Миграция на новые версии + +## 1.6.5 -> 1.7.0 + +### Api + +#### Свойства + +- Свойство [`editorShape`](api/config/js_kanban_editorshape_config.md) было обновлено. Параметр `clearButton` заменён на `clear`: + +~~~jsx {8} title="До v1.7.0" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clearButton: true // устаревшее + } + }, { /* ... */ } + ] + // другие параметры +}); +~~~ + +~~~jsx {8} title="C v1.7.0" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clear: true // новое + } + }, { /* ... */ } + ] + // другие параметры +}); +~~~ + +- Функция [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) была обновлена. Параметр **store** заменён на **readonly**: + +~~~jsx {3-4} title="До v1.7.0" +menu: { + show: true, + items: ({ card, store }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, store }); // параметр "store" устарел + ... + } +} +~~~ + +~~~jsx {3-4} title="C v1.7.0" +menu: { + show: true, + items: ({ card, readonly }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, readonly }); // параметр "readonly" новый + ... + } +} +~~~ + +- Функция [`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md) была обновлена. Параметр **store** заменён на **readonly**: + +~~~jsx {3-4} title="До v1.7.0" +menu: { + show: true, + items: ({ column, columnIndex, columns, store }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, store }); // параметр "store" устарел + ... + } +} +~~~ + +~~~jsx {3-4} title="C v1.7.0" +menu: { + show: true, + items: ({ column, columnIndex, columns, readonly }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, readonly }); // параметр "readonly" новый + ... + } +} +~~~ + +- Функция [`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) была обновлена. Параметр **store** заменён на **readonly**: + +~~~jsx {3-4} title="До v1.7.0" +menu: { + show: true, + items: ({ row, rowIndex, rows, store }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, store }); // параметр "store" устарел + ... + } +} +~~~ + +~~~jsx {3-4} title="C v1.7.0" +menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, readonly }); // параметр "readonly" новый + ... + } +} +~~~ + +- Параметры ***menu.items[0].label*** и ***menu.items[0].items*** были удалены в v1.7 для свойств [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md), [`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md) и [`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) + +- Свойство `editorAutoSave` было удалено в v1.7. Используйте свойство [`editor.autoSave`](api/config/js_kanban_editor_config.md): + +~~~jsx {2} title="До v1.7.0" +new kanban.Kanban("#root", { + editorAutoSave: true, // устаревшее + // другие параметры +}); +~~~ + +~~~jsx {3} title="C v1.7.0" +new kanban.Kanban("#root", { + editor: { + autoSave: true // новое + } + // другие параметры +}); +~~~ + +- Свойство [`links`](api/config/js_kanban_links_config.md) было обновлено следующим образом: + - Параметр **masterId** заменён на **source** + - Параметр **slaveId** заменён на **target** + +~~~jsx {5-6,10} title="До v1.7.0" +const links = [ + { + id: 1, + // устаревшее + masterId: 2, + slaveId: 5 + }, {...} // другие данные связи +]; + +new kanban.Kanban("#root", { + links, + // другие параметры +}); +~~~ + +~~~jsx {5-6,10} title="C v1.7.0" +const links = [ + { + id: 1, + // новое + source: 2, + target: 5 + }, {...} // другие данные связи +]; + +new kanban.Kanban("#root", { + links, + // другие параметры +}); +~~~ + +#### Методы + +- Методы `undo` и `redo` были удалены из store-методов: + +~~~jsx {1} title="До v1.7.0" +kanban.api.getStores().data.undo() // устаревшее +~~~ + +~~~jsx {5-6,10} title="C v1.7.0" +kanban.undo(); +// или +kanban.api.exec("undo"); +~~~ + +- Методы [`api.getState()`](api/internal/js_kanban_getstate_method.md) и [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) были обновлены следующим образом: + - Следующие параметры удалены в v1.7.0: + + ```js + fromAreaMeta, + dropAreaItemsCoords, + dropAreasCoords, + overAreaMeta, + before, + dragItemId, + dragItemsCoords, + overAreaId + ``` + + - Следующие параметры стали приватными в v1.7.0: + + ```js + edit -> _edit: object, + layout -> _layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object + ``` + +#### События + +- Параметры `dragItemsCoords` и `dropAreasCoords` были удалены из события [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) + +## 1.5.13 -> 1.6.0 + +CSS-классы, связанные с меню, были изменены следующим образом: + +~~~jsx + .menu -> .wx-menu + .item -> .wx-item + .icon -> .wx-icon + .value -> .wx-value +~~~ + +## 1.5.12 -> 1.5.13 + +CSS-классы, связанные с редактором, были изменены следующим образом: + +~~~jsx + .modal -> .wx-modal + .window -> .wx-window + .modal .window .buttons -> .wx-modal .wx-window .wx-buttons + .combo -> .wx-combo + .combo -> .wx-multicombo + .item -> .wx-item + .color-picker -> .wx-colorselect + .colors -> .wx-colors + .slider -> .wx-slider + .datepicker -> .wx-datepicker + .calendar -> .wx-calendar + .calendar .days .day.out -> .wx-calendar .wx-days .wx-day.wx-out + .combo .tag -> .multicombo .wx-tag + .dropdown -> .wx-dropdown + .dropdown .item -> .wx-dropdown .wx-item + .clear -> .wx-clear +~~~ + +## 1.5.6 -> 1.5.7 + +### Api + +#### Методы + +- Метод [`setLocale`](api/methods/toolbar_setlocale_method.md) тулбара Kanban был обновлён следующим образом: + +~~~jsx {6} title="До v1.5.7" + // создать Kanban + const board = new kanban.Kanban("#root", {...}); + // создать Toolbar + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // применить локаль "de" к Toolbar + toolbar.setLocale(de); // или null для сброса на локаль по умолчанию (en) +~~~ + +~~~jsx {6} title="C v1.5.7" + // создать Kanban + const board = new kanban.Kanban("#root", {...}); + // создать Toolbar + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // применить локаль "de" к Toolbar + toolbar.setLocale(de, board.api); +~~~ + +## 1.4 -> 1.5 + +### Api + +#### Свойства + +- Свойство [`columnShape`](api/config/js_kanban_columnshape_config.md) Kanban было обновлено следующим образом: + + ~~~jsx {} title="До v1.5" + { + menu: { + show: true, + items: [ + { + label: "Update", ... + } + ] + // другие параметры + } + } + ~~~ + + ~~~jsx {11} title="C v1.5" + { + menu: { + show: true, + items: [ + { + text: "Update", ... + } + ] + // другие параметры + }, + fixedHeaders: true + } + ~~~ + +## 1.3 -> 1.4 + +### Api + +#### Свойства + +- Свойство [`editorShape`](api/config/js_kanban_editorshape_config.md) Kanban было обновлено следующим образом: + + ~~~jsx {} title="До v1.4" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // другие параметры + ~~~ + + ~~~jsx {5,7-21} title="C v1.4" + { + type: "date", // или можно использовать тип "dateRange" + key: "start_date", + label: "Date Range" + format: "%d/%m/%y" + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", // или "editor" + html: true, + }, + }, + { + type: "links", + key: "links", + label: "Links", + }, + // другие параметры + ~~~ + +- Свойство [`cardShape`](api/config/js_kanban_cardshape_config.md) Kanban было обновлено следующим образом: + + ~~~jsx {} title="До v1.4" + { + label: true, + description: true, + menu: { + items: [ + { + label: "Delete", ... + } + ] + } + // другие параметры + } + ~~~ + + ~~~jsx {7,11-13} title="C v1.4" + { + label: true, + description: true, + menu: { + items: [ + { + text: "Delete", ... + } + ] + }, + votes: true, + comments: true, + css: (card) => card.type == "feature" ? "green" : "red", + // другие параметры + } + ~~~ + +- Свойство [`columnShape`](api/config/js_kanban_columnshape_config.md) Kanban было обновлено следующим образом: + + ~~~jsx {} title="До v1.4" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // другие параметры + } + } + ~~~ + + ~~~jsx {6,11} title="C v1.4" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // другие параметры + }, + css: (column, cards) => column.id == "feature" && cards.length < 5 ? "green" : "red" + } + ~~~ + +- Свойство [`rowShape`](api/config/js_kanban_rowshape_config.md) Kanban было обновлено следующим образом: + + ~~~jsx {} title="До v1.4" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // другие параметры + } + } + ~~~ + + ~~~jsx {6,11} title="C v1.4" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // другие параметры + }, + css: (row, cards) => row.id == "task" && cards.length < 5 ? "green" : "red", + } + ~~~ + +- Свойство [`cards`](api/config/js_kanban_cards_config.md) Kanban было обновлено следующим образом: + + ~~~jsx {} title="До v1.4" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + // другие параметры + }, ... + ] + ~~~ + + ~~~jsx {6-18} title="C v1.4" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + // другие параметры + }, ... + ] + ~~~ + +- Свойство [`columns`](api/config/js_kanban_columns_config.md) Kanban было обновлено следующим образом: + + ~~~jsx {} title="До v1.4" + [ + { + id: "inprogress", + label: "In progress", + // другие параметры + }, ... + ] + ~~~ + + ~~~jsx {5-11} title="C v1.4" + [ + { + id: "inprogress", + label: "In progress", + css: "red", + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + // другие параметры + }, ... + ] + ~~~ + +- Свойство [`rows`](api/config/js_kanban_rows_config.md) Kanban было обновлено следующим образом: + + ~~~jsx {} title="До v1.4" + [ + { + id: "features", + label: "Features", + // другие параметры + }, ... + ] + ~~~ + + ~~~jsx {5} title="C v1.4" + [ + { + id: "features", + label: "Features", + css: "green" + // другие параметры + }, ... + ] + ~~~ + +- Свойство [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) Kanban было обновлено следующим образом: + + ~~~jsx {} title="До v1.4" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate + }); + ~~~ + + ~~~jsx {6-8} title="C v1.4" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+
+ +
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // другие параметры + }); + ~~~ + +- Контрол сортировки **sort** в свойстве [`items`](api/config/toolbar_items_config.md) тулбара Kanban был обновлён следующим образом: + + ~~~jsx {} title="До v1.4" + [ + { // кастомный контрол сортировки + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + + ~~~jsx {6,11} title="C v1.4" + [ + { // кастомный контрол сортировки + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + +#### Методы + +- Метод [`api.getState()`](api/internal/js_kanban_getstate_method.md) Kanban был обновлён: + +~~~jsx {25-27} title="До v1.4" +api.getState(); +// метод возвращает объект со следующими свойствами +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, +}*/ +~~~ + +~~~jsx {} title="C v1.4" +api.getState(); +// метод возвращает объект со следующими свойствами +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, +}*/ +~~~ + +## 1.2 -> 1.3 + +### Api + +#### Свойства + +- Свойство [`editorShape`](api/config/js_kanban_editorshape_config.md) Kanban было обновлено следующим образом: + + - параметр ***dateRange*** + + ~~~jsx {} title="До v1.3" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // другие параметры + ~~~ + + ~~~jsx {} title="C v1.3" + { + type: "dateRange", // или можно использовать тип "date" + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range" + }, + // другие параметры + ~~~ + +- Свойство [`items`](api/config/toolbar_items_config.md) тулбара было обновлено следующим образом: + +~~~jsx {} title="До v1.3" +items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" +] +~~~ + +~~~jsx {4-5} title="C v1.3" +items: [ + "search", + "spacer", + "undo", + "redo", + "sort", + "addColumn", + "addRow" +] +~~~ + +#### Методы + +- Метод [`updateCard()`](api/methods/js_kanban_updatecard_method.md) Kanban был обновлён: + +~~~jsx {} title="До v1.3" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*другие параметры*/ + } +}); +~~~ + +~~~jsx {9} title="C v1.3" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*другие параметры*/ + }, + replace: true +}); +~~~ + +- Метод [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) Kanban был обновлён: + +~~~jsx {} title="До v1.3" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + } +}); +~~~ + +~~~jsx {9} title="C v1.3" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +- Метод [`updateRow()`](api/methods/js_kanban_updaterow_method.md) Kanban был обновлён: + +~~~jsx {} title="До v1.3" +updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, +}); +~~~ + +~~~jsx {7} title="C v1.3" +updateColumn({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +## 1.1 -> 1.2 + +### Api + +#### Свойства + +- Свойство [`cardShape`](api/config/js_kanban_cardshape_config.md) Kanban было обновлено следующим образом: + + - параметр ***menu*** + + ~~~jsx {} title="До v1.2" + menu: true, + //или + menu: { show: true } + // другие параметры + ~~~ + + ~~~jsx {5-14} title="C v1.2" + menu: true, + // или + menu: { + show: true, + items: ({ card, store }) => { + if(card.id === 1){ + return false; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", label: "Edit" }, + { id: "delete-card", icon: "wxi-delete", label: "Delete" } + ]; + } + } + }, + // другие параметры + ~~~ + + - параметр ***users*** + + ~~~jsx {7} title="До v1.2" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + path: "../assets/user.jpg" + }, + ] + }, + // другие параметры + ~~~ + + ~~~jsx {7} title="C v1.2" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + avatar: "../assets/user.jpg" + }, + ] + }, + // другие параметры + ~~~ + + - параметры ***start_date*** и ***end_date*** + + ~~~jsx {} title="До v1.2" + start_date: true, + end_date: true, + // другие параметры + ~~~ + + ~~~jsx {3,7} title="C v1.2" + start_date: { + show: true, + format: "%d.%m.%Y" + }, + end_date: { + show: true, + format: "%d.%m.%Y" + }, + // другие параметры + ~~~ + +- Свойство [`editorShape`](api/config/js_kanban_editorshape_config.md) Kanban было обновлено следующим образом: + +~~~jsx {8} title="До v1.2" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + path: "preview_image_path_1.png" + }, + ] +}, +// настройки других полей +~~~ + +~~~jsx {8} title="C v1.2" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + ] +}, +// настройки других полей +~~~ + +- Свойство [`items`](api/config/toolbar_items_config.md) тулбара было обновлено следующим образом: + +~~~jsx {} title="До v1.2" +items: [ + "search", + "controls" +] +~~~ + +~~~jsx {} title="C v1.2" +items: [ + { // или "search", + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ] + }, + "spacer", + { // или "sort", + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", + "addRow" +] +~~~ + +#### Методы + +- Метод [`setLocale()`](api/methods/js_kanban_setlocale_method.md) Kanban и метод [`setLocale()`](api/methods/toolbar_setlocale_method.md) Toolbar были обновлены: + +~~~jsx {} title="До v1.2" +setLocale(kanban.en); // сброс на локаль по умолчанию +~~~ + +~~~jsx {} title="C v1.2" +setLocale(null); // сброс на локаль по умолчанию +~~~ + +- Метод [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) Kanban был обновлён: + +~~~jsx {} title="До v1.2" +api.getReactiveState(); +// метод возвращает объект со следующими свойствами +/*{ + dragItemId: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + dragItemsCoords: {...}, + selected: {...} +}*/ +~~~ + +~~~jsx {} title="C v1.2" +api.getReactiveState(); +// метод возвращает объект со следующими свойствами +/*{ + areasMeta: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + cardShape: {...}, + cards: {...}, + cardsMap: {...}, + cardsMeta: {...}, + columnKey: {...}, + columns: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + edit: {...}, + editorShape: {...}, + fromAreaMeta: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + readonly: {...}, + rowKey: {...}, + rows: {...}, + scroll: {...}, + search: {...}, + selected: {...}, + sort: {...} +}*/ +~~~ + +- Метод [`api.getState()`](api/internal/js_kanban_getstate_method.md) Kanban был обновлён: + +~~~jsx {} title="До v1.2" +api.getState(); +// метод возвращает объект со следующими свойствами +/*{ + dragItemId: string | number, + before: string | number, + overAreaId: string | number, + overAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + dragItemsCoords: array, + selected: array +}*/ +~~~ + +~~~jsx {} title="C v1.2" +api.getState(); +// метод возвращает объект со следующими свойствами +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + dropAreaItemsCoords: array, + dropAreasCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + overAreaMeta: object, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object +}*/ +~~~ + +- Метод [`api.getStores()`](api/internal/js_kanban_getstores_method.md) Kanban был обновлён: + +~~~jsx {} title="До v1.2" +api.getStores(); +// метод возвращает объект со следующими stores +/*{ + state: StateStore, // ( object ) + data: DataStore // ( object ) +}*/ +~~~ + +~~~jsx {} title="C v1.2" +api.getStores(); +// метод возвращает объект со следующими свойствами +/*{ + state: StateStore, // ( object ) +}*/ +~~~ + +### Локализация + +
+До v1.2 + +~~~jsx {} +const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; +const monthsShort = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" +]; +const wx = { + Today: "Today", + Clear: "Clear", + Close: "Close" +}; +const en = { + lang: "en", + __dates: { + months, + monthsShort, + days + }, + wx, + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Untitled: "Untitled", + Rename: "Rename" + } +}; +~~~ +
+ +
+C v1.2 + +~~~jsx {} +const en = { + kanban: { // переводы подписей Kanban + "Save": "Save", + "Close": "Close", + "Delete": "Delete", + "Name": "Name", + "Description": "Description", + "Type": "Type", + "Start date": "Start date", + "End date": "End date", + "Result": "Result", + "No results": "No results", + "Search": "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + "Edit": "Edit", + "Everywhere": "Everywhere", + "Label": "Label", + "Status": "Status", + "Color": "Color", + "Date": "Date", + "Untitled": "Untitled", + "Rename": "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + "Sort": "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)" + }, + calendar: { // переводы и настройки календаря + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // переводы базовых элементов + ok: "OK", + cancel: "Cancel" + } +}; +~~~ +
+ +## 1.0 -> 1.1 + +### Api + +#### Свойства + +- Свойство [`columns`](api/config/js_kanban_columns_config.md) было расширено новыми параметрами. Начиная с v1.1, вы можете использовать конфигурации ***collapsed, limit*** и ***strictLimit***. + +~~~jsx title="До v1.1" +const columns = [ + { + label: "Backlog", + id: "backlog" + }, ... +]; +~~~ + +~~~jsx {5-7,12} title="C v1.1" +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true + }, ... +]; + +new kanban.Kanban("#root", { + columns, + // другие параметры +}); +~~~ + +- Параметр ***color*** свойства [`cardShape`](api/config/js_kanban_cardshape_config.md) был обновлён. + +~~~jsx {4-7} title="До v1.1" +const cardShape = { + color: { + show: true, + values: [ + { id: 1, color: "#65D3B3", label: "red" }, + { id: 2, color: "#FFC975", label: "green" } + ] + } +}; +~~~ + +~~~jsx {4,9} title="C v1.1" +const cardShape = { + color: { + show: true, + values: ["#65D3B3", "#FFC975", "#58C3FE"] + } +}; + +new kanban.Kanban("#root", { + cardShape + // другие параметры +}); +~~~ + +#### Методы + +- Метод [`addColumn`](api/methods/js_kanban_addcolumn_method.md) (и событие [`add-column`](api/events/js_kanban_addcolumn_event.md)) был обновлён: + +~~~jsx {} title="До v1.1" +addColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="C v1.1" +addColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: false, + ... + } +}); +~~~ + +- Метод [`addRow`](api/methods/js_kanban_addrow_method.md) (и событие [`add-row`](api/events/js_kanban_addrow_event.md)) был обновлён: + +~~~jsx {} title="До v1.1" +addRow(row_data_object); +~~~ + +~~~jsx {2-7} title="C v1.1" +addRow({ + id: "feature", + row: { + label: "Feature", + collapsed: false, + ... + } +}); +~~~ + +- Метод [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) (и событие [`update-column`](api/events/js_kanban_updatecolumn_event.md)) был обновлён: + +~~~jsx {} title="До v1.1" +updateColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="C v1.1" +updateColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: true, + ... + } +}); +~~~ + +- Метод [`updateRow`](api/methods/js_kanban_updaterow_method.md) (и событие [`update-row`](api/events/js_kanban_updaterow_event.md)) был обновлён: + +~~~jsx {} title="До v1.1" +updateRow(row_data_object); +~~~ + +~~~jsx {2-7} title="C v1.1" +updateRow({ + id: "feature", + row: { + label: "Feature", + collapsed: true, + ... + } +}); +~~~ + +- Метод [`updateCard`](api/methods/js_kanban_updatecard_method.md) (и событие [`update-card`](api/events/js_kanban_updatecard_event.md)) был обновлён: + +~~~jsx {} title="До v1.1" +updateCard(card_data_object); +~~~ + +~~~jsx {2-7} title="C v1.1" +updateCard({ + id: 1, + card: { + label: "Volvo XC 70", + progress: 26 + ... + } +}); +~~~ + +- Метод [`parse`](api/methods/js_kanban_parse_method.md) был обновлён: + +~~~jsx {3-5,8-12} title="До v1.1" +// необходимо сбрасывать начальные данные перед парсингом новых +const board = new kanban.Kanban("#root", { + columns: [], + cards: [], + rows: [] +}); + +board.parse({ + columns, + cards, + rows +}); +~~~ + +~~~jsx {} title="C v1.1" +// не требуется сбрасывать начальные данные перед парсингом новых +const board = new kanban.Kanban("#root", {}); + +board.parse({ + columns, + cards, + rows +}); +~~~ \ No newline at end of file diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/news/whats_new.md b/i18n/ru/docusaurus-plugin-content-docs/current/news/whats_new.md new file mode 100644 index 0000000..b2003ca --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/news/whats_new.md @@ -0,0 +1,648 @@ +--- +sidebar_label: Что нового +title: Что нового +description: Ознакомьтесь с новыми возможностями DHTMLX Kanban и историей его релизов в документации JavaScript UI библиотеки DHTMLX. Изучайте руководства для разработчиков и справочник API, пробуйте примеры кода и живые демо, а также скачайте бесплатную 30-дневную пробную версию DHTMLX Kanban. +--- + +# Что нового + +Если вы обновляете Kanban с более старой версии, ознакомьтесь с разделом [Миграция на новые версии](news/migration.md) для получения подробной информации. + +## Версия 1.7.0 + +Выпущена 14 октября 2025 + +[Обзор релиза в блоге](https://dhtmlx.com/blog/meet-dhtmlx-kanban-1-7/) + +### Интеграция с Salesforce + +Начиная с v1.7, вы можете использовать JavaScript Kanban в среде Salesforce. Подробнее смотрите в руководстве: [**Интеграция с Salesforce**](guides/integration_with_salesforce.md). + +Вы также можете ознакомиться с нашим [**примером на GitHub**](https://github.com/DHTMLX/salesforce-lwc-demo) или запустить [**онлайн-демо**](https://dhtmlx-dev-ed.develop.lightning.force.com/) (*Логин*: ***user***, *Пароль*: ***demo***). + +### Новый API + +- #### События + + - [`undo`](api/events/js_kanban_undo_event.md) + - [`redo`](api/events/js_kanban_redo_event.md) + +- #### Методы + + - [`getColumnCards()`](api/methods/js_kanban_getcolumncards_method.md) + - [`detach()`](api/internal/js_kanban_detach_method.md) + +### Обновления + +- #### Методы + + - Внутренний метод [`on`](api/internal/js_kanban_on_method.md) расширен параметрами `config.tag` и `config.intercept` + - Внутренний метод [`intercept`](api/internal/js_kanban_intercept_method.md) расширен параметрами `config.tag` и `config.intercept` + +- #### Свойства + + - Свойство [`links`](api/config/js_kanban_links_config.md) обновлено следующим образом: + - Параметр `masterId` заменён на `source` + - Параметр `slaveId` заменён на `target` + + - Свойство [`editorShape`](api/config/js_kanban_editorshape_config.md) обновлено. Параметр `clearButton` заменён на `clear` + + - Функция [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) обновлена. Параметр `store` заменён на `readonly` + + - Свойство [`cards[i].attached[i]`](api/config/js_kanban_cards_config.md) расширено параметром `size` + +### Удалённый API + +- Свойство `editorAutoSave` удалено. Используйте вместо него свойство [`editor.autoSave`](api/config/js_kanban_editor_config.md) + +- Параметры `dragItemsCoords` и `dropAreasCoords` удалены из события [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) + +### Исправления + +- При загрузке группы файлов или нескольких больших файлов форма обновляется до того, как все файлы полностью загружены на сервер. В этом случае данные карточек, отправляемые на сервер, некорректны +- Размер файла отображается только для вновь загруженных файлов +- Значения года и месяца не обновляются после нажатия пользователем кнопки **Done** в редакторе +- Расширяемое текстовое поле комментариев сдвигает кнопку за пределы зоны клика +- Происходит ошибка скрипта при открытии карточки, связанной с удалённой карточкой + +## Версия 1.6.5 + +Выпущена 14 июля 2025 + +### Исправления + +- Конфигурация `disabled: true` не работает для элементов меню +- При добавлении строки в Kanban без предопределённой структуры строки заголовки строк не отображаются + +## Версия 1.6.4 + +Выпущена 12 июня 2025 + +### Исправления + +- Карточки теряются при добавлении в колонки/строки, которые были удалены и затем восстановлены +- Отсутствуют локализованные подписи для кнопок списка загрузчика +- В коммерческих пакетах отсутствуют файлы readme + +## Версия 1.6.3 + +Выпущена 8 апреля 2025 + +### Исправления + +- Лимит применяется ко всей колонке некорректно +- Ошибка при перемещении карточки после закрытия модального редактора +- Подтверждение удаления отображается под модальным редактором +- Иконка "more" на тулбаре появляется и исчезает неожиданно при медленном изменении размера окна +- Событие `delete-card` всегда закрывает редактор +- Редактор нельзя открыть, если приоритет установлен на ID вне предоставленных опций + +## Версия 1.6.2 + +Выпущена 14 февраля 2025 + +### Исправления + +- Некорректная дата окончания действия пробной версии +- Предупреждение при drag and drop на touch-устройствах +- Конфигурация readonly `add: false` не убирает опцию **Add** из меню колонки +- Редактор не отображается для карточек с числовыми ID в виде строк +- Устаревшая ссылка на примеры в пакете +- Прокрутка колонки с lazy rendering вызывает проблемы с drag and drop +- Метод `setConfig()` не обновляет фиксированное состояние заголовков колонок + +## Версия 1.6.1 + +Выпущена 29 ноября 2024 + +### Исправления + +- Тулбар на узких экранах отображает иконку "more" со смещением +- `RestDataProvider` игнорирует заголовки, определённые через `setHeaders()` +- Ошибка "RestDataProvider.getIDResolver is not a function" + +## Версия 1.6 + +Выпущена 13 ноября 2024 + +[Обзор релиза в блоге](https://dhtmlx.com/blog/dhtmlx-kanban-1-6/) + +### Новая функциональность + +- Возможность изменять количество отображаемых назначенных пользователей на карточке через свойство [`cardShape.users.maxCount`](api/config/js_kanban_cardshape_config.md) (см. [**пример**](https://snippet.dhtmlx.com/w205dvzg?tag=kanban)) +- Возможность изменять содержимое заголовков колонок через свойство [`columnShape`](api/config/js_kanban_columnshape_config.md) (см. [**пример**](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban)) +- Возможность изменять вид и содержимое результатов поиска через свойство [`items.searchResult`](api/config/toolbar_items_config.md) тулбара **search** (см. [**пример**](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban)) +- Возможность отображать редактор как модальное окно через свойство [`editor.placement`](api/config/js_kanban_editor_config.md) (см. [**пример**](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban)) +- Возможность включить голосование за карточку (с помощью иконки голосования на карточке) через свойство [`cardShape.votes.clickable`](api/config/js_kanban_cardshape_config.md) (см. [**пример**](https://snippet.dhtmlx.com/en76xvi4?tag=kanban)) + +### Обновления + +- #### Свойства + + - Свойство [`cardShape`](api/config/js_kanban_cardshape_config.md) расширено параметрами ***users.maxCount*** и ***votes.clickable*** + - Свойство [`columnShape`](api/config/js_kanban_columnshape_config.md) расширено параметрами ***headerTemplate*** и ***collapsedTemplate*** + - Свойство [`editor`](api/config/js_kanban_editor_config.md) расширено параметром ***placement*** + - Свойство [`items`](api/config/toolbar_items_config.md) тулбара **search** расширено параметром ***searchResult*** + +- #### События + + - Событие [`set-edit`](api/events/js_kanban_setedit_event.md) расширено параметром ***eventSource*** (см. [**пример**](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban)) + +- #### Методы + + - Функциональность метода [`setConfig()`](api/methods/js_kanban_setconfig_method.md) обновлена следующим образом: + + - Метод не изменяет историю (вы не можете изменять историю вообще) + - Метод не уничтожает datastore Kanban. Не требуется пересоздавать обработчики событий и повторно прикреплять Toolbar к Kanban + + - Метод [`setLocale()`](api/methods/js_kanban_setlocale_method.md) не уничтожает datastore Kanban. Не требуется пересоздавать обработчики событий и повторно прикреплять Toolbar к Kanban + - Параметр `api` метода тулбара [`setLocale()`](api/methods/toolbar_setlocale_method.md) устарел + +### Исправления + +- Комментарий в процессе редактирования можно удалить, и поле для новых комментариев исчезает +- Добавлены недостающие строки локализации +- Drag-n-drop не работает при сочетании настроек [`scrollType: "column"`](api/config/js_kanban_scrolltype_config.md) и [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) +- Редактор нельзя закрыть через иконку закрытия +- Правая часть редактора имеет тот же цвет, что и фон прогресс-бара (только в Willow skin) + +## Версия 1.5.13 + +Выпущена 12 сентября 2024 + +### Исправления + +- Кнопка "Make cover" не появляется, если расширение файла написано заглавными буквами +- Клик по отключённому Multiselect вызывает ошибку +- Прокрутка после вызова метода [`addCard()`](api/methods/js_kanban_addcard_method.md) вызывает ошибку с [column scroll](api/config/js_kanban_scrolltype_config.md) и [lazy rendering](api/config/js_kanban_rendertype_config.md) +- Нет комментариев сохраняется как "" вместо [] +- Стиль редактора переопределяется глобальными стилями с одноимённым неуникальным селектором класса. [См. раздел миграции](news/migration.md/#1512---1513) + +## Версия 1.5.12 + +Выпущена 2 мая 2024 + +### Исправления + +- Регрессия intercept: возврат `false` не предотвращает внутренние события +- Отключённые файлы позволяют загружать файлы + +## Версия 1.5.11 + +Выпущена 25 марта 2024 + +### Исправления + +- CSS-переменные Kanban для скина *Dark willow* теряются для Toolbar и Portals +- Изменения комментариев и голосов не применяются к значениям формы при отключённом autosave +- Пользовательское подменю колонки получает `null` в аргументе функции **onClick** +- Невозможно задать режим редактирования для Datepickers в редакторе +- Предупреждения в консоли в примерах Kanban + +## Версия 1.5.10 + +Выпущена 29 февраля 2024 + +### Исправления + +- Сломанная сборка на npm сервере +- Добавлен параметр `select` в событие [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) и метод [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md) +- Некорректные стили для поля комментария в редакторе Kanban + +## Версия 1.5.9 + +Выпущена 20 февраля 2024 + +### Исправления + +- Kanban влияет на стили других виджетов +- Пользовательские элементы подменю колонки с `disabled: true` остаются активными +- Невозможно установить пользовательскую функцию загрузки для элемента **Uploader** + +## Версия 1.5.8 + +Выпущена 28 ноября 2023 + +### Исправления + +- Отсутствует определение **currentUser** TS в типе **IKanbanConfig** + +## Версия 1.5.7 + +Выпущена 14 ноября 2023 + +### Обновления + +- Метод [`setLocale()`](api/methods/toolbar_setlocale_method.md) тулбара расширен параметром ***api*** + +### Исправления + +- Конфигурация `disabled: true` не работает для элементов меню карточки +- Лишние предупреждения в консоли в примерах Kanban +- Невозможно сбросить приоритет задачи +- Выпадающие элементы управления в редакторе Kanban не закрываются при клике вне + +## Версия 1.5.6 + +Выпущена 13 сентября 2023 + +### Обновления + +- Возможность импортировать компонент как ES-модуль + +### Исправления + +- Регрессия в npm-пакетах + +## Версия 1.5.4 + +Выпущена 9 августа 2023 + +### Исправления + +- Ранее загруженные файлы остаются в форме после переключения на другую карточку +- Загрузка файлов через drag-and-drop не работает +- Неожиданное удаление карточек при нажатии клавиши Delete и открытой форме +- Выпадающий список "Search in" становится пустым после выбора карточки через поиск +- Добавленные ссылки не удаляются на бэкенде при отмене операции добавления ссылки + +## Версия 1.5.1 + +### Исправления + +- корректная генерация определений TypeScript + +## Версия 1.5 + +Выпущена 15 июня 2023 + +[Обзор релиза в блоге](https://dhtmlx.com/blog/dhtmlx-kanban-1-5/) + +### Новая функциональность + +- Возможность устанавливать и удалять связи между карточками во время работы +- Возможность управлять связями между карточками на сервере +- Возможность фиксировать заголовки колонок (см. [**пример**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) + +### Новый API + +- #### Методы + + - [`addLink()`](api/methods/js_kanban_addlink_method.md) + - [`deleteLink()`](api/methods/js_kanban_deletelink_method.md) + - [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) + +- #### Роуты + + - [`DELETE /links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) + - [`GET /links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md) + - [`POST /links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md) + +### Обновления + +- #### Свойства + + - Свойство [`columnShape`](api/config/js_kanban_columnshape_config.md) расширено параметром ***fixedHeaders*** + +### Исправления + +- Связи не могут быть разобраны во время работы, экспортированы или сериализованы +- Создание раздела комментариев падает, если секция пользователей не активирована +- Связи в store изменяют исходные данные и не сохраняются корректно +- Lazy rendering ломает стили области наведения свернутых колонок +- Карточки, перемещённые в только что созданные колонки, исчезают +- Текстовое поле для нового комментария не закрывается при начале редактирования + +## Версия 1.4.2 + +Выпущена 13 апреля 2023 + +### Исправления + +- Backend ID не сохраняется в локальные данные карточки/колонки/строки после добавления +- Добавлены отсутствующие TS-определения +- Стили dark skin "протекают" на другие элементы + +## Версия 1.4.1 + +Выпущена 29 марта 2023 + +### Исправления + +- Некорректная работа сохранения сортировки +- Некорректная работа при отключении контекстного меню через свойства **cardShape**, **columnShape** или **rowShape** +- Некорректная работа при добавлении связей в редакторе без предоставления связей в данных +- Меню на колонке может совпадать с карточкой или не отображаться +- Перетаскиваются две задачи вместо одной + +## Версия 1.4 + +Выпущена 21 марта 2023 + +[Обзор релиза в блоге](https://dhtmlx.com/blog/dhtmlx-kanban-1-4/) + +### Новая функциональность + +- Возможность добавлять комментарии (см. [**пример**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- Возможность ограничивать пользователей (см. [**пример**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban)) +- Возможность устанавливать связи между карточками (см. [**пример**](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- Возможность голосовать за карточку (см. [**пример**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) + +### Новый API + +- #### События + + - [`add-comment`](api/events/js_kanban_addcomment_event.md) + - [`add-link`](api/events/js_kanban_addlink_event.md) + - [`delete-comment`](api/events/js_kanban_deletecomment_event.md) + - [`delete-link`](api/events/js_kanban_deletelink_event.md) + - [`drag-card`](api/events/js_kanban_dragcard_event.md) + - [`end-drag-card`](api/events/js_kanban_enddragcard_event.md) + - [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) + - [`update-comment`](api/events/js_kanban_updatecomment_event.md) + +- #### Методы + + - [`addComment()`](api/methods/js_kanban_addcomment_method.md) + - [`deleteComment()`](api/methods/js_kanban_deletecomment_method.md) + - [`updateComment()`](api/methods/js_kanban_updatecomment_method.md) + +- #### Свойства + + - [`currentUser`](api/config/js_kanban_currentuser_config.md) + - [`links`](api/config/js_kanban_links_config.md) + +### Обновления + +- #### Методы + + - Метод [`api.getState()`](api/internal/js_kanban_getstate_method.md) обновлён + +- #### Свойства + + - Свойство [`cards`](api/config/js_kanban_cards_config.md) расширено параметрами ***css***, ***comments*** и ***votes*** + - Свойство [`cardShape`](api/config/js_kanban_cardshape_config.md) расширено параметрами ***comments***, ***votes*** (см. [**пример**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) и ***css*** (см. [**пример**](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban)) + - Свойство [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) теперь может отображать контекстное меню + - Свойство [`columns`](api/config/js_kanban_columns_config.md) расширено параметрами ***css*** (см. [**пример**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)) и ***overlay*** (см. [**пример**](https://snippet.dhtmlx.com/nfv59yif?tag=kanban)) + - Свойство [`columnShape`](api/config/js_kanban_columnshape_config.md) расширено параметром ***css*** (см. [**пример**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)) + - Свойство [`editorShape`](api/config/js_kanban_editorshape_config.md) расширено типами [***comments***](guides/configuration.md#comments-type) и [***links***](guides/configuration.md#links-type), а также параметром ***format*** для типов *date/dateRange* + - Свойство [`rows`](api/config/js_kanban_rows_config.md) расширено параметром ***css*** (см. [**пример**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + - Свойство [`rowShape`](api/config/js_kanban_rowshape_config.md) расширено параметром ***css*** (см. [**пример**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + +### Устаревший API + +- #### Свойства + + - label в объектах элементов меню в `cardShape.menu.items`, `columnShape.menu.items` и `rowShape.menu.items` + +### Исправления + +- Некорректная позиция меню при размещении Kanban внутри контейнера с отступами +- Некорректная позиция свернутых колонок при пользовательской ширине колонки +- Перетаскивание карточки в свернутую колонку приводит к исчезновению карточки +- Некорректная позиция свернутых колонок при пользовательской ширине колонки +- Swimlanes. Контекстное меню карточки перекрывается панелью редактирования, из-за чего карточку невозможно удалить + +## Версия 1.3 + +Выпущена 29 сентября 2022 + +[Обзор релиза в блоге](https://dhtmlx.com/blog/dhtmlx-kanban-1-3/) + +### Новая функциональность + +- Дублирование карточек через API, контекстное меню (иконка с 3 точками) или сочетания клавиш `Ctrl (Command)` + `D` (возможно дублирование нескольких карточек) +- Экспорт данных Kanban в JSON-файл +- Управление историей Kanban: + - через элементы *Undo* и *Redo* на тулбаре + - через горячие клавиши: + - `Ctrl (Command)`+`Z` — отмена действия + - `Ctrl (Command)`+`Y` или `Ctrl (Command)`+`Shift`+`Z` — повтор действия + - через API + +### Новый API + +- **События:** + [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) + +- **Методы:** + [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md), + [`export.json()`](api/internal/js_kanban_json_method.md), + [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md), + [`redo()`](api/methods/js_kanban_redo_method.md) и + [`undo()`](api/methods/js_kanban_undo_method.md) + +- **Свойства:** + [`editor`](api/config/js_kanban_editor_config.md) и + [`history`](api/config/js_kanban_history_config.md) + +- **Общие настройки:** + [`$meta`](api/common/js_kanban_meta_parameter.md) + +### Устаревший API + +- **Свойства:** + [`editorAutoSave`](api/config/js_kanban_editorautosave_config.md) + +### Обновления + +- #### События + + - Событие [`update-card`](api/events/js_kanban_updatecard_event.md) Kanban обновлено + - Событие [`update-column`](api/events/js_kanban_updatecolumn_event.md) Kanban обновлено + - Событие [`update-row`](api/events/js_kanban_updaterow_event.md) Kanban обновлено + +- #### Методы + + - Метод [`updateCard()`](api/methods/js_kanban_updatecard_method.md) Kanban обновлён + - Метод [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) Kanban обновлён + - Метод [`updateRow()`](api/methods/js_kanban_updaterow_method.md) Kanban обновлён + +- #### Свойства + + - Свойство [`items`](api/config/toolbar_items_config.md) тулбара расширено параметрами ***"undo"*** и ***"redo"*** (элементы управления) + - Свойство [`editorShape`](api/config/js_kanban_editorshape_config.md) расширено типом ***dateRange*** + +## Версия 1.2.2 + +Выпущена 30 августа 2022 + +### Исправления + +- Дублирование некоторых иконок в меню и тулбаре + +## Версия 1.2.1 + +Выпущена 28 июля 2022 + +### Исправления + +- Свойство `cardHeight` не работает при включённой конфигурации `scrollType:"column"` +- Загрузчик не отображает загруженные файлы в редакторе карточки +- Локализация не работает для полей "combo" и "progress" в редакторе карточки + +## Версия 1.2 + +Выпущена 29 июня 2022 + +[Обзор релиза в блоге](https://dhtmlx.com/blog/dhtmlx-kanban-1-2/) + +### Новая функциональность + +- Добавление новых карточек через меню колонки (см. [**пример**](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban)) +- Lazy rendering (см. [**пример**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- Прокрутка для отдельных колонок (см. [**пример**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- Прокрутка Kanban к новым созданным карточкам, колонкам и строкам (API и UI) (см. [**пример**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- Сортировка карточек (API и UI) (см. [**пример**](https://snippet.dhtmlx.com/74nyuv14?tag=kanban)) + +### Новый API + +- **События:** + [`scroll`](api/events/js_kanban_scroll_event.md), + [`set-edit`](api/events/js_kanban_setedit_event.md), и + [`set-sort`](api/events/js_kanban_setsort_event.md) + +- **Методы:** + [`scroll()`](api/methods/js_kanban_scroll_method.md), + [`setEdit()`](api/methods/js_kanban_setedit_method.md) и + [`setSort()`](api/methods/js_kanban_setsort_method.md) + +- **Свойства:** + [`cardHeight`](api/config/js_kanban_cardheight_config.md), + [`columnShape`](api/config/js_kanban_columnshape_config.md), + [`rowShape`](api/config/js_kanban_rowshape_config.md), + [`renderType`](api/config/js_kanban_rendertype_config.md), и + [`scrollType`](api/config/js_kanban_scrolltype_config.md) + +### Обновления + +- #### Методы + + - Метод [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) обновлён + - Метод [`api.getState()`](api/internal/js_kanban_getstate_method.md) обновлён + - Метод [`api.getStores()`](api/internal/js_kanban_getstores_method.md) обновлён + - Метод [`setLocale()`](api/methods/js_kanban_setlocale_method.md) Kanban обновлён + - Метод [`setLocale()`](api/methods/toolbar_setlocale_method.md) тулбара обновлён + +- #### Свойства + + - Свойство [`items`](api/config/toolbar_items_config.md) тулбара обновлено + - Параметры ***start_date***, ***end_date***, ***menu*** и ***users*** (поля) свойства [`cardShape`](api/config/js_kanban_cardshape_config.md) обновлены + - Тип ***multiselect*** свойства [`editorShape`](api/config/js_kanban_editorshape_config.md) обновлён + +#### Общее + +- Префиксы CSS-классов (*см. раздел [Стилизация](guides/stylization.md)*) +- Структура локализации (*см. раздел [Локализация](guides/localization.md)*) + +### Исправления + +- Привязка карточек к swimlanes через конфиг `rowKey` работает некорректно +- Клик по меню карточки открывает редактор +- Перетаскивание нескольких карточек работает некорректно +- Редактирование карточек при `select: false` (**readonly** config.md) работает некорректно +- Выбор новых добавленных карточек через метод `addCard()` работает некорректно +- Параметры `label: false` и `menu: false` свойства `cardShape` работают некорректно + +## Версия 1.1.1 + +Выпущена 28 февраля 2022 + +[Обзор релиза в блоге](https://dhtmlx.com/blog/maintenance-release-kanban-1-1-1/) + +### Исправления + +- Пользовательское поле редактора не работает без его определения в конфиге cardShape +- Выбор нужной карточки из выпадающего меню поиска + +## Версия 1.1 + +Выпущена 15 февраля 2022 + +[Обзор релиза в блоге](https://dhtmlx.com/blog/dhtmlx-kanban-1-1-wip-validation-new-operations-columns-rows-typescript-support/) + +### Новая функциональность + +- Возможность *сворачивать/разворачивать* колонки с помощью стрелки слева от заголовка колонки +- Возможность *ограничивать* количество карточек в колонках и swimlanes +- Возможность *перемещать* колонки через контекстное меню (иконка с 3 точками) +- Возможность *перемещать* строки через контекстное меню (иконка с 3 точками) +- Возможность *выделять несколько карточек* одной колонки с помощью комбинации **Shift** + **клик** +- Возможность использовать [TypeScript-определения](guides/typescript_support.md) Kanban + +### Новый API + +- Новые **события** для перемещения колонок и строк: + [`move-column`](api/events/js_kanban_movecolumn_event.md) + и + [`move-row`](api/events/js_kanban_moverow_event.md) +- Новые **методы** для перемещения колонок и строк: + [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md) + и + [`moveRow()`](api/methods/js_kanban_moverow_method.md) + +### Обновления + +#### Свойства + +- Свойство [`cards`](api/config/js_kanban_cards_config.md) стало необязательным + +- Свойство [`columns`](api/config/js_kanban_columns_config.md) стало необязательным и расширено следующими параметрами: + - ***collapsed*** + - ***limit*** + - ***strictLimit*** + +- Параметр ***color*** свойства [`cardShape`](api/config/js_kanban_cardshape_config.md) обновлён + +#### Методы + +- Метод [`addColumn`](api/methods/js_kanban_addcolumn_method.md) обновлён +- Метод [`addRow`](api/methods/js_kanban_addrow_method.md) обновлён +- Метод [`updateCard`](api/methods/js_kanban_updatecard_method.md) обновлён +- Метод [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) обновлён +- Метод [`updateRow`](api/methods/js_kanban_updaterow_method.md) обновлён +- Метод [`parse`](api/methods/js_kanban_parse_method.md) обновлён + +#### События + +- Событие [`add-column`](api/events/js_kanban_addcolumn_event.md) обновлено +- Событие [`add-row`](api/events/js_kanban_addrow_event.md) обновлено +- Событие [`update-card`](api/events/js_kanban_updatecard_event.md) обновлено +- Событие [`update-column`](api/events/js_kanban_updatecolumn_event.md) обновлено +- Событие [`update-row`](api/events/js_kanban_updaterow_event.md) обновлено + +## Версия 1.0 + +Выпущена 23 ноября 2021 + +[Обзор релиза в блоге](https://dhtmlx.com/blog/releasing-dhtmlx-kanban-board-v-1-0/) + +### Начальная функциональность + +- Возможность работать с **карточками** следующим образом: + - добавлять новые карточки + - выделять карточки (множественный выбор) + - удалять карточки + - искать карточки + - изменять порядок карточек перетаскиванием в нужную колонку (и строку) + - управлять данными карточки через редактор: + - заголовок + - описание + - прогресс + - дата начала + - дата окончания + - цвет + - приоритет + - вложения (*файлы* и *изображения*) + - *пользовательские поля* + +- Возможность работать с **колонками** и **строками** следующим образом: + - добавлять новые колонки и строки + - удалять колонки и строки + - переименовывать колонки и строки + - сворачивать/разворачивать строки + +- [Локализация](guides/localization.md) +- [Интеграция с backend](guides/working_with_server.md) (Go и Node) +- Кроссбраузерная совместимость +- Поддержка touch-устройств \ No newline at end of file diff --git a/i18n/ru/docusaurus-theme-classic/footer.json b/i18n/ru/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..34d025c --- /dev/null +++ b/i18n/ru/docusaurus-theme-classic/footer.json @@ -0,0 +1,62 @@ +{ + "link.title.Development center": { + "message": "Центр разработки", + "description": "Заголовок колонки ссылок в подвале с title=Development center в футере" + }, + "link.title.Community": { + "message": "Сообщество", + "description": "Заголовок колонки ссылок в подвале с title=Community в футере" + }, + "link.title.Company": { + "message": "Компания", + "description": "Заголовок колонки ссылок в подвале с title=Company в футере" + }, + "link.item.label.Download JS Kanban": { + "message": "Скачать JS Kanban", + "description": "Метка ссылки в футере с label=Download JS Kanban, ведущей на https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml" + }, + "link.item.label.Examples": { + "message": "Примеры", + "description": "Метка ссылки в футере с label=Examples, ведущей на https://snippet.dhtmlx.com/5hcx01h4?tag=kanban" + }, + "link.item.label.Blog": { + "message": "Блог", + "description": "Метка ссылки в футере с label=Blog, ведущей на https://dhtmlx.com/blog/tag/kanban/" + }, + "link.item.label.Forum": { + "message": "Форум", + "description": "Метка ссылки в футере с label=Forum, ведущей на https://forum.dhtmlx.com/c/kanban/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "Метка ссылки в футере с label=GitHub, ведущей на https://github.com/DHTMLX" + }, + "link.item.label.Youtube": { + "message": "Youtube", + "description": "Метка ссылки в футере с label=Youtube, ведущей на https://www.youtube.com/user/dhtmlx" + }, + "link.item.label.Facebook": { + "message": "Facebook", + "description": "Метка ссылки в футере с label=Facebook, ведущей на https://www.facebook.com/dhtmlx" + }, + "link.item.label.Twitter": { + "message": "Twitter", + "description": "Метка ссылки в футере с label=Twitter, ведущей на https://twitter.com/dhtmlx" + }, + "link.item.label.Linkedin": { + "message": "Linkedin", + "description": "Метка ссылки в футере с label=Linkedin, ведущей на https://www.linkedin.com/groups/3345009/" + }, + "link.item.label.About us": { + "message": "О нас", + "description": "Метка ссылки в футере с label=About us, ведущей на https://dhtmlx.com/docs/company.shtml" + }, + "link.item.label.Contact us": { + "message": "Связаться с нами", + "description": "Метка ссылки в футере с label=Contact us, ведущей на https://dhtmlx.com/docs/contact.shtml" + }, + "link.item.label.Licensing": { + "message": "Лицензирование", + "description": "Метка ссылки в футере с label=Licensing, ведущей на https://dhtmlx.com/docs/products/dhtmlxKanban/#licensing" + } + } \ No newline at end of file diff --git a/i18n/ru/docusaurus-theme-classic/navbar.json b/i18n/ru/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..1148b72 --- /dev/null +++ b/i18n/ru/docusaurus-theme-classic/navbar.json @@ -0,0 +1,26 @@ +{ + "title": { + "message": "Документация JavaScript Kanban", + "description": "Заголовок в навигационной панели" + }, + "logo.alt": { + "message": "Логотип DHTMLX JavaScript Kanban", + "description": "Альтернативный текст логотипа навигационной панели" + }, + "item.label.Examples": { + "message": "Примеры", + "description": "Элемент навигационной панели с меткой Examples" + }, + "item.label.Forum": { + "message": "Форум", + "description": "Элемент навигационной панели с меткой Forum" + }, + "item.label.Support": { + "message": "Поддержка", + "description": "Элемент навигационной панели с меткой Support" + }, + "item.label.Download": { + "message": "Скачать", + "description": "Элемент навигационной панели с меткой Download" + } + } \ No newline at end of file diff --git a/i18n/zh/code.json b/i18n/zh/code.json new file mode 100644 index 0000000..1637690 --- /dev/null +++ b/i18n/zh/code.json @@ -0,0 +1,444 @@ +{ + "theme.ErrorPageContent.title": { + "message": "此页面崩溃了。", + "description": "页面崩溃时备用页面的标题" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "滚动回顶部", + "description": "返回顶部按钮的ARIA标签" + }, + "theme.blog.archive.title": { + "message": "存档", + "description": "博客存档页面的页面及主标题" + }, + "theme.blog.archive.description": { + "message": "存档", + "description": "博客存档页面的页面及主描述" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "博客列表页面导航", + "description": "博客分页的ARIA标签" + }, + "theme.blog.paginator.newerEntries": { + "message": "更新的文章", + "description": "用于导航到较新博客文章页面(上一页)的标签" + }, + "theme.blog.paginator.olderEntries": { + "message": "更早的文章", + "description": "用于导航到较旧博客文章页面(下一页)的标签" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "博客文章页面导航", + "description": "博客文章分页的ARIA标签" + }, + "theme.blog.post.paginator.newerPost": { + "message": "更新的文章", + "description": "导航到较新/上一篇文章的博客文章按钮标签" + }, + "theme.blog.post.paginator.olderPost": { + "message": "更早的文章", + "description": "导航到较旧/下一篇文章的博客文章按钮标签" + }, + "theme.tags.tagsPageLink": { + "message": "查看所有标签", + "description": "指向标签列表页面的链接标签" + }, + "theme.colorToggle.ariaLabel": { + "message": "切换深色和浅色模式(当前为 {mode})", + "description": "导航栏颜色模式切换按钮的ARIA标签" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "深色模式", + "description": "深色模式的名称" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "浅色模式", + "description": "浅色模式的名称" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "面包屑导航", + "description": "面包屑导航的ARIA标签" + }, + "theme.docs.DocCard.categoryDescription.plurals": { + "message": "1 个项目|{count} 个项目", + "description": "生成的索引中类别卡的默认描述,说明该类别包含多少项目" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "文档页面", + "description": "文档分页的ARIA标签" + }, + "theme.docs.paginator.previous": { + "message": "上一页", + "description": "用于导航到上一篇文档的标签" + }, + "theme.docs.paginator.next": { + "message": "下一页", + "description": "用于导航到下一篇文档的标签" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "一个文档被标记|{count} 个文档被标记", + "description": "“{count} 个文档被标记”的复数形式标签。根据语言支持使用尽可能多的复数形式(用“|”分隔)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "带有“{tagName}”的 {nDocsTagged}", + "description": "文档标签页面的标题" + }, + "theme.docs.versionBadge.label": { + "message": "版本: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "这是 {siteTitle} {versionLabel} 版本的未发布文档。", + "description": "用于告知用户正在浏览未发布文档版本的标签" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "这是 {siteTitle} {versionLabel} 的文档,该版本已不再维护。", + "description": "用于告知用户正在浏览不再维护的文档版本的标签" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "有关最新文档,请参见 {latestVersionLink}({versionLabel})。", + "description": "用于提示用户查看最新版本的标签" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "最新版本", + "description": "最新版本建议链接的标签" + }, + "theme.common.editThisPage": { + "message": "编辑此页面", + "description": "编辑当前页面的链接标签" + }, + "theme.common.headingLinkTitle": { + "message": "直达链接至 {heading}", + "description": "指向标题的链接标题" + }, + "theme.lastUpdated.atDate": { + "message": " 于 {date}", + "description": "描述页面最后更新时间的日期词汇" + }, + "theme.lastUpdated.byUser": { + "message": " 由 {user}", + "description": "描述页面最后更新者的词汇" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "最后更新于{atDate}{byUser}", + "description": "显示页面最后更新时间及更新者的句子" + }, + "theme.NotFound.title": { + "message": "页面未找到", + "description": "404页面的标题" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "版本", + "description": "移动视图下导航栏版本下拉菜单的标签" + }, + "theme.tags.tagsListLabel": { + "message": "标签:", + "description": "标签列表旁边的标签" + }, + "theme.admonition.caution": { + "message": "注意", + "description": "Caution 提示框的默认标签(:::caution)" + }, + "theme.admonition.danger": { + "message": "危险", + "description": "Danger 提示框的默认标签(:::danger)" + }, + "theme.admonition.info": { + "message": "信息", + "description": "Info 提示框的默认标签(:::info)" + }, + "theme.admonition.note": { + "message": "注释", + "description": "Note 提示框的默认标签(:::note)" + }, + "theme.admonition.tip": { + "message": "提示", + "description": "Tip 提示框的默认标签(:::tip)" + }, + "theme.admonition.warning": { + "message": "警告", + "description": "Warning 提示框的默认标签(:::warning)" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "关闭", + "description": "公告栏关闭按钮的ARIA标签" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "博客最新文章导航", + "description": "博客侧边栏中最近文章的ARIA标签" + }, + "theme.CodeBlock.copied": { + "message": "已复制", + "description": "代码块中复制按钮的标签" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "复制代码到剪贴板", + "description": "复制代码按钮的ARIA标签" + }, + "theme.CodeBlock.copy": { + "message": "复制", + "description": "代码块中复制按钮的标签" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "切换自动换行", + "description": "代码块行自动换行切换按钮的标题属性" + }, + "theme.DocSidebarItem.expandCategoryAriaLabel": { + "message": "展开侧边栏类别 '{label}'", + "description": "展开侧边栏类别的ARIA标签" + }, + "theme.DocSidebarItem.collapseCategoryAriaLabel": { + "message": "折叠侧边栏类别 '{label}'", + "description": "折叠侧边栏类别的ARIA标签" + }, + "theme.NavBar.navAriaLabel": { + "message": "主导航", + "description": "主导航的ARIA标签" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "语言", + "description": "移动端语言切换下拉菜单的标签" + }, + "theme.NotFound.p1": { + "message": "我们无法找到您要查找的内容。", + "description": "404页面的第一段文字" + }, + "theme.NotFound.p2": { + "message": "请联系将您链接到原始URL的网站所有者,告知他们的链接已失效。", + "description": "404页面的第二段文字" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "本页内容", + "description": "折叠目录组件按钮使用的标签" + }, + "theme.blog.post.readMore": { + "message": "阅读更多", + "description": "博客文章摘要中链接到完整博客文章的标签" + }, + "theme.blog.post.readMoreLabel": { + "message": "阅读关于 {title} 的更多内容", + "description": "从摘要链接到完整博客文章的ARIA标签" + }, + "theme.blog.post.readingTime.plurals": { + "message": "阅读时间1分钟|阅读时间 {readingTime} 分钟", + "description": "“{readingTime} 分钟阅读时间”的复数形式标签。根据语言支持使用尽可能多的复数形式(用“|”分隔)" + }, + "theme.docs.breadcrumbs.home": { + "message": "首页", + "description": "面包屑导航中主页的ARIA标签" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "折叠侧边栏", + "description": "文档侧边栏折叠按钮的标题属性" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "折叠侧边栏", + "description": "文档侧边栏折叠按钮的ARIA标签" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "文档侧边栏", + "description": "侧边栏导航的ARIA标签" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "关闭导航栏", + "description": "移动侧边栏关闭按钮的ARIA标签" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "切换导航栏", + "description": "移动端导航汉堡菜单按钮的ARIA标签" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← 返回主菜单", + "description": "移动导航栏侧边栏二级菜单中返回主菜单的返回按钮标签(常用于显示文档侧边栏)" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "展开侧边栏", + "description": "文档侧边栏展开按钮的ARIA标签和标题属性" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "展开侧边栏", + "description": "文档侧边栏展开按钮的ARIA标签和标题属性" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "找到一篇文档|找到 {count} 篇文档", + "description": "“找到 {count} 篇文档”的复数形式标签。根据语言支持使用尽可能多的复数形式(用“|”分隔)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "\"{query}\" 的搜索结果", + "description": "非空查询的搜索页面标题" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "搜索文档", + "description": "空查询的搜索页面标题" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "在此输入搜索内容", + "description": "搜索页面输入框的占位符" + }, + "theme.SearchPage.inputLabel": { + "message": "搜索", + "description": "搜索页面输入框的ARIA标签" + }, + "theme.SearchPage.algoliaLabel": { + "message": "由 Algolia 提供搜索", + "description": "Algolia 提示的ARIA标签" + }, + "theme.SearchPage.noResultsText": { + "message": "未找到结果", + "description": "空搜索结果时的段落文字" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "正在获取新结果...", + "description": "获取新搜索结果时的段落文字" + }, + "theme.SearchBar.seeAll": { + "message": "查看全部 {count} 个结果" + }, + "theme.SearchBar.label": { + "message": "搜索", + "description": "搜索按钮的ARIA标签和占位符" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "清除查询", + "description": "搜索框重置按钮的标签和ARIA标签" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "取消", + "description": "搜索框取消按钮的标签和ARIA标签" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "最近", + "description": "最近搜索的标题" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "无最近搜索", + "description": "无最近搜索时的文本" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "保存此搜索", + "description": "保存最近搜索按钮的标签" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "从历史记录中移除此搜索", + "description": "移除最近搜索按钮的标签" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "收藏", + "description": "收藏搜索的标题" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "从收藏中移除此搜索", + "description": "移除收藏搜索按钮的标签" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "无法获取结果", + "description": "搜索模态框错误屏幕的标题" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "您可能需要检查您的网络连接。", + "description": "搜索模态框错误屏幕的帮助文本" + }, + "theme.SearchModal.footer.selectText": { + "message": "选择", + "description": "Enter键执行选择操作的说明文本" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "回车键", + "description": "执行选择操作的回车键按钮ARIA标签" + }, + "theme.SearchModal.footer.navigateText": { + "message": "导航", + "description": "上下箭头键执行导航操作的说明文本" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "向上箭头", + "description": "执行向上导航操作的向上箭头键按钮ARIA标签" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "向下箭头", + "description": "执行向下导航操作的向下箭头键按钮ARIA标签" + }, + "theme.SearchModal.footer.closeText": { + "message": "关闭", + "description": "Esc键执行关闭操作的说明文本" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Esc键", + "description": "关闭模态框的Esc键按钮ARIA标签" + }, + "theme.SearchModal.footer.searchByText": { + "message": "搜索提供者", + "description": "搜索由Algolia提供的说明文本" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "无结果", + "description": "说明没有搜索结果的文本" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "尝试搜索", + "description": "无结果时的建议搜索文本" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "认为此查询应该返回结果?", + "description": "用户认为缺少结果时的提示文本" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "告诉我们。", + "description": "报告缺少结果的链接文本" + }, + "theme.SearchModal.placeholder": { + "message": "搜索文档", + "description": "DocSearch弹出模态框输入框的占位符" + }, + "theme.blog.post.plurals": { + "message": "一篇文章|{count} 篇文章", + "description": "\"{count} 篇文章\"的复数形式标签。根据语言支持使用尽可能多的复数形式(用“|”分隔)" + }, + "theme.blog.tagTitle": { + "message": "带有“{tagName}”标签的 {nPosts} 篇文章", + "description": "博客标签页面的标题" + }, + "theme.blog.author.pageTitle": { + "message": "{authorName} - {nPosts}", + "description": "博客作者页面的标题" + }, + "theme.blog.authorsList.pageTitle": { + "message": "作者", + "description": "作者列表页面的标题" + }, + "theme.blog.authorsList.viewAll": { + "message": "查看所有作者", + "description": "指向博客作者页面的链接标签" + }, + "theme.blog.author.noPosts": { + "message": "该作者尚未撰写任何文章。", + "description": "作者没有博客文章时的文本" + }, + "theme.contentVisibility.unlistedBanner.title": { + "message": "非公开页面", + "description": "非公开内容横幅标题" + }, + "theme.contentVisibility.unlistedBanner.message": { + "message": "此页面为非公开。搜索引擎不会索引它,只有拥有直接链接的用户可以访问。", + "description": "非公开内容横幅信息" + }, + "theme.contentVisibility.draftBanner.title": { + "message": "草稿页面", + "description": "草稿内容横幅标题" + }, + "theme.contentVisibility.draftBanner.message": { + "message": "此页面为草稿,仅在开发环境可见,并且不会包含在生产构建中。", + "description": "草稿内容横幅信息" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "再试一次", + "description": "React错误边界捕获错误时,重新尝试渲染的按钮标签" + }, + "theme.common.skipToMainContent": { + "message": "跳至主要内容", + "description": "无障碍跳转至主要内容的标签,允许通过键盘Tab/Enter快速导航" + }, + "theme.tags.tagsPageTitle": { + "message": "标签", + "description": "标签列表页面的标题" + } +} \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current.json b/i18n/zh/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000..84ad445 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,134 @@ +{ + "version.label": { + "message": "下一个", + "description": "当前版本的标签" + }, + "sidebar.docs.category.What's new and migration": { + "message": "新功能和迁移", + "description": "侧边栏文档中新功能和迁移类别的标签" + }, + "sidebar.docs.category.What's new and migration.link.generated-index.title": { + "message": "新功能和迁移", + "description": "侧边栏文档中新功能和迁移类别的生成索引页面标题" + }, + "sidebar.docs.category.API": { + "message": "API", + "description": "侧边栏文档中API类别的标签" + }, + "sidebar.docs.category.Kanban methods": { + "message": "看板方法", + "description": "侧边栏文档中看板方法类别的标签" + }, + "sidebar.docs.category.Kanban internal API": { + "message": "看板内部API", + "description": "侧边栏文档中看板内部API类别的标签" + }, + "sidebar.docs.category.Kanban internal API.link.generated-index.title": { + "message": "内部API概述", + "description": "侧边栏文档中看板内部API类别的生成索引页面标题" + }, + "sidebar.docs.category.Event Bus methods": { + "message": "事件总线方法", + "description": "侧边栏文档中事件总线方法类别的标签" + }, + "sidebar.docs.category.Export methods": { + "message": "导出方法", + "description": "侧边栏文档中导出方法类别的标签" + }, + "sidebar.docs.category.State methods": { + "message": "状态方法", + "description": "侧边栏文档中状态方法类别的标签" + }, + "sidebar.docs.category.Kanban events": { + "message": "看板事件", + "description": "侧边栏文档中看板事件类别的标签" + }, + "sidebar.docs.category.Kanban properties": { + "message": "看板属性", + "description": "侧边栏文档中看板属性类别的标签" + }, + "sidebar.docs.category.Toolbar methods": { + "message": "工具栏方法", + "description": "侧边栏文档中工具栏方法类别的标签" + }, + "sidebar.docs.category.Toolbar properties": { + "message": "工具栏属性", + "description": "侧边栏文档中工具栏属性类别的标签" + }, + "sidebar.docs.category.Common settings": { + "message": "通用设置", + "description": "侧边栏文档中通用设置类别的标签" + }, + "sidebar.docs.category.Backend API": { + "message": "后端API", + "description": "侧边栏文档中后端API类别的标签" + }, + "sidebar.docs.category.Backend API.link.generated-index.title": { + "message": "后端API", + "description": "侧边栏文档中后端API类别的生成索引页面标题" + }, + "sidebar.docs.category.RestDataProvider API": { + "message": "RestDataProvider API", + "description": "侧边栏文档中RestDataProvider API类别的标签" + }, + "sidebar.docs.category.RestDataProvider API.link.generated-index.title": { + "message": "RestDataProvider API", + "description": "侧边栏文档中RestDataProvider API类别的生成索引页面标题" + }, + "sidebar.docs.category.REST methods": { + "message": "REST方法", + "description": "侧边栏文档中REST方法类别的标签" + }, + "sidebar.docs.category.REST routes": { + "message": "REST路由", + "description": "侧边栏文档中REST路由类别的标签" + }, + "sidebar.docs.category.GET routes": { + "message": "GET路由", + "description": "侧边栏文档中GET路由类别的标签" + }, + "sidebar.docs.category.GET routes.link.generated-index.title": { + "message": "GET路由", + "description": "侧边栏文档中GET路由类别的生成索引页面标题" + }, + "sidebar.docs.category.POST routes": { + "message": "POST路由", + "description": "侧边栏文档中POST路由类别的标签" + }, + "sidebar.docs.category.POST routes.link.generated-index.title": { + "message": "POST路由", + "description": "侧边栏文档中POST路由类别的生成索引页面标题" + }, + "sidebar.docs.category.PUT routes": { + "message": "PUT路由", + "description": "侧边栏文档中PUT路由类别的标签" + }, + "sidebar.docs.category.PUT routes.link.generated-index.title": { + "message": "PUT路由", + "description": "侧边栏文档中PUT路由类别的生成索引页面标题" + }, + "sidebar.docs.category.DELETE routes": { + "message": "DELETE路由", + "description": "侧边栏文档中DELETE路由类别的标签" + }, + "sidebar.docs.category.DELETE routes.link.generated-index.title": { + "message": "DELETE路由", + "description": "侧边栏文档中DELETE路由类别的生成索引页面标题" + }, + "sidebar.docs.category.Backend and frameworks integration": { + "message": "后端和框架集成", + "description": "侧边栏文档中后端和框架集成类别的标签" + }, + "sidebar.docs.category.Backend and frameworks integration.link.generated-index.title": { + "message": "后端和框架集成", + "description": "侧边栏文档中后端和框架集成类别的生成索引页面标题" + }, + "sidebar.docs.category.Guides": { + "message": "指南", + "description": "侧边栏文档中指南类别的标签" + }, + "sidebar.docs.category.Guides.link.generated-index.title": { + "message": "指南", + "description": "侧边栏文档中指南类别的生成索引页面标题" + } +} \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md new file mode 100644 index 0000000..89ad42f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/common/js_kanban_meta_parameter.md @@ -0,0 +1,52 @@ +--- +sidebar_label: $meta +title: $meta 参数 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 $meta 参数。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版本 DHTMLX Kanban。 +--- + +# $meta + +### 描述 + +@short: 用于配置 Kanban 方法和事件的额外设置对象 + +:::important +`$meta` 对象包含一组额外的参数,用于基于 Kanban 事件配置方法! +::: + +### 用法 + +~~~jsx {} +$meta?: { + skipHistory?: boolean +}; +~~~ + +### 参数 + +`$meta` 对象包含以下参数: + +- `skipHistory` - (可选)启用或禁用在 Kanban 历史记录中跳过操作 + +### 示例 + +~~~jsx {11-13} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 添加新卡片,并在 Kanban 历史记录中跳过此操作 +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" }, + $meta: { + skipHistory: true + } +}); +~~~ + +**更新日志:** `$meta` 参数自 v1.3 版本起添加 + +**相关文章:** [`history`](api/config/js_kanban_history_config.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md new file mode 100644 index 0000000..4dab49e --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardheight_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: cardHeight +title: cardHeight 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 cardHeight 配置。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# cardHeight + +### 描述 + +@short: 可选。卡片的高度 + +### 用法 + +~~~jsx {} +cardHeight?: number; // px +~~~ + +:::important +如果您同时使用 [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) 和 [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md) 设置,请务必通过 `cardHeight` 属性指定卡片的固定高度。如果未指定,卡片将不会显示。 +::: + +### 示例 + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + cardHeight: 150, // px + // 其他参数 +}); +~~~ + +**更新日志:** 该属性在 v1.2 版本中添加 + +**相关文档:** [配置](guides/configuration.md#cards) + +**相关示例:** [Kanban. Lazy rendering and column scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md new file mode 100644 index 0000000..17171bb --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cards_config.md @@ -0,0 +1,156 @@ +--- +sidebar_label: cards +title: cards 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 cards 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# cards + +### 描述 + +@short: 可选。包含卡片数据的对象数组 + +### 用法 + +~~~jsx {} +cards?: [ + { + id?: string | number, + label?: string, + description?: string, + progress?: number, + start_date?: Date, + end_date?: Date, + attached?: [ + { + id: string | number, + url?: string, + previewURL?: string, + coverURL?: string, + name?: string, + isCover?: boolean + size?: number + }, {...} + ], + color?: string, + users?: array | string | number, + // users?: array - 用于多个用户,当您使用 "multiselect" 编辑器类型分配用户时 + // users?: string | number - 用于单个用户,当您使用 "combo" 或 "select" 编辑器类型分配用户时 + priority?: string | number, + css?: string, + votes?: array, + comments?: [ + { + id: string | number, + userId: string | number, + cardId: string | number, + text?: string, + date?: Date, + }, {...} + ], + [custom_key: string]?: any + }, {...} // 其他卡片数据 +]; +~~~ + +### 参数 + +对于每个卡片,您可以指定以下参数(数据): + +- `id` - (可选)卡片 **ID**。用于通过相应方法管理卡片 +- `label` - (可选)卡片标签。显示在 **Label** 字段 +- `description` - (可选)卡片描述。显示在 **Description** 字段 +- `progress` - (可选)进度条数值。可指定 0 到 100 之间的值。显示在 **Progress bar** 字段 +- `start_date` - (可选)开始日期对象(请勿指定字符串日期)。显示在 **Start date** 字段 +- `end_date` - (可选)结束日期对象(请勿指定字符串日期)。显示在 **End date** 字段 +- `attached` - (可选)包含附件文件数据的对象数组。显示在 **Attachment** 字段。每个对象可指定以下参数: + - `id` - (必需)附件文件的 **ID** + - `url` - (可选)附件文件路径 + - `previewURL` - (可选)预览图片路径 + - `coverURL` - (可选)封面图片路径 + - `name` - (可选)文件名 + - `isCover` - (可选)启用封面图片。若为 **true**,封面图片将通过 "coverURL" 下载 + - `size` - (可选)附件文件大小(字节) +- `color` - (可选)有效的 HEX 颜色代码。作为卡片顶部线条颜色 +- `users` - (可选)一个包含多个用户 **ID** 的数组,或单个用户的 **string | number**。要指定分配的用户,需要在 [cardShape.users](api/config/js_kanban_cardshape_config.md) 属性中定义用户数据数组。用户显示在 **Users** 字段 + +:::info +`users?: array` - 如果使用 [**multiselect**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) 编辑器类型分配多个用户,请指定包含用户 **ID** 的 **数组** + +`users?: string | number` - 如果使用 [**combo** 或 **select**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) 编辑器类型分配单个用户,请指定单个 **ID** +::: + +- `priority` - (可选)卡片优先级 **ID**。要指定卡片优先级,需要在 [cardShape.priority](api/config/js_kanban_cardshape_config.md) 属性中定义优先级数据数组。显示在 **Priority** 字段 +- `css` - (可选)为单个卡片定义 CSS 样式 +- `votes` - (可选)用户 ID 数组 +- `comments` - (可选)包含评论数据的对象数组。每个评论对象可指定以下参数: + - `id` - (必需)评论的 **ID** + - `userId` - (必需)发布评论的用户 **ID** + - `cardId` - (必需)评论所属卡片的 **ID** + - `text` - (可选)评论文本,也可以包含 HTML 标记 + - `date` - (可选)Date 对象(请勿指定字符串日期)。评论发布时间,编辑后不更新 +- `custom_key` - (可选)卡片的自定义键。您可以指定自定义键以将卡片放入列和行。请参阅 [columnKey](../js_kanban_columnkey_config) 和 [rowKey](api/config/js_kanban_rowkey_config.md) 属性 + +:::info +如果您想动态加载卡片的新数据,可以使用 [**parse()**](api/methods/js_kanban_parse_method.md) 方法! +::: + +### 示例 + +~~~jsx {1-41,45} +const cards = [ + { + id: 1, + label: "Integration with React", + description: "Some description", + progress: 25, + start_date: new Date("02/24/2022"), + end_date: new Date("02/24/2023"), + attached: [ + { + id: 234, + url: "../assets/img-1.jpg", + previewURL: "../assets/img-1.jpg", + coverURL: "../assets/img-1.jpg", + name: "img-1.jpg", + isCover: true, + size: 11979 + }, {...} // 其他附件文件数据 + ], + color: "#65D3B3", + users: [1,2], + votes: [3,6,8], + comments: [ + { + id: 1, + userId: 1, + cardId: 1, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays. ", + date: new Date(), + }, {...} // 其他评论 + ], + priority: 1, + // 自定义字段,将卡片放入 "feature" 行 + // rowKey 配置需设置为 "type" 值 + type: "feature", + // 自定义字段,将卡片放入 "backlog" 列 + // columnKey 配置需设置为 "stage" 值 + stage: "backlog", + css: "red", + }, {...} // 其他卡片数据 +]; + +new kanban.Kanban("#root", { + columns, + cards, + // 其他参数 +}); +~~~ + +**更新日志:** ***css***、***comments*** 和 ***votes*** 参数在 v1.4 版本中新增 + +**相关文档:** +- [数据操作](guides/working_with_data.md) +- [updateCard()](api/methods/js_kanban_updatecard_method.md) + +**相关示例:** [看板. 卡片样式](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md new file mode 100644 index 0000000..7dfeeaf --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardshape_config.md @@ -0,0 +1,340 @@ +--- +sidebar_label: cardShape +title: cardShape 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 cardShape 配置。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# cardShape + +### 描述 + +@short: 可选。用于管理卡片外观的设置对象 + +### 用法 + +~~~jsx {} +cardShape?: { + label?: boolean | { show?: boolean }, + description?: boolean | { show?: boolean }, + progress?: boolean | { show?: boolean }, + attached?: boolean | { show?: boolean }, + cover?: boolean | { show?: boolean }, + comments?: boolean | { show?: boolean }, + confirmDeletion?: boolean | { show?: boolean }, + start_date?: boolean | { + show?: boolean, + format?: string + }, + end_date?: boolean | { + show?: boolean, + format?: string + }, + color?: boolean | { + show?: boolean, + values?: array + }, + menu?: boolean | { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, card }) => void, + data?: array // 菜单子项数组 + }, + {...} + ] | ({ card, readonly }) => array | null + }, + users?: boolean | { + show?: boolean, + values: [ + { + id: string | number, + label?: string, + avatar?: string + }, + {...} // 其他用户数据 + ], + maxCount?: number | false + }, + priority?: boolean | { + show?: boolean, + values?: [ + { + id: string | number, + label?: string, + color: string + }, + {...} // 其他优先级数据 + ] + }, + votes?: boolean | { + show?: boolean, + clickable?: boolean + }, + css?: (card) => string, + headerFields?: [ + { + key: string, + label?: string, + css?: string + }, + {...} // 其他字段数据 + ] +}; +~~~ + +### 参数说明 + +:::info +在某些情况下,您可以将参数设置为**简写**或**扩展**形式。请参见以下代码: + +~~~jsx {3,6} + label: boolean | { show?: boolean } + // 简写形式 + label: true + // 或者 + // 完整形式 + label: { show: true } +~~~ +::: + +要配置卡片外观,您可以在 **cardShape** 对象中指定以下参数(字段): + +- `label` - (可选)显示/隐藏 **标签** 字段 +- `description` - (可选)显示/隐藏 **描述** 字段 +- `progress` - (可选)显示/隐藏 **进度** 字段 +- `attached` - (可选)显示/隐藏 **附件** 字段 +- `cover` - (可选)显示/隐藏 **卡片封面图片** +- `comments` - (可选)显示/隐藏卡片上的 **评论** +- `confirmDeletion` - (可选)显示/隐藏 **删除确认对话框**,允许用户确认或取消删除卡片 +- `start_date` - (可选)**开始日期**字段的参数对象 + - `show` - (可选)显示/隐藏卡片开始日期 + - `format` - (可选)定义卡片开始日期的格式。可用参数详见 [这里](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `end_date` - (可选)**结束日期**字段的参数对象 + - `show` - (可选)显示/隐藏卡片结束日期 + - `format` - (可选)定义卡片结束日期的格式。可用参数详见 [这里](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) +- `color` - (可选)卡片顶部颜色线的参数对象 + - `show` - (可选)显示/隐藏顶部颜色线 + - `values` - (可选)有效的 HEX 颜色码数组 +- `menu` - (可选)卡片上下文菜单的参数对象。可指定以下参数: + - `show` - (可选)启用/禁用卡片上下文菜单 + - `items` - (可选)包含卡片上下文菜单项参数的对象数组。每个菜单项可指定以下参数: + - `id` - (可选)菜单项 ID。实现内置动作时,可指定以下值: + - ***"set-edit"*** - 编辑卡片名称的动作 + - ***"delete-card"*** - 删除卡片的动作 + - `icon` - (可选)菜单项图标的类名,可使用任意图标字体类名(如 *mdi-delete*) + - `text` - (可选)菜单项名称 + - `disabled` - (可选)菜单项状态(*active* 或 *disabled*,取决于布尔值) + - `onClick` - (可选)自定义回调函数,接收以下参数: + - ***id*** - 当前菜单项的 ID + - ***item*** - 当前菜单项的数据对象 + - ***card*** - 目标卡片的数据对象 + - `data` - (可选)表示菜单子项的对象数组 + + :::info + 您也可以将 `menu.items` 参数设置为一个自定义函数,该函数接收以下参数: + - ***card*** - 当前卡片的数据对象 + - ***readonly*** - 只读状态的 [state 属性](api/internal/js_kanban_getstate_method.md) + + 该函数允许为任意卡片自定义菜单,或通过返回 *null* 或 *false* 来隐藏菜单: + + ~~~jsx {} + items: ({ card, readonly }) => { + if (card.id === 1){ + return false; + } + + const menu = []; + + if (!readonly.delete){ + menu.push({ + id: "delete-card", icon: "wxi-delete", label: "Delete" + }); + } + + if (!readonly.edit){ + menu.push({ + id: "set-edit", icon: "wxi-edit", label: "Edit" + }); + } + return menu.length ? menu : null; + } + ~~~ + ::: + +- `users` - (可选)**用户**字段的参数对象 + - `show` - (可选)显示/隐藏已分配用户 + - `values` - (必需)包含用户数据的对象数组。每个用户可指定以下参数: + - `id` - (必需)用户 **ID** + - `label` - (可选)用户名 + - `avatar` - (可选)用户头像路径 + - `maxCount` - (可选)卡片上显示的最大用户数量(或 ***false***) + + 您可以将 `maxCount` 属性设置为要显示的用户数量。 + 如果将 `maxCount` 设置为 `false`,则卡片上将显示所有已分配用户。 + + :::info + ***users*** 字段默认禁用。要启用它,需将 `show` 参数设置为 `true`,并通过 `values` 参数提供相应的用户数据。若要通过编辑器分配新用户,需通过 [`editorShape`](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) 属性配置相应控件。使用 ***select*** 类型分配单个用户,使用 ***multiselect*** 类型分配多个用户。 + + ~~~jsx {} + cardShape: { + users: { + show: true, + values: [ + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } + ], + maxCount: 4 // 卡片上最多显示 4 个用户 + } + } + ~~~ + ::: + +- `priority` - (可选)**优先级**字段的参数对象 + - `show` - (可选)显示/隐藏卡片优先级 + - `values` - (可选)包含优先级数据的对象数组。每个优先级可指定以下参数: + - `id` - (必需)优先级 **ID** + - `label` - (可选)优先级名称 + - `color` - (必需)有效的 HEX 颜色码 +- `votes` - (可选)指定 **投票** 功能 + - `show` - (可选)显示/隐藏卡片及编辑器中的投票图标 + - `clickable` - (可选)使卡片上的投票图标可点击。如果为 `true`,用户可以直接点击卡片上的投票图标进行投票;否则,用户只能在编辑器中投票 +- `css` - 返回应用于卡片的 CSS 类的函数(条件应用) +- `headerFields` - (可选)包含 **自定义字段** 数据的对象数组。可指定以下参数: + - `key` - (必需)自定义字段的键,用于通过 [editorShape](api/config/js_kanban_editorshape_config.md) 属性配置编辑器 + - `label` - (可选)自定义字段的标签 + - `css` - (可选)自定义字段的 CSS 类 + +:::info +除非通过 **cardShape** 属性指定卡片设置,否则组件将应用 **defaultCardShape** 的默认参数集! +::: + +### 默认配置 + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "High" }, + { id: 2, color: "#F1B941", label: "Medium" }, + { id: 3, color: "#77D257", label: "Low" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +export const getDefaultCardMenuItems = ({ readonly }: { readonly: DataStore }) => { + const { readonly } = readonly.getState(); + const baseItems = [ + { id: "duplicate-card", icon: "wxi-content-copy", text: "Duplicate" }, + { id: "delete-card", icon: "wxi-delete-outline", text: "Delete" } + ]; + + if (!readonly?.select && readonly?.edit) { + return [ + { id: "set-edit", icon: "wxi-edit-outline", text: "Edit" }, + ...baseItems, + ]; + } + return baseItems; +}; + +const defaultCardShape = { + label: { show: true }, + description: { show: false }, + progress: { show: false }, + start_date: { show: false }, + end_date: { show: false }, + users: { show: false }, + confirmDeletion: { show: true }, + priority: { + show: false, + values: defaultPriorities + }, + color: { + show: false, + values: defaultColors + }, + cover: { show: false }, + attached: { show: false }, + menu: { show: true } +}; +~~~ + +### 示例 + +~~~jsx {14-49,54} +const users = [ // 用户数据 + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // 卡片优先级数据 + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardColors = ["#65D3B3", "#FFC975", "#58C3FE"]; + +const cardShape = { // 卡片设置 + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + cover: false, + comments: false, + confirmDeletion: false, + color: { + show: true, + values: cardColors + }, + users: { + show: true, + values: users, + maxCount: false + }, + priority: { + show: true, + values: cardPriority + }, + votes: { + show: true, + clickable: true + }, + css: (card) => card.type == "feature" ? "green" : "red", + headerFields: [ + { // 自定义字段 + key: "sprint", + css: "custom_style", + label: "Sprint" + } + ] +}; + +new kanban.Kanban("#root", { + cards, + columns, + cardShape, + // 其他参数 +}); +~~~ + +**更新日志:** +- v1.4 版本新增了 ***comments***、***css*** 和 ***votes*** 参数 +- v1.4 版本废弃了 ***menu.items[0].label*** 参数,改用 ***menu.items[0].text*** 参数 +- v1.4 版本废弃了 ***menu.items[0].items*** 参数,改用 ***menu.items[0].data*** 参数 +- v1.6 版本新增了 ***users.maxCount*** 和 ***votes.clickable*** 参数 +- v1.7 版本移除了 ***menu.items[0].label*** 和 ***menu.items[0].items*** 参数 +- v1.7 版本更新了 ***menu.items*** 函数,**store** 参数被替换为 **readonly** + +**相关文档:** [配置](guides/configuration.md#cards) + +**相关示例:** +- [看板. 泳道、评论、投票](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) +- [看板. 突出显示过期和激活任务](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban) +- [看板. 卡片样式](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban) +- [看板. 每个任务无限制用户分配](https://snippet.dhtmlx.com/w205dvzg?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md new file mode 100644 index 0000000..d194354 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_cardtemplate_config.md @@ -0,0 +1,73 @@ +--- +sidebar_label: cardTemplate +title: cardTemplate 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 cardTemplate 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天试用版 DHTMLX 看板。 +--- + +# cardTemplate + +### 描述 + +@short: 可选。返回并应用卡片的新 HTML 模板 + +### 用法 + +~~~jsx +function cardTemplate ({ cardFields, selected, dragging, cardShape }){ + return "HTML template of the card"; +}; +~~~ + +### 参数 + +回调函数接收一个包含以下参数的对象: + +- `cardFields` - 卡片的数据对象 +- `selected` - 卡片的选中状态 +- `dragging` - 卡片的拖拽状态 +- `cardShape` - 卡片的配置对象 + +:::important +如果您需要在卡片模板中包含上下文菜单,请在模板标记中指定自定义图标,并提供 `data-menu-id=${cardFields.id}` 表达式,如下面示例所示。 +::: + +### 示例 + +~~~jsx {1-23,28} +const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + const { label, color, id } = cardFields; + if (selected) { + return ` +
+
+
+ +
+ Selected:${label} +
+ `; + } + return ` +
+
+
+ +
+ ${label} +
+ `; +} + +new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // other parameters +}); +~~~ + +**更新日志:** 在 v1.4 版本中新增了显示上下文菜单的功能 + +**相关文档:** [自定义](guides/customization.md#custom-cards) + +**相关示例:** [Kanban. Custom card](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md new file mode 100644 index 0000000..b438cba --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnkey_config.md @@ -0,0 +1,58 @@ +--- +sidebar_label: columnKey +title: columnKey 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 columnKey 配置。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# columnKey + +### 描述 + +@short: 可选。定义卡片所属的列 + +:::info +为了将卡片分配到不同的列中,您需要指定一个键(**column** 或自定义键)并将其设置为卡片数据对象中所需列的 **ID**。在组件配置对象中,**columnKey** 属性需要被设置为该键。 +::: + +### 用法 + +~~~jsx {} +columnKey?: string; +~~~ + +### 默认配置 + +:::note +除非您通过 **columnKey** 属性注册了列键,否则组件默认使用 **"column"** 键!在这种情况下,您需要在卡片数据对象中将 **column** 键设置为所需的列 **ID**。 + +~~~jsx {3} +const cards = [ + { + column: "backlog", + // 其他数据 + } +]; +~~~ +::: + +### 示例 + +~~~jsx {4,8,15} +const cards = [ + { + label: "待办任务", + column_custom_key: "backlog" + }, + { + label: "进行中任务", + column_custom_key: "inprogress" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + columnKey: "column_custom_key", + // 其他参数 +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md new file mode 100644 index 0000000..62291c9 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_columns_config.md @@ -0,0 +1,125 @@ +--- +sidebar_label: columns +title: columns 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 columns 配置。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# columns + +### 描述 + +@short: 可选。包含列数据的对象数组 + +### 用法 + +~~~jsx {} +columns?: [ + { + id: string, + label?: string, + collapsed?: boolean, + limit?: number | object, + strictLimit?: boolean, + css?: string, + overlay?: any + }, + {...} // 其他列数据 +]; +~~~ + +### 参数 + +对于每个列,您可以指定以下参数(数据): + +- `id` - (必需)列的 **ID**。用于通过对应的方法管理该列 +- `label` - (可选)列的标签。显示在列区域中 +- `collapsed` - (可选)列的当前状态。如果为 ***true***,则该列初始为折叠状态。默认值为 ***false***(展开状态) +- `limit` - (可选)该参数可以接受以下两种类型的值: + - `number` - 当前列中卡片的数量限制 + - `object` - 一个对象,指定按行(泳道)ID划分的卡片数量限制 +- `strictLimit` - (可选)严格限制模式。如果为 ***true***,用户将无法创建超过通过 **limit** 参数指定数量的新卡片。默认值为 ***false*** +- `css` - (可选)为单独的列定义 CSS 样式 +- `overlay` - (可选)为单独的列定义覆盖层。您可以通过以下方式指定覆盖该列的模板: + + ~~~jsx {} + overlay: template(` +
+ 不允许放置 + 只有测试人员可以将卡片移动到此 + 列 +
`) + ~~~ + +:::info +如果您想动态加载列的新数据,可以使用 [`parse()`](../../methods/js_kanban_parse_method) 方法! +::: + +### 示例 + +~~~jsx {1-31,34} +const columns = [ + { + label: "待办", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true, + css: "red" + }, + { + label: "进行中", + id: "inprogress", + collapsed: false, + limit: { + // 限制 "进行中" 列中 "Feature" 和 "Task" 行的卡片数量 + feature: 3, + task: 2 + }, + strictLimit: false + }, + { + label: "已完成", + id: "done", + overlay: template(` +
+ 不允许放置 + 只有测试人员可以将卡片移动到此 + 列 +
`) + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + // 其他参数 +}); +~~~ + +### 自定义样式 + +要使用 `css` 参数为列应用自定义样式,请为您的自定义类添加 CSS 规则。 + +```css +.wx-header .wx-column.red, +.wx-column.red { + background: #FFA29C; +} +``` + +如果样式未生效,请确保: + +- 您的选择器包含足够的上下文(例如父元素及内部 DHTMLX 类) +- 如果属性被内联样式覆盖,您可以使用 `!important` + +**更新日志:** **css** 和 **overlay** 参数在 v1.4 中添加 + +**相关文档:** +- [处理数据](guides/working_with_data.md) +- [updateColumn()](api/methods/js_kanban_updatecolumn_method.md) + +**相关示例:** +- [看板。列和泳道的限制](https://snippet.dhtmlx.com/2blo6hx8?tag=kanban) +- [看板。通过自定义菜单更改列颜色](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [看板。禁用拖放到特定列](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md new file mode 100644 index 0000000..fd415d6 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_columnshape_config.md @@ -0,0 +1,216 @@ +--- +sidebar_label: columnShape +title: columnShape 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 columnShape 配置。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# columnShape + +### 描述 + +@short: 可选。用于管理列外观的设置对象 + +### 用法 + +~~~jsx {} +columnShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled?: boolean, + onClick?: ({ id, item, column }) => void, + data?: array // 菜单子项数组 + }, + {...} + ] | ({ column, columnIndex, columns, readonly }) => array | null + }, + fixedHeaders?: boolean, + css?: (column, cards) => string, + headerTemplate?: template(column => { + return "展开状态下列头的 HTML 模板"; + }), + collapsedTemplate?: template(column => { + return "折叠状态下列头的 HTML 模板"; + }), + confirmDeletion?: boolean +}; +~~~ + +### 参数 + +要配置列的外观,可以在 **columnShape** 对象中指定以下参数: + +- `menu` - (可选)列上下文菜单的参数对象。可以指定以下参数: + - `show` - (可选)启用或禁用列上下文菜单 + - `items` - (可选)包含列上下文菜单项参数的对象数组。每个菜单项可以指定以下参数: + - `id` - (可选)菜单项的 ID。要实现内置操作,需要指定以下值: + - ***"add-card"*** - 添加新卡片的操作 + - ***"set-edit"*** - 编辑列名称的操作 + - ***"move-column:left"*** - 向左移动列的操作 + - ***"move-column:right"*** - 向右移动列的操作 + - ***"delete-column"*** - 删除列的操作 + + - `icon` - (可选)菜单项图标的类名。这里可以指定任何与图标字体相关的图标(如 *mdi-delete*) + - `text` - (可选)菜单项名称 + - `disabled` - (可选)菜单项状态(*激活* 或 *禁用*,取决于布尔值) + - `onClick` - (可选)自定义回调函数,接受以下参数: + - ***id*** - 当前菜单项的 ID + - ***item*** - 当前菜单项的数据对象 + - ***column*** - 目标列的数据对象 + + - `data` - (可选)表示菜单子项的对象数组 + + :::info + 你也可以将 `menu.items` 参数设置为自定义函数,该函数接受以下参数: + - ***column*** - 当前列的数据对象 + - ***columnIndex*** - 当前列的索引 + - ***columns*** - 包含所有列数据的对象数组 + - ***readonly*** - 只读的 [状态属性](api/internal/js_kanban_getstate_method.md) 对象 + + 该函数允许为任意列自定义菜单,或者通过返回 *null* 或 *false* 来隐藏特定列的菜单: + + ~~~jsx {} + items: ({ column }) => { + if(column.id === "inprogress"){ + return null; + } + if (column.id === "backlog"){ + return [ + { id: "set-edit", icon: "wxi-edit", text: "重命名" }, + { + id: "delete-card", + icon: "wxi-delete", + text: "移除卡片" + } + ]; + } + } + ~~~ + ::: + +- `fixedHeaders` - (可选)在垂直滚动时固定列头(默认 *true*)。必须在看板本身启用滚动(限制高度) +- `css` - (可选)一个函数,根据条件返回应用于列的 CSS 类名 +- `headerTemplate` - (可选)展开状态下列头的 HTML 模板 +- `collapsedTemplate` - (可选)折叠状态下列头的 HTML 模板 +- `confirmDeletion` - (可选)显示/隐藏 **确认对话框**,允许用户确认或取消列的删除操作 + +### 默认配置 + +~~~jsx {} +const getDefaultColumnMenuItems = ({ column, columnIndex, columns, readonly }) => [ + { id: "add-card", icon: "wxi-plus", text: "添加新卡片" }, + { id: "set-edit", icon: "wxi-edit", text: "重命名" }, + { + id: "move-column:left", + icon: "wxi-arrow-left", + text: "左移", + disabled: columnIndex <= 0 + }, + { + id: "move-column:right", + icon: "wxi-arrow-right", + text: "右移", + disabled: columnIndex >= columns.length - 1 + }, + { id: "delete-column", icon: "wxi-delete", text: "删除" } +]; +const columnShape = { + menu: { + show: true, + items: getDefaultColumnMenuItems + }, + fixedHeaders: true, + confirmDeletion: true +}; +~~~ + +### 示例 + +~~~jsx {1-58,64} +const columnShape = { + menu: { + show: true, + items: [ + { + id: "color", + text: "颜色", + data: [ + { + id:"yellow", + text: "黄色", + onClick: ({ column }) => changeColumnColor(column, "yellow") + }, + { + id:"red", + text: "红色", + onClick: ({ column }) => changeColumnColor(column, "red") + }, + { + id:"green", + text: "绿色", + onClick: ({ column }) => changeColumnColor(column, "green") + } + ] + } + ] + }, + fixedHeaders: false, + css: (column, cards) => column.id == "inprogress" && cards.length < 5 ? "green" : "red", + headerTemplate: template(column => { + return `
+ +
+ ${ + !column.column.collapsed + ? `
+ ${escapeHTML(column.column.label)} + (${column.columnState.cardsCount}) +
` + : "" + } + ${ + !column.column.collapsed + ? `
+ +
` + : "" + }`; + }), + collapsedTemplate: template(column => { + return `
+
${escapeHTML(column.column.label)} (${ + column.columnState?.cardsCount + })
+
`; + }), + confirmDeletion: true +}; + +new kanban.Kanban("#root", { + cards, + columns, + rows, + columnShape, + // 其他参数 +}); +~~~ + +**更新日志:** +- ***css*** 参数在 v1.4 版本新增 +- ***menu.items[0].label*** 参数在 v1.4 版本被废弃,替换为 ***menu.items[0].text*** +- ***menu.items[0].items*** 参数在 v1.4 版本被废弃,替换为 ***menu.items[0].data*** +- ***fixedHeaders*** 参数在 v1.5 版本新增 +- ***headerTemplate*** 和 ***collapsedTemplate*** 参数在 v1.6 版本新增 +- ***menu.items[0].label*** 和 ***menu.items[0].items*** 参数在 v1.7 版本移除 +- ***menu.items*** 函数更新,v1.7 版本中 **store** 参数替换为 **readonly** + +**相关文章:** [配置](guides/configuration.md) + +**相关示例:** +- [Kanban. 通过自定义菜单更改列颜色](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban) +- [Kanban. 固定表头、懒加载和列滚动](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) +- [Kanban. 列头模板](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md new file mode 100644 index 0000000..5e21acc --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_currentuser_config.md @@ -0,0 +1,36 @@ +--- +sidebar_label: currentUser +title: currentUser 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 currentUser 配置。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# currentUser + +### 描述 + +@short: 可选。当前用户的 ID + +:::note +当前用户 ID 需要对应于 [`cardShape.users`](api/config/js_kanban_cardshape_config.md) 属性中指定的某个 ID。如果未指定此 ID,评论将仅可供阅读。 +::: + +### 用法 + +~~~jsx {} +currentUser?: string | number; +~~~ + +### 示例 + +~~~jsx {4} +new kanban.Kanban("#root", { + cards, + columns, + currentUser: 1, + // 其他参数 +}); +~~~ + +**更新日志:** 该属性在 v1.4 中添加 + +**相关示例:** [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md new file mode 100644 index 0000000..8bdde35 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_editor_config.md @@ -0,0 +1,62 @@ +--- +sidebar_label: editor +title: editor 配置 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 editor 配置。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# editor + +### 描述 + +@short: 可选。用于配置 Kanban 编辑器的设置对象 + +### 用法 + +~~~jsx {} +editor?: { + show?: boolean, + autoSave?: boolean, + debounce?: number, + placement?: "sidebar" | "modal" +}; +~~~ + +### 参数 + +- `show` - (可选)启用或禁用编辑器 +- `autoSave` - (可选)启用或禁用编辑器的自动保存模式 +- `debounce` - (可选)自动保存数据的延迟时间(仅适用于 ***autoSave: true*** 参数) +- `placement` - (可选)指定编辑器的显示位置。可设置以下值: + - `"sidebar"` - 以侧边栏形式显示编辑器 + - `"modal"` - 以模态窗口形式显示编辑器 + +### 默认配置 + +~~~jsx {} +editor: { + show: true, + debounce: 100, + autoSave: true, + placement: "sidebar" +} +~~~ + +### 示例 + +~~~jsx {4-8} +new kanban.Kanban("#root", { + columns, + cards, + editor: { + show: true + autoSave: true, + debounce: 2000, + placement: "modal" + } + // 其他参数 +}); +~~~ + +**更新日志:** `placement` 参数在 v1.6 版本中添加 + +**相关示例:** [Kanban. 在模态窗口中打开编辑器](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md new file mode 100644 index 0000000..5f78b02 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorautosave_config.md @@ -0,0 +1,44 @@ +--- +sidebar_label: editorAutoSave +title: editorAutoSave 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 editorAutoSave 配置。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# + +

editorAutoSave

+ +:::danger +从版本 1.3 开始,`editorAutoSave` 属性已被**弃用**。要管理“自动保存”模式,请使用 [`editor`](api/config/js_kanban_editor_config.md) 属性! +::: + +### 描述 + +@short: 可选。启用/禁用自动保存模式 + +:::info +通过此参数,您可以启用或禁用看板的自动保存模式。如果将 **editorAutoSave** 属性设置为 **false**,编辑器将显示“保存”按钮以保存编辑的数据。 +::: + +### 用法 + +~~~jsx {} +editorAutoSave?: boolean; // (默认值为 true) +~~~ + +### 默认配置 + +~~~jsx {} +editorAutoSave: true +~~~ + +### 示例 + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + editorAutoSave: false, // 禁用自动保存 + // 其他参数 +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md new file mode 100644 index 0000000..63f0e77 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_editorshape_config.md @@ -0,0 +1,472 @@ +--- +sidebar_label: editorShape +title: editorShape 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 editorShape 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# editorShape + +### 描述 + +@short: 可选。一个包含对象的数组,用于管理看板编辑器的外观和功能设置 + +### 用法 + +~~~jsx {3,8,28,42,52,73,88,97,108,117,125} +editorShape?: [ + { + // 所有类型的通用参数 + type: string, + key: string, + label?: string, + + // 仅针对 "dateRange" 类型 + key: { + start: string, + end: string + }, + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + done?: boolean, + error?: boolean, + format?: string, + months?: number, + placeholder?: string, + title?: string, + width?: string + }, + + // 仅针对 "date" 类型 + config?: { + align?: "start" | "center" | "end", + editable?: boolean | function, + buttons?: boolean, + css?: string, + disabled?: boolean, + error?: boolean, + format?: string, + placeholder?: string, + title?: string, + width?: string + }, + + // 仅针对 "color" 类型 + values?: array, + config?: { + clear?: boolean, + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string + }, + + // 仅针对 "combo"、"select" 和 "multiselect" 类型 + values?: [ + { + id: string | number, + label: string, + avatar?: string // 仅针对 "multiselect" 类型 + }, + {...} // 其他选项 + ], + config?: { + clear?: boolean, // 仅针对 "combo" 和 "color" 类型 + label?: string, // 仅针对 "select" 类型 + checkboxes?: boolean, // 仅针对 "multiselect" 类型 + // 通用参数 + disabled?: boolean, + error?: boolean, + placeholder?: string, + textField?: string, + title?: string + }, + + // 仅针对 "text" 类型 + config?: { + css?: string, + disabled?: boolean, + error?: boolean, + focus?: boolean, + icon?: string, + inputStyle?: string, + placeholder?: string, + readonly?: boolean, + select?: boolean, + title?: string, + type?: string + }, + + // 仅针对 "textarea" 类型 + config? { + disabled?: boolean, + error?: boolean, + placeholder?: string, + title?: string, + readonly?: boolean + }, + + // 仅针对 "progress" 类型 + config?: { + disabled?: boolean, + label?: string, + max?: number, + min?: number, + step?: number, + title?: string, + width?: number + }, + + // 仅针对 "files" 类型 + uploadURL?: string | function, + config?: { + accept?: string, + disabled?: boolean, + multiple?: boolean, + folder?: boolean, + }, + + // 仅针对 "comments" 类型 + config?: { + format?: string, + placement?: "page" | "editor", + html?: boolean, + confirmDeletion?: boolean + }, + + // 仅针对 "links" 类型 + config?: { + confirmDeletion?: boolean + }, + }, { /* 其他控件设置 */ } +]; +~~~ + +### 参数 + +要配置编辑器的外观和功能,可以指定以下参数(字段): + +#### - 所有类型的通用参数 + +- `type` - (必填)编辑器字段类型 + +:::important +在看板编辑器中,您可以使用以下字段类型:**dateRange**、**date**、**combo**、**select**、**multiselect**、**color**、**text**、**textarea**、**progress**、**files**、**comments** 和 **links** +::: + +- `key` - (必填)编辑器字段的键。这里需要使用 [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性中指定的值。示例如下: + +~~~js {8,17} + // 卡片外观设置 + const cardShape = { + ...kanban.defaultCardShape, + headerFields: [ + { // 自定义字段 + label: "Custom field", + css: "custom_style", + key: "custom_key" + } + ] + }; + // 编辑器外观设置 + const editorShape = [ + { + label: "Custom field", + type: "text", + key: "custom_key" + } + ]; +~~~ + +- `label` - (可选)编辑器字段标签 + +#### - "dateRange" 类型的参数 + +- `key` - (必填)编辑器字段键的对象。可以指定以下参数: + - `start` - (必填)开始日期键 + - `end` - (必填)结束日期键 + +:::important +这些键的值用于 [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性中! +::: + +- `config` - (可选)**"dateRange"** 字段的配置对象。可以指定以下参数: + - `align` - (可选)弹出日历相对于日期范围控件的对齐方式 + - `editable` - (可选)定义日期选择器是否可编辑,并可选设置自定义日期编辑格式 + - `buttons` - (可选)显示/隐藏弹出日历底部的“今天”和“清除”按钮 + - `css` - (可选)更改日期范围控件中图标的位置 + - `disabled` - (可选)定义日期范围控件是否禁用 + - `done` - (可选)显示/隐藏日期范围控件中的“完成”按钮 + - `error` - (可选)定义是否对日期范围控件应用错误样式 + - `format` - (可选)设置日期范围控件的日期格式。可用参数请参见[这里](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `months` - (可选)设置日期范围控件中显示的日历数量 + - `placeholder` - (可选)设置日期范围控件的占位符 + - `title` - (可选)设置日期范围控件的附加信息标题 + - `width` - (可选)设置弹出日历的宽度 + +#### - "date" 类型的参数 + +- `config` - (可选)**"date"** 字段的配置对象。可以指定以下参数: + - `align` - (可选)弹出日历相对于日期控件的对齐方式 + - `editable` - (可选)定义日期选择器是否可编辑,并可选设置自定义日期编辑格式 + - `buttons` - (可选)显示/隐藏弹出日历底部的“今天”和“清除”按钮 + - `css` - (可选)更改日期控件中图标的位置 + - `disabled` - (可选)定义日期控件是否禁用 + - `error` - (可选)定义是否对日期控件应用错误样式 + - `format` - (可选)设置日期控件的日期格式。可用参数请参见[这里](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placeholder` - (可选)设置日期控件的占位符 + - `title` - (可选)设置日期控件的附加信息标题 + - `width` - (可选)设置弹出日历的宽度 + +#### - "color" 类型的参数 + +- `values` - (可选)有效 HEX 颜色代码数组 +- `config` - (可选)**"color"** 字段的配置对象。可以指定以下参数: + - `placeholder` - (可选)设置颜色控件的占位符 + - `clear` - (可选)显示/隐藏颜色控件的“清除”图标 + - `disabled` - (可选)定义颜色控件是否禁用 + - `error` - (可选)定义是否对颜色控件应用错误样式 + - `title` - (可选)设置颜色控件的附加信息标题 + +#### - "combo"、"select" 和 "multiselect" 类型的参数 + +- `values` - (可选)包含下拉选项数据的对象数组。可以指定以下参数: + - `id` - (必填)选项 ID + - `label` - (必填)选项标签 + - `avatar` - (可选)选项预览图片路径(仅限 "multiselect" 类型) + +:::important +要设置用于分配单个用户的控件,需使用 ***"select"*** 或 ***"combo"*** 类型!若分配多个用户,使用 ***"multiselect"*** 类型。 +::: + +- `config` - (可选)**"combo"**、**"select"** 和 **"multiselect"** 字段的配置对象。可以指定以下参数: + - `clear` - (可选)在组合输入框中添加清除按钮(仅限 "combo" 和 "color" 类型) + - `label` - (可选)通过指定键绑定选项到输入字段(仅限 "select" 类型) + - `checkboxes` - (可选)定义选项旁是否显示复选框(仅限 "multiselect" 类型) + - `textField` - (可选)通过指定键绑定组合选项到输入字段(仅限 "combo" 和 "multiselect" 类型) + + - `disabled` - (可选)定义控件是否禁用 + - `error` - (可选)定义是否对控件应用错误样式 + - `placeholder` - (可选)设置控件的占位符 + - `title` - (可选)设置控件的附加信息标题 + +#### - "text" 类型的参数 + +- `config` - (可选)**"text"** 字段的配置对象。可以指定以下参数: + - `css` - (可选)设置文本控件中图标的位置 + - `disabled` - (可选)定义文本控件是否禁用 + - `error` - (可选)定义是否对文本控件应用错误样式 + - `focus` - (可选)设置文本控件是否自动获得焦点 + - `icon` - (可选)向文本控件添加图标 + - `inputStyle` - (可选)为文本控件应用自定义样式 + - `placeholder` - (可选)设置文本控件的占位符 + - `readonly` - (可选)定义文本控件是否为只读 + - `select` - (可选)选择文本控件中的内容 + - `title` - (可选)设置文本控件的附加信息标题 + - `type` - (可选)设置文本控件的类型 + +#### - "textarea" 类型的参数 + +- `config` - (可选)**"textarea"** 字段的配置对象。可以指定以下参数: + - `disabled` - (可选)定义文本区域控件是否禁用 + - `error` - (可选)定义是否对文本区域控件应用错误样式 + - `placeholder` - (可选)设置文本区域控件的占位符 + - `title` - (可选)设置文本区域控件的附加信息标题 + - `readonly` - (可选)定义文本区域控件是否为只读 + +#### - "progress" 类型的参数 + +- `config` - (可选)**"progress"** 字段的配置对象。可以指定以下参数: + - `disabled` - (可选)定义进度控件是否禁用 + - `label` - (可选)设置进度控件上方的标签 + - `max` - (可选)设置进度控件的最大值 + - `min` - (可选)设置进度控件的最小值 + - `step` - (可选)设置进度控件的步进值 + - `title` - (可选)设置进度控件的附加信息标题 + - `width` - (可选)设置进度控件的宽度 + +#### - "files" 类型的参数 + +- `uploadURL` - (可选)编辑器上传接口的 URL。详情如下: + +
+ +`uploadURL` 属性可以是 **字符串** 或 **函数**。以下示例展示了如何通过函数设置上传 URL: + +~~~jsx {} +uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // 这里可以添加 token 或其他请求头 + } + }; + + return fetch(url + "/uploads", config) // 这里填写 URL + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); +} +~~~ + +其中 `rec` 是函数的唯一参数,是一个扩展的 `PointerEvent` 对象(原生类型加上以下 4 个属性): + +~~~jsx {} +interface UploadEvent extends PointerEvent { + id: number; + status: "client" | "server" | "error"; // 分别表示“尚未发送”、“发送成功”、“发送失败” + name: string; // 文件名 + file: string | Blob; // 文件对象 +} +~~~ + +
+ +- `config` - (可选)**"files"** 字段的配置对象。可以指定以下参数: + - `accept` - (可选)允许上传的文件类型(如 ***"image/*"***、***"video/*"***、***"audio/*"*** 等) + - `disabled` - (可选)启用/禁用文件上传 + - `multiple` - (可选)启用/禁用多文件上传 + - `folder` - (可选)启用/禁用文件夹上传 + +#### - "comments" 类型的参数 + +- `config` - (可选)**"comments"** 字段的配置对象。可以指定以下参数: + - `format` - (可选)评论的日期格式。可用格式参见[这里](https://docs.dhtmlx.com/suite/calendar/api/calendar_dateformat_config/) + - `placement` - (可选)评论显示的位置。可设置为: + - `"editor"` - 评论显示在编辑器中 + - `"page"` - 评论显示在独立面板中 + - `html` - (可选)启用/禁用评论中的 HTML 标记 + - `confirmDeletion` - (可选)显示/隐藏删除评论的确认对话框,允许用户确认或取消删除操作 + +#### - "links" 类型的参数 + +- `config` - (可选)**"links"** 字段的配置对象。可以指定以下参数: + - `confirmDeletion` - (可选)显示/隐藏删除链接的确认对话框,允许用户确认或取消删除操作 + +:::info +如果未通过 `editorShape` 属性指定编辑器设置,控件将使用一组 **defaultEditorShape** 默认参数! +::: + +### 默认配置 + +~~~jsx {} +const defaultPriorities = [ + { id: 1, color: "#FE6158", label: "High" }, + { id: 2, color: "#F1B941", label: "Medium" }, + { id: 3, color: "#77D257", label: "Low" } +]; + +const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"]; + +const defaultEditorShape = [ + { + key: "label", + type: "text", + label: "Label" + }, + { + key: "description", + type: "textarea", + label: "Description" + }, + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clear: true + } + }, + { + type: "color", + label: "Color", + key: "color" + }, + { + type: "progress", + key: "progress", + label: "Progress" + }, + { + type: "date", + key: "start_date", + label: "Start date" + }, + { + type: "date", + key: "end_date", + label: "End date" + }, + { + type: "multiselect", + key: "users", + label: "Users" + } +]; +~~~ + +### 示例 + +~~~jsx {6-33,38} +const users = [ // 用户数据 + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const editorShape = [ // 编辑器设置 + ...kanban.defaultEditorShape, // 包含默认设置 + { // 添加自定义字段 + type: "multiselect", + key: "users", + label: "Users", + values: users + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", + html: true, + confirmDeletion: true + } + }, + { + type: "links", + key:"links", + label: "Links", + config: { + confirmDeletion: true + } + } +]; + +new kanban.Kanban("#root", { + cards, + columns, + editorShape, + // 其他参数 +}); +~~~ + +**更新日志:** + +- v1.3 版本新增了 ***dateRange*** 类型 +- v1.4 版本新增了 ***comments*** 和 ***links*** 编辑器类型,以及 ***format*** 参数 +- ***clearButton*** 参数被替换为 ***clear*** 参数 + +**相关文档:** [配置](guides/configuration.md/#editor) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md new file mode 100644 index 0000000..5c4cfb0 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_history_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: history +title: history 配置 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 history 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并免费下载 DHTMLX Kanban 的 30 天评估版本。 +--- + +# history + +### 描述 + +@short: 可选。启用或禁用变更历史的管理 + +:::info +通过使用 `history` 属性,您可以启用或禁用 Kanban 的历史管理。如果将其设置为 **false**,则无法通过 API 和工具栏控件管理历史。 +::: + +:::tip +您还可以使用方法和事件中的 [`$meta`](api/common/js_kanban_meta_parameter.md) 参数跳过 Kanban 历史中的某些操作! +::: + +### 用法 + +~~~jsx {} +history?: boolean; +~~~ + +### 默认配置 + +~~~jsx {} +history: true +~~~ + +### 示例 + +~~~jsx {4} +new kanban.Kanban("#root", { + columns, + cards, + history: false, // 禁用历史管理 + // 其他参数 +}); +~~~ + +**更新日志:** 此属性在 v1.3 版本中新增 + +**相关文档:** [`undo()`](api/methods/js_kanban_undo_method.md) 和 [`redo()`](api/methods/js_kanban_redo_method.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md new file mode 100644 index 0000000..9b8f293 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_links_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: links +title: links 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 links 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# links + +### 描述 + +@short: 可选。包含链接数据的对象数组 + +### 用法 + +~~~jsx {} +links?: [ + { + id: string | number, + source: string | number, + target: string | number, + relation: "relatesTo" | "requiredFor" | "duplicate" | "parent" + }, {...} // 其他链接数据 +]; +~~~ + +### 参数 + +对于每个链接,您可以指定以下参数(数据): + +- `id` - (必填)链接的 ID +- `source` – (必填)链接起点的卡片 ID(例如,“任务 A 是任务 B 的前置任务”) +- `target` – (必填)链接终点的卡片 ID(例如,“任务 B 依赖于任务 A”) +- `relation` - (必填)链接类型。可指定以下类型: + - ***"relatesTo"*** - 定义任务之间的关联,当前任务与另一个任务相关联 + - ***"requiredFor"*** - 定义任务之间的依赖关系,其中一个任务需要另一个任务完成 + - ***"duplicate"*** - 定义重复任务之间的依赖关系 + - ***"parent"*** - 定义父(主)任务与子(从)任务之间的依赖关系 + +:::info +如果您想动态加载新的链接数据,可以使用 [**parse()**](api/methods/js_kanban_parse_method.md) 方法! +::: + +### 示例 + +~~~jsx {1-8,13} +const links = [ + { + id: 1, + source: 2, + target: 5, + relation: "relatesTo", + }, {...} // 其他链接数据 +]; + +new kanban.Kanban("#root", { + columns, + cards, + links + // 其他参数 +}); +~~~ + +**更新日志:** 该属性在 v1.7 中进行了更新: + - **masterId** 参数被替换为 **source** 参数 + - **slaveId** 参数被替换为 **target** 参数 + +**相关文档:** [数据操作](guides/working_with_data.md) + +**相关示例:** [看板任务之间的链接](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md new file mode 100644 index 0000000..fca6b56 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_locale_config.md @@ -0,0 +1,45 @@ +--- +sidebar_label: locale +title: locale 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 locale 配置。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# locale + +### 描述 + +@short: 可选。一个自定义看板语言环境的对象 + +:::info +**locale** 对象需要包含看板和工具栏的所有标签及其对应的翻译。 +::: + +### 用法 + +~~~jsx {} +locale?: object; +~~~ + +### 默认配置 + +默认情况下,看板使用[**英语**](guides/localization.md#default-locale)语言环境。您也可以设置为自定义语言环境。 + +:::tip +要动态更改当前语言环境,可以使用看板的[**setLocale()**](api/methods/js_kanban_setlocale_method.md)方法。 +::: + +### 示例 + +~~~jsx {5} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // 初始设置为 "cn" 语言环境 + // 其他参数 +}); +~~~ + +**相关文档:** [本地化](guides/localization.md) + +**相关示例:** [看板。本地化](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md new file mode 100644 index 0000000..8a22082 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_readonly_config.md @@ -0,0 +1,69 @@ +--- +sidebar_label: readonly +title: readonly 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 readonly 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# readonly + +### 描述 + +@short: 可选。启用/禁用卡片的编辑、添加、选择和拖拽功能 + +### 用法 + +~~~js {} +readonly?: boolean; +//或 +readonly?: { + edit?: boolean, + add?: boolean, + select?: boolean, + dnd?: boolean +}; +~~~ + +### 参数 + +要配置 **readonly 模式**,您可以使用 **简洁** 或 **扩展** 参数。 + +**简洁** 参数: +- `readonly` - (可选)启用或禁用 Kanban 的 **只读模式** + +**扩展** 参数: +- `readonly` - (可选)一个包含扩展设置的对象。您可以指定以下参数: + - `edit` - (可选)启用或禁用卡片的 **编辑** + - `add` - (可选)启用或禁用新卡片的 **添加** + - `select` - (可选)启用或禁用卡片的 **选择** + - `dnd` - (可选)启用或禁用卡片的 **拖拽** + +### 默认配置 + +~~~jsx {} +readonly: false // 只读模式禁用 +//或 +readonly: { + edit: true, // 编辑启用 + add: true, // 添加启用 + select: true, // 选择启用 + dnd: true // 拖拽启用 +} +~~~ + +### 示例 + +~~~jsx {4-9} +new kanban.Kanban("#root", { + cards, + columns, + readonly: { + edit: false, // 禁用编辑 + add: true, // 启用添加 + select: false, // 禁用选择 + dnd: true // 启用拖拽 + }, + // 其他参数 +}); +~~~ + +**相关示例:** [Readonly mode](https://snippet.dhtmlx.com/b8x84yln?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md new file mode 100644 index 0000000..87f4ba0 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rendertype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: renderType +title: renderType 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 renderType 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# renderType + +### 描述 + +@short: 可选。定义卡片渲染的类型 + +:::info +当处理大量卡片时会用到此属性。如果设置为 *"lazy"*,组件将只渲染看板上可见的卡片的视觉部分。这可以显著提升组件的性能。 +::: + +### 用法 + +~~~jsx {} +renderType?: "default" | "lazy"; +~~~ + +:::important +如果您将 `renderType: "lazy"` 与 [`scrollType: "default"`](api/config/js_kanban_scrolltype_config.md) 设置结合使用,请务必通过 [`cardHeight`](api/config/js_kanban_cardheight_config.md) 属性指定卡片的固定高度。否则卡片将无法正确显示。 +::: + +### 默认配置 + +~~~jsx {} +renderType: "default" +~~~ + +### 示例 + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + renderType: "lazy", + // 其他参数 +}); +~~~ + +**更新日志:** 该属性在 v1.2 版本中添加 + +**相关文档:** [配置](guides/configuration.md#cards) + +**相关示例:** [Kanban. 固定表头,懒加载渲染和列滚动](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md new file mode 100644 index 0000000..1cca870 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowkey_config.md @@ -0,0 +1,46 @@ +--- +sidebar_label: rowKey +title: rowKey 配置 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 rowKey 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# rowKey + +### 描述 + +@short: 可选。定义卡片所属的行 + +:::info +要将卡片分配到不同的行(泳道)中,您需要指定一个**自定义键**,并将其设置为卡片数据对象中目标行的**ID**。在组件配置对象中,**rowKey** 属性需要设置为该*自定义键*。 +::: + +### 用法 + +~~~jsx {} +rowKey?: string; +~~~ + +### 示例 + +~~~jsx {4,8,16} +const cards = [ + { + label: "Backlog task", + row_custom_key: "feature" + }, + { + label: "In progress task", + row_custom_key: "done" + } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, + rowKey: "row_custom_key", + // other parameters +}); +~~~ + +**相关示例:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md new file mode 100644 index 0000000..2667d73 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rows_config.md @@ -0,0 +1,65 @@ +--- +sidebar_label: rows +title: rows 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 rows 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# rows + +### 描述 + +@short: 可选。包含行(泳道)数据的对象数组 + +### 用法 + +~~~jsx {} +rows?: [ + { + id: string, + label?: string, + collapsed?: boolean, + css?: string, + }, {...} // 其他行数据 +]; +~~~ + +:::info +要创建泳道,您需要在 **rows** 属性的数组中指定相应的数据。您可以通过 UI 或使用[相关 API](howtos.md#how-to-work-with-rows-swimlanes)来折叠/展开、重命名、删除和移动泳道。 +::: + +### 参数 + +对于每个行(泳道),您可以指定以下参数(数据): + +- `id` - (必需)行(泳道)的 **ID**。用于通过相应方法管理该行 +- `label` - (可选)行(泳道)标签。显示在行区域 +- `collapsed` - (可选)行(泳道)的当前状态。如果为 ***true***,则该行初始为折叠状态。默认值为 ***false***(展开状态) +- `css` - (可选)为单独的行定义 CSS 样式 + +:::info +如果您想动态加载新的行(泳道)数据,可以使用 [**parse()**](api/methods/js_kanban_parse_method.md) 方法! +::: + +### 示例 + +~~~jsx {1-4,9} +const rows = [ + { label: "Feature", id: "feature", collapsed: false, css: "red" }, + { label: "Task", id: "task", collapsed: true } +]; + +new kanban.Kanban("#root", { + columns, + cards, + rows, // 泳道数据 + // 其他参数 +}); +~~~ + +**更新日志:** ***css*** 参数在 v1.4 中添加 + +**相关文档:** +- [数据操作](guides/working_with_data.md) +- [updateRow()](api/methods/js_kanban_updaterow_method.md) + +**相关示例:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md new file mode 100644 index 0000000..10892ee --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_rowshape_config.md @@ -0,0 +1,188 @@ +--- +sidebar_label: rowShape +title: rowShape 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 rowShape 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版 DHTMLX 看板。 +--- + +# rowShape + +### 描述 + +@short: 可选。用于管理行外观的设置对象 + +### 用法 + +~~~jsx {} +rowShape?: { + menu?: { + show?: boolean, + items?: [ + { + id?: string, + icon?: string, + text?: string, + disabled? boolean, + onClick?: ({ id, item, row }) => void, + data?: array // 菜单子项数组 + }, {...} // 其他项数据 + ] | ({ row, rowIndex, rows, readonly }) => array | null + }, + css?: (row, cards) => string, + confirmDeletion?: boolean +}; +~~~ + +### 参数 + +要配置行的外观,可以在 **rowShape** 对象中指定以下参数: + +- `menu` - (可选)行上下文菜单的参数对象。您可以指定以下参数: + - `show` - (可选)启用或禁用行上下文菜单 + - `items` - (可选)一个包含行上下文菜单项参数的对象数组。每个菜单项可指定以下参数: + - `id` - (可选)菜单项的 ID。要实现内置操作,需指定以下值: + - ***"set-edit"*** - 定义编辑行名称的操作 + - ***"move-row:up"*** - 定义将行上移的操作 + - ***"move-row:down"*** - 定义将行下移的操作 + - ***"delete-row"*** - 定义删除行的操作 + + - `icon` - (可选)菜单项图标的类名。您可以指定任何与图标字体相关的图标(如 *mdi-delete*) + - `text` - (可选)菜单项名称 + - `disabled` - (可选)菜单项状态(*active* 或 *disabled*,取决于布尔值) + - `onClick` - (可选)自定义回调函数,接收以下参数: + - ***id*** - 当前菜单项的 ID + - ***item*** - 当前菜单项的数据对象 + - ***row*** - 目标行的数据对象 + + - `data` - (可选)表示菜单子项的对象数组 + + :::info + 您也可以将 `menu.items` 参数设置为自定义函数,接收以下参数: + - ***row*** - 当前行的数据对象 + - ***rowIndex*** - 当前行的索引 + - ***rows*** - 包含所有行数据的对象数组 + - ***readonly*** - 只读的 [状态属性](api/internal/js_kanban_getstate_method.md)对象 + + 该函数允许为任意行自定义菜单,或通过返回 *null* 或 *false* 隐藏特定行的菜单: + + ~~~jsx {} + items: ({ rowIndex }) => { + if(rowIndex == 0){ + return null; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", text: "重命名" }, + { + id: "custom-delete-row", + icon: "wxi-delete", + text: "删除行" + }, + { + id: "custom-move-row:up", + icon: "wxi-arrow-up", + text: "上移" + } + ]; + } + } + ~~~ + ::: + +- `css` - 一个函数,返回应用于行的 CSS 类名(条件应用) +- `confirmDeletion` - (可选)显示或隐藏 **确认对话框**,允许用户确认或取消行删除操作 + +### 默认配置 + +~~~jsx {} +const getDefaultRowMenuItems = ({ row, rowIndex, rows, readonly }) => [ + { id: "set-edit", icon: "wxi-edit", text: "重命名" }, + { + id: "move-row:up", + icon: "wxi-arrow-up", + text: "上移", + disabled: rowIndex <= 0 + }, + { + id: "move-row:down", + icon: "wxi-arrow-down", + text: "下移", + disabled: rowIndex >= rows.length - 1 + }, + { id: "delete-row", icon: "wxi-delete", text: "删除" } +]; +const rowShape = { + menu: { + show: true, + items: getDefaultRowMenuItems + }, + confirmDeletion: true +}; +~~~ + +### 示例 + +~~~jsx {10-43,48} +const changeRowColor = (row, cssClass) => board.updateRow({ + id: row.id, + row: { + css: cssClass, + collapsed: false + }, + replace: false +}); + +const rowShape = { + menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + if (rowIndex == 0){ + return false; + } else { + return [ + { + id: "color", + text: "颜色", + data: [ + { + id:"gray", + text: "灰色", + onClick: ({ id, item, row }) => changeRowColor(row, "gray") + }, + { + id:"yellow", + text: "黄色", + onClick: ({ id, item, row }) => changeRowColor(row, "yellow") + }, + { + id:"red", + text: "红色", + onClick: ({ id, item, row }) => changeRowColor(row, "red") + } + ] + } + ]; + } + } + }, + css: (row, cards) => row.id == "task" && cards.length < 3 ? "green" : "red", + confirmDeletion: false +}; + +new kanban.Kanban("#root", { + cards, + rows, + rows, + rowShape, + // 其他参数 +}); +~~~ + +**更新日志:** +- ***css*** 参数在 v1.4 中新增 +- ***menu.items[0].label*** 参数在 v1.4 中弃用,改用 ***menu.items[0].text*** +- ***menu.items[0].items*** 参数在 v1.4 中弃用,改用 ***menu.items[0].data*** +- ***menu.items[0].label*** 和 ***menu.items[0].items*** 参数在 v1.7 中移除 +- ***menu.items*** 函数更新,v1.7 中用 **readonly** 参数替换了 **store** + +**相关文档:** [配置](guides/configuration.md) + +**相关示例:** [Kanban. 通过自定义菜单更改行颜色](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md new file mode 100644 index 0000000..b0b537a --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_scrolltype_config.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scrollType +title: scrollType 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 scrollType 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# scrollType + +### 描述 + +@short: 可选。定义滚动类型 + +### 用法 + +~~~jsx {} +scrollType?: "default" | "column"; +~~~ + +:::note +如果您使用 `scrollType: "column"` 设置,则可以分别滚动每一列。 +::: + +### 默认配置 + +~~~jsx {} +scrollType: "default" +~~~ + +:::important +如果您将 [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) 和 `scrollType: "default"` 设置结合使用,请务必通过 [`cardHeight`](api/config/js_kanban_cardheight_config.md) 属性指定卡片的固定高度。否则卡片将无法显示。 +::: + +### 示例 + +~~~jsx {5} +new kanban.Kanban("#root", { + columns, + cards, + rows, + scrollType: "column", + // 其他参数 +}); +~~~ + +**更新日志:** 该属性在 v1.2 版本中添加 + +**相关文档:** [配置](guides/configuration.md#cards) + +**相关示例:** [看板。固定表头、懒加载渲染和列滚动](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md new file mode 100644 index 0000000..9fed887 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/js_kanban_theme_config.md @@ -0,0 +1,98 @@ +--- +sidebar_label: 主题 +title: 主题配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解主题配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版本 DHTMLX 看板。 +--- + +# 主题 + +### 描述 + +@short: 可选。应用于看板的主题 + +### 用法 + +~~~jsx {} +theme?: { + name: string, // "material"(默认)| "willow" | "willow-dark" + fonts?: boolean +}; +~~~ + +:::important +除了使用 `theme` 属性外,您还可以通过向控件容器添加相应的 *css* 类来应用所需的主题: + +- **Material 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark 主题** +~~~html {} + +
+ +
+~~~ + +或者直接从 skins 文件夹在页面中引入所需的主题: + +~~~html {} + +~~~ +::: + +### 参数 + +要配置 **theme**,您可以使用以下参数。 + +- `theme` - (可选)包含主题设置的对象。您可以指定以下参数: + - `name` - (必需)要应用于看板的主题名称 + - `fonts` - (可选)启用或禁用从 CDN 加载字体(wxi 字体) + +:::tip +您也可以应用 **Willow** 和 **Willow-Dark** 主题。要动态更改当前主题,可以使用 [`setTheme()`](api/methods/js_kanban_settheme_method.md) 方法。 +::: + +### 默认配置 + +默认情况下,看板使用 **Material** 主题。 + +~~~jsx {} +theme: { + name: "material", + fonts: true +} +~~~ + +### 示例 + +~~~jsx {5-8} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: { + name: "willow-dark", // 初始设置为 "willow-dark" 主题 + fonts: false + } + // 其他参数 +}); +~~~ + +**更新日志:** 此属性在 v1.4 版本中添加 + +**相关文档:** [样式设置](guides/stylization.md) + +**相关示例:** [通过 CSS 类更改看板主题](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md new file mode 100644 index 0000000..978a7e8 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_api_config.md @@ -0,0 +1,38 @@ +--- +sidebar_label: api +title: api 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 (Toolbar) api 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# api + +### 描述 + +@short: 必填。包含 Kanban 内部 API 的对象 + +:::info +此处,**Kanban 的内部 API** 用于位于 Toolbar 上的 **控件** +::: + +### 用法 + +~~~jsx {} +api: object; +~~~ + +### 示例 + +~~~jsx {7} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api +}); +~~~ + +**相关文档:** [配置](guides/configuration.md#toolbar) + +**相关示例:** [Kanban. 自定义工具栏](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md new file mode 100644 index 0000000..ec27ebf --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_items_config.md @@ -0,0 +1,191 @@ +--- +sidebar_label: items +title: items 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 (Toolbar) items 配置。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# items + +### 描述 + +@short: 可选。一个数组,包含排列在看板工具栏上的控件 + +### 用法 + +~~~jsx {} +items?: [ + "search" | { + // 搜索参数 + type: "search", + options?: [ + { + id: string, + label: string, + searchRule?: (card, value, by) => { + return boolean + } + }, {...} + ], + resultTemplate?: template(searchResult => { + return "搜索结果的 HTML 模板"; + }) + }, + "sort" | { + // 排序参数 + type: "sort", + options?: [ + { + text: string, + by?: string, // by?: ((card: object) => any), + dir?: "asc" | "desc" + }, {...} + ] + }, + "spacer", + "undo", + "redo", + "addColumn", + "addRow", + custom_control // 字符串或函数 +]; +~~~ + +### 参数 + +在 **items** 数组中,您可以指定以下参数: + +:::info +#### 若要设置*默认搜索栏*,可以指定字符串 `"search"`。 +#### 若要设置*自定义搜索栏*,可以指定包含以下参数的对象: + +- `type` - (必需)控件类型 (*"search"*) +- `options` - (可选)一个对象数组,定义搜索参数。每个对象(*搜索选项*)可以指定以下参数: + - `id` - (必需)卡片字段的键,用于搜索卡片 + - `label` - (必需)选项名称,用于搜索栏选择器的下拉列表中 + - `searchRule` (可选)- 自定义函数,用于定义搜索规则。该函数接收以下参数: + - ***card*** - 卡片数据对象 + - ***value*** - 搜索栏中指定的搜索值 + - ***by*** - 用于搜索卡片的字段键 +- `searchResult` - (可选)用于显示自定义搜索结果的模板 + +~~~jsx +items: [ + "search", // 默认搜索栏 + // 其他控件 +] + +// 或者 + +items: [ + { // 自定义搜索栏 + type: "search", + options: [ + { + id: "label", + label: "按标签" + }, + { + id: "start_date", + label: "按日期", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + // 其他控件 +] +~~~ +::: + +:::info +#### 若要设置*默认排序控件*,可以指定字符串 `"sort"`。 +#### 若要设置*自定义排序控件*,可以指定包含以下参数的对象: + +- `type` - (必需)控件类型 (*"sort"*) +- `options` - (可选)一个对象数组,定义排序参数。每个对象(*排序选项*)可以指定以下参数: + - `text` - (必需)选项名称,用于排序选择器的下拉列表中 + - `by` - (可选)用于排序卡片的字段键。此参数可以是*字符串*或*函数*。函数需返回用于排序的卡片字段 + - `dir` - (可选)排序顺序。可选值为 *"asc"* 和 *"desc"* + +~~~jsx +items: [ + "sort", // 默认排序控件 + // 其他控件 +] +// 或者 +items: [ + { // 自定义排序控件 + type: "sort", + options: [ + { + text: "按标签排序", + by: "label", + dir: "asc" + }, + { + text: "按描述排序", + by: "description", + dir: "desc" + } + ] + }, {...} // 其他控件 +] +~~~ +::: + +- `"spacer"` - 控件间的空白间隔 +- `"undo"` - 历史管理控件(单击执行一步撤销) +- `"redo"` - 历史管理控件(单击执行一步重做) +- `"addColumn"` - 添加新列的控件 +- `"addRow"` - 添加新行的控件 +- `custom_control` - (可选)自定义控件。此处可指定自定义控件,支持 **字符串** 或 **函数**。详见 [Customization](guides/customization.md#custom-toolbar) 章节 + +### 示例 + +~~~jsx {8-24} +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { + type: "search", + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", + "sort", + "undo", + "redo", + "addColumn", + "addRow" + ] +}); +~~~ + +**更新日志:** + +- 在 v1.3 版本中新增了 *"Undo"* 和 *"Redo"* 控件 +- 在 v1.4 版本中,**sort** 控件的 ***items.options[0].label*** 参数被替换为 ***items.options[0].text*** +- 在 v1.6 版本中,**"search"** 控件新增了 ***items.searchResult*** 参数 + +**相关文档:** [配置](guides/configuration.md#toolbar) 和 [自定义](guides/customization.md#custom-toolbar) + +**相关示例:** +- [看板. 自定义工具栏](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban) +- [看板. 搜索结果中建议项的自定义](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md new file mode 100644 index 0000000..0f35486 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_locale_config.md @@ -0,0 +1,47 @@ +--- +sidebar_label: locale +title: locale 配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解(工具栏)locale 配置。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# locale + +### 描述 + +@short: 可选。工具栏的自定义 locale 对象 + +:::info +**locale** 对象需要包含看板和工具栏的所有标签及其对应的翻译。 +::: + +### 用法 + +~~~jsx {} +locale?: object; +~~~ + +### 默认配置 + +默认情况下,工具栏使用[**英语**](guides/localization.md#default-locale) locale。您也可以设置为自定义的 locale。 + +:::tip +要动态更改当前 locale,可以使用工具栏的[**setLocale()**](api/methods/toolbar_setlocale_method.md)方法。 +::: + +### 示例 + +~~~jsx {8} +// 创建看板 +const board = new kanban.Kanban("#root", { + locale: cn +}); +// 创建工具栏 +new kanban.Toolbar("#toolbar", { + api: board.api, + locale: cn // 将 "cn" locale 应用到工具栏 +}); +~~~ + +**相关文档:** [本地化](guides/localization.md) + +**相关示例:** [看板. 本地化](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md new file mode 100644 index 0000000..2778a64 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/config/toolbar_theme_config.md @@ -0,0 +1,82 @@ +--- +sidebar_label: 主题 +title: 主题配置 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解(工具栏)主题配置。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# 主题 + +### 描述 + +@short: 可选。应用于工具栏的主题 + +### 用法 + +~~~jsx {} +theme?: string; // "material" | "willow" | "willow-dark" +~~~ + +:::important +除了使用 `theme` 属性,您还可以通过向控件容器添加相应的 *css* 类来应用所需的主题: + +- **Material 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow 主题** +~~~html {} + +
+ +
+~~~ + +- **Willow-Dark 主题** +~~~html {} + +
+ +
+~~~ + +或者直接从 skins 文件夹在页面中引入所需主题: + +~~~html {} + +~~~ +::: + +### 默认配置 + +默认情况下,工具栏使用 **Material** 主题。您也可以设置为 **Willow** 和 **Willow-Dark** 主题。 + +:::tip +要动态更改当前主题,可以使用 [**setConfig()**](api/methods/toolbar_setconfig_method.md) 方法。 +::: + +### 示例 + +~~~jsx {5,11} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + theme: "willow-dark" // 初始设置为 "willow-dark" 主题 + // 其他参数 +}); +// 创建工具栏 +new Toolbar("#toolbar", { + api: board.api, + theme: "willow-dark", // 初始设置为 "willow-dark" 主题 +}); +~~~ + +**更新日志:** 该属性在 v1.4 版本中添加 + +**相关文档:** [样式化](guides/stylization.md) + +**相关示例:** [看板。通过 CSS 类更改主题](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md new file mode 100644 index 0000000..01d7234 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: add-card +title: add-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 add-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# add-card + +### 描述 + +@short: 当添加新卡片时触发 + +### 用法 + +~~~jsx {} +"add-card": ({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object, + skipProvider?: boolean, +}) => void; +~~~ + +### 参数 + +**add-card** 事件的回调函数可以接收一个包含以下参数的对象: + +- `columnId` - (必需)目标列的 ID +- `id` - (可选)新卡片的 ID +- `rowId` - (可选)目标行的 ID +- `before` - (可选)新卡片将被放置在该卡片之前的卡片 ID +- `select` - (可选)是否启用/禁用选中新添加的卡片 +- `card` - (可选)新卡片的数据对象。完整的卡片参数列表请参见 [这里](api/config/js_kanban_cards_config.md) +- `skipProvider` - (可选)是否启用/禁用阻止请求发送到服务器 + +:::info +处理内部事件时,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "add-card" 事件 +board.api.on("add-card", (obj) => { + console.log(obj.columnId); +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md new file mode 100644 index 0000000..2551603 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcolumn_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-column +title: add-column 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 add-column 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# add-column + +### 描述 + +@short: 添加新列时触发 + +### 用法 + +~~~jsx {} +"add-column": ({ + id?: string | number, + column?: object, + before?: string | number, + skipProvider?: boolean, +}) => void; +~~~ + +### 参数 + +**add-column** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (可选)新列的 ID +- `column` - (可选)新列的数据对象。完整的 **column** 参数列表可在[**这里**](api/config/js_kanban_columns_config.md)找到 +- `before` - (可选)新列将被插入到此列 ID 之前 +- `skipProvider` - (可选)启用/禁用阻止请求发送到服务器 + +:::info +处理内部事件时,可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "add-column" 事件 +board.api.on("add-column", (obj) => { + console.log(obj.label); +}); +~~~ + +**更新日志**:v1.1 版本新增了 **id**、**before** 和 **column** 参数 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md new file mode 100644 index 0000000..4f38d29 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addcomment_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: add-comment +title: add-comment 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 add-comment 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 免费 30 天评估版本。 +--- + +# add-comment + +### 描述 + +@short: 当添加新评论时触发 + +### 用法 + +~~~jsx {} +"add-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**add-comment** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (可选)新评论的 ID +- `cardId` - (必需)要添加评论的卡片 ID +- `comment` - (必需)新评论的配置对象。您可以在此指定以下参数: + - `text` - (可选)新评论的文本内容 + - `date` - (可选)新评论的日期 + - `html` - (可选)新评论的 HTML 标记。启用 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-类型的参数) 配置中的 `html` 属性,以显示 HTML 标记而非文本 +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +要处理内部事件,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "add-comment" 事件 +board.api.on("add-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**更新日志:** 该事件自 v1.4 版本起添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md new file mode 100644 index 0000000..439b70a --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addlink_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: add-link +title: add-link 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 add-link 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# add-link + +### 描述 + +@short: 添加新链接时触发 + +### 用法 + +~~~jsx {} +"add-link": ({ + id?: string | number, + link: object, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**add-link** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (可选)新链接的 ID +- `link` - (必需)新链接的数据对象。链接参数的完整列表请参见 [这里](api/config/js_kanban_links_config.md) +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +处理内部事件时,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {8-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// 订阅 "add-link" 事件 +board.api.on("add-link", (obj) => { + console.log(obj.link.masterId); +}); +~~~ + +**更新日志:** 该事件在 v1.4 中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md new file mode 100644 index 0000000..9b54bc2 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addrow_event.md @@ -0,0 +1,51 @@ +--- +sidebar_label: add-row +title: add-row 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 add-row 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# add-row + +### 描述 + +@short: 当添加新行时触发 + +### 用法 + +~~~jsx {} +"add-row": ({ + id?: string | number, + row?: object, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**add-row** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (可选)新行的 ID +- `row` - (可选)新行的数据对象。完整的 **row** 参数列表可以在[**这里**](api/config/js_kanban_rows_config.md)找到 +- `before` - (可选)新行将被插入到该 ID 行之前 +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +处理内部事件时,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "add-row" 事件 +board.api.on("add-row", (obj) => { + console.log(obj.id); +}); +~~~ + +**更新日志**:在 v1.1 版本中添加了 **id**、**before** 和 **row** 参数 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md new file mode 100644 index 0000000..1324b09 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_addvote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: 添加投票 +title: add-vote 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 add-vote 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# add-vote + +### 描述 + +@short: 当用户添加新投票时触发 + +### 用法 + +~~~jsx {} +"add-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**add-vote** 事件的回调函数可以接收一个包含以下参数的对象: + +- `cardId` - (必需)要添加投票的卡片 ID +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +要处理内部事件,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "add-vote" 事件 +board.api.on("add-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**更新日志:** 该事件在 v1.4 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md new file mode 100644 index 0000000..b0f307d --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-card +title: delete-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 delete-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# delete-card + +### 描述 + +@short: 当删除卡片时触发 + +### 用法 + +~~~jsx {} +"delete-card": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-card** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要删除的卡片 ID +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +处理内部事件时,可以使用 [**Event Bus 方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "delete-card" 事件 +board.api.on("delete-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md new file mode 100644 index 0000000..5a90812 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecolumn_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-column +title: delete-column 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 delete-column 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# delete-column + +### 描述 + +@short: 当删除列时触发 + +### 用法 + +~~~jsx {} +"delete-column": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-column** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要删除的列的 ID +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +处理内部事件时,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "delete-column" 事件 +board.api.on("delete-column", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md new file mode 100644 index 0000000..925eb14 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletecomment_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: delete-comment +title: delete-comment 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 delete-comment 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# delete-comment + +### 描述 + +@short: 当删除卡片评论时触发 + +### 用法 + +~~~jsx {} +"delete-comment": ({ + id?: string | number, + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-comment** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (可选)要删除的评论 ID +- `cardId` - (必需)包含要删除评论的卡片 ID +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +若需处理内部事件,您可以使用 [**Event Bus 方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "delete-comment" 事件 +board.api.on("delete-comment", (obj) => { + console.log(obj.id); +}); +~~~ + +**更新日志:** 该事件自 v1.4 版本起添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md new file mode 100644 index 0000000..37fd0c7 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletelink_event.md @@ -0,0 +1,48 @@ +--- +sidebar_label: delete-link +title: delete-link 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 delete-link 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# delete-link + +### 描述 + +@short: 在删除链接时触发 + +### 用法 + +~~~jsx {} +"delete-link": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-link** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要删除的链接的 ID +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +要处理内部事件,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {8-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + links +}); +// 订阅 "delete-link" 事件 +board.api.on("delete-link", (obj) => { + console.log(obj.id); +}); +~~~ + +**更新日志:** 该事件在 v1.4 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md new file mode 100644 index 0000000..05dd86f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deleterow_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: delete-row +title: delete-row 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 delete-row 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# delete-row + +### 描述 + +@short: 在删除行时触发 + +### 用法 + +~~~jsx {} +"delete-row": ({ + id: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-row** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要删除的行的 ID +- `skipProvider` - (可选)启用/禁用阻止请求发送到服务器 + +:::info +要处理内部事件,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "delete-row" 事件 +board.api.on("delete-row", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md new file mode 100644 index 0000000..ecddbc8 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_deletevote_event.md @@ -0,0 +1,47 @@ +--- +sidebar_label: delete-vote +title: delete-vote 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 delete-vote 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# delete-vote + +### 描述 + +@short: 当用户从卡片中删除投票时触发 + +### 用法 + +~~~jsx {} +"delete-vote": ({ + cardId: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**delete-vote** 事件的回调函数可以接收一个包含以下参数的对象: + +- `cardId` - (必需)要删除投票的卡片 ID +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +要处理内部事件,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "delete-vote" 事件 +board.api.on("delete-vote", (obj) => { + console.log(obj.cardId); +}); +~~~ + +**更新日志:** 该事件于 v1.4 版本添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md new file mode 100644 index 0000000..9553979 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_dragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: drag-card +title: drag-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 drag-card 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX 看板的 30 天试用版。 +--- + +# drag-card + +### 描述 + +@short: 当通过拖放移动卡片时触发 + +### 用法 + +~~~jsx {} +"drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source: array +}) => void; +~~~ + +### 参数 + +**drag-card** 事件的回调函数可接收一个包含以下参数的对象: + +- `id` - (必需)被拖动卡片的 ID +- `columnId` - (必需)卡片当前所在列的 ID +- `rowId` - (可选)卡片当前所在行的 ID +- `before` - (可选)卡片在列中当前位于被拖动卡片之后的卡片 ID +- `source` - (可选)被移动卡片 ID 的数组 + +:::info +处理内部事件时,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "drag-card" 事件 +board.api.on("drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**更新日志:** 该事件自 v1.4 版本起添加 + +**相关示例:** [看板。禁用特定列的拖放功能](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md new file mode 100644 index 0000000..93dc963 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_duplicatecard_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: duplicate-card +title: duplicate-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 duplicate-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# duplicate-card + +### 描述 + +@short: 在复制卡片时触发 + +### 用法 + +~~~jsx {} +"duplicate-card": ({ + id: string | number, + card?: object, + select?: boolean +}) => void; +~~~ + +### 参数 + +**duplicate-card** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要复制的卡片的 ID +- `card` - (可选)新卡片的数据对象。卡片参数的完整列表请参见 [这里](api/config/js_kanban_cards_config.md) +- `select` - (可选)启用或禁用新添加卡片的选中状态 + +:::info +要处理内部事件,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "duplicate-card" 事件 +board.api.on("duplicate-card", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** `select` 参数在 v1.5.10 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md new file mode 100644 index 0000000..f10226a --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_enddragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: end-drag-card +title: end-drag-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 end-drag-card 事件。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# end-drag-card + +### 描述 + +@short: 当停止拖动卡片时触发 + +### 用法 + +~~~jsx {} +"end-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### 参数 + +**end-drag-card** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)被拖动卡片的 ID +- `columnId` - (必需)卡片当前所在列的 ID +- `rowId` - (可选)卡片当前所在行的 ID +- `before` - (可选)当前位于拖动卡片之后的卡片 ID +- `source` - (可选)被移动卡片 ID 组成的数组 + +:::info +处理内部事件时,可以使用 [**Event Bus 方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "end-drag-card" 事件 +board.api.on("end-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**更新日志:** 该事件在 v1.4 版本中添加 + +**相关示例:** [看板。禁用特定列的拖放](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md new file mode 100644 index 0000000..312b0a2 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecard_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: move-card +title: move-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 move-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# move-card + +### 描述 + +@short: 在移动卡片时触发 + +### 用法 + +~~~jsx {} +"move-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**move-card** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)将被移动的卡片的 ID +- `columnId` - (必需)卡片将被放置到的列的 ID +- `rowId` - (可选)卡片将被放置到的行的 ID +- `before` - (可选)新卡片将被放置在其前面的卡片的 ID +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +处理内部事件时,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "move-card" 事件 +board.api.on("move-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**相关示例:** [Kanban. 禁用特定列的拖放功能](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md new file mode 100644 index 0000000..13867f4 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_movecolumn_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: move-column +title: move-column 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 move-column 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# move-column + +### 描述 + +@short: 当移动列时触发 + +### 用法 + +~~~jsx {} +"move-column": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**move-column** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要移动的列的 ID +- `before` - (可选)指定移动列将被放置在其前面的列的 ID。如果未指定 `before` 参数,列将被放置在看板的末尾 +- `skipProvider` - (可选)启用或禁用防止请求发送到服务器 + +:::info +要处理内部事件,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "move-column" 事件 +board.api.on("move-column", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** 此事件在 v1.1 中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md new file mode 100644 index 0000000..0f37417 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_moverow_event.md @@ -0,0 +1,50 @@ +--- +sidebar_label: move-row +title: move-row 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 move-row 事件。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# move-row + +### 描述 + +@short: 当移动行时触发 + +### 用法 + +~~~jsx {} +"move-row": ({ + id: string | number, + before?: string | number, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**move-row** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要移动的行的 ID +- `before` - (可选)移动的行将被放置在该行之前的行的 ID。如果未指定 `before` 参数,行将被放置在看板的末尾 +- `skipProvider` - (可选)启用/禁用阻止请求发送到服务器 + +:::info +处理内部事件时,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {8-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 订阅 "move-row" 事件 +board.api.on("move-row", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** 此事件在 v1.1 中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md new file mode 100644 index 0000000..9882b8f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_redo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: 重做 +title: redo 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 redo 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# redo + +### 描述 + +@short: 当重复执行被撤销操作时触发 + +### 用法 + +~~~jsx {} +"redo": () => void; +~~~ + +:::info +要处理内部事件,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "redo" 事件 +board.api.on("redo", () => { + console.log("redo operation"); +}); +~~~ + +**更新日志**:该事件在 v1.7 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md new file mode 100644 index 0000000..81b58ba --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_scroll_event.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll +title: scroll 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 scroll 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# scroll + +### 描述 + +@short: 当滚动到指定元素时触发 + +### 用法 + +~~~jsx {} +"scroll": ({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}) => void; +~~~ + +### 参数 + +**scroll** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)目标元素的 ID +- `to` - (必需)目标元素的类型。可选值为 *"column"*、*"row"* 和 *"card"* +- `options` - (可选)滚动选项对象。完整的滚动参数列表请参见 [这里](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +:::info +若需处理内部事件,可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "scroll" 事件 +board.api.on("scroll", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** 该事件在 v1.2 版本中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md new file mode 100644 index 0000000..e7fb760 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_selectcard_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: select-card +title: select-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 select-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# select-card + +### 描述 + +@short: 当选择卡片时触发 + +### 用法 + +~~~jsx {} +"select-card": ({ + id: string | number, + groupMode?: boolean +}) => void; +~~~ + +### 参数 + +**select-card** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)被选中卡片的 ID +- `groupMode` - (可选)多选模式(默认值为 false) + +:::info +处理内部事件时,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "select-card" 事件 +board.api.on("select-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md new file mode 100644 index 0000000..6efed03 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_setedit_event.md @@ -0,0 +1,52 @@ +--- +sidebar_label: set-edit +title: set-edit 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 set-edit 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# set-edit + +### 描述 + +@short: 在切换编辑器时触发 + +### 用法 + +~~~jsx {} +"set-edit": ({ cardId: string | number, eventSource?: "select-card" } | null) => void; +~~~ + +### 参数 + +**set-edit** 事件的回调函数可以接受 *null* 值,或者包含以下参数的对象: + +- `cardId` - (必需)要编辑的卡片 ID +- `eventSource` - (可选)触发 ***set-edit*** 事件的 ***"select-card"*** 操作 + +:::note +当关闭编辑器时,使用 ***null*** 值 +::: + +:::info +处理内部事件时,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 当用户单击卡片时,阻止编辑 +board.api.intercept("set-edit", (ev) => { + return ev?.eventSource != "select-card"; +}); +~~~ + +**更新日志:** + - 该事件在 v1.2 版本中添加 + - ***eventSource*** 参数在 v1.6 版本中添加 + +**相关示例:** [Kanban. 通过双击任务打开编辑器](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md new file mode 100644 index 0000000..3e9160a --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsearch_event.md @@ -0,0 +1,45 @@ +--- +sidebar_label: set-search +title: set-search 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 set-search 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# set-search + +### 描述 + +@short: 在搜索卡片时触发 + +### 用法 + +~~~jsx {} +"set-search": ({ + value: string, + by?: string +}) => void; +~~~ + +### 参数 + +**set-search** 事件的回调函数可以接收一个包含以下参数的对象: + +- `value` - (必需)要搜索的值 +- `by` - (可选)用于搜索的卡片字段 + +:::info +如需处理内部事件,可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "set-search" 事件 +board.api.on("set-search", (obj) => { + console.log(obj.value); +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md new file mode 100644 index 0000000..cfe21b0 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_setsort_event.md @@ -0,0 +1,53 @@ +--- +sidebar_label: set-sort +title: set-sort 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 set-sort 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# set-sort + +### 描述 + +@short: 当卡片排序时触发 + +### 用法 + +~~~jsx {} +"set-sort": ( + { + by?: string | ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +) => void; +~~~ + +### 参数 + +**set-sort** 事件的回调函数可以接受 *null* 值或包含以下参数的对象: + +- `by` - (可选)用于排序的卡片字段(*string* 或 *function*) +- `dir` - (可选)排序顺序。可选值为 *"asc"* 和 *"desc"* +- `preserve` - (可选)启用或禁用排序状态的保留 +- `columnId` - (可选)要排序的列的 ID + +:::info +处理内部事件时,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "set-sort" 事件 +board.api.on("set-sort", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志:** 该事件在 v1.2 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md new file mode 100644 index 0000000..5bdaa25 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_startdragcard_event.md @@ -0,0 +1,55 @@ +--- +sidebar_label: start-drag-card +title: start-drag-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 start-drag-card 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# start-drag-card + +### 描述 + +@short: 当开始拖动卡片时触发 + +### 用法 + +~~~jsx {} +"start-drag-card": ({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number, + source?: array +}) => void; +~~~ + +### 参数 + +**start-drag-card** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)被拖动卡片的 ID +- `columnId` - (必需)卡片当前所在列的 ID +- `rowId` - (可选)卡片当前所在行的 ID +- `before` - (可选)当前位于被拖动卡片之后的卡片 ID +- `source` - (可选)被移动卡片 ID 组成的数组 + +:::info +要处理内部事件,您可以使用 [**Event Bus 方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "start-drag-card" 事件 +board.api.on("start-drag-card", (obj) => { + console.log(obj.columnId); +}); +~~~ + +**更新日志:** 该事件自 v1.4 版本起添加 + +**相关示例:** [Kanban. 禁用对特定列的拖放](https://snippet.dhtmlx.com/nfv59yif?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md new file mode 100644 index 0000000..ce923de --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_undo_event.md @@ -0,0 +1,37 @@ +--- +sidebar_label: undo +title: undo 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 undo 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# undo + +### 描述 + +@short: 当撤销看板中的最后一次操作时触发 + +### 用法 + +~~~jsx {} +"undo": () => void; +~~~ + +:::info +处理内部事件时,您可以使用 [**Event Bus 方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "undo" 事件 +board.api.on("undo", () => { + console.log("撤销操作"); +}); +~~~ + +**更新日志**:该事件在 v1.7 中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md new file mode 100644 index 0000000..ee389ec --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_unselectcard_event.md @@ -0,0 +1,41 @@ +--- +sidebar_label: unselect-card +title: unselect-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 unselect-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# unselect-card + +### 描述 + +@short: 当取消选择卡片时触发 + +### 用法 + +~~~jsx {} +"unselect-card": ({ id: string | number }) => void; +~~~ + +### 参数 + +**unselect-card** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要取消选择的卡片的 ID + +:::info +处理内部事件时,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "unselect-card" 事件 +board.api.on("unselect-card", (obj) => { + console.log(obj.id); +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md new file mode 100644 index 0000000..6d83ab3 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecard_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-card +title: update-card 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 update-card 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# update-card + +### 描述 + +@short: 当更新卡片数据时触发 + +### 用法 + +~~~jsx {} +"update-card": ({ + id: string | number, + card?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**update-card** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要更新的卡片 ID +- `card` - (可选)卡片的新数据对象。**card** 参数的完整列表请参见 [**这里**](api/config/js_kanban_cards_config.md) +- `replace` - (可选)启用/禁用完全替换数据 + + :::note + 如果将 `replace` 参数设置为 *true*,旧数据将被新数据完全替换。否则,该方法仅更新您传入的值。 + ::: + +- `skipProvider` - (可选)启用/禁用阻止请求发送到服务器 + +:::info +要处理内部事件,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "update-card" 事件 +board.api.on("update-card", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志**: +- **id** 和 **card** 参数在 v1.1 版本中添加 +- **replace** 参数在 v1.3 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md new file mode 100644 index 0000000..87d2428 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecolumn_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-column +title: update-column 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 update-column 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版本的 DHTMLX 看板。 +--- + +# update-column + +### 描述 + +@short: 当更新列数据时触发 + +### 用法 + +~~~jsx {} +"update-column": ({ + id: string | number, + column?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**update-column** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要更新的列的 ID +- `column` - (可选)列的新数据对象。完整的 **column** 参数列表可以在[**这里**](api/config/js_kanban_columns_config.md)找到 +- `replace` - (可选)启用/禁用完全替换数据 + + :::note + 如果将 `replace` 参数设置为 *true*,旧数据将被新数据完全替换。否则,该方法只会更新您传入的值。 + ::: + +- `skipProvider` - (可选)启用/禁用阻止请求发送到服务器 + +:::info +处理内部事件时,您可以使用[**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "update-column" 事件 +board.api.on("update-column", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志**: +- **id** 和 **column** 参数在 v1.1 版本中添加 +- **replace** 参数在 v1.3 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md new file mode 100644 index 0000000..be3a93d --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updatecomment_event.md @@ -0,0 +1,62 @@ +--- +sidebar_label: update-comment +title: update-comment 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 update-comment 事件。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 免费的 30 天试用版。 +--- + +# update-comment + +### 描述 + +@short: 当更新评论时触发 + +### 用法 + +~~~jsx {} +"update-comment": ({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + }, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**update-comment** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (可选)要更新的评论的 ID +- `cardId` - (必需)将要更新评论的卡片 ID +- `comment` - (必需)要更新的评论的配置对象。您可以在此指定以下参数: + - `id` - (可选)已更新评论的 ID + - `cardId` - (可选)已更新评论将被添加到的卡片 ID + - `text` - (可选)已更新评论的文本内容 + - `date` - (可选)已更新评论的日期 + - `html` - (可选)已更新评论的 HTML 标记。启用 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-类型的参数) 配置中的 `html` 属性,以显示 HTML 标记而非纯文本 +- `skipProvider` - (可选)启用或禁用阻止请求发送到服务器 + +:::info +处理内部事件时,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "update-comment" 事件 +board.api.on("update-comment", (obj) => { + console.log(obj.comment); +}); +~~~ + +**更新日志:** 该事件自 v1.4 版本起添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md new file mode 100644 index 0000000..88052b7 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/events/js_kanban_updaterow_event.md @@ -0,0 +1,58 @@ +--- +sidebar_label: update-row +title: update-row 事件 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 update-row 事件。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# update-row + +### 描述 + +@short: 当更新行数据时触发 + +### 用法 + +~~~jsx {} +"update-row": ({ + id: string | number, + row?: object, + replace?: boolean, + skipProvider?: boolean +}) => void; +~~~ + +### 参数 + +**update-row** 事件的回调函数可以接收一个包含以下参数的对象: + +- `id` - (必需)要更新的行的 ID +- `row` - (可选)行的新数据对象。完整的 **row** 参数列表请参见 [**这里**](api/config/js_kanban_rows_config.md) +- `replace` - (可选)启用/禁用完全替换数据 + + :::note + 如果将 `replace` 参数设置为 *true*,旧数据将被新数据完全替换。否则,方法只会更新您传入的值。 + ::: + +- `skipProvider` - (可选)启用/禁用阻止请求发送到服务器 + +:::info +处理内部事件时,您可以使用 [**事件总线方法**](api/overview/main_overview.md/#event-bus-methods) +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 订阅 "update-row" 事件 +board.api.on("update-row", (obj) => { + console.log(obj); +}); +~~~ + +**更新日志**: +- **id** 和 **row** 参数在 v1.1 中新增 +- **replace** 参数在 v1.3 中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md new file mode 100644 index 0000000..3442ef2 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_detach_method.md @@ -0,0 +1,39 @@ +--- +sidebar_label: api.detach() +title: detach 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 detach 方法。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# api.detach() + +## 描述 + +@short: 允许移除/分离事件监听器 + +## 用法 + +~~~jsx +api.detach(tag: number | string | symbol ): void; +~~~ + +## 参数 + +- `tag` - 用于在创建事件处理程序时标识该处理程序的标签 + +### 示例 + +~~~jsx {11} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +board.api.on("move-card", ({ id, columnId }) => { + console.log("Move the card"); +}, { tag: "move" }); + +board.api.detach("move"); +~~~ + +**更新日志**:该内部方法自 v1.7 版本起添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md new file mode 100644 index 0000000..c973449 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_exec_method.md @@ -0,0 +1,50 @@ +--- +sidebar_label: api.exec() +title: exec 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 exec 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并免费下载 DHTMLX 看板的30天评估版本。 +--- + +# api.exec() + +### 描述 + +@short: 允许触发内部事件 + +### 用法 + +~~~jsx {} +api.exec( + event: string, + config: object +): void; +~~~ + +### 参数 + +- `event` - (必需)要触发的事件 +- `config` - (必需)包含参数的配置对象(具体参数请参见要触发的事件) + +### 事件 + +:::info +完整的看板内部事件列表可在[**这里**](api/overview/main_overview.md/#kanban-events)查看 +::: + +### 示例 + +~~~jsx {7,9-12} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 选择 ID 为 1 的卡片 +board.api.exec("select-card", { id: 1 }); +// 添加新卡片,但不向服务器发送更改 +board.api.exec("add-card", { + columnId: "backlog", + skipProvider: true, +}); +~~~ + +**相关示例:** [Kanban. 保持排序](https://snippet.dhtmlx.com/74nyuv14?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md new file mode 100644 index 0000000..9188527 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getreactivestate_method.md @@ -0,0 +1,104 @@ +--- +sidebar_label: api.getReactiveState() +title: getReactiveState 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getReactiveState 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX 看板的 30 天试用版。 +--- + +# api.getReactiveState() + +### 描述 + +@short: 获取包含看板响应式属性的对象 + +### 用法 + +~~~jsx {} +api.getReactiveState(): object; +~~~ + +### 返回值 + +该方法返回一个包含以下参数的对象: + +~~~jsx {} +{ + cardHeight: {...}, + cardShape: {...}, + cards: {...}, + columnKey: {...}, + columnShape: {...}, + columns: {...}, + currentUser: {...}, + history: {...}, + links: {...}, + readonly: {...}, + rowKey: {...}, + rowShape: {...}, + editorShape: {...}, + rows: {...}, + search: {...}, + selected: {...}, + sort: {...}, + + // 移除的参数 + /* + fromAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + overAreaMeta: {...}, + before: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + overAreaId: {...}, + /* + + // 私有参数 + /* + edit -> _edit: {...}, + layout -> layout: {...}, + cardsMap -> _cardsMap: {...}, + cardsMeta -> _cardsMeta: {...}, + areasMeta -> _areasMeta: {...}, + scroll -> _scroll: {...}, + */ +} +~~~ + +:::warning +这些状态属性是只读的。请勿修改它们,以避免出现意外行为! +::: + +### 示例 + +~~~jsx {7-37} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 获取看板的响应式状态 +const state = board.api.getReactiveState(); + +// 订阅 columns 变化并输出 columns 数组 +state.columns.subscribe((data) => { + console.log(data); +}); + +// 订阅 cards 变化并输出 cards 数组 +state.cards.subscribe((data) => { + console.log(data); +}); + +// 订阅 rows 变化并输出 rows 数组 +state.rows.subscribe((data) => { + console.log(data); +}); + +// 订阅卡片选择变化并输出选中卡片的 ID +state.selected.subscribe((data) => { + console.log(data); +}); +~~~ + +**更新日志:** 此方法在 v1.7 版本中进行了更新 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md new file mode 100644 index 0000000..391a699 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstate_method.md @@ -0,0 +1,89 @@ +--- +sidebar_label: api.getState() +title: getState 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getState 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# api.getState() + +### 描述 + +@short: 获取包含 Kanban StateStore 属性的对象 + +### 用法 + +~~~jsx {} +api.getState(): object; +~~~ + +### 返回值 + +该方法返回一个包含以下参数的对象: + +~~~jsx {} +{ + cardHeight: number | null, + cards: array, + cardShape: object, + columnKey: string, + columns: array, + columnShape: object, + currentUser: number | string | null, + links: array, + readonly: object, + rowKey: string, + rows: array, + rowShape: object, + editorShape: array, + history: object, + search: object, + selected: array, + sort: object, + + // 移除的参数 + /* + fromAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, + before: string | number, + dragItemId: string | number, + dragItemsCoords: array, + overAreaId: string | number, + /* + + // 私有参数 + /* + edit -> _edit: object, + layout -> layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object, + */ +} +~~~ + +:::warning +这些状态属性是只读的。请勿修改它们,以避免出现意外行为! +::: + +### 示例 + +~~~jsx {7-12} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 获取 Kanban 的状态 +const state = board.api.getState(); +console.log(state.cards); // 输出卡片数据 +console.log(state.columns); // 输出列数据 +console.log(state.rows); // 输出行数据 +console.log(state.cardShape); // 输出卡片配置 +//... +~~~ + +**更新日志:** 该方法在 v1.7 版本中进行了更新 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md new file mode 100644 index 0000000..ca2e05c --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_getstores_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: api.getStores() +title: getStores 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getStores 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# api.getStores() + +### 描述 + +@short: 获取包含看板 DataStore 属性的对象 + +### 用法 + +~~~jsx {} +api.getStores(): object; +~~~ + +### 返回值 + +该方法返回一个包含 **DataStore** 参数的对象: + +~~~jsx {} +{ + data: DataStore // (参数对象) +} +~~~ + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 获取看板的 DataStore 对象 +const store = board.api.getStores(); +console.log(store); +~~~ + +**更新日志:** 该方法在 v1.2 版本中进行了更新 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md new file mode 100644 index 0000000..9f21649 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_intercept_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: api.intercept() +title: intercept 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 intercept 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# api.intercept() + +### 描述 + +@short: 允许拦截并阻止内部事件的触发 + +### 用法 + +~~~jsx {} +api.intercept( + event: string, + callback: function, + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### 参数 + +- `event` - (必需)要触发的事件 +- `callback` - (必需)要执行的回调函数(回调参数取决于触发的事件) +- `config` - (可选)一个对象,包含以下参数: + - `intercept` - (可选)如果在事件监听器创建时设置了 `intercept: true`,该事件监听器将在所有其他监听器之前执行 + - `tag` - (可选)动作标签。您可以使用标签名称通过 [`detach`](api/internal/js_kanban_detach_method.md) 方法移除动作处理器 + +### 事件 + +:::info +完整的看板内部事件列表请见[**这里**](api/overview/main_overview.md/#kanban-events) +::: + +### 示例 + +~~~jsx {7-11} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 禁止将卡片移动到 ID 为 "done" 的列 +board.api.intercept("move-card", ({ id, columnId }) => { + if(columnId !== "done" ){ + return false; + } +}, {tag: "move"}); +~~~ + +**更新日志**:**config.tag** 和 **config.intercept** 参数于 v1.7 版本中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md new file mode 100644 index 0000000..b567f90 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_json_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: export.json() +title: json 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 json 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# export.json() + +### 描述 + +@short: 将看板数据导出为 JSON 文件 + +### 用法 + +~~~jsx {} +export.json(): void; +~~~ + +:::info +该方法将看板的数据导出为具有以下结构的 JSON 文件: +~~~jsx {} +{ + "cards": [], + "columns": [], + "rows": [] +} +~~~ +::: + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 导出看板数据为 JSON +board.export.json(); // => { "cards": [...], "columns": [...], "rows": [] } +~~~ + +**更新日志:** 该方法在 v1.3 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md new file mode 100644 index 0000000..d05987b --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_on_method.md @@ -0,0 +1,51 @@ +--- +sidebar_label: api.on() +title: on 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 on 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# api.on() + +### 描述 + +@short: 允许附加处理程序到内部事件 + +### 用法 + +~~~jsx {} +api.on( + event: string, + handler: function + config?: { intercept?: boolean, tag?: number | string | symbol } +): void; +~~~ + +### 参数 + +- `event` - (必填)要触发的事件 +- `handler` - (必填)要附加的处理程序(处理程序的参数将根据触发的事件而定) +- `config` - (可选)一个包含以下参数的对象: + - `intercept` - (可选)如果在事件监听器创建时设置了 `intercept: true`,则该事件监听器将在所有其他监听器之前运行 + - `tag` - (可选)动作标签。您可以使用标签名称通过 [`detach`](api/internal/js_kanban_detach_method.md) 方法移除动作处理程序 + +### 事件 + +:::info +完整的看板内部事件列表可在[**这里**](api/overview/main_overview.md/#kanban-events)查看 +::: + +### 示例 + +~~~jsx {7-9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 当卡片移动时在控制台输出卡片数据 +board.api.on("move-card", ({ id, columnId }) => { + console.log({ id, columnId }); +}, {tag: "move"}); +~~~ + +**更新日志**:`config.tag` 和 `config.intercept` 参数在 v1.7 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md new file mode 100644 index 0000000..66e7285 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/internal/js_kanban_setnext_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: api.setNext() +title: setNext 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 setNext 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# api.setNext() + +### 描述 + +@short: 允许将某个操作添加到事件总线(Event Bus)的执行顺序中 + +### 用法 + +~~~jsx {} +api.setNext(next: any): void; +~~~ + +### 参数 + +- `next` - (必需)要包含在**事件总线**执行顺序中的操作 + +### 示例 + +~~~jsx {15} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row" + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +您需要将 **RestDataProvider** 包含到**事件总线**的执行顺序中,以便对数据执行操作(如**添加**、**删除**等)并向服务器发送相应请求 +::: \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md new file mode 100644 index 0000000..73d4c7d --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcard_method.md @@ -0,0 +1,57 @@ +--- +sidebar_label: addCard() +title: addCard 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 addCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# addCard() + +### 描述 + +@short: 向看板中添加一个新卡片 + +### 用法 + +~~~jsx {} +addCard({ + columnId: string | number, + id?: string | number, + rowId?: string | number, + before?: string | number, + select?: boolean, + card?: object +}): void; +~~~ + +### 参数 + +- `columnId` - (必填)目标列的 ID +- `id` - (可选)新卡片的 ID +- `rowId` - (可选)目标行的 ID +- `before` - (可选)新卡片将被放置在该卡片 ID 之前 +- `select` - (可选)是否选中新添加的卡片 +- `card` - (可选)新卡片的数据对象 + +:::info +完整的 **card** 参数列表请见 [**这里**](api/config/js_kanban_cards_config.md) +::: + +### 示例 + +~~~jsx {7-12} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 向 "backlog" 列添加新卡片 +board.addCard({ + id: 1, + columnId: "backlog", + card: { label: "New card" } +}); +~~~ + +:::tip +您也可以在 **card** 对象中指定新卡片的 ID +::: \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md new file mode 100644 index 0000000..184a013 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcolumn_method.md @@ -0,0 +1,54 @@ +--- +sidebar_label: addColumn() +title: addColumn 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 addColumn 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版。 +--- + +# addColumn() + +### 描述 + +@short: 向看板中添加一个新列 + +### 用法 + +~~~jsx {} +addColumn({ + id?: string | number, + column?: object, + before?: string | number +}): void; +~~~ + +### 参数 + +- `id` - (可选)新列的 ID +- `column` - (可选)新列的数据对象 +- `before` - (可选)指定新列将插入到哪个列之前的 ID + +:::info +完整的 **column** 参数列表请参见 [**这里**](api/config/js_kanban_columns_config.md) +::: + +### 示例 + +~~~jsx {7-16} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 添加新列 +board.addColumn({ + id: "extra_column", + column: { + label: "Extra column", + limit: 2, + strictLimit: 2, + collapsed: true + }, + before: "column_2" +}); +~~~ + +**更新日志**:从 v1.1 版本开始,新增了 **id**、**column** 和 **before** 参数 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md new file mode 100644 index 0000000..e5251a7 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addcomment_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: addComment() +title: addComment 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 addComment 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# addComment() + +### 描述 + +@short: 通过卡片的 ID 向指定卡片添加新的评论 + +### 用法 + +~~~jsx {} +addComment({ + id?: string | number, + cardId: string | number, + comment: { + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### 参数 + +- `id` - (可选)新评论的 ID +- `cardId` - (必填)要添加评论的卡片 ID +- `comment` - (必填)新评论的配置对象。您可以在此指定以下参数: + - `text` - (可选)新评论的文本内容 + - `date` - (可选)新评论的日期 + - `html` - (可选)新评论的 HTML 标记。启用 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-类型的参数) 配置中的 `html` 属性,以显示 HTML 标记而非文本 + +### 示例 + +~~~jsx {7-15} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 添加新评论 +board.addComment({ + id: 1, + cardId: 1, + comment: { + text: "", + date: new Date("01/07/2021"), + html: "重要评论" + } +}); +~~~ + +**更新日志:** 此方法自 v1.4 版本起添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md new file mode 100644 index 0000000..16ade0f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addlink_method.md @@ -0,0 +1,46 @@ +--- +sidebar_label: addLink() +title: addLink 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 addLink 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# addLink() + +### 描述 + +@short: 在看板中添加一个新的链接 + +### 用法 + +~~~jsx {} +addLink({ + id?: string | number, + link: object +}): void; +~~~ + +### 参数 + +- `id` - (可选)新链接的 ID +- `link` - (必填)新链接的数据对象。链接参数的完整列表可以在[这里](api/config/js_kanban_links_config.md)找到 + +### 示例 + +~~~jsx {7-14} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 添加新链接 +board.addLink({ + id: 3, + link: { + source: 4, + target: 6, + relation: "relatesTo", + } +}); +~~~ + +**更新日志:** 该方法在 v1.5 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md new file mode 100644 index 0000000..6c9882e --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_addrow_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: addRow() +title: addRow 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 addRow 方法。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# addRow() + +### 描述 + +@short: 在看板中添加一行新行 + +### 用法 + +~~~jsx {} +addRow({ + id?: string | number, + row?: object, + before?: string | number +}): void; +~~~ + +### 参数 + +- `id` - (可选)新行的 ID +- `row` - (可选)新行的数据对象 +- `before` - (可选)新行将被插入到该行 ID 之前 + +:::info +完整的 **row** 参数列表请参见 [**这里**](api/config/js_kanban_rows_config.md) +::: + +### 示例 + +~~~jsx {8-15} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 添加新行 +board.addRow({ + id: "extra_row", + row: { + label: "Extra row", + collapsed: false + }, + before: "row_2" +}); +~~~ + +**更新日志**:参数 **id**、**row** 和 **before** 于 v1.1 版本新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md new file mode 100644 index 0000000..d962874 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecard_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteCard() +title: deleteCard 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 deleteCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# deleteCard() + +### 描述 + +@short: 从看板的数据存储中移除指定的卡片 + +### 用法 + +~~~jsx {} +deleteCard({ id: string | number }): void; +~~~ + +### 参数 + +- `id` - (必填)要删除的卡片的 ID + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 通过卡片 ID 删除卡片 +board.deleteCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md new file mode 100644 index 0000000..d35895f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecolumn_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteColumn() +title: deleteColumn 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 deleteColumn 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# deleteColumn() + +### 描述 + +@short: 从看板的数据存储中移除指定的列 + +### 用法 + +~~~jsx {} +deleteColumn({ id: string | number }): void; +~~~ + +### 参数 + +- `id` - (必填)要删除的列的 ID + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 通过列的 id 删除列 +board.deleteColumn({ id: "backlog" }); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md new file mode 100644 index 0000000..4ff3049 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletecomment_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: deleteComment() +title: deleteComment 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 deleteComment 方法。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# deleteComment() + +### 描述 + +@short: 通过 ID 删除卡片评论 + +### 用法 + +~~~jsx {} +deleteComment({ + id: string | number, + cardId: string | number +}): void; +~~~ + +### 参数 + +- `id` - (必填)要删除的评论的 ID +- `cardId` - (必填)包含要删除评论的卡片的 ID + +### 示例 + +~~~jsx {7-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 删除评论 +board.deleteComment({ + id: 1, + cardId: 1, +}); +~~~ + +**更新日志:** 该方法在 v1.4 版本中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md new file mode 100644 index 0000000..04e17d3 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deletelink_method.md @@ -0,0 +1,36 @@ +--- +sidebar_label: deleteLink() +title: deleteLink 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 deleteLink 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# deleteLink() + +### 描述 + +@short: 从看板的数据存储中移除指定的链接 + +### 用法 + +~~~jsx {} +deleteLink({ id: string | number }): void; +~~~ + +### 参数 + +- `id` - (必需)要删除的链接的 ID + +### 示例 + +~~~jsx {8} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + links, +}); +// 通过链接的 ID 删除链接 +board.deleteLink({ id: 5 }); +~~~ + +**更新日志:** 此方法自 v1.5 版本起添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md new file mode 100644 index 0000000..4383324 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_deleterow_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: deleteRow() +title: deleteRow 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 deleteRow 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# deleteRow() + +### 描述 + +@short: 从 Kanban 的数据存储中移除指定的行 + +### 用法 + +~~~jsx {} +deleteRow({ id: string | number }): void; +~~~ + +### 参数 + +- `id` - (必需)要删除的行的 ID + +### 示例 + +~~~jsx {7} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 通过 ID 删除行 +board.deleteRow({ id: "feature" }); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md new file mode 100644 index 0000000..011d368 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_destructor_method.md @@ -0,0 +1,29 @@ +--- +sidebar_label: destructor() +title: destructor 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 destructor 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载免费的 30 天试用版 DHTMLX Kanban。 +--- + +# destructor() + +### 描述 + +@short: 移除 Kanban 的所有 HTML 元素,并解除所有相关事件的绑定 + +### 用法 + +~~~jsx {} +destructor(): void; +~~~ + +### 示例 + +~~~jsx {7} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 移除 Kanban +board.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md new file mode 100644 index 0000000..0c21595 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_duplicatecard_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: duplicateCard() +title: duplicateCard 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 duplicateCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# duplicateCard() + +### 描述 + +@short: 通过指定的 ID 复制一张卡片 + +### 用法 + +~~~jsx {} +duplicateCard({ + id: string | number, + card?: object, + select?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必填)要复制的卡片的 ID +- `card` - (可选)新卡片的数据对象。完整的卡片参数列表可以在[**这里**](api/config/js_kanban_cards_config.md)找到 +- `select` - (可选)启用或禁用选择新添加的卡片 + +### 示例 + +~~~jsx {7-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 复制 ID 为 1 的卡片 +board.duplicateCard({ + id: 1, + card: { label: "Duplicated card" }, + select: true +}); +~~~ + +**更新日志:** `select` 参数在 v1.5.10 版本中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md new file mode 100644 index 0000000..8184644 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getareacards_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getAreaCards() +title: getAreaCards 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getAreaCards 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# getAreaCards() + +### 描述 + +@short: 获取指定列(和行)中所有卡片的数据对象数组 + +### 用法 + +~~~jsx {} +getAreaCards( + columnId: string | number, + rowId?: string | number +): array; +~~~ + +### 参数 + +- `columnId` - (必需)目标列的 ID +- `rowId` - (可选)目标行的 ID + +### 返回值 + +该方法返回包含卡片数据对象的数组 + +:::info +如果看板仅包含 **列** 而没有 **行**,则只需传入 ***columnId*** 参数。此时,方法返回包含指定列中所有卡片数据对象的数组。 + +如果看板包含 **列** 和 **行**,则可以同时传入 ***columnId*** 和 ***rowId*** 参数。此时,方法返回包含特定列和行中所有卡片数据对象的数组。 +::: + +### 示例 + +~~~jsx {8} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 获取指定列和行的卡片数据对象数组 +board.getAreaCards("column_id", "row_id"); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md new file mode 100644 index 0000000..f471306 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcard_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: getCard() +title: getCard 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# getCard() + +### 描述 + +@short: 根据指定的 ID 获取卡片的数据对象 + +### 用法 + +~~~jsx {} +getCard(id: string | number): object; +~~~ + +### 参数 + +- `id` - (必填)目标卡片的 ID + +### 返回值 + +该方法返回指定 ID 的卡片的数据对象 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 获取 ID 为 1 的卡片的数据对象 +const card_data = board.getCard(1); +console.log(card_data); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md new file mode 100644 index 0000000..5b850a8 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getcolumncards_method.md @@ -0,0 +1,40 @@ +--- +sidebar_label: getColumnCards() +title: getColumnCards 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getColumnCards 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# getColumnCards() + +### 描述 + +@short: 获取一个数组,存储特定列中所有卡片的数据对象 + +### 用法 + +~~~jsx {} +getColumnCards(id: string | number): array; +~~~ + +### 参数 + +- `id` - (必填)目标列的 ID + +### 返回值 + +该方法返回一个数组,存储特定列中所有卡片的数据对象 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 获取 ID 为 1 的列中所有卡片的数据对象 +const cards_data = board.getColumnCards(1); +console.log(cards_data); +~~~ + +**更新日志**:该方法自 v1.7 版本起新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md new file mode 100644 index 0000000..333a266 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_getselection_method.md @@ -0,0 +1,33 @@ +--- +sidebar_label: getSelection() +title: getSelection 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getSelection 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# getSelection() + +### 描述 + +@short: 获取一个包含所选卡片 ID 的数组 + +### 用法 + +~~~jsx {} +getSelection(): array; +~~~ + +### 返回值 + +该方法返回一个包含所选卡片 ID 的数组 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 获取所选卡片 ID 的数组 +board.getSelection(); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md new file mode 100644 index 0000000..0fb0fc4 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecard_method.md @@ -0,0 +1,52 @@ +--- +sidebar_label: moveCard() +title: moveCard 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 moveCard 方法。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# moveCard() + +### 描述 + +@short: 将卡片移动到指定的列(和行) + +### 用法 + +~~~jsx {} +moveCard({ + id: string | number, + columnId: string | number, + rowId?: string | number, + before?: string | number +}): void; +~~~ + +### 参数 + +- `id` - (必填)将要移动的卡片的 ID +- `columnId` - (必填)卡片将被放置到的列的 ID +- `rowId` - (可选)卡片将被放置到的行的 ID +- `before` - (可选)在该卡片 ID 之前插入新卡片 + +:::info +如果在组件配置中指定了 **rowKey** 属性,则 **moveCard()** 方法的 **rowId** 参数为*必填*! +::: + +### 示例 + +~~~jsx {9-14} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 移动 ID 为 1 的卡片 +// 该项将被放置到 "inprogress" 列和 "feature" 行, +// 并插入到 ID 为 8 的卡片之前 +board.moveCard({ + id: 1, + columnId: "inprogress", + rowId: "feature", + before: 8 +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md new file mode 100644 index 0000000..f5a64c7 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_movecolumn_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: moveColumn() +title: moveColumn 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 moveColumn 方法。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# moveColumn() + +### 描述 + +@short: 将列移动到新的位置 + +### 用法 + +~~~jsx {} +moveColumn({ + id: string | number, + before?: string | number +}): void; +~~~ + +### 参数 + +- `id` - (必需)要移动的列的 ID +- `before` - (可选)移动列将被放置在其前面的列的 ID。如果未指定 `before` 参数,列将被放置在看板的末尾 + +### 示例 + +~~~jsx {7-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 移动 "backlog" 列,并将其放置在 "done" 列之前 +board.moveColumn({ + id: "backlog", + before: "done" +}); +~~~ + +**更新日志:** 此方法自 v1.1 版本起添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md new file mode 100644 index 0000000..243b23c --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_moverow_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: moveRow() +title: moveRow 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 moveRow 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# moveRow() + +### 描述 + +@short: 将一行移动到新的位置 + +### 用法 + +~~~jsx {} +moveRow({ + id: string | number, + before?: string | number +}): void; +~~~ + +### 参数 + +- `id` - (必填)要移动的行的 ID +- `before` - (可选)移动的行将放置在其前面的行的 ID。如果未指定 `before` 参数,行将被放置在看板的末尾 + +### 示例 + +~~~jsx {8-11} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, + row +}); +// 将 "task" 游泳道移动,并放置在 "feature" 之前(上方) +board.moveRow({ + id: "task", + before: "feature" +}); +~~~ + +**更新日志:** 该方法在 v1.1 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md new file mode 100644 index 0000000..c6ed3da --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_parse_method.md @@ -0,0 +1,47 @@ +--- +sidebar_label: parse() +title: parse 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 parse 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天试用版 DHTMLX 看板。 +--- + +# parse() + +### 描述 + +@short: 将数据解析到看板中 + +### 用法 + +~~~jsx {} +parse({ + columns?: array, + rows?: array, + cards?: array, + links?: array +}): void; +~~~ + +### 参数 + +- [`columns`](api/config/js_kanban_columns_config.md) - (可选)列数据对象数组 +- [`rows`](api/config/js_kanban_rows_config.md) - (可选)行数据对象数组 +- [`cards`](api/config/js_kanban_cards_config.md) - (可选)卡片数据对象数组 +- [`links`](api/config/js_kanban_links_config.md) - (可选)链接数据对象数组 + +### 示例 + +~~~jsx {4-9} +// 创建看板 +const board = new kanban.Kanban("#root", {}); +// 将数据解析到看板中 +board.parse({ + columns, + cards, + rows, + links +}); +~~~ + +**更新日志:** 从 v1.1 版本开始,解析新数据前无需在构造函数中重置初始数据 + +**相关文章:** [数据操作](guides/working_with_data.md#loading-data-from-local-source) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md new file mode 100644 index 0000000..86c82b7 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_redo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: redo() +title: redo 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 redo 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天试用版 DHTMLX 看板。 +--- + +# redo() + +### 描述 + +@short: 重复撤销操作所还原的动作 + +:::info +`redo()` 方法仅适用于启用了 [`history: true`](api/config/js_kanban_history_config.md) 配置的情况! +::: + +### 用法 + +~~~jsx {} +redo(): void; +~~~ + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 在看板的历史记录中前进一步 +board.redo(); +~~~ + +**更新日志:** 此方法在 v1.3 版本中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md new file mode 100644 index 0000000..134b3ed --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_scroll_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: scroll() +title: scroll 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 scroll 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# scroll() + +### 描述 + +@short: 将看板滚动到指定元素 + +### 用法 + +~~~jsx {} +scroll({ + id: string | number, + to: "column" | "row" | "card", + options?: object +}): void; +~~~ + +### 参数 + +- `id` - (必需)目标元素的 ID +- `to` - (必需)目标元素的类型。可用值为 "column"、"row" 和 "card" +- `options` - (可选)滚动选项对象。完整的滚动参数列表可见于 [这里](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#parameters) + +### 示例 + +~~~jsx {7-15} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 将看板滚动到 ID 为 246 的卡片 +board.scroll({ + id: 246, + to: "card", + options: { + behavior: "smooth", + block: "end", + inline: "nearest" + } +}); +~~~ + +**更新日志:** 此方法在 v1.2 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md new file mode 100644 index 0000000..d23bfb5 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_selectcard_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: selectCard() +title: selectCard 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 selectCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# selectCard() + +### 描述 + +@short: 通过指定的 ID 选择卡片 + +### 用法 + +~~~jsx {} +selectCard({ + id: string | number, + groupMode?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必需)被选择卡片的 ID +- `groupMode` - (可选)启用/禁用卡片多选(默认值为 **false**) + +:::info +如果将 **groupMode** 参数设置为 **true**,则 **selectCard()** 方法不会重置其他元素的选择状态 +::: + +### 示例 + +~~~jsx {7-10} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 选择 ID 为 1 的卡片 +board.selectCard({ + id: 1, + groupMode: true +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md new file mode 100644 index 0000000..30e8617 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_serialize_method.md @@ -0,0 +1,42 @@ +--- +sidebar_label: serialize() +title: serialize 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 serialize 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费 30 天评估版的 DHTMLX 看板。 +--- + +# serialize() + +### 描述 + +@short: 将看板数据序列化为 JSON + +### 用法 + +~~~jsx {} +serialize(): object; +~~~ + +### 返回值 + +该方法返回看板数据的对象 + +~~~jsx {} +{ + cards: [{...}, {...}, ...], + rows: [{...}, {...}, ...], + columns: [{...}, {...}, ...], + links: [{...}, {...}, ...] +} +~~~ + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 获取看板数据对象 +board.serialize(); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md new file mode 100644 index 0000000..91a10cc --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setconfig_method.md @@ -0,0 +1,53 @@ +--- +sidebar_label: setConfig() +title: setConfig 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setConfig 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# setConfig() + +### 描述 + +@short: 设置看板的新配置参数 + +### 用法 + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### 参数 + +- `config` - (必需)看板配置对象。完整属性列表请参见 [这里](api/overview/main_overview.md#kanban-properties) + +:::tip +使用此方法,您可以配置看板控件并加载数据。该方法不会更改历史记录(您无法更改历史记录)。 +::: + +### 示例 + +~~~jsx {10-20,22-23} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); + +// 创建工具栏 +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + +// 指定看板的新配置参数 +board.setConfig({ + columnKey: "stage", + rowKey: "type", + cardShape, + editorShape, + editor: { + autoSave: false + }, + /* 其他参数 */ +}); + +// 指定工具栏的新配置参数 +toolbar.setConfig({ items: ["search", "spacer", "sort"] }); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md new file mode 100644 index 0000000..bd2b99b --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setedit_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setEdit() +title: setEdit 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setEdit 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# setEdit() + +### 描述 + +@short: 切换看板的编辑器 + +### 用法 + +~~~jsx {} +setEdit({ cardId: string | number } | null): void; +~~~ + +### 参数 + +该方法可以接受 *null* 值或包含以下参数的对象: + +- `cardId` - (必需)要编辑的卡片的 ID + +:::note +要关闭编辑器,请调用 **setEdit()** 方法并传入 ***null*** 值 +::: + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 通过卡片 ID 打开该卡片的编辑器 +board.setEdit({ cardId: 1 }); +~~~ + +**更新日志:** 该方法在 v1.2 版本中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md new file mode 100644 index 0000000..35a60f0 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setlocale_method.md @@ -0,0 +1,44 @@ +--- +sidebar_label: setLocale() +title: setLocale 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setLocale 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# setLocale() + +### 描述 + +@short: 为看板应用新的语言环境 + +### 用法 + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### 参数 + +- `null` - (可选)重置为默认语言环境(*英语*) +- `locale` - (可选)要应用的新语言环境数据对象 + +:::info +使用 `setLocale()` 方法仅为看板应用新的语言环境。要将看板重置为默认语言环境,请调用不带参数(或传入 *null* 值)的 `setLocale()` 方法。若需仅为工具栏应用新的语言环境,请使用 [`toolbar.setLocale()`](api/methods/toolbar_setlocale_method.md) 方法。 +::: + +### 示例 + +~~~jsx {7,9} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards, +}); +// 为看板应用 "de" 语言环境 +board.setLocale(kanban.locales["de"]); +// 为看板应用默认语言环境 +board.setLocale(); // 或 board.setLocale(null); +~~~ + +**更新日志:** 该方法在 v1.2 版本中进行了更新 + +**相关文章:** [本地化](guides/localization.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md new file mode 100644 index 0000000..99f972c --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsearch_method.md @@ -0,0 +1,41 @@ +--- +sidebar_label: setSearch() +title: setSearch 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setSearch 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# setSearch() + +### 描述 + +@short: 根据指定参数查找卡片 + +### 用法 + +~~~jsx {} +setSearch({ + value: string, + by?: string +}): void; +~~~ + +:::info +使用此方法,您可以根据指定参数搜索所需的卡片。如果调用 **setSearch()** 方法时不传入参数,将清空搜索栏并取消卡片的高亮显示。 +::: + +### 参数 + +- `value` - (必需)要搜索的值 +- `by` - (可选)用于搜索的卡片字段 + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 高亮显示符合参数的卡片 +board.setSearch({ value: "Integration", by: "label" }); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md new file mode 100644 index 0000000..6256ad9 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_setsort_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: setSort() +title: setSort 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setSort 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# setSort() + +### 描述 + +@short: 按指定参数对卡片进行排序 + +### 用法 + +~~~jsx {} +setSort( + { + by?: string | function, // by?: ((card: object) => any), + dir?: "asc" | "desc", + columnId?: string | number, + preserve?: boolean + } | null +): void; +~~~ + +### 参数 + +该方法可以接受一个包含排序参数的对象或 *null* 值。在对象中可以指定以下参数: + +- `by` - (可选)用于排序的卡片字段。此参数可以是 *string* 或 *function* 类型。函数需要返回用于排序的卡片字段 +- `dir` - (可选)排序顺序。可选值为 *"asc"* 和 *"desc"* +- `columnId` - (可选)需要排序的列的 ID +- `preserve` - (可选)启用或禁用排序状态的保持(默认值为 *false*) + +:::info +如果 **preserve** 参数设置为 *false*,排序将只应用一次。这意味着在添加或移动卡片后,排序状态不会被保持(顺序将被更改)。否则,即使添加新卡片或移动卡片,排序状态也将被保持。要重置保持状态,请调用带有 ***null*** 参数的 **setSort()** 方法。 +::: + +### 示例 + +~~~jsx {7-12} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 按 "label" 参数以升序排序卡片 +board.setSort({ + by: (obj) => obj.label, // 或者 by: "label" + dir: "asc", + columnId: "backlog", + preserve: false +}); +~~~ + +**更新日志:** 该方法在 v1.2 版本中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md new file mode 100644 index 0000000..bcf67ea --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_settheme_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: setTheme() +title: setTheme 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 setTheme 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX 看板的 30 天试用版本。 +--- + +# setTheme() + +### 描述 + +@short: 动态应用新主题到看板(带重新初始化) + +### 用法 + +~~~jsx {} +setTheme({ + name?: string, // "material"(默认)| "willow" | "willow-dark" + fonts?: boolean +}): void; +~~~ + +### 参数 + +- `name` - (可选)要应用到看板的主题名称。共有 3 种可用主题: + - "material"(*默认*) + - "willow" + - "willow-dark" +- `fonts` - (可选)启用或禁用从 CDN 加载字体(wxi 字体) + +:::tip +要指定初始主题,可以使用 [`theme`](api/config/js_kanban_theme_config.md) 属性。 +::: + +### 示例 + +~~~jsx {6} +// 创建看板 +const board = new kanban.Kanban("#root", { + // 初始配置参数 +}); +// 设置 "willow" 主题 +board.setTheme({ name: "willow", font: false }); +~~~ + +**更新日志:** 该方法自 v1.6 版本起新增 + +**相关文档:** [样式设置](guides/stylization.md) + +**相关示例:** [看板。通过 CSS 类更改主题](https://snippet.dhtmlx.com/7qzp561m?tag=kanban) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md new file mode 100644 index 0000000..035fcd6 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_undo_method.md @@ -0,0 +1,35 @@ +--- +sidebar_label: undo() +title: undo 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 undo 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# undo() + +### 描述 + +@short: 撤销看板中的最后一次操作 + +:::info +`undo()` 方法仅适用于启用了 [`history: true`](api/config/js_kanban_history_config.md) 配置的情况! +::: + +### 用法 + +~~~jsx {} +undo(): void; +~~~ + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 在看板的历史记录中回退一步 +board.undo(); +~~~ + +**更新日志:** 该方法在 v1.3 版本中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md new file mode 100644 index 0000000..0539ce4 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_unselectcard_method.md @@ -0,0 +1,37 @@ +--- +sidebar_label: unselectCard() +title: unselectCard 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 unselectCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版 DHTMLX 看板。 +--- + +# unselectCard() + +### 描述 + +@short: 通过卡片 ID 取消选择卡片 + +### 用法 + +~~~jsx {} +unselectCard({ id: string | number }): void; +~~~ + +:::info +要取消选择所有卡片,请调用不带参数的 **unselectCard()** 方法 +::: + +### 参数 + +- `id` - (必需)要取消选择的卡片的 ID + +### 示例 + +~~~jsx {7} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 取消选择 ID 为 1 的卡片 +board.unselectCard({ id: 1 }); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md new file mode 100644 index 0000000..7ca851f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecard_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateCard() +title: updateCard 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 updateCard 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# updateCard() + +### 描述 + +@short: 通过卡片 ID 更新卡片数据 + +### 用法 + +~~~jsx {} +updateCard({ + id: string | number, + card?: object, + replace?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必填)要更新的卡片 ID +- `card` - (可选)卡片的新数据对象。卡片参数的完整列表可在[**此处**](api/config/js_kanban_cards_config.md)找到 +- `replace` - (可选)启用/禁用完全替换数据 + + :::note + 如果将 `replace` 参数设置为 *true*,旧数据将被新数据完全替换。否则,该方法只会更新您传递的值。 + ::: + +### 示例 + +~~~jsx {7-16} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 使用 ID 为 1 的卡片更新数据 +board.updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*其他参数*/ + }, + replace: true +}); +~~~ + +**更新日志**: +- v1.1 版本新增了 **id** 和 **card** 参数 +- v1.3 版本新增了 **replace** 参数 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md new file mode 100644 index 0000000..ba44848 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecolumn_method.md @@ -0,0 +1,56 @@ +--- +sidebar_label: updateColumn() +title: updateColumn 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 updateColumn 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# updateColumn() + +### 描述 + +@short: 通过列的 ID 更新列数据 + +### 用法 + +~~~jsx {} +updateColumn({ + id: string | number, + column?: object, + replace?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必需)要更新的列的 ID +- `column` - (可选)列的新数据对象。完整的 **column** 参数列表可在[**这里**](api/config/js_kanban_columns_config.md)找到 +- `replace` - (可选)启用/禁用完全替换数据 + + :::note + 如果将 `replace` 参数设置为 *true*,旧数据将被新数据完全替换。否则,该方法只会更新您传入的值。 + ::: + +### 示例 + +~~~jsx {7-16} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 使用 ID 为 "backlog" 的列更新列数据 +board.updateColumn({ + id: "backlog", + column: { + label: "更新后的列", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +**更新日志**: +- **id** 和 **column** 参数在 v1.1 中添加 +- **replace** 参数在 v1.3 中添加 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md new file mode 100644 index 0000000..ba81d73 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updatecomment_method.md @@ -0,0 +1,62 @@ +--- +sidebar_label: updateComment() +title: updateComment 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 updateComment 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# updateComment() + +### 描述 + +@short: 通过评论 ID 更新卡片评论 + +### 用法 + +~~~jsx {} +updateComment({ + id?: string | number, + cardId: string | number, + comment: { + id?: string | number, + cardId?: string | number, + text?: string, + date?: Date, + html?: string + } +}): void; +~~~ + +### 参数 + +- `id` - (可选)要更新的评论的 ID +- `cardId` - (必需)包含要更新评论的卡片 ID +- `comment` - (必需)要更新的评论配置对象。您可以在这里指定以下参数: + - `id` - (可选)更新后的评论 ID + - `cardId` - (可选)更新后的评论将被添加到的卡片 ID + - `text` - (可选)更新后的评论文本 + - `date` - (可选)更新后的评论日期 + - `html` - (可选)更新后的评论的 HTML 标记。启用 [`editorShape`](/api/config/js_kanban_editorshape_config/#--comments-类型的参数) 配置中的 `html` 属性,以显示 HTML 标记而非文本 + +### 示例 + +~~~jsx {7-17} +// 创建看板 +const board = new kanban.Kanban("#root", { + columns, + cards +}); +// 更新评论 +board.updateComment({ + id: 1, + cardId: 1, + comment: { + id: 2, + cardId: 4, + text: "", + date: new Date("01/08/2021"), + html: "Updated comment" + } +}); +~~~ + +**更新日志:** 该方法在 v1.4 版本中新增 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md new file mode 100644 index 0000000..7daf4ab --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/js_kanban_updaterow_method.md @@ -0,0 +1,55 @@ +--- +sidebar_label: updateRow() +title: updateRow 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 updateRow 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 免费 30 天试用版。 +--- + +# updateRow() + +### 描述 + +@short: 通过行 ID 更新行数据 + +### 用法 + +~~~jsx {} +updateRow({ + id: string | number, + row?: object, + replace?: boolean +}): void; +~~~ + +### 参数 + +- `id` - (必需)要更新的行的 ID +- `row` - (可选)行的新数据对象。完整的 **row** 参数列表请参见[**这里**](api/config/js_kanban_rows_config.md) +- `replace` - (可选)启用/禁用完全替换数据 + + :::note + 如果将 `replace` 参数设置为 *true*,旧数据将被新数据完全替换。否则,该方法只会更新您传入的值。 + ::: + +### 示例 + +~~~jsx {8-15} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + rows +}); +// 使用 ID 为 "feature" 的行更新数据 +board.updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +**更新日志**: +- 在 v1.1 版本中添加了 **id** 和 **row** 参数 +- 在 v1.3 版本中添加了 **replace** 参数 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md new file mode 100644 index 0000000..9cdc839 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/toolbar_destructor_method.md @@ -0,0 +1,28 @@ +--- +sidebar_label: destructor() +title: destructor 方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 Toolbar 的 destructor 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版本。 +--- + +# destructor() + +### 描述 + +@short: 移除 Toolbar 的所有 HTML 元素,并解除所有相关事件绑定 + +### 用法 + +~~~jsx {} +destructor(): void; +~~~ + +### 示例 + +~~~jsx {6} +// 创建 Kanban +const board = new kanban.Kanban("#root", {}); +// 创建 Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// 移除 Toolbar +toolbar.destructor(); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md new file mode 100644 index 0000000..bc7e63b --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/toolbar_setconfig_method.md @@ -0,0 +1,38 @@ +--- +sidebar_label: setConfig() +title: setConfig 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 Toolbar 的 setConfig 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# setConfig() + +### 描述 + +@short: 设置 Toolbar 的新配置参数 + +### 用法 + +~~~jsx {} +setConfig(config: object): void; +~~~ + +### 参数 + +- `config` - (必需)Toolbar 配置对象。完整属性列表请参见 [这里](api/overview/main_overview.md#toolbar-properties) + +:::note +该方法仅更改您传入的参数。 +::: + +### 示例 + +~~~jsx {6-8} +// 创建看板 +const board = new kanban.Kanban("#root", {}); +// 创建 Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// 设置 Toolbar 的新配置参数 +toolbar.setConfig({ + items: ["search", "spacer", "sort"] +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md new file mode 100644 index 0000000..2073581 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/methods/toolbar_setlocale_method.md @@ -0,0 +1,43 @@ +--- +sidebar_label: setLocale() +title: setLocale 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 Toolbar 的 setLocale 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# setLocale() + +### 描述 + +@short: 将新的语言环境应用到看板的 Toolbar 上 + +### 用法 + +~~~jsx {} +setLocale(null | locale?: object): void; +~~~ + +### 参数 + +- `null` - (可选)将 Toolbar 重置为默认语言环境(*英语*) +- `locale` - (可选)将要应用到 Toolbar 的新语言环境数据对象 + +:::info +看板的 **Toolbar** 是一个独立的组件。使用 `toolbar.setLocale()` 方法仅将新的语言环境应用到 Toolbar。要将 Toolbar 重置为默认语言环境,请调用不带参数(或传入 *null*)的 `toolbar.setLocale()` 方法。使用 [`kanban.setLocale()`](api/methods/js_kanban_setlocale_method.md) 方法仅将新的语言环境应用到看板。 +::: + +### 示例 + +~~~jsx {8} +// 创建看板 +const board = new kanban.Kanban("#root", {}); +// 创建 Toolbar +const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); +// 将 "de" 语言环境应用到看板 +board.setLocale(de); +// 将 "de" 语言环境应用到 Toolbar +toolbar.setLocale(de); +~~~ + +**更新日志:** 参数 **api** 在 v1.6 版本中已弃用 + +**相关文档:** [本地化](guides/localization.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md new file mode 100644 index 0000000..ccdc02f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/common_settings_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: 常用设置 +title: 常用设置 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中查看 JavaScript 看板的常用设置概述。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# 常用设置 + +| 名称 | 描述 | +| --------------------------------------------- | -------------------------------------------------- | +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/events_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/events_overview.md new file mode 100644 index 0000000..81abf2b --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/events_overview.md @@ -0,0 +1,39 @@ +--- +sidebar_label: 事件概览 +title: 事件概览 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中查看 JavaScript 看板的事件概览。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# 事件概览 + +| 名称 | 描述 | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md new file mode 100644 index 0000000..83748b4 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_eventbus_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: 事件总线方法 +title: 事件总线方法 +description: 您可以在DHTMLX JavaScript看板库的文档中查看JavaScript看板的内部事件总线方法概述。浏览开发者指南和API参考,试用代码示例和在线演示,并下载DHTMLX看板的免费30天评估版。 +--- + +# 事件总线方法 + +| 名称 | 描述 | +| -------------------------------------------------------- | ------------------------------------------------------------ | +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md new file mode 100644 index 0000000..c3d8df7 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_export_overview.md @@ -0,0 +1,11 @@ +--- +sidebar_label: 导出方法 +title: 导出方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中查看 JavaScript 看板的内部导出方法概述。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载免费的 30 天评估版本的 DHTMLX 看板。 +--- + +# 导出方法 + +| 名称 | 描述 | +| -------------------------------------------- | -------------------------------------------- | +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md new file mode 100644 index 0000000..49975cb --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_rest_overview.md @@ -0,0 +1,16 @@ +--- +sidebar_label: RestDataProvider 方法 +title: RestDataProvider 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中查看 JavaScript 看板的内部 RestDataProvider 方法概述。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# RestDataProvider 方法 + +| 名称 | 描述 | +| ------------------------------------------------------------ | ----------------------------------------------------------------- | +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md) | +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md new file mode 100644 index 0000000..cf17f66 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/internal_state_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: 状态方法 +title: 状态方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中查看 JavaScript 看板的内部状态方法概述。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# 状态方法 + +| 名称 | 描述 | +| -------------------------------------------------------- | ------------------------------------------------------------ | +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md) | +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/main_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/main_overview.md new file mode 100644 index 0000000..d138b48 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/main_overview.md @@ -0,0 +1,225 @@ +--- +sidebar_label: API 概览 +title: API 概览 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中查看 JavaScript 看板的 API 概览。浏览开发者指南和 API 参考,试用代码示例和实时演示,并免费下载 DHTMLX Kanban 的 30 天免费评估版本。 +--- + +# API 概览 + +## Kanban 构造函数 + +~~~js +new kanban.Kanban("#root", { + // 配置参数 +}); +~~~ + +**参数**: + +- 一个 HTML 容器(HTML 容器的 ID) +- 一个配置参数对象([查看此处](#kanban-属性)) + +## Toolbar 构造函数 + +~~~js +new kanban.Toolbar("#toolbar", { + // 配置参数 +}); +~~~ + +**参数**: + +- 一个 HTML 容器(HTML 容器的 ID) +- 一个配置参数对象([查看此处](#toolbar-属性)) + +## Kanban 方法 + +| 名称 | 描述 | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md) | +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | + +## Kanban 内部 API + +### 事件总线方法 + +| 名称 | 描述 | +| --------------------------------------------------------- | --------------------------------------------------------- | +| [](../internal/js_kanban_detach_method.md) | @getshort(../internal/js_kanban_detach_method.md) | +| [](../internal/js_kanban_exec_method.md) | @getshort(../internal/js_kanban_exec_method.md) | +| [](../internal/js_kanban_intercept_method.md) | @getshort(../internal/js_kanban_intercept_method.md) | +| [](../internal/js_kanban_on_method.md) | @getshort(../internal/js_kanban_on_method.md) | +| [](../internal/js_kanban_setnext_method.md) | @getshort(../internal/js_kanban_setnext_method.md) | + +### 导出方法 + +| 名称 | 描述 | +| -------------------------------------------- | ------------------------------------------------------ | +| [](../internal/js_kanban_json_method.md) | @getshort(../internal/js_kanban_json_method.md) | + +### 状态方法 + +| 名称 | 描述 | +| --------------------------------------------------------- | --------------------------------------------------------- | +| [](../internal/js_kanban_getreactivestate_method.md) | @getshort(../internal/js_kanban_getreactivestate_method.md)| +| [](../internal/js_kanban_getstate_method.md) | @getshort(../internal/js_kanban_getstate_method.md) | +| [](../internal/js_kanban_getstores_method.md) | @getshort(../internal/js_kanban_getstores_method.md) | + +## Kanban 事件 + +| 名称 | 描述 | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../events/js_kanban_addcard_event.md) | @getshort(../events/js_kanban_addcard_event.md) | +| [](../events/js_kanban_addcolumn_event.md) | @getshort(../events/js_kanban_addcolumn_event.md) | +| [](../events/js_kanban_addcomment_event.md) | @getshort(../events/js_kanban_addcomment_event.md) | +| [](../events/js_kanban_addlink_event.md) | @getshort(../events/js_kanban_addlink_event.md) | +| [](../events/js_kanban_addrow_event.md) | @getshort(../events/js_kanban_addrow_event.md) | +| [](../events/js_kanban_addvote_event.md) | @getshort(../events/js_kanban_addvote_event.md) | +| [](../events/js_kanban_deletecard_event.md) | @getshort(../events/js_kanban_deletecard_event.md) | +| [](../events/js_kanban_deletecolumn_event.md) | @getshort(../events/js_kanban_deletecolumn_event.md) | +| [](../events/js_kanban_deletecomment_event.md) | @getshort(../events/js_kanban_deletecomment_event.md) | +| [](../events/js_kanban_deletelink_event.md) | @getshort(../events/js_kanban_deletelink_event.md) | +| [](../events/js_kanban_deleterow_event.md) | @getshort(../events/js_kanban_deleterow_event.md) | +| [](../events/js_kanban_deletevote_event.md) | @getshort(../events/js_kanban_deletevote_event.md) | +| [](../events/js_kanban_dragcard_event.md) | @getshort(../events/js_kanban_dragcard_event.md) | +| [](../events/js_kanban_duplicatecard_event.md) | @getshort(../events/js_kanban_duplicatecard_event.md) | +| [](../events/js_kanban_enddragcard_event.md) | @getshort(../events/js_kanban_enddragcard_event.md) | +| [](../events/js_kanban_movecard_event.md) | @getshort(../events/js_kanban_movecard_event.md) | +| [](../events/js_kanban_movecolumn_event.md) | @getshort(../events/js_kanban_movecolumn_event.md) | +| [](../events/js_kanban_moverow_event.md) | @getshort(../events/js_kanban_moverow_event.md) | +| [](../events/js_kanban_redo_event.md) | @getshort(../events/js_kanban_redo_event.md) | +| [](../events/js_kanban_scroll_event.md) | @getshort(../events/js_kanban_scroll_event.md) | +| [](../events/js_kanban_selectcard_event.md) | @getshort(../events/js_kanban_selectcard_event.md) | +| [](../events/js_kanban_setedit_event.md) | @getshort(../events/js_kanban_setedit_event.md) | +| [](../events/js_kanban_setsearch_event.md) | @getshort(../events/js_kanban_setsearch_event.md) | +| [](../events/js_kanban_setsort_event.md) | @getshort(../events/js_kanban_setsort_event.md) | +| [](../events/js_kanban_startdragcard_event.md) | @getshort(../events/js_kanban_startdragcard_event.md) | +| [](../events/js_kanban_undo_event.md) | @getshort(../events/js_kanban_undo_event.md) | +| [](../events/js_kanban_unselectcard_event.md) | @getshort(../events/js_kanban_unselectcard_event.md) | +| [](../events/js_kanban_updatecard_event.md) | @getshort(../events/js_kanban_updatecard_event.md) | +| [](../events/js_kanban_updatecolumn_event.md) | @getshort(../events/js_kanban_updatecolumn_event.md) | +| [](../events/js_kanban_updatecomment_event.md) | @getshort(../events/js_kanban_updatecomment_event.md) | +| [](../events/js_kanban_updaterow_event.md) | @getshort(../events/js_kanban_updaterow_event.md) | + +## Kanban 属性 + +| 名称 | 描述 | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | + +## Toolbar 方法 + +| 名称 | 描述 | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | + +## Toolbar 属性 + +| 名称 | 描述 | +| :-------------------------------------------------------- | :------------------------------------------------------ | +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | + +## 通用设置 + +| 名称 | 描述 | +| :------------------------------------------ | :------------------------------------------------------ | +| [](../common/js_kanban_meta_parameter.md) | @getshort(../common/js_kanban_meta_parameter.md) | + +## RestDataProvider API + +### RestDataProvider 方法 + +| 名称 | 描述 | +| ------------------------------------------------------------- | ----------------------------------------------------------- | +| [](../provider/rest_methods/js_kanban_getcards_method.md) | @getshort(../provider/rest_methods/js_kanban_getcards_method.md) | +| [](../provider/rest_methods/js_kanban_getcolumns_method.md) | @getshort(../provider/rest_methods/js_kanban_getcolumns_method.md) | +| [](../provider/rest_methods/js_kanban_getlinks_method.md) | @getshort(../provider/rest_methods/js_kanban_getlinks_method.md) | +| [](../provider/rest_methods/js_kanban_getrows_method.md) | @getshort(../provider/rest_methods/js_kanban_getrows_method.md) | +| [](../provider/rest_methods/js_kanban_getusers_method.md) | @getshort(../provider/rest_methods/js_kanban_getusers_method.md) | +| [](../provider/rest_methods/js_kanban_send_method.md) | @getshort(../provider/rest_methods/js_kanban_send_method.md) | + +### RestDataProvider 路由 + +| 名称 | 描述 | +| ----------------------------------------------------------- | ------------------------------------------------------ | +| [GET `/cards`](api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | @getshort(../provider/rest_routes/get_routes/js_kanban_get_cards_route.md) | +| [GET `/columns`](api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_columns_route.md) | +| [GET `/links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_links_route.md) | +| [GET `/rows`](api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_rows_route.md) | +| [GET `/users`](api/provider/rest_routes/get_routes/js_kanban_get_users_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_users_route.md) | +| [GET `/uploads`](api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md)| @getshort(../provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) | +| [POST `/cards`](api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_route.md) | +| [POST `/cards/{cardId}/comments`](api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) | +| [POST `/cards/{cardId}/vote`](api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) | +| [POST `/columns`](api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_columns_route.md) | +| [POST `/links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_links_route.md) | +| [POST `/rows`](api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_rows_route.md) | +| [POST `/uploads`](api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md)| @getshort(../provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) | +| [PUT `/cards`](api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_route.md) | +| [PUT `/cards/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) | +| [PUT `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) | +| [PUT `/columns`](api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_route.md) | +| [PUT `/columns/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) | +| [PUT `/rows`](api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_route.md) | +| [PUT `/rows/{id}/move`](api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md)| @getshort(../provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) | +| [DELETE `/cards`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) | +| [DELETE `/cards/{cardId}/comments/{cardId}`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) | +| [DELETE `/cards/{cardId}/vote`](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) | +| [DELETE `/columns`](api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) | +| [DELETE `/links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) | +| [DELETE `/rows`](api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md)| @getshort(../provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md new file mode 100644 index 0000000..09040a1 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/methods_overview.md @@ -0,0 +1,45 @@ +--- +sidebar_label: 方法概览 +title: 方法概览 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中查看 JavaScript 看板的 方法概览。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# 方法概览 + +| 名称 | 描述 | +| -------------------------------------------------------- | ------------------------------------------------------- | +| [](../methods/js_kanban_addcard_method.md) | @getshort(../methods/js_kanban_addcard_method.md) | +| [](../methods/js_kanban_addcolumn_method.md) | @getshort(../methods/js_kanban_addcolumn_method.md) | +| [](../methods/js_kanban_addcomment_method.md) | @getshort(../methods/js_kanban_addcomment_method.md) | +| [](../methods/js_kanban_addlink_method.md) | @getshort(../methods/js_kanban_addlink_method.md) | +| [](../methods/js_kanban_addrow_method.md) | @getshort(../methods/js_kanban_addrow_method.md) | +| [](../methods/js_kanban_deletecard_method.md) | @getshort(../methods/js_kanban_deletecard_method.md) | +| [](../methods/js_kanban_deletecolumn_method.md) | @getshort(../methods/js_kanban_deletecolumn_method.md) | +| [](../methods/js_kanban_deletecomment_method.md) | @getshort(../methods/js_kanban_deletecomment_method.md) | +| [](../methods/js_kanban_deletelink_method.md) | @getshort(../methods/js_kanban_deletelink_method.md) | +| [](../methods/js_kanban_deleterow_method.md) | @getshort(../methods/js_kanban_deleterow_method.md) | +| [](../methods/js_kanban_destructor_method.md) | @getshort(../methods/js_kanban_destructor_method.md) | +| [](../methods/js_kanban_duplicatecard_method.md) | @getshort(../methods/js_kanban_duplicatecard_method.md) | +| [](../methods/js_kanban_getareacards_method.md) | @getshort(../methods/js_kanban_getareacards_method.md) | +| [](../methods/js_kanban_getcard_method.md) | @getshort(../methods/js_kanban_getcard_method.md) | +| [](../methods/js_kanban_getcolumncards_method.md) | @getshort(../methods/js_kanban_getcolumncards_method.md)| +| [](../methods/js_kanban_getselection_method.md) | @getshort(../methods/js_kanban_getselection_method.md) | +| [](../methods/js_kanban_movecard_method.md) | @getshort(../methods/js_kanban_movecard_method.md) | +| [](../methods/js_kanban_movecolumn_method.md) | @getshort(../methods/js_kanban_movecolumn_method.md) | +| [](../methods/js_kanban_moverow_method.md) | @getshort(../methods/js_kanban_moverow_method.md) | +| [](../methods/js_kanban_parse_method.md) | @getshort(../methods/js_kanban_parse_method.md) | +| [](../methods/js_kanban_redo_method.md) | @getshort(../methods/js_kanban_redo_method.md) | +| [](../methods/js_kanban_scroll_method.md) | @getshort(../methods/js_kanban_scroll_method.md) | +| [](../methods/js_kanban_selectcard_method.md) | @getshort(../methods/js_kanban_selectcard_method.md) | +| [](../methods/js_kanban_serialize_method.md) | @getshort(../methods/js_kanban_serialize_method.md) | +| [](../methods/js_kanban_setconfig_method.md) | @getshort(../methods/js_kanban_setconfig_method.md) | +| [](../methods/js_kanban_setedit_method.md) | @getshort(../methods/js_kanban_setedit_method.md) | +| [](../methods/js_kanban_setlocale_method.md) | @getshort(../methods/js_kanban_setlocale_method.md) | +| [](../methods/js_kanban_setsearch_method.md) | @getshort(../methods/js_kanban_setsearch_method.md) | +| [](../methods/js_kanban_setsort_method.md) | @getshort(../methods/js_kanban_setsort_method.md) | +| [](../methods/js_kanban_undo_method.md) | @getshort(../methods/js_kanban_undo_method.md) | +| [](../methods/js_kanban_unselectcard_method.md) | @getshort(../methods/js_kanban_unselectcard_method.md) | +| [](../methods/js_kanban_updatecard_method.md) | @getshort(../methods/js_kanban_updatecard_method.md) | +| [](../methods/js_kanban_updatecolumn_method.md) | @getshort(../methods/js_kanban_updatecolumn_method.md) | +| [](../methods/js_kanban_updatecomment_method.md) | @getshort(../methods/js_kanban_updatecomment_method.md) | +| [](../methods/js_kanban_updaterow_method.md) | @getshort(../methods/js_kanban_updaterow_method.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md new file mode 100644 index 0000000..7f9e920 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/properties_overview.md @@ -0,0 +1,31 @@ +--- +sidebar_label: 属性概览 +title: 属性概览 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中查看 JavaScript 看板的属性概览。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版本。 +--- + +# Kanban 属性概览 + +要配置 **Kanban**,请参考[配置](guides/configuration.md)章节。 + +| 名称 | 描述 | +| --------------------------------------------------------- | -------------------------------------------------------- | +| [](../config/js_kanban_cardheight_config.md) | @getshort(../config/js_kanban_cardheight_config.md) | +| [](../config/js_kanban_cards_config.md) | @getshort(../config/js_kanban_cards_config.md) | +| [](../config/js_kanban_cardshape_config.md) | @getshort(../config/js_kanban_cardshape_config.md) | +| [](../config/js_kanban_cardtemplate_config.md) | @getshort(../config/js_kanban_cardtemplate_config.md) | +| [](../config/js_kanban_columnkey_config.md) | @getshort(../config/js_kanban_columnkey_config.md) | +| [](../config/js_kanban_columns_config.md) | @getshort(../config/js_kanban_columns_config.md) | +| [](../config/js_kanban_columnshape_config.md) | @getshort(../config/js_kanban_columnshape_config.md) | +| [](../config/js_kanban_currentuser_config.md) | @getshort(../config/js_kanban_currentuser_config.md) | +| [](../config/js_kanban_editor_config.md) | @getshort(../config/js_kanban_editor_config.md) | +| [](../config/js_kanban_editorshape_config.md) | @getshort(../config/js_kanban_editorshape_config.md) | +| [](../config/js_kanban_history_config.md) | @getshort(../config/js_kanban_history_config.md) | +| [](../config/js_kanban_links_config.md) | @getshort(../config/js_kanban_links_config.md) | +| [](../config/js_kanban_locale_config.md) | @getshort(../config/js_kanban_locale_config.md) | +| [](../config/js_kanban_readonly_config.md) | @getshort(../config/js_kanban_readonly_config.md) | +| [](../config/js_kanban_rendertype_config.md) | @getshort(../config/js_kanban_rendertype_config.md) | +| [](../config/js_kanban_rowkey_config.md) | @getshort(../config/js_kanban_rowkey_config.md) | +| [](../config/js_kanban_rows_config.md) | @getshort(../config/js_kanban_rows_config.md) | +| [](../config/js_kanban_rowshape_config.md) | @getshort(../config/js_kanban_rowshape_config.md) | +| [](../config/js_kanban_scrolltype_config.md) | @getshort(../config/js_kanban_scrolltype_config.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md new file mode 100644 index 0000000..d4cca17 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/rest_routes_overview.md @@ -0,0 +1,200 @@ +--- +sidebar_label: REST 路由概览 +title: REST 路由概览 +description: 您可以在 DHTMLX JavaScript 看板库的文档中查看 JavaScript 看板的内部 RestDataProvider 路由概览。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# REST 路由概览 + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +本页提供所有 REST 路由的列表,包含简短描述及指向详细说明页面的链接。
在深入了解每个路由描述之前,建议先阅读[与服务器交互](guides/working_with_server.md)。 + +--- + +快速导航可使用下方标签页或侧边菜单: +- 侧边菜单按 HTTP 方法分组显示路由 +- 若想快速查找适用于不同操作的路由,请使用下方标签页 + +
+ + +

使用以下路由对卡片执行操作:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由描述
`GET` /cards获取所有卡片数据,返回包含卡片对象数组的 JSON 对象
`POST` /cards创建新卡片,返回包含新卡片 ID 的 JSON 对象
`PUT` /cards更新指定卡片的数据,返回空 JSON 对象
`PUT` /cards/id/move将卡片移动到指定位置
`DELETE` /cards删除卡片数据
+
+ + +

使用以下路由对行(泳道)执行操作:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由描述
`GET` /rows获取所有行数据,返回包含行(泳道)对象数组的 JSON 对象
`POST` /rows添加新行,返回包含行 ID 的 JSON 对象
`PUT` /rows更新指定行(泳道)数据,返回空 JSON 对象
`PUT` /rows/id/move将行移动到指定位置
`DELETE` /rows删除行数据
+
+ + +

使用以下路由对列执行操作:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由描述
`GET` /columns获取所有列数据,返回包含列对象数组的 JSON 对象
`POST` /columns添加新列,返回包含列 ID 的 JSON 对象
`PUT` /columns更新指定列数据,返回空 JSON 对象
`PUT` /columns/id/move将列移动到指定位置
`DELETE` /columns删除列数据
+
+ + +

使用以下路由对链接执行操作:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由描述
`GET` /links获取所有链接数据,返回包含链接对象数组的 JSON 对象
`POST` /links创建新链接,返回包含新链接 ID 的 JSON 对象
`DELETE` /links删除链接数据
+
+ + +

使用以下路由对上传(上传到服务器的文件)执行操作:

+ + + + + + + + + + + + + + + + + + + + +
HTTP 方法路由描述
`GET` /uploads从服务器获取请求的二进制文件
`POST` /uploads上传二进制文件至服务器,返回包含文件 id、名称和 url 的 JSON 对象
+
+ +
+
\ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md new file mode 100644 index 0000000..f8a6695 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/toolbar_methods_overview.md @@ -0,0 +1,13 @@ +--- +sidebar_label: 工具栏方法概览 +title: 工具栏方法概览 +description: 您可以在DHTMLX JavaScript Kanban库的文档中查看JavaScript看板的工具栏方法概览。浏览开发者指南和API参考,试用代码示例和在线演示,并下载DHTMLX Kanban的免费30天评估版本。 +--- + +# 工具栏方法概览 + +| 名称 | 描述 | +| -------------------------------------------------------- | -------------------------------------------------------- | +| [](../methods/toolbar_destructor_method.md) | @getshort(../methods/toolbar_destructor_method.md) | +| [](../methods/toolbar_setconfig_method.md) | @getshort(../methods/toolbar_setconfig_method.md) | +| [](../methods/toolbar_setlocale_method.md) | @getshort(../methods/toolbar_setlocale_method.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md new file mode 100644 index 0000000..1f8c935 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/overview/toolbar_properties_overview.md @@ -0,0 +1,15 @@ +--- +sidebar_label: 工具栏属性概述 +title: 工具栏属性概述 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中查看 JavaScript 看板的工具栏属性概述。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# 工具栏属性概述 + +要配置 **Toolbar**,请参阅 [Configuration](guides/configuration.md#toolbar) 部分。 + +| 名称 | 描述 | +| --------------------------------------------------------- | ------------------------------------------------------- | +| [](../config/toolbar_api_config.md) | @getshort(../config/toolbar_api_config.md) | +| [](../config/toolbar_items_config.md) | @getshort(../config/toolbar_items_config.md) | +| [](../config/toolbar_locale_config.md) | @getshort(../config/toolbar_locale_config.md) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md new file mode 100644 index 0000000..207b948 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcards_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getCards() +title: getCards REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getCards REST 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# getCards() + +### 描述 + +@short: 获取包含卡片数据的 promise + +:::info +**getCards()** 方法是 **RestDataProvider** 服务的一部分,用于与服务器进行交互 +::: + +### 用法 + +~~~jsx {} +getCards(): promise; +~~~ + +### 返回值 + +**getCards()** 方法通过 **GET** 请求向服务器发送请求,并返回一个包含卡片数据的 **promise** + +### 示例 + +~~~jsx {2,5} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**相关文档:** [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md new file mode 100644 index 0000000..7825263 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getcolumns_method.md @@ -0,0 +1,45 @@ +--- +sidebar_label: getColumns() +title: getColumns REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getColumns REST 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# getColumns() + +### 描述 + +@short: 获取包含列数据的 promise + +:::info +**getColumns()** 方法是用于与服务器交互的 **RestDataProvider** 服务的一部分 +::: + +### 用法 + +~~~jsx {} +getColumns(): promise; +~~~ + +### 返回值 + +**getColumns()** 方法通过 **GET** 请求向服务器发送请求,并返回包含列数据的 **promise** + +### 示例 + +~~~jsx {2,6} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns + }); + board.api.setNext(restProvider); +}); +~~~ + +**相关文章:** [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md new file mode 100644 index 0000000..603d17d --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getlinks_method.md @@ -0,0 +1,49 @@ +--- +sidebar_label: getLinks() +title: getLinks REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getLinks REST 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# getLinks() + +### 描述 + +@short: 获取包含链接数据的 promise + +:::info +**getLinks()** 方法是 **RestDataProvider** 服务的一部分,用于与服务器交互 +::: + +### 用法 + +~~~jsx {} +getLinks(): promise; +~~~ + +### 返回值 + +**getLinks()** 方法通过 **GET** 方法向服务器发送请求,并返回包含链接数据的 **promise**。 + +### 示例 + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), +]).then(([cards, columns, links]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links + }); + board.api.setNext(restProvider); +}); +~~~ + +**更新日志:** 该方法在 v1.5 版本中新增 + +**相关文档:** [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md new file mode 100644 index 0000000..a32967e --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getrows_method.md @@ -0,0 +1,48 @@ +--- +sidebar_label: getRows() +title: getRows REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getRows REST 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版本。 +--- + +# getRows() + +### 描述 + +@short: 获取包含行数据的 promise + +:::info +**getRows()** 方法是用于与服务器交互的 **RestDataProvider** 服务的一部分 +::: + +### 用法 + +~~~jsx {} +getRows(): promise; +~~~ + +### 返回值 + +**getRows()** 方法通过 **GET** 请求向服务器发送请求,并返回包含行数据的 **promise** + +### 示例 + +~~~jsx {2,7} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows() +]).then(([cards, columns, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type" + }); + board.api.setNext(restProvider); +}); +~~~ + +**相关内容:** [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md new file mode 100644 index 0000000..59f8a58 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_getusers_method.md @@ -0,0 +1,60 @@ +--- +sidebar_label: getUsers() +title: getUsers REST 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 getUsers REST 方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# getUsers() + +### 描述 + +@short: 获取包含用户数据的 promise + +:::info +**getUsers()** 方法是 **RestDataProvider** 服务的一部分,用于与服务器交互 +::: + +### 用法 + +~~~jsx {} +getUsers(): promise; +~~~ + +### 返回值 + +**getUsers()** 方法通过 **GET** 请求向服务器发送请求,并返回一个包含用户数据的 **promise** + +### 示例 + +~~~jsx {2,8,21} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getRows(), + restProvider.getUsers(), +]).then(([cards, columns, rows, users]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +**更新日志:** 该方法在 v1.3 版本中添加 + +**相关文档:** [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md new file mode 100644 index 0000000..b016175 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_methods/js_kanban_send_method.md @@ -0,0 +1,113 @@ +--- +sidebar_label: send() +title: send() 方法 +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 send() 方法。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# send() + +### 描述 + +@short: 向服务器发送所需的 HTTP 请求,并根据请求返回带数据或不带数据的 promise。 + +所有发送到服务器的请求均通过 **send()** 方法完成,该方法是 [**RestDataProvider**](guides/working_with_server.md/#restdataprovider) 服务的一部分。 + +### 用法 + +~~~js +send( + url: string, + method: "GET" | "POST" | "PUT" | "DELETE" | string, + data?: object, + headers?: object, +): promise; +~~~ + +### 参数 + +| 名称 | 类型 | 说明 | +| ----------- | ----------- | ----------- | +| `url` | string | *必填*。请求发送到的服务器路径。| +| `method` | string | *必填*。HTTP 方法类型(GET、POST、PUT、DELETE)| +| `data` | object | *可选*。发送到服务器的参数。默认情况下,发送触发事件的参数。但您可以用自定义对象添加额外参数。详见下方[示例](#示例)。 | +| `headers` | object | *可选*。默认请求头为 **Content-Type**,值为 *application/json*。可以通过 **customHeaders** 参数添加更多自定义请求头。详见下方[示例](#示例)。 | + +### 返回值 + +该方法返回一个带或不带数据的 promise,具体取决于请求。 + +请求成功时返回 promise;请求失败时,客户端会抛出错误。 + +您可以配置返回内容。要处理失败请求的响应,请使用返回的 promise 的 **catch** 方法。 + +~~~jsx +restDataProvider.send(url, method, data) +.then(data => { + ... // 成功时:处理数据 +}) +.catch(err => { + ... // 错误处理 +}); +~~~ + +### 示例 + +下面的示例演示了如何发送包含除默认参数外的额外参数的请求: + +~~~jsx {14-20} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getCards(), + restProvider.getColumns() +]).then(([cards, columns]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + // 配置参数 + }); + + board.api.on("add-card", obj => { + obj.custom = "custom prop"; + restProvider.send(`cards`, "POST", obj).then(data => { + board.api.parse({ cards: data }); + return Promise.resolve(); + }); + }); + + board.api.setNext(restProvider); +}); +~~~ + +以下示例展示了如何向 **send()** 方法添加更多请求头: + +~~~js +const customHeaders = { + "Authorization": "Bearer", + "Custom header": "some value", +}; + +board.api.on("add-cards", obj => { + restDataProvider.send("cards", "POST", obj, customHeaders); +}); +~~~ + +或者,您也可以通过重新定义 RestDataProvider 来添加请求头,这样可以更灵活地控制发送给服务器的数据: + +~~~jsx {3-8} +const url = "https://some_backend_url"; + +class MyDataProvider extends RestDataProvider { + send(url, method, data, headers) { + headers = { ...headers, "SomeToken": "abc" }; + return super.send(url, methods, data, headers); + } +} + +board.api.setNext(new MyDataProvider(url)); +~~~ + +--- + +**相关文档:** [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md new file mode 100644 index 0000000..7249332 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md @@ -0,0 +1,44 @@ +--- +sidebar_label: DELETE /cards/{id}/comments/{id} +title: DELETE /cards/{cardId}/comments/{commentId} +description: 您可以在DHTMLX JavaScript看板库的文档中了解DELETE /cards/{cardId}/comments/{commentId} REST路由。浏览开发者指南和API参考,尝试代码示例和在线演示,并下载DHTMLX Kanban的免费30天试用版。 +--- + +# DELETE `/cards/{cardId}/comments/{commentId}` + +### 描述 + +@short: 从卡片中删除评论 + +此路由处理对路径 `cards/{cardId}/comments/{commentId}` 发起的**HTTP DELETE**请求。 + +### 路径参数 + +以下参数通过请求行传递: + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `cardId` | number | *必填*。要删除评论的卡片ID。 | +| `commentId` | number | *必填*。要删除的评论ID。 | + +### 请求体 + +无需请求体。 + +### 响应 + +服务器返回一个包含删除评论用户ID的json对象。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md new file mode 100644 index 0000000..b9c443d --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /cards +title: DELETE /cards +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 DELETE /cards REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版本。 +--- + +# DELETE `/cards` + +### 描述 + +@short: 删除卡片上的数据 + +该路由处理对 `/cards/{id}` 路径发起的 **HTTP DELETE** 请求。 + +### 路径参数 + +以下参数通过请求行发送: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。要删除的卡片 ID。| + +### 请求体 + +不需要请求体。 + +### 响应 + +不返回数据。HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md new file mode 100644 index 0000000..285d95d --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md @@ -0,0 +1,43 @@ +--- +sidebar_label: DELETE /cards/{id}/vote +title: DELETE /cards/{cardId}/vote +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 DELETE /cards/{cardId}/vote REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费30天评估版本。 +--- + +# DELETE `/cards/{cardId}/vote` + +### 描述 + +@short: 从卡片中移除一票,并返回包含移除该票的用户ID的 JSON 对象。 + +该路由处理发送到 `/cards/{cardId}/vote` 路径的 **HTTP DELETE** 请求。 + +### 路径参数 + +以下参数在请求行中传递: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `cardId` | number | *必需*。要移除投票的卡片ID。| + +### 请求体 + +无需请求体。 + +### 响应 + +该路由返回一个包含移除投票的用户ID的 JSON 对象。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文章**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md new file mode 100644 index 0000000..1bec336 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /columns +title: DELETE /columns +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 DELETE /columns REST 路由。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版本。 +--- + +# DELETE `/columns` + +### 描述 + +@short: 删除列上的数据 + +该路由处理对 `/columns/{id}` 路径发起的 **HTTP DELETE** 请求。 + +### 路径参数 + +以下参数在请求行中发送: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ---------------------- | +| `id` | number | *必需*。要删除的列的 ID。| + +### 请求体 + +不需要请求体。 + +### 响应 + +不返回任何数据。HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md new file mode 100644 index 0000000..57f0686 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: DELETE /links +title: DELETE /links +description: 您可以在DHTMLX JavaScript看板库的文档中了解DELETE /links REST路由。浏览开发者指南和API参考,尝试代码示例和在线演示,并下载DHTMLX看板的免费30天试用版本。 +--- + +# DELETE `/links` + +### 描述 + +@short: 删除链接上的数据 + +该路由处理发往 `/links/{id}` 路径的 **HTTP DELETE** 请求。 + +### 路径参数 + +以下参数在请求行中传递: + +| 名称 | 类型 | 描述 | +| ---- | ------- | ---------------- | +| `id` | number | *必填*。要删除的链接的ID。 | + +### 请求体 + +不需要请求体。 + +### 响应 + +不返回数据。HTTP状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: +- [与服务器交互](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md new file mode 100644 index 0000000..07bcbbb --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md @@ -0,0 +1,33 @@ +--- +sidebar_label: DELETE /rows +title: DELETE /rows +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 DELETE /rows REST 路由。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# DELETE `/rows` + +### 描述 + +@short: 删除某行(泳道)上的数据 + +此路由处理对 `/rows/{id}` 路径发起的 **HTTP DELETE** 请求。 + +### 路径参数 + +以下参数通过请求行传递: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | -------------- | +| `id` | number | *必填*。要删除的行的 ID。| + +### 请求体 + +不需要请求体。 + +### 响应 + +不返回任何数据。HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md new file mode 100644 index 0000000..fafdb04 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_cards_route.md @@ -0,0 +1,81 @@ +--- +sidebar_label: GET /cards +title: GET /cards +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 GET /cards REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# GET `/cards` + +### 描述 + +@short: 获取所有卡片的数据,并返回包含卡片对象数组的 json 对象 + +该路由处理对 `/cards` 路径发出的 **HTTP GET** 请求。 + +### 请求体 + +无需请求体。 + +### 响应 + +该路由返回一个包含所有卡片对象数组的 json 对象。 + +示例: + +~~~json +[ + { + "id": 4, + "label": "Set the tasks priorities", + "description": "", + "column": 2, + "row": 1, + "start_date": "2018-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, + { + "id": 5, + "label": "Custom icons", + "description": "", + "column": 2, + "row": 2, + "start_date": "2019-01-01T00:00:00Z", + "end_date": null, + "progress": 0, + "attached": [], + "color": "#65D3B3", + "users": [] + }, + { + "id": 6, + "label": "Integration with Gantt", + "description": "", + "column": 2, + "row": 2, + "start_date": "2020-01-01T00:00:00Z", + "end_date": null, + "progress": 75, + "attached": [], + "color": "#FFC975", + "users": [] + }, +] +~~~ + +:::note +事件的开始和结束日期应符合 ISO 格式 **yyyy-MM-dd'T'HH:mm:ss.SSSXXX** +::: + +有关返回对象的另一个示例,请参见 [**cards**](api/config/js_kanban_cards_config.md)。 + +HTTP 状态码指示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: +- [与服务器交互](guides/working_with_server.md) +- [getCards()](api/provider/rest_methods/js_kanban_getcards_method.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md new file mode 100644 index 0000000..d11018a --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_columns_route.md @@ -0,0 +1,58 @@ +--- +sidebar_label: GET /columns +title: GET /columns +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 GET /columns REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# GET `/columns` + +### 描述 + +@short: 获取所有列的数据,并返回包含列数据对象数组的 json 对象 + +该路由处理对 `/columns` 路径发起的 **HTTP GET** 请求。 + +### 请求体 + +不需要请求体。 + +### 响应 + +该路由返回一个包含列数据对象数组的 json 对象。 + +示例: + +~~~json +[ + { + "id": 1, + "label": "Backlog", + "collapsed": false + }, + { + "id": 2, + "label": "In Progress", + "collapsed": false + }, + { + "id": 3, + "label": "Testing", + "collapsed": false + }, + { + "id": 4, + "label": "Done", + "collapsed": false + } +] +~~~ + +有关返回对象的另一个示例,请参见 [**columns**](api/config/js_kanban_columns_config.md)。 + +HTTP 状态码指示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: +- [与服务器交互](guides/working_with_server.md) +- [getColumns()](api/provider/rest_methods/js_kanban_getcolumns_method.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md new file mode 100644 index 0000000..74ed55a --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_links_route.md @@ -0,0 +1,50 @@ +--- +sidebar_label: GET /links +title: GET /links +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 GET /links REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# GET `/links` + +### 描述 + +@short: 获取所有链接的数据,并返回包含链接对象数组的 json 对象 + +该路由处理对 `/links` 路径发起的 **HTTP GET** 请求。 + +### 请求负载 + +不需要请求负载。 + +### 响应 + +该路由返回一个包含所有链接对象数组的 json 对象。 + +示例: + +~~~json +[ + { + "id": 1, + "source": 2, + "target": 5, + "relation": "relatesTo", + }, + { + "id": 2, + "source": 4, + "target": 9, + "relation": "relatesTo", + }, +] +~~~ + +有关返回对象的另一个示例,请参见 [**links**](api/config/js_kanban_links_config.md)。 + +HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: +- [与服务器协作](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md new file mode 100644 index 0000000..b277bcf --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_rows_route.md @@ -0,0 +1,48 @@ +--- +sidebar_label: GET /rows +title: GET /rows +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 GET /rows REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# GET `/rows` + +### 描述 + +@short: 获取所有行的数据,并返回一个包含行(泳道)数据对象数组的 JSON 对象 + +该路由处理对 `/rows` 路径发出的 **HTTP GET** 请求。 + +### 请求体 + +不需要请求体。 + +### 响应 + +该路由返回一个包含行数据对象数组的 JSON 对象。 + +示例: + +~~~json +[ + { + "id": 1, + "label": "Feature", + "collapsed": false + }, + { + "id": 2, + "label": "Task", + "collapsed": false + } +] +~~~ + +关于返回对象的另一个示例,请参见 [**rows**](api/config/js_kanban_rows_config.md)。 + +HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: +- [与服务器交互](guides/working_with_server.md) +- [getRows()](api/provider/rest_methods/js_kanban_getrows_method.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md new file mode 100644 index 0000000..dd4dcb0 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md @@ -0,0 +1,36 @@ +--- +sidebar_label: GET /uploads +title: GET /uploads +description: 您可以在DHTMLX JavaScript看板库的文档中了解GET /uploads REST路由。浏览开发者指南和API参考,试用代码示例和在线演示,并下载DHTMLX看板的免费30天试用版。 +--- + +# GET `/uploads` + +### 描述 + +@short: 从服务器获取请求的二进制文件 + +该路由处理对路径`/uploads/{id}/{name}`发起的**HTTP GET**请求。 + +### 路径参数 + +以下参数在请求行中传递: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。所需文件的ID。| +| `name` | string | *必填*。请求文件的名称。| + +### 请求体 + +不需要请求体。 + +### 响应 + +该路由返回请求的二进制文件。 + +HTTP状态码指示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md new file mode 100644 index 0000000..8f78ab3 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/get_routes/js_kanban_get_users_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: GET /users +title: GET /users +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 GET /users REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版。 +--- + +# GET `/users` + +### 描述 + +@short: 获取所有用户的数据,并返回包含用户对象数组的 json 对象 + +该路由处理对 `/users` 路径发起的 **HTTP GET** 请求。 + +### 请求体 + +无需请求体。 + +### 响应 + +该路由返回一个包含用户数据对象数组的 json 对象。 + +示例: + +~~~json +[ + { + "id": 1, + "label": "Jhon", + "avatar": "https://serv.com/images/jhon.png" + }, + { + "id": 2, + "label": "Ben", + "avatar": "https://serv.com/images/ben.png" + }, + { + "id": 3, + "label": "Alex", + "avatar": "https://serv.com/images/alex.png" + } +] +~~~ + +有关返回对象的另一个示例,请参见 [**cardShape**](api/config/js_kanban_cardshape_config.md)。 + +HTTP 状态码指示请求是成功(response.status == 200)还是失败(response.status == 500)。 + +--- + +**相关文章**: +- [与服务器交互](guides/working_with_server.md) +- [getUsers()](api/provider/rest_methods/js_kanban_getusers_method.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md new file mode 100644 index 0000000..15b6b16 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /cards/{id}/comments +title: POST /cards/{cardId}/comments +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 POST /cards/{cardId}/comments REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版。 +--- + +# POST `/cards/{cardId}/comments` + +### 描述 + +@short: 向卡片添加新的评论,并返回包含新添加评论 ID 的 json 对象。 + +该路由处理对 `/cards/{cardId}/comments` 路径发起的 **HTTP POST** 请求。 + +### 请求体 + +服务器期望接收一个包含以下属性的 json 对象: + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `text` | string | *必填*。评论内容文本。| +| `date` | object | *必填*。评论的日期。| + +示例: + +~~~json +{ + "text": "The comment content", + "date": "2023-05-18T09:13:56.656Z", +} +~~~ + +### 响应 + +该路由返回一个包含新添加评论 ID 的 json 对象。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**:[Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md new file mode 100644 index 0000000..faa5fbe --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md @@ -0,0 +1,51 @@ +--- +sidebar_label: POST /cards +title: POST /cards +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 POST /cards REST 路由。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# POST `/cards` + +### 描述 + +@short: 创建一个新卡片并返回包含新卡片 ID 的 json 对象 + +该路由处理发送到 `/cards` 路径的 **HTTP POST** 请求。 + +### 请求体 + +服务器期望接收一个包含以下属性的 json 对象: + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ------------------ | +| `label` | string | *必填*。要添加的新卡片名称。| +| `column` | number | *必填*。目标列的 ID。| +| `row` | number | *必填*。目标行的 ID。| + +示例: + +~~~json +{ + "label": "New card", + "column": 2, + "row": 1, +} +~~~ + +### 响应 + +该路由返回一个包含新卡片 ID 的 json 对象。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md new file mode 100644 index 0000000..33aa20c --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md @@ -0,0 +1,35 @@ +--- +sidebar_label: POST /cards/{id}/vote +title: POST /cards/{cardId}/vote +description: 您可以在DHTMLX JavaScript看板库的文档中了解POST /cards/{cardId}/vote REST路由。浏览开发者指南和API参考,尝试代码示例和实时演示,并下载DHTMLX看板的免费30天试用版。 +--- + +# POST `/cards/{cardId}/vote` + +### 描述 + +@short: 向卡片添加一个新的投票,并返回包含投票用户ID的json对象 + +该路由处理针对路径`/cards/{cardId}/vote`的**HTTP POST**请求。 + +### 请求体 + +无需请求体。 + +### 响应 + +该路由返回一个包含投票用户ID的json对象。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文章**: [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md new file mode 100644 index 0000000..46ca92d --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md @@ -0,0 +1,47 @@ +--- +sidebar_label: POST /columns +title: POST /columns +description: 您可以在DHTMLX JavaScript看板库的文档中了解POST /columns REST路由。浏览开发者指南和API参考,尝试代码示例和在线演示,并下载DHTMLX看板的免费30天试用版本。 +--- + +# POST `/columns` + +### 描述 + +@short: 添加一个新列并返回包含列ID的json对象 + +该路由处理对路径`/columns`的**HTTP POST**请求。 + +### 请求体 + +服务器期望接收一个包含以下属性的json对象: + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `label` | string | *必填*。要添加的新列名称。| + +示例: + +~~~json +{ + "label": "New column", +} +~~~ + +### 响应 + +该路由返回一个包含新列ID的json对象。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md new file mode 100644 index 0000000..87936b9 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_links_route.md @@ -0,0 +1,54 @@ +--- +sidebar_label: POST /links +title: POST /links +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 POST /links REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# POST `/links` + +### 描述 + +@short: 创建一个新的链接并返回包含新链接 ID 的 json 对象 + +该路由处理对 `/links` 路径发起的 **HTTP POST** 请求。 + +### 请求体 + +服务器期望接收包含以下属性的 json 对象: + +| 名称 | 类型 | 描述 | +| ----------- | ---------------------- | ------------------ | +| `source` | *number* 或 *string* | *必需*。起始链接的 ID。 | +| `target` | *number* 或 *string* | *必需*。结束链接的 ID。 | +| `relation` | *string* | *必需*。链接创建的关系类型。 | + +示例: + +~~~json +{ + "source": 1, + "target": 2, + "relation": "relatesTo" +} +~~~ + +### 响应 + +路由返回一个包含新链接 ID 的 json 对象。 + +示例: + +~~~json +{ + "id": 1 +} +~~~ + +HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: +- [Working with server](guides/working_with_server.md) +- [getLinks()](api/provider/rest_methods/js_kanban_getlinks_method.md) +- [links](api/config/js_kanban_links_config.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md new file mode 100644 index 0000000..e31a4e3 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md @@ -0,0 +1,49 @@ +--- +sidebar_label: POST /rows +title: POST /rows +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 POST /rows REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# POST /rows + +### 描述 + +@short: 添加一行新数据,并返回包含该行 ID 的 JSON 对象。 + +此路由处理发送到 **'/rows'** 路径的 **HTTP POST** 请求。 + +### 请求负载 + +服务器期望接收一个包含以下属性的 JSON 对象: + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `label` | string | *必填项*。要添加的新行的名称。| +| `collapsed` | boolean | *可选项*。该行(泳道)的当前状态。默认情况下,行是展开的(值为 **false**)。如果为 **true**,则该行初始时为折叠状态。| + +示例: + +~~~json +{ + "label": "New row", + "collapsed": "true", +} +~~~ + +### 响应 + +该路由返回一个包含新行 ID 的 JSON 对象。 + +示例: + +~~~json +{ + "id": 2 +} +~~~ + +HTTP 状态码指示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**:[Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md new file mode 100644 index 0000000..8d264f9 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md @@ -0,0 +1,59 @@ +--- +sidebar_label: POST /uploads +title: POST /uploads +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 POST /uploads REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# POST `/uploads` + +### 描述 + +@short: 上传二进制文件到服务器,并返回包含文件 id、名称和 URL 的 json 对象 + +该路由处理发送到 `/uploads` 路径的 **HTTP POST** 多部分请求。 + +### 请求负载 + +服务器需要通过 **multipart/form-data** 请求接收二进制文件。与所有多部分 MIME 类型一样,请求体应包含: + +- **Content-Disposition** 头,需设置为 **form-data** + - **name** 属性值为 **upload** + - **filename** - 上传文件的原始文件名 +- **Content-Type** 头 - 文件数据内容的类型 + +每次请求只能发送一个文件。 + +示例: + +~~~ + +------WebKitFormBoundarySlwgXDBw7kcKSI4p +Content-Disposition: form-data; name="upload"; filename="myImage.png" +Content-Type: image/png + +------WebKitFormBoundarySlwgXDBw7kcKSI4p-- + +~~~ + +### 响应 + +该路由返回包含文件 id、名称和 URL 的 json 对象。 + +**isCover** 属性指示图片是否为封面图片(true 表示是,false 表示不是)。 + +示例: + +~~~ json +{ + "id":4, + "name":"myImage.png", + "url":"http://localhost:3000/uploads/4/myImage.png", + "isCover":false +} +~~~ + +HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md new file mode 100644 index 0000000..925638c --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md @@ -0,0 +1,56 @@ +--- +sidebar_label: PUT /cards/{id}/comments/{id} +title: PUT /cards/{cardId}/comments/{commentId} +description: 你可以在DHTMLX JavaScript看板库的文档中了解PUT /cards/{cardId}/comments/{cardId} REST路由。浏览开发者指南和API参考,尝试代码示例和在线演示,并下载DHTMLX看板的免费30天试用版。 +--- + +# PUT `/cards/{cardId}/comments/{commentId}` + +### 描述 + +@short: 更新卡片中的评论,并返回包含更新后评论ID的json对象。 + +此路由处理对路径 `cards/{cardId}/comments/{commentId}` 发起的 **HTTP PUT** 请求。 + +### 路径参数 + +以下参数通过请求路径传递: + +| 名称 | 类型 | 说明 | +| ------------ | ----------- | ------------------------------ | +| `cardId` | number | *必填*。要更新评论的卡片ID。 | +| `commentId` | number | *必填*。要更新的评论ID。 | + +### 请求体 + +服务器期望接收一个包含以下属性的json对象: + +| 名称 | 类型 | 说明 | +| ------------ | ----------- | ------------------------------ | +| `text` | string | *必填*。评论的内容文本。 | + +示例: + +~~~json +{ + "text": "The comment's content" +} +~~~ + +### 响应 + +服务器返回一个包含卡片ID的json对象。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP状态码用于指示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**:[Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md new file mode 100644 index 0000000..1a2bb96 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md @@ -0,0 +1,93 @@ +--- +sidebar_label: PUT /cards/{id}/move +title: PUT /cards/{id}/move +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /cards/{id}/move REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# PUT `/cards/{id}/move` + +### 描述 + +@short: 将卡片移动到指定位置 + +该路由处理对路径 `cards/{id}/move` 发送的 **HTTP PUT** 请求。 + +### 路径参数 + +以下参数在请求行中发送: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必需*。要移动的卡片的 ID。如果请求移动多个卡片,id 应设置为 0。| + +:::info +当移动多个卡片时,请确保 `id` 设置为 0,否则(如果设置为其他值),只会移动该指定 id 的一张卡片。 +::: + +### 请求体 + +服务器期望接收一个包含以下属性的 JSON 对象: + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `id` | number |*必需*。被移动卡片的 ID。| +| `columnId` | number | *必需*。卡片被移动到的列的 ID。| +| `rowId` | number | *必需*。卡片被移动到的行的 ID。| +| `before` | number | *可选*。被移动卡片应放置在其前面的卡片 ID。| +| `batch` | object | *多选时必需*。一个包含被移动卡片对象的数组。| + +示例: + +~~~json +{ + "id": 4, + "columnId": 2, + "rowId": 1, + "before": "7" +} +~~~ + +如果移动多个卡片,`batch` 属性应包含所有被移动卡片对象的数组: + +~~~json +{ + "batch": [ + { + "id": 2, + "columnId": 1, + "rowId": 1, + "before": "1" + }, + { + "id": 7, + "columnId": 1, + "rowId": 1, + "before": "1" + } + ] +} +~~~ + +### 响应 + +服务器返回一个包含卡片 ID 的 JSON 对象(如果只移动一张卡片)或 ID 设置为 0(针对多张卡片操作)。 + +示例: + +~~~json title="单张卡片操作的响应" +{ + "id": 4 +} +~~~ + +~~~json title="多张卡片操作的响应" +{ + "id": 0 +} +~~~ + +HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md new file mode 100644 index 0000000..fb3d0be --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md @@ -0,0 +1,71 @@ +--- +sidebar_label: PUT /cards +title: PUT /cards +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /cards REST 路由。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# PUT `/cards` + +### 描述 + +@short: 更新指定卡片的数据并返回一个空的 json 对象 + +该路由处理对 `/cards/{id}` 路径发起的 **HTTP PUT** 请求。 + +### 路径参数 + +以下参数通过请求行传递: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必需*。要更新的卡片的 ID。| + +### 请求负载 + +服务器需要接收一个包含卡片对象的 json 对象,该对象包含所有卡片属性(包括未更改的和新的/修改的)。 + +| 名称 | 类型 | 描述 | +| ------------- | ----------- | ----------- | +| `label` | string | *必需*。要更新的卡片名称。| +| `description` | string | *必需*。卡片描述。| +| `column` | number | *必需*。卡片所属列的 ID。| +| `row` | number | *必需*。卡片所属行的 ID。| +| `start_date` | string | *必需*。开始日期,ISO 格式 yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `end_date` | string | *必需*。结束日期,ISO 格式 yyyy-MM-dd'T'HH:mm:ss.SSSXXX | +| `progress` | number | *必需*。进度条数值,范围从 0 到 100。| +| `attached` | object | *必需*。包含附件文件数据的数组。对象示例请参见 [**cards**](api/config/js_kanban_cards_config.md) | +| `color` | string | *必需*。卡片顶部线条颜色,HEX 格式。| +| `priority` | number | *必需*。卡片优先级 ID。| +| `users` | object | *必需*。包含分配用户 ID 的数组。对象示例请参见 [**cardShape**](api/config/js_kanban_cardshape_config.md) | + +示例: + +~~~json +{ + "card": { + "label": "Drag and drop", + "description": "", + "column": 3, + "row": 1, + "start_date": null, + "end_date": "2018-01-01T00:00:00Z", + "progress": 100, + "attached": [], + "color": "#58C3FE", + "priority": 2, + "users": [] + }, +} +~~~ + +您可以在 [**cards**](api/config/js_kanban_cards_config.md) 部分找到另一个卡片对象示例。 + +### 响应 + +成功时,返回一个空的 json 对象。 + +HTTP 状态码表示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md new file mode 100644 index 0000000..a329149 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /columns/{id}/move +title: PUT /columns/{id}/move +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /columns/{id}/move REST 路由。浏览开发者指南和 API 参考,尝试代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天试用版。 +--- + +# PUT `/columns/{id}/move` + +### 描述 + +@short: 通过将列移动到指定位置来更改列的位置。 + +此路由处理发送到 `columns/{id}/move` 的 **HTTP PUT** 请求。 + +### 路径参数 + +请求 URL 中包含以下参数: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。要移动的列的标识符。| + +### 请求体 + +服务器期望接收一个包含以下属性的 JSON 对象: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `before` | number | *可选*。要将移动的列放置在其前面的列的 ID。| + +示例: + +~~~json +{ + "before": 3 +} +~~~ + +### 响应 + +服务器返回一个 JSON 对象,指示被移动列的 ID。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 状态码表示请求的结果:状态码 200 表示成功,500 表示发生错误。 + +--- + +**相关文档**:[Working with server](/guides/working_with_server.md) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md new file mode 100644 index 0000000..58f1b90 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /columns +title: PUT /columns +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /columns REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# PUT `/columns` + +### 描述 + +@short: 更新指定列的数据并返回一个空的 json 对象 + +该路由处理发送到 `/columns/{id}` 路径的 **HTTP PUT** 请求。 + +### 路径参数 + +以下参数在请求行中传递: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必填*。要更新的列的 ID。| + +### 请求负载 + +服务器需要接收一个包含所有列属性(包括未更改和新/修改的)的 json 对象。 + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `label` | string | *必填*。要更新的列的名称。| +| `collapsed`| boolean | *可选*。列的状态:如果列初始折叠则为 **true**,展开状态为 **false**(默认值)。| + +示例: + +~~~json +{ + "column": { + "label": "Column 1", + "collapsed": false, + } +} +~~~ + +您可以在 [**columns**](api/config/js_kanban_columns_config.md) 部分找到另一个列对象的示例。 + +### 响应 + +如果请求成功,将返回一个空的 json 对象。 + +HTTP 状态码显示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md new file mode 100644 index 0000000..db2e7ca --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md @@ -0,0 +1,55 @@ +--- +sidebar_label: PUT /rows/{id}/move +title: PUT /rows/{id}/move +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解 PUT /rows/{id}/move REST 路由。浏览开发者指南和 API 参考,试用代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天试用版。 +--- + +# PUT `/rows/{id}/move` + +### 描述 + +@short: 将一行移动到指定位置 + +该路由处理对 `rows/{id}/move` 路径发起的 **HTTP PUT** 请求。 + +### 路径参数 + +以下参数在请求行中传递: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必需*. 要移动的行的 ID。| + +### 请求体 + +服务器期望接收一个包含以下属性的 JSON 对象: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `before` | number | *可选*. 移动的行应放置在该 ID 行之前。| + +示例: + +~~~json +{ + "before": 3 +} +~~~ + +### 响应 + +服务器返回一个包含被移动行 ID 的 JSON 对象。 + +示例: + +~~~json +{ + "id": 4 +} +~~~ + +HTTP 状态码显示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [Working with server](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md new file mode 100644 index 0000000..f9f8083 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md @@ -0,0 +1,53 @@ +--- +sidebar_label: PUT /rows +title: PUT /rows +description: 您可以在 DHTMLX JavaScript 看板库的文档中了解 PUT /rows REST 路由。浏览开发者指南和 API 参考,试用代码示例和实时演示,并下载 DHTMLX 看板的免费 30 天评估版本。 +--- + +# PUT `/rows` + +### 描述 + +@short: 更新指定行(泳道)上的数据并返回一个空的 json 对象 + +该路由处理对 `/rows/{id}` 路径发起的 **HTTP PUT** 请求。 + +### 路径参数 + +以下参数在请求行中传递: + +| 名称 | 类型 | 描述 | +| ---------- | ----------- | ----------- | +| `id` | number | *必需*。要更新的行(泳道)的 ID。| + +### 请求负载 + +服务器需要接收一个包含所有行属性(包括未改变的和新的/修改过的)的 json 对象。 + +| 名称 | 类型 | 描述 | +| ----------- | ----------- | ----------- | +| `label` | string | *必需*。要更新的行名称。| +| `collapsed` | boolean | *可选*。行的状态:如果行初始折叠则为 **true**,如果展开则为 **false**(默认)。| + +示例: + +~~~json +{ + "row": { + "label": "Row 1", + "collapsed": false, + } +} +~~~ + +您可以在 [**rows**](api/config/js_kanban_rows_config.md) 部分找到另一个行对象示例。 + +### 响应 + +成功时,返回一个空的 json 对象。 + +HTTP 状态码显示请求是否成功(response.status == 200)或失败(response.status == 500)。 + +--- + +**相关文档**: [与服务器交互](guides/working_with_server.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png b/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png new file mode 100755 index 0000000..247c695 Binary files /dev/null and b/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_board.png differ diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png b/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png new file mode 100755 index 0000000..525d0d0 Binary files /dev/null and b/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_editor.png differ diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png b/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png new file mode 100644 index 0000000..f6aa948 Binary files /dev/null and b/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_main.png differ diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png b/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png new file mode 100755 index 0000000..4c79b7f Binary files /dev/null and b/i18n/zh/docusaurus-plugin-content-docs/current/assets/js_kanban_toolbar.png differ diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/assets/trial_kanban.png b/i18n/zh/docusaurus-plugin-content-docs/current/assets/trial_kanban.png new file mode 100644 index 0000000..e71d948 Binary files /dev/null and b/i18n/zh/docusaurus-plugin-content-docs/current/assets/trial_kanban.png differ diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png b/i18n/zh/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png new file mode 100644 index 0000000..555b3f1 Binary files /dev/null and b/i18n/zh/docusaurus-plugin-content-docs/current/assets/trial_kanban_advanced.png differ diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/configuration.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/configuration.md new file mode 100644 index 0000000..4dc30ab --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/configuration.md @@ -0,0 +1,577 @@ +--- +sidebar_label: 配置 +title: 配置 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解配置方法。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX Kanban 30 天试用版。 +--- + +# 配置 + +您可以通过相应的 API 配置 *Kanban* 的外观和功能。可用的参数允许您: + +- 通过 [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性配置卡片外观 +- 通过 [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性配置编辑器字段 +- 通过 [`editor`](api/config/js_kanban_editor_config.md) 属性配置编辑器行为 +- 通过 [`renderType`](api/config/js_kanban_rendertype_config.md) 和 [`scrollType`](api/config/js_kanban_scrolltype_config.md) 属性配置渲染和滚动 +- 通过 [`history`](api/config/js_kanban_history_config.md) 属性配置 Kanban 历史记录 +- 通过 [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) 属性自定义卡片外观 + - *详细信息请参见[**自定义**](guides/customization.md)章节!* +- 通过 [`locale`](api/config/js_kanban_locale_config.md) 属性应用所需的本地化 + - *详细信息请参见[**本地化**](guides/localization.md)章节!* +- 通过相应的 [`cards`](api/config/js_kanban_cards_config.md)、[`columns`](api/config/js_kanban_columns_config.md)、[`rows`](api/config/js_kanban_rows_config.md) 和 [`links`](api/config/js_kanban_links_config.md) 属性加载卡片、列、行和链接数据 + - *详细信息请参见[**数据操作**](guides/working_with_data.md)章节!* + +## 卡片 + +Kanban 看板由分布在*列*和*行*中的*卡片*组成。您可以使用 [`cardShape`](api/config/js_kanban_cardshape_config.md) 配置属性设置卡片外观。可以包含(或排除)到卡片模板中的预定义字段有: + +- 通过 `label: boolean` 配置卡片标题 +- 通过 `description: boolean` 配置卡片描述 + + :::tip + 您可以通过 Kanban 编辑器的相应输入框管理任意卡片的**标题**和**描述**字段。如果启用这些字段,相应的输入框会自动在编辑器中显示。要配置这些输入框,可以使用[**text** 和 **textarea**](#text-和-textarea-类型) 类型。 + ::: + +- 通过 `progress: boolean` 配置卡片进度 + + :::tip + 您可以通过 Kanban 编辑器的相应控件管理任意卡片的**进度**字段。如果启用此字段,相应的控件会自动在编辑器中显示。要配置该控件,可以使用[**progress**](#progress-类型) 类型。 + ::: + +- 通过 `start_date: boolean` 配置开始日期 +- 通过 `end_date: boolean` 配置结束日期 + + :::tip + 您可以通过 Kanban 编辑器的相应控件管理任意卡片的**开始日期**和**结束日期**字段。如果启用这些字段,相应的控件会自动在编辑器中显示。要配置这些控件,可以使用[**date**](#date-和-daterange-类型) 类型。 + ::: + +- 通过 `menu: boolean` 配置卡片右键菜单 +- 通过 `attached: boolean` 配置卡片附件 + + :::tip + 您可以通过 Kanban 编辑器的相应字段**添加文件**到任意卡片。要配置该字段,可以使用[**files**](#files-类型) 类型。 + ::: + +- 通过 `color: boolean` 配置卡片颜色 + + :::tip + 您可以通过 Kanban 编辑器的相应控件管理卡片的**顶部颜色线**。如果启用**color**,相应的控件(*colorpicker*)会自动在编辑器中显示。要配置该控件,可以使用[**color**](#color-类型) 类型。 + ::: + +- 通过 `cover: boolean` 配置卡片封面(预览图片) +- 通过 `comments: boolean` 配置卡片评论 +- 通过 `confirmDeletion: boolean` 配置删除卡片时的确认对话框 +- 通过 `votes: boolean | { show: boolean, clicable: true }` 配置卡片投票 +- 通过 `users: boolean | { show: boolean, values: object, maxCount: number | false }` 配置卡片指派用户 + + :::tip + 您可以通过 Kanban 编辑器的相应控件为任意卡片指派一个或多个用户。要配置指派单个用户的控件,使用[**combo** 或 **select**](#comboselect-和-multiselect-类型) 类型;要指派多个用户,使用[**multiselect**](#comboselect-和-multiselect-类型) 类型。 + ::: + +- 通过 `priority: boolean | { show: boolean, values: object }` 配置卡片优先级 + + :::tip + 您可以通过 Kanban 编辑器的相应控件管理卡片的**优先级**。如果启用**priority**,相应控件会自动在编辑器中显示。要配置该控件,仅可使用[**combo** 或 **select**](#comboselect-和-multiselect-类型) 类型。 + ::: + +- *自定义字段* 通过 `headerFields: [ { key: string, label: string, css: string } ]` 配置 + +~~~jsx {12-35,42} +const users = [ // 用户数据 + { id: 1, label: "John Smith", avatar: "../assets/user.jpg" }, + { id: 2, label: "Aaron Short" } +]; + +const cardPriority = [ // 卡片优先级数据 + { id: 1, color: "#FF5252", label: "high" }, + { id: 2, color: "#FFC975", label: "medium" }, + { id: 3, color: "#0AB169", label: "low" } +]; + +const cardShape = { // 卡片设置 + label: true, + description: true, + progress: true, + start_date: true, + end_date: true, + menu: true, + attached: true, + priority: { + show: true, + values: cardPriority + }, + users: { + show: true, + values: users + }, + headerFields: [ + { + key: "sprint", + label: "Custom field", + css: "custom_css_class" + } + ] +}; + +new kanban.Kanban("#root", { + // 卡片数据 + columns, + cards, + // 卡片设置 + cardShape +}); +~~~ + +:::note +如果未通过 [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性指定卡片设置,控件将应用 [**defaultCardShape**](api/config/js_kanban_cardshape_config.md#default-config) 默认参数集! +::: + +## 编辑器 + +:::info +您可以通过 [`editor.placement`](api/config/js_kanban_editor_config.md) 属性将编辑器显示为**侧边栏**或**模态窗口**! +::: + +Kanban 的*编辑器*由用于管理卡片数据的字段组成。要配置编辑器字段(控件),可使用 [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性。可用的编辑器字段类型包括: + +- [**combo**、**select** 和 **multiselect**](#comboselect-和-multiselect-类型) +- [**color**](#color-类型) +- [**text** 和 **textarea**](#text-和-textarea-类型) +- [**progress**](#progress-类型) +- [**files**](#files-类型) +- [**date** 和 **dataRange**](#date-和-daterange-类型) +- [**comments**](#comments-类型) +- [**links**](#links-类型) + +### Combo、Select 和 Multiselect 类型 + +**combo**、**select** 和 **multiselect** 类型的编辑器字段可以如下设置: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", // 或 "select" 和 "multiselect" + key: "priority", // 配置 "cardShape" 属性时使用的 "priority" 键 + label: "Priority", + values: [ + { id: 1, label: "high" }, + { id: 2, label: "medium" }, + { id: 3, label: "low" } + ] + }, + // 其他字段设置 + ] +}); +~~~ + +:::info +对于 **"multiselect"** 和 **"combo"** 类型的编辑器字段,还可以通过 **avatar** 属性指定预览图片路径: + +~~~jsx {3,9,13} +editorShape: [ + { + type: "multiselect", // 或 "combo" + key: "users", // 配置 "cardShape" 属性时使用的 "users" 键 + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + { + id: 2, label: "John", + avatar: "preview_image_path_2.png" + } + ] + }, + // 其他字段设置 +] +~~~ + +[**Kanban. 限制仅分配一个用户**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban) +::: + +### Color 类型 + +**color** 类型的编辑器字段可按以下方式设置: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "color", + key: "color", // 配置 "cardShape" 属性时使用的 "color" 键 + label: "Card color", + values: ["#65D3B3", "#FFC975", "#58C3FE"], + config: { + clear: true, + placeholder: "Select color" + } + }, + // 其他字段设置 + ] +}); +~~~ + +### Text 和 Textarea 类型 + +**text** 和 **textarea** 类型的编辑器字段可如下设置: + +~~~jsx {3-14} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "text", // 或 "textarea" + key: "label", + label: "Label", + config: { + placeholder: "Type your tips here", + readonly: false, + focus: true, + disabled: false, + inputStyle: "height: 50px;" + } + }, + // 其他字段设置 + ] +}); +~~~ + +### Progress 类型 + +**progress** 类型的编辑器字段可如下设置: + +~~~jsx {3-12} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "progress", + key: "progress", // 配置 "cardShape" 属性时使用的 "progress" 键 + label: "Progress", + config: { + min: 10, + max: 90, + step: 5 + } + }, + // 其他字段设置 + ] +}); +~~~ + +### Files 类型 + +**files** 类型的编辑器字段可如下设置: + +#### 以字符串配置上传地址 + +~~~jsx {4-15} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + { + type: "files", + key: "attached", // 配置 "cardShape" 属性时使用的 "attached" 键 + label: "Attachment", + uploadURL: url + "/uploads", // 以字符串指定 url + config: { + accept: "image/*", // "video/*", "audio/*" + disabled: false, + multiple: true, + folder: false + } + }, + // 其他字段设置 + ] +}); +~~~ + +#### 以函数配置上传地址 + +~~~jsx {9-31} +const url = "https://docs.dhtmlx.com/kanban-backend"; +new kanban.Kanban("#root", { + editorShape: [ + ...defaultEditorShape, + { + key: "attached", + type: "files", + label: "Files", + uploadURL: rec => { + const formData = new FormData(); + formData.append("upload", rec.file); + + const config = { + method: "POST", + body: formData, + headers: { + 'Authorization': 'Bearer ' + token // token 或其他 header + } + }; + + return fetch(url + "/uploads", config) // URL + .then(res => res.json()) + .then( + data => { + rec.id = data.id; + return data; + }, + () => ({ id: rec.id, status: "error" }) + ) + .catch(); + } + } + ] +}); +~~~ + +### Date 和 DateRange 类型 + +**date** 类型的编辑器字段可如下设置: + +~~~jsx {3-8} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "date", + key: "start_date", + label: "Start date", + format: "%d/%m/%y" + }, + // 其他字段设置 + ] +}); +~~~ + +**dateRange** 类型的编辑器字段可如下设置: + +~~~jsx {3-11} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "dateRange", + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range", + format: "%d/%m/%y" + }, + // 其他字段设置 + ] +}); +~~~ + +### Comments 类型 + +**comments** 类型的编辑器字段可如下设置: + +~~~jsx {3-13} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "comments", + key: "comments", + label: "Comments", + config: { + dateFormat: "%M %d", + placement: "page", // 或 "editor" + html: true, + confirmDeletion: true + } + }, + // 其他字段设置 + ] +}); +~~~ + +### Links 类型 + +**links** 类型的编辑器字段可如下设置: + +~~~jsx {3-10} +new kanban.Kanban("#root", { + editorShape: [ + { + type: "links", + key: "links", + label: "Links", + config: { + confirmDeletion: true + } + }, + // 其他字段设置 + ] +}); +~~~ + +### 绑定编辑器字段与卡片字段 + +:::info +要将编辑器字段与对应的卡片字段关联,需要在 [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性对象中提供特殊的 **key**(`key: "editor_field_key"`)。该 key 的值需在 [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性中设置为 *true*(内置卡片字段)或在 **headerFields** 数组中指定(自定义卡片字段)。您也可以通过该 key 提供任何字段的初始数据。 + +~~~jsx {5,13,22,25,33-34,38-39,45-47} +// 编辑器设置 +const editorShape = [ + { + type: "text", + key: "label", + label: "Label", + config: { + placeholder: "Enter new label here" + } + }, + { + type: "textarea", + key: "note", + label: "Note", + config: { + placeholder: "Enter usefull note here" + } + } +]; +// 卡片设置 +const cardShape = { + label: true, // 内置字段的 key + headerFields: [ + { + key: "note", // 自定义字段的 key + label: "Note" + } + ] +}; +// 卡片数据 +const cards = [ + { + label: "Volvo", + note: "It is the swedish car", + column: "backlog" + }, + { + label: "Audi", + note: "It is the german car", + column: "backlog" + } +]; +// 创建 Kanban +new kanban.Kanban("#root", { + editorShape, + cardShape, + cards, + columns + // 其他配置参数 +}); +~~~ +::: + +:::note +如果未通过 [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性指定编辑器设置,控件将应用 [**defaultEditorShape**](api/config/js_kanban_editorshape_config.md#default-config) 默认参数集。在这种情况下,仅在通过 [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性激活卡片的对应字段后,默认控件和输入框才会在编辑器中显示。 +::: + +### 编辑器的配置 + +通过 [`editor`](api/config/js_kanban_editor_config.md) 属性,您可以如下配置编辑器: + +- 通过 *`editor.autoSave`* 属性启用/禁用编辑器的自动保存模式 +- 通过 *`editor.debounce`* 属性指定自动保存数据的延迟时间(仅在***autoSave: true*** 参数下有效) + +~~~jsx {6-9} +// 创建 Kanban +new kanban.Kanban("#root", { + columns, + cards, + editorShape, + editor: { + autoSave: true, + debounce: 2000 + } + // 其他参数 +}); +~~~ + +## 工具栏 + +Kanban 的**工具栏**包含用于*搜索卡片*的搜索框、*排序卡片*的控件以及*新增列和行*的控件。要显示工具栏,需要使用 **kanban.Toolbar()** 构造函数在独立容器中初始化。 + +~~~jsx {13} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + // 数据 + columns, + cards, + rows, + // 卡片设置 + cardShape, + // 编辑器设置 + editorShape +}); + +new kanban.Toolbar("#toolbar", { api: board.api }); +~~~ + +您可以通过 **items** 属性管理(隐藏/显示/自定义)工具栏控件: + +~~~jsx {6-51} +// 创建 Kanban +const board = new kanban.Kanban("#root", {...}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + { // 自定义搜索栏 + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ], + resultTemplate: kanban.template(searchResult => { + return `
+
${searchResult.result.label}
+ ${searchResult.result.description ? `
${searchResult.result.description}
` : ""} +
` + }) + }, + "spacer", // 空白 + "undo", // 历史记录撤销卡片操作 + "redo", // 历史记录重做卡片操作 + { // 自定义排序控件 + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", // 添加新列 + "addRow", // 添加新行 + // 自定义元素 + ] +}); +~~~ + +:::tip +如需隐藏部分工具栏控件,只需从 **items** 数组中移除相应字符串即可。 +::: + +## 示例 + +在下面的代码片段中,您可以看到如何配置 Kanban 的**卡片**、**编辑器**和**工具栏**: + + \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/customization.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/customization.md new file mode 100644 index 0000000..6ca7369 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/customization.md @@ -0,0 +1,42 @@ +--- +sidebar_label: 自定义 +title: 自定义 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解自定义相关内容。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版本。 +--- + +# 自定义 + +除了配置 Kanban 以外,您还可以自定义其外观和行为。该组件允许您为卡片指定自定义模板、修改卡片、列和行的右键菜单、调整工具栏结构及功能,并为 Kanban 应用自定义 CSS 样式。 + +## 自定义卡片 + +要通过自定义模板展示卡片,您可以使用 [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) 属性。它是一个回调函数,允许您定义所需的样式和逻辑,并应用到 Kanban 上。请参见以下示例代码: + + + +## 自定义右键菜单 + +要自定义卡片、列和行的右键菜单,您可以分别使用 [`cardShape`](api/config/js_kanban_cardshape_config.md)、[`columnShape`](api/config/js_kanban_columnshape_config.md) 和 [`rowShape`](api/config/js_kanban_rowshape_config.md) 属性。请参见以下示例代码: + + + +## 自定义工具栏 + +要自定义工具栏的结构及其功能,您可以使用 [`items`](api/config/toolbar_items_config.md) 属性。在该配置的数组中,您可以定义所需的控件、按期望顺序排列它们,并修改它们的行为。 + +在下面的示例中,您可以看到如何自定义以下内容: + +- 控件排列顺序 +- 搜索栏及其行为 +- 排序控件及其行为 +- 自定义控件及其行为 + + + +## 自定义样式 + +您可以通过更改相应 *CSS 变量* 的值来自定义 Kanban 的外观。详细内容请参考 [**样式化**](guides/stylization.md) 部分。 + +以下示例展示了如何为 Kanban 应用自定义样式: + + \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/initialization.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/initialization.md new file mode 100644 index 0000000..1f38c88 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/initialization.md @@ -0,0 +1,91 @@ +--- +sidebar_label: 初始化 +title: 初始化 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解初始化相关内容。浏览开发者指南和 API 参考,试用代码示例和在线演示,并免费下载 DHTMLX Kanban 的 30 天评估版。 +--- + +# 初始化 + +本指南将为您详细介绍如何在页面上创建 Kanban,以便为您的应用程序添加看板功能。请按照以下步骤操作,以获得可用的组件: + +1. [在页面中引入 Kanban 源文件](#引入源文件)。 +2. [创建 Kanban 的容器](#创建容器)。 +3. [使用构造函数初始化 Kanban](#初始化-kanban)。 + +## 引入源文件 + +[下载软件包](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml)并将其解压到您的项目文件夹中。 + +要创建 Kanban,您需要在页面中引入 2 个源文件: + +- *kanban.js* +- *kanban.css* + +请确保为源文件设置了正确的相对路径: + +~~~html title="index.html" + + +~~~ + +## 创建容器 + +为 Kanban 添加一个容器,并为其指定一个 ID,例如 *"root"*: + +~~~jsx title="index.html" +
+~~~ + +如果您希望同时创建带有 *Toolbar* 的控件,需要为其单独添加一个容器: + +~~~jsx {1} title="index.html" +
// Toolbar 的容器 +
// Kanban 的容器 +~~~ + +## 初始化 Kanban + +使用 **kanban.Kanban** 构造函数初始化 Kanban。它接受两个参数: + +- 一个 HTML 容器(HTML 容器的 ID) +- 一个包含配置属性的对象。[完整属性列表见此处](#配置属性) + +~~~jsx title="index.html" +// 创建 Kanban +new kanban.Kanban("#root", { + // 配置属性 +}); +~~~ + +如果您希望同时创建带有 *Toolbar* 的控件,需要使用 **kanban.Toolbar** 构造函数单独初始化 Toolbar。它同样接受两个参数: + +- 一个 HTML 容器(HTML 容器的 ID) +- 一个包含配置属性的对象 + +~~~jsx {6-8} title="index.html" +// 创建 Kanban +const board = new kanban.Kanban("#root", { + // 配置属性 +}); + +new kanban.Toolbar("#toolbar", { + // 配置属性 +}); +~~~ + +:::info +如需了解更多关于 Kanban Toolbar 配置的信息,请阅读 [**配置**](guides/configuration.md/#toolbar) 章节 +::: + +### 配置属性 + +:::note +配置 **Kanban** 的完整属性列表可在[**此处**](api/overview/properties_overview.md)查看。
+配置 **Kanban Toolbar** 的完整属性列表可在[**此处**](api/overview/toolbar_properties_overview.md)查看。 +::: + +## 示例 + +在以下代码片段中,您可以看到如何通过初始数据初始化 **Kanban**: + + \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration.md new file mode 100644 index 0000000..231d7fe --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration.md @@ -0,0 +1,17 @@ +--- +sidebar_label: 与DHTML小部件集成 +title: 与DHTML小部件集成 +description: 您可以在DHTMLX JavaScript Kanban库的文档中了解集成方法。浏览开发者指南和API参考,试用代码示例和在线演示,并免费下载DHTMLX Kanban的30天试用版。 +--- + +# 与DHTML小部件集成 + +您可以将DHTMLX Kanban与其他DHTMLX小部件集成使用(例如,[Gantt](https://docs.dhtmlx.com/gantt/)、[Scheduler](https://docs.dhtmlx.com/scheduler/)、[To Do List](https://docs.dhtmlx.com/todolist/))。请参考以下示例。 + +## 与DHTMLX Gantt和Scheduler的集成 + + + +## 与DHTMLX To Do List的集成 + + \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md new file mode 100644 index 0000000..5a289b7 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_angular.md @@ -0,0 +1,388 @@ +--- +sidebar_label: 与 Angular 的集成 +title: 与 Angular 的集成 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解与 Angular 的集成。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版。 +--- + +# 与 Angular 的集成 + +:::tip +在阅读本篇文档前,您应熟悉 **Angular** 的基本概念和模式。如需回顾相关知识,请参考 [**Angular documentation**](https://v17.angular.io/docs)。 +::: + +DHTMLX Kanban 与 **Angular** 兼容。我们已经准备了如何在 **Angular** 中使用 DHTMLX Kanban 的代码示例。更多信息请参阅对应的 [**GitHub 示例**](https://github.com/DHTMLX/angular-kanban-demo)。 + +## 创建项目 + +:::info +在开始创建新项目之前,请先安装 [**Angular CLI**](https://v17.angular.io/cli) 和 [**Node.js**](https://nodejs.org/en/)。 +::: + +使用 Angular CLI 创建一个新的 **my-angular-kanban-app** 项目。请运行以下命令: + +~~~json +ng new my-angular-kanban-app +~~~ + +:::note +如果您希望按照本指南操作,请在创建新的 Angular 应用时禁用服务端渲染(SSR)和静态站点生成(SSG/Prerendering)! +::: + +上述命令会安装所有必要工具,无需额外运行其他命令。 + +### 安装依赖 + +进入新创建的应用目录: + +~~~json +cd my-angular-kanban-app +~~~ + +安装依赖并启动开发服务器。为此,请使用 [**yarn**](https://yarnpkg.com/) 包管理器: + +~~~json +yarn +yarn start +~~~ + +应用将会在本地(例如 `http://localhost:3000`)运行。 + +## 创建 Kanban + +接下来需要获取 DHTMLX Kanban 的源代码。首先,停止当前应用并开始安装 Kanban 包。 + +### 步骤 1. 安装包 + +下载 [**试用版 Kanban 包**](/how_to_start/#通过-npm-或-yarn-安装-kanban),并按照 README 文件中的步骤进行操作。请注意,试用版 Kanban 仅可使用 30 天。 + +### 步骤 2. 创建组件 + +现在需要创建一个 Angular 组件,将 Kanban 和 Toolbar 添加到应用中。在 **src/app/** 目录下创建 **kanban** 文件夹,并在其中新建一个名为 **kanban.component.ts** 的文件。 + +#### 导入源文件 + +打开 **kanban.component.ts** 文件并导入 Kanban 源文件。请注意: + +- 如果您使用 PRO 版本并从本地文件夹安装 Kanban 包,导入路径如下: + +~~~jsx +import { Kanban, Toolbar } from 'dhx-kanban-package'; +~~~ + +- 如果您使用 Kanban 的试用版,请指定如下路径: + +~~~jsx +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +~~~ + +本教程展示了如何配置 **trial** 版本的 Kanban。 + +#### 设置容器并初始化带有 Toolbar 的 Kanban + +要在页面上显示带有 Toolbar 的 Kanban,需要为 Kanban 和 Toolbar 设置容器,并使用相应的构造函数初始化这些组件: + +~~~jsx {1,8-11,15-18,24-31} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", // 在 "app.component.ts" 文件中以 形式使用的模板名 + styleUrls: ["./kanban.component.css"], // 引入 css 文件 + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + // 初始化 Toolbar 容器 + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + // 初始化 Kanban 容器 + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + // 初始化 Kanban 组件 + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + // 初始化 Toolbar 组件 + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // 其他配置属性 + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); // 销毁 Kanban + this._toolbar.destructor(); // 销毁 Toolbar + } +} +~~~ + +#### 添加样式 + +为了正确显示 Kanban,需要提供相应的样式。为此,您可以在 **src/app/kanban/** 目录下创建 **kanban.component.css** 文件,并为 Kanban 及其容器指定必要样式: + +~~~css title="kanban.component.css" +/* 导入 Kanban 样式 */ +@import "@dhx/trial-kanban/dist/kanban.css"; + +/* 为初始页面指定样式 */ +html, +body{ + height: 100%; + padding: 0; + margin: 0; +} + +/* 为 Kanban 和 Toolbar 容器指定样式 */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* 为 Kanban 容器指定样式 */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### 加载数据 + +要向 Kanban 添加数据,需要提供一组数据。您可以在 **src/app/kanban/** 目录下创建 **data.ts** 文件,并在其中添加一些数据: + +~~~jsx {2,14,37,48} title="data.ts" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +然后打开 ***kanban.component.ts*** 文件。导入数据文件,并在 `ngOnInit()` 方法中将相应的数据属性指定到 Kanban 的配置对象,如下所示: + +~~~jsx {2,23,25-27} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // 导入数据 +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // 初始化数据属性 + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns, // 应用列数据 + cards, // 应用卡片数据 + rows, // 应用行数据 + rowKey: "type", + // 其他配置属性 + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // 其他配置属性 + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +您还可以在 Angular 的 `ngOnInit()` 方法中使用 [`parse()`](/api/methods/js_kanban_parse_method/) 方法将数据加载到 Kanban。 + +~~~jsx {2,23,37-42} title="kanban.component.ts" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import { getData } from "./data"; // 导入数据 +import { Component, ElementRef, OnInit, ViewChild, OnDestroy, ViewEncapsulation} from '@angular/core'; + +@Component({ + encapsulation: ViewEncapsulation.None, + selector: "kanban", + styleUrls: ["./kanban.component.css"], + template: `
+
+
+
` +}) + +export class KanbanComponent implements OnInit, OnDestroy { + @ViewChild("toolbar_container", { static: true }) toolbar_container!: ElementRef; + @ViewChild("kanban_container", { static: true }) kanban_container!: ElementRef; + + private _kanban!: Kanban; + private _toolbar!: Toolbar; + + ngOnInit() { + const { cards, columns, rows } = getData(); // 初始化数据属性 + this._kanban = new Kanban(this.kanban_container.nativeElement, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // 其他配置属性 + }); + + this._toolbar = new Toolbar(this.toolbar_container.nativeElement, { + api: this._kanban.api, + // 其他配置属性 + }); + + // 通过 parse() 方法应用数据 + this._kanban.parse({ + columns, + cards, + rows + }); + } + + ngOnDestroy(): void { + this._kanban.destructor(); + this._toolbar.destructor(); + } +} +~~~ + +`parse(data)` 方法可在每次更改时重新加载数据。 + +现在 Kanban 组件已经可以使用。当该元素被添加到页面时,会自动初始化带有数据的 Kanban。您还可以根据需要提供其他配置设置。请访问我们的 [Kanban API 文档](/api/overview/properties_overview/) 查看所有可用属性的完整列表。 + +#### 事件处理 + +当用户在 Kanban 上执行某些操作时,会触发事件。您可以利用这些事件检测操作并执行所需代码。参阅 [完整事件列表](/api/overview/events_overview/)。 + +打开 **kanban.component.ts** 文件,并按以下方式补充 `ngOnInit()` 方法: + +~~~jsx {5-7} title="kanban.component.ts" +// ... +ngOnInit() { + this._kanban = new Kanban(this.kanban_container.nativeElement, {}); + + this._kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); +} + +ngOnDestroy(): void { + this._kanban.destructor(); +} +~~~ + +### 步骤 3. 将 Kanban 添加到应用中 + +要将 ***KanbanComponent*** 组件添加到您的应用中,请打开 ***src/app/app.component.ts*** 文件,并用以下内容替换默认代码: + +~~~jsx {5} title="app.component.ts" +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + template: `` +}) +export class AppComponent { + name = ""; +} +~~~ + +然后在 ***src/app/*** 目录下创建 ***app.module.ts*** 文件,并按如下方式指定 *KanbanComponent*: + +~~~jsx {4-5,8} title="app.module.ts" +import { NgModule } from "@angular/core"; +import { BrowserModule } from "@angular/platform-browser"; + +import { AppComponent } from "./app.component"; +import { KanbanComponent } from "./kanban/kanban.component"; + +@NgModule({ + declarations: [AppComponent, KanbanComponent], + imports: [BrowserModule], + bootstrap: [AppComponent] +}) +export class AppModule {} +~~~ + +最后一步,打开 ***src/main.ts*** 文件,并用以下内容替换现有代码: + +~~~jsx title="main.ts" +import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; +import { AppModule } from "./app/app.module"; +platformBrowserDynamic() + .bootstrapModule(AppModule) + .catch((err) => console.error(err)); +~~~ + +此后,您即可启动应用,在页面上看到加载了数据的 Kanban。 + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Angular + +现在您已经了解如何将 DHTMLX Kanban 集成到 Angular 中。您可以根据具体需求自定义代码。最终的高级示例可在 [**GitHub**](https://github.com/DHTMLX/angular-kanban-demo) 查看。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_react.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_react.md new file mode 100644 index 0000000..cc2da18 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_react.md @@ -0,0 +1,337 @@ +--- +sidebar_label: 与 React 集成 +title: 与 React 集成 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解与 React 的集成。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版。 +--- + +# 与 React 集成 + +:::tip +在阅读本篇文档之前,您应当熟悉 [**React**](https://react.dev) 的基本概念和模式。如需复习相关知识,请参考 [**React 官方文档**](https://react.dev/learn)。 +::: + +DHTMLX Kanban 支持与 **React** 集成。我们已准备了如何在 **React** 中使用 DHTMLX Kanban 的代码示例。更多信息请参考 [**GitHub 示例**](https://github.com/DHTMLX/react-kanban-demo)。 + +## 创建项目 + +:::info +在开始创建新项目之前,请先安装 [**Vite**](https://vite.dev/)(可选)和 [**Node.js**](https://nodejs.org/en/)。 +::: + +您可以创建一个基础的 **React** 项目,或使用 **React + Vite**。我们将项目命名为 **my-react-kanban-app**: + +~~~json +npx create-react-app my-react-kanban-app +~~~ + +### 安装依赖 + +进入新创建的应用目录: + +~~~json +cd my-react-kanban-app +~~~ + +安装依赖并启动开发服务器。您可以根据使用的包管理器选择命令: + +- 如果使用 [**yarn**](https://yarnpkg.com/),运行以下命令: + +~~~json +yarn +yarn start +~~~ + +- 如果使用 [**npm**](https://www.npmjs.com/),运行以下命令: + +~~~json +npm install +npm run dev +~~~ + +应用会在本地服务器上运行(例如 `http://localhost:3000`)。 + +## 创建 Kanban + +现在您需要获取 DHTMLX Kanban 的源代码。首先,停止应用并安装 Kanban 包。 + +### 步骤 1. 安装包 + +下载 [**试用版 Kanban 包**](/how_to_start/#通过-npm-或-yarn-安装-kanban),并按照 README 文件中的步骤操作。请注意,试用版 Kanban 仅可使用 30 天。 + +### 步骤 2. 创建组件 + +现在需要创建一个 React 组件,将 Kanban 添加到应用中。在 ***src/*** 目录下新建一个文件,命名为 ***Kanban.jsx***。 + +#### 导入源文件 + +打开 ***Kanban.jsx*** 文件并导入 Kanban 源文件。注意: + +- 如果您使用 PRO 版本并从本地文件夹安装 Kanban 包,导入路径如下: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from 'dhx-kanban-package'; +import 'dhx-kanban-package/dist/kanban.css'; +~~~ + +请注意,根据所用包的不同,源文件可能是压缩版。此时请确保导入的 CSS 文件为 ***kanban.min.css***。 + +- 如果您使用 Kanban 试用版,请指定以下路径: + +~~~jsx title="Kanban.jsx" +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import "@dhx/trial-kanban/dist/kanban.css"; +~~~ + +本教程将展示如何配置 **试用版** Kanban。 + +#### 设置容器并添加 Kanban 和 Toolbar + +要在页面上显示带有 Toolbar 的 Kanban,需要为 Kanban 和 Toolbar 创建容器,并使用相应的构造函数初始化这些组件: + +~~~jsx {2,6-7,10-11,13-17} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from '@dhx/trial-kanban'; +import '@dhx/trial-kanban/dist/kanban.css'; // 引入 Kanban 样式 + +export default function KanbanComponent(props) { + let toolbar_container = useRef(); // 初始化 Toolbar 容器 + let kanban_container = useRef(); // 初始化 Kanban 容器 + + useEffect(() => { + // 初始化 Kanban 组件 + const kanban = new Kanban(kanban_container.current, {}); + + // 初始化 Toolbar 组件 + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, // 提供 Kanban 内部 API + // 其他配置项 + }); + + return () => { + kanban.destructor(); // 销毁 Kanban + toolbar.destructor(); // 销毁 Toolbar + }; + }, []); + + return
+
+
+
+} +~~~ + +#### 添加样式 + +为了正确显示 Kanban,需要在项目的主 css 文件中为 Kanban 及其容器指定必要样式: + +~~~css title="index.css" +/* 页面初始样式 */ +html, +body, +#root { + height: 100%; + padding: 0; + margin: 0; +} + +/* Kanban 和 Toolbar 容器样式 */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* Kanban 容器样式 */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### 加载数据 + +要向 Kanban 添加数据,需要提供一个数据集。可以在 ***src/*** 目录下新建 ***data.js*** 文件,并添加一些数据: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/boards ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +然后打开 ***App.js*** 文件并导入数据。之后可以将数据作为 **props** 传递给新创建的 `` 组件: + +~~~jsx {2,5-6} title="App.js" +import Kanban from "./Kanban"; +import { getData } from "./data"; + +function App() { + const { columns, cards, rows } = getData(); + return ; +} + +export default App; +~~~ + +接着进入 ***Kanban.jsx*** 文件,将传递过来的 **props** 应用到 Kanban 配置对象中: + +~~~jsx {5,11-13} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: props.columns, // 应用列数据 + cards: props.cards, // 应用卡片数据 + rows: props.rows, // 应用行数据 + rowKey: "type", + // 其他配置项 + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // 其他配置项 + }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +您还可以在 React 的 `useEffect()` 方法中使用 [`parse()`](/api/methods/js_kanban_parse_method/) 方法将数据加载到 Kanban 中: + +~~~jsx {9-11,27} title="Kanban.jsx" +import { useEffect, useRef } from "react"; +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default function KanbanComponent(props) { + let kanban_container = useRef(); + let toolbar_container = useRef(); + + let columns = props.columns; // 列数据 + let cards = props.cards; // 卡片数据 + let rows = props.rows; // 行数据 + + useEffect(() => { + const kanban = new Kanban(kanban_container.current, { + columns: [], + cards: [], + rows: [], + rowKey: "type", + // 其他配置项 + }); + + const toolbar = new Toolbar(toolbar_container.current, { + api: kanban.api, + // 其他配置项 + }); + + kanban.parse({ columns, cards, rows }); + + return () => { + kanban.destructor(); + toolbar.destructor(); + }; + }, []); + + return
+
+
+
+} +~~~ + +`parse(data)` 方法可在每次更改时重新加载数据。 + +现在 Kanban 组件已经准备就绪。当该元素被添加到页面时,会初始化并加载数据。您还可以根据需要提供配置项。请访问我们的 [Kanban API 文档](/api/overview/properties_overview/),查看全部可用属性列表。 + +#### 事件处理 + +当用户在 Kanban 中执行某些操作时,会触发事件。您可以利用这些事件检测操作并执行相应代码。完整事件列表请见 [事件文档](/api/overview/events_overview/)。 + +打开 ***Kanban.jsx***,按如下方式完善 `useEffect()` 方法: + +~~~jsx {5-7} title="Kanban.jsx" +// ... +useEffect(() => { + const kanban = new Kanban(kanban_container.current, {}); + + kanban.api.on("add-card", (obj) => { + console.log(obj.columnId); + }); + + return () => { + kanban.destructor(); + }; +}, []); +// ... +~~~ + +完成后,即可启动应用,在页面上查看加载了数据的 Kanban。 + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with React + +现在您已经了解了如何将 DHTMLX Kanban 集成到 React 中。您可以根据具体需求自定义代码。最终的高级示例可在 [**GitHub**](https://github.com/DHTMLX/react-kanban-demo) 查看。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md new file mode 100644 index 0000000..66f7b3d --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_salesforce.md @@ -0,0 +1,110 @@ +--- +sidebar_label: 与 Salesforce 集成 +title: 与 Salesforce 集成 +description: 了解如何将 DHTMLX Kanban 集成到 Salesforce。本指南解释了在 Salesforce Lightning 组件中顺利运行所需的 HTML 设置和环境配置。 +--- + +# 与 Salesforce 集成 + +:::tip +在阅读本说明文档之前,您应当熟悉 [**Salesforce**](https://www.salesforce.com/) 的基本概念和模式。如需回顾相关知识,请参考 [**Salesforce 文档**](https://developer.salesforce.com/docs)。 +::: + +DHTMLX Kanban 兼容 [Salesforce](https://www.salesforce.com/) 平台。我们已准备了将 DHTMLX Kanban 添加到 Salesforce 环境的代码示例。更多信息请参考相应的 [GitHub 示例](https://github.com/DHTMLX/salesforce-lwc-demo)。 + +:::note +JavaScript Kanban 组件会自动检测其运行在 [**Salesforce**](https://www.salesforce.com/) 环境中,并在内部配置集成逻辑。在大多数情况下,您无需手动调用任何 [**Salesforce 专用方法**](#salesforce-专用方法)。 +::: + +## 环境准备 + +如果您想将 Kanban 添加到 Salesforce 项目中,需要在 *根* 容器上添加 `data-wx-root="true"` HTML 属性。此属性允许库定位挂载 **Kanban** 和 **Toolbar** 组件的主节点。 + +```html title="kanban.html" + +``` + +带有 `data-wx-portal-root="1"` 属性的嵌套元素作为 DHTMLX 组件(例如 **Toolbar** 和 **Kanban**)的容器。 + +## Salesforce 环境 API + +DHTMLX Kanban 包含 `salesForceEnv` 辅助类,用于手动控制 Salesforce 环境。您可以按如下方式导入 `salesForceEnv` 辅助类: + +```jsx {4} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; +``` + +:::note +通常情况下,无需使用 Salesforce 专用方法,仅在自动检测失败时作为备用方案使用。 +::: + +### Salesforce 专用方法 + +您可以使用 `salesForceEnv` 辅助类提供的以下方法: + +| 方法 | 描述 | +| :------------------------------------------------------------- | :-------------------------------------------------------------- | +| `salesForceEnv.detect()` | 检测 Kanban 是否运行在 Salesforce 内部 | +| `salesForceEnv.addGlobalEvent(eventName, handler, htmlElement)`| 将全局事件绑定到第一个可用的 HTML 元素 | +| `salesForceEnv.getTopNode()` | 返回 Salesforce DOM 层级中第一个可用的 HTML 元素 | + +```jsx {4,7} +import { + Kanban, + Toolbar, + salesForceEnv +} from "@dhx/trial-kanban"; + +salesForceEnv.detect(); +``` + +### 额外导出函数 + +| 函数 | 描述 | +| :------------------- | :----------------------------------------------------------- | +| `enableSalesForce()` | 当自动检测不可用时,手动设置 Salesforce 环境 | + +```jsx {5,8} +import { + Kanban, + Toolbar, + salesForceEnv, + enableSalesForce +} from "@dhx/trial-kanban"; + +enableSalesForce(); +``` + +## 工作流程步骤 + +1. 在您的 LWC 容器上添加 `data-wx-root="true"` 属性 +2. 导入并初始化 DHTMLX Kanban 和 Toolbar(可选) +3. JavaScript Kanban 组件会自动检测 Salesforce 上下文并应用内部配置 +4. 除非您的应用在非标准嵌入场景下运行,否则无需调用 `enableSalesForce()` 函数或使用 `salesForceEnv` 方法 + +### 示例 + +```jsx title="kanban.js" +import { Kanban, Toolbar } from "@dhx/trial-kanban"; +import "@dhx/trial-kanban/dist/kanban.css"; + +export default class KanbanLWC { + connectedCallback() { + const kanban_container = this.template.querySelector(".sf_kanban"); + const toolbar_container = this.template.querySelector(".sf_toolbar"); + const kanban = new Kanban(kanban_container, { /* configuration properties */ }); + const toolbar = new Toolbar(toolbar_container, { api: kanban.api }); + } +} +``` + +现在 DHTMLX Kanban 组件已完全集成到您的 **Salesforce Lightning** 环境中。该组件会自动处理 LWC 内的 DOM 层级和事件绑定。您可以继续通过其标准 API 配置 Kanban,并根据项目需求自定义 Kanban 的外观和逻辑。最终示例可在 [**GitHub**](https://github.com/DHTMLX/salesforce-lwc-demo) 上查看。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md new file mode 100644 index 0000000..1e7b249 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_svelte.md @@ -0,0 +1,346 @@ +--- +sidebar_label: 与 Svelte 集成 +title: 与 Svelte 集成 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解与 Svelte 的集成。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版本。 +--- + +# 与 Svelte 集成 + +:::tip +在阅读本文档之前,您应当熟悉 **Svelte** 的基本概念和模式。如需复习相关知识,请参考 [**Svelte documentation**](https://svelte.dev/docs/svelte/overview)。 +::: + +DHTMLX Kanban 与 **Svelte** 兼容。我们已准备了如何在 **Svelte** 中使用 DHTMLX Kanban 的代码示例。更多信息请参考 [**Example on GitHub**](https://github.com/DHTMLX/svelte-kanban-demo)。 + +## 创建项目 + +:::info +在开始创建新项目之前,请安装 [**Vite**](https://vite.dev/)(可选)和 [**Node.js**](https://nodejs.org/en/)。 +::: + +创建 **Svelte** 项目有多种方式: + +- 您可以使用 [**SvelteKit**](https://kit.svelte.dev/) + +或者 + +- 您也可以使用 **Svelte with Vite**(不使用 SvelteKit): + +~~~json +npm create vite@latest +~~~ + +详细信息请参考 [相关文档](https://svelte.dev/docs/svelte/overview)。 + +### 安装依赖 + +我们将项目命名为 **my-svelte-kanban-app**,并进入应用目录: + +~~~json +cd my-svelte-kanban-app +~~~ + +安装依赖并启动开发服务器。您可以根据使用的包管理器选择命令: + +- 如果使用 [**yarn**](https://yarnpkg.com/),运行以下命令: + +~~~json +yarn +yarn start +~~~ + +- 如果使用 [**npm**](https://www.npmjs.com/),运行以下命令: + +~~~json +npm install +npm run dev +~~~ + +应用应在本地(例如 `http://localhost:3000`)运行。 + +## 创建 Kanban + +现在您需要获取 DHTMLX Kanban 源码。首先,停止应用并继续安装 Kanban 包。 + +### 步骤 1. 安装包 + +下载 [**trial Kanban package**](/how_to_start/#通过-npm-或-yarn-安装-kanban),并按照 README 文件中的步骤操作。请注意,试用版 Kanban 仅可使用 30 天。 + +### 步骤 2. 创建组件 + +现在需要创建一个 Svelte 组件,将带有 Toolbar 的 Kanban 添加到应用中。在 ***src/*** 目录下新建一个文件,命名为 ***Kanban.svelte***。 + +#### 导入源文件 + +打开 ***Kanban.svelte*** 文件并导入 Kanban 源文件。请注意: + +- 如果您使用 PRO 版本并从本地文件夹安装 Kanban 包,导入路径如下: + +~~~html title="Kanban.svelte" + +~~~ + +注意根据所用包的不同,源文件可能已被压缩。在这种情况下,请确保导入的 CSS 文件为 **kanban.min.css**。 + +- 如果您使用 Kanban 的试用版,请指定以下路径: + +~~~html title="Kanban.svelte" + + +
+
+
+
+~~~ + +#### 加载数据 + +要向 Kanban 添加数据,需要提供一组数据。您可以在 ***src/*** 目录下创建 ***data.js*** 文件并添加一些数据: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +然后打开 ***App.svelte*** 文件,导入数据,并将其作为 **props** 传递给新创建的 `` 组件: + +~~~html {3,5,8} title="App.svelte" + + + +~~~ + +回到 ***Kanban.svelte*** 文件,将传递进来的 **props** 应用到 Kanban 配置对象中: + +~~~html {6-8,15-17} title="Kanban.svelte" + + +
+
+
+
+~~~ + +您还可以在 Svelte 的 `onMount()` 方法中使用 [`parse()`](/api/methods/js_kanban_parse_method/) 方法将数据加载到 Kanban 中: + +~~~html {6-8,27} title="Kanban.svelte" + + +
+
+
+
+~~~ + +`parse(data)` 方法可以在每次变更后重新加载数据。 + +现在 Kanban 组件已可用。当元素被添加到页面时,它会用数据初始化 Kanban。您还可以根据需要提供相应的配置设置。访问我们的 [Kanban API 文档](/api/overview/properties_overview/) 查看全部可用属性。 + +#### 事件处理 + +当用户在 Kanban 上执行某些操作时,会触发事件。您可以利用这些事件检测动作并运行所需的代码。查看 [完整事件列表](/api/overview/events_overview/)。 + +打开 ***Kanban.svelte***,并按如下方式完善 `onMount()` 方法: + +~~~html {8-10} title="Kanban.svelte" + + +// ... +~~~ + +### 步骤 3. 将 Kanban 添加到应用 + +要将组件添加到应用中,打开 **App.svelte** 文件,并用以下代码替换默认内容: + +~~~html title="App.svelte" + + + +~~~ + +之后,您可以启动应用,在页面上查看加载了数据的 Kanban。 + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Svelte + +现在,您已经了解了如何将 DHTMLX Kanban 集成到 Svelte 中。您可以根据具体需求自定义代码。最终的高级示例可参见 [**GitHub**](https://github.com/DHTMLX/svelte-kanban-demo)。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md new file mode 100644 index 0000000..4b642ec --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/integration_with_vue.md @@ -0,0 +1,366 @@ +--- +sidebar_label: 与 Vue 集成 +title: 与 Vue 集成 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解与 Vue 的集成。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版。 +--- + +# 与 Vue 集成 + +:::tip +在阅读本篇文档之前,您应当熟悉 [**Vue**](https://vuejs.org/) 的基本概念和模式。如需复习相关知识,请参阅 [**Vue 3 文档**](https://vuejs.org/guide/introduction.html#getting-started)。 +::: + +DHTMLX Kanban 与 **Vue** 兼容。我们已准备好如何在 **Vue 3** 中使用 DHTMLX Kanban 的代码示例。更多信息请参考对应的 [**GitHub 示例**](https://github.com/DHTMLX/vue-kanban-demo)。 + +## 创建项目 + +:::info +在开始创建新项目之前,请先安装 [**Node.js**](https://nodejs.org/en/)。 +::: + +要创建一个 **Vue** 项目,请运行以下命令: + +~~~json +npm create vue@latest +~~~ + +该命令会安装并执行 `create-vue`,即官方的 **Vue** 项目脚手架工具。详细信息请参考 [Vue.js 快速开始](https://vuejs.org/guide/quick-start.html#creating-a-vue-application)。 + +我们将项目命名为 **my-vue-kanban-app**。 + +### 安装依赖 + +进入应用目录: + +~~~json +cd my-vue-kanban-app +~~~ + +安装依赖并启动开发服务器。您可以根据使用的包管理器选择以下命令: + +- 如果使用 [**yarn**](https://yarnpkg.com/),请运行: + +~~~jsx +yarn +yarn start // 或 yarn dev +~~~ + +- 如果使用 [**npm**](https://www.npmjs.com/),请运行: + +~~~json +npm install +npm run dev +~~~ + +应用将会在本地服务器上运行(例如 `http://localhost:3000`)。 + +## 创建 Kanban + +现在您需要获取 DHTMLX Kanban 的源代码。首先停止应用的运行,然后安装 Kanban 包。 + +### 步骤 1. 安装包 + +下载 [**试用版 Kanban 包**](/how_to_start/#通过-npm-或-yarn-安装-kanban),并按照 README 文件中的步骤操作。请注意,试用版 Kanban 仅可使用 30 天。 + +### 步骤 2. 创建组件 + +现在需要创建一个 Vue 组件,将 Kanban 和 Toolbar 添加到应用中。在 ***src/components/*** 目录下新建一个文件,命名为 ***Kanban.vue***。 + +#### 导入源文件 + +打开 ***Kanban.vue*** 文件并导入 Kanban 的源文件。注意: + +- 如果您使用 PRO 版本并从本地文件夹安装 Kanban 包,导入路径如下: + +~~~html title="Kanban.vue" + +~~~ + +请注意,根据所用包的不同,源文件可能已被压缩。在这种情况下,请确保导入的 CSS 文件为 **kanban.min.css**。 + +- 如果您使用 Kanban 试用版,请指定如下路径: + +~~~html title="Kanban.vue" + +~~~ + +本教程将演示如何配置 **试用版** Kanban。 + +#### 设置容器并添加 Kanban 和 Toolbar + +要在页面上显示带有 Toolbar 的 Kanban,需要为 Kanban 和 Toolbar 创建容器,并使用相应的构造函数初始化这些组件: + +~~~html {2,7-8,10-14} title="Kanban.vue" + + + +~~~ + +#### 添加样式 + +为正确显示 Kanban,需要在项目的主 css 文件中为 Kanban 及其容器指定重要样式: + +~~~css title="main.css" +/* 设置初始页面样式 */ +html, +body, +#app { /* 确保使用 #app 作为根容器 */ + height: 100%; + padding: 0; + margin: 0; +} + +/* 设置 Kanban 和 Toolbar 容器样式 */ +.component_container { + height: 100%; + margin: 0 auto; +} + +/* 设置 Kanban 容器样式 */ +.widget { + height: calc(100% - 56px); +} +~~~ + +#### 加载数据 + +要向 Kanban 添加数据,需要提供数据集。可以在 ***src/*** 目录下创建 ***data.js*** 文件,并添加一些数据: + +~~~jsx {2,14,37,48} title="data.js" +export function getData() { + const columns = [ + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + // ... + ]; + + const cards = [ + { + id: 1, + label: "Integration with Angular/React", + priority: 1, + color: "#65D3B3", + start_date: new Date("01/07/2021"), + users: [3, 2], + column: "backlog", + type: "feature", + }, + { + label: "Archive the cards/kanbans ", + priority: 3, + color: "#58C3FE", + users: [4], + progress: 1, + column: "backlog", + type: "feature", + }, + // ... + ]; + + const rows = [ + { + label: "Feature", + id: "feature", + }, + { + label: "Task", + id: "task", + } + ]; + + return { columns, cards, rows }; +} +~~~ + +然后打开 ***App.vue*** 文件,导入数据,并通过内部的 `data()` 方法进行初始化。之后可以将数据作为 **props** 传递给新创建的 `` 组件: + +~~~html {3,8,10-12,19} title="App.vue" + + + +~~~ + +接下来进入 ***Kanban.vue*** 文件,将传递的 **props** 应用于 Kanban 的配置对象: + +~~~html {6,10-12} title="Kanban.vue" + + + +~~~ + +您还可以在 Vue 的 `mounted()` 方法中使用 [`parse()`](/api/methods/js_kanban_parse_method/) 方法向 Kanban 加载数据: + +~~~html {6,22-26} title="Kanban.vue" + + + +~~~ + +`parse(data)` 方法支持在每次应用更改时重新加载数据。 + +现在 Kanban 组件已经可以使用。当元素被添加到页面时,将会初始化带有数据的 Kanban。您还可以根据需要提供配置项。访问我们的 [Kanban API 文档](/api/overview/properties_overview/) 查看所有可用属性列表。 + +#### 事件处理 + +当用户在 Kanban 中执行某些操作时,会触发事件。您可以利用这些事件检测操作并运行相应的代码。查看 [全部事件列表](/api/overview/events_overview/)。 + +打开 ***Kanban.vue*** 并完善 `mounted()` 方法: + +~~~html {8-10} title="Kanban.vue" + + +// ... +~~~ + +之后,您可以启动应用,在页面上看到加载了数据的 Kanban。 + +import trial from '@site/static/img/trial_kanban.png'; + +Kanban with Vue + +现在您已经了解如何将 DHTMLX Kanban 集成到 Vue 中。您可以根据自己的具体需求自定义代码。最终的高级示例可在 [**GitHub**](https://github.com/DHTMLX/vue-kanban-demo) 上查看。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/localization.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/localization.md new file mode 100644 index 0000000..133b1f0 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/localization.md @@ -0,0 +1,173 @@ +--- +sidebar_label: 本地化 +title: 本地化 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解本地化。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版。 +--- + +# 本地化 + +您可以对 JavaScript Kanban 界面中的所有标签进行本地化。为此,您需要创建一个新的语言环境或修改内置语言环境,并分别应用到 Kanban 和 Toolbar(工具栏)。 + +## 默认语言环境 + +**英语** 是默认使用的语言环境: + +~~~jsx +const en = { + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Files: "Files", + B: "B", + KB: "KB", + MB: "MB", + GB: "GB", + TB: "TB", + PB: "PB", + EB: "EB", + "Make cover": "Make cover", + "Remove cover": "Remove cover", + Comments: "Comments", + Links: "Links", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card...": "Add new card...", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Priority: "Priority", + Progress: "Progress", + Users: "Users", + + Untitled: "Untitled", + Rename: "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + Sort: "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)", + + "Add link": "Add link", + Duplicate: "Duplicate", + "Duplicate of": "Duplicate of", + "Relates to": "Relates to", + "Depends on": "Depends on", + "Is required for": "Is required for", + Duplicates: "Duplicates", + "Is duplicated by": "Is duplicated by", + "Is parent for": "Is parent for", + "Is subtask of": "Is subtask of", + + Cancel: "Cancel", + "Link task": "Link task", + "Select a relation": "Select a relation", + "Select a task": "Select a task", + + Send: "Send", + "Would you like to delete this comment?": + "Would you like to delete this comment?", + "No comments yet": "No comments yet", + "Would you like to delete this card?": + "Would you like to delete this card?", + }, + calendar: { // 日历的翻译和设置 + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // 核心元素的翻译 + ok: "OK", + cancel: "Cancel" + } +}; +~~~ + +## 内置语言环境 + +Kanban 导出了以下语言环境: + +**"en"** - 英语 +**"de"** - 德语 +**"cn"** - 中文 +**"es"** - 西班牙语 +**"fr"** - 法语 +**"it"** - 意大利语 +**"jp"** - 日语 +**"pt"** - 葡萄牙语 +**"ru"** - 俄语 + +您可以通过以下方式导出并应用内置语言环境: + +```jsx {5} +// 创建 Kanban +const board = new kanban.Kanban("#root", { + columns, + cards, + locale: kanban.locales["cn"] // 初始设置为内置的 "cn" 语言环境 + // 其他参数 +}); + +// 将内置的 "de" 语言环境应用到 Kanban +board.setLocale(kanban.locales["de"]); +``` + +## 自定义语言环境 + +要应用自定义语言环境,您需要: + +- 创建一个自定义语言环境(或修改默认语言环境),并为所有文本标签提供翻译(可以是任何您需要的语言) + +- 通过 [`locale`](api/config/js_kanban_locale_config.md) 属性或 [`setLocale()`](api/methods/js_kanban_setlocale_method.md) 方法将新语言环境应用到 **Kanban** +- 通过 [`locale`](api/config/toolbar_locale_config.md) 属性或 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 方法将新语言环境应用到 **Toolbar** + +## 示例 + +在下面的代码片段中,您可以查看如何在多个语言环境之间切换: + + \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/stylization.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/stylization.md new file mode 100644 index 0000000..d573ec0 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/stylization.md @@ -0,0 +1,119 @@ +--- +sidebar_label: 样式化 +title: 样式化 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解样式化内容。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的免费 30 天评估版。 +--- + +# 样式化 + +使用 Kanban,您可以通过 [`columnShape.css`](api/config/js_kanban_columnshape_config.md)、[`rowShape.css`](api/config/js_kanban_rowshape_config.md) 和 [`cardShape.css`](api/config/js_kanban_cardshape_config.md) 属性对**列**、**行**和**卡片**的外观进行样式化。这些属性允许您有条件地对列、行和卡片进行样式设置。 + +您还可以通过 [`columns.css`](api/config/js_kanban_columns_config.md)、[`rows.css`](api/config/js_kanban_rows_config.md) 和 [`cards.css`](api/config/js_kanban_cards_config.md) 属性为单独的**列**、**行**和**卡片**应用自定义 css 类。 + +此外,您可以根据项目需求自定义 Kanban 界面的任意部分的样式。为此,库提供了丰富的 CSS 变量。请注意,Kanban 包含两类变量: +- 与**Kanban**样式相关的 CSS 变量 +- 与**WX**库样式相关的 CSS 变量(*控件、日历等*) + +:::info +请注意,**WX** 库仅用于内部处理。它为 Kanban 提供了一些小型元素(*控件、日历等*) +::: + +## 默认样式 + +~~~css +.wx-material-theme { + /* WX library css variables */ + --wx-field-width: 100%; + --wx-theme-name: material; + /* end of WX library css variables */ + + /* Kanban css variables*/ + --wx-kanban-background: #f1f1f1; + + /* column styles */ + --wx-kanban-column-width: 300px; + --wx-kanban-column-height: 300px; + + /* toolbar styles */ + --wx-kanban-toolbar-height: 56px; + --wx-kanban-toolbar-align: center; + --wx-kanban-toolbar-justify: flex-start; + --wx-kanban-toolbar-control-hover: rgba(0, 0, 0, 0.07); + --wx-kanban-toolbar-control-active: rgba(0, 0, 0, 0.15); + --wx-kanban-toolbar-border: var(--wx-border); + + /* card styles */ + --wx-kanban-card-field-padding: 12px; + --wx-kanban-content-background: var(--wx-background); + --wx-kanban-card-border: var(--wx-border); + --wx-kanban-card-border-radius: 6px; + --wx-kanban-header-border-radius: var(--wx-kanban-card-border-radius); + + /* row styles */ + --wx-kanban-row-line: var(--wx-border); + + /* user icon styles */ + --wx-kanban-user-icon-size: 36px; + + /* editor styles */ + --wx-kanban-header-height: 64px; + --wx-kanban-editor-width: 569px; + --wx-kanban-editor-height: auto; + --wx-kanban-editor-x-padding: 20px; + --wx-kanban-editor-background: var(--wx-kanban-content-background); + --wx-kanban-editor-top-border: none; + + /* column styles */ + --wx-kanban-over-limit-color: var(--wx-color-danger); + --wx-kanban-collapsed-column-width: 44px; + --wx-kanban-z-index: 1; + + /* progress control styles*/ + --wx-progress-height: 4px; + --wx-kanban-progress-inactive-color: #dbdbdb; + + /* menu styles */ + --wx-kanban-menu-min-width: 100px; + + /* box and shadow styles*/ + --wx-kanban-shadow: none; + --wx-kanban-box-border: var(--wx-border); + + /* collapsed column styles */ + --wx-kanban-collapsed-padding: var(--wx-padding); + --wx-kanban-collapsed-margin: 0px; + --wx-kanban-collapsed-background: transparent; + --wx-kanban-collapsed-background-hover: #dfdfdf; + +/* End of Kanban CSS variables*/ +} +~~~ + +:::tip 注意 +后续版本的 Kanban 可能会对变量及其名称进行调整。请在升级到新版本后,务必检查变量名称并在您的代码中进行相应修改,以避免组件显示出现问题。 +::: + +## 滚动条样式 + +您还可以为 Kanban 的滚动条应用自定义样式。为此,可以使用 `.wx-styled-scroll` CSS 类。在使用前,请在[这里](https://caniuse.com/css-scrollbar)检查与现代浏览器的兼容性。 + +~~~html {4} title="index.html" + +
// + +
+~~~ + +## 自定义样式 + +在下面的代码片段中,您可以看到如何为 Kanban 应用自定义样式 + + + +## 自适应 + +在下面的代码片段中,您可以看到如何通过自定义 CSS 样式创建 Kanban 的自适应版本 + + + +**相关文章:** [定制化](guides/customization.md) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/typescript_support.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/typescript_support.md new file mode 100644 index 0000000..28c8a08 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/typescript_support.md @@ -0,0 +1,21 @@ +--- +sidebar_label: TypeScript 支持 +title: TypeScript 支持 +description: 您可以在文档中了解如何将 TypeScript 与 DHTMLX JavaScript Kanban 库一起使用。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版本。 +--- + +# TypeScript 支持 + +从 v1.1 版本开始,DHTMLX Kanban 库提供了 TypeScript 类型定义的支持。内置的 TypeScript 支持可以直接开箱即用。 + +:::note +您可以直接在我们的 Snippet Tool 中体验该功能。 +::: + +## 使用 TypeScript 的优势 + +为什么要将 DHTMLX Kanban 与 TypeScript 一起使用? + +TypeScript 的主要优势在于它能显著提升开发效率。 + +应用程序的构建方式更加健壮,因为类型检查和自动补全功能可以帮助您避免潜在的错误。此外,TypeScript 还会在您使用 DHTMLX Kanban 库 API 时,提供有关应使用数据类型的信息。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/working_with_data.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/working_with_data.md new file mode 100644 index 0000000..1e4e5f4 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/working_with_data.md @@ -0,0 +1,201 @@ +--- +sidebar_label: 数据操作 +title: 数据操作 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解如何处理数据。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版。 +--- + +# 数据操作 + +## 初始数据加载 + +在初始化 Kanban 时,您可以为 [**columns**](api/config/js_kanban_columns_config.md)、[**cards**](api/config/js_kanban_cards_config.md)、[**rows**](api/config/js_kanban_rows_config.md) 和 [**links**](api/config/js_kanban_links_config.md) 提供初始数据。 + +~~~jsx {1,17,81,94,106-109} +const columns = [ // 列的数据 + { + label: "Backlog", + id: "backlog" + }, + { + label: "In progress", + id: "inprogress" + }, + { + label: "Testing", + id: "testing" + }, + {...} +]; + +const cards = [ // 卡片的数据 + { + id: 1, + label: "Integration with React", + priority: 1, + color: "#65D3B3", + description: "Some description...", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + progress: 25, + users: [1,2,3,4], + sprint: "1.0", + column: "backlog", + type: "feature", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + }, + { + id: 2, + label: "Archive the cards/boards ", + priority: 2, + color: "#FFC975", + + start_date: new Date("01/05/2021"), + end_date: new Date("01/15/2021"), + + sprint: "1.0", + column: "backlog", + type: "feature" + }, + { + label: "Searching and filtering", + priority: 1, + color: "#65D3B3", + + start_date: new Date("01/05/2021"), + + sprint: "1.2", + column: "backlog", + type: "task" + }, + { + label: "Set the tasks priorities", + priority: 2, + color: "#58C3FE", + + sprint: "1.2", + column: "inprogress", + type: "feature" + }, + {...} +]; + +const rows = [ // 行的数据 + { + label: "Feature", + id: "feature" + }, + { + label: "Task", + id: "task", + collapsed: true + }, + {...} +]; + +const links = [ + { + id: "link_1", + source: 1, + target: 2, + relation: "relatesTo", + }, + {...} +]; + +// 使用列、卡片和行的初始数据初始化 Kanban +new kanban.Kanban("#root", { + columns, + cards, + rows, + links +}); +~~~ + +## 从本地数据源加载数据 + +要从本地数据源加载 ***columns***、***rows***、***cards*** 和 ***links*** 的数据,可以使用 [`parse()`](api/methods/js_kanban_parse_method.md) 方法。该方法接收一个包含所需数据的对象作为参数。 + +~~~js {4} +const board = new kanban.Kanban("#root", {}); + +// 向 Kanban 加载数据 +board.parse({ columns, cards, rows }); +~~~ + +## 同步 Kanban 数据与 Gantt 和 Scheduler + +在下面的代码片段中,您可以看到如何将 Kanban 数据与其他 DHTMLX 组件同步,特别是 [**Gantt**](https://dhtmlx.com/docs/products/dhtmlxGantt/) 和 [**Scheduler**](https://dhtmlx.com/docs/products/dhtmlxScheduler/): + + + +## 获取 Kanban 数据 + +要获取 Kanban 的数据,您可以使用以下方法: + +- [`getAreaCards()`](api/methods/js_kanban_getareacards_method.md) - 获取指定列(和行)下的所有卡片数据对象数组 +- [`getCard()`](api/methods/js_kanban_getcard_method.md) - 通过指定 ID 获取某个卡片的数据对象 +- [`serialize()`](api/methods/js_kanban_serialize_method.md) - 将 Kanban 数据序列化为 JSON + +## 获取 Kanban 状态 + +要获取 Kanban 的状态,您可以使用以下方法: + +- [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) - 获取 *StateStore* 的响应式属性对象 +- [`api.getState()`](api/internal/js_kanban_getstate_method.md) - 获取 *StateStore* 的当前属性对象 +- [`api.getStores()`](api/internal/js_kanban_getstores_method.md) - 获取 *StateStore* 和 *DataStore* 对象 + +## 导出 Kanban 数据 + +要导出 Kanban 数据,您可以使用以下方法: + +- [`export.json()`](api/internal/js_kanban_json_method.md) - 将 Kanban 的数据导出为 JSON 文件 + +## 添加新项 + +要添加新的 *cards*、*columns* 和 *rows*,您可以使用以下方法: + +- [`addCard()`](api/methods/js_kanban_addcard_method.md) - 向 Kanban 添加新卡片 +- [`addColumn()`](api/methods/js_kanban_addcolumn_method.md) - 向 Kanban 添加新列 +- [`addRow()`](api/methods/js_kanban_addrow_method.md) - 向 Kanban 添加新行 + +## 更新项 + +要更新 *cards*、*columns* 和 *rows*,您可以使用以下方法: + +- [`updateCard()`](api/methods/js_kanban_updatecard_method.md) - 通过指定 ID 更新卡片数据 +- [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) - 通过指定 ID 更新列数据 +- [`updateRow()`](api/methods/js_kanban_updaterow_method.md) - 通过指定 ID 更新行数据 + +## 删除项 + +要移除 *cards*、*columns* 和 *rows*,您可以使用以下方法: + +- [`deleteCard()`](api/methods/js_kanban_deletecard_method.md) - 通过指定 ID 从 Kanban 移除卡片 +- [`deleteColumn()`](api/methods/js_kanban_deletecolumn_method.md) - 通过指定 ID 从 Kanban 移除列 +- [`deleteRow()`](api/methods/js_kanban_deleterow_method.md) - 通过指定 ID 从 Kanban 移除行 + +## 移动项 + +要移动 *cards*、*columns* 和 *rows*,您可以使用以下方法: + +- [`moveCard()`](api/methods/js_kanban_movecard_method.md) - 将卡片移动到目标列和行 +- [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md) - 将列移动到目标位置 +- [`moveRow()`](api/methods/js_kanban_moverow_method.md) - 将行移动到目标位置 + +## 示例 + +在下方代码片段中,您可以看到如何使用 Kanban API 进行数据操作: + + \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/guides/working_with_server.md b/i18n/zh/docusaurus-plugin-content-docs/current/guides/working_with_server.md new file mode 100644 index 0000000..cc57ceb --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/guides/working_with_server.md @@ -0,0 +1,368 @@ +--- +sidebar_label: 与服务器协作 +title: 与服务器协作 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解如何与服务器协作。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX Kanban 30 天试用版。 +--- + +# 与服务器协作 + +JavaScript Kanban 支持同时处理客户端和服务器端数据。该组件对后端没有特殊要求,可以轻松连接任何支持 REST API(RESTful API)的后端平台。 + +:::info +默认情况下,该组件自带内置的 **Go** 和 **Node** 后端。但您同样可以使用自定义的服务器脚本。 +::: + +## RestDataProvider + +JavaScript Kanban 提供了 **RestDataProvider** 服务,完全支持与后端交互的 REST API。它允许与服务器进行交互并执行以下数据操作: + +- ***"add-card"*** +- ***"add-column"*** +- ***"add-comment"*** +- ***"add-row"*** +- ***"add-link"*** +- ***"delete-card"*** +- ***"delete-column"*** +- ***"delete-comment"*** +- ***"delete-row"*** +- ***"delete-link"*** +- ***"move-card"*** +- ***"move-column"*** +- ***"move-row"*** +- ***"update-card"*** +- ***"update-column"*** +- ***"update-comment"*** +- ***"update-row"*** + +## REST 方法 + +**RestDataProvider** 服务包含用于动态数据加载的特殊 REST 方法: + +- [`getCards()`](api/provider/rest_methods/js_kanban_getcards_method.md) - 获取 ***cards data*** 的 Promise +- [`getColumns()`](api/provider/rest_methods/js_kanban_getcolumns_method.md) - 获取 ***columns data*** 的 Promise +- [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) - 获取 ***links data*** 的 Promise +- [`getRows()`](api/provider/rest_methods/js_kanban_getrows_method.md) - 获取 ***rows data*** 的 Promise +- [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md) - 获取 ***users data*** 的 Promise + +## 与后端交互 + +要与服务器交互,您需要将 **RestDataProvider** 连接到相应的服务器脚本。如果您希望使用内置后端,可以在以下仓库中找到所需脚本: + +- [**Go**](https://github.com/web-widgets/kanban-go) 后端 +- [**Node**](https://github.com/web-widgets/kanban-node) 后端 + +或者,您也可以创建自定义后端。 + +:::tip +如果您使用自定义后端,请参考 [**REST API routes**](api/overview/rest_routes_overview.md) 主题获取更多信息! +::: + +要将 **RestDataProvider** 连接到后端,需要调用 **kanban.RestDataProvider** 构造函数,并将相应的 **URL** 作为参数传入。 + +~~~js {1-2,27} +const url = "https://some_backend_url"; +const restProvider = new kanban.RestDataProvider(url); + +Promise.all([ + restProvider.getUsers(), + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows() +]).then(([users, cards, columns, links, rows]) => { + const board = new kanban.Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "type", + editorShape: [ + ...kanban.defaultEditorShape, + { + type: "multiselect", + key: "users", + label: "Users", + values: users + } + ] + }); + board.api.setNext(restProvider); +}); +~~~ + +:::info +您需要通过 [**api.setNext()**](api/internal/js_kanban_setnext_method.md) 方法将 **RestDataProvider** 包含到 **Event Bus** 顺序中,以便执行数据操作(*添加*、*删除*等)并向服务器发送相应请求。 +::: + +### 示例 + +在以下代码片段中,您可以看到如何将 **RestDataProvider** 连接到 **Go** 后端并加载服务器数据: + + + +## 多用户后端 + +诸如我们的 Kanban 这样的项目管理工具,受到各类企业的高度青睐。考虑到这一点,提供无缝的多用户体验非常重要。我们的新特性允许多个用户实时高效地管理同一看板上的卡片,无需刷新页面。因此,终端用户可以协作并实时了解彼此的操作,从而提升生产力和整体满意度。 + +要实现多用户后端,需要在 Kanban 初始化前在服务器上完成授权。为此,您可以创建 `login(url: string)` 函数: + +~~~js {} +const login = (url) => { + var token = sessionStorage.getItem("login-token"); + if (token) { + return Promise.resolve(token); + } + + return fetch(url + "/login?id=1") + .then(raw => raw.text()) + .then(token => { + sessionStorage.setItem("login-token", token); + return token; + }); +}; +~~~ + +该函数仅用于模拟授权,所有用户都将以 ID 1 进行授权。授权成功后,服务器会发送一个 token,后续每次请求服务器都需要使用该 token。为了自动发送 token,可以使用 `RestDataProvider.setHeaders()` 方法。该方法能为请求添加自定义 header。默认情况下,服务器将 token 存储在 `"Remote-Token":` header 中: + +~~~js {} +login(url).then(token => { + // rest provider 初始化 + const restProvider = new kanban.RestDataProvider(url); + // 设置 token 为自定义 header + restProvder.setHeaders({ + "Remote-Token": "eyJpZCI6IjEzMzciLCJ1c2VybmFtZSI6ImJpem9uZSIsImlhdC...", + }); + + // 组件初始化... +}); +~~~ + +获取 token 后,您应初始化组件。可以按如下方式实现: + +~~~js {} +// 组件初始化... +Promise.all([ + restProvider.getCards(), + restProvider.getColumns(), + restProvider.getLinks(), + restProvider.getRows(), +]).then(([cards, columns, links, rows]) => { + const board = new Kanban("#root", { + cards, + columns, + links, + rows, + rowKey: "row", + cardShape, + editorShape, + }); + + // 将客户端数据保存到服务器 + board.api.setNext(restProvider); + + // 多用户初始化... +}); +~~~ + +组件初始化后,需要添加 WebSocket,用于监听来自服务器的事件。可按如下方式实现: + +~~~js {} +// 多用户初始化... + +// 获取服务器事件的客户端处理函数 +const handlers = kanbanUpdates( + board.api, + restProvider.getIDResolver() +); +// 连接服务器事件 +const events = new RemoteEvents(url + "/api/v1", token); +// 绑定客户端处理函数到服务器事件 +events.on(handlers); +~~~ + +- `handlers` - 处理服务器事件的客户端处理函数 +- `events` - 连接服务器并监听所有事件的对象 +- `RemoteEvents.on(handlers)` - 将客户端处理函数应用到服务器事件 + +集成多用户后端后,您可以简化用户间的协作,并让他们通过 UI 实时了解所有变更。 + +### 示例 + +以下代码片段演示了如何配置多用户后端,以实时跟踪其他用户的变更: + + + +## 服务器事件自定义 + +您可以自定义服务器事件的处理逻辑。为此,需将 **handlers** 对象传递给 `RemoteEvents.on(handlers)` 方法。**handlers** 对象应具有如下结构: + +~~~js {} +{ + "cards": cardsHandler: function(obj: any), + "columns": columnsHandler: function(obj: any), + "links": linksHandler: function(obj: any), + "rows": rowsHandler: function(obj: any), +} +~~~ + +当服务器发生变更时,会返回被修改元素的名称。这些名称可能因服务器逻辑而异。 + +客户端更新的数据会作为 **obj** 参数传递给 `function(obj: any)`。为了指定操作类型,存在一个 `type: string` 字段。其可能取值如下: + +- 对于 **cards**: `"add-card"`, `"update-card"`, `"delete-card"`, `"move-card"` +- 对于 **columns**: `"add-column"`, `"update-column"`, `"delete-column"`, `"move-column"` +- 对于 **links**: `"add-link"`, `"delete-link"` +- 对于 **rows**: `"add-row"`, `"update-row"`, `"delete-row"`, `"move-row"` + +以下代码片段展示了实现细节: + +~~~js {} +// 初始化 kanban +const board = new kanban.Kanban(...); +const restProvider = new kanban.RestDataProvider(url); +const idResolver = restProvider.getIDResolver(); +const TypeCard = 1; +const TypeRow = 2; +const TypeCol = 3; + +const cardsHandler = (obj: any) => { + obj.card.id = idResolver(obj.card.id, TypeCard); + obj.card.row = idResolver(obj.card.row, TypeRow); + obj.card.column = idResolver(obj.card.column, TypeColumn); + switch (obj.type) { + case "add-card": + board.api.exec("add-card", { + card: obj.card, + select: false, + skipProvider: true, // 防止客户端再次向服务器发送请求 + }) + break; + // 其他操作 + } +} + +// 添加自定义处理函数 +const handlers = { + cards: cardsHandler, +}; + +const remoteEvents = new kanban.RemoteEvents(remoteEventsURL, token); +remoteEvents.on(handlers); +~~~ + +`RestDataProvider.getIDResolver()` 方法返回一个函数,用于同步客户端 ID 与服务器 ID。当在客户端新建一个对象(*card/column/row/link*)时,结果对象会有一个临时 ID,并在存储中有对应的服务器 ID。`idResolver()` 函数用于同步客户端 ID 与服务器 ID。其格式为:`idResolver(id: TID, type: number)` + +`type` 参数为模型类型,取值如下: + +- `CardID` - 1, +- `RowID` - 2, +- `ColumnID` - 3 +- `LinkID` - 4 + +为避免再次向服务器发送请求,调用 `board.api.exec()` 方法时需使用 `skipProvider: true` 标志。 + +最后一步是将自定义处理函数应用到服务器事件。通过这种方式,您可以自定义服务器事件处理逻辑。 + +## 将两个或更多状态归为同一列 + +本节介绍如何将来自不同列的卡片显示在同一列中(例如,将 *To do* 和 *Unassigned* 状态的卡片归为一个公共列)。 + +要实现此类分组,您需要添加一个自定义字段(如 **status**),用于存储卡片当前状态。**column** 字段则存储公共状态。 + +接下来,需为卡片分组制定特定规则。如下所示,不同状态的卡片会被分组到特定列: + +- *todo*, *unassigned* - 属于 **Open** 列 +- *dev*, *testing* - 属于 **Inprogress** 列 +- *merged*, *released* - 属于 **Done** 列 + +实现将两个或更多状态的卡片归为同一列有两种方式: + +- [服务器端分组](#服务器端分组) +- [服务器端 + 客户端分组](#服务器端--客户端分组) + +### 服务器端分组 + +如需实现服务器端分组,您的服务器应支持通过 [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) 向客户端发送数据(见 [多用户后端](#多用户后端))。 + +在服务器处理更新卡片请求时,需要检查 **status** 字段。在本例中我们使用 [Go](https://go.dev/) 语言,您也可以使用其他后端技术。 + +~~~go +func Update(id int, c Card) error { + // ... + oldColumn := c.Column + s := data.Status + if s == "todo" || s == "unassigned" { + c.Column = "open" + } else if s == "dev" || s == "testing" { + c.Column = "inprogress" + } else if s == "merged" || s == "released" { + c.Column = "done" + } + + db.Save(&c) + + if oldColumn != c.Column { + // 如果因 status 字段更新了 column, + // 需通知客户端将卡片移动到对应列 + + // 需更新卡片索引 + updateCardIndex(&c) + + // 通知客户端更新列 + ws.Publish("card-update", &c) + } + // ... +} +~~~ + +因此,当用户更改 status 字段值时,服务器逻辑会检查其值,并将卡片放入相应列。之后,服务器会通过 WebSocket 通知客户端该卡片需要移动到其他列。 + +### 服务器端 + 客户端分组 + +对于混合方案,您应从服务器获取分组规则。客户端根据这些规则,依据 status 字段的值判断卡片应归入哪一列。 + +~~~js +const groupingRules = await fetch("http://server.com/rules"); +~~~ + +例如,可以指定如下规则: + +~~~json +{ + "open": ["todo", "unassigned"], + "progress": ["dev", "testing"], + "done": ["merged", "released"], +} +~~~ + +然后,您需要定义逻辑,检测卡片变更并将其移动到目标列: + +~~~js +const updateColumn = card => { + for (let col in groupingRules) { + if (groupingRules[col].includes(card.status)) { + card.column = col; + break; + } + } +}; + +kanban.api.intercept("move-card", ev => { + kanban.api.exec("update-card", { + id: ev.id, + card: { status: groupingRules[ev.columnId][0], + }); +}); + +kanban.api.intercept("update-card", ev => { + updateColumn(ev.card); +}); +~~~ + +通过这种方式,您可以根据其他字段为卡片指定特定列。 + +### 示例 + +以下代码片段展示了如何配置服务器端,将两个或更多状态实时分组到同一列: + + \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/how_to_start.md b/i18n/zh/docusaurus-plugin-content-docs/current/how_to_start.md new file mode 100644 index 0000000..0ee2f25 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/how_to_start.md @@ -0,0 +1,129 @@ +--- +sidebar_label: 如何开始 +title: 如何开始 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解如何开始使用 DHTMLX Kanban。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版。 +--- + +# 如何开始 + +本教程将为您详细介绍在页面上实现完整功能的 Kanban 所需的各个步骤。 + +import editor from '@site/static/img/js_kanban_editor.png'; + +JS Kanban Main + +## 第一步:引入源文件 + +首先创建一个 HTML 文件,命名为 *index.html*。然后在该文件中引入 Kanban 的源文件。 + +需要包含两个必要的文件: + +- Kanban 的 JS 文件 +- Kanban 的 CSS 文件 + +~~~html {5-6} title="index.html" + + + + How to Start with Kanban + + + + + + + +~~~ + +### 通过 npm 或 yarn 安装 Kanban + +您可以通过 `yarn` 或 `npm` 包管理器将 JavaScript Kanban 导入到您的项目中。 + +#### 通过 npm 或 yarn 安装试用版 Kanban + +:::info +如果您想使用 Kanban 的试用版,请下载 [**trial Kanban package**](https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml),并按照 *README* 文件中提到的步骤操作。请注意,试用版 Kanban 仅可使用 30 天。 +::: + +#### 通过 npm 或 yarn 安装 PRO 版 Kanban + +:::info +您可以在 [Client's Area](https://dhtmlx.com/clients/) 直接访问 DHTMLX 私有 **npm**,通过生成您的 **npm** 登录名和密码。详细的安装指南也可在该页面获取。请注意,只有在您的专有 Kanban 许可证有效期间,才能访问私有 **npm**。 +::: + +## 第二步:创建 Kanban + +现在您可以将 Kanban 添加到页面中了。首先,需要为 Kanban 及其工具栏创建 DIV 容器。请按照以下步骤操作: + +- 在 *index.html* 文件中指定两个 DIV 容器 +- 使用 **kanban.Kanban** 和 **kanban.Toolbar** 构造函数初始化 Kanban 及其工具栏 + +:::info +工具栏是 Kanban 界面的可选部分。如果只需创建不带工具栏的 Kanban,可以只指定一个 DIV 容器,并通过 **kanban.Kanban** 构造函数初始化该组件。 +::: + +构造函数的参数为 Kanban 和工具栏所在的 HTML 容器的 ID 以及相应的配置对象。 + +~~~html {9-10,13-15,17-19} title="index.html" + + + + How to Start with Kanban + + + + +
+
+ + + + +~~~ + +## 第三步:配置 Kanban + +接下来,您可以在初始化时为 Kanban 组件指定所需的配置属性。 + +要开始使用 Kanban,首先需要为 **cards** 和 **columns**(以及 *rows*)提供初始数据。 +除了初始数据,您还可以配置 [cards](guides/configuration.md#卡片)、[editor](guides/configuration.md#编辑器) 和 [toolbar](guides/configuration.md#工具栏) 的外观。 + +~~~jsx {2-7,11-18} +const board = new kanban.Kanban("#root", { + cards, + columns, + rows, + rowKey: "row", + cardShape, + editorShape +}); + +new kanban.Toolbar("#toolbar", { + api: board.api, + items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" + ] +}); +~~~ + +## 下一步 + +就这么简单。只需三个简单的步骤,您就拥有了一个可视化和管理工作流程的便捷工具。现在,您可以开始管理任务,或继续深入探索 JavaScript Kanban 的更多功能。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/howtos.md b/i18n/zh/docusaurus-plugin-content-docs/current/howtos.md new file mode 100644 index 0000000..463c69c --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/howtos.md @@ -0,0 +1,199 @@ +--- +sidebar_label: How-tos +title: JavaScript Kanban 使用方法 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中浏览 How-tos 页面。查阅开发者指南与 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX Kanban 30 天试用版。 +--- + +# 使用方法 + +本页面为您提供关于 JavaScript Kanban 的初始化、配置、自定义及操作的完整参考。 + +## 基本原则 + +在本节中,您可以了解 Kanban 的基本使用原则 + +| 主题 | 描述 | +| --------------------------------------------- | ------------------------------------------------- | +| [](guides/initialization.md) | 学习如何初始化 Kanban ([示例](https://snippet.dhtmlx.com/gb50vyip?tag=kanban))| +| [](guides/configuration.md) | 学习如何配置 Kanban | +| [](guides/customization.md) | 学习如何自定义 Kanban | +| [](guides/stylization.md) | 学习如何美化 Kanban | +| [](guides/localization.md) | 学习如何本地化 Kanban ([示例](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban))| + +## API 参考 + +在本节中,您可以查阅 Kanban API 的相关参考 + +| 主题 | 描述 | +| ---------------------------------------------------- | ------------------------------------------------- | +| [Kanban events](api/overview/events_overview.md) | 学习如何处理 Kanban 事件 | +| [Kanban methods](api/overview/methods_overview.md) | 学习如何使用 Kanban 方法 | +| [Kanban properties](api/overview/properties_overview.md)| 学习如何操作 Kanban 属性 | +| [Event Bus methods](api/overview/internal_eventbus_overview.md)| 学习如何使用 Event Bus 方法 | +| [RestDataProvider methods](api/overview/internal_rest_overview.md)| 学习如何使用 RestDataProvider 方法 | +| [State methods](api/overview/internal_state_overview.md)| 学习如何操作 State 方法 | +| [Toolbar methods](api/overview/toolbar_methods_overview.md)| 学习如何使用 Toolbar 方法 | +| [Toolbar properties](api/overview/toolbar_properties_overview.md)| 学习如何操作 Toolbar 属性 | + +## 卡片操作方法 + +在这些章节中,您可以了解如何对卡片进行操作、处理卡片数据以及配置卡片。 + +### 卡片操作 + +| 主题 | 描述 | +| ----------------------------------------------------------- | -------------------------------------- | +| [Adding new cards](api/methods/js_kanban_addcard_method.md) | 学习如何添加新卡片 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Deleting cards](api/methods/js_kanban_deletecard_method.md) | 学习如何删除卡片 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Moving cards](api/methods/js_kanban_movecard_method.md) | 学习如何移动卡片 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban)) | +| [Scrolling to the desired cards](api/methods/js_kanban_scroll_method.md)| 学习如何滚动至指定卡片 | +| [Searching for cards](api/methods/js_kanban_setsearch_method.md)| 学习如何搜索卡片 | +| [Selecting cards](api/methods/js_kanban_selectcard_method.md)| 学习如何选择卡片 | +| [Sorting cards](api/methods/js_kanban_setsort_method.md) | 学习如何排序卡片 | +| [Unselecting cards](api/methods/js_kanban_unselectcard_method.md)| 学习如何取消选择卡片 | +| [Adding links between cards](api/config/js_kanban_links_config.md)| 学习如何在卡片间添加关联 ([示例](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) | + +### 卡片数据处理 + +| 主题 | 描述 | +| ----------------------------------------------------------- | ---------------------------------------- | +| [Getting card data](api/methods/js_kanban_getcard_method.md) | 学习如何获取卡片数据 | +| [Getting cards state](api/internal/js_kanban_getstate_method.md) | 学习如何获取卡片状态 | +| [Getting cards reactive state](api/internal/js_kanban_getreactivestate_method.md) | 学习如何获取卡片响应式状态 | +| [Loading card data](api/config/js_kanban_cards_config.md) | 学习如何加载初始卡片数据 | +| [Parsing card data](api/methods/js_kanban_parse_method.md) | 学习如何解析卡片数据 | +| [Serializing card data](api/methods/js_kanban_serialize_method.md)| 学习如何序列化卡片数据 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Updating card data](api/methods/js_kanban_updatecard_method.md)| 学习如何更新卡片数据 | + +### 卡片配置 + +| 主题 | 描述 | +| ----------------------------------------------------------- | -------------------------------------------- | +| [Adding new cards](api/config/js_kanban_readonly_config.md) | 学习如何启用/禁用添加新卡片的能力 | +| [Binding cards into columns](api/config/js_kanban_columnkey_config.md) | 学习如何将卡片绑定到列 | +| [Binding cards into rows](api/config/js_kanban_rowkey_config.md) | 学习如何将卡片绑定到行 | +| [Configuring a card appearance](api/config/js_kanban_cardshape_config.md)| 学习如何配置卡片外观 | +| [Configuring a cards menu](api/config/js_kanban_cardshape_config.md)| 学习如何配置卡片右键菜单 ([示例](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Customizing a card appearance](api/config/js_kanban_cardtemplate_config.md)| 学习如何通过模板自定义卡片外观 ([示例](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban))| +| [Dragging cards](api/config/js_kanban_readonly_config.md) | 学习如何启用/禁用卡片拖拽 | +| [Editing cards](api/config/js_kanban_readonly_config.md) | 学习如何启用/禁用卡片编辑 | +| [Lazy rendering](api/config/js_kanban_rendertype_config.md)| 学习如何启用/禁用大量卡片的**懒加载渲染** ([示例](https://snippet.dhtmlx.com/xez9ghqq?text=#kanban))| +| [Limiting cards](api/config/js_kanban_columns_config.md) | 学习如何为列和泳道限制卡片数量(**WIP 校验**)([示例](https://snippet.dhtmlx.com/2blo6hx8?text=kanban))| +| [Selecting cards](api/config/js_kanban_readonly_config.md) | 学习如何启用/禁用卡片选择 | +| [Setting a fix height of cards](api/config/js_kanban_cardheight_config.md)| 学习如何设置卡片固定高度 | +| [Updating card settings](api/methods/js_kanban_setconfig_method.md)| 学习如何更新卡片设置 | + +## 卡片编辑器操作方法 + +在本节中,您可以了解如何操作卡片编辑器 + +| 主题 | 描述 | +| ----------------------------------------------------------- | --------------------------------------------- | +| [Autosaving mode](api/config/js_kanban_editorautosave_config.md)| 学习如何启用/禁用编辑器自动保存模式 | +| [Configuring editor fields](guides/configuration.md#编辑器)| 学习如何配置编辑器字段 | +| [Configuring the editor](guides/configuration.md#编辑器的配置)| 学习如何配置编辑器 | +| [Updating editor settings](api/methods/js_kanban_setconfig_method.md)| 学习如何更新编辑器设置 | + +## 列操作方法 + +在这些章节中,您可以了解如何对列进行操作及处理列数据 + +### 列操作 + +| 主题 | 描述 | +| -------------------------------------------------------------- | -------------------------------------------- | +| [Adding new columns](api/methods/js_kanban_addcolumn_method.md) | 学习如何添加新列 ([示例](https://snippet.dhtmlx.com/61crsls3?tag=kanban))| +| [Configuring a columns menu](api/config/js_kanban_columnshape_config.md)| 学习如何配置列右键菜单 ([示例](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting columns](api/methods/js_kanban_deletecolumn_method.md)| 学习如何删除列 | +| [Moving columns](api/methods/js_kanban_movecolumn_method.md) | 学习如何移动列 | +| [Scrolling to the desired columns](api/methods/js_kanban_scroll_method.md)| 学习如何滚动至指定列 | +| [Separate scrolling for columns](api/config/js_kanban_scrolltype_config.md)| 学习如何为每一列设置独立滚动 ([示例](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban))| + +### 列数据处理 + +| 主题 | 描述 | +| -------------------------------------------------------------- | -------------------------------------------- | +| [Getting card data of the column](api/methods/js_kanban_getareacards_method.md)| 学习如何获取列下卡片数据 | +| [Getting columns state](api/internal/js_kanban_getstate_method.md) | 学习如何获取列状态 | +| [Getting columns reactive state](api/internal/js_kanban_getreactivestate_method.md) | 学习如何获取列响应式状态 | +| [Loading column data](api/config/js_kanban_columns_config.md) | 学习如何加载初始列数据 | +| [Parsing column data](api/methods/js_kanban_parse_method.md) | 学习如何解析列数据 | +| [Serializing column data](api/methods/js_kanban_serialize_method.md)| 学习如何序列化列数据 | +| [Updating column data](api/methods/js_kanban_updatecolumn_method.md)| 学习如何更新列数据 | + +## 行(泳道)操作方法 + +在这些章节中,您可以了解如何对行(泳道)进行操作及处理行数据 + +### 行(泳道)操作 + +| 主题 | 描述 | +| -------------------------------------------------------------- | -------------------------------------------- | +| [Adding new rows](api/methods/js_kanban_addrow_method.md) | 学习如何添加新行(泳道) | +| [Configuring a rows menu](api/config/js_kanban_rowshape_config.md)| 学习如何配置行(泳道)右键菜单 ([示例](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban))| +| [Deleting rows](api/methods/js_kanban_deleterow_method.md) | 学习如何删除行(泳道) | +| [Moving rows](api/methods/js_kanban_moverow_method.md) | 学习如何移动行(泳道) | +| [Scrolling to the desired row](api/methods/js_kanban_scroll_method.md)| 学习如何滚动至指定行(泳道) | + +### 行(泳道)数据处理 + +| 主题 | 描述 | +| -------------------------------------------------------------- | -------------------------------------------- | +| [Getting card data of the column and row](api/methods/js_kanban_getareacards_method.md)| 学习如何获取列和行下的卡片数据 | +| [Getting rows state](api/internal/js_kanban_getstate_method.md) | 学习如何获取行状态 | +| [Getting rows reactive state](api/internal/js_kanban_getreactivestate_method.md) | 学习如何获取行响应式状态 | +| [Loading row data](api/config/js_kanban_rows_config.md) | 学习如何加载初始行数据 | +| [Parsing row data](api/methods/js_kanban_parse_method.md) | 学习如何解析行数据 | +| [Serializing row data](api/methods/js_kanban_serialize_method.md)| 学习如何序列化行数据 | +| [Updating row data](api/methods/js_kanban_updaterow_method.md) | 学习如何更新行数据 | + +## 事件操作方法 + +| 主题 | 描述 | +| ---------------------------------------------------------- | ------------------------------------------- | +| [Executing events](api/internal/js_kanban_exec_method.md) | 学习如何执行内部事件 | +| [Intercepting events](api/internal/js_kanban_intercept_method.md)| 学习如何拦截内部事件 | +| [List of inner events](api/overview/events_overview.md) | 查看 Kanban 内部事件列表 | +| [Reordering events](api/internal/js_kanban_setnext_method.md)| 学习如何将内部事件插入 Event Bus 顺序 | +| [Subscribing on events](api/internal/js_kanban_on_method.md)| 学习如何订阅内部事件 | + +## Kanban REST API 操作方法 + +| 主题 | 描述 | +| ---------------------------------------------------------- | ------------------------------------------- | +| [Loading server data for cards](api/provider/rest_methods/js_kanban_getcards_method.md)| 学习如何加载卡片的服务端数据 | +| [Loading server data for columns](api/provider/rest_methods/js_kanban_getcolumns_method.md)| 学习如何加载列的服务端数据 | +| [Loading server data for rows](api/provider/rest_methods/js_kanban_getrows_method.md)| 学习如何加载行的服务端数据 | +| [Working with server](guides/working_with_server.md) | 学习如何通过 REST API 与服务端交互 ([示例](https://snippet.dhtmlx.com/f25y0809?tag=kanban))| + +## Kanban 状态操作方法 + +| 主题 | 描述 | +| ---------------------------------------------------------- | ------------------------------------------- | +| [Getting StateStore and DataStore](api/internal/js_kanban_getstores_method.md)| 学习如何获取 StateStore 和 DataStore 对象| +| [Getting StateStore properties](api/internal/js_kanban_getstate_method.md)| 学习如何获取 StateStore 对象的属性 | +| [Getting StateStore reactive properties](api/internal/js_kanban_getreactivestate_method.md)| 学习如何获取 StateStore 响应式属性对象 | + +## Toolbar 操作方法 + +| 主题 | 描述 | +| ---------------------------------------------------------- | ---------------------------------------------- | +| [Configuring a searchbar on Toolbar](api/config/toolbar_items_config.md) | 学习如何在 Toolbar 配置搜索栏 ([示例](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring a sort control on Toolbar](api/config/toolbar_items_config.md) | 学习如何在 Toolbar 配置排序控件 ([示例](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Configuring Toolbar controls](api/config/toolbar_items_config.md)| 学习如何配置、自定义和排序 Toolbar 控件 ([示例](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban))| +| [Including Kanban API in Toolbar](api/config/toolbar_api_config.md) | 学习如何在 Toolbar 中集成和使用 Kanban API | +| [Localizing Toolbar](api/config/toolbar_locale_config.md) | 学习如何本地化 Toolbar | + +## TypeScript 操作方法 + +| 主题 | 描述 | +| ---------------------------------------------------------- | ------------------------------------------- | +| [Working with TypeScript](guides/typescript_support.md) | 学习如何使用 TypeScript | + +## 还有其他问题? + + + +:::info +您也可以在下方评论区留言提问! +::: \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/index.md b/i18n/zh/docusaurus-plugin-content-docs/current/index.md new file mode 100644 index 0000000..31a4a5d --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/index.md @@ -0,0 +1,73 @@ +--- +sidebar_label: 看板概览 +title: JavaScript 看板概览 +slug: / +description: 您可以在文档中了解 DHTMLX JavaScript 看板库的概况。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的30天免费试用版。 +--- + +# DHTMLX 看板概览 + +JavaScript 看板是一种高效的工作流程可视化解决方案。该组件有助于更好地理解业务流程,并全面掌握团队工作负载。这一灵活的工具可支持任意数量的卡片、列和泳道。组件完全采用纯 JavaScript 和 CSS 编写,可轻松设置和自定义,并集成到任何 Web 应用或网页中。 + +## 看板结构 + +### 工具栏 + +看板的**工具栏**是界面的独立部分。它包含用于*搜索*卡片的搜索栏、根据指定参数*排序*卡片的控件、两个用于管理历史记录(*撤销/重做*)的控件,以及用于*添加新列和行*的控件。您可以灵活管理搜索和排序逻辑,也可以通过添加自定义元素或调整内置元素顺序来更改工具栏结构。详细内容请参见[配置](guides/configuration.md#工具栏)章节。 + +import toolbar from '@site/static/img/js_kanban_toolbar.png'; + +Kanban Toolbar + +### 看板 + +**看板**是 Kanban 的主要部分。它由分布在各列和各行(泳道)中的卡片组成。您可以灵活配置卡片的外观,也可以应用自定义模板。详细内容请参见[配置](guides/configuration.md#卡片)章节。 + +在**看板**面板上,您可以通过以下方式操作***卡片***、***列***和***行***: + +- 点击加号图标添加新卡片(根据每个列和泳道的*限制*) +- 通过编辑面板为任务添加评论和投票([示例](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- 通过编辑器为任务设置链接([示例](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- 使用上下文菜单(三点图标)删除卡片、列和行 +- 使用上下文菜单(三点图标)或 `Ctrl (Command)`+`D` 快捷键复制卡片(可批量复制卡片) +- 将看板数据导出为 JSON 文件 +- 通过以下快捷键管理看板历史记录: + - `Ctrl (Command)`+`Z` - 撤销看板中的上一步操作(回退一步) + - `Ctrl (Command)`+`Y` 或 `Ctrl (Command)`+`Shift`+`Z` - 重做刚才撤销的操作(前进一步) +- 拖动卡片到目标位置(行和列)以移动卡片 +- 使用上下文菜单(三点图标)移动列和行 +- 双击对应标签或使用上下文菜单(三点图标)重命名列和行 +- 点击卡片显示卡片编辑器 +- 点击行标签左侧的箭头图标收起/展开行 +- 点击列标签左侧的箭头图标收起/展开列 +- 使用以下快捷键选择多张卡片: + - 按住 `Shift` 并点击相应卡片,可在同一列中多选卡片 + - 按住 `Ctrl (Command)` 并点击相应卡片,可在不同列中多选卡片 + +import board from '@site/static/img/js_kanban_board.png'; + +Kanban Board + +### 编辑器 + +**编辑器**是一个模态面板,由用于管理所选卡片数据的字段和控件组成。点击想要编辑的卡片即可显示编辑器。您可以灵活配置编辑器结构,添加新字段和控件。详细内容请参见[配置](guides/configuration.md#编辑器)章节。 + +import editor from '@site/static/img/js_kanban_editor.png'; + +Kanban Editor + +## 后续操作 + +现在,您可以在应用程序中开始使用看板了。请参考[快速开始](how_to_start.md)教程获取指导。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/news/migration.md b/i18n/zh/docusaurus-plugin-content-docs/current/news/migration.md new file mode 100644 index 0000000..2546b0f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/news/migration.md @@ -0,0 +1,1454 @@ +--- +sidebar_label: 迁移到新版本 +title: 迁移到新版本 +description: 您可以在 DHTMLX JavaScript Kanban 库的文档中了解如何迁移到新版本。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并免费下载 DHTMLX Kanban 的 30 天试用版。 +--- + +# 迁移到新版本 + +## 1.6.5 -> 1.7.0 + +### Api + +#### 属性 + +- [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性已更新。`clearButton` 参数被 `clear` 参数替代: + +~~~jsx {8} title="v1.7.0 之前" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clearButton: true // 旧用法 + } + }, { /* ... */ } + ] + // 其他参数 +}); +~~~ + +~~~jsx {8} title="v1.7.0 起" +new kanban.Kanban("#root", { + editorShape: [ + { + type: "combo", + label: "Priority", + key: "priority", + config: { + clear: true // 新用法 + } + }, { /* ... */ } + ] + // 其他参数 +}); +~~~ + +- [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) 函数已更新。**store** 参数被 **readonly** 参数替代: + +~~~jsx {3-4} title="v1.7.0 之前" +menu: { + show: true, + items: ({ card, store }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, store }); // "store" 参数为旧用法 + ... + } +} +~~~ + +~~~jsx {3-4} title="v1.7.0 起" +menu: { + show: true, + items: ({ card, readonly }) => { + const defaultMenuItems = getDefaultCardMenuItems({ card, readonly }); // "readonly" 参数为新用法 + ... + } +} +~~~ + +- [`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md) 函数已更新。**store** 参数被 **readonly** 参数替代: + +~~~jsx {3-4} title="v1.7.0 之前" +menu: { + show: true, + items: ({ column, columnIndex, columns, store }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, store }); // "store" 参数为旧用法 + ... + } +} +~~~ + +~~~jsx {3-4} title="v1.7.0 起" +menu: { + show: true, + items: ({ column, columnIndex, columns, readonly }) => { + const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, readonly }); // "readonly" 参数为新用法 + ... + } +} +~~~ + +- [`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) 函数已更新。**store** 参数被 **readonly** 参数替代: + +~~~jsx {3-4} title="v1.7.0 之前" +menu: { + show: true, + items: ({ row, rowIndex, rows, store }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, store }); // "store" 参数为旧用法 + ... + } +} +~~~ + +~~~jsx {3-4} title="v1.7.0 起" +menu: { + show: true, + items: ({ row, rowIndex, rows, readonly }) => { + const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, readonly }); // "readonly" 参数为新用法 + ... + } +} +~~~ + +- [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md)、[`columnShape.menu.items`](api/config/js_kanban_columnshape_config.md)、[`rowShape.menu.items`](api/config/js_kanban_rowshape_config.md) 属性中的 ***menu.items[0].label*** 和 ***menu.items[0].items*** 已在 v1.7 移除。 + +- `editorAutoSave` 属性在 v1.7 被移除。请使用 [`editor.autoSave`](api/config/js_kanban_editor_config.md) 属性: + +~~~jsx {2} title="v1.7.0 之前" +new kanban.Kanban("#root", { + editorAutoSave: true, // 旧用法 + // 其他参数 +}); +~~~ + +~~~jsx {3} title="v1.7.0 起" +new kanban.Kanban("#root", { + editor: { + autoSave: true // 新用法 + } + // 其他参数 +}); +~~~ + +- [`links`](api/config/js_kanban_links_config.md) 属性有如下更新: + - **masterId** 参数被 **source** 参数替代 + - **slaveId** 参数被 **target** 参数替代 + +~~~jsx {5-6,10} title="v1.7.0 之前" +const links = [ + { + id: 1, + // 旧用法 + masterId: 2, + slaveId: 5 + }, {...} // 其他连接数据 +]; + +new kanban.Kanban("#root", { + links, + // 其他参数 +}); +~~~ + +~~~jsx {5-6,10} title="v1.7.0 起" +const links = [ + { + id: 1, + // 新用法 + source: 2, + target: 5 + }, {...} // 其他连接数据 +]; + +new kanban.Kanban("#root", { + links, + // 其他参数 +}); +~~~ + +#### 方法 + +- `undo` 和 `redo` 方法已从 store 方法中移除: + +~~~jsx {1} title="v1.7.0 之前" +kanban.api.getStores().data.undo() // 旧用法 +~~~ + +~~~jsx {5-6,10} title="v1.7.0 起" +kanban.undo(); +// 或者 +kanban.api.exec("undo"); +~~~ + +- [`api.getState()`](api/internal/js_kanban_getstate_method.md) 和 [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) 方法有如下更新: + - 以下参数在 v1.7.0 被移除: + + ```js + fromAreaMeta, + dropAreaItemsCoords, + dropAreasCoords, + overAreaMeta, + before, + dragItemId, + dragItemsCoords, + overAreaId + ``` + + - 以下参数在 v1.7.0 变为私有: + + ```js + edit -> _edit: object, + layout -> _layout: string, + cardsMap -> _cardsMap: object, + cardsMeta -> _cardsMeta: object, + areasMeta -> _areasMeta: object, + scroll -> _scroll: object + ``` + +#### 事件 + +- [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) 事件中的 `dragItemsCoords` 和 `dropAreasCoords` 参数已被移除 + +## 1.5.13 -> 1.6.0 + +与菜单相关的 CSS 类有如下变更: + +~~~jsx + .menu -> .wx-menu + .item -> .wx-item + .icon -> .wx-icon + .value -> .wx-value +~~~ + +## 1.5.12 -> 1.5.13 + +与编辑器相关的 CSS 类有如下变更: + +~~~jsx + .modal -> .wx-modal + .window -> .wx-window + .modal .window .buttons -> .wx-modal .wx-window .wx-buttons + .combo -> .wx-combo + .combo -> .wx-multicombo + .item -> .wx-item + .color-picker -> .wx-colorselect + .colors -> .wx-colors + .slider -> .wx-slider + .datepicker -> .wx-datepicker + .calendar -> .wx-calendar + .calendar .days .day.out -> .wx-calendar .wx-days .wx-day.wx-out + .combo .tag -> .multicombo .wx-tag + .dropdown -> .wx-dropdown + .dropdown .item -> .wx-dropdown .wx-item + .clear -> .wx-clear +~~~ + +## 1.5.6 -> 1.5.7 + +### Api + +#### 方法 + +- Kanban 工具栏的 [`setLocale`](api/methods/toolbar_setlocale_method.md) 方法有如下更新: + +~~~jsx {6} title="v1.5.7 之前" + // 创建 Kanban + const board = new kanban.Kanban("#root", {...}); + // 创建 Toolbar + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // 应用 "de" 语言到 Toolbar + toolbar.setLocale(de); // 或传 null 重置为默认语言 (en) +~~~ + +~~~jsx {6} title="v1.5.7 起" + // 创建 Kanban + const board = new kanban.Kanban("#root", {...}); + // 创建 Toolbar + const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); + // 应用 "de" 语言到 Toolbar + toolbar.setLocale(de, board.api); +~~~ + +## 1.4 -> 1.5 + +### Api + +#### 属性 + +- Kanban 的 [`columnShape`](api/config/js_kanban_columnshape_config.md) 属性有如下变更: + + ~~~jsx {} title="v1.5 之前" + { + menu: { + show: true, + items: [ + { + label: "Update", ... + } + ] + // 其他参数 + } + } + ~~~ + + ~~~jsx {11} title="v1.5 起" + { + menu: { + show: true, + items: [ + { + text: "Update", ... + } + ] + // 其他参数 + }, + fixedHeaders: true + } + ~~~ + +## 1.3 -> 1.4 + +### Api + +#### 属性 + +- Kanban 的 [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性有如下变更: + + ~~~jsx {} title="v1.4 之前" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // 其他参数 + ~~~ + + ~~~jsx {5,7-21} title="v1.4 起" + { + type: "date", // 或可使用 "dateRange" 类型 + key: "start_date", + label: "Date Range" + format: "%d/%m/%y" + }, + { + type: "comments", + key: "comments", + label: "Comments", + config: { + format: "%M %d", + placement: "page", // 或 "editor" + html: true, + }, + }, + { + type: "links", + key: "links", + label: "Links", + }, + // 其他参数 + ~~~ + +- Kanban 的 [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性有如下变更: + + ~~~jsx {} title="v1.4 之前" + { + label: true, + description: true, + menu: { + items: [ + { + label: "Delete", ... + } + ] + } + // 其他参数 + } + ~~~ + + ~~~jsx {7,11-13} title="v1.4 起" + { + label: true, + description: true, + menu: { + items: [ + { + text: "Delete", ... + } + ] + }, + votes: true, + comments: true, + css: (card) => card.type == "feature" ? "green" : "red", + // 其他参数 + } + ~~~ + +- Kanban 的 [`columnShape`](api/config/js_kanban_columnshape_config.md) 属性有如下变更: + + ~~~jsx {} title="v1.4 之前" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // 其他参数 + } + } + ~~~ + + ~~~jsx {6,11} title="v1.4 起" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // 其他参数 + }, + css: (column, cards) => column.id == "feature" && cards.length < 5 ? "green" : "red" + } + ~~~ + +- Kanban 的 [`rowShape`](api/config/js_kanban_rowshape_config.md) 属性有如下变更: + + ~~~jsx {} title="v1.4 之前" + { + menu: { + show: true, + items: [ + { + label: "Delete", ... + } + ] + // 其他参数 + } + } + ~~~ + + ~~~jsx {6,11} title="v1.4 起" + { + menu: { + show: true, + items: [ + { + text: "Delete", ... + } + ] + // 其他参数 + }, + css: (row, cards) => row.id == "task" && cards.length < 5 ? "green" : "red", + } + ~~~ + +- Kanban 的 [`cards`](api/config/js_kanban_cards_config.md) 属性有如下变更: + + ~~~jsx {} title="v1.4 之前" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + // 其他参数 + }, ... + ] + ~~~ + + ~~~jsx {6-18} title="v1.4 起" + [ + { + id: 1, + label: "Integration with React", + description: "Some description", + css: "red", + votes: [4,6,9], + comments: [ + { + id: 1, + userId: 9, + cardId: 6, + text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.", + date: new Date(), + },{...} + ] + // 其他参数 + }, ... + ] + ~~~ + +- Kanban 的 [`columns`](api/config/js_kanban_columns_config.md) 属性有如下变更: + + ~~~jsx {} title="v1.4 之前" + [ + { + id: "inprogress", + label: "In progress", + // 其他参数 + }, ... + ] + ~~~ + + ~~~jsx {5-11} title="v1.4 起" + [ + { + id: "inprogress", + label: "In progress", + css: "red", + overlay: template(` +
+ Drop is not allowed + Only testers can move cards to this + column +
`) + // 其他参数 + }, ... + ] + ~~~ + +- Kanban 的 [`rows`](api/config/js_kanban_rows_config.md) 属性有如下变更: + + ~~~jsx {} title="v1.4 之前" + [ + { + id: "features", + label: "Features", + // 其他参数 + }, ... + ] + ~~~ + + ~~~jsx {5} title="v1.4 起" + [ + { + id: "features", + label: "Features", + css: "green" + // 其他参数 + }, ... + ] + ~~~ + +- Kanban 的 [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) 属性有如下变更: + + ~~~jsx {} title="v1.4 之前" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate + }); + ~~~ + + ~~~jsx {6-8} title="v1.4 起" + const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => { + if (selected) { + return ` +
+
+
+ +
+ Selected:${cardFields.label} +
+ `; + } + } + + new kanban.Kanban("#root", { + cards, + columns, + cardTemplate: kanban.template(card => cardTemplate(card)), + // 其他参数 + }); + ~~~ + +- Kanban 工具栏 [`items`](api/config/toolbar_items_config.md) 属性中的 **sort** 控件有如下变更: + + ~~~jsx {} title="v1.4 之前" + [ + { // 自定义排序控件 + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + + ~~~jsx {6,11} title="v1.4 起" + [ + { // 自定义排序控件 + type: "sort", + options: [ + { + text: "Sort by label", + by: "label", + dir: "asc" + }, + { + text: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + ] + ~~~ + +#### 方法 + +- Kanban 的 [`api.getState()`](api/internal/js_kanban_getstate_method.md) 方法有如下变更: + +~~~jsx {25-27} title="v1.4 之前" +api.getState(); +// 方法返回包含以下属性的对象 +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + overAreaMeta: object, +}*/ +~~~ + +~~~jsx {} title="v1.4 起" +api.getState(); +// 方法返回包含以下属性的对象 +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object, +}*/ +~~~ + +## 1.2 -> 1.3 + +### Api + +#### 属性 + +- Kanban 的 [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性有如下变更: + + - ***dateRange*** 参数 + + ~~~jsx {} title="v1.3 之前" + { + type: "date", + key: "start_date", + label: "Start date" + }, + // 其他参数 + ~~~ + + ~~~jsx {} title="v1.3 起" + { + type: "dateRange", // 或可使用 "date" 类型 + key: { + start: "start_date", + end: "end_date" + }, + label: "Date Range" + }, + // 其他参数 + ~~~ + +- 工具栏的 [`items`](api/config/toolbar_items_config.md) 属性有如下变更: + +~~~jsx {} title="v1.3 之前" +items: [ + "search", + "spacer", + "sort", + "addColumn", + "addRow" +] +~~~ + +~~~jsx {4-5} title="v1.3 起" +items: [ + "search", + "spacer", + "undo", + "redo", + "sort", + "addColumn", + "addRow" +] +~~~ + +#### 方法 + +- Kanban 的 [`updateCard()`](api/methods/js_kanban_updatecard_method.md) 方法有如下变更: + +~~~jsx {} title="v1.3 之前" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*other parameters*/ + } +}); +~~~ + +~~~jsx {9} title="v1.3 起" +updateCard({ + id: 1, + card: { + label: "New Label", + row: "feature", + column: "inprogress", + /*other parameters*/ + }, + replace: true +}); +~~~ + +- Kanban 的 [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) 方法有如下变更: + +~~~jsx {} title="v1.3 之前" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + } +}); +~~~ + +~~~jsx {9} title="v1.3 起" +updateColumn({ + id: "backlog", + column: { + label: "Updated column", + limit: 3, + strictLimit: 3, + collapsed: true + }, + replace: true +}); +~~~ + +- Kanban 的 [`updateRow()`](api/methods/js_kanban_updaterow_method.md) 方法有如下变更: + +~~~jsx {} title="v1.3 之前" +updateRow({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, +}); +~~~ + +~~~jsx {7} title="v1.3 起" +updateColumn({ + id: "feature", + row: { + label: "Updated row", + collapsed: true + }, + replace: true +}); +~~~ + +## 1.1 -> 1.2 + +### Api + +#### 属性 + +- Kanban 的 [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性有如下变更: + + - ***menu*** 参数 + + ~~~jsx {} title="v1.2 之前" + menu: true, + //或 + menu: { show: true } + // 其他参数 + ~~~ + + ~~~jsx {5-14} title="v1.2 起" + menu: true, + // 或 + menu: { + show: true, + items: ({ card, store }) => { + if(card.id === 1){ + return false; + } else { + return [ + { id: "set-edit", icon: "wxi-edit", label: "Edit" }, + { id: "delete-card", icon: "wxi-delete", label: "Delete" } + ]; + } + } + }, + // 其他参数 + ~~~ + + - ***users*** 参数 + + ~~~jsx {7} title="v1.2 之前" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + path: "../assets/user.jpg" + }, + ] + }, + // 其他参数 + ~~~ + + ~~~jsx {7} title="v1.2 起" + users: { + show: true, + values: [ + { + id: 1, + label: "John Smith", + avatar: "../assets/user.jpg" + }, + ] + }, + // 其他参数 + ~~~ + + - ***start_date*** 和 ***end_date*** 参数 + + ~~~jsx {} title="v1.2 之前" + start_date: true, + end_date: true, + // 其他参数 + ~~~ + + ~~~jsx {3,7} title="v1.2 起" + start_date: { + show: true, + format: "%d.%m.%Y" + }, + end_date: { + show: true, + format: "%d.%m.%Y" + }, + // 其他参数 + ~~~ + +- Kanban 的 [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性有如下变更: + +~~~jsx {8} title="v1.2 之前" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + path: "preview_image_path_1.png" + }, + ] +}, +// 其他字段设置 +~~~ + +~~~jsx {8} title="v1.2 起" +{ + type: "multiselect", + key: "users", + label: "Users", + values: [ + { + id: 1, label: "Alan", + avatar: "preview_image_path_1.png" + }, + ] +}, +// 其他字段设置 +~~~ + +- 工具栏的 [`items`](api/config/toolbar_items_config.md) 属性有如下变更: + +~~~jsx {} title="v1.2 之前" +items: [ + "search", + "controls" +] +~~~ + +~~~jsx {} title="v1.2 起" +items: [ + { // 或 "search", + type: "search", + options: [ + { + id: "label", + label: "By label" + }, + { + id: "start_date", + label: "By date", + searchRule: (card, value, by) => { + const date = card[by]; + return date?.toString().includes(value); + } + } + ] + }, + "spacer", + { // 或 "sort", + type: "sort", + options: [ + { + label: "Sort by label", + by: "label", + dir: "asc" + }, + { + label: "Sort by description", + by: "description", + dir: "desc" + } + ] + }, + "addColumn", + "addRow" +] +~~~ + +#### 方法 + +- Kanban 的 [`setLocale()`](api/methods/js_kanban_setlocale_method.md) 方法和 Toolbar 的 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 方法有如下变更: + +~~~jsx {} title="v1.2 之前" +setLocale(kanban.en); // 重置为默认语言 +~~~ + +~~~jsx {} title="v1.2 起" +setLocale(null); // 重置为默认语言 +~~~ + +- Kanban 的 [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) 方法有如下变更: + +~~~jsx {} title="v1.2 之前" +api.getReactiveState(); +// 方法返回包含以下属性的对象 +/*{ + dragItemId: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + dragItemsCoords: {...}, + selected: {...} +}*/ +~~~ + +~~~jsx {} title="v1.2 起" +api.getReactiveState(); +// 方法返回包含以下属性的对象 +/*{ + areasMeta: { + subscribe: any, + update: any, + set: any + }, + before: {...}, + cardShape: {...}, + cards: {...}, + cardsMap: {...}, + cardsMeta: {...}, + columnKey: {...}, + columns: {...}, + dragItemId: {...}, + dragItemsCoords: {...}, + dropAreaItemsCoords: {...}, + dropAreasCoords: {...}, + edit: {...}, + editorShape: {...}, + fromAreaMeta: {...}, + overAreaId: {...}, + overAreaMeta: {...}, + readonly: {...}, + rowKey: {...}, + rows: {...}, + scroll: {...}, + search: {...}, + selected: {...}, + sort: {...} +}*/ +~~~ + +- Kanban 的 [`api.getState()`](api/internal/js_kanban_getstate_method.md) 方法有如下变更: + +~~~jsx {} title="v1.2 之前" +api.getState(); +// 方法返回包含以下属性的对象 +/*{ + dragItemId: string | number, + before: string | number, + overAreaId: string | number, + overAreaMeta: object, + dropAreaItemsCoords: array, + dropAreasCoords: array, + dragItemsCoords: array, + selected: array +}*/ +~~~ + +~~~jsx {} title="v1.2 起" +api.getState(); +// 方法返回包含以下属性的对象 +/*{ + areasMeta: object, + before: string | number, + cardShape: object, + cards: array, + cardsMap: object, + cardsMeta: object, + columnKey: string, + columns: array, + dragItemId: string | number, + dragItemsCoords: array, + dropAreaItemsCoords: array, + dropAreasCoords: array, + edit: object, + editorShape: array, + fromAreaMeta: object, + overAreaId: string | number, + overAreaMeta: object, + readonly: object, + rowKey: string, + rows: array, + scroll: object, + search: object, + selected: array, + sort: object +}*/ +~~~ + +- Kanban 的 [`api.getStores()`](api/internal/js_kanban_getstores_method.md) 方法有如下变更: + +~~~jsx {} title="v1.2 之前" +api.getStores(); +// 方法返回如下 store 对象 +/*{ + state: StateStore, // ( object ) + data: DataStore // ( object ) +}*/ +~~~ + +~~~jsx {} title="v1.2 起" +api.getStores(); +// 方法返回如下属性 +/*{ + state: StateStore, // ( object ) +}*/ +~~~ + +### 本地化 + +
+v1.2 之前 + +~~~jsx {} +const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; +const monthsShort = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" +]; +const wx = { + Today: "Today", + Clear: "Clear", + Close: "Close" +}; +const en = { + lang: "en", + __dates: { + months, + monthsShort, + days + }, + wx, + kanban: { + Save: "Save", + Close: "Close", + Delete: "Delete", + Name: "Name", + Description: "Description", + Type: "Type", + "Start date": "Start date", + "End date": "End date", + Result: "Result", + "No results": "No results", + Search: "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + Edit: "Edit", + Everywhere: "Everywhere", + Label: "Label", + Status: "Status", + Color: "Color", + Date: "Date", + Untitled: "Untitled", + Rename: "Rename" + } +}; +~~~ +
+ +
+v1.2 起 + +~~~jsx {} +const en = { + kanban: { // Kanban 标签的翻译 + "Save": "Save", + "Close": "Close", + "Delete": "Delete", + "Name": "Name", + "Description": "Description", + "Type": "Type", + "Start date": "Start date", + "End date": "End date", + "Result": "Result", + "No results": "No results", + "Search": "Search", + "Search in": "Search in", + "Add new row": "Add new row", + "Add new column": "Add new column", + "Add new card": "Add new card", + "Edit card": "Edit card", + "Edit": "Edit", + "Everywhere": "Everywhere", + "Label": "Label", + "Status": "Status", + "Color": "Color", + "Date": "Date", + "Untitled": "Untitled", + "Rename": "Rename", + "Move up": "Move up", + "Move down": "Move down", + "Move left": "Move left", + "Move right": "Move right", + "Sort": "Sort", + "Label (a-z)": "Label (a-z)", + "Label (z-a)": "Label (z-a)", + "Description (a-z)": "Description (a-z)", + "Description (z-a)": "Description (z-a)" + }, + calendar: { // 日历的翻译及设置 + monthFull: [ + "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December" + ], + monthShort: [ + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + ], + dayFull: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + hours: "Hours", + minutes: "Minutes", + done: "Done", + clear: "Clear", + today: "Today", + am: ["am", "AM"], + pm: ["pm", "PM"], + weekStart: 7, + timeFormat: 24 + }, + core: { // 核心元素的翻译 + ok: "OK", + cancel: "Cancel" + } +}; +~~~ +
+ +## 1.0 -> 1.1 + +### Api + +#### 属性 + +- [`columns`](api/config/js_kanban_columns_config.md) 属性增加了新参数。从 v1.1 起,你可以使用 ***collapsed, limit*** 和 ***strictLimit*** 配置。 + +~~~jsx title="v1.1 之前" +const columns = [ + { + label: "Backlog", + id: "backlog" + }, ... +]; +~~~ + +~~~jsx {5-7,12} title="v1.1 起" +const columns = [ + { + label: "Backlog", + id: "backlog", + collapsed: true, + limit: 3, + strictLimit: true + }, ... +]; + +new kanban.Kanban("#root", { + columns, + // 其他参数 +}); +~~~ + +- [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性的 ***color*** 参数有如下变更。 + +~~~jsx {4-7} title="v1.1 之前" +const cardShape = { + color: { + show: true, + values: [ + { id: 1, color: "#65D3B3", label: "red" }, + { id: 2, color: "#FFC975", label: "green" } + ] + } +}; +~~~ + +~~~jsx {4,9} title="v1.1 起" +const cardShape = { + color: { + show: true, + values: ["#65D3B3", "#FFC975", "#58C3FE"] + } +}; + +new kanban.Kanban("#root", { + cardShape + // 其他参数 +}); +~~~ + +#### 方法 + +- [`addColumn`](api/methods/js_kanban_addcolumn_method.md) 方法(以及 [`add-column`](api/events/js_kanban_addcolumn_event.md) 事件)有如下变更: + +~~~jsx {} title="v1.1 之前" +addColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="v1.1 起" +addColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: false, + ... + } +}); +~~~ + +- [`addRow`](api/methods/js_kanban_addrow_method.md) 方法(以及 [`add-row`](api/events/js_kanban_addrow_event.md) 事件)有如下变更: + +~~~jsx {} title="v1.1 之前" +addRow(row_data_object); +~~~ + +~~~jsx {2-7} title="v1.1 起" +addRow({ + id: "feature", + row: { + label: "Feature", + collapsed: false, + ... + } +}); +~~~ + +- [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) 方法(以及 [`update-column`](api/events/js_kanban_updatecolumn_event.md) 事件)有如下变更: + +~~~jsx {} title="v1.1 之前" +updateColumn(column_data_object); +~~~ + +~~~jsx {2-7} title="v1.1 起" +updateColumn({ + id: "backlog", + column: { + label: "Backlog", + collapsed: true, + ... + } +}); +~~~ + +- [`updateRow`](api/methods/js_kanban_updaterow_method.md) 方法(以及 [`update-row`](api/events/js_kanban_updaterow_event.md) 事件)有如下变更: + +~~~jsx {} title="v1.1 之前" +updateRow(row_data_object); +~~~ + +~~~jsx {2-7} title="v1.1 起" +updateRow({ + id: "feature", + row: { + label: "Feature", + collapsed: true, + ... + } +}); +~~~ + +- [`updateCard`](api/methods/js_kanban_updatecard_method.md) 方法(以及 [`update-card`](api/events/js_kanban_updatecard_event.md) 事件)有如下变更: + +~~~jsx {} title="v1.1 之前" +updateCard(card_data_object); +~~~ + +~~~jsx {2-7} title="v1.1 起" +updateCard({ + id: 1, + card: { + label: "Volvo XC 70", + progress: 26 + ... + } +}); +~~~ + +- [`parse`](api/methods/js_kanban_parse_method.md) 方法有如下变更: + +~~~jsx {3-5,8-12} title="v1.1 之前" +// 解析新数据前需重置初始数据 +const board = new kanban.Kanban("#root", { + columns: [], + cards: [], + rows: [] +}); + +board.parse({ + columns, + cards, + rows +}); +~~~ + +~~~jsx {} title="v1.1 起" +// 解析新数据前无需重置初始数据 +const board = new kanban.Kanban("#root", {}); + +board.parse({ + columns, + cards, + rows +}); +~~~ \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/news/whats_new.md b/i18n/zh/docusaurus-plugin-content-docs/current/news/whats_new.md new file mode 100644 index 0000000..a3d1cfc --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/news/whats_new.md @@ -0,0 +1,648 @@ +--- +sidebar_label: 新增内容 +title: 新增内容 +description: 您可以在 DHTMLX JavaScript UI 库的文档中了解 DHTMLX Kanban 的最新动态及其发布历史。浏览开发者指南和 API 参考,尝试代码示例和在线演示,并下载 DHTMLX Kanban 的 30 天免费评估版。 +--- + +# 新增内容 + +如果您正在从旧版本升级 Kanban,请查阅 [迁移到新版本](news/migration.md) 获取详细信息。 + +## 版本 1.7.0 + +于 2025 年 10 月 14 日发布 + +[博客发布回顾](https://dhtmlx.com/blog/meet-dhtmlx-kanban-1-7/) + +### Salesforce 集成 + +从 v1.7 开始,您可以在 Salesforce 环境中使用 JavaScript Kanban。更多信息请参考:[**与 Salesforce 集成**](guides/integration_with_salesforce.md)。 + +您还可以参考我们的 [**GitHub 示例**](https://github.com/DHTMLX/salesforce-lwc-demo) 或运行 [**在线演示**](https://dhtmlx-dev-ed.develop.lightning.force.com/)(*登录名*:***user***,*密码*:***demo***)。 + +### 新 API + +- #### 事件 + + - [`undo`](api/events/js_kanban_undo_event.md) + - [`redo`](api/events/js_kanban_redo_event.md) + +- #### 方法 + + - [`getColumnCards()`](api/methods/js_kanban_getcolumncards_method.md) + - [`detach()`](api/internal/js_kanban_detach_method.md) + +### 更新 + +- #### 方法 + + - [`on`](api/internal/js_kanban_on_method.md) 内部方法新增了 `config.tag` 和 `config.intercept` 参数 + - [`intercept`](api/internal/js_kanban_intercept_method.md) 内部方法新增了 `config.tag` 和 `config.intercept` 参数 + +- #### 属性 + + - [`links`](api/config/js_kanban_links_config.md) 属性更新如下: + - `masterId` 参数被替换为 `source` + - `slaveId` 参数被替换为 `target` + + - [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性更新,`clearButton` 参数被替换为 `clear` + + - [`cardShape.menu.items`](api/config/js_kanban_cardshape_config.md) 函数更新,`store` 参数被替换为 `readonly` + + - [`cards[i].attached[i]`](api/config/js_kanban_cards_config.md) 属性新增了 `size` 参数 + +### 移除的 API + +- 移除了 `editorAutoSave` 属性,请使用 [`editor.autoSave`](api/config/js_kanban_editor_config.md) 属性代替 + +- [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) 移除了 `dragItemsCoords` 和 `dropAreasCoords` 参数 + +### 修复 + +- 用户批量上传文件或多个大文件时,表单会在所有文件完全上传到服务器之前更新,此时发送到服务器的卡片数据不正确 +- 文件大小仅显示新加载的文件 +- 编辑器中点击 **完成** 按钮后,年份和月份未更新 +- 评论区可扩展的文本区域导致按钮移出可点击区域 +- 打开已被删除卡片关联的卡片时发生脚本错误 + +## 版本 1.6.5 + +于 2025 年 7 月 14 日发布 + +### 修复 + +- `disabled: true` 配置对菜单项无效 +- 向未预定义行结构的 Kanban 添加行时,行标题未显示 + +## 版本 1.6.4 + +于 2025 年 6 月 12 日发布 + +### 修复 + +- 添加到被移除后又恢复的列/行的卡片丢失 +- 上传列表按钮缺少本地化标签 +- 商业版包中缺少 readme 文件 + +## 版本 1.6.3 + +于 2025 年 4 月 8 日发布 + +### 修复 + +- 限制错误地应用于整个列 +- 关闭模态编辑器后移动卡片时报错 +- 删除确认框显示在模态编辑器下方 +- 工具栏 "更多" 图标在窗口慢速调整大小时出现又消失 +- `delete-card` 事件总是关闭编辑器 +- 如果优先级设置为未提供选项之外的 ID,则无法打开编辑器 + +## 版本 1.6.2 + +于 2025 年 2 月 14 日发布 + +### 修复 + +- 试用包中的过期日期错误 +- 触摸设备拖拽时警告 +- 只读 `add: false` 配置未从列菜单中移除 **添加** 选项 +- 卡片 ID 为字符串数字时,编辑器未渲染 +- 包中的示例链接已过期 +- 懒加载渲染下的列滚动拖拽异常 +- `setConfig()` 方法未能更新列标题的固定状态 + +## 版本 1.6.1 + +于 2024 年 11 月 29 日发布 + +### 修复 + +- 窄屏下工具栏 "更多" 图标未对齐 +- `RestDataProvider` 忽略通过 `setHeaders()` 设置的 header +- `RestDataProvider.getIDResolver` 不是函数错误 + +## 版本 1.6 + +于 2024 年 11 月 13 日发布 + +[博客发布回顾](https://dhtmlx.com/blog/dhtmlx-kanban-1-6/) + +### 新功能 + +- 可通过 [`cardShape.users.maxCount`](api/config/js_kanban_cardshape_config.md) 属性设置卡片上显示的指派用户数量(参见 [**示例**](https://snippet.dhtmlx.com/w205dvzg?tag=kanban)) +- 可通过 [`columnShape`](api/config/js_kanban_columnshape_config.md) 属性自定义列标题内容(参见 [**示例**](https://snippet.dhtmlx.com/gq2saz9c?tag=kanban)) +- 可通过工具栏 **搜索** 控件的 [`items.searchResult`](api/config/toolbar_items_config.md) 属性自定义搜索结果的视图和内容(参见 [**示例**](https://snippet.dhtmlx.com/2uo2f5mf?tag=kanban)) +- 可通过 [`editor.placement`](api/config/js_kanban_editor_config.md) 属性将编辑器显示为模态窗口(参见 [**示例**](https://snippet.dhtmlx.com/vt6pe7qz?tag=kanban)) +- 可通过 [`cardShape.votes.clickable`](api/config/js_kanban_cardshape_config.md) 属性为卡片启用投票(在卡片上使用投票图标,参见 [**示例**](https://snippet.dhtmlx.com/en76xvi4?tag=kanban)) + +### 更新 + +- #### 属性 + + - [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性新增 ***users.maxCount*** 和 ***votes.clickable*** 参数 + - [`columnShape`](api/config/js_kanban_columnshape_config.md) 属性新增 ***headerTemplate*** 和 ***collapsedTemplate*** 参数 + - [`editor`](api/config/js_kanban_editor_config.md) 属性新增 ***placement*** 参数 + - 工具栏 **搜索** 控件的 [`items`](api/config/toolbar_items_config.md) 属性新增 ***searchResult*** 参数 + +- #### 事件 + + - [`set-edit`](api/events/js_kanban_setedit_event.md) 事件新增 ***eventSource*** 参数(参见 [**示例**](https://snippet.dhtmlx.com/zh4d9pdb?tag=kanban)) + +- #### 方法 + + - [`setConfig()`](api/methods/js_kanban_setconfig_method.md) 方法功能更新如下: + + - 该方法不会更改历史记录(您无法更改历史记录) + - 该方法不会销毁 Kanban 数据存储。无需重新创建事件监听器或重新绑定工具栏 + + - [`setLocale()`](api/methods/js_kanban_setlocale_method.md) 方法不会销毁 Kanban 数据存储。无需重新创建事件监听器或重新绑定工具栏 + - 工具栏 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 方法的 `api` 参数已弃用 + +### 修复 + +- 编辑中的评论可被移除且新评论输入框消失 +- 缺失本地化字符串 +- 同时设置 [`scrollType: "column"`](api/config/js_kanban_scrolltype_config.md) 和 [`renderType: "lazy"`](api/config/js_kanban_rendertype_config.md) 时拖拽无效 +- 无法通过关闭图标关闭编辑器 +- 编辑器右侧区域与进度条背景色相同(仅 Willow 皮肤) + +## 版本 1.5.13 + +于 2024 年 9 月 12 日发布 + +### 修复 + +- "设为封面" 按钮在扩展名为大写时不显示 +- 点击禁用的多选控件时报错 +- 调用 [`addCard()`](api/methods/js_kanban_addcard_method.md) 方法后滚动,在 [column scroll](api/config/js_kanban_scrolltype_config.md) 和 [lazy rendering](api/config/js_kanban_rendertype_config.md) 下报错 +- 未保存的评论以 "" 而不是 [] 保存 +- 编辑器样式被全局同名非唯一类选择器覆盖。[参见迁移部分](news/migration.md/#1512---1513) + +## 版本 1.5.12 + +于 2024 年 5 月 2 日发布 + +### 修复 + +- 拦截回归:返回 `false` 未阻止内部事件 +- 禁用文件仍可上传 + +## 版本 1.5.11 + +于 2024 年 3 月 25 日发布 + +### 修复 + +- *Dark willow* 皮肤下 Kanban 的 CSS 变量在工具栏和门户中丢失 +- 禁用自动保存时,评论和投票的更改未应用到表单值 +- 自定义列子菜单在 **onClick** 函数参数中接收 `null` +- 无法为编辑器中的日期选择器设置可编辑模式 +- Kanban 示例中控制台警告 + +## 版本 1.5.10 + +于 2024 年 2 月 29 日发布 + +### 修复 + +- npm 服务器构建失败 +- [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) 事件和 [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md) 方法新增 `select` 参数 +- Kanban 编辑器中评论字段样式错误 + +## 版本 1.5.9 + +于 2024 年 2 月 20 日发布 + +### 修复 + +- Kanban 影响其他组件样式 +- 自定义列子菜单项设置 `disabled: true` 仍然可用 +- **Uploader** 控件无法设置自定义上传函数 + +## 版本 1.5.8 + +于 2023 年 11 月 28 日发布 + +### 修复 + +- **IKanbanConfig** 类型缺少 **currentUser** TS 定义 + +## 版本 1.5.7 + +于 2023 年 11 月 14 日发布 + +### 更新 + +- 工具栏 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 方法新增 ***api*** 参数 + +### 修复 + +- `disabled: true` 配置对卡片菜单项无效 +- Kanban 示例中出现不必要的控制台警告 +- 无法重置任务优先级 +- Kanban 编辑器中的下拉控件点击外部无法关闭 + +## 版本 1.5.6 + +于 2023 年 9 月 13 日发布 + +### 更新 + +- 支持以 ES 模块方式导入组件 + +### 修复 + +- npm 包回归问题 + +## 版本 1.5.4 + +于 2023 年 8 月 9 日发布 + +### 修复 + +- 切换到其他卡片后,已上传文件仍保留在表单中 +- 拖拽上传文件无效 +- 用户在表单打开时按下 Delete 键导致卡片被意外删除 +- 通过搜索选中卡片后,“搜索于”下拉输入框变为空 +- 撤销添加链接操作时,后端未删除已添加的链接 + +## 版本 1.5.1 + +### 修复 + +- 正确生成 TypeScript 定义 + +## 版本 1.5 + +于 2023 年 6 月 15 日发布 + +[博客发布回顾](https://dhtmlx.com/blog/dhtmlx-kanban-1-5/) + +### 新功能 + +- 运行时设置和删除卡片间的链接 +- 在服务端管理卡片间的链接 +- 固定列标题(参见 [**示例**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) + +### 新 API + +- #### 方法 + + - [`addLink()`](api/methods/js_kanban_addlink_method.md) + - [`deleteLink()`](api/methods/js_kanban_deletelink_method.md) + - [`getLinks()`](api/provider/rest_methods/js_kanban_getlinks_method.md) + +- #### 路由 + + - [`DELETE /links`](api/provider/rest_routes/delete_routes/js_kanban_delete_links_route.md) + - [`GET /links`](api/provider/rest_routes/get_routes/js_kanban_get_links_route.md) + - [`POST /links`](api/provider/rest_routes/post_routes/js_kanban_post_links_route.md) + +### 更新 + +- #### 属性 + + - [`columnShape`](api/config/js_kanban_columnshape_config.md) 属性新增 ***fixedHeaders*** 参数 + +### 修复 + +- 链接无法在运行时解析、导出或序列化 +- 未启用用户区时创建评论区失败 +- 存储中的链接会改变原始数据且未正确保存 +- 懒加载渲染导致折叠列悬停区域样式异常 +- 移动到新建列的卡片消失 +- 新评论输入框未关闭时开始编辑 + +## 版本 1.4.2 + +于 2023 年 4 月 13 日发布 + +### 修复 + +- 添加操作后后端 ID 未保存到本地卡片/列/行数据 +- 缺失 TS 定义 +- 深色皮肤样式泄露 + +## 版本 1.4.1 + +于 2023 年 3 月 29 日发布 + +### 修复 + +- 保持排序时行为异常 +- 通过 **cardShape**、**columnShape** 或 **rowShape** 属性禁用右键菜单时行为异常 +- 编辑器中添加链接但未在数据中提供链接时行为异常 +- 列上的菜单可与卡片相同或不显示 +- 拖动时两个任务同时被拖动 + +## 版本 1.4 + +于 2023 年 3 月 21 日发布 + +[博客发布回顾](https://dhtmlx.com/blog/dhtmlx-kanban-1-4/) + +### 新功能 + +- 添加评论(参见 [**示例**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- 限制用户数量(参见 [**示例**](https://snippet.dhtmlx.com/2rlg4qvk?tag=kanban)) +- 设置卡片间链接(参见 [**示例**](https://snippet.dhtmlx.com/81qu7qh0?tag=kanban)) +- 卡片投票(参见 [**示例**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) + +### 新 API + +- #### 事件 + + - [`add-comment`](api/events/js_kanban_addcomment_event.md) + - [`add-link`](api/events/js_kanban_addlink_event.md) + - [`delete-comment`](api/events/js_kanban_deletecomment_event.md) + - [`delete-link`](api/events/js_kanban_deletelink_event.md) + - [`drag-card`](api/events/js_kanban_dragcard_event.md) + - [`end-drag-card`](api/events/js_kanban_enddragcard_event.md) + - [`start-drag-card`](api/events/js_kanban_startdragcard_event.md) + - [`update-comment`](api/events/js_kanban_updatecomment_event.md) + +- #### 方法 + + - [`addComment()`](api/methods/js_kanban_addcomment_method.md) + - [`deleteComment()`](api/methods/js_kanban_deletecomment_method.md) + - [`updateComment()`](api/methods/js_kanban_updatecomment_method.md) + +- #### 属性 + + - [`currentUser`](api/config/js_kanban_currentuser_config.md) + - [`links`](api/config/js_kanban_links_config.md) + +### 更新 + +- #### 方法 + + - [`api.getState()`](api/internal/js_kanban_getstate_method.md) 方法已更新 + +- #### 属性 + + - [`cards`](api/config/js_kanban_cards_config.md) 属性新增 ***css***、***comments*** 和 ***votes*** 参数 + - [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性新增 ***comments***、***votes***(参见 [**示例**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban))和 ***css***(参见 [**示例**](https://snippet.dhtmlx.com/7fvc3rr1?tag=kanban))参数 + - [`cardTemplate`](api/config/js_kanban_cardtemplate_config.md) 属性支持显示右键菜单 + - [`columns`](api/config/js_kanban_columns_config.md) 属性新增 ***css***(参见 [**示例**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban))和 ***overlay***(参见 [**示例**](https://snippet.dhtmlx.com/nfv59yif?tag=kanban))参数 + - [`columnShape`](api/config/js_kanban_columnshape_config.md) 属性新增 ***css*** 参数(参见 [**示例**](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)) + - [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性新增 [***comments***](guides/configuration.md#comments-type) 和 [***links***](guides/configuration.md#links-type) 类型,以及 *date/dateRange* 类型的 ***format*** 参数 + - [`rows`](api/config/js_kanban_rows_config.md) 属性新增 ***css*** 参数(参见 [**示例**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + - [`rowShape`](api/config/js_kanban_rowshape_config.md) 属性新增 ***css*** 参数(参见 [**示例**](https://snippet.dhtmlx.com/tev4ej9c?tag=kanban)) + +### 弃用 API + +- #### 属性 + + - `cardShape.menu.items`、`columnShape.menu.items` 和 `rowShape.menu.items` 的菜单项对象中的 label + +### 修复 + +- Kanban 在带有 margin 的容器中菜单位置错误 +- 自定义列宽下折叠列位置错误 +- 拖拽卡片到折叠列导致卡片消失 +- 自定义列宽下折叠列位置错误 +- 游泳道下卡片的右键菜单被编辑面板遮挡,导致无法删除卡片 + +## 版本 1.3 + +于 2022 年 9 月 29 日发布 + +[博客发布回顾](https://dhtmlx.com/blog/dhtmlx-kanban-1-3/) + +### 新功能 + +- 通过 API、右键菜单(三点图标)或 `Ctrl (Command)` + `D` 快捷键(支持多卡片)复制卡片 +- 导出 Kanban 数据为 JSON 文件 +- 管理 Kanban 历史记录: + - 通过工具栏上的 *撤销* 和 *重做* 控件 + - 通过快捷键: + - `Ctrl (Command)`+`Z` - 撤销操作 + - `Ctrl (Command)`+`Y` 或 `Ctrl (Command)`+`Shift`+`Z` - 重做操作 + - 通过 API + +### 新 API + +- **事件:** + [`duplicate-card`](api/events/js_kanban_duplicatecard_event.md) + +- **方法:** + [`duplicateCard()`](api/methods/js_kanban_duplicatecard_method.md), + [`export.json()`](api/internal/js_kanban_json_method.md), + [`getUsers()`](api/provider/rest_methods/js_kanban_getusers_method.md), + [`redo()`](api/methods/js_kanban_redo_method.md) 和 + [`undo()`](api/methods/js_kanban_undo_method.md) + +- **属性:** + [`editor`](api/config/js_kanban_editor_config.md) 和 + [`history`](api/config/js_kanban_history_config.md) + +- **通用设置:** + [`$meta`](api/common/js_kanban_meta_parameter.md) + +### 弃用 API + +- **属性:** + [`editorAutoSave`](api/config/js_kanban_editorautosave_config.md) + +### 更新 + +- #### 事件 + + - Kanban 的 [`update-card`](api/events/js_kanban_updatecard_event.md) 事件已更新 + - Kanban 的 [`update-column`](api/events/js_kanban_updatecolumn_event.md) 事件已更新 + - Kanban 的 [`update-row`](api/events/js_kanban_updaterow_event.md) 事件已更新 + +- #### 方法 + + - Kanban 的 [`updateCard()`](api/methods/js_kanban_updatecard_method.md) 方法已更新 + - Kanban 的 [`updateColumn()`](api/methods/js_kanban_updatecolumn_method.md) 方法已更新 + - Kanban 的 [`updateRow()`](api/methods/js_kanban_updaterow_method.md) 方法已更新 + +- #### 属性 + + - 工具栏 [`items`](api/config/toolbar_items_config.md) 属性新增 ***"undo"*** 和 ***"redo"*** 参数(控件) + - [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性新增 ***dateRange*** 类型 + +## 版本 1.2.2 + +于 2022 年 8 月 30 日发布 + +### 修复 + +- 菜单和工具栏中部分图标重复 + +## 版本 1.2.1 + +于 2022 年 7 月 28 日发布 + +### 修复 + +- `cardHeight` 属性在启用 `scrollType:"column"` 配置时无效 +- 上传控件在卡片编辑器中未显示已上传文件 +- 卡片编辑器中 "combo" 和 "progress" 字段本地化无效 + +## 版本 1.2 + +于 2022 年 6 月 29 日发布 + +[博客发布回顾](https://dhtmlx.com/blog/dhtmlx-kanban-1-2/) + +### 新功能 + +- 通过列菜单添加新卡片(参见 [**示例**](https://snippet.dhtmlx.com/8eo65gr5?tag=kanban)) +- 懒加载渲染(参见 [**示例**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- 各列独立滚动(参见 [**示例**](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)) +- Kanban 滚动到新建卡片、列和行(API 和 UI,参见 [**示例**](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)) +- 卡片排序(API 和 UI,参见 [**示例**](https://snippet.dhtmlx.com/74nyuv14?tag=kanban)) + +### 新 API + +- **事件:** + [`scroll`](api/events/js_kanban_scroll_event.md), + [`set-edit`](api/events/js_kanban_setedit_event.md), + [`set-sort`](api/events/js_kanban_setsort_event.md) + +- **方法:** + [`scroll()`](api/methods/js_kanban_scroll_method.md), + [`setEdit()`](api/methods/js_kanban_setedit_method.md), + [`setSort()`](api/methods/js_kanban_setsort_method.md) + +- **属性:** + [`cardHeight`](api/config/js_kanban_cardheight_config.md), + [`columnShape`](api/config/js_kanban_columnshape_config.md), + [`rowShape`](api/config/js_kanban_rowshape_config.md), + [`renderType`](api/config/js_kanban_rendertype_config.md), + [`scrollType`](api/config/js_kanban_scrolltype_config.md) + +### 更新 + +- #### 方法 + + - [`api.getReactiveState()`](api/internal/js_kanban_getreactivestate_method.md) 方法已更新 + - [`api.getState()`](api/internal/js_kanban_getstate_method.md) 方法已更新 + - [`api.getStores()`](api/internal/js_kanban_getstores_method.md) 方法已更新 + - Kanban 的 [`setLocale()`](api/methods/js_kanban_setlocale_method.md) 方法已更新 + - 工具栏的 [`setLocale()`](api/methods/toolbar_setlocale_method.md) 方法已更新 + +- #### 属性 + + - 工具栏 [`items`](api/config/toolbar_items_config.md) 属性已更新 + - [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性的 ***start_date***、***end_date***、***menu*** 和 ***users*** 参数已更新 + - [`editorShape`](api/config/js_kanban_editorshape_config.md) 属性的 ***multiselect*** 类型已更新 + +#### 通用 + +- CSS 类名前缀(参见 [样式化](guides/stylization.md) 部分) +- 本地化结构(参见 [本地化](guides/localization.md) 部分) + +### 修复 + +- 通过 `rowKey` 配置将卡片绑定到泳道异常 +- 点击卡片菜单打开编辑器 +- 拖拽多张卡片异常 +- `select: false`(**readonly** config.md)配置下编辑卡片异常 +- 通过 `addCard()` 方法选择新添加卡片异常 +- `cardShape` 属性的 `label: false` 和 `menu: false` 参数异常 + +## 版本 1.1.1 + +于 2022 年 2 月 28 日发布 + +[博客发布回顾](https://dhtmlx.com/blog/maintenance-release-kanban-1-1-1/) + +### 修复 + +- 未在 cardShape 配置中定义自定义编辑器字段时无效 +- 通过搜索栏下拉菜单选择所需卡片 + +## 版本 1.1 + +于 2022 年 2 月 15 日发布 + +[博客发布回顾](https://dhtmlx.com/blog/dhtmlx-kanban-1-1-wip-validation-new-operations-columns-rows-typescript-support/) + +### 新功能 + +- 通过列标签左侧箭头 *折叠/展开* 列 +- 为列和泳道 *限制* 卡片数量 +- 通过右键菜单(三点图标)*移动* 列 +- 通过右键菜单(三点图标)*移动* 行 +- 通过 **Shift** + **点击** 组合键选择同一列的多张卡片 +- 支持 [TypeScript 定义](guides/typescript_support.md) + +### 新 API + +- 新增用于移动列和行的 **事件**: + [`move-column`](api/events/js_kanban_movecolumn_event.md) + 和 + [`move-row`](api/events/js_kanban_moverow_event.md) +- 新增用于移动列和行的 **方法**: + [`moveColumn()`](api/methods/js_kanban_movecolumn_method.md) + 和 + [`moveRow()`](api/methods/js_kanban_moverow_method.md) + +### 更新 + +#### 属性 + +- [`cards`](api/config/js_kanban_cards_config.md) 属性变为可选 + +- [`columns`](api/config/js_kanban_columns_config.md) 属性变为可选,并新增以下参数: + - ***collapsed*** + - ***limit*** + - ***strictLimit*** + +- [`cardShape`](api/config/js_kanban_cardshape_config.md) 属性的 ***color*** 参数已更新 + +#### 方法 + +- [`addColumn`](api/methods/js_kanban_addcolumn_method.md) 方法已更新 +- [`addRow`](api/methods/js_kanban_addrow_method.md) 方法已更新 +- [`updateCard`](api/methods/js_kanban_updatecard_method.md) 方法已更新 +- [`updateColumn`](api/methods/js_kanban_updatecolumn_method.md) 方法已更新 +- [`updateRow`](api/methods/js_kanban_updaterow_method.md) 方法已更新 +- [`parse`](api/methods/js_kanban_parse_method.md) 方法已更新 + +#### 事件 + +- [`add-column`](api/events/js_kanban_addcolumn_event.md) 事件已更新 +- [`add-row`](api/events/js_kanban_addrow_event.md) 事件已更新 +- [`update-card`](api/events/js_kanban_updatecard_event.md) 事件已更新 +- [`update-column`](api/events/js_kanban_updatecolumn_event.md) 事件已更新 +- [`update-row`](api/events/js_kanban_updaterow_event.md) 事件已更新 + +## 版本 1.0 + +于 2021 年 11 月 23 日发布 + +[博客发布回顾](https://dhtmlx.com/blog/releasing-dhtmlx-kanban-board-v-1-0/) + +### 初始功能 + +- 支持如下方式管理 **卡片**: + - 添加新卡片 + - 选择卡片(多选) + - 删除卡片 + - 搜索卡片 + - 拖动卡片到目标列(和行)实现排序 + - 通过编辑器管理卡片数据: + - 标签 + - 描述 + - 进度 + - 开始日期 + - 结束日期 + - 颜色 + - 优先级 + - 附件(*文件* 和 *图片*) + - *自定义字段* + +- 支持如下方式管理 **列** 和 **行**: + - 添加新列和新行 + - 删除列和行 + - 重命名列和行 + - 折叠/展开行 + +- [本地化](guides/localization.md) +- [与后端集成](guides/working_with_server.md)(Go 和 Node) +- 跨浏览器兼容 +- 支持触摸操作 \ No newline at end of file diff --git a/i18n/zh/docusaurus-theme-classic/footer.json b/i18n/zh/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000..dd91762 --- /dev/null +++ b/i18n/zh/docusaurus-theme-classic/footer.json @@ -0,0 +1,62 @@ +{ + "link.title.Development center": { + "message": "开发中心", + "description": "页脚中标题为开发中心的链接列标题" + }, + "link.title.Community": { + "message": "社区", + "description": "页脚中标题为社区的链接列标题" + }, + "link.title.Company": { + "message": "公司", + "description": "页脚中标题为公司的链接列标题" + }, + "link.item.label.Download JS Kanban": { + "message": "下载 JS 看板", + "description": "页脚中标签为下载 JS 看板的链接,链接到 https://dhtmlx.com/docs/products/dhtmlxKanban/download.shtml" + }, + "link.item.label.Examples": { + "message": "示例", + "description": "页脚中标签为示例的链接,链接到 https://snippet.dhtmlx.com/5hcx01h4?tag=kanban" + }, + "link.item.label.Blog": { + "message": "博客", + "description": "页脚中标签为博客的链接,链接到 https://dhtmlx.com/blog/tag/kanban/" + }, + "link.item.label.Forum": { + "message": "论坛", + "description": "页脚中标签为论坛的链接,链接到 https://forum.dhtmlx.com/c/kanban/" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "页脚中标签为GitHub的链接,链接到 https://github.com/DHTMLX" + }, + "link.item.label.Youtube": { + "message": "Youtube", + "description": "页脚中标签为Youtube的链接,链接到 https://www.youtube.com/user/dhtmlx" + }, + "link.item.label.Facebook": { + "message": "Facebook", + "description": "页脚中标签为Facebook的链接,链接到 https://www.facebook.com/dhtmlx" + }, + "link.item.label.Twitter": { + "message": "Twitter", + "description": "页脚中标签为Twitter的链接,链接到 https://twitter.com/dhtmlx" + }, + "link.item.label.Linkedin": { + "message": "领英", + "description": "页脚中标签为Linkedin的链接,链接到 https://www.linkedin.com/groups/3345009/" + }, + "link.item.label.About us": { + "message": "关于我们", + "description": "页脚中标签为关于我们的链接,链接到 https://dhtmlx.com/docs/company.shtml" + }, + "link.item.label.Contact us": { + "message": "联系我们", + "description": "页脚中标签为联系我们的链接,链接到 https://dhtmlx.com/docs/contact.shtml" + }, + "link.item.label.Licensing": { + "message": "许可协议", + "description": "页脚中标签为许可协议的链接,链接到 https://dhtmlx.com/docs/products/dhtmlxKanban/#licensing" + } +} \ No newline at end of file diff --git a/i18n/zh/docusaurus-theme-classic/navbar.json b/i18n/zh/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000..b7b9a7c --- /dev/null +++ b/i18n/zh/docusaurus-theme-classic/navbar.json @@ -0,0 +1,26 @@ +{ + "title": { + "message": "JavaScript 看板文档", + "description": "导航栏中的标题" + }, + "logo.alt": { + "message": "DHTMLX JavaScript 看板标志", + "description": "导航栏标志的替代文本" + }, + "item.label.Examples": { + "message": "示例", + "description": "带有标签“示例”的导航栏项目" + }, + "item.label.Forum": { + "message": "论坛", + "description": "带有标签“论坛”的导航栏项目" + }, + "item.label.Support": { + "message": "支持", + "description": "带有标签“支持”的导航栏项目" + }, + "item.label.Download": { + "message": "下载", + "description": "带有标签“下载”的导航栏项目" + } +} \ No newline at end of file diff --git a/local_modules/dhx-md-data-parser/index.js b/local_modules/dhx-md-data-parser/index.js index 5f68410..348a5d1 100644 --- a/local_modules/dhx-md-data-parser/index.js +++ b/local_modules/dhx-md-data-parser/index.js @@ -25,7 +25,7 @@ const AT_NOTATION_FUNCTION_MATCH_REGEXP = /@(\w+)\((.*)\)/g; const BRACE_NOTATION_REGEXP = /\{\{(\w+)[(?:\r?\n|\r)\s]+((?:.|(?:\r?\n|\r))+?)\}\}/g; // [](link) -// e.g [Chart API Overview](api/api_overview.md) +// e.g [Chart API Overview](/api/api_overview.md) const EMPTY_LINK_REGEXP = /\[\]\(.+?\)/g; class FileDataParser { @@ -52,7 +52,7 @@ class FileDataParser { // const data = parse(this.#fileData); // TODO: Convert to jsx only the required html (which is not wrapped in js md markup e.g.). // TODO: Use node-html-parser to parse html in the string - // TODO: ~~~html ~~~ + // TODO:~~~html ~~~ this.#fileData = convert(this.#fileData); this.#findAndReplaceStrong(); } diff --git a/package.json b/package.json index 029da5c..c9d5718 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "^3.8.1", - "@docusaurus/preset-classic": "^3.8.1", + "@docusaurus/core": "^3.9.1", + "@docusaurus/preset-classic": "^3.9.1", "@mdx-js/react": "^3.0.0", "@svgr/webpack": "^5.5.0", "clsx": "^1.1.1", @@ -27,8 +27,8 @@ "url-loader": "^4.1.1" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.7.0", - "@docusaurus/types": "^3.7.0", + "@docusaurus/module-type-aliases": "^3.9.1", + "@docusaurus/types": "^3.9.1", "dhx-md-data-parser": "file:local_modules/dhx-md-data-parser", "docusaurus-plugin-sass": "^0.2.5" }, diff --git a/plugins/dhx-md-data-transformer-plugin.js b/plugins/dhx-md-data-transformer-plugin.js index 789ab3b..31188d5 100644 --- a/plugins/dhx-md-data-transformer-plugin.js +++ b/plugins/dhx-md-data-transformer-plugin.js @@ -17,7 +17,7 @@ module.exports = (context, options) => { module: { rules: [ { - include: [path.resolve(siteDir, 'docs')], + include: [path.resolve(siteDir, 'docs'), path.resolve(siteDir, 'i18n')], test: /(\.mdx?)$/, use: [ { diff --git a/retranslate.sh b/retranslate.sh new file mode 100755 index 0000000..6b99025 --- /dev/null +++ b/retranslate.sh @@ -0,0 +1,147 @@ +#!/bin/bash + +# Translation Update Script +# Usage: ./update_translations.sh + +set -e # Exit on any error + +# Check if required arguments are provided +if [ $# -ne 5 ]; then + echo "Usage: $0 " + echo " repo_path: Path to the git repository" + echo " source_folder: Source folder path relative to repo (e.g., 'docs/markdown')" + echo " target_folder: Target folder where processed results are stored" + echo " revision: Git revision to compare against (e.g., HEAD~1, commit_hash)" + echo " lang: target language" + exit 1 +fi + +REPO_PATH="$1" +SOURCE_FOLDER="$2" +TARGET_FOLDER="$3" +REVISION="$4" +LANG="$5" + +# Validate paths +if [ ! -d "$REPO_PATH" ]; then + echo "Error: Repository path '$REPO_PATH' does not exist" + exit 1 +fi + +if [ ! -d "$REPO_PATH/.git" ]; then + echo "Error: '$REPO_PATH' is not a git repository" + exit 1 +fi + +if [ ! -d "$TARGET_FOLDER" ]; then + echo "Error: Target folder '$TARGET_FOLDER' does not exist" + exit 1 +fi + +# Change to repository directory +cd "$REPO_PATH" + +# Verify revision exists +if ! git rev-parse --verify "$REVISION" >/dev/null 2>&1; then + echo "Error: Revision '$REVISION' does not exist in the repository" + exit 1 +fi + +echo "Repository: $REPO_PATH" +echo "Source folder: $SOURCE_FOLDER" +echo "Target folder: $TARGET_FOLDER" +echo "Comparing against revision: $REVISION ($(git rev-parse --short $REVISION))" +echo "Current revision: $(git rev-parse --short HEAD)" +echo "" + +# Get list of modified markdown files since the specified revision +echo "Finding modified markdown files since revision $REVISION..." +MODIFIED_FILES=$(git diff --name-only --diff-filter=AM "$REVISION" HEAD -- "$SOURCE_FOLDER" | grep '\.md$' || true) + +if [ -z "$MODIFIED_FILES" ]; then + echo "No modified markdown files found in '$SOURCE_FOLDER' since revision $REVISION" + exit 0 +fi + +echo "Found modified markdown files:" +echo "$MODIFIED_FILES" +echo "" + +# Process each modified file +while IFS= read -r file; do + if [ -z "$file" ]; then + continue + fi + + echo "Processing: $file" + + # Extract filename without path + filename=$(basename "$file") + + # Get original content from the specified revision + echo " Reading original content from revision $REVISION..." + TEMP_PROMPT_ORIGINAL=$(git show "$REVISION:$file" 2>/dev/null || echo "") + if [ -z "$TEMP_PROMPT_ORIGINAL" ]; then + echo " Warning: Could not get file content from revision $REVISION (file might be new)" + fi + + # Get diff content + echo " Creating diff..." + TEMP_PROMPT_DIFF=$(git diff "$REVISION" HEAD -- "$file" || echo "") + + # Find corresponding target file (processed result) and read its content + # Remove source folder prefix and look for the file in target folder + # Handle both cases: with and without trailing slash in SOURCE_FOLDER + if [[ "$file" == "$SOURCE_FOLDER/"* ]]; then + relative_path="${file#$SOURCE_FOLDER/}" + else + relative_path="${file#$SOURCE_FOLDER}" + relative_path="${relative_path#/}" # Remove leading slash if present + fi + target_file="$TARGET_FOLDER/$relative_path" + + echo " Reading previous translation..." + if [ -f "$target_file" ]; then + TEMP_PROMPT_TRANSLATION=$(cat "$target_file") + echo " Found existing target file: $target_file" + else + TEMP_PROMPT_TRANSLATION="" + echo " Warning: Target file not found: $target_file" + echo " Creating directory structure..." + mkdir -p "$(dirname "$target_file")" + echo " Attempt direct translation $file" + result=$(cat $file | gptit complete --model gpt-4.1 --prompt translate-v1/en-$LANG) + echo "$result" > "$target_file" + continue + fi + + # Export environment variables with content + export TEMP_PROMPT_ORIGINAL + export TEMP_PROMPT_TRANSLATION + export TEMP_PROMPT_DIFF + + echo "Environment variables set with content:" + echo " TEMP_PROMPT_ORIGINAL (${#TEMP_PROMPT_ORIGINAL} characters)" + echo " TEMP_PROMPT_TRANSLATION (${#TEMP_PROMPT_TRANSLATION} characters)" + echo " TEMP_PROMPT_DIFF (${#TEMP_PROMPT_DIFF} characters)" + echo "" + + result=$(gptit complete --prompt translate-v1/en-$LANG-update --model gpt-4.1 "") + # Save the result to the target file + if [ -n "$result" ]; then + echo "$result" > "$target_file" + echo " result (${#result} characters)" + echo " Updated target file: $target_file" + else + echo " Error: Processing returned empty result" + fi + + # Clean up environment variables for security + unset TEMP_PROMPT_ORIGINAL + unset TEMP_PROMPT_TRANSLATION + unset TEMP_PROMPT_DIFF + + echo "" +done <<< "$MODIFIED_FILES" + +echo "Processing completed!" \ No newline at end of file diff --git a/static/assets/js_kanban_board.png b/static/assets/js_kanban_board.png new file mode 100755 index 0000000..247c695 Binary files /dev/null and b/static/assets/js_kanban_board.png differ diff --git a/static/assets/js_kanban_editor.png b/static/assets/js_kanban_editor.png new file mode 100755 index 0000000..525d0d0 Binary files /dev/null and b/static/assets/js_kanban_editor.png differ diff --git a/static/assets/js_kanban_main.png b/static/assets/js_kanban_main.png new file mode 100644 index 0000000..f6aa948 Binary files /dev/null and b/static/assets/js_kanban_main.png differ diff --git a/static/assets/js_kanban_toolbar.png b/static/assets/js_kanban_toolbar.png new file mode 100755 index 0000000..4c79b7f Binary files /dev/null and b/static/assets/js_kanban_toolbar.png differ diff --git a/static/assets/trial_kanban.png b/static/assets/trial_kanban.png new file mode 100644 index 0000000..e71d948 Binary files /dev/null and b/static/assets/trial_kanban.png differ diff --git a/static/assets/trial_kanban_advanced.png b/static/assets/trial_kanban_advanced.png new file mode 100644 index 0000000..555b3f1 Binary files /dev/null and b/static/assets/trial_kanban_advanced.png differ diff --git a/yarn.lock b/yarn.lock index 49f81ca..29c8cc0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -250,6 +250,16 @@ __metadata: languageName: node linkType: hard +"@ampproject/remapping@npm:^2.2.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10c0/81d63cca5443e0f0c72ae18b544cc28c7c0ec2cea46e7cb888bb0e0f411a1191d0d6b7af798d54e30777d8d1488b2ec0732aac2be342d3d7d3ffd271c6f489ed + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.27.1": version: 7.27.1 resolution: "@babel/code-frame@npm:7.27.1" @@ -262,32 +272,32 @@ __metadata: linkType: hard "@babel/compat-data@npm:^7.27.2, @babel/compat-data@npm:^7.27.7, @babel/compat-data@npm:^7.28.0": - version: 7.28.4 - resolution: "@babel/compat-data@npm:7.28.4" - checksum: 10c0/9d346471e0a016641df9a325f42ad1e8324bbdc0243ce4af4dd2b10b974128590da9eb179eea2c36647b9bb987343119105e96773c1f6981732cd4f87e5a03b9 + version: 7.28.0 + resolution: "@babel/compat-data@npm:7.28.0" + checksum: 10c0/c4e527302bcd61052423f757355a71c3bc62362bac13f7f130de16e439716f66091ff5bdecda418e8fa0271d4c725f860f0ee23ab7bf6e769f7a8bb16dfcb531 languageName: node linkType: hard "@babel/core@npm:^7.12.3, @babel/core@npm:^7.21.3, @babel/core@npm:^7.25.9": - version: 7.28.4 - resolution: "@babel/core@npm:7.28.4" + version: 7.28.3 + resolution: "@babel/core@npm:7.28.3" dependencies: + "@ampproject/remapping": "npm:^2.2.0" "@babel/code-frame": "npm:^7.27.1" "@babel/generator": "npm:^7.28.3" "@babel/helper-compilation-targets": "npm:^7.27.2" "@babel/helper-module-transforms": "npm:^7.28.3" - "@babel/helpers": "npm:^7.28.4" - "@babel/parser": "npm:^7.28.4" + "@babel/helpers": "npm:^7.28.3" + "@babel/parser": "npm:^7.28.3" "@babel/template": "npm:^7.27.2" - "@babel/traverse": "npm:^7.28.4" - "@babel/types": "npm:^7.28.4" - "@jridgewell/remapping": "npm:^2.3.5" + "@babel/traverse": "npm:^7.28.3" + "@babel/types": "npm:^7.28.2" convert-source-map: "npm:^2.0.0" debug: "npm:^4.1.0" gensync: "npm:^1.0.0-beta.2" json5: "npm:^2.2.3" semver: "npm:^6.3.1" - checksum: 10c0/ef5a6c3c6bf40d3589b5593f8118cfe2602ce737412629fb6e26d595be2fcbaae0807b43027a5c42ec4fba5b895ff65891f2503b5918c8a3ea3542ab44d4c278 + checksum: 10c0/e6b3eb830c4b93f5a442b305776df1cd2bb4fafa4612355366f67c764f3e54a69d45b84def77fb2d4fd83439102667b0a92c3ea2838f678733245b748c602a7b languageName: node linkType: hard @@ -495,24 +505,24 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.28.4": - version: 7.28.4 - resolution: "@babel/helpers@npm:7.28.4" +"@babel/helpers@npm:^7.28.3": + version: 7.28.3 + resolution: "@babel/helpers@npm:7.28.3" dependencies: "@babel/template": "npm:^7.27.2" - "@babel/types": "npm:^7.28.4" - checksum: 10c0/aaa5fb8098926dfed5f223adf2c5e4c7fbba4b911b73dfec2d7d3083f8ba694d201a206db673da2d9b3ae8c01793e795767654558c450c8c14b4c2175b4fcb44 + "@babel/types": "npm:^7.28.2" + checksum: 10c0/03a8f94135415eec62d37be9c62c63908f2d5386c7b00e04545de4961996465775330e3eb57717ea7451e19b0e24615777ebfec408c2adb1df3b10b4df6bf1ce languageName: node linkType: hard -"@babel/parser@npm:^7.27.2, @babel/parser@npm:^7.28.3, @babel/parser@npm:^7.28.4": - version: 7.28.4 - resolution: "@babel/parser@npm:7.28.4" +"@babel/parser@npm:^7.27.2, @babel/parser@npm:^7.28.3": + version: 7.28.3 + resolution: "@babel/parser@npm:7.28.3" dependencies: - "@babel/types": "npm:^7.28.4" + "@babel/types": "npm:^7.28.2" bin: parser: ./bin/babel-parser.js - checksum: 10c0/58b239a5b1477ac7ed7e29d86d675cc81075ca055424eba6485872626db2dc556ce63c45043e5a679cd925e999471dba8a3ed4864e7ab1dbf64306ab72c52707 + checksum: 10c0/1f41eb82623b0ca0f94521b57f4790c6c457cd922b8e2597985b36bdec24114a9ccf54640286a760ceb60f11fe9102d192bf60477aee77f5d45f1029b9b72729 languageName: node linkType: hard @@ -700,13 +710,13 @@ __metadata: linkType: hard "@babel/plugin-transform-block-scoping@npm:^7.28.0": - version: 7.28.4 - resolution: "@babel/plugin-transform-block-scoping@npm:7.28.4" + version: 7.28.0 + resolution: "@babel/plugin-transform-block-scoping@npm:7.28.0" dependencies: "@babel/helper-plugin-utils": "npm:^7.27.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/5b9a4e90f957742021fa8bad239cde28ec67b95d36b0e1fcf9f3f9cab6120671ab5e7ee6eacbcd51d0815ddea6978abc9a99a0bd493c43e3e27ec3ae1cb4de23 + checksum: 10c0/787d85e72a92917e735aa54e23062fa777031f8a07046e67f5026eff3d91e64eb535575dd1df917b0011bee014ae51287478af14c1d4ba60bc81e326bc044cfc languageName: node linkType: hard @@ -735,18 +745,18 @@ __metadata: linkType: hard "@babel/plugin-transform-classes@npm:^7.28.3": - version: 7.28.4 - resolution: "@babel/plugin-transform-classes@npm:7.28.4" + version: 7.28.3 + resolution: "@babel/plugin-transform-classes@npm:7.28.3" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.27.3" "@babel/helper-compilation-targets": "npm:^7.27.2" "@babel/helper-globals": "npm:^7.28.0" "@babel/helper-plugin-utils": "npm:^7.27.1" "@babel/helper-replace-supers": "npm:^7.27.1" - "@babel/traverse": "npm:^7.28.4" + "@babel/traverse": "npm:^7.28.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/76687ed37216ff012c599870dc00183fb716f22e1a02fe9481943664c0e4d0d88c3da347dc3fe290d4728f4d47cd594ffa621d23845e2bb8ab446e586308e066 + checksum: 10c0/01b6122a127c28ee42a41eacf7da14417901898a29b722c40fbf9d3db0755461f3b5a82c091496c47fe328d4e22f2266966654dc84749296f9cfabf8a4ad9e0c languageName: node linkType: hard @@ -1019,17 +1029,17 @@ __metadata: linkType: hard "@babel/plugin-transform-object-rest-spread@npm:^7.28.0": - version: 7.28.4 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.28.4" + version: 7.28.0 + resolution: "@babel/plugin-transform-object-rest-spread@npm:7.28.0" dependencies: "@babel/helper-compilation-targets": "npm:^7.27.2" "@babel/helper-plugin-utils": "npm:^7.27.1" "@babel/plugin-transform-destructuring": "npm:^7.28.0" "@babel/plugin-transform-parameters": "npm:^7.27.7" - "@babel/traverse": "npm:^7.28.4" + "@babel/traverse": "npm:^7.28.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/81725c8d6349957899975f3f789b1d4fb050ee8b04468ebfaccd5b59e0bda15cbfdef09aee8b4359f322b6715149d680361f11c1a420c4bdbac095537ecf7a90 + checksum: 10c0/360dc6fd5285ee5e1d3be8a1fb0decd120b2a1726800317b4ab48b7c91616247030239b7fa06ceaa1a8a586fde1e143c24d45f8d41956876099d97d664f8ef1e languageName: node linkType: hard @@ -1176,13 +1186,13 @@ __metadata: linkType: hard "@babel/plugin-transform-regenerator@npm:^7.28.3": - version: 7.28.4 - resolution: "@babel/plugin-transform-regenerator@npm:7.28.4" + version: 7.28.3 + resolution: "@babel/plugin-transform-regenerator@npm:7.28.3" dependencies: "@babel/helper-plugin-utils": "npm:^7.27.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/5ad14647ffaac63c920e28df1b580ee2e932586bbdc71f61ec264398f68a5406c71a7f921de397a41b954a69316c5ab90e5d789ffa2bb34c5e6feb3727cfefb8 + checksum: 10c0/57443c680251f86aa75c15b02b9a741df2b76bcad8eb53b9941bc09b50d50108f108e1243effe99113892f07880d2d201e932677dce0b701aefb356ce7188be9 languageName: node linkType: hard @@ -1468,18 +1478,18 @@ __metadata: linkType: hard "@babel/runtime-corejs3@npm:^7.25.9": - version: 7.28.4 - resolution: "@babel/runtime-corejs3@npm:7.28.4" + version: 7.28.3 + resolution: "@babel/runtime-corejs3@npm:7.28.3" dependencies: core-js-pure: "npm:^3.43.0" - checksum: 10c0/0a7fe2d4e36d345acf090dd685b5c6ed55af3ead69a84e2cfca56631815dd757f3a362031b376cc746f63f0fd856e7a5280807833f7fa9a5b7f1febd97f8c0da + checksum: 10c0/07de7d790909159af47adfd8d159e3c0fe31beaa74f584dd2885a85463cc40be7217b68b121c49661e56c8cddd9ae869ed611f1173d9cc317b07faa959ce4645 languageName: node linkType: hard "@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.25.9": - version: 7.28.4 - resolution: "@babel/runtime@npm:7.28.4" - checksum: 10c0/792ce7af9750fb9b93879cc9d1db175701c4689da890e6ced242ea0207c9da411ccf16dc04e689cc01158b28d7898c40d75598f4559109f761c12ce01e959bf7 + version: 7.28.3 + resolution: "@babel/runtime@npm:7.28.3" + checksum: 10c0/b360f82c2c5114f2a062d4d143d7b4ec690094764853937110585a9497977aed66c102166d0e404766c274e02a50ffb8f6d77fef7251ecf3f607f0e03e6397bc languageName: node linkType: hard @@ -1494,28 +1504,28 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.25.9, @babel/traverse@npm:^7.27.1, @babel/traverse@npm:^7.28.0, @babel/traverse@npm:^7.28.3, @babel/traverse@npm:^7.28.4": - version: 7.28.4 - resolution: "@babel/traverse@npm:7.28.4" +"@babel/traverse@npm:^7.25.9, @babel/traverse@npm:^7.27.1, @babel/traverse@npm:^7.28.0, @babel/traverse@npm:^7.28.3": + version: 7.28.3 + resolution: "@babel/traverse@npm:7.28.3" dependencies: "@babel/code-frame": "npm:^7.27.1" "@babel/generator": "npm:^7.28.3" "@babel/helper-globals": "npm:^7.28.0" - "@babel/parser": "npm:^7.28.4" + "@babel/parser": "npm:^7.28.3" "@babel/template": "npm:^7.27.2" - "@babel/types": "npm:^7.28.4" + "@babel/types": "npm:^7.28.2" debug: "npm:^4.3.1" - checksum: 10c0/ee678fdd49c9f54a32e07e8455242390d43ce44887cea6567b233fe13907b89240c377e7633478a32c6cf1be0e17c2f7f3b0c59f0666e39c5074cc47b968489c + checksum: 10c0/26e95b29a46925b7b41255e03185b7e65b2c4987e14bbee7bbf95867fb19c69181f301bbe1c7b201d4fe0cce6aa0cbea0282dad74b3a0fef3d9058f6c76fdcb3 languageName: node linkType: hard -"@babel/types@npm:^7.12.6, @babel/types@npm:^7.21.3, @babel/types@npm:^7.27.1, @babel/types@npm:^7.27.3, @babel/types@npm:^7.28.2, @babel/types@npm:^7.28.4, @babel/types@npm:^7.4.4": - version: 7.28.4 - resolution: "@babel/types@npm:7.28.4" +"@babel/types@npm:^7.12.6, @babel/types@npm:^7.21.3, @babel/types@npm:^7.27.1, @babel/types@npm:^7.27.3, @babel/types@npm:^7.28.2, @babel/types@npm:^7.4.4": + version: 7.28.2 + resolution: "@babel/types@npm:7.28.2" dependencies: "@babel/helper-string-parser": "npm:^7.27.1" "@babel/helper-validator-identifier": "npm:^7.27.1" - checksum: 10c0/ac6f909d6191319e08c80efbfac7bd9a25f80cc83b43cd6d82e7233f7a6b9d6e7b90236f3af7400a3f83b576895bcab9188a22b584eb0f224e80e6d4e95f4517 + checksum: 10c0/24b11c9368e7e2c291fe3c1bcd1ed66f6593a3975f479cbb9dd7b8c8d8eab8a962b0d2fca616c043396ce82500ac7d23d594fbbbd013828182c01596370a0b10 languageName: node linkType: hard @@ -1592,18 +1602,18 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-alpha-function@npm:^1.0.1": - version: 1.0.1 - resolution: "@csstools/postcss-alpha-function@npm:1.0.1" +"@csstools/postcss-alpha-function@npm:^1.0.0": + version: 1.0.0 + resolution: "@csstools/postcss-alpha-function@npm:1.0.0" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/35ca209e572534ade21ac5c18aad702aa492eb39e2d0e475f441371063418fe9650554e6a59b1318d3a615da83ef54d9a588faa27063ecc0a568ef7290a6b488 + checksum: 10c0/e5e0f090ea1976594151c860abb49adccbdbb82542ec57315b7fb54b0fa4c32065619581f126d29692bf448f358abd29b0fa702ae8973f16d381c981ed99fc76 languageName: node linkType: hard @@ -1619,92 +1629,77 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-color-function-display-p3-linear@npm:^1.0.1": - version: 1.0.1 - resolution: "@csstools/postcss-color-function-display-p3-linear@npm:1.0.1" +"@csstools/postcss-color-function-display-p3-linear@npm:^1.0.0": + version: 1.0.0 + resolution: "@csstools/postcss-color-function-display-p3-linear@npm:1.0.0" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/d02d45410c9257f5620c766f861f8fa3762b74ef01fdba8060b33a4c98f929e2219cd476b25bd4181ac186158a4d99a0da555c0b6ba45a7ac4a3a5885baad1f5 + checksum: 10c0/c5bf6a43d6a5d33c39e673db7b2573b5b0ab577eb30d3a01bb73ed08756814aa0869b781a52fbd168271fc8619ff114ca3df4438e4c41211f51b3743b0a86680 languageName: node linkType: hard -"@csstools/postcss-color-function@npm:^4.0.12": - version: 4.0.12 - resolution: "@csstools/postcss-color-function@npm:4.0.12" +"@csstools/postcss-color-function@npm:^4.0.11": + version: 4.0.11 + resolution: "@csstools/postcss-color-function@npm:4.0.11" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/a355b04d90f89c8e37a4a23543151558060acc68fb2e7d1c3549bebeeae2b147eec26af1fbc6ee690f0ba4830263f2d181f5331d16d3483b5542be46996fa755 + checksum: 10c0/6c7dfe71df21db7e7f11decbdf80ed4d1af6bbd4196fe851371685e97728cfae34f8fd3465ed9407b6f22547633d9d102984c3bcbbb45eb4679474b83d4f6d96 languageName: node linkType: hard -"@csstools/postcss-color-mix-function@npm:^3.0.12": - version: 3.0.12 - resolution: "@csstools/postcss-color-mix-function@npm:3.0.12" +"@csstools/postcss-color-mix-function@npm:^3.0.11": + version: 3.0.11 + resolution: "@csstools/postcss-color-mix-function@npm:3.0.11" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/3e98a5118852083d1f87a3f842f78088192b1f9f08fdf1f3b3ef1e8969e18fdadc1e3bcac3d113a07c8917a7e8fa65fdec55a31df9a1b726c8d7ae89db86e8e5 + checksum: 10c0/8dac54af709e82541ee6356f4b570563543961b65ac4c3bc9849c94a75c0c088bdea43f228003ade92ecc5c688355937c80fbf4f4227ce6cff19aaa482cd8ef3 languageName: node linkType: hard -"@csstools/postcss-color-mix-variadic-function-arguments@npm:^1.0.2": - version: 1.0.2 - resolution: "@csstools/postcss-color-mix-variadic-function-arguments@npm:1.0.2" +"@csstools/postcss-color-mix-variadic-function-arguments@npm:^1.0.1": + version: 1.0.1 + resolution: "@csstools/postcss-color-mix-variadic-function-arguments@npm:1.0.1" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/34073f0f0d33e4958f90763e692955a8e8c678b74284234497c4aa0d2143756e1b3616e0c09832caad498870e227ca0a681316afe3a71224fc40ade0ead1bdd9 + checksum: 10c0/e281e0cf6aa71a05d77af83591f870b8a9d89d0b5c90d8654d9176e7629a83713c82430e92614ac8dda0b99ba9a8d471afcbc52dcef01f7920e7bf7090c585ca languageName: node linkType: hard -"@csstools/postcss-content-alt-text@npm:^2.0.8": - version: 2.0.8 - resolution: "@csstools/postcss-content-alt-text@npm:2.0.8" - dependencies: - "@csstools/css-parser-algorithms": "npm:^3.0.5" - "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" - "@csstools/utilities": "npm:^2.0.0" - peerDependencies: - postcss: ^8.4 - checksum: 10c0/4c330cc2a1e434688a62613ecceb1434cd725ce024c1ad8d4a4c76b9839d1f3ea8566a8c6494921e2b46ec7feef6af8ed6548c216dcb8f0feab4b1d52c96228e - languageName: node - linkType: hard - -"@csstools/postcss-contrast-color-function@npm:^2.0.12": - version: 2.0.12 - resolution: "@csstools/postcss-contrast-color-function@npm:2.0.12" +"@csstools/postcss-content-alt-text@npm:^2.0.7": + version: 2.0.7 + resolution: "@csstools/postcss-content-alt-text@npm:2.0.7" dependencies: - "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/b783ce948cdf1513ee238e9115b42881a8d3e5d13c16038601b1c470d661cfaeeece4eea29904fb9fcae878bad86f766810fa798a703ab9ad4b0cf276b173f8f + checksum: 10c0/0eb8927ca0ee1078d81e2c210f527949d6558c90d71f1b41f6882ba3baf3517e1cf0f3e86e47c56803b12764f994d03cb5eb0aa46ec972da88a5405d06e7db47 languageName: node linkType: hard @@ -1746,46 +1741,46 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-gradients-interpolation-method@npm:^5.0.12": - version: 5.0.12 - resolution: "@csstools/postcss-gradients-interpolation-method@npm:5.0.12" +"@csstools/postcss-gradients-interpolation-method@npm:^5.0.11": + version: 5.0.11 + resolution: "@csstools/postcss-gradients-interpolation-method@npm:5.0.11" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/70b3d6c7050ce882ed2281e71eb4493531ae8d55d21899920eeeb6c205d90aaf430419a66235484ccce3a1a1891367dfc0ef772f3866ae3a9d8ec5ddd0cfe894 + checksum: 10c0/0af60c2dbd8edc84e24c76d8edda3f3a663bd5eea99fd83e7827ac02ad168e75440a9ce9cab61997501f8195a3eb35928817f9878a28d66cb8cd0f552fca3fb6 languageName: node linkType: hard -"@csstools/postcss-hwb-function@npm:^4.0.12": - version: 4.0.12 - resolution: "@csstools/postcss-hwb-function@npm:4.0.12" +"@csstools/postcss-hwb-function@npm:^4.0.11": + version: 4.0.11 + resolution: "@csstools/postcss-hwb-function@npm:4.0.11" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/d0dac34da9d7ac654060b6b27690a419718e990b21ff3e63266ea59934a865bc6aeae8eb8e1ca3e227a8b2a208657e3ab70ccdf0437f1f09d21ab848bbffcaa2 + checksum: 10c0/b8fbb3f1440d20d5c686b62e46b600c751072ce6c3d6102118bb71038df4e979f2c9ac746dd49dafaa7845cb78f2b5dcc744ecb4f7028784bed337b240067014 languageName: node linkType: hard -"@csstools/postcss-ic-unit@npm:^4.0.4": - version: 4.0.4 - resolution: "@csstools/postcss-ic-unit@npm:4.0.4" +"@csstools/postcss-ic-unit@npm:^4.0.3": + version: 4.0.3 + resolution: "@csstools/postcss-ic-unit@npm:4.0.3" dependencies: - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" postcss-value-parser: "npm:^4.2.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/20168e70ecb4abf7a69e407d653b6c7c9c82f2c7b1da0920e1d035f62b5ef8552cc7f1b62e0dca318df13c348e79fba862e1a4bb0e9432119a82b10aeb511752 + checksum: 10c0/3425b499d4ba5b36edea3c4c6093744c9829e2d8191af6b2adbd7a2940f2cd8737f4367a91c144aaca0ec9b402cc8a9093b92ffcae77efa7b02f8df518e948ce languageName: node linkType: hard @@ -1810,17 +1805,17 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-light-dark-function@npm:^2.0.11": - version: 2.0.11 - resolution: "@csstools/postcss-light-dark-function@npm:2.0.11" +"@csstools/postcss-light-dark-function@npm:^2.0.10": + version: 2.0.10 + resolution: "@csstools/postcss-light-dark-function@npm:2.0.10" dependencies: "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/0175be41bb0044a48bc98d5c55cce41ed6b9ada88253c5f20d0ca17287cba4b429742b458ac5744675b9a286109e13ac51d64e226ab16040d7b051ba64c0c77b + checksum: 10c0/6c763a22022170a3464c0fbb00803fc0d954ef8ac28700b7bb8312847712f62a2573bab5e138ad0c87f87e1c9bdd3ff62edb9fc38f8a058c1abb7bc65cb3b6e4 languageName: node linkType: hard @@ -1924,29 +1919,29 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-oklab-function@npm:^4.0.12": - version: 4.0.12 - resolution: "@csstools/postcss-oklab-function@npm:4.0.12" +"@csstools/postcss-oklab-function@npm:^4.0.11": + version: 4.0.11 + resolution: "@csstools/postcss-oklab-function@npm:4.0.11" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/40d4f51b568c8299c054f8971d0e85fa7da609ba23ce6c84dc17e16bc3838640ed6da75c3886dc9a96a11005773c6e23cba13a5510c781b2d633d07ad7bda6b7 + checksum: 10c0/9887e9fd58710c6074d7bc289526ccafe914bacaa59a348a72bf0cc1baf43a088a5a767a15f06edbe9930ad3a3cb662d34be7a4bdeb025e6b88136f90f092722 languageName: node linkType: hard -"@csstools/postcss-progressive-custom-properties@npm:^4.2.1": - version: 4.2.1 - resolution: "@csstools/postcss-progressive-custom-properties@npm:4.2.1" +"@csstools/postcss-progressive-custom-properties@npm:^4.2.0": + version: 4.2.0 + resolution: "@csstools/postcss-progressive-custom-properties@npm:4.2.0" dependencies: postcss-value-parser: "npm:^4.2.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/56e9a147799719fd5c550c035437693dd50cdfef46d66a4f2ce8f196e1006a096aa47d412710a89c3dc9808068a0a101c7f607a507ed68e925580c6f921e84d5 + checksum: 10c0/163d5d1fa68b2a4973d13036462f381f8e5c32587f19c1d892ba4aa1f92783e3fcd654b9e197e74cd42053ce0234c157458b1c560a02b2cd6de4f2abc286960d languageName: node linkType: hard @@ -1963,18 +1958,18 @@ __metadata: languageName: node linkType: hard -"@csstools/postcss-relative-color-syntax@npm:^3.0.12": - version: 3.0.12 - resolution: "@csstools/postcss-relative-color-syntax@npm:3.0.12" +"@csstools/postcss-relative-color-syntax@npm:^3.0.11": + version: 3.0.11 + resolution: "@csstools/postcss-relative-color-syntax@npm:3.0.11" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/11af386c8193e22c148ac034eee94c56da3060bdbde3196d2d641b088e12de35bef187bcd7d421f9e4d49c4f1cfc28b24e136e62107e02ed7007a3a28f635d06 + checksum: 10c0/2dd5a49324097408f0fc40c33d04feb25d2a7b6ad3e7c3c730738ce0f3aee0a7fec15bd895b70ba718ad67b67074f2634446d232572aa5c59b505b59e4b9700c languageName: node linkType: hard @@ -2179,7 +2174,7 @@ __metadata: languageName: node linkType: hard -"@docusaurus/core@npm:3.9.1, @docusaurus/core@npm:^3.8.1": +"@docusaurus/core@npm:3.9.1, @docusaurus/core@npm:^3.9.1": version: 3.9.1 resolution: "@docusaurus/core@npm:3.9.1" dependencies: @@ -2292,7 +2287,7 @@ __metadata: languageName: node linkType: hard -"@docusaurus/module-type-aliases@npm:3.9.1, @docusaurus/module-type-aliases@npm:^3.7.0": +"@docusaurus/module-type-aliases@npm:3.9.1, @docusaurus/module-type-aliases@npm:^3.9.1": version: 3.9.1 resolution: "@docusaurus/module-type-aliases@npm:3.9.1" dependencies: @@ -2503,7 +2498,7 @@ __metadata: languageName: node linkType: hard -"@docusaurus/preset-classic@npm:^3.8.1": +"@docusaurus/preset-classic@npm:^3.9.1": version: 3.9.1 resolution: "@docusaurus/preset-classic@npm:3.9.1" dependencies: @@ -2626,7 +2621,7 @@ __metadata: languageName: node linkType: hard -"@docusaurus/types@npm:3.9.1, @docusaurus/types@npm:^3.7.0": +"@docusaurus/types@npm:3.9.1, @docusaurus/types@npm:^3.9.1": version: 3.9.1 resolution: "@docusaurus/types@npm:3.9.1" dependencies: @@ -2774,16 +2769,6 @@ __metadata: languageName: node linkType: hard -"@jridgewell/remapping@npm:^2.3.5": - version: 2.3.5 - resolution: "@jridgewell/remapping@npm:2.3.5" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10c0/3de494219ffeb2c5c38711d0d7bb128097edf91893090a2dbc8ee0b55d092bb7347b1fd0f478486c5eab010e855c73927b1666f2107516d472d24a73017d1194 - languageName: node - linkType: hard - "@jridgewell/resolve-uri@npm:^3.1.0": version: 3.1.2 resolution: "@jridgewell/resolve-uri@npm:3.1.2" @@ -2809,12 +2794,12 @@ __metadata: linkType: hard "@jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25, @jridgewell/trace-mapping@npm:^0.3.28": - version: 0.3.31 - resolution: "@jridgewell/trace-mapping@npm:0.3.31" + version: 0.3.30 + resolution: "@jridgewell/trace-mapping@npm:0.3.30" dependencies: "@jridgewell/resolve-uri": "npm:^3.1.0" "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 10c0/4b30ec8cd56c5fd9a661f088230af01e0c1a3888d11ffb6b47639700f71225be21d1f7e168048d6d4f9449207b978a235c07c8f15c07705685d16dc06280e9d9 + checksum: 10c0/3a1516c10f44613b9ba27c37a02ff8f410893776b2b3dad20a391b51b884dd60f97bbb56936d65d2ff8fe978510a0000266654ab8426bdb9ceb5fb4585b19e23 languageName: node linkType: hard @@ -3799,11 +3784,11 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 24.6.2 - resolution: "@types/node@npm:24.6.2" + version: 24.3.0 + resolution: "@types/node@npm:24.3.0" dependencies: - undici-types: "npm:~7.13.0" - checksum: 10c0/d029757711be85ec468686f66cd8eca78f5996d7e2b1a5b818436e0299b19925b0fb4f7509a6b62750abdc72d66f5750ce22fb8b55559baca86df89a9c44722e + undici-types: "npm:~7.10.0" + checksum: 10c0/96bdeca01f690338957c2dcc92cb9f76c262c10398f8d91860865464412b0f9d309c24d9b03d0bdd26dd47fa7ee3f8227893d5c89bc2009d919a525a22512030 languageName: node linkType: hard @@ -3882,11 +3867,11 @@ __metadata: linkType: hard "@types/react@npm:*": - version: 19.2.0 - resolution: "@types/react@npm:19.2.0" + version: 19.1.11 + resolution: "@types/react@npm:19.1.11" dependencies: csstype: "npm:^3.0.2" - checksum: 10c0/a280e146df2abd3b06eaa2f5332dade9f7ebe916334a40699ee11139c5f22aeb49b5b78b6de8c55b53ef2fa94285e1bc2feaf4fbce6fe259a7de92dc1bf67b17 + checksum: 10c0/639b225c2bbcd4b8a30e1ea7a73aec81ae5b952a4c432460b48c9881c9d12e76645c9032d24f15eefae9985a12d5cb26557fe10e9850b2da0fabfb0a1e2d16bd languageName: node linkType: hard @@ -3906,7 +3891,7 @@ __metadata: languageName: node linkType: hard -"@types/send@npm:*, @types/send@npm:<1": +"@types/send@npm:*": version: 0.17.5 resolution: "@types/send@npm:0.17.5" dependencies: @@ -3925,7 +3910,7 @@ __metadata: languageName: node linkType: hard -"@types/serve-static@npm:*": +"@types/serve-static@npm:*, @types/serve-static@npm:^1.15.5": version: 1.15.8 resolution: "@types/serve-static@npm:1.15.8" dependencies: @@ -3936,17 +3921,6 @@ __metadata: languageName: node linkType: hard -"@types/serve-static@npm:^1.15.5": - version: 1.15.9 - resolution: "@types/serve-static@npm:1.15.9" - dependencies: - "@types/http-errors": "npm:*" - "@types/node": "npm:*" - "@types/send": "npm:<1" - checksum: 10c0/3dc98f41085afbc1ea4768e764b891a6b917f01f0db8a1610a6bc8f0e989015c22af71a05f7b0ae336456169f86e863a60273ddd64c0fa13855ae4ed50ed7789 - languageName: node - linkType: hard - "@types/sockjs@npm:^0.3.36": version: 0.3.36 resolution: "@types/sockjs@npm:0.3.36" @@ -4218,7 +4192,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.11.0, acorn@npm:^8.15.0": +"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.11.0, acorn@npm:^8.14.0, acorn@npm:^8.15.0": version: 8.15.0 resolution: "acorn@npm:8.15.0" bin: @@ -4391,9 +4365,9 @@ __metadata: linkType: hard "ansi-regex@npm:^6.0.1": - version: 6.2.2 - resolution: "ansi-regex@npm:6.2.2" - checksum: 10c0/05d4acb1d2f59ab2cf4b794339c7b168890d44dda4bf0ce01152a8da0213aca207802f930442ce8cd22d7a92f44907664aac6508904e75e038fa944d2601b30f + version: 6.2.0 + resolution: "ansi-regex@npm:6.2.0" + checksum: 10c0/20a2e55ae9816074a60e6729dbe3daad664cd967fc82acc08b02f5677db84baa688babf940d71f50acbbb184c02459453789705e079f4d521166ae66451de551 languageName: node linkType: hard @@ -4416,9 +4390,9 @@ __metadata: linkType: hard "ansi-styles@npm:^6.1.0": - version: 6.2.3 - resolution: "ansi-styles@npm:6.2.3" - checksum: 10c0/23b8a4ce14e18fb854693b95351e286b771d23d8844057ed2e7d083cd3e708376c3323707ec6a24365f7d7eda3ca00327fe04092e29e551499ec4c8b7bfac868 + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c languageName: node linkType: hard @@ -4526,13 +4500,6 @@ __metadata: languageName: node linkType: hard -"async-generator-function@npm:^1.0.0": - version: 1.0.0 - resolution: "async-generator-function@npm:1.0.0" - checksum: 10c0/2c50ef856c543ad500d8d8777d347e3c1ba623b93e99c9263ecc5f965c1b12d2a140e2ab6e43c3d0b85366110696f28114649411cbcd10b452a92a2318394186 - languageName: node - linkType: hard - "autoprefixer@npm:^10.4.19, autoprefixer@npm:^10.4.21": version: 10.4.21 resolution: "autoprefixer@npm:10.4.21" @@ -4632,15 +4599,6 @@ __metadata: languageName: node linkType: hard -"baseline-browser-mapping@npm:^2.8.9": - version: 2.8.10 - resolution: "baseline-browser-mapping@npm:2.8.10" - bin: - baseline-browser-mapping: dist/cli.js - checksum: 10c0/3ab9eee25e161a689b70b82887c8ee5cefb690a50da1d15655e2dd959de70916a43789b5ddf6968e272029002891e90a5cb46ed90ee54042e6aeae3b1c9630d4 - languageName: node - linkType: hard - "batch@npm:0.6.1": version: 0.6.1 resolution: "batch@npm:0.6.1" @@ -4759,18 +4717,17 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.0.0, browserslist@npm:^4.23.0, browserslist@npm:^4.24.0, browserslist@npm:^4.24.4, browserslist@npm:^4.24.5, browserslist@npm:^4.25.3, browserslist@npm:^4.26.0": - version: 4.26.3 - resolution: "browserslist@npm:4.26.3" +"browserslist@npm:^4.0.0, browserslist@npm:^4.23.0, browserslist@npm:^4.24.0, browserslist@npm:^4.24.4, browserslist@npm:^4.25.1, browserslist@npm:^4.25.3": + version: 4.25.3 + resolution: "browserslist@npm:4.25.3" dependencies: - baseline-browser-mapping: "npm:^2.8.9" - caniuse-lite: "npm:^1.0.30001746" - electron-to-chromium: "npm:^1.5.227" - node-releases: "npm:^2.0.21" + caniuse-lite: "npm:^1.0.30001735" + electron-to-chromium: "npm:^1.5.204" + node-releases: "npm:^2.0.19" update-browserslist-db: "npm:^1.1.3" bin: browserslist: cli.js - checksum: 10c0/3899ee3b7fd205ece4ffe4392697c3f2b120b68f3741ef1789212b4971771aee3f66cf37c5c3accf86ce59c0605b5980c0f132711abbcc9e62c132e6e0ee45f3 + checksum: 10c0/cefbbf962b7c0f0d77e952a4b4b37469db7f7f02bc2be7297810ac3cf086660f48daf78d00f7aad8a11b682f88b0ee0022594165ead749e9e4158a0aa49cd161 languageName: node linkType: hard @@ -4921,10 +4878,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001702, caniuse-lite@npm:^1.0.30001746": - version: 1.0.30001747 - resolution: "caniuse-lite@npm:1.0.30001747" - checksum: 10c0/cef0c7fff34d4c0ac3edc33660f07785301c98858bb4a6b8702b7b09ca2b0fd5457a7772af7b9fc3591fdd13862f649e57eed824f4cb6cf4aedf563e58fc7d0c +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001702, caniuse-lite@npm:^1.0.30001735": + version: 1.0.30001737 + resolution: "caniuse-lite@npm:1.0.30001737" + checksum: 10c0/9d9cfe3b46fe670d171cee10c5c1b0fb641946fd5d6bea26149f804003d53d82ade7ef5a4a640fb3a0eaec47c7839b57e06a6ddae4f0ad2cd58e1187d31997ce languageName: node linkType: hard @@ -4957,9 +4914,9 @@ __metadata: linkType: hard "chalk@npm:^5.0.1, chalk@npm:^5.2.0": - version: 5.6.2 - resolution: "chalk@npm:5.6.2" - checksum: 10c0/99a4b0f0e7991796b1e7e3f52dceb9137cae2a9dfc8fc0784a550dc4c558e15ab32ed70b14b21b52beb2679b4892b41a0aa44249bcb996f01e125d58477c6976 + version: 5.6.0 + resolution: "chalk@npm:5.6.0" + checksum: 10c0/f8558fc12fd9805f167611803b325b0098bbccdc9f1d3bafead41c9bac61f263357f3c0df0cbe28bc2fd5fca3edcf618b01d6771a5a776b4c15d061482a72b23 languageName: node linkType: hard @@ -5477,15 +5434,15 @@ __metadata: linkType: hard "css-declaration-sorter@npm:^7.2.0": - version: 7.3.0 - resolution: "css-declaration-sorter@npm:7.3.0" + version: 7.2.0 + resolution: "css-declaration-sorter@npm:7.2.0" peerDependencies: postcss: ^8.0.9 - checksum: 10c0/a715c90ac1b849e52cb697eb3c28ae86ee80fa9ccb26a9da60eb5621a0a6657c41a8126e27d96a622f96ca70692e210ac33362888f0274ba23056ac401089fa5 + checksum: 10c0/d8516be94f8f2daa233ef021688b965c08161624cbf830a4d7ee1099429437c0ee124d35c91b1c659cfd891a68e8888aa941726dab12279bc114aaed60a94606 languageName: node linkType: hard -"css-has-pseudo@npm:^7.0.3": +"css-has-pseudo@npm:^7.0.2": version: 7.0.3 resolution: "css-has-pseudo@npm:7.0.3" dependencies: @@ -5659,10 +5616,10 @@ __metadata: languageName: node linkType: hard -"cssdb@npm:^8.4.2": - version: 8.4.2 - resolution: "cssdb@npm:8.4.2" - checksum: 10c0/3c88610ba9e3f87f9ecf068b72261e90de8bb1f5d1dceefc79ff42b2e19f5814135937ad057b7f8c4bf58212f911e5f9d2f6f0910af3da127170009f1f75689c +"cssdb@npm:^8.4.0": + version: 8.4.0 + resolution: "cssdb@npm:8.4.0" + checksum: 10c0/f43cc366e8f9b41b2762327ee32167438fa71b78464c869b8c02f4e014657ed9887d1b0f34529d1b2219666f17d1edce1e09ec01927a63ad91e3292e027c1ffc languageName: node linkType: hard @@ -5827,7 +5784,19 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.3.1, debug@npm:^4.3.4, debug@npm:^4.4.1": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.3.1, debug@npm:^4.4.1": + version: 4.4.1 + resolution: "debug@npm:4.4.1" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/d2b44bc1afd912b49bb7ebb0d50a860dc93a4dd7d946e8de94abc957bb63726b7dd5aa48c18c2386c379ec024c46692e15ed3ed97d481729f929201e671fcd55 + languageName: node + linkType: hard + +"debug@npm:^4.3.4": version: 4.4.3 resolution: "debug@npm:4.4.3" dependencies: @@ -5999,11 +5968,11 @@ __metadata: "dhx-md-data-parser@file:local_modules/dhx-md-data-parser::locator=docs-kanban%40workspace%3A.": version: 0.0.1 - resolution: "dhx-md-data-parser@file:local_modules/dhx-md-data-parser#local_modules/dhx-md-data-parser::hash=0f7c72&locator=docs-kanban%40workspace%3A." + resolution: "dhx-md-data-parser@file:local_modules/dhx-md-data-parser#local_modules/dhx-md-data-parser::hash=738a3a&locator=docs-kanban%40workspace%3A." dependencies: node-html-parser: "npm:^2.1.0" normalize-newline: "npm:^3.0.0" - checksum: 10c0/e06658ffa6772d61121e5ac3f1c965fc05d169d2c7ddc6ebcee3cdaf4db37e9eaf4f0c3adf3a7242f4f122e78540b656f54d222cebe855b147632c24962c008f + checksum: 10c0/23124cb459a86ea58da51bdda24f1df2e28ca710d53f5c0d035df8c2ccc29048d26087aaa54a2c3dcb506f7e9ecb39c5075715cf2cfb5934bb23bf553e5d2d10 languageName: node linkType: hard @@ -6029,10 +5998,10 @@ __metadata: version: 0.0.0-use.local resolution: "docs-kanban@workspace:." dependencies: - "@docusaurus/core": "npm:^3.8.1" - "@docusaurus/module-type-aliases": "npm:^3.7.0" - "@docusaurus/preset-classic": "npm:^3.8.1" - "@docusaurus/types": "npm:^3.7.0" + "@docusaurus/core": "npm:^3.9.1" + "@docusaurus/module-type-aliases": "npm:^3.9.1" + "@docusaurus/preset-classic": "npm:^3.9.1" + "@docusaurus/types": "npm:^3.9.1" "@mdx-js/react": "npm:^3.0.0" "@svgr/webpack": "npm:^5.5.0" clsx: "npm:^1.1.1" @@ -6215,10 +6184,10 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.5.227": - version: 1.5.230 - resolution: "electron-to-chromium@npm:1.5.230" - checksum: 10c0/b8bf382868b2780fa0c7ba3bce0644e94ec21af8f9b199ee094273904a575b46c8705fa4c10a22a0ed90e42dbbf72efbc3089bbecf8324a9db099c8c6c1c1101 +"electron-to-chromium@npm:^1.5.204": + version: 1.5.209 + resolution: "electron-to-chromium@npm:1.5.209" + checksum: 10c0/ec857aeecf85769310889926d55cf4032f93b213733e68b4bc48eab72e42e190f9f1a2694c8c175435cbd111dfdee420e1e1ffe5b2bd46b2f33324580e938f2c languageName: node linkType: hard @@ -6326,11 +6295,11 @@ __metadata: linkType: hard "error-ex@npm:^1.3.1": - version: 1.3.4 - resolution: "error-ex@npm:1.3.4" + version: 1.3.2 + resolution: "error-ex@npm:1.3.2" dependencies: is-arrayish: "npm:^0.2.1" - checksum: 10c0/b9e34ff4778b8f3b31a8377e1c654456f4c41aeaa3d10a1138c3b7635d8b7b2e03eb2475d46d8ae055c1f180a1063e100bffabf64ea7e7388b37735df5328664 + checksum: 10c0/ba827f89369b4c93382cfca5a264d059dfefdaa56ecc5e338ffa58a6471f5ed93b71a20add1d52290a4873d92381174382658c885ac1a2305f7baca363ce9cce languageName: node linkType: hard @@ -6994,13 +6963,13 @@ __metadata: linkType: hard "fs-extra@npm:^11.1.1, fs-extra@npm:^11.2.0": - version: 11.3.2 - resolution: "fs-extra@npm:11.3.2" + version: 11.3.1 + resolution: "fs-extra@npm:11.3.1" dependencies: graceful-fs: "npm:^4.2.0" jsonfile: "npm:^6.0.1" universalify: "npm:^2.0.0" - checksum: 10c0/f5d629e1bb646d5dedb4d8b24c5aad3deb8cc1d5438979d6f237146cd10e113b49a949ae1b54212c2fbc98e2d0995f38009a9a1d0520f0287943335e65fe919b + checksum: 10c0/61e5b7285b1ca72c68dfe1058b2514294a922683afac2a80aa90540f9bd85370763d675e3b408ef500077d355956fece3bd24b546790e261c3d3015967e2b2d9 languageName: node linkType: hard @@ -7060,13 +7029,6 @@ __metadata: languageName: node linkType: hard -"generator-function@npm:^2.0.0": - version: 2.0.1 - resolution: "generator-function@npm:2.0.1" - checksum: 10c0/8a9f59df0f01cfefafdb3b451b80555e5cf6d76487095db91ac461a0e682e4ff7a9dbce15f4ecec191e53586d59eece01949e05a4b4492879600bbbe8e28d6b8 - languageName: node - linkType: hard - "gensync@npm:^1.0.0-beta.2": version: 1.0.0-beta.2 resolution: "gensync@npm:1.0.0-beta.2" @@ -7075,23 +7037,20 @@ __metadata: linkType: hard "get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7, get-intrinsic@npm:^1.3.0": - version: 1.3.1 - resolution: "get-intrinsic@npm:1.3.1" + version: 1.3.0 + resolution: "get-intrinsic@npm:1.3.0" dependencies: - async-function: "npm:^1.0.0" - async-generator-function: "npm:^1.0.0" call-bind-apply-helpers: "npm:^1.0.2" es-define-property: "npm:^1.0.1" es-errors: "npm:^1.3.0" es-object-atoms: "npm:^1.1.1" function-bind: "npm:^1.1.2" - generator-function: "npm:^2.0.0" get-proto: "npm:^1.0.1" gopd: "npm:^1.2.0" has-symbols: "npm:^1.1.0" hasown: "npm:^2.0.2" math-intrinsics: "npm:^1.1.0" - checksum: 10c0/9f4ab0cf7efe0fd2c8185f52e6f637e708f3a112610c88869f8f041bb9ecc2ce44bf285dfdbdc6f4f7c277a5b88d8e94a432374d97cca22f3de7fc63795deb5d + checksum: 10c0/52c81808af9a8130f581e6a6a83e1ba4a9f703359e7a438d1369a5267a25412322f03dcbd7c549edaef0b6214a0630a28511d7df0130c93cfd380f4fa0b5b66a languageName: node linkType: hard @@ -7102,7 +7061,7 @@ __metadata: languageName: node linkType: hard -"get-proto@npm:^1.0.1": +"get-proto@npm:^1.0.0, get-proto@npm:^1.0.1": version: 1.0.1 resolution: "get-proto@npm:1.0.1" dependencies: @@ -8109,15 +8068,14 @@ __metadata: linkType: hard "is-generator-function@npm:^1.0.10": - version: 1.1.2 - resolution: "is-generator-function@npm:1.1.2" + version: 1.1.0 + resolution: "is-generator-function@npm:1.1.0" dependencies: - call-bound: "npm:^1.0.4" - generator-function: "npm:^2.0.0" - get-proto: "npm:^1.0.1" + call-bound: "npm:^1.0.3" + get-proto: "npm:^1.0.0" has-tostringtag: "npm:^1.0.2" safe-regex-test: "npm:^1.1.0" - checksum: 10c0/83da102e89c3e3b71d67b51d47c9f9bc862bceb58f87201727e27f7fa19d1d90b0ab223644ecaee6fc6e3d2d622bb25c966fbdaf87c59158b01ce7c0fe2fa372 + checksum: 10c0/fdfa96c8087bf36fc4cd514b474ba2ff404219a4dd4cfa6cf5426404a1eed259bdcdb98f082a71029a48d01f27733e3436ecc6690129a7ec09cb0434bee03a2a languageName: node linkType: hard @@ -8180,9 +8138,9 @@ __metadata: linkType: hard "is-npm@npm:^6.0.0": - version: 6.1.0 - resolution: "is-npm@npm:6.1.0" - checksum: 10c0/2319580963e7b77f51b07d242064926894472e0b8aab7d4f67aa58a2032715a18c77844a2d963718b8ee1eac112ce4dbcd55a9d994f589d5994d46b57b5cdfda + version: 6.0.0 + resolution: "is-npm@npm:6.0.0" + checksum: 10c0/1f064c66325cba6e494783bee4e635caa2655aad7f853a0e045d086e0bb7d83d2d6cdf1745dc9a7c7c93dacbf816fbee1f8d9179b02d5d01674d4f92541dc0d9 languageName: node linkType: hard @@ -8521,7 +8479,7 @@ __metadata: languageName: node linkType: hard -"jsesc@npm:^3.0.2, jsesc@npm:~3.1.0": +"jsesc@npm:^3.0.2": version: 3.1.0 resolution: "jsesc@npm:3.1.0" bin: @@ -8530,6 +8488,15 @@ __metadata: languageName: node linkType: hard +"jsesc@npm:~3.0.2": + version: 3.0.2 + resolution: "jsesc@npm:3.0.2" + bin: + jsesc: bin/jsesc + checksum: 10c0/ef22148f9e793180b14d8a145ee6f9f60f301abf443288117b4b6c53d0ecd58354898dc506ccbb553a5f7827965cd38bc5fb726575aae93c5e8915e2de8290e1 + languageName: node + linkType: hard + "json-buffer@npm:3.0.1": version: 3.0.1 resolution: "json-buffer@npm:3.0.1" @@ -9998,10 +9965,10 @@ __metadata: languageName: node linkType: hard -"node-releases@npm:^2.0.21": - version: 2.0.21 - resolution: "node-releases@npm:2.0.21" - checksum: 10c0/0eb94916eeebbda9d51da6a9ea47428a12b2bb0dd94930c949632b0c859356abf53b2e5a2792021f96c5fda4f791a8e195f2375b78ae7dba8d8bc3141baa1469 +"node-releases@npm:^2.0.19": + version: 2.0.19 + resolution: "node-releases@npm:2.0.19" + checksum: 10c0/52a0dbd25ccf545892670d1551690fe0facb6a471e15f2cfa1b20142a5b255b3aa254af5f59d6ecb69c2bec7390bc643c43aa63b13bf5e64b6075952e716b1aa languageName: node linkType: hard @@ -10038,9 +10005,9 @@ __metadata: linkType: hard "normalize-url@npm:^8.0.0": - version: 8.1.0 - resolution: "normalize-url@npm:8.1.0" - checksum: 10c0/e9b68db5f0264ce74fc083e2120b4a40fb3248e5dceec5f795bddcee0311b3613f858c9a65f258614fac2776b8e9957023bea8fe7299db1496b3cd1c75976cfe + version: 8.0.2 + resolution: "normalize-url@npm:8.0.2" + checksum: 10c0/1c62eee6ce184ad4a463ff2984ce5e440a5058c9dd7c5ef80c0a7696bbb1d3638534e266afb14ef9678dfa07fb6c980ef4cde990c80eeee55900c378b7970584 languageName: node linkType: hard @@ -10552,18 +10519,18 @@ __metadata: languageName: node linkType: hard -"postcss-color-functional-notation@npm:^7.0.12": - version: 7.0.12 - resolution: "postcss-color-functional-notation@npm:7.0.12" +"postcss-color-functional-notation@npm:^7.0.11": + version: 7.0.11 + resolution: "postcss-color-functional-notation@npm:7.0.11" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/dc80ba1a956ae9b396596bda72d9bdb92de96874378a38ba4e2177ffa35339dc76d894920bb013b6f10c9b75cfb41778e09956a438c2e9ea41b684f766c55f4a + checksum: 10c0/b06ec053c69c972ec705969dba7a208592a905fb1de4782905dc5332db9970f8e195cf3fac105572efacb8aaeb10bdda960719dd61657a6850feefa89983876e languageName: node linkType: hard @@ -10718,16 +10685,16 @@ __metadata: languageName: node linkType: hard -"postcss-double-position-gradients@npm:^6.0.4": - version: 6.0.4 - resolution: "postcss-double-position-gradients@npm:6.0.4" +"postcss-double-position-gradients@npm:^6.0.3": + version: 6.0.3 + resolution: "postcss-double-position-gradients@npm:6.0.3" dependencies: - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" postcss-value-parser: "npm:^4.2.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/6dbbe7a3855e84a9319df434e210225f6dfa7262e5959611355f1769c2c9d30d37a19737712f20eac6354876fff4ba556d8d0b12a90c78d8ab97c9a8da534a7c + checksum: 10c0/900fb99c7151a31fca162f383047ae032a8dd48f15bc1c6f2daebb4683968c8567ef8cc99b315b798152aaf643a30b24ebbf2ef2bee3b478733f3d4c7aba84de languageName: node linkType: hard @@ -10783,18 +10750,18 @@ __metadata: languageName: node linkType: hard -"postcss-lab-function@npm:^7.0.12": - version: 7.0.12 - resolution: "postcss-lab-function@npm:7.0.12" +"postcss-lab-function@npm:^7.0.11": + version: 7.0.11 + resolution: "postcss-lab-function@npm:7.0.11" dependencies: "@csstools/css-color-parser": "npm:^3.1.0" "@csstools/css-parser-algorithms": "npm:^3.0.5" "@csstools/css-tokenizer": "npm:^3.0.4" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/utilities": "npm:^2.0.0" peerDependencies: postcss: ^8.4 - checksum: 10c0/de39b59da3b97c18d055d81fba68993e93253184ed76f103c888273584f868c551d047814dd54445980a1bdc5987e8f8af141383d84ecc641e5a6ee7bd901095 + checksum: 10c0/031e3309b9537a77b4275c16a8072b88efede51bdcaf956556cedf68d55a256d573b836ad3d4f84276bfb1fcef5f02152fdc03b8bcb909495c1f4815664f7fcf languageName: node linkType: hard @@ -11117,26 +11084,25 @@ __metadata: linkType: hard "postcss-preset-env@npm:^10.2.1": - version: 10.4.0 - resolution: "postcss-preset-env@npm:10.4.0" + version: 10.3.0 + resolution: "postcss-preset-env@npm:10.3.0" dependencies: - "@csstools/postcss-alpha-function": "npm:^1.0.1" + "@csstools/postcss-alpha-function": "npm:^1.0.0" "@csstools/postcss-cascade-layers": "npm:^5.0.2" - "@csstools/postcss-color-function": "npm:^4.0.12" - "@csstools/postcss-color-function-display-p3-linear": "npm:^1.0.1" - "@csstools/postcss-color-mix-function": "npm:^3.0.12" - "@csstools/postcss-color-mix-variadic-function-arguments": "npm:^1.0.2" - "@csstools/postcss-content-alt-text": "npm:^2.0.8" - "@csstools/postcss-contrast-color-function": "npm:^2.0.12" + "@csstools/postcss-color-function": "npm:^4.0.11" + "@csstools/postcss-color-function-display-p3-linear": "npm:^1.0.0" + "@csstools/postcss-color-mix-function": "npm:^3.0.11" + "@csstools/postcss-color-mix-variadic-function-arguments": "npm:^1.0.1" + "@csstools/postcss-content-alt-text": "npm:^2.0.7" "@csstools/postcss-exponential-functions": "npm:^2.0.9" "@csstools/postcss-font-format-keywords": "npm:^4.0.0" "@csstools/postcss-gamut-mapping": "npm:^2.0.11" - "@csstools/postcss-gradients-interpolation-method": "npm:^5.0.12" - "@csstools/postcss-hwb-function": "npm:^4.0.12" - "@csstools/postcss-ic-unit": "npm:^4.0.4" + "@csstools/postcss-gradients-interpolation-method": "npm:^5.0.11" + "@csstools/postcss-hwb-function": "npm:^4.0.11" + "@csstools/postcss-ic-unit": "npm:^4.0.3" "@csstools/postcss-initial": "npm:^2.0.1" "@csstools/postcss-is-pseudo-class": "npm:^5.0.3" - "@csstools/postcss-light-dark-function": "npm:^2.0.11" + "@csstools/postcss-light-dark-function": "npm:^2.0.10" "@csstools/postcss-logical-float-and-clear": "npm:^3.0.0" "@csstools/postcss-logical-overflow": "npm:^2.0.0" "@csstools/postcss-logical-overscroll-behavior": "npm:^2.0.0" @@ -11146,10 +11112,10 @@ __metadata: "@csstools/postcss-media-queries-aspect-ratio-number-values": "npm:^3.0.5" "@csstools/postcss-nested-calc": "npm:^4.0.0" "@csstools/postcss-normalize-display-values": "npm:^4.0.0" - "@csstools/postcss-oklab-function": "npm:^4.0.12" - "@csstools/postcss-progressive-custom-properties": "npm:^4.2.1" + "@csstools/postcss-oklab-function": "npm:^4.0.11" + "@csstools/postcss-progressive-custom-properties": "npm:^4.2.0" "@csstools/postcss-random-function": "npm:^2.0.1" - "@csstools/postcss-relative-color-syntax": "npm:^3.0.12" + "@csstools/postcss-relative-color-syntax": "npm:^3.0.11" "@csstools/postcss-scope-pseudo-class": "npm:^4.0.1" "@csstools/postcss-sign-functions": "npm:^1.1.4" "@csstools/postcss-stepped-value-functions": "npm:^4.0.9" @@ -11157,27 +11123,27 @@ __metadata: "@csstools/postcss-trigonometric-functions": "npm:^4.0.9" "@csstools/postcss-unset-value": "npm:^4.0.0" autoprefixer: "npm:^10.4.21" - browserslist: "npm:^4.26.0" + browserslist: "npm:^4.25.1" css-blank-pseudo: "npm:^7.0.1" - css-has-pseudo: "npm:^7.0.3" + css-has-pseudo: "npm:^7.0.2" css-prefers-color-scheme: "npm:^10.0.0" - cssdb: "npm:^8.4.2" + cssdb: "npm:^8.4.0" postcss-attribute-case-insensitive: "npm:^7.0.1" postcss-clamp: "npm:^4.1.0" - postcss-color-functional-notation: "npm:^7.0.12" + postcss-color-functional-notation: "npm:^7.0.11" postcss-color-hex-alpha: "npm:^10.0.0" postcss-color-rebeccapurple: "npm:^10.0.0" postcss-custom-media: "npm:^11.0.6" postcss-custom-properties: "npm:^14.0.6" postcss-custom-selectors: "npm:^8.0.5" postcss-dir-pseudo-class: "npm:^9.0.1" - postcss-double-position-gradients: "npm:^6.0.4" + postcss-double-position-gradients: "npm:^6.0.3" postcss-focus-visible: "npm:^10.0.1" postcss-focus-within: "npm:^9.0.1" postcss-font-variant: "npm:^5.0.0" postcss-gap-properties: "npm:^6.0.0" postcss-image-set-function: "npm:^7.0.0" - postcss-lab-function: "npm:^7.0.12" + postcss-lab-function: "npm:^7.0.11" postcss-logical: "npm:^8.1.0" postcss-nesting: "npm:^13.0.2" postcss-opacity-percentage: "npm:^3.0.0" @@ -11189,7 +11155,7 @@ __metadata: postcss-selector-not: "npm:^8.0.1" peerDependencies: postcss: ^8.4 - checksum: 10c0/3c081a66ebde19ae2f915f4eb103b85097085799b43103e5dd1699ed807bd54c80d633c7d4b525badaf21e9d0b217e6ca169ee306e2b720bb70b7414ad375387 + checksum: 10c0/ea234c25e679d87f6dfb666bdbfdffb167e0b957d39bc4f5f1d327dacd95447ff0a2c60be01b3798450e7a491fcb1aa6214b8a6daa9ae5e1ddcad23cc7c3713e languageName: node linkType: hard @@ -11459,11 +11425,11 @@ __metadata: linkType: hard "pupa@npm:^3.1.0": - version: 3.3.0 - resolution: "pupa@npm:3.3.0" + version: 3.1.0 + resolution: "pupa@npm:3.1.0" dependencies: escape-goat: "npm:^4.0.0" - checksum: 10c0/9707e0a7f00e5922d47527d1c8d88d4224b1e86502da2fca27943eb0e9bb218121c91fa0af6c30531a2ee5ade0c326b5d33c40fdf61bc593c4224027412fd9b7 + checksum: 10c0/02afa6e4547a733484206aaa8f8eb3fbfb12d3dd17d7ca4fa1ea390a7da2cb8f381e38868bbf68009c4d372f8f6059f553171b6a712d8f2802c7cd43d513f06c languageName: node linkType: hard @@ -11589,11 +11555,11 @@ __metadata: linkType: hard "react-json-view-lite@npm:^2.3.0": - version: 2.5.0 - resolution: "react-json-view-lite@npm:2.5.0" + version: 2.4.2 + resolution: "react-json-view-lite@npm:2.4.2" peerDependencies: react: ^18.0.0 || ^19.0.0 - checksum: 10c0/8ecaa23d2fddea03f84892ca96577c5416d60a59ed2cad01dff648a60d25b799dac75dea1771e2b9b639ad026ce1efa7b44e6e636bf497b1d6ea0bac5962b96d + checksum: 10c0/0fb71260615d9b9c463ef3332075e4604225f88de3870118bf05f7d3ca869e159872caae03015160773fbf9bb7961b53e30e30ab24fa872000703666d8811e09 languageName: node linkType: hard @@ -11785,12 +11751,12 @@ __metadata: languageName: node linkType: hard -"regenerate-unicode-properties@npm:^10.2.2": - version: 10.2.2 - resolution: "regenerate-unicode-properties@npm:10.2.2" +"regenerate-unicode-properties@npm:^10.2.0": + version: 10.2.0 + resolution: "regenerate-unicode-properties@npm:10.2.0" dependencies: regenerate: "npm:^1.4.2" - checksum: 10c0/66a1d6a1dbacdfc49afd88f20b2319a4c33cee56d245163e4d8f5f283e0f45d1085a78f7f7406dd19ea3a5dd7a7799cd020cd817c97464a7507f9d10fbdce87c + checksum: 10c0/5510785eeaf56bbfdf4e663d6753f125c08d2a372d4107bc1b756b7bf142e2ed80c2733a8b54e68fb309ba37690e66a0362699b0e21d5c1f0255dea1b00e6460 languageName: node linkType: hard @@ -11816,16 +11782,16 @@ __metadata: linkType: hard "regexpu-core@npm:^6.2.0": - version: 6.4.0 - resolution: "regexpu-core@npm:6.4.0" + version: 6.2.0 + resolution: "regexpu-core@npm:6.2.0" dependencies: regenerate: "npm:^1.4.2" - regenerate-unicode-properties: "npm:^10.2.2" + regenerate-unicode-properties: "npm:^10.2.0" regjsgen: "npm:^0.8.0" - regjsparser: "npm:^0.13.0" + regjsparser: "npm:^0.12.0" unicode-match-property-ecmascript: "npm:^2.0.0" - unicode-match-property-value-ecmascript: "npm:^2.2.1" - checksum: 10c0/1eed9783c023dd06fb1f3ce4b6e3fdf0bc1e30cb036f30aeb2019b351e5e0b74355b40462282ea5db092c79a79331c374c7e9897e44a5ca4509e9f0b570263de + unicode-match-property-value-ecmascript: "npm:^2.1.0" + checksum: 10c0/bbcb83a854bf96ce4005ee4e4618b71c889cda72674ce6092432f0039b47890c2d0dfeb9057d08d440999d9ea03879ebbb7f26ca005ccf94390e55c348859b98 languageName: node linkType: hard @@ -11854,14 +11820,14 @@ __metadata: languageName: node linkType: hard -"regjsparser@npm:^0.13.0": - version: 0.13.0 - resolution: "regjsparser@npm:0.13.0" +"regjsparser@npm:^0.12.0": + version: 0.12.0 + resolution: "regjsparser@npm:0.12.0" dependencies: - jsesc: "npm:~3.1.0" + jsesc: "npm:~3.0.2" bin: regjsparser: bin/parser - checksum: 10c0/4702f85cda09f67747c1b2fb673a0f0e5d1ba39d55f177632265a0be471ba59e3f320623f411649141f752b126b8126eac3ff4c62d317921e430b0472bfc6071 + checksum: 10c0/99d3e4e10c8c7732eb7aa843b8da2fd8b647fe144d3711b480e4647dc3bff4b1e96691ccf17f3ace24aa866a50b064236177cb25e6e4fbbb18285d99edaed83b languageName: node linkType: hard @@ -12221,8 +12187,8 @@ __metadata: linkType: hard "sass@npm:^1.70.0": - version: 1.93.2 - resolution: "sass@npm:1.93.2" + version: 1.91.0 + resolution: "sass@npm:1.91.0" dependencies: "@parcel/watcher": "npm:^2.4.1" chokidar: "npm:^4.0.0" @@ -12233,7 +12199,7 @@ __metadata: optional: true bin: sass: sass.js - checksum: 10c0/5a19f12dbe8c142e40c1e0473d1e624898242b1c21010301e169b528be8c580df6356329c798522b525eb11eda4b04b9b77422badc55c47889600f8477201d2b + checksum: 10c0/5be1c98f7a618cb5f90b62f63d2aa0f78f9bf369c93ec7cd9880752a26b0ead19aa63cc341e8a26ce6c74d080baa5705f1685dff52fe6a3f28a7828ae50182b6 languageName: node linkType: hard @@ -12278,7 +12244,19 @@ __metadata: languageName: node linkType: hard -"schema-utils@npm:^4.0.0, schema-utils@npm:^4.0.1, schema-utils@npm:^4.2.0, schema-utils@npm:^4.3.0, schema-utils@npm:^4.3.2": +"schema-utils@npm:^4.0.0, schema-utils@npm:^4.0.1, schema-utils@npm:^4.3.0, schema-utils@npm:^4.3.2": + version: 4.3.2 + resolution: "schema-utils@npm:4.3.2" + dependencies: + "@types/json-schema": "npm:^7.0.9" + ajv: "npm:^8.9.0" + ajv-formats: "npm:^2.1.1" + ajv-keywords: "npm:^5.1.0" + checksum: 10c0/981632f9bf59f35b15a9bcdac671dd183f4946fe4b055ae71a301e66a9797b95e5dd450de581eb6cca56fb6583ce8f24d67b2d9f8e1b2936612209697f6c277e + languageName: node + linkType: hard + +"schema-utils@npm:^4.2.0": version: 4.3.3 resolution: "schema-utils@npm:4.3.3" dependencies: @@ -12914,11 +12892,11 @@ __metadata: linkType: hard "strip-ansi@npm:^7.0.1": - version: 7.1.2 - resolution: "strip-ansi@npm:7.1.2" + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" dependencies: ansi-regex: "npm:^6.0.1" - checksum: 10c0/0d6d7a023de33368fd042aab0bf48f4f4077abdfd60e5393e73c7c411e85e1b3a83507c11af2e656188511475776215df9ca589b4da2295c9455cc399ce1858b + checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 languageName: node linkType: hard @@ -13073,10 +13051,10 @@ __metadata: languageName: node linkType: hard -"tapable@npm:^2.0.0, tapable@npm:^2.2.0, tapable@npm:^2.2.1, tapable@npm:^2.2.3": - version: 2.3.0 - resolution: "tapable@npm:2.3.0" - checksum: 10c0/cb9d67cc2c6a74dedc812ef3085d9d681edd2c1fa18e4aef57a3c0605fdbe44e6b8ea00bd9ef21bc74dd45314e39d31227aa031ebf2f5e38164df514136f2681 +"tapable@npm:^2.0.0, tapable@npm:^2.1.1, tapable@npm:^2.2.0, tapable@npm:^2.2.1": + version: 2.2.3 + resolution: "tapable@npm:2.2.3" + checksum: 10c0/e57fd8e2d756c317f8726a1bec8f2c904bc42e37fcbd4a78211daeab89f42c734b6a20e61774321f47be9a421da628a0c78b62d36c5ed186f4d5232d09ae15f2 languageName: node linkType: hard @@ -13116,16 +13094,16 @@ __metadata: linkType: hard "terser@npm:^5.10.0, terser@npm:^5.15.1, terser@npm:^5.31.1": - version: 5.44.0 - resolution: "terser@npm:5.44.0" + version: 5.43.1 + resolution: "terser@npm:5.43.1" dependencies: "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.15.0" + acorn: "npm:^8.14.0" commander: "npm:^2.20.0" source-map-support: "npm:~0.5.20" bin: terser: bin/terser - checksum: 10c0/f2838dc65ac2ac6a31c7233065364080de73cc363ecb8fe723a54f663b2fa9429abf08bc3920a6bea85c5c7c29908ffcf822baf1572574f8d3859a009bbf2327 + checksum: 10c0/9cd3fa09ea6bcb79eb71995216b8bef0651b18c5c3877535fc699a77e1ab43b140a4da5811ac9baeb654fa9ec939b17324092f0f0bdb19c402e101e3db946986 languageName: node linkType: hard @@ -13341,10 +13319,10 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~7.13.0": - version: 7.13.0 - resolution: "undici-types@npm:7.13.0" - checksum: 10c0/44bbb0935425291351bfd8039571f017295b5d6dc5727045d0a4fea8c6ffe73a6703b48ce010f9cb539b9041a75b463f8cfe1e7309cab7486452505fb0d66151 +"undici-types@npm:~7.10.0": + version: 7.10.0 + resolution: "undici-types@npm:7.10.0" + checksum: 10c0/8b00ce50e235fe3cc601307f148b5e8fb427092ee3b23e8118ec0a5d7f68eca8cee468c8fc9f15cbb2cf2a3797945ebceb1cbd9732306a1d00e0a9b6afa0f635 languageName: node linkType: hard @@ -13372,17 +13350,17 @@ __metadata: languageName: node linkType: hard -"unicode-match-property-value-ecmascript@npm:^2.2.1": - version: 2.2.1 - resolution: "unicode-match-property-value-ecmascript@npm:2.2.1" - checksum: 10c0/93acd1ad9496b600e5379d1aaca154cf551c5d6d4a0aefaf0984fc2e6288e99220adbeb82c935cde461457fb6af0264a1774b8dfd4d9a9e31548df3352a4194d +"unicode-match-property-value-ecmascript@npm:^2.1.0": + version: 2.2.0 + resolution: "unicode-match-property-value-ecmascript@npm:2.2.0" + checksum: 10c0/1d0a2deefd97974ddff5b7cb84f9884177f4489928dfcebb4b2b091d6124f2739df51fc6ea15958e1b5637ac2a24cff9bf21ea81e45335086ac52c0b4c717d6d languageName: node linkType: hard "unicode-property-aliases-ecmascript@npm:^2.0.0": - version: 2.2.0 - resolution: "unicode-property-aliases-ecmascript@npm:2.2.0" - checksum: 10c0/b338529831c988ac696f2bdbcd4579d1c5cc844b24eda7269973c457fa81989bdb49a366af37a448eb1a60f1dae89559ea2a5854db2797e972a0162eee0778c6 + version: 2.1.0 + resolution: "unicode-property-aliases-ecmascript@npm:2.1.0" + checksum: 10c0/50ded3f8c963c7785e48c510a3b7c6bc4e08a579551489aa0349680a35b1ceceec122e33b2b6c1b579d0be2250f34bb163ac35f5f8695fe10bbc67fb757f0af8 languageName: node linkType: hard @@ -13670,7 +13648,7 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:^2.4.4": +"watchpack@npm:^2.4.1": version: 2.4.4 resolution: "watchpack@npm:2.4.4" dependencies: @@ -13812,8 +13790,8 @@ __metadata: linkType: hard "webpack@npm:^5.88.1, webpack@npm:^5.95.0": - version: 5.102.0 - resolution: "webpack@npm:5.102.0" + version: 5.101.3 + resolution: "webpack@npm:5.101.3" dependencies: "@types/eslint-scope": "npm:^3.7.7" "@types/estree": "npm:^1.0.8" @@ -13823,7 +13801,7 @@ __metadata: "@webassemblyjs/wasm-parser": "npm:^1.14.1" acorn: "npm:^8.15.0" acorn-import-phases: "npm:^1.0.3" - browserslist: "npm:^4.24.5" + browserslist: "npm:^4.24.0" chrome-trace-event: "npm:^1.0.2" enhanced-resolve: "npm:^5.17.3" es-module-lexer: "npm:^1.2.1" @@ -13836,16 +13814,16 @@ __metadata: mime-types: "npm:^2.1.27" neo-async: "npm:^2.6.2" schema-utils: "npm:^4.3.2" - tapable: "npm:^2.2.3" + tapable: "npm:^2.1.1" terser-webpack-plugin: "npm:^5.3.11" - watchpack: "npm:^2.4.4" + watchpack: "npm:^2.4.1" webpack-sources: "npm:^3.3.3" peerDependenciesMeta: webpack-cli: optional: true bin: webpack: bin/webpack.js - checksum: 10c0/da8f18a5a4b2284d8f3bae0639cd46798d9b0949c48908680b5798125e57fa4898e80155cc367c9758d444d1251df57b2c76fd6c0988dd95ffc89df3bb712f89 + checksum: 10c0/3c204d4f1df0ef2774ae043f62e4db56c11b7a0594e82fbb1fbbaf69893570f3bf08a8b5d2d5a0302ce6346132bf3eb9dbde81e4fab3d68307b2e506d606f064 languageName: node linkType: hard