@memberjunction/ng-entity-viewer 6.2.0-edge.5 → 6.2.0-edge.7

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 (93) hide show
  1. package/README.md +28 -0
  2. package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.d.ts +48 -1
  3. package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.d.ts.map +1 -1
  4. package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js +631 -279
  5. package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js.map +1 -1
  6. package/dist/lib/entity-cards/entity-cards.component.d.ts +2 -0
  7. package/dist/lib/entity-cards/entity-cards.component.d.ts.map +1 -1
  8. package/dist/lib/entity-cards/entity-cards.component.js +30 -2
  9. package/dist/lib/entity-cards/entity-cards.component.js.map +1 -1
  10. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +162 -3
  11. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
  12. package/dist/lib/entity-data-grid/entity-data-grid.component.js +976 -300
  13. package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
  14. package/dist/lib/entity-data-grid/open-in-excel.d.ts +40 -0
  15. package/dist/lib/entity-data-grid/open-in-excel.d.ts.map +1 -0
  16. package/dist/lib/entity-data-grid/open-in-excel.js +60 -0
  17. package/dist/lib/entity-data-grid/open-in-excel.js.map +1 -0
  18. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts +42 -0
  19. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts.map +1 -1
  20. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js +109 -11
  21. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js.map +1 -1
  22. package/dist/lib/entity-viewer/entity-viewer.component.d.ts +51 -3
  23. package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
  24. package/dist/lib/entity-viewer/entity-viewer.component.js +222 -53
  25. package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
  26. package/dist/lib/entity-viewer/view-property-chips.d.ts +17 -0
  27. package/dist/lib/entity-viewer/view-property-chips.d.ts.map +1 -0
  28. package/dist/lib/entity-viewer/view-property-chips.js +42 -0
  29. package/dist/lib/entity-viewer/view-property-chips.js.map +1 -0
  30. package/dist/lib/recycle-bin/recycle-bin-chip.component.d.ts.map +1 -1
  31. package/dist/lib/recycle-bin/recycle-bin-chip.component.js +5 -4
  32. package/dist/lib/recycle-bin/recycle-bin-chip.component.js.map +1 -1
  33. package/dist/lib/recycle-bin/recycle-bin.component.js +3 -3
  34. package/dist/lib/recycle-bin/recycle-bin.component.js.map +1 -1
  35. package/dist/lib/utils/record.util.d.ts +44 -1
  36. package/dist/lib/utils/record.util.d.ts.map +1 -1
  37. package/dist/lib/utils/record.util.js +142 -0
  38. package/dist/lib/utils/record.util.js.map +1 -1
  39. package/dist/lib/view-config-panel/view-config-panel.component.d.ts +408 -55
  40. package/dist/lib/view-config-panel/view-config-panel.component.d.ts.map +1 -1
  41. package/dist/lib/view-config-panel/view-config-panel.component.js +3922 -993
  42. package/dist/lib/view-config-panel/view-config-panel.component.js.map +1 -1
  43. package/dist/lib/view-properties-editor/view-properties-editor.component.d.ts +52 -0
  44. package/dist/lib/view-properties-editor/view-properties-editor.component.d.ts.map +1 -0
  45. package/dist/lib/view-properties-editor/view-properties-editor.component.js +445 -0
  46. package/dist/lib/view-properties-editor/view-properties-editor.component.js.map +1 -0
  47. package/dist/lib/view-selector/view-selector.component.d.ts +28 -1
  48. package/dist/lib/view-selector/view-selector.component.d.ts.map +1 -1
  49. package/dist/lib/view-selector/view-selector.component.js +322 -168
  50. package/dist/lib/view-selector/view-selector.component.js.map +1 -1
  51. package/dist/lib/view-types/descriptors/calendar-view-type.d.ts +22 -0
  52. package/dist/lib/view-types/descriptors/calendar-view-type.d.ts.map +1 -0
  53. package/dist/lib/view-types/descriptors/calendar-view-type.js +38 -0
  54. package/dist/lib/view-types/descriptors/calendar-view-type.js.map +1 -0
  55. package/dist/lib/view-types/index.d.ts +3 -2
  56. package/dist/lib/view-types/index.d.ts.map +1 -1
  57. package/dist/lib/view-types/index.js +5 -2
  58. package/dist/lib/view-types/index.js.map +1 -1
  59. package/dist/lib/view-types/renderers/calendar-placement.d.ts +97 -0
  60. package/dist/lib/view-types/renderers/calendar-placement.d.ts.map +1 -0
  61. package/dist/lib/view-types/renderers/calendar-placement.js +145 -0
  62. package/dist/lib/view-types/renderers/calendar-placement.js.map +1 -0
  63. package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.d.ts +36 -0
  64. package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.d.ts.map +1 -0
  65. package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.js +167 -0
  66. package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.js.map +1 -0
  67. package/dist/lib/view-types/renderers/calendar-view-renderer.component.d.ts +107 -0
  68. package/dist/lib/view-types/renderers/calendar-view-renderer.component.d.ts.map +1 -0
  69. package/dist/lib/view-types/renderers/calendar-view-renderer.component.js +501 -0
  70. package/dist/lib/view-types/renderers/calendar-view-renderer.component.js.map +1 -0
  71. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts +9 -1
  72. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts.map +1 -1
  73. package/dist/lib/view-types/renderers/grid-view-renderer.component.js +24 -5
  74. package/dist/lib/view-types/renderers/grid-view-renderer.component.js.map +1 -1
  75. package/dist/lib/view-types/renderers/map-view-renderer.component.d.ts.map +1 -1
  76. package/dist/lib/view-types/renderers/map-view-renderer.component.js +3 -3
  77. package/dist/lib/view-types/renderers/map-view-renderer.component.js.map +1 -1
  78. package/dist/lib/view-types/view-type.contracts.d.ts +6 -0
  79. package/dist/lib/view-types/view-type.contracts.d.ts.map +1 -1
  80. package/dist/lib/view-types/view-type.contracts.js.map +1 -1
  81. package/dist/lib/view-workspace/view-workspace.component.d.ts +54 -1
  82. package/dist/lib/view-workspace/view-workspace.component.d.ts.map +1 -1
  83. package/dist/lib/view-workspace/view-workspace.component.js +274 -27
  84. package/dist/lib/view-workspace/view-workspace.component.js.map +1 -1
  85. package/dist/module.d.ts +35 -31
  86. package/dist/module.d.ts.map +1 -1
  87. package/dist/module.js +21 -3
  88. package/dist/module.js.map +1 -1
  89. package/dist/public-api.d.ts +5 -0
  90. package/dist/public-api.d.ts.map +1 -1
  91. package/dist/public-api.js +5 -0
  92. package/dist/public-api.js.map +1 -1
  93. package/package.json +23 -21
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter, OnChanges, OnInit, SimpleChanges, ChangeDetectorRef } from '@angular/core';
2
2
  import { BaseAngularComponent } from '@memberjunction/ng-base-types';
