@dazn/kopytko-framework 1.1.2 → 1.2.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.2.0](https://github.com/getndazn/kopytko-framework/compare/v1.1.2...v1.2.0) (2022-08-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* introduced KopytkoRoot that makes integration easier ([#32](https://github.com/getndazn/kopytko-framework/issues/32)) ([11efb22](https://github.com/getndazn/kopytko-framework/commit/11efb228d1e75d0020e1279f61ef1075dcc0f3e4))
|
|
7
|
+
|
|
1
8
|
## [1.1.2](https://github.com/getndazn/kopytko-framework/compare/v1.1.1...v1.1.2) (2022-07-14)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
end sub
|
|
23
|
+
|
|
24
|
+
sub kopytkoRoot_dynamicPropChanged(event as Object)
|
|
25
|
+
props = {}
|
|
26
|
+
props[event.getField()] = event.getData()
|
|
27
|
+
updateProps(props)
|
|
28
|
+
end sub
|