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
@@ -1,152 +1,151 @@
1
1
  <template>
2
- <r-container full-width :class="classes" ref="tree">
3
- <r-row v-if="searchLink">
4
- <r-col>
5
- <r-select
6
- :searchLink="searchLink"
7
- :model-value="search"
8
- @update:model-value="change($event)"
9
- :label="$t('search','renusify')"
10
- ></r-select>
11
- </r-col>
12
- </r-row>
13
- <r-float bordered v-if="show" :minZoom="0.01" :zoom="0.7">
14
- <template v-slot="{move,ease,transform}">
15
- <r-container full-width fill :class="{
2
+ <r-container ref="tree" :class="classes" full-width>
3
+ <r-row v-if="searchLink">
4
+ <r-col>
5
+ <r-select
6
+ :label="$t('search','renusify')"
7
+ :model-value="search"
8
+ :searchLink="searchLink"
9
+ @update:model-value="change($event)"
10
+ ></r-select>
11
+ </r-col>
12
+ </r-row>
13
+ <r-float v-if="show" :minZoom="0.01" :zoom="0.7" bordered>
14
+ <template v-slot="{move,ease,transform}">
15
+ <r-container :class="{
16
16
  'tree-rotate':rotate
17
- }">
18
- <slot
19
- :parent-node="nodeParent"
20
- @update:model-value="$emit('update:modelValue',$event)"
21
- :model-value="node"
22
- :link="link"
23
- @select-node="handleSelect"
24
- @expand="handleExpand(ease,move,transform,$event)"
25
- :selected="selected"
26
- :expand="expand"
27
- :openAll="openAll"
28
- >
29
- </slot>
30
- </r-container>
31
- </template>
32
- </r-float>
33
- </r-container>
17
+ }" fill full-width>
18
+ <slot
19
+ :expand="expand"
20
+ :link="link"
21
+ :model-value="node"
22
+ :openAll="openAll"
23
+ :parent-node="nodeParent"
24
+ :selected="selected"
25
+ @expand="handleExpand(ease,move,transform,$event)"
26
+ @select="handleSelect"
27
+ @update:model-value="$emit('update:modelValue',$event)"
28
+ >
29
+ </slot>
30
+ </r-container>
31
+ </template>
32
+ </r-float>
33
+ </r-container>
34
34
 
35
35
  </template>
36
36
  <script>
37
37
 
