layers-design-system 1.0.118 → 1.1.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "layers-design-system",
3
3
  "main": "src/main.js",
4
- "version": "1.0.118",
4
+ "version": "1.1.0",
5
5
  "scripts": {
6
6
  "start": "vue-cli-service serve ./src/main-docs.js",
7
7
  "build": "vue-cli-service build --target lib ./src/main.js",
@@ -30,6 +30,7 @@
30
30
  :selectable="selectable"
31
31
  :autoLoadMore="false"
32
32
  pagination
33
+ limitPerPage="10"
33
34
  :style="{'--l-table-primary-color': 'var(--color-aqua)'}"
34
35
  />
35
36
  </div>
@@ -89,7 +90,7 @@ export default {
89
90
  const total = 451
90
91
 
91
92
  var items = [];
92
- for (var i = offset; i < offset + Math.min(total - offset, 50); i++) {
93
+ for (var i = offset; i < offset + Math.min(total - offset, limit); i++) {
93
94
  items.push({ id: i, code: "#" + (i + 1), "dueAt": new Date(), price: {amount: i * 50}, customer: {name: "Teste da Silva"}, status: "paid" });
94
95
  }
95
96
 
@@ -260,6 +260,14 @@ export default {
260
260
  type: Boolean,
261
261
  default: true,
262
262
  },
263
+
264
+ /**
265
+ * If set, will load this number of rows at a time
266
+ */
267
+ limitPerPage: {
268
+ type: Number,
269
+ default: 50,
270
+ },
263
271
  },
264
272
 
265
273
  mounted() {
@@ -275,7 +283,6 @@ export default {
275
283
 
276
284
  // Internal identification for hole state of loaded pages
277
285
  id: 0,
278
- perPage: 50,
279
286
  extraRows: 15,
280
287
 
281
288
  lastComputedOffsetY: 0,
@@ -310,6 +317,11 @@ export default {
310
317
  },
311
318
 
312
319
  computed: {
320
+
321
+ perPage() {
322
+ return this.limitPerPage;
323
+ },
324
+
313
325
  pagesCount() {
314
326
  return Math.floor(this.totalCount / this.perPage) + 1;
315
327
  },
@@ -10,6 +10,7 @@
10
10
  rel="nofollow noopener noreferrer"
11
11
  style="display: inline"
12
12
  :href="dataLink"
13
+ :open-delay="tooltipDelay"
13
14
  >
14
15
  {{ dataLink }}
15
16
  </a>
@@ -19,6 +20,7 @@
19
20
  v-for="(button, idx) in boxButtons"
20
21
  :key="idx"
21
22
  :content="button.tooltip"
23
+ :open-delay="tooltipDelay"
22
24
  >
23
25
  <l-icon
24
26
  size="20"
@@ -48,6 +50,7 @@ export default {
48
50
  event: 'remove',
49
51
  },
50
52
  ],
53
+ tooltipDelay: 125,
51
54
  }
52
55
  },
53
56
 
@@ -24,6 +24,7 @@
24
24
  :key="markUp.name"
25
25
  :content="markUp.tooltip"
26
26
  class="item"
27
+ :open-delay="tooltipDelay"
27
28
  >
28
29
  <l-button
29
30
  @click="markUpText(markUp.name)"
@@ -156,6 +157,7 @@ export default {
156
157
  ],
157
158
  showLinkBox: false,
158
159
  isEditorFocused: null,
160
+ tooltipDelay: 125,
159
161
  }
160
162
  },
161
163
 
@@ -219,6 +221,10 @@ export default {
219
221
 
220
222
  return hasSomeNode || hasSomeMark
221
223
  },
224
+
225
+ addSpaceToFinalParagraphTag(text) {
226
+ return text.replace(/<\/p>/g, ' </p>')
227
+ },
222
228
  },
223
229
 
224
230
  computed: {
@@ -229,12 +235,13 @@ export default {
229
235
  return this.editor.isActive('link')
230
236
  },
231
237
  finalText() {
232
- return DOMPurify.sanitize(
233
- removeEmptyTags(mountLink(this.editor.getHTML())),
234
- {
235
- ADD_ATTR: ['target'],
236
- }
237
- )
238
+ const textEditorHTML = this.editor.getHTML()
239
+ const textEditorHTMLSpaced = this.addSpaceToFinalParagraphTag(textEditorHTML)
240
+ const textEditorHTMLWithLinks = mountLink(textEditorHTMLSpaced)
241
+
242
+ return DOMPurify.sanitize(removeEmptyTags(textEditorHTMLWithLinks), {
243
+ ADD_ATTR: ['target'],
244
+ })
238
245
  },
239
246
  currentTextSelection() {
240
247
  const { view, state } = this.editor