@zambon-dev/ui 1.2.0 → 1.2.1
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 +40 -0
- package/fesm2022/zambon-dev-ui-library.mjs +49 -12
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-shared.mjs +6 -6
- package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/theme.css +5 -0
- package/types/zambon-dev-ui-library.d.ts +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -23,6 +23,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
23
23
|
|
|
24
24
|
### ⚠ Breaking Changes / Migration
|
|
25
25
|
|
|
26
|
+
## [1.2.1] - 2026-10-27
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **`--color-line-selected`**, the rule around a selected row. It is the rung of the selection
|
|
31
|
+
wash at full strength: `primary-200` in the light theme, `primary-300` in the dark one.
|
|
32
|
+
- **`DataGridRowComponent.rowIndex`**, the row's index in the data. The data grid sets it; the
|
|
33
|
+
zebra stripe follows it.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- **The multi-editor's add and remove buttons sit at the two ends of their row.** Add stays at
|
|
38
|
+
the start, where it always is. Remove lines up with the form's right edge, apart from add.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- **The sign-in card is centred on the screen, both ways.**
|
|
43
|
+
- _Horizontally:_ the login layout's wrapper was called `.container`, which is also a Tailwind
|
|
44
|
+
utility. An application that scans this package generates it, and it caps the width at each
|
|
45
|
+
breakpoint without centring, so on any screen wider than 1280px the card sat left of centre --
|
|
46
|
+
by 192px at 1920px. The wrapper is now `.login-container`.
|
|
47
|
+
- _Vertically:_ the card and the footer under it were centred as one block, which left the card
|
|
48
|
+
half a footer above the middle -- 28px on a laptop, where the footer wraps to two lines. The
|
|
49
|
+
footer now hangs below a card that is centred on its own. On a screen too short for both, the
|
|
50
|
+
card moves up first and the footer stays readable.
|
|
51
|
+
- **A selected grid row is framed in blue, not near-black.** The rule around it used the accent,
|
|
52
|
+
a fill colour, which as a 1px line around a pale wash read as black in the light theme. It now
|
|
53
|
+
uses `--color-line-selected`. The dark theme looks the same as before.
|
|
54
|
+
- **The multi-editor's buttons no longer split the pane in two.** Each sat in half of a grid, and a
|
|
55
|
+
`lib-button` keeps its own width, so add hugged the left of one half and remove began in the
|
|
56
|
+
middle and stopped short of the edge.
|
|
57
|
+
- **Grid stripes hold still while you scroll.** The zebra stripe was `:nth-child(even)` over the
|
|
58
|
+
rows the virtual scroll had rendered. That window moves, so whenever it moved by an odd number of
|
|
59
|
+
rows every stripe swapped -- on a long list, constantly. It now follows each row's index in the
|
|
60
|
+
data.
|
|
61
|
+
|
|
62
|
+
### ⚠ Breaking Changes / Migration
|
|
63
|
+
|
|
64
|
+
- None.
|
|
65
|
+
|
|
26
66
|
## [1.2.0] - 2026-10-27
|
|
27
67
|
|
|
28
68
|
### Added
|
|
@@ -3040,6 +3040,7 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
|
|
|
3040
3040
|
this._rowData = value;
|
|
3041
3041
|
this.refreshSelection();
|
|
3042
3042
|
}
|
|
3043
|
+
rowIndex = input(0, ...ngDevMode ? [{ debugName: "rowIndex" }] : /* istanbul ignore next */ []);
|
|
3043
3044
|
selectionResized = new EventEmitter();
|
|
3044
3045
|
setFocus() {
|
|
3045
3046
|
if (!this.disabled) {
|
|
@@ -3111,16 +3112,42 @@ var DataGridRowComponent = class DataGridRowComponent extends BaseComponent {
|
|
|
3111
3112
|
isStandalone: true,
|
|
3112
3113
|
selector: "lib-data-grid-row",
|
|
3113
3114
|
inputs: {
|
|
3114
|
-
disabled:
|
|
3115
|
-
|
|
3116
|
-
|
|
3115
|
+
disabled: {
|
|
3116
|
+
classPropertyName: "disabled",
|
|
3117
|
+
publicName: "disabled",
|
|
3118
|
+
isSignal: false,
|
|
3119
|
+
isRequired: false,
|
|
3120
|
+
transformFunction: null
|
|
3121
|
+
},
|
|
3122
|
+
isFirstRow: {
|
|
3123
|
+
classPropertyName: "isFirstRow",
|
|
3124
|
+
publicName: "isFirstRow",
|
|
3125
|
+
isSignal: false,
|
|
3126
|
+
isRequired: false,
|
|
3127
|
+
transformFunction: null
|
|
3128
|
+
},
|
|
3129
|
+
rowData: {
|
|
3130
|
+
classPropertyName: "rowData",
|
|
3131
|
+
publicName: "rowData",
|
|
3132
|
+
isSignal: false,
|
|
3133
|
+
isRequired: false,
|
|
3134
|
+
transformFunction: null
|
|
3135
|
+
},
|
|
3136
|
+
rowIndex: {
|
|
3137
|
+
classPropertyName: "rowIndex",
|
|
3138
|
+
publicName: "rowIndex",
|
|
3139
|
+
isSignal: true,
|
|
3140
|
+
isRequired: false,
|
|
3141
|
+
transformFunction: null
|
|
3142
|
+
}
|
|
3117
3143
|
},
|
|
3118
3144
|
outputs: { selectionResized: "selectionResized" },
|
|
3119
3145
|
host: {
|
|
3120
3146
|
listeners: { "click": "setFocus()" },
|
|
3121
3147
|
properties: {
|
|
3122
3148
|
"class.focused": "dataGridDataset.focusedRowKey === rowData",
|
|
3123
|
-
"class.selected": "dataGridDataset.isKeySelected(rowKey)"
|
|
3149
|
+
"class.selected": "dataGridDataset.isKeySelected(rowKey)",
|
|
3150
|
+
"class.striped": "rowIndex() % 2 === 1"
|
|
3124
3151
|
}
|
|
3125
3152
|
},
|
|
3126
3153
|
usesInheritance: true,
|
|
@@ -3197,7 +3224,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3197
3224
|
selector: "lib-data-grid-row",
|
|
3198
3225
|
host: {
|
|
3199
3226
|
"[class.focused]": "dataGridDataset.focusedRowKey === rowData",
|
|
3200
|
-
"[class.selected]": "dataGridDataset.isKeySelected(rowKey)"
|
|
3227
|
+
"[class.selected]": "dataGridDataset.isKeySelected(rowKey)",
|
|
3228
|
+
"[class.striped]": "rowIndex() % 2 === 1"
|
|
3201
3229
|
},
|
|
3202
3230
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3203
3231
|
imports: [
|
|
@@ -3215,6 +3243,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3215
3243
|
disabled: [{ type: Input }],
|
|
3216
3244
|
isFirstRow: [{ type: Input }],
|
|
3217
3245
|
rowData: [{ type: Input }],
|
|
3246
|
+
rowIndex: [{
|
|
3247
|
+
type: i0.Input,
|
|
3248
|
+
args: [{
|
|
3249
|
+
isSignal: true,
|
|
3250
|
+
alias: "rowIndex",
|
|
3251
|
+
required: false
|
|
3252
|
+
}]
|
|
3253
|
+
}],
|
|
3218
3254
|
selectionResized: [{ type: Output }],
|
|
3219
3255
|
setFocus: [{
|
|
3220
3256
|
type: HostListener,
|
|
@@ -3427,8 +3463,8 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
|
|
|
3427
3463
|
}],
|
|
3428
3464
|
usesInheritance: true,
|
|
3429
3465
|
ngImport: i0,
|
|
3430
|
-
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 [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 && (!hasLoadedRows || hasFailed())) {\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",
|
|
3431
|
-
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;background-color:var(--color-surface-solid);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}.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
|
|
3466
|
+
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 && (!hasLoadedRows || hasFailed())) {\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",
|
|
3467
|
+
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;background-color:var(--color-surface-solid);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}.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"],
|
|
3432
3468
|
dependencies: [
|
|
3433
3469
|
{
|
|
3434
3470
|
kind: "component",
|
|
@@ -3437,7 +3473,8 @@ var DataGridComponent = class DataGridComponent extends BaseComponent {
|
|
|
3437
3473
|
inputs: [
|
|
3438
3474
|
"disabled",
|
|
3439
3475
|
"isFirstRow",
|
|
3440
|
-
"rowData"
|
|
3476
|
+
"rowData",
|
|
3477
|
+
"rowIndex"
|
|
3441
3478
|
],
|
|
3442
3479
|
outputs: ["selectionResized"]
|
|
3443
3480
|
},
|
|
@@ -3503,8 +3540,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3503
3540
|
ScrollingModule,
|
|
3504
3541
|
TranslatePipe
|
|
3505
3542
|
],
|
|
3506
|
-
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 [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 && (!hasLoadedRows || hasFailed())) {\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",
|
|
3507
|
-
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;background-color:var(--color-surface-solid);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}.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
|
|
3543
|
+
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 && (!hasLoadedRows || hasFailed())) {\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",
|
|
3544
|
+
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;background-color:var(--color-surface-solid);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}.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"]
|
|
3508
3545
|
}]
|
|
3509
3546
|
}],
|
|
3510
3547
|
ctorParameters: () => [],
|
|
@@ -4354,7 +4391,7 @@ var MultiEditorComponent = class MultiEditorComponent extends ModalComponent {
|
|
|
4354
4391
|
usesInheritance: true,
|
|
4355
4392
|
ngImport: i0,
|
|
4356
4393
|
template: "<lib-modal\n [closeButtonText]=\"closeButtonText() | translate\"\n [dialog]=\"dialog()\"\n [modalProcessing]=\"modalProcessing()\"\n [position]=\"position()\"\n [size]=\"size()\"\n [title]=\"title() ?? ''\"\n>\n <!-- `.body-content` exists to be the query container and nothing else; `.panes` is the grid it\n controls. A grid cannot query itself, and the host is `display: contents` so it has no box\n of its own to contain anything. -->\n <div body class=\"body-content\">\n <div class=\"panes\">\n <div class=\"data-grid\">\n <lib-data-grid [disabled]=\"modalProcessing()\" [lazyLoadRows]=\"true\"></lib-data-grid>\n </div>\n\n <div class=\"data\">\n <div class=\"buttons\">\n @if (showAddButton()) {\n <lib-button\n intent=\"secondary\"\n [disabled]=\"modalProcessing() || gridLoading() || formLoading || formGroup().invalid\"\n (click)=\"onNewClick()\"\n >\n {{ addButtonLabel() }}\n </lib-button>\n }\n @if (showDeleteButton() && hasSelectedKey()) {\n <lib-button\n intent=\"danger\"\n [disabled]=\"modalProcessing() || gridLoading() || formLoading\"\n (click)=\"onDeleteClick()\"\n >\n {{ removeButtonLabel() }}\n </lib-button>\n }\n </div>\n\n <lib-form-group>\n <ng-content></ng-content>\n </lib-form-group>\n </div>\n </div>\n </div>\n\n <div footer>\n <lib-button\n intent=\"primary\"\n [disabled]=\"gridLoading() || formLoading\"\n [loading]=\"modalProcessing()\"\n (click)=\"onSaveClick()\"\n >\n {{ 'Button-Modal-MultiEditor-Confirm' | translate }}\n </lib-button>\n </div>\n</lib-modal>\n",
|
|
4357
|
-
styles: [":host{display:contents}.body-content{display:grid;height:100%;container-type:inline-size;container-name:modal-body}.panes{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:calc(var(--spacing, .25rem) * 4);overflow:clip;overflow-clip-margin:4px}.data-grid{display:grid;overflow:hidden;-webkit-user-select:none;user-select:none}.data{display:grid;-webkit-user-select:none;user-select:none;overflow:clip;overflow-clip-margin:4px;min-height:24rem;grid-template-rows:min-content minmax(0,1fr);gap:calc(var(--spacing, .25rem) * 2)}.data .buttons{display:
|
|
4394
|
+
styles: [":host{display:contents}.body-content{display:grid;height:100%;container-type:inline-size;container-name:modal-body}.panes{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:calc(var(--spacing, .25rem) * 4);overflow:clip;overflow-clip-margin:4px}.data-grid{display:grid;overflow:hidden;-webkit-user-select:none;user-select:none}.data{display:grid;-webkit-user-select:none;user-select:none;overflow:clip;overflow-clip-margin:4px;min-height:24rem;grid-template-rows:min-content minmax(0,1fr);gap:calc(var(--spacing, .25rem) * 2)}.data .buttons{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}@container modal-body (max-width: 36rem){.panes{grid-auto-flow:row;grid-template-rows:minmax(11rem,1fr) minmax(11rem,1fr)}.data-grid,.data{min-height:0px;overflow-y:auto}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
4358
4395
|
dependencies: [
|
|
4359
4396
|
{
|
|
4360
4397
|
kind: "component",
|
|
@@ -4430,7 +4467,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4430
4467
|
TranslatePipe
|
|
4431
4468
|
],
|
|
4432
4469
|
template: "<lib-modal\n [closeButtonText]=\"closeButtonText() | translate\"\n [dialog]=\"dialog()\"\n [modalProcessing]=\"modalProcessing()\"\n [position]=\"position()\"\n [size]=\"size()\"\n [title]=\"title() ?? ''\"\n>\n <!-- `.body-content` exists to be the query container and nothing else; `.panes` is the grid it\n controls. A grid cannot query itself, and the host is `display: contents` so it has no box\n of its own to contain anything. -->\n <div body class=\"body-content\">\n <div class=\"panes\">\n <div class=\"data-grid\">\n <lib-data-grid [disabled]=\"modalProcessing()\" [lazyLoadRows]=\"true\"></lib-data-grid>\n </div>\n\n <div class=\"data\">\n <div class=\"buttons\">\n @if (showAddButton()) {\n <lib-button\n intent=\"secondary\"\n [disabled]=\"modalProcessing() || gridLoading() || formLoading || formGroup().invalid\"\n (click)=\"onNewClick()\"\n >\n {{ addButtonLabel() }}\n </lib-button>\n }\n @if (showDeleteButton() && hasSelectedKey()) {\n <lib-button\n intent=\"danger\"\n [disabled]=\"modalProcessing() || gridLoading() || formLoading\"\n (click)=\"onDeleteClick()\"\n >\n {{ removeButtonLabel() }}\n </lib-button>\n }\n </div>\n\n <lib-form-group>\n <ng-content></ng-content>\n </lib-form-group>\n </div>\n </div>\n </div>\n\n <div footer>\n <lib-button\n intent=\"primary\"\n [disabled]=\"gridLoading() || formLoading\"\n [loading]=\"modalProcessing()\"\n (click)=\"onSaveClick()\"\n >\n {{ 'Button-Modal-MultiEditor-Confirm' | translate }}\n </lib-button>\n </div>\n</lib-modal>\n",
|
|
4433
|
-
styles: [":host{display:contents}.body-content{display:grid;height:100%;container-type:inline-size;container-name:modal-body}.panes{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:calc(var(--spacing, .25rem) * 4);overflow:clip;overflow-clip-margin:4px}.data-grid{display:grid;overflow:hidden;-webkit-user-select:none;user-select:none}.data{display:grid;-webkit-user-select:none;user-select:none;overflow:clip;overflow-clip-margin:4px;min-height:24rem;grid-template-rows:min-content minmax(0,1fr);gap:calc(var(--spacing, .25rem) * 2)}.data .buttons{display:
|
|
4470
|
+
styles: [":host{display:contents}.body-content{display:grid;height:100%;container-type:inline-size;container-name:modal-body}.panes{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:calc(var(--spacing, .25rem) * 4);overflow:clip;overflow-clip-margin:4px}.data-grid{display:grid;overflow:hidden;-webkit-user-select:none;user-select:none}.data{display:grid;-webkit-user-select:none;user-select:none;overflow:clip;overflow-clip-margin:4px;min-height:24rem;grid-template-rows:min-content minmax(0,1fr);gap:calc(var(--spacing, .25rem) * 2)}.data .buttons{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}@container modal-body (max-width: 36rem){.panes{grid-auto-flow:row;grid-template-rows:minmax(11rem,1fr) minmax(11rem,1fr)}.data-grid,.data{min-height:0px;overflow-y:auto}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
4434
4471
|
}]
|
|
4435
4472
|
}],
|
|
4436
4473
|
ctorParameters: () => [],
|