@nethserver/ns8-ui-lib 0.0.53 → 0.0.57

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ns8-ui-lib
2
2
 
3
- This library includes [Vue.js](https://vuejs.org/) UI components and mixins used by NethServer 8 UI.
3
+ This library includes [Vue.js](https://vuejs.org/) UI components and mixins used by [NethServer 8](https://github.com/NethServer/ns8-core) UI.
4
4
 
5
5
  In `src/main.js` add the following to globally include NS8 components:
6
6
 
@@ -18,6 +18,7 @@ import AppSwitcher20 from '@carbon/icons-vue/es/app-switcher/20';
18
18
  import Search20 from '@carbon/icons-vue/es/search/20';
19
19
  import RowExpand20 from '@carbon/icons-vue/es/row--expand/20';
20
20
  import RowCollapse20 from '@carbon/icons-vue/es/row--collapse/20';
21
+ import Reset32 from '@carbon/icons-vue/es/reset/32';
21
22
  import Reset20 from '@carbon/icons-vue/es/reset/20';
22
23
  import Download20 from '@carbon/icons-vue/es/download/20';
23
24
  import Launch20 from '@carbon/icons-vue/es/launch/20';
@@ -75,6 +76,8 @@ import Warning16 from '@carbon/icons-vue/es/warning--filled/16';
75
76
  import Warning32 from '@carbon/icons-vue/es/warning--filled/32';
76
77
  import Power20 from '@carbon/icons-vue/es/power/20';
77
78
  import Power32 from '@carbon/icons-vue/es/power/32';
79
+ import Document20 from '@carbon/icons-vue/es/document/20';
80
+ import Document32 from '@carbon/icons-vue/es/document/32';
78
81
  import { WarningFilled16, WarningAltFilled16, View16, ViewOff16 } from '@carbon/icons-vue';
79
82
  import TrashCan20 from '@carbon/icons-vue/es/trash-can/20';
80
83
  import CvSideNavDivider from '@carbon/vue/src/components/cv-ui-shell/cv-side-nav-divider.vue';
@@ -6736,9 +6739,23 @@ var UtilService = {
6736
6739
  return this.$t("error.generic_error");
6737
6740
  },
6738
6741
 
6739
- clearErrors(context) {
6740
- for (const key of Object.keys(context.error)) {
6741
- context.error[key] = "";
6742
+ /**
6743
+ * Clear errors inside context. Used to clear previous errors before input data validation
6744
+ */
6745
+ clearErrors() {
6746
+ this.clearStrings(this.error);
6747
+ },
6748
+
6749
+ clearStrings(obj) {
6750
+ for (const key of Object.keys(obj)) {
6751
+ if (typeof obj[key] == "string") {
6752
+ obj[key] = "";
6753
+ } else if (typeof obj[key] == "object") {
6754
+ // recursion
6755
+ this.clearStrings(obj[key]);
6756
+ } else {
6757
+ console.error("unexpected object type:", typeof obj[key]);
6758
+ }
6742
6759
  }
6743
6760
  },
6744
6761
 
@@ -7792,6 +7809,8 @@ var IconService = {
7792
7809
  RowExpand20,
7793
7810
  RowCollapse20,
7794
7811
  Reset20,
7812
+ Reset32,
7813
+ // restore
7795
7814
  Download20,
7796
7815
  Launch20,
7797
7816
  // open app, open external link
@@ -7869,7 +7888,9 @@ var IconService = {
7869
7888
  Warning32,
7870
7889
  Power20,
7871
7890
  // enable, disable
7872
- Power32
7891
+ Power32,
7892
+ Document20,
7893
+ Document32
7873
7894
  };
7874
7895
  }
7875
7896
 
@@ -8300,7 +8321,7 @@ var __vue_render__$a = function () {
8300
8321
  staticClass: "td label"
8301
8322
  }, [_vm._v(_vm._s(_vm.totalFileCountLabel))]), _vm._v(" "), _c('div', {
8302
8323
  staticClass: "td"
8303
- }, [_vm.status[_vm.backup.id] && _vm.status[_vm.backup.id].total_file_count ? _c('span', [_vm._v("\n " + _vm._s(_vm._f("humanFormat")(_vm.status[_vm.backup.id].total_file_count)) + "\n (" + _vm._s(_vm.status[_vm.backup.id].total_file_count) + ")\n ")]) : _c('span', [_vm._v("-")])])])]);
8324
+ }, [_vm.status[_vm.backup.id] && _vm.status[_vm.backup.id].total_file_count ? _c('span', [_vm._v("\n " + _vm._s(_vm.status[_vm.backup.id].total_file_count) + "\n ")]) : _c('span', [_vm._v("-")])])])]);
8304
8325
  };
