@one-paragon/angular-utilities 2.2.7 → 2.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@one-paragon/angular-utilities",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "19.2.1",
6
6
  "@angular/core": "19.2.1",
@@ -21,11 +21,14 @@ export interface TableBuilderExport {
21
21
  dateTimeFormat?: string;
22
22
  prepend?: string;
23
23
  mapEnumToString?: boolean;
24
- mapLinkOptions?: {
25
- mapLinkToString?: boolean;
26
- excellStyle?: boolean;
27
- domainPrefix?: string;
28
- };
24
+ /**
25
+ * defaults to 'as view'
26
+ */
27
+ mapLink?: 'as link' | 'as view' | 'add link';
28
+ /**
29
+ * used with `mapLink` = 'as link' or 'add link' to add a domain prefix to the link
30
+ */
31
+ domainPrefix?: string;
29
32
  }
30
33
  export declare const TableBuilderConfigToken: InjectionToken<TableBuilderConfig>;
31
34
  export declare function provideTableBuilder(config?: TableBuilderConfig): EnvironmentProviders;
@@ -215,11 +215,15 @@ export interface ArrayAdditional<T = any> extends Additional<T> {
215
215
  limit?: number;
216
216
  arrayStyle?: ArrayStyle;
217
217
  }
218
- interface MetaDataExport<T> extends TableBuilderExport {
218
+ export interface MetaDataExport<T> extends TableBuilderExport {
219
219
  /**
220
220
  * This will supersede all other mappings when exporting.
221
221
  */
222
222
  mapForExport?: (t: T) => string;
223
+ /**
224
+ * used with `mapLink` = 'add link'
225
+ */
226
+ linkColumnName?: string;
223
227
  }
224
228
  export declare function metaDataArrToDict<T = MetaData>(arr: MetaData[], transform?: (m: MetaData) => T): Dictionary<T>;
225
229
  export interface CustomCellMeta extends Pick<MetaData, 'key' | 'displayName' | 'preSort' | 'fieldType' | 'order' | 'width'> {
@@ -1,18 +1,13 @@
1
- import { TableStore } from '../classes/table-store';
2
- import { TableBuilderExport } from '../classes/TableBuilderConfig';
3
1
  import { MetaData } from '../interfaces/report-def';
4
2
  import * as i0 from "@angular/core";
5
3
  export declare class ExportToCsvService<T> {
6
- state: TableStore;
4
+ private state;
7
5
  private config;
8
6
  private datePipe;
9
- $exportSettings: import("@angular/core").Signal<TableBuilderExport & {
10
- mapLinkToString?: boolean;
11
- excellStyle?: boolean;
12
- domainPrefix?: string;
13
- }>;
7
+ private $exportSettings;
14
8
  exportToCsv: (data: T[]) => void;
15
- csvData: (data: Array<T>, metaData: MetaData<T>[]) => string;
9
+ private getExtraLinkCols;
10
+ private csvData;
16
11
  metaToField: (meta: MetaData<T>, row: T) => any;
17
12
  private stringByType;
18
13
  cleanValForCsv(val: any): any;