@nethserver/ns8-ui-lib 0.1.9 → 0.1.10

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.
@@ -7,7 +7,7 @@ import CheckmarkFilled20 from '@carbon/icons-vue/es/checkmark--filled/20';
7
7
  import ErrorFilled20 from '@carbon/icons-vue/es/error--filled/20';
8
8
  import Warning20 from '@carbon/icons-vue/es/warning--filled/20';
9
9
  import { WarningFilled16, WarningAltFilled16, View16, ViewOff16 } from '@carbon/icons-vue';
10
- import crypto from 'crypto';
10
+ import crypto$1 from 'crypto';
11
11
  import OverflowMenuVertical20 from '@carbon/icons-vue/es/overflow-menu--vertical/20';
12
12
  import Close20 from '@carbon/icons-vue/es/close/20';
13
13
  import ArrowRight20 from '@carbon/icons-vue/es/arrow--right/20';
@@ -7083,7 +7083,7 @@ var NsTextInput = __vue_component__$U;
7083
7083
 
7084
7084
 
7085
7085
  var rng = function nodeRNG() {
7086
- return crypto.randomBytes(16);
7086
+ return crypto$1.randomBytes(16);
7087
7087
  };
7088
7088
 
7089
7089
  /**
@@ -7611,6 +7611,21 @@ var UtilService = {
7611
7611
  return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
7612
7612
  }).join(""));
7613
7613
  return JSON.parse(jsonPayload);
7614
+ },
7615
+
7616
+ /**
7617
+ * get the SHA256 digest of a string
7618
+ */
7619
+ async getSha256(message) {
7620
+ // encode as UTF-8
7621
+ const msgBuffer = new TextEncoder().encode(message); // hash the message
7622
+
7623
+ const hashBuffer = await crypto.subtle.digest("SHA-256", msgBuffer); // convert ArrayBuffer to Array
7624
+
7625
+ const hashArray = Array.from(new Uint8Array(hashBuffer)); // convert bytes to hex string
7626
+
7627
+ const hashHex = hashArray.map(b => b.toString(16).padStart(2, "0")).join("");
7628
+ return hashHex;
7614
7629
  }
7615
7630
 
7616
7631
  }
