renusify 2.5.2 → 3.0.0

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 (212) hide show
  1. package/components/app/index.vue +74 -22
  2. package/components/app/toast/index.vue +76 -71
  3. package/components/app/toast/toast.vue +62 -44
  4. package/components/avatar/index.vue +208 -84
  5. package/components/button/buttonConfirm.vue +53 -26
  6. package/components/button/buttonGroup.js +0 -2
  7. package/components/button/buttonGroup.vue +310 -62
  8. package/components/button/index.vue +584 -100
  9. package/components/calendar/index.js +0 -2
  10. package/components/calendar/index.vue +326 -262
  11. package/components/calendar/month.vue +64 -55
  12. package/components/calendar/year.vue +30 -25
  13. package/components/card/index.vue +139 -59
  14. package/components/codeEditor/highlightCss.vue +38 -39
  15. package/components/codeEditor/highlightHtml.vue +64 -64
  16. package/components/codeEditor/highlightJs.vue +37 -38
  17. package/components/codeEditor/index.vue +129 -79
  18. package/components/codeEditor/run.vue +225 -39
  19. package/components/codeEditor/useCodeFormatter.js +150 -0
  20. package/components/confirm/index.vue +139 -80
  21. package/components/container/col.vue +5 -4
  22. package/components/container/divider.vue +28 -19
  23. package/components/container/index.vue +34 -15
  24. package/components/container/row.vue +26 -9
  25. package/components/container/spacer.vue +2 -4
  26. package/components/container/style.scss +3 -0
  27. package/components/content/index.vue +49 -32
  28. package/components/cropper/index.vue +401 -244
  29. package/components/float/index.vue +542 -415
  30. package/components/form/addressInput/index.vue +184 -109
  31. package/components/form/camInput/index.vue +370 -244
  32. package/components/form/checkInput/index.vue +138 -71
  33. package/components/form/checkboxInput/index.vue +87 -47
  34. package/components/form/colorInput/Alpha.vue +81 -83
  35. package/components/form/colorInput/Hue.vue +91 -68
  36. package/components/form/colorInput/Preview.vue +43 -47
  37. package/components/form/colorInput/Saturation.vue +101 -86
  38. package/components/form/colorInput/index.vue +71 -39
  39. package/components/form/colorInput/picker.vue +111 -106
  40. package/components/form/colorInput/useColor.js +153 -0
  41. package/components/form/dateInput/index.vue +691 -356
  42. package/components/form/dateInput/month.vue +63 -54
  43. package/components/form/dateInput/year.vue +35 -25
  44. package/components/form/fileInput/index.js +0 -1
  45. package/components/form/fileInput/index.vue +263 -106
  46. package/components/form/fileInput/single.vue +323 -164
  47. package/components/form/groupInput/index.vue +199 -101
  48. package/components/form/index.vue +189 -83
  49. package/components/form/input/index.vue +416 -377
  50. package/components/form/jsonInput/JsonView.vue +54 -56
  51. package/components/form/jsonInput/index.vue +247 -165
  52. package/components/form/maskInput/index.vue +252 -132
  53. package/components/form/numberInput/index.js +0 -1
  54. package/components/form/numberInput/index.vue +226 -117
  55. package/components/form/passwordInput/index.js +2 -1
  56. package/components/form/passwordInput/index.vue +269 -102
  57. package/components/form/radioInput/index.vue +143 -72
  58. package/components/form/rangeInput/index.vue +280 -167
  59. package/components/form/ratingInput/index.vue +57 -57
  60. package/components/form/selectInput/index.js +1 -3
  61. package/components/form/selectInput/index.vue +584 -296
  62. package/components/form/switchInput/index.vue +73 -59
  63. package/components/form/telInput/index.js +0 -1
  64. package/components/form/telInput/index.vue +238 -135
  65. package/components/form/textArea/index.vue +72 -35
  66. package/components/form/textEditor/index.vue +739 -0
  67. package/components/form/{text-editor → textEditor}/style.scss +8 -16
  68. package/components/form/textInput/index.vue +54 -32
  69. package/components/form/timeInput/index.vue +82 -55
  70. package/components/form/timeInput/range.vue +115 -94
  71. package/components/form/timeInput/timepicker.vue +382 -449
  72. package/components/form/uniqueInput/index.vue +105 -48
  73. package/components/form/unitInput/index.vue +139 -84
  74. package/components/formCreator/index.js +0 -1
  75. package/components/formCreator/index.vue +314 -148
  76. package/components/highlight/index.vue +41 -25
  77. package/components/highlight/style.scss +2 -2
  78. package/components/highlight/{mixin.js → useHighlight.js} +181 -160
  79. package/components/icon/index.vue +79 -33
  80. package/components/img/index.vue +249 -147
  81. package/components/img/preview.vue +180 -198
  82. package/components/img/svgImg.vue +42 -39
  83. package/components/index.js +5 -20
  84. package/components/infinite/index.js +1 -2
  85. package/components/infinite/index.vue +248 -66
  86. package/components/map/index.vue +428 -261
  87. package/components/map/route.vue +794 -487
  88. package/components/map/select.vue +118 -58
  89. package/components/menu/index.vue +201 -91
  90. package/components/meta/meta.js +26 -3
  91. package/components/modal/index.vue +382 -156
  92. package/components/notify/index.vue +204 -86
  93. package/components/notify/notification.vue +38 -55
  94. package/components/progress/circle.vue +189 -70
  95. package/components/progress/line.vue +266 -46
  96. package/components/searchBox/index.js +1 -3
  97. package/components/searchBox/index.vue +194 -101
  98. package/components/skeleton/index.vue +45 -20
  99. package/components/slider/index.vue +318 -156
  100. package/components/swiper/index.vue +254 -106
  101. package/components/table/crud/footer.vue +77 -53
  102. package/components/table/crud/header.vue +71 -72
  103. package/components/table/crud/index.vue +629 -399
  104. package/components/table/index.vue +721 -278
  105. package/components/timeAgo/index.vue +145 -96
  106. package/components/tour/index.vue +338 -235
  107. package/components/tree/index.vue +235 -89
  108. package/components/tree/tree-element.vue +106 -106
  109. package/directive/animate/index.js +77 -0
  110. package/directive/clickOutSide/index.js +98 -0
  111. package/directive/drag/index.js +153 -0
  112. package/directive/index.js +11 -13
  113. package/directive/intersect/index.js +263 -0
  114. package/directive/mask/index.js +67 -0
  115. package/directive/parallax/index.js +78 -0
  116. package/directive/ripple/index.js +14 -0
  117. package/directive/scroll/index.js +244 -0
  118. package/directive/sortable/index.js +274 -0
  119. package/directive/title/index.js +75 -0
  120. package/directive/touch/index.js +268 -0
  121. package/index.js +10 -8
  122. package/package.json +5 -2
  123. package/plugins/validation/Validate.js +88 -79
  124. package/scripts/generate-docs.mjs +226 -0
  125. package/scripts/menu.mjs +240 -0
  126. package/scripts/parser.mjs +1086 -0
  127. package/style/_index.scss +7 -0
  128. package/style/app.scss +13 -65
  129. package/style/colors.scss +5 -22
  130. package/style/functions/index.scss +8 -0
  131. package/style/mixins/index.scss +17 -5
  132. package/style/variables/base.scss +154 -175
  133. package/style/variables/color.scss +0 -12
  134. package/style/variables/utilities.scss +0 -180
  135. package/tools/helper.js +0 -8
  136. package/tools/icons.js +6 -1
  137. package/tools/root.js +71 -0
  138. package/components/app/style.scss +0 -41
  139. package/components/app/toast/style.scss +0 -20
  140. package/components/avatar/style.scss +0 -32
  141. package/components/bar/bottomNav.js +0 -1
  142. package/components/bar/bottomNav.vue +0 -28
  143. package/components/bar/bottomNavigationCircle.js +0 -2
  144. package/components/bar/bottomNavigationCircle.vue +0 -99
  145. package/components/bar/scss/bottomNav.scss +0 -67
  146. package/components/bar/scss/toolbar.scss +0 -174
  147. package/components/bar/toolbar/index.js +0 -8
  148. package/components/bar/toolbar/index.vue +0 -35
  149. package/components/bar/toolbar/laptop.vue +0 -33
  150. package/components/bar/toolbar/menuChilds.vue +0 -41
  151. package/components/bar/toolbar/menuLaptop.vue +0 -41
  152. package/components/bar/toolbar/menuMob.vue +0 -39
  153. package/components/bar/toolbar/mixin.js +0 -43
  154. package/components/bar/toolbar/mobile.vue +0 -34
  155. package/components/breadcrumb/bredcrumbItem.vue +0 -39
  156. package/components/breadcrumb/index.js +0 -3
  157. package/components/breadcrumb/index.vue +0 -71
  158. package/components/breadcrumb/style.scss +0 -51
  159. package/components/button/style.scss +0 -411
  160. package/components/card/style.scss +0 -86
  161. package/components/chart/chart.js +0 -1
  162. package/components/chart/chart.vue +0 -69
  163. package/components/chart/worldMap.js +0 -2
  164. package/components/chart/worldMap.vue +0 -1112
  165. package/components/chat/MessageList.vue +0 -163
  166. package/components/chat/chatInput.vue +0 -150
  167. package/components/chat/chatMsg.vue +0 -276
  168. package/components/chat/index.js +0 -11
  169. package/components/chat/index.vue +0 -113
  170. package/components/chip/index.js +0 -3
  171. package/components/chip/index.vue +0 -77
  172. package/components/chip/style.scss +0 -199
  173. package/components/codeEditor/mixin.js +0 -145
  174. package/components/countdown/index.js +0 -1
  175. package/components/countdown/index.vue +0 -105
  176. package/components/form/colorInput/mixin.js +0 -132
  177. package/components/form/fileInput/file.js +0 -148
  178. package/components/form/telInput/assets/flags.png +0 -0
  179. package/components/form/telInput/assets/flags@2x.png +0 -0
  180. package/components/form/text-editor/index.vue +0 -705
  181. package/components/icon/style.scss +0 -17
  182. package/components/infinite/div.js +0 -6
  183. package/components/infinite/div.vue +0 -193
  184. package/components/infinite/page.js +0 -3
  185. package/components/infinite/page.vue +0 -105
  186. package/components/list/index.js +0 -3
  187. package/components/list/index.vue +0 -122
  188. package/components/list/style.scss +0 -66
  189. package/components/message/index.js +0 -4
  190. package/components/message/index.vue +0 -40
  191. package/components/modal/style.scss +0 -146
  192. package/components/nestable/NestableItem.vue +0 -307
  193. package/components/nestable/editable.js +0 -44
  194. package/components/nestable/index.js +0 -1
  195. package/components/nestable/index.vue +0 -226
  196. package/components/nestable/methods.js +0 -416
  197. package/components/progress/style.scss +0 -229
  198. package/components/table/style.scss +0 -338
  199. package/components/tabs/index.js +0 -3
  200. package/components/tabs/index.vue +0 -151
  201. package/components/timeline/index.js +0 -6
  202. package/components/timeline/index.vue +0 -76
  203. package/directive/resize/index.js +0 -30
  204. package/directive/skeleton/index.js +0 -27
  205. package/directive/skeleton/style.scss +0 -37
  206. package/plugins/request/Request.js +0 -68
  207. package/style/animation.scss +0 -94
  208. package/style/style.scss +0 -8
  209. package/tools/rootable.js +0 -75
  210. /package/components/form/{text-editor → textEditor}/index.js +0 -0
  211. /package/components/form/{text-editor → textEditor}/preview.js +0 -0
  212. /package/components/form/{text-editor → textEditor}/preview.vue +0 -0
