@ailaw/venus 0.5.0 → 0.5.1
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/venus.es.js +11 -3
- package/package.json +1 -1
package/dist/venus.es.js
CHANGED
|
@@ -284,6 +284,12 @@ var ProfileTypeSelect = /* @__PURE__ */ function() {
|
|
|
284
284
|
return __component__$i.exports;
|
|
285
285
|
}();
|
|
286
286
|
var __vue2_script$h = defineComponent({
|
|
287
|
+
props: {
|
|
288
|
+
enabledTypes: {
|
|
289
|
+
type: Array,
|
|
290
|
+
default: () => ["USERPROFILE", "CLIENTPROFILE"]
|
|
291
|
+
}
|
|
292
|
+
},
|
|
287
293
|
components: {
|
|
288
294
|
Modal,
|
|
289
295
|
Form,
|
|
@@ -333,7 +339,7 @@ var render$h = function() {
|
|
|
333
339
|
var _vm = this;
|
|
334
340
|
var _h = _vm.$createElement;
|
|
335
341
|
var _c = _vm._self._c || _h;
|
|
336
|
-
return _c("modal", _vm._g(_vm._b({ attrs: { "closable": false, "ok-text": "Create", "width": 320, "okButtonProps": { props: { disabled: !_vm.canSubmit, loading: _vm.loading } } }, on: { "cancel": _vm.clearValue, "ok": _vm.handleSubmit } }, "modal", _vm.$attrs, false), _vm.$listeners), [_c("Form", { attrs: { "layout": "vertical", "validate-trigger": "blur", "model": _vm.value, "rules": _vm.rules } }, [_c("form-item", { attrs: { "label": "Profile type", "prop": "profileType" } }, [_c("profile-type-select", { attrs: { "enabledTypes":
|
|
342
|
+
return _c("modal", _vm._g(_vm._b({ attrs: { "closable": false, "ok-text": "Create", "width": 320, "okButtonProps": { props: { disabled: !_vm.canSubmit, loading: _vm.loading } } }, on: { "cancel": _vm.clearValue, "ok": _vm.handleSubmit } }, "modal", _vm.$attrs, false), _vm.$listeners), [_c("Form", { attrs: { "layout": "vertical", "validate-trigger": "blur", "model": _vm.value, "rules": _vm.rules } }, [_c("form-item", { attrs: { "label": "Profile type", "prop": "profileType" } }, [_c("profile-type-select", { attrs: { "enabledTypes": _vm.enabledTypes }, model: { value: _vm.value.profileType, callback: function($$v) {
|
|
337
343
|
_vm.$set(_vm.value, "profileType", $$v);
|
|
338
344
|
}, expression: "value.profileType" } })], 1), _c("form-item", { attrs: { "label": "Name", "prop": "name" } }, [_c("Input", { model: { value: _vm.value.name, callback: function($$v) {
|
|
339
345
|
_vm.$set(_vm.value, "name", $$v);
|
|
@@ -402,7 +408,7 @@ var render$g = function() {
|
|
|
402
408
|
return _c("Select", _vm._g(_vm._b({ staticClass: "w-72", attrs: { "allowClear": "", "showSearch": "", "optionFilterProp": "name", "value": _vm.selectedId }, on: { "change": _vm.handleChange }, scopedSlots: _vm._u([{ key: "dropdownRender", fn: function(menu) {
|
|
403
409
|
return _c("div", {}, [_c("v-nodes", { attrs: { "vnodes": menu } }), _vm.creatable ? _c("Divider", { staticClass: "my-1" }) : _vm._e(), _vm.creatable ? _c("div", { staticClass: "flex justify-end px-3 py-1" }, [_c("Button", { attrs: { "size": "small" }, on: { "click": _vm.handleProfileCreate } }, [_vm._v("Create new profile")])], 1) : _vm._e()], 1);
|
|
404
410
|
} }]) }, "Select", _vm.$attrs, false), _vm.$listeners), _vm._l(_vm.source, function(v) {
|
|
405
|
-
return _c("Option", { key: v.id, attrs: { "value": v.id } }, [_c("ProfileSelectItem", { attrs: { "source": v } })], 1);
|
|
411
|
+
return _c("Option", { key: v.id, attrs: { "value": v.id, "name": v.profileName } }, [_c("ProfileSelectItem", { attrs: { "source": v } })], 1);
|
|
406
412
|
}), 1);
|
|
407
413
|
};
|
|
408
414
|
var staticRenderFns$g = [];
|
|
@@ -466,6 +472,7 @@ var __vue2_script$f = defineComponent({
|
|
|
466
472
|
];
|
|
467
473
|
return uniqBy(prop("id"), list);
|
|
468
474
|
});
|
|
475
|
+
const enabledTypes = computed(() => (onlyRole == null ? void 0 : onlyRole.value) ? [onlyRole.value] : void 0);
|
|
469
476
|
const isModalVisible = ref(false);
|
|
470
477
|
const toggleModal = (value) => isModalVisible.value = value;
|
|
471
478
|
const updateValue = (value) => emit("input", value);
|
|
@@ -477,6 +484,7 @@ var __vue2_script$f = defineComponent({
|
|
|
477
484
|
profiles,
|
|
478
485
|
isModalVisible,
|
|
479
486
|
toggleModal,
|
|
487
|
+
enabledTypes,
|
|
480
488
|
updateValue,
|
|
481
489
|
handleProfileCreated,
|
|
482
490
|
keywords,
|
|
@@ -490,7 +498,7 @@ var render$f = function() {
|
|
|
490
498
|
var _c = _vm._self._c || _h;
|
|
491
499
|
return _c("div", [_c("profile-selector", _vm._g(_vm._b({ attrs: { "source": _vm.profiles, "value": _vm.value, "creatable": _vm.creatable }, on: { "search": _vm.handleSearch, "create-profile": function($event) {
|
|
492
500
|
return _vm.toggleModal(true);
|
|
493
|
-
}, "input": _vm.updateValue } }, "profile-selector", _vm.$attrs, false), _vm.$listeners)), _vm.creatable ? _c("profile-create-modal", { attrs: { "visible": _vm.isModalVisible }, on: { "cancel": function($event) {
|
|
501
|
+
}, "input": _vm.updateValue } }, "profile-selector", _vm.$attrs, false), _vm.$listeners)), _vm.creatable ? _c("profile-create-modal", { attrs: { "visible": _vm.isModalVisible, "enabledTypes": _vm.enabledTypes }, on: { "cancel": function($event) {
|
|
494
502
|
return _vm.toggleModal(false);
|
|
495
503
|
}, "profile-created": _vm.handleProfileCreated } }) : _vm._e()], 1);
|
|
496
504
|
};
|