@nanahoshi/mona-ui 0.1.0 → 0.2.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 (176) hide show
  1. package/auto-complete/package.json +4 -0
  2. package/avatar/package.json +4 -0
  3. package/breadcrumb/package.json +4 -0
  4. package/button/package.json +4 -0
  5. package/button-group/package.json +4 -0
  6. package/calendar/package.json +4 -0
  7. package/check-box/package.json +4 -0
  8. package/chip/package.json +4 -0
  9. package/circular-progress-bar/package.json +4 -0
  10. package/color-gradient/package.json +4 -0
  11. package/color-palette/package.json +4 -0
  12. package/color-picker/package.json +4 -0
  13. package/combo-box/package.json +4 -0
  14. package/common/package.json +4 -0
  15. package/contextmenu/package.json +4 -0
  16. package/date-input/package.json +4 -0
  17. package/date-picker/package.json +4 -0
  18. package/datetime-picker/package.json +4 -0
  19. package/dialog/package.json +4 -0
  20. package/dropdown-button/package.json +4 -0
  21. package/dropdown-list/package.json +4 -0
  22. package/dropdowns/package.json +4 -0
  23. package/editor/package.json +4 -0
  24. package/expansion-panel/package.json +4 -0
  25. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +40 -55
  26. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +24 -58
  27. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +37 -48
  28. package/fesm2022/nanahoshi-mona-ui-button.mjs +130 -129
  29. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +69 -165
  30. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +81 -128
  31. package/fesm2022/nanahoshi-mona-ui-chip.mjs +102 -112
  32. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +11 -25
  33. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +41 -92
  34. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +27 -49
  35. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +64 -65
  36. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +39 -61
  37. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +12 -15
  38. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +44 -33
  39. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +58 -60
  40. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +52 -165
  41. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +36 -59
  42. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +56 -61
  43. package/fesm2022/nanahoshi-mona-ui-editor.mjs +302 -81
  44. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +33 -84
  45. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +12 -45
  46. package/fesm2022/nanahoshi-mona-ui-filter.mjs +18 -48
  47. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +14 -14
  48. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
  49. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs +121 -0
  50. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +26 -55
  51. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs +231 -0
  52. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +167 -451
  53. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  54. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +10 -28
  55. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +57 -87
  56. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -139
  57. package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
  58. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +10 -32
  59. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +8 -21
  60. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +50 -156
  61. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +40 -69
  62. package/fesm2022/nanahoshi-mona-ui-notification.mjs +32 -116
  63. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +81 -107
  64. package/fesm2022/nanahoshi-mona-ui-pager.mjs +33 -85
  65. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +12 -34
  66. package/fesm2022/nanahoshi-mona-ui-popover.mjs +31 -52
  67. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +38 -110
  68. package/fesm2022/nanahoshi-mona-ui-popup.mjs +4 -4
  69. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +21 -62
  70. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +66 -111
  71. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +60 -151
  72. package/fesm2022/nanahoshi-mona-ui-slider.mjs +117 -173
  73. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +32 -45
  74. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +29 -64
  75. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +38 -101
  76. package/fesm2022/nanahoshi-mona-ui-switch.mjs +58 -79
  77. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +42 -118
  78. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +29 -37
  79. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +60 -81
  80. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
  81. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +45 -39
  82. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +45 -109
  83. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +54 -82
  84. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
  85. package/fesm2022/nanahoshi-mona-ui-window.mjs +35 -115
  86. package/fieldset/package.json +4 -0
  87. package/filter/package.json +4 -0
  88. package/grid/package.json +4 -0
  89. package/internal/filter-input/package.json +4 -0
  90. package/internal/indicator-icon/package.json +4 -0
  91. package/internal/list/package.json +4 -0
  92. package/internal/package.json +4 -0
  93. package/internal/tree/package.json +4 -0
  94. package/list/package.json +4 -0
  95. package/list-box/package.json +4 -0
  96. package/list-view/package.json +4 -0
  97. package/menubar/package.json +4 -0
  98. package/multi-select/package.json +4 -0
  99. package/notification/package.json +4 -0
  100. package/numeric-text-box/package.json +4 -0
  101. package/package.json +31 -5
  102. package/pager/package.json +4 -0
  103. package/placeholder/package.json +4 -0
  104. package/popover/package.json +4 -0
  105. package/popup/package.json +4 -0
  106. package/popup-menu/package.json +4 -0
  107. package/progress-bar/package.json +4 -0
  108. package/query/package.json +4 -0
  109. package/radio-button/package.json +4 -0
  110. package/scroll-view/package.json +4 -0
  111. package/slider/package.json +4 -0
  112. package/split-button/package.json +4 -0
  113. package/splitter/package.json +4 -0
  114. package/stepper/package.json +4 -0
  115. package/switch/package.json +4 -0
  116. package/tabs/package.json +4 -0
  117. package/text-area/package.json +4 -0
  118. package/text-box/package.json +4 -0
  119. package/theme/package.json +4 -0
  120. package/time-picker/package.json +4 -0
  121. package/time-selector/package.json +4 -0
  122. package/tooltip/package.json +4 -0
  123. package/tree-view/package.json +4 -0
  124. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
  125. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
  126. package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
  127. package/types/nanahoshi-mona-ui-button.d.ts +6 -6
  128. package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
  129. package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
  130. package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
  131. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
  132. package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
  133. package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
  134. package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -8
  135. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
  136. package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
  137. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
  138. package/types/nanahoshi-mona-ui-dialog.d.ts +7 -8
  139. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
  140. package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
  141. package/types/nanahoshi-mona-ui-editor.d.ts +17 -17
  142. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
  143. package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
  144. package/types/nanahoshi-mona-ui-filter.d.ts +3 -4
  145. package/types/nanahoshi-mona-ui-grid.d.ts +16 -17
  146. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
  147. package/types/nanahoshi-mona-ui-internal-tree.d.ts +16 -16
  148. package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
  149. package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
  150. package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
  151. package/types/nanahoshi-mona-ui-menubar.d.ts +7 -8
  152. package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
  153. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
  154. package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
  155. package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
  156. package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
  157. package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
  158. package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
  159. package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
  160. package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
  161. package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
  162. package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
  163. package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
  164. package/types/nanahoshi-mona-ui-stepper.d.ts +13 -14
  165. package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
  166. package/types/nanahoshi-mona-ui-tabs.d.ts +15 -17
  167. package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
  168. package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
  169. package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
  170. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
  171. package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
  172. package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
  173. package/types/nanahoshi-mona-ui-window.d.ts +16 -17
  174. package/window/package.json +4 -0
  175. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +0 -130
  176. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +0 -240