38
- export default {
39
- name: 'r-tree',
40
-
41
- props: {
42
- modelValue: Object,
43
- link: String,
44
- searchLink: String,
45
- gen: String,
46
- selected: String,
47
- rotate: Boolean,
48
- expand: {
49
- type: Boolean,
50
- default: false
51
- },
52
- childsName: {
53
- type: String,
54
- default: 'childs'
55
- },
56
- openAll: Boolean,
57
- headers: Object
58
- },
59
- emits:['update:modelValue','select-node'],
60
- data() {
61
- return {
62
- show: false,
63
- search: null,
64
- nodeParent: this.gen,
65
- node: this.modelValue
66
- }
67
- },
68
- created() {
69
- if (this.modelValue) {
70
- this.show = true
71
- } else if (this.link) {
72
- this.get()
73
- }
74
- },
75
- watch: {
76
- modelValue: function (newVal) {
77
- this.node = newVal
78
- }
79
- },
80
- computed:{
81
- classes(){
82
- let a={'tree-searchable':this.searchLink}
83
- a[`${this.$r.prefix}tree`]=true
84
- return a
85
- }
86
- },
87
- methods: {
88
- change(e) {
89
- if (e && "value" in e) {
90
- this.nodeParent = e.value
91
- this.show = false
92
- this.get()
93
- }
94
- },
95
- get() {
96
- this.$axios.get(this.link + this.nodeParent, {headers: this.headers})
97
- .then(({data}) => {
98
- this.node = data
99
- this.show = true
100
- })
101
- },
102
- handleExpand(ease, move, transform, $event) {
103
- const el = $event[1].getBoundingClientRect()
104
- ease()
105
- const node_info=$event[1].querySelector('.node-info').getBoundingClientRect()
106
- const card_h = node_info.height
107
- const card_w = node_info.width
108
- const parent = this.$refs.tree.$el
109
- const bb = this.$refs.tree.$el.getBoundingClientRect()
110
- move(parent.offsetWidth / 2 - (el.left - bb.left + ($event[0] ? el.width / 2 : el.width - card_w / 2)),
111
- parent.offsetHeight / 2 - (el.top - bb.top +(this.rotate ? el.height- card_h :card_h/2) ))
112
- },
113
- handleSelect(e) {
114
- this.$emit('select-node', e)
115
- }
116
- }
38
+ export default {
39
+ name: 'r-tree',
40
+ props: {
41
+ modelValue: Object,
42
+ link: String,
43
+ searchLink: String,
44
+ gen: String,
45
+ selected: String,
46
+ rotate: Boolean,
47
+ expand: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ childsName: {
52
+ type: String,
53
+ default: 'childs'
54
+ },
55
+ openAll: Boolean,
56
+ headers: Object
57
+ },
58
+ emits: ['update:modelValue', 'select-node'],
59
+ data() {
60
+ return {
61
+ show: false,
62
+ search: null,
63
+ nodeParent: this.gen,
64
+ node: this.modelValue
65
+ }
66
+ },
67
+ created() {
68
+ if (this.modelValue) {
69
+ this.show = true
70
+ } else if (this.link) {
71
+ this.get()
72
+ }
73
+ },
74
+ watch: {
75
+ modelValue: function (newVal) {
76
+ this.node = newVal
77
+ }
78
+ },
79
+ computed: {
80
+ classes() {
81
+ let a = {'tree-searchable': this.searchLink}
82
+ a[`${this.$r.prefix}tree`] = true
83
+ return a
84
+ }
85
+ },
86
+ methods: {
87
+ change(e) {
88
+ if (e && "value" in e) {
89
+ this.nodeParent = e.value
90
+ this.show = false
91
+ this.get()
92
+ }
93
+ },
94
+ get() {
95
+ this.$axios.get(this.link + this.nodeParent, {headers: this.headers})
96
+ .then(({data}) => {
97
+ this.node = data
98
+ this.show = true
99
+ })
100
+ },
101
+ handleExpand(ease, move, transform, $event) {
102
+ const el = $event[1].getBoundingClientRect()
103
+ ease()
104
+ const node_info = $event[1].querySelector('.node-info').getBoundingClientRect()
105
+ const card_h = node_info.height
106
+ const card_w = node_info.width
107
+ const parent = this.$refs.tree.$el
108
+ const bb = this.$refs.tree.$el.getBoundingClientRect()
109
+ move(parent.offsetWidth / 2 - (el.left - bb.left + ($event[0] ? el.width / 2 : el.width - card_w / 2)),
110
+ parent.offsetHeight / 2 - (el.top - bb.top + (this.rotate ? el.height - card_h : card_h / 2)))
111
+ },
112
+ handleSelect(e) {
113
+ this.$emit('select-node', e)
117
114
  }
115
+ }
116
+ }
118
117
  </script>
119
118
  <style lang="scss">
120
- @import "../../style/include";
119
+ @import "../../style/include";
121
120
 
122
- $distance: 20px;
123
- .#{$prefix}tree {
124
- position: relative;
125
- width: 100%;
126
- height: 100%;
127
- background-color: var(--color-background-one);
121
+ $distance: 20px;
122
+ .#{$prefix}tree {
123
+ position: relative;
124
+ width: 100%;
125
+ height: 100%;
126
+ background-color: var(--color-background-one);
128
127
 
129
- &.tree-searchable {
130
- .#{$prefix}float {
131
- height: calc(100% - 70px)
132
- }
133
- }
134
-
135
- .#{$prefix}float {
136
- direction: ltr;
137
- }
128
+ &.tree-searchable {
129
+ .#{$prefix}float {
130
+ height: calc(100% - 70px)
131
+ }
132
+ }
138
133
 
