@easyquery/ui 7.4.0-rc03 → 7.4.0-rc05
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/dist/easyquery.ui.cjs.js +192 -61
- package/dist/easyquery.ui.esm.js +193 -62
- package/dist/types/types/qp_editable_part.d.ts +3 -3
- package/dist/types/widgets/columns_bar.d.ts +6 -1
- package/dist/types/widgets/columns_panel.d.ts +6 -1
- package/dist/types/widgets/query_panel.d.ts +15 -1
- package/dist/types/widgets/widget_options.d.ts +31 -1
- package/package.json +2 -2
package/dist/easyquery.ui.cjs.js
CHANGED
|
@@ -613,6 +613,42 @@ class EntitiesPanel extends core.Widget {
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
+
exports.ColumnsEditMode = void 0;
|
|
617
|
+
(function (ColumnsEditMode) {
|
|
618
|
+
/**
|
|
619
|
+
* ReadOnly edit mode allows to view columns but doesn't allow to change them.
|
|
620
|
+
*/
|
|
621
|
+
ColumnsEditMode[ColumnsEditMode["ReadOnly"] = 0] = "ReadOnly";
|
|
622
|
+
/**
|
|
623
|
+
* FixedList edit mode allows to edit some columns parameters (formats, sorting) and change their order
|
|
624
|
+
* but doesn't allow to add or delete columns.
|
|
625
|
+
*/
|
|
626
|
+
ColumnsEditMode[ColumnsEditMode["FixedList"] = 16] = "FixedList";
|
|
627
|
+
/**
|
|
628
|
+
* Full edit mode allows to add, delete and change columns in any way.
|
|
629
|
+
*/
|
|
630
|
+
ColumnsEditMode[ColumnsEditMode["Full"] = 255] = "Full";
|
|
631
|
+
})(exports.ColumnsEditMode || (exports.ColumnsEditMode = {}));
|
|
632
|
+
exports.ConditionsEditMode = void 0;
|
|
633
|
+
(function (ConditionsEditMode) {
|
|
634
|
+
/**
|
|
635
|
+
* No edit mode means that conditions are not editable at all.
|
|
636
|
+
*/
|
|
637
|
+
ConditionsEditMode[ConditionsEditMode["Default"] = 0] = "Default";
|
|
638
|
+
/**
|
|
639
|
+
* ReadOnly edit mode allows to view conditions but doesn't allow to change them, including the condition type, operator, value, etc.
|
|
640
|
+
*/
|
|
641
|
+
ConditionsEditMode[ConditionsEditMode["ReadOnly"] = 1] = "ReadOnly";
|
|
642
|
+
/**
|
|
643
|
+
* FixedList edit mode allows to modify some parameters of conditions (like their operators or values) but doesn't allow to add or delete conditions.
|
|
644
|
+
*/
|
|
645
|
+
ConditionsEditMode[ConditionsEditMode["FixedList"] = 16] = "FixedList";
|
|
646
|
+
/**
|
|
647
|
+
* Full edit mode allows to add, delete and change conditions in any way.
|
|
648
|
+
*/
|
|
649
|
+
ConditionsEditMode[ConditionsEditMode["Full"] = 255] = "Full";
|
|
650
|
+
})(exports.ConditionsEditMode || (exports.ConditionsEditMode = {}));
|
|
651
|
+
|
|
616
652
|
class MenuLevel {
|
|
617
653
|
get applyItem() {
|
|
618
654
|
return this._applyItem;
|
|
@@ -2009,15 +2045,22 @@ class ColumnRendererCP {
|
|
|
2009
2045
|
this.createFormatsMenu();
|
|
2010
2046
|
}
|
|
2011
2047
|
this.createButtonMenu();
|
|
2048
|
+
const isFullMode = this.panel.options.editMode === exports.ColumnsEditMode.Full;
|
|
2049
|
+
const isReadOnlyMode = this.panel.options.editMode === exports.ColumnsEditMode.ReadOnly;
|
|
2050
|
+
const showCheckboxes = this.panel.options.showCheckboxes !== false;
|
|
2012
2051
|
builder
|
|
2013
2052
|
.addClass(this.getClassesToAdd())
|
|
2014
|
-
.addClass(getMobileCssClass())
|
|
2015
|
-
|
|
2053
|
+
.addClass(getMobileCssClass());
|
|
2054
|
+
if (showCheckboxes && !isReadOnlyMode && !this.column.isReadOnly()) {
|
|
2055
|
+
builder.addChildElement(this.renderCheckbox());
|
|
2056
|
+
}
|
|
2057
|
+
if (!isReadOnlyMode) {
|
|
2016
2058
|
//start sort button
|
|
2017
|
-
.addChild('div', builder => builder
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2059
|
+
builder.addChild('div', builder => builder
|
|
2060
|
+
.addClass(`${eqCssPrefix}-button-placeholder`, `${this.cssPrefix}-button-placeholder`, `${this.cssPrefix}-colelement`, `${this.cssPrefix}-sortbutton-placeholder`)
|
|
2061
|
+
.addChildElement(this.sortingButton));
|
|
2062
|
+
// end sort button
|
|
2063
|
+
}
|
|
2021
2064
|
builder.addChildElement(this.renderExpressionBlock());
|
|
2022
2065
|
if (this.panel.options.showColumnTitles !== false && !ui.browserUtils.isMobileMode()) {
|
|
2023
2066
|
builder
|
|
@@ -2031,36 +2074,37 @@ class ColumnRendererCP {
|
|
|
2031
2074
|
builder
|
|
2032
2075
|
.addClass(`${eqCssPrefix}-column-buttonsBlock`, `${this.cssPrefix}-buttonsBlock`)
|
|
2033
2076
|
.addClass(getMobileCssClass());
|
|
2077
|
+
const buttonsToShow = this.getButtonsToShow();
|
|
2034
2078
|
//start enable button
|
|
2035
|
-
if (
|
|
2079
|
+
if (buttonsToShow.indexOf("enable") >= 0 && isFullMode && !showCheckboxes && !this.column.isReadOnly()) {
|
|
2036
2080
|
builder.addChildElement(this.renderEnabledButton());
|
|
2037
2081
|
buttonsIndex++;
|
|
2038
2082
|
buttonsList += 'Enable';
|
|
2039
2083
|
}
|
|
2040
2084
|
//end enable button
|
|
2041
2085
|
//start aggr func button
|
|
2042
|
-
if (
|
|
2086
|
+
if (buttonsToShow.indexOf("type") >= 0 && this.columnEnabled && isFullMode) {
|
|
2043
2087
|
builder.addChildElement(this.renderColumnTypeButton());
|
|
2044
2088
|
buttonsIndex++;
|
|
2045
2089
|
buttonsList += 'Type';
|
|
2046
2090
|
}
|
|
2047
2091
|
//end aggr func button
|
|
2048
2092
|
//start format selector button
|
|
2049
|
-
if (
|
|
2093
|
+
if (buttonsToShow.indexOf("format") >= 0 && this.columnEnabled && !isReadOnlyMode) {
|
|
2050
2094
|
builder.addChildElement(this.renderColumnFormatButton());
|
|
2051
2095
|
buttonsIndex++;
|
|
2052
2096
|
buttonsList += 'Format';
|
|
2053
2097
|
}
|
|
2054
2098
|
//end format selector button
|
|
2055
2099
|
//start delete button
|
|
2056
|
-
if (
|
|
2100
|
+
if (buttonsToShow.indexOf("delete") >= 0 && isFullMode && !this.column.isReadOnly()) {
|
|
2057
2101
|
builder.addChildElement(this.renderDeleteButton());
|
|
2058
2102
|
buttonsIndex++;
|
|
2059
2103
|
buttonsList += 'Delete';
|
|
2060
2104
|
}
|
|
2061
2105
|
//end delete button
|
|
2062
2106
|
//start menu button
|
|
2063
|
-
if (
|
|
2107
|
+
if (buttonsToShow.indexOf("menu") >= 0 && !(this.column.isReadOnly() || isReadOnlyMode)) {
|
|
2064
2108
|
builder.addChildElement(this.renderMenuButton());
|
|
2065
2109
|
buttonsIndex++;
|
|
2066
2110
|
buttonsList += 'Menu';
|
|
@@ -2084,7 +2128,7 @@ class ColumnRendererCP {
|
|
|
2084
2128
|
if (this.panel.options.alwaysShowButtons) {
|
|
2085
2129
|
this.showButtons();
|
|
2086
2130
|
}
|
|
2087
|
-
if (
|
|
2131
|
+
if (!showCheckboxes) {
|
|
2088
2132
|
builder.addClass("eqjs-no-checkbox");
|
|
2089
2133
|
}
|
|
2090
2134
|
return this.element;
|
|
@@ -2260,25 +2304,20 @@ class ColumnRendererCP {
|
|
|
2260
2304
|
.toDOM();
|
|
2261
2305
|
}
|
|
2262
2306
|
renderCheckbox() {
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
.toDOM();
|
|
2278
|
-
}
|
|
2279
|
-
else {
|
|
2280
|
-
return null;
|
|
2281
|
-
}
|
|
2307
|
+
return ui.domel("div")
|
|
2308
|
+
.title(core.i18n.getText('CmdToggleEnable'))
|
|
2309
|
+
.attr('tabIndex', '0')
|
|
2310
|
+
.addClass(`${this.cssPrefix}-colelement ${this.cssPrefix}-column-checkbox`)
|
|
2311
|
+
.addClass(`${this.columnEnabled ? 'enabled' : ''}`)
|
|
2312
|
+
.on('click', () => {
|
|
2313
|
+
this.columnEnabled = !this.columnEnabled;
|
|
2314
|
+
this.column.fireChangedEvent();
|
|
2315
|
+
return false;
|
|
2316
|
+
})
|
|
2317
|
+
.on('keypress', evt => { if ([13, 32].includes(evt.keyCode)) {
|
|
2318
|
+
evt.target.click();
|
|
2319
|
+
} })
|
|
2320
|
+
.toDOM();
|
|
2282
2321
|
}
|
|
2283
2322
|
renderDeleteButton() {
|
|
2284
2323
|
return ui.domel('div')
|
|
@@ -2374,7 +2413,13 @@ class ColumnRendererCP {
|
|
|
2374
2413
|
} })).toDOM();
|
|
2375
2414
|
}
|
|
2376
2415
|
isEditable() {
|
|
2377
|
-
|
|
2416
|
+
// Allow editing (title/sort/order) in Full or FixedList mode only
|
|
2417
|
+
switch (this.panel.options.editMode) {
|
|
2418
|
+
case exports.ColumnsEditMode.ReadOnly:
|
|
2419
|
+
return false;
|
|
2420
|
+
default:
|
|
2421
|
+
return this.column.enabled && !this.column.isReadOnly();
|
|
2422
|
+
}
|
|
2378
2423
|
}
|
|
2379
2424
|
changeFormatHandler(ev) {
|
|
2380
2425
|
const formats = this.panel
|
|
@@ -2527,7 +2572,18 @@ class ColumnRendererCP {
|
|
|
2527
2572
|
.concat(formats.map(format => ({ id: format.format, text: core.i18n.getText("DisplayFormats", format.name) || format.name })));
|
|
2528
2573
|
}
|
|
2529
2574
|
getButtonsToShow() {
|
|
2530
|
-
|
|
2575
|
+
// In ReadOnly mode, no buttons
|
|
2576
|
+
if (this.panel.options.editMode === exports.ColumnsEditMode.ReadOnly) {
|
|
2577
|
+
return [];
|
|
2578
|
+
}
|
|
2579
|
+
// In FixedList mode, only allow sorting and caption editing
|
|
2580
|
+
if (this.panel.options.editMode === exports.ColumnsEditMode.FixedList) {
|
|
2581
|
+
return ["sorting", "format"];
|
|
2582
|
+
}
|
|
2583
|
+
// Default (Full)
|
|
2584
|
+
return this.panel.options.buttons && Array.isArray(this.panel.options.buttons)
|
|
2585
|
+
? this.panel.options.buttons
|
|
2586
|
+
: ["enable", "delete", "type", "sorting", "format"];
|
|
2531
2587
|
}
|
|
2532
2588
|
buttonMenuHandler(action, evt) {
|
|
2533
2589
|
switch (action) {
|
|
@@ -2760,7 +2816,7 @@ class AttrColumnRendererCP extends ColumnRendererCP {
|
|
|
2760
2816
|
renderBaseExpression() {
|
|
2761
2817
|
const baseAttr = this.getAttribute();
|
|
2762
2818
|
const attrCaption = this.panel.getContext().getAttributeTitle(baseAttr);
|
|
2763
|
-
if (this.isEditable()) {
|
|
2819
|
+
if (this.isEditable() && this.panel.options.editMode === exports.ColumnsEditMode.Full) {
|
|
2764
2820
|
return ui.domel('a')
|
|
2765
2821
|
.attr('href', 'javascript:void(0)')
|
|
2766
2822
|
.title(attrCaption)
|
|
@@ -2779,10 +2835,12 @@ class AttrColumnRendererCP extends ColumnRendererCP {
|
|
|
2779
2835
|
})
|
|
2780
2836
|
.toDOM();
|
|
2781
2837
|
}
|
|
2782
|
-
|
|
2783
|
-
.
|
|
2784
|
-
|
|
2785
|
-
|
|
2838
|
+
else {
|
|
2839
|
+
return ui.domel('span')
|
|
2840
|
+
.text(attrCaption)
|
|
2841
|
+
.title(attrCaption)
|
|
2842
|
+
.toDOM();
|
|
2843
|
+
}
|
|
2786
2844
|
}
|
|
2787
2845
|
baseExpressionItemSelectedCallback(data, item) {
|
|
2788
2846
|
const attrid = data.id;
|
|
@@ -2933,7 +2991,8 @@ class AggrFuncColumnRendererCP extends AttrColumnRendererCP {
|
|
|
2933
2991
|
for (let idx = 0; idx < arrLength; idx++) {
|
|
2934
2992
|
item = arrFormat[idx];
|
|
2935
2993
|
if (item.type === 1) {
|
|
2936
|
-
|
|
2994
|
+
// Only allow function/type change in Full mode
|
|
2995
|
+
if (this.panel.options.editMode === exports.ColumnsEditMode.Full && this.isEditable()) {
|
|
2937
2996
|
const functionLink = ui.domel('a')
|
|
2938
2997
|
.attr('href', 'javascript:void(0)')
|
|
2939
2998
|
.text(item.text)
|
|
@@ -3070,7 +3129,7 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
|
|
|
3070
3129
|
let builder = ui.domel('div', exprBlock)
|
|
3071
3130
|
.addClass(`${this.cssPrefix}-colelement`, `${this.cssPrefix}-attrelement`)
|
|
3072
3131
|
.addClass(getMobileCssClass());
|
|
3073
|
-
if (this.isEditable()) {
|
|
3132
|
+
if (this.isEditable() && this.panel.options.editMode === exports.ColumnsEditMode.Full) {
|
|
3074
3133
|
builder
|
|
3075
3134
|
.addChild('a', b => b
|
|
3076
3135
|
.attr('href', 'javascript:void(0)')
|
|
@@ -3146,7 +3205,8 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
|
|
|
3146
3205
|
builder = ui.domel('div', exprBlock)
|
|
3147
3206
|
.addClass(`${this.cssPrefix}-colelement`, `${this.cssPrefix}-attrelement`)
|
|
3148
3207
|
.addClass(getMobileCssClass());
|
|
3149
|
-
|
|
3208
|
+
// Only allow data type change in Full mode
|
|
3209
|
+
if (this.panel.options.editMode === exports.ColumnsEditMode.Full && this.isEditable()) {
|
|
3150
3210
|
this.createDataTypeMenu();
|
|
3151
3211
|
builder
|
|
3152
3212
|
.addChild('a', dataTypeLink => dataTypeLink
|
|
@@ -3166,7 +3226,6 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
|
|
|
3166
3226
|
}));
|
|
3167
3227
|
}
|
|
3168
3228
|
else {
|
|
3169
|
-
this.column.expr.dataType;
|
|
3170
3229
|
builder
|
|
3171
3230
|
.addChild('span', b => {
|
|
3172
3231
|
b.text(core$1.DataType[this.column.expr.dataType])
|
|
@@ -3317,7 +3376,8 @@ class ColumnsPanel extends core.Widget {
|
|
|
3317
3376
|
customExpressionText: 0,
|
|
3318
3377
|
allowHiddenColumns: false,
|
|
3319
3378
|
showAddAllForEntity: false,
|
|
3320
|
-
showIndicatorOnLoad: true
|
|
3379
|
+
showIndicatorOnLoad: true,
|
|
3380
|
+
editMode: exports.ColumnsEditMode.Full
|
|
3321
3381
|
};
|
|
3322
3382
|
this.landingSlot = ui.domel('div')
|
|
3323
3383
|
.addClass(`${this.cssPrefix}-col-landing-slot`)
|
|
@@ -3331,6 +3391,18 @@ class ColumnsPanel extends core.Widget {
|
|
|
3331
3391
|
getWidgetType() {
|
|
3332
3392
|
return 'columnsPanel';
|
|
3333
3393
|
}
|
|
3394
|
+
/**
|
|
3395
|
+
* Gets or sets the current edit mode. When setting, automatically refreshes the widget.
|
|
3396
|
+
*/
|
|
3397
|
+
get editMode() {
|
|
3398
|
+
return this.options.editMode || exports.ColumnsEditMode.Full;
|
|
3399
|
+
}
|
|
3400
|
+
set editMode(value) {
|
|
3401
|
+
if (this.options.editMode !== value) {
|
|
3402
|
+
this.options.editMode = value;
|
|
3403
|
+
this.refresh();
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3334
3406
|
init(context, options) {
|
|
3335
3407
|
super.init(context, options);
|
|
3336
3408
|
this.setOptions(options);
|
|
@@ -3423,7 +3495,8 @@ class ColumnsPanel extends core.Widget {
|
|
|
3423
3495
|
.addClass(`${this.cssPrefix}-columns`)
|
|
3424
3496
|
.addClass(getMobileCssClass())
|
|
3425
3497
|
.toDOM();
|
|
3426
|
-
|
|
3498
|
+
// Only show add row in Full edit mode
|
|
3499
|
+
if (this.options.showAddRow && this.options.editMode === exports.ColumnsEditMode.Full) {
|
|
3427
3500
|
this.addRowElement =
|
|
3428
3501
|
ui.domel('div', this.slot)
|
|
3429
3502
|
.addClass(`${eqCssPrefix}-addrow`, `${this.cssPrefix}-addrow`, `${eqCssPrefix}-addrow-empty`)
|
|
@@ -3708,6 +3781,10 @@ class ColumnsPanel extends core.Widget {
|
|
|
3708
3781
|
}
|
|
3709
3782
|
}
|
|
3710
3783
|
addNewColumn(attrs, index) {
|
|
3784
|
+
// Only allow adding columns in Full edit mode
|
|
3785
|
+
if (this.options.editMode !== exports.ColumnsEditMode.Full) {
|
|
3786
|
+
return null;
|
|
3787
|
+
}
|
|
3711
3788
|
this.getContext().getModel();
|
|
3712
3789
|
const query = this.getQuery();
|
|
3713
3790
|
if (Array.isArray(attrs)) {
|
|
@@ -3906,6 +3983,10 @@ class ColumnsPanel extends core.Widget {
|
|
|
3906
3983
|
this.entitiesMenu.showMenu(menuOptions);
|
|
3907
3984
|
}
|
|
3908
3985
|
moveColumn(column, direction) {
|
|
3986
|
+
// Only allow moving columns in Full or FixedList edit mode
|
|
3987
|
+
if (this.options.editMode !== exports.ColumnsEditMode.Full && this.options.editMode !== exports.ColumnsEditMode.FixedList) {
|
|
3988
|
+
return;
|
|
3989
|
+
}
|
|
3909
3990
|
const query = this.getQuery();
|
|
3910
3991
|
const columns = query.getColumns();
|
|
3911
3992
|
const index = columns.indexOf(column);
|
|
@@ -3975,13 +4056,6 @@ class ColumnsPanel extends core.Widget {
|
|
|
3975
4056
|
}
|
|
3976
4057
|
}
|
|
3977
4058
|
|
|
3978
|
-
exports.ColumnsEditMode = void 0;
|
|
3979
|
-
(function (ColumnsEditMode) {
|
|
3980
|
-
ColumnsEditMode[ColumnsEditMode["ReadOnly"] = 0] = "ReadOnly";
|
|
3981
|
-
ColumnsEditMode[ColumnsEditMode["FixedList"] = 16] = "FixedList";
|
|
3982
|
-
ColumnsEditMode[ColumnsEditMode["Full"] = 255] = "Full";
|
|
3983
|
-
})(exports.ColumnsEditMode || (exports.ColumnsEditMode = {}));
|
|
3984
|
-
|
|
3985
4059
|
class ColumnRendererCB {
|
|
3986
4060
|
constructor(panel, column, slot) {
|
|
3987
4061
|
this.functionMenu = null;
|
|
@@ -4722,6 +4796,18 @@ class ColumnsBar extends core.Widget {
|
|
|
4722
4796
|
// Only allow drag-drop in All and FixedList modes
|
|
4723
4797
|
return this.options.allowDragDrop && this.options.editMode > exports.ColumnsEditMode.ReadOnly;
|
|
4724
4798
|
}
|
|
4799
|
+
/**
|
|
4800
|
+
* Gets or sets the current edit mode. When setting, automatically refreshes the widget.
|
|
4801
|
+
*/
|
|
4802
|
+
get editMode() {
|
|
4803
|
+
return this.options.editMode || exports.ColumnsEditMode.Full;
|
|
4804
|
+
}
|
|
4805
|
+
set editMode(value) {
|
|
4806
|
+
if (this.options.editMode !== value) {
|
|
4807
|
+
this.options.editMode = value;
|
|
4808
|
+
this.refresh();
|
|
4809
|
+
}
|
|
4810
|
+
}
|
|
4725
4811
|
init(context, options) {
|
|
4726
4812
|
super.init(context, options);
|
|
4727
4813
|
this.setOptions(options);
|
|
@@ -5828,14 +5914,14 @@ exports.QPEditablePart = void 0;
|
|
|
5828
5914
|
(function (QPEditablePart) {
|
|
5829
5915
|
QPEditablePart[QPEditablePart["None"] = 0] = "None";
|
|
5830
5916
|
QPEditablePart[QPEditablePart["Value"] = 1] = "Value";
|
|
5831
|
-
QPEditablePart[QPEditablePart["
|
|
5832
|
-
QPEditablePart[QPEditablePart["
|
|
5917
|
+
QPEditablePart[QPEditablePart["Operator"] = 2] = "Operator";
|
|
5918
|
+
QPEditablePart[QPEditablePart["Attribute"] = 4] = "Attribute";
|
|
5833
5919
|
QPEditablePart[QPEditablePart["Addition"] = 8] = "Addition";
|
|
5834
5920
|
QPEditablePart[QPEditablePart["Removal"] = 16] = "Removal";
|
|
5835
5921
|
QPEditablePart[QPEditablePart["All"] = 255] = "All";
|
|
5836
5922
|
QPEditablePart[QPEditablePart["NoAddition"] = -9] = "NoAddition";
|
|
5837
5923
|
QPEditablePart[QPEditablePart["NoRemoval"] = -17] = "NoRemoval";
|
|
5838
|
-
QPEditablePart[QPEditablePart["FixedConditionList"] =
|
|
5924
|
+
QPEditablePart[QPEditablePart["FixedConditionList"] = 3] = "FixedConditionList";
|
|
5839
5925
|
})(exports.QPEditablePart || (exports.QPEditablePart = {}));
|
|
5840
5926
|
|
|
5841
5927
|
class TextRenderer {
|
|
@@ -5907,7 +5993,8 @@ class ConditionRenderer {
|
|
|
5907
5993
|
return this.element;
|
|
5908
5994
|
}
|
|
5909
5995
|
isEditable() {
|
|
5910
|
-
return this.condition.enabled && !this.condition.isReadOnly()
|
|
5996
|
+
return this.condition.enabled && !this.condition.isReadOnly()
|
|
5997
|
+
&& !(this.condition.isGroup() && this.panel.isFixed());
|
|
5911
5998
|
}
|
|
5912
5999
|
}
|
|
5913
6000
|
class SimpleConditionRenderer extends ConditionRenderer {
|
|
@@ -6032,7 +6119,7 @@ class SimpleConditionRenderer extends ConditionRenderer {
|
|
|
6032
6119
|
return null;
|
|
6033
6120
|
}
|
|
6034
6121
|
renderCheckbox() {
|
|
6035
|
-
if (this.panel.options.showCheckboxes && !this.condition.isReadOnly()) {
|
|
6122
|
+
if (this.panel.options.showCheckboxes && !this.condition.isReadOnly() && !this.panel.isFixed()) {
|
|
6036
6123
|
return ui.domel("div")
|
|
6037
6124
|
.title(core$1.i18n.getText('CmdToggleEnable'))
|
|
6038
6125
|
.attr('tabIndex', '0')
|
|
@@ -6259,7 +6346,8 @@ class SimpleConditionRenderer extends ConditionRenderer {
|
|
|
6259
6346
|
});
|
|
6260
6347
|
});
|
|
6261
6348
|
}
|
|
6262
|
-
if (this.getButtonsToShow().indexOf("enable") >= 0 && this.condition.getParent() && this.condition.getParent().enabled
|
|
6349
|
+
if (this.getButtonsToShow().indexOf("enable") >= 0 && this.condition.getParent() && this.condition.getParent().enabled
|
|
6350
|
+
&& !this.panel.options.showCheckboxes && !this.panel.isFixed()) {
|
|
6263
6351
|
builder.addChild("div", b => {
|
|
6264
6352
|
b.addClass(`${this.cssPrefix}-button-placeholder`)
|
|
6265
6353
|
.data("btnplaceholder", "")
|
|
@@ -6297,7 +6385,7 @@ class SimpleConditionRenderer extends ConditionRenderer {
|
|
|
6297
6385
|
});
|
|
6298
6386
|
});
|
|
6299
6387
|
}
|
|
6300
|
-
if (this.getButtonsToShow().indexOf("menu") >= 0) {
|
|
6388
|
+
if (this.getButtonsToShow().indexOf("menu") >= 0 && !this.panel.isFixed()) {
|
|
6301
6389
|
builder.addChild("div", b => {
|
|
6302
6390
|
b.addClass(`${this.cssPrefix}-button-placeholder`)
|
|
6303
6391
|
.data("btnplaceholder", "")
|
|
@@ -7658,7 +7746,8 @@ class QueryPanel extends core.Widget {
|
|
|
7658
7746
|
onOperatorRendered: null,
|
|
7659
7747
|
onGetAddRowRenderer: null,
|
|
7660
7748
|
defaultQuery: null,
|
|
7661
|
-
showIndicatorOnLoad: true
|
|
7749
|
+
showIndicatorOnLoad: true,
|
|
7750
|
+
editMode: exports.ConditionsEditMode.Default
|
|
7662
7751
|
};
|
|
7663
7752
|
this.customQuery = null;
|
|
7664
7753
|
this.landingSlot = ui.domel('div')
|
|
@@ -7689,8 +7778,9 @@ class QueryPanel extends core.Widget {
|
|
|
7689
7778
|
//detach previously defined query observer (if any)
|
|
7690
7779
|
this.detachQueryObserver();
|
|
7691
7780
|
this.attachQueryObserver();
|
|
7781
|
+
this.convertEditModelToEditableParts();
|
|
7692
7782
|
ui.eqDragManager.removeDropContainer(this.slot);
|
|
7693
|
-
if (this.options.allowDragDrop) {
|
|
7783
|
+
if (this.options.allowDragDrop && (this.options.editableParts & exports.QPEditablePart.Addition) == exports.QPEditablePart.Addition) {
|
|
7694
7784
|
const model = this.getContext().getModel();
|
|
7695
7785
|
ui.eqDragManager.registerDropContainer({
|
|
7696
7786
|
element: this.slot,
|
|
@@ -7726,6 +7816,22 @@ class QueryPanel extends core.Widget {
|
|
|
7726
7816
|
});
|
|
7727
7817
|
}
|
|
7728
7818
|
}
|
|
7819
|
+
convertEditModelToEditableParts() {
|
|
7820
|
+
// Convert editMode to editableParts for backward compatibility
|
|
7821
|
+
if (this.options.editMode !== exports.ConditionsEditMode.Default) {
|
|
7822
|
+
switch (this.options.editMode) {
|
|
7823
|
+
case exports.ConditionsEditMode.ReadOnly:
|
|
7824
|
+
this.options.editableParts = exports.QPEditablePart.None;
|
|
7825
|
+
break;
|
|
7826
|
+
case exports.ConditionsEditMode.FixedList:
|
|
7827
|
+
this.options.editableParts = exports.QPEditablePart.FixedConditionList;
|
|
7828
|
+
break;
|
|
7829
|
+
default:
|
|
7830
|
+
this.options.editableParts = exports.QPEditablePart.All;
|
|
7831
|
+
break;
|
|
7832
|
+
}
|
|
7833
|
+
}
|
|
7834
|
+
}
|
|
7729
7835
|
destroyCore() {
|
|
7730
7836
|
ui.eqDragManager.removeDropContainer(this.slot);
|
|
7731
7837
|
this.detachQueryObserver();
|
|
@@ -7862,6 +7968,31 @@ class QueryPanel extends core.Widget {
|
|
|
7862
7968
|
}
|
|
7863
7969
|
return this.context.getQuery();
|
|
7864
7970
|
}
|
|
7971
|
+
/**
|
|
7972
|
+
* Gets `true` if the query panel is in read-only mode. Otherwise - `false`.
|
|
7973
|
+
*/
|
|
7974
|
+
isReadOnly() {
|
|
7975
|
+
return (this.options.editableParts == exports.QPEditablePart.None);
|
|
7976
|
+
}
|
|
7977
|
+
/**
|
|
7978
|
+
* Gets `true` if the query panel is in FixedList edit mode. Otherwise - `false`.
|
|
7979
|
+
*/
|
|
7980
|
+
isFixed() {
|
|
7981
|
+
return this.options.editableParts < exports.QPEditablePart.Attribute;
|
|
7982
|
+
}
|
|
7983
|
+
/**
|
|
7984
|
+
* Gets or sets the current edit mode. When setting, automatically refreshes the widget.
|
|
7985
|
+
*/
|
|
7986
|
+
get editMode() {
|
|
7987
|
+
return this.options.editMode || exports.ConditionsEditMode.Default;
|
|
7988
|
+
}
|
|
7989
|
+
set editMode(value) {
|
|
7990
|
+
if (this.options.editMode !== value) {
|
|
7991
|
+
this.options.editMode = value;
|
|
7992
|
+
this.convertEditModelToEditableParts();
|
|
7993
|
+
this.refresh();
|
|
7994
|
+
}
|
|
7995
|
+
}
|
|
7865
7996
|
refreshCore() {
|
|
7866
7997
|
this.clear();
|
|
7867
7998
|
this.render();
|
|
@@ -7907,7 +8038,7 @@ class QueryPanel extends core.Widget {
|
|
|
7907
8038
|
if (renderer) {
|
|
7908
8039
|
renderer.render();
|
|
7909
8040
|
}
|
|
7910
|
-
if (this.options.showAddRow) {
|
|
8041
|
+
if (this.options.showAddRow && (this.options.editableParts & exports.QPEditablePart.Addition) == exports.QPEditablePart.Addition) {
|
|
7911
8042
|
this.addRowElement = ui.domel('div', this.slot)
|
|
7912
8043
|
.toDOM();
|
|
7913
8044
|
const addrowRenderer = this.getAddRowRenderer(this.addRowElement);
|
package/dist/easyquery.ui.esm.js
CHANGED
|
@@ -611,6 +611,42 @@ class EntitiesPanel extends Widget {
|
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
+
var ColumnsEditMode;
|
|
615
|
+
(function (ColumnsEditMode) {
|
|
616
|
+
/**
|
|
617
|
+
* ReadOnly edit mode allows to view columns but doesn't allow to change them.
|
|
618
|
+
*/
|
|
619
|
+
ColumnsEditMode[ColumnsEditMode["ReadOnly"] = 0] = "ReadOnly";
|
|
620
|
+
/**
|
|
621
|
+
* FixedList edit mode allows to edit some columns parameters (formats, sorting) and change their order
|
|
622
|
+
* but doesn't allow to add or delete columns.
|
|
623
|
+
*/
|
|
624
|
+
ColumnsEditMode[ColumnsEditMode["FixedList"] = 16] = "FixedList";
|
|
625
|
+
/**
|
|
626
|
+
* Full edit mode allows to add, delete and change columns in any way.
|
|
627
|
+
*/
|
|
628
|
+
ColumnsEditMode[ColumnsEditMode["Full"] = 255] = "Full";
|
|
629
|
+
})(ColumnsEditMode || (ColumnsEditMode = {}));
|
|
630
|
+
var ConditionsEditMode;
|
|
631
|
+
(function (ConditionsEditMode) {
|
|
632
|
+
/**
|
|
633
|
+
* No edit mode means that conditions are not editable at all.
|
|
634
|
+
*/
|
|
635
|
+
ConditionsEditMode[ConditionsEditMode["Default"] = 0] = "Default";
|
|
636
|
+
/**
|
|
637
|
+
* ReadOnly edit mode allows to view conditions but doesn't allow to change them, including the condition type, operator, value, etc.
|
|
638
|
+
*/
|
|
639
|
+
ConditionsEditMode[ConditionsEditMode["ReadOnly"] = 1] = "ReadOnly";
|
|
640
|
+
/**
|
|
641
|
+
* FixedList edit mode allows to modify some parameters of conditions (like their operators or values) but doesn't allow to add or delete conditions.
|
|
642
|
+
*/
|
|
643
|
+
ConditionsEditMode[ConditionsEditMode["FixedList"] = 16] = "FixedList";
|
|
644
|
+
/**
|
|
645
|
+
* Full edit mode allows to add, delete and change conditions in any way.
|
|
646
|
+
*/
|
|
647
|
+
ConditionsEditMode[ConditionsEditMode["Full"] = 255] = "Full";
|
|
648
|
+
})(ConditionsEditMode || (ConditionsEditMode = {}));
|
|
649
|
+
|
|
614
650
|
class MenuLevel {
|
|
615
651
|
get applyItem() {
|
|
616
652
|
return this._applyItem;
|
|
@@ -2007,15 +2043,22 @@ class ColumnRendererCP {
|
|
|
2007
2043
|
this.createFormatsMenu();
|
|
2008
2044
|
}
|
|
2009
2045
|
this.createButtonMenu();
|
|
2046
|
+
const isFullMode = this.panel.options.editMode === ColumnsEditMode.Full;
|
|
2047
|
+
const isReadOnlyMode = this.panel.options.editMode === ColumnsEditMode.ReadOnly;
|
|
2048
|
+
const showCheckboxes = this.panel.options.showCheckboxes !== false;
|
|
2010
2049
|
builder
|
|
2011
2050
|
.addClass(this.getClassesToAdd())
|
|
2012
|
-
.addClass(getMobileCssClass())
|
|
2013
|
-
|
|
2051
|
+
.addClass(getMobileCssClass());
|
|
2052
|
+
if (showCheckboxes && !isReadOnlyMode && !this.column.isReadOnly()) {
|
|
2053
|
+
builder.addChildElement(this.renderCheckbox());
|
|
2054
|
+
}
|
|
2055
|
+
if (!isReadOnlyMode) {
|
|
2014
2056
|
//start sort button
|
|
2015
|
-
.addChild('div', builder => builder
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2057
|
+
builder.addChild('div', builder => builder
|
|
2058
|
+
.addClass(`${eqCssPrefix}-button-placeholder`, `${this.cssPrefix}-button-placeholder`, `${this.cssPrefix}-colelement`, `${this.cssPrefix}-sortbutton-placeholder`)
|
|
2059
|
+
.addChildElement(this.sortingButton));
|
|
2060
|
+
// end sort button
|
|
2061
|
+
}
|
|
2019
2062
|
builder.addChildElement(this.renderExpressionBlock());
|
|
2020
2063
|
if (this.panel.options.showColumnTitles !== false && !browserUtils.isMobileMode()) {
|
|
2021
2064
|
builder
|
|
@@ -2029,36 +2072,37 @@ class ColumnRendererCP {
|
|
|
2029
2072
|
builder
|
|
2030
2073
|
.addClass(`${eqCssPrefix}-column-buttonsBlock`, `${this.cssPrefix}-buttonsBlock`)
|
|
2031
2074
|
.addClass(getMobileCssClass());
|
|
2075
|
+
const buttonsToShow = this.getButtonsToShow();
|
|
2032
2076
|
//start enable button
|
|
2033
|
-
if (
|
|
2077
|
+
if (buttonsToShow.indexOf("enable") >= 0 && isFullMode && !showCheckboxes && !this.column.isReadOnly()) {
|
|
2034
2078
|
builder.addChildElement(this.renderEnabledButton());
|
|
2035
2079
|
buttonsIndex++;
|
|
2036
2080
|
buttonsList += 'Enable';
|
|
2037
2081
|
}
|
|
2038
2082
|
//end enable button
|
|
2039
2083
|
//start aggr func button
|
|
2040
|
-
if (
|
|
2084
|
+
if (buttonsToShow.indexOf("type") >= 0 && this.columnEnabled && isFullMode) {
|
|
2041
2085
|
builder.addChildElement(this.renderColumnTypeButton());
|
|
2042
2086
|
buttonsIndex++;
|
|
2043
2087
|
buttonsList += 'Type';
|
|
2044
2088
|
}
|
|
2045
2089
|
//end aggr func button
|
|
2046
2090
|
//start format selector button
|
|
2047
|
-
if (
|
|
2091
|
+
if (buttonsToShow.indexOf("format") >= 0 && this.columnEnabled && !isReadOnlyMode) {
|
|
2048
2092
|
builder.addChildElement(this.renderColumnFormatButton());
|
|
2049
2093
|
buttonsIndex++;
|
|
2050
2094
|
buttonsList += 'Format';
|
|
2051
2095
|
}
|
|
2052
2096
|
//end format selector button
|
|
2053
2097
|
//start delete button
|
|
2054
|
-
if (
|
|
2098
|
+
if (buttonsToShow.indexOf("delete") >= 0 && isFullMode && !this.column.isReadOnly()) {
|
|
2055
2099
|
builder.addChildElement(this.renderDeleteButton());
|
|
2056
2100
|
buttonsIndex++;
|
|
2057
2101
|
buttonsList += 'Delete';
|
|
2058
2102
|
}
|
|
2059
2103
|
//end delete button
|
|
2060
2104
|
//start menu button
|
|
2061
|
-
if (
|
|
2105
|
+
if (buttonsToShow.indexOf("menu") >= 0 && !(this.column.isReadOnly() || isReadOnlyMode)) {
|
|
2062
2106
|
builder.addChildElement(this.renderMenuButton());
|
|
2063
2107
|
buttonsIndex++;
|
|
2064
2108
|
buttonsList += 'Menu';
|
|
@@ -2082,7 +2126,7 @@ class ColumnRendererCP {
|
|
|
2082
2126
|
if (this.panel.options.alwaysShowButtons) {
|
|
2083
2127
|
this.showButtons();
|
|
2084
2128
|
}
|
|
2085
|
-
if (
|
|
2129
|
+
if (!showCheckboxes) {
|
|
2086
2130
|
builder.addClass("eqjs-no-checkbox");
|
|
2087
2131
|
}
|
|
2088
2132
|
return this.element;
|
|
@@ -2258,25 +2302,20 @@ class ColumnRendererCP {
|
|
|
2258
2302
|
.toDOM();
|
|
2259
2303
|
}
|
|
2260
2304
|
renderCheckbox() {
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
.toDOM();
|
|
2276
|
-
}
|
|
2277
|
-
else {
|
|
2278
|
-
return null;
|
|
2279
|
-
}
|
|
2305
|
+
return domel("div")
|
|
2306
|
+
.title(i18n$1.getText('CmdToggleEnable'))
|
|
2307
|
+
.attr('tabIndex', '0')
|
|
2308
|
+
.addClass(`${this.cssPrefix}-colelement ${this.cssPrefix}-column-checkbox`)
|
|
2309
|
+
.addClass(`${this.columnEnabled ? 'enabled' : ''}`)
|
|
2310
|
+
.on('click', () => {
|
|
2311
|
+
this.columnEnabled = !this.columnEnabled;
|
|
2312
|
+
this.column.fireChangedEvent();
|
|
2313
|
+
return false;
|
|
2314
|
+
})
|
|
2315
|
+
.on('keypress', evt => { if ([13, 32].includes(evt.keyCode)) {
|
|
2316
|
+
evt.target.click();
|
|
2317
|
+
} })
|
|
2318
|
+
.toDOM();
|
|
2280
2319
|
}
|
|
2281
2320
|
renderDeleteButton() {
|
|
2282
2321
|
return domel('div')
|
|
@@ -2372,7 +2411,13 @@ class ColumnRendererCP {
|
|
|
2372
2411
|
} })).toDOM();
|
|
2373
2412
|
}
|
|
2374
2413
|
isEditable() {
|
|
2375
|
-
|
|
2414
|
+
// Allow editing (title/sort/order) in Full or FixedList mode only
|
|
2415
|
+
switch (this.panel.options.editMode) {
|
|
2416
|
+
case ColumnsEditMode.ReadOnly:
|
|
2417
|
+
return false;
|
|
2418
|
+
default:
|
|
2419
|
+
return this.column.enabled && !this.column.isReadOnly();
|
|
2420
|
+
}
|
|
2376
2421
|
}
|
|
2377
2422
|
changeFormatHandler(ev) {
|
|
2378
2423
|
const formats = this.panel
|
|
@@ -2525,7 +2570,18 @@ class ColumnRendererCP {
|
|
|
2525
2570
|
.concat(formats.map(format => ({ id: format.format, text: i18n$1.getText("DisplayFormats", format.name) || format.name })));
|
|
2526
2571
|
}
|
|
2527
2572
|
getButtonsToShow() {
|
|
2528
|
-
|
|
2573
|
+
// In ReadOnly mode, no buttons
|
|
2574
|
+
if (this.panel.options.editMode === ColumnsEditMode.ReadOnly) {
|
|
2575
|
+
return [];
|
|
2576
|
+
}
|
|
2577
|
+
// In FixedList mode, only allow sorting and caption editing
|
|
2578
|
+
if (this.panel.options.editMode === ColumnsEditMode.FixedList) {
|
|
2579
|
+
return ["sorting", "format"];
|
|
2580
|
+
}
|
|
2581
|
+
// Default (Full)
|
|
2582
|
+
return this.panel.options.buttons && Array.isArray(this.panel.options.buttons)
|
|
2583
|
+
? this.panel.options.buttons
|
|
2584
|
+
: ["enable", "delete", "type", "sorting", "format"];
|
|
2529
2585
|
}
|
|
2530
2586
|
buttonMenuHandler(action, evt) {
|
|
2531
2587
|
switch (action) {
|
|
@@ -2758,7 +2814,7 @@ class AttrColumnRendererCP extends ColumnRendererCP {
|
|
|
2758
2814
|
renderBaseExpression() {
|
|
2759
2815
|
const baseAttr = this.getAttribute();
|
|
2760
2816
|
const attrCaption = this.panel.getContext().getAttributeTitle(baseAttr);
|
|
2761
|
-
if (this.isEditable()) {
|
|
2817
|
+
if (this.isEditable() && this.panel.options.editMode === ColumnsEditMode.Full) {
|
|
2762
2818
|
return domel('a')
|
|
2763
2819
|
.attr('href', 'javascript:void(0)')
|
|
2764
2820
|
.title(attrCaption)
|
|
@@ -2777,10 +2833,12 @@ class AttrColumnRendererCP extends ColumnRendererCP {
|
|
|
2777
2833
|
})
|
|
2778
2834
|
.toDOM();
|
|
2779
2835
|
}
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2836
|
+
else {
|
|
2837
|
+
return domel('span')
|
|
2838
|
+
.text(attrCaption)
|
|
2839
|
+
.title(attrCaption)
|
|
2840
|
+
.toDOM();
|
|
2841
|
+
}
|
|
2784
2842
|
}
|
|
2785
2843
|
baseExpressionItemSelectedCallback(data, item) {
|
|
2786
2844
|
const attrid = data.id;
|
|
@@ -2931,7 +2989,8 @@ class AggrFuncColumnRendererCP extends AttrColumnRendererCP {
|
|
|
2931
2989
|
for (let idx = 0; idx < arrLength; idx++) {
|
|
2932
2990
|
item = arrFormat[idx];
|
|
2933
2991
|
if (item.type === 1) {
|
|
2934
|
-
|
|
2992
|
+
// Only allow function/type change in Full mode
|
|
2993
|
+
if (this.panel.options.editMode === ColumnsEditMode.Full && this.isEditable()) {
|
|
2935
2994
|
const functionLink = domel('a')
|
|
2936
2995
|
.attr('href', 'javascript:void(0)')
|
|
2937
2996
|
.text(item.text)
|
|
@@ -3068,7 +3127,7 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
|
|
|
3068
3127
|
let builder = domel('div', exprBlock)
|
|
3069
3128
|
.addClass(`${this.cssPrefix}-colelement`, `${this.cssPrefix}-attrelement`)
|
|
3070
3129
|
.addClass(getMobileCssClass());
|
|
3071
|
-
if (this.isEditable()) {
|
|
3130
|
+
if (this.isEditable() && this.panel.options.editMode === ColumnsEditMode.Full) {
|
|
3072
3131
|
builder
|
|
3073
3132
|
.addChild('a', b => b
|
|
3074
3133
|
.attr('href', 'javascript:void(0)')
|
|
@@ -3144,7 +3203,8 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
|
|
|
3144
3203
|
builder = domel('div', exprBlock)
|
|
3145
3204
|
.addClass(`${this.cssPrefix}-colelement`, `${this.cssPrefix}-attrelement`)
|
|
3146
3205
|
.addClass(getMobileCssClass());
|
|
3147
|
-
|
|
3206
|
+
// Only allow data type change in Full mode
|
|
3207
|
+
if (this.panel.options.editMode === ColumnsEditMode.Full && this.isEditable()) {
|
|
3148
3208
|
this.createDataTypeMenu();
|
|
3149
3209
|
builder
|
|
3150
3210
|
.addChild('a', dataTypeLink => dataTypeLink
|
|
@@ -3164,7 +3224,6 @@ class EditableColumnRendererCP extends AttrColumnRendererCP {
|
|
|
3164
3224
|
}));
|
|
3165
3225
|
}
|
|
3166
3226
|
else {
|
|
3167
|
-
this.column.expr.dataType;
|
|
3168
3227
|
builder
|
|
3169
3228
|
.addChild('span', b => {
|
|
3170
3229
|
b.text(DataType[this.column.expr.dataType])
|
|
@@ -3315,7 +3374,8 @@ class ColumnsPanel extends Widget {
|
|
|
3315
3374
|
customExpressionText: 0,
|
|
3316
3375
|
allowHiddenColumns: false,
|
|
3317
3376
|
showAddAllForEntity: false,
|
|
3318
|
-
showIndicatorOnLoad: true
|
|
3377
|
+
showIndicatorOnLoad: true,
|
|
3378
|
+
editMode: ColumnsEditMode.Full
|
|
3319
3379
|
};
|
|
3320
3380
|
this.landingSlot = domel('div')
|
|
3321
3381
|
.addClass(`${this.cssPrefix}-col-landing-slot`)
|
|
@@ -3329,6 +3389,18 @@ class ColumnsPanel extends Widget {
|
|
|
3329
3389
|
getWidgetType() {
|
|
3330
3390
|
return 'columnsPanel';
|
|
3331
3391
|
}
|
|
3392
|
+
/**
|
|
3393
|
+
* Gets or sets the current edit mode. When setting, automatically refreshes the widget.
|
|
3394
|
+
*/
|
|
3395
|
+
get editMode() {
|
|
3396
|
+
return this.options.editMode || ColumnsEditMode.Full;
|
|
3397
|
+
}
|
|
3398
|
+
set editMode(value) {
|
|
3399
|
+
if (this.options.editMode !== value) {
|
|
3400
|
+
this.options.editMode = value;
|
|
3401
|
+
this.refresh();
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3332
3404
|
init(context, options) {
|
|
3333
3405
|
super.init(context, options);
|
|
3334
3406
|
this.setOptions(options);
|
|
@@ -3421,7 +3493,8 @@ class ColumnsPanel extends Widget {
|
|
|
3421
3493
|
.addClass(`${this.cssPrefix}-columns`)
|
|
3422
3494
|
.addClass(getMobileCssClass())
|
|
3423
3495
|
.toDOM();
|
|
3424
|
-
|
|
3496
|
+
// Only show add row in Full edit mode
|
|
3497
|
+
if (this.options.showAddRow && this.options.editMode === ColumnsEditMode.Full) {
|
|
3425
3498
|
this.addRowElement =
|
|
3426
3499
|
domel('div', this.slot)
|
|
3427
3500
|
.addClass(`${eqCssPrefix}-addrow`, `${this.cssPrefix}-addrow`, `${eqCssPrefix}-addrow-empty`)
|
|
@@ -3706,6 +3779,10 @@ class ColumnsPanel extends Widget {
|
|
|
3706
3779
|
}
|
|
3707
3780
|
}
|
|
3708
3781
|
addNewColumn(attrs, index) {
|
|
3782
|
+
// Only allow adding columns in Full edit mode
|
|
3783
|
+
if (this.options.editMode !== ColumnsEditMode.Full) {
|
|
3784
|
+
return null;
|
|
3785
|
+
}
|
|
3709
3786
|
this.getContext().getModel();
|
|
3710
3787
|
const query = this.getQuery();
|
|
3711
3788
|
if (Array.isArray(attrs)) {
|
|
@@ -3904,6 +3981,10 @@ class ColumnsPanel extends Widget {
|
|
|
3904
3981
|
this.entitiesMenu.showMenu(menuOptions);
|
|
3905
3982
|
}
|
|
3906
3983
|
moveColumn(column, direction) {
|
|
3984
|
+
// Only allow moving columns in Full or FixedList edit mode
|
|
3985
|
+
if (this.options.editMode !== ColumnsEditMode.Full && this.options.editMode !== ColumnsEditMode.FixedList) {
|
|
3986
|
+
return;
|
|
3987
|
+
}
|
|
3907
3988
|
const query = this.getQuery();
|
|
3908
3989
|
const columns = query.getColumns();
|
|
3909
3990
|
const index = columns.indexOf(column);
|
|
@@ -3973,13 +4054,6 @@ class ColumnsPanel extends Widget {
|
|
|
3973
4054
|
}
|
|
3974
4055
|
}
|
|
3975
4056
|
|
|
3976
|
-
var ColumnsEditMode;
|
|
3977
|
-
(function (ColumnsEditMode) {
|
|
3978
|
-
ColumnsEditMode[ColumnsEditMode["ReadOnly"] = 0] = "ReadOnly";
|
|
3979
|
-
ColumnsEditMode[ColumnsEditMode["FixedList"] = 16] = "FixedList";
|
|
3980
|
-
ColumnsEditMode[ColumnsEditMode["Full"] = 255] = "Full";
|
|
3981
|
-
})(ColumnsEditMode || (ColumnsEditMode = {}));
|
|
3982
|
-
|
|
3983
4057
|
class ColumnRendererCB {
|
|
3984
4058
|
constructor(panel, column, slot) {
|
|
3985
4059
|
this.functionMenu = null;
|
|
@@ -4720,6 +4794,18 @@ class ColumnsBar extends Widget {
|
|
|
4720
4794
|
// Only allow drag-drop in All and FixedList modes
|
|
4721
4795
|
return this.options.allowDragDrop && this.options.editMode > ColumnsEditMode.ReadOnly;
|
|
4722
4796
|
}
|
|
4797
|
+
/**
|
|
4798
|
+
* Gets or sets the current edit mode. When setting, automatically refreshes the widget.
|
|
4799
|
+
*/
|
|
4800
|
+
get editMode() {
|
|
4801
|
+
return this.options.editMode || ColumnsEditMode.Full;
|
|
4802
|
+
}
|
|
4803
|
+
set editMode(value) {
|
|
4804
|
+
if (this.options.editMode !== value) {
|
|
4805
|
+
this.options.editMode = value;
|
|
4806
|
+
this.refresh();
|
|
4807
|
+
}
|
|
4808
|
+
}
|
|
4723
4809
|
init(context, options) {
|
|
4724
4810
|
super.init(context, options);
|
|
4725
4811
|
this.setOptions(options);
|
|
@@ -5826,14 +5912,14 @@ var QPEditablePart;
|
|
|
5826
5912
|
(function (QPEditablePart) {
|
|
5827
5913
|
QPEditablePart[QPEditablePart["None"] = 0] = "None";
|
|
5828
5914
|
QPEditablePart[QPEditablePart["Value"] = 1] = "Value";
|
|
5829
|
-
QPEditablePart[QPEditablePart["
|
|
5830
|
-
QPEditablePart[QPEditablePart["
|
|
5915
|
+
QPEditablePart[QPEditablePart["Operator"] = 2] = "Operator";
|
|
5916
|
+
QPEditablePart[QPEditablePart["Attribute"] = 4] = "Attribute";
|
|
5831
5917
|
QPEditablePart[QPEditablePart["Addition"] = 8] = "Addition";
|
|
5832
5918
|
QPEditablePart[QPEditablePart["Removal"] = 16] = "Removal";
|
|
5833
5919
|
QPEditablePart[QPEditablePart["All"] = 255] = "All";
|
|
5834
5920
|
QPEditablePart[QPEditablePart["NoAddition"] = -9] = "NoAddition";
|
|
5835
5921
|
QPEditablePart[QPEditablePart["NoRemoval"] = -17] = "NoRemoval";
|
|
5836
|
-
QPEditablePart[QPEditablePart["FixedConditionList"] =
|
|
5922
|
+
QPEditablePart[QPEditablePart["FixedConditionList"] = 3] = "FixedConditionList";
|
|
5837
5923
|
})(QPEditablePart || (QPEditablePart = {}));
|
|
5838
5924
|
|
|
5839
5925
|
class TextRenderer {
|
|
@@ -5905,7 +5991,8 @@ class ConditionRenderer {
|
|
|
5905
5991
|
return this.element;
|
|
5906
5992
|
}
|
|
5907
5993
|
isEditable() {
|
|
5908
|
-
return this.condition.enabled && !this.condition.isReadOnly()
|
|
5994
|
+
return this.condition.enabled && !this.condition.isReadOnly()
|
|
5995
|
+
&& !(this.condition.isGroup() && this.panel.isFixed());
|
|
5909
5996
|
}
|
|
5910
5997
|
}
|
|
5911
5998
|
class SimpleConditionRenderer extends ConditionRenderer {
|
|
@@ -6030,7 +6117,7 @@ class SimpleConditionRenderer extends ConditionRenderer {
|
|
|
6030
6117
|
return null;
|
|
6031
6118
|
}
|
|
6032
6119
|
renderCheckbox() {
|
|
6033
|
-
if (this.panel.options.showCheckboxes && !this.condition.isReadOnly()) {
|
|
6120
|
+
if (this.panel.options.showCheckboxes && !this.condition.isReadOnly() && !this.panel.isFixed()) {
|
|
6034
6121
|
return domel("div")
|
|
6035
6122
|
.title(i18n.getText('CmdToggleEnable'))
|
|
6036
6123
|
.attr('tabIndex', '0')
|
|
@@ -6257,7 +6344,8 @@ class SimpleConditionRenderer extends ConditionRenderer {
|
|
|
6257
6344
|
});
|
|
6258
6345
|
});
|
|
6259
6346
|
}
|
|
6260
|
-
if (this.getButtonsToShow().indexOf("enable") >= 0 && this.condition.getParent() && this.condition.getParent().enabled
|
|
6347
|
+
if (this.getButtonsToShow().indexOf("enable") >= 0 && this.condition.getParent() && this.condition.getParent().enabled
|
|
6348
|
+
&& !this.panel.options.showCheckboxes && !this.panel.isFixed()) {
|
|
6261
6349
|
builder.addChild("div", b => {
|
|
6262
6350
|
b.addClass(`${this.cssPrefix}-button-placeholder`)
|
|
6263
6351
|
.data("btnplaceholder", "")
|
|
@@ -6295,7 +6383,7 @@ class SimpleConditionRenderer extends ConditionRenderer {
|
|
|
6295
6383
|
});
|
|
6296
6384
|
});
|
|
6297
6385
|
}
|
|
6298
|
-
if (this.getButtonsToShow().indexOf("menu") >= 0) {
|
|
6386
|
+
if (this.getButtonsToShow().indexOf("menu") >= 0 && !this.panel.isFixed()) {
|
|
6299
6387
|
builder.addChild("div", b => {
|
|
6300
6388
|
b.addClass(`${this.cssPrefix}-button-placeholder`)
|
|
6301
6389
|
.data("btnplaceholder", "")
|
|
@@ -7656,7 +7744,8 @@ class QueryPanel extends Widget {
|
|
|
7656
7744
|
onOperatorRendered: null,
|
|
7657
7745
|
onGetAddRowRenderer: null,
|
|
7658
7746
|
defaultQuery: null,
|
|
7659
|
-
showIndicatorOnLoad: true
|
|
7747
|
+
showIndicatorOnLoad: true,
|
|
7748
|
+
editMode: ConditionsEditMode.Default
|
|
7660
7749
|
};
|
|
7661
7750
|
this.customQuery = null;
|
|
7662
7751
|
this.landingSlot = domel('div')
|
|
@@ -7687,8 +7776,9 @@ class QueryPanel extends Widget {
|
|
|
7687
7776
|
//detach previously defined query observer (if any)
|
|
7688
7777
|
this.detachQueryObserver();
|
|
7689
7778
|
this.attachQueryObserver();
|
|
7779
|
+
this.convertEditModelToEditableParts();
|
|
7690
7780
|
eqDragManager.removeDropContainer(this.slot);
|
|
7691
|
-
if (this.options.allowDragDrop) {
|
|
7781
|
+
if (this.options.allowDragDrop && (this.options.editableParts & QPEditablePart.Addition) == QPEditablePart.Addition) {
|
|
7692
7782
|
const model = this.getContext().getModel();
|
|
7693
7783
|
eqDragManager.registerDropContainer({
|
|
7694
7784
|
element: this.slot,
|
|
@@ -7724,6 +7814,22 @@ class QueryPanel extends Widget {
|
|
|
7724
7814
|
});
|
|
7725
7815
|
}
|
|
7726
7816
|
}
|
|
7817
|
+
convertEditModelToEditableParts() {
|
|
7818
|
+
// Convert editMode to editableParts for backward compatibility
|
|
7819
|
+
if (this.options.editMode !== ConditionsEditMode.Default) {
|
|
7820
|
+
switch (this.options.editMode) {
|
|
7821
|
+
case ConditionsEditMode.ReadOnly:
|
|
7822
|
+
this.options.editableParts = QPEditablePart.None;
|
|
7823
|
+
break;
|
|
7824
|
+
case ConditionsEditMode.FixedList:
|
|
7825
|
+
this.options.editableParts = QPEditablePart.FixedConditionList;
|
|
7826
|
+
break;
|
|
7827
|
+
default:
|
|
7828
|
+
this.options.editableParts = QPEditablePart.All;
|
|
7829
|
+
break;
|
|
7830
|
+
}
|
|
7831
|
+
}
|
|
7832
|
+
}
|
|
7727
7833
|
destroyCore() {
|
|
7728
7834
|
eqDragManager.removeDropContainer(this.slot);
|
|
7729
7835
|
this.detachQueryObserver();
|
|
@@ -7860,6 +7966,31 @@ class QueryPanel extends Widget {
|
|
|
7860
7966
|
}
|
|
7861
7967
|
return this.context.getQuery();
|
|
7862
7968
|
}
|
|
7969
|
+
/**
|
|
7970
|
+
* Gets `true` if the query panel is in read-only mode. Otherwise - `false`.
|
|
7971
|
+
*/
|
|
7972
|
+
isReadOnly() {
|
|
7973
|
+
return (this.options.editableParts == QPEditablePart.None);
|
|
7974
|
+
}
|
|
7975
|
+
/**
|
|
7976
|
+
* Gets `true` if the query panel is in FixedList edit mode. Otherwise - `false`.
|
|
7977
|
+
*/
|
|
7978
|
+
isFixed() {
|
|
7979
|
+
return this.options.editableParts < QPEditablePart.Attribute;
|
|
7980
|
+
}
|
|
7981
|
+
/**
|
|
7982
|
+
* Gets or sets the current edit mode. When setting, automatically refreshes the widget.
|
|
7983
|
+
*/
|
|
7984
|
+
get editMode() {
|
|
7985
|
+
return this.options.editMode || ConditionsEditMode.Default;
|
|
7986
|
+
}
|
|
7987
|
+
set editMode(value) {
|
|
7988
|
+
if (this.options.editMode !== value) {
|
|
7989
|
+
this.options.editMode = value;
|
|
7990
|
+
this.convertEditModelToEditableParts();
|
|
7991
|
+
this.refresh();
|
|
7992
|
+
}
|
|
7993
|
+
}
|
|
7863
7994
|
refreshCore() {
|
|
7864
7995
|
this.clear();
|
|
7865
7996
|
this.render();
|
|
@@ -7905,7 +8036,7 @@ class QueryPanel extends Widget {
|
|
|
7905
8036
|
if (renderer) {
|
|
7906
8037
|
renderer.render();
|
|
7907
8038
|
}
|
|
7908
|
-
if (this.options.showAddRow) {
|
|
8039
|
+
if (this.options.showAddRow && (this.options.editableParts & QPEditablePart.Addition) == QPEditablePart.Addition) {
|
|
7909
8040
|
this.addRowElement = domel('div', this.slot)
|
|
7910
8041
|
.toDOM();
|
|
7911
8042
|
const addrowRenderer = this.getAddRowRenderer(this.addRowElement);
|
|
@@ -14499,4 +14630,4 @@ if (!Array.prototype.findIndex) {
|
|
|
14499
14630
|
};
|
|
14500
14631
|
}
|
|
14501
14632
|
|
|
14502
|
-
export { AddRowRenderer, AdvancedSearchView, AggrFuncColumnRendererCB, AggrFuncColumnRendererCP, AggrSettingsDialog, AggrSettingsRenderer, AggregationBar, AttrColumnRendererCB, AttrColumnRendererCP, AttributeExpressionRenderer, BaseElementRenderer, ChartFacet, ChartJsWidget, ChartType, ChartWidget, ColumnAction, ColumnRendererCB, ColumnRendererCP, ColumnsBar, ColumnsEditMode, ColumnsPanel, ConditionAction, ConditionGroupRenderer, ConditionGroupRowRenderer, ConditionRenderer, ConstColumnRendererCP, CustomListExpressionRenderer, CustomSqlColumnRendererCP, DataFilterView, DataTableFacet, DateTimeExpressionRenderer, DomDropDownElementBuilder, DropDownRenderer, EasyGridWidget, EntitiesPanel, EqHtmlGrid, ExportDialog, ExportWidget, ExpressionRenderer, FacetContainer, FacetType, FilterBar, GoogleChartWidget, Grid, HtmlContentWidget, HtmlDataFilterView, InputExpressionRenderer, ListExpressionRenderer, ManageDrillDownWidget, OperatorRenderer, PivotTableFacet, PopupMenu, ProcessWidget, QPEditablePart, QueryPanel, ReportView, ResultFacet, ResultFacetsPanel, SimpleConditionRenderer, SortingBar, SqlListExpressionRenderer, StatementPanel, SubQueryExpressionRenderer, TextRenderer, View, dropdown };
|
|
14633
|
+
export { AddRowRenderer, AdvancedSearchView, AggrFuncColumnRendererCB, AggrFuncColumnRendererCP, AggrSettingsDialog, AggrSettingsRenderer, AggregationBar, AttrColumnRendererCB, AttrColumnRendererCP, AttributeExpressionRenderer, BaseElementRenderer, ChartFacet, ChartJsWidget, ChartType, ChartWidget, ColumnAction, ColumnRendererCB, ColumnRendererCP, ColumnsBar, ColumnsEditMode, ColumnsPanel, ConditionAction, ConditionGroupRenderer, ConditionGroupRowRenderer, ConditionRenderer, ConditionsEditMode, ConstColumnRendererCP, CustomListExpressionRenderer, CustomSqlColumnRendererCP, DataFilterView, DataTableFacet, DateTimeExpressionRenderer, DomDropDownElementBuilder, DropDownRenderer, EasyGridWidget, EntitiesPanel, EqHtmlGrid, ExportDialog, ExportWidget, ExpressionRenderer, FacetContainer, FacetType, FilterBar, GoogleChartWidget, Grid, HtmlContentWidget, HtmlDataFilterView, InputExpressionRenderer, ListExpressionRenderer, ManageDrillDownWidget, OperatorRenderer, PivotTableFacet, PopupMenu, ProcessWidget, QPEditablePart, QueryPanel, ReportView, ResultFacet, ResultFacetsPanel, SimpleConditionRenderer, SortingBar, SqlListExpressionRenderer, StatementPanel, SubQueryExpressionRenderer, TextRenderer, View, dropdown };
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
export declare enum QPEditablePart {
|
|
5
5
|
None = 0,
|
|
6
6
|
Value = 1,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
Operator = 2,
|
|
8
|
+
Attribute = 4,
|
|
9
9
|
Addition = 8,
|
|
10
10
|
Removal = 16,
|
|
11
11
|
All = 255,
|
|
12
12
|
NoAddition = -9,
|
|
13
13
|
NoRemoval = -17,
|
|
14
|
-
FixedConditionList =
|
|
14
|
+
FixedConditionList = 3
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EqContext, Query, QueryColumn, Widget } from '@easyquery/core';
|
|
2
2
|
import { PopupMenu } from '../utils/popup_menu';
|
|
3
|
-
import { ColumnsBarOptions } from './widget_options';
|
|
3
|
+
import { ColumnsBarOptions, ColumnsEditMode } from './widget_options';
|
|
4
4
|
export declare class ColumnsBar extends Widget {
|
|
5
5
|
private static globalCounter;
|
|
6
6
|
options: ColumnsBarOptions;
|
|
@@ -21,6 +21,11 @@ export declare class ColumnsBar extends Widget {
|
|
|
21
21
|
constructor(slot: HTMLElement, customQuery?: Query);
|
|
22
22
|
getWidgetType(): string;
|
|
23
23
|
isDraggable(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Gets or sets the current edit mode. When setting, automatically refreshes the widget.
|
|
26
|
+
*/
|
|
27
|
+
get editMode(): ColumnsEditMode;
|
|
28
|
+
set editMode(value: ColumnsEditMode);
|
|
24
29
|
init(context: EqContext, options?: ColumnsBarOptions): void;
|
|
25
30
|
private attachQueryObserver;
|
|
26
31
|
getQuery(): Query;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EqContext, QueryColumn, Widget } from '@easyquery/core';
|
|
2
|
-
import { ColumnsPanelOptions } from './widget_options';
|
|
2
|
+
import { ColumnsEditMode, ColumnsPanelOptions } from './widget_options';
|
|
3
3
|
import { PopupMenu } from '../utils/popup_menu';
|
|
4
4
|
export declare class ColumnsPanel extends Widget {
|
|
5
5
|
options: ColumnsPanelOptions;
|
|
@@ -14,6 +14,11 @@ export declare class ColumnsPanel extends Widget {
|
|
|
14
14
|
protected get cssPrefix(): string;
|
|
15
15
|
constructor(slot: HTMLElement);
|
|
16
16
|
getWidgetType(): string;
|
|
17
|
+
/**
|
|
18
|
+
* Gets or sets the current edit mode. When setting, automatically refreshes the widget.
|
|
19
|
+
*/
|
|
20
|
+
get editMode(): ColumnsEditMode;
|
|
21
|
+
set editMode(value: ColumnsEditMode);
|
|
17
22
|
init(context: EqContext, options?: ColumnsPanelOptions): void;
|
|
18
23
|
protected renderBaseElements(): void;
|
|
19
24
|
protected destroyCore(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Widget, EqContext, Condition, Expression, Query } from '@easyquery/core';
|
|
2
2
|
import { PopupMenu, PopupMenuOptions } from '../utils/popup_menu';
|
|
3
|
-
import { QueryPanelOptions } from './widget_options';
|
|
3
|
+
import { ConditionsEditMode, QueryPanelOptions } from './widget_options';
|
|
4
4
|
import { ConditionRenderer } from './renderers/querypanel/condition_renderer';
|
|
5
5
|
import { ExpressionRenderer } from './renderers/querypanel/expression_renderer';
|
|
6
6
|
import { BaseElementRenderer } from './renderers/base_element_renderer';
|
|
@@ -32,6 +32,7 @@ export declare class QueryPanel extends Widget {
|
|
|
32
32
|
* @param options The options.
|
|
33
33
|
*/
|
|
34
34
|
init(context: EqContext, options?: QueryPanelOptions): void;
|
|
35
|
+
private convertEditModelToEditableParts;
|
|
35
36
|
protected destroyCore(): void;
|
|
36
37
|
getEntitiesMenu(): PopupMenu;
|
|
37
38
|
getConditionMenu(): PopupMenu;
|
|
@@ -40,6 +41,19 @@ export declare class QueryPanel extends Widget {
|
|
|
40
41
|
private attachQueryObserver;
|
|
41
42
|
private detachQueryObserver;
|
|
42
43
|
getQuery(): Query;
|
|
44
|
+
/**
|
|
45
|
+
* Gets `true` if the query panel is in read-only mode. Otherwise - `false`.
|
|
46
|
+
*/
|
|
47
|
+
isReadOnly(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Gets `true` if the query panel is in FixedList edit mode. Otherwise - `false`.
|
|
50
|
+
*/
|
|
51
|
+
isFixed(): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Gets or sets the current edit mode. When setting, automatically refreshes the widget.
|
|
54
|
+
*/
|
|
55
|
+
get editMode(): ConditionsEditMode;
|
|
56
|
+
set editMode(value: ConditionsEditMode);
|
|
43
57
|
protected refreshCore(): void;
|
|
44
58
|
protected setOptions(options?: QueryPanelOptions): void;
|
|
45
59
|
protected clear(): void;
|
|
@@ -16,8 +16,36 @@ export interface UseInOptions {
|
|
|
16
16
|
useInSorting: boolean;
|
|
17
17
|
}
|
|
18
18
|
export declare enum ColumnsEditMode {
|
|
19
|
+
/**
|
|
20
|
+
* ReadOnly edit mode allows to view columns but doesn't allow to change them.
|
|
21
|
+
*/
|
|
19
22
|
ReadOnly = 0,
|
|
23
|
+
/**
|
|
24
|
+
* FixedList edit mode allows to edit some columns parameters (formats, sorting) and change their order
|
|
25
|
+
* but doesn't allow to add or delete columns.
|
|
26
|
+
*/
|
|
20
27
|
FixedList = 16,
|
|
28
|
+
/**
|
|
29
|
+
* Full edit mode allows to add, delete and change columns in any way.
|
|
30
|
+
*/
|
|
31
|
+
Full = 255
|
|
32
|
+
}
|
|
33
|
+
export declare enum ConditionsEditMode {
|
|
34
|
+
/**
|
|
35
|
+
* No edit mode means that conditions are not editable at all.
|
|
36
|
+
*/
|
|
37
|
+
Default = 0,
|
|
38
|
+
/**
|
|
39
|
+
* ReadOnly edit mode allows to view conditions but doesn't allow to change them, including the condition type, operator, value, etc.
|
|
40
|
+
*/
|
|
41
|
+
ReadOnly = 1,
|
|
42
|
+
/**
|
|
43
|
+
* FixedList edit mode allows to modify some parameters of conditions (like their operators or values) but doesn't allow to add or delete conditions.
|
|
44
|
+
*/
|
|
45
|
+
FixedList = 16,
|
|
46
|
+
/**
|
|
47
|
+
* Full edit mode allows to add, delete and change conditions in any way.
|
|
48
|
+
*/
|
|
21
49
|
Full = 255
|
|
22
50
|
}
|
|
23
51
|
/** EntitiesPanel options */
|
|
@@ -173,7 +201,7 @@ export interface ColumnsPanelOptions {
|
|
|
173
201
|
showAddAllForEntity?: boolean;
|
|
174
202
|
/** Gets or sets a value indicating whether a progress indicator should appear while the model is loading */
|
|
175
203
|
showIndicatorOnLoad?: boolean;
|
|
176
|
-
/** Gets or sets the edit mode option:
|
|
204
|
+
/** Gets or sets the edit mode option: Full, FixedList or ReadOnly */
|
|
177
205
|
editMode?: ColumnsEditMode;
|
|
178
206
|
[name: string]: any;
|
|
179
207
|
}
|
|
@@ -352,6 +380,8 @@ export interface QueryPanelOptions {
|
|
|
352
380
|
adjustEntitiesMenuHeight?: boolean;
|
|
353
381
|
domWriteItemsId?: boolean;
|
|
354
382
|
dateTimePickerResolver?: (options: DateTimePickerOptions) => DateTimePicker;
|
|
383
|
+
/** Gets or sets the edit mode option: Full, FixedList or ReadOnly */
|
|
384
|
+
editMode?: ConditionsEditMode;
|
|
355
385
|
}
|
|
356
386
|
/**
|
|
357
387
|
* Grid options type.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easyquery/ui",
|
|
3
|
-
"version": "7.4.0-
|
|
3
|
+
"version": "7.4.0-rc05",
|
|
4
4
|
"description": "EasyQuery.JS Community UI widgets",
|
|
5
5
|
"types": "./dist/types/public_api.d.ts",
|
|
6
6
|
"main": "./dist/easyquery.ui.cjs.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"bugs": "https://korzh.com/support",
|
|
31
31
|
"license": "LGPL-3.0",
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@easyquery/core": "^7.4.0-
|
|
33
|
+
"@easyquery/core": "^7.4.0-rc05"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist",
|