@@ -1,23 +1,122 @@
1
+ import * as _nanahoshi_mona_ui_theme from '@nanahoshi/mona-ui/theme';
1
2
  import * as _angular_core from '@angular/core';
3
+ import { EnvironmentProviders, InjectionToken } from '@angular/core';
2
4
 
3
- type ThemeStyle = "mona";
5
+ type BuiltInThemeName = "anna" | "luna" | "mona";
6
+ type ThemeName = string;
4
7
  type ThemeVariant = "light" | "dark";
5
- type ThemeId = `${ThemeStyle}-${ThemeVariant}`;
8
+ interface ThemeSelection {
9
+ readonly name: ThemeName;
10
+ readonly variant: ThemeVariant;
11
+ }
12
+
13
+ type ThemeColorVariable = `--color-${string}`;
14
+ type ThemeColors = Readonly<Record<ThemeColorVariable, string>>;
15
+ type ThemeShadowVariable = `--shadow-${string}`;
16
+ type ThemeShadows = Readonly<Record<ThemeShadowVariable, string>>;
17
+ type ThemeVariable = `--${string}`;
18
+ type ThemeVariables = Readonly<Record<ThemeVariable, string>>;
19
+ type ThemeMotionVariable = "--mona-motion-fast" | "--mona-motion-standard";
20
+ type ThemeMotion = Readonly<Record<ThemeMotionVariable, string>>;
21
+ type ThemeEffectLevel = "control" | "overlay" | "raised";
22
+ type ThemeEffectVariable = `--mona-effect-${ThemeEffectLevel}-background-color` | `--mona-effect-${ThemeEffectLevel}-fallback-background-color` | `--mona-effect-${ThemeEffectLevel}-background-image` | `--mona-effect-${ThemeEffectLevel}-backdrop-filter`;
23
+ type ThemeEffects = Readonly<Record<ThemeEffectVariable, string>>;
24
+ type ThemeShapeVariable = "--radius-sm" | "--radius-md" | "--radius-lg";
25
+ type ThemeShape = Readonly<Record<ThemeShapeVariable, string>>;
26
+ type ThemeComponentVariable = "--mona-calendar-background" | "--mona-calendar-shadow" | "--mona-list-background" | "--mona-list-disabled-background" | "--mona-list-group-background" | "--mona-list-group-border-width" | "--mona-list-group-font-weight" | "--mona-menubar-background" | "--mona-menubar-shadow" | "--mona-pager-background" | "--mona-slider-handle-border-color" | "--mona-tab-list-background" | "--mona-tab-content-background";
27
+ type ThemeComponents = Readonly<Record<ThemeComponentVariable, string>>;
28
+ interface ThemeProfile {
29
+ readonly colors: ThemeColors;
30
+ readonly components: ThemeComponents;
31
+ readonly custom?: ThemeVariables;
32
+ readonly effects: ThemeEffects;
33
+ readonly motion: ThemeMotion;
34
+ readonly shape: ThemeShape;
35
+ readonly shadows: ThemeShadows;
36
+ }
37
+ interface ThemeProfileOverrides {
38
+ readonly colors?: ThemeColors;
39
+ readonly components?: Partial<ThemeComponents>;
40
+ readonly custom?: ThemeVariables;
41
+ readonly effects?: Partial<ThemeEffects>;
42
+ readonly motion?: Partial<ThemeMotion>;
43
+ readonly shape?: Partial<ThemeShape>;
44
+ readonly shadows?: ThemeShadows;
45
+ }
46
+ type ThemeFamilyVariants = Readonly<{
47
+ readonly dark: ThemeProfile;
48
+ readonly light?: ThemeProfile;
49
+ } | {
50
+ readonly dark?: ThemeProfile;
51
+ readonly light: ThemeProfile;
52
+ }>;
53
+ interface ThemeFamilyRegistration {
54
+ readonly name: ThemeName;
55
+ readonly variants: ThemeFamilyVariants;
56
+ }
57
+ interface ThemeOverrideRegistration {
58
+ readonly common?: ThemeProfileOverrides;
59
+ readonly dark?: ThemeProfileOverrides;
60
+ readonly light?: ThemeProfileOverrides;
61
+ readonly theme: ThemeName;
62
+ }
63
+ interface ThemeOptions {
64
+ readonly initialTheme: ThemeSelection;
65
+ }
66
+ interface ThemeColorPaletteSeeds {
67
+ readonly error?: string;
68
+ readonly info?: string;
69
+ readonly primary: string;
70
+ readonly secondary?: string;
71
+ readonly success?: string;
72
+ readonly warning?: string;
73
+ }
74
+ type GeneratedThemeColorPalette = Readonly<Record<ThemeVariant, ThemeColors>>;
75
+ interface ThemeColorPaletteRegistration {
76
+ readonly seeds: ThemeColorPaletteSeeds;
77
+ readonly theme: ThemeName;
78
+ }
79
+ declare function flattenThemeProfile(profile: ThemeProfile): ThemeVariables;
6
80
 
