@nethserver/ns8-ui-lib 0.1.7 → 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';
@@ -102,6 +102,7 @@ import Router20 from '@carbon/icons-vue/es/router/20';
102
102
  import Certificate32 from '@carbon/icons-vue/es/certificate/32';
103
103
  import Certificate20 from '@carbon/icons-vue/es/certificate/20';
104
104
  import BareMetalServer20 from '@carbon/icons-vue/es/bare-metal-server/20';
105
+ import BareMetalServer32 from '@carbon/icons-vue/es/bare-metal-server/32';
105
106
  import Firewall20 from '@carbon/icons-vue/es/firewall/20';
106
107
  import Firewall32 from '@carbon/icons-vue/es/firewall/32';
107
108
  import Wikis32 from '@carbon/icons-vue/es/wikis/32';
@@ -130,6 +131,7 @@ import Asterisk32 from '@carbon/icons-vue/es/asterisk/32';
130
131
  import Box16 from '@carbon/icons-vue/es/box/16';
131
132
  import Box20 from '@carbon/icons-vue/es/box/20';
132
133
  import Box32 from '@carbon/icons-vue/es/box/32';
134
+ import UserMilitary32 from '@carbon/icons-vue/es/user--military/32';
133
135
  import CvSideNavDivider from '@carbon/vue/src/components/cv-ui-shell/cv-side-nav-divider.vue';
134
136
  import Search16 from '@carbon/icons-vue/es/search/16';
135
137
  import Close16 from '@carbon/icons-vue/es/close/16';
@@ -7081,7 +7083,7 @@ var NsTextInput = __vue_component__$U;
7081
7083
 
7082
7084
 
7083
7085
  var rng = function nodeRNG() {
7084
- return crypto.randomBytes(16);
7086
+ return crypto$1.randomBytes(16);
7085
7087
  };
7086
7088
 
7087
7089
  /**
@@ -7609,6 +7611,21 @@ var UtilService = {
7609
7611
  return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
7610
7612
  }).join(""));
7611
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;
7612
7629
  }
7613
7630
 
7614
7631
  }
@@ -8760,7 +8777,8 @@ var IconService = {
8760
8777
  Certificate32,
8761
8778
  Certificate20,
8762
8779
  BareMetalServer20,
8763
- // acme server
8780
+ // acme server, host, hostname
8781
+ BareMetalServer32,
8764
8782
  Firewall20,
8765
8783
  Firewall32,
8766
8784
  Wikis32,
@@ -8794,7 +8812,9 @@ var IconService = {
8794
8812
  Box16,
8795
8813
  // mailboxes
8796
8814
  Box20,
8797
- Box32
8815
+ Box32,
8816
+ UserMilitary32 // master user
8817
+
8798
8818
  };
8799
8819
  }
8800
8820
 
@@ -20185,9 +20205,9 @@ function initCloneArray(array) {
20185
20205
  var _initCloneArray = initCloneArray;
20186
20206
 
20187
20207
  /** Built-in value references. */
20188
- var Uint8Array = _root.Uint8Array;
20208
+ var Uint8Array$1 = _root.Uint8Array;
20189
20209
 
20190
- var _Uint8Array = Uint8Array;
20210
+ var _Uint8Array = Uint8Array$1;
20191
20211
 
