apostrophe 4.0.0 → 4.1.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 +24 -0
- package/defaults.js +2 -1
- package/modules/@apostrophecms/area/ui/apos/components/AposWidgetControls.vue +10 -10
- package/modules/@apostrophecms/attachment/index.js +2 -1
- package/modules/@apostrophecms/attachment/public/img/missing-icon.svg +14 -0
- package/modules/@apostrophecms/command-menu/ui/apos/components/AposCommandMenuKey.vue +1 -1
- package/modules/@apostrophecms/doc-type/index.js +34 -13
- package/modules/@apostrophecms/doc-type/ui/apos/components/AposDocContextMenu.vue +3 -3
- package/modules/@apostrophecms/i18n/i18n/en.json +13 -0
- package/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue +173 -6
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerSelections.vue +3 -2
- package/modules/@apostrophecms/login/index.js +18 -1
- package/modules/@apostrophecms/login/ui/apos/components/AposResetPasswordForm.vue +2 -2
- package/modules/@apostrophecms/login/ui/apos/logic/AposLoginForm.js +1 -16
- package/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue +9 -9
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue +4 -4
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalLip.vue +2 -2
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalTabs.vue +4 -3
- package/modules/@apostrophecms/notification/ui/apos/components/TheAposNotifications.vue +4 -2
- package/modules/@apostrophecms/oembed-field/ui/apos/components/AposInputOembed.vue +8 -6
- package/modules/@apostrophecms/page/index.js +1 -0
- package/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManagerSelectBox.vue +9 -5
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapButton.vue +1 -1
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapImage.vue +1 -1
- package/modules/@apostrophecms/schema/index.js +69 -8
- package/modules/@apostrophecms/schema/lib/addFieldTypes.js +1 -1
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputPassword.vue +6 -4
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputRange.vue +9 -6
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputString.vue +1 -1
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputWrapper.vue +15 -12
- package/modules/@apostrophecms/schema/ui/apos/components/AposSchema.vue +28 -19
- package/modules/@apostrophecms/schema/ui/apos/components/AposSearchList.vue +1 -1
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputRelationship.js +1 -1
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputSelect.js +2 -2
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputString.js +2 -2
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputWrapper.js +4 -4
- package/modules/@apostrophecms/schema/ui/apos/logic/AposSchema.js +4 -1
- package/modules/@apostrophecms/settings/ui/apos/components/AposSettingsManager.vue +1 -1
- package/modules/@apostrophecms/task/index.js +2 -0
- package/modules/@apostrophecms/translation/index.js +233 -0
- package/modules/@apostrophecms/translation/ui/apos/components/AposTranslationIndicator.vue +84 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposAvatar.vue +2 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposCellButton.vue +2 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposCellLabels.vue +49 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposCloudUploadIcon.vue +10 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenu.vue +3 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposEmptyState.vue +3 -3
- package/modules/@apostrophecms/ui/ui/apos/components/AposIndicator.vue +1 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposLabel.vue +1 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposPagerDots.vue +2 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposSlat.vue +11 -10
- package/modules/@apostrophecms/ui/ui/apos/components/AposSpinner.vue +2 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposTag.vue +3 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposTagListItem.vue +2 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposTreeRows.vue +1 -1
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_theme.scss +1 -0
- package/package.json +3 -3
- package/test/attachments.js +5 -0
- package/test/schemas.js +138 -0
- package/test/translation.js +538 -0
- package/test-lib/util.js +21 -0
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
:style="style"
|
|
33
33
|
>
|
|
34
34
|
<defs>
|
|
35
|
-
<linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%"
|
|
35
|
+
<linearGradient id="a" x1="8.042%" y1="0%" x2="65.682%" y2="23.865%">
|
|
36
36
|
<stop stop-color="currentColor" stop-opacity="0" offset="0%" />
|
|
37
37
|
<stop stop-color="currentColor" stop-opacity=".631" offset="63.146%" />
|
|
38
38
|
<stop stop-color="currentColor" offset="100%" />
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
</defs>
|
|
41
41
|
<g fill="none" fill-rule="evenodd">
|
|
42
42
|
<g transform="translate(1 1)">
|
|
43
|
-
<path d="M36 18c0-9.94-8.06-18-18-18"
|
|
43
|
+
<path id="Oval-2" d="M36 18c0-9.94-8.06-18-18-18" stroke="url(#a)" stroke-width="2" transform="rotate(266.312 18 18)">
|
|
44
44
|
<animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.9s" repeatCount="indefinite" />
|
|
45
45
|
</path>
|
|
46
46
|
<circle fill="currentColor" cx="36" cy="18" r="1" transform="rotate(266.312 18 18)">
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="apos-tag">
|
|
3
|
-
<button
|
|
3
|
+
<button class="apos-tag__button" @click="click">
|
|
4
4
|
<close-icon
|
|
5
|
-
class="apos-tag__remove"
|
|
5
|
+
class="apos-tag__remove"
|
|
6
|
+
title="Remove Tag"
|
|
6
7
|
:size="10"
|
|
7
8
|
/>
|
|
8
9
|
</button>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apostrophe",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "The Apostrophe Content Management System.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"form-data": "^4.0.0",
|
|
79
79
|
"fs-extra": "^7.0.1",
|
|
80
80
|
"glob": "^5.0.15",
|
|
81
|
-
"he": "^
|
|
81
|
+
"he": "^1.2.0",
|
|
82
82
|
"html-to-text": "^9.0.5",
|
|
83
83
|
"i18next": "^20.3.2",
|
|
84
84
|
"i18next-http-middleware": "^3.1.5",
|
|
@@ -149,4 +149,4 @@
|
|
|
149
149
|
"browserslist": [
|
|
150
150
|
"ie >= 10"
|
|
151
151
|
]
|
|
152
|
-
}
|
|
152
|
+
}
|
package/test/attachments.js
CHANGED
|
@@ -442,5 +442,10 @@ describe('Attachment', function() {
|
|
|
442
442
|
|
|
443
443
|
assert(height === 400);
|
|
444
444
|
});
|
|
445
|
+
|
|
446
|
+
it('should generate an appropriate missing attachment url', function() {
|
|
447
|
+
const url = apos.attachment.url(null);
|
|
448
|
+
assert.strictEqual(url, '/apos-frontend/default/modules/@apostrophecms/attachment/img/missing-icon.svg');
|
|
449
|
+
});
|
|
445
450
|
});
|
|
446
451
|
});
|
package/test/schemas.js
CHANGED
|
@@ -288,6 +288,44 @@ describe('Schemas', function() {
|
|
|
288
288
|
}
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
|
+
},
|
|
292
|
+
article: {
|
|
293
|
+
extend: '@apostrophecms/piece-type',
|
|
294
|
+
options: {
|
|
295
|
+
alias: 'article'
|
|
296
|
+
},
|
|
297
|
+
fields(self) {
|
|
298
|
+
return {
|
|
299
|
+
add: {
|
|
300
|
+
title: {
|
|
301
|
+
label: '',
|
|
302
|
+
type: 'string',
|
|
303
|
+
required: true
|
|
304
|
+
},
|
|
305
|
+
area: {
|
|
306
|
+
label: 'Area',
|
|
307
|
+
type: 'area',
|
|
308
|
+
options: {
|
|
309
|
+
widgets: {
|
|
310
|
+
'@apostrophecms/rich-text': {}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
array: {
|
|
315
|
+
label: 'Array',
|
|
316
|
+
type: 'array',
|
|
317
|
+
fields: {
|
|
318
|
+
add: {
|
|
319
|
+
arrayTitle: {
|
|
320
|
+
label: 'Array Title',
|
|
321
|
+
type: 'string'
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
}
|
|
291
329
|
}
|
|
292
330
|
}
|
|
293
331
|
});
|
|
@@ -2263,6 +2301,106 @@ describe('Schemas', function() {
|
|
|
2263
2301
|
assert(output.goodValue === '2022-05-09T22:36:00.000Z');
|
|
2264
2302
|
});
|
|
2265
2303
|
|
|
2304
|
+
it('should compare two document properly with the method getChanges', async function() {
|
|
2305
|
+
const req = apos.task.getReq();
|
|
2306
|
+
const instance = apos.article.newInstance();
|
|
2307
|
+
const article1 = {
|
|
2308
|
+
...instance,
|
|
2309
|
+
title: 'article 1',
|
|
2310
|
+
area: {
|
|
2311
|
+
_id: 'clrth36680007mnmd3jj7cta0',
|
|
2312
|
+
items: [
|
|
2313
|
+
{
|
|
2314
|
+
_id: 'clt79l48g001h2061j5ihxjkv',
|
|
2315
|
+
metaType: 'widget',
|
|
2316
|
+
type: '@apostrophecms/rich-text',
|
|
2317
|
+
aposPlaceholder: false,
|
|
2318
|
+
content: '<p>Some text here.</p>',
|
|
2319
|
+
permalinkIds: [],
|
|
2320
|
+
imageIds: []
|
|
2321
|
+
}
|
|
2322
|
+
],
|
|
2323
|
+
metaType: 'area'
|
|
2324
|
+
},
|
|
2325
|
+
array: [
|
|
2326
|
+
{
|
|
2327
|
+
_id: 'clt79llm800242061v4dx9kv5',
|
|
2328
|
+
metaType: 'arrayItem',
|
|
2329
|
+
scopedArrayName: 'doc.article.array',
|
|
2330
|
+
arrayTitle: 'array title 1'
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
_id: 'clt79llm800242061v4d47364',
|
|
2334
|
+
metaType: 'arrayItem',
|
|
2335
|
+
scopedArrayName: 'doc.article.array',
|
|
2336
|
+
arrayTitle: 'array title 2'
|
|
2337
|
+
}
|
|
2338
|
+
]
|
|
2339
|
+
};
|
|
2340
|
+
const article2 = {
|
|
2341
|
+
...article1,
|
|
2342
|
+
title: 'article 2'
|
|
2343
|
+
};
|
|
2344
|
+
const article3 = {
|
|
2345
|
+
...instance,
|
|
2346
|
+
title: 'article 3',
|
|
2347
|
+
|
|
2348
|
+
area: {
|
|
2349
|
+
_id: 'clrth36680007mnmd3jj7cta0',
|
|
2350
|
+
items: [
|
|
2351
|
+
{
|
|
2352
|
+
_id: 'clt79l48g001h2061j5ihxjkv',
|
|
2353
|
+
metaType: 'widget',
|
|
2354
|
+
type: '@apostrophecms/rich-text',
|
|
2355
|
+
aposPlaceholder: false,
|
|
2356
|
+
content: '<p>Some text here changed.</p>',
|
|
2357
|
+
permalinkIds: [],
|
|
2358
|
+
imageIds: []
|
|
2359
|
+
}
|
|
2360
|
+
],
|
|
2361
|
+
metaType: 'area'
|
|
2362
|
+
},
|
|
2363
|
+
array: [
|
|
2364
|
+
{
|
|
2365
|
+
_id: 'clt79llm800242061v4dx9kv5',
|
|
2366
|
+
metaType: 'arrayItem',
|
|
2367
|
+
scopedArrayName: 'doc.article.array',
|
|
2368
|
+
arrayTitle: 'array title 1 changed'
|
|
2369
|
+
},
|
|
2370
|
+
{
|
|
2371
|
+
_id: 'clt79llm800242061v4d47364',
|
|
2372
|
+
metaType: 'arrayItem',
|
|
2373
|
+
scopedArrayName: 'doc.article.array',
|
|
2374
|
+
arrayTitle: 'array title 2'
|
|
2375
|
+
}
|
|
2376
|
+
]
|
|
2377
|
+
};
|
|
2378
|
+
|
|
2379
|
+
await apos.article.insert(req, article1);
|
|
2380
|
+
await apos.article.insert(req, article2);
|
|
2381
|
+
await apos.article.insert(req, article3);
|
|
2382
|
+
|
|
2383
|
+
const art1 = await apos.doc.db.findOne({ title: 'article 1' });
|
|
2384
|
+
const art2 = await apos.doc.db.findOne({ title: 'article 2' });
|
|
2385
|
+
const art3 = await apos.doc.db.findOne({ title: 'article 3' });
|
|
2386
|
+
|
|
2387
|
+
const changes11 = apos.schema.getChanges(req, apos.article.schema, art1, art1);
|
|
2388
|
+
const changes12 = apos.schema.getChanges(req, apos.article.schema, art1, art2);
|
|
2389
|
+
const changes23 = apos.schema.getChanges(req, apos.article.schema, art2, art3);
|
|
2390
|
+
const actual = {
|
|
2391
|
+
changes11,
|
|
2392
|
+
changes12,
|
|
2393
|
+
changes23
|
|
2394
|
+
};
|
|
2395
|
+
const expected = {
|
|
2396
|
+
changes11: [],
|
|
2397
|
+
changes12: [ 'title', 'slug' ],
|
|
2398
|
+
changes23: [ 'title', 'slug', 'area', 'array' ]
|
|
2399
|
+
};
|
|
2400
|
+
|
|
2401
|
+
assert.deepEqual(actual, expected);
|
|
2402
|
+
});
|
|
2403
|
+
|
|
2266
2404
|
describe('field editPermission|viewPermission', function() {
|
|
2267
2405
|
const schema = [
|
|
2268
2406
|
{
|