@@ -20190,9 +20205,9 @@ function initCloneArray(array) {
20190
20205
  var _initCloneArray = initCloneArray;
20191
20206
 
20192
20207
  /** Built-in value references. */
20193
- var Uint8Array = _root.Uint8Array;
20208
+ var Uint8Array$1 = _root.Uint8Array;
20194
20209
 
20195
- var _Uint8Array = Uint8Array;
20210
+ var _Uint8Array = Uint8Array$1;
20196
20211
 
20197
20212
  /**
20198
20213
  * Creates a clone of `arrayBuffer`.
@@ -22346,7 +22361,6 @@ var script$2 = {
22346
22361
  dragStartX: 0,
22347
22362
  dragStartValue: 0,
22348
22363
  percentage: "0%",
22349
- // internalUnlimited: false, ////
22350
22364
  internalByteUnit: "gib",
22351
22365
  isInvalid: false,
22352
22366
  radioValue: "limited"
@@ -22388,7 +22402,6 @@ var script$2 = {
22388
22402
  },
22389
22403
 
22390
22404
  created() {
22391
- // this.internalUnlimited = this.isUnlimited; ////
22392
22405
  this.radioValue = this.isUnlimited ? "unlimited" : "limited";
22393
22406
  this.internalByteUnit = this.byteUnit;
22394
22407
  },
@@ -22428,7 +22441,6 @@ var script$2 = {
22428
22441
  },
22429
22442
 
22430
22443
  isUnlimited() {
22431
- // this.internalUnlimited = this.isUnlimited; ////
22432
22444
  this.radioValue = this.isUnlimited ? "unlimited" : "limited";
22433
22445
  },
22434
22446
 
@@ -22832,11 +22844,11 @@ var __vue_staticRenderFns__$8 = [];
22832
22844
 
22833
22845
  const __vue_inject_styles__$9 = function (inject) {
22834
22846
  if (!inject) return;
22835
- inject("data-v-e726568a_0", {
22836
- source: ".range-input[data-v-e726568a]{margin-top:.5rem!important}.mib-gib[data-v-e726568a]{margin-left:1rem;margin-top:.5rem!important;margin-bottom:0!important}.human-label[data-v-e726568a]{margin-top:1rem}.no-mg-bottom[data-v-e726568a]{margin-bottom:0}.ns-byte-slider .cv-radio-group.bx--form-item[data-v-e726568a]{margin-bottom:.5rem}",
22847
+ inject("data-v-3e586a2a_0", {
22848
+ source: ".range-input[data-v-3e586a2a]{margin-top:.5rem!important}.mib-gib[data-v-3e586a2a]{margin-left:1rem;margin-top:.5rem!important;margin-bottom:0!important}.human-label[data-v-3e586a2a]{margin-top:1rem}.ns-byte-slider .cv-radio-group.bx--form-item[data-v-3e586a2a]{margin-bottom:.5rem}",
22837
22849
  map: undefined,
22838
22850
  media: undefined
22839
- }), inject("data-v-e726568a_1", {
22851
+ }), inject("data-v-3e586a2a_1", {
22840
22852
  source: ".ns-byte-slider .bx--slider-container{flex-wrap:wrap}.ns-byte-slider .bx--slider-text-input{width:5rem}.ns-byte-slider .wrapper[data-invalid]~.bx--form-requirement{display:block;overflow:visible;max-height:12.5rem;font-weight:400;color:#da1e28}",
22841
22853
  map: undefined,
22842
22854
  media: undefined
@@ -22845,7 +22857,7 @@ const __vue_inject_styles__$9 = function (inject) {
22845
22857
  /* scoped */
22846
22858
 
22847
22859
 
22848
- const __vue_scope_id__$9 = "data-v-e726568a";
22860
+ const __vue_scope_id__$9 = "data-v-3e586a2a";
22849
22861
  /* module identifier */
22850
22862
 
22851
22863
  const __vue_module_identifier__$9 = undefined;
@@ -23023,7 +23035,6 @@ var script = {
23023
23035
  dragStartX: 0,
23024
23036
  dragStartValue: 0,
23025
23037
  percentage: "0%",
23026
- // internalUnlimited: false, ////
23027
23038
  isInvalid: false,
23028
23039
  radioValue: "limited"
23029
23040
  };
@@ -23055,7 +23066,6 @@ var script = {
23055
23066
  },
23056
23067
 
23057
23068
  created() {
23058
- // this.internalUnlimited = this.isUnlimited; ////
23059
23069
  this.radioValue = this.isUnlimited ? "unlimited" : "limited";
23060
23070
  },
23061
23071
 
@@ -23094,7 +23104,6 @@ var script = {
23094
23104
  },
23095
23105
 
23096
23106
  isUnlimited() {
23097
- // this.internalUnlimited = this.isUnlimited; ////
23098
23107
  this.radioValue = this.isUnlimited ? "unlimited" : "limited";
23099
23108
  },
23100
23109
 
@@ -23413,11 +23422,11 @@ var __vue_staticRenderFns__$7 = [];
23413
23422
 
23414
23423
  const __vue_inject_styles__$7 = function (inject) {
23415
23424
  if (!inject) return;
23416
- inject("data-v-389045e0_0", {
23417
- source: ".range-input[data-v-389045e0]{margin-top:.5rem!important}.unit-label[data-v-389045e0]{margin-top:.5rem!important;margin-left:1rem}.no-mg-bottom[data-v-389045e0]{margin-bottom:0}.ns-slider .cv-radio-group.bx--form-item[data-v-389045e0]{margin-bottom:.5rem}",
23425
+ inject("data-v-03bb5d90_0", {
23426
+ source: ".range-input[data-v-03bb5d90]{margin-top:.5rem!important}.unit-label[data-v-03bb5d90]{margin-top:.5rem!important;margin-left:1rem}.ns-slider .cv-radio-group.bx--form-item[data-v-03bb5d90]{margin-bottom:.5rem}",
23418
23427
  map: undefined,
23419
23428
  media: undefined
23420
- }), inject("data-v-389045e0_1", {
23429
+ }), inject("data-v-03bb5d90_1", {
23421
23430
  source: ".ns-slider .bx--slider-container{flex-wrap:wrap}.ns-slider .bx--slider-text-input{width:5rem}.ns-slider .wrapper[data-invalid]~.bx--form-requirement{display:block;overflow:visible;max-height:12.5rem;font-weight:400;color:#da1e28}",
23422
23431
  map: undefined,
23423
23432
  media: undefined
@@ -23426,7 +23435,7 @@ const __vue_inject_styles__$7 = function (inject) {
23426
23435
  /* scoped */
23427
23436
 
23428
23437
 
23429
- const __vue_scope_id__$7 = "data-v-389045e0";
23438
+ const __vue_scope_id__$7 = "data-v-03bb5d90";
23430
23439
  /* module identifier */
23431
23440
 
23432
23441
  const __vue_module_identifier__$7 = undefined;