@@ -3,152 +3,227 @@
3
3
  :label="$t('country','renusify')"
4
4
  v-model="country"
5
5
  v-if="!hideCountry||!country"
6
- @update:model-value="emit(true,true)"
6
+ :readonly="readonly"
7
7
  value="id"
8
8
  :searchLink="`${baseUrl}?lang=${$r.lang}`"
9
9
  :rules="required?['required']:[]"
10
10
  :headers="{'Authorization':''}"
11
- :readonly="readonly"
12
- :tile="tile">
11
+ @update:model-value="emitAddress(true,true)">
13
12
  </r-select-input>
14
13
  <r-select-input :label="$t('state','renusify')"
15
14
  v-model="state"
16
15
  :disabled="!country"
17
16
  :key="country&&country['id']"
18
17
  v-if="show_state"
19
- @update:model-value="emit(false,true)"
18
+ :readonly="readonly"
20
19
  :searchLink="country&&`${baseUrl}/${country['id']}?lang=${$r.lang}`"
21
20
  :rules="required?['required']:[]"
22
21
  value="id"
23
22
  :headers="{'Authorization':''}"
24
- :readonly="readonly"
25
- :tile="tile">
23
+ @update:model-value="emitAddress(false,true)">
26
24
 
27
25
  </r-select-input>
