apostrophe 3.25.0 → 3.26.0
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/CHANGELOG.md +19 -0
- package/index.js +10 -5
- package/modules/@apostrophecms/asset/index.js +19 -26
- package/modules/@apostrophecms/asset/lib/webpack/src/webpack.config.js +2 -6
- package/modules/@apostrophecms/db/index.js +1 -1
- package/modules/@apostrophecms/i18n/i18n/en.json +0 -1
- package/modules/@apostrophecms/i18n/i18n/es.json +0 -1
- package/modules/@apostrophecms/i18n/i18n/pt-BR.json +0 -1
- package/modules/@apostrophecms/i18n/i18n/sk.json +0 -1
- package/modules/@apostrophecms/image/ui/apos/components/AposImageRelationshipEditor.vue +1 -1
- package/modules/@apostrophecms/module/index.js +10 -1
- package/modules/@apostrophecms/permission/index.js +29 -21
- package/modules/@apostrophecms/permission/ui/apos/components/AposInputRole.vue +15 -24
- package/modules/@apostrophecms/schema/index.js +4 -0
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputSelect.vue +1 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposSelect.vue +20 -2
- package/modules/@apostrophecms/util/index.js +1 -1
- package/package.json +1 -6
- package/test/assets.js +19 -102
- package/test/permissions.js +158 -105
- package/test/utils/permissions.js +638 -0
- package/modules/@apostrophecms/asset/lib/webpack/src/webpack.es5.js +0 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.26.0
|
|
4
|
+
|
|
5
|
+
### Adds
|
|
6
|
+
|
|
7
|
+
* Tasks can now be registered with the `afterModuleReady` flag, which is more useful than `afterModuleInit` because it waits for the module to be more fully initialized, including all "improvements" loaded via npm. The original `afterModuleInit` flag is still supported in case someone was counting on its behavior.
|
|
8
|
+
* Add `/grid` `POST` route in permission module, in addition to the existing `GET` one, to improve extensibility.
|
|
9
|
+
|
|
10
|
+
### Changes
|
|
11
|
+
|
|
12
|
+
* Since Microsoft has ended support for IE11 and support for ES5 builds is responsible for a significant chunk of Apostrophe's installation time, the `es5: true` option no longer produces an IE11 build. For backwards compatibility, developers will receive a warning, but their build will proceed without IE11 support. IE11 ES5 builds can be brought back by installing the optional [@apostrophecms/asset-es5](https://github.com/apostrophecms/asset-es5) module.
|
|
13
|
+
|
|
14
|
+
### Fixes
|
|
15
|
+
|
|
16
|
+
* `testModule: true` works in unit tests of external Apostrophe modules again even with modern versions of `mocha`, thanks to [Amin Shazrin](https://github.com/ammein).
|
|
17
|
+
* `getObjectManager` is now implemented for `Object` field types, fixing a bug that prevented the use of areas found in `object` schema fields within templates. Thanks to [James R T](https://github.com/jamestiotio).
|
|
18
|
+
|
|
3
19
|
## 3.25.0 (2022-07-20)
|
|
4
20
|
|
|
21
|
+
### Adds
|
|
22
|
+
|
|
5
23
|
* `radio` and `checkboxes` input field types now support a server side `choices` function for supplying their `choices` array dynamically, just like `select` fields do. Future custom field types can opt into this functionality with the field type flag `dynamicChoices: true`.
|
|
6
24
|
|
|
7
25
|
### Fixes
|
|
8
26
|
|
|
27
|
+
* `AposSelect` now emits values on `change` event as they were originally given. Their values "just work" so you do not have to think about JSON anymore when you receive it.
|
|
9
28
|
* Unpinned tiptap as the tiptap team has made releases that resolve the packaging errors that caused us to pin it in 3.22.1.
|
|
10
29
|
* Pinned `vue-loader` to the `15.9.x` minor release series for now. The `15.10.0` release breaks support for using `npm link` to develop the `apostrophe` module itself.
|
|
11
30
|
* Minimum version of `sanitize-html` bumped to ensure a potential denial-of-service vector is closed.
|
package/index.js
CHANGED
|
@@ -505,14 +505,18 @@ async function apostrophe(options, telemetry, rootSpan) {
|
|
|
505
505
|
// and throws an exception if we don't
|
|
506
506
|
function findTestModule() {
|
|
507
507
|
let m = module;
|
|
508
|
+
const nodeModuleRegex = new RegExp(`node_modules${path.sep}mocha`);
|
|
509
|
+
if (!require.main.filename.match(nodeModuleRegex)) {
|
|
510
|
+
throw new Error('mocha does not seem to be running, is this really a test?');
|
|
511
|
+
}
|
|
508
512
|
while (m) {
|
|
509
|
-
if (m.parent && m.parent.filename.match(
|
|
513
|
+
if (m.parent && m.parent.filename.match(nodeModuleRegex)) {
|
|
514
|
+
return m;
|
|
515
|
+
} else if (!m.parent) {
|
|
516
|
+
// Mocha v10 doesn't inject mocha paths inside `module`, therefore, we only detect the parent until the last parent. But we can get Mocha running using `require.main` - Amin
|
|
510
517
|
return m;
|
|
511
518
|
}
|
|
512
519
|
m = m.parent;
|
|
513
|
-
if (!m) {
|
|
514
|
-
throw new Error('mocha does not seem to be running, is this really a test?');
|
|
515
|
-
}
|
|
516
520
|
}
|
|
517
521
|
}
|
|
518
522
|
}
|
|
@@ -562,7 +566,8 @@ async function apostrophe(options, telemetry, rootSpan) {
|
|
|
562
566
|
self.modules = {};
|
|
563
567
|
for (const item of modulesToBeInstantiated()) {
|
|
564
568
|
// module registers itself in self.modules
|
|
565
|
-
await self.synth.create(item, { apos: self });
|
|
569
|
+
const module = await self.synth.create(item, { apos: self });
|
|
570
|
+
await module.emit('moduleReady');
|
|
566
571
|
}
|
|
567
572
|
}
|
|
568
573
|
|
|
@@ -42,6 +42,7 @@ module.exports = {
|
|
|
42
42
|
},
|
|
43
43
|
|
|
44
44
|
async init(self) {
|
|
45
|
+
|
|
45
46
|
self.restartId = self.apos.util.generateId();
|
|
46
47
|
self.iconMap = {
|
|
47
48
|
...globalIcons
|
|
@@ -63,6 +64,7 @@ module.exports = {
|
|
|
63
64
|
self.buildWatcherEnable = process.env.APOS_ASSET_WATCH !== '0' && self.options.watch !== false;
|
|
64
65
|
self.buildWatcherDebounceMs = parseInt(self.options.watchDebounceMs || 1000, 10);
|
|
65
66
|
self.buildWatcher = null;
|
|
67
|
+
|
|
66
68
|
},
|
|
67
69
|
handlers (self) {
|
|
68
70
|
return {
|
|
@@ -121,6 +123,15 @@ module.exports = {
|
|
|
121
123
|
usage: 'Build Apostrophe frontend CSS and JS bundles',
|
|
122
124
|
afterModuleInit: true,
|
|
123
125
|
async task(argv = {}) {
|
|
126
|
+
if (self.options.es5 && !self.es5TaskFn) {
|
|
127
|
+
self.apos.util.warnDev(stripIndent`
|
|
128
|
+
es5: true is set. IE11 compatibility builds now require that you
|
|
129
|
+
install the optional @apostrophecms/asset-es5 module. Until then,
|
|
130
|
+
for backwards compatibility, your build will succeed but
|
|
131
|
+
will not be IE11 compatible.
|
|
132
|
+
`);
|
|
133
|
+
self.options.es5 = false;
|
|
134
|
+
}
|
|
124
135
|
// The lock could become huge, cache it, see computeCacheMeta()
|
|
125
136
|
let packageLockContentCached;
|
|
126
137
|
const req = self.apos.task.getReq();
|
|
@@ -350,7 +361,11 @@ module.exports = {
|
|
|
350
361
|
modulesDir,
|
|
351
362
|
outputPath: bundleDir,
|
|
352
363
|
outputFilename,
|
|
353
|
-
bundles: webpackExtraBundles
|
|
364
|
+
bundles: webpackExtraBundles,
|
|
365
|
+
// Added on the fly by the
|
|
366
|
+
// @apostrophecms/asset-es5 module,
|
|
367
|
+
// if it is present
|
|
368
|
+
es5TaskFn: self.es5TaskFn
|
|
354
369
|
}, self.apos);
|
|
355
370
|
|
|
356
371
|
const webpackInstanceConfigMerged = self.webpackExtensions
|
|
@@ -841,7 +856,7 @@ module.exports = {
|
|
|
841
856
|
|
|
842
857
|
'clear-cache': {
|
|
843
858
|
usage: 'Clear build cache',
|
|
844
|
-
|
|
859
|
+
afterModuleReady: true,
|
|
845
860
|
async task(argv) {
|
|
846
861
|
const cacheBaseDir = self.getCacheBasePath();
|
|
847
862
|
|
|
@@ -1161,7 +1176,7 @@ module.exports = {
|
|
|
1161
1176
|
// If you are trying to enable IE11 support for ui/src, use the
|
|
1162
1177
|
// `es5: true` option (es5 builds are disabled by default).
|
|
1163
1178
|
configureBuilds() {
|
|
1164
|
-
|
|
1179
|
+
self.srcPrologue = stripIndent`
|
|
1165
1180
|
(function() {
|
|
1166
1181
|
window.apos = window.apos || {};
|
|
1167
1182
|
var data = document.body && document.body.getAttribute('data-apos');
|
|
@@ -1188,26 +1203,7 @@ module.exports = {
|
|
|
1188
1203
|
index: true,
|
|
1189
1204
|
// Load only in browsers that support ES6 modules
|
|
1190
1205
|
condition: 'module',
|
|
1191
|
-
prologue: srcPrologue
|
|
1192
|
-
},
|
|
1193
|
-
'src-es5': {
|
|
1194
|
-
// An alternative build from the same sources for IE11
|
|
1195
|
-
source: 'src',
|
|
1196
|
-
webpack: true,
|
|
1197
|
-
scenes: [ 'public', 'apos' ],
|
|
1198
|
-
// The CSS from the src build is identical, do not duplicate it
|
|
1199
|
-
outputs: [ 'js' ],
|
|
1200
|
-
label: 'apostrophe:ie11Build',
|
|
1201
|
-
// Load index.js and index.scss from each module
|
|
1202
|
-
index: true,
|
|
1203
|
-
// The polyfills babel will be expecting
|
|
1204
|
-
prologue: stripIndent`
|
|
1205
|
-
import "core-js/stable";
|
|
1206
|
-
import "regenerator-runtime/runtime";
|
|
1207
|
-
${srcPrologue}
|
|
1208
|
-
`,
|
|
1209
|
-
// Load only in browsers that do not support ES6 modules
|
|
1210
|
-
condition: 'nomodule'
|
|
1206
|
+
prologue: self.srcPrologue
|
|
1211
1207
|
},
|
|
1212
1208
|
public: {
|
|
1213
1209
|
scenes: [ 'public', 'apos' ],
|
|
@@ -1236,9 +1232,6 @@ module.exports = {
|
|
|
1236
1232
|
// We could add an apos-ie11 bundle that just pushes a "sorry charlie" prologue,
|
|
1237
1233
|
// if we chose
|
|
1238
1234
|
};
|
|
1239
|
-
if (!self.options.es5) {
|
|
1240
|
-
delete self.builds['src-es5'];
|
|
1241
|
-
}
|
|
1242
1235
|
},
|
|
1243
1236
|
// Filter the given css performing any necessary transformations,
|
|
1244
1237
|
// such as support for the /modules path regardless of where
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const merge = require('webpack-merge').merge;
|
|
3
3
|
const scssTask = require('./webpack.scss');
|
|
4
|
-
const es5Task = require('./webpack.es5');
|
|
5
4
|
const srcBuildNames = [ 'src-build', 'src-es5-build' ];
|
|
6
5
|
|
|
7
6
|
let BundleAnalyzerPlugin;
|
|
@@ -11,14 +10,11 @@ if (process.env.APOS_BUNDLE_ANALYZER) {
|
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
module.exports = ({
|
|
14
|
-
importFile, modulesDir, outputPath, outputFilename, bundles = {}, es5
|
|
13
|
+
importFile, modulesDir, outputPath, outputFilename, bundles = {}, es5, es5TaskFn
|
|
15
14
|
}, apos) => {
|
|
16
15
|
const mainBundleName = outputFilename.replace('.js', '');
|
|
17
|
-
const taskFns = [ scssTask ];
|
|
16
|
+
const taskFns = [ scssTask, ...(es5 ? [ es5TaskFn ] : []) ];
|
|
18
17
|
|
|
19
|
-
if (es5) {
|
|
20
|
-
taskFns.push(es5Task);
|
|
21
|
-
}
|
|
22
18
|
const tasks = taskFns.map(task =>
|
|
23
19
|
task(
|
|
24
20
|
{
|
|
@@ -168,7 +168,7 @@ This database contains an Apostrophe 2.x website. Exiting to avoid content loss.
|
|
|
168
168
|
// and start up your app, which will recreate them.
|
|
169
169
|
reset: {
|
|
170
170
|
usage: 'Usage: node app @apostrophecms/db:reset\n\nThis destroys ALL of your content. EVERYTHING in your database.\n',
|
|
171
|
-
|
|
171
|
+
afterModuleReady: true,
|
|
172
172
|
exitAfter: false,
|
|
173
173
|
task: async () => {
|
|
174
174
|
const argv = self.apos.argv;
|
|
@@ -288,7 +288,6 @@
|
|
|
288
288
|
"previousPage": "Previous Page",
|
|
289
289
|
"public": "Public",
|
|
290
290
|
"modernBuild": "Public-facing modern JavaScript and Sass",
|
|
291
|
-
"ie11Build": "Public-facing modern JavaScript and Sass (IE11 build)",
|
|
292
291
|
"publish": "Publish",
|
|
293
292
|
"publishBeforeUsingTooltip": "Publish this content before using it in a relationship",
|
|
294
293
|
"published": "Published",
|
|
@@ -265,7 +265,6 @@
|
|
|
265
265
|
"previousPage": "Página Previa",
|
|
266
266
|
"public": "Público",
|
|
267
267
|
"modernBuild": "JavaScript y Sass moderno orientado al público",
|
|
268
|
-
"ie11Build": "JavaScript y Sass (edición IE11) moderno orientado al público",
|
|
269
268
|
"publish": "Publicar",
|
|
270
269
|
"publishBeforeUsingTooltip": "Publique este contenido antes de utilizarlo en una relación",
|
|
271
270
|
"published": "Publicado",
|
|
@@ -263,7 +263,6 @@
|
|
|
263
263
|
"previousPage": "Página Anterior",
|
|
264
264
|
"public": "Público",
|
|
265
265
|
"modernBuild": "JavaScript and Sass modernos públicos",
|
|
266
|
-
"ie11Build": "JavaScript and Sass (IE11 build) modernos públicos",
|
|
267
266
|
"publish": "Publicar",
|
|
268
267
|
"publishBeforeUsingTooltip": "Publique esse conteúdo antes de usá-lo em um relacionamento",
|
|
269
268
|
"published": "Publicado",
|
|
@@ -277,7 +277,6 @@
|
|
|
277
277
|
"previousPage": "Predchádzajúca strana",
|
|
278
278
|
"public": "Verejné",
|
|
279
279
|
"modernBuild": "Verejnosti orientovaný moderný JavaScript a Sass",
|
|
280
|
-
"ie11Build": "Verejný moderný JavaScript a Sass (zostava IE11)",
|
|
281
280
|
"publish": "Publikovať",
|
|
282
281
|
"publishBeforeUsingTooltip": "Pred použitím v kontexte zverejnite tento obsah",
|
|
283
282
|
"published": "Publikovaný",
|
|
@@ -705,8 +705,12 @@ module.exports = {
|
|
|
705
705
|
},
|
|
706
706
|
|
|
707
707
|
async executeAfterModuleInitTask() {
|
|
708
|
+
return self.executeAfterModuleTask('afterModuleInit');
|
|
709
|
+
},
|
|
710
|
+
|
|
711
|
+
async executeAfterModuleTask(when) {
|
|
708
712
|
for (const [ name, info ] of Object.entries(self.tasks || {})) {
|
|
709
|
-
if (info
|
|
713
|
+
if (info[when]) {
|
|
710
714
|
// Execute a task like @apostrophecms/asset:build or
|
|
711
715
|
// @apostrophecms/db:reset which
|
|
712
716
|
// must run before most modules are awake
|
|
@@ -764,6 +768,11 @@ module.exports = {
|
|
|
764
768
|
|
|
765
769
|
handlers(self) {
|
|
766
770
|
return {
|
|
771
|
+
moduleReady: {
|
|
772
|
+
executeAfterModuleReadyTask() {
|
|
773
|
+
return self.executeAfterModuleTask('afterModuleReady');
|
|
774
|
+
}
|
|
775
|
+
},
|
|
767
776
|
'apostrophe:modulesRegistered': {
|
|
768
777
|
addHelpers() {
|
|
769
778
|
// We check this just to allow init in bootstrap tests that
|
|
@@ -302,6 +302,29 @@ module.exports = {
|
|
|
302
302
|
const manager = self.apos.doc.getManager(permissionSet.name);
|
|
303
303
|
return manager.options.showPermissions;
|
|
304
304
|
},
|
|
305
|
+
grid(req, role) {
|
|
306
|
+
if (!self.can(req, 'edit', '@apostrophecms/user')) {
|
|
307
|
+
throw self.apos.error('forbidden');
|
|
308
|
+
}
|
|
309
|
+
const permissionSets = [];
|
|
310
|
+
const effectiveRole = self.apos.launder.select(role, [ 'guest', 'contributor', 'editor', 'admin' ]);
|
|
311
|
+
if (!effectiveRole) {
|
|
312
|
+
throw self.apos.error('invalid', { role: effectiveRole });
|
|
313
|
+
}
|
|
314
|
+
const _req = self.apos.task.getReq({
|
|
315
|
+
role: effectiveRole,
|
|
316
|
+
mode: 'draft'
|
|
317
|
+
});
|
|
318
|
+
for (const module of Object.values(self.apos.modules)) {
|
|
319
|
+
if (self.apos.synth.instanceOf(module, '@apostrophecms/piece-type')) {
|
|
320
|
+
permissionSets.push(self.describePermissionSet(_req, module, { piece: true }));
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
permissionSets.push(self.describePermissionSet(_req, self.apos.modules['@apostrophecms/any-page-type']));
|
|
324
|
+
return {
|
|
325
|
+
permissionSets: self.presentPermissionSets(permissionSets)
|
|
326
|
+
};
|
|
327
|
+
},
|
|
305
328
|
...require('./lib/legacy-migrations')(self)
|
|
306
329
|
};
|
|
307
330
|
},
|
|
@@ -309,27 +332,12 @@ module.exports = {
|
|
|
309
332
|
return {
|
|
310
333
|
get: {
|
|
311
334
|
async grid(req) {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
throw self.apos.error('invalid', { role: effectiveRole });
|
|
319
|
-
}
|
|
320
|
-
const _req = self.apos.task.getReq({
|
|
321
|
-
role: effectiveRole,
|
|
322
|
-
mode: 'draft'
|
|
323
|
-
});
|
|
324
|
-
for (const module of Object.values(self.apos.modules)) {
|
|
325
|
-
if (self.apos.synth.instanceOf(module, '@apostrophecms/piece-type')) {
|
|
326
|
-
permissionSets.push(self.describePermissionSet(_req, module, { piece: true }));
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
permissionSets.push(self.describePermissionSet(_req, self.apos.modules['@apostrophecms/any-page-type']));
|
|
330
|
-
return {
|
|
331
|
-
permissionSets: self.presentPermissionSets(permissionSets)
|
|
332
|
-
};
|
|
335
|
+
return self.grid(req, req.query.role);
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
post: {
|
|
339
|
+
async grid(req) {
|
|
340
|
+
return self.grid(req, req.body.role);
|
|
333
341
|
}
|
|
334
342
|
}
|
|
335
343
|
};
|
|
@@ -7,26 +7,15 @@
|
|
|
7
7
|
:display-options="displayOptions"
|
|
8
8
|
>
|
|
9
9
|
<template #body>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
:selected="choice.value === value.data"
|
|
20
|
-
>
|
|
21
|
-
{{ $t(choice.label) }}
|
|
22
|
-
</option>
|
|
23
|
-
</select>
|
|
24
|
-
<AposIndicator
|
|
25
|
-
icon="menu-down-icon"
|
|
26
|
-
class="apos-input-icon"
|
|
27
|
-
:icon-size="20"
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
10
|
+
<AposSelect
|
|
11
|
+
:choices="choices"
|
|
12
|
+
:disabled="field.readOnly"
|
|
13
|
+
:selected="value.data"
|
|
14
|
+
:id="uid"
|
|
15
|
+
:classes="[ 'apos-input__role' ]"
|
|
16
|
+
:wrapper-classes="[ 'apos-input__role' ]"
|
|
17
|
+
@change="change"
|
|
18
|
+
/>
|
|
30
19
|
<div class="apos-input__role__permission-grid">
|
|
31
20
|
<div
|
|
32
21
|
v-for="permissionSet in permissionSets"
|
|
@@ -152,15 +141,17 @@ export default {
|
|
|
152
141
|
},
|
|
153
142
|
change(value) {
|
|
154
143
|
// Allows expression of non-string values
|
|
155
|
-
this.next = this.choices.find(choice => choice.value ===
|
|
144
|
+
this.next = this.choices.find(choice => choice.value === value).value;
|
|
156
145
|
},
|
|
157
146
|
async getPermissionSets(role) {
|
|
158
|
-
|
|
159
|
-
|
|
147
|
+
const { permissionSets } = await apos.http.post(`${apos.permission.action}/grid`, {
|
|
148
|
+
body: {
|
|
160
149
|
role
|
|
161
150
|
},
|
|
162
151
|
busy: true
|
|
163
|
-
})
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
return permissionSets;
|
|
164
155
|
}
|
|
165
156
|
}
|
|
166
157
|
};
|
|
@@ -1405,6 +1405,10 @@ module.exports = {
|
|
|
1405
1405
|
getArrayManager(name) {
|
|
1406
1406
|
return self.arrayManagers[name];
|
|
1407
1407
|
},
|
|
1408
|
+
// This allows the getManagerOf method to operate on objects of type "object".
|
|
1409
|
+
getObjectManager(name) {
|
|
1410
|
+
return self.objectManagers[name];
|
|
1411
|
+
},
|
|
1408
1412
|
// Regenerate all array item, area and widget ids so they are considered
|
|
1409
1413
|
// new. Useful when copying an entire doc.
|
|
1410
1414
|
regenerateIds(req, schema, doc) {
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
69
69
|
},
|
|
70
70
|
change(value) {
|
|
71
71
|
// Allows expression of non-string values
|
|
72
|
-
this.next = this.choices.find(choice => choice.value ===
|
|
72
|
+
this.next = this.choices.find(choice => choice.value === value).value;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="apos-input-wrapper">
|
|
2
|
+
<div class="apos-input-wrapper" :class="wrapperClasses">
|
|
3
3
|
<select
|
|
4
4
|
class="apos-input apos-input--select"
|
|
5
|
+
:class="classes"
|
|
6
|
+
:uid="uid"
|
|
5
7
|
:disabled="disabled"
|
|
6
8
|
@change="change($event.target.value)"
|
|
7
9
|
>
|
|
@@ -30,6 +32,22 @@ export default {
|
|
|
30
32
|
type: String,
|
|
31
33
|
default: 'menu-down-icon'
|
|
32
34
|
},
|
|
35
|
+
uid: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: null
|
|
38
|
+
},
|
|
39
|
+
classes: {
|
|
40
|
+
type: Array,
|
|
41
|
+
default() {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
wrapperClasses: {
|
|
46
|
+
type: Array,
|
|
47
|
+
default() {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
},
|
|
33
51
|
choices: {
|
|
34
52
|
type: Array,
|
|
35
53
|
default() {
|
|
@@ -48,7 +66,7 @@ export default {
|
|
|
48
66
|
emits: [ 'change' ],
|
|
49
67
|
methods: {
|
|
50
68
|
change(value) {
|
|
51
|
-
this.$emit('change', value);
|
|
69
|
+
this.$emit('change', JSON.parse(value));
|
|
52
70
|
}
|
|
53
71
|
}
|
|
54
72
|
};
|
|
@@ -663,7 +663,7 @@ module.exports = {
|
|
|
663
663
|
} else if (object.metaType === 'arrayItem') {
|
|
664
664
|
return self.apos.schema.getArrayManager(object.scopedArrayName);
|
|
665
665
|
} else if (object.metaType === 'object') {
|
|
666
|
-
return self.apos.schema.
|
|
666
|
+
return self.apos.schema.getObjectManager(object.scopedObjectName);
|
|
667
667
|
} else {
|
|
668
668
|
throw new Error(`Unsupported metaType in getManagerOf: ${object.metaType}`);
|
|
669
669
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apostrophe",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.26.0",
|
|
4
4
|
"description": "The Apostrophe Content Management System.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,8 +31,6 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@apostrophecms/vue-color": "^2.8.2",
|
|
34
|
-
"@babel/core": "^7.16.7",
|
|
35
|
-
"@babel/preset-env": "^7.16.7",
|
|
36
34
|
"@opentelemetry/api": "^1.0.4",
|
|
37
35
|
"@opentelemetry/semantic-conventions": "^1.0.1",
|
|
38
36
|
"@tiptap/extension-highlight": "^2.0.0-beta.33",
|
|
@@ -43,7 +41,6 @@
|
|
|
43
41
|
"@tiptap/starter-kit": "^2.0.0-beta.185",
|
|
44
42
|
"@tiptap/vue-2": "^2.0.0-beta.79",
|
|
45
43
|
"autoprefixer": "^10.4.1",
|
|
46
|
-
"babel-loader": "^8.2.5",
|
|
47
44
|
"bluebird": "^3.7.2",
|
|
48
45
|
"body-parser": "^1.18.2",
|
|
49
46
|
"boring": "^1.1.1",
|
|
@@ -54,7 +51,6 @@
|
|
|
54
51
|
"connect-mongo": "^3.0.0",
|
|
55
52
|
"connect-multiparty": "^2.1.1",
|
|
56
53
|
"cookie-parser": "^1.4.5",
|
|
57
|
-
"core-js": "~3.14.0",
|
|
58
54
|
"cors": "^2.8.5",
|
|
59
55
|
"credential": "^2.0.0",
|
|
60
56
|
"css-loader": "^5.2.4",
|
|
@@ -98,7 +94,6 @@
|
|
|
98
94
|
"postcss-scss": "^4.0.3",
|
|
99
95
|
"prompts": "^2.4.1",
|
|
100
96
|
"qs": "^6.10.1",
|
|
101
|
-
"regenerator-runtime": "^0.13.7",
|
|
102
97
|
"regexp-quote": "0.0.0",
|
|
103
98
|
"resolve": "^1.19.0",
|
|
104
99
|
"resolve-from": "^5.0.0",
|