7
81
  declare class ThemeService {
8
82
  #private;
9
- readonly themeId: _angular_core.WritableSignal<"mona-light" | "mona-dark">;
10
- readonly theme: _angular_core.Signal<"mona">;
11
- readonly themeVariant: _angular_core.Signal<ThemeVariant>;
83
+ /** The consumer-provided seeds for the active runtime color palette, or `null` when provider defaults are active. */
84
+ readonly colorPaletteSeeds: _angular_core.Signal<ThemeColorPaletteSeeds | null>;
85
+ readonly profile: _angular_core.Signal<ThemeProfile>;
86
+ readonly selection: _angular_core.Signal<ThemeSelection>;
87
+ readonly themeName: _angular_core.Signal<string>;
88
+ readonly themeVariant: _angular_core.Signal<_nanahoshi_mona_ui_theme.ThemeVariant>;
12
89
  constructor();
13
- setThemeId(themeId: ThemeId): void;
14
- private getActiveThemeVariables;
15
- private getMonaDarkThemeVariables;
16
- private getMonaLightThemeVariables;
17
- private updateThemeVariables;
90
+ /** Removes the runtime color palette and restores the registered profile and provider overrides. */
91
+ clearColorPalette(): void;
92
+ /**
93
+ * Applies a runtime-generated semantic color palette after all registered profile overrides.
94
+ * The palette remains active across theme and light/dark switches until cleared.
95
+ */
96
+ setColorPalette(seeds: ThemeColorPaletteSeeds): void;
97
+ /** Updates only the runtime primary seed while retaining any other active runtime seeds. */
98
+ setPrimaryColor(primary: string): void;
99
+ setTheme(selection: ThemeSelection): void;
18
100
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
19
101
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
20
102
  }
