@mescius/wijmo.grid.detail 5.20232.939

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,322 @@
1
+ /*!
2
+ *
3
+ * Wijmo Library 5.20232.939
4
+ * https://developer.mescius.com/wijmo
5
+ *
6
+ * Copyright(c) MESCIUS inc. All rights reserved.
7
+ *
8
+ * Licensed under the End-User License Agreement For MESCIUS Wijmo Software.
9
+ * us.sales@mescius.com
10
+ * https://developer.mescius.com/wijmo/licensing
11
+ *
12
+ */
13
+ /**
14
+ * {@module wijmo.grid.detail}
15
+ * Extension that provides detail rows for {@link FlexGrid} controls.
16
+ */
17
+ /**
18
+ *
19
+ */
20
+ export declare var ___keepComment: any;
21
+ import { EventArgs } from '@grapecity/wijmo';
22
+ import { Row, FlexGrid, MergeManager, GridPanel, CellRange, CellRangeEventArgs, FormatItemEventArgs, Column } from '@grapecity/wijmo.grid';
23
+ import * as selfModule from '@grapecity/wijmo.grid.detail';
24
+ /**
25
+ * Row that contains a single detail cell spanning all grid columns.
26
+ */
27
+ export declare class DetailRow extends Row {
28
+ _detail: HTMLElement;
29
+ /**
30
+ * Initializes a new instance of the {@link DetailRow} class.
31
+ *
32
+ * @param parentRow {@link Row} that this {@link DetailRow} provides details for.
33
+ */
34
+ constructor(parentRow: Row);
35
+ /**
36
+ * Gets or sets the HTML element that represents the detail cell in this {@link DetailRow}.
37
+ */
38
+ detail: HTMLElement;
39
+ }
40
+ /**
41
+ * Merge manager class used by the {@link FlexGridDetailProvider} class.
42
+ *
43
+ * The {@link DetailMergeManager} merges detail cells (cells in a {@link DetailRow})
44
+ * into a single detail cell that spans all grid columns.
45
+ */
46
+ export declare class DetailMergeManager extends MergeManager {
47
+ _originalMergeManager: MergeManager;
48
+ /**
49
+ * Initializes a new instance of a {@link DetailMergeManager} class.
50
+ *
51
+ * @param grid Grid that owns this merge manager.
52
+ */
53
+ constructor(grid: FlexGrid);
54
+ /**
55
+ * Gets a {@link CellRange} that specifies the merged extent of a cell
56
+ * in a {@link GridPanel}.
57
+ *
58
+ * @param p The {@link GridPanel} that contains the range.
59
+ * @param r The index of the row that contains the cell.
60
+ * @param c The index of the column that contains the cell.
61
+ * @param clip Whether to clip the merged range to the grid's current view range.
62
+ * @return A {@link CellRange} that specifies the merged range, or null if the cell is not merged.
63
+ */
64
+ getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange;
65
+ }
66
+ /**
67
+ * Specifies constants that define the action to perform when the
68
+ * ENTER key is pressed.
69
+ */
70
+ export declare enum KeyAction {
71
+ /** No special action (let the grid handle the key). */
72
+ None = 0,
73
+ /** Toggle the detail display. */
74
+ ToggleDetail = 1
75
+ }
76
+ /**
77
+ * Specifies when and how the row details are displayed.
78
+ */
79
+ export declare enum DetailVisibilityMode {
80
+ /**
81
+ * Details are shown or hidden in code, using the
82
+ * {@link FlexGridDetailProvider.showDetail} and
83
+ * {@link FlexGridDetailProvider.hideDetail} methods.
84
+ */
85
+ Code = 0,
86
+ /**
87
+ * Details are shown for the row that is currently selected.
88
+ */
89
+ Selection = 1,
90
+ /**
91
+ * Details are shown or hidden using buttons added to the row headers.
92
+ * Only one row may be expanded at a time.
93
+ */
94
+ ExpandSingle = 2,
95
+ /**
96
+ * Details are shown or hidden using buttons added to the row headers.
97
+ * Multiple rows may be expanded at a time.
98
+ */
99
+ ExpandMulti = 3
100
+ }
101
+ /**
102
+ * Represents a method that takes a {@link Row} and returns an HTMLElement
103
+ * containing details about the row.
104
+ */
105
+ export interface ICreateDetailCell {
106
+ /**
107
+ * @param row {@link Row} that contains the details.
108
+ * @param col {@link Column} that contains the details.
109
+ * @returns Element with details about the row.
110
+ */
111
+ (row: Row, col?: Column): HTMLElement;
112
+ }
113
+ /**
114
+ * Represents a method that takes a {@link Row} and disposes of detail
115
+ * elements associated with the row.
116
+ */
117
+ export interface IDisposeDetailCell {
118
+ /**
119
+ * @param row {@link Row} that contains details that were just removed from view.
120
+ * @returns Returning true will prevent {@link FlexGridDetailProvider} from
121
+ * disposing controls in details. Can be used if all the disposing logic is
122
+ * fulfilled by the method.
123
+ */
124
+ (row: Row): boolean | void;
125
+ }
126
+ /**
127
+ * Represents a method that takes a {@link Row} and returns true if
128
+ * the row has details that can be displayed.
129
+ */
130
+ export interface IRowHasDetail {
131
+ /**
132
+ * @param row {@link Row} on the main grid.
133
+ * @returns true if the row has details that can be shown.
134
+ */
135
+ (row: Row): boolean;
136
+ }
137
+ /**
138
+ * Implements detail rows for {@link FlexGrid} controls.
139
+ *
140
+ * To add detail rows to a {@link FlexGrid} control, create an instance of a
141
+ * {@link FlexGridDetailProvider} and set the {@link createDetailCell} property
142
+ * to a function that creates elements to be displayed in the detail cells.
143
+ *
144
+ * For example:
145
+ *
146
+ * ```typescript
147
+ * import { FlexGrid } from '@grapecity/wijmo.grid';
148
+ * import { FlexGridDetailProvider } from '@grapecity/wijmo.grid.detail';
149
+ *
150
+ * // create FlexGrid to show categories
151
+ * let gridCat = new FlexGrid('#gridCat', {
152
+ * itemsSource: getCategories();
153
+ * });
154
+ *
155
+ * // add detail rows showing products in each category
156
+ * let detailProvider = new FlexGridDetailProvider(gridCat, {
157
+ * createDetailCell: (row) => {
158
+ * let cell = document.createElement('div');
159
+ * new FlexGrid(cell, {
160
+ * itemsSource: getProducts(row.dataItem.CategoryID)
161
+ * });
162
+ * return cell;
163
+ * }
164
+ * });
165
+ * ```
166
+ *
167
+ * The {@link FlexGridDetailProvider} provides a {@link detailVisibilityMode} property
168
+ * that determines when the detail rows should be displayed.
169
+ *
170
+ * The default value for this property is **ExpandSingle**, which adds collapse/expand
171
+ * icons to the row headers.
172
+ *
173
+ * The example below shows how you can use a {@link FlexGridDetailProvider} to add
174
+ * different types of detail to the rows in a {@link FlexGrid}:
175
+ *
176
+ * {@sample Grid/Rows/RowDetail/Overview/purejs Example}
177
+ */
178
+ export declare class FlexGridDetailProvider {
179
+ static _WJC_DETAIL: string;
180
+ _g: FlexGrid;
181
+ _maxHeight: number | null;
182
+ _mode: DetailVisibilityMode;
183
+ _animated: boolean;
184
+ _toSel: any;
185
+ _createDetailCellFn: ICreateDetailCell;
186
+ _disposeDetailCellFn: IDisposeDetailCell;
187
+ _rowHasDetailFn: IRowHasDetail;
188
+ _keyActionEnter: KeyAction;
189
+ /**
190
+ * Initializes a new instance of the {@link FlexGridDetailProvider} class.
191
+ *
192
+ * @param grid {@link FlexGrid} that will receive detail rows.
193
+ * @param options Initialization options for the new {@link FlexGridDetailProvider}.
194
+ */
195
+ constructor(grid: FlexGrid, options?: any);
196
+ /**
197
+ * Gets the {@link FlexGrid} that owns this {@link FlexGridDetailProvider}.
198
+ */
199
+ readonly grid: FlexGrid;
200
+ /**
201
+ * Gets or sets a value that determines when row details are displayed.
202
+ *
203
+ * The default value for this property is **DetailVisibilityMode.ExpandSingle**.
204
+ */
205
+ detailVisibilityMode: DetailVisibilityMode;
206
+ /**
207
+ * Gets or sets the maximum height of the detail rows, in pixels.
208
+ *
209
+ * The default value for this property is **null**, which means
210
+ * there's no upper limit to the detail row height.
211
+ */
212
+ maxHeight: number | null;
213
+ /**
214
+ * Gets or sets a value that indicates whether to use animation when
215
+ * showing row details.
216
+ *
217
+ * The default value for this property is **false**.
218
+ */
219
+ isAnimated: boolean;
220
+ /**
221
+ * Gets or sets the action to perform when the ENTER key is pressed.
222
+ *
223
+ * The default setting for this property is {@link KeyAction.None},
224
+ * which lets the grid handle the key.
225
+ * The other option is {@link KeyAction.ToggleDetail}, which handles
226
+ * the Enter key to toggle the display of the row details.
227
+ */
228
+ keyActionEnter: KeyAction;
229
+ /**
230
+ * Gets or sets the callback function that creates detail cells.
231
+ *
232
+ * The callback function takes a {@link Row} as a parameter and
233
+ * returns an HTML element representing the row details.
234
+ * For example:
235
+ *
236
+ * ```typescript
237
+ * // create detail cells for a given row
238
+ * dp.createDetailCell = (row) => {
239
+ * let cell = document.createElement('div');
240
+ * new FlexGrid(cell, {
241
+ * itemsSource: getProducts(row.dataItem.CategoryID),
242
+ * headersVisibility: 'Column'
243
+ * });
244
+ * return cell;
245
+ * };
246
+ * ```
247
+ */
248
+ createDetailCell: ICreateDetailCell;
249
+ /**
250
+ * Gets or sets the callback function that disposes of detail cells.
251
+ *
252
+ * The callback function takes a {@link Row} as a parameter and
253
+ * disposes of any resources associated with the detail cell.
254
+ *
255
+ * This function is optional. Use it in cases where the
256
+ * {@link createDetailCell} function allocates resources that are not
257
+ * automatically garbage-collected.
258
+ */
259
+ disposeDetailCell: IDisposeDetailCell;
260
+ /**
261
+ * Gets or sets the callback function that determines whether a row
262
+ * has details.
263
+ *
264
+ * The callback function takes a {@link Row} as a parameter and
265
+ * returns a boolean value that indicates whether the row has
266
+ * details. For example:
267
+ *
268
+ * ```typescript
269
+ * // remove details from items with odd CategoryID
270
+ * dp.rowHasDetail = (row) => {
271
+ * return row.dataItem.CategoryID % 2 == 0;
272
+ * };
273
+ * ```
274
+ *
275
+ * Setting this property to null means all regular data
276
+ * rows (not group rows or new item templates) have details.
277
+ */
278
+ rowHasDetail: IRowHasDetail;
279
+ /**
280
+ * Gets the detail row associated with a given grid row.
281
+ *
282
+ * @param row Row or index of the row to investigate.
283
+ */
284
+ getDetailRow(row: any): DetailRow | null;
285
+ /**
286
+ * Gets a value that determines if a row's details are visible.
287
+ *
288
+ * @param row Row or index of the row to investigate.
289
+ */
290
+ isDetailVisible(row: any): boolean;
291
+ /**
292
+ * Gets a value that determines if a row has details to show.
293
+ *
294
+ * @param row Row or index of the row to investigate.
295
+ */
296
+ isDetailAvailable(row: any): boolean;
297
+ /**
298
+ * Hides the detail row for a given row.
299
+ *
300
+ * @param row {@link Row} or index of the row that will have its details hidden.
301
+ * This parameter is optional. If not provided, all detail rows are hidden.
302
+ */
303
+ hideDetail(row?: Row | number): void;
304
+ /**
305
+ * Shows the detail row for a given row.
306
+ *
307
+ * @param row {@link Row} or index of the row that will have its details shown.
308
+ * @param hideOthers Whether to hide details for all other rows.
309
+ */
310
+ showDetail(row: Row | number, hideOthers?: boolean): void;
311
+ _sizeDetailRow(row: DetailRow, useScrollHeight?: boolean): number;
312
+ _handleFrozenCells(): void;
313
+ _toIndex(row: any): number;
314
+ _hdrClick(e: MouseEvent): void;
315
+ _toggleRowDetail(row: number): boolean;
316
+ _selectionChanged(s: FlexGrid, e: EventArgs): void;
317
+ _formatItem(s: any, e: FormatItemEventArgs): void;
318
+ _resizedRow(s: any, e: CellRangeEventArgs): void;
319
+ _hasDetail(row: number): boolean;
320
+ _isRegularRow(row: Row): boolean;
321
+ _createDetailCell(row: Row): HTMLElement;
322
+ }
package/index.js ADDED
@@ -0,0 +1,14 @@
1
+ /*!
2
+ *
3
+ * Wijmo Library 5.20232.939
4
+ * https://developer.mescius.com/wijmo
5
+ *
6
+ * Copyright(c) MESCIUS inc. All rights reserved.
7
+ *
8
+ * Licensed under the End-User License Agreement For MESCIUS Wijmo Software.
9
+ * us.sales@mescius.com
10
+ * https://developer.mescius.com/wijmo/licensing
11
+ *
12
+ */
13
+
14
+ "use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("@mescius/wijmo"),wijmo_grid_1=require("@mescius/wijmo.grid"),selfModule=__importStar(require("@mescius/wijmo.grid.detail")),DetailRow=function(e){__extends(DetailRow,e);function DetailRow(t){var i=e.call(this)||this;i.isReadOnly=!0;return i}Object.defineProperty(DetailRow.prototype,"detail",{get:function(){return this._detail},set:function(e){this._detail=e},enumerable:!0,configurable:!0});return DetailRow}(wijmo_grid_1.Row);exports.DetailRow=DetailRow;var KeyAction,DetailVisibilityMode,DetailMergeManager=function(e){__extends(DetailMergeManager,e);function DetailMergeManager(t){var i=e.call(this)||this;i._originalMergeManager=t.mergeManager;return i}DetailMergeManager.prototype.getMergedRange=function(e,t,i,r){void 0===r&&(r=!0);switch(e.cellType){case wijmo_grid_1.CellType.Cell:if(e.rows[t]instanceof DetailRow){e.columns.frozen>0&&e.grid&&(e.grid.cloneFrozenCells=!1);return new wijmo_grid_1.CellRange(t,0,t,e.columns.length-1)}break;case wijmo_grid_1.CellType.RowHeader:var o=_isFrozen(e,t),l=_isNew(e,t),n=e.rows[t].dataItem;!n&&t>0&&e.rows[t]instanceof DetailRow&&(n=e.rows[t-1].dataItem);for(var a=t;a>0&&e.rows[a-1].dataItem==n&&_isFrozen(e,a-1)==o&&_isNew(e,a-1)==l;)a--;for(var s=t;s<e.rows.length-1&&e.rows[s+1].dataItem==n&&_isFrozen(e,s+1)==o&&_isNew(e,s+1)==l;)s++;s<e.rows.length-1&&e.rows[s+1]instanceof DetailRow&&_isFrozen(e,s+1)==o&&_isNew(e,s+1)==l&&s++;return a!=s?new wijmo_grid_1.CellRange(a,i,s,i):null}return this._originalMergeManager.getMergedRange(e,t,i,r)};return DetailMergeManager}(wijmo_grid_1.MergeManager);exports.DetailMergeManager=DetailMergeManager;function _isFrozen(e,t){return t<e.rows.frozen}function _isNew(e,t){return e.rows[t]instanceof wijmo_grid_1._NewRowTemplate}wijmo_1._addCultureInfo("FlexGridDetailProvider",{ariaLabels:{toggleDetail:"Toggle Row Detail"}});!function(e){e[e.None=0]="None";e[e.ToggleDetail=1]="ToggleDetail"}(KeyAction=exports.KeyAction||(exports.KeyAction={}));!function(e){e[e.Code=0]="Code";e[e.Selection=1]="Selection";e[e.ExpandSingle=2]="ExpandSingle";e[e.ExpandMulti=3]="ExpandMulti"}(DetailVisibilityMode=exports.DetailVisibilityMode||(exports.DetailVisibilityMode={}));var FlexGridDetailProvider=function(){function FlexGridDetailProvider(e,t){var i=this;this._maxHeight=null;this._mode=DetailVisibilityMode.ExpandSingle;this._animated=!1;this._keyActionEnter=KeyAction.None;this._g=e;e.mergeManager=new DetailMergeManager(e);e.rowHeaders.hostElement.addEventListener("click",this._hdrClick.bind(this));e.rowHeaders.hostElement.addEventListener("mousedown",(function(t){var r=e.editableCollectionView;if(e.activeEditor||r&&r.currentEditItem){i._hdrClick(t);t.preventDefault()}}));setTimeout((function(){e.formatItem.addHandler(i._formatItem,i)}),100);e.selectionChanged.addHandler(this._selectionChanged,this);e.resizedRow.addHandler(this._resizedRow,this);e.loadingRows.addHandler((function(){return i.hideDetail()}));e.deletingRow.addHandler((function(e,t){i.hideDetail(t.row)}));e.updatedView.addHandler(this._handleFrozenCells,this);e.cloneFrozenCells=!1;e.draggingRow.addHandler((function(e,t){if(t.row<e.rows.length-1&&e.rows[t.row+1]instanceof DetailRow){t.cancel=!0;i.hideDetail(t.row)}}));e.hostElement.addEventListener("keydown",(function(e){if(e.keyCode==wijmo_1.Key.Enter&&i._keyActionEnter==KeyAction.ToggleDetail){var t=i._g.selection.row;i._toggleRowDetail(t)&&e.preventDefault()}}),!0);e._root.addEventListener("scroll",(function(){wijmo_1.hasClass(e.activeCell,"wj-detail")&&wijmo_1.Control.sharedState.InvalidScroll||wijmo_1.Control.refreshAll(e._root)}));wijmo_1.copy(this,t)}Object.defineProperty(FlexGridDetailProvider.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridDetailProvider.prototype,"detailVisibilityMode",{get:function(){return this._mode},set:function(e){if((e=wijmo_1.asEnum(e,DetailVisibilityMode))!=this._mode){this._mode=e;this.hideDetail();this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridDetailProvider.prototype,"maxHeight",{get:function(){return this._maxHeight},set:function(e){if((e=wijmo_1.asNumber(e,!0))!=this._maxHeight){this._maxHeight=e;this.hideDetail()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridDetailProvider.prototype,"isAnimated",{get:function(){return this._animated},set:function(e){e!=this._animated&&(this._animated=wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridDetailProvider.prototype,"keyActionEnter",{get:function(){return this._keyActionEnter},set:function(e){this._keyActionEnter=wijmo_1.asEnum(e,KeyAction)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridDetailProvider.prototype,"createDetailCell",{get:function(){return this._createDetailCellFn},set:function(e){this._createDetailCellFn=wijmo_1.asFunction(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridDetailProvider.prototype,"disposeDetailCell",{get:function(){return this._disposeDetailCellFn},set:function(e){this._disposeDetailCellFn=wijmo_1.asFunction(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGridDetailProvider.prototype,"rowHasDetail",{get:function(){return this._rowHasDetailFn},set:function(e){if((e=wijmo_1.asFunction(e,!0))!=this._rowHasDetailFn){this._rowHasDetailFn=e;this.hideDetail();this._g.invalidate()}},enumerable:!0,configurable:!0});FlexGridDetailProvider.prototype.getDetailRow=function(e){for(var t=this._g.rows,i=this._toIndex(e),r=t[i]?t[i].dataItem:void 0;i<t.length;i++){var o=t[i];if(o instanceof DetailRow)return o;if(o.dataItem!=r)return null}return null};FlexGridDetailProvider.prototype.isDetailVisible=function(e){return null!=this.getDetailRow(e)};FlexGridDetailProvider.prototype.isDetailAvailable=function(e){e=this._toIndex(e);return this._hasDetail(e)};FlexGridDetailProvider.prototype.hideDetail=function(e){var t=this._g,i=t.rows;if(null!=e){var r=this._toIndex(e);if(r<=t.rows.frozen-1){t.rows.frozenDetailChildren-=1;t.rows.frozen-=1}for(;!(i[r]instanceof DetailRow)&&r<i.length-1;)r++;var o=i[r];if(o instanceof DetailRow){var l=o.detail.parentElement;if(l)for(var n=l.querySelectorAll(".wj-control"),a=0;a<n.length;a++){var s=wijmo_1.Control.getControl(n[a]);s&&s.containsFocus()&&t.focus(!0)}var d=this.disposeDetailCell;!!d&&d(o)||wijmo_1.Control.disposeAll(o.detail);i.removeAt(r)}}else for(var c=0;c<i.length;c++)i[c]instanceof DetailRow&&this.hideDetail(c)};FlexGridDetailProvider.prototype.showDetail=function(e,t){void 0===t&&(t=!1);var i=this._g,r=i.rows,o=this._toIndex(e);if(o<=i.rows.frozen-1){i.rows.frozenDetailChildren+=1;i.rows.frozen+=1}o>0&&r[o]instanceof DetailRow&&o--;for(var l=r[o].dataItem;o<r.length-1&&r[o+1].dataItem==l;)o++;if(t){for(var n=i.selection,a=!1,s=0;s<r.length-1;s++)if(s!=o&&r[s+1]instanceof DetailRow){this.hideDetail(s);s<o&&o--;if(s<n.row){n.row--;n.row2--;a=!0}}a&&i.select(n,!1)}if(!this.isDetailVisible(o)&&this._hasDetail(o)){var d=new DetailRow(r[o]),c=this._createDetailCell(r[o]);d.detail=c;if(c){r.insert(o+1,d);var _=i.containsFocus();if(this._animated){var u=c.style;u.transform="translateY(-100%)";u.opacity="0";wijmo_1.animate((function(e){if(e<1){u.transform="translateY("+(100*-(1-e)).toFixed(0)+"%)";u.opacity=(e*e).toString()}else{u.transform=u.opacity="";wijmo_1.Control.invalidateAll(c);_&&i.scrollIntoView(o+1,-1)}}))}else _&&i.scrollIntoView(o+1,-1,!0)}}};FlexGridDetailProvider.prototype._sizeDetailRow=function(e,t){void 0===t&&(t=!1);var i=this._g,r=e.detail;wijmo_1.Control.refreshAll(r);var o=t?r.scrollHeight:r.offsetHeight,l=o+i._cellPadVert+1,n=this._maxHeight;wijmo_1.isNumber(n)&&n>0&&l>n&&(l=n);e.height=l;r.style.height||(r.style.height="100%");var a=r.querySelector(".wj-flexgrid");a&&!a.style.height&&(a.style.height="100%");return o};FlexGridDetailProvider.prototype._handleFrozenCells=function(){var e=this._g,t=e.hostElement,i=wijmo_1.Control.getControl(t.querySelector(".wj-flexgrid"));if(i instanceof wijmo_grid_1.FlexGrid&&(i.rows.frozen||i.columns.frozen)){wijmo_1.setCss([e._eTL,e._eBL,e._eCFtr,e._eRHdr,e._eMarquee],{zIndex:"13"});wijmo_1.setCss(e._eCHdr,{zIndex:"14"});for(var r=t.querySelectorAll(".wj-frozen"),o=0;o<r.length;o++){var l=r[o];if(wijmo_1.closest(l,".wj-flexgrid")==t){var n=parseInt(l.style.zIndex);l.style.zIndex=(n%10+10).toString()}}}};FlexGridDetailProvider.prototype._toIndex=function(e){return e instanceof wijmo_grid_1.Row?e.index:wijmo_1.asNumber(e)};FlexGridDetailProvider.prototype._hdrClick=function(e){if(!e.defaultPrevented&&0==e.button&&wijmo_1.closestClass(e.target,FlexGridDetailProvider._WJC_DETAIL)){var t=DetailVisibilityMode;switch(this._mode){case t.ExpandMulti:case t.ExpandSingle:var i=this._g,r=i.hitTest(e.target);r.panel||(r=i.hitTest(e));r.panel&&this._toggleRowDetail(r.row)&&e.preventDefault()}}};FlexGridDetailProvider.prototype._toggleRowDetail=function(e){if(e>-1){if(this.isDetailVisible(e)){this.hideDetail(e);return!0}if(this._hasDetail(e)){var t=this._g;t.select(new wijmo_grid_1.CellRange(e,0,e,t.columns.length-1));this.showDetail(e,this._mode==DetailVisibilityMode.ExpandSingle);return!0}}return!1};FlexGridDetailProvider.prototype._selectionChanged=function(e,t){var i=this;if(this._mode==DetailVisibilityMode.Selection){this._toSel&&clearTimeout(this._toSel);this._toSel=setTimeout((function(){var t=e._selHdl.selection.row;t>-1?i.showDetail(t,!0):i.hideDetail()}),300)}};FlexGridDetailProvider.prototype._formatItem=function(e,t){var i=this,r=this._g,o=t.cell,l=t.getRow(),n=DetailVisibilityMode;if(t.panel==r.cells&&l instanceof DetailRow&&null!=l.detail&&!wijmo_1.hasClass(o,"wj-detail")){wijmo_1.addClass(o,"wj-detail");o.textContent="";o.style.textAlign="";o.className=o.className.replace(/wj\-align\-[\S]+/g,"");o.appendChild(l.detail);null==l.height?0===this._sizeDetailRow(l)&&setTimeout((function(){i._sizeDetailRow(l,!0)}),1):wijmo_1.Control.refreshAll(l.detail)}if(t.panel==r.rowHeaders&&0==t.col&&this._hasDetail(t.row)){o.style.cursor="";switch(this._mode){case n.ExpandMulti:case n.ExpandSingle:var a=this.isDetailVisible(t.row),s=a?"minus":"plus",d=FlexGridDetailProvider._WJC_DETAIL;o.innerHTML='<div class="wj-btn wj-btn-glyph '+d+'" role="button" tabindex="-1"><span class="wj-glyph-'+s+'"></span></div>';var c=o.children[0],_=wijmo_1.culture.FlexGridDetailProvider.ariaLabels.toggleDetail;wijmo_1.setAriaLabel(c,_);wijmo_1.setAttribute(c,"aria-expanded",a)}}};FlexGridDetailProvider.prototype._resizedRow=function(e,t){var i=t.getRow();i instanceof DetailRow&&i.detail&&wijmo_1.Control.refreshAll(i.detail)};FlexGridDetailProvider.prototype._hasDetail=function(e){var t=this._g.rows[e];return wijmo_1.isFunction(this._rowHasDetailFn)?this._rowHasDetailFn(t):this._isRegularRow(t)};FlexGridDetailProvider.prototype._isRegularRow=function(e){return!(e instanceof wijmo_grid_1._NewRowTemplate||e instanceof DetailRow)&&!(e instanceof wijmo_grid_1.GroupRow&&!this._g.childItemsPath)};FlexGridDetailProvider.prototype._createDetailCell=function(e){return this.createDetailCell?this.createDetailCell(e):null};FlexGridDetailProvider._WJC_DETAIL="wj-elem-detail";return FlexGridDetailProvider}();exports.FlexGridDetailProvider=FlexGridDetailProvider;wijmo_1._registerModule("wijmo.grid.detail",selfModule);
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@mescius/wijmo.grid.detail",
3
+ "version": "5.20232.939",
4
+ "description": "UI library for pure JS, Angular, React, Vue and more...",
5
+ "author": "MESCIUS inc",
6
+ "license": "Commercial",
7
+ "main": "./index.js",
8
+ "types": "./index.d.ts",
9
+ "dependencies": {
10
+ "@mescius/wijmo": "5.20232.939",
11
+ "@mescius/wijmo.input": "5.20232.939",
12
+ "@mescius/wijmo.grid": "5.20232.939"
13
+ },
14
+ "homepage": "https://developer.mescius.com/wijmo",
15
+ "bugs": {
16
+ "url": "https://developer.mescius.com/forums/wijmo"
17
+ },
18
+ "keywords": [
19
+ "control",
20
+ "component",
21
+ "ui",
22
+ "control library",
23
+ "component library",
24
+ "ui library",
25
+ "control-library",
26
+ "component-library",
27
+ "ui-library",
28
+ "grid",
29
+ "data grid",
30
+ "data-grid",
31
+ "datagrid",
32
+ "angular grid",
33
+ "react grid",
34
+ "vue grid",
35
+ "angular-grid",
36
+ "react-grid",
37
+ "vue-grid"
38
+ ],
39
+ "module": "./es5-esm.js",
40
+ "esm5": "./es5-esm.js",
41
+ "wj-esm5": "./es5-esm.js",
42
+ "es2015Cjs": "./es2015-commonjs.js",
43
+ "wj-es2015Cjs": "./es2015-commonjs.js",
44
+ "esm2015": "./es2015-esm.js",
45
+ "wj-esm2015": "./es2015-esm.js"
46
+ }