@nanahoshi/mona-ui 0.1.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.
Files changed (134) hide show
  1. package/README.md +25 -0
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +590 -0
  3. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +168 -0
  4. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +220 -0
  5. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +225 -0
  6. package/fesm2022/nanahoshi-mona-ui-button.mjs +497 -0
  7. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +1569 -0
  8. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +339 -0
  9. package/fesm2022/nanahoshi-mona-ui-chip.mjs +453 -0
  10. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +200 -0
  11. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +853 -0
  12. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +923 -0
  13. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +495 -0
  14. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +686 -0
  15. package/fesm2022/nanahoshi-mona-ui-common.mjs +642 -0
  16. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +485 -0
  17. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +132 -0
  18. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +460 -0
  19. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +659 -0
  20. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +828 -0
  21. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +523 -0
  22. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +615 -0
  23. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +701 -0
  24. package/fesm2022/nanahoshi-mona-ui-editor.mjs +1400 -0
  25. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +245 -0
  26. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +170 -0
  27. package/fesm2022/nanahoshi-mona-ui-filter.mjs +680 -0
  28. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs +105 -0
  29. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs +42 -0
  30. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +130 -0
  31. package/fesm2022/nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs +773 -0
  32. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +240 -0
  33. package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs +5374 -0
  34. package/fesm2022/nanahoshi-mona-ui-grid.mjs +2 -0
  35. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +87 -0
  36. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +154 -0
  37. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1356 -0
  38. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2263 -0
  39. package/fesm2022/nanahoshi-mona-ui-internal.mjs +379 -0
  40. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +630 -0
  41. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +527 -0
  42. package/fesm2022/nanahoshi-mona-ui-list.mjs +4 -0
  43. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +966 -0
  44. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +641 -0
  45. package/fesm2022/nanahoshi-mona-ui-notification.mjs +536 -0
  46. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +597 -0
  47. package/fesm2022/nanahoshi-mona-ui-pager.mjs +790 -0
  48. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +83 -0
  49. package/fesm2022/nanahoshi-mona-ui-popover.mjs +325 -0
  50. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +1559 -0
  51. package/fesm2022/nanahoshi-mona-ui-popup.mjs +1321 -0
  52. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +294 -0
  53. package/fesm2022/nanahoshi-mona-ui-query.mjs +175 -0
  54. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +339 -0
  55. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +565 -0
  56. package/fesm2022/nanahoshi-mona-ui-slider.mjs +1049 -0
  57. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +636 -0
  58. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +843 -0
  59. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +537 -0
  60. package/fesm2022/nanahoshi-mona-ui-switch.mjs +308 -0
  61. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +664 -0
  62. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +111 -0
  63. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +369 -0
  64. package/fesm2022/nanahoshi-mona-ui-theme.mjs +314 -0
  65. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +450 -0
  66. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +723 -0
  67. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +716 -0
  68. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +733 -0
  69. package/fesm2022/nanahoshi-mona-ui-window.mjs +1329 -0
  70. package/fesm2022/nanahoshi-mona-ui.mjs +9 -0
  71. package/package.json +289 -0
  72. package/types/nanahoshi-mona-ui-auto-complete.d.ts +223 -0
  73. package/types/nanahoshi-mona-ui-avatar.d.ts +642 -0
  74. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +70 -0
  75. package/types/nanahoshi-mona-ui-button-group.d.ts +77 -0
  76. package/types/nanahoshi-mona-ui-button.d.ts +111 -0
  77. package/types/nanahoshi-mona-ui-calendar.d.ts +262 -0
  78. package/types/nanahoshi-mona-ui-check-box.d.ts +133 -0
  79. package/types/nanahoshi-mona-ui-chip.d.ts +130 -0
  80. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +113 -0
  81. package/types/nanahoshi-mona-ui-color-gradient.d.ts +201 -0
  82. package/types/nanahoshi-mona-ui-color-palette.d.ts +102 -0
  83. package/types/nanahoshi-mona-ui-color-picker.d.ts +156 -0
  84. package/types/nanahoshi-mona-ui-combo-box.d.ts +232 -0
  85. package/types/nanahoshi-mona-ui-common.d.ts +386 -0
  86. package/types/nanahoshi-mona-ui-contextmenu.d.ts +129 -0
  87. package/types/nanahoshi-mona-ui-date-input.d.ts +60 -0
  88. package/types/nanahoshi-mona-ui-date-picker.d.ts +177 -0
  89. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +199 -0
  90. package/types/nanahoshi-mona-ui-dialog.d.ts +261 -0
  91. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +159 -0
  92. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +219 -0
  93. package/types/nanahoshi-mona-ui-dropdowns.d.ts +176 -0
  94. package/types/nanahoshi-mona-ui-editor.d.ts +113 -0
  95. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +87 -0
  96. package/types/nanahoshi-mona-ui-fieldset.d.ts +68 -0
  97. package/types/nanahoshi-mona-ui-filter.d.ts +115 -0
  98. package/types/nanahoshi-mona-ui-grid.d.ts +1114 -0
  99. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +25 -0
  100. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +28 -0
  101. package/types/nanahoshi-mona-ui-internal-list.d.ts +269 -0
  102. package/types/nanahoshi-mona-ui-internal-tree.d.ts +391 -0
  103. package/types/nanahoshi-mona-ui-internal.d.ts +136 -0
  104. package/types/nanahoshi-mona-ui-list-box.d.ts +225 -0
  105. package/types/nanahoshi-mona-ui-list-view.d.ts +188 -0
  106. package/types/nanahoshi-mona-ui-list.d.ts +1 -0
  107. package/types/nanahoshi-mona-ui-menubar.d.ts +198 -0
  108. package/types/nanahoshi-mona-ui-multi-select.d.ts +247 -0
  109. package/types/nanahoshi-mona-ui-notification.d.ts +106 -0
  110. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +161 -0
  111. package/types/nanahoshi-mona-ui-pager.d.ts +238 -0
  112. package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -0
  113. package/types/nanahoshi-mona-ui-popover.d.ts +130 -0
  114. package/types/nanahoshi-mona-ui-popup-menu.d.ts +412 -0
  115. package/types/nanahoshi-mona-ui-popup.d.ts +485 -0
  116. package/types/nanahoshi-mona-ui-progress-bar.d.ts +139 -0
  117. package/types/nanahoshi-mona-ui-query.d.ts +89 -0
  118. package/types/nanahoshi-mona-ui-radio-button.d.ts +128 -0
  119. package/types/nanahoshi-mona-ui-scroll-view.d.ts +166 -0
  120. package/types/nanahoshi-mona-ui-slider.d.ts +305 -0
  121. package/types/nanahoshi-mona-ui-split-button.d.ts +182 -0
  122. package/types/nanahoshi-mona-ui-splitter.d.ts +70 -0
  123. package/types/nanahoshi-mona-ui-stepper.d.ts +173 -0
  124. package/types/nanahoshi-mona-ui-switch.d.ts +125 -0
  125. package/types/nanahoshi-mona-ui-tabs.d.ts +158 -0
  126. package/types/nanahoshi-mona-ui-text-area.d.ts +42 -0
  127. package/types/nanahoshi-mona-ui-text-box.d.ts +164 -0
  128. package/types/nanahoshi-mona-ui-theme.d.ts +23 -0
  129. package/types/nanahoshi-mona-ui-time-picker.d.ts +184 -0
  130. package/types/nanahoshi-mona-ui-time-selector.d.ts +143 -0
  131. package/types/nanahoshi-mona-ui-tooltip.d.ts +130 -0
  132. package/types/nanahoshi-mona-ui-tree-view.d.ts +274 -0
  133. package/types/nanahoshi-mona-ui-window.d.ts +295 -0
  134. package/types/nanahoshi-mona-ui.d.ts +2 -0
