comand-component-library 4.1.83 → 4.1.84
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/comand-component-library.js +3067 -2273
- package/package.json +2 -2
- package/src/ComponentLibrary.vue +17 -3
- package/src/assets/data/all-countries.json +197 -0
- package/src/utils/date.js +16 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "comand-component-library",
|
3
|
-
"version": "4.1.
|
3
|
+
"version": "4.1.84",
|
4
4
|
"license": "GPL-3.0-only",
|
5
5
|
"author": "CoManD-UI",
|
6
6
|
"private": false,
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"dependencies": {
|
27
27
|
"clickout-event": "^1.1.2",
|
28
28
|
"comand-component-library": "^4.1.63",
|
29
|
-
"comand-frontend-framework": "^4.1.
|
29
|
+
"comand-frontend-framework": "^4.1.28",
|
30
30
|
"comand-ui-iconfonts": "^1.0.14",
|
31
31
|
"core-js": "^3.20.1",
|
32
32
|
"prismjs": "^1.27.0",
|
package/src/ComponentLibrary.vue
CHANGED
@@ -507,10 +507,20 @@
|
|
507
507
|
:status="validationStatus"
|
508
508
|
:disabled="disabledStatus"
|
509
509
|
:selectData="fakeSelectCountriesData"
|
510
|
-
v-model="
|
510
|
+
v-model="selectedCountryWithFlag"
|
511
511
|
defaultOptionName="Select country:"
|
512
512
|
type="country"
|
513
513
|
/>
|
514
|
+
<CmdFormElement
|
515
|
+
labelText="Selectbox with all countries:"
|
516
|
+
element="select"
|
517
|
+
:status="validationStatus"
|
518
|
+
:disabled="disabledStatus"
|
519
|
+
:selectOptions="allCountriesData"
|
520
|
+
v-model="selectedCountry"
|
521
|
+
max-height="10rem"
|
522
|
+
defaultOptionName="Select country:"
|
523
|
+
/>
|
514
524
|
<CmdFakeSelect
|
515
525
|
labelText="Selectbox with colors:"
|
516
526
|
:status="validationStatus"
|
@@ -521,7 +531,7 @@
|
|
521
531
|
type="color"
|
522
532
|
/>
|
523
533
|
</div>
|
524
|
-
<!--
|
534
|
+
<!-- end FakeSelect -->
|
525
535
|
<hr/>
|
526
536
|
|
527
537
|
<!-- begin progress bar -->
|
@@ -2171,6 +2181,8 @@ import tableDataLarge from '@/assets/data/table-large.json'
|
|
2171
2181
|
import thumbnailScrollerImagesData from '@/assets/data/thumbnail-scroller-images.json'
|
2172
2182
|
import thumbnailScrollerTextData from '@/assets/data/thumbnail-scroller-text.json'
|
2173
2183
|
|
2184
|
+
import allCountriesData from '@/assets/data/all-countries.json'
|
2185
|
+
|
2174
2186
|
import packageJson from '../package.json'
|
2175
2187
|
|
2176
2188
|
import listOfComponents from "@/assets/data/listOfComponents.json"
|
@@ -2266,7 +2278,8 @@ export default {
|
|
2266
2278
|
showCmdLink: false,
|
2267
2279
|
selectedOption: "",
|
2268
2280
|
selectedOptions: [],
|
2269
|
-
selectedCountry: "
|
2281
|
+
selectedCountry: "us",
|
2282
|
+
selectedCountryWithFlag: "de",
|
2270
2283
|
selectedColor: "",
|
2271
2284
|
rangeValue: 50,
|
2272
2285
|
siteSearchFilters: {
|
@@ -2353,6 +2366,7 @@ export default {
|
|
2353
2366
|
tabsData,
|
2354
2367
|
thumbnailScrollerImagesData,
|
2355
2368
|
thumbnailScrollerTextData,
|
2369
|
+
allCountriesData,
|
2356
2370
|
packageJson
|
2357
2371
|
}
|
2358
2372
|
},
|
@@ -0,0 +1,197 @@
|
|
1
|
+
[
|
2
|
+
{ "text": "Afghanistan", "value": "af" },
|
3
|
+
{ "text": "Albania", "value": "al" },
|
4
|
+
{ "text": "Algeria", "value": "dz" },
|
5
|
+
{ "text": "Andorra", "value": "ad" },
|
6
|
+
{ "text": "Angola", "value": "ao" },
|
7
|
+
{ "text": "Antigua and Barbuda", "value": "ag" },
|
8
|
+
{ "text": "Argentina", "value": "ar" },
|
9
|
+
{ "text": "Armenia", "value": "am" },
|
10
|
+
{ "text": "Australia", "value": "au" },
|
11
|
+
{ "text": "Austria", "value": "at" },
|
12
|
+
{ "text": "Azerbaijan", "value": "az" },
|
13
|
+
{ "text": "Bahamas", "value": "bs" },
|
14
|
+
{ "text": "Bahrain", "value": "bh" },
|
15
|
+
{ "text": "Bangladesh", "value": "bd" },
|
16
|
+
{ "text": "Barbados", "value": "bb" },
|
17
|
+
{ "text": "Belarus", "value": "by" },
|
18
|
+
{ "text": "Belgium", "value": "be" },
|
19
|
+
{ "text": "Belize", "value": "bz" },
|
20
|
+
{ "text": "Benin", "value": "bj" },
|
21
|
+
{ "text": "Bhutan", "value": "bt" },
|
22
|
+
{ "text": "Bolivia", "value": "bo" },
|
23
|
+
{ "text": "Bosnia and Herzegovina", "value": "ba" },
|
24
|
+
{ "text": "Botswana", "value": "bw" },
|
25
|
+
{ "text": "Brazil", "value": "br" },
|
26
|
+
{ "text": "Brunei", "value": "bn" },
|
27
|
+
{ "text": "Bulgaria", "value": "bg" },
|
28
|
+
{ "text": "Burkina Faso", "value": "bf" },
|
29
|
+
{ "text": "Burundi", "value": "bi" },
|
30
|
+
{ "text": "Cabo Verde", "value": "cv" },
|
31
|
+
{ "text": "Cambodia", "value": "kh" },
|
32
|
+
{ "text": "Cameroon", "value": "cm" },
|
33
|
+
{ "text": "Canada", "value": "ca" },
|
34
|
+
{ "text": "Central African Republic", "value": "cf" },
|
35
|
+
{ "text": "Chad", "value": "td" },
|
36
|
+
{ "text": "Chile", "value": "cl" },
|
37
|
+
{ "text": "China", "value": "cn" },
|
38
|
+
{ "text": "Colombia", "value": "co" },
|
39
|
+
{ "text": "Comoros", "value": "km" },
|
40
|
+
{ "text": "Congo (Congo-Brazzaville)", "value": "cg" },
|
41
|
+
{ "text": "Costa Rica", "value": "cr" },
|
42
|
+
{ "text": "Croatia", "value": "hr" },
|
43
|
+
{ "text": "Cuba", "value": "cu" },
|
44
|
+
{ "text": "Cyprus", "value": "cy" },
|
45
|
+
{ "text": "Czechia", "value": "cz" },
|
46
|
+
{ "text": "Democratic Republic of the Congo", "value": "cd" },
|
47
|
+
{ "text": "Denmark", "value": "dk" },
|
48
|
+
{ "text": "Djibouti", "value": "dj" },
|
49
|
+
{ "text": "Dominica", "value": "dm" },
|
50
|
+
{ "text": "Dominican Republic", "value": "do" },
|
51
|
+
{ "text": "Ecuador", "value": "ec" },
|
52
|
+
{ "text": "Egypt", "value": "eg" },
|
53
|
+
{ "text": "El Salvador", "value": "sv" },
|
54
|
+
{ "text": "Equatorial Guinea", "value": "gq" },
|
55
|
+
{ "text": "Eritrea", "value": "er" },
|
56
|
+
{ "text": "Estonia", "value": "ee" },
|
57
|
+
{ "text": "Eswatini", "value": "sz" },
|
58
|
+
{ "text": "Ethiopia", "value": "et" },
|
59
|
+
{ "text": "Fiji", "value": "fj" },
|
60
|
+
{ "text": "Finland", "value": "fi" },
|
61
|
+
{ "text": "France", "value": "fr" },
|
62
|
+
{ "text": "Gabon", "value": "ga" },
|
63
|
+
{ "text": "Gambia", "value": "gm" },
|
64
|
+
{ "text": "Georgia", "value": "ge" },
|
65
|
+
{ "text": "Germany", "value": "de" },
|
66
|
+
{ "text": "Ghana", "value": "gh" },
|
67
|
+
{ "text": "Greece", "value": "gr" },
|
68
|
+
{ "text": "Grenada", "value": "gd" },
|
69
|
+
{ "text": "Guatemala", "value": "gt" },
|
70
|
+
{ "text": "Guinea", "value": "gn" },
|
71
|
+
{ "text": "Guinea-Bissau", "value": "gw" },
|
72
|
+
{ "text": "Guyana", "value": "gy" },
|
73
|
+
{ "text": "Haiti", "value": "ht" },
|
74
|
+
{ "text": "Honduras", "value": "hn" },
|
75
|
+
{ "text": "Hungary", "value": "hu" },
|
76
|
+
{ "text": "Iceland", "value": "is" },
|
77
|
+
{ "text": "India", "value": "in" },
|
78
|
+
{ "text": "Indonesia", "value": "id" },
|
79
|
+
{ "text": "Iran", "value": "ir" },
|
80
|
+
{ "text": "Iraq", "value": "iq" },
|
81
|
+
{ "text": "Ireland", "value": "ie" },
|
82
|
+
{ "text": "Israel", "value": "il" },
|
83
|
+
{ "text": "Italy", "value": "it" },
|
84
|
+
{ "text": "Jamaica", "value": "jm" },
|
85
|
+
{ "text": "Japan", "value": "jp" },
|
86
|
+
{ "text": "Jordan", "value": "jo" },
|
87
|
+
{ "text": "Kazakhstan", "value": "kz" },
|
88
|
+
{ "text": "Kenya", "value": "ke" },
|
89
|
+
{ "text": "Kiribati", "value": "ki" },
|
90
|
+
{ "text": "Kuwait", "value": "kw" },
|
91
|
+
{ "text": "Kyrgyzstan", "value": "kg" },
|
92
|
+
{ "text": "Laos", "value": "la" },
|
93
|
+
{ "text": "Latvia", "value": "lv" },
|
94
|
+
{ "text": "Lebanon", "value": "lb" },
|
95
|
+
{ "text": "Lesotho", "value": "ls" },
|
96
|
+
{ "text": "Liberia", "value": "lr" },
|
97
|
+
{ "text": "Libya", "value": "ly" },
|
98
|
+
{ "text": "Liechtenstein", "value": "li" },
|
99
|
+
{ "text": "Lithuania", "value": "lt" },
|
100
|
+
{ "text": "Luxembourg", "value": "lu" },
|
101
|
+
{ "text": "Madagascar", "value": "mg" },
|
102
|
+
{ "text": "Malawi", "value": "mw" },
|
103
|
+
{ "text": "Malaysia", "value": "my" },
|
104
|
+
{ "text": "Maldives", "value": "mv" },
|
105
|
+
{ "text": "Mali", "value": "ml" },
|
106
|
+
{ "text": "Malta", "value": "mt" },
|
107
|
+
{ "text": "Marshall Islands", "value": "mh" },
|
108
|
+
{ "text": "Mauritania", "value": "mr" },
|
109
|
+
{ "text": "Mauritius", "value": "mu" },
|
110
|
+
{ "text": "Mexico", "value": "mx" },
|
111
|
+
{ "text": "Micronesia", "value": "fm" },
|
112
|
+
{ "text": "Moldova", "value": "md" },
|
113
|
+
{ "text": "Monaco", "value": "mc" },
|
114
|
+
{ "text": "Mongolia", "value": "mn" },
|
115
|
+
{ "text": "Montenegro", "value": "me" },
|
116
|
+
{ "text": "Morocco", "value": "ma" },
|
117
|
+
{ "text": "Mozambique", "value": "mz" },
|
118
|
+
{ "text": "Myanmar", "value": "mm" },
|
119
|
+
{ "text": "Namibia", "value": "na" },
|
120
|
+
{ "text": "Nauru", "value": "nr" },
|
121
|
+
{ "text": "Nepal", "value": "np" },
|
122
|
+
{ "text": "Netherlands", "value": "nl" },
|
123
|
+
{ "text": "New Zealand", "value": "nz" },
|
124
|
+
{ "text": "Nicaragua", "value": "ni" },
|
125
|
+
{ "text": "Niger", "value": "ne" },
|
126
|
+
{ "text": "Nigeria", "value": "ng" },
|
127
|
+
{ "text": "North Korea", "value": "kp" },
|
128
|
+
{ "text": "North Macedonia", "value": "mk" },
|
129
|
+
{ "text": "Norway", "value": "no" },
|
130
|
+
{ "text": "Oman", "value": "om" },
|
131
|
+
{ "text": "Pakistan", "value": "pk" },
|
132
|
+
{ "text": "Palau", "value": "pw" },
|
133
|
+
{ "text": "Palestine", "value": "ps" },
|
134
|
+
{ "text": "Panama", "value": "pa" },
|
135
|
+
{ "text": "Papua New Guinea", "value": "pg" },
|
136
|
+
{ "text": "Paraguay", "value": "py" },
|
137
|
+
{ "text": "Peru", "value": "pe" },
|
138
|
+
{ "text": "Philippines", "value": "ph" },
|
139
|
+
{ "text": "Poland", "value": "pl" },
|
140
|
+
{ "text": "Portugal", "value": "pt" },
|
141
|
+
{ "text": "Qatar", "value": "qa" },
|
142
|
+
{ "text": "Romania", "value": "ro" },
|
143
|
+
{ "text": "Russia", "value": "ru" },
|
144
|
+
{ "text": "Rwanda", "value": "rw" },
|
145
|
+
{ "text": "Saint Kitts and Nevis", "value": "kn" },
|
146
|
+
{ "text": "Saint Lucia", "value": "lc" },
|
147
|
+
{ "text": "Saint Vincent and the Grenadines", "value": "vc" },
|
148
|
+
{ "text": "Samoa", "value": "ws" },
|
149
|
+
{ "text": "San Marino", "value": "sm" },
|
150
|
+
{ "text": "Sao Tome and Principe", "value": "st" },
|
151
|
+
{ "text": "Saudi Arabia", "value": "sa" },
|
152
|
+
{ "text": "Senegal", "value": "sn" },
|
153
|
+
{ "text": "Serbia", "value": "rs" },
|
154
|
+
{ "text": "Seychelles", "value": "sc" },
|
155
|
+
{ "text": "Sierra Leone", "value": "sl" },
|
156
|
+
{ "text": "Singapore", "value": "sg" },
|
157
|
+
{ "text": "Slovakia", "value": "sk" },
|
158
|
+
{ "text": "Slovenia", "value": "si" },
|
159
|
+
{ "text": "Solomon Islands", "value": "sb" },
|
160
|
+
{ "text": "Somalia", "value": "so" },
|
161
|
+
{ "text": "South Africa", "value": "za" },
|
162
|
+
{ "text": "South Korea", "value": "kr" },
|
163
|
+
{ "text": "South Sudan", "value": "ss" },
|
164
|
+
{ "text": "Spain", "value": "es" },
|
165
|
+
{ "text": "Sri Lanka", "value": "lk" },
|
166
|
+
{ "text": "Sudan", "value": "sd" },
|
167
|
+
{ "text": "Suriname", "value": "sr" },
|
168
|
+
{ "text": "Sweden", "value": "se" },
|
169
|
+
{ "text": "Switzerland", "value": "ch" },
|
170
|
+
{ "text": "Syria", "value": "sy" },
|
171
|
+
{ "text": "Taiwan", "value": "tw" },
|
172
|
+
{ "text": "Tajikistan", "value": "tj" },
|
173
|
+
{ "text": "Tanzania", "value": "tz" },
|
174
|
+
{ "text": "Thailand", "value": "th" },
|
175
|
+
{ "text": "Timor-Leste", "value": "tl" },
|
176
|
+
{ "text": "Togo", "value": "tg" },
|
177
|
+
{ "text": "Tonga", "value": "to" },
|
178
|
+
{ "text": "Trinidad and Tobago", "value": "tt" },
|
179
|
+
{ "text": "Tunisia", "value": "tn" },
|
180
|
+
{ "text": "Turkey", "value": "tr" },
|
181
|
+
{ "text": "Turkmenistan", "value": "tm" },
|
182
|
+
{ "text": "Tuvalu", "value": "tv" },
|
183
|
+
{ "text": "Uganda", "value": "ug" },
|
184
|
+
{ "text": "Ukraine", "value": "ua" },
|
185
|
+
{ "text": "United Arab Emirates", "value": "ae" },
|
186
|
+
{ "text": "United Kingdom", "value": "gb" },
|
187
|
+
{ "text": "United States", "value": "us" },
|
188
|
+
{ "text": "Uruguay", "value": "uy" },
|
189
|
+
{ "text": "Uzbekistan", "value": "uz" },
|
190
|
+
{ "text": "Vanuatu", "value": "vu" },
|
191
|
+
{ "text": "Vatican City", "value": "va" },
|
192
|
+
{ "text": "Venezuela", "value": "ve" },
|
193
|
+
{ "text": "Vietnam", "value": "vn" },
|
194
|
+
{ "text": "Yemen", "value": "ye" },
|
195
|
+
{ "text": "Zambia", "value": "zm" },
|
196
|
+
{ "text": "Zimbabwe", "value": "zw" }
|
197
|
+
]
|
package/src/utils/date.js
CHANGED
@@ -2,6 +2,20 @@ function currentDate(returnTime = false) {
|
|
2
2
|
return returnTime ? new Date().toISOString() : new Date().toISOString().split('T')[0];
|
3
3
|
}
|
4
4
|
|
5
|
+
function getDate(inputDate, operator = "+", days = 1) {
|
6
|
+
const date = new Date(inputDate)
|
7
|
+
|
8
|
+
if (operator === "+") {
|
9
|
+
date.setDate(date.getDate() + days);
|
10
|
+
} else if (operator === '-') {
|
11
|
+
date.setDate(date.getDate() - days);
|
12
|
+
} else {
|
13
|
+
throw new Error("function 'getDate' received invalid operator as parameter. Use '+' to add or '-' to subtract days.")
|
14
|
+
}
|
15
|
+
|
16
|
+
return date
|
17
|
+
}
|
18
|
+
|
5
19
|
function formatDate(inputDate, format = "dmy", separator=".") {
|
6
20
|
// Ensure the input is a valid date object or string
|
7
21
|
const date = new Date(inputDate);
|
@@ -11,8 +25,8 @@ function formatDate(inputDate, format = "dmy", separator=".") {
|
|
11
25
|
}
|
12
26
|
|
13
27
|
const year = date.getFullYear();
|
14
|
-
const month = String(date.getMonth() + 1).padStart(2, '0'); //
|
15
|
-
const day = String(date.getDate()).padStart(2, '0');
|
28
|
+
const month = String(date.getMonth() + 1).padStart(2, '0'); // months are zero-based
|
29
|
+
const day = String(date.getDate()).padStart(2, '0'); // days are zero-based
|
16
30
|
let dateFormated = ""
|
17
31
|
|
18
32
|
switch (format) {
|