alchemy-chimera 1.1.0 → 1.1.1

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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.1.1 (2022-10-12)
2
+
3
+ * Add more alchemy-field options
4
+ * Disable translations when getting records from the chimera api
5
+ * Style inline translatable fields
6
+ * Style inline enum field view
7
+ * Fix sidebar routes not being marked as active
8
+
1
9
  ## 1.1.0 (2022-07-23)
2
10
 
3
11
  * Upgrade `alchemy-acl` and `alchemy-form`
@@ -5,6 +5,7 @@ body {
5
5
  font-family: 'Roboto', sans-serif;
6
6
  }
7
7
 
8
+ .default-form-editor,
8
9
  .chimera-wrapper {
9
10
  --sidebar-bg-color: #4a4e58;
10
11
  --text-color: #475466;
@@ -24,7 +25,9 @@ body {
24
25
  --color-active: #3699FF;
25
26
  --color-text: #475466;
26
27
  --color-input-border: #CCD7E6;
28
+ }
27
29
 
30
+ .chimera-wrapper {
28
31
  display: flex;
29
32
  min-height: 100vh;
30
33
  width: 100%;
@@ -232,7 +235,8 @@ alchemy-widgets-navigation {
232
235
  color: white;
233
236
 
234
237
  &:hover,
235
- &.active-link {
238
+ &.active-link,
239
+ &.active-sublink {
236
240
  background-color: rgba(190, 190, 190, 0.5);
237
241
  }
238
242
  }
@@ -266,6 +270,71 @@ alchemy-widgets-navigation {
266
270
  opacity: 0;
267
271
  }
268
272
 
273
+ .alchemy-field-enum.alchemy-field-value {
274
+ margin: auto;
275
+ background: #777;
276
+ display: inline-block;
277
+ padding: 6px;
278
+ border-radius: 7px;
279
+ color: white;
280
+ }
281
+
282
+ alchemy-field-translatable {
283
+ .prefix-buttons {
284
+ width: 100%;
285
+ border-bottom: 1px solid var(--color-box-border);
286
+ display: flex;
287
+
288
+ button {
289
+ flex: 10;
290
+ font-size: 16px;
291
+ font-weight: 500;
292
+ color: var(--button-text-color);
293
+ letter-spacing: 0px;
294
+ background: transparent;
295
+ border: none;
296
+ cursor: pointer;
297
+
298
+ height: 3rem;
299
+ display: flex;
300
+ flex-flow: column;
301
+ justify-content: center;
302
+ align-items: center;
303
+
304
+ &.active {
305
+ box-shadow: inset 0 -2px var(--color-active);
306
+ }
307
+
308
+ &:hover {
309
+ background-color: var(--button-bg-hover-color);
310
+ }
311
+ }
312
+ }
313
+ }
314
+
315
+ alchemy-field[mode="inline"] {
316
+ alchemy-field-translatable {
317
+ .prefix-buttons {
318
+ button {
319
+ height: 2rem;
320
+ font-size: 14px;
321
+ }
322
+ }
323
+
324
+ .entries {
325
+
326
+ }
327
+ }
328
+
329
+ alchemy-field-translatable-entry {
330
+ display: block;
331
+ padding: 9px;
332
+ background: rgba(190,190,190,0.1);
333
+ min-height: 37px;
334
+ }
335
+ }
336
+
337
+ .default-form-editor,
269
338
  .chimera-wrapper {
270
339
 
271
340
  alchemy-table .aft-column-filters input {
@@ -309,39 +378,6 @@ alchemy-widgets-navigation {
309
378
  border-bottom: 1px solid var(--color-box-border);
310
379
  }
311
380
 
312
- alchemy-field-translatable {
313
- .prefix-buttons {
314
- width: 100%;
315
- border-bottom: 1px solid var(--color-box-border);
316
- display: flex;
317
-
318
- button {
319
- flex: 10;
320
- font-size: 16px;
321
- font-weight: 500;
322
- color: var(--button-text-color);
323
- letter-spacing: 0px;
324
- background: transparent;
325
- border: none;
326
- cursor: pointer;
327
-
328
- height: 3rem;
329
- display: flex;
330
- flex-flow: column;
331
- justify-content: center;
332
- align-items: center;
333
-
334
- &.active {
335
- box-shadow: inset 0 -2px var(--color-active);
336
- }
337
-
338
- &:hover {
339
- background-color: var(--button-bg-hover-color);
340
- }
341
- }
342
- }
343
- }
344
-
345
381
  .field {
346
382
  display: flex;
347
383
  padding: 1rem;
package/config/routes.js CHANGED
@@ -18,7 +18,7 @@ chimera_section.add({
18
18
  name : 'Chimera.Editor#index',
19
19
  methods : 'get',
20
20
  paths : '/editor/{model}/index',
21
- breadcrumb : 'chimera.editor.{model}.index'
21
+ breadcrumb : 'chimera.editor.{model}'
22
22
  });
23
23
 
24
24
  // Editor add action
@@ -227,7 +227,7 @@ Editor.setAction(async function trash(conduit, model_name, pk_val) {
227
227
  *
228
228
  * @author Jelle De Loecker <jelle@elevenways.be>
229
229
  * @since 1.0.0
230
- * @version 1.1.0
230
+ * @version 1.1.1
231
231
  *
232
232
  * @param {Conduit} conduit
233
233
  * @param {String} model_name
@@ -237,6 +237,8 @@ Editor.setAction(async function records(conduit, model_name) {
237
237
  let body = conduit.body,
238
238
  model = this.getModel(model_name),
239
239
  crit = model.find();
240
+
241
+ model.disableTranslations();
240
242
 
241
243
  let page_size = body.page_size,
242
244
  fields = body.fields,
@@ -65,7 +65,7 @@ Config.setMethod(function getFieldSet(name) {
65
65
  *
66
66
  * @author Jelle De Loecker <jelle@elevenways.be>
67
67
  * @since 1.0.0
68
- * @version 1.1.0
68
+ * @version 1.1.1
69
69
  *
70
70
  * @param {String} action
71
71
  * @param {Conduit} conduit
@@ -94,7 +94,13 @@ Config.setMethod(function getWidgetConfig(action, conduit) {
94
94
  type : 'alchemy_field',
95
95
  config : {
96
96
  field : field.name,
97
+ purpose : field.options.purpose,
98
+ mode : field.options.mode,
99
+ readonly : field.options.readonly,
97
100
  view : field.options.view,
101
+ wrapper : field.options.wrapper,
102
+ data_src : field.options.data_src,
103
+ title : field.options.title,
98
104
  widget_settings : field.options.widget_settings || {},
99
105
  }
100
106
  });
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.1.0",
4
+ "version": "1.1.1",
5
5
  "author": "Jelle De Loecker <jelle@elevenways.be>",
6
6
  "keywords": [
7
7
  "alchemy",