@nethserver/ns8-ui-lib 1.3.1 → 1.4.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethserver/ns8-ui-lib",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Vue.js library for NethServer 8 UI",
5
5
  "keywords": [
6
6
  "nethserver",
@@ -383,6 +383,11 @@ export default {
383
383
  this.updateOptions();
384
384
  this.$emit("change", this.dataValue);
385
385
  },
386
+ resetValue() {
387
+ this.internalUpdateValue("");
388
+ this.filter = "";
389
+ this.$emit("change", this.dataValue);
390
+ },
386
391
  checkHighlightPosition(newHiglight) {
387
392
  if (
388
393
  this.$refs.list &&
@@ -14,6 +14,7 @@
14
14
  <template slot="title">{{ title }}</template>
15
15
  <template slot="content">
16
16
  <NsInlineNotification
17
+ v-if="isWarningShown"
17
18
  kind="warning"
18
19
  :title="warning"
19
20
  :showCloseButton="false"
@@ -69,6 +70,10 @@ export default {
69
70
  type: String,
70
71
  default: "Please read carefully"
71
72
  },
73
+ isWarningShown: {
74
+ type: Boolean,
75
+ default: true
76
+ },
72
77
  description: {
73
78
  type: String,
74
79
  default:
@@ -274,6 +274,7 @@
274
274
  :backwardText="backwardText"
275
275
  :forwardText="forwardText"
276
276
  :pageNumberLabel="pageNumberLabel"
277
+ :page="pageNumber"
277
278
  @change="paginateTable($event)"
278
279
  >
279
280
  <template v-slot:range-text="{ scope }">
@@ -457,6 +458,7 @@ export default {
457
458
  // workaround to detect click on clear search button; search is handled by filterRows() with debounce
458
459
  if (!this.searchFilter) {
459
460
  this.filteredRows = this.allRows;
461
+ this.goToFirstPage();
460
462
  this.focusElement("tableSearch");
461
463
  }
462
464
  },
@@ -467,6 +469,16 @@ export default {
467
469
  } else {
468
470
  this.filteredRows = this.defaultFilterRows();
469
471
  }
472
+ this.goToFirstPage();
473
+ },
474
+ goToFirstPage() {
475
+ if (this.pageNumber !== 1) {
476
+ this.paginateTable({
477
+ start: 1,
478
+ page: 1,
479
+ length: this.pageLength,
480
+ });
481
+ }
470
482
  },
471
483
  searchMatch(target, cleanRegex, queryText) {
472
484
  if (Array.isArray(target)) {
@@ -0,0 +1,15 @@
1
+ <!--
2
+ Copyright (C) 2025 Nethesis S.r.l.
3
+ SPDX-License-Identifier: GPL-3.0-or-later
4
+ -->
5
+ <template>
6
+ <path
7
+ id="document--security_1_"
8
+ d="M24.5,31.36c-3.782,0-6.86-3.078-6.86-6.86V17c0-0.199,0.161-0.36,0.36-0.36h13
9
+ c0.199,0,0.36,0.161,0.36,0.36v7.5C31.36,28.282,28.282,31.36,24.5,31.36z M18.36,17.36v7.14c0,3.386,2.754,6.14,6.14,6.14
10
+ s6.14-2.754,6.14-6.14v-7.14H18.36z M16,31.36H1c-0.199,0-0.36-0.161-0.36-0.36V1c0-0.199,0.161-0.36,0.36-0.36h18
11
+ c0.096,0,0.188,0.038,0.255,0.105l6,6C25.322,6.813,25.36,6.904,25.36,7v7h-0.72V7.36H19c-0.199,0-0.36-0.161-0.36-0.36V1.36H1.36
12
+ v29.28H16V31.36z M19.36,6.64h4.771L19.36,1.869V6.64z M15,27.36H5v-0.72h10V27.36z M15,23.36H5v-0.72h10V23.36z M15,19.36H5v-0.72
13
+ h10V19.36z M5,15.36v-0.72h10v0.72H5z M21,11.36H5v-0.72h16V11.36z"
14
+ />
15
+ </template>