20192
20212
  /**
20193
20213
  * Creates a clone of `arrayBuffer`.
@@ -22307,6 +22327,10 @@ var script$2 = {
22307
22327
  type: String,
22308
22328
  default: "Unlimited"
22309
22329
  },
22330
+ limitedLabel: {
22331
+ type: String,
22332
+ default: "Limited"
22333
+ },
22310
22334
  showHumanReadableLabel: {
22311
22335
  type: Boolean,
22312
22336
  default: false
@@ -22337,9 +22361,9 @@ var script$2 = {
22337
22361
  dragStartX: 0,
22338
22362
  dragStartValue: 0,
22339
22363
  percentage: "0%",
22340
- internalUnlimited: false,
22341
22364
  internalByteUnit: "gib",
22342
- isInvalid: false
22365
+ isInvalid: false,
22366
+ radioValue: "limited"
22343
22367
  };
22344
22368
  },
22345
22369
 
@@ -22369,12 +22393,16 @@ var script$2 = {
22369
22393
  // MiB
22370
22394
  return this.mibFormat(this.internalValue);
22371
22395
  }
22396
+ },
22397
+
22398
+ internalUnlimited() {
22399
+ return this.radioValue === "unlimited";
22372
22400
  }
22373
22401
 
22374
22402
  },
22375
22403
 
22376
22404
  created() {
22377
- this.internalUnlimited = this.isUnlimited;
22405
+ this.radioValue = this.isUnlimited ? "unlimited" : "limited";
22378
22406
  this.internalByteUnit = this.byteUnit;
22379
22407
  },
22380
22408
 
@@ -22413,7 +22441,7 @@ var script$2 = {
22413
22441
  },
22414
22442
 
22415
22443
  isUnlimited() {
22416
- this.internalUnlimited = this.isUnlimited;
22444
+ this.radioValue = this.isUnlimited ? "unlimited" : "limited";
22417
22445
  },
22418
22446
 
22419
22447
  internalUnlimited() {
@@ -22618,21 +22646,49 @@ var __vue_render__$8 = function () {
22618
22646
  "for": _vm.uid,
22619
22647
  "id": _vm.labelId
22620
22648
  }
22621
- }, [_vm._v("\n " + _vm._s(_vm.label) + "\n ")]), _vm._v(" "), _vm.showUnlimited ? _c('NsCheckbox', {
22622
- staticClass: "is-unlimited",
22649
+ }, [_vm._v("\n " + _vm._s(_vm.label) + "\n ")]), _vm._v(" "), _vm.showUnlimited ? [_c('cv-radio-group', {
22650
+ class: {
22651
+ 'no-mg-bottom': _vm.internalUnlimited
22652
+ },
22623
22653
  attrs: {
22654
+ "vertical": ""
22655
+ }
22656
+ }, [_c('cv-radio-button', {
22657
+ attrs: {
22658
+ "name": 'radio-group-' + _vm.uid,
22624
22659
  "label": _vm.unlimitedLabel,
22625
- "disabled": _vm.disabled,
22626
- "value": "checkUnlimited"
22660
+ "value": "unlimited",
22661
+ "disabled": _vm.disabled
22627
22662
  },
22628
22663
  model: {
22629
- value: _vm.internalUnlimited,
22664
+ value: _vm.radioValue,
22630
22665
  callback: function ($$v) {
22631
- _vm.internalUnlimited = $$v;
22666
+ _vm.radioValue = $$v;
22632
22667
  },
22633
- expression: "internalUnlimited"
22668
+ expression: "radioValue"
22634
22669
  }
22635
- }) : _vm._e(), _vm._v(" "), _c('div', {
22670
+ }), _vm._v(" "), _c('cv-radio-button', {
22671
+ attrs: {
22672
+ "name": 'radio-group-' + _vm.uid,
22673
+ "label": _vm.limitedLabel,
22674
+ "value": "limited",
22675
+ "disabled": _vm.disabled
22676
+ },
22677
+ model: {
22678
+ value: _vm.radioValue,
22679
+ callback: function ($$v) {
22680
+ _vm.radioValue = $$v;
22681
+ },
22682
+ expression: "radioValue"
22683
+ }
22684
+ })], 1)] : _vm._e(), _vm._v(" "), _c('div', {
22685
+ directives: [{
22686
+ name: "show",
22687
+ rawName: "v-show",
22688
+ value: !_vm.internalUnlimited,
22689
+ expression: "!internalUnlimited"
22690
+ }]
22691
+ }, [_c('div', {
22636
22692
  class: _vm.carbonPrefix + "--slider-container"
22637
22693
  }, [_vm.internalMinLabel ? _c('span', {
22638
22694
  class: _vm.carbonPrefix + "--slider__range-label"
@@ -22776,7 +22832,7 @@ var __vue_render__$8 = function () {
22776
22832
  "kind": _vm.tagKind,
22777
22833
  "disabled": _vm.disabled || _vm.internalUnlimited
22778
22834
  }
22779
- }) : _vm._e()], 1), _vm._v(" "), _vm.isInvalid ? _c('div', {
22835
+ }) : _vm._e()], 1)], 2), _vm._v(" "), _vm.isInvalid ? _c('div', {
22780
22836
  class: _vm.carbonPrefix + "--form-requirement"
22781
22837
  }, [_vm._t("invalid-message", function () {
22782
22838
  return [_vm._v(_vm._s(_vm.invalidMessage))];
@@ -22788,11 +22844,11 @@ var __vue_staticRenderFns__$8 = [];
22788
22844
 
22789
22845
  const __vue_inject_styles__$9 = function (inject) {
22790
22846
  if (!inject) return;
22791
- inject("data-v-af193c20_0", {
22792
- source: ".is-unlimited[data-v-af193c20]{margin-top:.5rem!important;margin-bottom:.5rem!important}.range-input[data-v-af193c20]{margin-top:.5rem!important}.mib-gib[data-v-af193c20]{margin-left:1rem;margin-top:.5rem!important;margin-bottom:0!important}.human-label[data-v-af193c20]{margin-top:1rem}",
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}",
22793
22849
  map: undefined,
22794
22850
  media: undefined
22795
- }), inject("data-v-af193c20_1", {
22851
+ }), inject("data-v-3e586a2a_1", {
22796
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}",
22797
22853
  map: undefined,
22798
22854
  media: undefined
@@ -22801,7 +22857,7 @@ const __vue_inject_styles__$9 = function (inject) {
22801
22857
  /* scoped */
