@easyquery/ui 7.4.1-rc01 → 7.4.1-rc03
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
CHANGED
|
@@ -7838,6 +7838,7 @@ class QueryPanel extends core.Widget {
|
|
|
7838
7838
|
this.slot.innerHTML = '';
|
|
7839
7839
|
}
|
|
7840
7840
|
getEntitiesMenu() {
|
|
7841
|
+
this.checkEntitiesMenu();
|
|
7841
7842
|
return this.entitiesMenu;
|
|
7842
7843
|
}
|
|
7843
7844
|
getConditionMenu() {
|
|
@@ -8024,7 +8025,7 @@ class QueryPanel extends core.Widget {
|
|
|
8024
8025
|
}
|
|
8025
8026
|
render() {
|
|
8026
8027
|
try {
|
|
8027
|
-
this.
|
|
8028
|
+
this.checkEntitiesMenu();
|
|
8028
8029
|
this.createConditionMenus();
|
|
8029
8030
|
this.createLinkTypeMenu();
|
|
8030
8031
|
this.rootContainer = ui.domel('div', this.slot)
|
|
@@ -8184,9 +8185,14 @@ class QueryPanel extends core.Widget {
|
|
|
8184
8185
|
core$1.utils.assign(options, this.options.menuOptions);
|
|
8185
8186
|
return new PopupMenu(options);
|
|
8186
8187
|
}
|
|
8188
|
+
checkEntitiesMenu() {
|
|
8189
|
+
if (!this.entitiesMenu) {
|
|
8190
|
+
this.entitiesMenu = this.createEntitiesMenu();
|
|
8191
|
+
}
|
|
8192
|
+
}
|
|
8187
8193
|
showEntitiesMenu(options) {
|
|
8194
|
+
this.checkEntitiesMenu();
|
|
8188
8195
|
this.entitiesMenu.showMenu(Object.assign({}, this.options.menuOptions, options));
|
|
8189
|
-
// this.entitiesMenu.showMenu(options);
|
|
8190
8196
|
}
|
|
8191
8197
|
createConditionMenus() {
|
|
8192
8198
|
//ConditionMenu
|
|
@@ -8439,7 +8445,7 @@ class FilterBar extends core.Widget {
|
|
|
8439
8445
|
ui.domel(this.headerTextElement)
|
|
8440
8446
|
.text(text)
|
|
8441
8447
|
.attr('title', text);
|
|
8442
|
-
if (!query || query.isEmptyConditions()) { //empty query, don't show query panel and arrow, show link in header
|
|
8448
|
+
if (!query || query.isEmptyConditions()) { //empty query, don't show query panel and arrow, show a link in the header
|
|
8443
8449
|
ui.domel(this.headerTextElement).hide();
|
|
8444
8450
|
ui.domel(this.headerLinkElement).show();
|
|
8445
8451
|
if (!ui.domel(this.qpBlock).isVisible()) {
|
|
@@ -8465,6 +8471,7 @@ class FilterBar extends core.Widget {
|
|
|
8465
8471
|
this.textResize();
|
|
8466
8472
|
}
|
|
8467
8473
|
render() {
|
|
8474
|
+
this.slot.innerHTML = '';
|
|
8468
8475
|
ui.domel(this.slot)
|
|
8469
8476
|
.addClass(`${this.cssPrefix}-container`)
|
|
8470
8477
|
.addClass(getMobileCssClass())
|
|
@@ -8483,7 +8490,6 @@ class FilterBar extends core.Widget {
|
|
|
8483
8490
|
.text(core$1.i18n.getText('StrNoFilterClickToAdd'))
|
|
8484
8491
|
.hide()
|
|
8485
8492
|
.on('click', () => {
|
|
8486
|
-
console.log("condition filter click");
|
|
8487
8493
|
this.queryPanel.showEntitiesMenu({
|
|
8488
8494
|
anchor: this.headerLinkElement,
|
|
8489
8495
|
selectedIds: null,
|
|
@@ -8543,14 +8549,13 @@ class FilterBar extends core.Widget {
|
|
|
8543
8549
|
});
|
|
8544
8550
|
this.updateHeader();
|
|
8545
8551
|
this.queryPanel.refresh();
|
|
8546
|
-
setTimeout(() => this.textResize(), 500);
|
|
8547
8552
|
}
|
|
8548
8553
|
refreshCore() {
|
|
8549
8554
|
this.clear();
|
|
8550
8555
|
this.render();
|
|
8551
8556
|
}
|
|
8552
8557
|
clear() {
|
|
8553
|
-
this.slot.innerHTML =
|
|
8558
|
+
this.slot.innerHTML = '';
|
|
8554
8559
|
}
|
|
8555
8560
|
applyFilter() {
|
|
8556
8561
|
if (this.options.applyFilterCallback) {
|
|
@@ -8565,8 +8570,8 @@ class FilterBar extends core.Widget {
|
|
|
8565
8570
|
}
|
|
8566
8571
|
}
|
|
8567
8572
|
textResize() {
|
|
8568
|
-
this.headerTextBlock.style.width = (this.slot.clientWidth - this.headerIconElement.offsetWidth
|
|
8569
|
-
|
|
8573
|
+
// this.headerTextBlock.style.width = (this.slot.clientWidth - this.headerIconElement.offsetWidth
|
|
8574
|
+
// - (domel(this.headerArrowBlock).isVisible() ? this.headerArrowBlock.offsetWidth : 0)) + "px";
|
|
8570
8575
|
}
|
|
8571
8576
|
destroyCore() {
|
|
8572
8577
|
if (this.queryPanel)
|
|
@@ -8577,7 +8582,12 @@ class FilterBar extends core.Widget {
|
|
|
8577
8582
|
attachQueryObserver() {
|
|
8578
8583
|
const query = this.getContext().getQuery();
|
|
8579
8584
|
this.queryEventCallbackId = query.addChangedCallback(event => {
|
|
8580
|
-
this.
|
|
8585
|
+
if (this.headerElement) {
|
|
8586
|
+
this.updateHeader();
|
|
8587
|
+
}
|
|
8588
|
+
else {
|
|
8589
|
+
this.render();
|
|
8590
|
+
}
|
|
8581
8591
|
});
|
|
8582
8592
|
}
|
|
8583
8593
|
detachQueryObserver() {
|
package/dist/easyquery.ui.esm.js
CHANGED
|
@@ -7836,6 +7836,7 @@ class QueryPanel extends Widget {
|
|
|
7836
7836
|
this.slot.innerHTML = '';
|
|
7837
7837
|
}
|
|
7838
7838
|
getEntitiesMenu() {
|
|
7839
|
+
this.checkEntitiesMenu();
|
|
7839
7840
|
return this.entitiesMenu;
|
|
7840
7841
|
}
|
|
7841
7842
|
getConditionMenu() {
|
|
@@ -8022,7 +8023,7 @@ class QueryPanel extends Widget {
|
|
|
8022
8023
|
}
|
|
8023
8024
|
render() {
|
|
8024
8025
|
try {
|
|
8025
|
-
this.
|
|
8026
|
+
this.checkEntitiesMenu();
|
|
8026
8027
|
this.createConditionMenus();
|
|
8027
8028
|
this.createLinkTypeMenu();
|
|
8028
8029
|
this.rootContainer = domel('div', this.slot)
|
|
@@ -8182,9 +8183,14 @@ class QueryPanel extends Widget {
|
|
|
8182
8183
|
utils.assign(options, this.options.menuOptions);
|
|
8183
8184
|
return new PopupMenu(options);
|
|
8184
8185
|
}
|
|
8186
|
+
checkEntitiesMenu() {
|
|
8187
|
+
if (!this.entitiesMenu) {
|
|
8188
|
+
this.entitiesMenu = this.createEntitiesMenu();
|
|
8189
|
+
}
|
|
8190
|
+
}
|
|
8185
8191
|
showEntitiesMenu(options) {
|
|
8192
|
+
this.checkEntitiesMenu();
|
|
8186
8193
|
this.entitiesMenu.showMenu(Object.assign({}, this.options.menuOptions, options));
|
|
8187
|
-
// this.entitiesMenu.showMenu(options);
|
|
8188
8194
|
}
|
|
8189
8195
|
createConditionMenus() {
|
|
8190
8196
|
//ConditionMenu
|
|
@@ -8437,7 +8443,7 @@ class FilterBar extends Widget {
|
|
|
8437
8443
|
domel(this.headerTextElement)
|
|
8438
8444
|
.text(text)
|
|
8439
8445
|
.attr('title', text);
|
|
8440
|
-
if (!query || query.isEmptyConditions()) { //empty query, don't show query panel and arrow, show link in header
|
|
8446
|
+
if (!query || query.isEmptyConditions()) { //empty query, don't show query panel and arrow, show a link in the header
|
|
8441
8447
|
domel(this.headerTextElement).hide();
|
|
8442
8448
|
domel(this.headerLinkElement).show();
|
|
8443
8449
|
if (!domel(this.qpBlock).isVisible()) {
|
|
@@ -8463,6 +8469,7 @@ class FilterBar extends Widget {
|
|
|
8463
8469
|
this.textResize();
|
|
8464
8470
|
}
|
|
8465
8471
|
render() {
|
|
8472
|
+
this.slot.innerHTML = '';
|
|
8466
8473
|
domel(this.slot)
|
|
8467
8474
|
.addClass(`${this.cssPrefix}-container`)
|
|
8468
8475
|
.addClass(getMobileCssClass())
|
|
@@ -8481,7 +8488,6 @@ class FilterBar extends Widget {
|
|
|
8481
8488
|
.text(i18n.getText('StrNoFilterClickToAdd'))
|
|
8482
8489
|
.hide()
|
|
8483
8490
|
.on('click', () => {
|
|
8484
|
-
console.log("condition filter click");
|
|
8485
8491
|
this.queryPanel.showEntitiesMenu({
|
|
8486
8492
|
anchor: this.headerLinkElement,
|
|
8487
8493
|
selectedIds: null,
|
|
@@ -8541,14 +8547,13 @@ class FilterBar extends Widget {
|
|
|
8541
8547
|
});
|
|
8542
8548
|
this.updateHeader();
|
|
8543
8549
|
this.queryPanel.refresh();
|
|
8544
|
-
setTimeout(() => this.textResize(), 500);
|
|
8545
8550
|
}
|
|
8546
8551
|
refreshCore() {
|
|
8547
8552
|
this.clear();
|
|
8548
8553
|
this.render();
|
|
8549
8554
|
}
|
|
8550
8555
|
clear() {
|
|
8551
|
-
this.slot.innerHTML =
|
|
8556
|
+
this.slot.innerHTML = '';
|
|
8552
8557
|
}
|
|
8553
8558
|
applyFilter() {
|
|
8554
8559
|
if (this.options.applyFilterCallback) {
|
|
@@ -8563,8 +8568,8 @@ class FilterBar extends Widget {
|
|
|
8563
8568
|
}
|
|
8564
8569
|
}
|
|
8565
8570
|
textResize() {
|
|
8566
|
-
this.headerTextBlock.style.width = (this.slot.clientWidth - this.headerIconElement.offsetWidth
|
|
8567
|
-
|
|
8571
|
+
// this.headerTextBlock.style.width = (this.slot.clientWidth - this.headerIconElement.offsetWidth
|
|
8572
|
+
// - (domel(this.headerArrowBlock).isVisible() ? this.headerArrowBlock.offsetWidth : 0)) + "px";
|
|
8568
8573
|
}
|
|
8569
8574
|
destroyCore() {
|
|
8570
8575
|
if (this.queryPanel)
|
|
@@ -8575,7 +8580,12 @@ class FilterBar extends Widget {
|
|
|
8575
8580
|
attachQueryObserver() {
|
|
8576
8581
|
const query = this.getContext().getQuery();
|
|
8577
8582
|
this.queryEventCallbackId = query.addChangedCallback(event => {
|
|
8578
|
-
this.
|
|
8583
|
+
if (this.headerElement) {
|
|
8584
|
+
this.updateHeader();
|
|
8585
|
+
}
|
|
8586
|
+
else {
|
|
8587
|
+
this.render();
|
|
8588
|
+
}
|
|
8579
8589
|
});
|
|
8580
8590
|
}
|
|
8581
8591
|
detachQueryObserver() {
|
|
@@ -63,6 +63,7 @@ export declare class QueryPanel extends Widget {
|
|
|
63
63
|
getOperatorRenderer(condition: Condition, text: string, slot?: HTMLDivElement): BaseElementRenderer | null;
|
|
64
64
|
getAddRowRenderer(slot?: HTMLDivElement): BaseElementRenderer | null;
|
|
65
65
|
private createEntitiesMenu;
|
|
66
|
+
protected checkEntitiesMenu(): void;
|
|
66
67
|
showEntitiesMenu(options: PopupMenuOptions): void;
|
|
67
68
|
private createConditionMenus;
|
|
68
69
|
private createLinkTypeMenu;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easyquery/ui",
|
|
3
|
-
"version": "7.4.1-
|
|
3
|
+
"version": "7.4.1-rc03",
|
|
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.1-
|
|
33
|
+
"@easyquery/core": "^7.4.1-rc03"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist",
|