@easyquery/core 7.4.2-rc03 → 7.5.0-rc01
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/LICENSE.md +162 -162
- package/README.md +35 -35
- package/dist/easyquery.core.cjs.js +110 -2
- package/dist/easyquery.core.esm.js +110 -3
- package/dist/types/common/eq_services.d.ts +4 -0
- package/dist/types/main/column_width_store.d.ts +23 -0
- package/dist/types/main/context.d.ts +3 -0
- package/dist/types/main/context_options.d.ts +3 -0
- package/dist/types/public_api.d.ts +1 -0
- package/dist/types/query/query.d.ts +16 -0
- package/package.json +1 -1
package/LICENSE.md
CHANGED
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
GNU Lesser General Public License
|
|
2
|
-
=================================
|
|
3
|
-
|
|
4
|
-
_Version 3, 29 June 2007_
|
|
5
|
-
_Copyright © 2007 Free Software Foundation, Inc. <<http://fsf.org/>>_
|
|
6
|
-
|
|
7
|
-
Everyone is permitted to copy and distribute verbatim copies
|
|
8
|
-
of this license document, but changing it is not allowed.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
This version of the GNU Lesser General Public License incorporates
|
|
12
|
-
the terms and conditions of version 3 of the GNU General Public
|
|
13
|
-
License, supplemented by the additional permissions listed below.
|
|
14
|
-
|
|
15
|
-
### 0. Additional Definitions
|
|
16
|
-
|
|
17
|
-
As used herein, “this License” refers to version 3 of the GNU Lesser
|
|
18
|
-
General Public License, and the “GNU GPL” refers to version 3 of the GNU
|
|
19
|
-
General Public License.
|
|
20
|
-
|
|
21
|
-
“The Library” refers to a covered work governed by this License,
|
|
22
|
-
other than an Application or a Combined Work as defined below.
|
|
23
|
-
|
|
24
|
-
An “Application” is any work that makes use of an interface provided
|
|
25
|
-
by the Library, but which is not otherwise based on the Library.
|
|
26
|
-
Defining a subclass of a class defined by the Library is deemed a mode
|
|
27
|
-
of using an interface provided by the Library.
|
|
28
|
-
|
|
29
|
-
A “Combined Work” is a work produced by combining or linking an
|
|
30
|
-
Application with the Library. The particular version of the Library
|
|
31
|
-
with which the Combined Work was made is also called the “Linked
|
|
32
|
-
Version”.
|
|
33
|
-
|
|
34
|
-
The “Minimal Corresponding Source” for a Combined Work means the
|
|
35
|
-
Corresponding Source for the Combined Work, excluding any source code
|
|
36
|
-
for portions of the Combined Work that, considered in isolation, are
|
|
37
|
-
based on the Application, and not on the Linked Version.
|
|
38
|
-
|
|
39
|
-
The “Corresponding Application Code” for a Combined Work means the
|
|
40
|
-
object code and/or source code for the Application, including any data
|
|
41
|
-
and utility programs needed for reproducing the Combined Work from the
|
|
42
|
-
Application, but excluding the System Libraries of the Combined Work.
|
|
43
|
-
|
|
44
|
-
### 1. Exception to Section 3 of the GNU GPL
|
|
45
|
-
|
|
46
|
-
You may convey a covered work under sections 3 and 4 of this License
|
|
47
|
-
without being bound by section 3 of the GNU GPL.
|
|
48
|
-
|
|
49
|
-
### 2. Conveying Modified Versions
|
|
50
|
-
|
|
51
|
-
If you modify a copy of the Library, and, in your modifications, a
|
|
52
|
-
facility refers to a function or data to be supplied by an Application
|
|
53
|
-
that uses the facility (other than as an argument passed when the
|
|
54
|
-
facility is invoked), then you may convey a copy of the modified
|
|
55
|
-
version:
|
|
56
|
-
|
|
57
|
-
* **a)** under this License, provided that you make a good faith effort to
|
|
58
|
-
ensure that, in the event an Application does not supply the
|
|
59
|
-
function or data, the facility still operates, and performs
|
|
60
|
-
whatever part of its purpose remains meaningful, or
|
|
61
|
-
|
|
62
|
-
* **b)** under the GNU GPL, with none of the additional permissions of
|
|
63
|
-
this License applicable to that copy.
|
|
64
|
-
|
|
65
|
-
### 3. Object Code Incorporating Material from Library Header Files
|
|
66
|
-
|
|
67
|
-
The object code form of an Application may incorporate material from
|
|
68
|
-
a header file that is part of the Library. You may convey such object
|
|
69
|
-
code under terms of your choice, provided that, if the incorporated
|
|
70
|
-
material is not limited to numerical parameters, data structure
|
|
71
|
-
layouts and accessors, or small macros, inline functions and templates
|
|
72
|
-
(ten or fewer lines in length), you do both of the following:
|
|
73
|
-
|
|
74
|
-
* **a)** Give prominent notice with each copy of the object code that the
|
|
75
|
-
Library is used in it and that the Library and its use are
|
|
76
|
-
covered by this License.
|
|
77
|
-
* **b)** Accompany the object code with a copy of the GNU GPL and this license
|
|
78
|
-
document.
|
|
79
|
-
|
|
80
|
-
### 4. Combined Works
|
|
81
|
-
|
|
82
|
-
You may convey a Combined Work under terms of your choice that,
|
|
83
|
-
taken together, effectively do not restrict modification of the
|
|
84
|
-
portions of the Library contained in the Combined Work and reverse
|
|
85
|
-
engineering for debugging such modifications, if you also do each of
|
|
86
|
-
the following:
|
|
87
|
-
|
|
88
|
-
* **a)** Give prominent notice with each copy of the Combined Work that
|
|
89
|
-
the Library is used in it and that the Library and its use are
|
|
90
|
-
covered by this License.
|
|
91
|
-
|
|
92
|
-
* **b)** Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
93
|
-
document.
|
|
94
|
-
|
|
95
|
-
* **c)** For a Combined Work that displays copyright notices during
|
|
96
|
-
execution, include the copyright notice for the Library among
|
|
97
|
-
these notices, as well as a reference directing the user to the
|
|
98
|
-
copies of the GNU GPL and this license document.
|
|
99
|
-
|
|
100
|
-
* **d)** Do one of the following:
|
|
101
|
-
- **0)** Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
-
License, and the Corresponding Application Code in a form
|
|
103
|
-
suitable for, and under terms that permit, the user to
|
|
104
|
-
recombine or relink the Application with a modified version of
|
|
105
|
-
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
-
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
-
Corresponding Source.
|
|
108
|
-
- **1)** Use a suitable shared library mechanism for linking with the
|
|
109
|
-
Library. A suitable mechanism is one that **(a)** uses at run time
|
|
110
|
-
a copy of the Library already present on the user's computer
|
|
111
|
-
system, and **(b)** will operate properly with a modified version
|
|
112
|
-
of the Library that is interface-compatible with the Linked
|
|
113
|
-
Version.
|
|
114
|
-
|
|
115
|
-
* **e)** Provide Installation Information, but only if you would otherwise
|
|
116
|
-
be required to provide such information under section 6 of the
|
|
117
|
-
GNU GPL, and only to the extent that such information is
|
|
118
|
-
necessary to install and execute a modified version of the
|
|
119
|
-
Combined Work produced by recombining or relinking the
|
|
120
|
-
Application with a modified version of the Linked Version. (If
|
|
121
|
-
you use option **4d0**, the Installation Information must accompany
|
|
122
|
-
the Minimal Corresponding Source and Corresponding Application
|
|
123
|
-
Code. If you use option **4d1**, you must provide the Installation
|
|
124
|
-
Information in the manner specified by section 6 of the GNU GPL
|
|
125
|
-
for conveying Corresponding Source.)
|
|
126
|
-
|
|
127
|
-
### 5. Combined Libraries
|
|
128
|
-
|
|
129
|
-
You may place library facilities that are a work based on the
|
|
130
|
-
Library side by side in a single library together with other library
|
|
131
|
-
facilities that are not Applications and are not covered by this
|
|
132
|
-
License, and convey such a combined library under terms of your
|
|
133
|
-
choice, if you do both of the following:
|
|
134
|
-
|
|
135
|
-
* **a)** Accompany the combined library with a copy of the same work based
|
|
136
|
-
on the Library, uncombined with any other library facilities,
|
|
137
|
-
conveyed under the terms of this License.
|
|
138
|
-
* **b)** Give prominent notice with the combined library that part of it
|
|
139
|
-
is a work based on the Library, and explaining where to find the
|
|
140
|
-
accompanying uncombined form of the same work.
|
|
141
|
-
|
|
142
|
-
### 6. Revised Versions of the GNU Lesser General Public License
|
|
143
|
-
|
|
144
|
-
The Free Software Foundation may publish revised and/or new versions
|
|
145
|
-
of the GNU Lesser General Public License from time to time. Such new
|
|
146
|
-
versions will be similar in spirit to the present version, but may
|
|
147
|
-
differ in detail to address new problems or concerns.
|
|
148
|
-
|
|
149
|
-
Each version is given a distinguishing version number. If the
|
|
150
|
-
Library as you received it specifies that a certain numbered version
|
|
151
|
-
of the GNU Lesser General Public License “or any later version”
|
|
152
|
-
applies to it, you have the option of following the terms and
|
|
153
|
-
conditions either of that published version or of any later version
|
|
154
|
-
published by the Free Software Foundation. If the Library as you
|
|
155
|
-
received it does not specify a version number of the GNU Lesser
|
|
156
|
-
General Public License, you may choose any version of the GNU Lesser
|
|
157
|
-
General Public License ever published by the Free Software Foundation.
|
|
158
|
-
|
|
159
|
-
If the Library as you received it specifies that a proxy can decide
|
|
160
|
-
whether future versions of the GNU Lesser General Public License shall
|
|
161
|
-
apply, that proxy's public statement of acceptance of any version is
|
|
162
|
-
permanent authorization for you to choose that version for the
|
|
1
|
+
GNU Lesser General Public License
|
|
2
|
+
=================================
|
|
3
|
+
|
|
4
|
+
_Version 3, 29 June 2007_
|
|
5
|
+
_Copyright © 2007 Free Software Foundation, Inc. <<http://fsf.org/>>_
|
|
6
|
+
|
|
7
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
8
|
+
of this license document, but changing it is not allowed.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
This version of the GNU Lesser General Public License incorporates
|
|
12
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
13
|
+
License, supplemented by the additional permissions listed below.
|
|
14
|
+
|
|
15
|
+
### 0. Additional Definitions
|
|
16
|
+
|
|
17
|
+
As used herein, “this License” refers to version 3 of the GNU Lesser
|
|
18
|
+
General Public License, and the “GNU GPL” refers to version 3 of the GNU
|
|
19
|
+
General Public License.
|
|
20
|
+
|
|
21
|
+
“The Library” refers to a covered work governed by this License,
|
|
22
|
+
other than an Application or a Combined Work as defined below.
|
|
23
|
+
|
|
24
|
+
An “Application” is any work that makes use of an interface provided
|
|
25
|
+
by the Library, but which is not otherwise based on the Library.
|
|
26
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
27
|
+
of using an interface provided by the Library.
|
|
28
|
+
|
|
29
|
+
A “Combined Work” is a work produced by combining or linking an
|
|
30
|
+
Application with the Library. The particular version of the Library
|
|
31
|
+
with which the Combined Work was made is also called the “Linked
|
|
32
|
+
Version”.
|
|
33
|
+
|
|
34
|
+
The “Minimal Corresponding Source” for a Combined Work means the
|
|
35
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
36
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
37
|
+
based on the Application, and not on the Linked Version.
|
|
38
|
+
|
|
39
|
+
The “Corresponding Application Code” for a Combined Work means the
|
|
40
|
+
object code and/or source code for the Application, including any data
|
|
41
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
42
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
43
|
+
|
|
44
|
+
### 1. Exception to Section 3 of the GNU GPL
|
|
45
|
+
|
|
46
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
47
|
+
without being bound by section 3 of the GNU GPL.
|
|
48
|
+
|
|
49
|
+
### 2. Conveying Modified Versions
|
|
50
|
+
|
|
51
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
52
|
+
facility refers to a function or data to be supplied by an Application
|
|
53
|
+
that uses the facility (other than as an argument passed when the
|
|
54
|
+
facility is invoked), then you may convey a copy of the modified
|
|
55
|
+
version:
|
|
56
|
+
|
|
57
|
+
* **a)** under this License, provided that you make a good faith effort to
|
|
58
|
+
ensure that, in the event an Application does not supply the
|
|
59
|
+
function or data, the facility still operates, and performs
|
|
60
|
+
whatever part of its purpose remains meaningful, or
|
|
61
|
+
|
|
62
|
+
* **b)** under the GNU GPL, with none of the additional permissions of
|
|
63
|
+
this License applicable to that copy.
|
|
64
|
+
|
|
65
|
+
### 3. Object Code Incorporating Material from Library Header Files
|
|
66
|
+
|
|
67
|
+
The object code form of an Application may incorporate material from
|
|
68
|
+
a header file that is part of the Library. You may convey such object
|
|
69
|
+
code under terms of your choice, provided that, if the incorporated
|
|
70
|
+
material is not limited to numerical parameters, data structure
|
|
71
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
72
|
+
(ten or fewer lines in length), you do both of the following:
|
|
73
|
+
|
|
74
|
+
* **a)** Give prominent notice with each copy of the object code that the
|
|
75
|
+
Library is used in it and that the Library and its use are
|
|
76
|
+
covered by this License.
|
|
77
|
+
* **b)** Accompany the object code with a copy of the GNU GPL and this license
|
|
78
|
+
document.
|
|
79
|
+
|
|
80
|
+
### 4. Combined Works
|
|
81
|
+
|
|
82
|
+
You may convey a Combined Work under terms of your choice that,
|
|
83
|
+
taken together, effectively do not restrict modification of the
|
|
84
|
+
portions of the Library contained in the Combined Work and reverse
|
|
85
|
+
engineering for debugging such modifications, if you also do each of
|
|
86
|
+
the following:
|
|
87
|
+
|
|
88
|
+
* **a)** Give prominent notice with each copy of the Combined Work that
|
|
89
|
+
the Library is used in it and that the Library and its use are
|
|
90
|
+
covered by this License.
|
|
91
|
+
|
|
92
|
+
* **b)** Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
93
|
+
document.
|
|
94
|
+
|
|
95
|
+
* **c)** For a Combined Work that displays copyright notices during
|
|
96
|
+
execution, include the copyright notice for the Library among
|
|
97
|
+
these notices, as well as a reference directing the user to the
|
|
98
|
+
copies of the GNU GPL and this license document.
|
|
99
|
+
|
|
100
|
+
* **d)** Do one of the following:
|
|
101
|
+
- **0)** Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
- **1)** Use a suitable shared library mechanism for linking with the
|
|
109
|
+
Library. A suitable mechanism is one that **(a)** uses at run time
|
|
110
|
+
a copy of the Library already present on the user's computer
|
|
111
|
+
system, and **(b)** will operate properly with a modified version
|
|
112
|
+
of the Library that is interface-compatible with the Linked
|
|
113
|
+
Version.
|
|
114
|
+
|
|
115
|
+
* **e)** Provide Installation Information, but only if you would otherwise
|
|
116
|
+
be required to provide such information under section 6 of the
|
|
117
|
+
GNU GPL, and only to the extent that such information is
|
|
118
|
+
necessary to install and execute a modified version of the
|
|
119
|
+
Combined Work produced by recombining or relinking the
|
|
120
|
+
Application with a modified version of the Linked Version. (If
|
|
121
|
+
you use option **4d0**, the Installation Information must accompany
|
|
122
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
123
|
+
Code. If you use option **4d1**, you must provide the Installation
|
|
124
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
125
|
+
for conveying Corresponding Source.)
|
|
126
|
+
|
|
127
|
+
### 5. Combined Libraries
|
|
128
|
+
|
|
129
|
+
You may place library facilities that are a work based on the
|
|
130
|
+
Library side by side in a single library together with other library
|
|
131
|
+
facilities that are not Applications and are not covered by this
|
|
132
|
+
License, and convey such a combined library under terms of your
|
|
133
|
+
choice, if you do both of the following:
|
|
134
|
+
|
|
135
|
+
* **a)** Accompany the combined library with a copy of the same work based
|
|
136
|
+
on the Library, uncombined with any other library facilities,
|
|
137
|
+
conveyed under the terms of this License.
|
|
138
|
+
* **b)** Give prominent notice with the combined library that part of it
|
|
139
|
+
is a work based on the Library, and explaining where to find the
|
|
140
|
+
accompanying uncombined form of the same work.
|
|
141
|
+
|
|
142
|
+
### 6. Revised Versions of the GNU Lesser General Public License
|
|
143
|
+
|
|
144
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
145
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
146
|
+
versions will be similar in spirit to the present version, but may
|
|
147
|
+
differ in detail to address new problems or concerns.
|
|
148
|
+
|
|
149
|
+
Each version is given a distinguishing version number. If the
|
|
150
|
+
Library as you received it specifies that a certain numbered version
|
|
151
|
+
of the GNU Lesser General Public License “or any later version”
|
|
152
|
+
applies to it, you have the option of following the terms and
|
|
153
|
+
conditions either of that published version or of any later version
|
|
154
|
+
published by the Free Software Foundation. If the Library as you
|
|
155
|
+
received it does not specify a version number of the GNU Lesser
|
|
156
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
157
|
+
General Public License ever published by the Free Software Foundation.
|
|
158
|
+
|
|
159
|
+
If the Library as you received it specifies that a proxy can decide
|
|
160
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
161
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
162
|
+
permanent authorization for you to choose that version for the
|
|
163
163
|
Library.
|
package/README.md
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# @easyquery/core (part of EasyQuery.JS)
|
|
2
|
-
|
|
3
|
-
EasyQuery library provides you with the means to add an ad-hoc reporting or advanced search functionality to your web application.
|
|
4
|
-
|
|
5
|
-
It gives you a simple to use but a quite powerful user interface to build queries or filters to your data. Your end-users will get the power of SQL with the simplicity of a natural language.
|
|
6
|
-
|
|
7
|
-
Take a look at [EasyQuery web-page](https://korzh.com/easyquery) for more information.
|
|
8
|
-
|
|
9
|
-
This `core` package defines the basic functions and structures of EasyQuery library such as `DataModel`, `Query`, `Condition`, `Column` and other classes and interfaces.
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
A general overview of EasyQuery.JS, getting started instructions and tutorials can be found on [EasyQuery.JS documentation](https://korzh.com/easyquery/javascript/docs) web-site.
|
|
14
|
-
|
|
15
|
-
If you plan to use it with ASP.NET (Core) backend - we suggest you proceed with a "bundle": [EasyQuery for ASP.NET (Core)](https://korzh.com/easyquery) which includes both EasyQuery.JS library and the server-side packages for .NET (Core).
|
|
16
|
-
|
|
17
|
-
For other platforms, you will also need a special EasyQuery Server which can be installed on any Linux, Windows or Mac server. For more information please read [How EasyQuery works](https://korzh.com/easyquery/javascript#HDIW) section on EasyQuery.JS web page.
|
|
18
|
-
|
|
19
|
-
## Live examples
|
|
20
|
-
|
|
21
|
-
You can test EasyQuery in several different scenarios on our [live demos page](https://korzh.com/demo/easyquery-asp-net-core-razor).
|
|
22
|
-
|
|
23
|
-
The source code for these sample web-applications is available on [GitHub](https://github.com/easyquery/DotNetSamples).
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
* [Getting started and tutorials](https://korzh.com/easyquery/javascript/docs)
|
|
28
|
-
* [API Reference](https://korzh.com/easyquery/javascript/docs/api-reference-7x)
|
|
29
|
-
|
|
30
|
-
## License
|
|
31
|
-
|
|
32
|
-
The package is distributed under LGPL-3.0 license.
|
|
33
|
-
|
|
34
|
-
The server-side part (which is required to build a working solution) is licensed separately.
|
|
35
|
-
For more information please see [EasyQuery.NET Licensing](https://korzh.com/easyquery/licensing) page.
|
|
1
|
+
# @easyquery/core (part of EasyQuery.JS)
|
|
2
|
+
|
|
3
|
+
EasyQuery library provides you with the means to add an ad-hoc reporting or advanced search functionality to your web application.
|
|
4
|
+
|
|
5
|
+
It gives you a simple to use but a quite powerful user interface to build queries or filters to your data. Your end-users will get the power of SQL with the simplicity of a natural language.
|
|
6
|
+
|
|
7
|
+
Take a look at [EasyQuery web-page](https://korzh.com/easyquery) for more information.
|
|
8
|
+
|
|
9
|
+
This `core` package defines the basic functions and structures of EasyQuery library such as `DataModel`, `Query`, `Condition`, `Column` and other classes and interfaces.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
A general overview of EasyQuery.JS, getting started instructions and tutorials can be found on [EasyQuery.JS documentation](https://korzh.com/easyquery/javascript/docs) web-site.
|
|
14
|
+
|
|
15
|
+
If you plan to use it with ASP.NET (Core) backend - we suggest you proceed with a "bundle": [EasyQuery for ASP.NET (Core)](https://korzh.com/easyquery) which includes both EasyQuery.JS library and the server-side packages for .NET (Core).
|
|
16
|
+
|
|
17
|
+
For other platforms, you will also need a special EasyQuery Server which can be installed on any Linux, Windows or Mac server. For more information please read [How EasyQuery works](https://korzh.com/easyquery/javascript#HDIW) section on EasyQuery.JS web page.
|
|
18
|
+
|
|
19
|
+
## Live examples
|
|
20
|
+
|
|
21
|
+
You can test EasyQuery in several different scenarios on our [live demos page](https://korzh.com/demo/easyquery-asp-net-core-razor).
|
|
22
|
+
|
|
23
|
+
The source code for these sample web-applications is available on [GitHub](https://github.com/easyquery/DotNetSamples).
|
|
24
|
+
|
|
25
|
+
## Documentation
|
|
26
|
+
|
|
27
|
+
* [Getting started and tutorials](https://korzh.com/easyquery/javascript/docs)
|
|
28
|
+
* [API Reference](https://korzh.com/easyquery/javascript/docs/api-reference-7x)
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
The package is distributed under LGPL-3.0 license.
|
|
33
|
+
|
|
34
|
+
The server-side part (which is required to build a working solution) is licensed separately.
|
|
35
|
+
For more information please see [EasyQuery.NET Licensing](https://korzh.com/easyquery/licensing) page.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* EasyQuery.JS Core v7.
|
|
3
|
+
* EasyQuery.JS Core v7.5.0-rc01
|
|
4
4
|
* Copyright 2026 Korzh.com
|
|
5
5
|
* Licensed under MIT
|
|
6
6
|
*
|
|
7
|
-
* Build time:
|
|
7
|
+
* Build time: 02.08.2026 23:51:39
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -2944,6 +2944,34 @@ class Query {
|
|
|
2944
2944
|
getColumnById(id) {
|
|
2945
2945
|
return core.utils.findItemById(this.columns, id);
|
|
2946
2946
|
}
|
|
2947
|
+
/**
|
|
2948
|
+
* Fills an empty column list with the model root entity's own
|
|
2949
|
+
* result-ready attributes (sub-entity attributes are not included).
|
|
2950
|
+
*
|
|
2951
|
+
* This turns the data-filtering scenario ("show the whole entity, filter it")
|
|
2952
|
+
* into an ordinary query with explicit columns, so query-driven features -
|
|
2953
|
+
* server-side sorting, column-width persistence, ORDER BY sync - work through
|
|
2954
|
+
* their normal path instead of relying on server-side auto-columns.
|
|
2955
|
+
*
|
|
2956
|
+
* Columns are added silently (no query change events) - the caller controls
|
|
2957
|
+
* when to fetch. Does nothing when the query already has columns (e.g. one
|
|
2958
|
+
* loaded from storage) or when the model is not loaded yet.
|
|
2959
|
+
*
|
|
2960
|
+
* @returns the added columns (empty when nothing was added).
|
|
2961
|
+
*/
|
|
2962
|
+
fillColumnsWithRootAttributes() {
|
|
2963
|
+
if (this.columns.length > 0)
|
|
2964
|
+
return [];
|
|
2965
|
+
if (!this.model || this.model.isEmpty())
|
|
2966
|
+
return [];
|
|
2967
|
+
const added = [];
|
|
2968
|
+
for (const attr of this.model.getRootEntity().attributes) {
|
|
2969
|
+
if (!attr.useInResult)
|
|
2970
|
+
continue;
|
|
2971
|
+
added.push(this.addColumn({ attribute: attr, caption: attr.caption }, true));
|
|
2972
|
+
}
|
|
2973
|
+
return added;
|
|
2974
|
+
}
|
|
2947
2975
|
/**
|
|
2948
2976
|
* Adds a new column with specified parameters
|
|
2949
2977
|
* @param descriptor The descriptor of the new column. Can contain different parameters like:
|
|
@@ -3737,6 +3765,63 @@ class BrowserQueryStorage {
|
|
|
3737
3765
|
}
|
|
3738
3766
|
}
|
|
3739
3767
|
|
|
3768
|
+
/** Default ColumnWidthStore backed by the browser's localStorage. */
|
|
3769
|
+
class BrowserColumnWidthStore {
|
|
3770
|
+
constructor(context) {
|
|
3771
|
+
this.context = context;
|
|
3772
|
+
this.keyPrefix = 'eq-colwidths';
|
|
3773
|
+
}
|
|
3774
|
+
init(options) {
|
|
3775
|
+
if (options && options.keyPrefix) {
|
|
3776
|
+
this.keyPrefix = options.keyPrefix;
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
storageKey(scopeKey) {
|
|
3780
|
+
return `${this.keyPrefix}-${scopeKey}`;
|
|
3781
|
+
}
|
|
3782
|
+
load(scopeKey) {
|
|
3783
|
+
return new Promise((resolve) => {
|
|
3784
|
+
try {
|
|
3785
|
+
const raw = localStorage.getItem(this.storageKey(scopeKey));
|
|
3786
|
+
resolve(raw ? JSON.parse(raw) : {});
|
|
3787
|
+
}
|
|
3788
|
+
catch (_a) {
|
|
3789
|
+
resolve({}); // best-effort: never break the grid
|
|
3790
|
+
}
|
|
3791
|
+
});
|
|
3792
|
+
}
|
|
3793
|
+
save(scopeKey, columnId, width) {
|
|
3794
|
+
return new Promise((resolve) => {
|
|
3795
|
+
try {
|
|
3796
|
+
const key = this.storageKey(scopeKey);
|
|
3797
|
+
let map = {};
|
|
3798
|
+
const raw = localStorage.getItem(key);
|
|
3799
|
+
if (raw) {
|
|
3800
|
+
try {
|
|
3801
|
+
map = JSON.parse(raw);
|
|
3802
|
+
}
|
|
3803
|
+
catch (_a) {
|
|
3804
|
+
map = {};
|
|
3805
|
+
} // corrupt existing entry -> overwrite it
|
|
3806
|
+
}
|
|
3807
|
+
map[columnId] = width;
|
|
3808
|
+
localStorage.setItem(key, JSON.stringify(map));
|
|
3809
|
+
}
|
|
3810
|
+
catch ( /* ignore: persistence is best-effort (e.g. quota) */_b) { /* ignore: persistence is best-effort (e.g. quota) */ }
|
|
3811
|
+
resolve();
|
|
3812
|
+
});
|
|
3813
|
+
}
|
|
3814
|
+
clear(scopeKey) {
|
|
3815
|
+
return new Promise((resolve) => {
|
|
3816
|
+
try {
|
|
3817
|
+
localStorage.removeItem(this.storageKey(scopeKey));
|
|
3818
|
+
}
|
|
3819
|
+
catch ( /* ignore */_a) { /* ignore */ }
|
|
3820
|
+
resolve();
|
|
3821
|
+
});
|
|
3822
|
+
}
|
|
3823
|
+
}
|
|
3824
|
+
|
|
3740
3825
|
class EqModelLoader {
|
|
3741
3826
|
constructor(context) {
|
|
3742
3827
|
this.context = context;
|
|
@@ -4047,6 +4132,7 @@ class EqServiceProvider {
|
|
|
4047
4132
|
this.queryResolver = (context) => new Query(context.getModel(), null, { context: context });
|
|
4048
4133
|
this.modelLoaderResolver = (context) => new EqServerModelLoader(context);
|
|
4049
4134
|
this.queryStorageResolver = (context) => new BrowserQueryStorage(context);
|
|
4135
|
+
this.columnWidthStoreResolver = (context) => new BrowserColumnWidthStore(context);
|
|
4050
4136
|
this.querySynchronizerResolver = (context) => new EqServerQuerySynchronizer(context);
|
|
4051
4137
|
this.vllResolver = (context) => new EqServerValueListResolver(context);
|
|
4052
4138
|
this.dataFetcherResolver = (context) => new EqServerDataFetcher(context);
|
|
@@ -4109,6 +4195,15 @@ class EqServiceProvider {
|
|
|
4109
4195
|
}
|
|
4110
4196
|
return this.queryStorageResolver;
|
|
4111
4197
|
}
|
|
4198
|
+
registerColumnWidthStoreResolver(resolver) {
|
|
4199
|
+
this.columnWidthStoreResolver = resolver;
|
|
4200
|
+
}
|
|
4201
|
+
getColumnWidthStoreResolver() {
|
|
4202
|
+
if (!this.columnWidthStoreResolver) {
|
|
4203
|
+
throw 'ColumnWidthStoreResolver is not defined';
|
|
4204
|
+
}
|
|
4205
|
+
return this.columnWidthStoreResolver;
|
|
4206
|
+
}
|
|
4112
4207
|
registerDataFetcherResolver(resolver) {
|
|
4113
4208
|
this.dataFetcherResolver = resolver;
|
|
4114
4209
|
}
|
|
@@ -4319,6 +4414,7 @@ class EqContext {
|
|
|
4319
4414
|
this.servicesInitialized = false;
|
|
4320
4415
|
this.modelLoader = null;
|
|
4321
4416
|
this.queryStorage = null;
|
|
4417
|
+
this.columnWidthStore = null;
|
|
4322
4418
|
this.querySynchronizer = null;
|
|
4323
4419
|
this.dataFetcher = null;
|
|
4324
4420
|
this.valueListLoader = null;
|
|
@@ -4465,6 +4561,14 @@ class EqContext {
|
|
|
4465
4561
|
}
|
|
4466
4562
|
return this.queryStorage;
|
|
4467
4563
|
}
|
|
4564
|
+
getColumnWidthStore() {
|
|
4565
|
+
if (!this.columnWidthStore) {
|
|
4566
|
+
const columnWidthStoreResolver = this.eqServices.getColumnWidthStoreResolver();
|
|
4567
|
+
this.columnWidthStore = columnWidthStoreResolver(this);
|
|
4568
|
+
this.columnWidthStore.init(this.options.columnWidthStoreOptions);
|
|
4569
|
+
}
|
|
4570
|
+
return this.columnWidthStore;
|
|
4571
|
+
}
|
|
4468
4572
|
getQuerySynchronizer() {
|
|
4469
4573
|
if (!this.querySynchronizer) {
|
|
4470
4574
|
const querySynchronizerResolver = this.eqServices.getQuerySynchronizerResolver();
|
|
@@ -4632,6 +4736,9 @@ class EqContext {
|
|
|
4632
4736
|
const eqServices = this.getServices();
|
|
4633
4737
|
eqServices.registerModelStorageResolver(options.modelStorageResolver);
|
|
4634
4738
|
}
|
|
4739
|
+
if (options.columnWidthStoreResolver) {
|
|
4740
|
+
this.getServices().registerColumnWidthStoreResolver(options.columnWidthStoreResolver);
|
|
4741
|
+
}
|
|
4635
4742
|
this.loadQueryOnStart = false;
|
|
4636
4743
|
if (options.loadQueryOnStart) {
|
|
4637
4744
|
this.loadQueryOnStart = options.loadQueryOnStart;
|
|
@@ -6334,6 +6441,7 @@ Object.defineProperty(exports, "i18n", {
|
|
|
6334
6441
|
get: function () { return core.i18n; }
|
|
6335
6442
|
});
|
|
6336
6443
|
exports.AggrFunction = AggrFunction;
|
|
6444
|
+
exports.BrowserColumnWidthStore = BrowserColumnWidthStore;
|
|
6337
6445
|
exports.BrowserQueryStorage = BrowserQueryStorage;
|
|
6338
6446
|
exports.Condition = Condition;
|
|
6339
6447
|
exports.DataModel = DataModel;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* EasyQuery.JS Core v7.
|
|
3
|
+
* EasyQuery.JS Core v7.5.0-rc01
|
|
4
4
|
* Copyright 2026 Korzh.com
|
|
5
5
|
* Licensed under MIT
|
|
6
6
|
*
|
|
7
|
-
* Build time:
|
|
7
|
+
* Build time: 02.08.2026 23:51:39
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { i18n, DataType, utils, ValueEditor, MetaEntity, MetaEntityAttr, EditorTag, MetaData, EventEmitter, AggregationSettings, HttpClient, EasyDataTable } from '@easydata/core';
|
|
@@ -2943,6 +2943,34 @@ class Query {
|
|
|
2943
2943
|
getColumnById(id) {
|
|
2944
2944
|
return utils.findItemById(this.columns, id);
|
|
2945
2945
|
}
|
|
2946
|
+
/**
|
|
2947
|
+
* Fills an empty column list with the model root entity's own
|
|
2948
|
+
* result-ready attributes (sub-entity attributes are not included).
|
|
2949
|
+
*
|
|
2950
|
+
* This turns the data-filtering scenario ("show the whole entity, filter it")
|
|
2951
|
+
* into an ordinary query with explicit columns, so query-driven features -
|
|
2952
|
+
* server-side sorting, column-width persistence, ORDER BY sync - work through
|
|
2953
|
+
* their normal path instead of relying on server-side auto-columns.
|
|
2954
|
+
*
|
|
2955
|
+
* Columns are added silently (no query change events) - the caller controls
|
|
2956
|
+
* when to fetch. Does nothing when the query already has columns (e.g. one
|
|
2957
|
+
* loaded from storage) or when the model is not loaded yet.
|
|
2958
|
+
*
|
|
2959
|
+
* @returns the added columns (empty when nothing was added).
|
|
2960
|
+
*/
|
|
2961
|
+
fillColumnsWithRootAttributes() {
|
|
2962
|
+
if (this.columns.length > 0)
|
|
2963
|
+
return [];
|
|
2964
|
+
if (!this.model || this.model.isEmpty())
|
|
2965
|
+
return [];
|
|
2966
|
+
const added = [];
|
|
2967
|
+
for (const attr of this.model.getRootEntity().attributes) {
|
|
2968
|
+
if (!attr.useInResult)
|
|
2969
|
+
continue;
|
|
2970
|
+
added.push(this.addColumn({ attribute: attr, caption: attr.caption }, true));
|
|
2971
|
+
}
|
|
2972
|
+
return added;
|
|
2973
|
+
}
|
|
2946
2974
|
/**
|
|
2947
2975
|
* Adds a new column with specified parameters
|
|
2948
2976
|
* @param descriptor The descriptor of the new column. Can contain different parameters like:
|
|
@@ -3736,6 +3764,63 @@ class BrowserQueryStorage {
|
|
|
3736
3764
|
}
|
|
3737
3765
|
}
|
|
3738
3766
|
|
|
3767
|
+
/** Default ColumnWidthStore backed by the browser's localStorage. */
|
|
3768
|
+
class BrowserColumnWidthStore {
|
|
3769
|
+
constructor(context) {
|
|
3770
|
+
this.context = context;
|
|
3771
|
+
this.keyPrefix = 'eq-colwidths';
|
|
3772
|
+
}
|
|
3773
|
+
init(options) {
|
|
3774
|
+
if (options && options.keyPrefix) {
|
|
3775
|
+
this.keyPrefix = options.keyPrefix;
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
storageKey(scopeKey) {
|
|
3779
|
+
return `${this.keyPrefix}-${scopeKey}`;
|
|
3780
|
+
}
|
|
3781
|
+
load(scopeKey) {
|
|
3782
|
+
return new Promise((resolve) => {
|
|
3783
|
+
try {
|
|
3784
|
+
const raw = localStorage.getItem(this.storageKey(scopeKey));
|
|
3785
|
+
resolve(raw ? JSON.parse(raw) : {});
|
|
3786
|
+
}
|
|
3787
|
+
catch (_a) {
|
|
3788
|
+
resolve({}); // best-effort: never break the grid
|
|
3789
|
+
}
|
|
3790
|
+
});
|
|
3791
|
+
}
|
|
3792
|
+
save(scopeKey, columnId, width) {
|
|
3793
|
+
return new Promise((resolve) => {
|
|
3794
|
+
try {
|
|
3795
|
+
const key = this.storageKey(scopeKey);
|
|
3796
|
+
let map = {};
|
|
3797
|
+
const raw = localStorage.getItem(key);
|
|
3798
|
+
if (raw) {
|
|
3799
|
+
try {
|
|
3800
|
+
map = JSON.parse(raw);
|
|
3801
|
+
}
|
|
3802
|
+
catch (_a) {
|
|
3803
|
+
map = {};
|
|
3804
|
+
} // corrupt existing entry -> overwrite it
|
|
3805
|
+
}
|
|
3806
|
+
map[columnId] = width;
|
|
3807
|
+
localStorage.setItem(key, JSON.stringify(map));
|
|
3808
|
+
}
|
|
3809
|
+
catch ( /* ignore: persistence is best-effort (e.g. quota) */_b) { /* ignore: persistence is best-effort (e.g. quota) */ }
|
|
3810
|
+
resolve();
|
|
3811
|
+
});
|
|
3812
|
+
}
|
|
3813
|
+
clear(scopeKey) {
|
|
3814
|
+
return new Promise((resolve) => {
|
|
3815
|
+
try {
|
|
3816
|
+
localStorage.removeItem(this.storageKey(scopeKey));
|
|
3817
|
+
}
|
|
3818
|
+
catch ( /* ignore */_a) { /* ignore */ }
|
|
3819
|
+
resolve();
|
|
3820
|
+
});
|
|
3821
|
+
}
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3739
3824
|
class EqModelLoader {
|
|
3740
3825
|
constructor(context) {
|
|
3741
3826
|
this.context = context;
|
|
@@ -4046,6 +4131,7 @@ class EqServiceProvider {
|
|
|
4046
4131
|
this.queryResolver = (context) => new Query(context.getModel(), null, { context: context });
|
|
4047
4132
|
this.modelLoaderResolver = (context) => new EqServerModelLoader(context);
|
|
4048
4133
|
this.queryStorageResolver = (context) => new BrowserQueryStorage(context);
|
|
4134
|
+
this.columnWidthStoreResolver = (context) => new BrowserColumnWidthStore(context);
|
|
4049
4135
|
this.querySynchronizerResolver = (context) => new EqServerQuerySynchronizer(context);
|
|
4050
4136
|
this.vllResolver = (context) => new EqServerValueListResolver(context);
|
|
4051
4137
|
this.dataFetcherResolver = (context) => new EqServerDataFetcher(context);
|
|
@@ -4108,6 +4194,15 @@ class EqServiceProvider {
|
|
|
4108
4194
|
}
|
|
4109
4195
|
return this.queryStorageResolver;
|
|
4110
4196
|
}
|
|
4197
|
+
registerColumnWidthStoreResolver(resolver) {
|
|
4198
|
+
this.columnWidthStoreResolver = resolver;
|
|
4199
|
+
}
|
|
4200
|
+
getColumnWidthStoreResolver() {
|
|
4201
|
+
if (!this.columnWidthStoreResolver) {
|
|
4202
|
+
throw 'ColumnWidthStoreResolver is not defined';
|
|
4203
|
+
}
|
|
4204
|
+
return this.columnWidthStoreResolver;
|
|
4205
|
+
}
|
|
4111
4206
|
registerDataFetcherResolver(resolver) {
|
|
4112
4207
|
this.dataFetcherResolver = resolver;
|
|
4113
4208
|
}
|
|
@@ -4318,6 +4413,7 @@ class EqContext {
|
|
|
4318
4413
|
this.servicesInitialized = false;
|
|
4319
4414
|
this.modelLoader = null;
|
|
4320
4415
|
this.queryStorage = null;
|
|
4416
|
+
this.columnWidthStore = null;
|
|
4321
4417
|
this.querySynchronizer = null;
|
|
4322
4418
|
this.dataFetcher = null;
|
|
4323
4419
|
this.valueListLoader = null;
|
|
@@ -4464,6 +4560,14 @@ class EqContext {
|
|
|
4464
4560
|
}
|
|
4465
4561
|
return this.queryStorage;
|
|
4466
4562
|
}
|
|
4563
|
+
getColumnWidthStore() {
|
|
4564
|
+
if (!this.columnWidthStore) {
|
|
4565
|
+
const columnWidthStoreResolver = this.eqServices.getColumnWidthStoreResolver();
|
|
4566
|
+
this.columnWidthStore = columnWidthStoreResolver(this);
|
|
4567
|
+
this.columnWidthStore.init(this.options.columnWidthStoreOptions);
|
|
4568
|
+
}
|
|
4569
|
+
return this.columnWidthStore;
|
|
4570
|
+
}
|
|
4467
4571
|
getQuerySynchronizer() {
|
|
4468
4572
|
if (!this.querySynchronizer) {
|
|
4469
4573
|
const querySynchronizerResolver = this.eqServices.getQuerySynchronizerResolver();
|
|
@@ -4631,6 +4735,9 @@ class EqContext {
|
|
|
4631
4735
|
const eqServices = this.getServices();
|
|
4632
4736
|
eqServices.registerModelStorageResolver(options.modelStorageResolver);
|
|
4633
4737
|
}
|
|
4738
|
+
if (options.columnWidthStoreResolver) {
|
|
4739
|
+
this.getServices().registerColumnWidthStoreResolver(options.columnWidthStoreResolver);
|
|
4740
|
+
}
|
|
4634
4741
|
this.loadQueryOnStart = false;
|
|
4635
4742
|
if (options.loadQueryOnStart) {
|
|
4636
4743
|
this.loadQueryOnStart = options.loadQueryOnStart;
|
|
@@ -6328,4 +6435,4 @@ function addEasyQueryCoreTexts() {
|
|
|
6328
6435
|
}
|
|
6329
6436
|
addEasyQueryCoreTexts();
|
|
6330
6437
|
|
|
6331
|
-
export { AggrFunction, BrowserQueryStorage, CondTag, Condition, ConditionPart, DataKind, DataModel, DefaultAggregatesCalculator, EasyQueryDataLoader, EmptyChunk, Entity, EntityAttr, EqAction, EqActionResult, EqAggregatesContainer, EqContext, EqEditorTag, EqModelLoader, EqQueryFileLoader, EqServerDataFetcher, EqServerExporter, EqServerModelLoader, EqServerQuerySynchronizer, EqServerValueListResolver, EqServiceProvider, EqValueEditor, ExprTag, Expression, FormatParser, GoogleDataConverter, InMemoryModelStorage, InvalidQueryError, LinkType, Operand, Operator, Query, QueryChangeAction, QueryChangePart, QueryColumn, SortDirection, Tree, Widget, WidgetGroup, createEqContext, eqconsts, equtils, registerEqContextResolver };
|
|
6438
|
+
export { AggrFunction, BrowserColumnWidthStore, BrowserQueryStorage, CondTag, Condition, ConditionPart, DataKind, DataModel, DefaultAggregatesCalculator, EasyQueryDataLoader, EmptyChunk, Entity, EntityAttr, EqAction, EqActionResult, EqAggregatesContainer, EqContext, EqEditorTag, EqModelLoader, EqQueryFileLoader, EqServerDataFetcher, EqServerExporter, EqServerModelLoader, EqServerQuerySynchronizer, EqServerValueListResolver, EqServiceProvider, EqValueEditor, ExprTag, Expression, FormatParser, GoogleDataConverter, InMemoryModelStorage, InvalidQueryError, LinkType, Operand, Operator, Query, QueryChangeAction, QueryChangePart, QueryColumn, SortDirection, Tree, Widget, WidgetGroup, createEqContext, eqconsts, equtils, registerEqContextResolver };
|
|
@@ -5,6 +5,7 @@ import { DataModel } from '../dm/data_model';
|
|
|
5
5
|
import { EqModelLoader } from '../main/model_loader';
|
|
6
6
|
import { DataModelStorage } from '../main/model_storage';
|
|
7
7
|
import { QueryStorage } from '../main/query_storage';
|
|
8
|
+
import { ColumnWidthStore } from '../main/column_width_store';
|
|
8
9
|
import { QuerySynchronizer } from '../main/query_synchronizer';
|
|
9
10
|
import { DataFetcher } from '../main/data_fetcher';
|
|
10
11
|
import { EqValueListLoader } from '../main/value_list_resolver';
|
|
@@ -18,6 +19,7 @@ export declare class EqServiceProvider {
|
|
|
18
19
|
private modelStorageResolver;
|
|
19
20
|
private modelLoaderResolver;
|
|
20
21
|
private queryStorageResolver;
|
|
22
|
+
private columnWidthStoreResolver;
|
|
21
23
|
private querySynchronizerResolver;
|
|
22
24
|
private dataFetcherResolver;
|
|
23
25
|
private vllResolver;
|
|
@@ -38,6 +40,8 @@ export declare class EqServiceProvider {
|
|
|
38
40
|
getModelStorageResolver(): (context: EqContext) => DataModelStorage;
|
|
39
41
|
registerQueryStorageResolver(resolver: (context: EqContext) => QueryStorage): void;
|
|
40
42
|
getQueryStorageResolver(): (context: EqContext) => QueryStorage;
|
|
43
|
+
registerColumnWidthStoreResolver(resolver: (context: EqContext) => ColumnWidthStore): void;
|
|
44
|
+
getColumnWidthStoreResolver(): (context: EqContext) => ColumnWidthStore;
|
|
41
45
|
registerDataFetcherResolver(resolver: (context: EqContext) => DataFetcher): void;
|
|
42
46
|
getDataFetcherResolver(): (context: EqContext) => DataFetcher;
|
|
43
47
|
registerQuerySyncronizerResolver(resolver: (context: EqContext) => QuerySynchronizer): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EqContext } from './context';
|
|
2
|
+
export interface ColumnWidthStoreOptions {
|
|
3
|
+
keyPrefix?: string;
|
|
4
|
+
}
|
|
5
|
+
/** Persists per-grid column widths, keyed by an opaque scope key. */
|
|
6
|
+
export interface ColumnWidthStore {
|
|
7
|
+
init(options?: ColumnWidthStoreOptions): void;
|
|
8
|
+
/** Returns { stableColumnId: widthPx } for the scope (empty object if none). */
|
|
9
|
+
load(scopeKey: string): Promise<Record<string, number>>;
|
|
10
|
+
save(scopeKey: string, columnId: string, width: number): Promise<void>;
|
|
11
|
+
clear(scopeKey: string): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/** Default ColumnWidthStore backed by the browser's localStorage. */
|
|
14
|
+
export declare class BrowserColumnWidthStore implements ColumnWidthStore {
|
|
15
|
+
protected context: EqContext;
|
|
16
|
+
private keyPrefix;
|
|
17
|
+
constructor(context: EqContext);
|
|
18
|
+
init(options?: ColumnWidthStoreOptions): void;
|
|
19
|
+
private storageKey;
|
|
20
|
+
load(scopeKey: string): Promise<Record<string, number>>;
|
|
21
|
+
save(scopeKey: string, columnId: string, width: number): Promise<void>;
|
|
22
|
+
clear(scopeKey: string): Promise<void>;
|
|
23
|
+
}
|
|
@@ -4,6 +4,7 @@ import { EqServiceProvider } from '../common/eq_services';
|
|
|
4
4
|
import { EqModelLoader } from '../main/model_loader';
|
|
5
5
|
import { DataModelStorage } from '../main/model_storage';
|
|
6
6
|
import { QueryStorage } from '../main/query_storage';
|
|
7
|
+
import { ColumnWidthStore } from '../main/column_width_store';
|
|
7
8
|
import { QuerySynchronizer } from '../main/query_synchronizer';
|
|
8
9
|
import { DataFetcher } from '../main/data_fetcher';
|
|
9
10
|
import { EqValueListLoader } from '../main/value_list_resolver';
|
|
@@ -38,6 +39,7 @@ export declare class EqContext {
|
|
|
38
39
|
private modelStorage;
|
|
39
40
|
private modelLoader;
|
|
40
41
|
private queryStorage;
|
|
42
|
+
private columnWidthStore;
|
|
41
43
|
private querySynchronizer;
|
|
42
44
|
private dataFetcher;
|
|
43
45
|
private valueListLoader;
|
|
@@ -80,6 +82,7 @@ export declare class EqContext {
|
|
|
80
82
|
getModelLoader(): EqModelLoader;
|
|
81
83
|
getModelStorage(): DataModelStorage;
|
|
82
84
|
getQueryStorage(): QueryStorage;
|
|
85
|
+
getColumnWidthStore(): ColumnWidthStore;
|
|
83
86
|
getQuerySynchronizer(): QuerySynchronizer;
|
|
84
87
|
getDataFetcher(): DataFetcher;
|
|
85
88
|
getValueListLoader(): EqValueListLoader;
|
|
@@ -13,6 +13,7 @@ import { FetchDataOptions } from './data_fetcher';
|
|
|
13
13
|
import { DataModel } from '../dm/data_model';
|
|
14
14
|
import { Query } from '../query/query';
|
|
15
15
|
import { DataModelStorage } from './model_storage';
|
|
16
|
+
import { ColumnWidthStore, ColumnWidthStoreOptions } from './column_width_store';
|
|
16
17
|
/**
|
|
17
18
|
* Defines interface for all context event handlers
|
|
18
19
|
*/
|
|
@@ -55,6 +56,8 @@ export interface EqContextOptions {
|
|
|
55
56
|
*/
|
|
56
57
|
endpoint?: string;
|
|
57
58
|
modelStorageResolver?: (context: EqContext) => DataModelStorage;
|
|
59
|
+
columnWidthStoreResolver?: (context: EqContext) => ColumnWidthStore;
|
|
60
|
+
columnWidthStoreOptions?: ColumnWidthStoreOptions;
|
|
58
61
|
listCache?: ExternalListCache;
|
|
59
62
|
chunkSize?: number;
|
|
60
63
|
elasticPaging?: boolean;
|
|
@@ -28,6 +28,7 @@ export * from './main/eq_actions';
|
|
|
28
28
|
export * from './main/model_loader';
|
|
29
29
|
export * from './main/model_storage';
|
|
30
30
|
export * from './main/query_storage';
|
|
31
|
+
export * from './main/column_width_store';
|
|
31
32
|
export * from './main/context';
|
|
32
33
|
export * from './main/context_resolver';
|
|
33
34
|
export * from './main/list_cache';
|
|
@@ -283,6 +283,22 @@ export declare class Query implements AggregationColumnStore {
|
|
|
283
283
|
adjustColumnsSorting(): void;
|
|
284
284
|
createColumn(justsorted?: boolean): QueryColumn;
|
|
285
285
|
getColumnById(id: string): QueryColumn;
|
|
286
|
+
/**
|
|
287
|
+
* Fills an empty column list with the model root entity's own
|
|
288
|
+
* result-ready attributes (sub-entity attributes are not included).
|
|
289
|
+
*
|
|
290
|
+
* This turns the data-filtering scenario ("show the whole entity, filter it")
|
|
291
|
+
* into an ordinary query with explicit columns, so query-driven features -
|
|
292
|
+
* server-side sorting, column-width persistence, ORDER BY sync - work through
|
|
293
|
+
* their normal path instead of relying on server-side auto-columns.
|
|
294
|
+
*
|
|
295
|
+
* Columns are added silently (no query change events) - the caller controls
|
|
296
|
+
* when to fetch. Does nothing when the query already has columns (e.g. one
|
|
297
|
+
* loaded from storage) or when the model is not loaded yet.
|
|
298
|
+
*
|
|
299
|
+
* @returns the added columns (empty when nothing was added).
|
|
300
|
+
*/
|
|
301
|
+
fillColumnsWithRootAttributes(): QueryColumn[];
|
|
286
302
|
/**
|
|
287
303
|
* Adds a new column with specified parameters
|
|
288
304
|
* @param descriptor The descriptor of the new column. Can contain different parameters like:
|