@nethserver/ns8-ui-lib 0.0.48 → 0.0.52
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/dist/ns8-ui-lib.esm.js +130 -37
- package/dist/ns8-ui-lib.min.js +1 -1
- package/dist/ns8-ui-lib.ssr.js +131 -40
- package/package.json +1 -1
- package/src/lib-components/NsEmptyState.vue +3 -3
- package/src/lib-components/NsInfoCard.vue +48 -15
- /package/src/lib-components/pictograms/{Bulldozer.vue → BulldozerPictogram.vue} +0 -0
- /package/src/lib-components/pictograms/{ExclamationMark.vue → ExclamationMarkPictogram.vue} +0 -0
- /package/src/lib-components/pictograms/{Gear.vue → GearPictogram.vue} +0 -0
- /package/src/lib-components/pictograms/{Group.vue → GroupPictogram.vue} +0 -0
- /package/src/lib-components/pictograms/{HardDrive.vue → HardDrivePictogram.vue} +0 -0
- /package/src/lib-components/pictograms/{Love.vue → LovePictogram.vue} +0 -0
- /package/src/lib-components/pictograms/{Warning.vue → WarningPictogram.vue} +0 -0
package/dist/ns8-ui-lib.esm.js
CHANGED
|
@@ -553,14 +553,14 @@ const __vue_component__$R = /*#__PURE__*/normalizeComponent({
|
|
|
553
553
|
staticRenderFns: __vue_staticRenderFns__$s
|
|
554
554
|
}, __vue_inject_styles__$t, {}, __vue_scope_id__$t, __vue_is_functional_template__$t, __vue_module_identifier__$t, false, undefined, undefined, undefined);
|
|
555
555
|
|
|
556
|
-
var
|
|
556
|
+
var ExclamationMarkPictogram = __vue_component__$R;
|
|
557
557
|
|
|
558
558
|
//
|
|
559
559
|
var script$m = {
|
|
560
560
|
name: "NsEmptyState",
|
|
561
561
|
components: {
|
|
562
562
|
NsPictogram,
|
|
563
|
-
|
|
563
|
+
ExclamationMarkPictogram,
|
|
564
564
|
NsLottieAnimation
|
|
565
565
|
},
|
|
566
566
|
props: {
|
|
@@ -614,7 +614,7 @@ var __vue_render__$r = function () {
|
|
|
614
614
|
attrs: {
|
|
615
615
|
"title": "empty state"
|
|
616
616
|
}
|
|
617
|
-
}, [_vm.hasPictogramSlot ? [_vm._t("pictogram")] : [_c('
|
|
617
|
+
}, [_vm.hasPictogramSlot ? [_vm._t("pictogram")] : [_c('ExclamationMarkPictogram')]], 2), _vm._v(" "), _c('h5', {
|
|
618
618
|
staticClass: "title"
|
|
619
619
|
}, [_vm._v(_vm._s(_vm.title))]), _vm._v(" "), _vm.hasDescriptionSlot ? [_c('div', {
|
|
620
620
|
staticClass: "description"
|
|
@@ -626,8 +626,8 @@ var __vue_staticRenderFns__$r = [];
|
|
|
626
626
|
|
|
627
627
|
const __vue_inject_styles__$s = function (inject) {
|
|
628
628
|
if (!inject) return;
|
|
629
|
-
inject("data-v-
|
|
630
|
-
source: ".empty-state[data-v-
|
|
629
|
+
inject("data-v-2d5d3a58_0", {
|
|
630
|
+
source: ".empty-state[data-v-2d5d3a58]{text-align:center;padding:2rem}.empty-state .image[data-v-2d5d3a58]{margin-bottom:1rem}.empty-state .description[data-v-2d5d3a58]{margin-top:1rem}.animation[data-v-2d5d3a58]{display:inline-block;width:64px;height:64px}",
|
|
631
631
|
map: undefined,
|
|
632
632
|
media: undefined
|
|
633
633
|
});
|
|
@@ -635,7 +635,7 @@ const __vue_inject_styles__$s = function (inject) {
|
|
|
635
635
|
/* scoped */
|
|
636
636
|
|
|
637
637
|
|
|
638
|
-
const __vue_scope_id__$s = "data-v-
|
|
638
|
+
const __vue_scope_id__$s = "data-v-2d5d3a58";
|
|
639
639
|
/* module identifier */
|
|
640
640
|
|
|
641
641
|
const __vue_module_identifier__$s = undefined;
|
|
@@ -6270,17 +6270,19 @@ var __vue_component__$G = __vue_component__$F;
|
|
|
6270
6270
|
//
|
|
6271
6271
|
var script$e = {
|
|
6272
6272
|
name: "NsInfoCard",
|
|
6273
|
-
//components added for storybook to work
|
|
6274
6273
|
components: {
|
|
6275
6274
|
NsSvg,
|
|
6276
|
-
|
|
6275
|
+
NsInlineNotification
|
|
6277
6276
|
},
|
|
6278
6277
|
props: {
|
|
6279
6278
|
title: {
|
|
6280
6279
|
type: String,
|
|
6281
|
-
required:
|
|
6280
|
+
required: false
|
|
6281
|
+
},
|
|
6282
|
+
description: {
|
|
6283
|
+
type: String,
|
|
6284
|
+
required: false
|
|
6282
6285
|
},
|
|
6283
|
-
description: String,
|
|
6284
6286
|
icon: {
|
|
6285
6287
|
type: [String, Object],
|
|
6286
6288
|
default: undefined,
|
|
@@ -6294,11 +6296,21 @@ var script$e = {
|
|
|
6294
6296
|
}
|
|
6295
6297
|
|
|
6296
6298
|
},
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6299
|
+
loading: Boolean,
|
|
6300
|
+
isErrorShown: false,
|
|
6301
|
+
errorTitle: String,
|
|
6302
|
+
errorDescription: String,
|
|
6301
6303
|
light: Boolean
|
|
6304
|
+
},
|
|
6305
|
+
computed: {
|
|
6306
|
+
hasMenuSlot() {
|
|
6307
|
+
return !!this.$slots.menu;
|
|
6308
|
+
},
|
|
6309
|
+
|
|
6310
|
+
hasContentSlot() {
|
|
6311
|
+
return !!this.$slots.content;
|
|
6312
|
+
}
|
|
6313
|
+
|
|
6302
6314
|
}
|
|
6303
6315
|
};
|
|
6304
6316
|
|
|
@@ -6319,23 +6331,40 @@ var __vue_render__$k = function () {
|
|
|
6319
6331
|
"kind": "standard",
|
|
6320
6332
|
"light": _vm.light
|
|
6321
6333
|
}
|
|
6322
|
-
}, [_vm.
|
|
6334
|
+
}, [_vm.hasMenuSlot ? _vm._t("menu") : _vm._e(), _vm._v(" "), _vm.icon ? _c('div', {
|
|
6323
6335
|
staticClass: "row"
|
|
6324
6336
|
}, [_c('NsSvg', {
|
|
6325
6337
|
attrs: {
|
|
6326
6338
|
"svg": _vm.icon
|
|
6327
6339
|
}
|
|
6328
|
-
})], 1) : _vm._e(), _vm._v(" "), _c('div', {
|
|
6340
|
+
})], 1) : _vm._e(), _vm._v(" "), _vm.isErrorShown ? _c('div', {
|
|
6341
|
+
staticClass: "row"
|
|
6342
|
+
}, [_c('NsInlineNotification', {
|
|
6343
|
+
attrs: {
|
|
6344
|
+
"kind": "error",
|
|
6345
|
+
"title": _vm.errorTitle,
|
|
6346
|
+
"description": _vm.errorDescription,
|
|
6347
|
+
"showCloseButton": false
|
|
6348
|
+
}
|
|
6349
|
+
})], 1) : _vm.loading ? _c('div', {
|
|
6350
|
+
staticClass: "row"
|
|
6351
|
+
}, [_c('cv-skeleton-text', {
|
|
6352
|
+
staticClass: "skeleton",
|
|
6353
|
+
attrs: {
|
|
6354
|
+
"paragraph": true,
|
|
6355
|
+
"line-count": 3
|
|
6356
|
+
}
|
|
6357
|
+
})], 1) : [_vm.title ? _c('div', {
|
|
6329
6358
|
staticClass: "row"
|
|
6330
6359
|
}, [_c('h3', {
|
|
6331
6360
|
staticClass: "title"
|
|
6332
|
-
}, [_vm._v(_vm._s(_vm.title))])]), _vm._v(" "), _vm.description ? _c('div', {
|
|
6361
|
+
}, [_vm._v(_vm._s(_vm.title))])]) : _vm._e(), _vm._v(" "), _vm.description ? _c('div', {
|
|
6333
6362
|
staticClass: "row"
|
|
6334
6363
|
}, [_c('div', {
|
|
6335
6364
|
staticClass: "description"
|
|
6336
|
-
}, [_vm._v(_vm._s(_vm.description))])]) : _vm._e(), _vm._v(" "), _c('div', {
|
|
6365
|
+
}, [_vm._v(_vm._s(_vm.description))])]) : _vm._e()], _vm._v(" "), _c('div', {
|
|
6337
6366
|
staticClass: "row slot"
|
|
6338
|
-
}, [_vm._t("content")], 2)], 2);
|
|
6367
|
+
}, [_vm.hasContentSlot ? _vm._t("content") : _vm._e()], 2)], 2);
|
|
6339
6368
|
};
|
|
6340
6369
|
|
|
6341
6370
|
var __vue_staticRenderFns__$k = [];
|
|
@@ -6343,8 +6372,8 @@ var __vue_staticRenderFns__$k = [];
|
|
|
6343
6372
|
|
|
6344
6373
|
const __vue_inject_styles__$k = function (inject) {
|
|
6345
6374
|
if (!inject) return;
|
|
6346
|
-
inject("data-v-
|
|
6347
|
-
source: ".info-card[data-v-
|
|
6375
|
+
inject("data-v-34e69a80_0", {
|
|
6376
|
+
source: ".info-card[data-v-34e69a80]{display:flex;flex-direction:column;justify-content:center;min-height:7rem;position:relative}.skeleton[data-v-34e69a80]{margin-top:.5rem;margin-left:auto;margin-right:auto}.row[data-v-34e69a80]{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.title[data-v-34e69a80]{margin-left:.25rem;margin-right:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description[data-v-34e69a80]{margin-left:.25rem;margin-right:.25rem}.slot[data-v-34e69a80]{margin-top:.5rem}",
|
|
6348
6377
|
map: undefined,
|
|
6349
6378
|
media: undefined
|
|
6350
6379
|
});
|
|
@@ -6352,7 +6381,7 @@ const __vue_inject_styles__$k = function (inject) {
|
|
|
6352
6381
|
/* scoped */
|
|
6353
6382
|
|
|
6354
6383
|
|
|
6355
|
-
const __vue_scope_id__$k = "data-v-
|
|
6384
|
+
const __vue_scope_id__$k = "data-v-34e69a80";
|
|
6356
6385
|
/* module identifier */
|
|
6357
6386
|
|
|
6358
6387
|
const __vue_module_identifier__$k = undefined;
|
|
@@ -6831,6 +6860,58 @@ var UtilService = {
|
|
|
6831
6860
|
*/
|
|
6832
6861
|
toggleAccordion(ev) {
|
|
6833
6862
|
this.$refs.accordion.state.map((item, index) => index === ev.changedIndex);
|
|
6863
|
+
},
|
|
6864
|
+
|
|
6865
|
+
/**
|
|
6866
|
+
* Used in Backup section
|
|
6867
|
+
* */
|
|
6868
|
+
getBackupScheduleDescription(schedule) {
|
|
6869
|
+
if (!schedule) {
|
|
6870
|
+
return "-";
|
|
6871
|
+
}
|
|
6872
|
+
|
|
6873
|
+
switch (schedule.interval) {
|
|
6874
|
+
case "hourly":
|
|
6875
|
+
if (schedule.minute == 0) {
|
|
6876
|
+
return this.$t("backup.every_hour");
|
|
6877
|
+
} else {
|
|
6878
|
+
return this.$tc("backup.minutes_past_the_hour", schedule.minute, {
|
|
6879
|
+
minutes: schedule.minute
|
|
6880
|
+
});
|
|
6881
|
+
}
|
|
6882
|
+
|
|
6883
|
+
case "daily":
|
|
6884
|
+
if (this.time24HourPattern.test(schedule.time)) {
|
|
6885
|
+
return this.$t("backup.every_day_at", {
|
|
6886
|
+
time: schedule.time
|
|
6887
|
+
});
|
|
6888
|
+
} else {
|
|
6889
|
+
return "-";
|
|
6890
|
+
}
|
|
6891
|
+
|
|
6892
|
+
case "weekly":
|
|
6893
|
+
if (this.time24HourPattern.test(schedule.time)) {
|
|
6894
|
+
return this.$t("backup.every_weekday_at_hour", {
|
|
6895
|
+
weekDay: this.$t("calendar." + schedule.weekDay),
|
|
6896
|
+
time: schedule.time
|
|
6897
|
+
});
|
|
6898
|
+
} else {
|
|
6899
|
+
return "-";
|
|
6900
|
+
}
|
|
6901
|
+
|
|
6902
|
+
case "monthly":
|
|
6903
|
+
if (this.time24HourPattern.test(schedule.time)) {
|
|
6904
|
+
return this.$t("backup.every_month_at_time", {
|
|
6905
|
+
dayNum: schedule.monthDay,
|
|
6906
|
+
time: schedule.time
|
|
6907
|
+
});
|
|
6908
|
+
} else {
|
|
6909
|
+
return "-";
|
|
6910
|
+
}
|
|
6911
|
+
|
|
6912
|
+
default:
|
|
6913
|
+
return "-";
|
|
6914
|
+
}
|
|
6834
6915
|
}
|
|
6835
6916
|
|
|
6836
6917
|
}
|
|
@@ -9399,8 +9480,8 @@ var task = {
|
|
|
9399
9480
|
},
|
|
9400
9481
|
|
|
9401
9482
|
getTaskTitle(task) {
|
|
9402
|
-
if (task && task.context && task.context.
|
|
9403
|
-
return task.context.
|
|
9483
|
+
if (task && task.context && task.context.extra && task.context.extra.title) {
|
|
9484
|
+
return task.context.extra.title;
|
|
9404
9485
|
} else {
|
|
9405
9486
|
return "";
|
|
9406
9487
|
}
|
|
@@ -9441,28 +9522,40 @@ var task = {
|
|
|
9441
9522
|
},
|
|
9442
9523
|
|
|
9443
9524
|
getTaskStatusDescription(task, rootTask = true) {
|
|
9444
|
-
|
|
9525
|
+
let taskLabel = task.context.action; // use taskName instead of action, if available
|
|
9526
|
+
|
|
9527
|
+
if (task.context.extra && task.context.extra.taskName) {
|
|
9528
|
+
taskLabel = task.context.extra.taskName;
|
|
9529
|
+
}
|
|
9530
|
+
|
|
9445
9531
|
const taskOrSubtask = rootTask ? "task" : "subtask";
|
|
9532
|
+
let taskPrefix = "";
|
|
9533
|
+
|
|
9534
|
+
if (task.result && task.result.file) {
|
|
9535
|
+
taskPrefix = task.result.file.split("task/")[0];
|
|
9536
|
+
}
|
|
9537
|
+
|
|
9538
|
+
taskLabel = taskPrefix + taskLabel;
|
|
9446
9539
|
|
|
9447
9540
|
switch (task.status) {
|
|
9448
9541
|
case "aborted":
|
|
9449
9542
|
return this.$t("task." + taskOrSubtask + "_failed", {
|
|
9450
|
-
|
|
9543
|
+
task: taskLabel
|
|
9451
9544
|
});
|
|
9452
9545
|
|
|
9453
9546
|
case "validation-failed":
|
|
9454
9547
|
return this.$t("task." + taskOrSubtask + "_failed_validation", {
|
|
9455
|
-
|
|
9548
|
+
task: taskLabel
|
|
9456
9549
|
});
|
|
9457
9550
|
|
|
9458
9551
|
case "completed":
|
|
9459
9552
|
return this.$t("task." + taskOrSubtask + "_completed", {
|
|
9460
|
-
|
|
9553
|
+
task: taskLabel
|
|
9461
9554
|
});
|
|
9462
9555
|
|
|
9463
9556
|
case "pending":
|
|
9464
9557
|
return this.$t("task." + taskOrSubtask + "_pending", {
|
|
9465
|
-
|
|
9558
|
+
task: taskLabel
|
|
9466
9559
|
});
|
|
9467
9560
|
|
|
9468
9561
|
default:
|
|
@@ -16750,13 +16843,13 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
16750
16843
|
NsWizard: __vue_component__$h,
|
|
16751
16844
|
NsMenuItem: __vue_component__$f,
|
|
16752
16845
|
NsMenuDivider: __vue_component__$d,
|
|
16753
|
-
|
|
16754
|
-
|
|
16755
|
-
|
|
16756
|
-
|
|
16757
|
-
|
|
16758
|
-
|
|
16759
|
-
|
|
16846
|
+
ExclamationMarkPictogram: ExclamationMarkPictogram,
|
|
16847
|
+
GearPictogram: __vue_component__$b,
|
|
16848
|
+
LovePictogram: __vue_component__$9,
|
|
16849
|
+
WarningPictogram: __vue_component__$7,
|
|
16850
|
+
BulldozerPictogram: __vue_component__$5,
|
|
16851
|
+
GroupPictogram: __vue_component__$3,
|
|
16852
|
+
HardDrivePictogram: __vue_component__$1,
|
|
16760
16853
|
UtilService: UtilService,
|
|
16761
16854
|
QueryParamService: queryParam,
|
|
16762
16855
|
TaskService: task,
|
|
@@ -16777,4 +16870,4 @@ const install = function installNs8UiLib(Vue) {
|
|
|
16777
16870
|
});
|
|
16778
16871
|
}; // Create module definition for Vue.use()
|
|
16779
16872
|
|
|
16780
|
-
export { __vue_component__$5 as
|
|
16873
|
+
export { __vue_component__$5 as BulldozerPictogram, dataTable as DataTableService, DateTimeService, ExclamationMarkPictogram, filters as Filters, __vue_component__$b as GearPictogram, __vue_component__$3 as GroupPictogram, __vue_component__$1 as HardDrivePictogram, IconService, lottie as LottieService, __vue_component__$9 as LovePictogram, __vue_component__$j as NsBackupCard, __vue_component__$V as NsButton, NsCircleTimer, __vue_component__$O as NsCodeSnippet, __vue_component__$q as NsDangerDeleteModal, __vue_component__$o as NsDropdownAction, __vue_component__$Q as NsEmptyState, __vue_component__$w as NsIconMenu, __vue_component__$E as NsInfoCard, NsInlineNotification, NsLottieAnimation, __vue_component__$d as NsMenuDivider, __vue_component__$f as NsMenuItem, __vue_component__$u as NsMeterChart, __vue_component__$y as NsPasswordInput, NsPictogram, __vue_component__$s as NsPieChart, NsProgressBar, __vue_component__$C as NsStatusCard, NsSvg, __vue_component__$A as NsSystemdServiceCard, __vue_component__$m as NsTextInput, __vue_component__$I as NsTile, __vue_component__$G as NsToastNotification, __vue_component__$h as NsWizard, pageTitle as PageTitleService, queryParam as QueryParamService, StorageService, task as TaskService, UtilService, __vue_component__$7 as WarningPictogram, install as default };
|