udp-stencil-component-library 26.2.0-beta.1 → 26.2.0-beta.2

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 (29) hide show
  1. package/dist/cjs/{SearchBuilder-BsB_257b.js → SearchBuilder-aqpLQz8E.js} +4 -0
  2. package/dist/cjs/ag-grid-base_63.cjs.entry.js +33 -6
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/resource-timeline-calendar.cjs.entry.js +14 -2
  5. package/dist/cjs/resource-timeline-primary-bar.cjs.entry.js +5 -1
  6. package/dist/cjs/udp-forms-renderer.cjs.entry.js +1 -1
  7. package/dist/collection/components/grid/new-grid/gridFunctions/savedViews.js +33 -6
  8. package/dist/collection/components/grid/resource-timeline-calendar/resource-timeline-calendar.js +14 -2
  9. package/dist/collection/components/grid/resource-timeline-calendar/resource-timeline-primary-bar.js +5 -1
  10. package/dist/collection/udp-utilities/search/SearchBuilder.js +4 -0
  11. package/dist/components/SearchBuilder.js +1 -1
  12. package/dist/components/ag-grid-base2.js +1 -1
  13. package/dist/components/resource-timeline-calendar.js +1 -1
  14. package/dist/components/resource-timeline-primary-bar2.js +1 -1
  15. package/dist/docs.json +8 -1
  16. package/dist/esm/{SearchBuilder-CiCHnrfs.js → SearchBuilder-DlL9u8ku.js} +4 -0
  17. package/dist/esm/ag-grid-base_63.entry.js +33 -6
  18. package/dist/esm/index.js +1 -1
  19. package/dist/esm/resource-timeline-calendar.entry.js +14 -2
  20. package/dist/esm/resource-timeline-primary-bar.entry.js +5 -1
  21. package/dist/esm/udp-forms-renderer.entry.js +1 -1
  22. package/dist/stencil-library/{SearchBuilder-CiCHnrfs.js → SearchBuilder-DlL9u8ku.js} +1 -1
  23. package/dist/stencil-library/ag-grid-base_63.entry.js +1 -1
  24. package/dist/stencil-library/index.esm.js +1 -1
  25. package/dist/stencil-library/resource-timeline-calendar.entry.js +1 -1
  26. package/dist/stencil-library/resource-timeline-primary-bar.entry.js +1 -1
  27. package/dist/stencil-library/udp-forms-renderer.entry.js +1 -1
  28. package/dist/types/components/grid/new-grid/gridFunctions/savedViews.d.ts +2 -0
  29. package/package.json +1 -1
