renusify 2.2.6 → 2.3.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 (105) hide show
  1. package/components/app/style.scss +6 -4
  2. package/components/app/toast/style.scss +4 -3
  3. package/components/avatar/style.scss +2 -2
  4. package/components/bar/bottomNavigationCircle.vue +7 -5
  5. package/components/bar/scss/bottomNav.scss +15 -12
  6. package/components/bar/scss/toolbar.scss +32 -30
  7. package/components/bar/toolbar/index.vue +2 -2
  8. package/components/bar/toolbar/laptop.vue +1 -1
  9. package/components/bar/toolbar/mobile.vue +1 -1
  10. package/components/breadcrumb/bredcrumbItem.vue +1 -1
  11. package/components/breadcrumb/style.scss +6 -6
  12. package/components/button/index.vue +1 -1
  13. package/components/button/style.scss +41 -36
  14. package/components/calendar/index.vue +4 -3
  15. package/components/card/index.vue +1 -1
  16. package/components/card/style.scss +14 -11
  17. package/components/chart/chart.vue +3 -4
  18. package/components/chart/worldMap.vue +2 -2
  19. package/components/chat/MessageList.vue +122 -119
  20. package/components/chat/chatInput.vue +3 -3
  21. package/components/chat/chatMsg.vue +23 -21
  22. package/components/chat/index.vue +2 -2
  23. package/components/chip/style.scss +21 -16
  24. package/components/codeEditor/highlightCss.vue +1 -1
  25. package/components/codeEditor/highlightHtml.vue +1 -1
  26. package/components/codeEditor/highlightJs.vue +1 -1
  27. package/components/codeEditor/index.vue +6 -6
  28. package/components/container/style.scss +12 -10
  29. package/components/content/index.vue +17 -14
  30. package/components/cropper/index.vue +2 -2
  31. package/components/float/index.vue +456 -454
  32. package/components/form/camInput/index.vue +2 -2
  33. package/components/form/checkInput/index.vue +2 -2
  34. package/components/form/checkboxInput/index.vue +5 -4
  35. package/components/form/colorInput/Alpha.vue +1 -1
  36. package/components/form/colorInput/Preview.vue +1 -1
  37. package/components/form/colorInput/Saturation.vue +1 -1
  38. package/components/form/colorInput/index.vue +2 -2
  39. package/components/form/colorInput/picker.vue +10 -8
  40. package/components/form/dateInput/index.vue +2 -2
  41. package/components/form/fileInput/index.vue +0 -3
  42. package/components/form/fileInput/single.vue +3 -3
  43. package/components/form/groupInput/index.vue +5 -4
  44. package/components/form/input/index.vue +31 -29
  45. package/components/form/jsonInput/JsonView.vue +5 -4
  46. package/components/form/jsonInput/index.vue +35 -33
  47. package/components/form/numberInput/index.vue +11 -8
  48. package/components/form/radioInput/index.vue +6 -4
  49. package/components/form/rangeInput/index.vue +11 -10
  50. package/components/form/ratingInput/index.vue +5 -5
  51. package/components/form/selectInput/index.vue +8 -6
  52. package/components/form/switchInput/index.vue +9 -7
  53. package/components/form/telInput/index.vue +2 -2
  54. package/components/form/text-editor/style.scss +10 -7
  55. package/components/form/textArea/index.vue +2 -2
  56. package/components/form/timeInput/timepicker.vue +4 -3
  57. package/components/form/unitInput/index.vue +8 -6
  58. package/components/icon/style.scss +5 -4
  59. package/components/img/index.vue +2 -2
  60. package/components/index.js +0 -2
  61. package/components/list/index.vue +1 -1
  62. package/components/list/style.scss +6 -5
  63. package/components/map/index.vue +3 -3
  64. package/components/map/route.vue +2 -2
  65. package/components/menu/index.vue +4 -3
  66. package/components/modal/style.scss +19 -15
  67. package/components/nestable/index.vue +4 -4
  68. package/components/notify/index.vue +55 -53
  69. package/components/notify/notification.vue +5 -3
  70. package/components/progress/style.scss +8 -5
  71. package/components/searchBox/index.vue +15 -12
  72. package/components/skeleton/index.vue +5 -3
  73. package/components/slider/index.vue +18 -15
  74. package/components/swiper/index.vue +2 -2
  75. package/components/table/crud/index.vue +2 -2
  76. package/components/table/style.scss +87 -82
  77. package/components/tabs/index.vue +2 -2
  78. package/components/timeline/index.vue +64 -61
  79. package/components/tree/index.vue +4 -4
  80. package/components/tree/tree-element.vue +2 -2
  81. package/directive/animate/style.scss +72 -41
  82. package/directive/drag/index.js +1 -1
  83. package/directive/ripple/style.scss +6 -4
  84. package/directive/skeleton/style.scss +0 -2
  85. package/directive/sortable/index.js +1 -1
  86. package/directive/sortable/style.scss +7 -3
  87. package/directive/title/style.scss +4 -2
  88. package/index.js +10 -10
  89. package/package.json +1 -1
  90. package/style/app.scss +64 -56
  91. package/style/colors.scss +26 -22
  92. package/style/functions/index.scss +8 -8
  93. package/style/mixins/container.scss +24 -19
  94. package/style/mixins/index.scss +19 -15
  95. package/style/mixins/utilities.scss +26 -21
  96. package/style/style.scss +5 -6
  97. package/style/transitions.scss +14 -13
  98. package/style/variables/base.scss +26 -24
  99. package/style/variables/utilities.scss +35 -34
  100. package/components/html2pdf/index.js +0 -4
  101. package/components/html2pdf/index.vue +0 -280
  102. package/components/html2pdf/pageBreak.js +0 -1
  103. package/components/html2pdf/pageBreak.vue +0 -12
  104. package/style/_include.scss +0 -3
  105. package/style/variables/index.scss +0 -3
