seatable-html-page-sdk 0.0.1 → 0.0.3

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 CHANGED
@@ -3,7 +3,8 @@
3
3
  <div>
4
4
 
5
5
  [![npm package](https://img.shields.io/npm/v/seatable-html-page-sdk/latest.svg)](https://www.npmjs.org/package/seatable-html-page-sdk)
6
- [![JS size](https://img.badgesize.io/https://unpkg.com/seatable-html-page-sdk@latest/dist/index.js?label=index.js)](https://unpkg.com/seatable-html-page-sdk@latest/dist/index.js)
6
+ [![minified size](https://img.shields.io/bundlephobia/min/seatable-html-page-sdk/latest)](https://unpkg.com/seatable-html-page-sdk@latest/dist/index.js)
7
+ [![npm downloads](https://img.shields.io/npm/dm/seatable-html-page-sdk.svg?style=flat-square)](https://npm-stat.com/charts.html?package=seatable-html-page-sdk)
7
8
 
8
9
  </div>
9
10
 
@@ -13,6 +14,8 @@ SeaTable HTML Page SDK is a JavaScript library designed for embedding HTML pages
13
14
 
14
15
  ## Installation
15
16
 
17
+ ### Package manager
18
+
16
19
  Install with npm or yarn:
17
20
 
18
21
  ```bash
@@ -23,6 +26,17 @@ $ npm install seatable-html-page-sdk --save
23
26
  $ yarn add seatable-html-page-sdk
24
27
  ```
25
28
 
29
+ ### CDN
30
+
31
+ Using unpkg CDN:
32
+
33
+ ```html
34
+ <script src="https://unpkg.com/seatable-html-page-sdk@1.0.0/dist/index.js"></script>
35
+ <script>
36
+ const sdk = new HTMLPageSDK();
37
+ </script>
38
+ ```
39
+
26
40
  ## Usage
27
41
 
28
42
  ### Initialization options
@@ -38,6 +52,7 @@ const sdk = new HTMLPageSDK({
38
52
  appUuid: "your-app-uuid",
39
53
  pageId: "your-app-page-id", // create an html page in universal app first
40
54
  });
55
+ await sdk.init({});
41
56
  ```
42
57
 
43
58
  #### Production mode (iframe)
@@ -49,6 +64,7 @@ const sdk = new HTMLPageSDK({
49
64
  targetOrigin: "https://your-seatable-server.com", // Optional, defaults to '*'
50
65
  timeout: 10000, // Optional, request timeout in ms, defaults to 10000
51
66
  });
67
+ await sdk.init({});
52
68
  ```
53
69
 
54
70
  ### Basic usage
@@ -58,6 +74,7 @@ import { HTMLPageSDK } from "seatable-html-page-sdk";
58
74
 
59
75
  // Initialize SDK
60
76
  const sdk = new HTMLPageSDK(options);
77
+ await sdk.init();
61
78
 
62
79
  // list rows
63
80
  const rows = await sdk.listRows({