@wavemaker/app-ng-runtime 12.0.0-next.45094 → 12.0.0-next.45097
Sign up to get free protection for your applications and to get access to all the features.
- app-ng-runtime/components/advanced/custom/bundles/index.umd.js +1 -1
- app-ng-runtime/components/advanced/custom/esm2022/custom-widget.directive.mjs +2 -2
- app-ng-runtime/components/advanced/custom/fesm2022/index.mjs +1 -1
- app-ng-runtime/components/advanced/custom/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/base/bundles/index.umd.js +1 -1
- app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +2 -2
- app-ng-runtime/components/base/fesm2022/index.mjs +1 -1
- app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/table/bundles/index.umd.js +1 -1
- app-ng-runtime/components/data/table/esm2022/table-row/table-row.props.mjs +2 -2
- app-ng-runtime/components/data/table/fesm2022/index.mjs +1 -1
- app-ng-runtime/components/data/table/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +25 -14
app-ng-runtime/package.json
CHANGED
@@ -70,7 +70,7 @@ $.widget('wm.datatable', {
|
|
70
70
|
rowDef: {
|
71
71
|
position: '0',
|
72
72
|
closeothers: false,
|
73
|
-
columnwidth: '
|
73
|
+
columnwidth: '50px'
|
74
74
|
},
|
75
75
|
summaryRow: false,
|
76
76
|
summaryRowDefs: [],
|
@@ -120,7 +120,7 @@ $.widget('wm.datatable', {
|
|
120
120
|
'style': 'text-align: center;',
|
121
121
|
'textAlignment': 'center',
|
122
122
|
'show': true,
|
123
|
-
'width': '
|
123
|
+
'width': '50px'
|
124
124
|
},
|
125
125
|
'rowIndex': {
|
126
126
|
'field': 'rowIndex',
|
@@ -325,7 +325,7 @@ $.widget('wm.datatable', {
|
|
325
325
|
$th.addClass(headerClasses);
|
326
326
|
/* For custom columns, show display name if provided, else don't show any label. */
|
327
327
|
if (field === 'checkbox') {
|
328
|
-
$th.append(
|
328
|
+
$th.append(self._getCheckbox());
|
329
329
|
}
|
330
330
|
$th.append('<span class="header-data">' + headerLabel + '</span>');
|
331
331
|
if (sortEnabled) { //If sort info is present, show the sort icon for that column on grid render
|
@@ -574,16 +574,10 @@ $.widget('wm.datatable', {
|
|
574
574
|
$tbody.append(rowTemplate);
|
575
575
|
if (self.options.rowExpansionEnabled) {
|
576
576
|
var rowHeight = self.options.rowDef.height;
|
577
|
-
var
|
578
|
-
var
|
579
|
-
var $tr = $('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="' + row.$$pk + '"><td></td><td colspan="' + colSpanLength + '" class="app-datagrid-row-details-cell">' +
|
577
|
+
var colSpanLength = _.filter(self.preparedHeaderData, function(c) {return c.show}).length;
|
578
|
+
var $tr = $('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="' + row.$$pk + '"><td colspan="' + colSpanLength + '" class="app-datagrid-row-details-cell">' +
|
580
579
|
'<div class="row-overlay"><div class="row-status"><i class="' + self.options.loadingicon + '"></i></div></div><div class="details-section"></div>' +
|
581
580
|
'</td></tr>');
|
582
|
-
if(rowPosition === "-1"){
|
583
|
-
$tr = $('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="' + row.$$pk + '"><td colspan="' + colSpanLength + '" class="app-datagrid-row-details-cell">' +
|
584
|
-
'<div class="row-overlay"><div class="row-status"><i class="' + self.options.loadingicon + '"></i></div></div><div class="details-section"></div>' +
|
585
|
-
'</td><td></td></tr>');
|
586
|
-
}
|
587
581
|
if (rowHeight) {
|
588
582
|
$tr.find('div.row-overlay').css('min-height', rowHeight);
|
589
583
|
}
|
@@ -638,15 +632,32 @@ $.widget('wm.datatable', {
|
|
638
632
|
_getCheckboxTemplate: function (row, isMultiSelectCol) {
|
639
633
|
var checked = row._checked === true ? ' checked' : '',
|
640
634
|
disabled = row.disabed ? ' disabled' : '',
|
641
|
-
chkBoxName = isMultiSelectCol ? 'gridMultiSelect' : ''
|
642
|
-
|
635
|
+
chkBoxName = isMultiSelectCol ? 'gridMultiSelect' : '',
|
636
|
+
labelClass = row._checked === true ? '' : 'unchecked';
|
637
|
+
|
638
|
+
return this._getCheckbox(labelClass, chkBoxName, checked, disabled);
|
639
|
+
},
|
640
|
+
|
641
|
+
/* Return checkbox literal */
|
642
|
+
_getCheckbox: function (labelClass = '', chkBoxName = '', checked = '', disabled = '') {
|
643
|
+
return `<div class="app-checkbox checkbox">
|
644
|
+
<label class="${labelClass}">
|
645
|
+
<input type="checkbox" name="${chkBoxName}" ${checked} ${disabled} role="checkbox">
|
646
|
+
<span class="caption"></span>
|
647
|
+
</label>
|
648
|
+
</div>`
|
643
649
|
},
|
644
650
|
|
645
651
|
/* Returns the radio template. */
|
646
652
|
_getRadioTemplate: function (row) {
|
647
653
|
var checked = row._checked === true ? ' checked' : '',
|
648
654
|
disabled = row.disabed ? ' disabled' : '';
|
649
|
-
return
|
655
|
+
return `<div class="radio app-radio">
|
656
|
+
<label>
|
657
|
+
<input type="radio" rowSelectInput name="" value="" ${checked} ${disabled}>
|
658
|
+
<span class="caption"></span>
|
659
|
+
</label>
|
660
|
+
</div>`;
|
650
661
|
},
|
651
662
|
|
652
663
|
/* Returns the table cell template. */
|