alchemy-form 0.2.9 → 0.3.0-alpha.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/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "alchemy-form",
3
3
  "description": "Form plugin for Alchemy",
4
- "version": "0.2.9",
4
+ "version": "0.3.0-alpha.1",
5
5
  "repository": {
6
6
  "type" : "git",
7
7
  "url" : "https://github.com/11ways/alchemy-form.git"
8
8
  },
9
9
  "peerDependencies": {
10
- "alchemymvc" : ">=1.3.0",
11
- "alchemy-media" : ">=0.7.6"
10
+ "alchemymvc" : ">=1.4.0||>=1.4.0-alpha",
11
+ "alchemy-media" : ">=0.9.0||>=0.9.0-alpha"
12
12
  },
13
13
  "license": "MIT",
14
14
  "engines": {
@@ -0,0 +1,36 @@
1
+ <div class="al-settings-sidebar">
2
+ <al-toc
3
+ container-element="ul"
4
+ entry-element="li"
5
+ parent-selector="al-settings-editor"
6
+ children-selector=".al-settings-container"
7
+ elements-selector=".al-settings-group"
8
+ title-selector=".al-settings-group-title"
9
+ ></al-toc>
10
+ </div>
11
+ <div class="al-settings-main">
12
+ <div class="al-settings-container"><% self.populateSettingsContainer($0) %></div>
13
+ <div class="al-settings-actions">
14
+ <al-button class="save-changes" state="ready" hidden>
15
+ <al-state state-name="saving">
16
+ <al-icon icon-style="duotone" icon-name="spinner" icon-flags="spin"></al-icon>
17
+ {%t "saving" %}
18
+ </al-state>
19
+
20
+ <al-state state-name="saved">
21
+ <al-icon icon-style="duotone" icon-name="badge-check" icon-flags="beat"></al-icon>
22
+ {%t "saved" %}
23
+ </al-state>
24
+
25
+ <al-state state-name="error">
26
+ <al-icon icon-style="duotone" icon-name="skull" icon-flags="shake"></al-icon>
27
+ {%t "error" action="save" %}
28
+ </al-state>
29
+
30
+ <al-state state-name="ready">
31
+ <al-icon icon-style="duotone" icon-name="floppy-disk-circle-arrow-right"></al-icon>
32
+ {%t "save" %}
33
+ </al-state>
34
+ </al-button>
35
+ </div>
36
+ </div>
@@ -0,0 +1,9 @@
1
+ <al-code-input
2
+ class="alchemy-field-value"
3
+ form=<% form_id %>
4
+ name=<% path %>
5
+ placeholder={% alchemy_field.placeholder %}
6
+ language-mode="json"
7
+ value-is-object
8
+ #value={% value %}
9
+ ></al-code-input>
@@ -0,0 +1,5 @@
1
+ <% config = value.getEditorConfiguration() %>
2
+ <al-settings-editor
3
+ class="alchemy-field-value"
4
+ #settings_config={% config %}
5
+ ></al-settings-editor>
@@ -1,5 +1,18 @@
1
1
  <div>
2
- <span class="alchemy-field-value">{{ value }}</span>
2
+ <span class="alchemy-field-value">
3
+ <% if (value || value === false) { %>
4
+ {{ value }}
5
+ <% } else { %>
6
+ <span class="alchemy-field-empty-value">
7
+ {%t
8
+ "empty-value"
9
+ field=field_context.config.name
10
+ path=field_context.config.path_in_document
11
+ zone=self.zone
12
+ %}
13
+ </span>
14
+ <% } %>
15
+ </span>
3
16
  {% if alchemy_field.config.options.suffix %}
4
17
  <span class="alchemy-field-suffix">{{ alchemy_field.config.options.suffix }}</span>
5
18
  {% /if %}
@@ -3,11 +3,27 @@
3
3
  <span
4
4
  data-he-name="field-title"
5
5
  data-he-slot="field-title"
6
- >{{ alchemy_field.field_title }}</span>
6
+ >
7
+ {%t
8
+ "alchemy-field-title"
9
+ field=field_context.config.name
10
+ path=field_context.config.path_in_document
11
+ zone=self.zone
12
+ fallback=alchemy_field.field_title
13
+ %}
14
+ </span>
7
15
  <small
8
16
  data-he-name="field-description"
9
17
  data-he-slot="field-description"
10
- >{{ alchemy_field.field_description }}</small>
18
+ >
19
+ {%t
20
+ "alchemy-field-description"
21
+ field=field_context.config.name
22
+ path=field_context.config.path_in_document
23
+ zone=self.zone
24
+ fallback=alchemy_field.field_description
25
+ %}
26
+ </small>
11
27
  </al-label>
12
28
  </div>
13
29
  <div data-he-name="field"></div>