Socket
Socket
Sign inDemoInstall

@beyond-js/widgets

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beyond-js/widgets - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

2

application/application.amd.js

@@ -13,3 +13,3 @@ define(["exports", "module", "@beyond-js/kernel/bundle"], function (_exports, _amd_module, dependency_0) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/application"
"vspecifier": "@beyond-js/widgets@0.1.5/application"
},

@@ -16,0 +16,0 @@ "type": "ts"

@@ -15,3 +15,3 @@ System.register(["@beyond-js/kernel/bundle"], function (_export, _context) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/application"
"vspecifier": "@beyond-js/widgets@0.1.5/application"
},

@@ -18,0 +18,0 @@ "type": "ts"

@@ -10,3 +10,3 @@ define(["exports"], function (_exports) {

"package": "@beyond-js/widgets",
"version": "0.1.4",
"version": "0.1.5",
"languages": {

@@ -13,0 +13,0 @@ "supported": [],

@@ -9,3 +9,3 @@ "use strict";

"package": "@beyond-js/widgets",
"version": "0.1.4",
"version": "0.1.5",
"languages": {

@@ -12,0 +12,0 @@ "supported": [],

@@ -9,3 +9,3 @@ System.register([], function (_export, _context) {

"package": "@beyond-js/widgets",
"version": "0.1.4",
"version": "0.1.5",
"languages": {

@@ -12,0 +12,0 @@ "supported": [],

@@ -1,10 +0,10 @@

import {IWidgetSpecs, widgets} from '@beyond-js/widgets/render';
import { IWidgetSpecs, widgets } from '@beyond-js/widgets/render';
export /*bundle*/
interface IWidgetStore {
toJSON(): object;
toJSON?(): object;
hydrate?(cached: object): Promise<void> | void;
hydrate?(cached: object): Promise<void> | void;
fetch(): Promise<void>;
fetch?(): Promise<void>;
}

@@ -14,62 +14,62 @@

abstract class WidgetControllerBase {
readonly #specs: IWidgetSpecs;
get specs() {
return this.#specs;
}
readonly #specs: IWidgetSpecs;
get specs() {
return this.#specs;
}
get element(): string {
return this.#specs.name;
}
get element(): string {
return this.#specs.name;
}
get is(): string {
return this.#specs.is;
}
get is(): string {
return this.#specs.is;
}
get route(): string {
return this.#specs.route;
}
get route(): string {
return this.#specs.route;
}
get layout(): string {
return this.#specs.layout;
}
get layout(): string {
return this.#specs.layout;
}
readonly #pkg: string;
get pkg() {
return this.#pkg;
}
readonly #pkg: string;
get pkg() {
return this.#pkg;
}
// The widget component to be mounted should be specified by the module
// (can be a React, Svelte, Vue, ... component)
get Widget(): any {
return;
}
// The widget component to be mounted should be specified by the module
// (can be a React, Svelte, Vue, ... component)
get Widget(): any {
return;
}
createStore(language?: string): IWidgetStore {
return void (language);
}
createStore(language?: string): IWidgetStore {
return void language;
}
/**
* Controller base constructor
*
* @param {} specs
* @param {HTMLElement} widget
* The reason why it is declared as HTMLElement is to avoid circular reference between controller and widget.
* @protected
*/
protected constructor({specs, widget}: { specs?: IWidgetSpecs, widget?: HTMLElement }) {
if (!specs) {
const {localName} = widget;
if (!widgets.has(localName)) throw new Error(`Widget name "${localName}" is not registered`);
specs = widgets.get(localName);
}
/**
* Controller base constructor
*
* @param {} specs
* @param {HTMLElement} widget
* The reason why it is declared as HTMLElement is to avoid circular reference between controller and widget.
* @protected
*/
protected constructor({ specs, widget }: { specs?: IWidgetSpecs; widget?: HTMLElement }) {
if (!specs) {
const { localName } = widget;
if (!widgets.has(localName)) throw new Error(`Widget name "${localName}" is not registered`);
specs = widgets.get(localName);
}
this.#pkg = (() => {
const split = specs.vspecifier.split('/');
const scope = split[0].startsWith('@') ? split.shift() : void 0;
const [name] = split.shift().split('@');
return scope ? `${scope}/${name}` : name;
})();
this.#pkg = (() => {
const split = specs.vspecifier.split('/');
const scope = split[0].startsWith('@') ? split.shift() : void 0;
const [name] = split.shift().split('@');
return scope ? `${scope}/${name}` : name;
})();
this.#specs = specs;
}
this.#specs = specs;
}
}

@@ -13,3 +13,3 @@ define(["exports", "module", "@beyond-js/kernel/bundle", "@beyond-js/kernel/core", "@beyond-js/widgets/render", "@beyond-js/kernel/styles"], function (_exports, _amd_module, dependency_0, dependency_1, dependency_2, dependency_3) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/controller"
"vspecifier": "@beyond-js/widgets@0.1.5/controller"
},

@@ -167,3 +167,3 @@ "type": "ts"

ims.set('./controller', {
hash: 4127212824,
hash: 3835813087,
creator: function (require, exports) {

@@ -170,0 +170,0 @@ "use strict";

@@ -16,3 +16,3 @@ "use strict";

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/controller"
"vspecifier": "@beyond-js/widgets@0.1.5/controller"
},

@@ -170,3 +170,3 @@ "type": "ts"

ims.set('./controller', {
hash: 4127212824,
hash: 3835813087,
creator: function (require, exports) {

@@ -173,0 +173,0 @@ "use strict";

@@ -54,5 +54,5 @@ /************

export interface IWidgetStore {
toJSON(): object;
toJSON?(): object;
hydrate?(cached: object): Promise<void> | void;
fetch(): Promise<void>;
fetch?(): Promise<void>;
}

@@ -59,0 +59,0 @@ export abstract class WidgetControllerBase {

@@ -29,3 +29,3 @@ System.register(["@beyond-js/kernel/bundle", "@beyond-js/kernel/core", "@beyond-js/widgets/render", "@beyond-js/kernel/styles"], function (_export, _context) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/controller"
"vspecifier": "@beyond-js/widgets@0.1.5/controller"
},

@@ -181,3 +181,3 @@ "type": "ts"

ims.set('./controller', {
hash: 4127212824,
hash: 3835813087,
creator: function (require, exports) {

@@ -184,0 +184,0 @@ "use strict";

@@ -13,3 +13,3 @@ define(["exports", "module", "@beyond-js/kernel/bundle", "@beyond-js/widgets/render"], function (_exports, _amd_module, dependency_0, dependency_1) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/layout"
"vspecifier": "@beyond-js/widgets@0.1.5/layout"
},

@@ -16,0 +16,0 @@ "type": "ts"

@@ -18,9 +18,9 @@ /************

export const ssr: {
"__#109920@#main": string;
"__#50516@#main": string;
readonly main: string;
"__#109920@#page": string;
"__#50516@#page": string;
readonly page: string;
"__#109920@#layouts": string[];
"__#50516@#layouts": string[];
readonly layouts: string[];
"__#109920@#hierarchy": string[];
"__#50516@#hierarchy": string[];
readonly hierarchy: string[];

@@ -27,0 +27,0 @@ data(main: string, page: PageSSR): void;

@@ -18,3 +18,3 @@ System.register(["@beyond-js/kernel/bundle", "@beyond-js/widgets/render"], function (_export, _context) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/layout"
"vspecifier": "@beyond-js/widgets@0.1.5/layout"
},

@@ -21,0 +21,0 @@ "type": "ts"

{
"name": "@beyond-js/widgets",
"version": "0.1.4",
"description": "Create web projects as standalone microfrontends with beyondJS",
"license": "MIT",
"repository": "",
"keywords": [],
"scripts": {},
"exports": {
"./application": {
"types": "./application/application.d.ts",
"amd": "./application/application.amd.js",
"sjs": "./application/application.sjs.js",
"browser": "./application/application.browser.mjs",
"module": "./application/application.browser.mjs"
},
"./controller": {
"types": "./controller/controller.d.ts",
"amd": "./controller/controller.amd.js",
"sjs": "./controller/controller.sjs.js",
"browser": "./controller/controller.browser.mjs",
"module": "./controller/controller.browser.mjs",
"node": {
"require": "./controller/controller.cjs.js",
"import": "./controller/controller.mjs"
}
},
"./layout": {
"types": "./layout/layout.d.ts",
"amd": "./layout/layout.amd.js",
"sjs": "./layout/layout.sjs.js",
"browser": "./layout/layout.browser.mjs",
"module": "./layout/layout.browser.mjs"
},
"./render": {
"types": "./render/render.d.ts",
"node": {
"require": "./render/render.cjs.js",
"import": "./render/render.mjs"
},
"amd": "./render/render.amd.js",
"sjs": "./render/render.sjs.js",
"browser": "./render/render.browser.mjs",
"module": "./render/render.browser.mjs"
},
"./routing": {
"types": "./routing/routing.d.ts",
"amd": "./routing/routing.amd.js",
"sjs": "./routing/routing.sjs.js",
"browser": "./routing/routing.browser.mjs",
"module": "./routing/routing.browser.mjs",
"node": {
"require": "./routing/routing.cjs.js",
"import": "./routing/routing.mjs"
}
},
"./config": {
"amd": "./config/config.amd.js",
"sjs": "./config/config.sjs.js",
"browser": "./config/config.browser.mjs",
"module": "./config/config.browser.mjs",
"node": {
"import": "./config/config.mjs",
"require": "./config/config.cjs.js"
}
}
},
"dependencies": {
"@beyond-js/kernel": "~0.1.8"
},
"static": {},
"uimport": true,
"clientDependencies": []
}
"name": "@beyond-js/widgets",
"version": "0.1.5",
"description": "Create web projects as standalone microfrontends with beyondJS",
"license": "MIT",
"libraries": {
"imports": [
"@beyond-js/kernel"
]
},
"dependencies": {
"@beyond-js/kernel": "~0.1.8"
},
"exports": {
"./application": {
"types": "./application/application.d.ts",
"amd": "./application/application.amd.js",
"sjs": "./application/application.sjs.js",
"browser": "./application/application.browser.mjs",
"module": "./application/application.browser.mjs"
},
"./controller": {
"types": "./controller/controller.d.ts",
"amd": "./controller/controller.amd.js",
"sjs": "./controller/controller.sjs.js",
"browser": "./controller/controller.browser.mjs",
"module": "./controller/controller.browser.mjs",
"node": {
"require": "./controller/controller.cjs.js",
"import": "./controller/controller.mjs"
}
},
"./layout": {
"types": "./layout/layout.d.ts",
"amd": "./layout/layout.amd.js",
"sjs": "./layout/layout.sjs.js",
"browser": "./layout/layout.browser.mjs",
"module": "./layout/layout.browser.mjs"
},
"./render": {
"types": "./render/render.d.ts",
"node": {
"require": "./render/render.cjs.js",
"import": "./render/render.mjs"
},
"amd": "./render/render.amd.js",
"sjs": "./render/render.sjs.js",
"browser": "./render/render.browser.mjs",
"module": "./render/render.browser.mjs"
},
"./routing": {
"types": "./routing/routing.d.ts",
"amd": "./routing/routing.amd.js",
"sjs": "./routing/routing.sjs.js",
"browser": "./routing/routing.browser.mjs",
"module": "./routing/routing.browser.mjs",
"node": {
"require": "./routing/routing.cjs.js",
"import": "./routing/routing.mjs"
}
},
"./config": {
"amd": "./config/config.amd.js",
"sjs": "./config/config.sjs.js",
"browser": "./config/config.browser.mjs",
"module": "./config/config.browser.mjs",
"node": {
"import": "./config/config.mjs",
"require": "./config/config.cjs.js"
}
}
},
"uimport": true
}

@@ -13,3 +13,3 @@ define(["exports", "module", "@beyond-js/kernel/bundle", "@beyond-js/kernel/core"], function (_exports, _amd_module, dependency_0, dependency_1) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/render"
"vspecifier": "@beyond-js/widgets@0.1.5/render"
},

@@ -16,0 +16,0 @@ "type": "ts"

@@ -13,3 +13,3 @@ "use strict";

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/render"
"vspecifier": "@beyond-js/widgets@0.1.5/render"
},

@@ -16,0 +16,0 @@ "type": "ts"

@@ -63,3 +63,3 @@ /************

export const prerender: {
readonly "__#108721@#ssr": IWidgetRendered[];
readonly "__#49396@#ssr": IWidgetRendered[];
readonly ssr: IWidgetRendered[];

@@ -66,0 +66,0 @@ find(element: string, attrs: Map<string, string>): IWidgetRendered;

@@ -29,3 +29,3 @@ System.register(["@beyond-js/kernel/bundle", "@beyond-js/kernel/core"], function (_export, _context) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/render"
"vspecifier": "@beyond-js/widgets@0.1.5/render"
},

@@ -32,0 +32,0 @@ "type": "ts"

@@ -13,3 +13,3 @@ define(["exports", "module", "@beyond-js/kernel/bundle", "@beyond-js/kernel/core", "@beyond-js/widgets/render", "@beyond-js/kernel/routing"], function (_exports, _amd_module, dependency_0, dependency_1, dependency_2, dependency_3) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/routing"
"vspecifier": "@beyond-js/widgets@0.1.5/routing"
},

@@ -16,0 +16,0 @@ "type": "ts"

@@ -16,3 +16,3 @@ "use strict";

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/routing"
"vspecifier": "@beyond-js/widgets@0.1.5/routing"
},

@@ -19,0 +19,0 @@ "type": "ts"

@@ -63,16 +63,16 @@ /************

export const manager: {
readonly "__#109474@#instances": {
readonly "__#50100@#instances": {
layouts: Layouts;
pages: Pages;
};
"__#109474@#initialised": boolean;
"__#50100@#initialised": boolean;
readonly initialised: boolean;
"__#109474@#resolve": any;
"__#109474@#ready": Promise<unknown>;
"__#50100@#resolve": any;
"__#50100@#ready": Promise<unknown>;
readonly ready: Promise<unknown>;
readonly layouts: Layouts;
readonly pages: Pages;
"__#109474@#main": Layout;
"__#50100@#main": Layout;
readonly main: Layout;
"__#109474@#ct": CancellationToken;
"__#50100@#ct": CancellationToken;
set(uri: URI): Promise<void>;

@@ -79,0 +79,0 @@ };

@@ -28,3 +28,3 @@ System.register(["@beyond-js/kernel/bundle", "@beyond-js/kernel/core", "@beyond-js/widgets/render", "@beyond-js/kernel/routing"], function (_export, _context) {

"module": {
"vspecifier": "@beyond-js/widgets@0.1.4/routing"
"vspecifier": "@beyond-js/widgets@0.1.5/routing"
},

@@ -31,0 +31,0 @@ "type": "ts"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc