From fabf6d33746c048997a1339648abd8cabbd95627 Mon Sep 17 00:00:00 2001 From: charithAmila Date: Thu, 29 Feb 2024 23:55:50 -0500 Subject: [PATCH 01/12] Fix #6068: Sidebar: "Pass Through" documentation issue --- components/doc/common/apidoc/index.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/components/doc/common/apidoc/index.json b/components/doc/common/apidoc/index.json index 727c56b467..aaaae8ad78 100644 --- a/components/doc/common/apidoc/index.json +++ b/components/doc/common/apidoc/index.json @@ -43419,6 +43419,13 @@ "type": "SidebarPassThroughType>", "description": "Uses to pass attributes to the close button's DOM element." }, + { + "name": "icons", + "optional": true, + "readonly": false, + "type": "SidebarPassThroughType>", + "description": "Uses to pass attributes to the custom icons content's DOM element." + }, { "name": "closeIcon", "optional": true, @@ -43433,13 +43440,6 @@ "type": "SidebarPassThroughType>", "description": "Uses to pass attributes to the content's DOM element." }, - { - "name": "icons", - "optional": true, - "readonly": false, - "type": "SidebarPassThroughType>", - "description": "Uses to pass attributes to the custom icons content's DOM element." - }, { "name": "mask", "optional": true, @@ -55535,4 +55535,4 @@ } } } -} \ No newline at end of file +} From eb1a426308e185ef912154286557cc86ca000850 Mon Sep 17 00:00:00 2001 From: charithAmila Date: Fri, 1 Mar 2024 09:25:26 -0500 Subject: [PATCH 02/12] fix: sidebar documentation error. --- components/doc/common/apidoc/index.json | 2 +- components/lib/sidebar/sidebar.d.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/doc/common/apidoc/index.json b/components/doc/common/apidoc/index.json index aaaae8ad78..935280a807 100644 --- a/components/doc/common/apidoc/index.json +++ b/components/doc/common/apidoc/index.json @@ -55535,4 +55535,4 @@ } } } -} +} \ No newline at end of file diff --git a/components/lib/sidebar/sidebar.d.ts b/components/lib/sidebar/sidebar.d.ts index b49d7c7bd5..2738e763d4 100644 --- a/components/lib/sidebar/sidebar.d.ts +++ b/components/lib/sidebar/sidebar.d.ts @@ -42,6 +42,10 @@ export interface SidebarPassThroughOptions { * Uses to pass attributes to the close button's DOM element. */ closeButtonIcon?: SidebarPassThroughType>; + /** + * Uses to pass attributes to the custom icons content's DOM element. + */ + icons?: SidebarPassThroughType>; /** * Uses to pass attributes to the close icon's DOM element. */ @@ -50,10 +54,6 @@ export interface SidebarPassThroughOptions { * Uses to pass attributes to the content's DOM element. */ content?: SidebarPassThroughType>; - /** - * Uses to pass attributes to the custom icons content's DOM element. - */ - icons?: SidebarPassThroughType>; /** * Uses to pass attributes to the mask's DOM element. */ From 5b59568e75d75bf1074af9060d27807d19e726ae Mon Sep 17 00:00:00 2001 From: charithAmila Date: Fri, 1 Mar 2024 11:31:02 -0500 Subject: [PATCH 03/12] Fix: 6070 OrganizationChart: Documentation issue --- components/doc/organizationchart/basicdoc.js | 2 +- components/doc/organizationchart/templatedoc.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/doc/organizationchart/basicdoc.js b/components/doc/organizationchart/basicdoc.js index 88c93c3b4b..086050c441 100644 --- a/components/doc/organizationchart/basicdoc.js +++ b/components/doc/organizationchart/basicdoc.js @@ -92,7 +92,7 @@ import { OrganizationChart } from 'primereact/organizationchart'; import { TreeNode } from 'primereact/treenode'; export default function BasicDoc() { - const [data] = useState([ + const [data] = useState([ { label: 'Argentina', expanded: true, diff --git a/components/doc/organizationchart/templatedoc.js b/components/doc/organizationchart/templatedoc.js index 08b3b25b97..a13e629aa7 100644 --- a/components/doc/organizationchart/templatedoc.js +++ b/components/doc/organizationchart/templatedoc.js @@ -124,7 +124,7 @@ import { OrganizationChart } from 'primereact/organizationchart'; import { TreeNode } from 'primereact/treenode'; export default function TemplateDemo() { - const [data] = useState([ + const [data] = useState([ { label: 'Argentina', expanded: true, From 96e40b8168986b1777ba1333e31e705c5e1de66a Mon Sep 17 00:00:00 2001 From: charithAmila Date: Sun, 3 Mar 2024 14:07:01 -0500 Subject: [PATCH 04/12] fix: treetable filter section typescript code example issue. --- components/doc/treetable/filterdoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/doc/treetable/filterdoc.js b/components/doc/treetable/filterdoc.js index 9d23d38b2d..7ba0269343 100644 --- a/components/doc/treetable/filterdoc.js +++ b/components/doc/treetable/filterdoc.js @@ -106,7 +106,7 @@ interface FilterModeOption { } export default function FilterDemo() { - const [nodes, setNodes] = useState([]); + const [nodes, setNodes] = useState([]); const [globalFilter, setGlobalFilter] = useState(''); const [filterMode, setFilterMode] = useState('lenient'); const [filterOptions] = useState([ From 282df70e0b155489fc8aa3914353768d70607096 Mon Sep 17 00:00:00 2001 From: charithAmila Date: Sun, 3 Mar 2024 14:10:08 -0500 Subject: [PATCH 05/12] fix: treetable Selection section single typescript code example issue. --- components/doc/treetable/selection/singledoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/doc/treetable/selection/singledoc.js b/components/doc/treetable/selection/singledoc.js index 80c63330bd..eb3878ea93 100644 --- a/components/doc/treetable/selection/singledoc.js +++ b/components/doc/treetable/selection/singledoc.js @@ -66,7 +66,7 @@ import { InputSwitch, InputSwitchChangeEvent } from 'primereact/inputswitch'; import { NodeService } from './service/NodeService'; export default function SingleRowSelectionDemo() { - const [nodes, setNodes] = useState([]); + const [nodes, setNodes] = useState([]); const [selectedNodeKey, setSelectedNodeKey] = useState(null); const [metaKey, setMetaKey] = useState(true); From 41854993b5973687c7d3406bc3000c6313e6aba4 Mon Sep 17 00:00:00 2001 From: charithAmila Date: Sun, 3 Mar 2024 14:12:56 -0500 Subject: [PATCH 06/12] fix: treetable selection multiple section typescript code example issue. --- components/doc/treetable/selection/multipledoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/doc/treetable/selection/multipledoc.js b/components/doc/treetable/selection/multipledoc.js index 5575c0ddfe..b19b6924c9 100644 --- a/components/doc/treetable/selection/multipledoc.js +++ b/components/doc/treetable/selection/multipledoc.js @@ -75,7 +75,7 @@ import { InputSwitch, InputSwitchChangeEvent } from 'primereact/inputswitch'; import { NodeService } from './service/NodeService'; export default function MultipleRowsSelectionDemo() { - const [nodes, setNodes] = useState([]); + const [nodes, setNodes] = useState([]); const [selectedNodeKeys, setSelectedNodeKeys] = useState(null); const [metaKey, setMetaKey] = useState(true); From 3f0497ee9d1c8966aa004e020848d3de6a9ad1c9 Mon Sep 17 00:00:00 2001 From: charithAmila Date: Sun, 3 Mar 2024 14:16:16 -0500 Subject: [PATCH 07/12] fix: treetable scroll vertical section typescript code example issue. --- components/doc/treetable/scroll/verticaldoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/doc/treetable/scroll/verticaldoc.js b/components/doc/treetable/scroll/verticaldoc.js index 7a45e532d0..e20e8f350b 100644 --- a/components/doc/treetable/scroll/verticaldoc.js +++ b/components/doc/treetable/scroll/verticaldoc.js @@ -52,7 +52,7 @@ import { TreeNode } from 'primereact/treenode'; import { NodeService } from './service/NodeService'; export default function VerticalScrollDemo() { - const [nodes, setNodes] = useState([]); + const [nodes, setNodes] = useState([]); useEffect(() => { NodeService.getTreeTableNodes().then(data => setNodes(data)); From dcc6c631efe9c142ffc90f846bc24f5518428872 Mon Sep 17 00:00:00 2001 From: charithAmila Date: Sun, 3 Mar 2024 14:20:06 -0500 Subject: [PATCH 08/12] fix: treetable scroll Frozen Columns section typescript code example issue. --- components/doc/treetable/scroll/frozencolumnsdoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/doc/treetable/scroll/frozencolumnsdoc.js b/components/doc/treetable/scroll/frozencolumnsdoc.js index 68f36c1207..f02d898bd0 100644 --- a/components/doc/treetable/scroll/frozencolumnsdoc.js +++ b/components/doc/treetable/scroll/frozencolumnsdoc.js @@ -60,7 +60,7 @@ import { TreeNode } from 'primereact/treenode'; import { NodeService } from './service/NodeService'; export default function FrozenColumnsDemo() { - const [nodes, setNodes] = useState([]); + const [nodes, setNodes] = useState([]); useEffect(() => { NodeService.getTreeTableNodes().then(data => setNodes(data)); From bc2ac030ff4b7c8f2f57d2c7cd69a2160d53e044 Mon Sep 17 00:00:00 2001 From: charithAmila Date: Sun, 3 Mar 2024 14:27:24 -0500 Subject: [PATCH 09/12] fix: treetable Context Menu section typescript code example issue --- components/doc/treetable/contextmenudoc.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/doc/treetable/contextmenudoc.js b/components/doc/treetable/contextmenudoc.js index 08b3d02197..f39340863a 100644 --- a/components/doc/treetable/contextmenudoc.js +++ b/components/doc/treetable/contextmenudoc.js @@ -106,17 +106,17 @@ export default function ContextMenuDemo() { `, typescript: ` import React, { useState, useEffect, useRef } from 'react'; -import { TreeTable } from 'primereact/treetable'; +import { TreeTable, TreeTableExpandedKeysType } from 'primereact/treetable'; import { ContextMenu } from 'primereact/contextmenu'; import { Toast } from 'primereact/toast'; import { Column } from 'primereact/column'; -import { TreeNode } from 'primereact/column'; +import { TreeNode } from 'primereact/treenode'; import { NodeService } from './service/NodeService'; export default function ContextMenuDemo() { - const [nodes, setNodes] = useState([]); + const [nodes, setNodes] = useState([]); const [expandedKeys, setExpandedKeys] = useState(null); - const [selectedNodeKey, setSelectedNodeKey] = useState(null); + const [selectedNodeKey, setSelectedNodeKey] = useState(null); const toast = useRef(null); const cm = useRef(null); const menu = [ From 9fe77d3b03dc71e0ecbe43420300ea5201386a7e Mon Sep 17 00:00:00 2001 From: charithAmila Date: Sun, 3 Mar 2024 14:31:50 -0500 Subject: [PATCH 10/12] fix: OrganizationChart PT Options typescript code example issue. --- components/doc/organizationchart/pt/ptdoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/doc/organizationchart/pt/ptdoc.js b/components/doc/organizationchart/pt/ptdoc.js index f6cd6ce570..3d13edc645 100644 --- a/components/doc/organizationchart/pt/ptdoc.js +++ b/components/doc/organizationchart/pt/ptdoc.js @@ -115,7 +115,7 @@ import { TreeNode } from 'primereact/treenode'; export default function PTDemo() { const [selection, setSelection] = useState([]); - const [data] = useState([ + const [data] = useState([ { label: 'Argentina', expanded: true, From 0aa3876154e88728ceba6ae92b5a0b5d64876661 Mon Sep 17 00:00:00 2001 From: charithAmila Date: Sun, 3 Mar 2024 14:50:30 -0500 Subject: [PATCH 11/12] fix: Tree Events typescript code example issue. --- components/doc/tree/eventsdoc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/doc/tree/eventsdoc.js b/components/doc/tree/eventsdoc.js index 6760470ace..c4e8b9a7d4 100644 --- a/components/doc/tree/eventsdoc.js +++ b/components/doc/tree/eventsdoc.js @@ -80,8 +80,9 @@ export default function EventsDemo() { `, typescript: ` import React, { useState, useEffect, useRef } from 'react'; -import { Tree, TreeNode, TreeEventNodeEvent } from 'primereact/tree'; +import { Tree, TreeEventNodeEvent } from 'primereact/tree'; import { Toast } from 'primereact/toast'; +import { TreeNode } from "primereact/treenode"; import { NodeService } from './service/NodeService'; export default function EventsDemo() { From 5282298bcdfcc90ff4b6e7bcb793a738bd851de4 Mon Sep 17 00:00:00 2001 From: charithAmila Date: Sun, 3 Mar 2024 14:56:06 -0500 Subject: [PATCH 12/12] fix: TreeTable Filter section typescript code example issue. --- components/doc/treetable/filterdoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/doc/treetable/filterdoc.js b/components/doc/treetable/filterdoc.js index 7ba0269343..4108534b1a 100644 --- a/components/doc/treetable/filterdoc.js +++ b/components/doc/treetable/filterdoc.js @@ -108,7 +108,7 @@ interface FilterModeOption { export default function FilterDemo() { const [nodes, setNodes] = useState([]); const [globalFilter, setGlobalFilter] = useState(''); - const [filterMode, setFilterMode] = useState('lenient'); + const [filterMode, setFilterMode] = useState<'lenient' | 'strict'>('lenient'); const [filterOptions] = useState([ { label: 'Lenient', value: 'lenient' }, { label: 'Strict', value: 'strict' }