@knowlearning/agents 0.9.129 → 0.9.131

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/deploy.sh ADDED
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ script_dir=$(dirname "$(readlink -f "$0")")
4
+ cd "$script_dir"
5
+
6
+ if [ "$1" = "npm" ]; then
7
+ echo 'dry run:'
8
+ npm publish --access public --dry-run
9
+ read -p 'Are you sure you want to deploy a new version of the @knowlearning/agents module? (y/N): ' choice
10
+ if [ "$choice" = "y" ] || [ "$choice" = "Y" ]; then
11
+ npm publish --access public
12
+ else
13
+ echo 'NPM update deployment aborted'
14
+ exit 1
15
+ fi
16
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.129",
3
+ "version": "0.9.131",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "homepage": "https://github.com/knowlearning/platform#readme",
25
25
  "dependencies": {
26
- "@knowlearning/patch-proxy": "^1.3.1",
26
+ "@knowlearning/patch-proxy": "^1.3.2",
27
27
  "fast-json-patch": "^3.1.1",
28
28
  "uuid": "^8.3.2",
29
29
  "vue": "^3.3.4",
@@ -1,12 +1,11 @@
1
1
  <template>
2
2
  <slot :loading="loading" :value="value">
3
- <span v-if="loading">loading...</span>
4
- <span v-else>{{ value === null && placeholder ? placeholder : value }}</span>
3
+ <span>{{ defaultRenderedValue }}</span>
5
4
  </slot>
6
5
  </template>
7
6
 
8
7
  <script>
9
- import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
8
+ import { ref, watch, onMounted, onBeforeUnmount, computed } from 'vue'
10
9
 
11
10
  export default {
12
11
  props: {
@@ -39,7 +38,13 @@ export default {
39
38
  onMounted(() => startWatching())
40
39
  onBeforeUnmount(() => stopWatching && stopWatching())
41
40
 
42
- return { loading, value }
41
+ const defaultRenderedValue = computed(() => {
42
+ if (loading.value) return 'loading'
43
+ else if (value.value === null && props.placeholder) return props.placeholder
44
+ else return value.value
45
+ })
46
+
47
+ return { loading, value, defaultRenderedValue }
43
48
  }
44
49
  };
45
50
  </script>