renusify 1.0.3 → 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 (68) hide show
  1. package/LICENSE +1 -1
  2. package/components/app/index.vue +14 -14
  3. package/components/{notify → app/notify}/index.vue +1 -1
  4. package/components/{notify → app/notify}/notification.vue +0 -0
  5. package/components/{notify → app/notify}/notify.js +0 -0
  6. package/components/app/style.scss +0 -1
  7. package/components/{toast → app/toast}/index.vue +0 -0
  8. package/components/{toast → app/toast}/style.scss +1 -1
  9. package/components/{toast → app/toast}/toast.js +0 -0
  10. package/components/{toast → app/toast}/toast.vue +0 -0
  11. package/components/breadcrumb/bredcrumbItem.vue +11 -11
  12. package/components/breadcrumb/index.vue +6 -5
  13. package/components/button/buttonGroup.vue +0 -4
  14. package/components/button/index.vue +0 -2
  15. package/components/card/index.vue +0 -2
  16. package/components/chart/chart.vue +3 -0
  17. package/components/chat/MessageList.vue +0 -2
  18. package/components/chat/chatInput.vue +139 -135
  19. package/components/chat/chatMsg.vue +4 -4
  20. package/components/codeEditor/index.vue +412 -443
  21. package/components/codeEditor/run.vue +76 -80
  22. package/components/content/style.scss +0 -1
  23. package/components/form/address.vue +109 -109
  24. package/components/form/address_ir.vue +106 -0
  25. package/components/form/colorPicker/Alpha.vue +29 -45
  26. package/components/form/colorPicker/Hue.vue +32 -51
  27. package/components/form/colorPicker/Preview.vue +24 -28
  28. package/components/form/colorPicker/Saturation.vue +49 -69
  29. package/components/form/colorPicker/index.vue +53 -38
  30. package/components/form/colorPicker/mixin.js +6 -1
  31. package/components/form/colorPicker/picker.vue +80 -39
  32. package/components/form/group-input.vue +124 -106
  33. package/components/form/inputTel/index.vue +8 -10
  34. package/components/form/json/JsonView.vue +15 -11
  35. package/components/form/json/index.vue +29 -10
  36. package/components/form/mask-input.vue +0 -5
  37. package/components/form/number.vue +1 -1
  38. package/components/form/range.vue +0 -2
  39. package/components/form/select.vue +14 -14
  40. package/components/iframe/index.vue +60 -38
  41. package/components/index.js +189 -93
  42. package/components/infinite/div.vue +2 -3
  43. package/components/infinite/index.vue +0 -2
  44. package/components/infinite/page.vue +2 -3
  45. package/components/list/index.vue +0 -2
  46. package/components/menu/index.vue +160 -131
  47. package/components/modal/index.vue +85 -90
  48. package/components/modal/style.scss +0 -1
  49. package/components/searchBox/index.vue +0 -4
  50. package/components/slider/index.vue +0 -4
  51. package/components/swiper/index.vue +0 -4
  52. package/components/table/crud/index.vue +12 -13
  53. package/components/table/index.vue +0 -4
  54. package/directive/clickOutSide/index.js +2 -3
  55. package/directive/drag/index.js +1 -2
  56. package/directive/index.js +18 -19
  57. package/directive/intersect/index.js +3 -3
  58. package/directive/resize/index.js +3 -4
  59. package/directive/ripple/index.js +4 -6
  60. package/directive/scroll/index.js +3 -4
  61. package/directive/sortable/index.js +1 -2
  62. package/directive/title/index.js +2 -3
  63. package/directive/touch/index.js +32 -20
  64. package/index.js +11 -5
  65. package/package.json +1 -1
  66. package/plugins/trans/Translate.js +9 -14
  67. package/tools/helper.js +23 -0
  68. package/components/form/colorPicker/Box.vue +0 -85
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2021, smkoBa
3
+ Copyright (c) 2021, https://github.com/smkoBa/renusify
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
@@ -6,8 +6,8 @@
6
6
  'app-dark': isDark,