@@ -309,6 +309,10 @@ class SearchUtilities {
309
309
  if (!validation.isValid) {
310
310
  throw new Error(`Invalid search: ${validation.errors.join(', ')}`);
311
311
  }
312
+ // Wait for ConfigService to be initialized — callers may invoke this from
313
+ // top-level effects that mount before the app sets PRODUCT_API_DOMAIN,
314
+ // which would otherwise produce a relative URL and fail the request.
315
+ await configService.ConfigService.waitForConfig();
312
316
  // Build the API URL
313
317
  const url = `${configService.ConfigService.productV1ApiUrl}/${tableName}/search`;
314
318
  // Execute the search
@@ -291,10 +291,15 @@ class SavedViews {
291
291
  var _a;
292
292
  if (!this.baseColumnState)
293
293
  return;
294
- const currentColIds = ((_a = this.api.getColumnState()) !== null && _a !== void 0 ? _a : []).map(c => c.colId).join(',');
295
- const baseColIds = JSON.parse(this.baseColumnState)
294
+ // Compare only primary (user-defined) colIds pivot result columns regenerate
295
+ // from filtered data and shouldn't be treated as external column-def updates.
296
+ const primaryColIds = this.getPrimaryColIds();
297
+ const collectColIds = (state) => state
298
+ .filter(c => primaryColIds.has(c.colId))
296
299
  .map(c => c.colId)
297
300
  .join(',');
301
+ const currentColIds = collectColIds((_a = this.api.getColumnState()) !== null && _a !== void 0 ? _a : []);
302
+ const baseColIds = collectColIds(JSON.parse(this.baseColumnState));
298
303
  if (currentColIds !== baseColIds) {
299
304
  this.baseColumnState = JSON.stringify(this.api.getColumnState());
300
305
  if (this.isDirty) {
@@ -350,8 +355,26 @@ class SavedViews {
350
355
  this.saveCurrentStateToLocalStorage();
351
356
  });
352
357
  };
358
+ // Returns the set of colIds for primary (user-defined) columns. Pivot result
359
+ // columns are secondary and excluded — they regenerate from filtered data and
360
+ // would cause spurious dirty diffs.
361
+ this.getPrimaryColIds = () => {
362
+ var _a;
363
+ return new Set(((_a = this.api.getColumns()) !== null && _a !== void 0 ? _a : [])
364
+ .filter(c => c.isPrimary())
365
+ .map(c => c.getColId()));
366
+ };
367
+ // Serializes column state to a JSON string filtered to primary columns only.
368
+ // Using a positive include filter (vs. excluding pivot result ids) keeps the
369
+ // comparison symmetric across snapshots — stale pivot ids in older baselines
370
+ // get dropped automatically because they aren't in the current primary set.
371
+ this.serializeUserColumnState = (state) => {
372
+ const primaryColIds = this.getPrimaryColIds();
373
+ return JSON.stringify(state.filter(c => primaryColIds.has(c.colId)));
374
+ };
353
375
  // Compare current grid state against snapshot (view active) or default empty state (no view)
354
376
  this.checkIfDirty = () => {
377
+ var _a, _b;
355
378
  // Skip during initial setup — baseline will be recaptured after parent
356
379
  // gridReady handlers (e.g. search-method-grid) finish applying state.
357
380
  if (this.baselineRecaptureId !== null)
@@ -359,18 +382,22 @@ class SavedViews {
359
382
  let dirty;
360
383
  if (this.activeViewId && this.activeViewState) {
361
384
  // Named view active: compare against the snapshot taken when the view was applied
362
- const currentColumnState = JSON.stringify(this.api.getColumnState());
385
+ const currentColumnState = this.serializeUserColumnState((_a = this.api.getColumnState()) !== null && _a !== void 0 ? _a : []);
386
+ const baseColumnState = this.serializeUserColumnState(JSON.parse(this.activeViewState.columnState));
363
387
  const currentFilterModel = JSON.stringify(this.api.getFilterModel());
364
388
  dirty =
365
- currentColumnState !== this.activeViewState.columnState ||
389
+ currentColumnState !== baseColumnState ||
366
390
  currentFilterModel !== this.activeViewState.filterModel;
367
391
  }
368
392
  else {
369
393
  // No view: dirty if there are any active filters or column state changes vs baseline
370
394
  const filterModel = this.api.getFilterModel();
371
395
  const hasFilters = Object.keys(filterModel !== null && filterModel !== void 0 ? filterModel : {}).length > 0;
372
- const columnState = this.api.getColumnState();
373
- const hasColumnChanges = this.baseColumnState !== null && JSON.stringify(columnState) !== this.baseColumnState;
396
+ const currentColumnState = this.serializeUserColumnState((_b = this.api.getColumnState()) !== null && _b !== void 0 ? _b : []);
397
+ const baseColumnState = this.baseColumnState !== null
398
+ ? this.serializeUserColumnState(JSON.parse(this.baseColumnState))
399
+ : null;
400
+ const hasColumnChanges = baseColumnState !== null && currentColumnState !== baseColumnState;
374
401
  dirty = hasFilters || hasColumnChanges;
375
402
  }
376
403
  if (dirty !== this.isDirty) {
@@ -4,7 +4,7 @@ var formRegistry = require('./form-registry-Cme6U-bl.js');
4
4
  var axios = require('axios');
5
5
  var transformSearchData = require('./transformSearchData-B4bk4Aik.js');
6
6
  var catalogStore = require('./catalog-store-COlrLo9B.js');
7
- var SearchBuilder = require('./SearchBuilder-BsB_257b.js');
7
+ var SearchBuilder = require('./SearchBuilder-aqpLQz8E.js');
8
8
  var searchObject = require('./searchObject-DeDFFGcx.js');
9
9
  var catalogTree = require('./catalogTree-CnzW15ah.js');
10
10
  var configService = require('./configService-BqiLnW8G.js');
@@ -106,6 +106,7 @@ const ResourceTimelineCalendar = class {
106
106
  field: this.dateKey,
107
107
  pivot: true,
108
108
  pivotComparator: this.dateCompare,
109
+ suppressFiltersToolPanel: true,
109
110
  valueGetter: params => {
110
111
  let dateString = '';
111
112
  if (this.convertDatesFromUTC) {
@@ -153,7 +154,7 @@ const ResourceTimelineCalendar = class {
153
154
  }
154
155
  render() {
155
156
  const todayString = new Date().toLocaleDateString('en-US');
156
- return (index.h("div", { key: '59969c807543a3d784c33d9daebfc13b595b1c57', class: "resource-timeline-calendar" }, index.h("resource-timeline-primary-bar", { key: '9291d971dab58ceda1831aa8bac8f5b3b7702609', gridBarTitle: this.gridBarTitle, subTitle: this.subTitle, primaryAction: this.primaryAction, secondaryAction: this.secondaryAction, clickBackward: this.handleClickBackward, clickForward: this.handleClickForward, clickToday: this.handleClickToday, subtitleStatus: this.subtitleStatus, subtitleStatusMappingClasses: this.subtitleStatusMappingClasses, disableHeaderActions: this.disableHeaderActions, showLockedIcon: this.showLockedIcon }, index.h("slot", { key: '8bbed2a4ebe80ca56f603f79d605aabc5f2ea7df', name: "inline", slot: "inline" })), index.h("client-side-grid", { key: 'ca2e71b84be0014e36eca1d5531e7346fcebfa72', rowData: this.filledRowData, columnDefs: this.formattedColumnDefs, gridFunctions: this.getGridFunctions(), gridId: this.gridId, gridOptions: Object.assign(Object.assign({}, this.additionalGridOptions), { components: {
157
+ return (index.h("div", { key: '92e721dafa80975ead78ed3e8fba36a65636a8d0', class: "resource-timeline-calendar" }, index.h("resource-timeline-primary-bar", { key: 'e17ff97f7069c5a057caad6168534738dbc79c53', gridBarTitle: this.gridBarTitle, subTitle: this.subTitle, primaryAction: this.primaryAction, secondaryAction: this.secondaryAction, clickBackward: this.handleClickBackward, clickForward: this.handleClickForward, clickToday: this.handleClickToday, subtitleStatus: this.subtitleStatus, subtitleStatusMappingClasses: this.subtitleStatusMappingClasses, disableHeaderActions: this.disableHeaderActions, showLockedIcon: this.showLockedIcon }, index.h("slot", { key: '4eb8edb054f962695c7b018508ea718d5bafec16', name: "inline", slot: "inline" })), index.h("client-side-grid", { key: '32bfe633f571dd7a47d773cff67042be5b6b19f0', rowData: this.filledRowData, columnDefs: this.formattedColumnDefs, gridFunctions: this.getGridFunctions(), gridId: this.gridId, gridOptions: Object.assign(Object.assign({}, this.additionalGridOptions), { components: {
157
158
  resourceTimelineCalendarHeader: ResourceTimelineColumnHeader,
158
159
  }, processPivotResultColDef: colDef => {
159
160
  colDef.suppressHeaderContextMenu = true;
@@ -196,7 +197,11 @@ const ResourceTimelineCalendar = class {
196
197
  return params.node.group &&
197
198
  ((_c = (_b = (_a = params.node.allLeafChildren) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.isDateRangePlaceholder) === true;
198
199
  },
199
- }, pivotMode: true, quickFilterMatcher: () => true, isExternalFilterPresent: () => this.externalFilterText.length > 0, doesExternalFilterPass: (node) => {
200
+ }, pivotMode: true,
201
+ // Placeholder rows anchor pivot date columns so all days remain visible
202
+ // regardless of filters. alwaysPassFilter exempts them from every filter
203
+ // type (column, quick, external, advanced) without per-filter wiring.
204
+ alwaysPassFilter: (node) => { var _a; return ((_a = node.data) === null || _a === void 0 ? void 0 : _a.isDateRangePlaceholder) === true; }, quickFilterMatcher: () => true, isExternalFilterPresent: () => this.externalFilterText.length > 0, doesExternalFilterPass: (node) => {
200
205
  var _a, _b;
201
206
  if ((_a = node.data) === null || _a === void 0 ? void 0 : _a.isDateRangePlaceholder)
202
207
  return true;
@@ -213,6 +218,13 @@ const ResourceTimelineCalendar = class {
213
218
  });
214
219
  }, removePivotHeaderRowWhenSingleValueColumn: true, suppressAggFuncInHeader: true, pivotRowTotals: 'after', suppressMovableColumns: true, enableStrictPivotColumnOrder: true, rowGroupPanelShow: this.rowGroupPanelShow, sideBar: {
215
220
  toolPanels: [
221
+ {
222
+ id: 'filters',
223
+ labelDefault: 'Filters',
224
+ labelKey: 'filters',
225
+ iconKey: 'filter',
226
+ toolPanel: 'agFiltersToolPanel',
227
+ },
216
228
  {
217
229
  id: 'columns',
218
230
  labelDefault: 'Columns',
@@ -28,7 +28,11 @@ const ResourceTimelinePrimaryBar = class {
28
28
  Object.assign(Object.assign({}, this.secondaryAction), { label: (_d = this.secondaryAction.label) !== null && _d !== void 0 ? _d : '', disabled: this.secondaryAction.disabled || this.disableHeaderActions }),
29
29
  ]
30
30
  : [];
31
- return (index.h("udp-primary-action-header", { key: 'f5edf0459f7e0f6136ed8e3056db4b788369164e', primaryAction: primaryAction, secondaryActions: secondaryActions }, index.h("span", { key: '4b539edaaa740cff41c3c4e1a8b6086d4f4c54df', slot: "title" }, this.gridBarTitle != null ? this.gridBarTitle : index.h("udp-skeleton-loading", { width: "200px" })), index.h("span", { key: '27488b2c8536a873ff3d764c7fa614be67234584', slot: "subtitle" }, this.subTitle != null ? this.subTitle : index.h("udp-skeleton-loading", { width: "200px" })), index.h("span", { key: '91c08beb6f4c0005deac47a4b3121a87d9f5bb42', slot: "inline", class: "inline-status" }, index.h("slot", { key: '742bfdeec6b4d4614d0b5a8fa69fd2153455a474', name: "inline" }), this.subtitleStatus && (index.h("udp-fluent-badge", { key: '8c756a76ef26680649e25ad83608dce20585d46d', appearance: "outline", color: chipToBadgeColor[this.subtitleStatusMappingClasses[this.subtitleStatus]] }, this.subtitleStatus)), this.showLockedIcon && (index.h("udp-fluent-icon-button", { key: 'b7f09706bea4222a3e256525c5fdea60a44fec2b', iconName: "lock", appearance: "outline", size: "small", disabled: true, ariaLabel: "Locked" }))), this.clickBackward && (index.h("div", { key: '16d0bdf33a99aa39fd468709f67cbf1425f80692', slot: "actions", class: "date-navigation" }, index.h("udp-fluent-icon-button", { key: 'd66bffe5781150e550640ef10ee286751b718a36', ariaLabel: "Previous period", iconName: "chevron-left", appearance: "subtle", shape: "rounded", disabled: this.disableHeaderActions, onClick: this.clickBackward }), this.clickToday && (index.h("udp-fluent-button", { key: 'a989e2beba6465be81c42adf2eb774b96160f774', appearance: "subtle", disabled: this.disableHeaderActions, onClick: this.clickToday }, "Today")), index.h("udp-fluent-icon-button", { key: '04fe9c2c84b7d1e976ec6c6aeee11939ddc14f8d', ariaLabel: "Next period", iconName: "chevron-right", appearance: "subtle", shape: "rounded", disabled: this.disableHeaderActions, onClick: this.clickForward })))));
31
+ return (index.h("udp-primary-action-header", { key: 'f5edf0459f7e0f6136ed8e3056db4b788369164e', primaryAction: primaryAction, secondaryActions: secondaryActions }, index.h("span", { key: '4b539edaaa740cff41c3c4e1a8b6086d4f4c54df', slot: "title" }, this.gridBarTitle != null
32
+ ? index.h("udp-text", { variant: "subtitle1", block: false }, this.gridBarTitle)
33
+ : index.h("udp-skeleton-loading", { width: "200px" })), index.h("span", { key: 'b3a30a27bc09da0ce1de25e667496120f937101c', slot: "subtitle" }, this.subTitle != null
34
+ ? index.h("udp-text", { variant: "caption1" }, this.subTitle)
35
+ : index.h("udp-skeleton-loading", { width: "200px" })), index.h("span", { key: '59002f25369250081912604674992da9bc1e3624', slot: "inline", class: "inline-status" }, index.h("slot", { key: '5c0e77c384f8c62a74072624666e968f0d3658bc', name: "inline" }), this.subtitleStatus && (index.h("udp-fluent-badge", { key: '9627a6c43500ee36edac9d577661559e82bf7370', appearance: "outline", color: chipToBadgeColor[this.subtitleStatusMappingClasses[this.subtitleStatus]] }, this.subtitleStatus)), this.showLockedIcon && (index.h("udp-fluent-icon-button", { key: '515c9aa4087d17d8c8152b9773b8cf9b54ad4ff3', iconName: "lock", appearance: "outline", size: "small", disabled: true, ariaLabel: "Locked" }))), this.clickBackward && (index.h("div", { key: '0a999382c0ce9c3f2bb865d0dba3f43af5e1f44e', slot: "actions", class: "date-navigation" }, index.h("udp-fluent-icon-button", { key: 'd20fd23cbc27ff99a2de9d106a05efcda45d9398', ariaLabel: "Previous period", iconName: "chevron-left", appearance: "subtle", shape: "rounded", disabled: this.disableHeaderActions, onClick: this.clickBackward }), this.clickToday && (index.h("udp-fluent-button", { key: 'a6b7cac7b5a97d4d137085d4ccfd5613242ed18d', appearance: "subtle", disabled: this.disableHeaderActions, onClick: this.clickToday }, "Today")), index.h("udp-fluent-icon-button", { key: 'a67cf5dd57057065f0a437cda062d6df24b0d953', ariaLabel: "Next period", iconName: "chevron-right", appearance: "subtle", shape: "rounded", disabled: this.disableHeaderActions, onClick: this.clickForward })))));
32
36
  }
33
37
  };
34
38
  ResourceTimelinePrimaryBar.style = resourceTimelinePrimaryBarCss();
@@ -6,7 +6,7 @@ var udpFormApiUtils = require('./udp-form-api-utils-BcsAFM5r.js');
6
6
  var enums = require('./enums-7rWe0ofM.js');
7
7
  var utils = require('./utils-Bp02BX38.js');
8
8
  var makeApiCall = require('./makeApiCall-CFfg9gI0.js');
9
- var SearchBuilder = require('./SearchBuilder-BsB_257b.js');
9
+ var SearchBuilder = require('./SearchBuilder-aqpLQz8E.js');
10
10
  var searchObject = require('./searchObject-DeDFFGcx.js');
11
11
  var configService = require('./configService-BqiLnW8G.js');
12
12
  var uuid = require('uuid');
@@ -79,10 +79,15 @@ export class SavedViews {
79
79
  var _a;
80
80
  if (!this.baseColumnState)
81
81
  return;
82
- const currentColIds = ((_a = this.api.getColumnState()) !== null && _a !== void 0 ? _a : []).map(c => c.colId).join(',');
83
- const baseColIds = JSON.parse(this.baseColumnState)
82
+ // Compare only primary (user-defined) colIds pivot result columns regenerate
83
+ // from filtered data and shouldn't be treated as external column-def updates.
84
+ const primaryColIds = this.getPrimaryColIds();
85
+ const collectColIds = (state) => state
86
+ .filter(c => primaryColIds.has(c.colId))
84
87
  .map(c => c.colId)
85
88
  .join(',');
89
+ const currentColIds = collectColIds((_a = this.api.getColumnState()) !== null && _a !== void 0 ? _a : []);
90
+ const baseColIds = collectColIds(JSON.parse(this.baseColumnState));
86
91
  if (currentColIds !== baseColIds) {
87
92
  this.baseColumnState = JSON.stringify(this.api.getColumnState());
88
93
  if (this.isDirty) {
@@ -138,8 +143,26 @@ export class SavedViews {
138
143
  this.saveCurrentStateToLocalStorage();
139
144
  });
140
145
  };
146
+ // Returns the set of colIds for primary (user-defined) columns. Pivot result
147
+ // columns are secondary and excluded — they regenerate from filtered data and
148
+ // would cause spurious dirty diffs.
149
+ this.getPrimaryColIds = () => {
150
+ var _a;
151
+ return new Set(((_a = this.api.getColumns()) !== null && _a !== void 0 ? _a : [])
152
+ .filter(c => c.isPrimary())
153
+ .map(c => c.getColId()));
154
+ };
155
+ // Serializes column state to a JSON string filtered to primary columns only.
156
+ // Using a positive include filter (vs. excluding pivot result ids) keeps the
157
+ // comparison symmetric across snapshots — stale pivot ids in older baselines
158
+ // get dropped automatically because they aren't in the current primary set.
159
+ this.serializeUserColumnState = (state) => {
160
+ const primaryColIds = this.getPrimaryColIds();
161
+ return JSON.stringify(state.filter(c => primaryColIds.has(c.colId)));
162
+ };
141
163
  // Compare current grid state against snapshot (view active) or default empty state (no view)
142
164
  this.checkIfDirty = () => {
165
+ var _a, _b;
143
166
  // Skip during initial setup — baseline will be recaptured after parent
144
167
  // gridReady handlers (e.g. search-method-grid) finish applying state.
145
168
  if (this.baselineRecaptureId !== null)
@@ -147,18 +170,22 @@ export class SavedViews {
147
170
  let dirty;
148
171
  if (this.activeViewId && this.activeViewState) {
149
172
  // Named view active: compare against the snapshot taken when the view was applied
150
- const currentColumnState = JSON.stringify(this.api.getColumnState());
173
+ const currentColumnState = this.serializeUserColumnState((_a = this.api.getColumnState()) !== null && _a !== void 0 ? _a : []);
174
+ const baseColumnState = this.serializeUserColumnState(JSON.parse(this.activeViewState.columnState));
151
175
  const currentFilterModel = JSON.stringify(this.api.getFilterModel());
152
176
  dirty =
153
- currentColumnState !== this.activeViewState.columnState ||
177
+ currentColumnState !== baseColumnState ||
154
178
  currentFilterModel !== this.activeViewState.filterModel;
155
179
  }
156
180
  else {
157
181
  // No view: dirty if there are any active filters or column state changes vs baseline
158
182
  const filterModel = this.api.getFilterModel();
159
183
  const hasFilters = Object.keys(filterModel !== null && filterModel !== void 0 ? filterModel : {}).length > 0;
160
- const columnState = this.api.getColumnState();
161
- const hasColumnChanges = this.baseColumnState !== null && JSON.stringify(columnState) !== this.baseColumnState;
184
+ const currentColumnState = this.serializeUserColumnState((_b = this.api.getColumnState()) !== null && _b !== void 0 ? _b : []);
185
+ const baseColumnState = this.baseColumnState !== null
186
+ ? this.serializeUserColumnState(JSON.parse(this.baseColumnState))
187
+ : null;
188
+ const hasColumnChanges = baseColumnState !== null && currentColumnState !== baseColumnState;
162
189
  dirty = hasFilters || hasColumnChanges;
163
190
  }
164
191
  if (dirty !== this.isDirty) {
@@ -69,6 +69,7 @@ export class ResourceTimelineCalendar {
69
69
  field: this.dateKey,
70
70
  pivot: true,
71
71
  pivotComparator: this.dateCompare,
72
+ suppressFiltersToolPanel: true,
72
73
  valueGetter: params => {
73
74
  let dateString = '';
74
75
  if (this.convertDatesFromUTC) {
@@ -116,7 +117,7 @@ export class ResourceTimelineCalendar {
116
117
  }
117
118
  render() {
118
119
  const todayString = new Date().toLocaleDateString('en-US');
119
- return (h("div", { key: '59969c807543a3d784c33d9daebfc13b595b1c57', class: "resource-timeline-calendar" }, h("resource-timeline-primary-bar", { key: '9291d971dab58ceda1831aa8bac8f5b3b7702609', gridBarTitle: this.gridBarTitle, subTitle: this.subTitle, primaryAction: this.primaryAction, secondaryAction: this.secondaryAction, clickBackward: this.handleClickBackward, clickForward: this.handleClickForward, clickToday: this.handleClickToday, subtitleStatus: this.subtitleStatus, subtitleStatusMappingClasses: this.subtitleStatusMappingClasses, disableHeaderActions: this.disableHeaderActions, showLockedIcon: this.showLockedIcon }, h("slot", { key: '8bbed2a4ebe80ca56f603f79d605aabc5f2ea7df', name: "inline", slot: "inline" })), h("client-side-grid", { key: 'ca2e71b84be0014e36eca1d5531e7346fcebfa72', rowData: this.filledRowData, columnDefs: this.formattedColumnDefs, gridFunctions: this.getGridFunctions(), gridId: this.gridId, gridOptions: Object.assign(Object.assign({}, this.additionalGridOptions), { components: {
120
+ return (h("div", { key: '92e721dafa80975ead78ed3e8fba36a65636a8d0', class: "resource-timeline-calendar" }, h("resource-timeline-primary-bar", { key: 'e17ff97f7069c5a057caad6168534738dbc79c53', gridBarTitle: this.gridBarTitle, subTitle: this.subTitle, primaryAction: this.primaryAction, secondaryAction: this.secondaryAction, clickBackward: this.handleClickBackward, clickForward: this.handleClickForward, clickToday: this.handleClickToday, subtitleStatus: this.subtitleStatus, subtitleStatusMappingClasses: this.subtitleStatusMappingClasses, disableHeaderActions: this.disableHeaderActions, showLockedIcon: this.showLockedIcon }, h("slot", { key: '4eb8edb054f962695c7b018508ea718d5bafec16', name: "inline", slot: "inline" })), h("client-side-grid", { key: '32bfe633f571dd7a47d773cff67042be5b6b19f0', rowData: this.filledRowData, columnDefs: this.formattedColumnDefs, gridFunctions: this.getGridFunctions(), gridId: this.gridId, gridOptions: Object.assign(Object.assign({}, this.additionalGridOptions), { components: {
120
121
  resourceTimelineCalendarHeader: ResourceTimelineColumnHeader,
121
122
  }, processPivotResultColDef: colDef => {
122
123
  colDef.suppressHeaderContextMenu = true;
@@ -159,7 +160,11 @@ export class ResourceTimelineCalendar {
159
160
  return params.node.group &&
160
161
  ((_c = (_b = (_a = params.node.allLeafChildren) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.isDateRangePlaceholder) === true;
161
162
  },
162
- }, pivotMode: true, quickFilterMatcher: () => true, isExternalFilterPresent: () => this.externalFilterText.length > 0, doesExternalFilterPass: (node) => {
163
+ }, pivotMode: true,
164
+ // Placeholder rows anchor pivot date columns so all days remain visible
165
+ // regardless of filters. alwaysPassFilter exempts them from every filter
166
+ // type (column, quick, external, advanced) without per-filter wiring.
167
+ alwaysPassFilter: (node) => { var _a; return ((_a = node.data) === null || _a === void 0 ? void 0 : _a.isDateRangePlaceholder) === true; }, quickFilterMatcher: () => true, isExternalFilterPresent: () => this.externalFilterText.length > 0, doesExternalFilterPass: (node) => {
163
168
  var _a, _b;
164
169
  if ((_a = node.data) === null || _a === void 0 ? void 0 : _a.isDateRangePlaceholder)
165
170
  return true;
@@ -176,6 +181,13 @@ export class ResourceTimelineCalendar {
176
181
  });
177
182
  }, removePivotHeaderRowWhenSingleValueColumn: true, suppressAggFuncInHeader: true, pivotRowTotals: 'after', suppressMovableColumns: true, enableStrictPivotColumnOrder: true, rowGroupPanelShow: this.rowGroupPanelShow, sideBar: {
178
183
  toolPanels: [
184
+ {
185
+ id: 'filters',
186
+ labelDefault: 'Filters',
187
+ labelKey: 'filters',
188
+ iconKey: 'filter',
189
+ toolPanel: 'agFiltersToolPanel',
190
+ },
179
191
  {
180
192
  id: 'columns',
181
193
  labelDefault: 'Columns',
@@ -22,7 +22,11 @@ export class ResourceTimelinePrimaryBar {
22
22
  Object.assign(Object.assign({}, this.secondaryAction), { label: (_d = this.secondaryAction.label) !== null && _d !== void 0 ? _d : '', disabled: this.secondaryAction.disabled || this.disableHeaderActions }),
23
23
  ]
24
24
  : [];
25
- return (h("udp-primary-action-header", { key: 'f5edf0459f7e0f6136ed8e3056db4b788369164e', primaryAction: primaryAction, secondaryActions: secondaryActions }, h("span", { key: '4b539edaaa740cff41c3c4e1a8b6086d4f4c54df', slot: "title" }, this.gridBarTitle != null ? this.gridBarTitle : h("udp-skeleton-loading", { width: "200px" })), h("span", { key: '27488b2c8536a873ff3d764c7fa614be67234584', slot: "subtitle" }, this.subTitle != null ? this.subTitle : h("udp-skeleton-loading", { width: "200px" })), h("span", { key: '91c08beb6f4c0005deac47a4b3121a87d9f5bb42', slot: "inline", class: "inline-status" }, h("slot", { key: '742bfdeec6b4d4614d0b5a8fa69fd2153455a474', name: "inline" }), this.subtitleStatus && (h("udp-fluent-badge", { key: '8c756a76ef26680649e25ad83608dce20585d46d', appearance: "outline", color: chipToBadgeColor[this.subtitleStatusMappingClasses[this.subtitleStatus]] }, this.subtitleStatus)), this.showLockedIcon && (h("udp-fluent-icon-button", { key: 'b7f09706bea4222a3e256525c5fdea60a44fec2b', iconName: "lock", appearance: "outline", size: "small", disabled: true, ariaLabel: "Locked" }))), this.clickBackward && (h("div", { key: '16d0bdf33a99aa39fd468709f67cbf1425f80692', slot: "actions", class: "date-navigation" }, h("udp-fluent-icon-button", { key: 'd66bffe5781150e550640ef10ee286751b718a36', ariaLabel: "Previous period", iconName: "chevron-left", appearance: "subtle", shape: "rounded", disabled: this.disableHeaderActions, onClick: this.clickBackward }), this.clickToday && (h("udp-fluent-button", { key: 'a989e2beba6465be81c42adf2eb774b96160f774', appearance: "subtle", disabled: this.disableHeaderActions, onClick: this.clickToday }, "Today")), h("udp-fluent-icon-button", { key: '04fe9c2c84b7d1e976ec6c6aeee11939ddc14f8d', ariaLabel: "Next period", iconName: "chevron-right", appearance: "subtle", shape: "rounded", disabled: this.disableHeaderActions, onClick: this.clickForward })))));
25
+ return (h("udp-primary-action-header", { key: 'f5edf0459f7e0f6136ed8e3056db4b788369164e', primaryAction: primaryAction, secondaryActions: secondaryActions }, h("span", { key: '4b539edaaa740cff41c3c4e1a8b6086d4f4c54df', slot: "title" }, this.gridBarTitle != null
26
+ ? h("udp-text", { variant: "subtitle1", block: false }, this.gridBarTitle)
27
+ : h("udp-skeleton-loading", { width: "200px" })), h("span", { key: 'b3a30a27bc09da0ce1de25e667496120f937101c', slot: "subtitle" }, this.subTitle != null
28
+ ? h("udp-text", { variant: "caption1" }, this.subTitle)
29
+ : h("udp-skeleton-loading", { width: "200px" })), h("span", { key: '59002f25369250081912604674992da9bc1e3624', slot: "inline", class: "inline-status" }, h("slot", { key: '5c0e77c384f8c62a74072624666e968f0d3658bc', name: "inline" }), this.subtitleStatus && (h("udp-fluent-badge", { key: '9627a6c43500ee36edac9d577661559e82bf7370', appearance: "outline", color: chipToBadgeColor[this.subtitleStatusMappingClasses[this.subtitleStatus]] }, this.subtitleStatus)), this.showLockedIcon && (h("udp-fluent-icon-button", { key: '515c9aa4087d17d8c8152b9773b8cf9b54ad4ff3', iconName: "lock", appearance: "outline", size: "small", disabled: true, ariaLabel: "Locked" }))), this.clickBackward && (h("div", { key: '0a999382c0ce9c3f2bb865d0dba3f43af5e1f44e', slot: "actions", class: "date-navigation" }, h("udp-fluent-icon-button", { key: 'd20fd23cbc27ff99a2de9d106a05efcda45d9398', ariaLabel: "Previous period", iconName: "chevron-left", appearance: "subtle", shape: "rounded", disabled: this.disableHeaderActions, onClick: this.clickBackward }), this.clickToday && (h("udp-fluent-button", { key: 'a6b7cac7b5a97d4d137085d4ccfd5613242ed18d', appearance: "subtle", disabled: this.disableHeaderActions, onClick: this.clickToday }, "Today")), h("udp-fluent-icon-button", { key: 'a67cf5dd57057065f0a437cda062d6df24b0d953', ariaLabel: "Next period", iconName: "chevron-right", appearance: "subtle", shape: "rounded", disabled: this.disableHeaderActions, onClick: this.clickForward })))));
26
30
  }
27
31
  static get is() { return "resource-timeline-primary-bar"; }
28
32
  static get encapsulation() { return "shadow"; }
@@ -307,6 +307,10 @@ export class SearchUtilities {
307
307
  if (!validation.isValid) {
308
308
  throw new Error(`Invalid search: ${validation.errors.join(', ')}`);
309
309
  }
310
+ // Wait for ConfigService to be initialized — callers may invoke this from
311
+ // top-level effects that mount before the app sets PRODUCT_API_DOMAIN,
312
+ // which would otherwise produce a relative URL and fail the request.
313
+ await ConfigService.waitForConfig();
310
314
  // Build the API URL
311
315
  const url = `${ConfigService.productV1ApiUrl}/${tableName}/search`;
312
316
  // Execute the search
@@ -1 +1 @@
1
- import{m as r}from"./makeApiCall.js";import{a as e,S as t}from"./searchObject.js";import{C as s}from"./configService.js";var i;!function(r){r[r.And=1]="And",r[r.Or=2]="Or"}(i||(i={}));class a{constructor(r=1,e=20){this.search={pageNumber:r,pageSize:e,filterElements:[],orderElements:[],filterGroups:[],groupOperationList:[],eagerLoad:!1,logicalSearchOperator:i.And}}setEagerLoad(r){return this.search.eagerLoad=r,this}setPagination(r,e){return this.search.pageNumber=r,this.search.pageSize=e,this}setLogicalOperator(r){return this.search.logicalSearchOperator=r,this}addFilter(r,t,s=e.EQUALS,i){return this.search.filterElements.push({searchField:r,searchValue:t,searchOperator:s,groupId:i}),this}addFilters(r){return this.search.filterElements.push(...r),this}addOrder(r,e="ASC"){return this.search.orderElements.push({sortColumn:r,sortDirection:e}),this}addOrders(r){return this.search.orderElements.push(...r),this}setGrouping(r,e,t){return this.search.groupingType=r,this.search.groupProperty=e,this.search.groupOperationList=t,this}addFilterGroup(r,e,t){return this.search.filterGroups||(this.search.filterGroups=[]),this.search.filterGroups.push({groupId:r,logicalSearchOperator:e,parentGroupId:t}),this}clearFilters(){return this.search.filterElements=[],this}clearOrders(){return this.search.orderElements=[],this}clearFilterGroups(){return this.search.filterGroups=[],this}reset(r=1,e=20){return this.search={pageNumber:r,pageSize:e,filterElements:[],orderElements:[],filterGroups:[],groupOperationList:[],eagerLoad:!1,logicalSearchOperator:i.And},this}build(){return Object.assign({},this.search)}async execute(r){const e=o.normalizeSearch(this.search);return o.executeSearch(e,r)}getSnapshot(){return Object.assign({},this.search)}}class o{static createSearchObject(r=[],e=1,s=20,a=!1,o=i.And,c=[]){const n={pageNumber:e,pageSize:s,filterElements:[],filterGroups:[],orderElements:[],groupingType:"",groupProperty:[],groupOperationList:[],eagerLoad:a,logicalSearchOperator:o};return r&&r.forEach((e=>{var s;const i=e.searchField;n.filterElements=r,e.sortDirection&&n.orderElements.push({sortColumn:i,sortDirection:e.sortDirection}),e.distinct&&(n.groupingType=t.Distinct,null===(s=n.groupProperty)||void 0===s||s.push(i))})),n.filterGroups=c,n}static createFilter(r,t,s=e.EQUALS,i){return{searchField:r,searchValue:t,searchOperator:s,groupId:i}}static createLikeFilter(r,t,s){return this.createFilter(r,`%${t}%`,e.LIKE,s)}static createInFilter(r,t,s){return this.createFilter(r,t.join(","),e.IN,s)}static createDateRangeFilter(r,t,s,i){return this.createFilter(r,`${t},${s}`,e.BETWEEN,i)}static createOrder(r,e="ASC"){return{sortColumn:r,sortDirection:e}}static mergeSearchObjects(...r){if(0===r.length)throw new Error("At least one search object is required");const e=r[0];for(let t=1;t<r.length;t++){const s=r[t];e.filterElements.push(...s.filterElements),e.orderElements.push(...s.orderElements),s.filterGroups&&(e.filterGroups=e.filterGroups||[],e.filterGroups.push(...s.filterGroups))}return e}static validateSearch(r){const e=[];return r?(void 0!==r.pageNumber&&r.pageNumber<1&&e.push("Page number must be greater than 0"),void 0!==r.pageSize&&r.pageSize<1&&e.push("Page size must be greater than 0"),{isValid:0===e.length,errors:e}):(e.push("Search object is required"),{isValid:!1,errors:e})}static normalizeSearch(r){return{pageNumber:r.pageNumber||1,pageSize:r.pageSize||15,filterElements:r.filterElements||[],orderElements:r.orderElements||[],filterGroups:r.filterGroups||[],eagerLoad:r.eagerLoad||!1,logicalSearchOperator:r.logicalSearchOperator||i.And,groupingType:r.groupingType||"",groupProperty:r.groupProperty||[],groupOperationList:r.groupOperationList||[]}}static async executeSearch(e,t){const i=this.normalizeSearch(e),a=this.validateSearch(i);if(!a.isValid)throw new Error(`Invalid search: ${a.errors.join(", ")}`);const o=`${s.productV1ApiUrl}/${t}/search`;try{return await r("POST",o,i)}catch(r){throw console.error(`Error executing search for table ${t}:`,r),r}}static async executeSearchWithEndpoint(e,t){const s=this.normalizeSearch(e),i=this.validateSearch(s);if(!i.isValid)throw new Error(`Invalid search: ${i.errors.join(", ")}`);try{return await r("POST",t,s)}catch(r){throw console.error(`Error executing search for endpoint ${t}:`,r),r}}}export{i as L,a as S,o as a}
1
+ import{m as r}from"./makeApiCall.js";import{a as e,S as t}from"./searchObject.js";import{C as s}from"./configService.js";var i;!function(r){r[r.And=1]="And",r[r.Or=2]="Or"}(i||(i={}));class a{constructor(r=1,e=20){this.search={pageNumber:r,pageSize:e,filterElements:[],orderElements:[],filterGroups:[],groupOperationList:[],eagerLoad:!1,logicalSearchOperator:i.And}}setEagerLoad(r){return this.search.eagerLoad=r,this}setPagination(r,e){return this.search.pageNumber=r,this.search.pageSize=e,this}setLogicalOperator(r){return this.search.logicalSearchOperator=r,this}addFilter(r,t,s=e.EQUALS,i){return this.search.filterElements.push({searchField:r,searchValue:t,searchOperator:s,groupId:i}),this}addFilters(r){return this.search.filterElements.push(...r),this}addOrder(r,e="ASC"){return this.search.orderElements.push({sortColumn:r,sortDirection:e}),this}addOrders(r){return this.search.orderElements.push(...r),this}setGrouping(r,e,t){return this.search.groupingType=r,this.search.groupProperty=e,this.search.groupOperationList=t,this}addFilterGroup(r,e,t){return this.search.filterGroups||(this.search.filterGroups=[]),this.search.filterGroups.push({groupId:r,logicalSearchOperator:e,parentGroupId:t}),this}clearFilters(){return this.search.filterElements=[],this}clearOrders(){return this.search.orderElements=[],this}clearFilterGroups(){return this.search.filterGroups=[],this}reset(r=1,e=20){return this.search={pageNumber:r,pageSize:e,filterElements:[],orderElements:[],filterGroups:[],groupOperationList:[],eagerLoad:!1,logicalSearchOperator:i.And},this}build(){return Object.assign({},this.search)}async execute(r){const e=o.normalizeSearch(this.search);return o.executeSearch(e,r)}getSnapshot(){return Object.assign({},this.search)}}class o{static createSearchObject(r=[],e=1,s=20,a=!1,o=i.And,c=[]){const n={pageNumber:e,pageSize:s,filterElements:[],filterGroups:[],orderElements:[],groupingType:"",groupProperty:[],groupOperationList:[],eagerLoad:a,logicalSearchOperator:o};return r&&r.forEach((e=>{var s;const i=e.searchField;n.filterElements=r,e.sortDirection&&n.orderElements.push({sortColumn:i,sortDirection:e.sortDirection}),e.distinct&&(n.groupingType=t.Distinct,null===(s=n.groupProperty)||void 0===s||s.push(i))})),n.filterGroups=c,n}static createFilter(r,t,s=e.EQUALS,i){return{searchField:r,searchValue:t,searchOperator:s,groupId:i}}static createLikeFilter(r,t,s){return this.createFilter(r,`%${t}%`,e.LIKE,s)}static createInFilter(r,t,s){return this.createFilter(r,t.join(","),e.IN,s)}static createDateRangeFilter(r,t,s,i){return this.createFilter(r,`${t},${s}`,e.BETWEEN,i)}static createOrder(r,e="ASC"){return{sortColumn:r,sortDirection:e}}static mergeSearchObjects(...r){if(0===r.length)throw new Error("At least one search object is required");const e=r[0];for(let t=1;t<r.length;t++){const s=r[t];e.filterElements.push(...s.filterElements),e.orderElements.push(...s.orderElements),s.filterGroups&&(e.filterGroups=e.filterGroups||[],e.filterGroups.push(...s.filterGroups))}return e}static validateSearch(r){const e=[];return r?(void 0!==r.pageNumber&&r.pageNumber<1&&e.push("Page number must be greater than 0"),void 0!==r.pageSize&&r.pageSize<1&&e.push("Page size must be greater than 0"),{isValid:0===e.length,errors:e}):(e.push("Search object is required"),{isValid:!1,errors:e})}static normalizeSearch(r){return{pageNumber:r.pageNumber||1,pageSize:r.pageSize||15,filterElements:r.filterElements||[],orderElements:r.orderElements||[],filterGroups:r.filterGroups||[],eagerLoad:r.eagerLoad||!1,logicalSearchOperator:r.logicalSearchOperator||i.And,groupingType:r.groupingType||"",groupProperty:r.groupProperty||[],groupOperationList:r.groupOperationList||[]}}static async executeSearch(e,t){const i=this.normalizeSearch(e),a=this.validateSearch(i);if(!a.isValid)throw new Error(`Invalid search: ${a.errors.join(", ")}`);await s.waitForConfig();const o=`${s.productV1ApiUrl}/${t}/search`;try{return await r("POST",o,i)}catch(r){throw console.error(`Error executing search for table ${t}:`,r),r}}static async executeSearchWithEndpoint(e,t){const s=this.normalizeSearch(e),i=this.validateSearch(s);if(!i.isValid)throw new Error(`Invalid search: ${i.errors.join(", ")}`);try{return await r("POST",t,s)}catch(r){throw console.error(`Error executing search for endpoint ${t}:`,r),r}}}export{i as L,a as S,o as a}
@@ -1 +1 @@
1
- import{h as t,p as e,H as i,c as s,t as o}from"./index2.js";import{themeQuartz as a,ModuleRegistry as n,AllEnterpriseModule as l,LicenseManager as r,createGrid as d}from"ag-grid-enterprise-v33";import{w as h,i as c,r as u,s as p,u as m,p as g}from"./apiUtils.js";import{g as v,c as f}from"./configureUdpColumnMods.js";import{g as b}from"./tenantUtils.js";import{S as y,I as k,A as w}from"./status-renderer.js";import{isEqual as _}from"lodash-es";import{d as C}from"./ghost-render2.js";import{d as x}from"./grid-header2.js";import{d as S}from"./hint-panel2.js";import{d as N}from"./stencil-icon-button2.js";import{d as E}from"./udp-ambient-tool-tip2.js";import{d as j}from"./udp-avatar2.js";import{d as F}from"./udp-badge2.js";import{d as O}from"./udp-button2.js";import{d as A}from"./udp-dialog2.js";import{d as D}from"./udp-flexbox2.js";import{d as T}from"./udp-fluent-avatar2.js";import{d as R}from"./udp-fluent-badge2.js";import{d as G}from"./udp-fluent-button2.js";import{d as I}from"./udp-fluent-dialog2.js";import{d as P}from"./udp-fluent-icon2.js";import{d as J}from"./udp-fluent-icon-button2.js";import{d as M}from"./udp-fluent-menu2.js";import{d as B}from"./udp-fluent-switch2.js";import{d as V}from"./udp-fluent-text-input2.js";import{d as $}from"./udp-icon2.js";import{d as U}from"./udp-linear-loader2.js";import{d as z}from"./list-item.js";import{d as H}from"./udp-menu-item2.js";import{d as L}from"./udp-pop-over2.js";import{d as W}from"./udp-primary-action-header2.js";import{d as Y}from"./udp-search-input2.js";import{d as q}from"./udp-side-sheet2.js";import{d as K}from"./udp-spinner2.js";import{d as Q}from"./udp-text2.js";import{d as X}from"./udp-tooltip2.js";import{d as Z}from"./unity-typography2.js";function tt(){return sessionStorage.getItem("user-id")}const et=async t=>{(null===document||void 0===document?void 0:document.startViewTransition)?(document.viewTransition&&await document.viewTransition.finished.catch((()=>{})),document.startViewTransition(t)):t()};function it(t){const e=new Date(t),i=Math.floor((Date.now()-e.getTime())/1e3);if(i<60)return`${i} second${1!==i?"s":""} ago`;const s=Math.floor(i/60);if(s<60)return`${s} minute${1!==s?"s":""} ago`;const o=Math.floor(s/60);if(o<24)return`${o} hour${1!==o?"s":""} ago`;const a=Math.floor(o/24);return`${a} day${1!==a?"s":""} ago`}function st(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>1===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function ot(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>4===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function at(t){switch(t){case"primary":return"primary";case"ghost":return"subtle";default:return"secondary"}}const nt={agGridExport:class{constructor(t="export.csv"){this.fileName=t}init(t){this.gridApi=t}onAction(t){"agGridExport"===t&&this.gridApi.exportDataAsCsv({fileName:this.fileName})}},openSavedViews:class{constructor(){this.filteredViews=[],this.allViewData=[],this.activeViewId=null,this.activeViewState=null,this.loading=!1,this.isDirty=!1,this.viewDialogMode=null,this.hoveredViewId=null,this.loadingViewId=null,this.deleteConfirmView=null,this.editingView=null,this.dialogName="",this.dialogIsPublic=!1,this.dialogMode="create",this.baseColumnState=null,this.localRestoredState=null,this.localStorageDebounceId=null,this.baselineRecaptureId=null,this.initialLoad=!0,this.dirtyListenerTimeoutId=null,this.scheduleDirtyListeners=()=>{null!==this.dirtyListenerTimeoutId&&clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=setTimeout((()=>{this.dirtyListenerTimeoutId=null,this.addDirtyListeners()}),300)},this.addDirtyListeners=()=>{this.api.addEventListener("columnVisible",this.checkIfDirty),this.api.addEventListener("columnPinned",this.checkIfDirty),this.api.addEventListener("columnMoved",this.checkIfDirty),this.api.addEventListener("columnPivotChanged",this.checkIfDirty),this.api.addEventListener("columnRowGroupChanged",this.checkIfDirty),this.api.addEventListener("columnValueChanged",this.checkIfDirty),this.api.addEventListener("columnsReset",this.checkIfDirty),this.api.addEventListener("filterChanged",this.checkIfDirty),this.api.addEventListener("sortChanged",this.checkIfDirty)},this.removeDirtyListeners=()=>{this.api.removeEventListener("columnVisible",this.checkIfDirty),this.api.removeEventListener("columnPinned",this.checkIfDirty),this.api.removeEventListener("columnMoved",this.checkIfDirty),this.api.removeEventListener("columnPivotChanged",this.checkIfDirty),this.api.removeEventListener("columnRowGroupChanged",this.checkIfDirty),this.api.removeEventListener("columnValueChanged",this.checkIfDirty),this.api.removeEventListener("columnsReset",this.checkIfDirty),this.api.removeEventListener("filterChanged",this.checkIfDirty),this.api.removeEventListener("sortChanged",this.checkIfDirty)},this.onColumnsChanged=()=>{var t;this.baseColumnState&&(null!==(t=this.api.getColumnState())&&void 0!==t?t:[]).map((t=>t.colId)).join(",")!==JSON.parse(this.baseColumnState).map((t=>t.colId)).join(",")&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.isDirty&&(this.isDirty=!1,this.refresh()))},this.getStorageKey=()=>{const t=b();return`saved-grid-state-${this.gridId}-${t}`},this.saveCurrentStateToLocalStorage=()=>{null!==this.localStorageDebounceId&&clearTimeout(this.localStorageDebounceId),this.localStorageDebounceId=setTimeout((()=>{if(this.localStorageDebounceId=null,!this.gridId)return;const t=this.getStorageKey(),e={date:(new Date).toISOString(),columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())};localStorage.setItem(t,JSON.stringify(e))}),500)},this.applyLocalRestoredState=()=>{if(this.localRestoredState){this.removeDirtyListeners(),this.api.setGridOption("loading",!0);try{const t=JSON.parse(this.localRestoredState.columnState);t&&this.api.applyColumnState({state:t,applyOrder:!0});const e=JSON.parse(this.localRestoredState.filterModel);this.api.setFilterModel(e)}catch(t){console.error("Failed to apply restored state",t)}this.localRestoredState=null,this.isDirty=!0,et((()=>{this.api.setGridOption("loading",!1),this.refresh(),this.scheduleDirtyListeners(),this.saveCurrentStateToLocalStorage()}))}},this.checkIfDirty=()=>{if(null!==this.baselineRecaptureId)return;let t;if(this.activeViewId&&this.activeViewState){const e=JSON.stringify(this.api.getColumnState()),i=JSON.stringify(this.api.getFilterModel());t=e!==this.activeViewState.columnState||i!==this.activeViewState.filterModel}else{const e=this.api.getFilterModel(),i=Object.keys(null!=e?e:{}).length>0,s=this.api.getColumnState(),o=null!==this.baseColumnState&&JSON.stringify(s)!==this.baseColumnState;t=i||o}t!==this.isDirty&&(this.isDirty=t,this.refresh()),this.saveCurrentStateToLocalStorage()},this.scheduleBaselineRecapture=()=>{null!==this.baselineRecaptureId&&clearTimeout(this.baselineRecaptureId),this.baselineRecaptureId=setTimeout((()=>{this.baselineRecaptureId=null,this.activeViewId||(this.baseColumnState=JSON.stringify(this.api.getColumnState())),this.isDirty&&(this.isDirty=!1,this.refresh())}),0)},this.fetchViews=async()=>{var t;this.loading=!0,this.refresh();const e=this.api.getGridOption("context");if(this.gridId=null!==(t=null==e?void 0:e.gridId)&&void 0!==t?t:"",!this.gridId)return console.warn("[SavedViews] No gridId provided in grid context — saved views will not work."),this.loading=!1,void this.refresh();const i=this.getStorageKey(),s=localStorage.getItem(i);if(s)try{this.localRestoredState=JSON.parse(s)}catch(t){console.warn("[SavedViews] Failed to parse local restored state",t)}this.allViewData=await h(tt(),this.gridId),this.filterData(),this.initialLoad&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.applyDefaultView()),this.loading=!1,this.refresh()},this.filterData=()=>{var t,e,i;const s=this.api.getGridOption("context");this.entityName=null!==(t=null==s?void 0:s.entityName)&&void 0!==t?t:"",this.filteredViews=this.entityName?(null!==(e=this.allViewData)&&void 0!==e?e:[]).filter((t=>t.domain===this.entityName)):null!==(i=this.allViewData)&&void 0!==i?i:[],this.activeViewId&&!this.filteredViews.some((t=>t.gridViewId===this.activeViewId))&&(this.activeViewId=null,this.activeViewState=null,this.isDirty=!1),this.refresh()},this.pendingReapplyFilter=null,this.removeReapplyFilterListener=()=>{this.pendingReapplyFilter&&(this.api.removeEventListener("rowDataUpdated",this.pendingReapplyFilter),this.pendingReapplyFilter=null)},this.applyDefaultView=()=>{const t=this.filteredViews.find((t=>t.isDefault));if(t&&(this.setActiveView(t),"clientSide"===this.api.getGridOption("rowModelType"))){const e=ot(t),i=this.api.getGridOption("rowData");if(e&&(!i||0===i.length)){const t=JSON.parse(e.gridViewGridConfigurationGridConfiguration.values);this.api.setGridOption("loading",!0);const i=()=>{const e=this.api.getGridOption("rowData");e&&0!==e.length&&(null!==this.dirtyListenerTimeoutId&&(clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=null),this.removeDirtyListeners(),this.api.setFilterModel(t),this.activeViewState={columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())},this.isDirty=!1,this.scheduleDirtyListeners(),this.removeReapplyFilterListener(),this.api.setGridOption("loading",!1),this.refresh())};this.pendingReapplyFilter=i,this.api.addEventListener("rowDataUpdated",i),null!==this.dirtyListenerTimeoutId&&(clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=null),this.removeDirtyListeners()}}this.initialLoad=!1},this.setActiveView=t=>{this.removeDirtyListeners();const e=st(t),i=ot(t);e&&this.api.applyColumnState({state:JSON.parse(e.gridViewGridConfigurationGridConfiguration.values),applyOrder:!0});const s=i?JSON.parse(i.gridViewGridConfigurationGridConfiguration.values):null;this.api.setFilterModel(s),this.activeViewId=t.gridViewId,this.activeViewState={columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())},this.isDirty=!1,this.saveCurrentStateToLocalStorage(),et((()=>{this.refresh(),this.scheduleDirtyListeners()}))},this.clearView=()=>{this.removeDirtyListeners(),this.baseColumnState?this.api.applyColumnState({state:JSON.parse(this.baseColumnState),applyOrder:!0}):this.api.resetColumnState(),this.api.setFilterModel(null),this.activeViewId=null,this.activeViewState=null,this.isDirty=!1,this.saveCurrentStateToLocalStorage(),et((()=>{this.refresh(),this.scheduleDirtyListeners()}))},this.deleteView=async t=>{this.loading=!0,this.refresh();const e=this.activeViewId===t.gridViewId;try{await c(t.gridViewId,(()=>null)),e&&this.clearView(),await this.fetchViews()}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}},this.handleDirtyReset=()=>{const t=this.activeView;t&&(this.isDirty=!1,this.setActiveView(t))},this.handleUpdateCurrentView=async()=>{var t;const e=this.activeView;if(!e)return;this.loading=!0,this.refresh();const i=this.api.getGridOption("context"),s=st(e),o=ot(e),a=[{gridConfigurationId:null==s?void 0:s.gridViewGridConfigurationGridConfiguration.gridConfigurationId,gridStateTypeId:1,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getColumnState())},{gridConfigurationId:null==o?void 0:o.gridViewGridConfigurationGridConfiguration.gridConfigurationId,gridStateTypeId:4,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getFilterModel())}];try{await u(e.gridViewId,tt(),null==i?void 0:i.gridId,v(),e.name,a,e.isDefault?1:0,null==i?void 0:i.entityName,null!==(t=e.gridViewVisibilityTypeId)&&void 0!==t?t:1,(()=>null)),await this.fetchViews();const s=this.filteredViews.find((t=>t.gridViewId===e.gridViewId));s&&this.setActiveView(s)}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}},this.handleSaveAsNew=()=>{this.dialogName="",this.dialogIsPublic=!1,this.dialogMode="create",this.viewDialogMode="create",this.refresh()},this.handleEditRequest=t=>{this.dialogName=t.name,this.dialogIsPublic=2===t.gridViewVisibilityTypeId,this.dialogMode="edit",this.editingView=t,this.viewDialogMode="edit",this.refresh()},this.handleDialogNameInput=t=>{this.dialogName=t.detail,this.refresh()},this.handleDialogIsPublicChange=t=>{this.dialogIsPublic=t.detail,this.refresh()},this.handleDialogConfirm=async()=>{const t=this.dialogName.trim();if(!t)return;const e=this.dialogIsPublic?2:1,i=this.editingView;"edit"===this.viewDialogMode&&i?await this.renameView(i,t,e):await this.postView(t,e),this.viewDialogMode=null,this.refresh()},this.handleDialogCancel=()=>{this.viewDialogMode=null,this.refresh()},this.handleDeleteRequest=t=>{this.deleteConfirmView=t,this.refresh()},this.handleDeleteConfirm=async()=>{const t=this.deleteConfirmView;t&&(this.deleteConfirmView=null,await this.deleteView(t))},this.handleDeleteCancel=()=>{this.deleteConfirmView=null,this.refresh()}}get activeView(){var t;return null!==(t=this.filteredViews.find((t=>t.gridViewId===this.activeViewId)))&&void 0!==t?t:null}async init(t,e){var i,s,o;this.api=t,this.refresh=e;const a=this.api.getGridOption("context");if(this.gridId=null!==(i=null==a?void 0:a.gridId)&&void 0!==i?i:"",!this.gridId)return void console.warn("[SavedViews] No gridId provided in grid context — saved views will not work.");const n=this.getStorageKey(),l=localStorage.getItem(n);if(l)try{this.localRestoredState=JSON.parse(l)}catch(t){console.warn("[SavedViews] Failed to parse local restored state",t)}this.loading=!0,this.refresh();const r=h(tt(),this.gridId);0===(null!==(o=null===(s=this.api.getColumnDefs())||void 0===s?void 0:s.length)&&void 0!==o?o:0)&&await new Promise((t=>{const e=()=>{var i,s;(null!==(s=null===(i=this.api.getColumnDefs())||void 0===i?void 0:i.length)&&void 0!==s?s:0)>0&&(this.api.removeEventListener("gridColumnsChanged",e),t())};this.api.addEventListener("gridColumnsChanged",e)})),this.allViewData=await r,this.filterData(),this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.applyDefaultView(),this.initialLoad=!1,this.loading=!1,this.refresh(),this.api.addEventListener("gridColumnsChanged",this.onColumnsChanged),this.scheduleDirtyListeners(),this.pendingReapplyFilter||this.addDirtyListeners(),this.scheduleBaselineRecapture()}destroy(){null!==this.baselineRecaptureId&&clearTimeout(this.baselineRecaptureId),this.removeDirtyListeners(),this.removeReapplyFilterListener(),this.api.removeEventListener("gridColumnsChanged",this.onColumnsChanged)}onAction(t){}async postView(t,e){this.loading=!0,this.refresh();const i=this.api.getGridOption("context"),s=[{gridStateTypeId:1,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getColumnState())},{gridStateTypeId:4,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getFilterModel())}];try{await p(tt(),null==i?void 0:i.gridId,v(),t,null==i?void 0:i.entityName,s,e,0,(()=>null)),await this.fetchViews();const o=this.filteredViews.find((e=>e.name===t));o&&this.setActiveView(o)}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}}async renameView(t,e,i){this.loading=!0,this.refresh();const s=this.api.getGridOption("context");try{await m(t.gridViewId,tt(),null==s?void 0:s.gridId,v(),e,t.isDefault?1:0,null==s?void 0:s.entityName,i,(()=>null)),await this.fetchViews()}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}}async setViewAsDefault(t){var e,i;this.loadingViewId=t.gridViewId,this.refresh();const s=this.api.getGridOption("context"),o=t.isDefault;try{if(await m(t.gridViewId,tt(),null==s?void 0:s.gridId,v(),t.name,o?0:1,null==s?void 0:s.entityName,null!==(e=t.gridViewVisibilityTypeId)&&void 0!==e?e:1,(()=>null)),!o){const t=this.filteredViews.find((t=>t.isDefault));t&&await m(t.gridViewId,tt(),null==s?void 0:s.gridId,v(),t.name,0,null==s?void 0:s.entityName,null!==(i=t.gridViewVisibilityTypeId)&&void 0!==i?i:1,(()=>null)).catch((t=>console.log(t)))}await this.fetchViews()}catch(t){console.log(t)}finally{this.loadingViewId=null,this.refresh()}}render(){var e;const i=this.activeView,s=!!i,o=s?this.isDirty?`${i.name} *`:i.name:this.isDirty?"All Records *":"All Records",a=this.filteredViews,n=[...this.localRestoredState?[{id:"restore-local-state",text:`Restore state from ${it(this.localRestoredState.date)}`,startIconName:"clock",sectionNumber:1,onClick:()=>this.applyLocalRestoredState()}]:[],...a.map((t=>({id:`view-${t.gridViewId}`,text:t.name,sectionNumber:2,onClick:()=>{this.setActiveView(t)},onMouseEnter:()=>{this.hoveredViewId=t.gridViewId,this.refresh()},onMouseLeave:()=>{this.hoveredViewId=null,this.refresh()}}))),...this.isDirty&&s?[{id:"update-view",startIconName:"save",text:"Update current view",sectionNumber:3,onClick:()=>this.handleUpdateCurrentView()}]:[],{id:"save-view",startIconName:"add",text:"Create new view",sectionNumber:3,onClick:()=>this.handleSaveAsNew()},{id:"clear-view",text:"Clear active view",startIconName:"dismiss",disabled:!s,sectionNumber:3,onClick:()=>this.clearView()}];return t("div",{class:"view-selector-wrapper"},t("udp-fluent-menu",{class:s?"has-active-view":void 0,label:o,items:n,style:{"--udp-menu-min-width":"200px"}},t("span",{slot:"clear-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Clear Active View"),t("span",{slot:"save-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Create View"),t("span",{slot:"update-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Update Current View"),t("span",{slot:"restore-local-state-body",style:{fontStyle:"italic",color:"var(--colorNeutralForeground2)"}},"Restore unsaved state "+(this.localRestoredState?`(${it(this.localRestoredState.date)})`:"")),a.map((e=>t("div",{key:`start-${e.gridViewId}`,slot:`view-${e.gridViewId}-start`,class:"view-slot-action",style:{opacity:e.isDefault||this.hoveredViewId===e.gridViewId?"1":"0",transition:"opacity 100ms ease"},onClick:t=>t.stopPropagation()},t("udp-fluent-icon-button",{iconName:"star",iconVariant:e.isDefault?"filled":"regular",size:"small",appearance:"transparent",loading:this.loadingViewId===e.gridViewId,onClick:()=>{this.setViewAsDefault(e)}})))),a.map((e=>t("div",{key:`end-${e.gridViewId}`,slot:`view-${e.gridViewId}-end`,class:"view-slot-action",style:{opacity:this.hoveredViewId===e.gridViewId?"1":"0",transition:"opacity 100ms ease"},onClick:t=>t.stopPropagation()},e.userId===tt()&&t("udp-fluent-icon-button",{iconName:"edit",size:"small",appearance:"transparent",onClick:()=>this.handleEditRequest(e)}),e.userId===tt()&&t("udp-fluent-icon-button",{iconName:"delete",size:"small",appearance:"transparent",onClick:()=>this.handleDeleteRequest(e)}))))),(s||this.isDirty)&&t("div",{class:"view-dirty-actions"},t("udp-tooltip",{content:s&&this.isDirty?"Reset to saved view":s?"Clear active view":"Reset to default"},t("udp-fluent-icon-button",{iconName:this.isDirty?"arrow-reset":"dismiss",appearance:"subtle",disabled:this.loading,onClick:s&&this.isDirty?this.handleDirtyReset:this.clearView,shape:"rounded"})),this.isDirty&&(s?t("udp-fluent-menu",{buttonType:"icon",startIconName:"save",shape:"rounded",appearance:"subtle",disabled:this.loading,items:[{text:"Update Current View",startIconName:"save",onClick:()=>{this.handleUpdateCurrentView()}},{text:"Create View",startIconName:"add",onClick:()=>this.handleSaveAsNew()}]}):t("udp-tooltip",{content:"Create View"},t("udp-fluent-icon-button",{iconName:"save",shape:"rounded",appearance:"subtle",disabled:this.loading,onClick:this.handleSaveAsNew})))),t("udp-fluent-dialog",{open:!!this.deleteConfirmView,dialogTitle:"Delete View",onDialogClose:this.handleDeleteCancel},t("udp-fluent-text",null,'Are you sure you want to delete "',null===(e=this.deleteConfirmView)||void 0===e?void 0:e.name,'"?'),t("udp-fluent-button",{slot:"action",appearance:"subtle",onClick:this.handleDeleteCancel},"Cancel"),t("udp-fluent-button",{slot:"action",appearance:"primary",loading:this.loading,onClick:()=>{this.handleDeleteConfirm()}},"Delete")),t("udp-fluent-dialog",{open:!!this.viewDialogMode,dialogTitle:"edit"===this.dialogMode?"Edit View":"Save View",onDialogClose:this.handleDialogCancel},t("udp-fluent-text-input",{value:this.dialogName,label:"Name",onValueChanged:this.handleDialogNameInput,onKeyDown:t=>{"Enter"===t.key&&this.dialogName.trim()&&(t.preventDefault(),this.handleDialogConfirm())}}),t("udp-fluent-switch",{checked:this.dialogIsPublic,label:"Public",onValueChanged:this.handleDialogIsPublicChange}),t("udp-fluent-button",{slot:"action",appearance:"subtle",onClick:this.handleDialogCancel},"Cancel"),t("udp-fluent-button",{slot:"action",appearance:"primary",disabled:!this.dialogName.trim(),loading:this.loading,onClick:()=>{this.handleDialogConfirm()}},"edit"===this.dialogMode?"Update":"Save")))}},agGridSizeColumnsToFit:class{init(t){this.gridApi=t}onAction(t){"agGridSizeColumnsToFit"===t&&this.gridApi.sizeColumnsToFit()}},agGridAutoSizeColumns:class{init(t){this.gridApi=t}onAction(t){"agGridAutoSizeColumns"===t&&this.gridApi.autoSizeAllColumns()}},bulkActions:class{constructor(){this.bulkActions=[],this.selectedRowCount=0,this.fetchedData=!1,this.serverActionData=[],this.onRowSelectionChanged=()=>{var t;et((()=>{const t=this.api.getSelectedRows();this.selectedRows=t,this.selectedRowCount=t.length,this.refresh()})),(!this.fetchedData&&this.gridId||this.gridId&&(null===(t=this.api.getGridOption("context"))||void 0===t?void 0:t.gridId)!==this.gridId)&&this.fetchBulkActions()},this.setBulkActions=t=>{this.serverActionData=t;const e=t.map((t=>({text:t.name,onClick:()=>this.executeActionProviderAction(t.actionId)}))),i=this.localFunctions.map((t=>({text:t.label,startIconName:t.startIconName,buttonIntent:t.buttonIntent,loading:t.loading,onClick:()=>this.executeLocalFunction(t.label)})));this.bulkActions=[...e,...i],this.fetchedData=!0,this.refresh()},this.executeLocalFunction=t=>{const e=this.localFunctions.find((e=>e.label===t));e&&e.callback(this.selectedRows),this.refresh()},this.executeActionProviderAction=t=>{this.actionProviderCallback&&this.actionProviderCallback(t,this.selectedRows),this.refresh()},this.clearSelection=()=>{this.api.deselectAll()}}init(t,e,i){var s,o;this.api=t,this.refresh=e,this.actionProviderCallback=null==i?void 0:i.actionProviderCallback,this.localFunctions=null!==(s=null==i?void 0:i.localFunctions)&&void 0!==s?s:[];const a=this.api.getGridOption("rowModelType");this.api.setGridOption("rowSelection","clientSide"===a?{mode:"multiRow",enableClickSelection:!0}:{mode:"multiRow",enableClickSelection:!0,headerCheckbox:!1}),this.gridId=null===(o=this.api.getGridOption("context"))||void 0===o?void 0:o.gridId,this.gridId?this.fetchBulkActions():this.setBulkActions([]),this.api.addEventListener("selectionChanged",this.onRowSelectionChanged)}update(t){var e,i;this.localFunctions=null!==(e=null==t?void 0:t.localFunctions)&&void 0!==e?e:[],this.actionProviderCallback=null!==(i=null==t?void 0:t.actionProviderCallback)&&void 0!==i?i:this.actionProviderCallback,this.setBulkActions(this.serverActionData)}onAction(t){"executeBulkAction"===t&&this.refresh()}async fetchBulkActions(){var t;try{this.gridId=null===(t=this.api.getGridOption("context"))||void 0===t?void 0:t.gridId,await g(this.gridId,!1,[],this.setBulkActions)}catch(t){console.error(t)}}isActive(){return this.selectedRowCount>0}render(){return t("div",{class:"bulk-actions-bar"},t("udp-fluent-icon-button",{iconName:"dismiss",appearance:"subtle",shape:"circular",ariaLabel:"Clear selection",onClick:this.clearSelection,style:{animationDelay:"10ms"}}),t("udp-text",{variant:"body1",style:{animationDelay:"20ms"}},this.selectedRowCount," Selected"),this.bulkActions.length>0&&t("div",{class:"bulk-actions-divider",style:{animationDelay:"20ms"}}),this.bulkActions.map((e=>t("udp-fluent-button",{appearance:at(e.buttonIntent),class:"danger"===e.buttonIntent?"bulk-action-danger":void 0,startIconName:e.startIconName,onClick:e.onClick,style:{animationDelay:"20ms"},loading:e.loading},e.text))))}},agGridResetColumns:class{init(t){this.gridApi=t}onAction(t){"agGridResetColumns"===t&&this.gridApi.resetColumnState()}},advancedSearch:class{init(t,e,i){this.onOpenCallback=null==i?void 0:i.callback}onAction(t){var e;"advancedSearch"===t&&(null===(e=this.onOpenCallback)||void 0===e||e.call(this))}},agGridHideShowColumns:class{init(t){this.gridApi=t}onAction(t){"agGridHideShowColumns"===t&&this.gridApi.showColumnChooser()}},udpExport:class{init(t,e,i){this.onOpenCallback=null==i?void 0:i.callback,this.api=t}onAction(t){var e;if("udpExport"===t){const t=this.api.getGridOption("context");null===(e=this.onOpenCallback)||void 0===e||e.call(this,null==t?void 0:t.searchObject,null==t?void 0:t.entityName)}}},quickFilter:class{constructor(){this.searchValue="",this.debounce=0,this.applyFilter=t=>{var e;this.api.setGridOption("quickFilterText",t),null===(e=this.callback)||void 0===e||e.call(this,t),this.refresh()},this.handleSearch=t=>{this.searchValue=t.detail,clearTimeout(this.debounceTimer),this.debounce>0?this.debounceTimer=setTimeout((()=>this.applyFilter(this.searchValue)),this.debounce):this.applyFilter(this.searchValue)}}init(t,e,i){var s;this.api=t,this.refresh=e,this.callback=null==i?void 0:i.callback,this.debounce=null!==(s=null==i?void 0:i.debounce)&&void 0!==s?s:0}update(t){var e;this.callback=null==t?void 0:t.callback,this.debounce=null!==(e=null==t?void 0:t.debounce)&&void 0!==e?e:0}destroy(){clearTimeout(this.debounceTimer),this.api.setGridOption("quickFilterText","")}render(){return t("div",{style:{width:"200px"}},t("udp-search-input",{value:this.searchValue,placeholder:"Search",onValueChanged:this.handleSearch,includeErrorPadding:!1,autocomplete:"off"}))}},agGridRefreshData:class{constructor(){this.loading=!1,this.handleStoreRefreshed=()=>{var t;this.loading=!1,this.refresh(),null===(t=this.onRefreshComplete)||void 0===t||t.call(this)}}init(t,e,i){this.api=t,this.refresh=e,this.onRefreshStart=null==i?void 0:i.onRefreshStart,this.onRefreshComplete=null==i?void 0:i.onRefreshComplete,this.api.addEventListener("storeRefreshed",this.handleStoreRefreshed),this.api.addEventListener("rowDataUpdated",this.handleStoreRefreshed)}update(t){this.onRefreshStart=null==t?void 0:t.onRefreshStart,this.onRefreshComplete=null==t?void 0:t.onRefreshComplete}destroy(){this.api.removeEventListener("storeRefreshed",this.handleStoreRefreshed),this.api.removeEventListener("rowDataUpdated",this.handleStoreRefreshed)}isRefreshing(){return this.loading}onAction(t){var e;"agGridRefreshData"===t&&(this.loading=!0,this.refresh(),null===(e=this.onRefreshStart)||void 0===e||e.call(this),"serverSide"===this.api.getGridOption("rowModelType")&&this.api.refreshServerSide())}},agGridExpandCollapseAll:class{constructor(){this.expanded=!1}init(t,e){this.api=t,this.refresh=e}isExpanded(){return this.expanded}onAction(t){"agGridExpandCollapseAll"===t&&(this.expanded?this.api.collapseAll():this.api.expandAll(),this.expanded=!this.expanded,this.refresh())}}};function lt(t,e){const i=document.createElement("div");i.style.cssText="display: flex; flex-direction: column; justify-content: center; line-height: 1; gap: 2px;";const s=document.createElement("span");if(s.textContent=null!=t?t:"-",s.style.cssText="display: block;",i.appendChild(s),e){const t=document.createElement("span");t.textContent=e,t.style.cssText="display: block; font-size: 0.9em; opacity: 0.65;",i.appendChild(t)}return i}class rt{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; align-items: center; gap: 8px;";const s=document.createElement("udp-fluent-avatar");t.getSrc&&(s.src=t.getSrc(t)),t.getIconName&&(s.iconName=t.getIconName(t),t.iconVariant&&(s.iconVariant=t.iconVariant)),t.getName&&(s.name=t.getName(t)),t.getInitials&&(s.initials=t.getInitials(t)),s.size=null!==(e=t.size)&&void 0!==e?e:28,t.shape&&(s.shape=t.shape),t.getColor?s.color=t.getColor(t):t.color&&(s.color=t.color);const o=`${null!==(i=t.size)&&void 0!==i?i:28}px`;if(s.style.cssText=`align-self: center; flex-shrink: 0; width: ${o}; height: ${o};`,this.eGui.appendChild(s),t.getValues){const e=t.getValues(t);e&&this.eGui.appendChild(lt(e.title,e.subtitle))}}getGui(){return this.eGui}refresh(){return!1}}class dt{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; width: 100%; align-items: center; overflow: hidden;";const s=t.getSrc(t),o=document.createElement("udp-fluent-image");t.fit&&(o.fit=t.fit),t.shape&&(o.shape=t.shape),o.style.cssText="display: block; height: 100%; width: 100%; overflow: hidden;";const a=document.createElement("img");a.src=s,a.alt=null!==(e=t.alt)&&void 0!==e?e:"",a.style.cssText=`height: 100%; width: 100%; max-height: 100%; max-width: 100%; object-fit: ${null!==(i=t.fit)&&void 0!==i?i:"contain"}; display: block;`,o.appendChild(a),this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}class ht{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; align-items: center;";const s=t.getHref?t.getHref(t):null!==(e=t.href)&&void 0!==e?e:"",o=document.createElement("udp-fluent-link");o.href=s,o.target=null!==(i=t.target)&&void 0!==i?i:"_self",o.textContent=t.value,this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}class ct{init(t){this.node=t.node,this.eGui=document.createElement("div"),this.eGui.setAttribute("style","display: flex; align-items: center; height: 100%;"),this.eValueContainer=document.createElement("span"),this.eValueContainer.setAttribute("class","eValueContainer"),this.eGui.appendChild(this.eValueContainer),this.renderContent(t)}getGui(){return this.eGui}refresh(t){return!(!this.eValueContainer||!this.node||(this.renderContent(t),0))}renderContent(t){this.eValueContainer.innerHTML="";let e=null;if(this.node.group&&(null==t?void 0:t.getHeaderValues)?e=t.getHeaderValues(t):!this.node.group&&(null==t?void 0:t.getValues)&&(e=t.getValues(t)),!e)return;const i=document.createElement("div");i.className="custom-group-column",i.appendChild(lt(e.title,e.subtitle)),this.eValueContainer.appendChild(i)}destroy(){}}const ut=t=>{const e=t.value;if(null==e)return"";const i=new Date(e);return i?`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")} ${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`:""},pt=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.gridReady=s(this,"gridReady",7),this.gridFunctions=[],this.refreshKey=0,this.gridFunctionInstances=[],this.myTheme=a.withParams({wrapperBorderRadius:0,wrapperBorder:!1,headerCellHoverBackgroundColor:"var(--udp-grid-column-header-bg-hover)",borderColor:"#E9ECEF"}),this.updateGridHeight=()=>{if(this.gridEl&&this.gridContainerEl.clientWidth>0){const t=this.gridEl.getBoundingClientRect(),e=window.innerHeight-t.top,i=10;this.gridEl.style.height=(e-i>400?e-i:400)+"px"}},this.scheduleHeightUpdate=()=>{clearTimeout(this.resizeDebounce),this.resizeDebounce=setTimeout(this.updateGridHeight,100)},this.attachAutoHeight=()=>{this.resizeObserver||(this.updateGridHeight(),this.resizeObserver=new ResizeObserver(this.scheduleHeightUpdate),this.resizeObserver.observe(this.gridContainerEl),window.addEventListener("resize",this.scheduleHeightUpdate))},this.detachAutoHeight=()=>{var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0,window.removeEventListener("resize",this.scheduleHeightUpdate),clearTimeout(this.resizeDebounce)},this.refreshGridFunctions=()=>{this.refreshKey++},this.onGridReady=async t=>{this.gridApi=t.api,this.updateGridContextValues(),this.columnDefs&&this.setColumnDefs();const e=[];this.gridFunctionInstances=this.gridFunctions.map((t=>{const i=nt[t.name];if(!i)return null;const s=new i,o=s.init(this.gridApi,this.refreshGridFunctions,t.params);return o&&e.push(o),s})).filter((t=>!!t)),await Promise.all(e),this.gridApiCallback&&this.gridApiCallback({refreshServerSide:()=>this.gridApi.refreshServerSide(),applyTransaction:t=>this.gridApi.applyTransaction(t),ensureIndexVisible:(t,e)=>this.gridApi.ensureIndexVisible(t,e),getSelectedRows:()=>this.gridApi.getSelectedRows(),getSelectedNodes:()=>this.gridApi.getSelectedNodes(),getSearchObject:()=>this.gridApi.getGridOption("context").searchObject,getEntityName:()=>this.gridApi.getGridOption("context").entityName,getRowCount:()=>this.gridApi.getGridOption("context").rowCount,getFilterModel:()=>this.gridApi.getFilterModel(),setFilterModel:t=>this.gridApi.setFilterModel(t),onFilterChanged:()=>this.gridApi.onFilterChanged(),expandAll:()=>this.gridApi.expandAll(),collapseAll:()=>this.gridApi.collapseAll(),toggleLoadingOverlay:t=>this.gridApi.setGridOption("loading",t),refreshCells:()=>this.gridApi.refreshCells(),refreshClientSideRowModel:t=>this.gridApi.refreshClientSideRowModel(t),selectAll:(t,e)=>this.gridApi.selectAll(t,e),deselectAll:(t,e)=>this.gridApi.deselectAll(t,e),getServerSideSelectionState:()=>this.gridApi.getServerSideSelectionState(),setServerSideSelectionState:t=>this.gridApi.setServerSideSelectionState(t),forEachNode:t=>this.gridApi.forEachNode(t),forEachNodeAfterFilterAndSort:t=>this.gridApi.forEachNodeAfterFilterAndSort(t),stopEditing:t=>this.gridApi.stopEditing(t),getFocusedCell:()=>this.gridApi.getFocusedCell()}),this.gridReady.emit(this.gridApi)},this.onHeaderAction=t=>{this.gridFunctionInstances.forEach((e=>{var i;return null===(i=e.onAction)||void 0===i?void 0:i.call(e,t.detail.name,t.detail.payload)}))},this.updateGridContextValues=()=>{this.gridApi.setGridOption("context",Object.assign(Object.assign({},this.gridApi.getGridOption("context")),{entityName:this.entityName,gridId:this.gridId}))}}componentWillLoad(){n.registerModules([l]),r.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-080613}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Univerus_Software_Inc}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{MAIS_eRec}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{MAIS_eRec}_need_to_be_licensed___{MAIS_eRec}_has_not_been_granted_a_Deployment_License_Add-on___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{28_June_2026}____[v3]_[01]_MTc4MjYwMTIwMDAwMA==5c7d1487ecb13b28e75415d34b7cf694")}componentDidLoad(){var t,e,i,s;const o=Object.assign(Object.assign({tooltipShowMode:"whenTruncated",tooltipShowDelay:500},this.gridOptions),{columnTypes:{booleanChip:{cellRenderer:"iconRenderer",cellRendererParams:{iconMappingConfig:{true:{iconName:"checkMark24",color:"success"},false:{iconName:"close24",color:"error"}}}}},dataTypeDefinitions:{dateTimeString:{baseDataType:"dateTimeString",extendsDataType:"dateTimeString",valueFormatter:ut},boolean:{baseDataType:"boolean",extendsDataType:"boolean",columnTypes:"booleanChip"}},gridId:this.gridId,onGridReady:t=>{this.onGridReady(t)},theme:this.myTheme,components:Object.assign({actionsRenderer:w,avatarRenderer:rt,iconRenderer:k,imageRenderer:dt,linkRenderer:ht,statusRenderer:y,subtitleRenderer:ct},null===(t=this.gridOptions)||void 0===t?void 0:t.components),domLayout:"normal",defaultColDef:Object.assign(Object.assign({cellDataType:!1,sortable:!0,filter:!0,flex:1,minWidth:150,suppressHeaderMenuButton:!0},null===(e=this.gridOptions)||void 0===e?void 0:e.defaultColDef),{filterParams:Object.assign({buttons:["reset","apply"],closeOnApply:!0,maxNumConditions:10},null===(s=null===(i=this.gridOptions)||void 0===i?void 0:i.defaultColDef)||void 0===s?void 0:s.filterParams)})});d(this.gridEl,o),this.gridHeight?this.gridEl.style.height=this.gridHeight:this.attachAutoHeight()}disconnectedCallback(){var t;null===(t=this.gridApi)||void 0===t||t.destroy(),this.detachAutoHeight()}handleUpdateGridFunctions(t,e){this.gridApi&&t!==e&&t.forEach(((t,e)=>{var i,s;null===(s=null===(i=this.gridFunctionInstances[e])||void 0===i?void 0:i.update)||void 0===s||s.call(i,t.params)}))}handleUpdateGridHeight(t){this.gridEl&&(t?(this.detachAutoHeight(),this.gridEl.style.height=t):this.attachAutoHeight())}handleUpdateColumnDefs(t,e){this.gridApi&&!_(t,e)&&this.setColumnDefs()}setColumnDefs(){var t;const e=f(this.columnDefs,null===(t=this.gridFunctions)||void 0===t?void 0:t.some((t=>"advancedSearch"===(null==t?void 0:t.name))));this.gridApi.setGridOption("columnDefs",e)}handleEntityNameChange(){this.updateGridContextValues()}render(){return t("div",{key:"28295b31bb57a79c026571c4bc2658bc142a6044",ref:t=>this.gridContainerEl=t},t("ghost-render",{key:"00d8044044b9df22e0b9ea5384b299aaa71d1962"},t("div",{key:"f1b96881e7881fb6d815c090ae3ce41e7cd0d3fe"},t("udp-dialog",{key:"07cabede25361ce396c09de8e858d140ad581345"}),t("udp-list-item",{key:"2706ad0e6c0dd7ce5cf12cb490f7709ca5c0956c"}),t("hint-panel",{key:"9893d09d8fa85966e08feaa32b423e4ef28946ca"}),t("udp-side-sheet",{key:"d24b860add93c6455938fd83b1830188b08536c1"}),t("udp-fluent-dialog",{key:"68b35903b5f563d6c93d5a0b28f01a880f7dca2a"}),t("udp-fluent-text",{key:"c0b84fc1e06db10433cd9bf255c916d965f943b0"}),t("udp-fluent-text-input",{key:"4125ae2f44e892b4a4304b593d1ec783807d765e"}),t("udp-fluent-switch",{key:"acb3cc843565fc2a276a5ace8af9f2273be5751e"}),t("udp-fluent-button",{key:"b339290e313091f1cb02e87bceab213ff0cfe48d"}),t("udp-text",{key:"6f562b11231b95ff2ab5263fd93d50e692f4c535"}),t("udp-search-input",{key:"de54983644895e8bc6f084c7b17abbd3b4eabae2"}),t("udp-fluent-avatar",{key:"7f07751beadae953c84f12577517e72d08662296"}),t("udp-fluent-icon-button",{key:"92ca31065f3af5c6e89ae945de004bfd18c418de"}),t("udp-fluent-icon",{key:"4a82b60fbfbe19cde29280c0abd71dcfaa53c6a5"}),t("udp-fluent-badge",{key:"392307e71d90db19c34099aedba1db573fc1e601"}))),t("grid-header",{key:"c13cac1e69b3006a053501fcbf5d5729c12f112e",headerConfig:this.headerConfig,gridFunctions:this.gridFunctions,gridFunctionInstances:this.gridFunctionInstances,refreshKey:this.refreshKey,onHeaderAction:this.onHeaderAction}),t("div",{key:"06cf43709ccf9e5d75a7c6a35dce3561adea98f2",ref:t=>this.gridEl=t}))}static get watchers(){return{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}}static get style(){return".variant-dark{--udp-grid-column-header-bg:#F8F9FA;--udp-grid-column-header-bg-hover:#dce6f2;--udp-grid-column-header-text:var(--primary-color-dark)}.variant-light{--udp-grid-column-header-bg:#f2f4f5;--udp-grid-column-header-bg-hover:#eef3f9;--udp-grid-column-header-text:var(--primary-color-dark)}::view-transition-group(*){animation-duration:0.2s}.grid-wrapper{display:flex;flex-direction:column;height:100%}#myNewGrid{flex:1}.ag-cell.udp-col-brand{background-color:var(--colorBrandBackground2) !important;color:var(--colorBrandForeground2)}.ag-header-cell.udp-col-brand-header{background-color:var(--colorBrandBackground2) !important}.ag-header-cell.udp-col-brand-header .ag-header-cell-text{color:var(--colorBrandForeground2)}.ag-cell.udp-col-danger{background-color:var(--colorPaletteRedBackground1) !important;color:var(--colorPaletteRedForeground1)}.ag-header-cell.udp-col-danger-header{background-color:var(--colorPaletteRedBackground1) !important}.ag-header-cell.udp-col-danger-header .ag-header-cell-text{color:var(--colorPaletteRedForeground1)}.ag-cell.udp-col-important{background-color:color-mix(in srgb, var(--colorNeutralForeground1) 20%, transparent) !important;color:var(--colorNeutralForeground1)}.ag-header-cell.udp-col-important-header{background-color:color-mix(in srgb, var(--colorNeutralForeground1) 20%, transparent) !important}.ag-header-cell.udp-col-important-header .ag-header-cell-text{color:var(--colorNeutralForeground1)}.ag-cell.udp-col-informative{background-color:color-mix(in srgb, var(--colorPaletteBlueBackground2) 20%, transparent) !important;color:color-mix(in srgb, var(--colorPaletteBlueForeground2) 85%, transparent)}.ag-header-cell.udp-col-informative-header{background-color:color-mix(in srgb, var(--colorPaletteBlueBackground2) 20%, transparent) !important}.ag-header-cell.udp-col-informative-header .ag-header-cell-text{color:color-mix(in srgb, var(--colorPaletteBlueForeground2) 85%, transparent)}.ag-cell.udp-col-severe{background-color:var(--colorPaletteDarkOrangeBackground1) !important;color:var(--colorPaletteDarkOrangeForeground1)}.ag-header-cell.udp-col-severe-header{background-color:var(--colorPaletteDarkOrangeBackground1) !important}.ag-header-cell.udp-col-severe-header .ag-header-cell-text{color:var(--colorPaletteDarkOrangeForeground1)}.ag-cell.udp-col-subtle{background-color:var(--colorNeutralBackground1) !important;color:var(--colorNeutralForeground3)}.ag-header-cell.udp-col-subtle-header{background-color:var(--colorNeutralBackground1) !important}.ag-header-cell.udp-col-subtle-header .ag-header-cell-text{color:var(--colorNeutralForeground3)}.ag-cell.udp-col-success{background-color:var(--colorPaletteGreenBackground1) !important;color:var(--colorPaletteGreenForeground1)}.ag-header-cell.udp-col-success-header{background-color:var(--colorPaletteGreenBackground1) !important}.ag-header-cell.udp-col-success-header .ag-header-cell-text{color:var(--colorPaletteGreenForeground1)}.ag-cell.udp-col-warning{background-color:var(--colorPaletteYellowBackground1) !important;color:var(--colorPaletteYellowForeground2)}.ag-header-cell.udp-col-warning-header{background-color:var(--colorPaletteYellowBackground1) !important}.ag-header-cell.udp-col-warning-header .ag-header-cell-text{color:var(--colorPaletteYellowForeground2)}"}},[0,"ag-grid-base",{columnDefs:[16],gridOptions:[16],headerConfig:[16],gridHeight:[1,"grid-height"],gridFunctions:[16],gridId:[1,"grid-id"],entityName:[1,"entity-name"],gridApiCallback:[16],refreshKey:[32]},void 0,{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}]);function mt(){"undefined"!=typeof customElements&&["ag-grid-base","ghost-render","grid-header","hint-panel","stencil-icon-button","udp-ambient-tool-tip","udp-avatar","udp-badge","udp-button","udp-dialog","udp-flexbox","udp-fluent-avatar","udp-fluent-badge","udp-fluent-button","udp-fluent-dialog","udp-fluent-icon","udp-fluent-icon-button","udp-fluent-menu","udp-fluent-switch","udp-fluent-text-input","udp-icon","udp-linear-loader","udp-list-item","udp-menu-item","udp-pop-over","udp-primary-action-header","udp-search-input","udp-side-sheet","udp-spinner","udp-text","udp-tooltip","unity-typography"].forEach((t=>{switch(t){case"ag-grid-base":customElements.get(o(t))||customElements.define(o(t),pt);break;case"ghost-render":customElements.get(o(t))||C();break;case"grid-header":customElements.get(o(t))||x();break;case"hint-panel":customElements.get(o(t))||S();break;case"stencil-icon-button":customElements.get(o(t))||N();break;case"udp-ambient-tool-tip":customElements.get(o(t))||E();break;case"udp-avatar":customElements.get(o(t))||j();break;case"udp-badge":customElements.get(o(t))||F();break;case"udp-button":customElements.get(o(t))||O();break;case"udp-dialog":customElements.get(o(t))||A();break;case"udp-flexbox":customElements.get(o(t))||D();break;case"udp-fluent-avatar":customElements.get(o(t))||T();break;case"udp-fluent-badge":customElements.get(o(t))||R();break;case"udp-fluent-button":customElements.get(o(t))||G();break;case"udp-fluent-dialog":customElements.get(o(t))||I();break;case"udp-fluent-icon":customElements.get(o(t))||P();break;case"udp-fluent-icon-button":customElements.get(o(t))||J();break;case"udp-fluent-menu":customElements.get(o(t))||M();break;case"udp-fluent-switch":customElements.get(o(t))||B();break;case"udp-fluent-text-input":customElements.get(o(t))||V();break;case"udp-icon":customElements.get(o(t))||$();break;case"udp-linear-loader":customElements.get(o(t))||U();break;case"udp-list-item":customElements.get(o(t))||z();break;case"udp-menu-item":customElements.get(o(t))||H();break;case"udp-pop-over":customElements.get(o(t))||L();break;case"udp-primary-action-header":customElements.get(o(t))||W();break;case"udp-search-input":customElements.get(o(t))||Y();break;case"udp-side-sheet":customElements.get(o(t))||q();break;case"udp-spinner":customElements.get(o(t))||K();break;case"udp-text":customElements.get(o(t))||Q();break;case"udp-tooltip":customElements.get(o(t))||X();break;case"unity-typography":customElements.get(o(t))||Z()}}))}export{pt as A,mt as d}
1
+ import{h as t,p as e,H as i,c as s,t as o}from"./index2.js";import{themeQuartz as n,ModuleRegistry as a,AllEnterpriseModule as l,LicenseManager as r,createGrid as d}from"ag-grid-enterprise-v33";import{w as h,i as c,r as u,s as p,u as m,p as g}from"./apiUtils.js";import{g as v,c as f}from"./configureUdpColumnMods.js";import{g as b}from"./tenantUtils.js";import{S as y,I as k,A as w}from"./status-renderer.js";import{isEqual as _}from"lodash-es";import{d as C}from"./ghost-render2.js";import{d as x}from"./grid-header2.js";import{d as S}from"./hint-panel2.js";import{d as N}from"./stencil-icon-button2.js";import{d as E}from"./udp-ambient-tool-tip2.js";import{d as j}from"./udp-avatar2.js";import{d as O}from"./udp-badge2.js";import{d as F}from"./udp-button2.js";import{d as A}from"./udp-dialog2.js";import{d as D}from"./udp-flexbox2.js";import{d as T}from"./udp-fluent-avatar2.js";import{d as R}from"./udp-fluent-badge2.js";import{d as G}from"./udp-fluent-button2.js";import{d as I}from"./udp-fluent-dialog2.js";import{d as J}from"./udp-fluent-icon2.js";import{d as P}from"./udp-fluent-icon-button2.js";import{d as M}from"./udp-fluent-menu2.js";import{d as B}from"./udp-fluent-switch2.js";import{d as V}from"./udp-fluent-text-input2.js";import{d as $}from"./udp-icon2.js";import{d as U}from"./udp-linear-loader2.js";import{d as z}from"./list-item.js";import{d as H}from"./udp-menu-item2.js";import{d as L}from"./udp-pop-over2.js";import{d as W}from"./udp-primary-action-header2.js";import{d as Y}from"./udp-search-input2.js";import{d as q}from"./udp-side-sheet2.js";import{d as K}from"./udp-spinner2.js";import{d as Q}from"./udp-text2.js";import{d as X}from"./udp-tooltip2.js";import{d as Z}from"./unity-typography2.js";function tt(){return sessionStorage.getItem("user-id")}const et=async t=>{(null===document||void 0===document?void 0:document.startViewTransition)?(document.viewTransition&&await document.viewTransition.finished.catch((()=>{})),document.startViewTransition(t)):t()};function it(t){const e=new Date(t),i=Math.floor((Date.now()-e.getTime())/1e3);if(i<60)return`${i} second${1!==i?"s":""} ago`;const s=Math.floor(i/60);if(s<60)return`${s} minute${1!==s?"s":""} ago`;const o=Math.floor(s/60);if(o<24)return`${o} hour${1!==o?"s":""} ago`;const n=Math.floor(o/24);return`${n} day${1!==n?"s":""} ago`}function st(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>1===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function ot(t){var e;return null===(e=t.gridViewGridViewGridConfiguration)||void 0===e?void 0:e.find((t=>4===t.gridViewGridConfigurationGridConfiguration.gridStateTypeId))}function nt(t){switch(t){case"primary":return"primary";case"ghost":return"subtle";default:return"secondary"}}const at={agGridExport:class{constructor(t="export.csv"){this.fileName=t}init(t){this.gridApi=t}onAction(t){"agGridExport"===t&&this.gridApi.exportDataAsCsv({fileName:this.fileName})}},openSavedViews:class{constructor(){this.filteredViews=[],this.allViewData=[],this.activeViewId=null,this.activeViewState=null,this.loading=!1,this.isDirty=!1,this.viewDialogMode=null,this.hoveredViewId=null,this.loadingViewId=null,this.deleteConfirmView=null,this.editingView=null,this.dialogName="",this.dialogIsPublic=!1,this.dialogMode="create",this.baseColumnState=null,this.localRestoredState=null,this.localStorageDebounceId=null,this.baselineRecaptureId=null,this.initialLoad=!0,this.dirtyListenerTimeoutId=null,this.scheduleDirtyListeners=()=>{null!==this.dirtyListenerTimeoutId&&clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=setTimeout((()=>{this.dirtyListenerTimeoutId=null,this.addDirtyListeners()}),300)},this.addDirtyListeners=()=>{this.api.addEventListener("columnVisible",this.checkIfDirty),this.api.addEventListener("columnPinned",this.checkIfDirty),this.api.addEventListener("columnMoved",this.checkIfDirty),this.api.addEventListener("columnPivotChanged",this.checkIfDirty),this.api.addEventListener("columnRowGroupChanged",this.checkIfDirty),this.api.addEventListener("columnValueChanged",this.checkIfDirty),this.api.addEventListener("columnsReset",this.checkIfDirty),this.api.addEventListener("filterChanged",this.checkIfDirty),this.api.addEventListener("sortChanged",this.checkIfDirty)},this.removeDirtyListeners=()=>{this.api.removeEventListener("columnVisible",this.checkIfDirty),this.api.removeEventListener("columnPinned",this.checkIfDirty),this.api.removeEventListener("columnMoved",this.checkIfDirty),this.api.removeEventListener("columnPivotChanged",this.checkIfDirty),this.api.removeEventListener("columnRowGroupChanged",this.checkIfDirty),this.api.removeEventListener("columnValueChanged",this.checkIfDirty),this.api.removeEventListener("columnsReset",this.checkIfDirty),this.api.removeEventListener("filterChanged",this.checkIfDirty),this.api.removeEventListener("sortChanged",this.checkIfDirty)},this.onColumnsChanged=()=>{var t;if(!this.baseColumnState)return;const e=this.getPrimaryColIds(),i=t=>t.filter((t=>e.has(t.colId))).map((t=>t.colId)).join(",");i(null!==(t=this.api.getColumnState())&&void 0!==t?t:[])!==i(JSON.parse(this.baseColumnState))&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.isDirty&&(this.isDirty=!1,this.refresh()))},this.getStorageKey=()=>{const t=b();return`saved-grid-state-${this.gridId}-${t}`},this.saveCurrentStateToLocalStorage=()=>{null!==this.localStorageDebounceId&&clearTimeout(this.localStorageDebounceId),this.localStorageDebounceId=setTimeout((()=>{if(this.localStorageDebounceId=null,!this.gridId)return;const t=this.getStorageKey(),e={date:(new Date).toISOString(),columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())};localStorage.setItem(t,JSON.stringify(e))}),500)},this.applyLocalRestoredState=()=>{if(this.localRestoredState){this.removeDirtyListeners(),this.api.setGridOption("loading",!0);try{const t=JSON.parse(this.localRestoredState.columnState);t&&this.api.applyColumnState({state:t,applyOrder:!0});const e=JSON.parse(this.localRestoredState.filterModel);this.api.setFilterModel(e)}catch(t){console.error("Failed to apply restored state",t)}this.localRestoredState=null,this.isDirty=!0,et((()=>{this.api.setGridOption("loading",!1),this.refresh(),this.scheduleDirtyListeners(),this.saveCurrentStateToLocalStorage()}))}},this.getPrimaryColIds=()=>{var t;return new Set((null!==(t=this.api.getColumns())&&void 0!==t?t:[]).filter((t=>t.isPrimary())).map((t=>t.getColId())))},this.serializeUserColumnState=t=>{const e=this.getPrimaryColIds();return JSON.stringify(t.filter((t=>e.has(t.colId))))},this.checkIfDirty=()=>{var t,e;if(null!==this.baselineRecaptureId)return;let i;if(this.activeViewId&&this.activeViewState){const e=this.serializeUserColumnState(null!==(t=this.api.getColumnState())&&void 0!==t?t:[]),s=this.serializeUserColumnState(JSON.parse(this.activeViewState.columnState)),o=JSON.stringify(this.api.getFilterModel());i=e!==s||o!==this.activeViewState.filterModel}else{const t=this.api.getFilterModel(),s=Object.keys(null!=t?t:{}).length>0,o=this.serializeUserColumnState(null!==(e=this.api.getColumnState())&&void 0!==e?e:[]),n=null!==this.baseColumnState?this.serializeUserColumnState(JSON.parse(this.baseColumnState)):null;i=s||null!==n&&o!==n}i!==this.isDirty&&(this.isDirty=i,this.refresh()),this.saveCurrentStateToLocalStorage()},this.scheduleBaselineRecapture=()=>{null!==this.baselineRecaptureId&&clearTimeout(this.baselineRecaptureId),this.baselineRecaptureId=setTimeout((()=>{this.baselineRecaptureId=null,this.activeViewId||(this.baseColumnState=JSON.stringify(this.api.getColumnState())),this.isDirty&&(this.isDirty=!1,this.refresh())}),0)},this.fetchViews=async()=>{var t;this.loading=!0,this.refresh();const e=this.api.getGridOption("context");if(this.gridId=null!==(t=null==e?void 0:e.gridId)&&void 0!==t?t:"",!this.gridId)return console.warn("[SavedViews] No gridId provided in grid context — saved views will not work."),this.loading=!1,void this.refresh();const i=this.getStorageKey(),s=localStorage.getItem(i);if(s)try{this.localRestoredState=JSON.parse(s)}catch(t){console.warn("[SavedViews] Failed to parse local restored state",t)}this.allViewData=await h(tt(),this.gridId),this.filterData(),this.initialLoad&&(this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.applyDefaultView()),this.loading=!1,this.refresh()},this.filterData=()=>{var t,e,i;const s=this.api.getGridOption("context");this.entityName=null!==(t=null==s?void 0:s.entityName)&&void 0!==t?t:"",this.filteredViews=this.entityName?(null!==(e=this.allViewData)&&void 0!==e?e:[]).filter((t=>t.domain===this.entityName)):null!==(i=this.allViewData)&&void 0!==i?i:[],this.activeViewId&&!this.filteredViews.some((t=>t.gridViewId===this.activeViewId))&&(this.activeViewId=null,this.activeViewState=null,this.isDirty=!1),this.refresh()},this.pendingReapplyFilter=null,this.removeReapplyFilterListener=()=>{this.pendingReapplyFilter&&(this.api.removeEventListener("rowDataUpdated",this.pendingReapplyFilter),this.pendingReapplyFilter=null)},this.applyDefaultView=()=>{const t=this.filteredViews.find((t=>t.isDefault));if(t&&(this.setActiveView(t),"clientSide"===this.api.getGridOption("rowModelType"))){const e=ot(t),i=this.api.getGridOption("rowData");if(e&&(!i||0===i.length)){const t=JSON.parse(e.gridViewGridConfigurationGridConfiguration.values);this.api.setGridOption("loading",!0);const i=()=>{const e=this.api.getGridOption("rowData");e&&0!==e.length&&(null!==this.dirtyListenerTimeoutId&&(clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=null),this.removeDirtyListeners(),this.api.setFilterModel(t),this.activeViewState={columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())},this.isDirty=!1,this.scheduleDirtyListeners(),this.removeReapplyFilterListener(),this.api.setGridOption("loading",!1),this.refresh())};this.pendingReapplyFilter=i,this.api.addEventListener("rowDataUpdated",i),null!==this.dirtyListenerTimeoutId&&(clearTimeout(this.dirtyListenerTimeoutId),this.dirtyListenerTimeoutId=null),this.removeDirtyListeners()}}this.initialLoad=!1},this.setActiveView=t=>{this.removeDirtyListeners();const e=st(t),i=ot(t);e&&this.api.applyColumnState({state:JSON.parse(e.gridViewGridConfigurationGridConfiguration.values),applyOrder:!0});const s=i?JSON.parse(i.gridViewGridConfigurationGridConfiguration.values):null;this.api.setFilterModel(s),this.activeViewId=t.gridViewId,this.activeViewState={columnState:JSON.stringify(this.api.getColumnState()),filterModel:JSON.stringify(this.api.getFilterModel())},this.isDirty=!1,this.saveCurrentStateToLocalStorage(),et((()=>{this.refresh(),this.scheduleDirtyListeners()}))},this.clearView=()=>{this.removeDirtyListeners(),this.baseColumnState?this.api.applyColumnState({state:JSON.parse(this.baseColumnState),applyOrder:!0}):this.api.resetColumnState(),this.api.setFilterModel(null),this.activeViewId=null,this.activeViewState=null,this.isDirty=!1,this.saveCurrentStateToLocalStorage(),et((()=>{this.refresh(),this.scheduleDirtyListeners()}))},this.deleteView=async t=>{this.loading=!0,this.refresh();const e=this.activeViewId===t.gridViewId;try{await c(t.gridViewId,(()=>null)),e&&this.clearView(),await this.fetchViews()}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}},this.handleDirtyReset=()=>{const t=this.activeView;t&&(this.isDirty=!1,this.setActiveView(t))},this.handleUpdateCurrentView=async()=>{var t;const e=this.activeView;if(!e)return;this.loading=!0,this.refresh();const i=this.api.getGridOption("context"),s=st(e),o=ot(e),n=[{gridConfigurationId:null==s?void 0:s.gridViewGridConfigurationGridConfiguration.gridConfigurationId,gridStateTypeId:1,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getColumnState())},{gridConfigurationId:null==o?void 0:o.gridViewGridConfigurationGridConfiguration.gridConfigurationId,gridStateTypeId:4,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getFilterModel())}];try{await u(e.gridViewId,tt(),null==i?void 0:i.gridId,v(),e.name,n,e.isDefault?1:0,null==i?void 0:i.entityName,null!==(t=e.gridViewVisibilityTypeId)&&void 0!==t?t:1,(()=>null)),await this.fetchViews();const s=this.filteredViews.find((t=>t.gridViewId===e.gridViewId));s&&this.setActiveView(s)}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}},this.handleSaveAsNew=()=>{this.dialogName="",this.dialogIsPublic=!1,this.dialogMode="create",this.viewDialogMode="create",this.refresh()},this.handleEditRequest=t=>{this.dialogName=t.name,this.dialogIsPublic=2===t.gridViewVisibilityTypeId,this.dialogMode="edit",this.editingView=t,this.viewDialogMode="edit",this.refresh()},this.handleDialogNameInput=t=>{this.dialogName=t.detail,this.refresh()},this.handleDialogIsPublicChange=t=>{this.dialogIsPublic=t.detail,this.refresh()},this.handleDialogConfirm=async()=>{const t=this.dialogName.trim();if(!t)return;const e=this.dialogIsPublic?2:1,i=this.editingView;"edit"===this.viewDialogMode&&i?await this.renameView(i,t,e):await this.postView(t,e),this.viewDialogMode=null,this.refresh()},this.handleDialogCancel=()=>{this.viewDialogMode=null,this.refresh()},this.handleDeleteRequest=t=>{this.deleteConfirmView=t,this.refresh()},this.handleDeleteConfirm=async()=>{const t=this.deleteConfirmView;t&&(this.deleteConfirmView=null,await this.deleteView(t))},this.handleDeleteCancel=()=>{this.deleteConfirmView=null,this.refresh()}}get activeView(){var t;return null!==(t=this.filteredViews.find((t=>t.gridViewId===this.activeViewId)))&&void 0!==t?t:null}async init(t,e){var i,s,o;this.api=t,this.refresh=e;const n=this.api.getGridOption("context");if(this.gridId=null!==(i=null==n?void 0:n.gridId)&&void 0!==i?i:"",!this.gridId)return void console.warn("[SavedViews] No gridId provided in grid context — saved views will not work.");const a=this.getStorageKey(),l=localStorage.getItem(a);if(l)try{this.localRestoredState=JSON.parse(l)}catch(t){console.warn("[SavedViews] Failed to parse local restored state",t)}this.loading=!0,this.refresh();const r=h(tt(),this.gridId);0===(null!==(o=null===(s=this.api.getColumnDefs())||void 0===s?void 0:s.length)&&void 0!==o?o:0)&&await new Promise((t=>{const e=()=>{var i,s;(null!==(s=null===(i=this.api.getColumnDefs())||void 0===i?void 0:i.length)&&void 0!==s?s:0)>0&&(this.api.removeEventListener("gridColumnsChanged",e),t())};this.api.addEventListener("gridColumnsChanged",e)})),this.allViewData=await r,this.filterData(),this.baseColumnState=JSON.stringify(this.api.getColumnState()),this.applyDefaultView(),this.initialLoad=!1,this.loading=!1,this.refresh(),this.api.addEventListener("gridColumnsChanged",this.onColumnsChanged),this.scheduleDirtyListeners(),this.pendingReapplyFilter||this.addDirtyListeners(),this.scheduleBaselineRecapture()}destroy(){null!==this.baselineRecaptureId&&clearTimeout(this.baselineRecaptureId),this.removeDirtyListeners(),this.removeReapplyFilterListener(),this.api.removeEventListener("gridColumnsChanged",this.onColumnsChanged)}onAction(t){}async postView(t,e){this.loading=!0,this.refresh();const i=this.api.getGridOption("context"),s=[{gridStateTypeId:1,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getColumnState())},{gridStateTypeId:4,gridId:null==i?void 0:i.gridId,values:JSON.stringify(this.api.getFilterModel())}];try{await p(tt(),null==i?void 0:i.gridId,v(),t,null==i?void 0:i.entityName,s,e,0,(()=>null)),await this.fetchViews();const o=this.filteredViews.find((e=>e.name===t));o&&this.setActiveView(o)}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}}async renameView(t,e,i){this.loading=!0,this.refresh();const s=this.api.getGridOption("context");try{await m(t.gridViewId,tt(),null==s?void 0:s.gridId,v(),e,t.isDefault?1:0,null==s?void 0:s.entityName,i,(()=>null)),await this.fetchViews()}catch(t){console.error(t)}finally{this.loading=!1,this.refresh()}}async setViewAsDefault(t){var e,i;this.loadingViewId=t.gridViewId,this.refresh();const s=this.api.getGridOption("context"),o=t.isDefault;try{if(await m(t.gridViewId,tt(),null==s?void 0:s.gridId,v(),t.name,o?0:1,null==s?void 0:s.entityName,null!==(e=t.gridViewVisibilityTypeId)&&void 0!==e?e:1,(()=>null)),!o){const t=this.filteredViews.find((t=>t.isDefault));t&&await m(t.gridViewId,tt(),null==s?void 0:s.gridId,v(),t.name,0,null==s?void 0:s.entityName,null!==(i=t.gridViewVisibilityTypeId)&&void 0!==i?i:1,(()=>null)).catch((t=>console.log(t)))}await this.fetchViews()}catch(t){console.log(t)}finally{this.loadingViewId=null,this.refresh()}}render(){var e;const i=this.activeView,s=!!i,o=s?this.isDirty?`${i.name} *`:i.name:this.isDirty?"All Records *":"All Records",n=this.filteredViews,a=[...this.localRestoredState?[{id:"restore-local-state",text:`Restore state from ${it(this.localRestoredState.date)}`,startIconName:"clock",sectionNumber:1,onClick:()=>this.applyLocalRestoredState()}]:[],...n.map((t=>({id:`view-${t.gridViewId}`,text:t.name,sectionNumber:2,onClick:()=>{this.setActiveView(t)},onMouseEnter:()=>{this.hoveredViewId=t.gridViewId,this.refresh()},onMouseLeave:()=>{this.hoveredViewId=null,this.refresh()}}))),...this.isDirty&&s?[{id:"update-view",startIconName:"save",text:"Update current view",sectionNumber:3,onClick:()=>this.handleUpdateCurrentView()}]:[],{id:"save-view",startIconName:"add",text:"Create new view",sectionNumber:3,onClick:()=>this.handleSaveAsNew()},{id:"clear-view",text:"Clear active view",startIconName:"dismiss",disabled:!s,sectionNumber:3,onClick:()=>this.clearView()}];return t("div",{class:"view-selector-wrapper"},t("udp-fluent-menu",{class:s?"has-active-view":void 0,label:o,items:a,style:{"--udp-menu-min-width":"200px"}},t("span",{slot:"clear-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Clear Active View"),t("span",{slot:"save-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Create View"),t("span",{slot:"update-view-body",style:{fontWeight:"var(--fontWeightSemibold)"}},"Update Current View"),t("span",{slot:"restore-local-state-body",style:{fontStyle:"italic",color:"var(--colorNeutralForeground2)"}},"Restore unsaved state "+(this.localRestoredState?`(${it(this.localRestoredState.date)})`:"")),n.map((e=>t("div",{key:`start-${e.gridViewId}`,slot:`view-${e.gridViewId}-start`,class:"view-slot-action",style:{opacity:e.isDefault||this.hoveredViewId===e.gridViewId?"1":"0",transition:"opacity 100ms ease"},onClick:t=>t.stopPropagation()},t("udp-fluent-icon-button",{iconName:"star",iconVariant:e.isDefault?"filled":"regular",size:"small",appearance:"transparent",loading:this.loadingViewId===e.gridViewId,onClick:()=>{this.setViewAsDefault(e)}})))),n.map((e=>t("div",{key:`end-${e.gridViewId}`,slot:`view-${e.gridViewId}-end`,class:"view-slot-action",style:{opacity:this.hoveredViewId===e.gridViewId?"1":"0",transition:"opacity 100ms ease"},onClick:t=>t.stopPropagation()},e.userId===tt()&&t("udp-fluent-icon-button",{iconName:"edit",size:"small",appearance:"transparent",onClick:()=>this.handleEditRequest(e)}),e.userId===tt()&&t("udp-fluent-icon-button",{iconName:"delete",size:"small",appearance:"transparent",onClick:()=>this.handleDeleteRequest(e)}))))),(s||this.isDirty)&&t("div",{class:"view-dirty-actions"},t("udp-tooltip",{content:s&&this.isDirty?"Reset to saved view":s?"Clear active view":"Reset to default"},t("udp-fluent-icon-button",{iconName:this.isDirty?"arrow-reset":"dismiss",appearance:"subtle",disabled:this.loading,onClick:s&&this.isDirty?this.handleDirtyReset:this.clearView,shape:"rounded"})),this.isDirty&&(s?t("udp-fluent-menu",{buttonType:"icon",startIconName:"save",shape:"rounded",appearance:"subtle",disabled:this.loading,items:[{text:"Update Current View",startIconName:"save",onClick:()=>{this.handleUpdateCurrentView()}},{text:"Create View",startIconName:"add",onClick:()=>this.handleSaveAsNew()}]}):t("udp-tooltip",{content:"Create View"},t("udp-fluent-icon-button",{iconName:"save",shape:"rounded",appearance:"subtle",disabled:this.loading,onClick:this.handleSaveAsNew})))),t("udp-fluent-dialog",{open:!!this.deleteConfirmView,dialogTitle:"Delete View",onDialogClose:this.handleDeleteCancel},t("udp-fluent-text",null,'Are you sure you want to delete "',null===(e=this.deleteConfirmView)||void 0===e?void 0:e.name,'"?'),t("udp-fluent-button",{slot:"action",appearance:"subtle",onClick:this.handleDeleteCancel},"Cancel"),t("udp-fluent-button",{slot:"action",appearance:"primary",loading:this.loading,onClick:()=>{this.handleDeleteConfirm()}},"Delete")),t("udp-fluent-dialog",{open:!!this.viewDialogMode,dialogTitle:"edit"===this.dialogMode?"Edit View":"Save View",onDialogClose:this.handleDialogCancel},t("udp-fluent-text-input",{value:this.dialogName,label:"Name",onValueChanged:this.handleDialogNameInput,onKeyDown:t=>{"Enter"===t.key&&this.dialogName.trim()&&(t.preventDefault(),this.handleDialogConfirm())}}),t("udp-fluent-switch",{checked:this.dialogIsPublic,label:"Public",onValueChanged:this.handleDialogIsPublicChange}),t("udp-fluent-button",{slot:"action",appearance:"subtle",onClick:this.handleDialogCancel},"Cancel"),t("udp-fluent-button",{slot:"action",appearance:"primary",disabled:!this.dialogName.trim(),loading:this.loading,onClick:()=>{this.handleDialogConfirm()}},"edit"===this.dialogMode?"Update":"Save")))}},agGridSizeColumnsToFit:class{init(t){this.gridApi=t}onAction(t){"agGridSizeColumnsToFit"===t&&this.gridApi.sizeColumnsToFit()}},agGridAutoSizeColumns:class{init(t){this.gridApi=t}onAction(t){"agGridAutoSizeColumns"===t&&this.gridApi.autoSizeAllColumns()}},bulkActions:class{constructor(){this.bulkActions=[],this.selectedRowCount=0,this.fetchedData=!1,this.serverActionData=[],this.onRowSelectionChanged=()=>{var t;et((()=>{const t=this.api.getSelectedRows();this.selectedRows=t,this.selectedRowCount=t.length,this.refresh()})),(!this.fetchedData&&this.gridId||this.gridId&&(null===(t=this.api.getGridOption("context"))||void 0===t?void 0:t.gridId)!==this.gridId)&&this.fetchBulkActions()},this.setBulkActions=t=>{this.serverActionData=t;const e=t.map((t=>({text:t.name,onClick:()=>this.executeActionProviderAction(t.actionId)}))),i=this.localFunctions.map((t=>({text:t.label,startIconName:t.startIconName,buttonIntent:t.buttonIntent,loading:t.loading,onClick:()=>this.executeLocalFunction(t.label)})));this.bulkActions=[...e,...i],this.fetchedData=!0,this.refresh()},this.executeLocalFunction=t=>{const e=this.localFunctions.find((e=>e.label===t));e&&e.callback(this.selectedRows),this.refresh()},this.executeActionProviderAction=t=>{this.actionProviderCallback&&this.actionProviderCallback(t,this.selectedRows),this.refresh()},this.clearSelection=()=>{this.api.deselectAll()}}init(t,e,i){var s,o;this.api=t,this.refresh=e,this.actionProviderCallback=null==i?void 0:i.actionProviderCallback,this.localFunctions=null!==(s=null==i?void 0:i.localFunctions)&&void 0!==s?s:[];const n=this.api.getGridOption("rowModelType");this.api.setGridOption("rowSelection","clientSide"===n?{mode:"multiRow",enableClickSelection:!0}:{mode:"multiRow",enableClickSelection:!0,headerCheckbox:!1}),this.gridId=null===(o=this.api.getGridOption("context"))||void 0===o?void 0:o.gridId,this.gridId?this.fetchBulkActions():this.setBulkActions([]),this.api.addEventListener("selectionChanged",this.onRowSelectionChanged)}update(t){var e,i;this.localFunctions=null!==(e=null==t?void 0:t.localFunctions)&&void 0!==e?e:[],this.actionProviderCallback=null!==(i=null==t?void 0:t.actionProviderCallback)&&void 0!==i?i:this.actionProviderCallback,this.setBulkActions(this.serverActionData)}onAction(t){"executeBulkAction"===t&&this.refresh()}async fetchBulkActions(){var t;try{this.gridId=null===(t=this.api.getGridOption("context"))||void 0===t?void 0:t.gridId,await g(this.gridId,!1,[],this.setBulkActions)}catch(t){console.error(t)}}isActive(){return this.selectedRowCount>0}render(){return t("div",{class:"bulk-actions-bar"},t("udp-fluent-icon-button",{iconName:"dismiss",appearance:"subtle",shape:"circular",ariaLabel:"Clear selection",onClick:this.clearSelection,style:{animationDelay:"10ms"}}),t("udp-text",{variant:"body1",style:{animationDelay:"20ms"}},this.selectedRowCount," Selected"),this.bulkActions.length>0&&t("div",{class:"bulk-actions-divider",style:{animationDelay:"20ms"}}),this.bulkActions.map((e=>t("udp-fluent-button",{appearance:nt(e.buttonIntent),class:"danger"===e.buttonIntent?"bulk-action-danger":void 0,startIconName:e.startIconName,onClick:e.onClick,style:{animationDelay:"20ms"},loading:e.loading},e.text))))}},agGridResetColumns:class{init(t){this.gridApi=t}onAction(t){"agGridResetColumns"===t&&this.gridApi.resetColumnState()}},advancedSearch:class{init(t,e,i){this.onOpenCallback=null==i?void 0:i.callback}onAction(t){var e;"advancedSearch"===t&&(null===(e=this.onOpenCallback)||void 0===e||e.call(this))}},agGridHideShowColumns:class{init(t){this.gridApi=t}onAction(t){"agGridHideShowColumns"===t&&this.gridApi.showColumnChooser()}},udpExport:class{init(t,e,i){this.onOpenCallback=null==i?void 0:i.callback,this.api=t}onAction(t){var e;if("udpExport"===t){const t=this.api.getGridOption("context");null===(e=this.onOpenCallback)||void 0===e||e.call(this,null==t?void 0:t.searchObject,null==t?void 0:t.entityName)}}},quickFilter:class{constructor(){this.searchValue="",this.debounce=0,this.applyFilter=t=>{var e;this.api.setGridOption("quickFilterText",t),null===(e=this.callback)||void 0===e||e.call(this,t),this.refresh()},this.handleSearch=t=>{this.searchValue=t.detail,clearTimeout(this.debounceTimer),this.debounce>0?this.debounceTimer=setTimeout((()=>this.applyFilter(this.searchValue)),this.debounce):this.applyFilter(this.searchValue)}}init(t,e,i){var s;this.api=t,this.refresh=e,this.callback=null==i?void 0:i.callback,this.debounce=null!==(s=null==i?void 0:i.debounce)&&void 0!==s?s:0}update(t){var e;this.callback=null==t?void 0:t.callback,this.debounce=null!==(e=null==t?void 0:t.debounce)&&void 0!==e?e:0}destroy(){clearTimeout(this.debounceTimer),this.api.setGridOption("quickFilterText","")}render(){return t("div",{style:{width:"200px"}},t("udp-search-input",{value:this.searchValue,placeholder:"Search",onValueChanged:this.handleSearch,includeErrorPadding:!1,autocomplete:"off"}))}},agGridRefreshData:class{constructor(){this.loading=!1,this.handleStoreRefreshed=()=>{var t;this.loading=!1,this.refresh(),null===(t=this.onRefreshComplete)||void 0===t||t.call(this)}}init(t,e,i){this.api=t,this.refresh=e,this.onRefreshStart=null==i?void 0:i.onRefreshStart,this.onRefreshComplete=null==i?void 0:i.onRefreshComplete,this.api.addEventListener("storeRefreshed",this.handleStoreRefreshed),this.api.addEventListener("rowDataUpdated",this.handleStoreRefreshed)}update(t){this.onRefreshStart=null==t?void 0:t.onRefreshStart,this.onRefreshComplete=null==t?void 0:t.onRefreshComplete}destroy(){this.api.removeEventListener("storeRefreshed",this.handleStoreRefreshed),this.api.removeEventListener("rowDataUpdated",this.handleStoreRefreshed)}isRefreshing(){return this.loading}onAction(t){var e;"agGridRefreshData"===t&&(this.loading=!0,this.refresh(),null===(e=this.onRefreshStart)||void 0===e||e.call(this),"serverSide"===this.api.getGridOption("rowModelType")&&this.api.refreshServerSide())}},agGridExpandCollapseAll:class{constructor(){this.expanded=!1}init(t,e){this.api=t,this.refresh=e}isExpanded(){return this.expanded}onAction(t){"agGridExpandCollapseAll"===t&&(this.expanded?this.api.collapseAll():this.api.expandAll(),this.expanded=!this.expanded,this.refresh())}}};function lt(t,e){const i=document.createElement("div");i.style.cssText="display: flex; flex-direction: column; justify-content: center; line-height: 1; gap: 2px;";const s=document.createElement("span");if(s.textContent=null!=t?t:"-",s.style.cssText="display: block;",i.appendChild(s),e){const t=document.createElement("span");t.textContent=e,t.style.cssText="display: block; font-size: 0.9em; opacity: 0.65;",i.appendChild(t)}return i}class rt{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; align-items: center; gap: 8px;";const s=document.createElement("udp-fluent-avatar");t.getSrc&&(s.src=t.getSrc(t)),t.getIconName&&(s.iconName=t.getIconName(t),t.iconVariant&&(s.iconVariant=t.iconVariant)),t.getName&&(s.name=t.getName(t)),t.getInitials&&(s.initials=t.getInitials(t)),s.size=null!==(e=t.size)&&void 0!==e?e:28,t.shape&&(s.shape=t.shape),t.getColor?s.color=t.getColor(t):t.color&&(s.color=t.color);const o=`${null!==(i=t.size)&&void 0!==i?i:28}px`;if(s.style.cssText=`align-self: center; flex-shrink: 0; width: ${o}; height: ${o};`,this.eGui.appendChild(s),t.getValues){const e=t.getValues(t);e&&this.eGui.appendChild(lt(e.title,e.subtitle))}}getGui(){return this.eGui}refresh(){return!1}}class dt{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; width: 100%; align-items: center; overflow: hidden;";const s=t.getSrc(t),o=document.createElement("udp-fluent-image");t.fit&&(o.fit=t.fit),t.shape&&(o.shape=t.shape),o.style.cssText="display: block; height: 100%; width: 100%; overflow: hidden;";const n=document.createElement("img");n.src=s,n.alt=null!==(e=t.alt)&&void 0!==e?e:"",n.style.cssText=`height: 100%; width: 100%; max-height: 100%; max-width: 100%; object-fit: ${null!==(i=t.fit)&&void 0!==i?i:"contain"}; display: block;`,o.appendChild(n),this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}class ht{init(t){var e,i;this.eGui=document.createElement("div"),this.eGui.style.cssText="display: flex; height: 100%; align-items: center;";const s=t.getHref?t.getHref(t):null!==(e=t.href)&&void 0!==e?e:"",o=document.createElement("udp-fluent-link");o.href=s,o.target=null!==(i=t.target)&&void 0!==i?i:"_self",o.textContent=t.value,this.eGui.appendChild(o)}getGui(){return this.eGui}refresh(){return!1}}class ct{init(t){this.node=t.node,this.eGui=document.createElement("div"),this.eGui.setAttribute("style","display: flex; align-items: center; height: 100%;"),this.eValueContainer=document.createElement("span"),this.eValueContainer.setAttribute("class","eValueContainer"),this.eGui.appendChild(this.eValueContainer),this.renderContent(t)}getGui(){return this.eGui}refresh(t){return!(!this.eValueContainer||!this.node||(this.renderContent(t),0))}renderContent(t){this.eValueContainer.innerHTML="";let e=null;if(this.node.group&&(null==t?void 0:t.getHeaderValues)?e=t.getHeaderValues(t):!this.node.group&&(null==t?void 0:t.getValues)&&(e=t.getValues(t)),!e)return;const i=document.createElement("div");i.className="custom-group-column",i.appendChild(lt(e.title,e.subtitle)),this.eValueContainer.appendChild(i)}destroy(){}}const ut=t=>{const e=t.value;if(null==e)return"";const i=new Date(e);return i?`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")} ${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`:""},pt=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.gridReady=s(this,"gridReady",7),this.gridFunctions=[],this.refreshKey=0,this.gridFunctionInstances=[],this.myTheme=n.withParams({wrapperBorderRadius:0,wrapperBorder:!1,headerCellHoverBackgroundColor:"var(--udp-grid-column-header-bg-hover)",borderColor:"#E9ECEF"}),this.updateGridHeight=()=>{if(this.gridEl&&this.gridContainerEl.clientWidth>0){const t=this.gridEl.getBoundingClientRect(),e=window.innerHeight-t.top,i=10;this.gridEl.style.height=(e-i>400?e-i:400)+"px"}},this.scheduleHeightUpdate=()=>{clearTimeout(this.resizeDebounce),this.resizeDebounce=setTimeout(this.updateGridHeight,100)},this.attachAutoHeight=()=>{this.resizeObserver||(this.updateGridHeight(),this.resizeObserver=new ResizeObserver(this.scheduleHeightUpdate),this.resizeObserver.observe(this.gridContainerEl),window.addEventListener("resize",this.scheduleHeightUpdate))},this.detachAutoHeight=()=>{var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0,window.removeEventListener("resize",this.scheduleHeightUpdate),clearTimeout(this.resizeDebounce)},this.refreshGridFunctions=()=>{this.refreshKey++},this.onGridReady=async t=>{this.gridApi=t.api,this.updateGridContextValues(),this.columnDefs&&this.setColumnDefs();const e=[];this.gridFunctionInstances=this.gridFunctions.map((t=>{const i=at[t.name];if(!i)return null;const s=new i,o=s.init(this.gridApi,this.refreshGridFunctions,t.params);return o&&e.push(o),s})).filter((t=>!!t)),await Promise.all(e),this.gridApiCallback&&this.gridApiCallback({refreshServerSide:()=>this.gridApi.refreshServerSide(),applyTransaction:t=>this.gridApi.applyTransaction(t),ensureIndexVisible:(t,e)=>this.gridApi.ensureIndexVisible(t,e),getSelectedRows:()=>this.gridApi.getSelectedRows(),getSelectedNodes:()=>this.gridApi.getSelectedNodes(),getSearchObject:()=>this.gridApi.getGridOption("context").searchObject,getEntityName:()=>this.gridApi.getGridOption("context").entityName,getRowCount:()=>this.gridApi.getGridOption("context").rowCount,getFilterModel:()=>this.gridApi.getFilterModel(),setFilterModel:t=>this.gridApi.setFilterModel(t),onFilterChanged:()=>this.gridApi.onFilterChanged(),expandAll:()=>this.gridApi.expandAll(),collapseAll:()=>this.gridApi.collapseAll(),toggleLoadingOverlay:t=>this.gridApi.setGridOption("loading",t),refreshCells:()=>this.gridApi.refreshCells(),refreshClientSideRowModel:t=>this.gridApi.refreshClientSideRowModel(t),selectAll:(t,e)=>this.gridApi.selectAll(t,e),deselectAll:(t,e)=>this.gridApi.deselectAll(t,e),getServerSideSelectionState:()=>this.gridApi.getServerSideSelectionState(),setServerSideSelectionState:t=>this.gridApi.setServerSideSelectionState(t),forEachNode:t=>this.gridApi.forEachNode(t),forEachNodeAfterFilterAndSort:t=>this.gridApi.forEachNodeAfterFilterAndSort(t),stopEditing:t=>this.gridApi.stopEditing(t),getFocusedCell:()=>this.gridApi.getFocusedCell()}),this.gridReady.emit(this.gridApi)},this.onHeaderAction=t=>{this.gridFunctionInstances.forEach((e=>{var i;return null===(i=e.onAction)||void 0===i?void 0:i.call(e,t.detail.name,t.detail.payload)}))},this.updateGridContextValues=()=>{this.gridApi.setGridOption("context",Object.assign(Object.assign({},this.gridApi.getGridOption("context")),{entityName:this.entityName,gridId:this.gridId}))}}componentWillLoad(){a.registerModules([l]),r.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-080613}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Univerus_Software_Inc}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{MAIS_eRec}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{MAIS_eRec}_need_to_be_licensed___{MAIS_eRec}_has_not_been_granted_a_Deployment_License_Add-on___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{28_June_2026}____[v3]_[01]_MTc4MjYwMTIwMDAwMA==5c7d1487ecb13b28e75415d34b7cf694")}componentDidLoad(){var t,e,i,s;const o=Object.assign(Object.assign({tooltipShowMode:"whenTruncated",tooltipShowDelay:500},this.gridOptions),{columnTypes:{booleanChip:{cellRenderer:"iconRenderer",cellRendererParams:{iconMappingConfig:{true:{iconName:"checkMark24",color:"success"},false:{iconName:"close24",color:"error"}}}}},dataTypeDefinitions:{dateTimeString:{baseDataType:"dateTimeString",extendsDataType:"dateTimeString",valueFormatter:ut},boolean:{baseDataType:"boolean",extendsDataType:"boolean",columnTypes:"booleanChip"}},gridId:this.gridId,onGridReady:t=>{this.onGridReady(t)},theme:this.myTheme,components:Object.assign({actionsRenderer:w,avatarRenderer:rt,iconRenderer:k,imageRenderer:dt,linkRenderer:ht,statusRenderer:y,subtitleRenderer:ct},null===(t=this.gridOptions)||void 0===t?void 0:t.components),domLayout:"normal",defaultColDef:Object.assign(Object.assign({cellDataType:!1,sortable:!0,filter:!0,flex:1,minWidth:150,suppressHeaderMenuButton:!0},null===(e=this.gridOptions)||void 0===e?void 0:e.defaultColDef),{filterParams:Object.assign({buttons:["reset","apply"],closeOnApply:!0,maxNumConditions:10},null===(s=null===(i=this.gridOptions)||void 0===i?void 0:i.defaultColDef)||void 0===s?void 0:s.filterParams)})});d(this.gridEl,o),this.gridHeight?this.gridEl.style.height=this.gridHeight:this.attachAutoHeight()}disconnectedCallback(){var t;null===(t=this.gridApi)||void 0===t||t.destroy(),this.detachAutoHeight()}handleUpdateGridFunctions(t,e){this.gridApi&&t!==e&&t.forEach(((t,e)=>{var i,s;null===(s=null===(i=this.gridFunctionInstances[e])||void 0===i?void 0:i.update)||void 0===s||s.call(i,t.params)}))}handleUpdateGridHeight(t){this.gridEl&&(t?(this.detachAutoHeight(),this.gridEl.style.height=t):this.attachAutoHeight())}handleUpdateColumnDefs(t,e){this.gridApi&&!_(t,e)&&this.setColumnDefs()}setColumnDefs(){var t;const e=f(this.columnDefs,null===(t=this.gridFunctions)||void 0===t?void 0:t.some((t=>"advancedSearch"===(null==t?void 0:t.name))));this.gridApi.setGridOption("columnDefs",e)}handleEntityNameChange(){this.updateGridContextValues()}render(){return t("div",{key:"28295b31bb57a79c026571c4bc2658bc142a6044",ref:t=>this.gridContainerEl=t},t("ghost-render",{key:"00d8044044b9df22e0b9ea5384b299aaa71d1962"},t("div",{key:"f1b96881e7881fb6d815c090ae3ce41e7cd0d3fe"},t("udp-dialog",{key:"07cabede25361ce396c09de8e858d140ad581345"}),t("udp-list-item",{key:"2706ad0e6c0dd7ce5cf12cb490f7709ca5c0956c"}),t("hint-panel",{key:"9893d09d8fa85966e08feaa32b423e4ef28946ca"}),t("udp-side-sheet",{key:"d24b860add93c6455938fd83b1830188b08536c1"}),t("udp-fluent-dialog",{key:"68b35903b5f563d6c93d5a0b28f01a880f7dca2a"}),t("udp-fluent-text",{key:"c0b84fc1e06db10433cd9bf255c916d965f943b0"}),t("udp-fluent-text-input",{key:"4125ae2f44e892b4a4304b593d1ec783807d765e"}),t("udp-fluent-switch",{key:"acb3cc843565fc2a276a5ace8af9f2273be5751e"}),t("udp-fluent-button",{key:"b339290e313091f1cb02e87bceab213ff0cfe48d"}),t("udp-text",{key:"6f562b11231b95ff2ab5263fd93d50e692f4c535"}),t("udp-search-input",{key:"de54983644895e8bc6f084c7b17abbd3b4eabae2"}),t("udp-fluent-avatar",{key:"7f07751beadae953c84f12577517e72d08662296"}),t("udp-fluent-icon-button",{key:"92ca31065f3af5c6e89ae945de004bfd18c418de"}),t("udp-fluent-icon",{key:"4a82b60fbfbe19cde29280c0abd71dcfaa53c6a5"}),t("udp-fluent-badge",{key:"392307e71d90db19c34099aedba1db573fc1e601"}))),t("grid-header",{key:"c13cac1e69b3006a053501fcbf5d5729c12f112e",headerConfig:this.headerConfig,gridFunctions:this.gridFunctions,gridFunctionInstances:this.gridFunctionInstances,refreshKey:this.refreshKey,onHeaderAction:this.onHeaderAction}),t("div",{key:"06cf43709ccf9e5d75a7c6a35dce3561adea98f2",ref:t=>this.gridEl=t}))}static get watchers(){return{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}}static get style(){return".variant-dark{--udp-grid-column-header-bg:#F8F9FA;--udp-grid-column-header-bg-hover:#dce6f2;--udp-grid-column-header-text:var(--primary-color-dark)}.variant-light{--udp-grid-column-header-bg:#f2f4f5;--udp-grid-column-header-bg-hover:#eef3f9;--udp-grid-column-header-text:var(--primary-color-dark)}::view-transition-group(*){animation-duration:0.2s}.grid-wrapper{display:flex;flex-direction:column;height:100%}#myNewGrid{flex:1}.ag-cell.udp-col-brand{background-color:var(--colorBrandBackground2) !important;color:var(--colorBrandForeground2)}.ag-header-cell.udp-col-brand-header{background-color:var(--colorBrandBackground2) !important}.ag-header-cell.udp-col-brand-header .ag-header-cell-text{color:var(--colorBrandForeground2)}.ag-cell.udp-col-danger{background-color:var(--colorPaletteRedBackground1) !important;color:var(--colorPaletteRedForeground1)}.ag-header-cell.udp-col-danger-header{background-color:var(--colorPaletteRedBackground1) !important}.ag-header-cell.udp-col-danger-header .ag-header-cell-text{color:var(--colorPaletteRedForeground1)}.ag-cell.udp-col-important{background-color:color-mix(in srgb, var(--colorNeutralForeground1) 20%, transparent) !important;color:var(--colorNeutralForeground1)}.ag-header-cell.udp-col-important-header{background-color:color-mix(in srgb, var(--colorNeutralForeground1) 20%, transparent) !important}.ag-header-cell.udp-col-important-header .ag-header-cell-text{color:var(--colorNeutralForeground1)}.ag-cell.udp-col-informative{background-color:color-mix(in srgb, var(--colorPaletteBlueBackground2) 20%, transparent) !important;color:color-mix(in srgb, var(--colorPaletteBlueForeground2) 85%, transparent)}.ag-header-cell.udp-col-informative-header{background-color:color-mix(in srgb, var(--colorPaletteBlueBackground2) 20%, transparent) !important}.ag-header-cell.udp-col-informative-header .ag-header-cell-text{color:color-mix(in srgb, var(--colorPaletteBlueForeground2) 85%, transparent)}.ag-cell.udp-col-severe{background-color:var(--colorPaletteDarkOrangeBackground1) !important;color:var(--colorPaletteDarkOrangeForeground1)}.ag-header-cell.udp-col-severe-header{background-color:var(--colorPaletteDarkOrangeBackground1) !important}.ag-header-cell.udp-col-severe-header .ag-header-cell-text{color:var(--colorPaletteDarkOrangeForeground1)}.ag-cell.udp-col-subtle{background-color:var(--colorNeutralBackground1) !important;color:var(--colorNeutralForeground3)}.ag-header-cell.udp-col-subtle-header{background-color:var(--colorNeutralBackground1) !important}.ag-header-cell.udp-col-subtle-header .ag-header-cell-text{color:var(--colorNeutralForeground3)}.ag-cell.udp-col-success{background-color:var(--colorPaletteGreenBackground1) !important;color:var(--colorPaletteGreenForeground1)}.ag-header-cell.udp-col-success-header{background-color:var(--colorPaletteGreenBackground1) !important}.ag-header-cell.udp-col-success-header .ag-header-cell-text{color:var(--colorPaletteGreenForeground1)}.ag-cell.udp-col-warning{background-color:var(--colorPaletteYellowBackground1) !important;color:var(--colorPaletteYellowForeground2)}.ag-header-cell.udp-col-warning-header{background-color:var(--colorPaletteYellowBackground1) !important}.ag-header-cell.udp-col-warning-header .ag-header-cell-text{color:var(--colorPaletteYellowForeground2)}"}},[0,"ag-grid-base",{columnDefs:[16],gridOptions:[16],headerConfig:[16],gridHeight:[1,"grid-height"],gridFunctions:[16],gridId:[1,"grid-id"],entityName:[1,"entity-name"],gridApiCallback:[16],refreshKey:[32]},void 0,{gridFunctions:[{handleUpdateGridFunctions:0}],gridHeight:[{handleUpdateGridHeight:0}],columnDefs:[{handleUpdateColumnDefs:0}],entityName:[{handleEntityNameChange:0}],gridId:[{handleEntityNameChange:0}]}]);function mt(){"undefined"!=typeof customElements&&["ag-grid-base","ghost-render","grid-header","hint-panel","stencil-icon-button","udp-ambient-tool-tip","udp-avatar","udp-badge","udp-button","udp-dialog","udp-flexbox","udp-fluent-avatar","udp-fluent-badge","udp-fluent-button","udp-fluent-dialog","udp-fluent-icon","udp-fluent-icon-button","udp-fluent-menu","udp-fluent-switch","udp-fluent-text-input","udp-icon","udp-linear-loader","udp-list-item","udp-menu-item","udp-pop-over","udp-primary-action-header","udp-search-input","udp-side-sheet","udp-spinner","udp-text","udp-tooltip","unity-typography"].forEach((t=>{switch(t){case"ag-grid-base":customElements.get(o(t))||customElements.define(o(t),pt);break;case"ghost-render":customElements.get(o(t))||C();break;case"grid-header":customElements.get(o(t))||x();break;case"hint-panel":customElements.get(o(t))||S();break;case"stencil-icon-button":customElements.get(o(t))||N();break;case"udp-ambient-tool-tip":customElements.get(o(t))||E();break;case"udp-avatar":customElements.get(o(t))||j();break;case"udp-badge":customElements.get(o(t))||O();break;case"udp-button":customElements.get(o(t))||F();break;case"udp-dialog":customElements.get(o(t))||A();break;case"udp-flexbox":customElements.get(o(t))||D();break;case"udp-fluent-avatar":customElements.get(o(t))||T();break;case"udp-fluent-badge":customElements.get(o(t))||R();break;case"udp-fluent-button":customElements.get(o(t))||G();break;case"udp-fluent-dialog":customElements.get(o(t))||I();break;case"udp-fluent-icon":customElements.get(o(t))||J();break;case"udp-fluent-icon-button":customElements.get(o(t))||P();break;case"udp-fluent-menu":customElements.get(o(t))||M();break;case"udp-fluent-switch":customElements.get(o(t))||B();break;case"udp-fluent-text-input":customElements.get(o(t))||V();break;case"udp-icon":customElements.get(o(t))||$();break;case"udp-linear-loader":customElements.get(o(t))||U();break;case"udp-list-item":customElements.get(o(t))||z();break;case"udp-menu-item":customElements.get(o(t))||H();break;case"udp-pop-over":customElements.get(o(t))||L();break;case"udp-primary-action-header":customElements.get(o(t))||W();break;case"udp-search-input":customElements.get(o(t))||Y();break;case"udp-side-sheet":customElements.get(o(t))||q();break;case"udp-spinner":customElements.get(o(t))||K();break;case"udp-text":customElements.get(o(t))||Q();break;case"udp-tooltip":customElements.get(o(t))||X();break;case"unity-typography":customElements.get(o(t))||Z()}}))}export{pt as A,mt as d}