renusify 1.4.3 → 1.4.4

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 (43) 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 +1 -1
  8. package/components/form/mask-input.vue +2 -2
  9. package/components/form/text-area.vue +1 -1
  10. package/components/form/text-editor/index.vue +0 -1
  11. package/components/form/timepicker/index.vue +18 -16
  12. package/components/form/unit-input.vue +1 -0
  13. package/components/formCreator/index.vue +7 -20
  14. package/components/index.js +1 -1
  15. package/components/infinite/index.vue +9 -6
  16. package/components/map/index.vue +52 -20
  17. package/components/map/leaflet.css +511 -397
  18. package/components/map/route.vue +570 -560
  19. package/components/map/select.vue +64 -48
  20. package/components/message/index.vue +22 -21
  21. package/components/modal/index.vue +20 -7
  22. package/components/modal/style.scss +17 -14
  23. package/components/{app/notify → notify}/index.vue +21 -29
  24. package/components/{app/notify → notify}/notification.vue +10 -10
  25. package/components/notify/notify.js +27 -0
  26. package/components/searchBox/index.vue +30 -12
  27. package/components/slider/index.vue +1 -0
  28. package/components/table/index.vue +366 -367
  29. package/components/table/style.scss +1 -4
  30. package/components/tabs/index.vue +9 -23
  31. package/components/timeAgo/index.vue +4 -1
  32. package/components/tour/index.vue +237 -222
  33. package/components/tree/index.vue +135 -136
  34. package/components/tree/tree-element.vue +17 -3
  35. package/directive/index.js +1 -2
  36. package/directive/mask/index.js +1 -4
  37. package/directive/skeleton/index.js +27 -0
  38. package/directive/skeleton/style.scss +37 -0
  39. package/index.js +14 -9
  40. package/package.json +1 -1
  41. package/style/transitions.scss +6 -116
  42. package/tools/helper.js +20 -0
  43. package/components/app/notify/notify.js +0 -28
@@ -1,54 +1,70 @@
1
1
  <template>
2
- <div :class="`${$r.prefix}map-select`">
3
- <r-map @update:model-value="emit"
4
- :center="center"
5
- search-box @map="handleMapEvent" @leaflet="handleLEvent"
6
- :zoom="zoom"
7
- :height="height"
8
- ></r-map>
9
- </div>
2
+ <div :class="`${$r.prefix}map-select`">
3
+ <r-map :center="center"
4
+ :height="height"
5
+ :zoom="zoom" search-box @leaflet="handleLEvent"
6
+ @map="handleMapEvent"
7
+ @update:model-value="emit"
8
+ ></r-map>
9
+ </div>
10
10
  </template>
11
11
  <script>
