renusify 1.0.5 → 1.0.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.
Files changed (53) hide show
  1. package/components/app/index.vue +23 -32
  2. package/components/app/style.scss +7 -18
  3. package/components/bar/bottomNavigationCircle.vue +75 -81
  4. package/components/bar/scss/bottomNav.scss +4 -13
  5. package/components/bar/scss/toolbar.scss +4 -9
  6. package/components/breadcrumb/style.scss +3 -9
  7. package/components/button/buttonConfirm.vue +44 -0
  8. package/components/button/style.scss +13 -38
  9. package/components/calendar/index.vue +5 -35
  10. package/components/card/style.scss +8 -17
  11. package/components/chat/chatInput.vue +4 -10
  12. package/components/chat/chatMsg.vue +222 -225
  13. package/components/chat/index.vue +104 -109
  14. package/components/chip/style.scss +27 -33
  15. package/components/codeEditor/index.vue +29 -15
  16. package/components/codeEditor/run.vue +1 -1
  17. package/components/container/style.scss +9 -11
  18. package/components/form/camInput.vue +1 -1
  19. package/components/form/checkbox.vue +115 -121
  20. package/components/form/colorPicker/picker.vue +9 -24
  21. package/components/form/datePicker/index.vue +9 -42
  22. package/components/form/fileUploader/single.vue +196 -197
  23. package/components/form/inputTel/index.vue +3 -7
  24. package/components/form/radioInput.vue +3 -9
  25. package/components/form/scss/input.scss +4 -29
  26. package/components/form/scss/rating.scss +1 -6
  27. package/components/form/scss/switch.scss +1 -6
  28. package/components/form/text-editor/style.scss +4 -22
  29. package/components/form/timepicker/timepicker.vue +11 -16
  30. package/components/form/unit-input.vue +98 -101
  31. package/components/icon/style.scss +2 -6
  32. package/components/index.js +2 -0
  33. package/components/infinite/index.vue +1 -1
  34. package/components/list/style.scss +2 -16
  35. package/components/map/route.vue +1 -1
  36. package/components/menu/index.vue +24 -19
  37. package/components/modal/style.scss +3 -12
  38. package/components/progress/style.scss +5 -21
  39. package/components/skeleton/index.vue +77 -0
  40. package/components/swiper/index.vue +8 -4
  41. package/components/table/style.scss +19 -111
  42. package/components/tabs/index.vue +116 -130
  43. package/components/timeline/index.vue +13 -18
  44. package/components/tree/index.vue +11 -15
  45. package/index.js +1 -2
  46. package/package.json +1 -1
  47. package/plugins/trans/Translate.js +4 -0
  48. package/style/app.scss +7 -71
  49. package/style/colors.scss +49 -73
  50. package/style/mixins/index.scss +0 -12
  51. package/style/variables/color.scss +8 -9
  52. package/tools/helper.js +15 -1
  53. package/components/skeletonLoader/index.vue +0 -42
@@ -1,119 +1,114 @@
1
1
  <template>
2
- <div :class="$r.prefix+'chat'">
3
- <div class="chat-header" v-if="title">{{title}}</div>
4
- <message-list ref="msgList" @see="$emit('see', $event)" :messages="msgs" :myself="myself"
5
- :participants="participants"
6
- :newMsg="newMsg"
7
- :hideBottomBtn="hideBottomBtn"
8
- >
9
- </message-list>
10
- <r-chat-input v-if="!hideSend"
11
- @update:model-value="onMsgSubmit"
12
- :send-by-enter="sendByEnter"
13
- :maxLenMsg="maxLenMsg"
14
- :placeholder="placeholder"
15
- :uploadLink="uploadLink"
16
- :maxFileSize="maxFileSize"
17
- :canFile="canFile"
18
- ></r-chat-input>
19
- </div>
2
+ <div :class="$r.prefix+'chat'">
3
+ <div class="chat-header" v-if="title">{{ title }}</div>
4
+ <message-list ref="msgList" @see="$emit('see', $event)" :messages="msgs" :myself="myself"
5
+ :participants="participants"
6
+ :newMsg="newMsg"
7
+ :hideBottomBtn="hideBottomBtn"
8
+ >
9
+ </message-list>
10
+ <r-chat-input v-if="!hideSend"
11
+ @update:model-value="onMsgSubmit"
12
+ :send-by-enter="sendByEnter"
13
+ :maxLenMsg="maxLenMsg"
14
+ :placeholder="placeholder"
15
+ :uploadLink="uploadLink"
16
+ :maxFileSize="maxFileSize"
17
+ :canFile="canFile"
18
+ ></r-chat-input>
19
+ </div>
20
20
  </template>
