alinea 0.9.0 → 0.9.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/dist/chunks/{chunk-ZOF2XAUZ.js → chunk-C4PS2PAP.js} +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/generate/GenerateDashboard.js +1 -1
- package/dist/cloud/server/CloudAuthServer.js +1 -1
- package/dist/core/Transaction.js +1 -1
- package/dist/core/Type.js +1 -8
- package/dist/core/pages/Cursor.js +1 -0
- package/dist/dashboard/util/PersistentStore.js +1 -1
- package/dist/field/richtext/RichTextField.browser.js +1 -1
- package/dist/picker/entry/EntryPicker.js +4 -3
- package/dist/picker/url/UrlPicker.js +2 -0
- package/package.json +1 -1
package/dist/cli/Serve.js
CHANGED
package/dist/cli/bin.js
CHANGED
package/dist/core/Transaction.js
CHANGED
|
@@ -41,7 +41,7 @@ var Operation = class _Operation {
|
|
|
41
41
|
const typeNames = Schema.typeNames(config.schema);
|
|
42
42
|
const typeName = typeNames.get(type);
|
|
43
43
|
if (!typeName)
|
|
44
|
-
throw new Error(`Type not found
|
|
44
|
+
throw new Error(`Type "${Type.label(type)}" not found in Schema`);
|
|
45
45
|
return typeName;
|
|
46
46
|
}
|
|
47
47
|
};
|
package/dist/core/Type.js
CHANGED
|
@@ -195,14 +195,7 @@ See: https://alinea.sh/docs/configuration/schema/type#fields-must-be-unique`
|
|
|
195
195
|
return Expr.and(...conditions)[Expr.Data];
|
|
196
196
|
}
|
|
197
197
|
call(...input) {
|
|
198
|
-
|
|
199
|
-
if (isConditionalRecord)
|
|
200
|
-
return new Cursor.Typed(this.target, input[0]);
|
|
201
|
-
else
|
|
202
|
-
return new Cursor.Find({
|
|
203
|
-
target: { type: this.target },
|
|
204
|
-
where: this.condition(input)
|
|
205
|
-
});
|
|
198
|
+
return new Cursor.Typed(this.target, input[0]);
|
|
206
199
|
}
|
|
207
200
|
field(def, name) {
|
|
208
201
|
return assign(Expr(ExprData.Field({ type: this.target }, name)), {
|
|
@@ -4,9 +4,10 @@ import "../../chunks/chunk-U5RRZUYZ.js";
|
|
|
4
4
|
import { Hint } from "alinea/core/Hint";
|
|
5
5
|
import { Reference } from "alinea/core/Reference";
|
|
6
6
|
import { Type, type } from "alinea/core/Type";
|
|
7
|
+
import { ListRow } from "alinea/core/shape/ListShape";
|
|
7
8
|
import { RecordShape } from "alinea/core/shape/RecordShape";
|
|
8
9
|
import { ScalarShape } from "alinea/core/shape/ScalarShape";
|
|
9
|
-
import { assign } from "alinea/core/util/Objects";
|
|
10
|
+
import { assign, keys } from "alinea/core/util/Objects";
|
|
10
11
|
import { EntryReference } from "./EntryReference.js";
|
|
11
12
|
function entryPicker(options) {
|
|
12
13
|
const fieldType = Type.isType(options.fields) ? options.fields : options.fields && type({ fields: options.fields });
|
|
@@ -27,11 +28,11 @@ function entryPicker(options) {
|
|
|
27
28
|
[Reference.id]: id,
|
|
28
29
|
[Reference.type]: type2,
|
|
29
30
|
[EntryReference.entry]: entryId,
|
|
31
|
+
[ListRow.index]: index,
|
|
30
32
|
...fields
|
|
31
33
|
} = row;
|
|
32
|
-
for (const key of
|
|
34
|
+
for (const key of keys(fields))
|
|
33
35
|
delete row[key];
|
|
34
|
-
row.id = entryId;
|
|
35
36
|
row.fields = fields;
|
|
36
37
|
if (!entryId)
|
|
37
38
|
return;
|
|
@@ -4,6 +4,7 @@ import "../../chunks/chunk-U5RRZUYZ.js";
|
|
|
4
4
|
import { Hint } from "alinea/core/Hint";
|
|
5
5
|
import { Reference } from "alinea/core/Reference";
|
|
6
6
|
import { Type, type } from "alinea/core/Type";
|
|
7
|
+
import { ListRow } from "alinea/core/shape/ListShape";
|
|
7
8
|
import { RecordShape } from "alinea/core/shape/RecordShape";
|
|
8
9
|
import { ScalarShape } from "alinea/core/shape/ScalarShape";
|
|
9
10
|
import { keys } from "alinea/core/util/Objects";
|
|
@@ -40,6 +41,7 @@ function urlPicker(options) {
|
|
|
40
41
|
[UrlReference.url]: url,
|
|
41
42
|
[UrlReference.title]: title,
|
|
42
43
|
[UrlReference.target]: target,
|
|
44
|
+
[ListRow.index]: index,
|
|
43
45
|
...fields
|
|
44
46
|
} = row;
|
|
45
47
|
const fieldKeys = keys(fields);
|