12
- export default {
13
- name: 'r-map-select',
14
- props: {
15
- modelValue: Array,
16
- height: {type: String, default: "500px"},
17
- zoom: {type: Number, default: 13},
18
- },
19
- emits:['update:modelValue'],
20
- data() {
21
- return {
22
- map: null,
23
- L: null,
24
- marker: null,
25
- center: this.modelValue || [35.69940749291485, 51.33705139160157]
26
- }
27
- },
28
- methods: {
29
- handleLEvent(e) {
30
- this.L = e
31
- },
32
- handleMapEvent(e) {
33
- this.map = e
34
- this.selection()
35
- },
36
- selection() {
37
- this.$emit("update:modelValue", this.center);
38
- this.marker = new this.L.Marker(this.center);
39
- this.map.addLayer(this.marker);
40
- this.marker.bindPopup(this.$t("map_move_to_location",'renusify')).openPopup();
12
+ export default {
13
+ name: 'r-map-select',
14
+ props: {
15
+ modelValue: Array,
16
+ height: {type: String, default: "500px"},
17
+ zoom: {type: Number, default: 13},
18
+ mapImageMarker: String
19
+ },
20
+ emits: ['update:modelValue'],
21
+ data() {
22
+ return {
23
+ map: null,
24
+ L: null,
25
+ marker: null,
26
+ center: this.modelValue || [35.69973857757377, 51.33806092139637]
27
+ }
28
+ },
29
+ computed: {
30
+ iconMarker() {
31
+ if (this.mapImageMarker) {
32
+ return this.mapImageMarker
33
+ }
34
+ return require('./images/marker-icon.png')
35
+ }
36
+ },
37
+ methods: {
38
+ handleLEvent(e) {
39
+ this.L = e
40
+ },
41
+ handleMapEvent(e) {
42
+ this.map = e
43
+ this.selection()
44
+ },
45
+ selection() {
46
+ this.$emit("update:modelValue", this.center);
47
+ this.marker = new this.L.Marker(this.center, {
48
+ icon: new this.L.icon({
49
+ iconUrl: this.iconMarker,
50
+ iconSize: [30, 30],
51
+ iconAnchor: [15, 30],
52
+ popupAnchor: [0, -30]
53
+ }),
54
+ });
55
+ this.map.addLayer(this.marker);
56
+ this.marker.bindPopup(this.$t("map_move_to_location", 'renusify')).openPopup();
41
57
 
42
- },
43
- emit(e) {
44
- this.center = e
45
- this.$emit("update:modelValue", this.center);
46
- if (this.marker) {
47
- this.marker.setLatLng(this.center);
48
- this.map.closePopup();
49
- }
58
+ },
59
+ emit(e) {
60
+ this.center = e
61
+ this.$emit("update:modelValue", this.center);
62
+ if (this.marker) {
63
+ this.marker.setLatLng(this.center);
64
+ this.map.closePopup();
65
+ }
50
66
 
51
- }
52
- }
53
67
  }
54
- </script>
68
+ }
69
+ }
70
+ </script>
@@ -1,25 +1,26 @@
1
1
  <template>
2
- <r-row class="h-center">
3
- <r-col class="col-12 overflow-auto" >
4
- <div :class="`color-${type}`"
5
- class="mb-2 br-md"
6
- :key="i"
7
- v-for="(item,i) in items">
8
- <r-container>
9
- <r-row>
10
- <r-col class="col-auto">
11
- {{$t(i)}}:
12
- </r-col>
13
- <r-col>
14
- <div v-for="(er,k) in item" :key="k">
15
- {{$t(er)}}
16
- </div>
17
- </r-col>
18
- </r-row>
19
- </r-container>
20
- </div>
21
- </r-col>
22
- </r-row>
2
+ <div class="h-center">
3
+ <template v-for="(item,i) in items"
4
+ :key="i">
5
+ <slot>
6
+ <div :class="`color-${type}`"
7
+ class="mb-2 br-md">
8
+ <r-container>
9
+ <r-row>
10
+ <r-col class="col-auto">
11
+ {{ $t(i) }}:
12
+ </r-col>
13
+ <r-col>
14
+ <div v-for="(er,k) in item" :key="k">
15
+ {{ $t(er) }}
16
+ </div>
17
+ </r-col>
18
+ </r-row>
19
+ </r-container>
20
+ </div>
21
+ </slot>
22
+ </template>
23
+ </div>
23
24
  </template>
24
25
 
25
26
  <script>
@@ -1,10 +1,12 @@
1
1
  <template>
2
2
  <teleport :to="`.${$r.prefix}app`">
3
- <transition :name="animate">
3
+ <div v-if="modelValue&&!noOverlay" :class="{
4
+ [`${$r.prefix}modal-overlay`]:true
5
+ }"></div>
6
+ <transition :name="c_animate">
4
7
  <div v-if="modelValue" :class="{
5
8
  [`${$r.prefix}modal`]:true,
6
- 'h-end': bottom,
7
- 'modal-no-overlay': noOverlay,
9
+ 'h-end': bottom||fullHeight,
8
10
  'animate-modal-vibrate': run_animate,
9
11
  }" v-bind="$attrs" @click.self="close"
10
12
  >
@@ -56,10 +58,7 @@ export default {
56
58
  routeHistory: String,
57
59
  closebtn: {type: Boolean, default: true},
58
60
  color: String,
59
- animate: {
60
- type: String,
61
- default: 'scale'
62
- }
61
+ animate: String
63
62
  },
64
63
  emits: ['update:modelValue'],
65
64
  data() {
@@ -111,6 +110,20 @@ export default {
111
110
  }
112
111
  }
113
112
  },
