@hybridly/vue 0.7.9 → 0.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1317,6 +1317,12 @@ function useTable(props, key, defaultOptions = {}) {
1317
1317
  selectAll: bulk.selectAll,
1318
1318
  /** Deselects all records. */
1319
1319
  deselectAll: bulk.deselectAll,
1320
+ /** Selects records on the current page. */
1321
+ selectPage: () => bulk.select(...table.value.records.map((record) => getRecordKey(record))),
1322
+ /** Deselects records on the current page. */
1323
+ deselectPage: () => bulk.deselect(...table.value.records.map((record) => getRecordKey(record))),
1324
+ /** Whether all records on the current page are selected. */
1325
+ isPageSelected: vue.computed(() => table.value.records.every((record) => bulk.selected(getRecordKey(record)))),
1320
1326
  /** Checks if the given record is selected. */
1321
1327
  isSelected: (record) => bulk.selected(getRecordKey(record)),
1322
1328
  /** Whether all records are selected. */
package/dist/index.d.cts CHANGED
@@ -643,6 +643,9 @@ declare function useTable<RecordType extends (Props[PropsKey] extends Table<infe
643
643
  applyFilter: (name: string, value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core.NavigationResponse | undefined>;
644
644
  selectAll: () => void;
645
645
  deselectAll: () => void;
646
+ selectPage: () => void;
647
+ deselectPage: () => void;
648
+ isPageSelected: boolean;
646
649
  isSelected: (record: RecordType) => boolean;
647
650
  allSelected: boolean;
648
651
  selection: BulkSelection<RecordIdentifier>;
package/dist/index.d.mts CHANGED
@@ -643,6 +643,9 @@ declare function useTable<RecordType extends (Props[PropsKey] extends Table<infe
643
643
  applyFilter: (name: string, value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core.NavigationResponse | undefined>;
644
644
  selectAll: () => void;
645
645
  deselectAll: () => void;
646
+ selectPage: () => void;
647
+ deselectPage: () => void;
648
+ isPageSelected: boolean;
646
649
  isSelected: (record: RecordType) => boolean;
647
650
  allSelected: boolean;
648
651
  selection: BulkSelection<RecordIdentifier>;
package/dist/index.d.ts CHANGED
@@ -643,6 +643,9 @@ declare function useTable<RecordType extends (Props[PropsKey] extends Table<infe
643
643
  applyFilter: (name: string, value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core.NavigationResponse | undefined>;
644
644
  selectAll: () => void;
645
645
  deselectAll: () => void;
646
+ selectPage: () => void;
647
+ deselectPage: () => void;
648
+ isPageSelected: boolean;
646
649
  isSelected: (record: RecordType) => boolean;
647
650
  allSelected: boolean;
648
651
  selection: BulkSelection<RecordIdentifier>;
package/dist/index.mjs CHANGED
@@ -1310,6 +1310,12 @@ function useTable(props, key, defaultOptions = {}) {
1310
1310
  selectAll: bulk.selectAll,
1311
1311
  /** Deselects all records. */
1312
1312
  deselectAll: bulk.deselectAll,
1313
+ /** Selects records on the current page. */
1314
+ selectPage: () => bulk.select(...table.value.records.map((record) => getRecordKey(record))),
1315
+ /** Deselects records on the current page. */
1316
+ deselectPage: () => bulk.deselect(...table.value.records.map((record) => getRecordKey(record))),
1317
+ /** Whether all records on the current page are selected. */
1318
+ isPageSelected: computed(() => table.value.records.every((record) => bulk.selected(getRecordKey(record)))),
1313
1319
  /** Checks if the given record is selected. */
1314
1320
  isSelected: (record) => bulk.selected(getRecordKey(record)),
1315
1321
  /** Whether all records are selected. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridly/vue",
3
3
  "type": "module",
4
- "version": "0.7.9",
4
+ "version": "0.7.10",
5
5
  "description": "Vue adapter for Hybridly",
6
6
  "author": "Enzo Innocenzi <enzo@innocenzi.dev>",
7
7
  "license": "MIT",
@@ -49,8 +49,8 @@
49
49
  "lodash.isequal": "^4.5.0",
50
50
  "nprogress": "^0.2.0",
51
51
  "qs": "^6.12.1",
52
- "@hybridly/core": "0.7.9",
53
- "@hybridly/utils": "0.7.9"
52
+ "@hybridly/core": "0.7.10",
53
+ "@hybridly/utils": "0.7.10"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/lodash": "^4.17.6",