renusify 1.4.3 → 1.4.7

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 +1 -10
  2. package/components/chip/style.scss +0 -1
  3. package/components/codeEditor/highlightHtml.vue +8 -2
  4. package/components/codeEditor/index.vue +13 -55
  5. package/components/codeEditor/mixin.js +18 -4
  6. package/components/form/camInput.vue +6 -2
  7. package/components/form/input.vue +2 -2
  8. package/components/form/inputTel/assets/flags.png +0 -0
  9. package/components/form/inputTel/assets/flags@2x.png +0 -0
  10. package/components/form/mask-input.vue +2 -2
  11. package/components/form/select.vue +1 -1
  12. package/components/form/text-area.vue +1 -2
  13. package/components/form/text-editor/index.vue +0 -1
  14. package/components/form/timepicker/index.vue +18 -16
  15. package/components/form/unit-input.vue +1 -0
  16. package/components/formCreator/index.vue +7 -20
  17. package/components/index.js +1 -1
  18. package/components/infinite/index.vue +9 -6
  19. package/components/map/images/destination.png +0 -0
  20. package/components/map/images/layers.png +0 -0
  21. package/components/map/images/marker-icon.png +0 -0
  22. package/components/map/images/origin.png +0 -0
  23. package/components/map/images/point.png +0 -0
  24. package/components/map/index.vue +52 -20
  25. package/components/map/leaflet.css +511 -397
  26. package/components/map/route.vue +570 -560
  27. package/components/map/select.vue +64 -48
  28. package/components/message/index.vue +22 -21
  29. package/components/modal/index.vue +20 -7
  30. package/components/modal/style.scss +17 -14
  31. package/components/{app/notify → notify}/index.vue +21 -29
  32. package/components/{app/notify → notify}/notification.vue +10 -10
  33. package/components/notify/notify.js +27 -0
  34. package/components/searchBox/index.vue +30 -12
  35. package/components/slider/index.vue +1 -0
  36. package/components/table/crud/header.vue +55 -34
  37. package/components/table/crud/index.vue +4 -4
  38. package/components/table/index.vue +366 -367
  39. package/components/table/style.scss +1 -4
  40. package/components/tabs/index.vue +9 -23
  41. package/components/timeAgo/index.vue +4 -1
  42. package/components/tour/index.vue +237 -222
  43. package/components/tree/index.vue +135 -136
  44. package/components/tree/tree-element.vue +17 -3
  45. package/directive/index.js +1 -2
  46. package/directive/mask/index.js +1 -4
  47. package/directive/skeleton/index.js +27 -0
  48. package/directive/skeleton/style.scss +37 -0
  49. package/index.js +14 -9
  50. package/package.json +1 -1
  51. package/style/transitions.scss +6 -116
  52. package/tools/helper.js +20 -0
  53. package/components/app/notify/notify.js +0 -28
@@ -247,7 +247,7 @@ $data-table-regular-header-height: 38px !default;
247
247
  }
248
248
 
249
249
  .table-row-enter-active, .table-row-leave-active {
250
- transition: height .3s ease-in-out;
250
+ transition: height .3s linear;
251
251
  line-height: 0;
252
252
  }
253
253
 
@@ -265,9 +265,6 @@ $data-table-regular-header-height: 38px !default;
265
265
  line-height: 0;
266
266
  overflow: hidden;
267
267
 
268
- > * {
269
- height: 0;
270
- }
271
268
  }
272
269
  }
273
270
 
@@ -13,18 +13,18 @@
13
13
  'tabs-hidden':$r.breakpoint.width>960
14
14
  }]" class="tabs-wrap" ref="tabs">
15
15
  <button
16
+ v-for="tab in items"
17
+ :key="tab.title"
18
+ :ref="tab.value.toString()"
16
19
  :class="[
17
20
  { 'tabs__item_active' : tab.value === modelValue,
18
21
  [tabActiveClass]:tab.value === modelValue },
19
22
  tabClass,
20
23
  ]"
21
24
  :disabled="tab.disabled || false"
22
- :key="tab.title"
23
- :ref="tab.value.toString()"
24
- @click="handleClick(tab.value)"
25
25
  class="tabs__item"
26
26
  type="button"
27
- v-for="tab in items"
27
+ @click="handleClick(tab.value)"
28
28
  >
29
29
  <slot :item="tab">{{ tab.title }}</slot>
30
30
  </button>
@@ -72,12 +72,9 @@ export default {
72
72
  type: String,
73
73
  required: false
74
74
  },
