@gov-cy/govcy-frontend-renderer 1.18.0 → 1.18.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.
|
@@ -2503,7 +2503,16 @@ context.setVariable("errorId", t_27);
|
|
|
2503
2503
|
if(frame.topLevel) {
|
|
2504
2504
|
context.addExport("errorId", t_27);
|
|
2505
2505
|
}
|
|
2506
|
-
|
|
2506
|
+
var t_28;
|
|
2507
|
+
t_28 = env.getFilter("join").call(context, [runtime.memberLookup((l_params),"id"),"-input-control"]);
|
|
2508
|
+
frame.set("controlId", t_28, true);
|
|
2509
|
+
if(frame.topLevel) {
|
|
2510
|
+
context.setVariable("controlId", t_28);
|
|
2511
|
+
}
|
|
2512
|
+
if(frame.topLevel) {
|
|
2513
|
+
context.addExport("controlId", t_28);
|
|
2514
|
+
}
|
|
2515
|
+
t_2 += runtime.suppressValue((lineno = 28, colno = 23, runtime.callWrap(t_11, "formControl", context, [{"id": runtime.contextOrFrameLookup(context, frame, "controlId"),"isError": (runtime.memberLookup((l_params),"hideFormControlError")?false:runtime.memberLookup((l_params),"error")),"classes": runtime.memberLookup((l_params),"classe"),"lang": runtime.memberLookup((l_params),"langs")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_29 = runtime.makeMacro(
|
|
2507
2516
|
[],
|
|
2508
2517
|
[],
|
|
2509
2518
|
function (kwargs) {
|
|
@@ -2512,7 +2521,7 @@ frame = frame.push(true);
|
|
|
2512
2521
|
kwargs = kwargs || {};
|
|
2513
2522
|
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
2514
2523
|
frame.set("caller", kwargs.caller); }
|
|
2515
|
-
var
|
|
2524
|
+
var t_30 = "";t_30 += runtime.suppressValue((lineno = 30, colno = 21, runtime.callWrap(t_19, "label", context, [{"label": runtime.memberLookup((l_params),"label"),"id": runtime.contextOrFrameLookup(context, frame, "labelId"),"for": runtime.memberLookup((l_params),"id"),"isPageHeading": runtime.contextOrFrameLookup(context, frame, "isPageHeading"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_31 = runtime.makeMacro(
|
|
2516
2525
|
[],
|
|
2517
2526
|
[],
|
|
2518
2527
|
function (kwargs) {
|
|
@@ -2521,12 +2530,12 @@ frame = frame.push(true);
|
|
|
2521
2530
|
kwargs = kwargs || {};
|
|
2522
2531
|
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
2523
2532
|
frame.set("caller", kwargs.caller); }
|
|
2524
|
-
var
|
|
2533
|
+
var t_32 = "";;
|
|
2525
2534
|
frame = frame.pop();
|
|
2526
|
-
return new runtime.SafeString(
|
|
2535
|
+
return new runtime.SafeString(t_32);
|
|
2527
2536
|
});
|
|
2528
|
-
return
|
|
2529
|
-
|
|
2537
|
+
return macro_t_31;})()})])), env.opts.autoescape);
|
|
2538
|
+
t_30 += runtime.suppressValue((lineno = 32, colno = 20, runtime.callWrap(t_15, "hint", context, [{"hint": runtime.memberLookup((l_params),"hint"),"id": runtime.contextOrFrameLookup(context, frame, "hintId"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_33 = runtime.makeMacro(
|
|
2530
2539
|
[],
|
|
2531
2540
|
[],
|
|
2532
2541
|
function (kwargs) {
|
|
@@ -2535,12 +2544,12 @@ frame = frame.push(true);
|
|
|
2535
2544
|
kwargs = kwargs || {};
|
|
2536
2545
|
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
2537
2546
|
frame.set("caller", kwargs.caller); }
|
|
2538
|
-
var
|
|
2547
|
+
var t_34 = "";;
|
|
2539
2548
|
frame = frame.pop();
|
|
2540
|
-
return new runtime.SafeString(
|
|
2549
|
+
return new runtime.SafeString(t_34);
|
|
2541
2550
|
});
|
|
2542
|
-
return
|
|
2543
|
-
|
|
2551
|
+
return macro_t_33;})()})])), env.opts.autoescape);
|
|
2552
|
+
t_30 += runtime.suppressValue((lineno = 34, colno = 28, runtime.callWrap(t_23, "errorMessage", context, [{"message": runtime.memberLookup((l_params),"error"),"id": runtime.contextOrFrameLookup(context, frame, "errorId"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_35 = runtime.makeMacro(
|
|
2544
2553
|
[],
|
|
2545
2554
|
[],
|
|
2546
2555
|
function (kwargs) {
|
|
@@ -2549,42 +2558,42 @@ frame = frame.push(true);
|
|
|
2549
2558
|
kwargs = kwargs || {};
|
|
2550
2559
|
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
2551
2560
|
frame.set("caller", kwargs.caller); }
|
|
2552
|
-
var
|
|
2561
|
+
var t_36 = "";;
|
|
2553
2562
|
frame = frame.pop();
|
|
2554
|
-
return new runtime.SafeString(
|
|
2563
|
+
return new runtime.SafeString(t_36);
|
|
2555
2564
|
});
|
|
2556
|
-
return
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2565
|
+
return macro_t_35;})()})])), env.opts.autoescape);
|
|
2566
|
+
t_30 += "<input id=\"";
|
|
2567
|
+
t_30 += runtime.suppressValue(runtime.memberLookup((l_params),"id"), env.opts.autoescape);
|
|
2568
|
+
t_30 += "\"";
|
|
2560
2569
|
if(runtime.memberLookup((l_params),"name")) {
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2570
|
+
t_30 += " name=\"";
|
|
2571
|
+
t_30 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
2572
|
+
t_30 += "\"";
|
|
2564
2573
|
;
|
|
2565
2574
|
}
|
|
2566
|
-
|
|
2575
|
+
t_30 += " type=\"file\" class=\"govcy-file-upload\"";
|
|
2567
2576
|
if(runtime.memberLookup((l_params),"hint") || runtime.memberLookup((l_params),"error")) {
|
|
2568
|
-
|
|
2577
|
+
t_30 += " aria-describedby=\"";
|
|
2569
2578
|
if(runtime.memberLookup((l_params),"hint")) {
|
|
2570
|
-
|
|
2571
|
-
|
|
2579
|
+
t_30 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "hintId"), env.opts.autoescape);
|
|
2580
|
+
t_30 += " ";
|
|
2572
2581
|
;
|
|
2573
2582
|
}
|
|
2574
2583
|
if(runtime.memberLookup((l_params),"error")) {
|
|
2575
|
-
|
|
2576
|
-
|
|
2584
|
+
t_30 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "errorId"), env.opts.autoescape);
|
|
2585
|
+
t_30 += " ";
|
|
2577
2586
|
;
|
|
2578
2587
|
}
|
|
2579
|
-
|
|
2588
|
+
t_30 += "\"";
|
|
2580
2589
|
;
|
|
2581
2590
|
}
|
|
2582
|
-
|
|
2591
|
+
t_30 += ">\n ";
|
|
2583
2592
|
;
|
|
2584
2593
|
frame = frame.pop();
|
|
2585
|
-
return new runtime.SafeString(
|
|
2594
|
+
return new runtime.SafeString(t_30);
|
|
2586
2595
|
});
|
|
2587
|
-
return
|
|
2596
|
+
return macro_t_29;})()})])), env.opts.autoescape);
|
|
2588
2597
|
;
|
|
2589
2598
|
}
|
|
2590
2599
|
})})})})})})})})})});
|
|
@@ -2673,7 +2682,7 @@ context.setVariable("hint", t_16);
|
|
|
2673
2682
|
var t_17;
|
|
2674
2683
|
t_17 = (function() {
|
|
2675
2684
|
var output = "";
|
|
2676
|
-
output += runtime.suppressValue((lineno =
|
|
2685
|
+
output += runtime.suppressValue((lineno = 18, colno = 41, runtime.callWrap(t_8, "govcyGetContent", context, ["fileView_view",runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2677
2686
|
;
|
|
2678
2687
|
return output;
|
|
2679
2688
|
})()
|
|
@@ -2688,7 +2697,7 @@ context.addExport("viewLabel", t_17);
|
|
|
2688
2697
|
var t_18;
|
|
2689
2698
|
t_18 = (function() {
|
|
2690
2699
|
var output = "";
|
|
2691
|
-
output += runtime.suppressValue((lineno =
|
|
2700
|
+
output += runtime.suppressValue((lineno = 19, colno = 43, runtime.callWrap(t_8, "govcyGetContent", context, ["fileView_delete",runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2692
2701
|
;
|
|
2693
2702
|
return output;
|
|
2694
2703
|
})()
|
|
@@ -2701,8 +2710,15 @@ if(frame.topLevel) {
|
|
|
2701
2710
|
context.addExport("deleteLabel", t_18);
|
|
2702
2711
|
}
|
|
2703
2712
|
if(runtime.memberLookup((l_params),"label") && runtime.memberLookup((l_params),"viewHref") && runtime.memberLookup((l_params),"deleteHref")) {
|
|
2704
|
-
t_2 += "<div
|
|
2705
|
-
|
|
2713
|
+
t_2 += "<div ";
|
|
2714
|
+
if(runtime.memberLookup((l_params),"id")) {
|
|
2715
|
+
t_2 += "id=\"";
|
|
2716
|
+
t_2 += runtime.suppressValue(runtime.memberLookup((l_params),"id"), env.opts.autoescape);
|
|
2717
|
+
t_2 += "-view-control\" ";
|
|
2718
|
+
;
|
|
2719
|
+
}
|
|
2720
|
+
t_2 += "class=\"govcy-form\">\n ";
|
|
2721
|
+
t_2 += runtime.suppressValue((lineno = 23, 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(
|
|
2706
2722
|
[],
|
|
2707
2723
|
[],
|
|
2708
2724
|
function (kwargs) {
|
|
@@ -2719,7 +2735,7 @@ else {
|
|
|
2719
2735
|
t_20 += "<p class=\"govcy-label govcy-label-primary\">";
|
|
2720
2736
|
;
|
|
2721
2737
|
}
|
|
2722
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2738
|
+
t_20 += runtime.suppressValue((lineno = 24, colno = 135, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((l_params),"label"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2723
2739
|
if(runtime.memberLookup((l_params),"isPageHeading")) {
|
|
2724
2740
|
t_20 += "</h1>";
|
|
2725
2741
|
;
|
|
@@ -2728,7 +2744,7 @@ else {
|
|
|
2728
2744
|
t_20 += "</p>";
|
|
2729
2745
|
;
|
|
2730
2746
|
}
|
|
2731
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2747
|
+
t_20 += runtime.suppressValue((lineno = 26, 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(
|
|
2732
2748
|
[],
|
|
2733
2749
|
[],
|
|
2734
2750
|
function (kwargs) {
|
|
@@ -2748,7 +2764,7 @@ t_20 += "\">";
|
|
|
2748
2764
|
t_20 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "viewLabel"), env.opts.autoescape);
|
|
2749
2765
|
if(runtime.memberLookup((l_params),"visuallyHiddenText")) {
|
|
2750
2766
|
t_20 += "<span class=\"govcy-visually-hidden\">";
|
|
2751
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2767
|
+
t_20 += runtime.suppressValue((lineno = 28, colno = 146, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((l_params),"visuallyHiddenText"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2752
2768
|
t_20 += "</span>";
|
|
2753
2769
|
;
|
|
2754
2770
|
}
|
|
@@ -2759,7 +2775,7 @@ t_20 += "\">";
|
|
|
2759
2775
|
t_20 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "deleteLabel"), env.opts.autoescape);
|
|
2760
2776
|
if(runtime.memberLookup((l_params),"visuallyHiddenText")) {
|
|
2761
2777
|
t_20 += "<span class=\"govcy-visually-hidden\">";
|
|
2762
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2778
|
+
t_20 += runtime.suppressValue((lineno = 30, colno = 169, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((l_params),"visuallyHiddenText"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2763
2779
|
t_20 += "</span>";
|
|
2764
2780
|
;
|
|
2765
2781
|
}
|
package/package.json
CHANGED
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
{%- set hintId = [params.id, "-hint"] | join -%}
|
|
26
26
|
{%- set labelId = [params.id, "-label"] | join -%}
|
|
27
27
|
{%- set errorId = [params.id, "-error"] | join -%}
|
|
28
|
-
{
|
|
28
|
+
{%- set controlId = [params.id, "-input-control"] | join -%}
|
|
29
|
+
{% call formControl({id:controlId,isError: false if params.hideFormControlError else params.error,classes:params.classe, lang:params.langs}) %}
|
|
29
30
|
{#- render label -#}
|
|
30
31
|
{% call label({label:params.label, id:labelId, for:params.id, isPageHeading:isPageHeading, lang:params.lang}) %}{% endcall %}
|
|
31
32
|
{#- render hint -#}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{# file view and delete
|
|
2
2
|
@param {object} label The label text. Will escape text. `{en:"Content",el:"Περιεχομένο"}`
|
|
3
|
+
@param {string} id The input id. Will append '-view-control', for example 'id-card-proof-view-control'. Optional
|
|
3
4
|
@param {string} viewHref The view link's href. Will escape text
|
|
4
5
|
@param {string} deleteHref The delete link's href. Will escape text
|
|
5
6
|
@param {object} visuallyHiddenText The visuallyHiddenText text. Optional. Will escape text. `{en:"Content",el:"Περιεχομένο"}`
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
{%- set deleteLabel -%} {{- govcyGetContent('fileView_delete', params.lang) -}}{%- endset -%}
|
|
20
21
|
{#- label, viewHref and deleteHref are mandatory -#}
|
|
21
22
|
{%- if params.label and params.viewHref and params.deleteHref -%}
|
|
22
|
-
<div class="govcy-form">
|
|
23
|
+
<div {% if params.id %}id="{{ params.id }}-view-control" {% endif %}class="govcy-form">
|
|
23
24
|
{% call formControl({classes:params.classes, lang:params.lang}) %}
|
|
24
25
|
{%- if params.isPageHeading -%}<h1>{%- else -%}<p class="govcy-label govcy-label-primary">{%- endif -%}{{- govcyLocalizeContent(params.label, params.lang) -}}{%- if params.isPageHeading -%}</h1>{%- else -%}</p>{%- endif -%}
|
|
25
26
|
{#- render hint -#}
|