7
7
  'app-light': !isDark
8
8
  }" :id="id">
9
- <div class="app-wrap">
10
- <slot></slot>
9
+ <div class="app-wrap" :style="{'min-height':$r.breakpoint.height+'px'}">
10
+ <slot></slot>
11
11
  </div>
12
12
  <r-toast></r-toast>
13
13
  <r-notify v-if="notify" :left="notifyLeft" :top="notifyTop">
@@ -19,19 +19,19 @@
19
19
  </template>
20
20
 
21
21
  <script>
22
- import './style.scss'
23
- import RToast from '../toast/index.vue'
24
- import RNotify from '../notify/index.vue'
22
+ import './style.scss'
23
+ import RToast from './toast/index.vue'
24
+ import RNotify from './notify/index.vue'
25
25
 
26
- export default {
27
- name: 'r-app',
28
- components: {RToast,RNotify},
29
- props: {
30
- id: {
31
- type: [String, Number],
32
- default: 'renusify'
33
- },
34
- notify: Boolean,
26
+ export default {
27
+ name: 'r-app',
28
+ components: {RToast, RNotify},
29
+ props: {
30
+ id: {
31
+ type: [String, Number],
32
+ default: 'renusify'
33
+ },
34
+ notify: Boolean,
35
35
  notifyLeft: Boolean,
36
36
  notifyTop: Boolean,
37
37
  rtl: {type:Boolean,default: undefined},
@@ -126,7 +126,7 @@ export default {
126
126
  }
127
127
  </script>
128
128
  <style lang="scss" scoped>
129
- @import '../../style/include';
129
+ @import '../../../style/include';
130
130
 
131
131
  .#{$prefix}notify {
132
132
  display: flex;
File without changes
@@ -41,7 +41,6 @@
41
41
  backface-visibility: hidden;
42
42
  display: flex;
43
43
  flex-direction: column;
44
- min-height: 100vh;
45
44
  max-width: 100%;
46
45
  width: 100%;
47
46
  position: relative;
File without changes
@@ -1,4 +1,4 @@
1
- @import "../../style/include";
1
+ @import "../../../style/include";
2
2
 
3
3
  .#{$prefix}toast {
4
4
  max-width: 500px;
File without changes
File without changes
@@ -13,17 +13,17 @@
13
13
  import {roots} from '../../tools/rootable'
14
14
 
15
15
  export default {
16
- name: 'r-bredcrumbItem',
17
- mixins: [roots],
18
- props: {
19
- item: Object
20
- },
21
- computed: {
22
- att() {
23
- let res = {}
24
- if (this.href) {
25
- res['href'] = this.route.data.attrs.href
26
- }
16
+ name: 'rBreadcrumbItem',
17
+ mixins: [roots],
18
+ props: {
19
+ item: Object
20
+ },
21
+ computed: {
22
+ att() {
23
+ let res = {}
24
+ if (this.href) {
25
+ res['href'] = this.route.data.attrs.href
26
+ }
27
27
 
28
28
  if (this.target) {
29
29
  res['rel'] = 'noreferrer'
@@ -5,10 +5,10 @@
5
5
  :key="key"
6
6
  v-for="(item,key) in genItems">
7
7
 
8
- <r-breadcrumbs-item :href="item.href"
9
- :item="item"
10
- :to="item.to"
11
- @click="go(item)"></r-breadcrumbs-item>
8
+ <r-breadcrumb-item :href="item.href"
9
+ :item="item"
10
+ :to="item.to"
11
+ @click="go(item)"></r-breadcrumb-item>
12
12
  </li>
13
13
  </ul>
14
14
  </transition>
@@ -16,10 +16,11 @@
16
16
 
17
17
  <script>
18
18
  import './style.scss'
19
- import divider from "../container/divider";
19
+ import RBreadcrumbItem from "./bredcrumbItem";
20
20
 
21
21
  export default {
22
22
  name: 'r-breadcrumbs',
23
+ components: {RBreadcrumbItem},
23
24
  props: {
24
25
  sheet: {
25
26
  type: Boolean,
@@ -29,13 +29,9 @@
29
29
  </template>
30
30
 
31
31
  <script>
32
- import clickOutside from '../../directive/clickOutSide/index'
33
32
 
34
33
  export default {
35
34
  name: 'r-button-group',
36
- directives: {
37
- 'click-outside': clickOutside
38
- },
39
35
  props: {
40
36
  items: [Array, Object],
41
37
  icon: {
@@ -23,11 +23,9 @@
23
23
  <script>
24
24
  import './style.scss'
25
25
  import { roots } from '../../tools/rootable'
26
- import Ripple from '../../directive/ripple/index'
27
26
  export default {
28
27
  name: 'r-btn',
29
28
  mixins: [roots],
30
- directives: { ripple: Ripple },
31
29
  props: {
32
30
  tag: {
33
31
  type: String,
@@ -8,13 +8,11 @@
8
8
 
9
9
  <script>
10
10
  import {roots} from '../../tools/rootable';
11
- import Ripple from '../../directive/ripple/index';
12
11
  import './style.scss';
13
12
 
14
13
  export default {
15
14
  name: 'r-card',
16
15
  mixins: [roots],
17
- directives: {ripple: Ripple},
18
16
  props: {
19
17
  flat: Boolean,
20
18
  hover: Boolean,
@@ -23,6 +23,9 @@ export default {
23
23
  this.chartShape = new Chart(this.$refs.chart, this.options);
24
24
  this.chartShape.render()
25
25
  }
26
+ },
27
+ beforeUnmount() {
28
+ this.chartShape.destroy();
26
29
  }
27
30
  };
28
31
  </script>
@@ -14,11 +14,9 @@
14
14
  </template>
15
15
 
16
16
  <script>
17
- import Scroll from "renusify/directive/scroll";
18
17
  import RChatMsg from "./chatMsg";
19
18
 
20
19
  export default {
21
- directives: {'scroll': Scroll},
22
20
  components: {
23
21
  RChatMsg
24
22
  },
@@ -1,150 +1,154 @@
1
1
  <template>
2
- <div :class="{[$r.prefix+'chat-input']:true,'with-file':canFile}">
3
- <r-btn text icon>
4
- <r-icon v-html="$r.icons.sticker"></r-icon>
2
+ <div :class="{[$r.prefix+'chat-input']:true,'with-file':canFile}">
3
+ <r-btn text icon>
4
+ <r-icon v-html="$r.icons.sticker"></r-icon>
5
+ </r-btn>
6
+ <div class="chat-input"
7
+ ref="input"
8
+ contenteditable="true"
9
+ @input="updateText"
10
+ @keydown="updateKey"
11
+ @paste.prevent="updatePaste"
12
+ >
13
+ </div>
14
+ <div class="action-section d-flex h-end">
15
+ <template v-if="canFile">
16
+ <r-btn v-if="uploadPercentage===0||uploadPercentage===100" @click.prevent.stop="pickFile"
17
+ icon
18
+ text>
19
+ <r-icon v-html="$r.icons.attachment"></r-icon>
5
20
  </r-btn>
6
- <div class="chat-input"
7
- ref="input"
8
- contenteditable="true"
9
- @input="updateText"
10
- @keydown="updateKey"
11
- @paste.prevent="updatePaste"
12
- >
13
- </div>
14
- <div class="action-section d-flex h-end">
15
- <template v-if="canFile">
16
- <r-btn v-if="uploadPercentage===0||uploadPercentage===100" @click.prevent.stop="pickFile"
17
- icon
18
- text>
19
- <r-icon v-html="$r.icons.attachment"></r-icon>
20
- </r-btn>
21
- <r-progress-circular
22
- v-else
23
- @click.prevent="fileDelete()"
24
- :indeterminate=false
25
- :modelValue="uploadPercentage"
26
- :width="2"
27
- size="30"
28
- >
29
- <r-icon v-html="$r.icons.close"></r-icon>
30
- </r-progress-circular>
31
- </template>
32
- <r-btn class="color-success-text"
33
- :disabled="!text"
34
- @click="send"
35
- icon
36
- text>
37
- <r-icon v-html="$r.icons.send"></r-icon>
38
- </r-btn>
39
- <br>
40
- <span class="caption color-error-text" v-if="remain<30">{{remain}}</span>
41
- </div>
42
- <input accept="*"
43
- @change="addFile()"
44
- ref="file"
45
- style="display: none"
46
- type="file"
47
- v-if="showFile"
21
+ <r-progress-circular
22
+ v-else
23
+ @click.prevent="fileDelete()"
24
+ :indeterminate=false
25
+ :modelValue="uploadPercentage"
26
+ :width="2"
27
+ size="30"
48
28
  >
29
+ <r-icon v-html="$r.icons.close"></r-icon>
30
+ </r-progress-circular>
31
+ </template>
32
+ <r-btn class="color-success-text"
33
+ :disabled="!text"
34
+ @click.prevent="send"
35
+ icon
36
+ text>
37
+ <r-icon v-html="$r.icons.send"></r-icon>
38
+ </r-btn>
39
+ <br>
40
+ <span class="caption color-error-text" v-if="remain<30">{{ remain }}</span>
49
41
  </div>
42
+ <input accept="*"
43
+ @change="addFile()"
44
+ ref="file"
45
+ style="display: none"
46
+ type="file"
47
+ v-if="showFile"
48
+ >
49
+ </div>
50
50
  </template>
51
51
  <script>
52
- import file from "../form/fileUploader/file";
52
+ import file from "../form/fileUploader/file";
53
53
 
54
- export default {
55
- name: 'r-chat-input',
56
- mixins:[file],
57
- props: {
58
- maxLenMsg: {type: Number, default: 200},
59
- sendByEnter: Boolean,
60
- placeholder: {type: String, default: 'type here'},
61
- maxFileSize: Number,
62
- uploadLink: String,
63
- canFile: Boolean,
64
- },
65
- data() {
66
- return {
67
- text: '',
68
- showFile: true,
69
- }
70
- },
71
- computed: {
72
- remain() {
73
- return this.maxLenMsg - this.text.length
74
- }
75
- },
76
- methods: {
77
- updatePaste(e) {
78
- let text = this.$refs.input.innerText
79
- this.$refs.input.innerText = this.$helper.limiter(text + e.clipboardData.getData('Text'), this.maxLenMsg)
80
- this.updateText()
81
- },
82
- updateKey(e) {
83
- let text = this.$refs.input.innerText
54
+ export default {
55
+ name: 'r-chat-input',
56
+ mixins: [file],
57
+ props: {
58
+ maxLenMsg: {type: Number, default: 200},
59
+ sendByEnter: Boolean,
60
+ placeholder: {type: String, default: 'type here'},
61
+ maxFileSize: Number,
62
+ uploadLink: String,
63
+ canFile: Boolean,
64
+ },
65
+ data() {
66
+ return {
67
+ text: '',
68
+ showFile: true,
69
+ }
70
+ },
71
+ computed: {
72
+ remain() {
73
+ return this.maxLenMsg - this.text.length
74
+ }
75
+ },
76
+ methods: {
77
+ updatePaste(e) {
78
+ let text = this.$refs.input.innerText
79
+ this.$refs.input.innerText = this.$helper.limiter(text + e.clipboardData.getData('Text'), this.maxLenMsg)
80
+ this.updateText()
81
+ },
82
+ updateKey(e) {
83
+ let text = this.$refs.input.innerText
84
84
 
85
- if (e.keyCode === 13 && this.sendByEnter) {
86
- this.send()
87
- return
88
- }
89
- if (text.length >= this.maxLenMsg && e.keyCode !== 8 && e.keyCode !== 46) {
90
- e.preventDefault();
91
- }
92
- },
93
- updateText() {
94
- this.text = this.$refs.input.innerText
95
- this.$refs.input.scrollTop = this.$refs.input.scrollHeight
96
- },
97
- send() {
98
- if (this.text) {
99
- this.$emit('update:model-value', {type: "text",content: this.text})
100
- this.$refs.input.innerText = ''
101
- this.text = ''
102
- }
103
- },
104
- emit() {
105
- this.$emit('update:model-value', {type: "file",content: this.text,link:this.fileLink})
106
- this.$refs.input.innerText = ''
107
- this.text = ''
108
- }
109
- }
85
+ if (e.keyCode === 13 && this.sendByEnter) {
86
+ this.send()
87
+ return
88
+ }
89
+ if (text.length >= this.maxLenMsg && e.keyCode !== 8 && e.keyCode !== 46) {
90
+ e.preventDefault();
91
+ }
92
+ },
93
+ updateText() {
94
+ this.text = this.$refs.input.innerText
95
+ this.$refs.input.scrollTop = this.$refs.input.scrollHeight
96
+ },
97
+ send() {
98
+ if (this.text) {
99
+ this.$emit('update:model-value', {type: "text", content: this.text})
100
+ this.$refs.input.innerText = ''
101
+ this.text = ''
102
+ this.$refs.input.focus()
103
+ }
104
+ },
105
+ emit() {
106
+ this.$emit('update:model-value', {type: "file", content: this.text, link: this.fileLink})
107
+ this.$refs.input.innerText = ''
108
+ this.text = ''
110
109
  }
110
+ }
111
+ }
111
112
  </script>
112
113
  <style lang="scss">
113
- @import "../../style/include";
114
+ @import "../../style/include";
114
115
 
115
- .#{$prefix}chat-input {
116
- display: flex;
117
- @include light() {
118
- box-shadow: black 0px 8px 15px;
119
- background: var(--color-background-two-light);
120
- border-top:1px solid var(--color-border-light);
121
- }
122
- @include dark() {
123
- box-shadow: white 0px 8px 15px;
124
- background: var(--color-background-two-dark);
125
- border-top:1px solid var(--color-border-dark);
126
- }
116
+ .#{$prefix}chat-input {
117
+ display: flex;
118
+ @include light() {
119
+ box-shadow: black 0px 8px 15px;
120
+ background: var(--color-background-two-light);
121
+ border-top: 1px solid var(--color-border-light);
122
+ }
123
+ @include dark() {
124
+ box-shadow: white 0px 8px 15px;
125
+ background: var(--color-background-two-dark);
126
+ border-top: 1px solid var(--color-border-dark);
127
+ }
128
+
129
+ .chat-input {
130
+ margin: 5px 0;
131
+ resize: none;
132
+ outline: none;
133
+ line-height: 25px;
134
+ font-size: 14px;
135
+ max-height: 80px;
136
+ overflow-y: auto;
137
+ width: calc(100% - 40px);
138
+ }
139
+
140
+ .action-section {
141
+ width: 40px;
142
+ }
143
+
144
+ &.with-file {
145
+ .action-section {
146
+ width: 80px;
147
+ }
127
148
 
128
- .chat-input {
129
- margin: 5px 0;
130
- resize: none;
131
- outline: none;
132
- line-height: 25px;
133
- font-size: 14px;
134
- max-height: 80px;
135
- overflow-y: auto;
136
- width: calc(100% - 40px);
137
- }
138
- .action-section {
139
- width: 40px;
140
- }
141
- &.with-file{
142
- .action-section {
143
- width: 80px;
144
- }
145
- .chat-input{
146
- width: calc(100% - 80px);
147
- }
148
- }
149
+ .chat-input {
150
+ width: calc(100% - 80px);
149
151
  }
152
+ }
153
+ }
150
154
  </style>
@@ -42,12 +42,12 @@
42
42
  </div>
43
43
  </template>
44
44
  <script>
45
- import {Intersect} from '../../directive/intersect'
46
45
 
47
- export default {
46
+
47
+ export default {
48
48
  name: 'r-chat-msg',
49
- directives: {Intersect},
50
- props: {
49
+
50
+ props: {
51
51
  isMe: Boolean,
52
52
  user: {
53
53
  type: Object,