@factoringplus/pl-components-pack-v3 0.1.40 → 0.1.43

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.
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { getCurrentScope, onScopeDispose, ref, watch, unref, defineComponent, openBlock, createElementBlock, createElementVNode, warn, getCurrentInstance, computed, inject, isRef, onMounted, onBeforeUnmount, onBeforeMount, provide, mergeProps, renderSlot, shallowRef, nextTick, onUpdated, resolveComponent, withDirectives, normalizeClass, normalizeStyle, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, vShow, toRef, Transition, reactive, cloneVNode, h, Text, Comment, Teleport, createTextVNode, readonly, useSlots, resolveDirective, renderList, onUnmounted, toRefs } from "vue";
20
+ import { getCurrentScope, onScopeDispose, ref, watch, unref, defineComponent, openBlock, createElementBlock, createElementVNode, warn, getCurrentInstance, computed, inject, provide, isRef, onMounted, onBeforeUnmount, onBeforeMount, mergeProps, renderSlot, shallowRef, nextTick, onUpdated, resolveComponent, withDirectives, normalizeClass, normalizeStyle, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, vShow, toRef, Transition, reactive, cloneVNode, h, Text, Comment, Teleport, createTextVNode, readonly, useSlots, resolveDirective, renderList, onUnmounted, toRefs } from "vue";
21
21
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
22
22
  var freeGlobal$1 = freeGlobal;