@@ -1,280 +0,0 @@
1
- <template>
2
- <div :class="`${this.$r.prefix}html2pdf`" v-if="show">
3
- <section
4
- class="html2pdf-content"
5
- :style="`width: ${pdfContentWidth};`"
6
- ref="html2pdfContent"
7
- >
8
- <slot/>
9
- </section>
10
- <transition name="fade">
11
- <section class="preview" v-if="pdfFile">
12
- <r-btn icon tile @click.prevent="closePreview()" class="color-error">
13
- <r-icon v-html="$r.icons.close"></r-icon>
14
- </r-btn>
15
-
16
- <iframe :src="pdfFile" width="100%" height="100%"/>
17
- </section>
18
- </transition>
19
- </div>
20
- </template>
21
- <script>
22
- export default {
23
- props: {
24
- enableDownload: {
25
- type: Boolean,
26
- default: true
27
- },
28
- enableLinks: {
29
- type: Boolean,
30
- default: true
31
- },
32
- previewModal: {
33
- type: Boolean,
34
- default: false
35
- },
36
- filename: {
37
- type: String,
38
- default: `${new Date().getTime()}`
39
- },
40
- pdfQuality: {
41
- type: Number,
42
- default: 2
43
- },
44
- pdfFormat: {
45
- default: "a4"
46
- },
47
- pdfOrientation: {
48
- type: String,
49
- default: "portrait"
50
- },
51
- pdfContentWidth: {
52
- default: "800px"
53
- },
54
- htmlToPdfOptions: {
55
- type: Object
56
- },
57
- pageBreakAuto: Number,
58
- toInlineCss: Boolean,
59
- avoidClass: String,
60
- beforeClass: String,
61
- afterClass: String
62
- },
63
- emits:['progress','has-downloaded','before-download'],
64
- data() {
65
- return {
66
- show: true,
67
- loaded: false,
68
- progress: 0,
69
- pdfFile: null
70
- };
71
- },
72
-
73
- mounted() {
74
- this.add();
75
- /*
76
- * var winPrint = window.open('', '', 'left=0,top=0,width=800,height=600,toolbar=0,scrollbars=0,status=0');
77
- winPrint.document.write('<title>Print Report</title><br /><br /> Hellow World');
78
- winPrint.document.close();
79
- winPrint.focus();
80
- winPrint.print();
81
- winPrint.close();
82
- * */
83
- },
84
- watch: {
85
- progress(val) {
86
- this.$emit("progress", val);
87
- }
88
- },
89
- methods: {
90
- add() {
91
- if (document.querySelector(`[c="${this.$r.prefix}html2pdf"]`)) {
92
- setTimeout(() => {
93
- try {
94
- //eslint-disable-next-line
95
- if (html2pdf) {
96
- this.loaded = true;
97
- this.progress = 10;
98
- } else {
99
- this.add();
100
- }
101
- } catch (e) {
102
- this.add();
103
- }
104
- }, 500);
105
- return;
106
- }
107
- let meta = document.createElement("script");
108
- meta.setAttribute("c", `${this.$r.prefix}html2pdf`);
109
- meta.setAttribute(
110
- "src",
111
- "https://raw.githack.com/eKoopmans/html2pdf/master/dist/html2pdf.bundle.js"
112
- );
113
- meta.setAttribute("crossorigin", "anonymous");
114
- meta.onload = () => {
115
- this.loaded = true;
116
- this.progress = 10;
117
- };
118
- document.head.appendChild(meta);
119
- },
120
- computedStyleToInlineStyle(element, options = [], first = true) {
121
- if (!element) {
122
- return;
123
- }
124
- if (element.className === "html2pdf__page-break") {
125
- return;
126
- }
127
- element.children.forEach(child => {
128
- this.computedStyleToInlineStyle(child, options, false);
129
- });
130
- const computedStyle = window.getComputedStyle(element);
131
- (options.properties || computedStyle).forEach(property => {
132
- element.style[property] =
133
- property === "letter-spacing"
134
- ? 0
135
- : computedStyle.getPropertyValue(property);
136
- });
137
- if (first) {
138
- element.style.height = "auto";
139
- }
140
- element.classList = [];
141
- },
142
- paginate() {
143
- const parentElement = this.$refs.html2pdfContent
144
- const ArrOfContentChildren = Array.from(parentElement.children)
145
- let childrenHeight = 0
146
- for (let childElement of ArrOfContentChildren) {
147
- const elementFirstClass = childElement.classList[0]
148
- const isPageBreakClass = elementFirstClass === 'html2pdf__page-break'
149
- if (isPageBreakClass) {
150
- childrenHeight = 0
151
- } else {
152
- const elementHeight = childElement.clientHeight
153
- const elementComputedStyle = childElement.currentStyle || window.getComputedStyle(childElement)
154
- const elementMarginTopBottom = parseInt(elementComputedStyle.marginTop) + parseInt(elementComputedStyle.marginBottom)
155
- const elementHeightWithMargin = elementHeight + elementMarginTopBottom
156
- if ((childrenHeight + elementHeight) < this.pageBreakAuto) {
157
- childrenHeight += elementHeightWithMargin
158
- } else {
159
- const section = document.createElement('div')
160
- section.classList.add('html2pdf__page-break')
161
- parentElement.insertBefore(section, childElement)
162
- childrenHeight = elementHeightWithMargin
163
- }
164
- }
165
- }
166
- },
167
- buildPdf() {
168
- if (!this.loaded) {
169
- console.error("html2pdf.js not loaded");
170
- return;
171
- }
172
- this.progress = 25;
173
- if (this.toInlineCss) {
174
- this.computedStyleToInlineStyle(this.$refs.html2pdfContent);
175
- }
176
- if (this.pageBreakAuto) {
177
- this.paginate()
178
- }
179
- this.progress = 70;
180
- this.downloadPdf();
181
- },
182
- async downloadPdf() {
183
- if (!this.loaded) {
184
- console.error("html2pdf.js not loaded");
185
- return;
186
- }
187
- const html2pdfContent = this.$refs.html2pdfContent;
188
-
189
- let options = this.getOptions();
190
- //eslint-disable-next-line
191
- this.$emit("before-download", {html2pdf, options, html2pdfContent});
192
- //eslint-disable-next-line
193
- const html2PdfSetup = html2pdf()
194
- .set(options)
195
- .from(html2pdfContent);
196
- let pdfBlobUrl = null;
197
- if (this.previewModal) {
198
- this.pdfFile = await html2PdfSetup.output("bloburl");
199
- pdfBlobUrl = this.pdfFile;
200
- }
201
- if (this.enableDownload) {
202
- pdfBlobUrl = await html2PdfSetup.save().output("bloburl");
203
- }
204
- if (pdfBlobUrl) {
205
- const res = await fetch(pdfBlobUrl);
206
- const blobFile = await res.blob();
207
- this.$emit("has-downloaded", blobFile);
208
- }
209
- this.progress = 100;
210
- },
211
- getOptions() {
212
- if (this.htmlToPdfOptions) {
213
- return this.htmlToPdfOptions;
214
- }
215
- let pagebreak = {}
216
- if (this.beforeClass && !this.pageBreakAuto) {
217
- pagebreak.mode = 'css'
218
- pagebreak.before = this.beforeClass
219
- }
220
- if (this.afterClass && !this.pageBreakAuto) {
221
- pagebreak.mode = 'css'
222
- pagebreak.after = this.afterClass
223
- }
224
- if (this.avoidClass && !this.pageBreakAuto) {
225
- pagebreak.mode = 'css'
226
- pagebreak.avoid = this.avoidClass
227
- }
228
- let d = {
229
- margin: 0,
230
- filename: `${this.filename}.pdf`,
231
- image: {
232
- type: "jpeg",
233
- quality: 1
234
- },
235
- enableLinks: this.enableLinks,
236
- html2canvas: {
237
- scale: this.pdfQuality
238
- },
239
- jsPDF: {
240
- unit: "mm",
241
- format: this.pdfFormat,
242
- orientation: this.pdfOrientation,
243
- compression: true
244
- }
245
- };
246
- if (pagebreak.mode) {
247
- console.log(pagebreak)
248
- d.pagebrak = pagebreak
249
- }
250
- return d
251
- },
252
- closePreview() {
253
- this.pdfFile = null;
254
- }
255
- }
256
- };
257
- </script>
258
-
259
- <style lang="scss">
260
- @import "../../style/include";
261
-
262
- .#{$prefix}html2pdf {
263
- .preview {
264
- position: fixed;
265
- width: 65%;
266
- min-width: 600px;
267
- height: 80vh;
268
- top: 100px;
269
- z-index: 9999999;
270
- left: 50%;
271
- transform: translateX(-50%);
272
- border-radius: map-get($borders, 'sm');
273
- box-shadow: 0px 0px 10px #00000048;
274
-
275
- iframe {
276
- border: 0;
277
- }
278
- }
279
- }
280
- </style>
@@ -1 +0,0 @@
1
- export * as rHtml2pdfPageBreak from './pageBreak.vue'
@@ -1,12 +0,0 @@
1
- <template>
2
- <div class="html2pdf__page-break"></div>
3
- </template>
4
-
5
- <script>
6
- export default {
7
- name: "pageBreak",
8
- data() {
9
- return {};
10
- }
11
- };
12
- </script>
@@ -1,3 +0,0 @@
1
- @import './functions/index';
2
- @import './mixins/index';
3
- @import './variables/index';
@@ -1,3 +0,0 @@
1
- @import "base";
2
- @import "utilities";
3
- @import "color";