diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57f193f..883bad8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ name: Deploy To Site on: # Triggers the workflow on push or pull request events but only for the master branch push: - branches: [ master, next, test ] + branches: [master, next, test] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: '18.19.0' + node-version: "20.0" - run: yarn install - run: yarn build diff --git a/docs/api/internal/intercept-method.md b/docs/api/internal/intercept-method.md index 30a81e8..70bef0d 100644 --- a/docs/api/internal/intercept-method.md +++ b/docs/api/internal/intercept-method.md @@ -15,14 +15,17 @@ description: You can learn about the intercept method in the documentation of th ~~~jsx api.intercept( event: string, - callback: function + callback: function, + config?: { tag?: number | string | symbol } ): void; ~~~ ### Parameters -- `event` - (required) an event to be fired +- `event` - (required) an event to be fired - `callback` - (required) a callback to be performed (the callback arguments will depend on the event to be fired) +- `config` - (optional) an object that stores the following parameter: + - `tag` - (optional) an action tag. You can use the tag name to remove an action handler via the [`detach`](api/internal/js_kanban_detach_method.md) method ### Events @@ -59,7 +62,7 @@ const table = new pivot.Pivot("#root", { //make all rows close at the initialization table.api.intercept("render-table", (ev) => { ev.config.data.forEach((row) => (row.open = false)); -}) +}, {tag: "render-table-tag"}); ~~~ **Related articles**: [`render-table`](/api/events/render-table-event) diff --git a/docs/api/internal/on-method.md b/docs/api/internal/on-method.md index 4af3ad8..337a493 100644 --- a/docs/api/internal/on-method.md +++ b/docs/api/internal/on-method.md @@ -15,7 +15,8 @@ description: You can learn about the on method in the documentation of the DHTML ~~~jsx api.on( event: string, - handler: function + handler: function, + config?: { intercept?: boolean, tag?: number | string | symbol } ): void; ~~~ @@ -23,6 +24,9 @@ api.on( - `event` - (required) an event to be fired - `handler` - (required) a handler to be attached (the handler arguments will depend on the event to be fired) +- `config` - (optional) an object that stores the following parameters: + - `intercept` - (optional) if you set `intercept: true` during event listener creation, this event listener will run before all others + - `tag` - (optional) an action tag. You can use the tag name to remove an action handler via the [`detach`](api/internal/js_kanban_detach_method.md) method ### Events @@ -63,5 +67,5 @@ table.api.on("open-filter", (ev) => { if (field) { console.log("The field for which filter was activated:", ev.field.label); } -}); +}, {tag: "open-filter-tag"}); ~~~ diff --git a/docusaurus.config.js b/docusaurus.config.js index f72735d..ec04a1e 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -138,11 +138,16 @@ const config = { url: 'https://docs.dhtmlx.com', baseUrl: '/pivot/', onBrokenLinks: 'warn', - onBrokenMarkdownLinks: 'warn', + // onBrokenMarkdownLinks: 'warn', // deprecated in v3.9.1 favicon: 'img/favicon.ico', organizationName: 'DHTMLX', // Usually your GitHub org/user name. projectName: 'docs-pivot', // Usually your repo name. trailingSlash: true, + markdown: { + hooks: { + onBrokenMarkdownLinks: 'warn', + } + }, presets: [ [ '@docusaurus/preset-classic', diff --git a/package.json b/package.json index fedd10f..fee88b8 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "^3.7.0", - "@docusaurus/preset-classic": "^3.7.0", + "@docusaurus/core": "^3.9.1", + "@docusaurus/preset-classic": "^3.9.1", "@easyops-cn/docusaurus-search-local": "^0.44.5", "@mdx-js/react": "^3.0.0", "@svgr/webpack": "^5.5.0", @@ -29,13 +29,13 @@ "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" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "browserslist": { "production": [