toggle-components-library 1.36.1-beta.6 → 1.36.1-beta.8
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/dist/toggle-components-library.common.js +94 -209
- package/dist/toggle-components-library.common.js.map +1 -1
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +94 -209
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +1 -1
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/forms/ToggleDatePicker.vue +3 -7
- package/src/components/forms/ToggleInputCurrency.vue +3 -8
- package/src/components/tables/ToggleTable.vue +6 -6
- package/src/index.js +0 -3
- package/src/sass/includes/_as_inputs.scss +0 -5
- package/src/sass/main.scss +0 -1
- package/src/components/statusbar/ToggleStatusBar.vue +0 -73
- package/src/sass/includes/_as_statusbar.scss +0 -179
package/package.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<label class="toggle-input-label">{{label}}</label>
|
|
7
7
|
|
|
8
8
|
<div class="toggle-date-input-container">
|
|
9
|
-
<div
|
|
10
|
-
<input type="text" class="toggle-input" :name="name"
|
|
9
|
+
<div class="toggle-date-input-calendar-icon">
|
|
10
|
+
<input type="text" class="toggle-input" :name="name" ref="date-input" :id="'toggle-date-input'+_uid" :value="date" v-on:keypress="$event.preventDefault()">
|
|
11
11
|
</div>
|
|
12
12
|
<button type="button" class="toggle-clear" v-on:click="clearDate" v-if="displayValue"></button>
|
|
13
13
|
</div>
|
|
@@ -101,11 +101,7 @@ export default {
|
|
|
101
101
|
maxLength:{
|
|
102
102
|
type: Number,
|
|
103
103
|
required:false
|
|
104
|
-
}
|
|
105
|
-
disabled: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
default: false
|
|
108
|
-
},
|
|
104
|
+
}
|
|
109
105
|
},
|
|
110
106
|
|
|
111
107
|
created : function(){
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
<div class="toggle-input-container" :class="{'toggle-input-is-invalid':isInvalid
|
|
6
|
+
<div class="toggle-input-container" :class="{'toggle-input-is-invalid':isInvalid }" v-on:click="focusClosestInput">
|
|
7
7
|
<label
|
|
8
8
|
v-if="label"
|
|
9
9
|
:for="name ? name : 'InputText' "
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
:placeholder="placeholder ? placeholder : '' "
|
|
17
17
|
:autocomplete="autocomplete ? 'on' : 'off' "
|
|
18
18
|
:required="required"
|
|
19
|
-
:disabled="disabled"
|
|
20
19
|
v-model="inputVal"
|
|
21
20
|
@blur="isInputActive = false"
|
|
22
21
|
@focus="isInputActive = true"
|
|
@@ -92,12 +91,8 @@ export default {
|
|
|
92
91
|
currencyDenomination: {
|
|
93
92
|
type: Number,
|
|
94
93
|
default: 100
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
type: Boolean,
|
|
98
|
-
required: false,
|
|
99
|
-
default: false
|
|
100
|
-
},
|
|
94
|
+
}
|
|
95
|
+
|
|
101
96
|
},
|
|
102
97
|
|
|
103
98
|
created : function(){
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
@input="searchChange()"
|
|
37
37
|
/>
|
|
38
38
|
<ToggleDateRangePicker
|
|
39
|
-
v-if="field.type === '
|
|
40
|
-
name="
|
|
39
|
+
v-if="field.type === 'date' && (searchModels[field.key].start || searchModels[field.key].end || editingInput === field.key)"
|
|
40
|
+
name="date"
|
|
41
41
|
v-model="searchModels[field.key]"
|
|
42
42
|
@input="searchChange()"
|
|
43
43
|
/>
|
|
@@ -149,7 +149,7 @@ export default {
|
|
|
149
149
|
if(this.fields){
|
|
150
150
|
|
|
151
151
|
for (let i = 0; i < this.fields.length; i++) {
|
|
152
|
-
let value = this.fields[i].type == '
|
|
152
|
+
let value = this.fields[i].type == 'date' ? this.setInitialDate(i) : (this.fields[i].value ?? '');
|
|
153
153
|
|
|
154
154
|
let field_name = this.fields[i].key;
|
|
155
155
|
this.$set( this.searchModels, field_name, value )
|
|
@@ -197,7 +197,7 @@ export default {
|
|
|
197
197
|
|
|
198
198
|
tableSearchActive(field)
|
|
199
199
|
{
|
|
200
|
-
if(field.type === '
|
|
200
|
+
if(field.type === 'date'){
|
|
201
201
|
return (this.searchModels[field.key].start || this.searchModels[field.key].end || this.editingInput === field.key);
|
|
202
202
|
}
|
|
203
203
|
return (this.searchModels[field.key] || this.editingInput === field.key);
|
|
@@ -217,13 +217,13 @@ export default {
|
|
|
217
217
|
closeSearch(field){
|
|
218
218
|
|
|
219
219
|
this.editingInput = false;
|
|
220
|
-
this.searchModels[field.key] = field.type === '
|
|
220
|
+
this.searchModels[field.key] = field.type === 'date' ? { start: false, end: false} : '' ;
|
|
221
221
|
|
|
222
222
|
// check if any search is active; if not, close/shrink header
|
|
223
223
|
let is_active = false;
|
|
224
224
|
for(const key in this.searchModels){
|
|
225
225
|
|
|
226
|
-
if(this.getSearchModelTypeFromKey(key) === '
|
|
226
|
+
if(this.getSearchModelTypeFromKey(key) === 'date'){
|
|
227
227
|
if (this.searchModels[key].start || this.searchModels[key].end){
|
|
228
228
|
is_active = true;
|
|
229
229
|
break;
|
package/src/index.js
CHANGED
|
@@ -83,8 +83,6 @@ import ToggleMetricFunnelChart from "./components/metrics/ToggleMetricFunnelChar
|
|
|
83
83
|
import ToggleThreeDots from "./components/threedots/ToggleThreeDots.vue";
|
|
84
84
|
import ToggleThreeDotsButton from "./components/threedots/ToggleThreeDotsButton.vue";
|
|
85
85
|
|
|
86
|
-
import ToggleStatusBar from "./components/statusbar/ToggleStatusBar.vue";
|
|
87
|
-
|
|
88
86
|
import ToggleCarousel from "./components/carousel/ToggleCarousel.vue";
|
|
89
87
|
import ToggleCarouselSlide from "./components/carousel/ToggleCarouselSlide.vue";
|
|
90
88
|
|
|
@@ -160,7 +158,6 @@ const Components = {
|
|
|
160
158
|
ToggleBoosterBasicButton,
|
|
161
159
|
ToggleBoosterModal,
|
|
162
160
|
ToggleContactSearch,
|
|
163
|
-
ToggleStatusBar,
|
|
164
161
|
ToggleCarousel,
|
|
165
162
|
ToggleCarouselSlide,
|
|
166
163
|
ToggleEmailCard,
|
package/src/sass/main.scss
CHANGED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="['toggle-status-bar-container', statusColours, statusSize]">
|
|
3
|
-
<label class="toggle-status-bar-label">
|
|
4
|
-
<span class="toggle-status-bar-dot blinking" v-if="showDot">●</span>
|
|
5
|
-
{{ statusName }}
|
|
6
|
-
</label>
|
|
7
|
-
|
|
8
|
-
<div class="toggle-status-bar-tooltip-container" v-if="showToolTip && toolTipText.length">
|
|
9
|
-
<div class="toggle-status-bar-tooltip">
|
|
10
|
-
?
|
|
11
|
-
<span class="toggle-status-bar-tooltip-text">{{ toolTipText }}</span>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
export default {
|
|
19
|
-
name: 'StatusBar',
|
|
20
|
-
props: {
|
|
21
|
-
status: {
|
|
22
|
-
type: String,
|
|
23
|
-
required: true,
|
|
24
|
-
validator: function (value) {
|
|
25
|
-
return ['draft', 'processing', 'complete', 'inactive', 'active', 'submitted', 'failed'].indexOf(value) !== -1;
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
size: {
|
|
29
|
-
type: String,
|
|
30
|
-
required: false,
|
|
31
|
-
validator: function (value) {
|
|
32
|
-
return ['small'].indexOf(value) !== -1;
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
toolTipOptions: {
|
|
36
|
-
type: Object,
|
|
37
|
-
required: false
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
computed: {
|
|
41
|
-
// Capitalise the first letter of the status
|
|
42
|
-
statusName() {
|
|
43
|
-
return this.status.charAt(0).toUpperCase() + this.status.slice(1);
|
|
44
|
-
},
|
|
45
|
-
// Add the status to the class name
|
|
46
|
-
statusColours() {
|
|
47
|
-
return 'toggle-status-bar-' + this.status;
|
|
48
|
-
},
|
|
49
|
-
// Add the size to the class name
|
|
50
|
-
statusSize() {
|
|
51
|
-
return 'toggle-status-bar-' + this.size;
|
|
52
|
-
},
|
|
53
|
-
// Show the dot if the status is active or processing
|
|
54
|
-
showDot() {
|
|
55
|
-
return this.status === 'active' || this.status === 'processing' || this.status === 'submitted';
|
|
56
|
-
},
|
|
57
|
-
showToolTip() {
|
|
58
|
-
return this.size !== 'small';
|
|
59
|
-
},
|
|
60
|
-
toolTipText() {
|
|
61
|
-
if (!this.toolTipOptions) {
|
|
62
|
-
return '';
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (this.toolTipOptions[this.status]) {
|
|
66
|
-
return this.toolTipOptions[this.status];
|
|
67
|
-
} else {
|
|
68
|
-
return '';
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
.toggle-status-bar-container {
|
|
2
|
-
font-family: $toggle-font-family;
|
|
3
|
-
font-size: 16px !important;
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
height: 50px;
|
|
8
|
-
width: 100%;
|
|
9
|
-
border-radius: 7px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.toggle-status-bar-small {
|
|
13
|
-
height: 35px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Tooltip
|
|
17
|
-
.toggle-status-bar-tooltip-container{
|
|
18
|
-
position: absolute;
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: right;
|
|
21
|
-
width: 100%;
|
|
22
|
-
right: 32px;
|
|
23
|
-
cursor: default;
|
|
24
|
-
|
|
25
|
-
.toggle-status-bar-tooltip {
|
|
26
|
-
position: relative;
|
|
27
|
-
display: inline-block;
|
|
28
|
-
width: 20px;
|
|
29
|
-
text-align: center;
|
|
30
|
-
border: 1px solid hotpink;
|
|
31
|
-
border-radius: 50px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Tooltip text
|
|
35
|
-
.toggle-status-bar-tooltip .toggle-status-bar-tooltip-text {
|
|
36
|
-
visibility: hidden;
|
|
37
|
-
width: 200px;
|
|
38
|
-
background-color: rgba(0, 0, 0, .8);
|
|
39
|
-
color: #fff;
|
|
40
|
-
text-align: center;
|
|
41
|
-
padding: 10px;
|
|
42
|
-
border-radius: 6px;
|
|
43
|
-
position: absolute;
|
|
44
|
-
z-index: 1;
|
|
45
|
-
top: -5px;
|
|
46
|
-
right: 105%;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.toggle-status-bar-tooltip:hover .toggle-status-bar-tooltip-text {
|
|
50
|
-
visibility: visible;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// Draft colours
|
|
56
|
-
.toggle-status-bar-draft {
|
|
57
|
-
background-color: #FFB88D;
|
|
58
|
-
|
|
59
|
-
.toggle-status-bar-label {
|
|
60
|
-
color: #A34308;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.toggle-status-bar-tooltip {
|
|
64
|
-
color: #A34308;
|
|
65
|
-
border: 1px solid #A34308;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Processing colours
|
|
70
|
-
.toggle-status-bar-processing {
|
|
71
|
-
background-color: #D7E9F2;
|
|
72
|
-
|
|
73
|
-
.toggle-status-bar-label {
|
|
74
|
-
color: #269BE3;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.toggle-status-bar-tooltip {
|
|
78
|
-
color: #269BE3;
|
|
79
|
-
border: 1px solid #269BE3;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Complete colours
|
|
84
|
-
.toggle-status-bar-complete {
|
|
85
|
-
background-color: #B3E49F;
|
|
86
|
-
|
|
87
|
-
.toggle-status-bar-label {
|
|
88
|
-
color: #3BB40B;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.toggle-status-bar-tooltip {
|
|
92
|
-
color: #3BB40B;
|
|
93
|
-
border: 1px solid #3BB40B;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Inactive colours
|
|
98
|
-
.toggle-status-bar-inactive {
|
|
99
|
-
background-color: #D7E9F2;
|
|
100
|
-
|
|
101
|
-
.toggle-status-bar-label {
|
|
102
|
-
color: #269BE3;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.toggle-status-bar-tooltip {
|
|
106
|
-
color: #269BE3;
|
|
107
|
-
border: 1px solid #269BE3;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Active colours
|
|
112
|
-
.toggle-status-bar-active {
|
|
113
|
-
background-color: #D7E9F2;
|
|
114
|
-
border: 1px solid #FF4848;
|
|
115
|
-
|
|
116
|
-
.toggle-status-bar-label {
|
|
117
|
-
color: #FF4848;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.toggle-status-bar-tooltip {
|
|
121
|
-
color: #FF4848;
|
|
122
|
-
border: 1px solid #FF4848;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// Submitted colours
|
|
127
|
-
.toggle-status-bar-submitted {
|
|
128
|
-
background-color: #D7E9F2;
|
|
129
|
-
|
|
130
|
-
.toggle-status-bar-label {
|
|
131
|
-
color: #269BE3;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.toggle-status-bar-tooltip {
|
|
135
|
-
color: #269BE3;
|
|
136
|
-
border: 1px solid #269BE3;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Failed colours
|
|
142
|
-
.toggle-status-bar-failed {
|
|
143
|
-
background-color: #F2E3E3;
|
|
144
|
-
border: 1px solid #ED7B7C;
|
|
145
|
-
|
|
146
|
-
.toggle-status-bar-label {
|
|
147
|
-
color: #ED7B7C;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.toggle-status-bar-tooltip {
|
|
151
|
-
color: #ED7B7C;
|
|
152
|
-
border: 1px solid #ED7B7C;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.toggle-status-bar-dot {
|
|
157
|
-
font-size: 20px;
|
|
158
|
-
margin: 0 3px 0 0;
|
|
159
|
-
float: none !important;
|
|
160
|
-
padding: 0 !important;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Dot blinking animation
|
|
164
|
-
|
|
165
|
-
.blinking {
|
|
166
|
-
animation: 2s blink ease infinite;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@keyframes blink {
|
|
170
|
-
|
|
171
|
-
from,
|
|
172
|
-
to {
|
|
173
|
-
opacity: 0;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
50% {
|
|
177
|
-
opacity: 1;
|
|
178
|
-
}
|
|
179
|
-
}
|