@dazn/kopytko-framework 1.1.2 → 1.3.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [1.3.1](https://github.com/getndazn/kopytko-framework/compare/v1.3.0...v1.3.1) (2022-08-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update dependencies ([#35](https://github.com/getndazn/kopytko-framework/issues/35)) ([7e317e0](https://github.com/getndazn/kopytko-framework/commit/7e317e0850cec411832318bf1491c8375c219cad))
7
+
8
+ # [1.3.0](https://github.com/getndazn/kopytko-framework/compare/v1.2.0...v1.3.0) (2022-08-01)
9
+
10
+
11
+ ### Features
12
+
13
+ * enhanced destroyKopytkoRoot to call destroyKopytko ([#34](https://github.com/getndazn/kopytko-framework/issues/34)) ([c21c2bb](https://github.com/getndazn/kopytko-framework/commit/c21c2bb61bae0f165d2a68341aa1cfb75d13a6b8))
14
+
15
+ # [1.2.0](https://github.com/getndazn/kopytko-framework/compare/v1.1.2...v1.2.0) (2022-08-01)
16
+
17
+
18
+ ### Features
19
+
20
+ * introduced KopytkoRoot that makes integration easier ([#32](https://github.com/getndazn/kopytko-framework/issues/32)) ([11efb22](https://github.com/getndazn/kopytko-framework/commit/11efb228d1e75d0020e1279f61ef1075dcc0f3e4))
21
+
1
22
  ## [1.1.2](https://github.com/getndazn/kopytko-framework/compare/v1.1.1...v1.1.2) (2022-07-14)
2
23
 
3
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dazn/kopytko-framework",
3
- "version": "1.1.2",
3
+ "version": "1.3.1",
4
4
  "description": "A modern Roku's Brightscript framework",
5
5
  "keywords": [
6
6
  "brightscript",
@@ -25,13 +25,13 @@
25
25
  "test": "node node_modules/@dazn/kopytko-unit-testing-framework/scripts/test.js"
26
26
  },
27
27
  "dependencies": {
28
- "@dazn/kopytko-utils": "^2.0.1"
28
+ "@dazn/kopytko-utils": "^2.2.2"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@dazn/eslint-plugin-kopytko": "^2.1.0",
32
- "@dazn/kopytko-packager": "^1.2.0",
33
- "@dazn/kopytko-unit-testing-framework": "^1.0.3",
34
- "eslint": "^8.10.0"
32
+ "@dazn/kopytko-packager": "^1.2.3",
33
+ "@dazn/kopytko-unit-testing-framework": "^2.0.1",
34
+ "eslint": "^8.21.0"
35
35
  },
36
36
  "license": "MIT",
37
37
  "kopytkoModuleDir": "src/",
@@ -0,0 +1,29 @@
1
+ sub initKopytkoRoot(dynamicProps as Object)
2
+ m._dynamicProps = dynamicProps
3
+
4
+ for each prop in dynamicProps
5
+ m.top.observeFieldScoped(prop, "kopytkoRoot_dynamicPropChanged")
6
+ end for
7
+
8
+ dynamicPropsValues = {}
9
+ for each prop in dynamicProps
10
+ dynamicPropsValues[prop] = m.top[prop]
11
+ end for
12
+
13
+ initKopytko(dynamicPropsValues)
14
+ end sub
15
+
16
+ sub destroyKopytkoRoot()
17
+ for each prop in m._dynamicProps
18
+ m.top.unobserveFieldScoped(prop)
19
+ end for
20
+
21
+ m._dynamicProps = Invalid
22
+ destroyKopytko()
23
+ end sub
24
+
25
+ sub kopytkoRoot_dynamicPropChanged(event as Object)
26
+ props = {}
27
+ props[event.getField()] = event.getData()
28
+ updateProps(props)
29
+ end sub