overgrid-vue 1.9.2 → 1.9.4

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.d.ts CHANGED
@@ -343,7 +343,11 @@ export declare interface OverGridConfig {
343
343
  * @param filters List of filters. Each filter has a key, an operator and a value.
344
344
  * @returns The modified URLSearchParams object.
345
345
  */
346
- serverTransformation?: (orders: any, pagination: any, filters: any, config: OverGridConfig, fields: OverGridFields, searchQuery?: string) => URLSearchParams;
346
+ serverTransformation?: (orders: any, pagination: any, filters: any, config: any, fields: any, searchQuery?: string) => URLSearchParams;
347
+ /**
348
+ * If true, the grid will skip the initial data fetch when the grid is mounted. You can use this option if you want to fetch the data manually or if you want to wait for some other operations before fetching the data.
349
+ */
350
+ skipAutoFetch?: boolean;
347
351
  /**
348
352
  * You can modify the axios instance before sending the request to the server. This function is called before the request is sent. You can modify the axios instance in order to your needs. If not set, the grid will use the default axios instance.
349
353
  * Use this function to set custom headers, base URL, or any other axios configuration.
@@ -557,6 +561,49 @@ export declare class OverGridField {
557
561
  setMiddleware(middleware: (data: any, record: any) => any): OverGridField;
558
562
  setExportMiddleware(exportMiddleware: (data: any, record: any, format?: string) => any): OverGridField;
559
563
  commit(): OverGridFields;
564
+ getFieldSnapshot(): {
565
+ key: string;
566
+ title: string;
567
+ visible: boolean | undefined;
568
+ columnFilter: {
569
+ /**
570
+ * If true, the filter is active. If false, the filter is disabled for the field.
571
+ */
572
+ active: boolean;
573
+ /**
574
+ * The filter type. The filter type is used to determine the filter input field. The possible values are 'text', 'number', 'date', 'enum'.
575
+ */
576
+ type?: string;
577
+ /**
578
+ * The key to send to the server. If not set, the key is the same as the field name. If set, the key is the value of the key. Useful when the server expects a different key as it serves in the DTO.
579
+ */
580
+ filterKey?: string;
581
+ /**
582
+ * The configuration object for the filter. The configuration object is specific to the filter type.
583
+ * For example, a 'enum' filter can have a 'values' field to define the possible statuses.
584
+ * See the documentation for more information about the filter types.
585
+ */
586
+ config?: any;
587
+ } | undefined;
588
+ middleware: ((data: any, record: any) => any) | undefined;
589
+ exportMiddleware: ((data: any, record: any, format?: string) => any) | undefined;
590
+ selectable: boolean | undefined;
591
+ orderable: boolean | undefined;
592
+ orderKey: string | undefined;
593
+ exportable: boolean | undefined;
594
+ width: string | undefined;
595
+ formatter: {
596
+ /**
597
+ * The type of the formatter.
598
+ */
599
+ type: string;
600
+ /**
601
+ * The configuration object for the formatter. The configuration object is specific to the formatter type.
602
+ * For example, a 'DateTime' formatter can have a 'format' field to define the date format, while a 'Status' formatter can have a 'statuses' field to define the possible statuses.
603
+ */
604
+ config?: any;
605
+ } | undefined;
606
+ };
560
607
  }
561
608
 
562
609
  declare class OverGridFields {
@@ -570,6 +617,28 @@ declare class OverGridFields {
570
617
  addEnumField(key: string, title: string, enumMapping: OverGridEnumMapping, extraConfig?: any): OverGridField;
571
618
  addBooleanField(key: string, title: string, extraConfig?: any): OverGridField;
572
619
  addActionButtonField(title: string, buttons: OverGridActionButton[] | ((record: any) => OverGridActionButton[])): OverGridField;
620
+ getFieldsSnapshot(): {
621
+ key: string;
622
+ title: string;
623
+ visible: boolean | undefined;
624
+ columnFilter: {
625
+ active: boolean;
626
+ type?: string;
627
+ filterKey?: string;
628
+ config?: any;
629
+ } | undefined;
630
+ middleware: ((data: any, record: any) => any) | undefined;
631
+ exportMiddleware: ((data: any, record: any, format?: string) => any) | undefined;
632
+ selectable: boolean | undefined;
633
+ orderable: boolean | undefined;
634
+ orderKey: string | undefined;
635
+ exportable: boolean | undefined;
636
+ width: string | undefined;
637
+ formatter: {
638
+ type: string;
639
+ config?: any;
640
+ } | undefined;
641
+ }[];
573
642
  }
574
643
 
575
644
  export declare interface OverGridOrderConfig {