28
26
  <r-select-input v-if="show_city"
29
27
  v-model="city"
30
28
  :disabled="!state"
31
29
  :key="state&&(country['id']+'-'+state['id'])"
32
- @update:model-value="emit(false,false)"
30
+ :readonly="readonly"
33
31
  :label="$t('city','renusify')"
34
32
  :searchLink="state&&`${baseUrl}/${country['id']}/${state['id']}?lang=${$r.lang}`"
35
33
  :rules="required?['required']:[]"
36
34
  value="id"
37
35
  :headers="{'Authorization':''}"
38
- :readonly="readonly"
39
- :tile="tile">
36
+ @update:model-value="emitAddress(false,false)">
40
37
 
41
38
  </r-select-input>
42
- <r-text-input v-if="show_zip" @update:model-value="emit(false,false)"
39
+ <r-text-input v-if="show_zip"
40
+ @update:model-value="emitAddress(false,false)"
43
41
  :label="$t('zip_code','renusify')"
44
42
  v-model="zip_code"
45
- :tile="tile"
46
43
  :readonly="readonly"
47
44
  :rules="required?['required']:[]"></r-text-input>
48
- <r-text-area v-if="show_street" @update:model-value="emit(false,false)"
45
+ <r-text-area v-if="show_street" @update:model-value="emitAddress(false,false)"
49
46
  :label="$t('street','renusify')"