3
- import { EntityInfo, EntityFieldInfo } from '@memberjunction/core';
4
- import { MJUserViewEntityExtended, ViewGridState, MJUserViewEntity_IColumnFormat as ColumnFormat, MJUserViewEntity_IColumnTextStyle as ColumnTextStyle, MJUserViewEntity_IGridAggregatesConfig as ViewGridAggregatesConfig, MJUserViewEntity_IGridAggregate as ViewGridAggregate } from '@memberjunction/core-entities';
3
+ import { EntityInfo, EntityFieldInfo, EntityAlternateBaseViewInfo, UserViewProperty } from '@memberjunction/core';
4
+ import { MJUserViewEntityExtended, ViewGridState, MJUserViewEntity_IColumnFormat as ColumnFormat, MJUserViewEntity_IColumnTextStyle as ColumnTextStyle, MJUserViewEntity_IColumnConditionalRule as ColumnConditionalRule, MJUserViewEntity_IGridAggregatesConfig as ViewGridAggregatesConfig, MJUserViewEntity_IGridAggregateDisplay as ViewGridAggregateDisplay, MJUserViewEntity_IGridAggregate as ViewGridAggregate, MJUserViewEntity_IGridDisplayState as ViewGridDisplayState, MJUserViewEntity_IDisplayCardState as ViewCardState, MJUserViewEntity_ITimelineState as ViewTimelineState } from '@memberjunction/core-entities';
5
5
  import { CompositeFilterDescriptor, FilterFieldInfo } from '@memberjunction/ng-filter-builder';
6
6
  import { ViewConfigSummary } from '../types';
7
7
  import * as i0 from "@angular/core";
@@ -21,6 +21,8 @@ export interface ColumnConfig {
21
21
  field: EntityFieldInfo;
22
22
  /** Column formatting configuration */
23
23
  format?: ColumnFormat;
24
+ /** Optional column pinning position ('left', 'right', or null) */
25
+ pinned?: 'left' | 'right' | null;
24
26
  }
25
27
  /**
26
28
  * Sort item for multi-column sorting
@@ -36,6 +38,8 @@ export interface ViewSaveEvent {
36
38
  Name: string;
37
39
  Description: string;
38
40
  IsShared: boolean;
41
+ /** Optional flag indicating whether this view is the default view for the entity */
42
+ IsDefault?: boolean;
39
43
  SaveAsNew: boolean;
40
44
  Columns: ColumnConfig[];
41
45
  /** @deprecated Use SortItems instead for multi-sort support */
@@ -50,17 +54,48 @@ export interface ViewSaveEvent {
50
54
  FilterState: CompositeFilterDescriptor | null;
51
55
  /** Aggregates configuration */
52
56
  AggregatesConfig: ViewGridAggregatesConfig | null;
57
+ /** Optional semantic name of the alternate base view selected for this view */
58
+ AlternateBaseView?: string | null;
59
+ /** Optional flag locking WhereClause to a custom SQL expression */
60
+ CustomWhereClause?: boolean;
61
+ /** Optional custom SQL WHERE clause when CustomWhereClause is true */
62
+ WhereClause?: string;
63
+ /** Optional grid display preferences (rowHeight, wrapText) */
64
+ GridDisplayState?: ViewGridDisplayState | null;
65
+ /** Optional card display preferences (cardSize) */
66
+ CardDisplayState?: ViewCardState | null;
67
+ /** Optional timeline display preferences (dateFieldName, segmentGrouping, orientation) */
68
+ TimelineState?: ViewTimelineState | null;
69
+ /** The view's declared properties; an empty list means none. Absent on events that save no view (defaults). */
70
+ Properties?: UserViewProperty[];
53
71
  }
