@mediafly/js-ui 50.0.5 → 50.0.6-0

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.
@@ -10,12 +10,12 @@ function Component(options) {
10
10
  return function (target) {
11
11
  const bindings = Reflect.getMetadata('angular:bindings', target) || {};
12
12
  const injections = Reflect.getMetadata('angular:injections', target) || [];
13
- const componentOptions = Object.assign(Object.assign({ controller: target }, options), { bindings });
13
+ const controllerWithDI = injections.concat(target);
14
+ const componentOptions = Object.assign(Object.assign({ controller: controllerWithDI }, options), { bindings });
14
15
  if (options.selector.indexOf('-') !== -1) {
15
16
  throw new Error(`The @Component selector "${options.selector}" must be camelCased.`);
16
17
  }
17
- angular_1.default.module('app')
18
- .component(options.selector, componentOptions);
18
+ angular_1.default.module('app').component(options.selector, componentOptions);
19
19
  target.$inject = injections;
20
20
  return target;
21
21
  };
@@ -26,7 +26,8 @@ function Injectable(name) {
26
26
  const injections = Reflect.getMetadata('angular:injections', target) || [];
27
27
  Reflect.defineMetadata('angular:service', name, target);
28
28
  target.$inject = injections;
29
- angular_1.default.module('app').service(name, target);
29
+ const serviceWithDI = injections.concat(target);
30
+ angular_1.default.module('app').service(name, serviceWithDI);
30
31
  };
31
32
  }
32
33
  exports.Injectable = Injectable;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/decorators/index.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6B;AAC7B,4BAAyB;AAGzB,SAAgB,SAAS,CAAC,OAAoD;IAE7E,OAAO,UAAS,MAAW;QAE1B,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,IAAI,EAAE,CAAA;QACtE,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,EAAE,CAAA;QAC1E,MAAM,gBAAgB,iCAAK,UAAU,EAAE,MAAM,IAAK,OAAO,KAAE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AkC,GAAG;IAE1D,OAAO,UAAS,MAAM,EAAE,WAAmB;QAE1C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;QAClF,QAAQ,CAAC,WAAW,CAAC,GAAG,OAAO,CAAA;QAE/B,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;IACzE,CAAC,CAAA;AACF,CAAC;AATD,sBASC;AAGD,SAAgB,MAAM,CAAC,UAAsB,GAAG;IAE/C,OAAO,UAAS,MAAM,EAAE,WAAmB;QAE1C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;QAClF,QAAQ,CAAC,WAAW,CAAC,GAAG,OAAO,CAAA;QAC/B,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;IACzE,CAAC,CAAA;AACF,CAAC;AARD,wBAQC"}
@@ -177,7 +177,7 @@
177
177
  "affectsGlobalScope": true
178
178
  },
179
179
  "../src/components/decorators/index.ts": {
180
- "version": "214e2d43ccdfdaa53600ce4df5174e9fb8436bafd3985cce461641935c1bee41",
180
+ "version": "f0c96fb5bedc3c8827e97335e24034376a4876c6dd32b39a5072bdfd7e3e0af6",
181
181
  "signature": "90225b420dd350a6722f96a0c12034d97bf791461ccc509d550208a32656d65f",
182
182
  "affectsGlobalScope": false
183
183
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediafly/js-ui",
3
- "version": "50.0.5",
3
+ "version": "50.0.6-0",
4
4
  "license": "UNLICENSED",
5
5
  "description": "UI components for Mediafly Angular applications",
6
6
  "repository": {
@@ -4,40 +4,46 @@ import 'reflect-metadata'
4
4
 
5
5
  export function Component(options: { selector: string } & ng.IComponentOptions) {
6
6
 
7
- return function(target: any) {
7
+ return function(target) {
8
8
 
9
9
  const bindings = Reflect.getMetadata('angular:bindings', target) || {}
10
10
  const injections = Reflect.getMetadata('angular:injections', target) || []
11
- const componentOptions = { controller: target, ...options, bindings }
11
+
12
+ const controllerWithDI = injections.concat(target)
13
+
14
+ const componentOptions = { controller: controllerWithDI, ...options, bindings }
12
15
 
13
16
  if (options.selector.indexOf('-') !== -1) {
14
17
  throw new Error(`The @Component selector "${options.selector}" must be camelCased.`)
15
18
  }
16
19
 
17
- angular.module('app')
18
- .component(options.selector, componentOptions)
20
+ angular.module('app').component(options.selector, componentOptions)
19
21
 
20
22
  target.$inject = injections
21
23
  return target
22
24
  }
23
25
  }
24
26
 
27
+
25
28
  export function Injectable(name: string) {
26
29
 
27
- return function(target: any) {
30
+ return function(target) {
28
31
 
29
32
  const injections = Reflect.getMetadata('angular:injections', target) || []
30
33
  Reflect.defineMetadata('angular:service', name, target)
31
34
 
32
35
  target.$inject = injections
33
36
 
34
- angular.module('app').service(name, target)
37
+ const serviceWithDI = injections.concat(target)
38
+
39
+ angular.module('app').service(name, serviceWithDI)
35
40
  }
36
41
  }
37
42
 
43
+
38
44
  export function Inject(dependency?: string) {
39
45
 
40
- return function(target: any, _propertyKey: string, _propertyIndex: number) {
46
+ return function(target, _propertyKey: string, _propertyIndex: number) {
41
47
 
42
48
  const injections: string[] = Reflect.getMetadata('angular:injections', target) || []
43
49
 
@@ -48,19 +54,23 @@ export function Inject(dependency?: string) {
48
54
  Reflect.defineMetadata('angular:injections', injections, target)
49
55
  }
50
56
  }
57
+
58
+
51
59
  export function Input(binding: '<' | '=' | '=?' | '@' = '<') {
52
60
 
53
- return function(target: any, propertyKey: string) {
61
+ return function(target, propertyKey: string) {
54
62
 
55
63
  const bindings = Reflect.getMetadata('angular:bindings', target.constructor) || {}
56
64
  bindings[propertyKey] = binding
65
+
57
66
  Reflect.defineMetadata('angular:bindings', bindings, target.constructor)
58
67
  }
59
68
  }
60
69
 
70
+
61
71
  export function Output(binding: '&' | '&?' = '&') {
62
72
 
63
- return function(target: any, propertyKey: string) {
73
+ return function(target, propertyKey: string) {
64
74
 
65
75
  const bindings = Reflect.getMetadata('angular:bindings', target.constructor) || {}
66
76
  bindings[propertyKey] = binding