@blockquote-web-components/blockquote-base-embedded-webview 1.0.4 → 1.0.7
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 +81 -82
- package/package.json +8 -7
- package/src/BlockquoteBaseEmbeddedWebview.js +5 -5
package/README.md
CHANGED
|
@@ -1,63 +1,3 @@
|
|
|
1
|
-
# blockquote-base-embedded-webview
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
`blockquote-base-embedded-webview` offers a responsive display using individual HTML files as content with the different use cases to be displayed.
|
|
6
|
-
It will create a `select` tag with the provided demo HTML files and add the `[data-embedded]` attribute to the loaded body tag.
|
|
7
|
-
|
|
8
|
-
## Basic usage
|
|
9
|
-
|
|
10
|
-
```html
|
|
11
|
-
<blockquote-base-embedded-webview heading="My demo title">
|
|
12
|
-
<template data-src="./basic.html" data-option="Basis"></template>
|
|
13
|
-
<template data-src="./complex.html" data-option="Complex"></template>
|
|
14
|
-
</blockquote-base-embedded-webview>
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## basic.html
|
|
18
|
-
|
|
19
|
-
```html
|
|
20
|
-
<!DOCTYPE html>
|
|
21
|
-
<html lang="en">
|
|
22
|
-
<head>
|
|
23
|
-
<title>Demo Basic</title>
|
|
24
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
25
|
-
<meta charset="utf-8" />
|
|
26
|
-
<style>
|
|
27
|
-
:root {
|
|
28
|
-
font: normal medium/1.25 sans-serif;
|
|
29
|
-
}
|
|
30
|
-
body {
|
|
31
|
-
margin: 0;
|
|
32
|
-
}
|
|
33
|
-
[data-embedded] .hidden {
|
|
34
|
-
display: none;
|
|
35
|
-
}
|
|
36
|
-
</style>
|
|
37
|
-
</head>
|
|
38
|
-
<body>
|
|
39
|
-
<h1 class="hidden">Heading</h1>
|
|
40
|
-
<p>Basic Demo</p>
|
|
41
|
-
</body>
|
|
42
|
-
</html>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Exports
|
|
46
|
-
|
|
47
|
-
- BlockquoteBaseEmbeddedWebview
|
|
48
|
-
|
|
49
|
-
## Properties
|
|
50
|
-
|
|
51
|
-
| Property | Attribute | Type | Default | Description |
|
|
52
|
-
| -------------------- | ---------------------- | --------- | ------- | --------------------------------------- |
|
|
53
|
-
| `heading` | `heading` | `String` | "" | The heading of the webview. |
|
|
54
|
-
| `headingLevel` | `heading-level` | `Number` | 1 | Heading level from 1 to 6 |
|
|
55
|
-
| `limitHeight` | `limit-height` | `Boolean` | false | Limit height to 100% available |
|
|
56
|
-
| `screenSizeSelected` | `screen-size-selected` | `Number` | 0 | Index of currently screen size selected |
|
|
57
|
-
| `selected` | `selected` | `Number` | 0 | Index of currently srcset file |
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
1
|
# blockquote-base-embedded-webview-element
|
|
62
2
|
|
|
63
3
|

