vita-playwright 1.2.9 → 1.2.10
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/README.md +617 -0
- package/package.json +1 -1
- package/dist/src/utils/excel_utility.d.ts +0 -8
- package/dist/src/utils/excel_utility.js +0 -71
- package/dist/src/utils/excel_utility.js.map +0 -1
- package/dist/src/utils/pdf_utility.d.ts +0 -3
- package/dist/src/utils/pdf_utility.js +0 -32
- package/dist/src/utils/pdf_utility.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
# VITA Playwright Helpers
|
|
2
|
+
VITA Playwright helpers are written in Typescript with playwright support and a focus on using common playwright helpers, Excel utilities and Pdf utilities.
|
|
3
|
+
|
|
4
|
+
## Table of Contents
|
|
5
|
+
- [VITA Playwright Helpers](#vita-playwright-helpers)
|
|
6
|
+
- [Table of Contents](#table-of-contents)
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [Node.js](#nodejs)
|
|
9
|
+
- [Helpers](#helpers)
|
|
10
|
+
- [Api Helpers](#api-helpers)
|
|
11
|
+
- [ApiHelpers.post](#apihelperspost)
|
|
12
|
+
- [ApiHelpers.get](#apihelpersget)
|
|
13
|
+
- [ApiHelpers.put](#apihelpersput)
|
|
14
|
+
- [UI Helpers](#ui-helpers)
|
|
15
|
+
- [filltheData](#fillthedata)
|
|
16
|
+
- [clickonWebElement](#clickonwebelement)
|
|
17
|
+
- [getInnerHTML](#getinnerhtml)
|
|
18
|
+
- [getInnerText](#getinnertext)
|
|
19
|
+
- [getText](#gettext)
|
|
20
|
+
- [getAttribute](#getattribute)
|
|
21
|
+
- [evaluateJS](#evaluatejs)
|
|
22
|
+
- [isElementPresent](#iselementpresent)
|
|
23
|
+
- [isElementEnabled](#iselementenabled)
|
|
24
|
+
- [waitTillElementIsVisible](#waittillelementisvisible)
|
|
25
|
+
- [getInputBoxValue](#getinputboxvalue)
|
|
26
|
+
- [downloadAFile](#downloadafile)
|
|
27
|
+
- [uploadAFile](#uploadafile)
|
|
28
|
+
- [getElementRefByRole](#getelementrefbyrole)
|
|
29
|
+
- [Utilities](#utilities)
|
|
30
|
+
- [Document Utilities](#document-utilities)
|
|
31
|
+
- [readData](#readdata)
|
|
32
|
+
- [readDataFromExcelorCSV](#readdatafromexcelorcsv)
|
|
33
|
+
- [filterData](#filterdata)
|
|
34
|
+
- [updateExcelData](#updateexceldata)
|
|
35
|
+
- [deleteAllFilesUnderDir](#deleteallfilesunderdir)
|
|
36
|
+
- [readPdfFile](#readpdffile)
|
|
37
|
+
- [Lighthouse Utilities](#lighthouse-utilities)
|
|
38
|
+
- [auditLightHouse](#auditlighthouse)
|
|
39
|
+
- [createLightHouseReport](#createlighthousereport)
|
|
40
|
+
- [Date Utilities](#date-utilities)
|
|
41
|
+
- [getDateInCustomFormat](#getdateincustomformat)
|
|
42
|
+
- [getPastDateInCustomFormat](#getpastdateincustomformat)
|
|
43
|
+
- [getFutureDateInCustomFormat](#getfuturedateincustomformat)
|
|
44
|
+
- [getMinDateFromMultipleDates](#getmindatefrommultipledates)
|
|
45
|
+
- [getMaxDateFromMultipleDates](#getmaxdatefrommultipledates)
|
|
46
|
+
- [calculateRelativeDate](#calculaterelativedate)
|
|
47
|
+
- [Database Utilities](#database-utilities)
|
|
48
|
+
- [sqlDBConnection](#sqldbconnection)
|
|
49
|
+
- [executeSqlQuery](#executesqlquery)
|
|
50
|
+
- [Data Comparisions](#data-comparisions)
|
|
51
|
+
- [Missing Features](#missing-features)
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
### Node.js
|
|
56
|
+
```bash
|
|
57
|
+
npm install vita-playwright
|
|
58
|
+
```
|
|
59
|
+
Note that vita-playwright uses ES6 features so only Node.js v4+ is supported.
|
|
60
|
+
|
|
61
|
+
## Helpers
|
|
62
|
+
|
|
63
|
+
vita-playwright has an [extensive methods](#api-reference) for working with playwright, excel and pdf. This section reviews the most common functions and use cases. Examples can also be found in the examples directory of the source code.
|
|
64
|
+
|
|
65
|
+
### Api Helpers
|
|
66
|
+
|
|
67
|
+
To use most common API methods, you first require ApiHelper class. Then you can access methods within the ApiHelper class to use API calls.
|
|
68
|
+
```ts
|
|
69
|
+
import {ApiHelper} from 'vita-playwright';
|
|
70
|
+
|
|
71
|
+
// call static methods using classname
|
|
72
|
+
const getResponse = await ApiHelper.get(url, header);
|
|
73
|
+
const putResponse = await ApiHelper.put(url, header, payload);
|
|
74
|
+
const postResponse = await ApiHelper.post(url, header, payload);
|
|
75
|
+
```
|
|
76
|
+
#### ApiHelpers.post
|
|
77
|
+
```ts
|
|
78
|
+
/**
|
|
79
|
+
* @description: Post call with endpoint, headers and data.
|
|
80
|
+
* @param {string} apiEndPoint - API end point.
|
|
81
|
+
* @param {string} headers - headers contains authentication keys, application type etc..
|
|
82
|
+
* @param {json/string} payload - payload data
|
|
83
|
+
* @returns {Promise<reponse>} - returns Promise of reponse
|
|
84
|
+
*/
|
|
85
|
+
import { ApiHelper } from "vita-playwright";
|
|
86
|
+
const headers= {
|
|
87
|
+
"content-type": "application/json; charset=utf-8",
|
|
88
|
+
"Accept": "*/*"
|
|
89
|
+
};
|
|
90
|
+
const payload = {
|
|
91
|
+
"key":"value"
|
|
92
|
+
};
|
|
93
|
+
const apiEndPoint = "https://admin.googleapis.com/discovery/rest?version=datatransfer_v1";
|
|
94
|
+
|
|
95
|
+
await ApiHelper.post(
|
|
96
|
+
apiEndPoint,
|
|
97
|
+
headers,
|
|
98
|
+
payload
|
|
99
|
+
);
|
|
100
|
+
```
|
|
101
|
+
#### ApiHelpers.get
|
|
102
|
+
```ts
|
|
103
|
+
/**
|
|
104
|
+
* @description: Get call with endpoint and headers.
|
|
105
|
+
* @param {string} apiEndPoint - API end point.
|
|
106
|
+
* @param {string} headers - headers contains authentication keys, application type etc..
|
|
107
|
+
* @returns {Promise<reponse>} - returns Promise of reponse
|
|
108
|
+
*/
|
|
109
|
+
import { ApiHelper } from "vita-playwright";
|
|
110
|
+
const headers= {
|
|
111
|
+
"content-type": "application/json; charset=utf-8",
|
|
112
|
+
"Accept": "*/*"
|
|
113
|
+
};
|
|
114
|
+
const apiEndPoint = "https://admin.googleapis.com/discovery/rest?version=datatransfer_v1";
|
|
115
|
+
|
|
116
|
+
await ApiHelper.get(
|
|
117
|
+
apiEndPoint,
|
|
118
|
+
headers,
|
|
119
|
+
);
|
|
120
|
+
```
|
|
121
|
+
#### ApiHelpers.put
|
|
122
|
+
```ts
|
|
123
|
+
/**
|
|
124
|
+
* @description: Put call with endpoint, headers and data and it will insert the data.
|
|
125
|
+
* @param {string} apiEndPoint - API end point.
|
|
126
|
+
* @param {string} headers - headers contains authentication keys, application type etc..
|
|
127
|
+
* @param {string} payload - payload data
|
|
128
|
+
* @returns {Promise<reponse>} - returns Promise of reponse
|
|
129
|
+
*/
|
|
130
|
+
import { ApiHelper } from "vita-playwright";
|
|
131
|
+
const headers= {
|
|
132
|
+
"content-type": "application/json; charset=utf-8",
|
|
133
|
+
"Accept": "*/*"
|
|
134
|
+
};
|
|
135
|
+
const data = {
|
|
136
|
+
"key":"value"
|
|
137
|
+
};
|
|
138
|
+
const apiEndPoint = "https://admin.googleapis.com/discovery/rest?version=datatransfer_v1";
|
|
139
|
+
|
|
140
|
+
await ApiHelper.put(
|
|
141
|
+
apiEndPoint,
|
|
142
|
+
headers,
|
|
143
|
+
data
|
|
144
|
+
);
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### UI Helpers
|
|
148
|
+
|
|
149
|
+
Either you can create object or extends UIHelper to use common ui helpers by passing locators
|
|
150
|
+
```ts
|
|
151
|
+
import {UIHelper} from 'vita-playwright';
|
|
152
|
+
|
|
153
|
+
const uihelper = new UIHelpers();
|
|
154
|
+
// call static methods using classname
|
|
155
|
+
await uihelper.filltheData(locator, data);
|
|
156
|
+
await uihelper.clickonWebElement(locator);
|
|
157
|
+
await uihelper.getInnerHTML(locator);
|
|
158
|
+
await uihelper.getInnerText(locator);
|
|
159
|
+
await uihelper.getText(locator);
|
|
160
|
+
await uihelper.getAttribute(locator, attribute);
|
|
161
|
+
await uihelper.evaluateJS(jsDOM);
|
|
162
|
+
const isElementPresent = await uihelper.isElementPresent(locator);
|
|
163
|
+
const isElementEnabled = await uihelper.isElementEnabled(locator);
|
|
164
|
+
await waitTillElementIsVisible(elementSelector, waitTime);
|
|
165
|
+
const inputBoxValue = await uihelper.getIputBoxValue(locator);
|
|
166
|
+
await downloadAFile(downloadButton, downloadFilePath);
|
|
167
|
+
await uploadAFile(uploadButton, uploadFilePath);
|
|
168
|
+
const elementReference = await getElementRefByRole(roleType, roleName);
|
|
169
|
+
```
|
|
170
|
+
__Note__: getElementRefByRole() method will work for all types of roles, example: button, combobox, main, checkbox and radiobutton.
|
|
171
|
+
|
|
172
|
+
#### filltheData
|
|
173
|
+
```ts
|
|
174
|
+
/**
|
|
175
|
+
* @description: sets the text in inputbox.
|
|
176
|
+
* @param {string} locator - css selector/xpath of the inputbox.
|
|
177
|
+
* @param {string} data - Text to be set to inputbox
|
|
178
|
+
* @returns {Promise<void>} - returns Promise of void
|
|
179
|
+
*/
|
|
180
|
+
async filltheData(locator: any, data: any);
|
|
181
|
+
|
|
182
|
+
Usage:
|
|
183
|
+
import { UIHelper } from 'vita-playwright'
|
|
184
|
+
class UserClass extends UIHelper{
|
|
185
|
+
await this.filltheData("locator/xpath/css selector", "data to set into inputbox");
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
#### clickonWebElement
|
|
189
|
+
```ts
|
|
190
|
+
/**
|
|
191
|
+
* @description: click the given locator element.
|
|
192
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
193
|
+
* @returns {Promise<void>} - returns Promise of void
|
|
194
|
+
*/
|
|
195
|
+
async clickonWebElement(locator: any)
|
|
196
|
+
|
|
197
|
+
Usage:
|
|
198
|
+
import { UIHelper } from 'vita-playwright'
|
|
199
|
+
class UserClass extends UIHelper{
|
|
200
|
+
await this.clickonWebElement("locator/xpath/css selector");
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
#### getInnerHTML
|
|
204
|
+
```ts
|
|
205
|
+
/**
|
|
206
|
+
* @description: returns inner html of locator element.
|
|
207
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
208
|
+
* @returns {string} - returns inner html string
|
|
209
|
+
*/
|
|
210
|
+
async getInnerHTML(locator: any)
|
|
211
|
+
|
|
212
|
+
Usage:
|
|
213
|
+
import { UIHelper } from 'vita-playwright'
|
|
214
|
+
class UserClass extends UIHelper{
|
|
215
|
+
console.log(await this.getInnerHTML("locator/xpath/css selector"));
|
|
216
|
+
//output: inner HTML of given selector
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
#### getInnerText
|
|
220
|
+
```ts
|
|
221
|
+
/**
|
|
222
|
+
* @description: returns inner text of locator element.
|
|
223
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
224
|
+
* @returns {string} - returns inner text string
|
|
225
|
+
*/
|
|
226
|
+
async getInnerText(locator: any)
|
|
227
|
+
|
|
228
|
+
Usage:
|
|
229
|
+
import { UIHelper } from 'vita-playwright'
|
|
230
|
+
class UserClass extends UIHelper{
|
|
231
|
+
console.log(await this.getInnerText("locator/xpath/css selector"));
|
|
232
|
+
//output: inner Text of given selector
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
#### getText
|
|
236
|
+
```ts
|
|
237
|
+
/**
|
|
238
|
+
* @description: returns text of locator element.
|
|
239
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
240
|
+
* @returns {string} - returns text string
|
|
241
|
+
*/
|
|
242
|
+
async getText(locator: any)
|
|
243
|
+
|
|
244
|
+
Usage:
|
|
245
|
+
import { UIHelper } from 'vita-playwright'
|
|
246
|
+
class UserClass extends UIHelper{
|
|
247
|
+
console.log(await this.getText("locator/xpath/css selector"));
|
|
248
|
+
//output: Text of given selector
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
#### getAttribute
|
|
252
|
+
```ts
|
|
253
|
+
/**
|
|
254
|
+
* @description: returns given attribute value of locator element.
|
|
255
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
256
|
+
* @param {string} attribute - html attribute to get value
|
|
257
|
+
* @returns {string} - returns text string
|
|
258
|
+
*/
|
|
259
|
+
async getAttribute(locator: any, attribute: any)
|
|
260
|
+
|
|
261
|
+
Usage:
|
|
262
|
+
import { UIHelper } from 'vita-playwright'
|
|
263
|
+
class UserClass extends UIHelper{
|
|
264
|
+
console.log(await this.getAttribute("locator/xpath/css selector", "class"));
|
|
265
|
+
//output: returns locator class value
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
#### evaluateJS
|
|
269
|
+
```ts
|
|
270
|
+
// will be added in next versions.
|
|
271
|
+
```
|
|
272
|
+
#### isElementPresent
|
|
273
|
+
```ts
|
|
274
|
+
/**
|
|
275
|
+
* @description: verifies given locator element is displayed or not.
|
|
276
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
277
|
+
* @returns {boolean} - returns true/false
|
|
278
|
+
*/
|
|
279
|
+
async isElementPresent(locator: any)
|
|
280
|
+
|
|
281
|
+
Usage:
|
|
282
|
+
import { UIHelper } from 'vita-playwright'
|
|
283
|
+
class UserClass extends UIHelper{
|
|
284
|
+
console.log(await this.isElementPresent("locator/xpath/css selector"));
|
|
285
|
+
//output: returns true if given locator is present in the dom
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
#### isElementEnabled
|
|
289
|
+
```ts
|
|
290
|
+
/**
|
|
291
|
+
* @description: verifies given locator element is enabled or not.
|
|
292
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
293
|
+
* @returns {boolean} - returns true/false
|
|
294
|
+
*/
|
|
295
|
+
async isElementEnabled(locator: any)
|
|
296
|
+
|
|
297
|
+
Usage:
|
|
298
|
+
import { UIHelper } from 'vita-playwright'
|
|
299
|
+
class UserClass extends UIHelper{
|
|
300
|
+
console.log(await this.isElementEnabled("locator/xpath/css selector"));
|
|
301
|
+
//output: returns true if given locator is enabled in the dom
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
#### waitTillElementIsVisible
|
|
305
|
+
```ts
|
|
306
|
+
/**
|
|
307
|
+
* @description: waits until locator element visibles.
|
|
308
|
+
* @param {elementReference} elementSelector - element reference.
|
|
309
|
+
* @param {number} wait time
|
|
310
|
+
* @returns {Promise<void>} - returns Promise of void
|
|
311
|
+
*/
|
|
312
|
+
async waitTillElementIsVisible(elementSelector: any, waitTime = 60000)
|
|
313
|
+
|
|
314
|
+
Usage:
|
|
315
|
+
import { UIHelper } from 'vita-playwright'
|
|
316
|
+
class UserClass extends UIHelper{
|
|
317
|
+
await this.waitTillElementIsVisible("locator/xpath/css selector", 100000);
|
|
318
|
+
//output: wait for given locator to be available in the dom
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
#### getInputBoxValue
|
|
322
|
+
```ts
|
|
323
|
+
/**
|
|
324
|
+
* @description: returns value of inputbox.
|
|
325
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
326
|
+
* @returns {string} - returns text string
|
|
327
|
+
*/
|
|
328
|
+
async getInputBoxValue(locator: any)
|
|
329
|
+
|
|
330
|
+
Usage:
|
|
331
|
+
import { UIHelper } from 'vita-playwright'
|
|
332
|
+
class UserClass extends UIHelper{
|
|
333
|
+
console.log(await this.getInputBoxValue("locator/xpath/css selector"));
|
|
334
|
+
//output: returns inputbox value
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
#### downloadAFile
|
|
338
|
+
```ts
|
|
339
|
+
/**
|
|
340
|
+
* @description: wait untill download process completes and save file with custom name.
|
|
341
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
342
|
+
* @param {string} filePath - Complete path of the excel file, example: C:/resources/****.xlsx.
|
|
343
|
+
* @returns {Promise<void>} - returns Promise of void
|
|
344
|
+
*/
|
|
345
|
+
async downloadAFile(downloadButton: String, filePath: string)
|
|
346
|
+
|
|
347
|
+
Usage:
|
|
348
|
+
import { UIHelper } from 'vita-playwright'
|
|
349
|
+
class UserClass extends UIHelper{
|
|
350
|
+
const filePath = path.resolve(config.use.downloadsPath, downloadFileName);
|
|
351
|
+
await this.downloadAFile(downloadButtonRef, filePath);
|
|
352
|
+
//will wait for download completes and saves in to given filepath with custom name
|
|
353
|
+
}
|
|
354
|
+
```
|
|
355
|
+
#### uploadAFile
|
|
356
|
+
```ts
|
|
357
|
+
/**
|
|
358
|
+
* @description: wait untill upload process completes and save file with custom name.
|
|
359
|
+
* @param {string} locator - css selector/xpath of the element.
|
|
360
|
+
* @param {string} filePath - Complete path of the excel file, example: C:/resources/****.xlsx.
|
|
361
|
+
* @returns {Promise<void>} - returns Promise of void
|
|
362
|
+
*/
|
|
363
|
+
async uploadAFile(uploadButton: String, uploadFilePath: String)
|
|
364
|
+
|
|
365
|
+
Usage:
|
|
366
|
+
import { UIHelper } from 'vita-playwright'
|
|
367
|
+
class UserClass extends UIHelper{
|
|
368
|
+
const filePath = path.resolve(config.use.downloadsPath, UploadFileName);
|
|
369
|
+
await this.uploadAFile(UploadButtonRef, filePath);
|
|
370
|
+
//will wait for upload completes
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
#### getElementRefByRole
|
|
374
|
+
```ts
|
|
375
|
+
/**
|
|
376
|
+
* @description: will perform click action.
|
|
377
|
+
* @param {string} roleType - example: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem".
|
|
378
|
+
* @param {string} roleName - name of the element.
|
|
379
|
+
* @returns {Promise<void>} - returns Promise of void
|
|
380
|
+
*/
|
|
381
|
+
async getElementRefByRole(roleType: string, roleName: string)
|
|
382
|
+
|
|
383
|
+
Usage:
|
|
384
|
+
import { UIHelper } from 'vita-playwright'
|
|
385
|
+
class UserClass extends UIHelper{
|
|
386
|
+
await this.getElementRefByRole("link", "Dashboard");
|
|
387
|
+
await this.getElementRefByRole("button", "Jobs");
|
|
388
|
+
await this.getElementRefByRole("checkbox", "jobName");
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
## Utilities
|
|
393
|
+
vita-playwright also provides utilities for Excel, Pdf, Date, Email and Lighthosue for perfomace.
|
|
394
|
+
|
|
395
|
+
### Document Utilities
|
|
396
|
+
|
|
397
|
+
You can access rows and columns in order to change size, hide/show, or access cells within:
|
|
398
|
+
|
|
399
|
+
#### readData
|
|
400
|
+
```ts
|
|
401
|
+
/**
|
|
402
|
+
* @description: it will take excel file path as input and will return excel Workbook object.
|
|
403
|
+
* @param {string} filePath - Complete path of the excel file, example: C:/resources/****.xlsx.
|
|
404
|
+
* @returns {Promise<Workbook>} - returns Promise, if we resolves and will get Workbook object
|
|
405
|
+
*/
|
|
406
|
+
static async readData(filePath: string)
|
|
407
|
+
```
|
|
408
|
+
#### readDataFromExcelorCSV
|
|
409
|
+
```ts
|
|
410
|
+
/**
|
|
411
|
+
* @description: it will take excel file path and sheetname as input and will return array of objects.
|
|
412
|
+
* @param {string} filePath - Complete path of the excel file, example: C:/resources/****.xlsx.
|
|
413
|
+
* @param {string} sheetname - name of the sheet name and it is optional. For CSV files no need pass this parameter.
|
|
414
|
+
* @returns {Promise<Array<Object>>} - returns Promise, if we resolves and will get Array of Json objects.
|
|
415
|
+
* [{startDate: '****',endDate: '****', employeeId: '****',CompanyToken: '******'}]
|
|
416
|
+
*/
|
|
417
|
+
static async readDataFromExcelorCSV(filePath: string, sheetname: string)
|
|
418
|
+
```
|
|
419
|
+
#### filterData
|
|
420
|
+
```ts
|
|
421
|
+
/**
|
|
422
|
+
* @description: it will filter excel data and will return filtered array of objects.
|
|
423
|
+
* @param {string} filePath - Complete path of the excel file, example: C:/resources/****.xlsx.
|
|
424
|
+
* @param {string} sheetname - name of the sheet name and it is optional. For CSV files no need pass this parameter.
|
|
425
|
+
* @param {Object} filterObject - {column Name:Row value} key:value pair. example: {startDate: '****'}
|
|
426
|
+
* @returns {Promise<Array<Object>>} - returns Promise, if we resolves and will get filtered Array of Json objects.
|
|
427
|
+
* [{startDate: '****',endDate: '****', employeeId: '****',CompanyToken: '******'}]
|
|
428
|
+
*/
|
|
429
|
+
static async filterData(filePath: string, sheetname: string)
|
|
430
|
+
```
|
|
431
|
+
#### updateExcelData
|
|
432
|
+
```ts
|
|
433
|
+
/**
|
|
434
|
+
* @description: it will modify/update excel file based on input data.
|
|
435
|
+
* @param {string} filePath - Complete path of the excel file, example: C:/resources/****.xlsx.
|
|
436
|
+
* @param {string} sheetname - name of the sheet name and it is optional. For CSV files no need pass this parameter.
|
|
437
|
+
* @param {Array<Object>} exportData - excel modify data. example: [{startDate: '****',endDate: '****', employeeId: '****',CompanyToken: '******'}]
|
|
438
|
+
* @returns {Promise<void>} - returns void promise.
|
|
439
|
+
*/
|
|
440
|
+
static async updateExcelData(filePath: string, sheetname: string)
|
|
441
|
+
```
|
|
442
|
+
#### deleteAllFilesUnderDir
|
|
443
|
+
```ts
|
|
444
|
+
/**
|
|
445
|
+
* @description: it will delete all files under given directory.
|
|
446
|
+
* @param {string} dirPath - Complete path of the directory which contain file, example: C:/resources.
|
|
447
|
+
* @returns {Promise<void>} - returns void promise.
|
|
448
|
+
*/
|
|
449
|
+
static async deleteAllFilesUnderDir(filePath: string, sheetname: string)
|
|
450
|
+
```
|
|
451
|
+
#### readPdfFile
|
|
452
|
+
```ts
|
|
453
|
+
/**
|
|
454
|
+
* @description: it will take pdf file path as input and will return array of strings(each each line in pdf is each item in result array).
|
|
455
|
+
* @param {string} filePath - Complete path of the excel file, example: C:/resources/****.pdf.
|
|
456
|
+
* @returns { Array<string>} - returns array os string, each string represents each line in pdf
|
|
457
|
+
*/
|
|
458
|
+
static async readPdfFile(filePath: string)
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### Lighthouse Utilities
|
|
462
|
+
Lighthouse utilities are used to perform Lighthouse performace testing provided by Google.
|
|
463
|
+
|
|
464
|
+
#### auditLightHouse
|
|
465
|
+
```ts
|
|
466
|
+
/**
|
|
467
|
+
* @description: it will take url of the web page and will calculates the performance of that web page and compare with given customThresholds. If any threashold doesn't meet the minimum value, then it test will be fail.
|
|
468
|
+
* @param {string} pageurl - url of the given page which needs to be calculated.
|
|
469
|
+
* @param {string} deviceType - type of device i.e desktop or mobile.
|
|
470
|
+
* @param {string} filename - to save the result the filename.
|
|
471
|
+
* @param {object} customThresholds - It is optional threshold object. example: {performance: 80,accessibility: 70,
|
|
472
|
+
'best-practices': 70,seo: 70, pwa: 70,} these are the default values.
|
|
473
|
+
* @param {object} format - This is optional. example: { html: true, csv:true, json: true}.
|
|
474
|
+
* @returns {Promise<void>} - returns void promise.
|
|
475
|
+
*/
|
|
476
|
+
static async auditLightHouse(pageurl: string, deviceType, filename, customThresholds = {
|
|
477
|
+
performance: 80,
|
|
478
|
+
accessibility: 70,
|
|
479
|
+
'best-practices': 70,
|
|
480
|
+
seo: 70,
|
|
481
|
+
pwa: 70,
|
|
482
|
+
}, format = { html: true })
|
|
483
|
+
|
|
484
|
+
"Usage with new browser context:"
|
|
485
|
+
test("light house testing "+vurl, async ({ page }) => {
|
|
486
|
+
const browser = await playwright['chromium'].launch({
|
|
487
|
+
args: ['--start-maximized', '--remote-debugging-port=9222'],
|
|
488
|
+
channel:'chrome'
|
|
489
|
+
});
|
|
490
|
+
const context = await browser.newContext();
|
|
491
|
+
const page = await context.newPage();
|
|
492
|
+
page.goto(url);
|
|
493
|
+
await LightHouseUtility.auditLightHouse(url, "desktop", url.split('/').join('_')+'.html');
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
"Usage with default playwright page:"
|
|
497
|
+
Please set port in playwright.config.ts
|
|
498
|
+
args: ['--start-maximized','--remote-debugging-port=9222']
|
|
499
|
+
|
|
500
|
+
calling auditLightHouse from test
|
|
501
|
+
test("light house testing " + url, async ({ page }) => {
|
|
502
|
+
page.goto(url);
|
|
503
|
+
await LightHouseUtility.auditLightHouse(url, "desktop", url.split('/').join('_')+'.html');
|
|
504
|
+
});
|
|
505
|
+
```
|
|
506
|
+
#### createLightHouseReport
|
|
507
|
+
```ts
|
|
508
|
+
/**
|
|
509
|
+
* @description: it creates new index.html file which has links to all pages htnl files.
|
|
510
|
+
* @param {string} dirPath - Complete path of the directory which contains Lighthouse performace html files, example: C:/lighthouse.
|
|
511
|
+
* @param {String} savefilepath - Based on files in directory, new index.html file will be created. To save that index.html file in given filepath. example: C:/lighthouse/complateReport/
|
|
512
|
+
* @param {String} applicationName - Name of the Application
|
|
513
|
+
* @returns {Promise<void>} - returns void promise.
|
|
514
|
+
*/
|
|
515
|
+
static async createLightHouseReport(filePath: string, sheetname: string)
|
|
516
|
+
|
|
517
|
+
Usage:
|
|
518
|
+
await LightHouseUtility.createLightHouseReport(process.cwd() + '/lighthouse/pages', process.cwd() + '/lighthouse/index.html', applicationName);
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
### Date Utilities
|
|
522
|
+
Date related utilities
|
|
523
|
+
|
|
524
|
+
```ts
|
|
525
|
+
// will be added in next versions.
|
|
526
|
+
```
|
|
527
|
+
#### getDateInCustomFormat
|
|
528
|
+
```ts
|
|
529
|
+
/**
|
|
530
|
+
* @description: returns date in required format.
|
|
531
|
+
* @param {string} date - date in the form of string, example: 01/01/2023.
|
|
532
|
+
* @param {string} format - format od date, example: DD/MM/YYYY.
|
|
533
|
+
* @returns {string} - returns date in given format.
|
|
534
|
+
*/
|
|
535
|
+
static getDateInCustomFormat(date:any, format: string)
|
|
536
|
+
```
|
|
537
|
+
#### getPastDateInCustomFormat
|
|
538
|
+
```ts
|
|
539
|
+
/**
|
|
540
|
+
* @description: subtracts no of days|months|years|hours|minutes|seconds from given date.
|
|
541
|
+
* @param {string} date - date in the form of string, example: 01/01/2023.
|
|
542
|
+
* @param {string} format - format od date, example: DD/MM/YYYY.
|
|
543
|
+
* @param {string} durationType - example days, months, years, hours, minutes, seconds.
|
|
544
|
+
* @param {string} duration - no of days|months|years|hours|minutes|seconds.
|
|
545
|
+
* @returns {string} - returns date in given format.
|
|
546
|
+
*/
|
|
547
|
+
static getPastDateInCustomFormat(date: any, format: string, durationType:DurationInputArg2, duration: DurationInputArg1)
|
|
548
|
+
```
|
|
549
|
+
#### getFutureDateInCustomFormat
|
|
550
|
+
```ts
|
|
551
|
+
/**
|
|
552
|
+
* @description: adds no of days|months|years|hours|minutes|seconds from given date.
|
|
553
|
+
* @param {string} date - date in the form of string, example: 01/01/2023.
|
|
554
|
+
* @param {string} format - format od date, example: DD/MM/YYYY.
|
|
555
|
+
* @param {string} durationType - example days, months, years, hours, minutes, seconds.
|
|
556
|
+
* @param {string} duration - no of days|months|years|hours|minutes|seconds.
|
|
557
|
+
* @returns {string} - returns date in given format.
|
|
558
|
+
*/
|
|
559
|
+
static getFutureDateInCustomFormat(date: any, format: string, durationType:DurationInputArg2, duration: DurationInputArg1)
|
|
560
|
+
```
|
|
561
|
+
#### getMinDateFromMultipleDates
|
|
562
|
+
```ts
|
|
563
|
+
/**
|
|
564
|
+
* @description: return min date from given dates.
|
|
565
|
+
* @param {Array<object<date,format>>} datesArrayObject - array of dates in form of object example: [{date:10/01/2023, format: "DD/MM/YYYY"}, {date:20/01/2023, format: "DD/MM/YYYY"}].
|
|
566
|
+
* @returns {string} - return min date amount given dates example: 10/01/2023.
|
|
567
|
+
*/
|
|
568
|
+
static getMinDateFromMultipleDates(datesArrayObject: any)
|
|
569
|
+
```
|
|
570
|
+
#### getMaxDateFromMultipleDates
|
|
571
|
+
```ts
|
|
572
|
+
/**
|
|
573
|
+
* @description: return max date from given dates.
|
|
574
|
+
* @param {Array<object<date,format>>} datesArrayObject - array of dates in form of object example: [{date:10/01/2023, format: "DD/MM/YYYY"}, {date:20/01/2023, format: "DD/MM/YYYY"}].
|
|
575
|
+
* @returns {string} - return max date amount given dates example: 20/01/2023.
|
|
576
|
+
*/
|
|
577
|
+
```
|
|
578
|
+
#### calculateRelativeDate
|
|
579
|
+
```ts
|
|
580
|
+
/**
|
|
581
|
+
* @description: returns no of days "lessthan|Greaterthan" from given date.
|
|
582
|
+
* @param {string} fromDate - date in the form of string, example: 01/01/2023.
|
|
583
|
+
* @param {string} format - format od date, example: DD/MM/YYYY.
|
|
584
|
+
* @returns {string} - returns string which is no of days "lessthan|Greaterthan" from given date.
|
|
585
|
+
*/
|
|
586
|
+
static calculateRelativeDate(fromDate: any, format: string)
|
|
587
|
+
```
|
|
588
|
+
### Database Utilities
|
|
589
|
+
Utilities related SQL server utilities
|
|
590
|
+
|
|
591
|
+
#### sqlDBConnection
|
|
592
|
+
```ts
|
|
593
|
+
/**
|
|
594
|
+
* @description: establish the connection with database.
|
|
595
|
+
* @param {string} configuration - example: {server: string, database: string, username:string, password: string, portNumber: number}.
|
|
596
|
+
* @returns {Connection} - returns connection object.
|
|
597
|
+
*/
|
|
598
|
+
static sqlDBConnection(fromDate: any, format: string)
|
|
599
|
+
```
|
|
600
|
+
#### executeSqlQuery
|
|
601
|
+
```ts
|
|
602
|
+
/**
|
|
603
|
+
* @description: establish the connection with database.
|
|
604
|
+
* @param {string} connectionObj - connection object which will come from sqlDBConnection()
|
|
605
|
+
* @param {string} queryString - query to execute
|
|
606
|
+
* @returns {Connection} - returns connection object.
|
|
607
|
+
*/
|
|
608
|
+
static async executeSqlQuery(connectionObj: any, queryString: any)
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
### Data Comparisions
|
|
612
|
+
TODO: need to add Data Comparisions Utilities
|
|
613
|
+
```ts
|
|
614
|
+
// will be added in next versions
|
|
615
|
+
```
|
|
616
|
+
## Missing Features
|
|
617
|
+
There are many features of playwright and other node modules needs to be added.
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import XLSX from 'xlsx';
|
|
2
|
-
export declare class ExcelUtility {
|
|
3
|
-
static readData(filePath: string): Promise<XLSX.WorkBook>;
|
|
4
|
-
static readDataFromExcelorCSV(filePath: string, sheetname: string): Promise<unknown[]>;
|
|
5
|
-
static filterData(filePath: string, sheetName: string, filterObject: object): Promise<unknown[]>;
|
|
6
|
-
static updateExcelData(filePath: string, sheetName: string, exportData: Array<object>): Promise<void>;
|
|
7
|
-
static deleteAllFilesUnderDir(dirPath: string): Promise<void>;
|
|
8
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.ExcelUtility = void 0;
|
|
16
|
-
const xlsx_1 = __importDefault(require("xlsx"));
|
|
17
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
18
|
-
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
19
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
20
|
-
class ExcelUtility {
|
|
21
|
-
static readData(filePath) {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
return xlsx_1.default.readFile(filePath, { cellDates: true, bookVBA: true, sheetStubs: true, cellNF: true });
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
static readDataFromExcelorCSV(filePath, sheetname) {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
const jsonOpts = {
|
|
29
|
-
raw: false,
|
|
30
|
-
dateNF: `yyyy/mm/dd` // <--- need dateNF in sheet_to_json options (note the escape chars)
|
|
31
|
-
};
|
|
32
|
-
const workbook = yield ExcelUtility.readData(filePath);
|
|
33
|
-
const sheet_name_list = workbook.SheetNames;
|
|
34
|
-
sheetname = (sheetname === undefined ? sheet_name_list[0] : sheetname);
|
|
35
|
-
return xlsx_1.default.utils.sheet_to_json(workbook.Sheets[sheet_name_list[0]], jsonOpts);
|
|
36
|
-
// const tempTwoDimentionalArr = new Array(_.keys(excelData[0]).length);
|
|
37
|
-
// for (var i = 0; i < tempTwoDimentionalArr.length; i++) {
|
|
38
|
-
// tempTwoDimentionalArr[i] = new Array();
|
|
39
|
-
// }
|
|
40
|
-
// return _.map(excelData, function (obj) {
|
|
41
|
-
// return _.reduce(_.keys(excelData[0]), function (result, columnName, index) {
|
|
42
|
-
// tempTwoDimentionalArr[index].push(obj[columnName])
|
|
43
|
-
// result[columnName] = tempTwoDimentionalArr[index];
|
|
44
|
-
// return result;
|
|
45
|
-
// }, {})
|
|
46
|
-
// })[0];
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
static filterData(filePath, sheetName, filterObject) {
|
|
50
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
let fileData = yield ExcelUtility.readData(filePath);
|
|
52
|
-
return lodash_1.default.filter(xlsx_1.default.utils.sheet_to_json(fileData.Sheets[sheetName]), filterObject);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
static updateExcelData(filePath, sheetName, exportData) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
const workbook = yield ExcelUtility.readData(filePath);
|
|
58
|
-
workbook.Sheets[sheetName] = xlsx_1.default.utils.json_to_sheet(exportData);
|
|
59
|
-
xlsx_1.default.writeFile(workbook, filePath);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
static deleteAllFilesUnderDir(dirPath) {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
for (const file of yield promises_1.default.readdir(dirPath)) {
|
|
65
|
-
yield promises_1.default.unlink(node_path_1.default.join(dirPath, file));
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
exports.ExcelUtility = ExcelUtility;
|
|
71
|
-
//# sourceMappingURL=excel_utility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"excel_utility.js","sourceRoot":"","sources":["../../../src/utils/excel_utility.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,oDAAuB;AACvB,gEAAkC;AAClC,0DAA6B;AAC7B,MAAa,YAAY;IAErB,MAAM,CAAO,QAAQ,CAAC,QAAgB;;YAClC,OAAO,cAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QACvG,CAAC;KAAA;IAED,MAAM,CAAO,sBAAsB,CAAC,QAAgB,EAAE,SAAiB;;YACnE,MAAM,QAAQ,GAAG;gBACb,GAAG,EAAE,KAAK;gBACV,MAAM,EAAE,YAAY,CAAC,oEAAoE;aAC1F,CAAA;YACH,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACvD,MAAM,eAAe,GAAG,QAAQ,CAAC,UAAU,CAAC;YAC5C,SAAS,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YACvE,OAAO,cAAI,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;YAE/E,wEAAwE;YACxE,2DAA2D;YAC3D,8CAA8C;YAC9C,IAAI;YACJ,2CAA2C;YAC3C,mFAAmF;YACnF,6DAA6D;YAC7D,6DAA6D;YAC7D,yBAAyB;YACzB,aAAa;YACb,SAAS;QACb,CAAC;KAAA;IAED,MAAM,CAAO,UAAU,CAAC,QAAgB,EAAE,SAAiB,EAAE,YAAoB;;YAC7E,IAAI,QAAQ,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACrD,OAAO,gBAAC,CAAC,MAAM,CAAC,cAAI,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,YAAY,CAAC,CAAA;QACvF,CAAC;KAAA;IAED,MAAM,CAAO,eAAe,CAAC,QAAgB,EAAE,SAAiB,EAAE,UAAyB;;YACvF,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACvD,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,cAAI,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAClE,cAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACvC,CAAC;KAAA;IAED,MAAM,CAAO,sBAAsB,CAAC,OAAe;;YAC/C,KAAK,MAAM,IAAI,IAAI,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;gBAC1C,MAAM,kBAAE,CAAC,MAAM,CAAC,mBAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;aAC7C;QACL,CAAC;KAAA;CAGJ;AA/CD,oCA+CC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PDFUtility = void 0;
|
|
13
|
-
const pdfreader_1 = require("pdfreader");
|
|
14
|
-
class PDFUtility {
|
|
15
|
-
static readPdfFile(filePath) {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
const items = [];
|
|
18
|
-
return new Promise((resolve, reject) => {
|
|
19
|
-
new pdfreader_1.PdfReader().parseFileItems(filePath, (err, item) => {
|
|
20
|
-
if (err)
|
|
21
|
-
reject(err);
|
|
22
|
-
else if (!item)
|
|
23
|
-
resolve(items);
|
|
24
|
-
else if (item.text)
|
|
25
|
-
items.push(item.text);
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.PDFUtility = PDFUtility;
|
|
32
|
-
//# sourceMappingURL=pdf_utility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pdf_utility.js","sourceRoot":"","sources":["../../../src/utils/pdf_utility.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAsC;AACtC,MAAa,UAAU;IAEnB,MAAM,CAAO,WAAW,CAAC,QAAgB;;YACrC,MAAM,KAAK,GAAG,EAAE,CAAC;YACjB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACnC,IAAI,qBAAS,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;oBACnD,IAAI,GAAG;wBAAE,MAAM,CAAC,GAAG,CAAC,CAAC;yBAChB,IAAI,CAAC,IAAI;wBAAE,OAAO,CAAC,KAAK,CAAC,CAAC;yBAC1B,IAAI,IAAI,CAAC,IAAI;wBAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC9C,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CACJ;AAZD,gCAYC"}
|