21
103
 
22
- export { ThemeService };
23
- export type { ThemeId, ThemeStyle, ThemeVariant };
104
+ declare function provideThemeFamily(registration: ThemeFamilyRegistration): EnvironmentProviders;
105
+ declare function provideThemeOverrides(registration: ThemeOverrideRegistration): EnvironmentProviders;
106
+ declare function provideThemeOptions(options: ThemeOptions): EnvironmentProviders;
107
+ declare function provideThemeColorPalette(registration: ThemeColorPaletteRegistration): EnvironmentProviders;
108
+
109
+ interface ThemeStrategy {
110
+ resolve(selection: ThemeSelection): ThemeProfile;
111
+ }
112
+
113
+ declare const THEME_STRATEGY: InjectionToken<ThemeStrategy>;
114
+
115
+ /**
116
+ * Generates accessible light and dark color-role overrides from consumer-provided CSS colors.
117
+ * Seed lightness is treated as source identity; the generated variants use fixed tonal anchors.
118
+ */
119
+ declare function generateThemeColorPalette(seeds: ThemeColorPaletteSeeds): GeneratedThemeColorPalette;
120
+
121
+ export { THEME_STRATEGY, ThemeService, flattenThemeProfile, generateThemeColorPalette, provideThemeColorPalette, provideThemeFamily, provideThemeOptions, provideThemeOverrides };
122
+ export type { BuiltInThemeName, GeneratedThemeColorPalette, ThemeColorPaletteRegistration, ThemeColorPaletteSeeds, ThemeColorVariable, ThemeColors, ThemeComponentVariable, ThemeComponents, ThemeEffectLevel, ThemeEffectVariable, ThemeEffects, ThemeFamilyRegistration, ThemeFamilyVariants, ThemeMotion, ThemeMotionVariable, ThemeName, ThemeOptions, ThemeOverrideRegistration, ThemeProfile, ThemeProfileOverrides, ThemeSelection, ThemeShadowVariable, ThemeShadows, ThemeShape, ThemeShapeVariable, ThemeStrategy, ThemeVariable, ThemeVariables, ThemeVariant };
@@ -7,16 +7,15 @@ import { VariantInputs, AttributeConfig } from '@nanahoshi/mona-ui/internal';
7
7
  import { ListSizeInputType } from '@nanahoshi/mona-ui/internal/list';
8
8
  import { PopupCloseEvent } from '@nanahoshi/mona-ui/popup';
9
9
  import * as class_variance_authority_types from 'class-variance-authority/types';
10
- import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
11
10
  import { VariantProps } from 'class-variance-authority';
12
11
  import * as i1 from '@nanahoshi/mona-ui/dropdowns';
13
12
 