|
|
@@ -70,25 +10,24 @@ It will create a `select` tag with the provided demo HTML files and add the `[da
|
|
|
70
10
|
|
|
71
11
|
## Properties
|
|
72
12
|
|
|
73
|
-
| Property | Attribute | Type | Default | Description
|
|
74
|
-
|
|
13
|
+
| Property | Attribute | Type | Default | Description |
|
|
14
|
+
|-----------------|------------------|----------|----------|--------------------------------------------------|
|
|
75
15
|
| `embeddedTitle` | `embedded-title` | `string` | "" | The title attribute on an <element> to label its content |
|
|
76
|
-
| `src` | `src` | `string` | "" | The URL of the page to embed
|
|
77
|
-
| `type` | `type` | `string` | "iframe" | The type of the tag to embed - iframe or object
|
|
16
|
+
| `src` | `src` | `string` | "" | The URL of the page to embed |
|
|
17
|
+
| `type` | `type` | `string` | "iframe" | The type of the tag to embed - iframe or object |
|
|
78
18
|
|
|
79
19
|
## Methods
|
|
80
20
|
|
|
81
21
|
| Method | Type |
|
|
82
|
-
|
|
22
|
+
|--------------|----------------------|
|
|
83
23
|
| `willUpdate` | `(props: any): void` |
|
|
84
24
|
|
|
85
25
|
## Events
|
|
86
26
|
|
|
87
27
|
| Event | Type |
|
|
88
|
-
|
|
28
|
+
|-----------------|--------------------|
|
|
89
29
|
| `elementloaded` | `CustomEvent<any>` |
|
|
90
30
|
|
|
91
|
-
---
|
|
92
31
|
|
|
93
32
|
# blockquote-base-embedded-webview-resize
|
|
94
33
|
|
|
@@ -102,10 +41,11 @@ It will create a `select` tag with the provided demo HTML files and add the `[da
|
|
|
102
41
|
|
|
103
42
|
## Events
|
|
104
43
|
|
|
105
|
-
| Event | Type
|
|
106
|
-
|
|
44
|
+
| Event | Type |
|
|
45
|
+
|-----------------|--------------------------------------------------|
|
|
107
46
|
| `webviewresize` | `CustomEvent<{ x: string; y: string; resizing: boolean; }>` |
|
|
108
47
|
|
|
48
|
+
|
|
109
49
|
# blockquote-base-embedded-webview-size
|
|
110
50
|
|
|
111
51
|

|
|
@@ -114,7 +54,7 @@ It will create a `select` tag with the provided demo HTML files and add the `[da
|
|
|
114
54
|
|
|
115
55
|
```html
|
|
116
56
|
<blockquote-base-embedded-webview-size
|
|
117
|
-
|
|
57
|
+
screen-sizes="[
|
|
118
58
|
{ width: 360, height: 640, id: '360x640' },
|
|
119
59
|
{ width: 375, height: 667, id: '375x667' },
|
|
120
60
|
{ width: 414, height: 896, id: '414x896' },
|
|
@@ -134,25 +74,84 @@ It will create a `select` tag with the provided demo HTML files and add the `[da
|
|
|
134
74
|
|
|
135
75
|
## Properties
|
|
136
76
|
|
|
137
|
-
| Property | Attribute | Modifiers | Type
|
|
138
|
-
|
|
139
|
-
| `computedStyleWidth` | | readonly | `number`
|
|
140
|
-
| `screenSizes` | `screen-sizes` | | `Array`
|
|
141
|
-
| `selected` | `selected` | | `Number`
|
|
142
|
-
| `selectedDetail` | | readonly | `{ index: number; width: number; height: number; id: string; }` |
|
|
143
|
-
| `selectedSize` | | readonly | `{ width: number; height: number; id: string; }`
|
|
144
|
-
| `showOverflowSize` | `show-overflow-size` | | `Boolean`
|
|
145
|
-
| `widthInPercent` | `width-in-percent` | | `Boolean`
|
|
77
|
+
| Property | Attribute | Modifiers | Type | Default | Description |
|
|
78
|
+
|----------------------|----------------------|-----------|--------------------------------------------------|--------------------------------------------------|--------------------------------------------------|
|
|
79
|
+
| `computedStyleWidth` | | readonly | `number` | | |
|
|
80
|
+
| `screenSizes` | `screen-sizes` | | `Array` | [{"width":360,"height":640,"id":"360x640"},{"width":375,"height":667,"id":"375x667"},{"width":414,"height":896,"id":"414x896"},{"width":768,"height":1024,"id":"768x1024"},{"width":1024,"height":768,"id":"1024x768"},{"width":1280,"height":800,"id":"1280x800"},{"width":1366,"height":768,"id":"1366x768"},{"width":1536,"height":864,"id":"1536x864"},{"width":1920,"height":1080,"id":"1920x1080"}] | The screen size options to display |
|
|
81
|
+
| `selected` | `selected` | | `Number` | 0 | The screen size option selected |
|
|
82
|
+
| `selectedDetail` | | readonly | `{ index: number; width: number; height: number; id: string; }` | | |
|
|
83
|
+
| `selectedSize` | | readonly | `{ width: number; height: number; id: string; }` | | |
|
|
84
|
+
| `showOverflowSize` | `show-overflow-size` | | `Boolean` | false | Show screen size options that are too large for the container |
|
|
85
|
+
| `widthInPercent` | `width-in-percent` | | `Boolean` | false | Percentage value for the width |
|
|
146
86
|
|
|
147
87
|
## Methods
|
|
148
88
|
|
|
149
89
|
| Method | Type |
|
|
150
|
-
|
|
90
|
+
|--------------|----------------------|
|
|
151
91
|
| `willUpdate` | `(props: any): void` |
|
|
152
92
|
|
|
153
93
|
## Events
|
|
154
94
|
|
|
155
|
-
| Event | Type
|
|
156
|
-
|
|
95
|
+
| Event | Type |
|
|
96
|
+
|------------------|--------------------------------------------------|
|
|
157
97
|
| `click` | `CustomEvent<{ index: number; width: number; height: number; id: string; }>` |
|
|
158
98
|
| `selectedchange` | `CustomEvent<{ index: number; width: number; height: number; id: string; }>` |
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
# blockquote-base-embedded-webview
|
|
102
|
+
|
|
103
|
+

|
|
104
|
+
|
|
105
|
+
`blockquote-base-embedded-webview` offers a responsive display using individual HTML files as content with the different use cases to be displayed.
|
|
106
|
+
It will create a `select` tag with the provided demo HTML files and add the `[data-embedded]` attribute to the loaded body tag.
|
|
107
|
+
|
|
108
|
+
## Base usage
|
|
109
|
+
|
|
110
|
+
```html
|
|
111
|
+
<blockquote-base-embedded-webview heading="My demo title">
|
|
112
|
+
<template data-src="./base.html" data-option="Basis"></template>
|
|
113
|
+
<template data-src="./complex.html" data-option="Complex"></template>
|
|
114
|
+
</blockquote-base-embedded-webview>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## base.html
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<!DOCTYPE html>
|
|
121
|
+
<html lang="en">
|
|
122
|
+
<head>
|
|
123
|
+
<title>Demo Base</title>
|
|
124
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
125
|
+
<meta charset="utf-8" />
|
|
126
|
+
<style>
|
|
127
|
+
:root {
|
|
128
|
+
font: normal medium/1.25 sans-serif;
|
|
129
|
+
}
|
|
130
|
+
body {
|
|
131
|
+
margin: 0;
|
|
132
|
+
}
|
|
133
|
+
[data-embedded] .hidden {
|
|
134
|
+
display: none;
|
|
135
|
+
}
|
|
136
|
+
</style>
|
|
137
|
+
</head>
|
|
138
|
+
<body>
|
|
139
|
+
<h1 class="hidden">Heading</h1>
|
|
140
|
+
<p>Base Demo</p>
|
|
141
|
+
</body>
|
|
142
|
+
</html>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Exports
|
|
146
|
+
|
|
147
|
+
- BlockquoteBaseEmbeddedWebview
|
|
148
|
+
|
|
149
|
+
## Properties
|
|
150
|
+
|
|
151
|
+
| Property | Attribute | Type | Default | Description |
|
|
152
|
+
|----------------------|------------------------|-----------|---------|-----------------------------------------|
|
|
153
|
+
| `heading` | `heading` | `String` | "" | The heading of the webview. |
|
|
154
|
+
| `headingLevel` | `heading-level` | `Number` | 1 | Heading level from 1 to 6 |
|
|
155
|
+
| `limitHeight` | `limit-height` | `Boolean` | false | Limit height to 100% available |
|
|
156
|
+
| `screenSizeSelected` | `screen-size-selected` | `Number` | 0 | Index of currently screen size selected |
|
|
157
|
+
| `selected` | `selected` | `Number` | 0 | Index of currently srcset file |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote-web-components/blockquote-base-embedded-webview",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Webcomponent blockquote-base-embedded-webview following open-wc recommendations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit",
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"analyze": "cem analyze --litelement --globs \"{src,define}/**/*.{js,ts}\" \"index.js\"",
|
|
22
|
-
"analyze:doc": "npm run analyze && npx web-component-analyzer \"{src,define}/**/*.{js,ts}\" \"index.js\" --outFile README.md",
|
|
22
|
+
"analyze:doc": "npm run analyze && npx web-component-analyzer \"{src,define}/**/*.{js,ts}\" \"index.js\" \"README.js\" --outFile README.md",
|
|
23
23
|
"build": "echo \"This is not a TypeScript project, so no need to build.\"",
|
|
24
24
|
"dev:vite": "vite build",
|
|
25
25
|
"format": "npm run format:eslint && npm run format:prettier && npm run format:stylelint",
|
|
26
26
|
"format:eslint": "eslint \"**/*.{js,ts,html}\" --fix --ignore-path .eslintignore",
|
|
27
|
-
"format:prettier": "prettier \"**/*.{js,ts,json,html
|
|
27
|
+
"format:prettier": "prettier \"**/*.{js,ts,json,html}\" --write --ignore-path .eslintignore",
|
|
28
28
|
"format:stylelint": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .eslintignore",
|
|
29
29
|
"postinstall": "npm run sort:package",
|
|
30
30
|
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
|
|
31
31
|
"lint:eslint": "eslint \"**/*.{js,ts,html}\" --ignore-path .eslintignore",
|
|
32
|
-
"lint:prettier": "prettier \"**/*.{js,ts,json,html
|
|
32
|
+
"lint:prettier": "prettier \"**/*.{js,ts,json,html}\" --check --ignore-path .eslintignore",
|
|
33
33
|
"lint:stylelint": "stylelint \"**/*.{scss,css}\" --allow-empty-input --ignore-path .eslintignore",
|
|
34
34
|
"preview:vite": "vite preview",
|
|
35
35
|
"sass:watch": "sass-style-template",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"**/*.{js,ts,html}": [
|
|
51
51
|
"npm run format:eslint"
|
|
52
52
|
],
|
|
53
|
-
"**/*.{js,ts,json,html
|
|
53
|
+
"**/*.{js,ts,json,html}": [
|
|
54
54
|
"npm run format:prettier"
|
|
55
55
|
],
|
|
56
56
|
"**/*.{scss,css}": [
|
|
@@ -129,12 +129,13 @@
|
|
|
129
129
|
"lit": "^2.0.2"
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": {
|
|
132
|
-
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.
|
|
132
|
+
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.3.0",
|
|
133
133
|
"@blockquote-web-components/blockquote-foundations-sass": "^1.0.0",
|
|
134
134
|
"@polymer/iron-test-helpers": "^3.0.1"
|
|
135
135
|
},
|
|
136
136
|
"publishConfig": {
|
|
137
137
|
"access": "public"
|
|
138
138
|
},
|
|
139
|
-
"customElements": "custom-elements.json"
|
|
139
|
+
"customElements": "custom-elements.json",
|
|
140
|
+
"gitHead": "a34f5749ac25c547d2daf166a1c1dd26571938ca"
|
|
140
141
|
}
|
|
@@ -15,22 +15,22 @@ const chevronDownIcon = svg`<svg aria-hidden="true" viewBox="0 0 24 24" stroke-w
|
|
|
15
15
|
`blockquote-base-embedded-webview` offers a responsive display using individual HTML files as content with the different use cases to be displayed.
|
|
16
16
|
It will create a `select` tag with the provided demo HTML files and add the `[data-embedded]` attribute to the loaded body tag.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Base usage
|
|
19
19
|
|
|
20
20
|
```html
|
|
21
21
|
<blockquote-base-embedded-webview heading="My demo title">
|
|
22
|
-
<template data-src="./
|
|
22
|
+
<template data-src="./base.html" data-option="Basis"></template>
|
|
23
23
|
<template data-src="./complex.html" data-option="Complex"></template>
|
|
24
24
|
</blockquote-base-embedded-webview>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## base.html
|
|
28
28
|
|
|
29
29
|
```html
|
|
30
30
|
<!DOCTYPE html>
|
|
31
31
|
<html lang="en">
|
|
32
32
|
<head>
|
|
33
|
-
<title>Demo
|
|
33
|
+
<title>Demo Base</title>
|
|
34
34
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
35
35
|
<meta charset="utf-8" />
|
|
36
36
|
<style>
|
|
@@ -47,7 +47,7 @@ It will create a `select` tag with the provided demo HTML files and add the `[da
|
|
|
47
47
|
</head>
|
|
48
48
|
<body>
|
|
49
49
|
<h1 class="hidden">Heading</h1>
|
|
50
|
-
<p>
|
|
50
|
+
<p>Base Demo</p>
|
|
51
51
|
</body>
|
|
52
52
|
</html>
|
|
53
53
|
```
|