@@ -0,0 +1,105 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { ImmutableDictionary } from '@mirei/ts-collections';
5
+ import { c as GridService } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs';
6
+
7
+ class GridFooterCellComponent {
8
+ constructor() {
9
+ this.#gridService = inject(GridService);
10
+ this.aggregate = computed(() => {
11
+ const field = this.column().field;
12
+ const groupKey = this.groupKey();
13
+ if (groupKey == null) {
14
+ return this.aggregateMap().get(field) ?? null;
15
+ }
16
+ return this.#gridService.groupAggregateMap().get(groupKey)?.aggregates.get(field) ?? null;
17
+ }, /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "aggregate" }] : /* istanbul ignore next */ []));
19
+ this.aggregateMap = computed(() => {
20
+ const groupKey = this.groupKey();
21
+ if (groupKey == null) {
22
+ return this.#gridService.aggregateMap();
23
+ }
24
+ return (this.#gridService.groupAggregateMap().get(groupKey)?.aggregates ??
25
+ ImmutableDictionary.create());
26
+ }, /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "aggregateMap" }] : /* istanbul ignore next */ []));
28
+ this.displayValue = computed(() => {
29
+ return this.#gridService.resolveAggregateValue(this.aggregate(), this.column().aggregate);
30
+ }, /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
32
+ this.templateContext = computed(() => {
33
+ const column = this.column();
34
+ const columnIndex = this.columnIndex();
35
+ const aggregate = this.aggregate();
36
+ const aggregates = this.aggregateMap().toObject(e => e.key, e => e.value);
37
+ const value = this.displayValue();
38
+ const groupKey = this.groupKey();
39
+ if (groupKey == null) {
40
+ return {
41
+ $implicit: value,
42
+ aggregate,
43
+ aggregates,
44
+ column,
45
+ columnIndex,
46
+ rows: this.#gridService.aggregateRows()
47
+ };
48
+ }
49
+ const groupFooterAggregate = this.#gridService.groupAggregateMap().get(groupKey);
50
+ return {
51
+ $implicit: value,
52
+ aggregate,
53
+ aggregates,
54
+ column,
55
+ columnIndex,
56
+ count: groupFooterAggregate?.count ?? 0,
57
+ depth: groupFooterAggregate?.depth ?? 0,
58
+ groupKey,
59
+ groupValue: groupFooterAggregate?.groupValue,
60
+ rows: groupFooterAggregate?.rows ?? []
61
+ };
62
+ }, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "templateContext" }] : /* istanbul ignore next */ []));
64
+ this.templateRef = computed(() => {
65
+ if (this.groupKey() != null) {
66
+ return this.column().groupFooterTemplate;
67
+ }
68
+ return this.column().footerTemplate;
69
+ }, /* @ts-ignore */
70
+ ...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
71
+ this.column = input.required(/* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "column" }] : /* istanbul ignore next */ []));
73
+ this.columnIndex = input.required(/* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "columnIndex" }] : /* istanbul ignore next */ []));
75
+ this.groupKey = input(null, /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "groupKey" }] : /* istanbul ignore next */ []));
77
+ }
78
+ #gridService;
79
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFooterCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
80
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridFooterCellComponent, isStandalone: true, selector: "mona-grid-footer-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, columnIndex: { classPropertyName: "columnIndex", publicName: "columnIndex", isSignal: true, isRequired: true, transformFunction: null }, groupKey: { classPropertyName: "groupKey", publicName: "groupKey", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
81
+ @if (templateRef(); as templateRef) {
82
+ <ng-container [ngTemplateOutlet]="templateRef" [ngTemplateOutletContext]="templateContext()"></ng-container>
83
+ } @else if (displayValue() != null) {
84
+ <span class="block truncate font-medium">{{ displayValue() }}</span>
85
+ }
86
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
87
+ }
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFooterCellComponent, decorators: [{
89
+ type: Component,
90
+ args: [{
91
+ selector: "mona-grid-footer-cell",
92
+ template: `
93
+ @if (templateRef(); as templateRef) {
94
+ <ng-container [ngTemplateOutlet]="templateRef" [ngTemplateOutletContext]="templateContext()"></ng-container>
95
+ } @else if (displayValue() != null) {
96
+ <span class="block truncate font-medium">{{ displayValue() }}</span>
97
+ }
98
+ `,
99
+ changeDetection: ChangeDetectionStrategy.OnPush,
100
+ imports: [NgTemplateOutlet]
101
+ }]
102
+ }], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], columnIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnIndex", required: true }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }] } });
103
+
104
+ export { GridFooterCellComponent };
105
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs.map
@@ -0,0 +1,42 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, computed, input, Directive } from '@angular/core';
3
+ import { ThemeService } from '@nanahoshi/mona-ui/theme';
4
+ import { v as gridFooterTableCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs';
5
+
6
+ class GridFooterTableCellDirective {
7
+ constructor() {
8
+ this.#themeService = inject(ThemeService);
9
+ this.className = computed(() => {
10
+ const theme = this.#themeService.theme();
11
+ return gridFooterTableCellThemeVariants(theme)();
12
+ }, /* @ts-ignore */
13
+ ...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
14
+ this.minWidth = computed(() => this.footerColumn()?.minWidth ?? this.footerCellMinWidth(), /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "minWidth" }] : /* istanbul ignore next */ []));
16
+ this.width = computed(() => this.footerColumn()?.calculatedWidth ?? this.footerCellWidth(), /* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
18
+ this.footerCellMinWidth = input(null, /* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "footerCellMinWidth" }] : /* istanbul ignore next */ []));
20
+ this.footerCellWidth = input(null, /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "footerCellWidth" }] : /* istanbul ignore next */ []));
22
+ this.footerColumn = input(null, /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "footerColumn" }] : /* istanbul ignore next */ []));
24
+ }
25
+ #themeService;
26
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFooterTableCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
27
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridFooterTableCellDirective, isStandalone: true, selector: "td[monaGridFooterTableCell]", inputs: { footerCellMinWidth: { classPropertyName: "footerCellMinWidth", publicName: "footerCellMinWidth", isSignal: true, isRequired: false, transformFunction: null }, footerCellWidth: { classPropertyName: "footerCellWidth", publicName: "footerCellWidth", isSignal: true, isRequired: false, transformFunction: null }, footerColumn: { classPropertyName: "footerColumn", publicName: "footerColumn", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()", "style.width.px": "width()", "style.min-width.px": "minWidth()" } }, ngImport: i0 }); }
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFooterTableCellDirective, decorators: [{
30
+ type: Directive,
31
+ args: [{
32
+ selector: "td[monaGridFooterTableCell]",
33
+ host: {
34
+ "[class]": "className()",
35
+ "[style.width.px]": "width()",
36
+ "[style.min-width.px]": "minWidth()"
37
+ }
38
+ }]
39
+ }], propDecorators: { footerCellMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellMinWidth", required: false }] }], footerCellWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellWidth", required: false }] }], footerColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerColumn", required: false }] }] } });
40
+
41
+ export { GridFooterTableCellDirective };
42
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs.map
@@ -0,0 +1,130 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, DestroyRef, ElementRef, viewChild, computed, input, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
+ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
6
+ import { SlicePipe } from '@nanahoshi/mona-ui/common';
7
+ import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
8
+ import { ThemeService } from '@nanahoshi/mona-ui/theme';
9
+ import { ImmutableList, ImmutableSet, span } from '@mirei/ts-collections';
10
+ import { fromEvent } from 'rxjs';
11
+ import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs';
12
+ import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs';
13
+ import { G as GridNavigationService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, b as gridFooterTableRowThemeVariants, c as GridService, d as gridGroupRowThemeVariants, e as gridListTableThemeVariants, f as GridLogicalCellDirective, h as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs';
14
+ import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs';
15
+
16
+ class GridListComponent {
17
+ #destroyRef;
18
+ #gridNavigationService;
19
+ #hostElementRef;
20
+ #rowFlattener;
21
+ #themeService;
22
+ constructor() {
23
+ this.#destroyRef = inject(DestroyRef);
24
+ this.#gridNavigationService = inject(GridNavigationService);
25
+ this.#hostElementRef = inject((ElementRef));
26
+ this.#rowFlattener = inject(GridRowFlattenerService);
27
+ this.#themeService = inject(ThemeService);
28
+ this.bodyTableElementRef = viewChild.required("bodyTable", /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "bodyTableElementRef" }] : /* istanbul ignore next */ []));
30
+ this.baseClass = computed(() => {
31
+ const theme = this.#themeService.theme();
32
+ return gridListBaseThemeVariants(theme)({ virtual: false });
33
+ }, /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
35
+ this.flattenedGroupedRows = computed(() => {
36
+ const groupColumns = this.gridService.groupColumns();
37
+ if (groupColumns.length === 0) {
38
+ return [];
39
+ }
40
+ const collapsedKeys = new Set(this.gridService.collapsedGroupKeys());
41
+ const groupAggregateDict = this.gridService.groupAggregateMap().toDictionary(e => e.key, e => e.value);
42
+ const showFooter = this.gridService.groupableOptions().showFooter;
43
+ return this.#rowFlattener.flatten(this.data(), groupColumns, collapsedKeys, showFooter, groupAggregateDict);
44
+ }, /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "flattenedGroupedRows" }] : /* istanbul ignore next */ []));
46
+ this.footerTableRowClass = computed(() => {
47
+ const theme = this.#themeService.theme();
48
+ return gridFooterTableRowThemeVariants(theme)();
49
+ }, /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "footerTableRowClass" }] : /* istanbul ignore next */ []));
51
+ this.gridService = inject(GridService);
52
+ this.groupRowClass = computed(() => {
53
+ const theme = this.#themeService.theme();
54
+ return gridGroupRowThemeVariants(theme)();
55
+ }, /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "groupRowClass" }] : /* istanbul ignore next */ []));
57
+ this.tableClass = computed(() => {
58
+ const theme = this.#themeService.theme();
59
+ return gridListTableThemeVariants(theme)();
60
+ }, /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "tableClass" }] : /* istanbul ignore next */ []));
62
+ this.columns = input(ImmutableList.create(), /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
64
+ this.data = input(ImmutableSet.create(), /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
66
+ this.span = span;
67
+ afterNextRender({
68
+ read: () => {
69
+ const bodyTableElement = this.bodyTableElementRef().nativeElement;
70
+ const bodyScrollElement = this.#hostElementRef.nativeElement;
71
+ this.gridService.bodyTableElement.set(bodyTableElement);
72
+ this.gridService.bodyScrollElement.set(bodyScrollElement);
73
+ this.setSubscriptions();
74
+ this.#destroyRef.onDestroy(() => {
75
+ if (this.gridService.bodyTableElement() === bodyTableElement) {
76
+ this.gridService.bodyTableElement.set(null);
77
+ }
78
+ if (this.gridService.bodyScrollElement() === bodyScrollElement) {
79
+ this.gridService.bodyScrollElement.set(null);
80
+ }
81
+ });
82
+ }
83
+ });
84
+ }
85
+ onGridRowClick(event, row) {
86
+ this.gridService.handleRowClick(event, row);
87
+ }
88
+ onGroupExpandChange(groupKey) {
89
+ this.gridService.toggleGroupCollapse(groupKey);
90
+ }
91
+ onToggleDetailClick(row) {
92
+ const expanded = this.gridService.isRowExpanded(row);
93
+ this.gridService.setRowExpanded(row, !expanded);
94
+ }
95
+ setSubscriptions() {
96
+ fromEvent(this.#hostElementRef.nativeElement, "focus")
97
+ .pipe(takeUntilDestroyed(this.#destroyRef))
98
+ .subscribe(() => {
99
+ this.#gridNavigationService.focusActiveCellOrFirstHeader();
100
+ });
101
+ }
102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
103
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridListComponent, isStandalone: true, selector: "mona-grid-list", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, viewQueries: [{ propertyName: "bodyTableElementRef", first: true, predicate: ["bodyTable"], descendants: true, isSignal: true }], ngImport: i0, template: "<table #bodyTable [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\r\n <colgroup>\r\n @for (_ of gridService.groupColumns(); track $index) {\r\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\r\n }\r\n @if (gridService.masterDetailTemplate()) {\r\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\r\n }\r\n @for (col of columns(); track $index) {\r\n <col [style.width.px]=\"col.calculatedWidth\" />\r\n }\r\n </colgroup>\r\n <tbody role=\"rowgroup\">\r\n @if (gridService.addRowVisible()) {\r\n <tr monaGridAddRow [columns]=\"columns()\"></tr>\r\n }\r\n @if (gridService.groupColumns().length === 0) {\r\n @for (row of data(); track row.uid) {\r\n @let rowIndex = $index;\r\n <tr\r\n (click)=\"onGridRowClick($event, row)\"\r\n monaGridRow\r\n [index]=\"rowIndex\"\r\n [row]=\"row\"\r\n #gridRow=\"monaGridRow\"\r\n #rowElement>\r\n @if (gridService.masterDetailTemplate()) {\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedStructuralOffset]=\"0\"\r\n [masterDetailToggle]=\"true\"\r\n monaGridLogicalCell\r\n [cellKind]=\"'detail'\"\r\n [colIndex]=\"0\"\r\n [firstInRow]=\"true\"\r\n [lastInRow]=\"columns().length === 0\"\r\n [rowIndex]=\"rowIndex\"\r\n [rowUid]=\"row.uid\"\r\n [section]=\"'body'\"\r\n [style.width.px]=\"gridService.detailColumnWidth\"\r\n [attr.colspan]=\"1\">\r\n <span class=\"flex h-full w-full items-stretch justify-center\">\r\n <mona-grid-toggle\r\n [expanded]=\"gridRow.expanded()\"\r\n [type]=\"'detail'\"\r\n [width]=\"gridService.detailColumnWidth\"\r\n (expandedChange)=\"onToggleDetailClick(row)\"></mona-grid-toggle>\r\n </span>\r\n </td>\r\n }\r\n @for (column of columns(); track $index) {\r\n @let colIndex = gridService.masterDetailTemplate() ? $index + 1 : $index;\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [column]=\"column\"\r\n [dataCell]=\"true\"\r\n monaGridLogicalCell\r\n [cellKind]=\"column.kind\"\r\n [colIndex]=\"colIndex\"\r\n [columnId]=\"column.id\"\r\n [rowIndex]=\"rowIndex\"\r\n [rowUid]=\"row.uid\"\r\n [section]=\"'body'\"\r\n [firstInRow]=\"colIndex === 0\"\r\n [lastInRow]=\"colIndex === columns().length - (gridService.masterDetailTemplate() ? 0 : 1)\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"column.calculatedWidth\"\r\n [style.min-width.px]=\"column.minWidth\"\r\n (edit)=\"gridCell.handleLogicalCellEnter()\">\r\n <mona-grid-cell #gridCell [column]=\"column\" [row]=\"row\"></mona-grid-cell>\r\n </td>\r\n }\r\n @if (gridService.contextMenuItems().length !== 0) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"contextMenuTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row.data, element: rowElement, index: $index }\">\r\n </ng-container>\r\n }\r\n </tr>\r\n @if (gridRow.expanded()) {\r\n <tr monaGridDetailRow [style.width.px]=\"gridService.masterDetailRowWidth()\">\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedStructuralOffset]=\"0\"\r\n [indentCell]=\"true\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"gridService.masterDetailEmptyCellWidth()\"></td>\r\n <td monaGridCell [masterDetailContent]=\"true\" [attr.colspan]=\"columns().length\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"gridService.masterDetailTemplate()\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row.data }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n } @else {\r\n @for (viewRow of flattenedGroupedRows(); track $index) {\r\n @let rowIndex = $index;\r\n @if (viewRow.type === \"group\") {\r\n @let isCollapsed = gridService.isGroupCollapsed(viewRow.groupKey);\r\n @let prevRow = flattenedGroupedRows()[rowIndex - 1];\r\n\r\n <tr\r\n [class]=\"groupRowClass()\"\r\n role=\"row\"\r\n [attr.aria-level]=\"viewRow.depth + 1\"\r\n [attr.aria-expanded]=\"!isCollapsed\">\r\n @for (_ of gridService.groupColumns() | monaSlice: 0 : viewRow.depth; track $index) {\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\r\n [grouped]=\"true\"\r\n [indentCell]=\"true\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\r\n }\r\n @let colspan =\r\n columns().length +\r\n gridService.groupColumns().length +\r\n (gridService.masterDetailTemplate() ? 1 : 0) -\r\n viewRow.depth +\r\n 1;\r\n\r\n <td\r\n monaGridCell\r\n monaGridLogicalCell\r\n [cellKind]=\"'group'\"\r\n [rowIndex]=\"rowIndex\"\r\n [colIndex]=\"0\"\r\n [section]=\"'body'\"\r\n [grouped]=\"true\"\r\n [groupHeader]=\"true\"\r\n [prevRowType]=\"prevRow?.type\"\r\n [firstInRow]=\"true\"\r\n [lastInRow]=\"columns().length === 0\"\r\n [groupKey]=\"viewRow.groupKey\"\r\n (toggle)=\"onGroupExpandChange(viewRow.groupKey)\"\r\n [attr.colspan]=\"colspan\">\r\n <p class=\"flex h-full items-center text-sm whitespace-nowrap\">\r\n <mona-grid-toggle\r\n [expanded]=\"!isCollapsed\"\r\n [width]=\"gridService.groupColumnWidth\"\r\n [type]=\"'group'\"\r\n (expandedChange)=\"onGroupExpandChange(viewRow.groupKey)\"></mona-grid-toggle>\r\n <span class=\"font-bold\">{{ viewRow.title }}: {{ viewRow.groupValue }}</span>\r\n </p>\r\n </td>\r\n </tr>\r\n } @else if (viewRow.type === \"groupFooter\") {\r\n <tr role=\"row\" [class]=\"footerTableRowClass()\">\r\n @for (_ of gridService.groupColumns(); track $index) {\r\n <td\r\n monaGridFooterTableCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\r\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\r\n }\r\n @if (gridService.masterDetailTemplate()) {\r\n <td\r\n monaGridFooterTableCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"\r\n gridService.groupColumns().length * gridService.groupColumnWidth\r\n \"\r\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\r\n }\r\n @for (column of columns(); track $index) {\r\n <td\r\n monaGridFooterTableCell\r\n monaGridLockedCell\r\n [column]=\"column\"\r\n [lockedCellHeader]=\"true\"\r\n [footerColumn]=\"column\">\r\n <mona-grid-footer-cell\r\n [column]=\"column\"\r\n [columnIndex]=\"$index\"\r\n [groupKey]=\"viewRow.groupAggregate.groupKey\"></mona-grid-footer-cell>\r\n </td>\r\n }\r\n </tr>\r\n } @else {\r\n @let nextRow = flattenedGroupedRows()[rowIndex + 1];\r\n @let prevRow = flattenedGroupedRows()[rowIndex - 1];\r\n <tr\r\n (click)=\"onGridRowClick($event, viewRow.row)\"\r\n monaGridRow\r\n [index]=\"rowIndex\"\r\n [row]=\"viewRow.row\"\r\n #gridRow=\"monaGridRow\"\r\n #rowElement>\r\n @for (_ of gridService.groupColumns(); track $index) {\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\r\n [grouped]=\"true\"\r\n [indentCell]=\"true\"\r\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\r\n }\r\n\r\n @if (gridService.masterDetailTemplate()) {\r\n <td\r\n monaGridCell\r\n monaGridLogicalCell\r\n monaGridLockedCell\r\n [lockedStructuralOffset]=\"\r\n gridService.groupColumns().length * gridService.groupColumnWidth\r\n \"\r\n [grouped]=\"true\"\r\n [masterDetailToggle]=\"true\"\r\n [prevRowType]=\"prevRow?.type\"\r\n [nextRowType]=\"nextRow?.type\"\r\n [rowIndex]=\"rowIndex\"\r\n [rowUid]=\"viewRow.row.uid\"\r\n [section]=\"'body'\"\r\n [cellKind]=\"'detail'\"\r\n [colIndex]=\"0\"\r\n [firstInRow]=\"true\"\r\n [lastInRow]=\"columns().length === 0\"\r\n [style.width.px]=\"gridService.detailColumnWidth\">\r\n <span class=\"flex h-full w-full items-stretch justify-center\">\r\n <mona-grid-toggle\r\n [expanded]=\"gridRow.expanded()\"\r\n [type]=\"'detail'\"\r\n [width]=\"gridService.detailColumnWidth\"\r\n (expandedChange)=\"onToggleDetailClick(viewRow.row)\"></mona-grid-toggle>\r\n </span>\r\n </td>\r\n }\r\n @for (column of columns(); track $index) {\r\n @let colIndex = gridService.masterDetailTemplate() ? $index + 1 : $index;\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [column]=\"column\"\r\n [grouped]=\"true\"\r\n [dataCell]=\"true\"\r\n [prevRowType]=\"prevRow?.type\"\r\n [nextRowType]=\"nextRow?.type\"\r\n monaGridLogicalCell\r\n [cellKind]=\"column.kind\"\r\n [colIndex]=\"colIndex\"\r\n [columnId]=\"column.id\"\r\n [firstInRow]=\"colIndex === 0\"\r\n [lastInRow]=\"\r\n colIndex === columns().length - (gridService.masterDetailTemplate() ? 0 : 1)\r\n \"\r\n [rowIndex]=\"rowIndex\"\r\n [rowUid]=\"viewRow.row.uid\"\r\n [section]=\"'body'\"\r\n [style.width.px]=\"column.calculatedWidth\"\r\n [style.min-width.px]=\"column.minWidth\"\r\n (edit)=\"gridCell.handleLogicalCellEnter()\">\r\n <mona-grid-cell #gridCell [column]=\"column\" [row]=\"viewRow.row\"></mona-grid-cell>\r\n </td>\r\n }\r\n @if (gridService.contextMenuItems().length !== 0) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"contextMenuTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: viewRow.row.data,\r\n element: rowElement,\r\n index: rowIndex\r\n }\">\r\n </ng-container>\r\n }\r\n </tr>\r\n @if (gridRow.expanded()) {\r\n <tr monaGridDetailRow [style.width.px]=\"gridService.masterDetailRowWidth()\">\r\n @for (_ of gridService.groupColumns() | monaSlice: 0 : viewRow.depth + 1; track $index) {\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\r\n [grouped]=\"true\"\r\n [indentCell]=\"true\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\r\n }\r\n @let colspan = columns().length + gridService.groupColumns().length - 1;\r\n <td\r\n monaGridDetailIndentCell\r\n monaGridLockedCell\r\n [lockedStructuralOffset]=\"(viewRow.depth + 1) * gridService.groupColumnWidth\"\r\n [nextRowType]=\"nextRow?.type\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"gridService.masterDetailEmptyCellWidth()\"></td>\r\n <td monaGridDetailContentCell [nextRowType]=\"nextRow?.type\" [attr.colspan]=\"colspan\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"gridService.masterDetailTemplate()\"\r\n [ngTemplateOutletContext]=\"{ $implicit: viewRow.row.data }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n }\r\n }\r\n </tbody>\r\n</table>\r\n\r\n<ng-template let-rowData let-element=\"element\" let-rowIndex=\"index\" #contextMenuTemplate>\r\n <mona-contextmenu [target]=\"element\" [items]=\"gridService.contextMenuItems()\"></mona-contextmenu>\r\n <!-- [context]=\"{rowData, element, rowIndex}\"-->\r\n</ng-template>\r\n", dependencies: [{ kind: "component", type: GridAddRowComponent, selector: "tr[monaGridAddRow]", inputs: ["columns"] }, { kind: "component", type: GridCellComponent, selector: "mona-grid-cell", inputs: ["column", "row"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ContextMenuComponent, selector: "mona-contextmenu", inputs: ["ariaLabel", "items", "minWidth", "rounded", "size", "target", "width"], outputs: ["menuClick"] }, { kind: "directive", type: GridRowDirective, selector: "tr[monaGridRow]", inputs: ["index", "row"], exportAs: ["monaGridRow"] }, { kind: "directive", type: GridCellDirective, selector: "td[monaGridCell]", inputs: ["dataCell", "groupHeader", "groupToggle", "grouped", "indentCell", "lastInRow", "masterDetailContent", "masterDetailToggle", "nextRowType", "prevRowType"] }, { kind: "directive", type: GridDetailRowDirective, selector: "tr[monaGridDetailRow]" }, { kind: "directive", type: GridDetailIndentCellDirective, selector: "td[monaGridDetailIndentCell]", inputs: ["nextRowType"] }, { kind: "directive", type: GridDetailContentCellDirective, selector: "td[monaGridDetailContentCell]", inputs: ["nextRowType"] }, { kind: "component", type: GridToggleComponent, selector: "mona-grid-toggle", inputs: ["expanded", "type", "width"], outputs: ["expandedChange"] }, { kind: "directive", type: GridFooterTableCellDirective, selector: "td[monaGridFooterTableCell]", inputs: ["footerCellMinWidth", "footerCellWidth", "footerColumn"] }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggle"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "lockedCellHeader", "lockedStructuralOffset"] }, { kind: "component", type: GridFooterCellComponent, selector: "mona-grid-footer-cell", inputs: ["column", "columnIndex", "groupKey"] }, { kind: "pipe", type: SlicePipe, name: "monaSlice" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
104
+ }
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridListComponent, decorators: [{
106
+ type: Component,
107
+ args: [{ selector: "mona-grid-list", changeDetection: ChangeDetectionStrategy.OnPush, imports: [
108
+ GridAddRowComponent,
109
+ GridCellComponent,
110
+ FontAwesomeModule,
111
+ NgTemplateOutlet,
112
+ ContextMenuComponent,
113
+ GridRowDirective,
114
+ GridCellDirective,
115
+ GridDetailRowDirective,
116
+ GridDetailIndentCellDirective,
117
+ GridDetailContentCellDirective,
118
+ SlicePipe,
119
+ GridToggleComponent,
120
+ GridFooterTableCellDirective,
121
+ GridLogicalCellDirective,
122
+ GridLockedCellDirective,
123
+ GridFooterCellComponent
124
+ ], host: {
125
+ "[class]": "baseClass()"
126
+ }, template: "<table #bodyTable [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\r\n <colgroup>\r\n @for (_ of gridService.groupColumns(); track $index) {\r\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\r\n }\r\n @if (gridService.masterDetailTemplate()) {\r\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\r\n }\r\n @for (col of columns(); track $index) {\r\n <col [style.width.px]=\"col.calculatedWidth\" />\r\n }\r\n </colgroup>\r\n <tbody role=\"rowgroup\">\r\n @if (gridService.addRowVisible()) {\r\n <tr monaGridAddRow [columns]=\"columns()\"></tr>\r\n }\r\n @if (gridService.groupColumns().length === 0) {\r\n @for (row of data(); track row.uid) {\r\n @let rowIndex = $index;\r\n <tr\r\n (click)=\"onGridRowClick($event, row)\"\r\n monaGridRow\r\n [index]=\"rowIndex\"\r\n [row]=\"row\"\r\n #gridRow=\"monaGridRow\"\r\n #rowElement>\r\n @if (gridService.masterDetailTemplate()) {\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedStructuralOffset]=\"0\"\r\n [masterDetailToggle]=\"true\"\r\n monaGridLogicalCell\r\n [cellKind]=\"'detail'\"\r\n [colIndex]=\"0\"\r\n [firstInRow]=\"true\"\r\n [lastInRow]=\"columns().length === 0\"\r\n [rowIndex]=\"rowIndex\"\r\n [rowUid]=\"row.uid\"\r\n [section]=\"'body'\"\r\n [style.width.px]=\"gridService.detailColumnWidth\"\r\n [attr.colspan]=\"1\">\r\n <span class=\"flex h-full w-full items-stretch justify-center\">\r\n <mona-grid-toggle\r\n [expanded]=\"gridRow.expanded()\"\r\n [type]=\"'detail'\"\r\n [width]=\"gridService.detailColumnWidth\"\r\n (expandedChange)=\"onToggleDetailClick(row)\"></mona-grid-toggle>\r\n </span>\r\n </td>\r\n }\r\n @for (column of columns(); track $index) {\r\n @let colIndex = gridService.masterDetailTemplate() ? $index + 1 : $index;\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [column]=\"column\"\r\n [dataCell]=\"true\"\r\n monaGridLogicalCell\r\n [cellKind]=\"column.kind\"\r\n [colIndex]=\"colIndex\"\r\n [columnId]=\"column.id\"\r\n [rowIndex]=\"rowIndex\"\r\n [rowUid]=\"row.uid\"\r\n [section]=\"'body'\"\r\n [firstInRow]=\"colIndex === 0\"\r\n [lastInRow]=\"colIndex === columns().length - (gridService.masterDetailTemplate() ? 0 : 1)\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"column.calculatedWidth\"\r\n [style.min-width.px]=\"column.minWidth\"\r\n (edit)=\"gridCell.handleLogicalCellEnter()\">\r\n <mona-grid-cell #gridCell [column]=\"column\" [row]=\"row\"></mona-grid-cell>\r\n </td>\r\n }\r\n @if (gridService.contextMenuItems().length !== 0) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"contextMenuTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row.data, element: rowElement, index: $index }\">\r\n </ng-container>\r\n }\r\n </tr>\r\n @if (gridRow.expanded()) {\r\n <tr monaGridDetailRow [style.width.px]=\"gridService.masterDetailRowWidth()\">\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedStructuralOffset]=\"0\"\r\n [indentCell]=\"true\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"gridService.masterDetailEmptyCellWidth()\"></td>\r\n <td monaGridCell [masterDetailContent]=\"true\" [attr.colspan]=\"columns().length\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"gridService.masterDetailTemplate()\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row.data }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n } @else {\r\n @for (viewRow of flattenedGroupedRows(); track $index) {\r\n @let rowIndex = $index;\r\n @if (viewRow.type === \"group\") {\r\n @let isCollapsed = gridService.isGroupCollapsed(viewRow.groupKey);\r\n @let prevRow = flattenedGroupedRows()[rowIndex - 1];\r\n\r\n <tr\r\n [class]=\"groupRowClass()\"\r\n role=\"row\"\r\n [attr.aria-level]=\"viewRow.depth + 1\"\r\n [attr.aria-expanded]=\"!isCollapsed\">\r\n @for (_ of gridService.groupColumns() | monaSlice: 0 : viewRow.depth; track $index) {\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\r\n [grouped]=\"true\"\r\n [indentCell]=\"true\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\r\n }\r\n @let colspan =\r\n columns().length +\r\n gridService.groupColumns().length +\r\n (gridService.masterDetailTemplate() ? 1 : 0) -\r\n viewRow.depth +\r\n 1;\r\n\r\n <td\r\n monaGridCell\r\n monaGridLogicalCell\r\n [cellKind]=\"'group'\"\r\n [rowIndex]=\"rowIndex\"\r\n [colIndex]=\"0\"\r\n [section]=\"'body'\"\r\n [grouped]=\"true\"\r\n [groupHeader]=\"true\"\r\n [prevRowType]=\"prevRow?.type\"\r\n [firstInRow]=\"true\"\r\n [lastInRow]=\"columns().length === 0\"\r\n [groupKey]=\"viewRow.groupKey\"\r\n (toggle)=\"onGroupExpandChange(viewRow.groupKey)\"\r\n [attr.colspan]=\"colspan\">\r\n <p class=\"flex h-full items-center text-sm whitespace-nowrap\">\r\n <mona-grid-toggle\r\n [expanded]=\"!isCollapsed\"\r\n [width]=\"gridService.groupColumnWidth\"\r\n [type]=\"'group'\"\r\n (expandedChange)=\"onGroupExpandChange(viewRow.groupKey)\"></mona-grid-toggle>\r\n <span class=\"font-bold\">{{ viewRow.title }}: {{ viewRow.groupValue }}</span>\r\n </p>\r\n </td>\r\n </tr>\r\n } @else if (viewRow.type === \"groupFooter\") {\r\n <tr role=\"row\" [class]=\"footerTableRowClass()\">\r\n @for (_ of gridService.groupColumns(); track $index) {\r\n <td\r\n monaGridFooterTableCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\r\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\r\n }\r\n @if (gridService.masterDetailTemplate()) {\r\n <td\r\n monaGridFooterTableCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"\r\n gridService.groupColumns().length * gridService.groupColumnWidth\r\n \"\r\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\r\n }\r\n @for (column of columns(); track $index) {\r\n <td\r\n monaGridFooterTableCell\r\n monaGridLockedCell\r\n [column]=\"column\"\r\n [lockedCellHeader]=\"true\"\r\n [footerColumn]=\"column\">\r\n <mona-grid-footer-cell\r\n [column]=\"column\"\r\n [columnIndex]=\"$index\"\r\n [groupKey]=\"viewRow.groupAggregate.groupKey\"></mona-grid-footer-cell>\r\n </td>\r\n }\r\n </tr>\r\n } @else {\r\n @let nextRow = flattenedGroupedRows()[rowIndex + 1];\r\n @let prevRow = flattenedGroupedRows()[rowIndex - 1];\r\n <tr\r\n (click)=\"onGridRowClick($event, viewRow.row)\"\r\n monaGridRow\r\n [index]=\"rowIndex\"\r\n [row]=\"viewRow.row\"\r\n #gridRow=\"monaGridRow\"\r\n #rowElement>\r\n @for (_ of gridService.groupColumns(); track $index) {\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\r\n [grouped]=\"true\"\r\n [indentCell]=\"true\"\r\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\r\n }\r\n\r\n @if (gridService.masterDetailTemplate()) {\r\n <td\r\n monaGridCell\r\n monaGridLogicalCell\r\n monaGridLockedCell\r\n [lockedStructuralOffset]=\"\r\n gridService.groupColumns().length * gridService.groupColumnWidth\r\n \"\r\n [grouped]=\"true\"\r\n [masterDetailToggle]=\"true\"\r\n [prevRowType]=\"prevRow?.type\"\r\n [nextRowType]=\"nextRow?.type\"\r\n [rowIndex]=\"rowIndex\"\r\n [rowUid]=\"viewRow.row.uid\"\r\n [section]=\"'body'\"\r\n [cellKind]=\"'detail'\"\r\n [colIndex]=\"0\"\r\n [firstInRow]=\"true\"\r\n [lastInRow]=\"columns().length === 0\"\r\n [style.width.px]=\"gridService.detailColumnWidth\">\r\n <span class=\"flex h-full w-full items-stretch justify-center\">\r\n <mona-grid-toggle\r\n [expanded]=\"gridRow.expanded()\"\r\n [type]=\"'detail'\"\r\n [width]=\"gridService.detailColumnWidth\"\r\n (expandedChange)=\"onToggleDetailClick(viewRow.row)\"></mona-grid-toggle>\r\n </span>\r\n </td>\r\n }\r\n @for (column of columns(); track $index) {\r\n @let colIndex = gridService.masterDetailTemplate() ? $index + 1 : $index;\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [column]=\"column\"\r\n [grouped]=\"true\"\r\n [dataCell]=\"true\"\r\n [prevRowType]=\"prevRow?.type\"\r\n [nextRowType]=\"nextRow?.type\"\r\n monaGridLogicalCell\r\n [cellKind]=\"column.kind\"\r\n [colIndex]=\"colIndex\"\r\n [columnId]=\"column.id\"\r\n [firstInRow]=\"colIndex === 0\"\r\n [lastInRow]=\"\r\n colIndex === columns().length - (gridService.masterDetailTemplate() ? 0 : 1)\r\n \"\r\n [rowIndex]=\"rowIndex\"\r\n [rowUid]=\"viewRow.row.uid\"\r\n [section]=\"'body'\"\r\n [style.width.px]=\"column.calculatedWidth\"\r\n [style.min-width.px]=\"column.minWidth\"\r\n (edit)=\"gridCell.handleLogicalCellEnter()\">\r\n <mona-grid-cell #gridCell [column]=\"column\" [row]=\"viewRow.row\"></mona-grid-cell>\r\n </td>\r\n }\r\n @if (gridService.contextMenuItems().length !== 0) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"contextMenuTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: viewRow.row.data,\r\n element: rowElement,\r\n index: rowIndex\r\n }\">\r\n </ng-container>\r\n }\r\n </tr>\r\n @if (gridRow.expanded()) {\r\n <tr monaGridDetailRow [style.width.px]=\"gridService.masterDetailRowWidth()\">\r\n @for (_ of gridService.groupColumns() | monaSlice: 0 : viewRow.depth + 1; track $index) {\r\n <td\r\n monaGridCell\r\n monaGridLockedCell\r\n [lockedCellHeader]=\"true\"\r\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\r\n [grouped]=\"true\"\r\n [indentCell]=\"true\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\r\n }\r\n @let colspan = columns().length + gridService.groupColumns().length - 1;\r\n <td\r\n monaGridDetailIndentCell\r\n monaGridLockedCell\r\n [lockedStructuralOffset]=\"(viewRow.depth + 1) * gridService.groupColumnWidth\"\r\n [nextRowType]=\"nextRow?.type\"\r\n [attr.colspan]=\"1\"\r\n [style.width.px]=\"gridService.masterDetailEmptyCellWidth()\"></td>\r\n <td monaGridDetailContentCell [nextRowType]=\"nextRow?.type\" [attr.colspan]=\"colspan\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"gridService.masterDetailTemplate()\"\r\n [ngTemplateOutletContext]=\"{ $implicit: viewRow.row.data }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n }\r\n }\r\n </tbody>\r\n</table>\r\n\r\n<ng-template let-rowData let-element=\"element\" let-rowIndex=\"index\" #contextMenuTemplate>\r\n <mona-contextmenu [target]=\"element\" [items]=\"gridService.contextMenuItems()\"></mona-contextmenu>\r\n <!-- [context]=\"{rowData, element, rowIndex}\"-->\r\n</ng-template>\r\n" }]
127
+ }], ctorParameters: () => [], propDecorators: { bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
128
+
129
+ export { GridListComponent };
130
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs.map