22802
22858
 
22803
22859
 
22804
- const __vue_scope_id__$9 = "data-v-af193c20";
22860
+ const __vue_scope_id__$9 = "data-v-3e586a2a";
22805
22861
  /* module identifier */
22806
22862
 
22807
22863
  const __vue_module_identifier__$9 = undefined;
@@ -22953,6 +23009,10 @@ var script = {
22953
23009
  type: String,
22954
23010
  default: "Unlimited"
22955
23011
  },
23012
+ limitedLabel: {
23013
+ type: String,
23014
+ default: "Limited"
23015
+ },
22956
23016
  invalidMessage: {
22957
23017
  type: String,
22958
23018
  default: ""
@@ -22975,8 +23035,8 @@ var script = {
22975
23035
  dragStartX: 0,
22976
23036
  dragStartValue: 0,
22977
23037
  percentage: "0%",
22978
- internalUnlimited: false,
22979
- isInvalid: false
23038
+ isInvalid: false,
23039
+ radioValue: "limited"
22980
23040
  };
22981
23041
  },
22982
23042
 
@@ -22997,12 +23057,16 @@ var script = {
22997
23057
  let intMultiplier = parseInt(this.stepMultiplier); // default to 4 fro multiplier
22998
23058
 
22999
23059
  return isNaN(intMultiplier) ? 4 : Math.max(intMultiplier, 1);
23060
+ },
23061
+
23062
+ internalUnlimited() {
23063
+ return this.radioValue === "unlimited";
23000
23064
  }
23001
23065
 
23002
23066
  },
23003
23067
 
23004
23068
  created() {
23005
- this.internalUnlimited = this.isUnlimited;
23069
+ this.radioValue = this.isUnlimited ? "unlimited" : "limited";
23006
23070
  },
23007
23071
 
