@live-change/relations-plugin 0.6.2 → 0.6.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/relations-plugin",
3
- "version": "0.6.2",
3
+ "version": "0.6.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,8 +21,8 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "^0.6.2",
24
+ "@live-change/framework": "^0.6.5",
25
25
  "pluralize": "8.0.0"
26
26
  },
27
- "gitHead": "02153d427b43f1766ee50d90cb531f63adeb7b0b"
27
+ "gitHead": "6ffba5113875638abf4203b56bdab5ed6a2e5e55"
28
28
  }
@@ -165,7 +165,7 @@ function defineDeleteAction(config, context) {
165
165
  function defineSortIndex(context, sortFields) {
166
166
  if(!Array.isArray(sortFields)) sortFields = [sortFields]
167
167
  const sortFieldsUc = sortFields.map(fd => fd.slice(0, 1).toUpperCase() + fd.slice(1))
168
- const indexName = 'by' + context.joinedOthersClassName + sortFieldsUc.join('')
168
+ const indexName = 'by' + context.joinedOthersClassName + 'And' + sortFieldsUc.join('And')
169
169
  const property = [...(context.otherPropertyNames.map(prop => [prop + 'Type', prop]).flat()), ...sortFields]
170
170
  console.log("DEFINE SORT INDEX", sortFields, "NAME", indexName, "PROP", property)
171
171
  context.model.indexes[indexName] = new IndexDefinition({
package/propertyEvents.js CHANGED
@@ -45,7 +45,7 @@ function defineTransferredEvent(config, context, generateId) {
45
45
  ...properties.to,
46
46
  id: toId
47
47
  })
48
- await modelRunntime().delete(fromId)
48
+ await modelRuntime().delete(fromId)
49
49
  return toId
50
50
  }
51
51
  })
@@ -27,7 +27,7 @@ function defineObjectView(config, context) {
27
27
  const viewProperties = {}
28
28
  for (let i = 0; i < others.length; i++) {
29
29
  viewProperties[otherPropertyNames[i]] = new PropertyDefinition({
30
- type: others[i],
30
+ type: 'String',
31
31
  validation: ['nonEmpty']
32
32
  })
33
33
  viewProperties[otherPropertyNames[i] + 'Type'] = new PropertyDefinition({
@@ -195,10 +195,10 @@ function defineResetAction(config, context) {
195
195
  service.actions[actionName] = new ActionDefinition({
196
196
  name: actionName,
197
197
  properties: {
198
- [modelPropertyName]: {
198
+ /*[modelPropertyName]: {
199
199
  type: model,
200
200
  validation: ['nonEmpty']
201
- },
201
+ },*/
202
202
  ...identifiers
203
203
  },
204
204
  access: config.resetAccess || config.writeAccess,