50
47
  v-model="street"
51
- :tile="tile"
52
48
  :readonly="readonly"
53
49
  :rules="required?['required']:[]"></r-text-area>
54
50
  </template>
55
- <script>
56
-
57
- export default {
58
- name: 'r-address',
59
- inheritAttrs: false,
60
- props: {
61
- required: Boolean,
62
- stepShow: Boolean,
63
- allowCountries: Array,
64
- hideCountry: Boolean,
65
- hideState: Boolean,
66
- hideCity: Boolean,
67
- hideZipCode: Boolean,
68
- hideStreet: Boolean,
69
- readonly: Boolean,
70
- tile: {type: Boolean, default: undefined},
71
- baseUrl: {type: String, default: "https://codenus.com/api/apps/address"},
72
- defaultCountry: Object,
73
- modelValue: Object
74
- },
75
- emits:['update:modelValue'],
76
- data() {
77
- return {
78
- country: this.modelValue ? this.modelValue.country : this.defaultCountry,
79
- state: this.modelValue ? this.modelValue.state : null,
80
- city: this.modelValue ? this.modelValue.city : null,
81
- zip_code: this.modelValue ? this.modelValue.zip_code : null,
82
- street: this.modelValue ? this.modelValue.street : null
83
- }
84
- },
85
- watch: {
86
- modelValue() {
87
- this.country = this.modelValue ? this.modelValue.country : (this.defaultCountry ? this.defaultCountry : null)
88
- this.state = this.modelValue ? this.modelValue.state : null
89
- this.city = this.modelValue ? this.modelValue.city : null
90
- this.zip_code = this.modelValue ? this.modelValue.zip_code : null
91
- this.street = this.modelValue ? this.modelValue.street : null
92
- }
93
- },
94
- computed: {
95
- show_state() {
96
- if (this.stepShow) {
97
- return !this.hideState && this.country
98
- } else {
99
- return !this.hideState
100
- }
101
- },
102
- show_city() {
103
- if (this.stepShow) {
104
- return !this.hideCity && this.state
105
- } else {
106
- return !this.hideCity
107
- }
108
- },
109
- show_street() {
110
- if (this.stepShow) {
111
- return !this.hideStreet && this.city
112
- } else {
113
- return !this.hideStreet
114
- }
115
- },
116
- show_zip() {
117
- if (this.stepShow) {
118
- return !this.hideZipCode && this.city
119
- } else {
120
- return !this.hideZipCode
121
- }
122
- }
123
- },
124
- methods: {
125
- emit(clearState = false, clearCity = false) {
126
- setTimeout(() => {
127
- let r = {
128
- country: this.country,
129
- }
130
- if (clearState) {
131
- this.state = null
132
- }
133
- if (!this.hideState) {
134
- r['state'] = this.state
135
- }
136
- if (clearCity) {
137
- this.city = null
138
- }
139
- if (!this.hideCity) {
140
- r['city'] = this.city
141
- }
142
- if (!this.hideStreet) {
143
- r['street'] = this.street
144
- }
145
- if (!this.hideZipCode) {
146
- r['zip_code'] = this.zip_code
147
- }
148
- this.$emit('update:modelValue', r)
149
- }, 10)
150
- }
51
+ <script setup>
52
+ import {ref, computed, watch, nextTick} from 'vue'
53
+
54
+ defineOptions({
55
+ inheritAttrs: false
56
+ })
57
+ const props = defineProps({
58
+ /**
59
+ * Whether the address fields are required
60
+ * @type {Boolean}
61
+ */
62
+ required: Boolean,
63
+
64
+ /**
65
+ * Show fields step by step based on previous selections
66
+ * @type {Boolean}
67
+ */
68
+ stepShow: Boolean,
69
+
70
+ /**
71
+ * Array of allowed countries to show in country selector
72
+ * @type {Array}
73
+ */
74
+ allowCountries: Array,
75
+
76
+ /**
77
+ * Hide the country field
78
+ * @type {Boolean}
79
+ */
80
+ hideCountry: Boolean,
81
+
82
+ /**
83
+ * Hide the state/province field
84
+ * @type {Boolean}
85
+ */
86
+ hideState: Boolean,
87
+
88
+ /**
89
+ * Hide the city field
90
+ * @type {Boolean}
91
+ */
92
+ hideCity: Boolean,
93
+
94
+ /**
95
+ * Hide the zip/postal code field
96
+ * @type {Boolean}
97
+ */
98
+ hideZipCode: Boolean,
99
+
100
+ /**
101
+ * Hide the street address field
102
+ * @type {Boolean}
103
+ */
104
+ hideStreet: Boolean,
105
+
106
+ /**
107
+ * Make all fields read-only
108
+ * @type {Boolean}
109
+ */
110
+ readonly: Boolean,
111
+
112
+ /**
113
+ * Base URL for API calls to fetch address data
114
+ * @type {String}
115
+ * @default "https://codenus.com/api/apps/address"
116
+ */
117
+ baseUrl: {type: String, default: "https://codenus.com/api/apps/address"},
118
+
119
+ /**
120
+ * Default country to pre-select
121
+ * @type {Object}
122
+ */
123
+ defaultCountry: Object,
124
+
125
+ /**
126
+ * The address model value
127
+ * @type {Object}
128
+ */
129
+ modelValue: Object
130
+ })
131
+
132
+ const emit = defineEmits([
133
+ /**
134
+ * Emitted when address data changes
135
+ * @param {Object} address - The updated address object
136
+ * @param {Object|null} address.country - Selected country
137
+ * @param {Object|null} address.state - Selected state/province
138
+ * @param {Object|null} address.city - Selected city
139
+ * @param {String|null} address.street - Street address
140
+ * @param {String|null} address.zip_code - Zip/postal code
141
+ */
142
+ 'update:modelValue'
143
+ ])
144
+
145
+ // Reactive data
146
+ const country = ref(props.modelValue?.country || props.defaultCountry || null)
147
+ const state = ref(props.modelValue?.state || null)
148
+ const city = ref(props.modelValue?.city || null)
149
+ const zip_code = ref(props.modelValue?.zip_code || null)
150
+ const street = ref(props.modelValue?.street || null)
151
+
152
+ // Computed properties
153
+ const show_state = computed(() => {
154
+ if (props.stepShow) {
155
+ return !props.hideState && country.value
156
+ } else {
157
+ return !props.hideState
158
+ }
159
+ })
160
+
161
+ const show_city = computed(() => {
162
+ if (props.stepShow) {
163
+ return !props.hideCity && state.value
164
+ } else {
165
+ return !props.hideCity
166
+ }
167
+ })
168
+
169
+ const show_street = computed(() => {
170
+ if (props.stepShow) {
171
+ return !props.hideStreet && city.value
172
+ } else {
173
+ return !props.hideStreet
174
+ }
175
+ })
176
+
177
+ const show_zip = computed(() => {
178
+ if (props.stepShow) {
179
+ return !props.hideZipCode && city.value
180
+ } else {
181
+ return !props.hideZipCode
182
+ }
183
+ })
184
+
185
+ // Methods
186
+ /**
187
+ * Emits the current address data and optionally clears dependent fields
188
+ * @param {Boolean} clearState - Whether to clear the state field
189
+ * @param {Boolean} clearCity - Whether to clear the city field
190
+ * @returns {Promise<void>}
191
+ */
192
+ const emitAddress = async (clearState = false, clearCity = false) => {
193
+ await nextTick()
194
+ if (clearState) {
195
+ state.value = null
151
196
  }
197
+ if (clearCity) {
198
+ city.value = null
199
+ }
200
+
201
+ const result = {
202
+ country: country.value,
203
+ }
204
+
205
+ if (!props.hideState) {
206
+ result.state = state.value
207
+ }
208
+ if (!props.hideCity) {
209
+ result.city = city.value
210
+ }
211
+ if (!props.hideStreet) {
212
+ result.street = street.value
213
+ }
214
+ if (!props.hideZipCode) {
215
+ result.zip_code = zip_code.value
216
+ }
217
+
218
+ emit('update:modelValue', result)
152
219
  }
153
220
 
221
+ // Watchers
222
+ watch(() => props.modelValue, (newVal) => {
223
+ country.value = newVal?.country || (props.defaultCountry || null)
224
+ state.value = newVal?.state || null
225
+ city.value = newVal?.city || null
226
+ zip_code.value = newVal?.zip_code || null
227
+ street.value = newVal?.street || null
228
+ })
154
229
  </script>