23008
23072
  mounted() {
@@ -23040,7 +23104,7 @@ var script = {
23040
23104
  },
23041
23105
 
23042
23106
  isUnlimited() {
23043
- this.internalUnlimited = this.isUnlimited;
23107
+ this.radioValue = this.isUnlimited ? "unlimited" : "limited";
23044
23108
  },
23045
23109
 
23046
23110
  internalUnlimited() {
@@ -23195,21 +23259,49 @@ var __vue_render__$7 = function () {
23195
23259
  "for": _vm.uid,
23196
23260
  "id": _vm.labelId
23197
23261
  }
23198
- }, [_vm._v("\n " + _vm._s(_vm.label) + "\n ")]), _vm._v(" "), _vm.showUnlimited ? _c('NsCheckbox', {
23199
- staticClass: "is-unlimited",
23262
+ }, [_vm._v("\n " + _vm._s(_vm.label) + "\n ")]), _vm._v(" "), _vm.showUnlimited ? [_c('cv-radio-group', {
23263
+ class: {
23264
+ 'no-mg-bottom': _vm.internalUnlimited
23265
+ },
23266
+ attrs: {
23267
+ "vertical": ""
23268
+ }
23269
+ }, [_c('cv-radio-button', {
23200
23270
  attrs: {
23271
+ "name": 'radio-group-' + _vm.uid,
23201
23272
  "label": _vm.unlimitedLabel,
23202
- "disabled": _vm.disabled,
23203
- "value": "checkUnlimited"
23273
+ "value": "unlimited",
23274
+ "disabled": _vm.disabled
23204
23275
  },
23205
23276
  model: {
23206
- value: _vm.internalUnlimited,
23277
+ value: _vm.radioValue,
23207
23278
  callback: function ($$v) {
23208
- _vm.internalUnlimited = $$v;
23279
+ _vm.radioValue = $$v;
23209
23280
  },
23210
- expression: "internalUnlimited"
23281
+ expression: "radioValue"
23211
23282
  }
23212
- }) : _vm._e(), _vm._v(" "), _c('div', {
23283
+ }), _vm._v(" "), _c('cv-radio-button', {
23284
+ attrs: {
23285
+ "name": 'radio-group-' + _vm.uid,
23286
+ "label": _vm.limitedLabel,
23287
+ "value": "limited",
23288
+ "disabled": _vm.disabled
23289
+ },
23290
+ model: {
23291
+ value: _vm.radioValue,
23292
+ callback: function ($$v) {
23293
+ _vm.radioValue = $$v;
23294
+ },
23295
+ expression: "radioValue"
23296
+ }
23297
+ })], 1)] : _vm._e(), _vm._v(" "), _c('div', {
23298
+ directives: [{
23299
+ name: "show",
23300
+ rawName: "v-show",
23301
+ value: !_vm.internalUnlimited,
23302
+ expression: "!internalUnlimited"
23303
+ }]
23304
+ }, [_c('div', {
23213
23305
  class: _vm.carbonPrefix + "--slider-container"
23214
23306
  }, [_vm.internalMinLabel ? _c('span', {
23215
23307
  class: _vm.carbonPrefix + "--slider__range-label"
@@ -23318,7 +23410,7 @@ var __vue_render__$7 = function () {
23318
23410
  }
23319
23411
  }), _vm._v(" "), _c('span', {
23320
23412
  class: ["unit-label", (_obj$4 = {}, _obj$4[_vm.carbonPrefix + "--label--disabled"] = _vm.disabled || _vm.internalUnlimited, _obj$4)]
23321
- }, [_vm._v(_vm._s(_vm.unitLabel))])])], 1), _vm._v(" "), _vm.isInvalid ? _c('div', {
23413
+ }, [_vm._v(_vm._s(_vm.unitLabel))])])])], 2), _vm._v(" "), _vm.isInvalid ? _c('div', {
23322
23414
  class: _vm.carbonPrefix + "--form-requirement"
23323
23415
  }, [_vm._t("invalid-message", function () {
23324
23416
  return [_vm._v(_vm._s(_vm.invalidMessage))];
@@ -23330,11 +23422,11 @@ var __vue_staticRenderFns__$7 = [];
23330
23422
 
23331
23423
  const __vue_inject_styles__$7 = function (inject) {
23332
23424
  if (!inject) return;
23333
- inject("data-v-89974358_0", {
23334
- source: ".is-unlimited[data-v-89974358]{margin-top:.5rem!important;margin-bottom:.5rem!important}.range-input[data-v-89974358]{margin-top:.5rem!important}.unit-label[data-v-89974358]{margin-top:.5rem!important;margin-left:1rem}",
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}",
23335
23427
  map: undefined,
23336
23428
  media: undefined
23337
- }), inject("data-v-89974358_1", {
23429
+ }), inject("data-v-03bb5d90_1", {
23338
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}",
23339
23431
  map: undefined,
23340
23432
  media: undefined
@@ -23343,7 +23435,7 @@ const __vue_inject_styles__$7 = function (inject) {
23343
23435
  /* scoped */
23344
23436
 
23345
23437
 
23346
- const __vue_scope_id__$7 = "data-v-89974358";
23438
+ const __vue_scope_id__$7 = "data-v-03bb5d90";
23347
23439
  /* module identifier */
23348
23440
 
23349
23441
  const __vue_module_identifier__$7 = undefined;