54
72
  /**
55
- * ViewConfigPanelComponent - Sliding panel for configuring view settings
73
+ * ViewConfigPanelComponent - Unified Full-Screen View Studio (`mj-view-config-panel`)
56
74
  *
57
- * Features:
58
- * - Column visibility and ordering with drag-drop
59
- * - Column formatting (number, currency, date, etc.)
60
- * - Sort configuration
61
- * - View name and description editing
62
- * - Share settings
63
- * - Save / Save As New / Cancel actions
75
+ * Architectural & UX Design Notes:
76
+ * 1. **Unified Full-Screen Studio & Alternate Base View Integration**:
77
+ * Configuring a User View spans five tightly coupled dimensions — `Columns`, `Filters`
78
+ * (Smart Filter, Visual Rule Builder, and Advanced SQL WHERE override), `Sorting`,
79
+ * `Aggregates` (Summary KPI Cards & Pinned Grid Totals via an integrated right-side
80
+ * Slide-In Drawer), and `Display` (Grid, Cards, Timeline) — plus the underlying
81
+ * **Data Source (Canonical Base View vs. Alternate SQL View)**.
82
+ * Opening `mj-view-config-panel` as a unified full-screen studio with progressive
83
+ * disclosure (**Regular Mode** by default vs. **Advanced Mode** on demand) eliminates
84
+ * fragmented modal popups and keeps Alternate Base View selection, SQL WHERE clause
85
+ * inspection/override (`<mj-code-editor Language="sql">`), and `__mj_*` system audit
86
+ * fields behind an intentional Advanced Mode toggle.
87
+ *
88
+ * 2. **Purpose-Built Rich Searchable Dropdowns & Visual Choice Cards (vs. `<mj-combobox>` / `<mj-dropdown>`)**:
89
+ * Standard `<mj-combobox>` and `<mj-dropdown>` components render single-line text items.
90
+ * In the View Studio (`Sorting` field picker, `Data Source` Alternate Base View picker,
91
+ * and `Display` / `Aggregates` field selectors), users need multi-line option cards
92
+ * displaying human-readable descriptions (`EntityField.Description` /
93
+ * `EntityAlternateBaseView.Description`), SQL data-type pills (`nvarchar`,
94
+ * `datetimeoffset`, etc. in Advanced Mode), `__mj_*` system-field badges, and
95
+ * viewport-aware flip-up positioning. These controls therefore intentionally use
96
+ * purpose-built searchable listbox dropdowns (`role="listbox"` / `role="option"`) and
97
+ * visual choice cards (`role="radiogroup"` / `role="radio"`) with keyboard navigation
98
+ * and `Escape` containment rather than generic single-line comboboxes.
64
99
  */
