@sisense/sdk-pivot-query-client 2.17.0

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.
Files changed (189) hide show
  1. package/LICENSE.md +35 -0
  2. package/README.md +2 -0
  3. package/dist/__test-helpers__/testUtils.d.ts +30 -0
  4. package/dist/__test-helpers__/testUtils.js +89 -0
  5. package/dist/builders/index.d.ts +2 -0
  6. package/dist/builders/index.js +2 -0
  7. package/dist/builders/pivot-data-builder.d.ts +34 -0
  8. package/dist/builders/pivot-data-builder.js +182 -0
  9. package/dist/builders/socket-builder.d.ts +18 -0
  10. package/dist/builders/socket-builder.js +72 -0
  11. package/dist/cjs/__test-helpers__/testUtils.d.ts +30 -0
  12. package/dist/cjs/__test-helpers__/testUtils.js +104 -0
  13. package/dist/cjs/builders/index.d.ts +2 -0
  14. package/dist/cjs/builders/index.js +7 -0
  15. package/dist/cjs/builders/pivot-data-builder.d.ts +34 -0
  16. package/dist/cjs/builders/pivot-data-builder.js +186 -0
  17. package/dist/cjs/builders/socket-builder.d.ts +18 -0
  18. package/dist/cjs/builders/socket-builder.js +79 -0
  19. package/dist/cjs/data-handling/DataService.d.ts +672 -0
  20. package/dist/cjs/data-handling/DataService.js +1364 -0
  21. package/dist/cjs/data-handling/DivergenceComparator.d.ts +7 -0
  22. package/dist/cjs/data-handling/DivergenceComparator.js +20 -0
  23. package/dist/cjs/data-handling/constants.d.ts +44 -0
  24. package/dist/cjs/data-handling/constants.js +43 -0
  25. package/dist/cjs/data-handling/index.d.ts +3 -0
  26. package/dist/cjs/data-handling/index.js +23 -0
  27. package/dist/cjs/data-handling/types.d.ts +104 -0
  28. package/dist/cjs/data-handling/types.js +2 -0
  29. package/dist/cjs/data-handling/utils/createPivotTreeNode.d.ts +13 -0
  30. package/dist/cjs/data-handling/utils/createPivotTreeNode.js +21 -0
  31. package/dist/cjs/data-handling/utils/index.d.ts +4 -0
  32. package/dist/cjs/data-handling/utils/index.js +14 -0
  33. package/dist/cjs/data-handling/utils/jaqlProcessor.d.ts +122 -0
  34. package/dist/cjs/data-handling/utils/jaqlProcessor.js +661 -0
  35. package/dist/cjs/data-handling/utils/pivotTransforms.d.ts +74 -0
  36. package/dist/cjs/data-handling/utils/pivotTransforms.js +373 -0
  37. package/dist/cjs/data-handling/utils/plugins/PluginService.d.ts +135 -0
  38. package/dist/cjs/data-handling/utils/plugins/PluginService.js +383 -0
  39. package/dist/cjs/data-handling/utils/plugins/getters.d.ts +23 -0
  40. package/dist/cjs/data-handling/utils/plugins/getters.js +70 -0
  41. package/dist/cjs/data-handling/utils/plugins/types.d.ts +75 -0
  42. package/dist/cjs/data-handling/utils/plugins/types.js +2 -0
  43. package/dist/cjs/data-handling/utils/plugins/validator.d.ts +13 -0
  44. package/dist/cjs/data-handling/utils/plugins/validator.js +169 -0
  45. package/dist/cjs/data-load/AbstractDataLoadService.d.ts +256 -0
  46. package/dist/cjs/data-load/AbstractDataLoadService.js +473 -0
  47. package/dist/cjs/data-load/DataLoadService.d.ts +63 -0
  48. package/dist/cjs/data-load/DataLoadService.js +152 -0
  49. package/dist/cjs/data-load/SisenseDataLoadService.d.ts +44 -0
  50. package/dist/cjs/data-load/SisenseDataLoadService.js +87 -0
  51. package/dist/cjs/data-load/TestDataLoadService.d.ts +27 -0
  52. package/dist/cjs/data-load/TestDataLoadService.js +76 -0
  53. package/dist/cjs/data-load/constants.d.ts +13 -0
  54. package/dist/cjs/data-load/constants.js +28 -0
  55. package/dist/cjs/data-load/index.d.ts +6 -0
  56. package/dist/cjs/data-load/index.js +14 -0
  57. package/dist/cjs/data-load/sockets/SisenseSocket.d.ts +81 -0
  58. package/dist/cjs/data-load/sockets/SisenseSocket.js +162 -0
  59. package/dist/cjs/data-load/sockets/TestSocket.d.ts +61 -0
  60. package/dist/cjs/data-load/sockets/TestSocket.js +90 -0
  61. package/dist/cjs/data-load/sockets/helpers.d.ts +4 -0
  62. package/dist/cjs/data-load/sockets/helpers.js +27 -0
  63. package/dist/cjs/data-load/sockets/index.d.ts +2 -0
  64. package/dist/cjs/data-load/sockets/index.js +8 -0
  65. package/dist/cjs/data-load/types.d.ts +90 -0
  66. package/dist/cjs/data-load/types.js +2 -0
  67. package/dist/cjs/errors/LoadingCanceledError.d.ts +7 -0
  68. package/dist/cjs/errors/LoadingCanceledError.js +24 -0
  69. package/dist/cjs/errors/index.d.ts +1 -0
  70. package/dist/cjs/errors/index.js +6 -0
  71. package/dist/cjs/index.d.ts +17 -0
  72. package/dist/cjs/index.js +32 -0
  73. package/dist/cjs/package.json +12 -0
  74. package/dist/cjs/pivot-query-client.d.ts +13 -0
  75. package/dist/cjs/pivot-query-client.js +26 -0
  76. package/dist/cjs/tree-structure/AbstractTreeService.d.ts +308 -0
  77. package/dist/cjs/tree-structure/AbstractTreeService.js +716 -0
  78. package/dist/cjs/tree-structure/HeaderTreeService.d.ts +180 -0
  79. package/dist/cjs/tree-structure/HeaderTreeService.js +280 -0
  80. package/dist/cjs/tree-structure/TreeCellMap.d.ts +104 -0
  81. package/dist/cjs/tree-structure/TreeCellMap.js +145 -0
  82. package/dist/cjs/tree-structure/TreeService.d.ts +8 -0
  83. package/dist/cjs/tree-structure/TreeService.js +12 -0
  84. package/dist/cjs/tree-structure/constants.d.ts +6 -0
  85. package/dist/cjs/tree-structure/constants.js +10 -0
  86. package/dist/cjs/tree-structure/index.d.ts +5 -0
  87. package/dist/cjs/tree-structure/index.js +10 -0
  88. package/dist/cjs/tree-structure/types.d.ts +93 -0
  89. package/dist/cjs/tree-structure/types.js +2 -0
  90. package/dist/cjs/tree-structure/utils/index.d.ts +1 -0
  91. package/dist/cjs/tree-structure/utils/index.js +9 -0
  92. package/dist/cjs/tree-structure/utils/treeNode.d.ts +147 -0
  93. package/dist/cjs/tree-structure/utils/treeNode.js +534 -0
  94. package/dist/cjs/utils/array.d.ts +13 -0
  95. package/dist/cjs/utils/array.js +25 -0
  96. package/dist/cjs/utils/cloneObject.d.ts +30 -0
  97. package/dist/cjs/utils/cloneObject.js +225 -0
  98. package/dist/cjs/utils/index.d.ts +3 -0
  99. package/dist/cjs/utils/index.js +9 -0
  100. package/dist/cjs/utils/throttle.d.ts +12 -0
  101. package/dist/cjs/utils/throttle.js +39 -0
  102. package/dist/cjs/utils/types.d.ts +12 -0
  103. package/dist/cjs/utils/types.js +2 -0
  104. package/dist/data-handling/DataService.d.ts +672 -0
  105. package/dist/data-handling/DataService.js +1357 -0
  106. package/dist/data-handling/DivergenceComparator.d.ts +7 -0
  107. package/dist/data-handling/DivergenceComparator.js +16 -0
  108. package/dist/data-handling/constants.d.ts +44 -0
  109. package/dist/data-handling/constants.js +40 -0
  110. package/dist/data-handling/index.d.ts +3 -0
  111. package/dist/data-handling/index.js +4 -0
  112. package/dist/data-handling/types.d.ts +104 -0
  113. package/dist/data-handling/types.js +1 -0
  114. package/dist/data-handling/utils/createPivotTreeNode.d.ts +13 -0
  115. package/dist/data-handling/utils/createPivotTreeNode.js +17 -0
  116. package/dist/data-handling/utils/index.d.ts +4 -0
  117. package/dist/data-handling/utils/index.js +4 -0
  118. package/dist/data-handling/utils/jaqlProcessor.d.ts +122 -0
  119. package/dist/data-handling/utils/jaqlProcessor.js +621 -0
  120. package/dist/data-handling/utils/pivotTransforms.d.ts +74 -0
  121. package/dist/data-handling/utils/pivotTransforms.js +335 -0
  122. package/dist/data-handling/utils/plugins/PluginService.d.ts +135 -0
  123. package/dist/data-handling/utils/plugins/PluginService.js +379 -0
  124. package/dist/data-handling/utils/plugins/getters.d.ts +23 -0
  125. package/dist/data-handling/utils/plugins/getters.js +65 -0
  126. package/dist/data-handling/utils/plugins/types.d.ts +75 -0
  127. package/dist/data-handling/utils/plugins/types.js +1 -0
  128. package/dist/data-handling/utils/plugins/validator.d.ts +13 -0
  129. package/dist/data-handling/utils/plugins/validator.js +165 -0
  130. package/dist/data-load/AbstractDataLoadService.d.ts +256 -0
  131. package/dist/data-load/AbstractDataLoadService.js +466 -0
  132. package/dist/data-load/DataLoadService.d.ts +63 -0
  133. package/dist/data-load/DataLoadService.js +148 -0
  134. package/dist/data-load/SisenseDataLoadService.d.ts +44 -0
  135. package/dist/data-load/SisenseDataLoadService.js +83 -0
  136. package/dist/data-load/TestDataLoadService.d.ts +27 -0
  137. package/dist/data-load/TestDataLoadService.js +69 -0
  138. package/dist/data-load/constants.d.ts +13 -0
  139. package/dist/data-load/constants.js +25 -0
  140. package/dist/data-load/index.d.ts +6 -0
  141. package/dist/data-load/index.js +6 -0
  142. package/dist/data-load/sockets/SisenseSocket.d.ts +81 -0
  143. package/dist/data-load/sockets/SisenseSocket.js +155 -0
  144. package/dist/data-load/sockets/TestSocket.d.ts +61 -0
  145. package/dist/data-load/sockets/TestSocket.js +83 -0
  146. package/dist/data-load/sockets/helpers.d.ts +4 -0
  147. package/dist/data-load/sockets/helpers.js +23 -0
  148. package/dist/data-load/sockets/index.d.ts +2 -0
  149. package/dist/data-load/sockets/index.js +3 -0
  150. package/dist/data-load/types.d.ts +90 -0
  151. package/dist/data-load/types.js +1 -0
  152. package/dist/errors/LoadingCanceledError.d.ts +7 -0
  153. package/dist/errors/LoadingCanceledError.js +20 -0
  154. package/dist/errors/index.d.ts +1 -0
  155. package/dist/errors/index.js +2 -0
  156. package/dist/index.d.ts +17 -0
  157. package/dist/index.js +9 -0
  158. package/dist/pivot-query-client.d.ts +13 -0
  159. package/dist/pivot-query-client.js +22 -0
  160. package/dist/tree-structure/AbstractTreeService.d.ts +308 -0
  161. package/dist/tree-structure/AbstractTreeService.js +712 -0
  162. package/dist/tree-structure/HeaderTreeService.d.ts +180 -0
  163. package/dist/tree-structure/HeaderTreeService.js +276 -0
  164. package/dist/tree-structure/TreeCellMap.d.ts +104 -0
  165. package/dist/tree-structure/TreeCellMap.js +141 -0
  166. package/dist/tree-structure/TreeService.d.ts +8 -0
  167. package/dist/tree-structure/TreeService.js +8 -0
  168. package/dist/tree-structure/constants.d.ts +6 -0
  169. package/dist/tree-structure/constants.js +7 -0
  170. package/dist/tree-structure/index.d.ts +5 -0
  171. package/dist/tree-structure/index.js +4 -0
  172. package/dist/tree-structure/types.d.ts +93 -0
  173. package/dist/tree-structure/types.js +1 -0
  174. package/dist/tree-structure/utils/index.d.ts +1 -0
  175. package/dist/tree-structure/utils/index.js +1 -0
  176. package/dist/tree-structure/utils/treeNode.d.ts +147 -0
  177. package/dist/tree-structure/utils/treeNode.js +515 -0
  178. package/dist/tsconfig.prod.cjs.tsbuildinfo +1 -0
  179. package/dist/utils/array.d.ts +13 -0
  180. package/dist/utils/array.js +21 -0
  181. package/dist/utils/cloneObject.d.ts +30 -0
  182. package/dist/utils/cloneObject.js +221 -0
  183. package/dist/utils/index.d.ts +3 -0
  184. package/dist/utils/index.js +3 -0
  185. package/dist/utils/throttle.d.ts +12 -0
  186. package/dist/utils/throttle.js +35 -0
  187. package/dist/utils/types.d.ts +12 -0
  188. package/dist/utils/types.js +1 -0
  189. package/package.json +61 -0
