renusify 1.0.4 → 1.0.5
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/components/app/index.vue +14 -14
- package/components/{notify → app/notify}/index.vue +1 -1
- package/components/{notify → app/notify}/notification.vue +0 -0
- package/components/{notify → app/notify}/notify.js +0 -0
- package/components/app/style.scss +0 -1
- package/components/{toast → app/toast}/index.vue +0 -0
- package/components/{toast → app/toast}/style.scss +1 -1
- package/components/{toast → app/toast}/toast.js +0 -0
- package/components/{toast → app/toast}/toast.vue +0 -0
- package/components/breadcrumb/bredcrumbItem.vue +11 -11
- package/components/breadcrumb/index.vue +6 -5
- package/components/chart/chart.vue +3 -0
- package/components/chat/chatInput.vue +139 -135
- package/components/codeEditor/index.vue +412 -443
- package/components/codeEditor/run.vue +76 -80
- package/components/content/style.scss +0 -1
- package/components/form/address.vue +109 -109
- package/components/form/address_ir.vue +106 -0
- package/components/form/colorPicker/Alpha.vue +3 -0
- package/components/form/colorPicker/Preview.vue +3 -0
- package/components/form/group-input.vue +2 -1
- package/components/form/number.vue +1 -1
- package/components/iframe/index.vue +1 -1
- package/components/index.js +178 -88
- package/components/infinite/index.vue +0 -2
- package/components/menu/index.vue +159 -127
- package/components/modal/index.vue +85 -90
- package/components/modal/style.scss +0 -1
- package/components/table/crud/index.vue +12 -13
- package/directive/clickOutSide/index.js +2 -3
- package/directive/drag/index.js +1 -2
- package/directive/intersect/index.js +3 -3
- package/directive/resize/index.js +3 -4
- package/directive/ripple/index.js +4 -6
- package/directive/scroll/index.js +3 -4
- package/directive/sortable/index.js +1 -2
- package/directive/title/index.js +2 -3
- package/directive/touch/index.js +1 -2
- package/index.js +3 -4
- package/package.json +1 -1
- package/plugins/trans/Translate.js +9 -14
|
@@ -1,149 +1,181 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
<div :class="$r.prefix+'menu'" v-click-outside="close" ref="menu">
|
|
3
|
+
<div class="d-flex h-start flex-row v-center">
|
|
4
|
+
<span class="menu-label" v-if="label" @click.prevent="open">{{ label }}</span>
|
|
5
|
+
<transition name="fade" mode="out-in">
|
|
6
|
+
<!-- Header Navigation Menu Icons -->
|
|
7
|
+
<r-btn icon text v-if="show" key="on" @click.prevent="close">
|
|
8
|
+
<r-icon v-html="$r.icons.chevron_up"></r-icon>
|
|
9
|
+
</r-btn>
|
|
10
|
+
<r-btn icon text v-else key="off" @click.prevent="open">
|
|
11
|
+
<r-icon v-html="icon||$r.icons.chevron_down"></r-icon>
|
|
12
|
+
</r-btn>
|
|
13
|
+
|
|
14
|
+
</transition>
|
|
15
|
+
<div class="dropdown-menu mt-1"
|
|
16
|
+
v-if="show"
|
|
17
|
+
:style="{
|
|
18
18
|
'top':top+'px',
|
|
19
19
|
'left':left,
|
|
20
20
|
'right':right,
|
|
21
21
|
'opacity':opacity
|
|
22
22
|
}">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
<r-card>
|
|
24
|
+
<div class="dropdown-menu-item pa-2" v-for="(item,i) in list" :key="i"
|
|
25
|
+
:class="{'color-one-text':selected===item[value]}"
|
|
26
|
+
@click="emit(item)">
|
|
27
|
+
<slot :item="item">
|
|
28
|
+
{{ item }}
|
|
29
|
+
</slot>
|
|
30
|
+
</div>
|
|
31
|
+
</r-card>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
33
34
|
</div>
|
|
35
|
+
</div>
|
|
34
36
|
</template>
|
|
35
37
|
<script>
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.top = -20
|
|
65
|
-
if (!this.overlay) {
|
|
66
|
-
this.top += elm.height
|
|
67
|
-
}
|
|
68
|
-
this.opacity = 0
|
|
69
|
-
let n = 80
|
|
70
|
-
if (!this.$r.rtl) {
|
|
71
|
-
this.left = 0
|
|
72
|
-
} else {
|
|
73
|
-
this.right = 0
|
|
74
|
-
}
|
|
75
|
-
if (this.reverse) {
|
|
76
|
-
if (!this.$r.rtl) {
|
|
77
|
-
this.right = 0
|
|
78
|
-
} else {
|
|
79
|
-
this.left = 0
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
this.$emit('update:modelValue', true)
|
|
84
|
-
setTimeout(() => {
|
|
85
|
-
this.top = this.top + 20
|
|
86
|
-
this.opacity = 1
|
|
87
|
-
}, 10)
|
|
88
|
-
|
|
89
|
-
}, close() {
|
|
90
|
-
this.top = this.top - 20
|
|
91
|
-
this.opacity = 0
|
|
92
|
-
setTimeout(() => {
|
|
93
|
-
this.$emit('update:modelValue', false)
|
|
94
|
-
}, 200)
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
}
|
|
39
|
+
export default {
|
|
40
|
+
name: 'r-menu',
|
|
41
|
+
|
|
42
|
+
props: {
|
|
43
|
+
modelValue: {
|
|
44
|
+
type: [String, Number, Object]
|
|
45
|
+
},
|
|
46
|
+
label: String,
|
|
47
|
+
icon: {
|
|
48
|
+
type: String
|
|
49
|
+
},
|
|
50
|
+
value: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'value'
|
|
53
|
+
},
|
|
54
|
+
justValue: Boolean,
|
|
55
|
+
reverse: Boolean,
|
|
56
|
+
overlay: Boolean,
|
|
57
|
+
items: Array
|
|
58
|
+
},
|
|
59
|
+
data() {
|
|
60
|
+
return {
|
|
61
|
+
show: false,
|
|
62
|
+
top: null,
|
|
63
|
+
left: null,
|
|
64
|
+
right: null,
|
|
65
|
+
opacity: 0
|
|
98
66
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
67
|
+
},
|
|
68
|
+
computed: {
|
|
69
|
+
list() {
|
|
70
|
+
let r = []
|
|
71
|
+
if (this.items) {
|
|
72
|
+
this.items.forEach((item) => {
|
|
73
|
+
if (typeof item === 'object') {
|
|
74
|
+
r.push(item)
|
|
75
|
+
} else {
|
|
76
|
+
r.push({'name': item, [this.value]: item})
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
return r
|
|
81
|
+
},
|
|
82
|
+
selected() {
|
|
83
|
+
if (!this.modelValue) {
|
|
84
|
+
return null
|
|
85
|
+
}
|
|
86
|
+
return this.justValue ? this.modelValue : this.modelValue[this.value]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
methods: {
|
|
90
|
+
emit(item) {
|
|
91
|
+
this.$emit('update:modelValue', this.justValue ? item[this.value] : item)
|
|
92
|
+
this.close()
|
|
93
|
+
},
|
|
94
|
+
open() {
|
|
95
|
+
const elm = this.$refs.menu.getBoundingClientRect()
|
|
96
|
+
this.top = -20
|
|
97
|
+
if (!this.overlay) {
|
|
98
|
+
this.top += elm.height
|
|
99
|
+
}
|
|
100
|
+
this.opacity = 0
|
|
101
|
+
let n = 80
|
|
102
|
+
if (!this.$r.rtl) {
|
|
103
|
+
this.left = 0
|
|
104
|
+
} else {
|
|
105
|
+
this.right = 0
|
|
106
|
+
}
|
|
107
|
+
if (this.reverse) {
|
|
108
|
+
if (!this.$r.rtl) {
|
|
109
|
+
this.right = 0
|
|
110
|
+
} else {
|
|
111
|
+
this.left = 0
|
|
112
|
+
}
|
|
113
|
+
}
|
|
102
114
|
|
|
115
|
+
this.show = true
|
|
116
|
+
setTimeout(() => {
|
|
117
|
+
this.top = this.top + 20
|
|
118
|
+
this.opacity = 1
|
|
119
|
+
}, 10)
|
|
103
120
|
|
|
104
|
-
|
|
105
|
-
|
|
121
|
+
}, close() {
|
|
122
|
+
this.top = this.top - 20
|
|
123
|
+
this.opacity = 0
|
|
124
|
+
setTimeout(() => {
|
|
125
|
+
this.show = false
|
|
126
|
+
}, 200)
|
|
106
127
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
</script>
|
|
132
|
+
<style lang="scss">
|
|
133
|
+
@import "../../style/include";
|
|
110
134
|
|
|
111
|
-
&-item:hover {
|
|
112
|
-
background-color: var(--color-table-hover-light);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
@include dark() {
|
|
117
|
-
.dropdown-menu {
|
|
118
|
-
border: 1px solid var(--color-border-dark);
|
|
119
|
-
|
|
120
|
-
&-item:hover {
|
|
121
|
-
background-color: var(--color-table-hover-dark);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
135
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
136
|
+
.#{$prefix}menu {
|
|
137
|
+
position: relative;
|
|
129
138
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
position: absolute;
|
|
134
|
-
z-index: 10;
|
|
135
|
-
min-width: 150px;
|
|
136
|
-
max-height: 200px;
|
|
137
|
-
overflow-y: auto;
|
|
138
|
-
background-clip: padding-box;
|
|
139
|
-
border-radius: 4px;
|
|
140
|
-
|
|
141
|
-
&-item {
|
|
142
|
-
cursor: pointer;
|
|
143
|
-
}
|
|
139
|
+
@include light() {
|
|
140
|
+
.dropdown-menu {
|
|
141
|
+
border: 1px solid var(--color-border-light);
|
|
144
142
|
|
|
145
|
-
|
|
143
|
+
&-item:hover {
|
|
144
|
+
background-color: var(--color-table-hover-light);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
@include dark() {
|
|
149
|
+
.dropdown-menu {
|
|
150
|
+
border: 1px solid var(--color-border-dark);
|
|
151
|
+
|
|
152
|
+
&-item:hover {
|
|
153
|
+
background-color: var(--color-table-hover-dark);
|
|
154
|
+
}
|
|
146
155
|
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.menu-label {
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.dropdown-menu {
|
|
163
|
+
scroll-behavior: smooth;
|
|
164
|
+
transition: all .3s ease;
|
|
165
|
+
position: absolute;
|
|
166
|
+
z-index: 10;
|
|
167
|
+
min-width: 150px;
|
|
168
|
+
max-height: 200px;
|
|
169
|
+
overflow-y: auto;
|
|
170
|
+
background-clip: padding-box;
|
|
171
|
+
border-radius: 4px;
|
|
172
|
+
|
|
173
|
+
&-item {
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
}
|
|
147
179
|
|
|
148
180
|
|
|
149
181
|
</style>
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<teleport :to="`.${$r.prefix}app`">
|
|
3
|
+
<transition :name="animate">
|
|
4
|
+
<div v-bind="$attrs" :class="{
|
|
5
|
+
[`${$r.prefix}modal`]:true,
|
|
6
|
+
'h-end': bottom,
|
|
7
|
+
'modal-no-overlay': noOverlay,
|
|
8
|
+
'animate-modal-vibrate': run_animate,
|
|
9
|
+
}" :style="{'height':$r.breakpoint.height+'px'}" @click.self="close"
|
|
10
|
+
v-if="modelValue">
|
|
11
|
+
<div class="modal-container" :style="{'max-width':maxWidth,'max-height':maxHeight}" :class="{
|
|
6
12
|
'modal-bottom':bottom,
|
|
7
13
|
[color]:color,
|
|
8
14
|
['animate-modal-' +animate]:animate,
|
|
@@ -12,97 +18,86 @@
|
|
|
12
18
|
'modal-flat':flat
|
|
13
19
|
|
|
14
20
|
}">
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
<div class="modal-btn text-end">
|
|
22
|
+
<r-btn class="color-error-text"
|
|
23
|
+
text
|
|
24
|
+
@click.prevent="close(true)"
|
|
25
|
+
fab
|
|
26
|
+
size="small"
|
|
27
|
+
v-if="closebtn">
|
|
28
|
+
<r-icon v-html="$r.icons.close"></r-icon>
|
|
29
|
+
</r-btn>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="modal-content">
|
|
32
|
+
<slot></slot>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</transition>
|
|
37
|
+
</teleport>
|
|
32
38
|
</template>
|
|
33
39
|
|
|
34
40
|
<script>
|
|
35
|
-
|
|
41
|
+
import './style.scss'
|
|
36
42
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
export default {
|
|
44
|
+
name: 'r-modal',
|
|
45
|
+
inheritAttrs: false,
|
|
46
|
+
props: {
|
|
47
|
+
modelValue: Boolean,
|
|
48
|
+
bottom: Boolean,
|
|
49
|
+
noOverlay: Boolean,
|
|
50
|
+
fullWidth: Boolean,
|
|
51
|
+
fullHeight: Boolean,
|
|
52
|
+
maxWidth: String,
|
|
53
|
+
maxHeight: String,
|
|
54
|
+
minWidth: {type: Boolean, default: true},
|
|
55
|
+
flat: Boolean,
|
|
56
|
+
closable: Boolean,
|
|
57
|
+
closebtn: {type: Boolean, default: true},
|
|
58
|
+
color: String,
|
|
59
|
+
animate: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'slide-up'
|
|
62
|
+
}
|
|
57
63
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
computed: {
|
|
82
|
-
classes() {
|
|
83
|
-
let a = {
|
|
84
|
-
'h-end': this.bottom,
|
|
85
|
-
'modal-no-overlay': this.noOverlay,
|
|
86
|
-
'animate-modal-vibrate': this.run_animate,
|
|
87
|
-
}
|
|
88
|
-
a[`${this.$r.prefix}modal`]=true
|
|
89
|
-
return a
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
methods: {
|
|
93
|
-
close(force = false) {
|
|
94
|
-
if (this.closable || force === true) {
|
|
95
|
-
this.$emit('update:modelValue', !this.modelValue)
|
|
96
|
-
} else {
|
|
97
|
-
this.run_animate = true
|
|
98
|
-
setTimeout(() => {
|
|
99
|
-
this.run_animate = false
|
|
100
|
-
}, 300)
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
beforeUnmount() {
|
|
105
|
-
document.documentElement.style.overflow = null
|
|
64
|
+
},
|
|
65
|
+
data() {
|
|
66
|
+
return {
|
|
67
|
+
state: null,
|
|
68
|
+
run_animate: false
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
watch: {
|
|
72
|
+
modelValue: {
|
|
73
|
+
// immediate: true, watch at created component
|
|
74
|
+
handler: function (newVal, oldVal) {
|
|
75
|
+
if (newVal === true) {
|
|
76
|
+
document.documentElement.style.overflow = 'hidden'
|
|
77
|
+
const that = this
|
|
78
|
+
window.onpopstate = function (event) {
|
|
79
|
+
that.$emit('update:modelValue', false)
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
document.documentElement.style.overflow = null
|
|
106
83
|
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
close(force = false) {
|
|
89
|
+
if (this.closable || force === true) {
|
|
90
|
+
this.$emit('update:modelValue', !this.modelValue)
|
|
91
|
+
} else {
|
|
92
|
+
this.run_animate = true
|
|
93
|
+
setTimeout(() => {
|
|
94
|
+
this.run_animate = false
|
|
95
|
+
}, 300)
|
|
96
|
+
}
|
|
107
97
|
}
|
|
98
|
+
},
|
|
99
|
+
beforeUnmount() {
|
|
100
|
+
document.documentElement.style.overflow = null
|
|
101
|
+
}
|
|
102
|
+
}
|
|
108
103
|
</script>
|
|
@@ -157,21 +157,20 @@
|
|
|
157
157
|
<script>
|
|
158
158
|
import ManageFooter from "./footer";
|
|
159
159
|
import ManageHeader from "./header";
|
|
160
|
-
import RDivider from "../../container/divider";
|
|
161
160
|
|
|
162
161
|
export default {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
162
|
+
name: 'r-table-crud',
|
|
163
|
+
components: {ManageHeader, ManageFooter},
|
|
164
|
+
props: {
|
|
165
|
+
link: {
|
|
166
|
+
required: true,
|
|
167
|
+
type: String
|
|
168
|
+
},
|
|
169
|
+
actions: {
|
|
170
|
+
default: function () {
|
|
171
|
+
return []
|
|
172
|
+
},
|
|
173
|
+
type: Array
|
|
175
174
|
},
|
|
176
175
|
cast: {
|
|
177
176
|
default: function () {
|
package/directive/drag/index.js
CHANGED
|
@@ -230,10 +230,8 @@ function update (el, binding) {
|
|
|
230
230
|
updateRipple(el, binding, wasEnabled)
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
export
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
233
|
+
export default {
|
|
234
|
+
mounted,
|
|
235
|
+
unmounted,
|
|
236
|
+
update
|
|
237
237
|
}
|
|
238
|
-
export default Index
|
|
239
|
-
// # sourceMappingURL=index.js.map
|
package/directive/title/index.js
CHANGED
package/directive/touch/index.js
CHANGED
package/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import Translate from './plugins/trans/Translate';
|
|
|
4
4
|
import Storage from './plugins/storage/index';
|
|
5
5
|
import DateTime from './plugins/trans/DateTime';
|
|
6
6
|
import Currency from './plugins/trans/Currency';
|
|
7
|
-
import Notify from './components/notify/notify.js';
|
|
7
|
+
import Notify from './components/app/notify/notify.js';
|
|
8
8
|
import valid from './plugins/validation/Validate';
|
|
9
|
-
import Toast from './components/toast/toast.js';
|
|
9
|
+
import Toast from './components/app/toast/toast.js';
|
|
10
10
|
import event from './plugins/event';
|
|
11
11
|
import {register} from './components';
|
|
12
12
|
import {registers} from './directive';
|
|
@@ -114,8 +114,7 @@ export default {
|
|
|
114
114
|
app.config.globalProperties.$v = (names) => valid.checkType(names)
|
|
115
115
|
|
|
116
116
|
// install components
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
let required_directive = register(app, options['components'] || []);
|
|
119
118
|
if (options['directives']) {
|
|
120
119
|
options['directives'].forEach((i) => {
|
|
121
120
|
if (!required_directive.includes(i)) {
|