@open-dcp/grid 0.0.1 → 0.2.17
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/.github/workflows/main.yml +42 -0
- package/CLA.md +22 -0
- package/LICENSE +190 -0
- package/NOTICE.md +31 -0
- package/README.md +39 -39
- package/SECURITY.md +27 -0
- package/dist/GridService.d.ts +83 -0
- package/dist/GridService.js +410 -0
- package/dist/__tests__/GridServices.test.d.ts +1 -0
- package/dist/__tests__/GridServices.test.js +288 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/services/FilteringService.d.ts +34 -0
- package/dist/services/FilteringService.js +278 -0
- package/dist/services/FormattingService.d.ts +17 -0
- package/dist/services/FormattingService.js +179 -0
- package/dist/services/RowHeightService.d.ts +15 -0
- package/dist/services/RowHeightService.js +63 -0
- package/dist/services/SelectionService.d.ts +14 -0
- package/dist/services/SelectionService.js +55 -0
- package/dist/services/SortingService.d.ts +15 -0
- package/dist/services/SortingService.js +82 -0
- package/dist/services/__tests__/FilteringService.test.d.ts +1 -0
- package/dist/services/__tests__/FilteringService.test.js +140 -0
- package/dist/services/__tests__/FormattingService.test.d.ts +1 -0
- package/dist/services/__tests__/FormattingService.test.js +122 -0
- package/dist/types/grid.d.ts +71 -0
- package/dist/types/grid.js +1 -0
- package/dist/types/sorting.d.ts +8 -0
- package/dist/types/sorting.js +1 -0
- package/jest.config.js +16 -0
- package/package.json +40 -9
- package/reports/junit.xml +3 -0
- package/src/GridService.ts +561 -0
- package/src/__tests__/GridServices.test.ts +348 -0
- package/src/index.ts +17 -0
- package/src/services/FilteringService.ts +347 -0
- package/src/services/FormattingService.ts +205 -0
- package/src/services/RowHeightService.ts +81 -0
- package/src/services/SelectionService.ts +71 -0
- package/src/services/SortingService.ts +105 -0
- package/src/services/__tests__/FilteringService.test.ts +173 -0
- package/src/services/__tests__/FormattingService.test.ts +157 -0
- package/src/types/grid.ts +84 -0
- package/src/types/sorting.ts +9 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write # Required to mint the OIDC token
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout code
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Setup Node.js
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: 22
|
|
23
|
+
registry-url: 'https://registry.npmjs.org'
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: npm ci
|
|
27
|
+
|
|
28
|
+
- name: Build package
|
|
29
|
+
run: npm run build --if-present
|
|
30
|
+
|
|
31
|
+
# Step 2: Switch to Node 22+ to provide an npm version that supports Trusted Publishing OIDC
|
|
32
|
+
- name: Setup Node.js (Publish Environment)
|
|
33
|
+
uses: actions/setup-node@v4
|
|
34
|
+
with:
|
|
35
|
+
node-version: 24
|
|
36
|
+
registry-url: 'https://registry.npmjs.org'
|
|
37
|
+
|
|
38
|
+
- name: Publish to npm
|
|
39
|
+
run: |
|
|
40
|
+
# Remove any static auth token line injected by setup-node into .npmrc
|
|
41
|
+
sed -i '/_authToken/d' /home/runner/work/_temp/.npmrc 2>/dev/null || true
|
|
42
|
+
npm publish --provenance --access public
|
package/CLA.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## Individual Contributor License Agreement
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to this open source software project (“Project”) made available
|
|
4
|
+
by under the terms defined in `LICENSE`. This Individual Contributor License Agreement (“Agreement”) sets
|
|
5
|
+
out the terms governing any source code, object code, bug fixes, configuration changes, tools,
|
|
6
|
+
specifications, documentation, data, materials, feedback, information or other works of
|
|
7
|
+
authorship that you submit or have submitted, in any form and in any manner, to the Project (collectively “Contributions”).
|
|
8
|
+
|
|
9
|
+
Third Party Content/Rights. If your Contribution includes or is based on any source code, object code, bug fixes, configuration changes, tools,
|
|
10
|
+
specifications, documentation, data, materials, feedback, information or other works of authorship
|
|
11
|
+
that were not authored by you (“Third Party Content”) or if you are aware of any third party intellectual
|
|
12
|
+
property or proprietary rights associated with your Contribution (“Third Party Rights”),
|
|
13
|
+
then you agree to include with the submission of your Contribution full details respecting
|
|
14
|
+
such Third Party Content and Third Party Rights, including, without limitation, identification of
|
|
15
|
+
which aspects of your Contribution contain Third Party Content or are associated with Third Party Rights,
|
|
16
|
+
the owner/author of the Third Party Content and Third Party Rights, where you obtained the Third Party Content,
|
|
17
|
+
and any applicable third party license terms or restrictions respecting the Third Party Content and Third Party Rights.
|
|
18
|
+
For greater certainty, the foregoing obligations respecting the identification of Third Party Content and Third Party Rights
|
|
19
|
+
do not apply to any portion of a Project that is incorporated into your Contribution to that same Project.
|
|
20
|
+
|
|
21
|
+
No Obligation. You acknowledge that the Project is under no obligation to use or incorporate your Contributions into any of the Projects.
|
|
22
|
+
The decision to use or incorporate your Contributions into any of the Projects will be made at the sole discretion of Projects authorized delegates.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2024 F. Hoffmann-La Roche Ltd
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/NOTICE.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# NOTICE
|
|
2
|
+
|
|
3
|
+
This project is licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at:
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
## Additional Terms:
|
|
10
|
+
|
|
11
|
+
This project includes branding specific to F. Hoffmann-La Roche Ltd ("Roche").
|
|
12
|
+
When redistributing or using this project, you must use the provided customizer tool
|
|
13
|
+
to remove Roche-specific branding elements that pertain solely to the appearance
|
|
14
|
+
of the frontend user interface. These branding elements may include logos, colors,
|
|
15
|
+
fonts, and other visual aspects associated with Roche's identity.
|
|
16
|
+
|
|
17
|
+
The customizer tool does not alter any functional aspects of the project and is intended
|
|
18
|
+
only to modify visual elements to ensure compliance with Roche's branding policies.
|
|
19
|
+
The customizer tool can be found at:
|
|
20
|
+
|
|
21
|
+
https://gitlab.com/roche/dcp/platform/frontend/customizer
|
|
22
|
+
|
|
23
|
+
By using this project, you agree to apply the customizer tool to remove Roche-specific
|
|
24
|
+
branding elements before distribution or use in a production environment.
|
|
25
|
+
|
|
26
|
+
This requirement does not alter the terms of the Apache License 2.0, but adds an
|
|
27
|
+
additional condition for the use and redistribution of this project in its branded form.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
F. Hoffmann-La Roche Ltd
|
package/README.md
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
<a href="https://open-dcp.ai" target="_blank"><img src="https://docs.open-dcp.ai/assets/img/logo.png" width="400" alt="
|
|
2
|
-
|
|
3
|
-
##### Pioneering open-source GMP analytics for a more accessible, enjoyable, and productive data-driven future.
|
|
4
|
-
|
|
5
|
-
<a href="https://open-dcp.ai"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License Apache-2.0"></a> <a href="https://
|
|
6
|
-
|
|
7
|
-
## About Data Computation Platform (DCP)
|
|
8
|
-
|
|
9
|
-
The [Data Computation Platform (DCP)](https://open-dcp.ai) is a browser-based application enabling various data analytics and visualization concepts for (real-time) process monitoring and reporting. It serves as the nexus between innovation and compliance in pharmaceuticals, enabling seamless integration of tools for GxP-compliant advancements. Validated for GxP compliance, DCP facilitates both the parallel usage of apps in a regulated context and as engineering or information-only tools. Evolving from a closed system to an open, collaborative platform, DCP embodies resilience, overcoming challenges to drive collective progress. Ultimately, DCP signifies the union of innovation and compliance in Pharma 4.0, propelling unified advancements while steadfastly meeting regulatory standards.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
<a href="https://open-dcp.ai" target="_blank"><img src="https://docs.open-dcp.ai/assets/img/logo.png" width="400" alt="Open-DCP Logo"></a>
|
|
2
|
+
|
|
3
|
+
##### Pioneering open-source GMP analytics for a more accessible, enjoyable, and productive data-driven future.
|
|
4
|
+
|
|
5
|
+
<a href="https://open-dcp.ai"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License Apache-2.0"></a> <a href="https://docs.open-dcp.ai"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fopen-dcp.ai%2Frepo-status.json" alt="Project Status"></a>
|
|
6
|
+
|
|
7
|
+
## About Data Computation Platform (DCP)
|
|
8
|
+
|
|
9
|
+
The [Data Computation Platform (DCP)](https://open-dcp.ai) is a browser-based application enabling various data analytics and visualization concepts for (real-time) process monitoring and reporting. It serves as the nexus between innovation and compliance in pharmaceuticals, enabling seamless integration of tools for GxP-compliant advancements. Validated for GxP compliance, DCP facilitates both the parallel usage of apps in a regulated context and as engineering or information-only tools. Evolving from a closed system to an open, collaborative platform, DCP embodies resilience, overcoming challenges to drive collective progress. Ultimately, DCP signifies the union of innovation and compliance in Pharma 4.0, propelling unified advancements while steadfastly meeting regulatory standards.
|
|
10
|
+
|
|
11
|
+
DCP delivers its dedicated data analytics and visualization concepts as modules extending the DCP Framework. These modules seamlessly integrate with the framework and foster synergies to reduce development and maintenance costs while increasing delivery speed.
|
|
12
|
+
|
|
13
|
+
## Ecosystem & Packages
|
|
14
|
+
|
|
15
|
+
DCP modules and client libraries are published across official package registries:
|
|
16
|
+
|
|
17
|
+
* **GitHub:** [https://github.com/orgs/Roche/repositories?q=dcp-](https://github.com/orgs/Roche/repositories?q=dcp-)
|
|
18
|
+
* **npm:** [@open-dcp](https://www.npmjs.com/org/open-dcp)
|
|
19
|
+
* **Packagist:** [open-dcp](https://packagist.org/packages/open-dcp/)
|
|
20
|
+
* **NuGet:** [OpenDCP](https://www.nuget.org/packages?q=OpenDCP)
|
|
21
|
+
* **Documentation & Guides:** [docs.open-dcp.ai](https://docs.open-dcp.ai)
|
|
22
|
+
|
|
23
|
+
*Upcoming Registries:* CRAN (R), Container Images
|
|
24
|
+
|
|
25
|
+
## Learning DCP
|
|
26
|
+
|
|
27
|
+
A very simple [Get Started](https://open-dcp.ai/get-started) guide is available on our website. To delve deeper into the application, please refer to the documentation provided on [docs.open-dcp.ai](https://docs.open-dcp.ai).
|
|
28
|
+
|
|
29
|
+
## Security
|
|
30
|
+
|
|
31
|
+
If you think you have found a security vulnerability in DCP or one of its modules, you can report it using our [Contact Form](https://open-dcp.ai/contact) or by emailing us at [info@open-dcp.ai](mailto:info@open-dcp.ai). All security vulnerabilities will be promptly addressed.
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
The contribution guide can be found in the [DCP documentation](https://docs.open-dcp.ai).
|
|
36
|
+
|
|
37
|
+
## License
|
|
38
|
+
|
|
39
|
+
DCP and its modules are open-source and licensed under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a Vulnerability
|
|
4
|
+
|
|
5
|
+
At open-dcp.ai, we take security vulnerabilities seriously. If you discover a security issue within our project, please let us know immediately by using our [Contact Form](https://open-dcp.ai/contact) or by emailing us at [global.dcp-support@roche.com](mailto:global.dcp-support@roche.com). We appreciate your responsible disclosure.
|
|
6
|
+
|
|
7
|
+
Our team will investigate and respond to your report promptly. We will also keep you informed of our progress in addressing the issue and coordinating the release of fixes.
|
|
8
|
+
|
|
9
|
+
## Responsible Disclosure
|
|
10
|
+
|
|
11
|
+
We encourage responsible disclosure of security vulnerabilities. We ask that you:
|
|
12
|
+
|
|
13
|
+
- Do not disclose the vulnerability publicly until we have had sufficient time to address it.
|
|
14
|
+
- Do not exploit the vulnerability for any malicious purpose.
|
|
15
|
+
- Provide us with reasonable time to fix the issue before disclosing it to others.
|
|
16
|
+
|
|
17
|
+
We are committed to working with security researchers and contributors to verify, address, and resolve reported vulnerabilities in a timely manner.
|
|
18
|
+
|
|
19
|
+
## Security Releases
|
|
20
|
+
|
|
21
|
+
Upon identifying and addressing a security vulnerability, we will release a new version of our project containing the necessary fixes. We will provide details about the vulnerability and the fixes included in the release notes.
|
|
22
|
+
|
|
23
|
+
## Preferred Languages
|
|
24
|
+
|
|
25
|
+
We prefer all communications to be in English.
|
|
26
|
+
|
|
27
|
+
Thank you for helping us keep our project secure!
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
+
import { GridState, Column, Row, RenderRow, DisplayFormat, GridOptions, FilterSortUpdatePayload, GlobalSearchOptions, GlobalSearchState } from './types/grid';
|
|
3
|
+
import { FilterNode } from '@open-dcp/filter';
|
|
4
|
+
import { SortingCondition, ApiModeConfig } from './types/sorting';
|
|
5
|
+
export declare class GridService {
|
|
6
|
+
readonly elementHeight: number;
|
|
7
|
+
readonly gridOptions: Partial<GridOptions>;
|
|
8
|
+
private readonly rowsSubject;
|
|
9
|
+
private readonly columnsSubject;
|
|
10
|
+
private readonly stateSubject;
|
|
11
|
+
displayFormatSubject: BehaviorSubject<DisplayFormat>;
|
|
12
|
+
displayFormat$: Observable<DisplayFormat>;
|
|
13
|
+
rows$: Observable<Row[]>;
|
|
14
|
+
rowCount$: Observable<number>;
|
|
15
|
+
columns$: Observable<Column[]>;
|
|
16
|
+
private container;
|
|
17
|
+
startIndex: number;
|
|
18
|
+
private firstRowHeight;
|
|
19
|
+
private lastRowHeight;
|
|
20
|
+
private apiMode;
|
|
21
|
+
private clientSideSort;
|
|
22
|
+
private clientSideFilter;
|
|
23
|
+
private readonly rowHeightService;
|
|
24
|
+
private readonly sortingService;
|
|
25
|
+
private readonly formattingService;
|
|
26
|
+
private readonly filteringService;
|
|
27
|
+
private readonly selectionService;
|
|
28
|
+
private filterSortSubject;
|
|
29
|
+
filterSort$: Observable<FilterSortUpdatePayload>;
|
|
30
|
+
private indexMapping;
|
|
31
|
+
constructor(rows: Row[], columns: Column[], gridOptions?: Partial<GridOptions>, sorts?: SortingCondition[], filterTree?: FilterNode | null, selections?: Set<number>);
|
|
32
|
+
private notifyFilterSortUpdate;
|
|
33
|
+
enableApiMode(config?: ApiModeConfig): void;
|
|
34
|
+
disableApiMode(): void;
|
|
35
|
+
shouldApplyClientSideFiltering(): boolean;
|
|
36
|
+
setRowsFromApi(rows: Row[]): void;
|
|
37
|
+
clearIndexMap(): void;
|
|
38
|
+
setIndexMapping(newMap: Map<number, number>): void;
|
|
39
|
+
setIndexMappingValue(newIndex: number, originalIndex: number): void;
|
|
40
|
+
getOriginalIndex(index: number): number;
|
|
41
|
+
getIndexMapping(): Map<number, number>;
|
|
42
|
+
updateDisplayFormat(newFormat: Partial<DisplayFormat>): void;
|
|
43
|
+
attachContainer(container: HTMLElement): void;
|
|
44
|
+
getContainer(): HTMLElement | null;
|
|
45
|
+
setStateValue(key: string, newValue: any): void;
|
|
46
|
+
getState(): Observable<GridState>;
|
|
47
|
+
getFirstRowHeight(): number;
|
|
48
|
+
getLastRowHeight(): number;
|
|
49
|
+
getRenderRows(): RenderRow[];
|
|
50
|
+
getRows(): Row[];
|
|
51
|
+
getCellDisplayValue(row: Row, columnKey: string | number): string;
|
|
52
|
+
getFilteredRows(): Row[];
|
|
53
|
+
getFilteredAndSortRows(): Row[];
|
|
54
|
+
rowCount(): number;
|
|
55
|
+
setRows(rows: Row[], shouldFormat?: boolean): void;
|
|
56
|
+
getColumns(): Column[];
|
|
57
|
+
setColumns(columns: Column[]): void;
|
|
58
|
+
getSortCondition(columnKey: string | number): SortingCondition | null;
|
|
59
|
+
toggleSort(columnKey: string | number): void;
|
|
60
|
+
addFilter(filterNode: FilterNode): void;
|
|
61
|
+
reset(): void;
|
|
62
|
+
resetFilter(columnKey: string | number): void;
|
|
63
|
+
setGlobalSearch(query: string, options?: GlobalSearchOptions): void;
|
|
64
|
+
clearGlobalSearch(): void;
|
|
65
|
+
getGlobalSearch(): GlobalSearchState | null;
|
|
66
|
+
getFilterIndexes(): number[] | null;
|
|
67
|
+
hasFilter(columnKey: string | number): boolean;
|
|
68
|
+
getSelected(): Observable<Set<number>>;
|
|
69
|
+
selectRow(index: number): void;
|
|
70
|
+
deselectRow(index: number): void;
|
|
71
|
+
toggleRowSelection(index: number): void;
|
|
72
|
+
selectAll(): void;
|
|
73
|
+
shiftSelect(startIndex: number, endIndex: number): void;
|
|
74
|
+
isSelected(index: number): boolean;
|
|
75
|
+
deselectAll(): void;
|
|
76
|
+
clearSelection(): void;
|
|
77
|
+
private getDisplayValue;
|
|
78
|
+
private getRowsOfInterest;
|
|
79
|
+
private rebuildIndexMapping;
|
|
80
|
+
updateRenderedRows(): void;
|
|
81
|
+
handleScroll(event: Event): void;
|
|
82
|
+
getScrollHeight(): number | undefined;
|
|
83
|
+
}
|