From 2026bb75e46e82f5058deb7d5674e678030efe9f Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 15 Nov 2023 09:51:35 +0000 Subject: [PATCH] Fixed #4818 - Remove primeflex dependency from DataView --- components/lib/dataview/DataView.d.ts | 28 +- components/lib/dataview/DataView.vue | 21 +- .../lib/dataview/style/DataViewStyle.js | 2 - doc/dataview/BasicDoc.vue | 150 ++++----- doc/dataview/LayoutDoc.vue | 284 +++++++++--------- doc/dataview/LoadingDoc.vue | 234 ++++++++------- doc/dataview/PaginationDoc.vue | 146 ++++----- doc/dataview/PrimeFlexDoc.vue | 24 -- doc/dataview/SortingDoc.vue | 146 ++++----- doc/dataview/pt/PTDoc.vue | 282 +++++++++-------- doc/dataview/theming/TailwindDoc.vue | 28 +- pages/dataview/index.vue | 6 - 12 files changed, 690 insertions(+), 661 deletions(-) delete mode 100644 doc/dataview/PrimeFlexDoc.vue diff --git a/components/lib/dataview/DataView.d.ts b/components/lib/dataview/DataView.d.ts index 1b79e4474..64afb3291 100755 --- a/components/lib/dataview/DataView.d.ts +++ b/components/lib/dataview/DataView.d.ts @@ -81,14 +81,6 @@ export interface DataViewPassThroughOptions { * Used to pass attributes to the content's DOM element. */ content?: DataViewPassThroughOptionType; - /** - * Used to pass attributes to the grid's DOM element. - */ - grid?: DataViewPassThroughOptionType; - /** - * Used to pass attributes to the column's DOM element. - */ - column?: DataViewPassThroughOptionType; /** * Used to pass attributes to the empty message's DOM element. */ @@ -253,8 +245,14 @@ export interface DataViewSlots { footer(): VNode[]; /** * Custom empty template. + * @param {Object} scope - empty slot's params. */ - empty(): VNode[]; + empty(scope: { + /** + * Layout of the items. + */ + layout?: string | undefined; + }): VNode[]; /** * Custom paginator start template. */ @@ -271,11 +269,7 @@ export interface DataViewSlots { /** * Value of the component */ - data: any; - /** - * Index of the grid - */ - index: number; + items: any; }): VNode[]; /** * Custom list template. @@ -285,11 +279,7 @@ export interface DataViewSlots { /** * Value of the component */ - data: any; - /** - * Index of the grid - */ - index: number; + items: any; }): VNode[]; } diff --git a/components/lib/dataview/DataView.vue b/components/lib/dataview/DataView.vue index b1e14fc3e..3d61d5b2f 100755 --- a/components/lib/dataview/DataView.vue +++ b/components/lib/dataview/DataView.vue @@ -26,16 +26,14 @@
-
- -
-
- -
-
+ +
+ + {{ emptyMessageText }} +
(instance.paginatorTop ? 'p-paginator-top' : instance.paginatorBottom ? 'p-paginator-bottom' : ''), content: 'p-dataview-content', - grid: 'p-grid p-nogutter grid grid-nogutter', - column: 'p-col col', emptyMessage: 'p-dataview-emptymessage', footer: 'p-dataview-footer' }; diff --git a/doc/dataview/BasicDoc.vue b/doc/dataview/BasicDoc.vue index 3e4450fd1..c1e9efd1d 100644 --- a/doc/dataview/BasicDoc.vue +++ b/doc/dataview/BasicDoc.vue @@ -1,30 +1,30 @@