@humandialog/forms.svelte 0.4.29 → 0.4.30

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.
@@ -97,11 +97,17 @@
97
97
  if(config.customOperations && Array.isArray(config.customOperations) && config.customOperations.length > 0)
98
98
  {
99
99
  config.customOperations.forEach( o => {
100
- options.push({
101
- caption: o.caption,
102
- icon: o.icon,
103
- action: o.action
104
- })
100
+ if(o.condition)
101
+ {
102
+ if(o.condition())
103
+ {
104
+ options.push({
105
+ caption: o.caption,
106
+ icon: o.icon,
107
+ action: o.action
108
+ })
109
+ }
110
+ }
105
111
  })
106
112
  }
107
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humandialog/forms.svelte",
3
- "version": "0.4.29",
3
+ "version": "0.4.30",
4
4
  "description": "Basic Svelte UI components for Object Reef applications",
5
5
  "devDependencies": {
6
6
  "@playwright/test": "^1.28.1",
@@ -90,11 +90,17 @@
90
90
  if(config.customOperations && Array.isArray(config.customOperations) && config.customOperations.length > 0)
91
91
  {
92
92
  config.customOperations.forEach( o => {
93
- options.push({
94
- caption: o.caption,
95
- icon: o.icon,
96
- action: o.action
97
- })
93
+ if(o.condition)
94
+ {
95
+ if(o.condition())
96
+ {
97
+ options.push({
98
+ caption: o.caption,
99
+ icon: o.icon,
100
+ action: o.action
101
+ })
102
+ }
103
+ }
98
104
  })
99
105
  }
100
106