@gov-cy/govcy-frontend-renderer 1.19.0 → 1.21.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.
|
@@ -2588,7 +2588,16 @@ t_30 += " ";
|
|
|
2588
2588
|
t_30 += "\"";
|
|
2589
2589
|
;
|
|
2590
2590
|
}
|
|
2591
|
-
t_30 += ">\n
|
|
2591
|
+
t_30 += ">\n ";
|
|
2592
|
+
if(runtime.memberLookup((l_params),"name")) {
|
|
2593
|
+
t_30 += "<input type=\"hidden\" name=\"";
|
|
2594
|
+
t_30 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
2595
|
+
t_30 += "Attachment[fileId]\" value=\"\">\n <input type=\"hidden\" name=\"";
|
|
2596
|
+
t_30 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
2597
|
+
t_30 += "Attachment[sha256]\" value=\"\">";
|
|
2598
|
+
;
|
|
2599
|
+
}
|
|
2600
|
+
t_30 += "\n ";
|
|
2592
2601
|
;
|
|
2593
2602
|
frame = frame.pop();
|
|
2594
2603
|
return new runtime.SafeString(t_30);
|
|
@@ -2682,7 +2691,7 @@ context.setVariable("hint", t_16);
|
|
|
2682
2691
|
var t_17;
|
|
2683
2692
|
t_17 = (function() {
|
|
2684
2693
|
var output = "";
|
|
2685
|
-
output += runtime.suppressValue((lineno =
|
|
2694
|
+
output += runtime.suppressValue((lineno = 23, colno = 41, runtime.callWrap(t_8, "govcyGetContent", context, ["fileView_view",runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2686
2695
|
;
|
|
2687
2696
|
return output;
|
|
2688
2697
|
})()
|
|
@@ -2697,7 +2706,7 @@ context.addExport("viewLabel", t_17);
|
|
|
2697
2706
|
var t_18;
|
|
2698
2707
|
t_18 = (function() {
|
|
2699
2708
|
var output = "";
|
|
2700
|
-
output += runtime.suppressValue((lineno =
|
|
2709
|
+
output += runtime.suppressValue((lineno = 24, colno = 43, runtime.callWrap(t_8, "govcyGetContent", context, ["fileView_delete",runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2701
2710
|
;
|
|
2702
2711
|
return output;
|
|
2703
2712
|
})()
|
|
@@ -2718,7 +2727,7 @@ t_2 += "-view-control\" ";
|
|
|
2718
2727
|
;
|
|
2719
2728
|
}
|
|
2720
2729
|
t_2 += "class=\"govcy-form\">\n ";
|
|
2721
|
-
t_2 += runtime.suppressValue((lineno =
|
|
2730
|
+
t_2 += runtime.suppressValue((lineno = 28, colno = 23, runtime.callWrap(t_12, "formControl", context, [{"classes": runtime.memberLookup((l_params),"classes"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_19 = runtime.makeMacro(
|
|
2722
2731
|
[],
|
|
2723
2732
|
[],
|
|
2724
2733
|
function (kwargs) {
|
|
@@ -2735,7 +2744,7 @@ else {
|
|
|
2735
2744
|
t_20 += "<p class=\"govcy-label govcy-label-primary\">";
|
|
2736
2745
|
;
|
|
2737
2746
|
}
|
|
2738
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2747
|
+
t_20 += runtime.suppressValue((lineno = 29, colno = 135, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((l_params),"label"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2739
2748
|
if(runtime.memberLookup((l_params),"isPageHeading")) {
|
|
2740
2749
|
t_20 += "</h1>";
|
|
2741
2750
|
;
|
|
@@ -2744,7 +2753,7 @@ else {
|
|
|
2744
2753
|
t_20 += "</p>";
|
|
2745
2754
|
;
|
|
2746
2755
|
}
|
|
2747
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2756
|
+
t_20 += runtime.suppressValue((lineno = 31, colno = 20, runtime.callWrap(t_16, "hint", context, [{"hint": runtime.memberLookup((l_params),"hint"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_21 = runtime.makeMacro(
|
|
2748
2757
|
[],
|
|
2749
2758
|
[],
|
|
2750
2759
|
function (kwargs) {
|
|
@@ -2760,26 +2769,53 @@ return new runtime.SafeString(t_22);
|
|
|
2760
2769
|
return macro_t_21;})()})])), env.opts.autoescape);
|
|
2761
2770
|
t_20 += "<a href=\"";
|
|
2762
2771
|
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"viewHref"), env.opts.autoescape);
|
|
2763
|
-
t_20 += "\"
|
|
2772
|
+
t_20 += "\"";
|
|
2773
|
+
if(runtime.memberLookup((l_params),"viewTarget")) {
|
|
2774
|
+
t_20 += " target=\"";
|
|
2775
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"viewTarget"), env.opts.autoescape);
|
|
2776
|
+
t_20 += "\"";
|
|
2777
|
+
;
|
|
2778
|
+
}
|
|
2779
|
+
t_20 += ">";
|
|
2764
2780
|
t_20 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "viewLabel"), env.opts.autoescape);
|
|
2765
2781
|
if(runtime.memberLookup((l_params),"visuallyHiddenText")) {
|
|
2766
2782
|
t_20 += "<span class=\"govcy-visually-hidden\">";
|
|
2767
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2783
|
+
t_20 += runtime.suppressValue((lineno = 33, colno = 214, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((l_params),"visuallyHiddenText"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2768
2784
|
t_20 += "</span>";
|
|
2769
2785
|
;
|
|
2770
2786
|
}
|
|
2771
2787
|
t_20 += "</a>";
|
|
2772
2788
|
t_20 += "<a class=\"govcy-ml-3\" href=\"";
|
|
2773
2789
|
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"deleteHref"), env.opts.autoescape);
|
|
2774
|
-
t_20 += "\"
|
|
2790
|
+
t_20 += "\"";
|
|
2791
|
+
if(runtime.memberLookup((l_params),"deleteTarget")) {
|
|
2792
|
+
t_20 += " target=\"";
|
|
2793
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"deleteTarget"), env.opts.autoescape);
|
|
2794
|
+
t_20 += "\"";
|
|
2795
|
+
;
|
|
2796
|
+
}
|
|
2797
|
+
t_20 += ">";
|
|
2775
2798
|
t_20 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "deleteLabel"), env.opts.autoescape);
|
|
2776
2799
|
if(runtime.memberLookup((l_params),"visuallyHiddenText")) {
|
|
2777
2800
|
t_20 += "<span class=\"govcy-visually-hidden\">";
|
|
2778
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2801
|
+
t_20 += runtime.suppressValue((lineno = 35, colno = 241, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((l_params),"visuallyHiddenText"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2779
2802
|
t_20 += "</span>";
|
|
2780
2803
|
;
|
|
2781
2804
|
}
|
|
2782
|
-
t_20 += "</a>\n
|
|
2805
|
+
t_20 += "</a>\n ";
|
|
2806
|
+
if(runtime.memberLookup((l_params),"name")) {
|
|
2807
|
+
t_20 += "<input type=\"hidden\" name=\"";
|
|
2808
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
2809
|
+
t_20 += "Attachment[fileId]\" value=\"";
|
|
2810
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"fileId"), env.opts.autoescape);
|
|
2811
|
+
t_20 += "\">\n <input type=\"hidden\" name=\"";
|
|
2812
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
2813
|
+
t_20 += "Attachment[sha256]\" value=\"";
|
|
2814
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"sha256"), env.opts.autoescape);
|
|
2815
|
+
t_20 += "\">";
|
|
2816
|
+
;
|
|
2817
|
+
}
|
|
2818
|
+
t_20 += "\n ";
|
|
2783
2819
|
;
|
|
2784
2820
|
frame = frame.pop();
|
|
2785
2821
|
return new runtime.SafeString(t_20);
|
package/package.json
CHANGED
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
{% call errorMessage({message:params.error,id:errorId, lang:params.lang}) %}{% endcall %}
|
|
36
36
|
{#- render input -#}
|
|
37
37
|
<input id="{{params.id}}"{% if params.name %} name="{{ params.name }}"{% endif %} type="file" class="govcy-file-upload"{% if params.hint or params.error%} aria-describedby="{% if params.hint %}{{hintId}} {% endif %}{% if params.error %}{{errorId}} {% endif %}"{% endif %}>
|
|
38
|
+
{% if params.name -%}
|
|
39
|
+
<input type="hidden" name="{{ params.name }}Attachment[fileId]" value="">
|
|
40
|
+
<input type="hidden" name="{{ params.name }}Attachment[sha256]" value="">
|
|
41
|
+
{%- endif %}
|
|
38
42
|
{% endcall %}
|
|
39
43
|
{%- endif -%}
|
|
40
44
|
{%- endmacro %}
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
@param {object} label The label text. Will escape text. `{en:"Content",el:"Περιεχομένο"}`
|
|
3
3
|
@param {string} id The input id. Will append '-view-control', for example 'id-card-proof-view-control'. Optional
|
|
4
4
|
@param {string} viewHref The view link's href. Will escape text
|
|
5
|
+
@param {string} viewTarget The view link's target. Optional. Will escape text
|
|
5
6
|
@param {string} deleteHref The delete link's href. Will escape text
|
|
7
|
+
@param {string} deleteTarget The delete link's target. Optional. Will escape text
|
|
6
8
|
@param {object} visuallyHiddenText The visuallyHiddenText text. Optional. Will escape text. `{en:"Content",el:"Περιεχομένο"}`
|
|
7
9
|
@param {object} hint The hint text. Optional. Will escape text. `{en:"Content",el:"Περιεχομένο"}`
|
|
8
10
|
@param {string} classes Additional classes to add to the outer div. Optional
|
|
9
11
|
@param {boolean} isPageHeading Is the label also the page heading? Optional, default is false. Can be true,false
|
|
12
|
+
@param {string} name The input name. Will escape text. Optional
|
|
13
|
+
@param {string} fileId from upload response. Will escape text. Optional
|
|
14
|
+
@param {string} sha256 from upload response. Will escape text. Optional
|
|
10
15
|
@param {string} lang The language used. Can be 'en','el'. Optional.
|
|
11
16
|
@returns govcy file view and delete html
|
|
12
17
|
#}
|
|
@@ -26,9 +31,13 @@
|
|
|
26
31
|
{#- render hint -#}
|
|
27
32
|
{% call hint({hint:params.hint, lang:params.lang}) %}{% endcall %}
|
|
28
33
|
{#- render view -#}
|
|
29
|
-
<a href="{{ params.viewHref }}">{{viewLabel}}{%if params.visuallyHiddenText%}<span class="govcy-visually-hidden"> {{- govcyLocalizeContent(params.visuallyHiddenText, params.lang) -}}</span>{% endif %}</a>
|
|
34
|
+
<a href="{{ params.viewHref }}"{%if params.viewTarget%} target="{{ params.viewTarget }}"{% endif %}>{{viewLabel}}{%if params.visuallyHiddenText%}<span class="govcy-visually-hidden"> {{- govcyLocalizeContent(params.visuallyHiddenText, params.lang) -}}</span>{% endif %}</a>
|
|
30
35
|
{#- render delete -#}
|
|
31
|
-
<a class="govcy-ml-3" href="{{ params.deleteHref }}">{{deleteLabel}}{%if params.visuallyHiddenText%}<span class="govcy-visually-hidden"> {{- govcyLocalizeContent(params.visuallyHiddenText, params.lang) -}}</span>{% endif %}</a>
|
|
36
|
+
<a class="govcy-ml-3" href="{{ params.deleteHref }}"{%if params.deleteTarget%} target="{{ params.deleteTarget }}"{% endif %}>{{deleteLabel}}{%if params.visuallyHiddenText%}<span class="govcy-visually-hidden"> {{- govcyLocalizeContent(params.visuallyHiddenText, params.lang) -}}</span>{% endif %}</a>
|
|
37
|
+
{% if params.name -%}
|
|
38
|
+
<input type="hidden" name="{{ params.name }}Attachment[fileId]" value="{{ params.fileId }}">
|
|
39
|
+
<input type="hidden" name="{{ params.name }}Attachment[sha256]" value="{{ params.sha256 }}">
|
|
40
|
+
{%- endif %}
|
|
32
41
|
{% endcall %}
|
|
33
42
|
</div>
|
|
34
43
|
{%- endif -%}
|