@wavemaker/app-ng-runtime 12.0.0-next.141179 → 12.0.0-next.141186
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.
- app-ng-runtime/components/data/table/bundles/index.umd.js +5 -1
- app-ng-runtime/components/data/table/esm2022/table.component.mjs +5 -2
- app-ng-runtime/components/data/table/esm2022/table.props.mjs +2 -1
- app-ng-runtime/components/data/table/fesm2022/index.mjs +5 -1
- app-ng-runtime/components/data/table/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/table.component.d.ts +2 -0
- app-ng-runtime/components/input/default/bundles/index.umd.js +3 -3
- app-ng-runtime/components/input/default/esm2022/number/number.component.mjs +4 -4
- app-ng-runtime/components/input/default/fesm2022/index.mjs +3 -3
- app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/popover/bundles/index.umd.js +20 -4
- app-ng-runtime/components/navigation/popover/esm2022/popover.component.mjs +22 -6
- app-ng-runtime/components/navigation/popover/fesm2022/index.mjs +20 -4
- app-ng-runtime/components/navigation/popover/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/popover/popover.component.d.ts +4 -3
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +23 -26
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, Injector, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { App } from '@wm/core';
|
|
3
3
|
import { StylableComponent } from '@wm/components/base';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class PopoverComponent extends StylableComponent implements OnInit, AfterViewInit {
|
|
6
6
|
private app;
|
|
7
|
+
private cdr;
|
|
7
8
|
static initializeProps: void;
|
|
8
9
|
event: string;
|
|
9
10
|
isOpen: boolean;
|
|
@@ -40,7 +41,7 @@ export declare class PopoverComponent extends StylableComponent implements OnIni
|
|
|
40
41
|
anchorRef: ElementRef;
|
|
41
42
|
popoverTemplate: any;
|
|
42
43
|
partialRef: any;
|
|
43
|
-
constructor(inj: Injector, app: App, explicitContext: any);
|
|
44
|
+
constructor(inj: Injector, app: App, explicitContext: any, cdr: ChangeDetectorRef);
|
|
44
45
|
private setupDocumentClickHandler;
|
|
45
46
|
private closeAllPopovers;
|
|
46
47
|
private closeInnerPopovers;
|
|
@@ -61,6 +62,6 @@ export declare class PopoverComponent extends StylableComponent implements OnIni
|
|
|
61
62
|
ngAfterViewInit(): void;
|
|
62
63
|
ngOnDetach(): void;
|
|
63
64
|
OnDestroy(): void;
|
|
64
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PopoverComponent, [null, null, { optional: true; }]>;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PopoverComponent, [null, null, { optional: true; }, null]>;
|
|
65
66
|
static ɵcmp: i0.ɵɵComponentDeclaration<PopoverComponent, "wm-popover", never, {}, {}, ["popoverTemplate", "partialRef"], never, false, never>;
|
|
66
67
|
}
|
app-ng-runtime/package.json
CHANGED
|
@@ -21,6 +21,7 @@ $.widget('wm.datatable', {
|
|
|
21
21
|
filtermode: '',
|
|
22
22
|
filteronkeypress: false,
|
|
23
23
|
activeRow: undefined,
|
|
24
|
+
isrowselectable: false,
|
|
24
25
|
height: '100%',
|
|
25
26
|
showHeader: true,
|
|
26
27
|
selectFirstRow: false,
|
|
@@ -1501,6 +1502,7 @@ $.widget('wm.datatable', {
|
|
|
1501
1502
|
}
|
|
1502
1503
|
case 'multiselect': // Fallthrough
|
|
1503
1504
|
case 'showRadioColumn':
|
|
1505
|
+
case 'isrowselectable' :
|
|
1504
1506
|
case 'rowActions':
|
|
1505
1507
|
case 'filterNullRecords':
|
|
1506
1508
|
case 'showRowIndex':
|
|
@@ -1664,8 +1666,16 @@ $.widget('wm.datatable', {
|
|
|
1664
1666
|
// triggered on capture phase of click listener.
|
|
1665
1667
|
// sets the selected rowdata on click.
|
|
1666
1668
|
rowClickHandlerOnCapture: function (e, $row, options) {
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
+
// If 'isrowselectable' property is enabled, clicking anywhere on the row will trigger its selection. Otherwise, the row will not be selected on click.
|
|
1670
|
+
// Also this flag works if mutliselect or radioselect is enabled.
|
|
1671
|
+
// In quick edit mode, clicking any part of the row switches it to edit mode, regardless of the flag setting.
|
|
1672
|
+
if (this.options.editmode !== this.CONSTANTS.QUICK_EDIT) {
|
|
1673
|
+
if ((this.options.multiselect || this.options.showRadioColumn) && !this.options.isrowselectable) {
|
|
1674
|
+
if (Number(this.getColInfo(e))) {
|
|
1675
|
+
e.stopPropagation();
|
|
1676
|
+
return;
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1669
1679
|
}
|
|
1670
1680
|
$row = $row || $(e.target).closest('tr.app-datagrid-row');
|
|
1671
1681
|
var gridRow = this.gridElement.find($row);
|
|
@@ -1680,8 +1690,16 @@ $.widget('wm.datatable', {
|
|
|
1680
1690
|
|
|
1681
1691
|
/* Handles row selection. */
|
|
1682
1692
|
rowSelectionHandler: function (e, $row, options) {
|
|
1683
|
-
|
|
1684
|
-
|
|
1693
|
+
// If 'isrowselectable' property is enabled, clicking anywhere on the row will trigger its selection. Otherwise, the row will not be selected on click.
|
|
1694
|
+
// Also this flag works if mutliselect or radioselect is enabled.
|
|
1695
|
+
// In quick edit mode, clicking any part of the row switches it to edit mode, regardless of the flag setting.
|
|
1696
|
+
if (this.options.editmode !== this.CONSTANTS.QUICK_EDIT) {
|
|
1697
|
+
if ((this.options.multiselect || this.options.showRadioColumn) && !this.options.isrowselectable) {
|
|
1698
|
+
if (Number(this.getColInfo(e))) {
|
|
1699
|
+
e.stopPropagation();
|
|
1700
|
+
return;
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1685
1703
|
}
|
|
1686
1704
|
options = options || {};
|
|
1687
1705
|
var rowId,
|
|
@@ -2694,14 +2712,9 @@ $.widget('wm.datatable', {
|
|
|
2694
2712
|
return false;
|
|
2695
2713
|
},
|
|
2696
2714
|
getColInfo: function(event) {
|
|
2697
|
-
var row = $(event.target).closest('tr.app-datagrid-row');
|
|
2698
|
-
var rowId = row.attr('data-row-id');
|
|
2699
2715
|
var column = $(event.target).closest('td.app-datagrid-cell');
|
|
2700
2716
|
var colId = column.attr('data-col-id');
|
|
2701
|
-
|
|
2702
|
-
return this.columnClickInfo[rowId][colId];
|
|
2703
|
-
}
|
|
2704
|
-
return false;
|
|
2717
|
+
return colId;
|
|
2705
2718
|
},
|
|
2706
2719
|
/* Attaches all event handlers for the table. */
|
|
2707
2720
|
attachEventHandlers: function ($htm) {
|
|
@@ -2715,22 +2728,6 @@ $.widget('wm.datatable', {
|
|
|
2715
2728
|
// add js click handler for capture phase in order to first listen on grid and
|
|
2716
2729
|
// assign selectedItems so that any child actions can have access to the selectedItems.
|
|
2717
2730
|
$htm.on('click', this.rowSelectionHandler.bind(this));
|
|
2718
|
-
$htm.on("click", "td *", function(event) {
|
|
2719
|
-
|
|
2720
|
-
// Prevent propagation to parent elements
|
|
2721
|
-
if(event.target.type != 'checkbox'){
|
|
2722
|
-
var row = $(event.target).closest('tr.app-datagrid-row');
|
|
2723
|
-
var rowId = row.attr('data-row-id');
|
|
2724
|
-
var column = $(event.target).closest('td.app-datagrid-cell');
|
|
2725
|
-
var colId = column.attr('data-col-id');
|
|
2726
|
-
var id = Number(colId);
|
|
2727
|
-
var colDefination = self.preparedHeaderData[id];
|
|
2728
|
-
if (colDefination && colDefination.readonly && colDefination.field !== 'rowOperations') {
|
|
2729
|
-
self.columnClickInfo[rowId] = {};
|
|
2730
|
-
self.columnClickInfo[rowId][colId] = true;
|
|
2731
|
-
}
|
|
2732
|
-
}
|
|
2733
|
-
});
|
|
2734
2731
|
$htm.on('dblclick', this.rowDblClickHandler.bind(this));
|
|
2735
2732
|
$htm.on('keydown', this.onKeyDown.bind(this));
|
|
2736
2733
|
}
|