@aeriajs/core 0.0.225 → 0.0.227
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/collection/preload.d.ts +1 -1
- package/dist/collection/preload.js +2 -35
- package/dist/collection/preload.mjs +1 -1
- package/dist/presets/index.d.ts +116 -8
- package/dist/presets/index.js +19 -22
- package/dist/presets/index.mjs +18 -8
- package/package.json +8 -8
|
@@ -1,42 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.preloadDescription = exports.applyPreset = void 0;
|
|
37
4
|
const common_1 = require("@aeriajs/common");
|
|
38
5
|
const assets_js_1 = require("../assets.js");
|
|
39
|
-
const
|
|
6
|
+
const index_js_1 = require("../presets/index.js");
|
|
40
7
|
const preloadMemo = {};
|
|
41
8
|
const recurseProperty = async (_property, propName, description) => {
|
|
42
9
|
const property = Object.assign({}, _property);
|
|
@@ -74,7 +41,7 @@ const recurseProperty = async (_property, propName, description) => {
|
|
|
74
41
|
return property;
|
|
75
42
|
};
|
|
76
43
|
const applyPreset = (entry, presetName, parentName) => {
|
|
77
|
-
const preset = presets[presetName];
|
|
44
|
+
const preset = index_js_1.presets[presetName];
|
|
78
45
|
const presetObject = Object.assign({}, parentName
|
|
79
46
|
? preset[parentName]
|
|
80
47
|
: preset);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { getReferenceProperty, deepMerge, serialize } from "@aeriajs/common";
|
|
3
3
|
import { getCollectionAsset } from "../assets.mjs";
|
|
4
|
-
import
|
|
4
|
+
import { presets } from "../presets/index.mjs";
|
|
5
5
|
const preloadMemo = {};
|
|
6
6
|
const recurseProperty = async (_property, propName, description) => {
|
|
7
7
|
const property = Object.assign({}, _property);
|
package/dist/presets/index.d.ts
CHANGED
|
@@ -1,8 +1,116 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export declare const presets: {
|
|
2
|
+
add: {
|
|
3
|
+
readonly actions: {
|
|
4
|
+
readonly spawnAdd: {
|
|
5
|
+
readonly label: "action.add";
|
|
6
|
+
readonly event: "spawnAdd";
|
|
7
|
+
readonly icon: "plus";
|
|
8
|
+
readonly button: true;
|
|
9
|
+
readonly translate: true;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
crud: {
|
|
14
|
+
readonly actions: {
|
|
15
|
+
readonly spawnAdd: {
|
|
16
|
+
readonly label: "action.add";
|
|
17
|
+
readonly event: "spawnAdd";
|
|
18
|
+
readonly icon: "plus";
|
|
19
|
+
readonly button: true;
|
|
20
|
+
readonly translate: true;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly individualActions: {
|
|
24
|
+
readonly spawnEdit: {
|
|
25
|
+
readonly label: "action.edit";
|
|
26
|
+
readonly event: "spawnEdit";
|
|
27
|
+
readonly icon: "pencil-simple";
|
|
28
|
+
readonly translate: true;
|
|
29
|
+
};
|
|
30
|
+
readonly viewItem: {
|
|
31
|
+
readonly label: "action.view";
|
|
32
|
+
readonly icon: "eye";
|
|
33
|
+
readonly translate: true;
|
|
34
|
+
readonly route: {
|
|
35
|
+
readonly name: "/dashboard/:collection/:id";
|
|
36
|
+
readonly setItem: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly remove: {
|
|
40
|
+
readonly label: "action.remove";
|
|
41
|
+
readonly icon: "trash";
|
|
42
|
+
readonly ask: true;
|
|
43
|
+
readonly translate: true;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
removeAll: {
|
|
48
|
+
readonly actions: {
|
|
49
|
+
readonly removeAll: {
|
|
50
|
+
readonly label: "action.removeAll";
|
|
51
|
+
readonly ask: true;
|
|
52
|
+
readonly selection: true;
|
|
53
|
+
readonly translate: true;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
duplicate: {
|
|
58
|
+
readonly individualActions: {
|
|
59
|
+
readonly duplicate: {
|
|
60
|
+
readonly label: "action.duplicate";
|
|
61
|
+
readonly event: "duplicate";
|
|
62
|
+
readonly icon: "copy";
|
|
63
|
+
readonly translate: true;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
owned: {
|
|
68
|
+
readonly properties: {
|
|
69
|
+
readonly owner: {
|
|
70
|
+
readonly $ref: "user";
|
|
71
|
+
readonly noForm: true;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
remove: {
|
|
76
|
+
readonly individualActions: {
|
|
77
|
+
readonly remove: {
|
|
78
|
+
readonly label: "action.remove";
|
|
79
|
+
readonly icon: "trash";
|
|
80
|
+
readonly ask: true;
|
|
81
|
+
readonly translate: true;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
timestamped: {
|
|
86
|
+
readonly properties: {
|
|
87
|
+
readonly created_at: {
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
readonly format: "date-time";
|
|
90
|
+
readonly noForm: true;
|
|
91
|
+
readonly readOnly: true;
|
|
92
|
+
readonly isTimestamp: true;
|
|
93
|
+
};
|
|
94
|
+
readonly updated_at: {
|
|
95
|
+
readonly type: "string";
|
|
96
|
+
readonly format: "date-time";
|
|
97
|
+
readonly noForm: true;
|
|
98
|
+
readonly readOnly: true;
|
|
99
|
+
readonly isTimestamp: true;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
view: {
|
|
104
|
+
readonly individualActions: {
|
|
105
|
+
readonly viewItem: {
|
|
106
|
+
readonly label: "action.view";
|
|
107
|
+
readonly icon: "eye";
|
|
108
|
+
readonly translate: true;
|
|
109
|
+
readonly route: {
|
|
110
|
+
readonly name: "/dashboard/:collection/:id";
|
|
111
|
+
readonly setItem: true;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
package/dist/presets/index.js
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
exports.presets = void 0;
|
|
4
|
+
const add_js_1 = require("./add.js");
|
|
5
|
+
const crud_js_1 = require("./crud.js");
|
|
6
|
+
const removeAll_js_1 = require("./removeAll.js");
|
|
7
|
+
const duplicate_js_1 = require("./duplicate.js");
|
|
8
|
+
const owned_js_1 = require("./owned.js");
|
|
9
|
+
const remove_js_1 = require("./remove.js");
|
|
10
|
+
const timestamped_js_1 = require("./timestamped.js");
|
|
11
|
+
const view_js_1 = require("./view.js");
|
|
12
|
+
exports.presets = {
|
|
13
|
+
add: add_js_1.add,
|
|
14
|
+
crud: crud_js_1.crud,
|
|
15
|
+
removeAll: removeAll_js_1.removeAll,
|
|
16
|
+
duplicate: duplicate_js_1.duplicate,
|
|
17
|
+
owned: owned_js_1.owned,
|
|
18
|
+
remove: remove_js_1.remove,
|
|
19
|
+
timestamped: timestamped_js_1.timestamped,
|
|
20
|
+
view: view_js_1.view,
|
|
21
|
+
};
|
package/dist/presets/index.mjs
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { add } from "./add.mjs";
|
|
3
|
+
import { crud } from "./crud.mjs";
|
|
4
|
+
import { removeAll } from "./removeAll.mjs";
|
|
5
|
+
import { duplicate } from "./duplicate.mjs";
|
|
6
|
+
import { owned } from "./owned.mjs";
|
|
7
|
+
import { remove } from "./remove.mjs";
|
|
8
|
+
import { timestamped } from "./timestamped.mjs";
|
|
9
|
+
import { view } from "./view.mjs";
|
|
10
|
+
export const presets = {
|
|
11
|
+
add,
|
|
12
|
+
crud,
|
|
13
|
+
removeAll,
|
|
14
|
+
duplicate,
|
|
15
|
+
owned,
|
|
16
|
+
remove,
|
|
17
|
+
timestamped,
|
|
18
|
+
view
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.227",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"aeriaMain": "tests/fixtures/aeriaMain.js",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"mongodb-memory-server": "^9.2.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@aeriajs/builtins": "^0.0.
|
|
46
|
-
"@aeriajs/common": "^0.0.
|
|
47
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
48
|
-
"@aeriajs/http": "^0.0.
|
|
49
|
-
"@aeriajs/security": "^0.0.
|
|
50
|
-
"@aeriajs/types": "^0.0.
|
|
51
|
-
"@aeriajs/validation": "^0.0.
|
|
45
|
+
"@aeriajs/builtins": "^0.0.227",
|
|
46
|
+
"@aeriajs/common": "^0.0.130",
|
|
47
|
+
"@aeriajs/entrypoint": "^0.0.133",
|
|
48
|
+
"@aeriajs/http": "^0.0.157",
|
|
49
|
+
"@aeriajs/security": "^0.0.227",
|
|
50
|
+
"@aeriajs/types": "^0.0.112",
|
|
51
|
+
"@aeriajs/validation": "^0.0.145"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"mongodb": "^6.5.0",
|