coer-elements 2.0.72 → 2.0.74
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/components/lib/coer-datebox/coer-datebox.component.d.ts +1 -1
- package/components/lib/coer-modal/coer-modal.component.d.ts +2 -2
- package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +1 -1
- package/components/lib/coer-secretbox/coer-secretbox.component.d.ts +1 -1
- package/components/lib/coer-textarea/coer-textarea.component.d.ts +1 -1
- package/components/lib/coer-textbox/coer-textbox.component.d.ts +1 -1
- package/extensions/lib/array.extension.d.ts +9 -0
- package/extensions/public-api.d.ts +1 -0
- package/fesm2022/coer-elements-components.mjs +17 -25
- package/fesm2022/coer-elements-components.mjs.map +1 -1
- package/fesm2022/coer-elements-extensions.mjs +8 -1
- package/fesm2022/coer-elements-extensions.mjs.map +1 -1
- package/fesm2022/coer-elements-tools.mjs +11 -15
- package/fesm2022/coer-elements-tools.mjs.map +1 -1
- package/package.json +1 -1
- package/tools/lib/collections.tools.d.ts +2 -2
@@ -23,7 +23,7 @@ export declare class CoerDateBox extends ControlValue implements AfterViewInit,
|
|
23
23
|
value: import("@angular/core").InputSignal<string | null | undefined>;
|
24
24
|
label: import("@angular/core").InputSignal<string>;
|
25
25
|
placeholder: import("@angular/core").InputSignal<string>;
|
26
|
-
textPosition: import("@angular/core").InputSignal<"left" | "
|
26
|
+
textPosition: import("@angular/core").InputSignal<"left" | "center" | "right">;
|
27
27
|
isWritable: import("@angular/core").InputSignal<boolean>;
|
28
28
|
isInvalid: import("@angular/core").InputSignal<boolean>;
|
29
29
|
isValid: import("@angular/core").InputSignal<boolean>;
|
@@ -13,10 +13,10 @@ export declare class CoerModal implements AfterViewInit {
|
|
13
13
|
title: import("@angular/core").InputSignal<string>;
|
14
14
|
icon: import("@angular/core").InputSignal<string>;
|
15
15
|
showCloseButton: import("@angular/core").InputSignal<boolean>;
|
16
|
-
width: import("@angular/core").InputSignal<"
|
16
|
+
width: import("@angular/core").InputSignal<"small" | "auto" | "full">;
|
17
17
|
height: import("@angular/core").InputSignal<string>;
|
18
18
|
maxHeight: import("@angular/core").InputSignal<string>;
|
19
|
-
verticalPosition: import("@angular/core").InputSignal<"top" | "
|
19
|
+
verticalPosition: import("@angular/core").InputSignal<"top" | "middle" | "bottom">;
|
20
20
|
onOpen: import("@angular/core").OutputEmitterRef<void>;
|
21
21
|
onClose: import("@angular/core").OutputEmitterRef<void>;
|
22
22
|
protected IsNull: (value: any) => boolean;
|
@@ -16,7 +16,7 @@ export declare class CoerNumberBox extends ControlValue implements AfterViewInit
|
|
16
16
|
value: import("@angular/core").InputSignal<string | number | null | undefined>;
|
17
17
|
label: import("@angular/core").InputSignal<string>;
|
18
18
|
placeholder: import("@angular/core").InputSignal<string>;
|
19
|
-
textPosition: import("@angular/core").InputSignal<"left" | "
|
19
|
+
textPosition: import("@angular/core").InputSignal<"left" | "center" | "right">;
|
20
20
|
min: import("@angular/core").InputSignal<number>;
|
21
21
|
max: import("@angular/core").InputSignal<number>;
|
22
22
|
isInvalid: import("@angular/core").InputSignal<boolean>;
|
@@ -17,7 +17,7 @@ export declare class CoerSecretBox extends ControlValue implements AfterViewInit
|
|
17
17
|
value: import("@angular/core").InputSignal<string | number | null | undefined>;
|
18
18
|
label: import("@angular/core").InputSignal<string>;
|
19
19
|
placeholder: import("@angular/core").InputSignal<string>;
|
20
|
-
textPosition: import("@angular/core").InputSignal<"left" | "
|
20
|
+
textPosition: import("@angular/core").InputSignal<"left" | "center" | "right">;
|
21
21
|
minLength: import("@angular/core").InputSignal<string | number>;
|
22
22
|
maxLength: import("@angular/core").InputSignal<string | number>;
|
23
23
|
isInvalid: import("@angular/core").InputSignal<boolean>;
|
@@ -12,7 +12,7 @@ export declare class CoerTextarea extends ControlValue implements AfterViewInit,
|
|
12
12
|
value: import("@angular/core").InputSignal<string | number | null | undefined>;
|
13
13
|
label: import("@angular/core").InputSignal<string>;
|
14
14
|
placeholder: import("@angular/core").InputSignal<string>;
|
15
|
-
textPosition: import("@angular/core").InputSignal<"left" | "
|
15
|
+
textPosition: import("@angular/core").InputSignal<"left" | "center" | "right">;
|
16
16
|
minLength: import("@angular/core").InputSignal<string | number>;
|
17
17
|
maxLength: import("@angular/core").InputSignal<string | number>;
|
18
18
|
isInvalid: import("@angular/core").InputSignal<boolean>;
|
@@ -16,7 +16,7 @@ export declare class CoerTextBox extends ControlValue implements AfterViewInit,
|
|
16
16
|
value: import("@angular/core").InputSignal<string | number | null | undefined>;
|
17
17
|
label: import("@angular/core").InputSignal<string>;
|
18
18
|
placeholder: import("@angular/core").InputSignal<string>;
|
19
|
-
textPosition: import("@angular/core").InputSignal<"left" | "
|
19
|
+
textPosition: import("@angular/core").InputSignal<"left" | "center" | "right">;
|
20
20
|
minLength: import("@angular/core").InputSignal<string | number>;
|
21
21
|
maxLength: import("@angular/core").InputSignal<string | number>;
|
22
22
|
isInvalid: import("@angular/core").InputSignal<boolean>;
|
@@ -38,7 +38,7 @@ import * as i3$5 from '@angular/material/toolbar';
|
|
38
38
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
39
39
|
import * as i3$1 from '@angular/material/tooltip';
|
40
40
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
41
|
-
import { Tools, Strings, ControlValue, CONTROL_VALUE, HTMLElements, Dates, Screen, CoerAlert, Files,
|
41
|
+
import { Tools, Strings, ControlValue, CONTROL_VALUE, HTMLElements, Dates, Screen, CoerAlert, Files, Collections, Numbers, Source, Menu, Breadcrumbs } from 'coer-elements/tools';
|
42
42
|
import { breakpointSIGNAL, isModalOpenSIGNAL, colorsSIGNAL, menuSelectedSIGNAL, isMenuOpenSIGNAL, isLoadingSIGNAL, navigationSIGNAL } from 'coer-elements/signals';
|
43
43
|
import { Modal } from 'bootstrap';
|
44
44
|
|
@@ -1267,8 +1267,8 @@ class CoerGridExtension extends ControlValue {
|
|
1267
1267
|
/** */
|
1268
1268
|
_buildRow(data) {
|
1269
1269
|
let row = {};
|
1270
|
-
for (const
|
1271
|
-
row = { ...row, [
|
1270
|
+
for (const property of Collections.Distinct(Tools.GetPropertyList(data).concat(this.columns().map(x => x.property)))) {
|
1271
|
+
row = { ...row, [property]: data[property] || null };
|
1272
1272
|
}
|
1273
1273
|
return { ...row };
|
1274
1274
|
}
|
@@ -1558,43 +1558,35 @@ class CoerGridHeader {
|
|
1558
1558
|
this.onKeyupEnterSearch = output();
|
1559
1559
|
//computed
|
1560
1560
|
this._dataSourceExport = computed(() => {
|
1561
|
-
const _dataSource = this.dataSource();
|
1562
|
-
const _dataSourceSelected = this.dataSourceSelected();
|
1563
|
-
const _dataSourceFiltered = this.dataSourceFiltered();
|
1564
|
-
const _exportButton = this.exportButton();
|
1565
1561
|
//Get Data
|
1566
1562
|
let DATA_SOURCE = [];
|
1567
|
-
if (Tools.
|
1568
|
-
DATA_SOURCE =
|
1563
|
+
if (Tools.IsBooleanTrue(this.exportButton()?.onlySelectedItem)) {
|
1564
|
+
DATA_SOURCE = this.dataSourceSelected();
|
1569
1565
|
}
|
1570
1566
|
else {
|
1571
|
-
DATA_SOURCE = (Tools.
|
1572
|
-
?
|
1567
|
+
DATA_SOURCE = (Tools.IsBooleanTrue(this.exportButton()?.onlyRowFiltered))
|
1568
|
+
? this.dataSourceFiltered() : this.dataSource();
|
1573
1569
|
}
|
1574
1570
|
//Get Columns
|
1575
|
-
|
1576
|
-
if (Tools.
|
1577
|
-
for (const row of
|
1578
|
-
for (const
|
1579
|
-
if (
|
1571
|
+
let DATA_SOURCE_COLUMNS = new Set();
|
1572
|
+
if (Tools.IsBooleanFalse(this.exportButton()?.onlyColumnFiltered)) {
|
1573
|
+
for (const row of this.dataSource()) {
|
1574
|
+
for (const property in row) {
|
1575
|
+
if (property == 'indexRow')
|
1580
1576
|
continue;
|
1581
|
-
DATA_SOURCE_COLUMNS.add(Strings.FirstCharToLower(
|
1577
|
+
DATA_SOURCE_COLUMNS.add(Strings.FirstCharToLower(property));
|
1582
1578
|
}
|
1583
1579
|
}
|
1584
1580
|
}
|
1585
1581
|
else {
|
1586
|
-
|
1587
|
-
if (columnName == 'indexRow')
|
1588
|
-
continue;
|
1589
|
-
DATA_SOURCE_COLUMNS.add(Strings.FirstCharToLower(columnName));
|
1590
|
-
}
|
1582
|
+
DATA_SOURCE_COLUMNS = new Set(Collections.Except(this.columns().map(x => Strings.FirstCharToLower(x.property)), ['indexRow', 'checked']));
|
1591
1583
|
}
|
1592
1584
|
//Export Data
|
1593
1585
|
let item = {};
|
1594
1586
|
const DATA_SOURCE_EXPORT = [];
|
1595
1587
|
for (const row of DATA_SOURCE) {
|
1596
|
-
for (const
|
1597
|
-
item = Object.assign(item, { [this.GetColumnName()(
|
1588
|
+
for (const property of DATA_SOURCE_COLUMNS) {
|
1589
|
+
item = Object.assign(item, { [this.GetColumnName()(property)]: row[property] });
|
1598
1590
|
}
|
1599
1591
|
DATA_SOURCE_EXPORT.push(item);
|
1600
1592
|
item = Tools.BreakReference({});
|
@@ -1668,7 +1660,7 @@ class CoerGridHeader {
|
|
1668
1660
|
}
|
1669
1661
|
/** */
|
1670
1662
|
_Export() {
|
1671
|
-
this.Export(this.exportButton()?.preventDefault
|
1663
|
+
this.Export(Tools.IsNull(this.exportButton()?.preventDefault) || this.exportButton()?.preventDefault === false);
|
1672
1664
|
}
|
1673
1665
|
/** */
|
1674
1666
|
async Export(exportFile = true) {
|