75
- autoScrollToView: {
76
- type: Boolean,
77
- default: true
78
- }
75
+ autoScrollToView: Boolean
79
76
  },
80
- emits:['update:modelValue'],
77
+ emits: ['update:modelValue'],
81
78
  data() {
82
79
  return {
83
80
  disableLeft: true,
@@ -89,7 +86,9 @@ export default {
89
86
  mounted() {
90
87
  setTimeout(() => {
91
88
  this.offset()
92
- this.moveActiveLine(this.modelValue.toString())
89
+ if (this.modelValue) {
90
+ this.moveActiveLine(this.modelValue.toString())
91
+ }
93
92
  }, 100)
94
93
  },
95
94
  watch: {
@@ -163,19 +162,6 @@ $btnTabsWidth: 50px;
163
162
  display: flex;
164
163
  flex-direction: row;
165
164
 
166
- .tabs__item {
167
- color: var(--color-text-secondary);
168
-
169
- &_active {
170
- color: var(--color-text-primary)
171
- }
172
-
173
- &:hover {
174
- color: var(--color-text-primary);
175
- border-bottom: 2px solid var(--color-text-secondary);
176
- }
177
- }
178
-
179
165
  .tabs-wrap {
180
166
  position: relative;
181
167
  margin: 0 auto;
@@ -73,7 +73,7 @@ export default {
73
73
  listChoice = 2
74
74
  }
75
75
 
76
- if (seconds < 10) {
76
+ if (seconds < 5) {
77
77
  return this.t('just_now')
78
78
  }
79
79
  const lng = timeFormats.length
@@ -97,6 +97,9 @@ export default {
97
97
  }
98
98
  },
99
99
  t(val) {
100
+ if (this.noTrans) {
101
+ return val.replace(/_/g, ' ')
102
+ }
100
103
  return this.$t('date_time_' + val, 'renusify')
101
104
  }
102
105
  },
@@ -1,243 +1,258 @@
1
1
  <template>
2
- <div class="tour-layer" :class="{'clickable':clickable}" :style="style"></div>
2
+ <teleport :to="`.${$r.prefix}app`">
3
+ <div :style="style" class="tour-layer"></div>
3
4
  <transition name="slide-up" mode="out-in">
4
- <div class="tour-msg display-4" ref="tourMsg" :style="style_msg" v-if="msg">
5
- <r-container>
6
- <div v-html="$helper.cleanXss(steps[run].msg)"></div>
7
- <div class="d-flex">
8
- <div><span
9
- class="subtitle-1 color-success br-lg py-1 px-2 ltr">{{ steps.length }} / {{ run + 1 }}</span>
10
- </div>
11
- <r-spacer></r-spacer>
12
- <r-btn class="color-warning" :disabled="disable_prev" @click.prevent="prev" v-if="has_prev">
13
- {{$t('prev','renusify')}}
14
- </r-btn>
15
- <r-btn class="color-warning mx-1" :disabled="disable_next" @click.prevent="next" v-if="has_next">
16
- {{$t('next','renusify')}}
17
- </r-btn>
18
- <r-btn class="color-warning mx-1" :disabled="disable_finish" @click.prevent="finish"
19
- v-if="steps.length===run+1||canFinish">{{$t('finish','renusify')}}
20
- </r-btn>
21
- </div>
22
- </r-container>
23
- </div>
5
+ <div v-if="msg" ref="tourMsg" :style="style_msg" class="tour-msg display-4">
6
+ <r-container>
7
+ <div v-html="$helper.cleanXss(steps[run].msg)"></div>
8
+ <div class="d-flex">
9
+ <div><span
10
+ class="subtitle-1 color-success br-lg py-1 px-2 ltr">{{ steps.length }} / {{ run + 1 }}</span>
11
+ </div>
12
+ <r-spacer></r-spacer>
13
+ <r-btn v-if="has_prev" :disabled="disable_prev" class="color-warning tour-clickable" @click.prevent="prev">
14
+ {{ $t('prev', 'renusify') }}
15
+ </r-btn>
16
+ <r-btn v-if="has_next" :disabled="disable_next" class="color-warning mx-1 tour-clickable"
17
+ @click.prevent="next">
18
+ {{ $t('next', 'renusify') }}
19
+ </r-btn>
20
+ <r-btn v-if="steps.length===run+1||canFinish" :disabled="disable_finish"
21
+ class="color-warning mx-1 tour-clickable"
22
+ @click.prevent="finish">{{ $t('finish', 'renusify') }}
23
+ </r-btn>
24
+ </div>
25
+ </r-container>
26
+ </div>
24
27
  </transition>
28
+ </teleport>
25
29
  </template>
26
30
  <script>
27
- export default {
28
- name: 'r-tour',
29
- props: {
30
- steps: {
31
- type: Array, default: () => {
32
- return []
33
- }
34
- },
35
- canFinish: Boolean,
36
- abortOnNotFound: Boolean,
37
- delay: {type: Number, default: 2000}
38
- },
39
- data() {
40
- return {
41
- finished: false,
42
- clickable: false,
43
- disable_next: false,
44
- disable_prev: false,
45
- disable_finish: false,
46
- all: {},
47
- style: {},
48
- style_msg: {},
49
- msg: null,
50
- run: 0
51
- }
52
- },
53
- mounted() {
54
- setTimeout(() => {
55
- this._show()
56
- }, this.delay)
31
+ export default {
32
+ name: 'r-tour',
33
+ props: {
34
+ steps: {
35
+ type: Array, default: () => {
36
+ return []
37
+ }
38
+ },
39
+ canFinish: Boolean,
40
+ abortOnNotFound: Boolean,
41
+ delay: {type: Number, default: 2000}
42
+ },
43
+ data() {
44
+ return {
45
+ finished: false,
46
+ disable_next: false,
47
+ disable_prev: false,
48
+ disable_finish: false,
49
+ all: {},
50
+ style: {},
51
+ style_msg: {},
52
+ msg: null,
53
+ run: 0
54
+ }
55
+ },
56
+ mounted() {
57
+ setTimeout(() => {
58
+ this._show()
59
+ }, this.delay)
57
60
 
58
- },
59
- watch: {
60
- '$r.breakpoint.height': function () {
61
- this._show()
62
- }
63
- },
64
- computed: {
65
- has_next() {
66
- if(this.finished){
67
- console.log('tour finished has_next:'+this.run)
68
- this.reset()
69
- return false
70
- }
71
- return this.$helper.ifHas(this.steps, false, this.run + 1, 'key')
72
- },
73
- has_prev() {
74
- if(this.finished){
75
- console.log('tour finished has_prev:'+this.run)
76
- this.reset()
77
- return false
78
- }
79
- return this.$helper.ifHas(this.steps, false, this.run - 1, 'key')
80
- },
81
- elm() {
82
- if(this.finished){
83
- console.log('tour finished step:'+this.run)
84
- this.reset()
85
- return null
86
- }
87
- const key = this.$helper.ifHas(this.steps, false, this.run, 'key')
88
- if (key) {
89
- return document.querySelector(key)
90
- }
91
- console.log(key + ': key not found in step:' + this.run)
92
- return null
93
- }
94
- },
95
- methods: {
96
- elm_next() {
97
- return document.querySelector(this.has_next)
98
- },
99
- elm_prev() {
100
- return document.querySelector(this.has_prev)
101
- },
102
- _getOffsetLeft(elem) {
103
- let box = elem.getBoundingClientRect();
61
+ },
62
+ watch: {
63
+ '$r.breakpoint.height': function () {
64
+ this._show()
65
+ }
66
+ },
67
+ computed: {
68
+ has_next() {
69
+ if (this.finished) {
70
+ console.log('tour finished has_next:' + this.run)
71
+ this.reset()
72
+ return false
73
+ }
74
+ return this.$helper.ifHas(this.steps, false, this.run + 1, 'key')
75
+ },
76
+ has_prev() {
77
+ if (this.finished) {
78
+ console.log('tour finished has_prev:' + this.run)
79
+ this.reset()
80
+ return false
81
+ }
82
+ return this.$helper.ifHas(this.steps, false, this.run - 1, 'key')
83
+ },
84
+ elm() {
85
+ if (this.finished) {
86
+ console.log('tour finished step:' + this.run)
87
+ this.reset()
88
+ return null
89
+ }
90
+ const key = this.$helper.ifHas(this.steps, false, this.run, 'key')
91
+ if (key) {
92
+ return document.querySelector(key)
93
+ }
94
+ console.log(key + ': key not found in step:' + this.run)
95
+ return null
96
+ }
97
+ },
98
+ methods: {
99
+ elm_next() {
100
+ return document.querySelector(this.has_next)
101
+ },
102
+ elm_prev() {
103
+ return document.querySelector(this.has_prev)
104
+ },
105
+ _getOffsetLeft(elem) {
106
+ let box = elem.getBoundingClientRect();
104
107
 
105
- let body = document.body;
106
- let docEl = document.documentElement;
108
+ let body = document.body;
109
+ let docEl = document.documentElement;
107
110
 
108
- let scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;
109
- let scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;
111
+ let scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;
112
+ let scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;
110
113
 
111
- let clientTop = docEl.clientTop || body.clientTop || 0;
112
- let clientLeft = docEl.clientLeft || body.clientLeft || 0;
114
+ let clientTop = docEl.clientTop || body.clientTop || 0;
115
+ let clientLeft = docEl.clientLeft || body.clientLeft || 0;
113
116
 
114
- let top = box.top + scrollTop - clientTop;
115
- let left = box.left + scrollLeft - clientLeft;
117
+ let top = box.top + scrollTop - clientTop;
118
+ let left = box.left + scrollLeft - clientLeft;
116
119
 
117
- return {top: Math.round(top), left: Math.round(left)};
118
- },
119
- reset() {
120
- this.style = {}
121
- this.style_msg = {}
122
- this.msg = null
123
- this.clickable = false
124
- this.disable_next = false
125
- this.disable_prev = false
126
- this.disable_finish = false
127
- },
128
- finish() {
129
- const item = this.steps[this.run]
130
- if (item.onFinish) {
131
- item.onFinish()
132
- }
133
- this.finished = true
134
- this.run = 0
135
- this.reset()
136
- this.$storage.set("tour_finish", true);
137
- },
138
- prev() {
139
- this.reset()
140
- const item = this.steps[this.run]
141
- if (item.onPrev) {
142
- item.onPrev()
143
- }
144
- this.run--
145
- const s = this._show()
146
- if (!s && this.run > 0) {
147
- this.prev()
148
- }
149
- },
150
- next() {
151
- this.reset()
152
- const item = this.steps[this.run]
153
- if (item.onNext) {
154
- item.onNext()
155
- }
156
- this.run++
157
- const s = this._show()
158
- if (!s && this.run < this.steps.length - 1) {
159
- this.next()
160
- }
161
- },
162
- _show() {
163
- this.msg = null
164
- if (this.elm && !this.finished) {
165
- const item = this.steps[this.run]
166
- if (item.before) {
167
- item.before()
168
- }
169
- if (item.options) {
170
- for (let key in item.options) {
171
- if (this.$helper.hasKey(item.options, key)) {
172
- this[key] = item.options[key]
173
- }
174
- }
175
- }
176
- this.msg = item['msg']
177
- setTimeout(() => {
178
- let msgDiv = this.$refs.tourMsg.getBoundingClientRect()
120
+ return {top: Math.round(top), left: Math.round(left)};
121
+ },
122
+ reset() {
123
+ this.style = {}
124
+ this.style_msg = {}
125
+ this.msg = null
126
+ this.disable_next = false
127
+ this.disable_prev = false
128
+ this.disable_finish = false
129
+ },
130
+ finish() {
131
+ document.documentElement.classList.remove('disable-event')
132
+ document.documentElement.style.overflow = 'auto';
133
+ const item = this.steps[this.run]
134
+ if (item.onFinish) {
135
+ item.onFinish()
136
+ }
137
+ this.finished = true
138
+ this.run = 0
139
+ this.reset()
140
+ this.$storage.set("tour_finish", true);
141
+ },
142
+ prev() {
143
+ this.reset()
144
+ const item = this.steps[this.run]
145
+ if (item.onPrev) {
146
+ item.onPrev()
147
+ }
148
+ this.run--
149
+ const s = this._show()
150
+ if (!s && this.run > 0) {
151
+ this.prev()
152
+ }
153
+ },
154
+ next() {
155
+ this.reset()
156
+ const item = this.steps[this.run]
157
+ if (item.onNext) {
158
+ item.onNext()
159
+ }
160
+ this.run++
161
+ const s = this._show()
162
+ if (!s && this.run < this.steps.length - 1) {
163
+ this.next()
164
+ }
165
+ },
166
+ _show() {
167
+ this.msg = null
168
+ if (this.elm && !this.finished) {
169
+ const item = this.steps[this.run]
179
170
 
180
- const b = this.elm.getBoundingClientRect()
181
- const s = window.getComputedStyle(this.elm)
182
- const p = this._getOffsetLeft(this.elm)
183
- this.style.width = b.width + 'px'
184
- this.style.height = b.height + 'px'
185
- this.style.top = p.top + 'px'
186
- this.style.left = p.left + 'px'
171
+ if (item.before) {
172
+ item.before()
173
+ }
174
+ if (item.options) {
175
+ if (item.options.clickable) {
176
+ this.elm.classList.add('tour-clickable')
177
+ }
178
+ for (let key in item.options) {
179
+ if (this.$helper.hasKey(item.options, key)) {
180
+ this[key] = item.options[key]
181
+ }
182
+ }
183
+ }
184
+ this.msg = item['msg']
185
+ setTimeout(() => {
186
+ this.elm.scrollIntoView()
187
+ let msgDiv = this.$refs.tourMsg.getBoundingClientRect()
188
+ document.documentElement.classList.add('disable-event')
189
+ document.documentElement.style.overflow = 'hidden';
190
+ const b = this.elm.getBoundingClientRect()
191
+ const s = window.getComputedStyle(this.elm)
192
+ const p = this._getOffsetLeft(this.elm)
193
+ this.style.width = b.width + 'px'
194
+ this.style.height = b.height + 'px'
195
+ this.style.top = p.top + 'px'
196
+ this.style.left = p.left + 'px'
187
197
 
188
- this.style['border-radius'] = s['border-radius']
189
- this.style.opacity = 1
198
+ this.style['border-radius'] = s['border-radius']
199
+ this.style.opacity = 1
190
200
 
191
- let scroll = p.top
192
- if (msgDiv.height < p.top) {
193
- scroll = p.top - msgDiv.height
194
- this.style_msg.top = scroll + 'px'
195
- } else {
196
- this.style_msg.top = scroll + b.height + 'px'
197
- }
201
+ let scroll = p.top
202
+ if (msgDiv.height < p.top) {
203
+ scroll = p.top - msgDiv.height
204
+ this.style_msg.top = scroll + 'px'
205
+ } else {
206
+ this.style_msg.top = scroll + b.height + 'px'
207
+ }
198
208
 
199
209
 
200
- window.scroll({
201
- top: scroll,
202
- behavior: 'smooth'
203
- });
204
- if (item.after) {
205
- item.after()
206
- }
207
- }, 1)
208
- return true
209
- } else if (this.abortOnNotFound) {
210
- console.log('abort on not found tour')
211
- this.finish()
212
- }
213
- return false
214
- }
215
- }
210
+ window.scroll({
211
+ top: scroll,
212
+ behavior: 'smooth'
213
+ });
214
+ if (item.after) {
215
+ item.after()
216
+ }
217
+ }, 1)
218
+ return true
219
+ } else if (this.abortOnNotFound) {
220
+ console.log('abort on not found tour')
221
+ this.finish()
222
+ }
223
+ return false
216
224
  }
225
+ }
226
+ }
217
227
  </script>
218
228
  <style lang="scss">
219
- .tour-layer {
220
- transition: all .7s ease-in-out;
221
- position: absolute;
222
- box-shadow: #444444 0px 0px 1px 2px, rgba(160, 10, 255, 0.8) 0px 0px 0px 5000px;
223
- z-index: 100;
224
- opacity: 0;
225
- width: 1px;
226
- height: 1px;
227
- left: 0;
228
- top: 0;
229
+ .disable-event {
230
+ pointer-events: none !important;
231
+ }
229
232
 
230
- &.clickable {
231
- pointer-events: none;
232
- }
233
- }
233
+ .tour-layer {
234
+ transition: all .7s ease-in-out;
235
+ position: absolute;
236
+ box-shadow: #444444 0px 0px 1px 2px, rgba(160, 10, 255, 0.8) 0px 0px 0px 5000px;
237
+ z-index: 1000;
238
+ opacity: 0;
239
+ width: 1px;
240
+ height: 1px;
241
+ left: 0;
242
+ top: 0;
234
243
 
235
- .tour-msg {
236
- transition: all 1s ease-in-out;
237
- color: white !important;
238
- position: absolute;
239
- width: 100%;
240
- z-index: 101;
241
- top: 0
242
- }
243
- </style>
244
+ }
245
+
246
+ .tour-clickable {
247
+ pointer-events: auto !important;
248
+ }
249
+
250
+ .tour-msg {
251
+ transition: all 1s ease-in-out;
252
+ color: white !important;
253
+ position: absolute;
254
+ width: 100%;
255
+ z-index: 1001;
256
+ top: 0
257
+ }
258
+ </style>