@eturnity/eturnity_reusable_components 7.10.0-EPDM-10290.0 → 7.10.0-EPDM-10285.2
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 +1 -1
- package/src/assets/svgIcons/charger_icon_white.svg +44 -0
- package/src/assets/svgIcons/energy_meter.svg +12 -0
- package/src/assets/svgIcons/split.svg +6 -88
- package/src/components/card/index.vue +95 -0
- package/src/components/errorMessage/index.vue +1 -3
- package/src/components/icon/index.vue +8 -1
- package/src/components/infoText/index.vue +1 -12
- package/src/components/inputs/inputNumber/index.vue +1 -3
- package/src/components/inputs/inputText/index.vue +0 -1
- package/src/components/inputs/select/index.vue +86 -68
- package/src/components/inputs/switchField/index.vue +0 -9
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +0 -8
- package/src/components/inputs/textAreaInput/index.vue +0 -6
- package/src/components/inputs/toggle/index.vue +1 -11
- package/src/components/label/index.vue +0 -1
- package/src/components/modals/modal/index.vue +11 -2
- package/src/components/navigationTabs/index.vue +1 -3
- package/src/components/pageSubtitle/index.vue +1 -8
- package/src/components/pageTitle/index.vue +27 -22
- package/src/helpers/numberConverter.js +1 -0
- package/src/helpers/translateLang.js +9 -1
package/package.json
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4
|
+
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
|
5
|
+
<style type="text/css">
|
6
|
+
.st0{display:none;}
|
7
|
+
.st1{display:inline;}
|
8
|
+
.st2{fill:#FFFFFF;}
|
9
|
+
</style>
|
10
|
+
<g class="st0">
|
11
|
+
<g class="st1">
|
12
|
+
<rect x="-312.013" y="-258.339" class="st2" width="2" height="16"/>
|
13
|
+
</g>
|
14
|
+
<g class="st1">
|
15
|
+
<polygon class="st2" points="-303.346,-242.339 -303.346,-248.339 -312.013,-248.426 -312.013,-242.339 "/>
|
16
|
+
</g>
|
17
|
+
<g class="st1">
|
18
|
+
<rect x="-311.673" y="-258.339" class="st2" width="8" height="2"/>
|
19
|
+
</g>
|
20
|
+
<g class="st1">
|
21
|
+
<path class="st2" d="M-294.833-255.839v-2.5h-7v2.5c0,1.933,1.567,3.5,3.5,3.5l0,0
|
22
|
+
C-296.4-252.339-294.833-253.906-294.833-255.839z"/>
|
23
|
+
</g>
|
24
|
+
<g class="st1">
|
25
|
+
<rect x="-305.346" y="-258.339" class="st2" width="2" height="16"/>
|
26
|
+
</g>
|
27
|
+
<g class="st1">
|
28
|
+
<rect x="-299.333" y="-258.339" class="st2" width="2" height="12"/>
|
29
|
+
</g>
|
30
|
+
<g class="st1">
|
31
|
+
<rect x="-303.346" y="-248.339" class="st2" width="6" height="2"/>
|
32
|
+
</g>
|
33
|
+
<g class="st1">
|
34
|
+
<rect x="-301.346" y="-260.339" class="st2" width="2" height="2"/>
|
35
|
+
</g>
|
36
|
+
<g class="st1">
|
37
|
+
<rect x="-297.346" y="-260.339" class="st2" width="2" height="2"/>
|
38
|
+
</g>
|
39
|
+
</g>
|
40
|
+
<g>
|
41
|
+
<path class="st2" d="M15.777,8.974h3v-2h-3V6h-1c-1.857,0-3.404,1.272-3.855,2.987H8.889V3V1h-2H3.223h-2v2v14v2h2h5.667v-1v-1
|
42
|
+
v-6.013h2.025C11.356,12.716,12.911,14,14.777,14h1v-1.026h3v-2h-3V8.987V8.974z M6.889,17H3.223V3h3.667v5.987v2V17z"/>
|
43
|
+
</g>
|
44
|
+
</svg>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<!-- Creator: CorelDRAW 2021 (64-Bit) -->
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="462px" height="512px" version="1.1" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd"
|
5
|
+
viewBox="0 0 462 511.93"
|
6
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
7
|
+
xmlns:xodm="http://www.corel.com/coreldraw/odm/2003">
|
8
|
+
<g id="Layer_x0020_1">
|
9
|
+
<metadata id="CorelCorpID_0Corel-Layer"/>
|
10
|
+
<path fill="white" d="M22.37 0l417.26 0c12.31,0 22.37,10.06 22.37,22.37l0 400.73c0,12.3 -10.06,22.37 -22.37,22.37l-32.27 0 0 19.01c0,6.2 -5.06,11.27 -11.26,11.27l-25.1 0 0 32.03c0,2.28 -1.87,4.15 -4.15,4.15l-32.33 0c-4.56,0 -8.29,-3.73 -8.29,-8.29l0 -27.89 -33.43 0 0 32.03c0,2.28 -1.86,4.15 -4.14,4.15l-32.34 0c-4.56,0 -8.28,-3.73 -8.28,-8.29l0 -27.89 -33.43 0 0 32.03c0,2.28 -1.86,4.15 -4.14,4.15l-32.34 0c-4.56,0 -8.28,-3.73 -8.28,-8.29l0 -27.89 -33.43 0 0 32.03c0,2.28 -1.86,4.15 -4.14,4.15l-32.34 0c-4.56,0 -8.28,-3.73 -8.28,-8.29l0 -27.89 -25.76 0c-6.2,0 -11.26,-5.07 -11.26,-11.27l0 -19.01 -32.27 0c-12.31,0 -22.37,-10.07 -22.37,-22.37l0 -400.73c0,-12.31 10.06,-22.37 22.37,-22.37zm61.36 103.62l294.54 0c3.34,0 6.38,1.38 8.57,3.57 2.19,2.19 3.56,5.23 3.56,8.57l0 53.77c0,3.33 -1.37,6.37 -3.56,8.56 -2.2,2.2 -5.23,3.57 -8.57,3.57l-294.54 0c-3.34,0 -6.38,-1.37 -8.57,-3.57 -2.19,-2.19 -3.56,-5.23 -3.56,-8.56l0 -53.77c0,-3.34 1.36,-6.37 3.56,-8.57 2.2,-2.21 5.23,-3.57 8.57,-3.57zm159 210.98l15.79 0c2.29,0.01 4.15,1.87 4.15,4.16 0,0.83 -0.25,1.63 -0.7,2.32l-37.64 64.27c-0.75,1.23 -2.09,1.98 -3.53,1.98 -2.29,0 -4.15,-1.86 -4.15,-4.14 0,-0.28 0.02,-0.55 0.08,-0.81l5.55 -39.45 -18.73 0.32c-0.02,0 -0.05,0 -0.08,0 -2.25,0 -4.09,-1.81 -4.13,-4.06 0,-0.01 0,-0.01 0,-0.02 0,-0.75 0.2,-1.5 0.58,-2.15l37.06 -64.26c0.75,-1.24 2.1,-2 3.55,-2 2.29,0 4.15,1.85 4.15,4.15 0,0.18 -0.02,0.36 -0.04,0.54l-1.91 39.15zm151.34 -255.93c5.79,0 10.49,4.95 10.49,11.06 0,6.1 -4.7,11.05 -10.49,11.05 -5.8,0 -10.5,-4.95 -10.5,-11.05 0,-6.11 4.7,-11.06 10.5,-11.06zm-326.13 0c5.8,0 10.5,4.95 10.5,11.06 0,6.1 -4.7,11.05 -10.5,11.05 -5.8,0 -10.5,-4.95 -10.5,-11.05 0,-6.11 4.7,-11.06 10.5,-11.06zm0 307.96c5.8,0 10.5,4.96 10.5,11.06 0,6.11 -4.7,11.06 -10.5,11.06 -5.8,0 -10.5,-4.95 -10.5,-11.06 0,-6.1 4.7,-11.06 10.5,-11.06zm326.13 0c5.79,0 10.49,4.96 10.49,11.06 0,6.11 -4.7,11.06 -10.49,11.06 -5.8,0 -10.5,-4.95 -10.5,-11.06 0,-6.1 4.7,-11.06 10.5,-11.06zm-38.94 -206.03c-3.07,0 -5.53,-0.96 -7.39,-2.88 -1.85,-1.92 -2.77,-4.45 -2.77,-7.59l0 -14.98c0,-3.15 0.92,-5.67 2.77,-7.59 1.86,-1.92 4.32,-2.88 7.39,-2.88 3.08,0 5.55,0.96 7.4,2.88 1.85,1.92 2.78,4.44 2.78,7.59l0 14.98c0,3.14 -0.93,5.67 -2.78,7.59 -1.85,1.92 -4.32,2.88 -7.4,2.88zm0 -7.1c0.6,0 1.08,-0.26 1.42,-0.79 0.35,-0.53 0.52,-1.22 0.52,-2.08l0 -15.98c0,-0.86 -0.17,-1.56 -0.52,-2.09 -0.34,-0.52 -0.82,-0.79 -1.42,-0.79 -0.59,0 -1.06,0.27 -1.41,0.79 -0.34,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.18,1.55 0.52,2.08 0.35,0.53 0.82,0.79 1.41,0.79zm-61.12 7.1c-3.07,0 -5.54,-0.96 -7.39,-2.88 -1.85,-1.92 -2.78,-4.45 -2.78,-7.59l0 -14.98c0,-3.15 0.93,-5.67 2.78,-7.59 1.85,-1.92 4.32,-2.88 7.39,-2.88 3.08,0 5.55,0.96 7.4,2.88 1.85,1.92 2.77,4.44 2.77,7.59l0 14.98c0,3.14 -0.92,5.67 -2.77,7.59 -1.85,1.92 -4.32,2.88 -7.4,2.88zm0 -7.1c0.6,0 1.07,-0.26 1.42,-0.79 0.35,-0.53 0.52,-1.22 0.52,-2.08l0 -15.98c0,-0.86 -0.17,-1.56 -0.52,-2.09 -0.35,-0.52 -0.82,-0.79 -1.42,-0.79 -0.59,0 -1.07,0.27 -1.41,0.79 -0.35,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.17,1.55 0.52,2.08 0.34,0.53 0.82,0.79 1.41,0.79zm-63.81 7.1c-3.07,0 -5.54,-0.96 -7.39,-2.88 -1.85,-1.92 -2.77,-4.45 -2.77,-7.59l0 -14.98c0,-3.15 0.92,-5.67 2.77,-7.59 1.85,-1.92 4.32,-2.88 7.39,-2.88 3.08,0 5.54,0.96 7.4,2.88 1.85,1.92 2.77,4.44 2.77,7.59l0 14.98c0,3.14 -0.92,5.67 -2.77,7.59 -1.86,1.92 -4.32,2.88 -7.4,2.88zm0 -7.1c0.6,0 1.07,-0.26 1.42,-0.79 0.35,-0.53 0.52,-1.22 0.52,-2.08l0 -15.98c0,-0.86 -0.17,-1.56 -0.52,-2.09 -0.35,-0.52 -0.82,-0.79 -1.42,-0.79 -0.59,0 -1.06,0.27 -1.41,0.79 -0.35,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.17,1.55 0.52,2.08 0.35,0.53 0.82,0.79 1.41,0.79zm-61.33 7.1c-3.07,0 -5.54,-0.96 -7.39,-2.88 -1.85,-1.92 -2.77,-4.45 -2.77,-7.59l0 -14.98c0,-3.15 0.92,-5.67 2.77,-7.59 1.85,-1.92 4.32,-2.88 7.39,-2.88 3.08,0 5.55,0.96 7.4,2.88 1.85,1.92 2.77,4.44 2.77,7.59l0 14.98c0,3.14 -0.92,5.67 -2.77,7.59 -1.85,1.92 -4.32,2.88 -7.4,2.88zm0 -7.1c0.6,0 1.07,-0.26 1.42,-0.79 0.35,-0.53 0.52,-1.22 0.52,-2.08l0 -15.98c0,-0.86 -0.17,-1.56 -0.52,-2.09 -0.35,-0.52 -0.82,-0.79 -1.42,-0.79 -0.59,0 -1.06,0.27 -1.41,0.79 -0.35,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.17,1.55 0.52,2.08 0.35,0.53 0.82,0.79 1.41,0.79zm-61.16 7.1c-3.08,0 -5.54,-0.96 -7.39,-2.88 -1.85,-1.92 -2.78,-4.45 -2.78,-7.59l0 -14.98c0,-3.15 0.93,-5.67 2.78,-7.59 1.85,-1.92 4.31,-2.88 7.39,-2.88 3.07,0 5.54,0.96 7.39,2.88 1.85,1.92 2.78,4.44 2.78,7.59l0 14.98c0,3.14 -0.93,5.67 -2.78,7.59 -1.85,1.92 -4.32,2.88 -7.39,2.88zm0 -7.1c0.6,0 1.07,-0.26 1.41,-0.79 0.35,-0.53 0.53,-1.22 0.53,-2.08l0 -15.98c0,-0.86 -0.18,-1.56 -0.53,-2.09 -0.34,-0.52 -0.81,-0.79 -1.41,-0.79 -0.6,0 -1.07,0.27 -1.41,0.79 -0.35,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.17,1.55 0.52,2.08 0.34,0.53 0.81,0.79 1.41,0.79zm58.85 102.29c-4.25,0 -7.69,-3.45 -7.69,-7.69 0,-4.24 3.44,-7.68 7.69,-7.68l128.88 0c4.25,0 7.69,3.44 7.69,7.68 0,4.24 -3.44,7.69 -7.69,7.69l-128.88 0zm-50.58 -38.85c-4.24,0 -7.69,-3.44 -7.69,-7.68 0,-4.24 3.45,-7.69 7.69,-7.69l230.04 0c4.24,0 7.68,3.45 7.68,7.69 0,4.24 -3.44,7.68 -7.68,7.68l-230.04 0zm212.57 -103.71l0 58.82 49.72 0c0.69,0 1.32,-0.29 1.78,-0.75 0.46,-0.45 0.75,-1.09 0.75,-1.77l0 -53.77c0,-0.69 -0.29,-1.33 -0.75,-1.79 -0.45,-0.45 -1.09,-0.74 -1.78,-0.74l-49.72 0zm-9.61 58.82l0 -58.82 -52.26 0 0 58.82 52.26 0zm-61.87 0l0 -58.82 -52.14 0 0 58.82 52.14 0zm-61.75 0l0 -58.82 -52.3 0 0 58.82 52.3 0zm-61.91 0l0 -58.82 -49.68 0c-0.7,0 -1.33,0.29 -1.79,0.74 -0.45,0.46 -0.74,1.09 -0.74,1.79l0 53.77c0,0.69 0.29,1.32 0.74,1.77 0.46,0.46 1.1,0.75 1.79,0.75l49.68 0zm-74.08 -133.14l343.34 0c12.31,0 22.37,10.07 22.37,22.37l0 324.85c0,12.3 -10.07,22.37 -22.37,22.37l-343.34 0c-12.3,0 -22.37,-10.06 -22.37,-22.37l0 -324.85c0,-12.31 10.06,-22.37 22.37,-22.37z"/>
|
11
|
+
</g>
|
12
|
+
</svg>
|
@@ -1,94 +1,12 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
-
|
4
1
|
<svg
|
5
|
-
version="1.1"
|
6
|
-
id="svg438"
|
7
2
|
width="838"
|
8
3
|
height="833"
|
9
4
|
viewBox="0 0 838 833"
|
10
|
-
sodipodi:docname="split.svg"
|
11
|
-
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
|
12
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
13
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
14
5
|
xmlns="http://www.w3.org/2000/svg"
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<stop
|
22
|
-
style="stop-color:#ffffff;stop-opacity:1;"
|
23
|
-
offset="0"
|
24
|
-
id="stop7381" />
|
25
|
-
</linearGradient>
|
26
|
-
<linearGradient
|
27
|
-
id="linearGradient6933"
|
28
|
-
inkscape:swatch="solid">
|
29
|
-
<stop
|
30
|
-
style="stop-color:#000000;stop-opacity:1;"
|
31
|
-
offset="0"
|
32
|
-
id="stop6931" />
|
33
|
-
</linearGradient>
|
34
|
-
</defs>
|
35
|
-
<sodipodi:namedview
|
36
|
-
id="namedview440"
|
37
|
-
pagecolor="#ffffff"
|
38
|
-
bordercolor="#666666"
|
39
|
-
borderopacity="1.0"
|
40
|
-
inkscape:pageshadow="2"
|
41
|
-
inkscape:pageopacity="0.0"
|
42
|
-
inkscape:pagecheckerboard="0"
|
43
|
-
showgrid="false"
|
44
|
-
inkscape:zoom="0.95078031"
|
45
|
-
inkscape:cx="466.45896"
|
46
|
-
inkscape:cy="549.02273"
|
47
|
-
inkscape:window-width="1920"
|
48
|
-
inkscape:window-height="1007"
|
49
|
-
inkscape:window-x="0"
|
50
|
-
inkscape:window-y="0"
|
51
|
-
inkscape:window-maximized="1"
|
52
|
-
inkscape:current-layer="g444" />
|
53
|
-
<g
|
54
|
-
inkscape:groupmode="layer"
|
55
|
-
inkscape:label="Image"
|
56
|
-
id="g444">
|
57
|
-
<circle
|
58
|
-
id="path5141"
|
59
|
-
style="fill:none;stroke:#fffeff;stroke-opacity:1"
|
60
|
-
cx="0.66903824"
|
61
|
-
cy="263.65976"
|
62
|
-
r="0.52949077" />
|
63
|
-
<circle
|
64
|
-
id="path5143"
|
65
|
-
style="fill:none;stroke:#fffeff;stroke-opacity:1"
|
66
|
-
cx="0.66903824"
|
67
|
-
cy="263.65976"
|
68
|
-
r="0.52949077" />
|
69
|
-
<g
|
70
|
-
id="path5184"
|
71
|
-
style="stroke:#fffeff;stroke-opacity:1;fill:none">
|
72
|
-
<path
|
73
|
-
style="color:#000000;fill:none;stroke-width:154.42;-inkscape-stroke:none;stroke:#fffeff;stroke-opacity:1"
|
74
|
-
d="m -156.35359,113.32885 348.76355,221.92361 744.6236,-498.85799"
|
75
|
-
id="path6861" />
|
76
|
-
<path
|
77
|
-
style="color:#000000;fill:none;-inkscape-stroke:none;stroke:#fffeff;stroke-opacity:1"
|
78
|
-
d="M 894.06055,-227.75 191.32227,243.04492 -114.9043,48.1875 -197.80273,178.46875 193.49609,427.45898 980.00781,-99.460937 Z"
|
79
|
-
id="path6863" />
|
80
|
-
</g>
|
81
|
-
<g
|
82
|
-
id="path5186"
|
83
|
-
style="stroke:#fffeff;stroke-opacity:1;fill:none">
|
84
|
-
<path
|
85
|
-
style="color:#000000;fill:none;stroke-width:166.34;-inkscape-stroke:none;stroke:#fffeff;stroke-opacity:1"
|
86
|
-
d="M 816.06617,905.68984 357.97591,628.01443 1035.7943,176.14788"
|
87
|
-
id="path6855" />
|
88
|
-
<path
|
89
|
-
style="color:#000000;fill:none;-inkscape-stroke:none;stroke:#fffeff;stroke-opacity:1"
|
90
|
-
d="M 989.66016,106.94531 203.03125,631.34961 772.95312,976.81445 859.17773,834.56641 512.91992,624.67773 1081.9277,245.34961 Z"
|
91
|
-
id="path6857" />
|
92
|
-
</g>
|
93
|
-
</g>
|
6
|
+
>
|
7
|
+
|
8
|
+
<path
|
9
|
+
fill="#B2B9C5"
|
10
|
+
d="m -5.0875843,441.73292 3.3936693,-93.74987 847.237645,-2.85667 -3.71049,95.94711 z m 333.6519143,232.4369 -98.27777,-105.35245 43.34233,-0.60608 c 23.83828,-0.33335 56.95483,-0.67085 73.59233,-0.75 l 30.25,-0.14392 L 376,413.05958 374.48738,213.61969 301.67731,213.3632 228.86724,213.10671 326.58798,107.77384 C 380.33439,49.84076 424.5019,2.3657611 424.73801,2.2738411 425.25724,2.0716911 628.96623,212.59506 628.96623,213.35636 c 0,0.29424 -41.55385,0.25035 -81.97885,0.25035 h -73.5 L 475,413.0466 l 1.47122,154.25779 72.81196,0.25649 72.81196,0.25649 -91.89971,99.5 -103.35334,112.2049 z"
|
11
|
+
/>
|
94
12
|
</svg>
|
@@ -0,0 +1,95 @@
|
|
1
|
+
<template>
|
2
|
+
<Wrapper
|
3
|
+
v-show="!isLoading"
|
4
|
+
:class="viewCardClass"
|
5
|
+
:width="width"
|
6
|
+
:minWidth="minWidth"
|
7
|
+
>
|
8
|
+
<Spinner v-if="isLoading" size="50px" :limitedToModal="true" />
|
9
|
+
<CardWrapper v-else>
|
10
|
+
<CardTitle :class="titleClass" >
|
11
|
+
{{ $gettext(title) }}
|
12
|
+
<et-popover
|
13
|
+
v-if="showPopover && popoverText !== ''"
|
14
|
+
:text="popoverText"
|
15
|
+
></et-popover>
|
16
|
+
</CardTitle>
|
17
|
+
<slot></slot>
|
18
|
+
</CardWrapper>
|
19
|
+
</Wrapper>
|
20
|
+
</template>
|
21
|
+
|
22
|
+
<script>
|
23
|
+
import styled from 'vue-styled-components'
|
24
|
+
import Spinner from '../spinner'
|
25
|
+
|
26
|
+
const WrapperProps = { width: [Number, String], minWidth: [Number, String] }
|
27
|
+
const Wrapper = styled('div', WrapperProps)`
|
28
|
+
max-width: ${(props) => props.width};
|
29
|
+
min-width: ${(props) => props.minWidth};
|
30
|
+
padding: 20px;
|
31
|
+
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
32
|
+
border-radius: 4px;
|
33
|
+
background-color: ${props => props.theme.colors.white};
|
34
|
+
height: 100%;
|
35
|
+
`
|
36
|
+
|
37
|
+
const CardWrapper = styled('div')`
|
38
|
+
height: 100%;
|
39
|
+
width: auto;
|
40
|
+
`
|
41
|
+
|
42
|
+
const CardTitle = styled('p')`
|
43
|
+
font-size: 14px;
|
44
|
+
line-height: 1;
|
45
|
+
color: ${props => props.theme.colors.black};
|
46
|
+
font-weight: 700;
|
47
|
+
margin-bottom: 10px;
|
48
|
+
`
|
49
|
+
|
50
|
+
export default {
|
51
|
+
name: 'Card',
|
52
|
+
props: {
|
53
|
+
title: {
|
54
|
+
type: String,
|
55
|
+
default: ''
|
56
|
+
},
|
57
|
+
width: {
|
58
|
+
type: [Number, String],
|
59
|
+
required: false,
|
60
|
+
default: '400px'
|
61
|
+
},
|
62
|
+
minWidth: {
|
63
|
+
type: [Number, String],
|
64
|
+
required: false,
|
65
|
+
default: null
|
66
|
+
},
|
67
|
+
titleClass: {
|
68
|
+
type: String,
|
69
|
+
default: ''
|
70
|
+
},
|
71
|
+
showPopover: {
|
72
|
+
type: Boolean,
|
73
|
+
default: false
|
74
|
+
},
|
75
|
+
viewCardClass: {
|
76
|
+
type: String,
|
77
|
+
default: ''
|
78
|
+
},
|
79
|
+
popoverText: {
|
80
|
+
type: String,
|
81
|
+
default: ''
|
82
|
+
},
|
83
|
+
isLoading: {
|
84
|
+
type: Boolean,
|
85
|
+
default: false
|
86
|
+
}
|
87
|
+
},
|
88
|
+
components: {
|
89
|
+
Spinner,
|
90
|
+
Wrapper,
|
91
|
+
CardTitle,
|
92
|
+
CardWrapper,
|
93
|
+
}
|
94
|
+
}
|
95
|
+
</script>
|
@@ -9,9 +9,7 @@
|
|
9
9
|
<script>
|
10
10
|
// import ErrorMessage from "@eturnity/eturnity_reusable_components/src/components/errorMessage"
|
11
11
|
//To use:
|
12
|
-
// <error-message
|
13
|
-
// alignText="right" // default is left
|
14
|
-
// />
|
12
|
+
// <error-message />
|
15
13
|
|
16
14
|
import styled from 'vue-styled-components'
|
17
15
|
|
@@ -5,6 +5,7 @@
|
|
5
5
|
:size="size"
|
6
6
|
:color="color"
|
7
7
|
:hoveredColor="hoveredColor"
|
8
|
+
:backgroundColor="backgroundColor"
|
8
9
|
v-html="
|
9
10
|
require(`!html-loader!./../../assets/svgIcons/${name.toLowerCase()}.svg`)
|
10
11
|
"
|
@@ -40,6 +41,7 @@ const Wrapper = styled('div', wrapperAttrs)`
|
|
40
41
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursor)};
|
41
42
|
line-height: 0;
|
42
43
|
`
|
44
|
+
|
43
45
|
const strikedAttrs = { isDisabled: Boolean, color: String, hoveredColor: String }
|
44
46
|
const strikedLine = styled('div', strikedAttrs)`
|
45
47
|
display: flex;
|
@@ -56,12 +58,14 @@ const strikedLine = styled('div', strikedAttrs)`
|
|
56
58
|
transform-origin: 0% 100%;
|
57
59
|
transform: rotate(-45deg);
|
58
60
|
`
|
59
|
-
const IconImageProps = { color: String, hoveredColor: String, size: String }
|
61
|
+
const IconImageProps = { color: String, hoveredColor: String, size: String, backgroundColor: String}
|
60
62
|
const IconImage = styled('div', IconImageProps)`
|
61
63
|
width: 100%;
|
62
64
|
svg {
|
63
65
|
width: 100%;
|
64
66
|
height: 100%;
|
67
|
+
background-color: ${(props) => props.backgroundColor};
|
68
|
+
padding: ${(props) => props.backgroundColor ? '3px' : '0'};
|
65
69
|
}
|
66
70
|
svg path {
|
67
71
|
${(props) =>
|
@@ -93,6 +97,9 @@ export default {
|
|
93
97
|
color: {
|
94
98
|
required: false
|
95
99
|
},
|
100
|
+
backgroundColor: {
|
101
|
+
required: false
|
102
|
+
},
|
96
103
|
hoveredColor: {
|
97
104
|
required: false
|
98
105
|
},
|
@@ -10,7 +10,6 @@
|
|
10
10
|
</icon-img>
|
11
11
|
<text-overlay
|
12
12
|
v-if="showInfo"
|
13
|
-
:borderColor="borderColor"
|
14
13
|
:width="width"
|
15
14
|
:halfComputedTextInfoWidth="halfComputedTextInfoWidth"
|
16
15
|
:alignArrow="alignArrow"
|
@@ -27,7 +26,6 @@
|
|
27
26
|
//To use:
|
28
27
|
// <info-text
|
29
28
|
// text="Veritatis et quasi architecto beatae vitae"
|
30
|
-
// borderColor="#ccc"
|
31
29
|
// size="20"
|
32
30
|
// alignArrow="right" // which side the arrow should be on
|
33
31
|
// />
|
@@ -37,7 +35,6 @@ import icon from '../icon'
|
|
37
35
|
|
38
36
|
const textAttrs = {
|
39
37
|
iconSize: String,
|
40
|
-
borderColor: String,
|
41
38
|
alignArrow: String,
|
42
39
|
width: String,
|
43
40
|
halfComputedTextInfoWidth: Number
|
@@ -112,10 +109,6 @@ export default {
|
|
112
109
|
text: {
|
113
110
|
required: false
|
114
111
|
},
|
115
|
-
borderColor: {
|
116
|
-
required: false,
|
117
|
-
default: null
|
118
|
-
},
|
119
112
|
size: {
|
120
113
|
required: false,
|
121
114
|
default: '14px'
|
@@ -157,11 +150,7 @@ export default {
|
|
157
150
|
},
|
158
151
|
computed: {
|
159
152
|
iconColor() {
|
160
|
-
return
|
161
|
-
? this.borderColor
|
162
|
-
? this.borderColor
|
163
|
-
: theme.colors.secondary
|
164
|
-
: theme.colors.mediumGray
|
153
|
+
return theme.colors.mediumGray
|
165
154
|
},
|
166
155
|
halfComputedTextInfoWidth() {
|
167
156
|
return parseInt(this.width) / 2
|
@@ -16,12 +16,10 @@
|
|
16
16
|
<label-text :labelFontColor="labelFontColor" :data-id="labelDataId">
|
17
17
|
{{ labelText }}
|
18
18
|
</label-text>
|
19
|
-
|
19
|
+
|
20
20
|
<info-text
|
21
21
|
v-if="labelInfoText"
|
22
22
|
:text="labelInfoText"
|
23
|
-
borderColor="#ccc"
|
24
|
-
size="14px"
|
25
23
|
:alignArrow="labelInfoAlign"
|
26
24
|
/>
|
27
25
|
</label-wrapper>
|
@@ -22,9 +22,7 @@
|
|
22
22
|
<info-text
|
23
23
|
v-if="infoTextMessage"
|
24
24
|
:text="infoTextMessage"
|
25
|
-
borderColor="#ccc"
|
26
25
|
:size="infoTextSize"
|
27
|
-
:alignText="infoTextAlign"
|
28
26
|
/>
|
29
27
|
</label-wrapper>
|
30
28
|
<select-button-wrapper :disabled="disabled">
|
@@ -46,9 +44,12 @@
|
|
46
44
|
@keydown.native="onKeyDown"
|
47
45
|
:showBorder="showBorder"
|
48
46
|
:data-id="dataId"
|
49
|
-
:
|
50
|
-
>
|
51
|
-
<draggableInputHandle
|
47
|
+
:paddingLeft="paddingLeft"
|
48
|
+
>
|
49
|
+
<draggableInputHandle
|
50
|
+
v-if="isDraggable && !isSearchBarVisible"
|
51
|
+
:height="selectHeight"
|
52
|
+
/>
|
52
53
|
<inputText
|
53
54
|
v-if="isSearchBarVisible"
|
54
55
|
ref="searchInput"
|
@@ -65,7 +66,12 @@
|
|
65
66
|
@input-change="searchChange"
|
66
67
|
@click.native.stop
|
67
68
|
/>
|
68
|
-
<selector
|
69
|
+
<selector
|
70
|
+
v-else
|
71
|
+
:showBorder="showBorder"
|
72
|
+
:selectWidth="selectWidth"
|
73
|
+
:paddingLeft="paddingLeft"
|
74
|
+
>
|
69
75
|
<slot name="selector" :selectedValue="selectedValue"></slot>
|
70
76
|
</selector>
|
71
77
|
<Caret @click.stop="toggleCaretDropdown">
|
@@ -145,20 +151,38 @@ import icon from '../../icon'
|
|
145
151
|
import inputText from '../inputText'
|
146
152
|
import draggableInputHandle from '../../draggableInputHandle'
|
147
153
|
|
154
|
+
const CARET_WIDTH = '30px'
|
155
|
+
const BORDER_WIDTH = '1px'
|
156
|
+
|
148
157
|
const Caret = styled.div`
|
149
158
|
display: flex;
|
150
159
|
align-items: center;
|
151
160
|
justify-content: center;
|
152
|
-
width:
|
153
|
-
min-width:
|
161
|
+
width: ${CARET_WIDTH};
|
162
|
+
min-width: ${CARET_WIDTH};
|
154
163
|
height: 100%;
|
155
|
-
align-items: stretch
|
164
|
+
align-items: stretch;
|
156
165
|
cursor: pointer;
|
157
166
|
margin-left: auto;
|
158
167
|
`
|
159
168
|
|
160
|
-
const
|
161
|
-
|
169
|
+
const selectorProps = {
|
170
|
+
selectWidth: String,
|
171
|
+
paddingLeft: String,
|
172
|
+
showBorder: Boolean
|
173
|
+
}
|
174
|
+
const Selector = styled('div', selectorProps)`
|
175
|
+
${(props) => props.selectWidth === '100%' ? 'width: 100%;' : `width: calc(${props.selectWidth} -
|
176
|
+
(
|
177
|
+
${CARET_WIDTH} +
|
178
|
+
${props.paddingLeft}
|
179
|
+
${props.showBorder ? `+ (${BORDER_WIDTH} * 2)` : ''}
|
180
|
+
)
|
181
|
+
);
|
182
|
+
white-space: nowrap;
|
183
|
+
text-overflow: ellipsis;
|
184
|
+
overflow: hidden;`
|
185
|
+
}
|
162
186
|
`
|
163
187
|
|
164
188
|
const labelAttrs = { fontSize: String, fontColor: String }
|
@@ -167,7 +191,7 @@ const InputLabel = styled('div', labelAttrs)`
|
|
167
191
|
props.theme.colors[props.fontColor]
|
168
192
|
? props.theme.colors[props.fontColor]
|
169
193
|
: props.fontColor};
|
170
|
-
font-size: ${(props) =>
|
194
|
+
font-size: ${(props) => props.fontSize};
|
171
195
|
font-weight: 700;
|
172
196
|
`
|
173
197
|
const optionalLabel = styled.span`
|
@@ -175,7 +199,7 @@ const optionalLabel = styled.span`
|
|
175
199
|
`
|
176
200
|
const inputProps = { selectWidth: String, optionWidth: String }
|
177
201
|
const Container = styled('div', inputProps)`
|
178
|
-
width: ${(props) =>
|
202
|
+
width: ${(props) => props.selectWidth};
|
179
203
|
position: relative;
|
180
204
|
display: inline-block;
|
181
205
|
`
|
@@ -204,15 +228,15 @@ const selectButtonAttrs = {
|
|
204
228
|
selectMinHeight: String,
|
205
229
|
isSearchBarVisible: Boolean,
|
206
230
|
showBorder: Boolean,
|
207
|
-
|
231
|
+
paddingLeft: String
|
208
232
|
}
|
209
233
|
const selectButton = styled('div', selectButtonAttrs)`
|
210
234
|
position: relative;
|
211
235
|
box-sizing: border-box;
|
212
236
|
border-radius: 4px;
|
213
|
-
|
237
|
+
${(props) =>
|
238
|
+
props.isSearchBarVisible ? '' : `padding-left: ${props.paddingLeft}`};
|
214
239
|
text-align: left;
|
215
|
-
border-radius: 4px;
|
216
240
|
min-height: ${(props) =>
|
217
241
|
props.selectHeight
|
218
242
|
? props.selectHeight
|
@@ -227,7 +251,9 @@ const selectButton = styled('div', selectButtonAttrs)`
|
|
227
251
|
${({ showBorder, theme, hasError }) =>
|
228
252
|
showBorder &&
|
229
253
|
`
|
230
|
-
border:
|
254
|
+
border: ${BORDER_WIDTH} solid ${
|
255
|
+
hasError ? theme.colors.red : theme.colors.grey4
|
256
|
+
}
|
231
257
|
`}
|
232
258
|
background-color:${(props) =>
|
233
259
|
props.disabled
|
@@ -241,49 +267,50 @@ const selectButton = styled('div', selectButtonAttrs)`
|
|
241
267
|
: props.fontColor};
|
242
268
|
${(props) => (props.disabled ? 'pointer-events: none' : '')};
|
243
269
|
overflow: hidden;
|
244
|
-
&
|
245
|
-
border-right
|
270
|
+
& > .handle {
|
271
|
+
border-right: ${(props) =>
|
272
|
+
props.hasError ? props.theme.colors.red : props.theme.colors.grey4}
|
273
|
+
1px solid;
|
246
274
|
}
|
247
275
|
`
|
248
276
|
const selectDropdownAttrs = {
|
249
277
|
hoveredBgColor: String,
|
250
278
|
bgColor: String,
|
251
279
|
fontColor: String,
|
252
|
-
selectWidth: String,
|
253
280
|
optionWidth: String,
|
254
281
|
hoveredIndex: Number,
|
255
282
|
hoveredValue: Number | String,
|
256
283
|
selectedValue: Number | String
|
257
284
|
}
|
258
285
|
const selectDropdown = styled('div', selectDropdownAttrs)`
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
286
|
+
box-sizing: border-box;
|
287
|
+
z-index: ${(props) => (props.isActive ? '2' : '1')};
|
288
|
+
position: absolute;
|
289
|
+
top: 5px;
|
290
|
+
border: ${BORDER_WIDTH} solid ${(props) => props.theme.colors.grey4};
|
291
|
+
border-radius: 4px;
|
292
|
+
display: flex;
|
293
|
+
flex-direction: column;
|
294
|
+
align-items: flex-start;
|
295
|
+
padding: 0px;
|
296
|
+
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
297
|
+
width: ${(props) => (props.optionWidth ? props.optionWidth : '100%')};
|
298
|
+
background-color: ${(props) =>
|
299
|
+
props.theme.colors[props.bgColor]
|
300
|
+
? props.theme.colors[props.bgColor]
|
301
|
+
: props.bgColor};
|
302
|
+
color: ${(props) =>
|
303
|
+
props.theme.colors[props.fontColor]
|
304
|
+
? props.theme.colors[props.fontColor]
|
305
|
+
: props.fontColor};
|
306
|
+
max-height: 300px;
|
307
|
+
overflow-y: auto;
|
308
|
+
& > div[data-value='${(props) => props.hoveredValue}'] {
|
309
|
+
background-color: ${(props) =>
|
310
|
+
props.theme.colors[props.hoveredBgColor]
|
311
|
+
? props.theme.colors[props.hoveredBgColor]
|
312
|
+
: props.hoveredBgColor};
|
313
|
+
}
|
287
314
|
`
|
288
315
|
const DropdownWrapper = styled('div')`
|
289
316
|
position: relative;
|
@@ -307,7 +334,7 @@ export default {
|
|
307
334
|
},
|
308
335
|
fontSize: {
|
309
336
|
required: false,
|
310
|
-
default:
|
337
|
+
default: '13px'
|
311
338
|
},
|
312
339
|
label: {
|
313
340
|
required: false
|
@@ -323,12 +350,10 @@ export default {
|
|
323
350
|
infoTextMessage: {
|
324
351
|
required: false
|
325
352
|
},
|
326
|
-
infoTextAlign: {
|
327
|
-
required: false
|
328
|
-
},
|
329
353
|
selectWidth: {
|
354
|
+
type: String,
|
330
355
|
required: false,
|
331
|
-
default:
|
356
|
+
default: '100%'
|
332
357
|
},
|
333
358
|
selectHeight: {
|
334
359
|
type: String,
|
@@ -437,6 +462,7 @@ export default {
|
|
437
462
|
data() {
|
438
463
|
return {
|
439
464
|
selectedValue: null,
|
465
|
+
paddingLeft: this.isDraggable ? '30px' : '15px',
|
440
466
|
isDropdownOpen: false,
|
441
467
|
isActive: false,
|
442
468
|
textSearch: '',
|
@@ -511,9 +537,6 @@ export default {
|
|
511
537
|
}
|
512
538
|
})
|
513
539
|
},
|
514
|
-
onSelectSlotClick() {
|
515
|
-
this.toggleDropdown()
|
516
|
-
},
|
517
540
|
clickOutside(event) {
|
518
541
|
const dropdownRef = this.$refs.dropdown
|
519
542
|
// we need to prevent closing on selecting an option, because in the case of
|
@@ -559,26 +582,21 @@ export default {
|
|
559
582
|
this.$refs.dropdown.$el.scrollTop = topPos
|
560
583
|
}
|
561
584
|
}
|
585
|
+
},
|
586
|
+
clearSearch() {
|
587
|
+
this.textSearch = ''
|
562
588
|
}
|
563
589
|
},
|
564
590
|
computed: {
|
565
591
|
optionLength() {
|
566
592
|
if (this.isDropdownOpen) {
|
567
|
-
|
568
|
-
const filterRef =
|
569
|
-
this.$refs.dropdown.$children &&
|
570
|
-
this.$refs.dropdown.$children.length > 1
|
571
|
-
? this.$refs.dropdown.$children
|
572
|
-
: this.$refs.dropdown.$children[0].$children
|
573
|
-
? this.$refs.dropdown.$children[0].$children
|
574
|
-
: this.$refs.dropdown.$children
|
575
|
-
return filterRef.length
|
576
|
-
} else {
|
577
|
-
return 0
|
593
|
+
return this.$refs.dropdown.$el.childElementCount
|
578
594
|
}
|
595
|
+
|
596
|
+
return 0
|
579
597
|
},
|
580
598
|
isSearchBarVisible() {
|
581
|
-
return this.isSearchable && this.
|
599
|
+
return this.isSearchable && this.isDropdownOpen
|
582
600
|
}
|
583
601
|
},
|
584
602
|
watch: {
|
@@ -17,9 +17,6 @@
|
|
17
17
|
<info-text
|
18
18
|
v-if="infoTextMessage"
|
19
19
|
:text="infoTextMessage"
|
20
|
-
borderColor="#ccc"
|
21
|
-
size="14px"
|
22
|
-
:alignText="infoTextAlign"
|
23
20
|
/>
|
24
21
|
</label-container>
|
25
22
|
|
@@ -51,9 +48,6 @@
|
|
51
48
|
@click.native.stop
|
52
49
|
v-if="infoTextMessage"
|
53
50
|
:text="infoTextMessage"
|
54
|
-
borderColor="#ccc"
|
55
|
-
size="14px"
|
56
|
-
:alignText="infoTextAlign"
|
57
51
|
/>
|
58
52
|
</label-container>
|
59
53
|
</flex-wrapper>
|
@@ -207,9 +201,6 @@ export default {
|
|
207
201
|
infoTextMessage: {
|
208
202
|
required: false
|
209
203
|
},
|
210
|
-
infoTextAlign: {
|
211
|
-
required: false
|
212
|
-
},
|
213
204
|
colorMode: {
|
214
205
|
required: false,
|
215
206
|
default: 'light'
|
@@ -22,7 +22,6 @@ const Template = (args, { argTypes }) => ({
|
|
22
22
|
// rowHeight="4" //optional
|
23
23
|
// :isError="false"
|
24
24
|
// :errorText="$gettext('field_required')"
|
25
|
-
// infoTextAlign="right" // left by default
|
26
25
|
// infoTextMessage="My info message"
|
27
26
|
// label="Question 5"
|
28
27
|
// alignItems="horizontal" // horizontal, vertical
|
@@ -37,7 +36,6 @@ Default.args = {
|
|
37
36
|
rowHeight: "2",
|
38
37
|
isError: false,
|
39
38
|
errorText: "This field is required",
|
40
|
-
infoTextAlign: "right",
|
41
39
|
infoTextMessage: "",
|
42
40
|
label: "",
|
43
41
|
value: "",
|
@@ -52,7 +50,6 @@ Disabled.args = {
|
|
52
50
|
rowHeight: "2",
|
53
51
|
isError: false,
|
54
52
|
errorText: "This field is required",
|
55
|
-
infoTextAlign: "right",
|
56
53
|
infoTextMessage: "",
|
57
54
|
label: "",
|
58
55
|
value: "",
|
@@ -67,7 +64,6 @@ Error.args = {
|
|
67
64
|
rowHeight: "2",
|
68
65
|
isError: true,
|
69
66
|
errorText: "This field is required",
|
70
|
-
infoTextAlign: "right",
|
71
67
|
infoTextMessage: "",
|
72
68
|
label: "",
|
73
69
|
value: "",
|
@@ -82,7 +78,6 @@ WithLabel.args = {
|
|
82
78
|
rowHeight: "2",
|
83
79
|
isError: false,
|
84
80
|
errorText: "This field is required",
|
85
|
-
infoTextAlign: "right",
|
86
81
|
infoTextMessage: "Here is some information",
|
87
82
|
label: "Description",
|
88
83
|
value: "Here is my description!",
|
@@ -97,7 +92,6 @@ HorizontalLabel.args = {
|
|
97
92
|
rowHeight: "2",
|
98
93
|
isError: false,
|
99
94
|
errorText: "This field is required",
|
100
|
-
infoTextAlign: "right",
|
101
95
|
infoTextMessage: "Here is some information",
|
102
96
|
label: "Description",
|
103
97
|
value: "Here is my description!",
|
@@ -112,7 +106,6 @@ LargerTextArea.args = {
|
|
112
106
|
rowHeight: "5",
|
113
107
|
isError: false,
|
114
108
|
errorText: "This field is required",
|
115
|
-
infoTextAlign: "right",
|
116
109
|
infoTextMessage: "Here is some information",
|
117
110
|
label: "Description",
|
118
111
|
value: "Here is my description!",
|
@@ -127,7 +120,6 @@ LargerFontSize.args = {
|
|
127
120
|
fontSize: "24px",
|
128
121
|
isError: false,
|
129
122
|
errorText: "This field is required",
|
130
|
-
infoTextAlign: "right",
|
131
123
|
infoTextMessage: "Here is some information",
|
132
124
|
label: "Description",
|
133
125
|
value: "Here is my description!",
|
@@ -11,9 +11,7 @@
|
|
11
11
|
<info-text
|
12
12
|
v-if="infoTextMessage"
|
13
13
|
:text="infoTextMessage"
|
14
|
-
borderColor="#ccc"
|
15
14
|
size="16px"
|
16
|
-
:alignText="infoTextAlign"
|
17
15
|
/>
|
18
16
|
</label-wrapper>
|
19
17
|
<input-container
|
@@ -47,7 +45,6 @@
|
|
47
45
|
// rowHeight="4" //optional
|
48
46
|
// :isError="false"
|
49
47
|
// :errorText="$gettext('field_required')"
|
50
|
-
// infoTextAlign="right" // left by default
|
51
48
|
// infoTextMessage="My info message"
|
52
49
|
// label="Question 5"
|
53
50
|
// alignItems="horizontal" // horizontal, vertical
|
@@ -167,9 +164,6 @@ export default {
|
|
167
164
|
infoTextMessage: {
|
168
165
|
required: false
|
169
166
|
},
|
170
|
-
infoTextAlign: {
|
171
|
-
required: false
|
172
|
-
},
|
173
167
|
label: {
|
174
168
|
required: false
|
175
169
|
},
|
@@ -14,9 +14,6 @@
|
|
14
14
|
<info-text
|
15
15
|
v-if="infoTextMessage"
|
16
16
|
:text="infoTextMessage"
|
17
|
-
borderColor="#ccc"
|
18
|
-
size="14px"
|
19
|
-
:alignText="infoTextAlign"
|
20
17
|
/>
|
21
18
|
</label-container>
|
22
19
|
<toggle-wrapper
|
@@ -50,9 +47,6 @@
|
|
50
47
|
@click.native.stop
|
51
48
|
v-if="infoTextMessage"
|
52
49
|
:text="infoTextMessage"
|
53
|
-
borderColor="#ccc"
|
54
|
-
size="14px"
|
55
|
-
:alignText="infoTextAlign"
|
56
50
|
/>
|
57
51
|
</label-container>
|
58
52
|
</flex-wrapper>
|
@@ -72,7 +66,6 @@
|
|
72
66
|
// labelAlign="right"
|
73
67
|
// fontColor="black"
|
74
68
|
// :disabled="true"
|
75
|
-
// infoTextAlign="right" // left by default
|
76
69
|
// infoTextMessage="My info message"
|
77
70
|
// data-id="test_data_id"
|
78
71
|
// />
|
@@ -193,7 +186,7 @@ const ToggleDot = styled('span', toggleProps)`
|
|
193
186
|
: props.size === 'small'
|
194
187
|
? '10px'
|
195
188
|
: '14px'};
|
196
|
-
left: 3px
|
189
|
+
left: 3px;
|
197
190
|
bottom: ${(props) =>
|
198
191
|
props.size === 'medium' ? '5px' : props.size === 'small' ? '2px' : '5px'};
|
199
192
|
background-color: ${(props) =>
|
@@ -278,9 +271,6 @@ export default {
|
|
278
271
|
infoTextMessage: {
|
279
272
|
required: false
|
280
273
|
},
|
281
|
-
infoTextAlign: {
|
282
|
-
required: false
|
283
|
-
},
|
284
274
|
dataId: {
|
285
275
|
type: String,
|
286
276
|
default: ''
|
@@ -5,7 +5,7 @@
|
|
5
5
|
:class="{ visible: isOpen, hidden: !isOpen }"
|
6
6
|
:backdrop="backdrop"
|
7
7
|
>
|
8
|
-
<modal-container @click
|
8
|
+
<modal-container @click="onClickModalContainer">
|
9
9
|
<spinner v-if="isLoading" size="50px" :limitedToModal="true" />
|
10
10
|
<content-container :visible="!isLoading">
|
11
11
|
<slot />
|
@@ -26,7 +26,7 @@
|
|
26
26
|
// import Modal from "@eturnity/eturnity_reusable_components/src/components/modals/modal"
|
27
27
|
// This is a more flexible modal box, where the parent can decide how the body of the modal looks
|
28
28
|
// To use:
|
29
|
-
// <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :isLoading="true" :hideClose="true">
|
29
|
+
// <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :isLoading="true" :hideClose="true" :stopPropagation="false">
|
30
30
|
// <div>Data....</div>
|
31
31
|
// </modal>
|
32
32
|
|
@@ -151,6 +151,10 @@ export default {
|
|
151
151
|
position: {
|
152
152
|
required: false,
|
153
153
|
default: 'fixed'
|
154
|
+
},
|
155
|
+
stopPropagation: {
|
156
|
+
type: Boolean,
|
157
|
+
default: true
|
154
158
|
}
|
155
159
|
},
|
156
160
|
beforeDestroy() {
|
@@ -164,6 +168,11 @@ export default {
|
|
164
168
|
if (key === 'Escape') {
|
165
169
|
this.onCloseModal()
|
166
170
|
}
|
171
|
+
},
|
172
|
+
onClickModalContainer(event) {
|
173
|
+
if (this.stopPropagation) {
|
174
|
+
event.stopPropagation()
|
175
|
+
}
|
167
176
|
}
|
168
177
|
},
|
169
178
|
watch: {
|
@@ -13,8 +13,6 @@
|
|
13
13
|
<info-text
|
14
14
|
v-if="tab['labelInfoText']"
|
15
15
|
:text="tab['labelInfoText']"
|
16
|
-
borderColor="#ccc"
|
17
|
-
size="14px"
|
18
16
|
:alignArrow="tab['labelInfoAlign']"
|
19
17
|
/>
|
20
18
|
</Option>
|
@@ -57,7 +55,7 @@ const Option = styled('div',TabAttr)`
|
|
57
55
|
justify-content: center;
|
58
56
|
flex-direction: row;
|
59
57
|
gap: 10px;
|
60
|
-
color: ${props=>props.textColor ?
|
58
|
+
color: ${props=>props.textColor ?
|
61
59
|
props.theme.colors[props.textColor] ? props.theme.colors[props.textColor] : props.textColor :
|
62
60
|
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
63
61
|
`
|
@@ -4,11 +4,8 @@
|
|
4
4
|
{{ text }}
|
5
5
|
</span>
|
6
6
|
<info-text
|
7
|
-
:text="infoText"
|
8
7
|
v-if="!!infoText"
|
9
|
-
|
10
|
-
borderColor="#ccc"
|
11
|
-
:alignText="alignInfoText"
|
8
|
+
:text="infoText"
|
12
9
|
/>
|
13
10
|
</subtitle-text>
|
14
11
|
</template>
|
@@ -55,10 +52,6 @@ export default {
|
|
55
52
|
required: false,
|
56
53
|
default: null,
|
57
54
|
},
|
58
|
-
alignInfoText: {
|
59
|
-
required: false,
|
60
|
-
default: "left",
|
61
|
-
},
|
62
55
|
marginBottom: {
|
63
56
|
required: false,
|
64
57
|
default: "30px",
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
|
2
|
+
<title-wrap :hasInfoText="!!infoText">
|
3
|
+
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
|
4
|
+
{{ text }}
|
5
|
+
</title-text>
|
4
6
|
<info-text
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
/>
|
11
|
-
</flex>
|
7
|
+
v-if="!!infoText"
|
8
|
+
:text="infoText"
|
9
|
+
:alignArrow="infoAlign"
|
10
|
+
/>
|
11
|
+
</title-wrap>
|
12
12
|
</template>
|
13
13
|
|
14
14
|
<script>
|
@@ -19,28 +19,32 @@
|
|
19
19
|
// color="red"
|
20
20
|
// />
|
21
21
|
import styled from "vue-styled-components"
|
22
|
-
import InfoText from
|
23
|
-
|
24
|
-
const
|
22
|
+
import InfoText from "../infoText"
|
23
|
+
|
24
|
+
const wrapAttrs = { hasInfoText: Boolean }
|
25
|
+
const TitleWrap = styled("div", wrapAttrs)`
|
26
|
+
display: grid;
|
27
|
+
align-items: center;
|
28
|
+
grid-gap: 12px;
|
29
|
+
grid-template-columns: ${(props) =>
|
30
|
+
props.hasInfoText ? "auto auto 1fr" : "1fr"};
|
31
|
+
margin-bottom: 20px;
|
32
|
+
`
|
33
|
+
|
34
|
+
const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
35
|
+
const TitleText = styled('span', titleAttrs)`
|
25
36
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
26
37
|
font-weight: bold;
|
27
38
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
28
39
|
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
29
|
-
|
30
|
-
`
|
31
|
-
const flex = styled("div", textAttrs)`
|
32
|
-
display: flex;
|
33
|
-
gap:10px;
|
34
|
-
margin-bottom: 20px;
|
35
|
-
align-items: center;
|
36
40
|
`
|
37
41
|
|
38
42
|
export default {
|
39
43
|
name: "page-title",
|
40
44
|
components: {
|
41
45
|
TitleText,
|
42
|
-
|
43
|
-
|
46
|
+
TitleWrap,
|
47
|
+
InfoText
|
44
48
|
},
|
45
49
|
props: {
|
46
50
|
text: {
|
@@ -59,10 +63,11 @@ export default {
|
|
59
63
|
},
|
60
64
|
infoText: {
|
61
65
|
required: false,
|
66
|
+
default: null,
|
62
67
|
},
|
63
68
|
infoAlign: {
|
64
69
|
required: false,
|
65
|
-
}
|
70
|
+
}
|
66
71
|
},
|
67
72
|
}
|
68
73
|
</script>
|
@@ -48,6 +48,8 @@ export const translateLang = (lang) => {
|
|
48
48
|
return 'portuguese'
|
49
49
|
} else if (lang === 'es-es') {
|
50
50
|
return 'spanish'
|
51
|
+
} else if (lang === 'ca-es') {
|
52
|
+
return 'catalan_es'
|
51
53
|
} else {
|
52
54
|
return lang
|
53
55
|
}
|
@@ -72,6 +74,8 @@ export const datePickerLang = (lang) => {
|
|
72
74
|
return 'it'
|
73
75
|
} else if (lang === 'en-us' || lang === 'en-gb') {
|
74
76
|
return 'en'
|
77
|
+
} else if (lang === 'es-es' || lang === 'ca-es' || lang === 'pt-pt') {
|
78
|
+
return 'es'
|
75
79
|
} else {
|
76
80
|
return lang
|
77
81
|
}
|
@@ -97,6 +101,8 @@ export const tinyLanguage = (lang) => {
|
|
97
101
|
return 'fr_FR'
|
98
102
|
} else if (lang === 'it' || lang === 'it-it' || lang === 'it-ch') {
|
99
103
|
return 'it'
|
104
|
+
} else if (lang === 'es-es' || lang === 'ca-es') {
|
105
|
+
return 'es'
|
100
106
|
} else if (lang === 'en-us') {
|
101
107
|
return null
|
102
108
|
} else {
|
@@ -114,7 +120,9 @@ export const langForLocaleString = () => {
|
|
114
120
|
? 'fr-fr'
|
115
121
|
: localStorage.getItem('lang') === 'fr-ch'
|
116
122
|
? 'de-ch'
|
117
|
-
: localStorage.getItem('lang')
|
123
|
+
: localStorage.getItem('lang') === 'ca-es'
|
124
|
+
? 'es-es'
|
125
|
+
: localStorage.getItem('lang')
|
118
126
|
: 'en-US'
|
119
127
|
return selectedLang !== 'null' ? selectedLang : 'en-US'
|
120
128
|
}
|