@anguless/angulux 22.2.2 → 22.3.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"anguless-angulux-bind.mjs","sources":["../../src/bind/bind.ts","../../src/bind/anguless-angulux-bind.ts"],"sourcesContent":["import { computed, Directive, effect, ElementRef, input, NgModule, Renderer2, signal } from '@angular/core';\nimport { cn, equals } from '@anguless/angulux-utils';\n\n/**\n * Bind directive provides dynamic attribute, property, and event listener binding functionality.\n * @group Components\n */\n@Directive({\n selector: '[aglBind]',\n standalone: true,\n host: {\n '[style]': 'styles()',\n '[class]': 'classes()'\n }\n})\nexport class Bind {\n /**\n * Dynamic attributes, properties, and event listeners to be applied to the host element.\n * @group Props\n */\n aglBind = input<{ [key: string]: any } | undefined>(undefined);\n\n private _attrs = signal<{ [key: string]: any } | undefined>(undefined);\n private attrs = computed(() => this._attrs() || this.aglBind());\n\n styles = computed(() => this.attrs()?.style);\n classes = computed(() => cn(this.attrs()?.class));\n\n private listeners: { eventName: string; unlisten: () => void }[] = [];\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2\n ) {\n effect(() => {\n const { style, class: className, ...rest } = this.attrs() || {};\n\n for (const [key, value] of Object.entries(rest)) {\n if (key.startsWith('on') && typeof value === 'function') {\n const eventName = key.slice(2).toLowerCase();\n\n // add listener if not already added\n if (!this.listeners.some((l) => l.eventName === eventName)) {\n const unlisten = this.renderer.listen(this.el.nativeElement, eventName, value);\n this.listeners.push({ eventName, unlisten });\n }\n } else if (value === null || value === undefined) {\n // remove attr\n this.renderer.removeAttribute(this.el.nativeElement, key);\n } else {\n // attr & prop fallback\n this.renderer.setAttribute(this.el.nativeElement, key, value.toString());\n if (key in this.el.nativeElement) {\n (this.el.nativeElement as any)[key] = value;\n }\n }\n }\n });\n }\n\n ngOnDestroy() {\n this.clearListeners();\n }\n\n public setAttrs(attrs: { [key: string]: any } | undefined) {\n if (!equals(this._attrs(), attrs)) {\n this._attrs.set(attrs);\n }\n }\n\n private clearListeners() {\n this.listeners.forEach(({ unlisten }) => unlisten());\n this.listeners = [];\n }\n}\n\n@NgModule({\n imports: [Bind],\n exports: [Bind]\n})\nexport class BindModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAGA;;;AAGG;MASU,IAAI,CAAA;AAgBD,IAAA,EAAA;AACA,IAAA,QAAA;AAhBZ;;;AAGG;IACH,OAAO,GAAG,KAAK,CAAqC,SAAS;gFAAC;IAEtD,MAAM,GAAG,MAAM,CAAqC,SAAS;+EAAC;AAC9D,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;8EAAC;IAE/D,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK;+EAAC;AAC5C,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,CAAC;gFAAC;IAEzC,SAAS,GAAkD,EAAE;IAErE,WAAA,CACY,EAAc,EACd,QAAmB,EAAA;QADnB,IAAA,CAAA,EAAE,GAAF,EAAE;QACF,IAAA,CAAA,QAAQ,GAAR,QAAQ;QAEhB,MAAM,CAAC,MAAK;AACR,YAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;AAE/D,YAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AAC7C,gBAAA,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;oBACrD,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC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,IAAI;AACjB,iBAAA;;;AC/ED;;AAEG;;;;"}
1
+ {"version":3,"file":"anguless-angulux-bind.mjs","sources":["../../src/bind/bind.ts","../../src/bind/anguless-angulux-bind.ts"],"sourcesContent":["import { computed, Directive, effect, ElementRef, input, NgModule, Renderer2, signal } from '@angular/core';\nimport { cn, equals } from '@anguless/angulux-utils';\n\n/**\n * Bind directive provides dynamic attribute, property, and event listener binding functionality.\n * @group Components\n */\n@Directive({\n selector: '[aglBind]',\n standalone: true,\n host: {\n '[style]': 'styles()',\n '[class]': 'classes()'\n }\n})\nexport class Bind {\n /**\n * Dynamic attributes, properties, and event listeners to be applied to the host element.\n *\n * TRUSTED INPUT ONLY. Every key is applied to the DOM as given — set as an attribute, and\n * additionally assigned to the element property of the same name when one exists. No\n * sanitizer runs on either path, so a key such as `innerHTML` writes markup and an `on*`\n * key can install a handler. This is the mechanism the passthrough API is built on; it is\n * safe only for values you control, and never for values that reached you from a user.\n * @group Props\n */\n aglBind = input<{ [key: string]: any } | undefined>(undefined);\n\n private _attrs = signal<{ [key: string]: any } | undefined>(undefined);\n private attrs = computed(() => this._attrs() || this.aglBind());\n\n styles = computed(() => this.attrs()?.style);\n classes = computed(() => cn(this.attrs()?.class));\n\n private listeners: { eventName: string; unlisten: () => void }[] = [];\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2\n ) {\n effect(() => {\n const { style, class: className, ...rest } = this.attrs() || {};\n\n for (const [key, value] of Object.entries(rest)) {\n if (key.startsWith('on') && typeof value === 'function') {\n const eventName = key.slice(2).toLowerCase();\n\n // add listener if not already added\n if (!this.listeners.some((l) => l.eventName === eventName)) {\n const unlisten = this.renderer.listen(this.el.nativeElement, eventName, value);\n this.listeners.push({ eventName, unlisten });\n }\n } else if (value === null || value === undefined) {\n // remove attr\n this.renderer.removeAttribute(this.el.nativeElement, key);\n } else {\n // attr & prop fallback\n this.renderer.setAttribute(this.el.nativeElement, key, value.toString());\n if (key in this.el.nativeElement) {\n (this.el.nativeElement as any)[key] = value;\n }\n }\n }\n });\n }\n\n ngOnDestroy() {\n this.clearListeners();\n }\n\n public setAttrs(attrs: { [key: string]: any } | undefined) {\n if (!equals(this._attrs(), attrs)) {\n this._attrs.set(attrs);\n }\n }\n\n private clearListeners() {\n this.listeners.forEach(({ unlisten }) => unlisten());\n this.listeners = [];\n }\n}\n\n@NgModule({\n imports: [Bind],\n exports: [Bind]\n})\nexport class BindModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAGA;;;AAGG;MASU,IAAI,CAAA;AAsBD,IAAA,EAAA;AACA,IAAA,QAAA;AAtBZ;;;;;;;;;AASG;IACH,OAAO,GAAG,KAAK,CAAqC,SAAS;gFAAC;IAEtD,MAAM,GAAG,MAAM,CAAqC,SAAS;+EAAC;AAC9D,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;8EAAC;IAE/D,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK;+EAAC;AAC5C,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,CAAC;gFAAC;IAEzC,SAAS,GAAkD,EAAE;IAErE,WAAA,CACY,EAAc,EACd,QAAmB,EAAA;QADnB,IAAA,CAAA,EAAE,GAAF,EAAE;QACF,IAAA,CAAA,QAAQ,GAAR,QAAQ;QAEhB,MAAM,CAAC,MAAK;AACR,YAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;AAE/D,YAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AAC7C,gBAAA,IAAI,GAAG,CAAC,UAAU,CA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CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,IAAI,CAAC;oBACf,OAAO,EAAE,CAAC,IAAI;AACjB,iBAAA;;;ACrFD;;AAEG;;;;"}
@@ -0,0 +1,97 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { Injectable, InjectionToken, inject, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
4
+ import { RouterModule } from '@angular/router';
5
+ import { SharedModule } from '@anguless/angulux/api';
6
+ import { BaseComponent, PARENT_INSTANCE } from '@anguless/angulux/basecomponent';
7
+ import * as i1 from '@anguless/angulux/bind';
8
+ import { Bind, BindModule } from '@anguless/angulux/bind';
9
+ import { style as style$1 } from '@anguless/angulux-styles/iftalabel';
10
+ import { BaseStyle } from '@anguless/angulux/base';
11
+
12
+ const style = /*css*/ `
13
+ ${style$1}
14
+
15
+ .p-iftalabel:has(.ng-invalid.ng-dirty) label {
16
+ color: dt('iftalabel.invalid.color');
17
+ }
18
+ `;
19
+ const classes = {
20
+ root: 'p-iftalabel'
21
+ };
22
+ class IftaLabelStyle extends BaseStyle {
23
+ name = 'iftalabel';
24
+ style = style;
25
+ classes = classes;
26
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
27
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelStyle });
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelStyle, decorators: [{
30
+ type: Injectable
31
+ }] });
32
+ /**
33
+ *
34
+ * IftaLabel visually integrates a label within its form element.
35
+ *
36
+ * @module iftalabelstyle
37
+ *
38
+ */
39
+ var IftaLabelClasses;
40
+ (function (IftaLabelClasses) {
41
+ /**
42
+ * Class name of the root element
43
+ */
44
+ IftaLabelClasses["root"] = "p-iftalabel";
45
+ })(IftaLabelClasses || (IftaLabelClasses = {}));
46
+
47
+ const IFTALABEL_INSTANCE = new InjectionToken('IFTALABEL_INSTANCE');
48
+ /**
49
+ * IftaLabel is used to create infield top aligned labels.
50
+ * @group Components
51
+ */
52
+ class IftaLabel extends BaseComponent {
53
+ componentName = 'IftaLabel';
54
+ _componentStyle = inject(IftaLabelStyle);
55
+ $pcIftaLabel = inject(IFTALABEL_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
56
+ bindDirectiveInstance = inject(Bind, { self: true });
57
+ onAfterViewChecked() {
58
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
59
+ }
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabel, deps: null, target: i0.ɵɵFactoryTarget.Component });
61
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: IftaLabel, isStandalone: true, selector: "agl-iftalabel, agl-iftaLabel, agl-ifta-label", host: { properties: { "class": "cx('root')" } }, providers: [IftaLabelStyle, { provide: IFTALABEL_INSTANCE, useExisting: IftaLabel }, { provide: PARENT_INSTANCE, useExisting: IftaLabel }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, dependencies: [{ kind: "ngmodule", type: BindModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
62
+ }
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabel, decorators: [{
64
+ type: Component,
65
+ args: [{
66
+ selector: 'agl-iftalabel, agl-iftaLabel, agl-ifta-label',
67
+ standalone: true,
68
+ imports: [BindModule],
69
+ template: ` <ng-content></ng-content> `,
70
+ changeDetection: ChangeDetectionStrategy.OnPush,
71
+ encapsulation: ViewEncapsulation.None,
72
+ providers: [IftaLabelStyle, { provide: IFTALABEL_INSTANCE, useExisting: IftaLabel }, { provide: PARENT_INSTANCE, useExisting: IftaLabel }],
73
+ hostDirectives: [Bind],
74
+ host: {
75
+ '[class]': "cx('root')"
76
+ }
77
+ }]
78
+ }] });
79
+ class IftaLabelModule {
80
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
81
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelModule, imports: [IftaLabel, CommonModule, SharedModule, RouterModule], exports: [IftaLabel, SharedModule] });
82
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelModule, imports: [IftaLabel, CommonModule, SharedModule, RouterModule, SharedModule] });
83
+ }
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: IftaLabelModule, decorators: [{
85
+ type: NgModule,
86
+ args: [{
87
+ imports: [IftaLabel, CommonModule, SharedModule, RouterModule],
88
+ exports: [IftaLabel, SharedModule]
89
+ }]
90
+ }] });
91
+
92
+ /**
93
+ * Generated bundle index. Do not edit.
94
+ */
95
+
96
+ export { IftaLabel, IftaLabelClasses, IftaLabelModule, IftaLabelStyle };
97
+ //# sourceMappingURL=anguless-angulux-iftalabel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anguless-angulux-iftalabel.mjs","sources":["../../src/iftalabel/style/iftalabelstyle.ts","../../src/iftalabel/iftalabel.ts","../../src/iftalabel/anguless-angulux-iftalabel.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as iftalabel_style } from '@anguless/angulux-styles/iftalabel';\nimport { BaseStyle } from '@anguless/angulux/base';\n\nconst style = /*css*/ `\n ${iftalabel_style}\n\n .p-iftalabel:has(.ng-invalid.ng-dirty) label {\n color: dt('iftalabel.invalid.color');\n }\n`;\n\nconst classes = {\n root: 'p-iftalabel'\n};\n\n@Injectable()\nexport class IftaLabelStyle extends BaseStyle {\n name = 'iftalabel';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * IftaLabel visually integrates a label within its form element.\n *\n * @module iftalabelstyle\n *\n */\nexport enum IftaLabelClasses {\n /**\n * Class name of the root element\n */\n root = 'p-iftalabel'\n}\n\nexport interface IftaLabelStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { AfterViewChecked, ChangeDetectionStrategy, Component, inject, InjectionToken, NgModule, ViewEncapsulation } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@anguless/angulux/api';\nimport { BaseComponent, PARENT_INSTANCE } from '@anguless/angulux/basecomponent';\nimport { Bind, BindModule } from '@anguless/angulux/bind';\nimport { IftaLabelPassThrough } from '@anguless/angulux/types/iftalabel';\nimport { IftaLabelStyle } from './style/iftalabelstyle';\n\nconst IFTALABEL_INSTANCE = new InjectionToken<IftaLabel>('IFTALABEL_INSTANCE');\n\n/**\n * IftaLabel is used to create infield top aligned labels.\n * @group Components\n */\n@Component({\n selector: 'agl-iftalabel, agl-iftaLabel, agl-ifta-label',\n standalone: true,\n imports: [BindModule],\n template: ` <ng-content></ng-content> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [IftaLabelStyle, { provide: IFTALABEL_INSTANCE, useExisting: IftaLabel }, { provide: PARENT_INSTANCE, useExisting: IftaLabel }],\n hostDirectives: [Bind],\n host: {\n '[class]': \"cx('root')\"\n }\n})\nexport class IftaLabel extends BaseComponent<IftaLabelPassThrough> implements AfterViewChecked {\n componentName = 'IftaLabel';\n\n _componentStyle = inject(IftaLabelStyle);\n\n $pcIftaLabel: IftaLabel | undefined = inject(IFTALABEL_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n}\n\n@NgModule({\n imports: [IftaLabel, CommonModule, SharedModule, RouterModule],\n exports: [IftaLabel, SharedModule]\n})\nexport class IftaLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["iftalabel_style"],"mappings":";;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChBA,OAAe;;;;;CAKpB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE;CACT;AAGK,MAAO,cAAe,SAAQ,SAAS,CAAA;IACzC,IAAI,GAAG,WAAW;IAElB,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;uGALR,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAd,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B;;AASD;;;;;;AAMG;IACS;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AACxB;;AAEG;AACH,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,aAAoB;AACxB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;;ACvB5B,MAAM,kBAAkB,GAAG,IAAI,cAAc,CAAY,oBAAoB,CAAC;AAE9E;;;AAGG;AAcG,MAAO,SAAU,SAAQ,aAAmC,CAAA;IAC9D,aAAa,GAAG,WAAW;AAE3B,IAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;AAExC,IAAA,YAAY,GAA0B,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,SAAS;IAEjH,qBAAqB,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;I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,SAAS,EAAE,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE,WAAW,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAA,SAAW,EAAE,CAAC;oBAC1I,cAAc,EAAE,CAAC,IAAI,CAAC;AACtB,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE;AACd;AACJ,iBAAA;;MAmBY,eAAe,CAAA;uGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAf,eAAe,EAAA,OAAA,EAAA,CAlBf,SAAS,EAeG,YAAY,EAAE,YAAY,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAfpD,SAAS,EAgBG,YAAY,CAAA,EAAA,CAAA;wGAExB,eAAe,EAAA,OAAA,EAAA,CAHd,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EACxC,YAAY,CAAA,EAAA,CAAA;;2FAExB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC;AAC9D,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY;AACpC,iBAAA;;;AC7CD;;AAEG;;;;"}
@@ -752,6 +752,23 @@ class Table extends BaseComponent {
752
752
  * @group Props
753
753
  */
754
754
  exportFilename = 'download';
755
+ /**
756
+ * Whether to neutralise spreadsheet formulas in the exported CSV.
757
+ *
758
+ * A cell whose first character is `=`, `+`, `-`, `@`, a tab or a carriage return is a
759
+ * FORMULA to Excel, LibreOffice and Google Sheets — quoting does not stop it, because the
760
+ * quotes are removed by CSV parsing before the formula is detected. Exporting a table of
761
+ * user-submitted values therefore hands whoever wrote those values a way to run a formula
762
+ * in the reader's spreadsheet, which can read the surrounding cells and send them out
763
+ * (CWE-1236). Nothing appears wrong at export time; the damage happens in another
764
+ * application entirely.
765
+ *
766
+ * When true, such a cell is prefixed with an apostrophe, which every major spreadsheet
767
+ * reads as "this is text" and does not display. Set it to false only if you are exporting
768
+ * formulas on purpose AND you control every value in the table.
769
+ * @group Props
770
+ */
771
+ exportEscapeFormulas = true;
755
772
  /**
756
773
  * An array of FilterMetadata objects to provide external filters.
757
774
  * @group Props
@@ -2214,6 +2231,25 @@ class Table extends BaseComponent {
2214
2231
  getExportHeader(column) {
2215
2232
  return column[this.exportHeader] || column.header || column.field;
2216
2233
  }
2234
+ /**
2235
+ * One CSV field, escaped once.
2236
+ *
2237
+ * Both the header row and every body cell go through here, because they used to be
2238
+ * escaped differently and that is how the two drifted: the header was wrapped in quotes
2239
+ * with NO escaping at all, and a cell produced by `exportFunction` was returned raw —
2240
+ * quote-doubling only ever ran in the `else` branch. A `"` in either one broke the field
2241
+ * structure, quite apart from the formula question.
2242
+ *
2243
+ * Order matters. The formula prefix is added BEFORE quote-doubling, so a value that is
2244
+ * both a formula and contains a quote is still a single well-formed field.
2245
+ */
2246
+ escapeCsvField(value) {
2247
+ const text = value == null ? '' : String(value);
2248
+ // `=` `+` `-` `@` are the documented formula leaders; TAB and CR are the documented
2249
+ // bypasses, because spreadsheets skip them and then read the next character.
2250
+ const guarded = this.exportEscapeFormulas && /^[=+\-@\t\r]/.test(text) ? `'${text}` : text;
2251
+ return guarded.replace(/"/g, '""');
2252
+ }
2217
2253
  /**
2218
2254
  * Data export method.
2219
2255
  * @param {ExportCSVOptions} object - Export options.
@@ -2237,25 +2273,21 @@ class Table extends BaseComponent {
2237
2273
  }
2238
2274
  const exportableColumns = columns.filter((column) => column.exportable !== false && column.field);
2239
2275
  //headers
2240
- csv += exportableColumns.map((column) => '"' + this.getExportHeader(column) + '"').join(this.csvSeparator);
2276
+ csv += exportableColumns.map((column) => '"' + this.escapeCsvField(this.getExportHeader(column)) + '"').join(this.csvSeparator);
2241
2277
  //body
2242
2278
  const body = data
2243
2279
  .map((record) => exportableColumns
2244
2280
  .map((column) => {
2245
2281
  let cellData = ObjectUtils.resolveFieldData(record, column.field);
2246
- if (cellData != null) {
2247
- if (this.exportFunction) {
2248
- cellData = this.exportFunction({
2249
- data: cellData,
2250
- field: column.field
2251
- });
2252
- }
2253
- else
2254
- cellData = String(cellData).replace(/"/g, '""');
2282
+ if (cellData != null && this.exportFunction) {
2283
+ cellData = this.exportFunction({
2284
+ data: cellData,
2285
+ field: column.field
2286
+ });
2255
2287
  }
2256
- else
2257
- cellData = '';
2258
- return '"' + cellData + '"';
2288
+ // escapeCsvField handles null itself, and escapes whatever exportFunction
2289
+ // returned — that output used to be written to the file untouched.
2290
+ return '"' + this.escapeCsvField(cellData) + '"';
2259
2291
  })
2260
2292
  .join(this.csvSeparator))
2261
2293
  .join('\n');
@@ -2930,7 +2962,7 @@ class Table extends BaseComponent {
2930
2962
  });
2931
2963
  }
2932
2964
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: Table, deps: null, target: i0.ɵɵFactoryTarget.Component });
2933
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.1", type: Table, isStandalone: false, selector: "agl-table", inputs: { frozenColumns: "frozenColumns", frozenValue: "frozenValue", styleClass: "styleClass", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", paginator: ["paginator", "paginator", booleanAttribute], pageLinks: ["pageLinks", "pageLinks", numberAttribute], rowsPerPageOptions: "rowsPerPageOptions", alwaysShowPaginator: ["alwaysShowPaginator", "alwaysShowPaginator", booleanAttribute], paginatorPosition: "paginatorPosition", paginatorStyleClass: "paginatorStyleClass", paginatorDropdownAppendTo: "paginatorDropdownAppendTo", paginatorDropdownScrollHeight: "paginatorDropdownScrollHeight", currentPageReportTemplate: "currentPageReportTemplate", showCurrentPageReport: ["showCurrentPageReport", "showCurrentPageReport", booleanAttribute], showJumpToPageDropdown: ["showJumpToPageDropdown", "showJumpToPageDropdown", booleanAttribute], showJumpToPageInput: ["showJumpToPageInput", "showJumpToPageInput", booleanAttribute], showFirstLastIcon: ["showFirstLastIcon", "showFirstLastIcon", booleanAttribute], showPageLinks: ["showPageLinks", "showPageLinks", booleanAttribute], defaultSortOrder: ["defaultSortOrder", "defaultSortOrder", numberAttribute], sortMode: "sortMode", resetPageOnSort: ["resetPageOnSort", "resetPageOnSort", booleanAttribute], selectionMode: "selectionMode", selectionPageOnly: ["selectionPageOnly", "selectionPageOnly", booleanAttribute], contextMenuSelection: "contextMenuSelection", contextMenuSelectionMode: "contextMenuSelectionMode", dataKey: "dataKey", metaKeySelection: ["metaKeySelection", "metaKeySelection", booleanAttribute], rowSelectable: "rowSelectable", rowTrackBy: "rowTrackBy", lazy: ["lazy", "lazy", booleanAttribute], lazyLoadOnInit: ["lazyLoadOnInit", "lazyLoadOnInit", booleanAttribute], compareSelectionBy: "compareSelectionBy", csvSeparator: "csvSeparator", exportFilename: "exportFilename", filters: "filters", globalFilterFields: "globalFilterFields", filterDelay: ["filterDelay", "filterDelay", numberAttribute], filterLocale: "filterLocale", expandedRowKeys: "expandedRowKeys", editingRowKeys: "editingRowKeys", rowExpandMode: "rowExpandMode", scrollable: ["scrollable", "scrollable", booleanAttribute], rowGroupMode: "rowGroupMode", scrollHeight: "scrollHeight", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", virtualScrollDelay: ["virtualScrollDelay", "virtualScrollDelay", numberAttribute], frozenWidth: "frozenWidth", contextMenu: "contextMenu", resizableColumns: ["resizableColumns", "resizableColumns", booleanAttribute], columnResizeMode: "columnResizeMode", reorderableColumns: ["reorderableColumns", "reorderableColumns", booleanAttribute], loading: ["loading", "loading", booleanAttribute], loadingIcon: "loadingIcon", showLoader: ["showLoader", "showLoader", booleanAttribute], rowHover: ["rowHover", "rowHover", booleanAttribute], customSort: ["customSort", "customSort", booleanAttribute], showInitialSortBadge: ["showInitialSortBadge", "showInitialSortBadge", booleanAttribute], exportFunction: "exportFunction", exportHeader: "exportHeader", stateKey: "stateKey", stateStorage: "stateStorage", editMode: "editMode", groupRowsBy: "groupRowsBy", size: "size", showGridlines: ["showGridlines", "showGridlines", booleanAttribute], stripedRows: ["stripedRows", "stripedRows", booleanAttribute], groupRowsByOrder: ["groupRowsByOrder", "groupRowsByOrder", numberAttribute], responsiveLayout: "responsiveLayout", breakpoint: "breakpoint", paginatorLocale: "paginatorLocale", value: "value", columns: "columns", first: "first", rows: "rows", totalRecords: "totalRecords", sortField: "sortField", sortOrder: "sortOrder", multiSortMeta: "multiSortMeta", selection: "selection", selectAll: "selectAll" }, outputs: { contextMenuSelectionChange: "contextMenuSelectionChange", selectAllChange: "selectAllChange", selectionChange: "selectionChange", onRowSelect: "onRowSelect", onRowUnselect: "onRowUnselect", onPage: "onPage", onSort: "onSort", onFilter: "onFilter", onLazyLoad: "onLazyLoad", onRowExpand: "onRowExpand", onRowCollapse: "onRowCollapse", onContextMenuSelect: "onContextMenuSelect", onColResize: "onColResize", onColReorder: "onColReorder", onRowReorder: "onRowReorder", onEditInit: "onEditInit", onEditComplete: "onEditComplete", onEditCancel: "onEditCancel", onHeaderCheckboxToggle: "onHeaderCheckboxToggle", sortFunction: "sortFunction", firstChange: "firstChange", rowsChange: "rowsChange", onStateSave: "onStateSave", onStateRestore: "onStateRestore" }, host: { properties: { "class": "cn(cx('root'), styleClass)", "attr.data-p": "dataP" } }, providers: [TableService, TableStyle, { provide: TABLE_INSTANCE, useExisting: Table }, { provide: PARENT_INSTANCE, useExisting: Table }], queries: [{ propertyName: "_headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "_headerGroupedTemplate", first: true, predicate: ["headergrouped"], isSignal: true }, { propertyName: "_bodyTemplate", first: true, predicate: ["body"], isSignal: true }, { propertyName: "_loadingBodyTemplate", first: true, predicate: ["loadingbody"], isSignal: true }, { propertyName: "_captionTemplate", first: true, predicate: ["caption"], isSignal: true }, { propertyName: "_footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "_footerGroupedTemplate", first: true, predicate: ["footergrouped"], isSignal: true }, { propertyName: "_summaryTemplate", first: true, predicate: ["summary"], isSignal: true }, { propertyName: "_colGroupTemplate", first: true, predicate: ["colgroup"], isSignal: true }, { propertyName: "_expandedRowTemplate", first: true, predicate: ["expandedrow"], isSignal: true }, { propertyName: "_groupHeaderTemplate", first: true, predicate: ["groupheader"], isSignal: true }, { propertyName: "_groupFooterTemplate", first: true, predicate: ["groupfooter"], isSignal: true }, { propertyName: "_frozenExpandedRowTemplate", first: true, predicate: ["frozenexpandedrow"], isSignal: true }, { propertyName: "_frozenBodyTemplate", first: true, predicate: ["frozenbody"], isSignal: true }, { propertyName: "_emptyMessageTemplate", first: true, predicate: ["emptymessage"], isSignal: true }, { propertyName: "_paginatorLeftTemplate", first: true, predicate: ["paginatorleft"], isSignal: true }, { propertyName: "_paginatorRightTemplate", first: true, predicate: ["paginatorright"], isSignal: true }, { propertyName: "_paginatorDropdownItemTemplate", first: true, predicate: ["paginatordropdownitem"], isSignal: true }, { propertyName: "_loadingIconTemplate", first: true, predicate: ["loadingicon"], isSignal: true }, { propertyName: "_reorderIndicatorUpIconTemplate", first: true, predicate: ["reorderindicatorupicon"], isSignal: true }, { propertyName: "_reorderIndicatorDownIconTemplate", first: true, predicate: ["reorderindicatordownicon"], isSignal: true }, { propertyName: "_sortIconTemplate", first: true, predicate: ["sorticon"], isSignal: true }, { propertyName: "_checkboxIconTemplate", first: true, predicate: ["checkboxicon"], isSignal: true }, { propertyName: "_headerCheckboxIconTemplate", first: true, predicate: ["headercheckboxicon"], isSignal: true }, { propertyName: "_paginatorDropdownIconTemplate", first: true, predicate: ["paginatordropdownicon"], isSignal: true }, { propertyName: "_paginatorFirstPageLinkIconTemplate", first: true, predicate: ["paginatorfirstpagelinkicon"], isSignal: true }, { propertyName: "_paginatorLastPageLinkIconTemplate", first: true, predicate: ["paginatorlastpagelinkicon"], isSignal: true }, { propertyName: "_paginatorPreviousPageLinkIconTemplate", first: true, predicate: ["paginatorpreviouspagelinkicon"], isSignal: true }, { propertyName: "_paginatorNextPageLinkIconTemplate", first: true, predicate: ["paginatornextpagelinkicon"], isSignal: true }], viewQueries: [{ propertyName: "resizeHelperViewChild", first: true, predicate: ["resizeHelper"], descendants: true }, { propertyName: "reorderIndicatorUpViewChild", first: true, predicate: ["reorderIndicatorUp"], descendants: true }, { propertyName: "reorderIndicatorDownViewChild", first: true, predicate: ["reorderIndicatorDown"], descendants: true }, { propertyName: "wrapperViewChild", first: true, predicate: ["wrapper"], descendants: true }, { propertyName: "tableViewChild", first: true, predicate: ["table"], descendants: true }, { propertyName: "tableHeaderViewChild", first: true, predicate: ["thead"], descendants: true }, { propertyName: "tableFooterViewChild", first: true, predicate: ["tfoot"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
2965
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.1", type: Table, isStandalone: false, selector: "agl-table", inputs: { frozenColumns: "frozenColumns", frozenValue: "frozenValue", styleClass: "styleClass", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", paginator: ["paginator", "paginator", booleanAttribute], pageLinks: ["pageLinks", "pageLinks", numberAttribute], rowsPerPageOptions: "rowsPerPageOptions", alwaysShowPaginator: ["alwaysShowPaginator", "alwaysShowPaginator", booleanAttribute], paginatorPosition: "paginatorPosition", paginatorStyleClass: "paginatorStyleClass", paginatorDropdownAppendTo: "paginatorDropdownAppendTo", paginatorDropdownScrollHeight: "paginatorDropdownScrollHeight", currentPageReportTemplate: "currentPageReportTemplate", showCurrentPageReport: ["showCurrentPageReport", "showCurrentPageReport", booleanAttribute], showJumpToPageDropdown: ["showJumpToPageDropdown", "showJumpToPageDropdown", booleanAttribute], showJumpToPageInput: ["showJumpToPageInput", "showJumpToPageInput", booleanAttribute], showFirstLastIcon: ["showFirstLastIcon", "showFirstLastIcon", booleanAttribute], showPageLinks: ["showPageLinks", "showPageLinks", booleanAttribute], defaultSortOrder: ["defaultSortOrder", "defaultSortOrder", numberAttribute], sortMode: "sortMode", resetPageOnSort: ["resetPageOnSort", "resetPageOnSort", booleanAttribute], selectionMode: "selectionMode", selectionPageOnly: ["selectionPageOnly", "selectionPageOnly", booleanAttribute], contextMenuSelection: "contextMenuSelection", contextMenuSelectionMode: "contextMenuSelectionMode", dataKey: "dataKey", metaKeySelection: ["metaKeySelection", "metaKeySelection", booleanAttribute], rowSelectable: "rowSelectable", rowTrackBy: "rowTrackBy", lazy: ["lazy", "lazy", booleanAttribute], lazyLoadOnInit: ["lazyLoadOnInit", "lazyLoadOnInit", booleanAttribute], compareSelectionBy: "compareSelectionBy", csvSeparator: "csvSeparator", exportFilename: "exportFilename", exportEscapeFormulas: ["exportEscapeFormulas", "exportEscapeFormulas", booleanAttribute], filters: "filters", globalFilterFields: "globalFilterFields", filterDelay: ["filterDelay", "filterDelay", numberAttribute], filterLocale: "filterLocale", expandedRowKeys: "expandedRowKeys", editingRowKeys: "editingRowKeys", rowExpandMode: "rowExpandMode", scrollable: ["scrollable", "scrollable", booleanAttribute], rowGroupMode: "rowGroupMode", scrollHeight: "scrollHeight", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", virtualScrollDelay: ["virtualScrollDelay", "virtualScrollDelay", numberAttribute], frozenWidth: "frozenWidth", contextMenu: "contextMenu", resizableColumns: ["resizableColumns", "resizableColumns", booleanAttribute], columnResizeMode: "columnResizeMode", reorderableColumns: ["reorderableColumns", "reorderableColumns", booleanAttribute], loading: ["loading", "loading", booleanAttribute], loadingIcon: "loadingIcon", showLoader: ["showLoader", "showLoader", booleanAttribute], rowHover: ["rowHover", "rowHover", booleanAttribute], customSort: ["customSort", "customSort", booleanAttribute], showInitialSortBadge: ["showInitialSortBadge", "showInitialSortBadge", booleanAttribute], exportFunction: "exportFunction", exportHeader: "exportHeader", stateKey: "stateKey", stateStorage: "stateStorage", editMode: "editMode", groupRowsBy: "groupRowsBy", size: "size", showGridlines: ["showGridlines", "showGridlines", booleanAttribute], stripedRows: ["stripedRows", "stripedRows", booleanAttribute], groupRowsByOrder: ["groupRowsByOrder", "groupRowsByOrder", numberAttribute], responsiveLayout: "responsiveLayout", breakpoint: "breakpoint", paginatorLocale: "paginatorLocale", value: "value", columns: "columns", first: "first", rows: "rows", totalRecords: "totalRecords", sortField: "sortField", sortOrder: "sortOrder", multiSortMeta: "multiSortMeta", selection: "selection", selectAll: "selectAll" }, outputs: { contextMenuSelectionChange: "contextMenuSelectionChange", selectAllChange: "selectAllChange", selectionChange: "selectionChange", onRowSelect: "onRowSelect", onRowUnselect: "onRowUnselect", onPage: "onPage", onSort: "onSort", onFilter: "onFilter", onLazyLoad: "onLazyLoad", onRowExpand: "onRowExpand", onRowCollapse: "onRowCollapse", onContextMenuSelect: "onContextMenuSelect", onColResize: "onColResize", onColReorder: "onColReorder", onRowReorder: "onRowReorder", onEditInit: "onEditInit", onEditComplete: "onEditComplete", onEditCancel: "onEditCancel", onHeaderCheckboxToggle: "onHeaderCheckboxToggle", sortFunction: "sortFunction", firstChange: "firstChange", rowsChange: "rowsChange", onStateSave: "onStateSave", onStateRestore: "onStateRestore" }, host: { properties: { "class": "cn(cx('root'), styleClass)", "attr.data-p": "dataP" } }, providers: [TableService, TableStyle, { provide: TABLE_INSTANCE, useExisting: Table }, { provide: PARENT_INSTANCE, useExisting: Table }], queries: [{ propertyName: "_headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "_headerGroupedTemplate", first: true, predicate: ["headergrouped"], isSignal: true }, { propertyName: "_bodyTemplate", first: true, predicate: ["body"], isSignal: true }, { propertyName: "_loadingBodyTemplate", first: true, predicate: ["loadingbody"], isSignal: true }, { propertyName: "_captionTemplate", first: true, predicate: ["caption"], isSignal: true }, { propertyName: "_footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "_footerGroupedTemplate", first: true, predicate: ["footergrouped"], isSignal: true }, { propertyName: "_summaryTemplate", first: true, predicate: ["summary"], isSignal: true }, { propertyName: "_colGroupTemplate", first: true, predicate: ["colgroup"], isSignal: true }, { propertyName: "_expandedRowTemplate", first: true, predicate: ["expandedrow"], isSignal: true }, { propertyName: "_groupHeaderTemplate", first: true, predicate: ["groupheader"], isSignal: true }, { propertyName: "_groupFooterTemplate", first: true, predicate: ["groupfooter"], isSignal: true }, { propertyName: "_frozenExpandedRowTemplate", first: true, predicate: ["frozenexpandedrow"], isSignal: true }, { propertyName: "_frozenBodyTemplate", first: true, predicate: ["frozenbody"], isSignal: true }, { propertyName: "_emptyMessageTemplate", first: true, predicate: ["emptymessage"], isSignal: true }, { propertyName: "_paginatorLeftTemplate", first: true, predicate: ["paginatorleft"], isSignal: true }, { propertyName: "_paginatorRightTemplate", first: true, predicate: ["paginatorright"], isSignal: true }, { propertyName: "_paginatorDropdownItemTemplate", first: true, predicate: ["paginatordropdownitem"], isSignal: true }, { propertyName: "_loadingIconTemplate", first: true, predicate: ["loadingicon"], isSignal: true }, { propertyName: "_reorderIndicatorUpIconTemplate", first: true, predicate: ["reorderindicatorupicon"], isSignal: true }, { propertyName: "_reorderIndicatorDownIconTemplate", first: true, predicate: ["reorderindicatordownicon"], isSignal: true }, { propertyName: "_sortIconTemplate", first: true, predicate: ["sorticon"], isSignal: true }, { propertyName: "_checkboxIconTemplate", first: true, predicate: ["checkboxicon"], isSignal: true }, { propertyName: "_headerCheckboxIconTemplate", first: true, predicate: ["headercheckboxicon"], isSignal: true }, { propertyName: "_paginatorDropdownIconTemplate", first: true, predicate: ["paginatordropdownicon"], isSignal: true }, { propertyName: "_paginatorFirstPageLinkIconTemplate", first: true, predicate: ["paginatorfirstpagelinkicon"], isSignal: true }, { propertyName: "_paginatorLastPageLinkIconTemplate", first: true, predicate: ["paginatorlastpagelinkicon"], isSignal: true }, { propertyName: "_paginatorPreviousPageLinkIconTemplate", first: true, predicate: ["paginatorpreviouspagelinkicon"], isSignal: true }, { propertyName: "_paginatorNextPageLinkIconTemplate", first: true, predicate: ["paginatornextpagelinkicon"], isSignal: true }], viewQueries: [{ propertyName: "resizeHelperViewChild", first: true, predicate: ["resizeHelper"], descendants: true }, { propertyName: "reorderIndicatorUpViewChild", first: true, predicate: ["reorderIndicatorUp"], descendants: true }, { propertyName: "reorderIndicatorDownViewChild", first: true, predicate: ["reorderIndicatorDown"], descendants: true }, { propertyName: "wrapperViewChild", first: true, predicate: ["wrapper"], descendants: true }, { propertyName: "tableViewChild", first: true, predicate: ["table"], descendants: true }, { propertyName: "tableHeaderViewChild", first: true, predicate: ["thead"], descendants: true }, { propertyName: "tableFooterViewChild", first: true, predicate: ["tfoot"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
2934
2966
  <div [class]="cx('mask')" [aglBind]="ptm('mask')" *ngIf="loading && showLoader" animate.enter="p-overlay-mask-enter-active" animate.leave="p-overlay-mask-leave-active">
2935
2967
  <i *ngIf="loadingIcon" [class]="cn(cx('loadingIcon'), loadingIcon)" [aglBind]="ptm('loadingIcon')"></i>
2936
2968
  <ng-container *ngIf="!loadingIcon">
@@ -3481,6 +3513,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
3481
3513
  type: Input
3482
3514
  }], exportFilename: [{
3483
3515
  type: Input
3516
+ }], exportEscapeFormulas: [{
3517
+ type: Input,
3518
+ args: [{ transform: booleanAttribute }]
3484
3519
  }], filters: [{
3485
3520
  type: Input
3486
3521
  }], globalFilterFields: [{