@lingxiteam/ebe-utils 0.1.12 → 0.1.14

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.
@@ -12,15 +12,17 @@ function isHtmlElement(printable: any) {
12
12
  }
13
13
 
14
14
  const print = (options: { printable: any; type: string }) => {
15
- let { printable } = options;
16
- if (!printable) {
17
- printable = 'root';
15
+ const { printable } = options;
16
+ let printElement;
17
+ if (printable) {
18
+ printElement = (
19
+ isHtmlElement(printable)
20
+ ? printable
21
+ : document.getElementsByClassName(printable)?.[0]
22
+ ) as HTMLElement; // Check if the element exists
23
+ } else {
24
+ printElement = document.getElementById('lcdpApp-root');
18
25
  }
19
- let printElement = (
20
- isHtmlElement(printable)
21
- ? printable
22
- : document.getElementsByClassName(printable)?.[0]
23
- ) as HTMLElement; // Check if the element exists
24
26
  if (!printElement) {
25
27
  window.console.error(
26
28
  'Invalid HTML element id: '.concat(printable as string),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingxiteam/ebe-utils",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -19,7 +19,7 @@
19
19
  "@babel/types": "^7.12.12",
20
20
  "cac": "^6.7.14",
21
21
  "fs-extra": "9.x",
22
- "@lingxiteam/ebe": "0.1.12"
22
+ "@lingxiteam/ebe": "0.1.14"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"