23
23
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
@@ -1175,6 +1175,7 @@ class ElementPlusError extends Error {
1175
1175
  function throwError(scope, m) {
1176
1176
  throw new ElementPlusError(`[${scope}] ${m}`);
1177
1177
  }
1178
+ const keysOf = (arr) => Object.keys(arr);
1178
1179
  const hasClass = (el, cls) => {
1179
1180
  if (!el || !cls)
1180
1181
  return false;
@@ -1614,6 +1615,35 @@ function useGlobalConfig(key, defaultValue = void 0) {
1614
1615
  return config;
1615
1616
  }
1616
1617
  }
1618
+ const provideGlobalConfig = (config, app, global2 = false) => {
1619
+ var _a2;
1620
+ const inSetup = !!getCurrentInstance();
1621
+ const oldConfig = inSetup ? useGlobalConfig() : void 0;
1622
+ const provideFn = (_a2 = app == null ? void 0 : app.provide) != null ? _a2 : inSetup ? provide : void 0;
1623
+ if (!provideFn) {
1624
+ return;
1625
+ }
1626
+ const context = computed(() => {
1627
+ const cfg = unref(config);
1628
+ if (!(oldConfig == null ? void 0 : oldConfig.value))
1629
+ return cfg;
1630
+ return mergeConfig(oldConfig.value, cfg);
1631
+ });
1632
+ provideFn(configProviderContextKey, context);
1633
+ if (global2 || !globalConfig.value) {
1634
+ globalConfig.value = context.value;
1635
+ }
1636
+ return context;
1637
+ };
1638
+ const mergeConfig = (a, b) => {
1639
+ var _a2;
1640
+ const keys2 = [.../* @__PURE__ */ new Set([...keysOf(a), ...keysOf(b)])];
1641
+ const obj = {};
1642
+ for (const key of keys2) {
1643
+ obj[key] = (_a2 = b[key]) != null ? _a2 : a[key];
1644
+ }
1645
+ return obj;
1646
+ };
1617
1647
  const useSizeProp = buildProp({
1618
1648
  type: String,
1619
1649
  values: componentSizes,
@@ -8222,6 +8252,41 @@ const extractDateFormat = (format) => {
8222
8252
  const extractTimeFormat = (format) => {
8223
8253
  return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g, "").trim();
8224
8254
  };
8255
+ const messageConfig = {};
8256
+ const configProviderProps = buildProps({
8257
+ locale: {
8258
+ type: definePropType(Object)
8259
+ },
8260
+ size: {
8261
+ type: String,
8262
+ values: ["large", "default", "small"]
8263
+ },
8264
+ button: {
8265
+ type: definePropType(Object)
8266
+ },
8267
+ message: {
8268
+ type: definePropType(Object)
8269
+ },
8270
+ zIndex: {
8271
+ type: Number
8272
+ },
8273
+ namespace: {
8274
+ type: String,
8275
+ default: "el"
8276
+ }
8277
+ });
8278
+ var ConfigProvider = defineComponent({
8279
+ name: "ElConfigProvider",
8280
+ props: configProviderProps,
8281
+ setup(props, { slots }) {
8282
+ watch(() => props.message, (val) => {
8283
+ Object.assign(messageConfig, val != null ? val : {});
8284
+ }, { immediate: true, deep: true });
8285
+ const config = provideGlobalConfig(props);
8286
+ return () => renderSlot(slots, "default", { config: config == null ? void 0 : config.value });
8287
+ }
8288
+ });
8289
+ const ElConfigProvider = withInstall(ConfigProvider);
8225
8290
  var advancedFormat$1 = { exports: {} };
8226
8291
  (function(module2, exports2) {
8227
8292
  !function(e, t) {
@@ -11288,7 +11353,7 @@ var useCurrencyInput = (options) => {
11288
11353
  var plCurrency_vue_vue_type_style_index_0_lang = "";
11289
11354
  const _hoisted_1$1 = /* @__PURE__ */ createElementVNode("span", { class: "pl-currency__rub-icon" }, "\u20BD", -1);
11290
11355
  const __default__$2 = {
11291
- name: "TestPlCurrency"
11356
+ name: "PlCurrency"
11292
11357
  };
11293
11358
  const _sfc_main$3 = /* @__PURE__ */ Object.assign(__default__$2, {
11294
11359
  props: {
@@ -11476,6 +11541,127 @@ const PlButtonPlugin = {
11476
11541
  var datePicker = "";
11477
11542
  var scrollbar = "";
11478
11543
  var popper = "";
11544
+ var ru = {
11545
+ name: "ru",
11546
+ el: {
11547
+ colorpicker: {
11548
+ confirm: "OK",
11549
+ clear: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C"
11550
+ },
11551
+ datepicker: {
11552
+ now: "\u0421\u0435\u0439\u0447\u0430\u0441",
11553
+ today: "\u0421\u0435\u0433\u043E\u0434\u043D\u044F",
11554
+ cancel: "\u041E\u0442\u043C\u0435\u043D\u0430",
11555
+ clear: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",
11556
+ confirm: "OK",
11557
+ selectDate: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0434\u0430\u0442\u0443",
11558
+ selectTime: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0440\u0435\u043C\u044F",
11559
+ startDate: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430",
11560
+ startTime: "\u0412\u0440\u0435\u043C\u044F \u043D\u0430\u0447\u0430\u043B\u0430",
11561
+ endDate: "\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F",
11562
+ endTime: "\u0412\u0440\u0435\u043C\u044F \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F",
11563
+ prevYear: "\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0433\u043E\u0434",
11564
+ nextYear: "\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0433\u043E\u0434",
11565
+ prevMonth: "\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043C\u0435\u0441\u044F\u0446",
11566
+ nextMonth: "\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u043C\u0435\u0441\u044F\u0446",
11567
+ year: "",
11568
+ month1: "\u042F\u043D\u0432\u0430\u0440\u044C",
11569
+ month2: "\u0424\u0435\u0432\u0440\u0430\u043B\u044C",
11570
+ month3: "\u041C\u0430\u0440\u0442",
11571
+ month4: "\u0410\u043F\u0440\u0435\u043B\u044C",
11572
+ month5: "\u041C\u0430\u0439",
11573
+ month6: "\u0418\u044E\u043D\u044C",
11574
+ month7: "\u0418\u044E\u043B\u044C",
11575
+ month8: "\u0410\u0432\u0433\u0443\u0441\u0442",
11576
+ month9: "\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C",
11577
+ month10: "\u041E\u043A\u0442\u044F\u0431\u0440\u044C",
11578
+ month11: "\u041D\u043E\u044F\u0431\u0440\u044C",
11579
+ month12: "\u0414\u0435\u043A\u0430\u0431\u0440\u044C",
11580
+ week: "\u043D\u0435\u0434\u0435\u043B\u044F",
11581
+ weeks: {
11582
+ sun: "\u0412\u0441",
11583
+ mon: "\u041F\u043D",
11584
+ tue: "\u0412\u0442",
11585
+ wed: "\u0421\u0440",
11586
+ thu: "\u0427\u0442",
11587
+ fri: "\u041F\u0442",
11588
+ sat: "\u0421\u0431"
11589
+ },
11590
+ months: {
11591
+ jan: "\u042F\u043D\u0432",
11592
+ feb: "\u0424\u0435\u0432",
11593
+ mar: "\u041C\u0430\u0440",
11594
+ apr: "\u0410\u043F\u0440",
11595
+ may: "\u041C\u0430\u0439",
11596
+ jun: "\u0418\u044E\u043D",
11597
+ jul: "\u0418\u044E\u043B",
11598
+ aug: "\u0410\u0432\u0433",
11599
+ sep: "\u0421\u0435\u043D",
11600
+ oct: "\u041E\u043A\u0442",
11601
+ nov: "\u041D\u043E\u044F",
11602
+ dec: "\u0414\u0435\u043A"
11603
+ }
11604
+ },
11605
+ select: {
11606
+ loading: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",
11607
+ noMatch: "\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E",
11608
+ noData: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445",
11609
+ placeholder: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C"
11610
+ },
11611
+ cascader: {
11612
+ noMatch: "\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E",
11613
+ loading: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",
11614
+ placeholder: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C",
11615
+ noData: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"
11616
+ },
11617
+ pagination: {
11618
+ goto: "\u041F\u0435\u0440\u0435\u0439\u0442\u0438",
11619
+ pagesize: " \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",
11620
+ total: "\u0412\u0441\u0435\u0433\u043E {total}",
11621
+ pageClassifier: ""
11622
+ },
11623
+ messagebox: {
11624
+ title: "\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
11625
+ confirm: "OK",
11626
+ cancel: "\u041E\u0442\u043C\u0435\u043D\u0430",
11627
+ error: "\u041D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0432\u0432\u043E\u0434 \u0434\u0430\u043D\u043D\u044B\u0445"
11628
+ },
11629
+ upload: {
11630
+ deleteTip: "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 [\u0423\u0434\u0430\u043B\u0438\u0442\u044C] \u0434\u043B\u044F \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F",
11631
+ delete: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
11632
+ preview: "\u041F\u0440\u0435\u0432\u044C\u044E",
11633
+ continue: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"
11634
+ },
11635
+ table: {
11636
+ emptyText: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445",
11637
+ confirmFilter: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C",
11638
+ resetFilter: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C",
11639
+ clearFilter: "\u0412\u0441\u0435",
11640
+ sumText: "\u0421\u0443\u043C\u043C\u0430"
11641
+ },
11642
+ tree: {
11643
+ emptyText: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"
11644
+ },
11645
+ transfer: {
11646
+ noMatch: "\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E",
11647
+ noData: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445",
11648
+ titles: ["\u0421\u043F\u0438\u0441\u043E\u043A 1", "\u0421\u043F\u0438\u0441\u043E\u043A 2"],
11649
+ filterPlaceholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043B\u044E\u0447\u0435\u0432\u043E\u0435 \u0441\u043B\u043E\u0432\u043E",
11650
+ noCheckedFormat: "{total} \u043F\u0443\u043D\u043A\u0442\u043E\u0432",
11651
+ hasCheckedFormat: "{checked}/{total} \u0432\u044B\u0431\u0440\u0430\u043D\u043E"
11652
+ },
11653
+ image: {
11654
+ error: "FAILED"
11655
+ },
11656
+ pageHeader: {
11657
+ title: "Back"
11658
+ },
11659
+ popconfirm: {
11660
+ confirmButtonText: "OK",
11661
+ cancelButtonText: "\u041E\u0442\u043C\u0435\u043D\u0430"
11662
+ }
11663
+ }
11664
+ };
11479
11665
  var plDatePickerRange_vue_vue_type_style_index_0_lang = "";
11480
11666
  const __default__ = {
11481
11667
  name: "PlDatePickerRange"
@@ -11507,30 +11693,35 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
11507
11693
  },
11508
11694
  emits: ["update:modelValue"],
11509
11695
  setup(__props, { emit }) {
11510
- const innerValue = ref(null);
11696
+ const props = __props;
11697
+ const { modelValue } = toRefs(props);
11698
+ const innerValue = ref([]);
11511
11699
  const innerDatePicker = ref(null);
11512
11700
  watch(innerValue, (newValue) => {
11513
11701
  emit("update:modelValue", newValue);
11514
11702
  });
11515
- onMounted(() => {
11516
- console.log("innerDatePicker", innerDatePicker.value);
11517
- });
11703
+ innerValue.value = modelValue.value;
11518
11704
  return (_ctx, _cache) => {
11519
11705
  const _component_el_date_picker = ElDatePicker;
11520
- return openBlock(), createBlock(_component_el_date_picker, mergeProps({
11521
- ref_key: "innerDatePicker",
11522
- ref: innerDatePicker
11523
- }, _ctx.$attrs, {
11524
- modelValue: innerValue.value,
11525
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => innerValue.value = $event),
11526
- format: __props.format,
11527
- "picker-options": __props.pickerOptions,
11528
- "start-placeholder": __props.startPlaceholder,
11529
- "end-placeholder": __props.endPlaceholder,
11530
- clearable: false,
11531
- type: "daterange",
11532
- style: { "width": "224px" }
11533
- }), null, 16, ["modelValue", "format", "picker-options", "start-placeholder", "end-placeholder"]);
11706
+ return openBlock(), createBlock(unref(ElConfigProvider), { locale: unref(ru) }, {
11707
+ default: withCtx(() => [
11708
+ createVNode(_component_el_date_picker, mergeProps({
11709
+ ref_key: "innerDatePicker",
11710
+ ref: innerDatePicker
11711
+ }, _ctx.$attrs, {
11712
+ modelValue: innerValue.value,
11713
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => innerValue.value = $event),
11714
+ format: __props.format,
11715
+ "picker-options": __props.pickerOptions,
11716
+ "start-placeholder": __props.startPlaceholder,
11717
+ "end-placeholder": __props.endPlaceholder,
11718
+ clearable: false,
11719
+ type: "daterange",
11720
+ style: { "width": "224px" }
11721
+ }), null, 16, ["modelValue", "format", "picker-options", "start-placeholder", "end-placeholder"])
11722
+ ]),
11723
+ _: 1
11724
+ }, 8, ["locale"]);
11534
11725
  };
11535
11726
  }
11536
11727
  });
@@ -11538,7 +11729,7 @@ var root = "";
11538
11729
  var common = "";
11539
11730
  const PlDatePickerRangePlugin = {
11540
11731
  install(app) {
11541
- app.component("PlDatePickerRange", _sfc_main);
11732
+ app.component("PlDatePickerRange", _sfc_main, { locale: ru });
11542
11733
  }
11543
11734
  };
11544
11735
  const TestKitPlugin = {