@reldens/cms 0.60.0 → 0.61.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/.claude/hook-approvals.json +1 -0
- package/CLAUDE.md +0 -4
- package/lib/admin-manager/contents-builder.js +4 -3
- package/lib/admin-manager/router-contents.js +1 -1
- package/lib/admin-manager.js +2 -1
- package/package.json +5 -5
- package/templates/css/styles.css +40 -0
- package/templates/js/functions.js +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
1
|
## Package Overview
|
|
6
2
|
|
|
7
3
|
**@reldens/cms** is a comprehensive Content Management System package for Reldens. It provides a complete web application framework with:
|
|
@@ -128,22 +128,23 @@ class ContentsBuilder
|
|
|
128
128
|
let idProperty = this.fetchEntityIdPropertyKey(driverResource);
|
|
129
129
|
let editProperties = Object.keys(driverResource.options.properties);
|
|
130
130
|
editProperties.splice(editProperties.indexOf(idProperty), 1);
|
|
131
|
+
let entityId = driverResource.id();
|
|
131
132
|
let filters = driverResource.options.filterProperties.map((property) => {
|
|
132
133
|
return {
|
|
133
134
|
propertyKey: property,
|
|
134
|
-
name: this.fetchTranslation(property),
|
|
135
|
+
name: this.fetchTranslation(property, entityId),
|
|
135
136
|
value: '{{&'+property+'}}'
|
|
136
137
|
};
|
|
137
138
|
});
|
|
138
139
|
let fields = driverResource.options.showProperties.map((property) => {
|
|
139
140
|
return {
|
|
140
|
-
name: this.fetchTranslation(property),
|
|
141
|
+
name: this.fetchTranslation(property, entityId),
|
|
141
142
|
value: '{{&'+property+'}}'
|
|
142
143
|
};
|
|
143
144
|
});
|
|
144
145
|
let editFields = editProperties.map((property) => {
|
|
145
146
|
return {
|
|
146
|
-
name: this.fetchTranslation(property),
|
|
147
|
+
name: this.fetchTranslation(property, entityId),
|
|
147
148
|
value: '{{&'+property+'}}'
|
|
148
149
|
};
|
|
149
150
|
});
|
|
@@ -220,7 +220,7 @@ class RouterContents
|
|
|
220
220
|
let renderedEditProperties = {
|
|
221
221
|
idValue,
|
|
222
222
|
idProperty,
|
|
223
|
-
idPropertyLabel: this.fetchTranslation(idProperty),
|
|
223
|
+
idPropertyLabel: this.fetchTranslation(idProperty, driverResource.id()),
|
|
224
224
|
templateTitle: (!idValue ? 'Create' : 'Edit')+' '+this.translations.labels[driverResource.id()],
|
|
225
225
|
entityViewRoute: !idValue
|
|
226
226
|
? this.rootPath+'/'+driverResource.entityPath
|
package/lib/admin-manager.js
CHANGED
|
@@ -265,7 +265,8 @@ class AdminManager
|
|
|
265
265
|
return snippet;
|
|
266
266
|
}
|
|
267
267
|
if(group){
|
|
268
|
-
let
|
|
268
|
+
let fieldsTranslations = sc.get(this.translations, 'fields', {});
|
|
269
|
+
let translationGroup = sc.get(fieldsTranslations, group);
|
|
269
270
|
if(translationGroup){
|
|
270
271
|
let translationByGroup = sc.get(translationGroup, snippet, '');
|
|
271
272
|
if('' !== translationByGroup){
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reldens/cms",
|
|
3
3
|
"scope": "@reldens",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.61.0",
|
|
5
5
|
"description": "Reldens - CMS",
|
|
6
6
|
"author": "Damian A. Pastorini",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"url": "https://github.com/damian-pastorini/reldens-cms/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@reldens/server-utils": "^0.
|
|
38
|
-
"@reldens/storage": "^0.
|
|
39
|
-
"@reldens/utils": "^0.
|
|
40
|
-
"dotenv": "17.
|
|
37
|
+
"@reldens/server-utils": "^0.49.0",
|
|
38
|
+
"@reldens/storage": "^0.93.0",
|
|
39
|
+
"@reldens/utils": "^0.56.0",
|
|
40
|
+
"dotenv": "17.4.2",
|
|
41
41
|
"mustache": "4.2.0"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/templates/css/styles.css
CHANGED
|
@@ -107,3 +107,43 @@ img {
|
|
|
107
107
|
.hidden {
|
|
108
108
|
display: none;
|
|
109
109
|
}
|
|
110
|
+
|
|
111
|
+
[data-toggle="modal"], .clickable {
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.modal-overlay {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
position: fixed;
|
|
120
|
+
top: 0;
|
|
121
|
+
left: 0;
|
|
122
|
+
z-index: 9999;
|
|
123
|
+
width: 100vw;
|
|
124
|
+
height: 100vh;
|
|
125
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.modal {
|
|
129
|
+
max-width: 92vw;
|
|
130
|
+
max-height: 92vh;
|
|
131
|
+
padding: 1rem;
|
|
132
|
+
overflow: auto;
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
background-color: #fff;
|
|
135
|
+
border-radius: 8px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.modal.modal-fit {
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
padding: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.modal.modal-fit img {
|
|
144
|
+
max-width: 90vw;
|
|
145
|
+
max-height: 90vh;
|
|
146
|
+
width: auto;
|
|
147
|
+
height: auto;
|
|
148
|
+
display: block;
|
|
149
|
+
}
|
|
@@ -117,6 +117,10 @@ function activateModalElements()
|
|
|
117
117
|
let modal = document.createElement('div');
|
|
118
118
|
modal.classList.add('modal');
|
|
119
119
|
modal.classList.add('clickable');
|
|
120
|
+
let modalScrolls = modalElement.getAttribute('data-modal-scrolls');
|
|
121
|
+
if(!modalScrolls || 'false' === modalScrolls){
|
|
122
|
+
modal.classList.add('modal-fit');
|
|
123
|
+
}
|
|
120
124
|
let modalContent = createModalContent(modalElement);
|
|
121
125
|
modalContent.classList.add('clickable');
|
|
122
126
|
modal.appendChild(modalContent);
|