139
- .tree-rotate {
140
- transform: rotateX(180deg);
134
+ .#{$prefix}float {
135
+ direction: ltr;
136
+ }
141
137
 
142
- .node-info {
143
- transform: rotateX(-180deg);
144
- }
138
+ .tree-rotate {
139
+ transform: rotateX(180deg);
145
140
 
146
- .tree-btn-expand {
147
- transform: rotateX(-180deg);
148
- }
149
- }
141
+ .node-info {
142
+ transform: rotateX(-180deg);
143
+ }
150
144
 
145
+ .tree-btn-expand {
146
+ transform: rotateX(-180deg);
151
147
  }
152
- </style>
148
+ }
149
+
150
+ }
151
+ </style>
@@ -3,7 +3,7 @@
3
3
  <r-row class="h-center flex-nowrap no-gutters">
4
4
  <r-col class="text-center">
5
5
  <div class="d-flex h-center mb-1 node-info">
6
- <component :is="componentName" :node="node[nodeKey]"
6
+ <component :is="componentElm" :node="node[nodeKey]"
7
7
  @fire="$emit('fire',$event)"
8
8
  @click.prevent="$emit('select',{key:nodeKey,item:node[nodeKey]})"
9
9
  ></component>
@@ -32,7 +32,7 @@
32
32
  @expand="handleExpand"
33
33
  :expand="expand"
34
34
  :openAll="openAll"
35
- :component-name="componentName"
35
+ :component-name="componentElm"
36
36
  @fire="$emit('fire',$event)"
37
37
  @select="$emit('select',$event)"
38
38
  >
@@ -42,6 +42,7 @@
42
42
  </r-container>
43
43
  </template>
44
44
  <script>
45
+ import {markRaw} from "vue";
45
46
 
46
47
  export default {
47
48
  name: 'r-tree-element',
@@ -83,6 +84,15 @@ export default {
83
84
  }
84
85
  },