65
100
  export declare class ViewConfigPanelComponent extends BaseAngularComponent implements OnInit, OnChanges {
66
101
  private cdr;
@@ -68,10 +103,14 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
68
103
  * The entity being viewed
69
104
  */
70
105
  Entity: EntityInfo | null;
106
+ private _boundViewEntity;
107
+ private _detachedFromBoundView;
71
108
  /**
72
- * The current view entity (null for default view)
109
+ * The current view entity (null for default view, or while the open studio session has
110
+ * switched from "Save as New Named View" to "Personal Default Layout" mode).
73
111
  */
74
- ViewEntity: MJUserViewEntityExtended | null;
112
+ get ViewEntity(): MJUserViewEntityExtended | null;
113
+ set ViewEntity(value: MJUserViewEntityExtended | null);
75
114
  /**
76
115
  * Whether the panel is open
77
116
  */
@@ -146,13 +185,25 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
146
185
  * Pre-populated smart-filter prompt from the quick save dialog (used when DefaultSaveAsNew is true)
147
186
  */
148
187
  PendingNewViewSmartFilterPrompt: string;
188
+ /**
189
+ * Pre-populated alternate base view from the quick save dialog or workspace (used when DefaultSaveAsNew is true)
190
+ */
191
+ PendingNewViewAlternateBaseView: string | null;
149
192
  /**
150
193
  * Emitted when user wants to duplicate the current view (F-005)
151
194
  */
152
195
  Duplicate: EventEmitter<void>;
196
+ /**
197
+ * Emitted when the user switches from "Save as New Named View" to "Personal Default Layout"
198
+ * so the host can exit its new-view flow (#6037).
199
+ */
200
+ SwitchToDefaultLayout: EventEmitter<void>;
201
+ private _awaitingDefaultLayoutInputSync;
153
202
  ViewName: string;
154
203
  ViewDescription: string;
155
204
  IsShared: boolean;
205
+ IsDefault: boolean;
206
+ AlternateBaseView: string | null;
156
207
  Columns: ColumnConfig[];
157
208
  /** @deprecated Use sortItems instead */
158
209
  SortField: string | null;
@@ -160,9 +211,28 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
160
211
  SortDirection: 'asc' | 'desc';
161
212
  /** Multi-column sort configuration (ordered by priority) */
162
213
  SortItems: SortItem[];
214
+ IsCreatingNewView: boolean;
215
+ IsAdvancedMode: boolean;
216
+ ShowDescriptionEditor: boolean;
217
+ ShowGeneratedSmartSql: boolean;
218
+ ShowAdvancedSqlSection: boolean;
219
+ CustomWhereClause: boolean;
220
+ WhereClause: string;
221
+ ShowDisplayOptionsSection: boolean;
222
+ GridRowHeight: 'compact' | 'normal' | 'comfortable';
223
+ GridWrapText: boolean;
224
+ CardSize: 'small' | 'medium' | 'large';
225
+ TimelineDateField: string;
226
+ TimelineGrouping: 'none' | 'day' | 'week' | 'month' | 'quarter' | 'year';
227
+ TimelineOrientation: 'vertical' | 'horizontal';
228
+ ShowAggregateDisplaySection: boolean;
229
+ AggregateDisplay: Required<ViewGridAggregateDisplay>;
163
230
  DraggedSortItem: SortItem | null;
164
231
  DropTargetSortItem: SortItem | null;
165
232
  SortDropPosition: 'before' | 'after' | null;
233
+ OpenSortFieldDropdownIndex: number | null;
234
+ SortFieldSearchText: string;
235
+ SortDropdownDropUp: boolean;
166
236
  SortDirections: ({
167
237
  name: string;
168
238
  value: "asc";
@@ -175,65 +245,66 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
175
245
  SmartFilterExplanation: string;
176
246
  FilterState: CompositeFilterDescriptor;
177
247
  FilterFields: FilterFieldInfo[];
178
- FilterMode: 'smart' | 'traditional';
248
+ FilterMode: 'smart' | 'traditional' | 'sql';
179
249
  Aggregates: ViewGridAggregate[];
180
250
  ShowAggregateDialog: boolean;
181
251
  EditingAggregate: ViewGridAggregate | null;
182
252
  private savedSmartFilterPrompt;
183
253
  private savedTraditionalFilter;
184
254
  ShowFilterModeSwitchConfirm: boolean;
185
- PendingFilterModeSwitch: 'smart' | 'traditional' | null;
255
+ PendingFilterModeSwitch: 'smart' | 'traditional' | 'sql' | null;
186
256
  private _localSaving;
187
- ActiveTab: 'columns' | 'sorting' | 'filters' | 'aggregates' | 'settings';
257
+ ActiveTab: 'columns' | 'sorting' | 'filters' | 'aggregates' | 'properties' | 'settings' | 'display';
258
+ /** The view's declared properties being edited (a copy; the view changes only on save). */
259
+ Properties: UserViewProperty[];
188
260
  IsSaving: boolean;
189
261
  ColumnSearchText: string;
190
262
  DraggedColumn: ColumnConfig | null;
191
263
  DropTargetColumn: ColumnConfig | null;
192
264
  DropPosition: 'before' | 'after' | null;
193
265
  FormatEditingColumn: ColumnConfig | null;
194
- IsResizing: boolean;
195
- PanelWidth: number;
196
- private readonly MIN_PANEL_WIDTH;
197
- private readonly MAX_PANEL_WIDTH;
198
- private readonly DEFAULT_PANEL_WIDTH;
199
- /** Width threshold below which tabs show icons only */
200
- private readonly ICON_ONLY_THRESHOLD;
201
- private readonly PANEL_WIDTH_SETTING_KEY;
202
- private resizeStartX;
203
- private resizeStartWidth;
204
- /**
205
- * Whether tabs should show icons only (narrow panel mode)
206
- */
207
- get IsIconOnlyMode(): boolean;
208
- private metadata;
209
- constructor(cdr: ChangeDetectorRef);
266
+ ShowAddColumnsDrawer: boolean;
267
+ IsBaseViewDropdownOpen: boolean;
268
+ IsTimelineDateDropdownOpen: boolean;
269
+ SortHighlightIndex: number;
270
+ ShowDefaultLayoutSwitchConfirm: boolean;
271
+ IsFullScreen: boolean;
272
+ /** True when the Studio was opened via "+ Create New View" (DefaultSaveAsNew), even if a ViewEntity is currently selected */
273
+ IsSaveAsNewFlow: boolean;
274
+ private readonly ADVANCED_MODE_SETTING_KEY;
210
275
  /**
211
- * Handle keyboard shortcuts
212
- * Escape: Close the panel or format sub-panel
276
+ * Whether the panel is currently in expanded wide / full-screen studio mode
213
277
  */
214
- HandleEscape(): void;
278
+ get IsWideMode(): boolean;
215
279
  /**
216
- * Start resizing the panel
280
+ * Toggle Studio-Wide Advanced Mode (reveals Canonical Base View, SQL WHERE Clause mode,
281
+ * Conditional Formatting Rules, custom hex color overrides, and technical field metadata)
217
282
  */
218
- OnResizeStart(event: MouseEvent): void;
283
+ ToggleAdvancedMode(): void;
284
+ private metadata;
285
+ constructor(cdr: ChangeDetectorRef);
219
286
  /**
220
- * Handle resize movement (bound to document)
287
+ * Handle keyboard shortcuts
288
+ * Escape: Close open dropdown, format sub-panel, or the panel itself
221
289
  */
222
- private onResizeMove;
290
+ HandleEscape(event?: Event): void;
223
291
  /**
224
- * End resizing the panel (bound to document)
292
+ * Close custom dropdowns (Base View, Timeline Date Field, or Sort Field) when clicking outside
225
293
  */
226
- private onResizeEnd;
294
+ HandleDocumentClick(event: MouseEvent): void;
227
295
  ngOnInit(): void;
228
296
  /**
229
- * Load saved panel width from user settings
297
+ * Load saved studio preferences (advanced mode) from user settings
230
298
  */
231
- private loadSavedPanelWidth;
299
+ private loadSavedStudioPreferences;
300
+ ngOnChanges(changes: SimpleChanges): void;
232
301
  /**
233
- * Save panel width to user settings
302
+ * True when every reinit-triggering input in `changes` is merely echoing the default-layout
303
+ * reset (`ViewEntity → null`, `DefaultSaveAsNew → false`, `PendingNewViewAlternateBaseView → null`).
304
+ * Any genuine entity change, newly selected view, or new-view flow request returns `false` so
305
+ * the panel re-initializes normally even if a host did not bind `(SwitchToDefaultLayout)`.
234
306
  */
235
- private savePanelWidth;
236
- ngOnChanges(changes: SimpleChanges): void;
307
+ private isDefaultLayoutEchoChange;
237
308
  /**
238
309
  * Field names field-level security denies the current user READ on, lowercased. Empty when
239
310
  * there is no entity or resolved user, when the entity has field security off, or when nothing
@@ -249,7 +320,12 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
249
320
  */
250
321
  private initializeFromEntity;
251
322
  /**
252
- * Build filter fields from entity fields (including __mj_ fields for filtering by timestamps)
323
+ * Collect field names referenced anywhere in a CompositeFilterDescriptor
324
+ */
325
+ private collectFilterFieldNames;
326
+ /**
327
+ * Build filter fields from entity fields (hiding system __mj_ fields and raw sqlType badges
328
+ * in Standard Mode unless already referenced by an active rule or Advanced Mode is enabled)
253
329
  */
254
330
  private buildFilterFields;
255
331
  /**
@@ -264,6 +340,10 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
264
340
  * Handle filter state change from filter builder
265
341
  */
266
342
  OnFilterChange(filter: CompositeFilterDescriptor): void;
343
+ /**
344
+ * Handle Smart Filter prompt change and auto-suggest a view name when promoting from (Default)
345
+ */
346
+ OnSmartFilterPromptChange(value: string): void;
267
347
  /**
268
348
  * Open the filter dialog - emits event to parent (dashboard) which renders the dialog at viewport level
269
349
  */
@@ -293,25 +373,189 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
293
373
  */
294
374
  get VisibleColumns(): ColumnConfig[];
295
375
  /**
296
- * Get hidden columns
376
+ * Get hidden columns (in Standard Mode, hides internal __mj_* system columns unless Advanced Mode is ON)
297
377
  */
298
378
  get HiddenColumns(): ColumnConfig[];
299
379
  /**
300
- * Get filtered columns for search
380
+ * Get filtered columns for search (matches display name, technical name, description, or SQL type)
301
381
  */
302
382
  get FilteredHiddenColumns(): ColumnConfig[];
303
383
  /**
304
- * Get sortable fields for dropdown (including __mj_ fields for sorting by timestamps)
384
+ * Get sortable fields for dropdown (hiding internal __mj_* fields in Standard Mode unless already sorted)
305
385
  */
306
386
  get SortableFields(): EntityFieldInfo[];
387
+ /**
388
+ * Get date/time fields available on the entity for Timeline configuration
389
+ */
390
+ get AvailableDateFields(): EntityFieldInfo[];
391
+ /**
392
+ * Currently selected EntityFieldInfo for the Timeline Date Axis Field
393
+ */
394
+ get SelectedTimelineDateFieldInfo(): EntityFieldInfo | undefined;
395
+ /**
396
+ * Friendly label for the currently selected Timeline Date Axis Field
397
+ */
398
+ get SelectedTimelineDateFieldLabel(): string;
399
+ /**
400
+ * Toggle the custom Timeline Date Axis Field dropdown
401
+ */
402
+ ToggleTimelineDateDropdown(event?: MouseEvent): void;
403
+ /**
404
+ * Select a date field for Timeline View Defaults
405
+ */
406
+ SelectTimelineDateField(fieldName: string, event?: MouseEvent): void;
407
+ /**
408
+ * Keyboard navigation (ArrowDown / ArrowUp / Enter / Escape) for the Timeline Date Axis Field trigger
409
+ */
410
+ OnTimelineDateTriggerKeydown(event: KeyboardEvent): void;
411
+ /**
412
+ * Set Grid Row Density preference
413
+ */
414
+ SetGridRowHeight(density: 'compact' | 'normal' | 'comfortable'): void;
415
+ /**
416
+ * Toggle Grid cell text wrapping preference
417
+ */
418
+ ToggleGridWrapText(): void;
419
+ /**
420
+ * Set Card View size preference
421
+ */
422
+ SetCardSize(size: 'small' | 'medium' | 'large'): void;
423
+ /**
424
+ * Set Timeline segment grouping preference
425
+ */
426
+ SetTimelineGrouping(grouping: 'none' | 'day' | 'week' | 'month' | 'quarter' | 'year'): void;
427
+ /**
428
+ * Set Timeline layout orientation preference
429
+ */
430
+ SetTimelineOrientation(orientation: 'vertical' | 'horizontal'): void;
307
431
  /**
308
432
  * Check if the current user can edit the view
309
433
  */
310
434
  get CanEdit(): boolean;
435
+ /**
436
+ * Check if the current user can create or modify a custom SQL WHERE clause on this view.
437
+ * Server-side validation (`MJUserViewEntityServer.validateCustomWhereClauseAuthorization`)
438
+ * restricts `CustomWhereClause` to Owner-type administrators (failing closed when user/Type
439
+ * is missing) because raw SQL bypasses client-clause screening (#6037).
440
+ */
441
+ get CanEditCustomSql(): boolean;
311
442
  /**
312
443
  * Check if the current user can delete the view
313
444
  */
314
445
  get CanDelete(): boolean;
446
+ /**
447
+ * True when the current configuration has an active filter, alternate base view, or custom SQL
448
+ * that requires a named view rather than the personal default layout setting.
449
+ */
450
+ get HasActiveFilterOrBaseView(): boolean;
451
+ /**
452
+ * True when the panel is in "Creating New Named View" mode (either opened with DefaultSaveAsNew,
453
+ * promoted via "Save as Named View...", or automatically promoted because a filter/ABV was configured).
454
+ */
455
+ get IsCreatingNamedView(): boolean;
456
+ /**
457
+ * True when the user opened the Studio on (Default) and it automatically promoted to a Named View
458
+ * because a filter, Smart Filter prompt, Alternate Base View, or Custom SQL WHERE was added.
459
+ */
460
+ get WasAutoPromotedToNamedView(): boolean;
461
+ /**
462
+ * Promote the panel from Personal Default View mode to Creating New Named View mode in-place
463
+ */
464
+ PromoteToNewView(): void;
465
+ /**
466
+ * Request switching from "Save as New Named View" back to "Personal Default Layout" mode.
467
+ * When active filter rules, a Smart Filter prompt, an Alternate Base View, or Custom SQL WHERE
468
+ * would be discarded, prompts the user for confirmation first.
469
+ */
470
+ RequestSwitchToDefaultLayoutMode(): void;
471
+ /**
472
+ * Confirm discarding filter/base-view settings and switching to Personal Default Layout mode.
473
+ */
474
+ OnDefaultLayoutSwitchConfirmed(): void;
475
+ /**
476
+ * Cancel switching to Personal Default Layout mode.
477
+ */
478
+ OnDefaultLayoutSwitchCancelled(): void;
479
+ /**
480
+ * Switch from "Save as New Named View" back to "Personal Default Layout" mode.
481
+ * Detaches any bound ViewEntity for this Studio session and clears filters, alternate base view,
482
+ * and properties so saving writes the user's default layout rather than overwriting a previously
483
+ * selected view (#6037).
484
+ */
485
+ SwitchToDefaultLayoutMode(): void;
486
+ /**
487
+ * Build a smart suggested name based on the entity, alternate base view, or active filter
488
+ */
489
+ BuildSuggestedViewName(): string;
490
+ /**
491
+ * Toggle sharing between Private (My View) and Shared with Team
492
+ */
493
+ ToggleShared(): void;
494
+ /**
495
+ * Toggle whether this view is the user's Default View for the entity
496
+ */
497
+ ToggleDefaultView(): void;
498
+ /**
499
+ * Toggle the inline description textarea in the Pinned Identity Header
500
+ */
501
+ ToggleDescriptionEditor(): void;
502
+ /**
503
+ * Label shown in the Filter recipe chip in the header
504
+ */
505
+ get FilterChipLabel(): string;
506
+ /**
507
+ * Whether the Filter recipe chip should be highlighted as active
508
+ */
509
+ get HasActiveFilterChip(): boolean;
510
+ /**
511
+ * Count of visible columns that are pinned left or right
512
+ */
513
+ get PinnedColumnsCount(): number;
514
+ /**
515
+ * Summary label for the Sort recipe chip in the header
516
+ */
517
+ get SortSummaryLabel(): string;
518
+ /**
519
+ * Get available alternate base views for this entity (Active, plus any Deprecated one currently selected)
520
+ */
521
+ get AvailableAlternateBaseViews(): EntityAlternateBaseViewInfo[];
522
+ /**
523
+ * True when the view currently pins an AlternateBaseView that is disabled or no longer registered
524
+ * on the entity, so the UI can show it and let the user reset to Default.
525
+ */
526
+ get IsCurrentAlternateBaseViewUnavailable(): boolean;
527
+ /**
528
+ * Toggle the custom Alternate Base View dropdown
529
+ */
530
+ ToggleBaseViewDropdown(event?: MouseEvent): void;
531
+ /**
532
+ * Select a base view option from the custom dropdown
533
+ */
534
+ SelectBaseView(name: string | null, event?: MouseEvent): void;
535
+ /**
536
+ * Keyboard navigation (ArrowDown / ArrowUp / Enter / Escape) for the Alternate Base View trigger
537
+ */
538
+ OnBaseViewTriggerKeydown(event: KeyboardEvent): void;
539
+ /**
540
+ * Check if a given alternate base view name matches the current selection (case-insensitive)
541
+ */
542
+ IsAlternateBaseViewSelected(name: string | null): boolean;
543
+ /**
544
+ * Currently selected EntityAlternateBaseViewInfo (if an available alternate base view is selected)
545
+ */
546
+ get SelectedAlternateBaseViewInfo(): EntityAlternateBaseViewInfo | null;
547
+ /**
548
+ * Primary label shown in the custom Base View dropdown trigger
549
+ */
550
+ get SelectedBaseViewLabel(): string;
551
+ /**
552
+ * Physical SQL view name shown as a monospace badge in the trigger
553
+ */
554
+ get SelectedBaseViewSqlName(): string | null;
555
+ /**
556
+ * Description for the currently selected Base View shown below the trigger
557
+ */
558
+ get SelectedBaseViewDescription(): string;
315
559
  /**
316
560
  * Toggle column visibility
317
561
  */
@@ -372,6 +616,30 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
372
616
  * Get the display name for a field
373
617
  */
374
618
  GetFieldDisplayName(fieldName: string): string;
619
+ /**
620
+ * Get the EntityFieldInfo for a sort item's field
621
+ */
622
+ GetSortFieldInfo(fieldName: string): EntityFieldInfo | undefined;
623
+ /**
624
+ * Toggle the custom searchable sort field dropdown for a given sort item index
625
+ */
626
+ ToggleSortFieldDropdown(index: number, event?: MouseEvent): void;
627
+ /**
628
+ * Get sortable fields filtered by the user's search query (display name, technical name, type, or description)
629
+ */
630
+ GetFilteredSortableFields(currentSortItem: SortItem): EntityFieldInfo[];
631
+ /**
632
+ * Select a field from the custom sort field dropdown
633
+ */
634
+ SelectSortField(sortItem: SortItem, fieldName: string, event?: MouseEvent): void;
635
+ /**
636
+ * Handle keyboard navigation (ArrowDown / ArrowUp / Enter / Escape) in the sort field search input
637
+ */
638
+ OnSortSearchKeydown(event: KeyboardEvent, sortItem?: SortItem): void;
639
+ /**
640
+ * Handle keyboard navigation on the sort field trigger button
641
+ */
642
+ OnSortTriggerKeydown(event: KeyboardEvent, sortItem: SortItem, index: number): void;
375
643
  /**
376
644
  * Get fields available for a sort item (excludes already selected fields except current)
377
645
  */
@@ -421,7 +689,19 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
421
689
  */
422
690
  IsSortDropAfter(sortItem: SortItem): boolean;
423
691
  /**
424
- * Open the format editor for a column
692
+ * Open the on-demand Add Columns drawer (closing Column Inspector if open)
693
+ */
694
+ OpenAddColumnsDrawer(): void;
695
+ /**
696
+ * Close the on-demand Add Columns drawer
697
+ */
698
+ CloseAddColumnsDrawer(): void;
699
+ /**
700
+ * Toggle the on-demand Add Columns drawer
701
+ */
702
+ ToggleAddColumnsDrawer(): void;
703
+ /**
704
+ * Open the format editor for a column (closing Add Columns drawer if open)
425
705
  */
426
706
  OpenFormatEditor(column: ColumnConfig): void;
427
707
  /**
@@ -473,6 +753,8 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
473
753
  * Get validation errors for the current form state
474
754
  */
475
755
  get ValidationErrors(): string[];
756
+ /** Problems with the view's properties, each naming the property; any one blocks saving. */
757
+ get PropertyErrors(): string[];
476
758
  /**
477
759
  * Whether the form is valid for saving
478
760
  */
@@ -485,6 +767,10 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
485
767
  * Build a ViewConfigSummary for quick-save preview (F-003)
486
768
  */
487
769
  BuildSummary(): ViewConfigSummary;
770
+ /**
771
+ * Build the ViewSaveEvent payload with all Unified View Studio & progressive disclosure settings
772
+ */
773
+ private buildSaveEvent;
488
774
  /**
489
775
  * Save the view
490
776
  */
@@ -493,6 +779,10 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
493
779
  * Save as a new view
494
780
  */
495
781
  OnSaveAsNew(): void;
782
+ /**
783
+ * Save edits to an existing view as a new personal copy without overwriting the original
784
+ */
785
+ OnSaveAsCopy(): void;
496
786
  /**
497
787
  * Save default view settings to user settings
498
788
  * Used for dynamic/default views that don't have a stored view entity
@@ -518,12 +808,13 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
518
808
  /**
519
809
  * Set the active tab
520
810
  */
521
- SetActiveTab(tab: 'columns' | 'sorting' | 'filters' | 'aggregates' | 'settings'): void;
811
+ SetActiveTab(tab: 'columns' | 'sorting' | 'filters' | 'aggregates' | 'properties' | 'settings' | 'display'): void;
522
812
  /**
523
- * Set the filter mode (smart or traditional)
524
- * BUG-006: Shows confirmation when switching if active mode has data
813
+ * Set the filter mode ('smart', 'traditional', or 'sql')
814
+ * Switching to 'sql' shows the read-only compiled SQL from Smart Filter or Rule Builder
815
+ * until the user checks the one-way Custom SQL Override checkbox.
525
816
  */
526
- SetFilterMode(mode: 'smart' | 'traditional'): void;
817
+ SetFilterMode(mode: 'smart' | 'traditional' | 'sql'): void;
527
818
  /**
528
819
  * Check if the current filter mode has user-entered data
529
820
  */
@@ -540,10 +831,72 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
540
831
  * Apply the filter mode switch - saves current mode data and restores target mode data
541
832
  */
542
833
  private applyFilterModeSwitch;
834
+ /**
835
+ * Compile a CompositeFilterDescriptor into a SQL WHERE expression using the canonical
836
+ * `MJUserViewEntityExtended.GenerateWhereClauseFromFilterState` compiler when entity metadata is present.
837
+ */
838
+ CompileFilterStateToSqlWhere(filter?: CompositeFilterDescriptor): string;
839
+ /**
840
+ * Compile a single FilterDescriptor rule into a SQL condition (fallback when Entity metadata is unavailable)
841
+ */
842
+ private compileSingleRuleToSql;
843
+ /**
844
+ * Returns the SQL WHERE clause generated from the active Rule Builder or Smart Filter
845
+ */
846
+ get GeneratedSqlWhereClause(): string;
847
+ /**
848
+ * Returns the SQL string displayed inside <mj-code-editor Language="sql">:
849
+ * - When CustomWhereClause is true (override checked): returns the editable WhereClause
850
+ * - When CustomWhereClause is false (read-only): returns the live SQL from Rule Builder / Smart Filter
851
+ */
852
+ get DisplayedSqlWhereClause(): string;
853
+ /**
854
+ * Human-readable badge describing the source of the SQL shown in <mj-code-editor>
855
+ */
856
+ get SqlWhereSourceLabel(): string;
857
+ /**
858
+ * Handle toggling the one-way Custom SQL WHERE Override checkbox.
859
+ * Non-Owner editors may turn an existing override OFF (`enabled === false`) to revert a view
860
+ * to Smart Filter or Rule Builder, matching `MJUserViewEntityServer`, while turning it ON
861
+ * requires `CanEditCustomSql` (#6037).
862
+ */
863
+ OnToggleCustomWhereOverride(enabled: boolean): void;
864
+ /**
865
+ * Handle changes emitted from <mj-code-editor> when CustomWhereClause is enabled
866
+ */
867
+ OnCustomSqlWhereChange(value: string): void;
543
868
  /**
544
869
  * Apply a smart filter example to the prompt field
545
870
  */
546
871
  ApplySmartFilterExample(example: string): void;
872
+ /**
873
+ * Cycle a column's pin position: None -> Pin Left -> Pin Right -> None
874
+ */
875
+ ToggleColumnPin(column: ColumnConfig, event?: MouseEvent): void;
876
+ /**
877
+ * Explicitly set a column's pin position ('left', 'right', or null)
878
+ */
879
+ SetColumnPin(column: ColumnConfig, pinned: 'left' | 'right' | null): void;
880
+ /**
881
+ * Reset columns to entity metadata defaults (DefaultInView)
882
+ */
883
+ ResetColumnsToDefault(): void;
884
+ /**
885
+ * Make all columns visible
886
+ */
887
+ ShowAllColumns(): void;
888
+ /**
889
+ * Add a new conditional formatting rule to the currently edited column
890
+ */
891
+ AddConditionalRule(): void;
892
+ /**
893
+ * Remove a conditional formatting rule by index
894
+ */
895
+ RemoveConditionalRule(index: number): void;
896
+ /**
897
+ * Apply a semantic color preset to a conditional formatting rule
898
+ */
899
+ ApplyConditionalPreset(rule: ColumnConditionalRule, preset: 'success' | 'warning' | 'danger' | 'info' | 'bold'): void;
547
900
  /**
548
901
  * Toggle a header style property
549
902
  */
@@ -613,6 +966,6 @@ export declare class ViewConfigPanelComponent extends BaseAngularComponent imple
613
966
  */
614
967
  private buildAggregatesConfig;
615
968
  static ɵfac: i0.ɵɵFactoryDeclaration<ViewConfigPanelComponent, never>;
616
- static ɵcmp: i0.ɵɵComponentDeclaration<ViewConfigPanelComponent, "mj-view-config-panel", never, { "Entity": { "alias": "Entity"; "required": false; }; "ViewEntity": { "alias": "ViewEntity"; "required": false; }; "IsOpen": { "alias": "IsOpen"; "required": false; }; "CurrentGridState": { "alias": "CurrentGridState"; "required": false; }; "SampleData": { "alias": "SampleData"; "required": false; }; "ExternalFilterState": { "alias": "ExternalFilterState"; "required": false; }; "DefaultSaveAsNew": { "alias": "DefaultSaveAsNew"; "required": false; }; "PendingNewViewName": { "alias": "PendingNewViewName"; "required": false; }; "PendingNewViewDescription": { "alias": "PendingNewViewDescription"; "required": false; }; "PendingNewViewIsShared": { "alias": "PendingNewViewIsShared"; "required": false; }; "PendingNewViewFilterState": { "alias": "PendingNewViewFilterState"; "required": false; }; "PendingNewViewSmartFilterEnabled": { "alias": "PendingNewViewSmartFilterEnabled"; "required": false; }; "PendingNewViewSmartFilterPrompt": { "alias": "PendingNewViewSmartFilterPrompt"; "required": false; }; "IsSaving": { "alias": "IsSaving"; "required": false; }; }, { "Close": "Close"; "Save": "Save"; "SaveDefaults": "SaveDefaults"; "Delete": "Delete"; "OpenFilterDialogRequest": "OpenFilterDialogRequest"; "Duplicate": "Duplicate"; }, never, never, false, never>;
969
+ static ɵcmp: i0.ɵɵComponentDeclaration<ViewConfigPanelComponent, "mj-view-config-panel", never, { "Entity": { "alias": "Entity"; "required": false; }; "ViewEntity": { "alias": "ViewEntity"; "required": false; }; "IsOpen": { "alias": "IsOpen"; "required": false; }; "CurrentGridState": { "alias": "CurrentGridState"; "required": false; }; "SampleData": { "alias": "SampleData"; "required": false; }; "ExternalFilterState": { "alias": "ExternalFilterState"; "required": false; }; "DefaultSaveAsNew": { "alias": "DefaultSaveAsNew"; "required": false; }; "PendingNewViewName": { "alias": "PendingNewViewName"; "required": false; }; "PendingNewViewDescription": { "alias": "PendingNewViewDescription"; "required": false; }; "PendingNewViewIsShared": { "alias": "PendingNewViewIsShared"; "required": false; }; "PendingNewViewFilterState": { "alias": "PendingNewViewFilterState"; "required": false; }; "PendingNewViewSmartFilterEnabled": { "alias": "PendingNewViewSmartFilterEnabled"; "required": false; }; "PendingNewViewSmartFilterPrompt": { "alias": "PendingNewViewSmartFilterPrompt"; "required": false; }; "PendingNewViewAlternateBaseView": { "alias": "PendingNewViewAlternateBaseView"; "required": false; }; "IsSaving": { "alias": "IsSaving"; "required": false; }; }, { "Close": "Close"; "Save": "Save"; "SaveDefaults": "SaveDefaults"; "Delete": "Delete"; "OpenFilterDialogRequest": "OpenFilterDialogRequest"; "Duplicate": "Duplicate"; "SwitchToDefaultLayout": "SwitchToDefaultLayout"; }, never, never, false, never>;
617
970
  }
618
971
  //# sourceMappingURL=view-config-panel.component.d.ts.map