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.
Files changed (41) hide show
  1. package/components/app/index.vue +14 -14
  2. package/components/{notify → app/notify}/index.vue +1 -1
  3. package/components/{notify → app/notify}/notification.vue +0 -0
  4. package/components/{notify → app/notify}/notify.js +0 -0
  5. package/components/app/style.scss +0 -1
  6. package/components/{toast → app/toast}/index.vue +0 -0
  7. package/components/{toast → app/toast}/style.scss +1 -1
  8. package/components/{toast → app/toast}/toast.js +0 -0
  9. package/components/{toast → app/toast}/toast.vue +0 -0
  10. package/components/breadcrumb/bredcrumbItem.vue +11 -11
  11. package/components/breadcrumb/index.vue +6 -5
  12. package/components/chart/chart.vue +3 -0
  13. package/components/chat/chatInput.vue +139 -135
  14. package/components/codeEditor/index.vue +412 -443
  15. package/components/codeEditor/run.vue +76 -80
  16. package/components/content/style.scss +0 -1
  17. package/components/form/address.vue +109 -109
  18. package/components/form/address_ir.vue +106 -0
  19. package/components/form/colorPicker/Alpha.vue +3 -0
  20. package/components/form/colorPicker/Preview.vue +3 -0
  21. package/components/form/group-input.vue +2 -1
  22. package/components/form/number.vue +1 -1
  23. package/components/iframe/index.vue +1 -1
  24. package/components/index.js +178 -88
  25. package/components/infinite/index.vue +0 -2
  26. package/components/menu/index.vue +159 -127
  27. package/components/modal/index.vue +85 -90
  28. package/components/modal/style.scss +0 -1
  29. package/components/table/crud/index.vue +12 -13
  30. package/directive/clickOutSide/index.js +2 -3
  31. package/directive/drag/index.js +1 -2
  32. package/directive/intersect/index.js +3 -3
  33. package/directive/resize/index.js +3 -4
  34. package/directive/ripple/index.js +4 -6
  35. package/directive/scroll/index.js +3 -4
  36. package/directive/sortable/index.js +1 -2
  37. package/directive/title/index.js +2 -3
  38. package/directive/touch/index.js +1 -2
  39. package/index.js +3 -4
  40. package/package.json +1 -1
  41. package/plugins/trans/Translate.js +9 -14