package/LICENSE.md ADDED
@@ -0,0 +1,35 @@
1
+ # SISENSE COMPOSE SDK
2
+
3
+ # END USER LICENSE AGREEMENT
4
+
5
+ THIS END USER LICENSE AGREEMENT (“EULA”) FORMS A BINDING AGREEMENT BETWEEN YOU INDIVIDUALLY OR THE ENTITY ON WHOSE BEHALF YOU ARE ACCEPTING THIS AGREEMENT (“YOU”) AND DESCRIBES THE TERMS AND CONDITIONS GOVERNING THE USE OF ANY APPLICATION PROGRAMMING INTERFACE, SOFTWARE DEVELOPMENT KIT, CODE SNIPPET, SAMPLE CODE, USER INTERFACE COMPONENT, VISUALIZATION, CLI TOOLS, OR SAMPLE DATA, AND THE CORRESPONDING DOCUMENTATION FOR EACH, ANY UPDATES AND UPGRADES THERETO, AND ANY MODIFICATIONS, ENHANCEMENTS, OR IMPROVEMENTS, OF ANY OF THE FOREGOING (EACH, A “TOOL” AND COLLECTIVELY, THE “TOOLS”), MADE AVAILABLE BY SISENSE LTD. OR ITS AFFILIATES (“SISENSE”).
6
+
7
+ 1. ACCEPTANCE. By downloading, importing, installing and/or using any Tool (or any portion thereof), You represent and warrant that: (a) You have read, understand and accept all of the provisions of this EULA; and (b) if You are accepting on behalf of an entity, You are an employee, contractor or agent of such entity and have the authority and all legal power to accept on behalf of such entity.
8
+
9
+ 2. LICENSE SCOPE. Subject to the terms and conditions of this EULA, Sisense hereby grants You a royalty-free, non-exclusive, non-transferrable, limited license to access, download and use the Tools (in the manner described in the documentation for such Tool) solely for utilization with Your use of the applicable Sisense subscription product (the “Product”), to which You must have purchased the necessary license and use rights pursuant to a separate written agreement with Sisense (the “Master Subscription Agreement”).
10
+
11
+ 3. RESTRICTIONS. You agree that You will not (and have no license to) and will not permit any third party to: (i) use the Tools except as permitted under this EULA; (ii) sell, resell, license, sublicense, rent, lease, encumber, lend, distribute, transfer, or provide a third party with access to the Tools; (iii) modify or create derivative works of the Tools; (iv) circumvent or remove by any means any copy protection used by Sisense in connection with the Tools; (v) use the Tools to develop a competitive product offering; (vi) use the Tool to access Sisense products in a manner not authorized by the Master Subscription Agreement or this EULA; or (vii) use the Tools in any manner that violates the Master Subscription Agreement or any applicable laws or regulations;
12
+
13
+ 4. SISENSE OWNERSHIP. Except for those portions licensed to Sisense by third parties, Sisense retains all right, title and interest in and to the Tools, including without limitation all copyrights and other intellectual property or other proprietary rights worldwide therein (including but not limited to all patent, trademark, service mark, copyright, trade secret, know-how, moral right, and any other intellectual and intangible property rights, including all continuations, continuations in part, applications, renewals, and extensions of any of the foregoing, whether registered or unregistered). All rights not expressly granted herein are reserved. You may not remove, delete or modify any of the Sisense copyright statements in the Tools.
14
+
15
+ 5. OPEN SOURCE COMPONENTS. To the extent any open source software components are provided with or used by the Tools, such components are licensed to You under the terms of the applicable license agreements included with such open source software components.
16
+
17
+ 6. THIRD-PARTY COMPONENTS. To the extent that any Tool includes one or more components licensed by a third-party (a “Component”), and such third-party’s license requirements apply to such Component in a Tool, such additional license terms will be provided in the open source disclosure file provided with or within a Tool download. Third-party license terms shall take precedence over this EULA to the extent that they impose additional restrictions or limitations on You than the license provided herein for download and use of a Component. You agree that: (a) to the extent that the terms between You and the third party for use of a third-party technology accessed by the Component are more restrictive, such terms shall apply to Your use of the Component; (b) Sisense, and not the third party, is responsible for the Component including, without limitation, for any warranties, maintenance, and support thereof, and the third party does not warrant the Component’s accuracy, reliability, completeness, usefulness, non-infringement, or quality of the Component, and will not be liable for any losses or damages of any kind, including lost profits or other indirect or consequential damages, relating to use of or reliance on the Component; and (c) the third party owns all right, title, and interest in and to the Component, including all intellectual property rights therein.
18
+
19
+ 7. TERM, TERMINATION, AND CHANGES. This EULA shall continue as long as You are in compliance with the terms specified herein or until otherwise terminated. This EULA shall automatically terminate upon the expiration or termination of the Master Subscription Agreement. You agree, upon termination, to destroy all copies of the Tools within Your possession or control. The Disclaimer of Warranties, Limitation of Liability and Indemnification sections set out in this EULA shall survive any termination or expiration of this EULA. Sisense may, in its sole discretion, update this EULA from time to time.
20
+
21
+ 8. NO DUTY TO SUPPORT. You expressly acknowledge that Sisense has no duty or obligation to support the Tools, or to provide updates or bug fixes to the Tools.
22
+
23
+ 9. DISCLAIMER OF WARRANTIES. THE TOOLS ARE PROVIDED “AS IS” WITHOUT ANY WARRANTIES OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY LAW, SISENSE DISCLAIMS RESPONSIBILITY FOR ANY HARM RESULTING FROM YOUR USE OF ANY TOOL. SISENSE DISCLAIMS TO THE FULLEST EXTENT PERMITTED, ALL GUARANTEES AND EXPRESS, IMPLIED AND STATUTORY WARRANTIES, INCLUDING WITHOUT LIMITATION THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF PROPRIETARY RIGHTS, AND ANY WARRANTIES REGARDING THE AVAILABILITY, SECURITY, RELIABILITY, TIMELINESS AND PERFORMANCE OF ANY TOOL. YOU ACKNOWLEDGE THAT YOU DOWNLOAD AND USE THE TOOLS AT YOUR OWN DISCRETION AND RISK, AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGES TO HARDWARE DEVICES OR LOSS OF DATA THAT RESULT FROM THE DOWNLOAD OR USE OF ANY TOOL.
24
+
25
+ 10. LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL SISENSE BE LIABLE FOR ANY LOST PROFITS OR BUSINESS OPPORTUNITIES, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, OR ANY OTHER INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR FROM LIBRARY OR YOUR USE OF THE TOOLS, UNDER ANY THEORY OF LIABILITY, WHETHER BASED IN CONTRACT, TORT, NEGLIGENCE, PRODUCT LIABILITY, OR OTHERWISE. TO THE EXTENT THE PRECEDING LIMITATION DOES NOT APPLY UNDER APPLICABLE LAW, SISENSE’S LIABILITY ARISING OUT OF THE TOOLS PROVIDED HEREUNDER SHALL NOT, IN ANY EVENT, EXCEED USD $100.00.
26
+
27
+ THE FOREGOING LIMITATIONS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, REGARDLESS OF WHETHER A PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF WHETHER ANY REMEDY FAILS OF ITS ESSENTIAL PURPOSE.
28
+
29
+ 11. INDEMNIFICATION. You agree to defend, indemnify and hold harmless Sisense, and any of its directors, officers, employees, affiliates, subsidiaries or agents, from and against any and all claims, losses, damages, liabilities and other expenses (including reasonable attorneys' fees), arising from or related to: (i) Your use of the Tools; (ii) any derivative works You create using the Tools; and (iii) Your breach of this EULA.
30
+
31
+ 12. EXPORT CONTROL. The Tools are provided subject to the U.S. Export Administration Regulations and the regulations of other jurisdictions (e.g., the European Union). Diversion contrary to applicable law is prohibited. Without limiting the foregoing, You agree that (i) You are not acting on behalf of any person who is a citizen, national, or resident of, or who is controlled by the government of any country to which the United States or other applicable government body has prohibited export transactions; (ii) You are not acting on behalf of, any person or entity listed on a relevant list of persons to whom export is prohibited (e.g., the U.S. Treasury Department list of Specially Designated Nationals and Blocked Persons, the U.S. Commerce Department Denied Persons List or Entity List, etc.); and (iii) You will not use the Tools for any purpose prohibited by applicable law.
32
+
33
+ 13. GOVERNMENT USE. If a Tool provided under the Master Subscription Agreement is software, then it is commercial computer software developed exclusively at private expense. Unless otherwise set forth in the Master Subscription Agreement, use, duplication, and disclosure by civilian agencies of the U.S. Government will not exceed those minimum rights set forth in FAR 52.227-19(c) or successor regulations. Use, duplication, and disclosure by U.S. Department of Defense agencies is subject solely to the license terms contained in this EULA, as stated in DFARS 227.7202 or successor regulations. U.S. Government rights will apply only to the specific agency and program for which the Product is obtained.
34
+
35
+ 14. GOVERNING LAW; ENTIRE AGREEMENT. This EULA shall be governed by the laws of the State of New York and the United States of America without regard to conflict of laws principles. You may not assign any part of this EULA without the prior written consent of Sisense. Any attempted assignment without consent shall be void. This EULA represents the entire agreement between You and Sisense with respect to the Tools and supersedes all prior written or oral communications, understandings and agreements containing the subject matter contained herein. Any waiver of these terms must be in writing to be effective. If any provision of these terms is found to be invalid or unenforceable, the remaining terms will continue to be valid and enforceable to the fullest extent permitted by law. In the event of a conflict between this EULA and the Master Subscription Agreement, the terms of this EULA will prevail to the extent applicable to the license and use of the Tools.
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ This library, which is a part of Sisense Compose SDK, provides utilities
2
+ for building pivot table and retrieving pivot data from a Sisense instance (backend).
@@ -0,0 +1,30 @@
1
+ import EventEmitter from 'events';
2
+ import { Jaql, JaqlPanel, JaqlRequest } from '../data-load/types.js';
3
+ /**
4
+ * @param {Function} emitter - instance of EventEmitter (node-events)
5
+ * @param {string} methodNameCallEvent - name of custom event
6
+ * @returns {void}
7
+ */
8
+ export declare const emitterCallHandle: (emitter: EventEmitter, methodNameCallEvent: string) => Promise<string>;
9
+ /**
10
+ *
11
+ * @returns {Array} - returns callback listener and dispatcher (node events library)
12
+ */
13
+ export declare const initEventEmitter: () => {
14
+ awaitForCall: (methodName: string) => Promise<string>;
15
+ emitCall: (methodName: string) => void;
16
+ };
17
+ export declare const getNodeProp: (item: any, propName: string, list?: Array<any>) => Array<any>;
18
+ export declare const getNodeNames: (item: any, list?: string[]) => string[];
19
+ export declare const getNodeIndexes: (item: any, list?: string[]) => string[];
20
+ export declare const createTypedPanel: (type: string, jaqlIndex?: number, additionalJaqlProps?: Record<any, any>, additionalPanelProps?: Record<any, any>) => {
21
+ panel: string;
22
+ field: {
23
+ index: number;
24
+ id: string;
25
+ };
26
+ jaql: Jaql;
27
+ };
28
+ export declare const createTypedPanels: (type: string, count: number, startIndex?: number, additionalJaqlProps?: Record<string, any>) => JaqlPanel[];
29
+ export declare const createTestJaql: (rows?: Array<JaqlPanel>, columns?: Array<JaqlPanel>, measures?: Array<JaqlPanel>, scope?: Array<JaqlPanel>, additionalJaqlProps?: Record<string, any>) => JaqlRequest;
30
+ export declare const delay: (time?: number, resolveValue?: any, rejectValue?: any) => Promise<any>;
@@ -0,0 +1,89 @@
1
+ import EventEmitter from 'events';
2
+ import { v4 as uuid } from 'uuid';
3
+ import { treeNode } from '../tree-structure/utils/index.js';
4
+ /**
5
+ * @param {Function} emitter - instance of EventEmitter (node-events)
6
+ * @param {string} methodNameCallEvent - name of custom event
7
+ * @returns {void}
8
+ */
9
+ export const emitterCallHandle = (emitter, methodNameCallEvent) => new Promise((res) => {
10
+ emitter.once(methodNameCallEvent, () => {
11
+ res(methodNameCallEvent);
12
+ });
13
+ });
14
+ /**
15
+ *
16
+ * @returns {Array} - returns callback listener and dispatcher (node events library)
17
+ */
18
+ export const initEventEmitter = () => {
19
+ const emitter = new EventEmitter();
20
+ const awaitForCall = (methodName) => emitterCallHandle(emitter, methodName);
21
+ const emitCall = (methodName) => {
22
+ emitter.emit(methodName);
23
+ };
24
+ return { awaitForCall, emitCall };
25
+ };
26
+ export const getNodeProp = (item, propName, list = []) => {
27
+ if (!item) {
28
+ return list;
29
+ }
30
+ let children = [];
31
+ if (Array.isArray(item)) {
32
+ children = item;
33
+ }
34
+ else {
35
+ children = treeNode.getChildren(item);
36
+ list.push(item[propName]);
37
+ }
38
+ if (children && children.length) {
39
+ children.forEach((child) => {
40
+ getNodeProp(child, propName, list);
41
+ });
42
+ }
43
+ return list;
44
+ };
45
+ export const getNodeNames = (item, list = []) => getNodeProp(item, 'value', list);
46
+ export const getNodeIndexes = (item, list = []) => getNodeProp(item, 'index', list);
47
+ export const createTypedPanel = (type, jaqlIndex = 0, additionalJaqlProps = {}, additionalPanelProps = {}) => {
48
+ const title = `${type}-${jaqlIndex}`;
49
+ const jaql = Object.assign({ title, datatype: 'numeric', dim: `[${title}]` }, additionalJaqlProps);
50
+ return Object.assign({ panel: type, field: { index: jaqlIndex, id: title }, jaql }, additionalPanelProps);
51
+ };
52
+ export const createTypedPanels = (type, count, startIndex = 0, additionalJaqlProps = {}) => Array.from(Array(count - startIndex)).map((item, index) => {
53
+ const jaqlIndex = index + startIndex;
54
+ const title = `${type}-${jaqlIndex}`;
55
+ const jaql = Object.assign({ title, datatype: 'numeric', dim: `[${title}]` }, additionalJaqlProps);
56
+ return {
57
+ panel: type,
58
+ field: { index: jaqlIndex, id: title },
59
+ jaql,
60
+ };
61
+ });
62
+ export const createTestJaql = (rows, columns, measures, scope, additionalJaqlProps = {}) => {
63
+ let metadata = [];
64
+ if (rows) {
65
+ metadata = metadata.concat(rows);
66
+ }
67
+ if (columns) {
68
+ metadata = metadata.concat(columns);
69
+ }
70
+ if (measures) {
71
+ metadata = metadata.concat(measures);
72
+ }
73
+ if (scope) {
74
+ metadata = metadata.concat(scope);
75
+ }
76
+ return Object.assign({ queryGuid: uuid(), metadata, grandTotals: {
77
+ title: 'Grand total',
78
+ } }, additionalJaqlProps);
79
+ };
80
+ export const delay = (time = 0, resolveValue, rejectValue) => new Promise((resolve, reject) => {
81
+ setTimeout(() => {
82
+ if (typeof rejectValue !== 'undefined') {
83
+ reject(rejectValue);
84
+ }
85
+ else {
86
+ resolve(resolveValue);
87
+ }
88
+ }, time);
89
+ });
@@ -0,0 +1,2 @@
1
+ export { PivotDataBuilder } from './pivot-data-builder.js';
2
+ export { SocketBuilder } from './socket-builder.js';
@@ -0,0 +1,2 @@
1
+ export { PivotDataBuilder } from './pivot-data-builder.js';
2
+ export { SocketBuilder } from './socket-builder.js';
@@ -0,0 +1,34 @@
1
+ import { PivotQueryResultData } from '@sisense/sdk-data';
2
+ import { InitPageData } from '../data-handling/types.js';
3
+ import { DataLoadServiceI, JaqlRequest, SocketI } from '../data-load/types.js';
4
+ export declare class PivotDataBuilder {
5
+ /**
6
+ * DataLoadServiceI instance
7
+ */
8
+ private dataLoadService?;
9
+ /**
10
+ * SocketI instance
11
+ */
12
+ private readonly socket;
13
+ /**
14
+ * @param socket - socket instance
15
+ */
16
+ constructor(socket: SocketI);
17
+ destroy(): void;
18
+ prepareRequest(jaql: JaqlRequest): Promise<JaqlRequest>;
19
+ prepareLoadService(jaql?: JaqlRequest, useCache?: boolean): DataLoadServiceI;
20
+ prepareDataService(dataLoadService: DataLoadServiceI): {
21
+ loadData: (jaql?: JaqlRequest, pageSize?: number, isPaginated?: boolean) => Promise<InitPageData>;
22
+ };
23
+ loadInitData(jaql: JaqlRequest, isPaginated?: boolean, elementsPerPage?: number, useCache?: boolean): Promise<PivotQueryResultData>;
24
+ private buildColumnsHelper;
25
+ /**
26
+ * Transforms Pivot Grid to Columns of Table structure
27
+ *
28
+ * @param columnType - type of column
29
+ * @param grid - pivot grid
30
+ * @returns An array of columns
31
+ */
32
+ private transformGridToColumns;
33
+ private transformTreeStructuresToResultData;
34
+ }
@@ -0,0 +1,182 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { EMPTY_PIVOT_QUERY_RESULT_DATA, } from '@sisense/sdk-data';
11
+ import { DataService } from '../data-handling/DataService.js';
12
+ import { SisenseDataLoadService } from '../data-load/index.js';
13
+ export class PivotDataBuilder {
14
+ /**
15
+ * @param socket - socket instance
16
+ */
17
+ constructor(socket) {
18
+ this.socket = socket;
19
+ }
20
+ destroy() { }
21
+ prepareRequest(jaql) {
22
+ return Promise.resolve(jaql);
23
+ }
24
+ prepareLoadService(jaql, useCache = false) {
25
+ if (this.dataLoadService && (useCache || this.dataLoadService.isFormattingChanges(jaql))) {
26
+ return this.dataLoadService;
27
+ }
28
+ return new SisenseDataLoadService(this.socket);
29
+ }
30
+ prepareDataService(dataLoadService) {
31
+ const dataService = new DataService(dataLoadService);
32
+ return {
33
+ loadData: (jaql, pageSize, isPaginated) => {
34
+ if (!dataService) {
35
+ throw new Error('No DataService defined during "prepareDataService"');
36
+ }
37
+ return dataService.loadData(jaql, { pageSize, isPaginated });
38
+ },
39
+ };
40
+ }
41
+ loadInitData(jaql, isPaginated = true, elementsPerPage = 100, useCache = false) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const pageSize = isPaginated ? elementsPerPage : undefined;
44
+ try {
45
+ const jaqlInternal = yield this.prepareRequest(jaql);
46
+ // Currently, each jaql need a separate dataLoadService instance
47
+ // In other words, each dataLoadService is associated with a jaql
48
+ this.dataLoadService = this.prepareLoadService(jaqlInternal, useCache);
49
+ const { loadData } = this.prepareDataService(this.dataLoadService);
50
+ const { rowsTreeService, columnsTreeService, cornerTreeService, isLastPage } = yield loadData(useCache ? undefined : jaqlInternal, pageSize, isPaginated);
51
+ return this.transformTreeStructuresToResultData({
52
+ rowsTreeService,
53
+ columnsTreeService,
54
+ cornerTreeService,
55
+ isLastPage,
56
+ });
57
+ }
58
+ catch (err) {
59
+ console.error('Error during loading initial page"', err);
60
+ }
61
+ return EMPTY_PIVOT_QUERY_RESULT_DATA;
62
+ });
63
+ }
64
+ buildColumnsHelper(columnType, columns, prefix, treeNode) {
65
+ var _a;
66
+ const columnName = `${prefix}${prefix === '' ? '' : ' | '}${(_a = treeNode.value) === null || _a === void 0 ? void 0 : _a.toString()}`;
67
+ if (treeNode.children) {
68
+ treeNode.children.forEach((child) => {
69
+ this.buildColumnsHelper(columnType, columns, columnName, child);
70
+ });
71
+ }
72
+ else {
73
+ columns.push({ name: columnName, type: columnType });
74
+ }
75
+ }
76
+ /**
77
+ * Transforms Pivot Grid to Columns of Table structure
78
+ *
79
+ * @param columnType - type of column
80
+ * @param grid - pivot grid
81
+ * @returns An array of columns
82
+ */
83
+ transformGridToColumns(columnType, grid) {
84
+ if (!grid || grid.length === 0) {
85
+ return [];
86
+ }
87
+ const columns = [];
88
+ grid === null || grid === void 0 ? void 0 : grid[0].forEach((cell) => {
89
+ if (typeof cell === 'string')
90
+ return;
91
+ this.buildColumnsHelper(columnType, columns, '', cell);
92
+ });
93
+ return columns || [];
94
+ }
95
+ // eslint-disable-next-line sonarjs/cognitive-complexity,max-lines-per-function
96
+ transformTreeStructuresToResultData(pivotTreeData) {
97
+ const { rowsTreeService, columnsTreeService, cornerTreeService } = pivotTreeData;
98
+ if (!rowsTreeService && !columnsTreeService && !cornerTreeService) {
99
+ return EMPTY_PIVOT_QUERY_RESULT_DATA;
100
+ }
101
+ const cornerGrid = cornerTreeService ? cornerTreeService.getGrid() : [];
102
+ const columnsGrid = columnsTreeService ? columnsTreeService.getGrid() : [];
103
+ const rowsGrid = rowsTreeService ? rowsTreeService.getGrid() : [];
104
+ const cornerColumns = this.transformGridToColumns('string', cornerGrid);
105
+ const columnsColumns = this.transformGridToColumns('number', columnsGrid);
106
+ const columns = [...cornerColumns, ...columnsColumns];
107
+ const FILL_IN_THE_BLANKS = true;
108
+ const valuesGrid = rowsTreeService
109
+ ? rowsTreeService.extractData(columnsTreeService)
110
+ : [];
111
+ const rowCount = rowsGrid.length;
112
+ const columnCount = columns.length;
113
+ const rows = [];
114
+ let curRowIndex = 0;
115
+ let curColIndex = 0;
116
+ Array.from(Array(rowCount)).map((c, rowIndex) => {
117
+ const row = [];
118
+ Array.from(Array(columnCount)).map((c, colIndex) => {
119
+ var _a, _b;
120
+ let dataNode;
121
+ if (colIndex < cornerColumns.length) {
122
+ curRowIndex = rowIndex;
123
+ curColIndex = colIndex;
124
+ try {
125
+ dataNode = rowsGrid[curRowIndex][curColIndex];
126
+ }
127
+ catch (err) {
128
+ throw new Error(`Can't find data item for ${curRowIndex}-${curColIndex}`);
129
+ }
130
+ }
131
+ else {
132
+ curRowIndex = rowIndex;
133
+ curColIndex = colIndex - cornerColumns.length;
134
+ try {
135
+ dataNode = valuesGrid[curRowIndex][curColIndex];
136
+ }
137
+ catch (err) {
138
+ throw new Error(`Can't find data item for ${curRowIndex}-${curColIndex}`);
139
+ }
140
+ }
141
+ let value;
142
+ if (typeof dataNode === 'string') {
143
+ if (FILL_IN_THE_BLANKS) {
144
+ const indexes = dataNode.split('-');
145
+ // eslint-disable-next-line max-lines
146
+ if (indexes.length === 2) {
147
+ const parentRowIndex = Number(indexes[0]);
148
+ const parentColIndex = Number(indexes[1]);
149
+ dataNode = rowsGrid[parentRowIndex][parentColIndex];
150
+ value = ((_a = dataNode.value) === null || _a === void 0 ? void 0 : _a.toString()) || '';
151
+ }
152
+ else {
153
+ // eslint-disable-next-line max-lines
154
+ value = '';
155
+ }
156
+ }
157
+ else {
158
+ value = '';
159
+ }
160
+ // eslint-disable-next-line max-lines
161
+ }
162
+ else {
163
+ value = ((_b = dataNode.value) === null || _b === void 0 ? void 0 : _b.toString()) || '';
164
+ }
165
+ row.push({ data: value, text: value });
166
+ });
167
+ rows.push(row);
168
+ });
169
+ return {
170
+ table: {
171
+ columns: columns,
172
+ rows: rows,
173
+ },
174
+ grids: {
175
+ corner: cornerGrid,
176
+ rows: rowsGrid,
177
+ columns: columnsGrid,
178
+ values: valuesGrid,
179
+ },
180
+ };
181
+ }
182
+ }
@@ -0,0 +1,18 @@
1
+ import { Authenticator } from '@sisense/sdk-rest-client';
2
+ import { SocketI } from '../data-load/types.js';
3
+ export declare class SocketBuilder {
4
+ private _socket;
5
+ private readonly _url;
6
+ private readonly _auth;
7
+ /**
8
+ * Boolean flag to indicate if the socket should be mocked or not (for testing).
9
+ *
10
+ * @internal
11
+ */
12
+ private readonly _mockSocket;
13
+ constructor(url: string, auth: Authenticator, mockSocket?: boolean);
14
+ private getQueryOptionsSso;
15
+ private getQueryOptionsBearer;
16
+ private getQueryOptionsWat;
17
+ get socket(): SocketI;
18
+ }
@@ -0,0 +1,72 @@
1
+ import { isBearerAuthenticator, isSsoAuthenticator, isWatAuthenticator, } from '@sisense/sdk-rest-client';
2
+ import { SisenseSocket } from '../data-load/index.js';
3
+ import TestSocket from '../data-load/sockets/TestSocket.js';
4
+ /**
5
+ * Builder to create a web socket client on demand to communicate with a Sisense web socket server.
6
+ *
7
+ * @internal
8
+ */
9
+ const PIVOT_NAMESPACE = 'pivot2';
10
+ export class SocketBuilder {
11
+ constructor(url, auth, mockSocket = false) {
12
+ this._url = url;
13
+ this._auth = auth;
14
+ this._mockSocket = mockSocket;
15
+ }
16
+ getQueryOptionsSso(auth) {
17
+ // No need to add query params as SSO authentication
18
+ // is using cookies sent automatically by the browser
19
+ return {};
20
+ }
21
+ getQueryOptionsBearer(auth) {
22
+ const authToken = auth.bearer;
23
+ if (!authToken) {
24
+ throw new Error('Missing bearer token');
25
+ }
26
+ return {
27
+ token: authToken,
28
+ };
29
+ }
30
+ getQueryOptionsWat(auth) {
31
+ const headers = new Headers();
32
+ auth.applyHeaders(headers);
33
+ const authorization = headers.get('Authorization');
34
+ const initialiser = headers.get('Initialiser');
35
+ if (!authorization || !initialiser) {
36
+ throw new Error('Missing auth header');
37
+ }
38
+ return {
39
+ authorization,
40
+ initialiser,
41
+ };
42
+ }
43
+ get socket() {
44
+ // initialize socket only when needed
45
+ if (!this._socket) {
46
+ if (this._mockSocket) {
47
+ // use a mock socket for testing
48
+ this._socket = new TestSocket();
49
+ return this._socket;
50
+ }
51
+ const auth = this._auth;
52
+ const url = this._url;
53
+ let query = {};
54
+ // Do not use instanceof because it checks if the constructors are the same.
55
+ // However, when the class is imported from @sisense/sdk-rest-client,
56
+ // the code gets its own copy of the constructor from the code in the library,
57
+ // so they are not the same instance anymore.
58
+ // Reference: https://stackoverflow.com/a/63937850/2425556
59
+ if (isBearerAuthenticator(auth)) {
60
+ query = this.getQueryOptionsBearer(auth);
61
+ }
62
+ else if (isWatAuthenticator(auth)) {
63
+ query = this.getQueryOptionsWat(auth);
64
+ }
65
+ else if (isSsoAuthenticator(auth)) {
66
+ query = this.getQueryOptionsSso(auth);
67
+ }
68
+ this._socket = new SisenseSocket(url, query, PIVOT_NAMESPACE);
69
+ }
70
+ return this._socket;
71
+ }
72
+ }
@@ -0,0 +1,30 @@
1
+ import EventEmitter from 'events';
2
+ import { Jaql, JaqlPanel, JaqlRequest } from '../data-load/types.js';
3
+ /**
4
+ * @param {Function} emitter - instance of EventEmitter (node-events)
5
+ * @param {string} methodNameCallEvent - name of custom event
6
+ * @returns {void}
7
+ */
8
+ export declare const emitterCallHandle: (emitter: EventEmitter, methodNameCallEvent: string) => Promise<string>;
9
+ /**
10
+ *
11
+ * @returns {Array} - returns callback listener and dispatcher (node events library)
12
+ */
13
+ export declare const initEventEmitter: () => {
14
+ awaitForCall: (methodName: string) => Promise<string>;
15
+ emitCall: (methodName: string) => void;
16
+ };
17
+ export declare const getNodeProp: (item: any, propName: string, list?: Array<any>) => Array<any>;
18
+ export declare const getNodeNames: (item: any, list?: string[]) => string[];
19
+ export declare const getNodeIndexes: (item: any, list?: string[]) => string[];
20
+ export declare const createTypedPanel: (type: string, jaqlIndex?: number, additionalJaqlProps?: Record<any, any>, additionalPanelProps?: Record<any, any>) => {
21
+ panel: string;
22
+ field: {
23
+ index: number;
24
+ id: string;
25
+ };
26
+ jaql: Jaql;
27
+ };
28
+ export declare const createTypedPanels: (type: string, count: number, startIndex?: number, additionalJaqlProps?: Record<string, any>) => JaqlPanel[];
29
+ export declare const createTestJaql: (rows?: Array<JaqlPanel>, columns?: Array<JaqlPanel>, measures?: Array<JaqlPanel>, scope?: Array<JaqlPanel>, additionalJaqlProps?: Record<string, any>) => JaqlRequest;
30
+ export declare const delay: (time?: number, resolveValue?: any, rejectValue?: any) => Promise<any>;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.delay = exports.createTestJaql = exports.createTypedPanels = exports.createTypedPanel = exports.getNodeIndexes = exports.getNodeNames = exports.getNodeProp = exports.initEventEmitter = exports.emitterCallHandle = void 0;
7
+ const events_1 = __importDefault(require("events"));
8
+ const uuid_1 = require("uuid");
9
+ const index_js_1 = require("../tree-structure/utils/index.js");
10
+ /**
11
+ * @param {Function} emitter - instance of EventEmitter (node-events)
12
+ * @param {string} methodNameCallEvent - name of custom event
13
+ * @returns {void}
14
+ */
15
+ const emitterCallHandle = (emitter, methodNameCallEvent) => new Promise((res) => {
16
+ emitter.once(methodNameCallEvent, () => {
17
+ res(methodNameCallEvent);
18
+ });
19
+ });
20
+ exports.emitterCallHandle = emitterCallHandle;
21
+ /**
22
+ *
23
+ * @returns {Array} - returns callback listener and dispatcher (node events library)
24
+ */
25
+ const initEventEmitter = () => {
26
+ const emitter = new events_1.default();
27
+ const awaitForCall = (methodName) => (0, exports.emitterCallHandle)(emitter, methodName);
28
+ const emitCall = (methodName) => {
29
+ emitter.emit(methodName);
30
+ };
31
+ return { awaitForCall, emitCall };
32
+ };
33
+ exports.initEventEmitter = initEventEmitter;
34
+ const getNodeProp = (item, propName, list = []) => {
35
+ if (!item) {
36
+ return list;
37
+ }
38
+ let children = [];
39
+ if (Array.isArray(item)) {
40
+ children = item;
41
+ }
42
+ else {
43
+ children = index_js_1.treeNode.getChildren(item);
44
+ list.push(item[propName]);
45
+ }
46
+ if (children && children.length) {
47
+ children.forEach((child) => {
48
+ (0, exports.getNodeProp)(child, propName, list);
49
+ });
50
+ }
51
+ return list;
52
+ };
53
+ exports.getNodeProp = getNodeProp;
54
+ const getNodeNames = (item, list = []) => (0, exports.getNodeProp)(item, 'value', list);
55
+ exports.getNodeNames = getNodeNames;
56
+ const getNodeIndexes = (item, list = []) => (0, exports.getNodeProp)(item, 'index', list);
57
+ exports.getNodeIndexes = getNodeIndexes;
58
+ const createTypedPanel = (type, jaqlIndex = 0, additionalJaqlProps = {}, additionalPanelProps = {}) => {
59
+ const title = `${type}-${jaqlIndex}`;
60
+ const jaql = Object.assign({ title, datatype: 'numeric', dim: `[${title}]` }, additionalJaqlProps);
61
+ return Object.assign({ panel: type, field: { index: jaqlIndex, id: title }, jaql }, additionalPanelProps);
62
+ };
63
+ exports.createTypedPanel = createTypedPanel;
64
+ const createTypedPanels = (type, count, startIndex = 0, additionalJaqlProps = {}) => Array.from(Array(count - startIndex)).map((item, index) => {
65
+ const jaqlIndex = index + startIndex;
66
+ const title = `${type}-${jaqlIndex}`;
67
+ const jaql = Object.assign({ title, datatype: 'numeric', dim: `[${title}]` }, additionalJaqlProps);
68
+ return {
69
+ panel: type,
70
+ field: { index: jaqlIndex, id: title },
71
+ jaql,
72
+ };
73
+ });
74
+ exports.createTypedPanels = createTypedPanels;
75
+ const createTestJaql = (rows, columns, measures, scope, additionalJaqlProps = {}) => {
76
+ let metadata = [];
77
+ if (rows) {
78
+ metadata = metadata.concat(rows);
79
+ }
80
+ if (columns) {
81
+ metadata = metadata.concat(columns);
82
+ }
83
+ if (measures) {
84
+ metadata = metadata.concat(measures);
85
+ }
86
+ if (scope) {
87
+ metadata = metadata.concat(scope);
88
+ }
89
+ return Object.assign({ queryGuid: (0, uuid_1.v4)(), metadata, grandTotals: {
90
+ title: 'Grand total',
91
+ } }, additionalJaqlProps);
92
+ };
93
+ exports.createTestJaql = createTestJaql;
94
+ const delay = (time = 0, resolveValue, rejectValue) => new Promise((resolve, reject) => {
95
+ setTimeout(() => {
96
+ if (typeof rejectValue !== 'undefined') {
97
+ reject(rejectValue);
98
+ }
99
+ else {
100
+ resolve(resolveValue);
101
+ }
102
+ }, time);
103
+ });
104
+ exports.delay = delay;
@@ -0,0 +1,2 @@
1
+ export { PivotDataBuilder } from './pivot-data-builder.js';
2
+ export { SocketBuilder } from './socket-builder.js';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SocketBuilder = exports.PivotDataBuilder = void 0;
4
+ var pivot_data_builder_js_1 = require("./pivot-data-builder.js");
5
+ Object.defineProperty(exports, "PivotDataBuilder", { enumerable: true, get: function () { return pivot_data_builder_js_1.PivotDataBuilder; } });
6
+ var socket_builder_js_1 = require("./socket-builder.js");
7
+ Object.defineProperty(exports, "SocketBuilder", { enumerable: true, get: function () { return socket_builder_js_1.SocketBuilder; } });