@reveldigital/player-client 1.0.0 → 1.0.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"safe-style.pipe.d.ts","sourceRoot":"","sources":["../../../../projects/reveldigital/player-client/src/lib/safe-style.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,aAAa,EAAY,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;;AAEzD,qBAGa,aAAc,YAAW,aAAa;IACnC,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,YAAY;IAE3C,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO;yCAHrB,aAAa;uCAAb,aAAa;CAMzB;AAED,qBAIa,qBAAqB;yCAArB,qBAAqB;0CAArB,qBAAqB,UAZrB,aAAa,kBAAb,aAAa;0CAYb,qBAAqB;CAAI"}
1
+ {"version":3,"file":"safe-style.pipe.d.ts","sourceRoot":"","sources":["../../../../projects/reveldigital/player-client/src/lib/safe-style.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,aAAa,EAAY,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;;AAEzD;;;;;;GAMG;AACH,qBAGa,aAAc,YAAW,aAAa;IACnC,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,YAAY;IAE3C,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO;yCAHrB,aAAa;uCAAb,aAAa;CAMzB;AAED,qBAIa,qBAAqB;yCAArB,qBAAqB;0CAArB,qBAAqB,UAZrB,aAAa,kBAAb,aAAa;0CAYb,qBAAqB;CAAI"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reveldigital/player-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Helper library for interfacing Angular apps with the Revel Digital player",
5
5
  "schematics": "./schematics/collection.json",
6
6
  "ng-add": {
@@ -27,7 +27,11 @@ prefs:
27
27
  datatype: bool
28
28
  default_value: true
29
29
  required: true
30
-
30
+ depends:
31
+ - name: myEnumPref
32
+ any_of:
33
+ - fast
34
+
31
35
  - name: myStylePref
32
36
  display_name: Sample style preference
33
37
  datatype: style
@@ -62,6 +62,10 @@ function processYML(json, html) {
62
62
  });
63
63
  }
64
64
  }
65
+
66
+ if (val.depends) {
67
+ appendDepends(val.depends, userPref);
68
+ }
65
69
  }
66
70
  }
67
71
 
@@ -102,3 +106,26 @@ function processYML(json, html) {
102
106
 
103
107
  return root.end({ prettyPrint: true });
104
108
  }
109
+
110
+
111
+ function appendDepends(depends, el) {
112
+
113
+ for (let dep of depends) {
114
+ const d = el.ele('DependsOn', {
115
+ name: dep.name,
116
+ type: dep.any_of ? 'any_of' : dep.all_of ? 'all_of' : 'none_of'
117
+ });
118
+
119
+ var arr = [].concat(dep.any_of, dep.all_of, dep.none_of).filter(o => o != null);
120
+ for (let a of arr) {
121
+ if (a.values) {
122
+ for (let val of a.values) {
123
+ d.ele('Value').txt(val);
124
+ }
125
+ }
126
+ if (a.depends) {
127
+ appendDepends(a.depends, d);
128
+ }
129
+ }
130
+ }
131
+ }