piral-ngjs 1.6.0-beta.7216 → 1.6.0-beta.7243
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/convert.d.ts +1 -1
- package/convert.js +1 -1
- package/lib/converter.js +5 -9
- package/lib/converter.js.map +1 -1
- package/lib/create.js +3 -7
- package/lib/create.js.map +1 -1
- package/lib/extension.js +2 -6
- package/lib/extension.js.map +1 -1
- package/lib/index.js +2 -5
- package/lib/index.js.map +1 -1
- package/lib/types.js +1 -2
- package/package.json +9 -25
- package/esm/converter.d.ts +0 -13
- package/esm/converter.js +0 -23
- package/esm/converter.js.map +0 -1
- package/esm/create.d.ts +0 -12
- package/esm/create.js +0 -21
- package/esm/create.js.map +0 -1
- package/esm/extension.d.ts +0 -2
- package/esm/extension.js +0 -30
- package/esm/extension.js.map +0 -1
- package/esm/index.d.ts +0 -2
- package/esm/index.js +0 -3
- package/esm/index.js.map +0 -1
- package/esm/types.d.ts +0 -39
- package/esm/types.js +0 -2
- package/esm/types.js.map +0 -1
package/convert.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="angular" />
|
|
2
|
-
import { createConverter } from './
|
|
2
|
+
import { createConverter } from './lib/converter';
|
|
3
3
|
export interface HtmlComponent<TProps> {
|
|
4
4
|
component: {
|
|
5
5
|
mount(element: HTMLElement, props: TProps, ctx: any, locals: any): void;
|
package/convert.js
CHANGED
package/lib/converter.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const angular_1 = require("angular");
|
|
5
|
-
const extension_1 = require("./extension");
|
|
6
|
-
function createConverter(config = {}) {
|
|
1
|
+
import { bootstrap } from 'angular';
|
|
2
|
+
import { createExtension } from './extension';
|
|
3
|
+
export function createConverter(config = {}) {
|
|
7
4
|
const { rootName = 'piral-slot' } = config;
|
|
8
|
-
const Extension =
|
|
5
|
+
const Extension = createExtension(rootName);
|
|
9
6
|
const convert = (name, root) => ({
|
|
10
7
|
mount(el, props, ctx, locals) {
|
|
11
8
|
el.appendChild(document.createElement(name));
|
|
12
9
|
root.value('props', props);
|
|
13
10
|
root.value('piral', props.piral);
|
|
14
11
|
root.value('ctx', ctx);
|
|
15
|
-
locals.injector =
|
|
12
|
+
locals.injector = bootstrap(el, [root.name]);
|
|
16
13
|
},
|
|
17
14
|
unmount(el, locals) {
|
|
18
15
|
const rootScope = locals.injector.get('$rootScope');
|
|
@@ -23,5 +20,4 @@ function createConverter(config = {}) {
|
|
|
23
20
|
convert.Extension = Extension;
|
|
24
21
|
return convert;
|
|
25
22
|
}
|
|
26
|
-
exports.createConverter = createConverter;
|
|
27
23
|
//# sourceMappingURL=converter.js.map
|
package/lib/converter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAW,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAc9C,MAAM,UAAU,eAAe,CAAC,SAA+B,EAAE;IAC/D,MAAM,EAAE,QAAQ,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IAC3C,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CAAoC,IAAY,EAAE,IAAa,EAA4B,EAAE,CAAC,CAAC;QAC7G,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAiB;YACrC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;YACjC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACvB,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,MAAiB;YAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YACpD,SAAS,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;KACF,CAAC,CAAC;IACH,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/lib/create.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNgjsApi = void 0;
|
|
4
|
-
const converter_1 = require("./converter");
|
|
1
|
+
import { createConverter } from './converter';
|
|
5
2
|
/**
|
|
6
3
|
* Creates the Pilet API extensions for Angular.js.
|
|
7
4
|
*/
|
|
8
|
-
function createNgjsApi(config = {}) {
|
|
5
|
+
export function createNgjsApi(config = {}) {
|
|
9
6
|
return (context) => {
|
|
10
|
-
const convert =
|
|
7
|
+
const convert = createConverter(config);
|
|
11
8
|
context.converters.ngjs = ({ name, root }) => convert(name, root);
|
|
12
9
|
return {
|
|
13
10
|
NgjsExtension: convert.Extension,
|
|
@@ -21,5 +18,4 @@ function createNgjsApi(config = {}) {
|
|
|
21
18
|
};
|
|
22
19
|
};
|
|
23
20
|
}
|
|
24
|
-
exports.createNgjsApi = createNgjsApi;
|
|
25
21
|
//# sourceMappingURL=create.js.map
|
package/lib/create.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AAQpE;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAqB,EAAE;IACnD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAElE,OAAO;YACL,aAAa,EAAE,OAAO,CAAC,SAAS;YAChC,QAAQ,CAAC,IAAI,EAAE,IAAI;gBACjB,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,IAAI;oBACJ,IAAI;iBACL,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/lib/extension.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.createExtension = void 0;
|
|
4
|
-
const angular = require("angular");
|
|
5
|
-
function createExtension(rootName) {
|
|
1
|
+
import * as angular from 'angular';
|
|
2
|
+
export function createExtension(rootName) {
|
|
6
3
|
const NgjsExtension = angular.module(`piralExtension`, []);
|
|
7
4
|
NgjsExtension.component('extensionComponent', {
|
|
8
5
|
template: `<${rootName}></${rootName}>`,
|
|
@@ -30,5 +27,4 @@ function createExtension(rootName) {
|
|
|
30
27
|
});
|
|
31
28
|
return NgjsExtension;
|
|
32
29
|
}
|
|
33
|
-
exports.createExtension = createExtension;
|
|
34
30
|
//# sourceMappingURL=extension.js.map
|
package/lib/extension.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAC3D,aAAa,CAAC,SAAS,CAAC,oBAAoB,EAAE;QAC5C,QAAQ,EAAE,IAAI,QAAQ,MAAM,QAAQ,GAAG;QACvC,QAAQ,EAAE;YACR,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;YACX,MAAM,EAAE,GAAG;YACX,IAAI,EAAE,GAAG;SACV;QACD,UAAU,EAAE;YACV,UAAU;YACV,OAAO;YACP,UAAU,QAAQ,EAAE,KAAK;gBACvB,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;oBAClB,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;oBACtD,KAAK,CAAC,mBAAmB,CAAC,SAAS,EAAE;wBACnC,KAAK,EAAE,IAAI,CAAC,KAAK;wBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;wBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;wBACnB,IAAI,EAAE,IAAI,CAAC,IAAI;qBAChB,CAAC,CAAC;gBACL,CAAC,CAAC;YACJ,CAAC;SACF;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./create"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./types"), exports);
|
|
1
|
+
export * from './create';
|
|
2
|
+
export * from './types';
|
|
6
3
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
package/lib/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-ngjs",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.7243",
|
|
4
4
|
"description": "Plugin for integrating Angular.js components in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -16,32 +16,17 @@
|
|
|
16
16
|
"author": "smapiot",
|
|
17
17
|
"homepage": "https://piral.io",
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"module": "
|
|
19
|
+
"module": "lib/index.js",
|
|
20
20
|
"main": "lib/index.js",
|
|
21
21
|
"typings": "lib/index.d.ts",
|
|
22
22
|
"exports": {
|
|
23
|
-
".":
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
"./convert": {
|
|
28
|
-
"import": "./convert.js"
|
|
29
|
-
},
|
|
30
|
-
"./esm/*": {
|
|
31
|
-
"import": "./esm/*"
|
|
32
|
-
},
|
|
33
|
-
"./lib/*": {
|
|
34
|
-
"require": "./lib/*"
|
|
35
|
-
},
|
|
36
|
-
"./_/*": {
|
|
37
|
-
"import": "./esm/*.js",
|
|
38
|
-
"require": "./lib/*.js"
|
|
39
|
-
},
|
|
23
|
+
".": "./lib/index.js",
|
|
24
|
+
"./convert": "./convert.js",
|
|
25
|
+
"./lib/*": "./lib/*",
|
|
40
26
|
"./package.json": "./package.json"
|
|
41
27
|
},
|
|
42
28
|
"sideEffects": false,
|
|
43
29
|
"files": [
|
|
44
|
-
"esm",
|
|
45
30
|
"lib",
|
|
46
31
|
"src",
|
|
47
32
|
"convert.d.ts",
|
|
@@ -56,17 +41,16 @@
|
|
|
56
41
|
},
|
|
57
42
|
"scripts": {
|
|
58
43
|
"cleanup": "rimraf esm lib convert.d.ts convert.js",
|
|
59
|
-
"build": "yarn build:
|
|
44
|
+
"build": "yarn build:esnext && yarn build:convert",
|
|
60
45
|
"build:convert": "tsc convert.ts --skipLibCheck --declaration --module esnext",
|
|
61
|
-
"build:
|
|
62
|
-
"build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext",
|
|
46
|
+
"build:esnext": "tsc --project tsconfig.json --outDir lib --module esnext",
|
|
63
47
|
"typedoc": "typedoc --json ../../../docs/types/piral-ngjs.json src --exclude \"src/**/*.test.*\"",
|
|
64
48
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
65
49
|
},
|
|
66
50
|
"devDependencies": {
|
|
67
51
|
"@types/angular": "^1.6.45",
|
|
68
52
|
"angular": "^1.7.9",
|
|
69
|
-
"piral-core": "1.6.0-beta.
|
|
53
|
+
"piral-core": "1.6.0-beta.7243"
|
|
70
54
|
},
|
|
71
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "bbb6e4f78c61b6ef753099a5b378ad2708565ce3"
|
|
72
56
|
}
|
package/esm/converter.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ForeignComponent, BaseComponentProps } from 'piral-core';
|
|
2
|
-
import { IModule } from 'angular';
|
|
3
|
-
export interface NgjsConverterOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Defines the name of the root element.
|
|
6
|
-
* @default piral-slot
|
|
7
|
-
*/
|
|
8
|
-
rootName?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function createConverter(config?: NgjsConverterOptions): {
|
|
11
|
-
<TProps extends BaseComponentProps>(name: string, root: IModule): ForeignComponent<TProps>;
|
|
12
|
-
Extension: IModule;
|
|
13
|
-
};
|
package/esm/converter.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { bootstrap } from 'angular';
|
|
2
|
-
import { createExtension } from './extension';
|
|
3
|
-
export function createConverter(config = {}) {
|
|
4
|
-
const { rootName = 'piral-slot' } = config;
|
|
5
|
-
const Extension = createExtension(rootName);
|
|
6
|
-
const convert = (name, root) => ({
|
|
7
|
-
mount(el, props, ctx, locals) {
|
|
8
|
-
el.appendChild(document.createElement(name));
|
|
9
|
-
root.value('props', props);
|
|
10
|
-
root.value('piral', props.piral);
|
|
11
|
-
root.value('ctx', ctx);
|
|
12
|
-
locals.injector = bootstrap(el, [root.name]);
|
|
13
|
-
},
|
|
14
|
-
unmount(el, locals) {
|
|
15
|
-
const rootScope = locals.injector.get('$rootScope');
|
|
16
|
-
rootScope.$destroy();
|
|
17
|
-
locals.injector = undefined;
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
convert.Extension = Extension;
|
|
21
|
-
return convert;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=converter.js.map
|
package/esm/converter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAW,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAc9C,MAAM,UAAU,eAAe,CAAC,SAA+B,EAAE;IAC/D,MAAM,EAAE,QAAQ,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IAC3C,MAAM,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CAAoC,IAAY,EAAE,IAAa,EAA4B,EAAE,CAAC,CAAC;QAC7G,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAiB;YACrC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;YACjC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACvB,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,MAAiB;YAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YACpD,SAAS,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;KACF,CAAC,CAAC;IACH,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/esm/create.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { PiralPlugin } from 'piral-core';
|
|
2
|
-
import { NgjsConverterOptions } from './converter';
|
|
3
|
-
import type { PiletNgjsApi } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Available configuration options for the Angular.js plugin.
|
|
6
|
-
*/
|
|
7
|
-
export interface NgjsConfig extends NgjsConverterOptions {
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Creates the Pilet API extensions for Angular.js.
|
|
11
|
-
*/
|
|
12
|
-
export declare function createNgjsApi(config?: NgjsConfig): PiralPlugin<PiletNgjsApi>;
|
package/esm/create.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createConverter } from './converter';
|
|
2
|
-
/**
|
|
3
|
-
* Creates the Pilet API extensions for Angular.js.
|
|
4
|
-
*/
|
|
5
|
-
export function createNgjsApi(config = {}) {
|
|
6
|
-
return (context) => {
|
|
7
|
-
const convert = createConverter(config);
|
|
8
|
-
context.converters.ngjs = ({ name, root }) => convert(name, root);
|
|
9
|
-
return {
|
|
10
|
-
NgjsExtension: convert.Extension,
|
|
11
|
-
fromNgjs(name, root) {
|
|
12
|
-
return {
|
|
13
|
-
type: 'ngjs',
|
|
14
|
-
name,
|
|
15
|
-
root,
|
|
16
|
-
};
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=create.js.map
|
package/esm/create.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAwB,MAAM,aAAa,CAAC;AAQpE;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAqB,EAAE;IACnD,OAAO,CAAC,OAAO,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACxC,OAAO,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAElE,OAAO;YACL,aAAa,EAAE,OAAO,CAAC,SAAS;YAChC,QAAQ,CAAC,IAAI,EAAE,IAAI;gBACjB,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,IAAI;oBACJ,IAAI;iBACL,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/esm/extension.d.ts
DELETED
package/esm/extension.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as angular from 'angular';
|
|
2
|
-
export function createExtension(rootName) {
|
|
3
|
-
const NgjsExtension = angular.module(`piralExtension`, []);
|
|
4
|
-
NgjsExtension.component('extensionComponent', {
|
|
5
|
-
template: `<${rootName}></${rootName}>`,
|
|
6
|
-
bindings: {
|
|
7
|
-
empty: '<',
|
|
8
|
-
params: '<',
|
|
9
|
-
render: '<',
|
|
10
|
-
name: '@',
|
|
11
|
-
},
|
|
12
|
-
controller: [
|
|
13
|
-
'$element',
|
|
14
|
-
'piral',
|
|
15
|
-
function ($element, piral) {
|
|
16
|
-
this.$onInit = () => {
|
|
17
|
-
const container = $element[0].querySelector(rootName);
|
|
18
|
-
piral.renderHtmlExtension(container, {
|
|
19
|
-
empty: this.empty,
|
|
20
|
-
params: this.params,
|
|
21
|
-
render: this.render,
|
|
22
|
-
name: this.name,
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
});
|
|
28
|
-
return NgjsExtension;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=extension.js.map
|
package/esm/extension.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAC3D,aAAa,CAAC,SAAS,CAAC,oBAAoB,EAAE;QAC5C,QAAQ,EAAE,IAAI,QAAQ,MAAM,QAAQ,GAAG;QACvC,QAAQ,EAAE;YACR,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;YACX,MAAM,EAAE,GAAG;YACX,IAAI,EAAE,GAAG;SACV;QACD,UAAU,EAAE;YACV,UAAU;YACV,OAAO;YACP,UAAU,QAAQ,EAAE,KAAK;gBACvB,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;oBAClB,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;oBACtD,KAAK,CAAC,mBAAmB,CAAC,SAAS,EAAE;wBACnC,KAAK,EAAE,IAAI,CAAC,KAAK;wBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;wBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;wBACnB,IAAI,EAAE,IAAI,CAAC,IAAI;qBAChB,CAAC,CAAC;gBACL,CAAC,CAAC;YACJ,CAAC;SACF;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
package/esm/index.d.ts
DELETED
package/esm/index.js
DELETED
package/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
package/esm/types.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { IModule } from 'angular';
|
|
2
|
-
import type { ForeignComponent } from 'piral-core';
|
|
3
|
-
declare module 'piral-core/lib/types/custom' {
|
|
4
|
-
interface PiletCustomApi extends PiletNgjsApi {
|
|
5
|
-
}
|
|
6
|
-
interface PiralCustomComponentConverters<TProps> {
|
|
7
|
-
ngjs(component: NgjsComponent): ForeignComponent<TProps>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export interface NgjsComponent {
|
|
11
|
-
/**
|
|
12
|
-
* The module root.
|
|
13
|
-
*/
|
|
14
|
-
root: IModule;
|
|
15
|
-
/**
|
|
16
|
-
* The name of the component.
|
|
17
|
-
*/
|
|
18
|
-
name: string;
|
|
19
|
-
/**
|
|
20
|
-
* The type of the Angular.js component.
|
|
21
|
-
*/
|
|
22
|
-
type: 'ngjs';
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Defines the provided set of Angular Pilet API extensions.
|
|
26
|
-
*/
|
|
27
|
-
export interface PiletNgjsApi {
|
|
28
|
-
/**
|
|
29
|
-
* Wraps an Angular.js module for use in Piral.
|
|
30
|
-
* @param name The name of the component.
|
|
31
|
-
* @param root The module root.
|
|
32
|
-
* @returns The Piral Ngjs component.
|
|
33
|
-
*/
|
|
34
|
-
fromNgjs(name: string, root: IModule): NgjsComponent;
|
|
35
|
-
/**
|
|
36
|
-
* Angular.js component for displaying extensions of the given name.
|
|
37
|
-
*/
|
|
38
|
-
NgjsExtension: IModule;
|
|
39
|
-
}
|
package/esm/types.js
DELETED
package/esm/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|