@zambon-dev/ui 1.6.0 → 1.7.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.
- package/CHANGELOG.md +21 -1
- package/fesm2022/zambon-dev-ui-framework.mjs +5 -1
- package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-library.mjs +202 -14
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
- package/i18n/framework/en.json +4 -0
- package/i18n/framework/pt.json +4 -0
- package/package.json +1 -1
- package/types/zambon-dev-ui-library.d.ts +133 -0
|
@@ -891,6 +891,131 @@ var RouterFormatter = class {
|
|
|
891
891
|
return parentRoute + path;
|
|
892
892
|
}
|
|
893
893
|
};
|
|
894
|
+
const DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
|
|
895
|
+
const TIME_ZONE_MARKER = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
896
|
+
function getGridColumnAlign(column) {
|
|
897
|
+
if (column.align) return column.align;
|
|
898
|
+
switch (column.type) {
|
|
899
|
+
case "number":
|
|
900
|
+
case "currency":
|
|
901
|
+
case "percent": return "end";
|
|
902
|
+
case "boolean": return "center";
|
|
903
|
+
default: return "start";
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
function isNumericGridColumn(column) {
|
|
907
|
+
return column.type === "number" || column.type === "currency" || column.type === "percent";
|
|
908
|
+
}
|
|
909
|
+
function formatGridCellValue(value, column, locale, defaults = {}) {
|
|
910
|
+
if (value === null || value === void 0 || value === "") return text("");
|
|
911
|
+
try {
|
|
912
|
+
switch (column.type) {
|
|
913
|
+
case "number": return formatNumber(value, column, locale);
|
|
914
|
+
case "currency": return formatCurrency(value, column, locale);
|
|
915
|
+
case "percent": return formatPercent(value, column, locale);
|
|
916
|
+
case "date":
|
|
917
|
+
case "datetime": return formatDate$1(value, column, locale);
|
|
918
|
+
case "boolean": return formatBoolean(value, column, defaults);
|
|
919
|
+
case "enum":
|
|
920
|
+
case "badge": return formatEnum(value, column);
|
|
921
|
+
default: return text(String(value));
|
|
922
|
+
}
|
|
923
|
+
} catch {
|
|
924
|
+
return text(String(value));
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
function text(value) {
|
|
928
|
+
return {
|
|
929
|
+
kind: "text",
|
|
930
|
+
text: value,
|
|
931
|
+
translate: false
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
function toNumber(value) {
|
|
935
|
+
if (typeof value === "number") return Number.isFinite(value) ? value : null;
|
|
936
|
+
if (typeof value === "string" && value.trim() !== "") {
|
|
937
|
+
const parsed = Number(value);
|
|
938
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
939
|
+
}
|
|
940
|
+
return null;
|
|
941
|
+
}
|
|
942
|
+
function fractionDigits(column, defaultMin) {
|
|
943
|
+
const digits = {};
|
|
944
|
+
if (column.decimals !== void 0) {
|
|
945
|
+
digits.minimumFractionDigits = column.minDecimals ?? defaultMin(column.decimals);
|
|
946
|
+
digits.maximumFractionDigits = Math.max(column.decimals, digits.minimumFractionDigits);
|
|
947
|
+
} else if (column.minDecimals !== void 0) digits.minimumFractionDigits = column.minDecimals;
|
|
948
|
+
return digits;
|
|
949
|
+
}
|
|
950
|
+
function formatNumber(value, column, locale) {
|
|
951
|
+
const number = toNumber(value);
|
|
952
|
+
if (number === null) return text(String(value));
|
|
953
|
+
return text(formatLocaleNumber(number, locale, {
|
|
954
|
+
minFractionDigits: column.minDecimals ?? 0,
|
|
955
|
+
maxFractionDigits: column.decimals ?? 2
|
|
956
|
+
}));
|
|
957
|
+
}
|
|
958
|
+
function formatCurrency(value, column, locale) {
|
|
959
|
+
const number = toNumber(value);
|
|
960
|
+
if (number === null) return text(String(value));
|
|
961
|
+
if (!column.currency) return text(formatLocaleNumber(number, locale, {
|
|
962
|
+
minFractionDigits: 2,
|
|
963
|
+
maxFractionDigits: 2
|
|
964
|
+
}));
|
|
965
|
+
return text(new Intl.NumberFormat(locale, {
|
|
966
|
+
style: "currency",
|
|
967
|
+
currency: column.currency,
|
|
968
|
+
...fractionDigits(column, (decimals) => decimals)
|
|
969
|
+
}).format(number));
|
|
970
|
+
}
|
|
971
|
+
function formatPercent(value, column, locale) {
|
|
972
|
+
const number = toNumber(value);
|
|
973
|
+
if (number === null) return text(String(value));
|
|
974
|
+
return text(new Intl.NumberFormat(locale, {
|
|
975
|
+
style: "percent",
|
|
976
|
+
...fractionDigits(column, () => 0)
|
|
977
|
+
}).format(number));
|
|
978
|
+
}
|
|
979
|
+
function parseCellDate(value, utc) {
|
|
980
|
+
if (!utc || typeof value !== "string") return parseIsoValue(value);
|
|
981
|
+
const trimmed = value.trim();
|
|
982
|
+
const parsed = parseIsoValue(trimmed);
|
|
983
|
+
if (!parsed || DATE_ONLY.test(trimmed) || TIME_ZONE_MARKER.test(trimmed)) return parsed;
|
|
984
|
+
return /* @__PURE__ */ new Date(parsed.getTime() - parsed.getTimezoneOffset() * 6e4);
|
|
985
|
+
}
|
|
986
|
+
function formatDate$1(value, column, locale) {
|
|
987
|
+
const date = parseCellDate(value, column.utc ?? false);
|
|
988
|
+
if (!date) return text(String(value));
|
|
989
|
+
const dateText = formatDateText(date, locale);
|
|
990
|
+
return text(column.type === "datetime" ? `${dateText} ${formatTimeText(date, locale)}` : dateText);
|
|
991
|
+
}
|
|
992
|
+
function formatBoolean(value, column, defaults) {
|
|
993
|
+
let checked;
|
|
994
|
+
if (value === true || typeof value === "string" && value.toLowerCase() === "true") checked = true;
|
|
995
|
+
else if (value === false || typeof value === "string" && value.toLowerCase() === "false") checked = false;
|
|
996
|
+
else return text(String(value));
|
|
997
|
+
const hiddenText = (checked ? column.trueText ?? defaults.trueText : column.falseText ?? defaults.falseText) ?? "";
|
|
998
|
+
return {
|
|
999
|
+
kind: "boolean",
|
|
1000
|
+
text: hiddenText,
|
|
1001
|
+
translate: hiddenText !== "",
|
|
1002
|
+
checked
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
function formatEnum(value, column) {
|
|
1006
|
+
const key = String(value);
|
|
1007
|
+
const translationKey = column.enumValues && Object.prototype.hasOwnProperty.call(column.enumValues, key) ? column.enumValues[key] : void 0;
|
|
1008
|
+
const display = translationKey !== void 0 ? {
|
|
1009
|
+
kind: "text",
|
|
1010
|
+
text: translationKey,
|
|
1011
|
+
translate: true
|
|
1012
|
+
} : text(key);
|
|
1013
|
+
if (column.type === "badge") {
|
|
1014
|
+
display.kind = "badge";
|
|
1015
|
+
display.intent = column.badgeIntents?.[key] ?? "neutral";
|
|
1016
|
+
}
|
|
1017
|
+
return display;
|
|
1018
|
+
}
|
|
894
1019
|
var CatalogService = class CatalogService {
|
|
895
1020
|
http = inject(HttpClient);
|
|
896
1021
|
search(endpoint, maxResults, criteria, filters = null) {
|
|
@@ -1068,6 +1193,7 @@ var GridConfigsProvider = class GridConfigsProvider {
|
|
|
1068
1193
|
this._configs = {
|
|
1069
1194
|
loadingDisplayText: "Loading...",
|
|
1070
1195
|
messageOnEmpty: "No results",
|
|
1196
|
+
messageOnFailed: "The records could not be loaded.",
|
|
1071
1197
|
recordBlockSize: 100,
|
|
1072
1198
|
rowHeight: 41.6,
|
|
1073
1199
|
rowsToDisplay: 6
|
|
@@ -4795,6 +4921,7 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
|
|
|
4795
4921
|
selected = signal(false, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
4796
4922
|
_rowData;
|
|
4797
4923
|
elementRef = inject(ElementRef);
|
|
4924
|
+
localeService = inject(LocaleService);
|
|
4798
4925
|
get rowData() {
|
|
4799
4926
|
return this._rowData;
|
|
4800
4927
|
}
|
|
@@ -4834,8 +4961,21 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
|
|
|
4834
4961
|
if (this.selected()) this.dataGridDataset.selectRow(this.rowKey);
|
|
4835
4962
|
else this.dataGridDataset.deselectRow(this.rowKey);
|
|
4836
4963
|
}
|
|
4964
|
+
alignOf(column) {
|
|
4965
|
+
return getGridColumnAlign(column);
|
|
4966
|
+
}
|
|
4967
|
+
formatCell(column) {
|
|
4968
|
+
const configs = this.dataGridDataset.configs;
|
|
4969
|
+
return formatGridCellValue(this.getValue(column.field), column, this.localeService.locale(), {
|
|
4970
|
+
trueText: configs.booleanTrueText ?? "Yes",
|
|
4971
|
+
falseText: configs.booleanFalseText ?? "No"
|
|
4972
|
+
});
|
|
4973
|
+
}
|
|
4974
|
+
isNumeric(column) {
|
|
4975
|
+
return isNumericGridColumn(column);
|
|
4976
|
+
}
|
|
4837
4977
|
getValue(field) {
|
|
4838
|
-
return field.split(".").reduce((value, field) => value[field], this.rowData);
|
|
4978
|
+
return field.split(".").reduce((value, field) => value?.[field], this.rowData);
|
|
4839
4979
|
}
|
|
4840
4980
|
refreshSelection() {
|
|
4841
4981
|
this.selected.set(this.isRowDataSelected);
|
|
@@ -4895,9 +5035,19 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
|
|
|
4895
5035
|
},
|
|
4896
5036
|
usesInheritance: true,
|
|
4897
5037
|
ngImport: i0,
|
|
4898
|
-
template: "<!-- A <label> rather than a clickable <div>: clicking anywhere in the cell still\nreaches the checkbox, natively. The click handler is a mouse-only convenience;\nthe keyboard path is the nested checkbox, which is focusable and toggles with\nSpace on its own. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"cell selection\" (click)=\"onToggleSelection()\" (onResize)=\"onResizeSelection($event)\">\n <!-- Null, not false: an attribute binding writes disabled=\"false\" for false, and any value at\n all disables a control, so every checkbox rendered disabled and faded. -->\n <input class=\"form-input\" type=\"checkbox\" [attr.disabled]=\"disabled ? true : null\" [(ngModel)]=\"selected\" />\n </label>\n}\n@for (column of columns; track column; let i = $index) {\n <div
|
|
4899
|
-
styles: [":host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center}.spacer{position:absolute;inset:0;z-index:-1;height:0px}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
5038
|
+
template: "<!-- A <label> rather than a clickable <div>: clicking anywhere in the cell still\nreaches the checkbox, natively. The click handler is a mouse-only convenience;\nthe keyboard path is the nested checkbox, which is focusable and toggles with\nSpace on its own. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"cell selection\" (click)=\"onToggleSelection()\" (onResize)=\"onResizeSelection($event)\">\n <!-- Null, not false: an attribute binding writes disabled=\"false\" for false, and any value at\n all disables a control, so every checkbox rendered disabled and faded. -->\n <input class=\"form-input\" type=\"checkbox\" [attr.disabled]=\"disabled ? true : null\" [(ngModel)]=\"selected\" />\n </label>\n}\n@for (column of columns; track column; let i = $index) {\n <div\n #cell\n class=\"cell\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [class.disabled]=\"disabled\"\n [class.numeric]=\"isNumeric(column)\"\n [ngClass]=\"column.customClass\"\n >\n @if (isFirstRow) {\n <div class=\"spacer\" (onResize)=\"onResize(i, $event)\"></div>\n }\n <ng-container\n *ngTemplateOutlet=\"\n column.template ? column.template : simpleTemplate;\n context: { rowData: rowData, column: column }\n \"\n >\n </ng-container>\n </div>\n}\n\n<!-- A column without a template. The column's type decides the formatting; with no type the\nvalue shows as it is. The translate pipe sits only in the branches that hold a translation key, so a\nplain cell renders as it always did. -->\n<ng-template #simpleTemplate let-column=\"column\">\n @let cell = formatCell(column);\n @switch (cell.kind) {\n @case ('boolean') {\n @if (cell.checked) {\n <i class=\"fa-solid fa-check\" aria-hidden=\"true\"></i>\n }\n @if (cell.translate) {\n <span class=\"visually-hidden\">{{ cell.text | translate }}</span>\n }\n }\n @case ('badge') {\n <lib-badge [intent]=\"cell.intent ?? 'neutral'\">\n @if (cell.translate) {\n {{ cell.text | translate }}\n } @else {\n {{ cell.text }}\n }\n </lib-badge>\n }\n @default {\n @if (cell.translate) {\n <span>{{ cell.text | translate }}</span>\n } @else {\n <span>{{ cell.text }}</span>\n }\n }\n }\n</ng-template>\n",
|
|
5039
|
+
styles: [":host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center}.cell.align-center{text-align:center}.cell.align-end{text-align:end}.cell.numeric{font-variant-numeric:tabular-nums}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.spacer{position:absolute;inset:0;z-index:-1;height:0px}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
4900
5040
|
dependencies: [
|
|
5041
|
+
{
|
|
5042
|
+
kind: "component",
|
|
5043
|
+
type: BadgeComponent,
|
|
5044
|
+
selector: "lib-badge",
|
|
5045
|
+
inputs: [
|
|
5046
|
+
"intent",
|
|
5047
|
+
"icon",
|
|
5048
|
+
"dot"
|
|
5049
|
+
]
|
|
5050
|
+
},
|
|
4901
5051
|
{
|
|
4902
5052
|
kind: "ngmodule",
|
|
4903
5053
|
type: FormsModule
|
|
@@ -4951,6 +5101,11 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
|
|
|
4951
5101
|
selector: "[onResize]",
|
|
4952
5102
|
inputs: ["resizeBoxModel"],
|
|
4953
5103
|
outputs: ["onResize"]
|
|
5104
|
+
},
|
|
5105
|
+
{
|
|
5106
|
+
kind: "pipe",
|
|
5107
|
+
type: TranslatePipe,
|
|
5108
|
+
name: "translate"
|
|
4954
5109
|
}
|
|
4955
5110
|
],
|
|
4956
5111
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
@@ -4972,13 +5127,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4972
5127
|
},
|
|
4973
5128
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4974
5129
|
imports: [
|
|
5130
|
+
BadgeComponent,
|
|
4975
5131
|
FormsModule,
|
|
4976
5132
|
NgClass,
|
|
4977
5133
|
NgTemplateOutlet,
|
|
4978
|
-
NgxResizeObserverModule
|
|
5134
|
+
NgxResizeObserverModule,
|
|
5135
|
+
TranslatePipe
|
|
4979
5136
|
],
|
|
4980
|
-
template: "<!-- A <label> rather than a clickable <div>: clicking anywhere in the cell still\nreaches the checkbox, natively. The click handler is a mouse-only convenience;\nthe keyboard path is the nested checkbox, which is focusable and toggles with\nSpace on its own. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"cell selection\" (click)=\"onToggleSelection()\" (onResize)=\"onResizeSelection($event)\">\n <!-- Null, not false: an attribute binding writes disabled=\"false\" for false, and any value at\n all disables a control, so every checkbox rendered disabled and faded. -->\n <input class=\"form-input\" type=\"checkbox\" [attr.disabled]=\"disabled ? true : null\" [(ngModel)]=\"selected\" />\n </label>\n}\n@for (column of columns; track column; let i = $index) {\n <div
|
|
4981
|
-
styles: [":host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center}.spacer{position:absolute;inset:0;z-index:-1;height:0px}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
5137
|
+
template: "<!-- A <label> rather than a clickable <div>: clicking anywhere in the cell still\nreaches the checkbox, natively. The click handler is a mouse-only convenience;\nthe keyboard path is the nested checkbox, which is focusable and toggles with\nSpace on its own. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"cell selection\" (click)=\"onToggleSelection()\" (onResize)=\"onResizeSelection($event)\">\n <!-- Null, not false: an attribute binding writes disabled=\"false\" for false, and any value at\n all disables a control, so every checkbox rendered disabled and faded. -->\n <input class=\"form-input\" type=\"checkbox\" [attr.disabled]=\"disabled ? true : null\" [(ngModel)]=\"selected\" />\n </label>\n}\n@for (column of columns; track column; let i = $index) {\n <div\n #cell\n class=\"cell\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [class.disabled]=\"disabled\"\n [class.numeric]=\"isNumeric(column)\"\n [ngClass]=\"column.customClass\"\n >\n @if (isFirstRow) {\n <div class=\"spacer\" (onResize)=\"onResize(i, $event)\"></div>\n }\n <ng-container\n *ngTemplateOutlet=\"\n column.template ? column.template : simpleTemplate;\n context: { rowData: rowData, column: column }\n \"\n >\n </ng-container>\n </div>\n}\n\n<!-- A column without a template. The column's type decides the formatting; with no type the\nvalue shows as it is. The translate pipe sits only in the branches that hold a translation key, so a\nplain cell renders as it always did. -->\n<ng-template #simpleTemplate let-column=\"column\">\n @let cell = formatCell(column);\n @switch (cell.kind) {\n @case ('boolean') {\n @if (cell.checked) {\n <i class=\"fa-solid fa-check\" aria-hidden=\"true\"></i>\n }\n @if (cell.translate) {\n <span class=\"visually-hidden\">{{ cell.text | translate }}</span>\n }\n }\n @case ('badge') {\n <lib-badge [intent]=\"cell.intent ?? 'neutral'\">\n @if (cell.translate) {\n {{ cell.text | translate }}\n } @else {\n {{ cell.text }}\n }\n </lib-badge>\n }\n @default {\n @if (cell.translate) {\n <span>{{ cell.text | translate }}</span>\n } @else {\n <span>{{ cell.text }}</span>\n }\n }\n }\n</ng-template>\n",
|
|
5138
|
+
styles: [":host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center}.cell.align-center{text-align:center}.cell.align-end{text-align:end}.cell.numeric{font-variant-numeric:tabular-nums}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.spacer{position:absolute;inset:0;z-index:-1;height:0px}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
4982
5139
|
}]
|
|
4983
5140
|
}],
|
|
4984
5141
|
ctorParameters: () => [],
|
|
@@ -5001,6 +5158,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5001
5158
|
}]
|
|
5002
5159
|
}
|
|
5003
5160
|
});
|
|
5161
|
+
const DEFAULT_TOTAL_ROWS_TEXT = "{{ count }} records";
|
|
5162
|
+
const DEFAULT_TOTAL_ROW_TEXT = "{{ count }} record";
|
|
5004
5163
|
var DataGridComponent = class DataGridComponent extends BaseComponent {
|
|
5005
5164
|
bodyElement = viewChild("body", ...ngDevMode ? [{ debugName: "bodyElement" }] : /* istanbul ignore next */ []);
|
|
5006
5165
|
viewport = viewChild(CdkVirtualScrollViewport, ...ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []);
|
|
@@ -5017,6 +5176,7 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
|
|
|
5017
5176
|
gridRoute = "";
|
|
5018
5177
|
isGridCurrentUrl = false;
|
|
5019
5178
|
lastPosition = 0;
|
|
5179
|
+
localeService = inject(LocaleService);
|
|
5020
5180
|
ngZone = inject(NgZone);
|
|
5021
5181
|
router = inject(Router);
|
|
5022
5182
|
selectionColRealSize;
|
|
@@ -5063,6 +5223,17 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
|
|
|
5063
5223
|
get selectionColWidth() {
|
|
5064
5224
|
return this.selectionColRealSize ? `${this.selectionColRealSize}px` : this.configs.multiSelectSize ?? "min-content";
|
|
5065
5225
|
}
|
|
5226
|
+
get shouldShowTotalRows() {
|
|
5227
|
+
const totalRows = this.dataGridDataset.totalRows;
|
|
5228
|
+
return (this.configs.showTotalRows ?? false) && typeof totalRows === "number";
|
|
5229
|
+
}
|
|
5230
|
+
get formattedTotalRows() {
|
|
5231
|
+
return formatLocaleNumber(this.dataGridDataset.totalRows ?? 0, this.localeService.locale(), { maxFractionDigits: 0 });
|
|
5232
|
+
}
|
|
5233
|
+
get totalRowsText() {
|
|
5234
|
+
if (this.dataGridDataset.totalRows === 1) return this.configs.totalRowText ?? DEFAULT_TOTAL_ROW_TEXT;
|
|
5235
|
+
return this.configs.totalRowsText ?? DEFAULT_TOTAL_ROWS_TEXT;
|
|
5236
|
+
}
|
|
5066
5237
|
get shouldDisplayMessageWhenEmpty() {
|
|
5067
5238
|
return this.dataGridDataset?.configs?.showMessageOnEmpty ?? true;
|
|
5068
5239
|
}
|
|
@@ -5141,6 +5312,12 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
|
|
|
5141
5312
|
onSelectionResized(newSize) {
|
|
5142
5313
|
if (this.selectionColRealSize != newSize) this.selectionColRealSize = newSize;
|
|
5143
5314
|
}
|
|
5315
|
+
alignOf(column) {
|
|
5316
|
+
return getGridColumnAlign(column);
|
|
5317
|
+
}
|
|
5318
|
+
fillCount(text) {
|
|
5319
|
+
return text.replace(/\{\{\s*count\s*\}\}/g, this.formattedTotalRows);
|
|
5320
|
+
}
|
|
5144
5321
|
isFirstVisibleRow(rowIndex) {
|
|
5145
5322
|
const renderedRange = this.viewport()?.getRenderedRange();
|
|
5146
5323
|
if (renderedRange) return rowIndex === renderedRange.start;
|
|
@@ -5190,7 +5367,10 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
|
|
|
5190
5367
|
transformFunction: null
|
|
5191
5368
|
}
|
|
5192
5369
|
},
|
|
5193
|
-
host: { properties: {
|
|
5370
|
+
host: { properties: {
|
|
5371
|
+
"class.no-borders": "showButtons()",
|
|
5372
|
+
"class.hide-borders": "configs.hideBorders === true"
|
|
5373
|
+
} },
|
|
5194
5374
|
viewQueries: [{
|
|
5195
5375
|
propertyName: "bodyElement",
|
|
5196
5376
|
first: true,
|
|
@@ -5206,8 +5386,8 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
|
|
|
5206
5386
|
}],
|
|
5207
5387
|
usesInheritance: true,
|
|
5208
5388
|
ngImport: i0,
|
|
5209
|
-
template: "@if (showButtons()) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<div class=\"header\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin()\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div class=\"header-row\" [style.transform]=\"headerScrollLeft() ? 'translateX(-' + headerScrollLeft() + 'px)' : null\">\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n \n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n @for (column of columns; track column) {\n <div\n class=\"header-cell\"\n [ngStyle]=\"{\n display: column.realSize === 0 ? 'none' : null,\n 'width.px': column.realSize ?? null,\n }\"\n >\n <span>{{ column.headerName | translate }}</span>\n </div>\n }\n </div>\n</div>\n\n<div #body class=\"body\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport [itemSize]=\"configs.rowHeight\" [style.grid-template-columns]=\"gridColumns\">\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled()\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [rowIndex]=\"i\"\n [style.height.px]=\"configs.rowHeight\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n @if (loading()) {\n <div class=\"loading\" [style.height.px]=\"configs.rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading() && !hasBeenLoaded && lazyLoadRows()) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n @if (!loading() && hasBeenLoaded &&
|
|
5210
|
-
styles: ["@charset \"UTF-8\";@layer properties;:host{display:flex;flex-direction:column;overflow:hidden;-webkit-user-select:none;user-select:none}:host:not(.no-borders){border-style:var(--tw-border-style);border-width:1px;
|
|
5389
|
+
template: "@if (showButtons()) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<div class=\"header\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin()\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div class=\"header-row\" [style.transform]=\"headerScrollLeft() ? 'translateX(-' + headerScrollLeft() + 'px)' : null\">\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n \n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n @for (column of columns; track column) {\n <div\n class=\"header-cell\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [ngStyle]=\"{\n display: column.realSize === 0 ? 'none' : null,\n 'width.px': column.realSize ?? null,\n }\"\n >\n <span>{{ column.headerName | translate }}</span>\n </div>\n }\n </div>\n</div>\n\n<div #body class=\"body\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport [itemSize]=\"configs.rowHeight\" [style.grid-template-columns]=\"gridColumns\">\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled()\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [rowIndex]=\"i\"\n [style.height.px]=\"configs.rowHeight\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n @if (loading()) {\n <div class=\"loading\" [style.height.px]=\"configs.rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading() && !hasBeenLoaded && !hasFailed() && lazyLoadRows()) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n <!-- A failed load shows its message even when no load has succeeded yet: the first one failing\n used to leave the grid blank. -->\n @if (!loading() && (hasFailed() || (hasBeenLoaded && !hasLoadedRows))) {\n @if (!hasFailed() && !hasLoadedRows && hasMessageToDisplayWhenEmpty && shouldDisplayMessageWhenEmpty) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenEmpty | translate }}\n </span>\n </div>\n }\n @if (hasFailed()) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n <i class=\"fas fa-exclamation-triangle mr-2 text-yellow-600\"></i>{{ messageToDisplayWhenFailed | translate }}\n </span>\n </div>\n }\n }\n </cdk-virtual-scroll-viewport>\n</div>\n\n@if (shouldShowTotalRows) {\n <div class=\"footer\">\n {{ fillCount(totalRowsText | translate: { count: formattedTotalRows }) }}\n </div>\n}\n",
|
|
5390
|
+
styles: ["@charset \"UTF-8\";@layer properties;:host{display:flex;flex-direction:column;overflow:hidden;-webkit-user-select:none;user-select:none}:host:not(.no-borders){background-color:var(--color-surface-solid)}:host:not(.no-borders):not(.hide-borders){border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-line);border-radius:var(--surface-radius, .5rem)}:host.no-borders .header .header-row{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .body lib-data-grid-row{padding-block:var(--spacing, .25rem)}.header-row,lib-data-grid-row,.loading,.message{gap:calc(var(--spacing, .25rem) * 4);padding-inline:calc(var(--spacing, .25rem) * 4)}.header{overflow:hidden;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);background-color:color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent);border-color:var(--color-line)}@supports (color: color-mix(in lab,red,red)){.header{background-color:color-mix(in srgb,var(--color-content-primary) 14%,transparent)}}.header.hide{display:none}.header .header-row{display:flex;flex-direction:row;padding-block:calc(var(--spacing, .25rem) * 3)}.header .header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header .header-cell:not(.selection){flex:none}.header .header-cell.align-center{text-align:center}.header .header-cell.align-end{text-align:end}.footer{overflow:hidden;border-top-style:var(--tw-border-style);border-top-width:1px;padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1.5);text-overflow:ellipsis;white-space:nowrap;border-color:var(--color-line);color:var(--color-content-secondary);font-size:var(--text-caption);font-variant-numeric:tabular-nums}.body{position:relative;flex-grow:1}.body cdk-virtual-scroll-viewport{position:absolute;inset:0}.body cdk-virtual-scroll-viewport ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;grid-template-columns:inherit}.body lib-data-grid-row{margin-top:-1px;cursor:pointer;border-block-style:var(--tw-border-style);border-block-width:1px;padding-block:calc(var(--spacing, .25rem) * 2);border-color:var(--color-line)}.body lib-data-grid-row.striped{background-color:var(--state-hover)}.body lib-data-grid-row:hover{background-color:var(--state-selected)}.body lib-data-grid-row.focused{z-index:1;border-color:var(--color-line-strong)}.body lib-data-grid-row.selected{position:relative;z-index:10;background-color:var(--state-selected);border-color:var(--color-line-selected)}.body lib-data-grid-row.selected:hover{background-color:var(--state-selected)}.body .loading,.body .message{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);white-space:nowrap;height:calc(var(--spacing, .25rem) * 10);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-line);grid-column:1 / -1}.body .loading span,.body .message span{overflow:hidden;text-overflow:ellipsis}.body .loading svg{height:calc(var(--spacing, .25rem) * 6);min-height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);min-width:calc(var(--spacing, .25rem) * 6);animation:var(--animate-spin, spin 1s linear infinite);transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));transition-duration:var(--duration-short);transition-timing-function:var(--ease-standard)}.buttons{display:flex;border-top-style:var(--tw-border-style);border-top-width:1px;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:var(--spacing, .25rem);border-color:var(--color-line)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
5211
5391
|
dependencies: [
|
|
5212
5392
|
{
|
|
5213
5393
|
kind: "component",
|
|
@@ -5276,15 +5456,18 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5276
5456
|
type: Component,
|
|
5277
5457
|
args: [{
|
|
5278
5458
|
selector: "lib-data-grid",
|
|
5279
|
-
host: {
|
|
5459
|
+
host: {
|
|
5460
|
+
"[class.no-borders]": "showButtons()",
|
|
5461
|
+
"[class.hide-borders]": "configs.hideBorders === true"
|
|
5462
|
+
},
|
|
5280
5463
|
imports: [
|
|
5281
5464
|
DataGridRowComponent,
|
|
5282
5465
|
NgStyle,
|
|
5283
5466
|
ScrollingModule,
|
|
5284
5467
|
TranslatePipe
|
|
5285
5468
|
],
|
|
5286
|
-
template: "@if (showButtons()) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<div class=\"header\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin()\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div class=\"header-row\" [style.transform]=\"headerScrollLeft() ? 'translateX(-' + headerScrollLeft() + 'px)' : null\">\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n \n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n @for (column of columns; track column) {\n <div\n class=\"header-cell\"\n [ngStyle]=\"{\n display: column.realSize === 0 ? 'none' : null,\n 'width.px': column.realSize ?? null,\n }\"\n >\n <span>{{ column.headerName | translate }}</span>\n </div>\n }\n </div>\n</div>\n\n<div #body class=\"body\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport [itemSize]=\"configs.rowHeight\" [style.grid-template-columns]=\"gridColumns\">\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled()\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [rowIndex]=\"i\"\n [style.height.px]=\"configs.rowHeight\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n @if (loading()) {\n <div class=\"loading\" [style.height.px]=\"configs.rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading() && !hasBeenLoaded && lazyLoadRows()) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n @if (!loading() && hasBeenLoaded &&
|
|
5287
|
-
styles: ["@charset \"UTF-8\";@layer properties;:host{display:flex;flex-direction:column;overflow:hidden;-webkit-user-select:none;user-select:none}:host:not(.no-borders){border-style:var(--tw-border-style);border-width:1px;
|
|
5469
|
+
template: "@if (showButtons()) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<div class=\"header\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin()\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div class=\"header-row\" [style.transform]=\"headerScrollLeft() ? 'translateX(-' + headerScrollLeft() + 'px)' : null\">\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n \n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n @for (column of columns; track column) {\n <div\n class=\"header-cell\"\n [class.align-center]=\"alignOf(column) === 'center'\"\n [class.align-end]=\"alignOf(column) === 'end'\"\n [ngStyle]=\"{\n display: column.realSize === 0 ? 'none' : null,\n 'width.px': column.realSize ?? null,\n }\"\n >\n <span>{{ column.headerName | translate }}</span>\n </div>\n }\n </div>\n</div>\n\n<div #body class=\"body\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport [itemSize]=\"configs.rowHeight\" [style.grid-template-columns]=\"gridColumns\">\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled()\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [rowIndex]=\"i\"\n [style.height.px]=\"configs.rowHeight\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n @if (loading()) {\n <div class=\"loading\" [style.height.px]=\"configs.rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading() && !hasBeenLoaded && !hasFailed() && lazyLoadRows()) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n <!-- A failed load shows its message even when no load has succeeded yet: the first one failing\n used to leave the grid blank. -->\n @if (!loading() && (hasFailed() || (hasBeenLoaded && !hasLoadedRows))) {\n @if (!hasFailed() && !hasLoadedRows && hasMessageToDisplayWhenEmpty && shouldDisplayMessageWhenEmpty) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenEmpty | translate }}\n </span>\n </div>\n }\n @if (hasFailed()) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n <i class=\"fas fa-exclamation-triangle mr-2 text-yellow-600\"></i>{{ messageToDisplayWhenFailed | translate }}\n </span>\n </div>\n }\n }\n </cdk-virtual-scroll-viewport>\n</div>\n\n@if (shouldShowTotalRows) {\n <div class=\"footer\">\n {{ fillCount(totalRowsText | translate: { count: formattedTotalRows }) }}\n </div>\n}\n",
|
|
5470
|
+
styles: ["@charset \"UTF-8\";@layer properties;:host{display:flex;flex-direction:column;overflow:hidden;-webkit-user-select:none;user-select:none}:host:not(.no-borders){background-color:var(--color-surface-solid)}:host:not(.no-borders):not(.hide-borders){border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-line);border-radius:var(--surface-radius, .5rem)}:host.no-borders .header .header-row{padding-block:calc(var(--spacing, .25rem) * 1.5)}:host.no-borders .body lib-data-grid-row{padding-block:var(--spacing, .25rem)}.header-row,lib-data-grid-row,.loading,.message{gap:calc(var(--spacing, .25rem) * 4);padding-inline:calc(var(--spacing, .25rem) * 4)}.header{overflow:hidden;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);background-color:color-mix(in srgb,oklch(21% .034 264.665) 14%,transparent);border-color:var(--color-line)}@supports (color: color-mix(in lab,red,red)){.header{background-color:color-mix(in srgb,var(--color-content-primary) 14%,transparent)}}.header.hide{display:none}.header .header-row{display:flex;flex-direction:row;padding-block:calc(var(--spacing, .25rem) * 3)}.header .header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header .header-cell:not(.selection){flex:none}.header .header-cell.align-center{text-align:center}.header .header-cell.align-end{text-align:end}.footer{overflow:hidden;border-top-style:var(--tw-border-style);border-top-width:1px;padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 1.5);text-overflow:ellipsis;white-space:nowrap;border-color:var(--color-line);color:var(--color-content-secondary);font-size:var(--text-caption);font-variant-numeric:tabular-nums}.body{position:relative;flex-grow:1}.body cdk-virtual-scroll-viewport{position:absolute;inset:0}.body cdk-virtual-scroll-viewport ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;grid-template-columns:inherit}.body lib-data-grid-row{margin-top:-1px;cursor:pointer;border-block-style:var(--tw-border-style);border-block-width:1px;padding-block:calc(var(--spacing, .25rem) * 2);border-color:var(--color-line)}.body lib-data-grid-row.striped{background-color:var(--state-hover)}.body lib-data-grid-row:hover{background-color:var(--state-selected)}.body lib-data-grid-row.focused{z-index:1;border-color:var(--color-line-strong)}.body lib-data-grid-row.selected{position:relative;z-index:10;background-color:var(--state-selected);border-color:var(--color-line-selected)}.body lib-data-grid-row.selected:hover{background-color:var(--state-selected)}.body .loading,.body .message{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);white-space:nowrap;height:calc(var(--spacing, .25rem) * 10);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-line);grid-column:1 / -1}.body .loading span,.body .message span{overflow:hidden;text-overflow:ellipsis}.body .loading svg{height:calc(var(--spacing, .25rem) * 6);min-height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);min-width:calc(var(--spacing, .25rem) * 6);animation:var(--animate-spin, spin 1s linear infinite);transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));transition-duration:var(--duration-short);transition-timing-function:var(--ease-standard)}.buttons{display:flex;border-top-style:var(--tw-border-style);border-top-width:1px;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:var(--spacing, .25rem);border-color:var(--color-line)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
5288
5471
|
}]
|
|
5289
5472
|
}],
|
|
5290
5473
|
ctorParameters: () => [],
|
|
@@ -8132,7 +8315,12 @@ var DataGridConfigsProvider = class DataGridConfigsProvider extends GridConfigsP
|
|
|
8132
8315
|
this._configs = {
|
|
8133
8316
|
...this._configs,
|
|
8134
8317
|
multiSelect: false,
|
|
8135
|
-
multiSelectSize: "min-content"
|
|
8318
|
+
multiSelectSize: "min-content",
|
|
8319
|
+
showTotalRows: false,
|
|
8320
|
+
totalRowsText: "{{ count }} records",
|
|
8321
|
+
totalRowText: "{{ count }} record",
|
|
8322
|
+
booleanTrueText: "Yes",
|
|
8323
|
+
booleanFalseText: "No"
|
|
8136
8324
|
};
|
|
8137
8325
|
}
|
|
8138
8326
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -8220,6 +8408,6 @@ var DateValidators = class {
|
|
|
8220
8408
|
};
|
|
8221
8409
|
}
|
|
8222
8410
|
};
|
|
8223
|
-
export { BadgeComponent, BaseComponent, BaseDataset, ButtonComponent, CalendarComponent, CatalogSelectComponent, CatalogService, DataGridComponent, DataGridConfigsProvider, DataGridDataset, DataGridRowComponent, DataProviderService, DateHelpers, DateInputComponent, DateValidators, DisplayControls, EnumTranslatePipe, FormGroupComponent, FormGroupService, FormInputComponent, FormInputGroupComponent, FormService, GridConfigsProvider, GridDataset, GroupAccordionComponent, GroupContainerComponent, GroupScrollSpyComponent, GuidHelper, LibraryModule, LocaleService, ModalComponent, MultiEditorComponent, MultiEditorDataset, MultiSelectComponent, MultiSelectResultDataset, MultiSelectResultGridComponent, NumberInputComponent, ReplaceManyPipe, ReplacePipe, RibbonButtonComponent, RibbonComponent, RibbonGroupChild, RibbonGroupComponent, RouterFormatter, SIDEBAR_CONFIGS, ScrollSpyDirective, SidebarComponent, SidebarConfigs, SidebarMenu, SidebarMenuOpenMode, SidebarService, SkeletonComponent, TooltipDirective, formatDateText, formatLocaleNumber, formatTimeText, getDatePattern, getFirstDayOfWeek, getNumberSeparators, isValidLocale, parseDateText, parseDigitsInfo, parseIsoValue, parseLocaleNumber, parseTimeText, toIsoDate, toIsoDateTime, toSidebarMenuOpenMode, uses12HourClock };
|
|
8411
|
+
export { BadgeComponent, BaseComponent, BaseDataset, ButtonComponent, CalendarComponent, CatalogSelectComponent, CatalogService, DataGridComponent, DataGridConfigsProvider, DataGridDataset, DataGridRowComponent, DataProviderService, DateHelpers, DateInputComponent, DateValidators, DisplayControls, EnumTranslatePipe, FormGroupComponent, FormGroupService, FormInputComponent, FormInputGroupComponent, FormService, GridConfigsProvider, GridDataset, GroupAccordionComponent, GroupContainerComponent, GroupScrollSpyComponent, GuidHelper, LibraryModule, LocaleService, ModalComponent, MultiEditorComponent, MultiEditorDataset, MultiSelectComponent, MultiSelectResultDataset, MultiSelectResultGridComponent, NumberInputComponent, ReplaceManyPipe, ReplacePipe, RibbonButtonComponent, RibbonComponent, RibbonGroupChild, RibbonGroupComponent, RouterFormatter, SIDEBAR_CONFIGS, ScrollSpyDirective, SidebarComponent, SidebarConfigs, SidebarMenu, SidebarMenuOpenMode, SidebarService, SkeletonComponent, TooltipDirective, formatDateText, formatGridCellValue, formatLocaleNumber, formatTimeText, getDatePattern, getFirstDayOfWeek, getGridColumnAlign, getNumberSeparators, isNumericGridColumn, isValidLocale, parseDateText, parseDigitsInfo, parseIsoValue, parseLocaleNumber, parseTimeText, toIsoDate, toIsoDateTime, toSidebarMenuOpenMode, uses12HourClock };
|
|
8224
8412
|
|
|
8225
8413
|
//# sourceMappingURL=zambon-dev-ui-library.mjs.map
|