14
- declare const timePickerBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
13
+ declare const timePickerBaseThemeVariants: (props?: ({
15
14
  focused?: boolean | null | undefined;
16
15
  rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
17
16
  size?: "large" | "medium" | "small" | null | undefined;
18
17
  } & class_variance_authority_types.ClassProp) | undefined) => string;
19
- type TimePickerBaseVariantProps = VariantProps<ReturnType<typeof timePickerBaseThemeVariants>>;
18
+ type TimePickerBaseVariantProps = VariantProps<typeof timePickerBaseThemeVariants>;
20
19
  type TimePickerBaseVariantInput = VariantInputs<TimePickerBaseVariantProps>;
21
20
  type TimePickerVariantProps = TimePickerBaseVariantProps;
22
21
  type TimePickerVariantInput = Omit<TimePickerBaseVariantInput, "focused">;
@@ -8,33 +8,32 @@ import { ElementRef } from '@angular/core';
8
8
  import { FormValueControl } from '@angular/forms/signals';
9
9
  import * as class_variance_authority_types from 'class-variance-authority/types';
10
10
  import { VariantProps } from 'class-variance-authority';
11
- import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
12
11
  import { VariantInputs } from '@nanahoshi/mona-ui/internal';
13
12
 
14
13
  type TimeListType = "hours" | "minutes" | "seconds" | "meridiem";
15
14
 
16
- declare const timeSelectorBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
15
+ declare const timeSelectorBaseThemeVariants: (props?: ({
17
16
  disabled?: boolean | null | undefined;
18
17
  size?: "small" | "medium" | "large" | null | undefined;
19
18
  } & class_variance_authority_types.ClassProp) | undefined) => string;