21
21
  <script>
22
- import MessageList from "./MessageList";
23
- import RChatInput from "./chatInput";
22
+ import MessageList from "./MessageList";
23
+ import RChatInput from "./chatInput";
24
24
 
25
- export default {
26
- name: 'r-chat',
27
- components: {RChatInput, MessageList},
28
- props: {
29
- sendByEnter: Boolean,
30
- placeholder: {type: String, default: 'type here'},
31
- hideBottomBtn: Boolean,
32
- hideSend: Boolean,
33
- maxLenMsg: {type: Number, default: 200},
34
- newMsg: {
35
- type: Object, default: () => {
36
- return {
37
- num: 0,
38
- first_id: null
39
- }
40
- }
41
- },
42
- participants: {
43
- type: Object,
44
- required: true
45
- },
46
- messages: {
47
- type: Array,
48
- required: true
49
- },
50
- myself: {
51
- type: Object,
52
- required: true
53
- },
54
- title: String,
55
- canFile: Boolean,
56
- maxFileSize: {type:Number,default:1024*1024},
57
- uploadLink: {
58
- type: String,
59
- default:'/storage/chat'
60
- },
61
- },
62
- data() {
63
- return {
64
- timeout_id: null
65
- }
66
- },
67
- computed: {
68
- msgs() {
69
- let res = []
70
- this.messages.forEach((msg, i) => {
71
- let m = Object.assign({}, msg)
72
- delete m.user_id
73
- if (res[res.length - 1] && msg.user_id === res[res.length - 1].user_id) {
74
- res[res.length - 1]['list'].push(m)
75
- } else {
76
- res.push({
77
- '_id': i,
78
- 'user_id': msg.user_id,
79
- 'list': [m]
80
- })
81
- }
82
- })
83
- return res
84
- }
85
- },
86
- methods: {
87
- onMsgSubmit: function (message) {
88
- let d=message
89
- d.id= this.$helper.uniqueId(16)
90
- d.created_at= new Date()
25
+ export default {
26
+ name: 'r-chat',
27
+ components: {RChatInput, MessageList},
28
+ props: {
29
+ sendByEnter: Boolean,
30
+ placeholder: {type: String, default: 'type here'},
31
+ hideBottomBtn: Boolean,
32
+ hideSend: Boolean,
33
+ maxLenMsg: {type: Number, default: 200},
34
+ newMsg: {
35
+ type: Object, default: () => {
36
+ return {
37
+ num: 0,
38
+ first_id: null
39
+ }
40
+ }
41
+ },
42
+ participants: {
43
+ type: Object,
44
+ required: true
45
+ },
46
+ messages: {
47
+ type: Array,
48
+ required: true
49
+ },
50
+ myself: {
51
+ type: Object,
52
+ required: true
53
+ },
54
+ title: String,
55
+ canFile: Boolean,
56
+ maxFileSize: {type: Number, default: 1024 * 1024},
57
+ uploadLink: {
58
+ type: String,
59
+ default: '/storage/chat'
60
+ },
61
+ },
62
+ data() {
63
+ return {
64
+ timeout_id: null
65
+ }
66
+ },
67
+ computed: {
68
+ msgs() {
69
+ let res = []
70
+ this.messages.forEach((msg, i) => {
71
+ let m = Object.assign({}, msg)
72
+ delete m.user_id
73
+ if (res[res.length - 1] && msg.user_id === res[res.length - 1].user_id) {
74
+ res[res.length - 1]['list'].push(m)
75
+ } else {
76
+ res.push({
77
+ '_id': i,
78
+ 'user_id': msg.user_id,
79
+ 'list': [m]
80
+ })
81
+ }
82
+ })
83
+ return res
84
+ }
85
+ },
86
+ methods: {
87
+ onMsgSubmit: function (message) {
88
+ let d = message
89
+ d.id = this.$helper.uniqueId(16)
90
+ d.created_at = new Date()
91
91
 
92
- this.$emit("msg-submit", d)
93
- clearTimeout(this.timeout_id)
94
- this.timeout_id = setTimeout(() => {
95
- this.$refs.msgList.goToBottom()
96
- }, 100)
97
- }
98
- },
92
+ this.$emit("msg-submit", d)
93
+ clearTimeout(this.timeout_id)
94
+ this.timeout_id = setTimeout(() => {
95
+ this.$refs.msgList.goToBottom()
96
+ }, 100)
99
97
  }
98
+ },
99
+ }
100
100
  </script>
101
101
  <style lang="scss">
102
- @import "../../style/include";
102
+ @import "../../style/include";
103
103
 
104
- .#{$prefix}chat {
105
- position: relative;
106
- display: flex;
107
- width: 100%;
108
- height: 100%;
109
- flex-direction: column;
110
- align-items: stretch;
111
- overflow: hidden;
112
- @include light() {
113
- background: var(--color-background-two-light);
114
- }
115
- @include dark() {
116
- background: var(--color-background-two-dark);
117
- }
118
- }
104
+ .#{$prefix}chat {
105
+ position: relative;
106
+ display: flex;
107
+ width: 100%;
108
+ height: 100%;
109
+ flex-direction: column;
110
+ align-items: stretch;
111
+ overflow: hidden;
112
+ background: var(--color-background-two);
113
+ }
119
114
  </style>
