alchemy-chimera 1.2.4 → 1.2.6
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 +12 -0
- package/assets/stylesheets/chimera/chimera.scss +52 -14
- package/config/routes.js +8 -6
- package/controller/00-chimera_controller.js +18 -2
- package/controller/chimera_static_controller.js +8 -3
- package/lib/chimera_config.js +38 -2
- package/package.json +4 -4
- package/view/chimera/editor/add.hwk +0 -0
- package/view/chimera/editor/edit.hwk +0 -0
- package/view/chimera/editor/trash.hwk +0 -0
- package/view/chimera/toolbar/create_button.hwk +0 -0
- package/view/chimera/toolbar/edit_in_chimera_button.hwk +0 -0
- package/view/chimera/toolbar/preview_button.hwk +0 -0
- package/view/layouts/chimera_body.hwk +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.2.6 (2023-10-05)
|
|
2
|
+
|
|
3
|
+
* Do not queue a toolbar_manager model fallback on system routes without a model
|
|
4
|
+
* Fix the toolbar not having an `add` button on non-ajax pageviews
|
|
5
|
+
* Fix abstract model classes from showing up in the default chimera sidebar
|
|
6
|
+
* Don't show models without a valid chimera configuration in the sidebar
|
|
7
|
+
* Make date input fields look like the others
|
|
8
|
+
|
|
9
|
+
## 1.2.5 (2023-06-17)
|
|
10
|
+
|
|
11
|
+
* Improve stylings
|
|
12
|
+
|
|
1
13
|
## 1.2.4 (2023-04-20)
|
|
2
14
|
|
|
3
15
|
* Add document watcher & toolbar manager support
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
body {
|
|
5
5
|
font-family: 'Roboto', sans-serif;
|
|
6
|
+
|
|
7
|
+
.he-context-contents {
|
|
8
|
+
overflow: auto;
|
|
9
|
+
}
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
.default-form-editor,
|
|
@@ -343,6 +347,30 @@ al-field[mode="inline"] {
|
|
|
343
347
|
background: rgba(190,190,190,0.1);
|
|
344
348
|
min-height: 37px;
|
|
345
349
|
}
|
|
350
|
+
|
|
351
|
+
.field {
|
|
352
|
+
input[type="text"],
|
|
353
|
+
input[type="number"],
|
|
354
|
+
input[type="color"],
|
|
355
|
+
input[type="datetime-local"],
|
|
356
|
+
input[type="date"],
|
|
357
|
+
input[type="password"] {
|
|
358
|
+
@extend .chimera-input-field;
|
|
359
|
+
height: 3rem;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
textarea {
|
|
363
|
+
@extend .chimera-input-field;
|
|
364
|
+
min-height: 5rem;
|
|
365
|
+
padding: 1rem;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
input[type="color"] {
|
|
369
|
+
background-color: transparent;
|
|
370
|
+
border: none;
|
|
371
|
+
padding: 0;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
346
374
|
}
|
|
347
375
|
|
|
348
376
|
.default-form-editor,
|
|
@@ -410,6 +438,10 @@ al-field[mode="inline"] {
|
|
|
410
438
|
flex: 10;
|
|
411
439
|
}
|
|
412
440
|
|
|
441
|
+
> .does-not-expand {
|
|
442
|
+
flex: 0 1 auto;
|
|
443
|
+
}
|
|
444
|
+
|
|
413
445
|
> al-widget {
|
|
414
446
|
border: 1px solid var(--color-input-border);
|
|
415
447
|
padding: 0 12px;
|
|
@@ -421,6 +453,7 @@ al-field[mode="inline"] {
|
|
|
421
453
|
input[type="number"],
|
|
422
454
|
input[type="color"],
|
|
423
455
|
input[type="datetime-local"],
|
|
456
|
+
input[type="date"],
|
|
424
457
|
input[type="password"] {
|
|
425
458
|
@extend .chimera-input-field;
|
|
426
459
|
height: 3rem;
|
|
@@ -440,6 +473,10 @@ al-field[mode="inline"] {
|
|
|
440
473
|
}
|
|
441
474
|
}
|
|
442
475
|
|
|
476
|
+
.field {
|
|
477
|
+
justify-content: flex-start;
|
|
478
|
+
}
|
|
479
|
+
|
|
443
480
|
al-field-array {
|
|
444
481
|
.add-entry {
|
|
445
482
|
@extend .btn;
|
|
@@ -536,20 +573,6 @@ al-field[mode="inline"] {
|
|
|
536
573
|
}
|
|
537
574
|
}
|
|
538
575
|
|
|
539
|
-
.chimera-confirm-page {
|
|
540
|
-
flex: 1;
|
|
541
|
-
justify-content: center;
|
|
542
|
-
display: flex;
|
|
543
|
-
align-items: center;
|
|
544
|
-
flex-flow: column;
|
|
545
|
-
flex-direction: column;
|
|
546
|
-
|
|
547
|
-
.action-buttons {
|
|
548
|
-
display: flex;
|
|
549
|
-
gap: 1rem;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
|
|
553
576
|
al-file {
|
|
554
577
|
button {
|
|
555
578
|
@extend .btn;
|
|
@@ -582,6 +605,21 @@ al-field[mode="inline"] {
|
|
|
582
605
|
}
|
|
583
606
|
}
|
|
584
607
|
|
|
608
|
+
.chimera-centered-page,
|
|
609
|
+
.chimera-confirm-page {
|
|
610
|
+
flex: 1;
|
|
611
|
+
justify-content: center;
|
|
612
|
+
display: flex;
|
|
613
|
+
align-items: center;
|
|
614
|
+
flex-flow: column;
|
|
615
|
+
flex-direction: column;
|
|
616
|
+
|
|
617
|
+
.action-buttons {
|
|
618
|
+
display: flex;
|
|
619
|
+
gap: 1rem;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
585
623
|
al-field {
|
|
586
624
|
// Don't let images in widgets take up more then 1/4th of the screen height
|
|
587
625
|
al-widget {
|
package/config/routes.js
CHANGED
|
@@ -46,16 +46,18 @@ chimera_section.add({
|
|
|
46
46
|
|
|
47
47
|
// Editor data action
|
|
48
48
|
chimera_section.add({
|
|
49
|
-
name
|
|
50
|
-
methods
|
|
51
|
-
paths
|
|
49
|
+
name : 'Chimera.Editor#records',
|
|
50
|
+
methods : ['post'],
|
|
51
|
+
paths : '/api/editor/{model}/records',
|
|
52
|
+
is_system_route : true,
|
|
52
53
|
});
|
|
53
54
|
|
|
54
55
|
// Sidebar
|
|
55
56
|
chimera_section.add({
|
|
56
|
-
name
|
|
57
|
-
methods
|
|
58
|
-
paths
|
|
57
|
+
name : 'Chimera.Static#sidebar',
|
|
58
|
+
methods : ['get'],
|
|
59
|
+
paths : '/api/content/sidebar',
|
|
60
|
+
is_system_route : true,
|
|
59
61
|
});
|
|
60
62
|
|
|
61
63
|
alchemy.sputnik.after('base_app', () => {
|
|
@@ -20,11 +20,27 @@ let ChimeraController = Function.inherits('Alchemy.Controller', 'Alchemy.Control
|
|
|
20
20
|
*
|
|
21
21
|
* @author Jelle De Loecker <jelle@elevenways.be>
|
|
22
22
|
* @since 1.2.4
|
|
23
|
-
* @version 1.2.
|
|
23
|
+
* @version 1.2.6
|
|
24
24
|
*/
|
|
25
25
|
ChimeraController.setMethod(function beforeAction() {
|
|
26
|
+
|
|
27
|
+
const model = this.conduit.params.model,
|
|
28
|
+
is_system_route = this.conduit.route.is_system_route;
|
|
29
|
+
|
|
26
30
|
this.set('toolbar_manager', this.toolbar_manager);
|
|
27
|
-
|
|
31
|
+
|
|
32
|
+
// If this is not a system route and no model is defined in the parameters,
|
|
33
|
+
// do not queue a model fallback
|
|
34
|
+
if (is_system_route && !model) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Ignore loopback conduits
|
|
39
|
+
if (this.conduit instanceof Classes.Alchemy.Conduit.Loopback) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this.toolbar_manager.queueModelFallback(model);
|
|
28
44
|
});
|
|
29
45
|
|
|
30
46
|
/**
|
|
@@ -26,7 +26,7 @@ ChimeraStatic.setAction(function dashboard(conduit) {
|
|
|
26
26
|
*
|
|
27
27
|
* @author Jelle De Loecker <jelle@elevenways.be>
|
|
28
28
|
* @since 1.0.0
|
|
29
|
-
* @version 1.2.
|
|
29
|
+
* @version 1.2.6
|
|
30
30
|
*
|
|
31
31
|
* @param {Conduit} conduit
|
|
32
32
|
*/
|
|
@@ -95,6 +95,13 @@ ChimeraStatic.setAction(function sidebar(conduit) {
|
|
|
95
95
|
models.sortByPath(1, 'model_name');
|
|
96
96
|
|
|
97
97
|
for (let model of models) {
|
|
98
|
+
|
|
99
|
+
// Skip abstract classes (like `App`)
|
|
100
|
+
// or models without any chimera configuration
|
|
101
|
+
if (model.is_abstract || !model.chimera.has_configuration) {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
|
|
98
105
|
let entry = {
|
|
99
106
|
type : 'link',
|
|
100
107
|
config : {
|
|
@@ -109,8 +116,6 @@ ChimeraStatic.setAction(function sidebar(conduit) {
|
|
|
109
116
|
}
|
|
110
117
|
};
|
|
111
118
|
|
|
112
|
-
console.log(entry)
|
|
113
|
-
|
|
114
119
|
widgets.push(entry);
|
|
115
120
|
}
|
|
116
121
|
}
|
package/lib/chimera_config.js
CHANGED
|
@@ -17,7 +17,7 @@ const Config = Function.inherits('Alchemy.Base', 'Alchemy.Chimera', function Con
|
|
|
17
17
|
this.ModelClass = ModelClass;
|
|
18
18
|
|
|
19
19
|
// The different default field sets
|
|
20
|
-
this.field_sets =
|
|
20
|
+
this.field_sets = null;
|
|
21
21
|
|
|
22
22
|
// The record preview action
|
|
23
23
|
this.record_preview = null;
|
|
@@ -25,6 +25,38 @@ const Config = Function.inherits('Alchemy.Base', 'Alchemy.Chimera', function Con
|
|
|
25
25
|
this.record_preview_action = null;
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Has this been configured in any way?
|
|
30
|
+
*
|
|
31
|
+
* @author Jelle De Loecker <jelle@elevenways.be>
|
|
32
|
+
* @since 1.2.6
|
|
33
|
+
* @version 1.2.6
|
|
34
|
+
*
|
|
35
|
+
* @type {Boolean}
|
|
36
|
+
*/
|
|
37
|
+
Config.setProperty(function has_configuration() {
|
|
38
|
+
|
|
39
|
+
let result = false;
|
|
40
|
+
|
|
41
|
+
if (this.field_sets) {
|
|
42
|
+
let key,
|
|
43
|
+
fieldset;
|
|
44
|
+
|
|
45
|
+
for (key in this.field_sets) {
|
|
46
|
+
fieldset = this.field_sets[key];
|
|
47
|
+
|
|
48
|
+
if (!fieldset.size) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
result = true;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return result;
|
|
58
|
+
});
|
|
59
|
+
|
|
28
60
|
/**
|
|
29
61
|
* Set a record preview
|
|
30
62
|
*
|
|
@@ -71,7 +103,7 @@ Config.setMethod(function getActionFields(name) {
|
|
|
71
103
|
*
|
|
72
104
|
* @author Jelle De Loecker <jelle@elevenways.be>
|
|
73
105
|
* @since 0.2.0
|
|
74
|
-
* @version 1.
|
|
106
|
+
* @version 1.2.6
|
|
75
107
|
*
|
|
76
108
|
* @return {FieldSet}
|
|
77
109
|
*/
|
|
@@ -81,6 +113,10 @@ Config.setMethod(function getFieldSet(name) {
|
|
|
81
113
|
throw new Error('No action group name was given');
|
|
82
114
|
}
|
|
83
115
|
|
|
116
|
+
if (!this.field_sets) {
|
|
117
|
+
this.field_sets = {};
|
|
118
|
+
}
|
|
119
|
+
|
|
84
120
|
let set = this.field_sets[name];
|
|
85
121
|
|
|
86
122
|
if (!set) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alchemy-chimera",
|
|
3
3
|
"description": "Chimera plugin for Alchemy MVC",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.6",
|
|
5
5
|
"author": "Jelle De Loecker <jelle@elevenways.be>",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"alchemy",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
],
|
|
12
12
|
"repository": "11ways/alchemy-chimera",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"alchemy-acl" : "~0.8.
|
|
15
|
-
"alchemymvc" : ">=1.
|
|
16
|
-
"alchemy-form" : "~0.2.
|
|
14
|
+
"alchemy-acl" : "~0.8.4",
|
|
15
|
+
"alchemymvc" : ">=1.3.16",
|
|
16
|
+
"alchemy-form" : "~0.2.7",
|
|
17
17
|
"alchemy-widget" : "~0.2.1"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|