20
- declare const timeSelectorHeaderThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
21
- declare const timeSelectorInfoContainerThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
22
- declare const timeSelectorListThemeVariants: (theme: ThemeStyle) => (props?: ({
19
+ declare const timeSelectorHeaderThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
20
+ declare const timeSelectorInfoContainerThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
21
+ declare const timeSelectorListThemeVariants: (props?: ({
23
22
  size?: "small" | "medium" | "large" | null | undefined;
24
23
  } & class_variance_authority_types.ClassProp) | undefined) => string;
25
- declare const timeSelectorListItemThemeVariants: (theme: ThemeStyle) => (props?: ({
24
+ declare const timeSelectorListItemThemeVariants: (props?: ({
26
25
  selected?: boolean | null | undefined;
27
26
  size?: "small" | "medium" | "large" | null | undefined;
28
27
  } & class_variance_authority_types.ClassProp) | undefined) => string;
29
- type TimeSelectorBaseVariantProps = VariantProps<ReturnType<typeof timeSelectorBaseThemeVariants>>;
28
+ type TimeSelectorBaseVariantProps = VariantProps<typeof timeSelectorBaseThemeVariants>;
30
29
  type TimeSelectorBaseVariantInput = VariantInputs<TimeSelectorBaseVariantProps>;
31
- type TimeSelectorHeaderVariantProps = VariantProps<ReturnType<typeof timeSelectorHeaderThemeVariants>>;
30
+ type TimeSelectorHeaderVariantProps = VariantProps<typeof timeSelectorHeaderThemeVariants>;
32
31
  type TimeSelectorHeaderVariantInput = VariantInputs<TimeSelectorHeaderVariantProps>;
33
- type TimeSelectorInfoContainerVariantProps = VariantProps<ReturnType<typeof timeSelectorInfoContainerThemeVariants>>;
32
+ type TimeSelectorInfoContainerVariantProps = VariantProps<typeof timeSelectorInfoContainerThemeVariants>;
34
33
  type TimeSelectorInfoContainerVariantInput = VariantInputs<TimeSelectorInfoContainerVariantProps>;
35
- type TimeSelectorListVariantProps = VariantProps<ReturnType<typeof timeSelectorListThemeVariants>>;
34
+ type TimeSelectorListVariantProps = VariantProps<typeof timeSelectorListThemeVariants>;
36
35
  type TimeSelectorListVariantInput = VariantInputs<TimeSelectorListVariantProps>;
37
- type TimeSelectorListItemVariantProps = VariantProps<ReturnType<typeof timeSelectorListItemThemeVariants>>;
36
+ type TimeSelectorListItemVariantProps = VariantProps<typeof timeSelectorListItemThemeVariants>;
38
37
  type TimeSelectorListItemVariantInput = VariantInputs<TimeSelectorListItemVariantProps>;
39
38
  type TimeSelectorVariantProps = TimeSelectorBaseVariantProps & TimeSelectorHeaderVariantProps & TimeSelectorInfoContainerVariantProps & Omit<TimeSelectorListVariantProps, "size"> & Omit<TimeSelectorListItemVariantProps, "size">;
40
39
  type TimeSelectorVariantInput = TimeSelectorBaseVariantInput & TimeSelectorHeaderVariantInput & TimeSelectorInfoContainerVariantInput & Omit<TimeSelectorListVariantInput, "size"> & Omit<TimeSelectorListItemVariantInput, "size" | "selected">;
@@ -4,16 +4,15 @@ import { Position } from '@nanahoshi/mona-ui/common';
4
4
  import { PopupAnchor, PopupOffset, ConnectionPoint } from '@nanahoshi/mona-ui/popup';
5
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
6
6
  import { VariantInputs } from '@nanahoshi/mona-ui/internal';
7
- import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
8
7
  import { VariantProps } from 'class-variance-authority';
9
8
 
10
- declare const tooltipBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
9
+ declare const tooltipBaseThemeVariants: (props?: ({
11
10
  rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
12
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
13
- declare const tooltipArrowThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
14
- type TooltipBaseVariantProps = VariantProps<ReturnType<typeof tooltipBaseThemeVariants>>;
12
+ declare const tooltipArrowThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
13
+ type TooltipBaseVariantProps = VariantProps<typeof tooltipBaseThemeVariants>;
15
14
  type TooltipBaseVariantInputs = VariantInputs<TooltipBaseVariantProps>;
16
- type TooltipArrowVariantsProps = VariantProps<ReturnType<typeof tooltipArrowThemeVariants>>;
15
+ type TooltipArrowVariantsProps = VariantProps<typeof tooltipArrowThemeVariants>;
17
16
  type TooltipArrowVariantsInputs = VariantInputs<TooltipArrowVariantsProps>;
18
17
  type TooltipVariantInputs = TooltipBaseVariantInputs & TooltipArrowVariantsInputs;
19
18
 
@@ -3,43 +3,42 @@ import { ElementRef, ComponentRef, TemplateRef, Type } from '@angular/core';
3
3
  import { PopupCloseEvent, PopupRef } from '@nanahoshi/mona-ui/popup';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import { VariantInputs, Action } from '@nanahoshi/mona-ui/internal';
6
- import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
7
6
  import { VariantProps } from 'class-variance-authority';
8
7
  import { Observable } from 'rxjs';
9
8
 
10
- declare const windowBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
9
+ declare const windowBaseThemeVariants: (props?: ({
11
10
  rounded?: "none" | "small" | "medium" | "large" | null | undefined;
12
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
13
- declare const windowContentContainerThemeVariants: (theme: ThemeStyle) => (props?: ({
12
+ declare const windowContentContainerThemeVariants: (props?: ({
14
13
  rounded?: "none" | "small" | "medium" | "large" | null | undefined;
15
14
  } & class_variance_authority_types.ClassProp) | undefined) => string;
16
- declare const windowContentThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
17
- declare const windowResizerThemeVariants: (theme: ThemeStyle) => (props?: ({
15
+ declare const windowContentThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
16
+ declare const windowResizerThemeVariants: (props?: ({
18
17
  position?: "north" | "south" | "east" | "west" | "northeast" | "northwest" | "southeast" | "southwest" | null | undefined;
19
18
  } & class_variance_authority_types.ClassProp) | undefined) => string;
20
- declare const windowTitleBarActionThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
21
- declare const windowTitleBarThemeVariants: (theme: ThemeStyle) => (props?: ({
19
+ declare const windowTitleBarActionThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
20
+ declare const windowTitleBarThemeVariants: (props?: ({
22
21
  look?: "default" | "primary" | null | undefined;
23
22
  rounded?: "none" | "small" | "medium" | "large" | null | undefined;
24
23
  } & class_variance_authority_types.ClassProp) | undefined) => string;
25
- declare const windowTitleContainerThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
26
- declare const windowTitleThemeVariants: (theme: ThemeStyle) => (props?: ({
24
+ declare const windowTitleContainerThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
25
+ declare const windowTitleThemeVariants: (props?: ({
27
26
  look?: "default" | "primary" | null | undefined;
28
27
  } & class_variance_authority_types.ClassProp) | undefined) => string;
29
- type WindowBaseVariantProps = VariantProps<ReturnType<typeof windowBaseThemeVariants>>;
28
+ type WindowBaseVariantProps = VariantProps<typeof windowBaseThemeVariants>;
30
29
  type WindowBaseVariantInput = VariantInputs<WindowBaseVariantProps>;
31
- type WindowContentContainerVariantProps = VariantProps<ReturnType<typeof windowContentContainerThemeVariants>>;
30
+ type WindowContentContainerVariantProps = VariantProps<typeof windowContentContainerThemeVariants>;
32
31
  type WindowContentContainerVariantInput = VariantInputs<WindowContentContainerVariantProps>;
33
- type WindowContentVariantProps = VariantProps<ReturnType<typeof windowContentThemeVariants>>;
34
- type WindowResizerVariantProps = VariantProps<ReturnType<typeof windowResizerThemeVariants>>;
32
+ type WindowContentVariantProps = VariantProps<typeof windowContentThemeVariants>;
33
+ type WindowResizerVariantProps = VariantProps<typeof windowResizerThemeVariants>;
35
34
  type WindowResizerVariantInput = VariantInputs<WindowResizerVariantProps>;
36
- type WindowTitleBarActionVariantProps = VariantProps<ReturnType<typeof windowTitleBarActionThemeVariants>>;
35
+ type WindowTitleBarActionVariantProps = VariantProps<typeof windowTitleBarActionThemeVariants>;
37
36
  type WindowTitleBarActionVariantInput = VariantInputs<WindowTitleBarActionVariantProps>;
38
- type WindowTitleBarVariantProps = VariantProps<ReturnType<typeof windowTitleBarThemeVariants>>;
37
+ type WindowTitleBarVariantProps = VariantProps<typeof windowTitleBarThemeVariants>;
39
38
  type WindowTitleBarVariantInput = VariantInputs<WindowTitleBarVariantProps>;
40
- type WindowTitleContainerVariantProps = VariantProps<ReturnType<typeof windowTitleContainerThemeVariants>>;
39
+ type WindowTitleContainerVariantProps = VariantProps<typeof windowTitleContainerThemeVariants>;
41
40
  type WindowTitleContainerVariantInput = VariantInputs<WindowTitleContainerVariantProps>;
42
- type WindowTitleVariantProps = VariantProps<ReturnType<typeof windowTitleThemeVariants>>;
41
+ type WindowTitleVariantProps = VariantProps<typeof windowTitleThemeVariants>;
43
42
  type WindowTitleVariantInput = VariantInputs<WindowTitleVariantProps>;
44
43
  type WindowVariantProps = WindowBaseVariantProps & WindowContentContainerVariantProps & WindowContentVariantProps & WindowResizerVariantProps & WindowTitleBarActionVariantProps & WindowTitleBarVariantProps & WindowTitleContainerVariantProps & WindowTitleVariantProps;
45
44
  type WindowVariantInput = WindowBaseVariantInput & WindowContentContainerVariantInput & Omit<WindowResizerVariantInput, "position"> & WindowTitleBarVariantInput & WindowTitleContainerVariantInput & WindowTitleBarActionVariantInput & WindowTitleVariantInput;
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-window.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-window.d.ts"
4
+ }
@@ -1,130 +0,0 @@
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