@@ -1,4 +1,5 @@
1
1
  @import "renusify/style/_include.scss";
2
+
2
3
  $chip-avatar-size: 24px !default;
3
4
  $chip-close-size: 18px !default;
4
5
  $chip-icon-margin-after: 8px !default;
@@ -16,26 +17,26 @@ $chip-transition-duration: 0.28s !default;
16
17
  $chip-transition-fn: map-get($transition, 'fast-out-slow-in') !default;
17
18
  $icon-outlined-border-width: thin !default;
18
19
  $icon-sizes: (
19
- 'x-small': (
20
- 'font-size': 10,
21
- 'height': 16
22
- ),
23
- 'small': (
24
- 'font-size': 12,
25
- 'height': 24
26
- ),
27
- 'default': (
28
- 'font-size': 14,
29
- 'height': 32
30
- ),
31
- 'large': (
32
- 'font-size': 16,
33
- 'height': 54
34
- ),
35
- 'x-large': (
36
- 'font-size': 18,
37
- 'height': 66
38
- )
20
+ 'x-small': (
21
+ 'font-size': 10,
22
+ 'height': 16
23
+ ),
24
+ 'small': (
25
+ 'font-size': 12,
26
+ 'height': 24
27
+ ),
28
+ 'default': (
29
+ 'font-size': 14,
30
+ 'height': 32
31
+ ),
32
+ 'large': (
33
+ 'font-size': 16,
34
+ 'height': 54
35
+ ),
36
+ 'x-large': (
37
+ 'font-size': 18,
38
+ 'height': 66
39
+ )
39
40
  ) !default;
40
41
 
41
42
 
