nolanus / ngx-multi-window Goto Github PK
View Code? Open in Web Editor NEW㪠Pull-based cross-window communication for multi-window angular apps
Home Page: https://nolanus.github.io/ngx-multi-window/
License: MIT License
π¬ Pull-based cross-window communication for multi-window angular apps
Home Page: https://nolanus.github.io/ngx-multi-window/
License: MIT License
Hi, There are any way to set correctly a StrignUrl to the new window?
when i try to set the url i receive an error.
Thanks!
Warning: Entry point 'ngx-multi-window' contains deep imports into '/home/user/source/Customers/Abacus.ac/core/webclient/node_modules/ngx-multi-window/lib/types/window-save-strategy.enum'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
2.0.6
to 2.0.7
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/jasminewd2 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | @angular/router |
Current Version | 5.2.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
@angular/router is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
getKnownWindows() is not working on version 0.1.2. I can not update to 0.1.3 since my application is on angular 5. Please support.
getKnownWindows() is suddenly stopped working it returning just the current window. Is there any particular reason behind this?
I've read something about other techniques to do cross-window communication. Something like this. Using a method like that would eliminate the need for polling, theoretically making the communication quicker. I have never used it though. Also, I don't know about browser support and I think 3/4 of the library would have to be rewritten.
This person had the same problem and they recommend using a BroadcastChannel. It's a simple API:
// Setup
var bc = new BroadcastChannel('test_channel');
// Broadcasting
bc.postMessage('This is a test message.');
// Receiving
bc.onmessage = function (ev) { console.log(ev); }
// Closing connection
bc.close()
Problem is, Edge doesn't support it yet, so it's of no use for this issue. I did find a polyfill that could maybe work. It uses local storage though, so I don't know if that will work.
[edit] There's another BroadcastChannel 'polyfill' right here. This one chooses the best mode of communication based on the browser it's running on. Works on Edge, FireFox, Chrome, Opera, but it doesn't seem to work on IE11 (which I would abandon altogether). Maybe this would be a better method than pure localStorage? It's pretty damn quick.
4.6.0
to 4.7.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
ng-packagr is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
2.8.9
to 2.8.10
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/jasmine is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
3.1.1
to 3.1.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
karma is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 11 commits.
7d4d347
chore: release v3.1.2
5077c18
chore: update contributors
fb05fb1
fix(server): use flatted for json.stringify (#3220)
2682bff
feat(docs): callout the key debug strategies. (#3219)
4e87902
fix(changelog): remove release which does not exist (#3214)
30ff73b
fix(browser): report errors to console during singleRun=false (#3209)
5334d1a
fix(file-list): do not preprocess up-to-date files (#3196)
dc5f5de
fix(deps): upgrade sinon-chai 2.x -> 3.x (#3207)
d38f344
fix(package): bump lodash version (#3203)
ffb41f9
refactor(browser): log state transitions in debug (#3202)
240209f
fix(dep): Bump useragent to fix HeadlessChrome version (#3201)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Hi, I have an issue when trying to run the demo app!
I cloned the git repository, then when I run the command 'npm run demo' in c:\gitrepos\ngx-multi-window
I get a lot of warnings and in the end a couple of errors before it goes back to the commandline.
not really sure what I'm doing wrong or what I'm missing here?!
kind regards
Hey, as stated in the title, I'm wondering why the message time out is set to 10 seconds and not longer. What would the drawbacks be if it were set to a longer frame?
Thanks
Hello,
We were wondering when the library will be updated with Angular 16 support?
Thanks
I was testing the project and it currently does not work with IE11, the send messages timeout.
Branch | Build failing π¨ |
---|---|
Dependency | @types/core-js |
Current Version | 0.9.45 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
@types/core-js is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Update to support angular 6
3.3.16
to 3.4.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/jasmine is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
I'm interested in using this for a project and was wondering if this is still maintained? If so, how to npm install
?
How can I remove the message with status 'read', please let me know
How can I change the values of MultiWindowConfig inside my code?
I can't send message with Win 8 IE 11. When I call getKnownWindows() in sender window it only sees itself.
it works fine in Firefox and Chrome.
All dependencies should be updated to support Angular 8 / 9
Upgrading to the latest version resulted in an error in my unit tests. I'm adding the MultiWindowConfig
module like this:
const multiWindowConfig = {
heartbeat: 100,
newWindowScan: 1000
};
@NgModule({
imports: [
MultiWindowModule.forRoot(multiWindowConfig)
],
My test:
import {NGXMW_CONFIG} from 'ngx-multi-window/lib/providers/config.provider';
const multiWindowConfig = {
heartbeat: 100,
newWindowScan: 1000
};
describe('DockerService', () => {
let service: DockerService;
let windowService: MultiWindowService;
let subscription: Subscription;
beforeEach(async(() => {
TestBed.configureTestingModule({
providers: [
{provide: NGXMW_CONFIG, useValue: multiWindowConfig}
]
});
}));
Without the import line my tests results in the error NGXMW_CONFIG is not defined
. After adding the import the error is Error: Can't resolve 'ngx-multi-window/lib/providers/config.provider'
.
I think NGXMW_CONFIG
should be exported in /projects/ngx-multi-window/src/index.ts
.
hi, I'm struggeling with something...
when i create a newWindow and id is assigned... newWindowData.windowId.
after i open this with assigned url and I subscribe to the onWindow() observable... the window gets added to the knownwindow collections but it seems that the newWindowData.windowId is defferent then the created [window object].id in knowWindows?
Is this the correct behavior, if so, why? if not, I'm in trouble because it is different in my code... :)
kind regards!
R
Update deps to support angular 7, once all peerDeps and helper modules are ready
Branch | Build failing π¨ |
---|---|
Dependency | @angular/platform-browser-dynamic |
Current Version | 5.2.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
@angular/platform-browser-dynamic is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Use destruction and unload events as much as possible, but offer transparent way to library user to detect outdated information in list of "known windows".
It would be awesome if the name of a window persists on refreshing the page. Something like this:
// Called in some Angular component
const name = window.name;
if (!name || name.indexOf('AppWindow') === -1) {
window.name = this.multiWindowService.name;
console.log('Saving window ID to session: ' + this.multiWindowService.name);
} else {
this.multiWindowService.name = name;
console.log('Got window ID from session storage: ' + this.multiWindowService.name);
}
If you do this and you refresh the page, ngx-multi-window creates a new variable in the localStorage, but it keeps using the old one. If this would be done in the library itself, it would probably mean you can use the same key of the localStorage without creating a new one.
I also tried using the sessionStorage because I don't want to use window.name in case someone else uses it, but I got some security issues:
const key = 'dock-panels-window-id';
const name = window.sessionStorage.getItem(key);
if (!name || name.indexOf('AppWindow') === -1) {
window.sessionStorage.setItem(key, this.multiWindowService.name);
console.log('Saving window ID to session: ' + this.multiWindowService.name);
} else {
this.multiWindowService.name = name;
console.log('Got window ID from session storage: ' + this.multiWindowService.name);
}
The error:
ERROR DOMException: Failed to execute 'getItem' on 'Storage': access is denied for this document.
at DockRootComponent.push../projects/dock-panels/src/lib/components/dock-root/dock-root.component.ts.DockRootComponent.initializeWindowName (http://localhost:4200/main.js:670:42)
at DockRootComponent.push../projects/dock-panels/src/lib/components/dock-root/dock-root.component.ts.DockRootComponent.ngOnInit (http://localhost:4200/main.js:685:14)
at checkAndUpdateDirectiveInline (http://localhost:4200/vendor.js:63483:19)
at checkAndUpdateNodeInline (http://localhost:4200/vendor.js:64747:20)
at checkAndUpdateNode (http://localhost:4200/vendor.js:64709:16)
at debugCheckAndUpdateNode (http://localhost:4200/vendor.js:65342:38)
at debugCheckDirectivesFn (http://localhost:4200/vendor.js:65302:13)
at Object.eval [as updateDirectives] (ng:///AppModule/HomeComponent.ngfactory.js:14:5)
at Object.debugUpdateDirectives [as updateDirectives] (http://localhost:4200/vendor.js:65294:21)
at checkAndUpdateView (http://localhost:4200/vendor.js:64691:14)
I am opening a new window and as soon as the subscription fires I want to send a message. My heartbeat config is at 100, but receiving the OPEN_PANEL_EVENT message takes about 6 seconds every time. Shouldn't this be faster (~2x100ms)? Does this subscription fire at the same rate as the heartbeat? I couldn't really figure that out reading the source code yet.
newWindow.created.subscribe(
() => {
console.log('Its here!');
},
(error) => {
console.log('Something went wrong opening ' + panel.name + ' in a new window. Please try again.');
},
() => {
console.log('Try sending a message');
this.sendMessage(newWindow.windowId, DockerService.OPEN_PANEL_EVENT, panel.name);
}
);
Oh, why is the third parameter of subscribe firing, not the first? (just read the comments of the subscribe method. I get it now)
4.2.0
to 4.3.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
karma is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
test:client
silently failing on Travis (#3343) (1489e9a), closes /travis-ci.org/karma-runner/karma/jobs/537027667#L1046The new version differs by 13 commits.
fa6be15
chore: release v4.3.0
0ed9eba
chore: update contributors
5f13e11
fix(server): Simplify 'dom' inclusion. (#3356)
817fbbd
feat(config): socket.io server pingTimeout config option. (#3355)
c5f3560
feat(preprocessor): preprocessor_priority execution order. (#3303)
6c5add2
fix(build): switch from yarn to package-lock.json (#3351)
1c6c690
fix(travis): Pin to trusty (#3347)
62d4c5a
feat(runner):
582a406
fix(config): Simpilfy error proceesing. (#3345)
1489e9a
fix(test): test:client
silently failing on Travis (#3343)
094bcc6
chore(deps): npm install karma-browserstack-launcher (#3344)
5614c04
fix(deps): lodash update. (#3341)
177e2ef
feat(async): frameworks can be loaded asynchronously (#3297)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.