Skip to content

Commit e9e12bc

Browse files
committed
Merge branch 'master' of github.com:farfromrefug/nativescript-advanced-webview
2 parents 46b023e + 6cd640f commit e9e12bc

File tree

86 files changed

+12962
-3948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+12962
-3948
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ yarn-error.log*
2424
.gradle
2525
.project
2626
.yarn
27+
.cxx
2728
tmp/
2829

2930
!.eslintrc.js
@@ -34,6 +35,7 @@ tmp/
3435
devices.js
3536

3637
*.framework
38+
*.xcframework
3739
**/*.js.map
3840
src/**/*.js
3941
packages/**/*.js
@@ -43,6 +45,7 @@ build
4345
Pods
4446
!packages/platforms
4547
/packages/**/*.aar
48+
/demo-snippets/**/*.aar
4649
*.xcuserdatad
4750
/packages/README.md
4851
packages/**/*js.map

.yarnrc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
compressionLevel: mixed
2+
13
nmHoistingLimits: workspaces
24

35
nodeLinker: node-modules
46

5-
yarnPath: tools/.yarn/releases/yarn-3.3.1.cjs
7+
yarnPath: tools/.yarn/releases/yarn-4.0.1.cjs

CHANGELOG.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,41 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
## [1.4.4](https://github.com/nativescript-community/ui-webview/compare/v1.4.3...v1.4.4) (2023-02-15)
6+
## [1.4.9](https://github.com/nativescript-community/ui-webview/compare/v1.4.8...v1.4.9) (2023-08-03)
7+
8+
### Bug Fixes
9+
10+
* **webview:** ios ensure configuration is correctly set in view creation ([8fefa5e](https://github.com/nativescript-community/ui-webview/commit/8fefa5e9546419d3995b61292fd516b3e7ad1b83))
11+
12+
## [1.4.8](https://github.com/nativescript-community/ui-webview/compare/v1.4.7...v1.4.8) (2023-08-02)
713

814
**Note:** Version bump only for package @nativescript-community/ui-webview-root
915

16+
## [1.4.7](https://github.com/nativescript-community/ui-webview/compare/v1.4.6...v1.4.7) (2023-08-02)
1017

18+
### Bug Fixes
1119

20+
* angular register fix ([2a373ec](https://github.com/nativescript-community/ui-webview/commit/2a373ec1e811e2364a07ad1ce5b290b5bd835117))
1221

22+
## [1.4.6](https://github.com/nativescript-community/ui-webview/compare/v1.4.5...v1.4.6) (2023-06-20)
1323

14-
## [1.4.3](https://github.com/nativescript-community/ui-webview/compare/v1.4.2...v1.4.3) (2023-01-24)
24+
**Note:** Version bump only for package @nativescript-community/ui-webview-root
1525

26+
## [1.4.5](https://github.com/nativescript-community/ui-webview/compare/v1.4.4...v1.4.5) (2023-06-20)
1627

1728
### Bug Fixes
1829

19-
* **ui-webview:** android native-api-usage fix ([9343cc7](https://github.com/nativescript-community/ui-webview/commit/9343cc707295c8e1b970a5e068b37fde55359714))
30+
* angular build fix ([5552ca4](https://github.com/nativescript-community/ui-webview/commit/5552ca4b55240963d0317a34be8b8c4e62b2b155))
2031

32+
## [1.4.4](https://github.com/nativescript-community/ui-webview/compare/v1.4.3...v1.4.4) (2023-02-15)
2133

34+
**Note:** Version bump only for package @nativescript-community/ui-webview-root
2235

36+
## [1.4.3](https://github.com/nativescript-community/ui-webview/compare/v1.4.2...v1.4.3) (2023-01-24)
2337

38+
### Bug Fixes
39+
40+
* **ui-webview:** android native-api-usage fix ([9343cc7](https://github.com/nativescript-community/ui-webview/commit/9343cc707295c8e1b970a5e068b37fde55359714))
2441

2542
## [1.4.2](https://github.com/nativescript-community/ui-webview/compare/v1.4.1...v1.4.2) (2022-09-02)
2643

README.md

Lines changed: 99 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️-->This monorepo contains multiple packages:<br><br><details>
2-
<summary><b>ui-webview</b></summary>
3-
{{ load:packages/ui-webview/README.md }}
4-
</details><details>
52
<summary><b>webview</b></summary>
63
# @nativescript-community/ui-webview
74

@@ -90,7 +87,7 @@ The custom `NSURLProtocol` used with UIWebView is shared with all instances of t
9087
| builtInZoomControls | true / false | Android: Is the built-in zoom mechanisms being used |
9188
| cacheMode | default / no_cache / cache_first / cache_only | Android: Set caching mode. |
9289
| databaseStorage | true / false | Android: Enable/Disabled database storage API. Note: It affects all webviews in the process. |
93-
| debugMode | true / false | Android: Enable chrome debugger for webview on Android. Note: Applies to all webviews in App |
90+
| debugMode | true / false | Enable chrome debugger for webview on Android and Safari debugger for webview on iOS. Note: Applies to all webviews in App |
9491
| displayZoomControls | true / false | Android: displays on-screen zoom controls when using the built-in zoom mechanisms |
9592
| domStorage | true / false | Android: Enable/Disabled DOM Storage API. E.g localStorage |
9693
| scalesPageToFit | UIWebView: Should webpage scale to fit the view? Defaults to false |
@@ -238,4 +235,101 @@ install();
238235

239236
then simply use the `webRTC="true"` as a webview property
240237

241-
</details>
238+
</details>
239+
240+
[](#demos-and-development)
241+
242+
## Demos and Development
243+
244+
245+
### Repo Setup
246+
247+
The repo uses submodules. If you did not clone with ` --recursive` then you need to call
248+
```
249+
git submodule update --init
250+
```
251+
252+
The package manager used to install and link dependencies must be `pnpm` or `yarn`. `npm` wont work.
253+
254+
To develop and test:
255+
if you use `yarn` then run `yarn`
256+
if you use `pnpm` then run `pnpm i`
257+
258+
**Interactive Menu:**
259+
260+
To start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`). This will list all of the commonly used scripts.
261+
262+
### Build
263+
264+
```bash
265+
npm run build.all
266+
```
267+
WARNING: it seems `yarn build.all` wont always work (not finding binaries in `node_modules/.bin`) which is why the doc explicitly uses `npm run`
268+
269+
### Demos
270+
271+
```bash
272+
npm run demo.[ng|react|svelte|vue].[ios|android]
273+
274+
npm run demo.svelte.ios # Example
275+
```
276+
277+
Demo setup is a bit special in the sense that if you want to modify/add demos you dont work directly in `demo-[ng|react|svelte|vue]`
278+
Instead you work in `demo-snippets/[ng|react|svelte|vue]`
279+
You can start from the `install.ts` of each flavor to see how to register new demos
280+
281+
282+
[](#contributing)
283+
284+
## Contributing
285+
286+
### Update repo
287+
288+
You can update the repo files quite easily
289+
290+
First update the submodules
291+
292+
```bash
293+
npm run update
294+
```
295+
296+
Then commit the changes
297+
Then update common files
298+
299+
```bash
300+
npm run sync
301+
```
302+
Then you can run `yarn|pnpm`, commit changed files if any
303+
304+
### Update readme
305+
```bash
306+
npm run readme
307+
```
308+
309+
### Update doc
310+
```bash
311+
npm run doc
312+
```
313+
314+
### Publish
315+
316+
The publishing is completely handled by `lerna` (you can add `-- --bump major` to force a major release)
317+
Simply run
318+
```shell
319+
npm run publish
320+
```
321+
322+
### modifying submodules
323+
324+
The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
325+
One easy solution is t modify `~/.gitconfig` and add
326+
```
327+
[url "ssh://[email protected]/"]
328+
pushInsteadOf = https://github.com/
329+
```
330+
331+
[](#questions)
332+
333+
## Questions
334+
335+
If you have any questions/issues/comments please feel free to create an issue or start a conversation in the [NativeScript Community Discord](https://nativescript.org/discord).

demo-react

demo-snippets/ng/install.module.ts

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
import { NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
22

3-
import { PagerModule } from "@nativescript-community/ui-pager/angular";
3+
import { WebViewExtModule } from '@nativescript-community/ui-webview/angular';
4+
import { BasicExampleComponent } from './basic-example/basic-example.component';
45

5-
import { StaticPagerComponent } from './static-pager/static-pager.component';
6-
import { BasicPagerComponent } from './basic-example/basic-example.componentnt';
7-
8-
export const COMPONENTS = [StaticPagerComponent, BasicPagerComponent];
6+
export const COMPONENTS = [BasicExampleComponent];
97
@NgModule({
10-
imports: [PagerModule],
11-
exports: [PagerModule],
8+
imports: [WebViewExtModule],
9+
exports: [WebViewExtModule],
1210
schemas: [NO_ERRORS_SCHEMA]
1311
})
1412
export class InstallModule {}
1513

16-
export function installPlugin() { }
17-
18-
export const demos = [
19-
{ name: 'Static Pager', path: 'static-pager', component: StaticPagerComponent },
20-
{ name: 'Basic Pager', path: 'basic-pager', component: BasicPagerComponent }
21-
];
14+
export function installPlugin() {}
2215

16+
export const demos = [{ name: 'Static Example', path: 'static-example', component: BasicExampleComponent }];

demo-snippets/ng/static-pager/static-pager.component.html

Lines changed: 0 additions & 21 deletions
This file was deleted.

demo-snippets/ng/static-pager/static-pager.component.scss

Lines changed: 0 additions & 7 deletions
This file was deleted.

demo-snippets/ng/static-pager/static-pager.component.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)