85
86
  computed: {
87
+ componentElm() {
88
+ if (!this.componentName) {
89
+ return
90
+ }
91
+ if (this.componentName.__v_skip) {
92
+ return this.componentName
93
+ }
94
+ return markRaw(this.componentName)
95
+ },
86
96
  node() {
87
97
  return this.modelValue
88
98
  },
@@ -99,6 +109,9 @@ export default {
99
109
  let s = []
100
110
  for (const key in childs) {
101
111
  if (this.$helper.hasKey(childs, key)) {
112
+ if (childs[key]['gen'] === undefined) {
113
+ childs[key]['gen'] = key
114
+ }
102
115
  s.push({
103
116
  'key': key,
104
117
  'value': childs[key]
@@ -169,6 +182,7 @@ $distance: 20px;
169
182
  direction: ltr;
170
183
  position: relative;
171
184
  display: table;
185
+ user-select: none;
172
186
 
173
187
  .btn-extend {
174
188
  position: relative;
@@ -266,4 +280,4 @@ $distance: 20px;
266
280
  }
267
281
  }
268
282
  }
269
- </style>
283
+ </style>
@@ -11,8 +11,7 @@ const list = {
11
11
  'sortable': 'sortable',
12
12
  'touch': 'touch',
13
13
  'title': 'title',
14
-
15
-
14
+ 'skeleton': 'skeleton',
16
15
  }
17
16
  export const registers = (app, directives) => {
18
17
  directives.forEach((item) => {
@@ -4,7 +4,7 @@ function fireEvent(el, eventName, data) {
4
4
  el.dispatchEvent(e);
5
5
  }
6
6
 
7
- const maskStart = /^([^0ANX]+)/;
7
+ const maskStart = /^([^BANX]+)/;
8
8
 
9
9
  function getInputElement(element) {
10
10
  if (element.tagName.toLocaleUpperCase() === 'INPUT') {
@@ -60,9 +60,6 @@ function format(data, mask = '') {
60
60
  }
61
61
 
62
62
  break loop;
63
- case '?':
64
- dataOffset++;
65
- break;
66
63
  case 'X':
67
64
  dataOutput += dataChar;
68
65
  unmask += dataChar
@@ -0,0 +1,27 @@
1
+ import "./style.scss";
2
+
3
+ function mounted(el, binding) {
4
+ let data = binding.value;
5
+ if (!data.loading) {
6
+ el.classList.add("r-skeleton");
7
+ }
8
+ }
9
+
10
+ function updated(el, binding) {
11
+ if (binding.value === binding.oldValue) {
12
+ return null;
13
+ }
14
+
15
+ unmounted(el);
16
+ mounted(el, binding);
17
+ }
18
+
19
+ function unmounted(el) {
20
+ el.classList.remove("r-skeleton");
21
+ }
22
+
23
+ export default {
24
+ mounted,
25
+ updated,
26
+ unmounted,
27
+ };
@@ -0,0 +1,37 @@
1
+ @import "~renusify/style/include";
2
+
3
+ .r-skeleton {
4
+ * {
5
+ opacity: 0 !important;
6
+ }
7
+
8
+ -webkit-text-fill-color: transparent !important;
9
+
10
+ background-color: rgba(0, 0, 0, 0.12) !important;
11
+ overflow: hidden !important;
12
+ position: relative !important;
13
+
14
+ &:after {
15
+ animation: skeletonloading 1.5s infinite;
16
+ content: "";
17
+ height: 100%;
18
+ left: 0;
19
+ position: absolute;
20
+ right: 0;
21
+ top: 0;
22
+ transform: translateX(-100%);
23
+ z-index: 1;
24
+ background: linear-gradient(
25
+ 90deg,
26
+ hsla(0, 0%, 100%, 0),
27
+ hsla(0, 0%, 100%, 0.3),
28
+ hsla(0, 0%, 100%, 0)
29
+ );
30
+ }
31
+
32
+ @keyframes skeletonloading {
33
+ 100% {
34
+ transform: translateX(100%);
35
+ }
36
+ }
37
+ }
package/index.js CHANGED
@@ -4,7 +4,7 @@ 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/app/notify/notify.js';
7
+ import Notify from './components/notify/notify.js';
8
8
  import valid from './plugins/validation/Validate';
9
9
  import Toast from './components/app/toast/toast.js';
10
10
  import event from './plugins/event';
@@ -84,19 +84,24 @@ export default {
84
84
  },
85
85
  },
86
86
  autoAddTranslate: true,
87
+ useNotify: false,
87
88
  package: null,
88
89
  store: {},
89
- icons: Icons,
90
- breakpoint: breakpointData
90
+ icons: Icons
91
91
  }, options))
92
- // renusify notify
93
- app.config.globalProperties.$notify = function (message = null) {
94
- if (message === null) {
95
- Notify.hide();
96
- } else {
97
- Notify.show(message);
92
+ app.config.globalProperties.$r.breakpoint = breakpointData
93
+ if (app.config.globalProperties.$r.useNotify) {
94
+ // renusify notify
95
+ app.config.globalProperties.$notify = function (message = null, settings = {}) {
96
+ if (message === null) {
97
+ Notify.hide();
98
+ } else {
99
+ settings['data'] = message
100
+ Notify.show(settings);
101
+ }
98
102
  }
99
103
  }
104
+
100
105
  // renusify toast
101
106
  app.config.globalProperties.$toast = function (message, options) {
102
107
  Toast.show(message, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "renusify",
3
- "version": "1.4.3",
3
+ "version": "1.4.7",
4
4
  "description": "Vue3 Framework",
5
5
  "keywords": [
6
6
  "vuejs",
@@ -145,58 +145,6 @@
145
145
  }
146
146
  }
147
147
 
148
- .slide-start-full {
149
- &-enter-active {
150
- transition: all .3s ease-in-out;
151
- }
152
-
153
- &-leave-active {
154
- transition: all .3s ease-in-out;
155
- }
156
-
157
- &-enter-from, &-leave-to {
158
- @include rtl() {
159
- transform: translateX(-100%);
160
- }
161
- @include ltr() {
162
- transform: translateX(100%);
163
- }
164
-
165
- opacity: 0;
166
- }
167
-
168
- &-move {
169
- transition: transform .7s ease-in-out;
170
- }
171
- }
172
-
173
- .slide-end-full {
174
- &-enter-active {
175
- max-width: 100%;
176
- transition: all .3s ease-in-out;
177
- }
178
-
179
- &-leave-active {
180
- max-width: 100%;
181
- transition: all .3s ease-in-out;
182
- }
183
-
184
- &-enter-from, &-leave-to {
185
- @include rtl() {
186
- transform: translateX(100%);
187
- }
188
- @include ltr() {
189
- transform: translateX(-100%);
190
- }
191
-
192
- opacity: 0;
193
- }
194
-
195
- &-move {
196
- transition: transform .7s ease-in-out;
197
- }
198
- }
199
-
200
148
  .slide-start {
201
149
  &-enter-active {
202
150
  transition: all .3s ease-in-out;
@@ -208,10 +156,10 @@
208
156
 
209
157
  &-enter-from, &-leave-to {
210
158
  @include rtl() {
211
- transform: translateX(-30px);
159
+ transform: translateX(-60%);
212
160
  }
213
161
  @include ltr() {
214
- transform: translateX(30px);
162
+ transform: translateX(60%);
215
163
  }
216
164
 
217
165
  opacity: 0;
@@ -235,10 +183,10 @@
235
183
 
236
184
  &-enter-from, &-leave-to {
237
185
  @include rtl() {
238
- transform: translateX(30px);
186
+ transform: translateX(60%);
239
187
  }
240
188
  @include ltr() {
241
- transform: translateX(-30px);
189
+ transform: translateX(-60%);
242
190
  }
243
191
 
244
192
  opacity: 0;
@@ -259,7 +207,7 @@
259
207
  }
260
208
 
261
209
  &-enter-from, &-leave-to {
262
- transform: translateY(20px);
210
+ transform: translateY(60%);
263
211
  opacity: 0;
264
212
  }
265
213
 
@@ -278,7 +226,7 @@
278
226
  }
279
227
 
280
228
  &-enter-from, &-leave-to {
281
- transform: translateY(-20px);
229
+ transform: translateY(-60%);
282
230
  opacity: 0;
283
231
  }
284
232
 
@@ -305,61 +253,3 @@
305
253
  transition: transform .7s ease;
306
254
  }
307
255
  }
308
-
309
-
310
- .page-slide-right {
311
- &-enter-active, &-leave-active {
312
- min-width: 100vw;
313
- max-width: 100vw;
314
- transition: all .5s ease-in-out;
315
- z-index: 10;
316
- }
317
-
318
- &-enter-to {
319
- position: absolute;
320
- right: 0;
321
- }
322
-
323
- &-enter-from {
324
- position: absolute;
325
- right: -100%;
326
- }
327
-
328
- &-leave-to {
329
- position: absolute;
330
- left: -100%;
331
- }
332
-
333
- &-leave-from {
334
- position: absolute;
335
- left: 0;
336
- }
337
- }
338
- .page-slide-left {
339
- &-enter-active, &-leave-active {
340
- min-width: 100vw;
341
- max-width: 100vw;
342
- transition: all .5s ease-in-out;
343
- z-index: 10;
344
- }
345
-
346
- &-enter-to {
347
- position: absolute;
348
- left: 0;
349
- }
350
-
351
- &-enter-from {
352
- position: absolute;
353
- left: -100%;
354
- }
355
-
356
- &-leave-to {
357
- position: absolute;
358
- right: -100%;
359
- }
360
-
361
- &-leave-from {
362
- position: absolute;
363
- right: 0;
364
- }
365
- }