113
+ computed: {
114
+ c_animate() {
115
+ if (this.animate) {
116
+ return this.animate
117
+ }
118
+ if (this.bottom) {
119
+ return 'slide-up'
120
+ }
121
+ if (this.fullHeight) {
122
+ return 'slide-up'
123
+ }
124
+ return 'scale'
125
+ }
126
+ },
114
127
  methods: {
115
128
  close(force = false) {
116
129
  if (this.closable || force === true) {
@@ -1,31 +1,34 @@
1
1
  @import "../../style/include";
2
2
 
3
+ .#{$prefix}modal-overlay {
4
+ width: 100%;
5
+ height: 100%;
6
+ position: fixed;
7
+ left: 0;
8
+ right: 0;
9
+ z-index: map_get($z-index, 'important');
10
+ background-color: var(--color-overlay);
11
+ backdrop-filter: blur(3px) grayscale(30%);
12
+ }
13
+
3
14
  .#{$prefix}modal {
4
15
  align-items: center;
5
16
  flex-direction: column;
6
17
  display: flex;
7
- left: -50%;
8
- top: -50%;
9
- width: 200%;
10
- height: 200%;
18
+ left: 0;
19
+ top: 0;
20
+ width: 100%;
21
+ height: 100%;
11
22
  justify-content: center;
12
23
  position: fixed;
13
24
  z-index: map_get($z-index, 'important');
14
25
  outline: none;
15
26
 
16
-
17
- &:not(.modal-no-overlay) {
18
- background-color: var(--color-overlay);
19
- }
20
-
21
27
  .modal-content {
22
- border: 1px solid var(--color-border);
23
- }
24
-
25
- &:not(.modal-no-overlay) {
26
- backdrop-filter: blur(3px) grayscale(30%);
28
+ border: 1px solid var(--color-border);
27
29
  }
28
30
 
31
+
29
32
  .modal-btn {
30
33
  width: 100%;
31
34
  position: relative;
@@ -21,11 +21,9 @@
21
21
  @click.prevent="handle(item.on_click)"
22
22
  @hide="hideChild(item.id,item.on_close)">
23
23
 
24
- <template v-slot:content>
25
- <slot name="content" :data="item.content">
26
- {{item.content}}
27
- </slot>
28
- </template>
24
+ <slot :data="item">
25
+ {{ item }}
26
+ </slot>
29
27
 
30
28
  </notification>
31
29
  </div>
@@ -60,12 +58,6 @@ export default {
60
58
  timeout: {
61
59
  type: Number,
62
60
  default: 4000
63
- },
64
- eventShow: {
65
- default: 'notify'
66
- },
67
- eventHide: {
68
- default: 'hide-notify'
69
61
  }
70
62
  },
71
63
  data () {
@@ -116,8 +108,8 @@ export default {
116
108
  }
117
109
  },
118
110
  registerBusMethods () {
119
- window.renusifyBus.on(this.eventShow, this.showMe)
120
- window.renusifyBus.on(this.eventHide, this.hideMe)
111
+ window.renusifyBus.on('r-notify', this.showMe)
112
+ window.renusifyBus.on('hide-r-notify', this.hideMe)
121
113
  }
122
114
  },
123
115
  created () {
@@ -126,26 +118,26 @@ export default {
126
118
  }
127
119
  </script>
128
120
  <style lang="scss" scoped>
129
- @import '../../../style/include';
121
+ @import '../../style/include';
130
122
 
131
123
  .#{$prefix}notify {
132
- display: flex;
133
- align-items: center;
134
- padding: 10px;
135
- position: fixed;
136
- width: auto;
137
- height: auto;
138
- z-index: map_get($z-index, 'medium');;
139
- overflow-y: auto;
140
- max-height: 100%;
124
+ display: flex;
125
+ align-items: center;
126
+ padding: 10px;
127
+ position: fixed;
128
+ width: auto;
129
+ height: auto;
130
+ z-index: map_get($z-index, 'medium');
131
+ overflow-y: auto;
132
+ max-height: 100%;
141
133
 
142
- &.bottom-pos {
143
- bottom: 0;
144
- }
134
+ &.bottom-pos {
135
+ bottom: 0;
136
+ }
145
137
 
146
- &.top-pos {
147
- top: 0;
148
- }
138
+ &.top-pos {
139
+ top: 0;
140
+ }
149
141
 
150
142
  &.right-pos {
151
143
  right: 0;
@@ -3,15 +3,15 @@
3
3
  :name="`slide-fade-${pos}`"
4
4
  >
5
5
  <div v-if="show" :class="[status, 'notify-msg']" :style="{ width: width }">
6
- <slot name="content">
7
- <div>
8
- <h3 class="title"><b>{{content.title}}</b></h3>
9
- <p class="subtitle-1 ma-0">{{content.text}}</p>
10
- </div>
6
+ <slot>
7
+ <div>
8
+ <h3 class="title"><b>{{ content.title }}</b></h3>
9
+ <p class="subtitle-1 ma-0">{{ content.text }}</p>
10
+ </div>
11
11
  </slot>
12
- <r-btn class="h-end" icon text @click="hideMe">
13
- <r-icon v-html="$r.icons.close"></r-icon>
14
- </r-btn>
12
+ <r-btn class="h-end" icon text @click.prevent.stop="hideMe">
13
+ <r-icon v-html="$r.icons.close"></r-icon>
14
+ </r-btn>
15
15
  </div>
16
16
  </transition>
17
17
  </template>
@@ -62,7 +62,7 @@ export default {
62
62
  }
63
63
  </script>
64
64
  <style lang="scss">
65
- @import "renusify/style/_include.scss";
65
+ @import "../../style/include";
66
66
 
67
67
  .notify-msg {
68
68
  display: flex;
@@ -71,7 +71,7 @@ export default {
71
71
  padding: 10px;
72
72
  border-radius: map-get($borders, 'md');
73
73
  position: relative;
74
- z-index: 9999;
74
+ z-index: map_get($z-index, 'important');
75
75
  margin: 0.3rem 0;
76
76
  }
77
77
  </style>
@@ -0,0 +1,27 @@
1
+ class Notify {
2
+ constructor() {
3
+ this._config = {
4
+ handler: (msg) => {
5
+ },
6
+ bus: 'renusifyBus'
7
+ };
8
+ }
9
+
10
+ show(message) {
11
+ const config = this._config;
12
+ setTimeout(() => {
13
+ window[config.bus].emit('r-notify', message);
14
+ }, 100);
15
+ }
16
+
17
+ hide() {
18
+ const config = this._config;
19
+ window[config.bus].emit('hide-r-notify');
20
+ }
21
+
22
+ listener() {
23
+ window[this._config.bus].on('r-notify', this._config.handler);
24
+ }
25
+ }
26
+
27
+ export default new Notify()
@@ -1,9 +1,10 @@
1
1
  <template>
2
- <div :class="$r.prefix + 'search-box'">
2
+ <div :class="[$r.prefix + 'search-box',{
3
+ 'to-top': openToTop}]">
3
4
  <template v-if="!closable || show">
4
5
  <div
5
6
  v-click-outside="handleclose"
6
- :class="[inputClass, { 'z-important search-open': open }]"
7
+ :class="[inputControlClass, { 'z-important search-open': open }]"
7
8
  class="search-input"
8
9
  >
9
10
  <span v-if="categories" class="w-30">
@@ -11,9 +12,11 @@
11
12
  v-model="category"
12
13
  :items="categories"
13
14
  class="mt-0"
15
+ inputControlClass="ps-2"
14
16
  disable-search
15
17
  first-select
16
18
  hide
19
+ tile
17
20
  justValue
18
21
  ></r-select-input>
19
22
  </span>
@@ -37,8 +40,7 @@
37
40
  <r-card
38
41
  v-if="open"
39
42
  :class="{
40
- 'card-tile': $attrs.tile !== undefined && $attrs.tile !== false,
41
- 'to-top': openToTop,
43
+ 'card-tile': $attrs.tile !== undefined && $attrs.tile !== false
42
44
  }"
43
45
  class="card-search z-important"
44
46
  >
@@ -82,7 +84,7 @@ export default {
82
84
  },
83
85
  label: String,
84
86
  url: String,
85
- inputClass: [String, Object, Array],
87
+ inputControlClass: [String, Object, Array],
86
88
  query: {
87
89
  type: String,
88
90
  default: "search",
@@ -161,8 +163,28 @@ export default {
161
163
  .#{$prefix}search-box {
162
164
  position: relative;
163
165
 
164
- .to-top {
165
- bottom: 42px;
166
+ &.to-top {
167
+ .card-search {
168
+ bottom: 47px;
169
+ border-radius: map-get($borders, "md") map-get($borders, "md") 0 0;
170
+ }
171
+
172
+ .search-open {
173
+ border-top-left-radius: 0px !important;
174
+ border-top-right-radius: 0px !important;
175
+ }
176
+ }
177
+
178
+ &:not(&.to-top) {
179
+ .card-search {
180
+ top: 47px;
181
+ border-radius: 0 0 map-get($borders, "md") map-get($borders, "md");
182
+ }
183
+
184
+ .search-open {
185
+ border-bottom-left-radius: 0px !important;
186
+ border-bottom-right-radius: 0px !important;
187
+ }
166
188
  }
167
189
 
168
190
  .search-input {
@@ -178,10 +200,6 @@ export default {
178
200
  }
179
201
  }
180
202
 
181
- .search-open {
182
- border-bottom-left-radius: 0px !important;
183
- border-bottom-right-radius: 0px !important;
184
- }
185
203
 
186
204
  input {
187
205
  outline: none;
@@ -198,9 +216,9 @@ export default {
198
216
  width: 100%;
199
217
  overflow-y: auto;
200
218
  max-height: 300px;
201
- border-radius: 0 0 map-get($borders, "md") map-get($borders, "md");
202
219
  }
203
220
 
221
+
204
222
  .search-shadow {
205
223
  position: fixed;
206
224
  width: 100vw;
@@ -294,6 +294,7 @@ export default {
294
294
  width: 100%;
295
295
  position: relative;
296
296
  display: flex;
297
+ height: 100%;
297
298
  }
298
299
 
299
300
  .slider-dots {