@@ -53,19 +54,12 @@ $icon-sizes: (
53
54
  transition-timing-function: $chip-transition-fn;
54
55
  vertical-align: middle;
55
56
 
56
- @include light() {
57
- border-color: var(--color-divider-light);
58
- color:var(--color-text-primary-light);
59
- &:not(.chip-active) {
60
- background:var(--color-chips-light);
61
- }
62
- }
63
- @include dark() {
64
- border-color: var(--color-divider-dark);
65
- color:var(--color-text-primary-dark);
66
- &:not(.chip-active) {
67
- background:var(--color-chips-dark);
68
- }
57
+
58
+ border-color: var(--color-divider);
59
+ color: var(--color-text-primary);
60
+
61
+ &:not(.chip-active) {
62
+ background: #e0e0e0;
69
63
  }
70
64
 
71
65
  @include states();
@@ -62,11 +62,11 @@ export default {
62
62
  }
63
63
  },
64
64
  mounted() {
65
- this.get_code('codeSlot', this.runnable)
65
+ this.get_code('codeSlot')
66
66
  },
67
67
  beforeUpdate() {
68
68
  if (this.show === 'code' && !this.edited) {
69
- this.get_code('codeSlot', this.runnable)
69
+ this.get_code('codeSlot')
70
70
  }
71
71
  },
72
72
  methods: {
@@ -190,14 +190,25 @@ export default {
190
190
  let temp = this.code.querySelector('.code-template')
191
191
 
192
192
  if (temp && temp.childNodes.length > 0) {
193
- this.template = this.toHTML(temp.childNodes[0].nodeValue).children[0]
193
+ for (let i = 0; i < temp.childNodes.length; i++) {
194
+ if (temp.childNodes[i].nodeName === "#comment") {
195
+ this.template = this.toHTML(temp.childNodes[i].nodeValue).children[0]
196
+ break
197
+ }
198
+ }
194
199
  }
195
200
 
196
201
  let script = this.code.querySelector('.code-script')
197
202
  if (script && script.childNodes.length > 0) {
198
- this.script = script.childNodes[0].nodeValue
203
+ for (let i = 0; i < script.childNodes.length; i++) {
204
+ if (script.childNodes[i].nodeName === "#comment") {
205
+ this.script = script.childNodes[i].nodeValue
206
+ break
207
+ }
208
+ }
199
209
  }
200
210
 
211
+
201
212
  if (this.template || this.script) {
202
213
  this.$refs.codeViewTemplate.innerHTML = this.buildHtml(this.template)
203
214
  this.$refs.codeViewScript.innerHTML = this.buildScript(this.script)
@@ -341,6 +352,8 @@ export default {
341
352
  res = this.$helper.replacer(res, ' let ', ' <span class="color-orange code-editor-span">let</span> ')
342
353
  res = this.$helper.replacer(res, ' const ', ' <span class="color-orange code-editor-span">const</span> ')
343
354
  res = this.$helper.replacer(res, ' return ', ' <span class="color-orange code-editor-span">return</span> ')
355
+ res = this.$helper.replacer(res, ' true', ' <span class="color-orange code-editor-span">true</span>')
356
+ res = this.$helper.replacer(res, ' false', ' <span class="color-orange code-editor-span">false</span>')
344
357
  res = this.$helper.replacer(res, ' this.', ' <span class="color-orange code-editor-span">this</span>.')
345
358
 
346
359
  return res
@@ -378,30 +391,31 @@ export default {
378
391
  @import "../../style/include";
379
392
 
380
393
  .#{$prefix}code-editor {
394
+ direction: ltr;
395
+ text-align: left;
381
396
  position: relative;
382
397
  white-space: break-spaces;
383
- caret-color: white !important;
398
+ caret-color: white;
399
+ background-color: #15212e;
400
+ color: #fff;
401
+ padding: 10px;
384
402
 
385
403
  .code-script, .code-template {
386
- padding: 10px;
387
- }
388
-
389
- .code-action {
390
- color: #ffffff;
391
- background: #283739;
404
+ padding: 0 20px;
392
405
  }
393
406
 
394
407
  .code-wrapper {
395
408
  direction: ltr;
396
409
  text-align: left;
397
- background: #283739;
398
- color: #ffffff;
399
410
  padding: 10px;
400
411
  }
401
412
 
402
413
  .code-compile {
403
- border: 1px solid #444444;
414
+ background-color: #fafafa;
404
415
  min-height: 300px;
416
+ padding: 10px;
417
+ margin: 0 -10px -10px -10px;
418
+ color: black;
405
419
  }
406
420
 
407
421
  .color-func {
@@ -438,4 +452,4 @@ export default {
438
452
  color: #898d8c;
439
453
  }
440
454
  }
441
- </style>
455
+ </style>
@@ -12,7 +12,7 @@ export default {
12
12
  },
13
13
  methods: {
14
14
  strToObj2(str) {
15
- str = this.$helper.replacer(str, ' ', '')
15
+ str = str.trim()
16
16
  str = this.$helper.replacer(str, "\n", '')
17
17
  str = this.$helper.replacer(str, "\r", '')
18
18
  let open = 0
@@ -1,4 +1,5 @@
1
1
  @import "renusify/style/_include.scss";
2
+
2
3
  .#{$prefix}container {
3
4
  max-width: 100%;
4
5
  padding: $container-padding-x;
@@ -32,11 +33,11 @@
32
33
  }
33
34
 
34
35
  &-dense {
35
- margin-right: div($form-grid-gutter , -2);
36
- margin-left: div($form-grid-gutter ,-2) ;
36
+ margin-right: div($form-grid-gutter, -2);
37
+ margin-left: div($form-grid-gutter, -2);
37
38
 
38
39
  .col {
39
- padding:div($form-grid-gutter , 2) !important;
40
+ padding: div($form-grid-gutter, 2) !important;
40
41
  }
41
42
  }
42
43
  }
@@ -68,18 +69,15 @@ $divider-inset-margin: 72px !default;
68
69
  height: 0px;
69
70
  max-height: 0px;
70
71
  transition: inherit;
71
- @include dark(){
72
- border-top: solid thin var(--color-divider-dark)
73
- }
74
- @include light(){
75
- border-top: solid thin var(--color-divider-light)
76
- }
72
+
73
+ border-top: solid thin var(--color-divider);
74
+
77
75
  &.divider-inset:not(.divider-vertical) {
78
76
  max-width: calc(100% - #{$divider-inset-margin});
79
77
 
80
- margin-left: $divider-inset-margin;
78
+ margin-left: $divider-inset-margin;
81
79
 
82
- margin-right: $divider-inset-margin;
80
+ margin-right: $divider-inset-margin;
83
81
 
84
82
  }
85
83
 
@@ -344,7 +344,7 @@ export default {
344
344
 
345
345
  .#{$prefix}cam-input {
346
346
  video {
347
- border: 1px solid var(--color-border-light);
347
+ border: 1px solid var(--color-border);
348
348
  }
349
349
 
350
350
  .self-view {