@@ -1,149 +1,181 @@
1
1
  <template>
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="modelValue" key="on" @click.prevent="close">
8
- <r-icon v-html="$r.icons.close"></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.menu_dot"></r-icon>
12
- </r-btn>
13
-
14
- </transition>
15
- <div class="dropdown-menu mt-1"
16
- v-if="modelValue"
17
- :style="{
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
- <r-card>
24
- <div class="dropdown-menu-item pa-2" v-for="(item,i) in list" :key="i">
25
- <slot :item="item">
26
- {{ item }}
27
- </slot>
28
- </div>
29
- </r-card>
30
- </div>
31
-
32
- </div>
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
- export default {
38
- name: 'r-menu',
39
-
40
- props: {
41
- modelValue: {
42
- type: Boolean,
43
- default: false
44
- },
45
- label: String,
46
- icon: {
47
- type: String
48
- },
49
- reverse: Boolean,
50
- overlay: Boolean,
51
- list: [Array, Object]
52
- },
53
- data() {
54
- return {
55
- top: null,
56
- left: null,
57
- right: null,
58
- opacity: 0
59
- }
60
- },
61
- methods: {
62
- open() {
63
- const elm = this.$refs.menu.getBoundingClientRect()
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
- </script>
100
- <style lang="scss">
101
- @import "../../style/include";
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
- .#{$prefix}menu {
105
- position: relative;
121
+ }, close() {
122
+ this.top = this.top - 20
123
+ this.opacity = 0
124
+ setTimeout(() => {
125
+ this.show = false
126
+ }, 200)
106
127
 
107
- @include light() {
108
- .dropdown-menu {
109
- border: 1px solid var(--color-border-light);
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
- .menu-label {
127
- cursor: pointer;
128
- }
136
+ .#{$prefix}menu {
137
+ position: relative;
129
138
 
130
- .dropdown-menu {
131
- scroll-behavior: smooth;
132
- transition: all .3s ease;
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
- <teleport :to="`.${$r.prefix}app`">
3
- <transition :name="animate">
4
- <div v-bind="$attrs" :class="classes" @click.self="close" v-if="modelValue">
5
- <div class="modal-container" :style="{'max-width':maxWidth,'max-height':maxHeight}" :class="{
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
- <div class="modal-btn text-end">
16
- <r-btn class="color-error-text"
17
- text
18
- @click.prevent="close(true)"
19
- fab
20
- size="small"
21
- v-if="closebtn">
22
- <r-icon v-html="$r.icons.close"></r-icon>
23
- </r-btn>
24
- </div>
25
- <div class="modal-content">
26
- <slot></slot>
27
- </div>
28
- </div>
29
- </div>
30
- </transition>
31
- </teleport>
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
- import './style.scss'
41
+ import './style.scss'
36
42
 
37
- export default {
38
- name: 'r-modal',
39
- inheritAttrs: false,
40
- props: {
41
- modelValue: Boolean,
42
- bottom: Boolean,
43
- noOverlay: Boolean,
44
- fullWidth: Boolean,
45
- fullHeight: Boolean,
46
- maxWidth: String,
47
- maxHeight: String,
48
- minWidth: {type: Boolean, default: true},
49
- flat: Boolean,
50
- closable: Boolean,
51
- closebtn: {type: Boolean, default: true},
52
- color: String,
53
- animate: {
54
- type: String,
55
- default: 'slide-up'
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
- data() {
60
- return {
61
- state: null,
62
- run_animate: false
63
- }
64
- },
65
- watch: {
66
- modelValue: {
67
- // immediate: true, watch at created component
68
- handler: function (newVal, oldVal) {
69
- if (newVal === true) {
70
- document.documentElement.style.overflow = 'hidden'
71
- const that = this
72
- window.onpopstate = function (event) {
73
- that.$emit('update:modelValue', false)
74
- }
75
- } else {
76
- document.documentElement.style.overflow = null
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>
@@ -11,7 +11,6 @@
11
11
  z-index: map_get($z-index, 'important');
12
12
  outline: none;
13
13
  bottom: 0;
14
- height: 100vh;
15
14
 
16
15
  @include light() {
17
16
  &:not(.modal-no-overlay) {
@@ -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
- name: 'r-table-crud',
164
- components: {RDivider, ManageHeader, ManageFooter},
165
- props: {
166
- link: {
167
- required: true,
168
- type: String
169
- },
170
- actions: {
171
- default: function () {
172
- return []
173
- },
174
- type: Array
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 () {
@@ -40,8 +40,7 @@ function unmounted(el, binding) {
40
40
  delete el['click_outside']
41
41
  }
42
42
 
43
- export const clickOutside = {
43
+ export default {
44
44
  mounted,
45
45
  unmounted
46
- }
47
- export default clickOutside
46
+ }
@@ -105,8 +105,7 @@ function unmounted(el, binding) {
105
105
  delete el.eventsHandler
106
106
  }
107
107
 
108
- export const Drag = {
108
+ export default {
109
109
  mounted,
110
110
  unmounted
111
111
  }
112
- export default Drag
@@ -37,7 +37,7 @@ function unmounted (el) {
37
37
  delete el._observe
38
38
  }
39
39
 
40
- export const Intersect = {
41
- mounted,
42
- unmounted
40
+ export default {
41
+ mounted,
42
+ unmounted
43
43
  }
@@ -24,8 +24,7 @@ function unmounted (el) {
24
24
  delete el._onResize
25
25
  }
26
26
 
27
- export const Resize = {
28
- mounted,
29
- unmounted
27
+ export default {
28
+ mounted,
29
+ unmounted
30
30
  }
31
- export default Resize
@@ -230,10 +230,8 @@ function update (el, binding) {
230
230
  updateRipple(el, binding, wasEnabled)
231
231
  }
232
232
 
233
- export const Index = {
234
- mounted,
235
- unmounted,
236
- update
233
+ export default {
234
+ mounted,
235
+ unmounted,
236
+ update
237
237
  }
238
- export default Index
239
- // # sourceMappingURL=index.js.map
@@ -24,8 +24,7 @@ function unmounted (el) {
24
24
  delete el._onScroll
25
25
  }
26
26
 
27
- export const Scroll = {
28
- mounted,
29
- unmounted
27
+ export default {
28
+ mounted,
29
+ unmounted
30
30
  }
31
- export default Scroll
@@ -202,9 +202,8 @@ function updated(el, binding) {
202
202
  mounted(el, binding)
203
203
  }
204
204
 
205
- export const Sortable = {
205
+ export default {
206
206
  mounted,
207
207
  updated,
208
208
  unmounted
209
209
  }
210
- export default Sortable
@@ -119,9 +119,8 @@ function unmounted(el, binding) {
119
119
  }
120
120
 
121
121
 
122
- export const Title = {
122
+ export default {
123
123
  mounted,
124
124
  updated,
125
125
  unmounted
126
- }
127
- export default Title
126
+ }
@@ -177,8 +177,7 @@ function unmounted(el, binding) {
177
177
  delete el.eventsHandler
178
178
  }
179
179
 
180
- export const Touch = {
180
+ export default {
181
181
  mounted,
182
182
  unmounted
183
183
  }
184
- export default Touch
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
- const required_directive = register(app, options['components'] || []);
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)) {