8305
8326
 
8306
8327
  var __vue_staticRenderFns__$a = [];
@@ -8308,8 +8329,8 @@ var __vue_staticRenderFns__$a = [];
8308
8329
 
8309
8330
  const __vue_inject_styles__$a = function (inject) {
8310
8331
  if (!inject) return;
8311
- inject("data-v-61bac27a_0", {
8312
- source: ".ns-backup-card-details[data-v-61bac27a]{display:contents}.tr[data-v-61bac27a]{display:table-row}.td[data-v-61bac27a]{display:table-cell}.label[data-v-61bac27a]{padding-right:.75rem;font-weight:700;text-align:right;padding-bottom:.5rem}",
8332
+ inject("data-v-25453d1c_0", {
8333
+ source: ".ns-backup-card-details[data-v-25453d1c]{display:contents}.tr[data-v-25453d1c]{display:table-row}.td[data-v-25453d1c]{display:table-cell}.label[data-v-25453d1c]{padding-right:.75rem;font-weight:700;text-align:right;padding-bottom:.5rem}",
8313
8334
  map: undefined,
8314
8335
  media: undefined
8315
8336
  });
@@ -8317,7 +8338,7 @@ const __vue_inject_styles__$a = function (inject) {
8317
8338
  /* scoped */
8318
8339
 
8319
8340
 
8320
- const __vue_scope_id__$a = "data-v-61bac27a";
8341
+ const __vue_scope_id__$a = "data-v-25453d1c";
8321
8342
  /* module identifier */
8322
8343
 
8323
8344
  const __vue_module_identifier__$a = undefined;
@@ -8850,7 +8871,9 @@ var script$1 = {
8850
8871
  Power20,
8851
8872
  Rocket20,
8852
8873
  Launch20,
8853
- Star20
8874
+ Star20,
8875
+ Reset20,
8876
+ Save20
8854
8877
  },
8855
8878
  props: {
8856
8879
  label: {
@@ -8859,7 +8882,7 @@ var script$1 = {
8859
8882
  },
8860
8883
  icon: {
8861
8884
  type: String,
8862
- validator: value => ["", "edit", "trash", "power", "rocket", "launch", "star"].includes(value)
8885
+ validator: value => ["", "edit", "trash", "power", "rocket", "launch", "star", "reset", "save"].includes(value)
8863
8886
  }
8864
8887
  },
8865
8888
  computed: {
@@ -8895,7 +8918,11 @@ var __vue_render__$7 = function () {
8895
8918
  staticClass: "icon"
8896
8919
  }, [_c('Launch20')], 1) : _vm.icon == 'star' ? _c('span', {
8897
8920
  staticClass: "icon"
8898
- }, [_c('Star20')], 1) : _vm.hasIconSlot ? _c('span', {
8921
+ }, [_c('Star20')], 1) : _vm.icon == 'reset' ? _c('span', {
8922
+ staticClass: "icon"
8923
+ }, [_c('Reset20')], 1) : _vm.icon == 'save' ? _c('span', {
8924
+ staticClass: "icon"
8925
+ }, [_c('Save20')], 1) : _vm.hasIconSlot ? _c('span', {
8899
8926
  staticClass: "icon"
8900
8927
  }, [_vm._t("icon")], 2) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.label))])]);
8901
8928
  };
@@ -8905,8 +8932,8 @@ var __vue_staticRenderFns__$7 = [];
8905
8932
 
8906
8933
  const __vue_inject_styles__$7 = function (inject) {
8907
8934
  if (!inject) return;
8908
- inject("data-v-6f0a7acc_0", {
8909
- source: ".ns-menu-item[data-v-6f0a7acc]{display:flex;align-items:center}.icon[data-v-6f0a7acc]{margin-right:.5rem}",
8935
+ inject("data-v-9440af88_0", {
8936
+ source: ".ns-menu-item[data-v-9440af88]{display:flex;align-items:center}.icon[data-v-9440af88]{margin-right:.5rem}",
8910
8937
  map: undefined,
8911
8938
  media: undefined
8912
8939
  });
@@ -8914,7 +8941,7 @@ const __vue_inject_styles__$7 = function (inject) {
8914
8941
  /* scoped */
8915
8942
 
8916
8943
 
8917
- const __vue_scope_id__$7 = "data-v-6f0a7acc";
8944
+ const __vue_scope_id__$7 = "data-v-9440af88";
8918
8945
  /* module identifier */
8919
8946
 
8920
8947
  const __vue_module_identifier__$7 = undefined;