@factoringplus/pl-components-pack-v3 0.5.26 → 0.5.28-pre-01
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unref, getCurrentScope, onScopeDispose, ref, watch, getCurrentInstance, onMounted, nextTick, readonly, shallowRef, watchEffect, computed as computed$1, openBlock, createElementBlock, createElementVNode, warn, isVNode, provide, inject, onBeforeUnmount, toRef, onUnmounted, isRef, onBeforeMount, defineComponent, mergeProps, renderSlot, useAttrs as useAttrs$1, useSlots, withDirectives, createCommentVNode, Fragment, normalizeClass, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, normalizeStyle, vShow, Transition, reactive, onUpdated, cloneVNode, Text, Comment, Teleport, onDeactivated, renderList, createTextVNode, toRaw as toRaw$1, vModelCheckbox, toRefs, withKeys, h as h$2, createSlots, triggerRef, resolveComponent, resolveDirective, vModelText, TransitionGroup, createApp, shallowReactive, render, useCssVars, pushScopeId, popScopeId, normalizeProps, guardReactiveProps, createStaticVNode } from "vue";
|
|
1
|
+
import { unref, getCurrentScope, onScopeDispose, ref, watch, getCurrentInstance, onMounted, nextTick, readonly, shallowRef, watchEffect, computed as computed$1, openBlock, createElementBlock, createElementVNode, warn, isVNode, provide, inject, onBeforeUnmount, toRef, onUnmounted, isRef, onBeforeMount, defineComponent, mergeProps, renderSlot, useAttrs as useAttrs$1, useSlots, withDirectives, createCommentVNode, Fragment, normalizeClass, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, normalizeStyle, vShow, Transition, reactive, onUpdated, cloneVNode, Text, Comment, Teleport, onDeactivated, renderList, createTextVNode, toRaw as toRaw$1, vModelCheckbox, toRefs, withKeys, h as h$2, createSlots, triggerRef, resolveComponent, resolveDirective, vModelText, TransitionGroup, createApp, shallowReactive, render, useCssVars, vModelDynamic, pushScopeId, popScopeId, normalizeProps, guardReactiveProps, createStaticVNode } from "vue";
|
|
2
2
|
import moment from "moment";
|
|
3
3
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
4
4
|
var freeGlobal$1 = freeGlobal;
|
|
@@ -17660,7 +17660,7 @@ const _hoisted_2$B = ["aria-current", "tabindex"];
|
|
|
17660
17660
|
const _hoisted_3$t = ["tabindex"];
|
|
17661
17661
|
const _hoisted_4$l = ["aria-current", "tabindex"];
|
|
17662
17662
|
const _hoisted_5$f = ["tabindex"];
|
|
17663
|
-
const _hoisted_6$
|
|
17663
|
+
const _hoisted_6$9 = ["aria-current", "tabindex"];
|
|
17664
17664
|
const __default__$i = defineComponent({
|
|
17665
17665
|
name: "ElPaginationPager"
|
|
17666
17666
|
});
|
|
@@ -17850,7 +17850,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
17850
17850
|
], "number"]),
|
|
17851
17851
|
"aria-current": _ctx.currentPage === _ctx.pageCount,
|
|
17852
17852
|
tabindex: unref(tabindex)
|
|
17853
|
-
}, toDisplayString(_ctx.pageCount), 11, _hoisted_6$
|
|
17853
|
+
}, toDisplayString(_ctx.pageCount), 11, _hoisted_6$9)) : createCommentVNode("v-if", true)
|
|
17854
17854
|
], 42, _hoisted_1$J);
|
|
17855
17855
|
};
|
|
17856
17856
|
}
|
|
@@ -25358,25 +25358,76 @@ const PlCurrencyPlugin = {
|
|
|
25358
25358
|
app.component("PlCurrency", _sfc_main$F);
|
|
25359
25359
|
}
|
|
25360
25360
|
};
|
|
25361
|
-
var form = "";
|
|
25362
25361
|
const _sfc_main$E = {
|
|
25363
25362
|
__name: "pl-form",
|
|
25363
|
+
props: {
|
|
25364
|
+
model: {
|
|
25365
|
+
type: Object,
|
|
25366
|
+
required: true
|
|
25367
|
+
},
|
|
25368
|
+
rules: {
|
|
25369
|
+
type: Object,
|
|
25370
|
+
default: () => {
|
|
25371
|
+
}
|
|
25372
|
+
}
|
|
25373
|
+
},
|
|
25364
25374
|
setup(__props, { expose }) {
|
|
25365
|
-
const
|
|
25366
|
-
|
|
25367
|
-
|
|
25375
|
+
const props = __props;
|
|
25376
|
+
const form2 = ref();
|
|
25377
|
+
const { model, rules: rules2 } = toRefs(props);
|
|
25378
|
+
const errorsState = ref([]);
|
|
25379
|
+
provide("errorsState", errorsState);
|
|
25380
|
+
const validate = () => {
|
|
25381
|
+
const validator2 = new Schema(rules2.value);
|
|
25382
|
+
validator2.validate(model.value, (errors, fields) => {
|
|
25383
|
+
if (errors) {
|
|
25384
|
+
errorsState.value = errors;
|
|
25385
|
+
return;
|
|
25386
|
+
}
|
|
25387
|
+
errorsState.value = [];
|
|
25388
|
+
});
|
|
25389
|
+
};
|
|
25390
|
+
const validateField = (prop) => {
|
|
25391
|
+
const rulesValidate = {};
|
|
25392
|
+
const source2 = {};
|
|
25393
|
+
rulesValidate[prop] = rules2.value[prop];
|
|
25394
|
+
source2[prop] = model.value[prop];
|
|
25395
|
+
const validator2 = new Schema(rulesValidate);
|
|
25396
|
+
validator2.validate(source2, (errors, fields) => {
|
|
25397
|
+
if (errors) {
|
|
25398
|
+
errorsState.value = errors;
|
|
25399
|
+
return;
|
|
25400
|
+
}
|
|
25401
|
+
errorsState.value = errorsState.value.filter((error2) => error2.field !== prop);
|
|
25402
|
+
});
|
|
25403
|
+
};
|
|
25404
|
+
onMounted(() => {
|
|
25405
|
+
form2.value.forEach((element) => {
|
|
25406
|
+
const prop = element.__vueParentComponent.ctx.prop;
|
|
25407
|
+
if (prop in rules2.value) {
|
|
25408
|
+
rules2.value[prop].forEach((rule) => {
|
|
25409
|
+
if (rule.trigger) {
|
|
25410
|
+
const triggers = rule.trigger.replace(/\s/g, "").split(",");
|
|
25411
|
+
triggers.forEach((trigger) => {
|
|
25412
|
+
useEventListener(element, trigger, (evt) => {
|
|
25413
|
+
validateField(prop);
|
|
25414
|
+
});
|
|
25415
|
+
});
|
|
25416
|
+
}
|
|
25417
|
+
});
|
|
25418
|
+
}
|
|
25419
|
+
});
|
|
25368
25420
|
});
|
|
25421
|
+
expose({ validate, validateField });
|
|
25369
25422
|
return (_ctx, _cache) => {
|
|
25370
|
-
|
|
25371
|
-
|
|
25372
|
-
|
|
25373
|
-
|
|
25374
|
-
|
|
25375
|
-
|
|
25376
|
-
|
|
25377
|
-
|
|
25378
|
-
_: 3
|
|
25379
|
-
}, 16);
|
|
25423
|
+
return openBlock(), createElementBlock("form", {
|
|
25424
|
+
ref_key: "form",
|
|
25425
|
+
ref: form2,
|
|
25426
|
+
onSubmit: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
25427
|
+
}, ["prevent"]))
|
|
25428
|
+
}, [
|
|
25429
|
+
renderSlot(_ctx.$slots, "default")
|
|
25430
|
+
], 544);
|
|
25380
25431
|
};
|
|
25381
25432
|
}
|
|
25382
25433
|
};
|
|
@@ -25385,6 +25436,7 @@ const PlFormPlugin = {
|
|
|
25385
25436
|
app.component("PlForm", _sfc_main$E);
|
|
25386
25437
|
}
|
|
25387
25438
|
};
|
|
25439
|
+
var form = "";
|
|
25388
25440
|
var formItem = "";
|
|
25389
25441
|
var _imports_0$9 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi41OTk5IDguMDAwMzlDMi41OTk5IDUuMDE3NzYgNS4wMTcyNyAyLjYwMDM5IDcuOTk5OSAyLjYwMDM5QzEwLjk4MjUgMi42MDAzOSAxMy4zOTk5IDUuMDE3NzYgMTMuMzk5OSA4LjAwMDM5QzEzLjM5OTkgMTAuOTgzIDEwLjk4MjUgMTMuNDAwNCA3Ljk5OTkgMTMuNDAwNEM1LjAxNzI3IDEzLjQwMDQgMi41OTk5IDEwLjk4MyAyLjU5OTkgOC4wMDAzOVpNN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GQ9Ik03Ljk5OTAyIDhMMTUuOTk5IDE2IiBzdHJva2U9IiM1MDUwNTEiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4NCjxwYXRoIGQ9Ik0xNS45OTkgOEw3Ljk5OTAyIDE2IiBzdHJva2U9IiM1MDUwNTEiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4NCjwvc3ZnPg0K";
|
|
@@ -25808,7 +25860,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
25808
25860
|
}
|
|
25809
25861
|
return target;
|
|
25810
25862
|
};
|
|
25811
|
-
const _withScopeId$1 = (n2) => (pushScopeId("data-v-
|
|
25863
|
+
const _withScopeId$1 = (n2) => (pushScopeId("data-v-1733ba20"), n2 = n2(), popScopeId(), n2);
|
|
25812
25864
|
const _hoisted_1$y = { class: "pl-input__container" };
|
|
25813
25865
|
const _hoisted_2$t = {
|
|
25814
25866
|
key: 0,
|
|
@@ -25820,12 +25872,25 @@ const _hoisted_3$o = {
|
|
|
25820
25872
|
};
|
|
25821
25873
|
const _hoisted_4$i = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "pl-input__currency" }, "\u20BD", -1));
|
|
25822
25874
|
const _hoisted_5$c = {
|
|
25875
|
+
key: 1,
|
|
25876
|
+
class: "el-input"
|
|
25877
|
+
};
|
|
25878
|
+
const _hoisted_6$8 = { class: "el-input__wrapper" };
|
|
25879
|
+
const _hoisted_7$6 = ["type"];
|
|
25880
|
+
const _hoisted_8$5 = {
|
|
25823
25881
|
key: 0,
|
|
25824
25882
|
class: "pl-input__eye-container"
|
|
25825
25883
|
};
|
|
25884
|
+
const _hoisted_9$5 = { class: "pl-input__helpertext" };
|
|
25885
|
+
const _hoisted_10$4 = { key: 0 };
|
|
25886
|
+
const _hoisted_11$4 = { key: 1 };
|
|
25826
25887
|
const _sfc_main$B = {
|
|
25827
25888
|
__name: "pl-input-plus",
|
|
25828
25889
|
props: {
|
|
25890
|
+
prop: {
|
|
25891
|
+
type: String,
|
|
25892
|
+
default: ""
|
|
25893
|
+
},
|
|
25829
25894
|
modelValue: {
|
|
25830
25895
|
required: true
|
|
25831
25896
|
},
|
|
@@ -25873,6 +25938,10 @@ const _sfc_main$B = {
|
|
|
25873
25938
|
type: Object,
|
|
25874
25939
|
default: () => ({ min: 0 })
|
|
25875
25940
|
},
|
|
25941
|
+
id: {
|
|
25942
|
+
type: String,
|
|
25943
|
+
default: ""
|
|
25944
|
+
},
|
|
25876
25945
|
currencyInputOptions: {
|
|
25877
25946
|
type: Object,
|
|
25878
25947
|
default: () => ({})
|
|
@@ -25882,9 +25951,15 @@ const _sfc_main$B = {
|
|
|
25882
25951
|
setup(__props, { emit: emit2 }) {
|
|
25883
25952
|
const props = __props;
|
|
25884
25953
|
useCssVars((_ctx) => ({
|
|
25885
|
-
"
|
|
25954
|
+
"39e8b56f": props.width
|
|
25886
25955
|
}));
|
|
25887
25956
|
const attrs = useAttrs$1();
|
|
25957
|
+
const errors = ref([]);
|
|
25958
|
+
const errorsState = inject("errorsState");
|
|
25959
|
+
watch(errorsState, () => {
|
|
25960
|
+
errors.value = errorsState.value.filter((error2) => error2.field === props.prop);
|
|
25961
|
+
console.log("211212", errorsState.value);
|
|
25962
|
+
}, { deep: true });
|
|
25888
25963
|
const id = `id-${Math.random()}`;
|
|
25889
25964
|
const options = reactive({
|
|
25890
25965
|
currency: "RUB",
|
|
@@ -25964,27 +26039,23 @@ const _sfc_main$B = {
|
|
|
25964
26039
|
_hoisted_4$i
|
|
25965
26040
|
])
|
|
25966
26041
|
} : void 0
|
|
25967
|
-
]), 1040, ["modelValue"])) : (openBlock(),
|
|
25968
|
-
|
|
25969
|
-
|
|
25970
|
-
|
|
25971
|
-
|
|
25972
|
-
|
|
25973
|
-
|
|
25974
|
-
|
|
25975
|
-
|
|
25976
|
-
|
|
25977
|
-
|
|
25978
|
-
|
|
25979
|
-
|
|
25980
|
-
|
|
25981
|
-
|
|
25982
|
-
|
|
25983
|
-
|
|
25984
|
-
props.password || unref(showRightIcon) ? {
|
|
25985
|
-
name: "suffix",
|
|
25986
|
-
fn: withCtx(() => [
|
|
25987
|
-
props.password ? (openBlock(), createElementBlock("div", _hoisted_5$c, [
|
|
26042
|
+
]), 1040, ["modelValue"])) : (openBlock(), createElementBlock("div", _hoisted_5$c, [
|
|
26043
|
+
createElementVNode("div", _hoisted_6$8, [
|
|
26044
|
+
props.leftIcon ? (openBlock(), createBlock(_component_inline_svg, {
|
|
26045
|
+
key: 0,
|
|
26046
|
+
src: props.leftIcon
|
|
26047
|
+
}, null, 8, ["src"])) : createCommentVNode("", true),
|
|
26048
|
+
withDirectives(createElementVNode("input", mergeProps({
|
|
26049
|
+
id,
|
|
26050
|
+
name: id,
|
|
26051
|
+
type: unref(passwordType) ? "password" : "text"
|
|
26052
|
+
}, unref(attrs), {
|
|
26053
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(modelValue) ? modelValue.value = $event : null)
|
|
26054
|
+
}), null, 16, _hoisted_7$6), [
|
|
26055
|
+
[vModelDynamic, unref(modelValue)]
|
|
26056
|
+
]),
|
|
26057
|
+
props.password || unref(showRightIcon) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
26058
|
+
props.password ? (openBlock(), createElementBlock("div", _hoisted_8$5, [
|
|
25988
26059
|
createVNode(Transition, { name: "el-zoom-in-top" }, {
|
|
25989
26060
|
default: withCtx(() => [
|
|
25990
26061
|
unref(passwordType) ? (openBlock(), createBlock(_component_inline_svg, {
|
|
@@ -26011,17 +26082,19 @@ const _sfc_main$B = {
|
|
|
26011
26082
|
key: 1,
|
|
26012
26083
|
src: props.rightIcon
|
|
26013
26084
|
}, null, 8, ["src"])) : createCommentVNode("", true)
|
|
26014
|
-
])
|
|
26015
|
-
|
|
26016
|
-
])
|
|
26017
|
-
withDirectives(createElementVNode("span",
|
|
26018
|
-
[
|
|
26085
|
+
], 64)) : createCommentVNode("", true)
|
|
26086
|
+
])
|
|
26087
|
+
])),
|
|
26088
|
+
withDirectives(createElementVNode("span", _hoisted_9$5, [
|
|
26089
|
+
errors.value.length > 0 ? (openBlock(), createElementBlock("span", _hoisted_10$4, toDisplayString(errors.value[0].message), 1)) : props.helpertext ? (openBlock(), createElementBlock("span", _hoisted_11$4, toDisplayString(props.helpertext), 1)) : createCommentVNode("", true)
|
|
26090
|
+
], 512), [
|
|
26091
|
+
[vShow, props.helpertext || errors.value.length > 0]
|
|
26019
26092
|
])
|
|
26020
26093
|
]);
|
|
26021
26094
|
};
|
|
26022
26095
|
}
|
|
26023
26096
|
};
|
|
26024
|
-
var PlInputPlus = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-
|
|
26097
|
+
var PlInputPlus = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-1733ba20"]]);
|
|
26025
26098
|
const PlInputPlusPlugin = {
|
|
26026
26099
|
install(app) {
|
|
26027
26100
|
app.component("PlInputPlus", PlInputPlus);
|