@tagplus/components 5.2.19 → 5.3.0
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/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/dist/es/components.css +2391 -0
- package/dist/es/node_modules/@element-plus/icons-vue/dist/index.mjs +148 -0
- package/dist/es/node_modules/@popperjs/core/lib/enums.mjs +22 -0
- package/dist/es/node_modules/@vue/shared/dist/shared.esm-bundler.mjs +28 -0
- package/dist/es/node_modules/@vueuse/core/index.mjs +172 -0
- package/dist/es/node_modules/@vueuse/shared/index.mjs +68 -0
- package/dist/es/node_modules/element-plus/es/constants/size.mjs +4 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-focus-controller/index.mjs +64 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-id/index.mjs +30 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-locale/index.mjs +29 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-namespace/index.mjs +79 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-prop/index.mjs +11 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-size/index.mjs +20 -0
- package/dist/es/node_modules/element-plus/es/locale/lang/en.mjs +182 -0
- package/dist/es/node_modules/element-plus/es/utils/error.mjs +16 -0
- package/dist/es/node_modules/element-plus/es/utils/types.mjs +9 -0
- package/dist/es/node_modules/element-plus/es/utils/vue/props/runtime.mjs +42 -0
- package/dist/es/src/components/Autosuggest/Autosuggest.vue.mjs +446 -0
- package/dist/es/src/components/Autosuggest/Multisuggest.vue.mjs +17 -0
- package/dist/es/src/components/Autosuggest/autosuggest-props.mjs +204 -0
- package/dist/es/src/components/Autosuggest/core.mjs +56 -0
- package/dist/es/src/components/Autosuggest/multisuggest-props.mjs +11 -0
- package/dist/es/src/components/Autosuggest/option.vue.mjs +118 -0
- package/dist/es/src/components/Autosuggest/select-dropdown.vue.mjs +62 -0
- package/dist/es/src/components/Autosuggest/useOption.mjs +93 -0
- package/dist/es/src/components/Autosuggest/useSelect.mjs +803 -0
- package/dist/es/src/components/Inline/Inline.vue.mjs +125 -0
- package/dist/es/src/components/Inline/index.mjs +4 -0
- package/dist/es/src/components/InputNumber/InputNumber.vue.mjs +360 -0
- package/dist/es/src/components/InputNumber/index.mjs +4 -0
- package/dist/es/src/components/InputNumber/input-number.mjs +128 -0
- package/dist/es/src/components/Loader/Loader.vue.mjs +59 -0
- package/dist/es/src/components/Loader/index.mjs +4 -0
- package/dist/es/src/components/Money/Money.vue.mjs +72 -0
- package/dist/es/src/components/Money/index.mjs +4 -0
- package/dist/es/src/components/Multisuggest/index.mjs +4 -0
- package/dist/es/src/components/OptionsList/OptionsList.vue.mjs +28 -0
- package/dist/es/src/components/OptionsList/index.mjs +4 -0
- package/dist/es/src/components/OptionsListItem/OptionsListItem.vue.mjs +96 -0
- package/dist/es/src/components/OptionsListItem/index.mjs +4 -0
- package/dist/es/src/components/Percent/Percent.vue.mjs +73 -0
- package/dist/es/src/components/Percent/index.mjs +4 -0
- package/dist/es/src/components/Skeleton/Skeleton.vue.mjs +79 -0
- package/dist/es/src/components/Skeleton/index.mjs +4 -0
- package/dist/es/src/components/Step/Step.vue.mjs +206 -0
- package/dist/es/src/components/Step/index.mjs +4 -0
- package/dist/es/src/components/Steps/Steps.vue.mjs +15 -0
- package/dist/es/src/components/Steps/index.mjs +4 -0
- package/dist/es/src/components/Tip/Tip.vue.mjs +160 -0
- package/dist/es/src/components/Tip/index.mjs +4 -0
- package/dist/es/src/components/index.mjs +32 -0
- package/dist/es/src/locale/i18nCreator.mjs +93 -0
- package/dist/es/src/locale/lang/pt-br.mjs +21 -0
- package/dist/es/src/main.mjs +17 -0
- package/dist/es/src/mixins/floatFormatter.mjs +42 -0
- package/dist/es/src/plugins/currency.mjs +69 -0
- package/dist/es/src/utils/constants.mjs +6 -0
- package/dist/es/src/utils/error.mjs +22 -0
- package/dist/es/src/utils/i18n.mjs +4 -0
- package/dist/es/src/utils/icon.mjs +9 -0
- package/dist/es/src/utils/index.mjs +11 -0
- package/dist/es/src/utils/runtime.mjs +50 -0
- package/dist/es/src/utils/scroll.mjs +28 -0
- package/dist/es/src/utils/strings.mjs +4 -0
- package/dist/es/src/utils/types.mjs +9 -0
- package/dist/es/src/utils/use-derived-namespace.mjs +15 -0
- package/dist/es/src/utils/use-form-common-props.mjs +25 -0
- package/dist/es/src/utils/use-form-item.mjs +61 -0
- package/dist/es/src/utils/use-id.mjs +35 -0
- package/dist/es/src/utils/use-input.mjs +31 -0
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/lib/components.css +2391 -0
- package/dist/lib/node_modules/@element-plus/icons-vue/dist/index.js +148 -0
- package/dist/lib/node_modules/@popperjs/core/lib/enums.js +22 -0
- package/dist/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +28 -0
- package/dist/lib/node_modules/@vueuse/core/index.js +170 -0
- package/dist/lib/node_modules/@vueuse/shared/index.js +68 -0
- package/dist/lib/node_modules/element-plus/es/constants/size.js +4 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +64 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-id/index.js +30 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-locale/index.js +29 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +79 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-prop/index.js +11 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-size/index.js +20 -0
- package/dist/lib/node_modules/element-plus/es/locale/lang/en.js +182 -0
- package/dist/lib/node_modules/element-plus/es/utils/error.js +16 -0
- package/dist/lib/node_modules/element-plus/es/utils/types.js +9 -0
- package/dist/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +42 -0
- package/dist/lib/src/components/Autosuggest/Autosuggest.vue.js +446 -0
- package/dist/lib/src/components/Autosuggest/Multisuggest.vue.js +17 -0
- package/dist/lib/src/components/Autosuggest/autosuggest-props.js +204 -0
- package/dist/lib/src/components/Autosuggest/core.js +56 -0
- package/dist/lib/src/components/Autosuggest/multisuggest-props.js +11 -0
- package/dist/lib/src/components/Autosuggest/option.vue.js +118 -0
- package/dist/lib/src/components/Autosuggest/select-dropdown.vue.js +62 -0
- package/dist/lib/src/components/Autosuggest/useOption.js +93 -0
- package/dist/lib/src/components/Autosuggest/useSelect.js +803 -0
- package/dist/lib/src/components/Inline/Inline.vue.js +125 -0
- package/dist/lib/src/components/Inline/index.js +4 -0
- package/dist/lib/src/components/InputNumber/InputNumber.vue.js +360 -0
- package/dist/lib/src/components/InputNumber/index.js +4 -0
- package/dist/lib/src/components/InputNumber/input-number.js +128 -0
- package/dist/lib/src/components/Loader/Loader.vue.js +59 -0
- package/dist/lib/src/components/Loader/index.js +4 -0
- package/dist/lib/src/components/Money/Money.vue.js +72 -0
- package/dist/lib/src/components/Money/index.js +4 -0
- package/dist/lib/src/components/Multisuggest/index.js +4 -0
- package/dist/lib/src/components/OptionsList/OptionsList.vue.js +28 -0
- package/dist/lib/src/components/OptionsList/index.js +4 -0
- package/dist/lib/src/components/OptionsListItem/OptionsListItem.vue.js +96 -0
- package/dist/lib/src/components/OptionsListItem/index.js +4 -0
- package/dist/lib/src/components/Percent/Percent.vue.js +73 -0
- package/dist/lib/src/components/Percent/index.js +4 -0
- package/dist/lib/src/components/Skeleton/Skeleton.vue.js +79 -0
- package/dist/lib/src/components/Skeleton/index.js +4 -0
- package/dist/lib/src/components/Step/Step.vue.js +206 -0
- package/dist/lib/src/components/Step/index.js +4 -0
- package/dist/lib/src/components/Steps/Steps.vue.js +15 -0
- package/dist/lib/src/components/Steps/index.js +4 -0
- package/dist/lib/src/components/Tip/Tip.vue.js +160 -0
- package/dist/lib/src/components/Tip/index.js +4 -0
- package/dist/lib/src/components/index.js +32 -0
- package/dist/lib/src/locale/i18nCreator.js +93 -0
- package/dist/lib/src/locale/lang/pt-br.js +21 -0
- package/dist/lib/src/main.js +17 -0
- package/dist/lib/src/mixins/floatFormatter.js +42 -0
- package/dist/lib/src/plugins/currency.js +69 -0
- package/dist/lib/src/utils/constants.js +6 -0
- package/dist/lib/src/utils/error.js +22 -0
- package/dist/lib/src/utils/i18n.js +4 -0
- package/dist/lib/src/utils/icon.js +9 -0
- package/dist/lib/src/utils/index.js +14 -0
- package/dist/lib/src/utils/runtime.js +50 -0
- package/dist/lib/src/utils/scroll.js +28 -0
- package/dist/lib/src/utils/strings.js +4 -0
- package/dist/lib/src/utils/types.js +12 -0
- package/dist/lib/src/utils/use-derived-namespace.js +15 -0
- package/dist/lib/src/utils/use-form-common-props.js +25 -0
- package/dist/lib/src/utils/use-form-item.js +61 -0
- package/dist/lib/src/utils/use-id.js +35 -0
- package/dist/lib/src/utils/use-input.js +31 -0
- package/package.json +19 -17
- package/dist/main.bundle.js +0 -2
- package/dist/main.bundle.js.LICENSE.txt +0 -15
- package/dist/main.css +0 -11
- package/src/locale/i18nCreator.js +0 -170
- package/src/locale/lang/en.js +0 -35
- package/src/locale/lang/pt-br.js +0 -35
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
;/* empty css */
|
|
5
|
+
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
|
|
6
|
+
const _sfc_main = {
|
|
7
|
+
name: "TpTip",
|
|
8
|
+
props: {
|
|
9
|
+
id: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: false,
|
|
12
|
+
default: null
|
|
13
|
+
},
|
|
14
|
+
text: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
type: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "default"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
data() {
|
|
29
|
+
return {
|
|
30
|
+
closed: true
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
computed: {
|
|
34
|
+
_id() {
|
|
35
|
+
return this.id || this.$options.name;
|
|
36
|
+
},
|
|
37
|
+
tptipclasses() {
|
|
38
|
+
const classes = ["grid-content", "pa-3"];
|
|
39
|
+
if (this.type === "error") {
|
|
40
|
+
classes.push("tp-tip-error");
|
|
41
|
+
}
|
|
42
|
+
if (this.type === "warning") {
|
|
43
|
+
classes.push("tp-tip-warning");
|
|
44
|
+
}
|
|
45
|
+
if (this.type === "success") {
|
|
46
|
+
classes.push("tp-tip-success");
|
|
47
|
+
}
|
|
48
|
+
return classes;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const _hoisted_1 = ["id", "innerHTML"];
|
|
53
|
+
const _hoisted_2 = { class: "tp-title" };
|
|
54
|
+
const _hoisted_3 = ["id", "innerHTML"];
|
|
55
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
56
|
+
const _component_el_col = vue.resolveComponent("el-col");
|
|
57
|
+
const _component_el_row = vue.resolveComponent("el-row");
|
|
58
|
+
return !$props.title ? (vue.openBlock(), vue.createBlock(_component_el_row, {
|
|
59
|
+
key: 0,
|
|
60
|
+
id: `${$options._id}`,
|
|
61
|
+
align: "middle",
|
|
62
|
+
class: vue.normalizeClass([$options.tptipclasses, "text-black"])
|
|
63
|
+
}, {
|
|
64
|
+
default: vue.withCtx(() => [
|
|
65
|
+
vue.createVNode(_component_el_col, {
|
|
66
|
+
xs: 3,
|
|
67
|
+
sm: 1,
|
|
68
|
+
class: "icone"
|
|
69
|
+
}, {
|
|
70
|
+
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
71
|
+
vue.createElementVNode("em", { class: "far fa-lightbulb-on" }, null, -1)
|
|
72
|
+
])),
|
|
73
|
+
_: 1
|
|
74
|
+
}),
|
|
75
|
+
vue.createVNode(_component_el_col, {
|
|
76
|
+
xs: 21,
|
|
77
|
+
sm: 23
|
|
78
|
+
}, {
|
|
79
|
+
default: vue.withCtx(() => [
|
|
80
|
+
vue.createElementVNode("div", {
|
|
81
|
+
id: `${$options._id}-text`,
|
|
82
|
+
innerHTML: $props.text
|
|
83
|
+
}, null, 8, _hoisted_1)
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
})
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 8, ["id", "class"])) : (vue.openBlock(), vue.createBlock(_component_el_row, {
|
|
90
|
+
key: 1,
|
|
91
|
+
id: `${$options._id}`,
|
|
92
|
+
align: "middle",
|
|
93
|
+
justify: "center",
|
|
94
|
+
class: vue.normalizeClass([$options.tptipclasses, "text-black"])
|
|
95
|
+
}, {
|
|
96
|
+
default: vue.withCtx(() => [
|
|
97
|
+
vue.createVNode(_component_el_col, {
|
|
98
|
+
xs: 3,
|
|
99
|
+
sm: 1
|
|
100
|
+
}, {
|
|
101
|
+
default: vue.withCtx(() => [
|
|
102
|
+
vue.createVNode(_component_el_row, { justify: "start" }, {
|
|
103
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
104
|
+
vue.createElementVNode("em", { class: "far fa-lightbulb-on" }, null, -1)
|
|
105
|
+
])),
|
|
106
|
+
_: 1
|
|
107
|
+
})
|
|
108
|
+
]),
|
|
109
|
+
_: 1
|
|
110
|
+
}),
|
|
111
|
+
vue.createVNode(_component_el_col, {
|
|
112
|
+
xs: 18,
|
|
113
|
+
sm: 22
|
|
114
|
+
}, {
|
|
115
|
+
default: vue.withCtx(() => [
|
|
116
|
+
vue.createElementVNode("b", _hoisted_2, vue.toDisplayString($props.title), 1)
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}),
|
|
120
|
+
vue.createVNode(_component_el_col, {
|
|
121
|
+
xs: 3,
|
|
122
|
+
sm: 1
|
|
123
|
+
}, {
|
|
124
|
+
default: vue.withCtx(() => [
|
|
125
|
+
vue.createVNode(_component_el_row, { justify: "end" }, {
|
|
126
|
+
default: vue.withCtx(() => [
|
|
127
|
+
$data.closed ? (vue.openBlock(), vue.createElementBlock("em", {
|
|
128
|
+
key: 0,
|
|
129
|
+
class: "fa fa-plus tp-close-button",
|
|
130
|
+
onClick: _cache[0] || (_cache[0] = ($event) => $data.closed = !$data.closed)
|
|
131
|
+
})) : (vue.openBlock(), vue.createElementBlock("em", {
|
|
132
|
+
key: 1,
|
|
133
|
+
class: "fa fa-minus tp-close-button",
|
|
134
|
+
onClick: _cache[1] || (_cache[1] = ($event) => $data.closed = !$data.closed)
|
|
135
|
+
}))
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
})
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
}),
|
|
142
|
+
vue.createVNode(_component_el_col, {
|
|
143
|
+
xs: 18,
|
|
144
|
+
sm: 22,
|
|
145
|
+
class: vue.normalizeClass("tp-text " + ($data.closed ? "tp-vanish" : ""))
|
|
146
|
+
}, {
|
|
147
|
+
default: vue.withCtx(() => [
|
|
148
|
+
vue.createElementVNode("div", {
|
|
149
|
+
id: `${$options._id}-text`,
|
|
150
|
+
innerHTML: $props.text
|
|
151
|
+
}, null, 8, _hoisted_3)
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["class"])
|
|
155
|
+
]),
|
|
156
|
+
_: 1
|
|
157
|
+
}, 8, ["id", "class"]));
|
|
158
|
+
}
|
|
159
|
+
const Tip = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2861430a"]]);
|
|
160
|
+
exports.default = Tip;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Autosuggest = require("./Autosuggest/Autosuggest.vue.js");
|
|
4
|
+
const Inline = require("./Inline/Inline.vue.js");
|
|
5
|
+
const Money = require("./Money/Money.vue.js");
|
|
6
|
+
const Percent = require("./Percent/Percent.vue.js");
|
|
7
|
+
const OptionsList = require("./OptionsList/OptionsList.vue.js");
|
|
8
|
+
const OptionsListItem = require("./OptionsListItem/OptionsListItem.vue.js");
|
|
9
|
+
const Loader = require("./Loader/Loader.vue.js");
|
|
10
|
+
const Skeleton = require("./Skeleton/Skeleton.vue.js");
|
|
11
|
+
const Tip = require("./Tip/Tip.vue.js");
|
|
12
|
+
const Multisuggest = require("./Autosuggest/Multisuggest.vue.js");
|
|
13
|
+
const Step = require("./Step/Step.vue.js");
|
|
14
|
+
const Steps = require("./Steps/Steps.vue.js");
|
|
15
|
+
const InputNumber = require("./InputNumber/InputNumber.vue.js");
|
|
16
|
+
const elementPlus = require("element-plus");
|
|
17
|
+
elementPlus.ElDialog.name = "TpDialog";
|
|
18
|
+
const Dialog = elementPlus.ElDialog;
|
|
19
|
+
exports.Autosuggest = Autosuggest.default;
|
|
20
|
+
exports.Inline = Inline.default;
|
|
21
|
+
exports.Money = Money.default;
|
|
22
|
+
exports.Percent = Percent.default;
|
|
23
|
+
exports.OptionsList = OptionsList.default;
|
|
24
|
+
exports.OptionsListItem = OptionsListItem.default;
|
|
25
|
+
exports.Loader = Loader.default;
|
|
26
|
+
exports.Skeleton = Skeleton.default;
|
|
27
|
+
exports.Tip = Tip.default;
|
|
28
|
+
exports.Multisuggest = Multisuggest.default;
|
|
29
|
+
exports.Step = Step.default;
|
|
30
|
+
exports.Steps = Steps.default;
|
|
31
|
+
exports.InputNumber = InputNumber.default;
|
|
32
|
+
exports.Dialog = Dialog;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vueI18n = require("vue-i18n");
|
|
4
|
+
const vue = require("vue");
|
|
5
|
+
let i18n;
|
|
6
|
+
const loadedLanguages = [];
|
|
7
|
+
const i18nHelper = {
|
|
8
|
+
global: false,
|
|
9
|
+
importLangFile: false,
|
|
10
|
+
/**
|
|
11
|
+
* Eventos que podem ser observados com watch
|
|
12
|
+
*/
|
|
13
|
+
hooks: vue.reactive({
|
|
14
|
+
onLanguageChanged: ""
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
const importLangFiles = async function(filename) {
|
|
18
|
+
let langsCustom = {};
|
|
19
|
+
if (i18nHelper.importLangFile && typeof i18nHelper.importLangFile === "function") {
|
|
20
|
+
langsCustom = await i18nHelper.importLangFile(filename);
|
|
21
|
+
if (!(Object.keys(langsCustom).length === 1 && langsCustom.default)) {
|
|
22
|
+
langsCustom.default = langsCustom;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return langsCustom;
|
|
26
|
+
};
|
|
27
|
+
i18nHelper.onLanguageSet = function(locale) {
|
|
28
|
+
throw new Error("Implemente a função onLanguageSet na definição do plugin i18n");
|
|
29
|
+
};
|
|
30
|
+
i18nHelper.setI18nLanguage = function(locale) {
|
|
31
|
+
if (i18n.mode === "legacy") {
|
|
32
|
+
i18n.global.locale = locale;
|
|
33
|
+
} else {
|
|
34
|
+
i18n.global.locale.value = locale;
|
|
35
|
+
}
|
|
36
|
+
i18nHelper.hooks.onLanguageChanged = locale;
|
|
37
|
+
document.querySelector("html").setAttribute("lang", locale);
|
|
38
|
+
i18nHelper.onLanguageSet(locale);
|
|
39
|
+
return locale;
|
|
40
|
+
};
|
|
41
|
+
i18nHelper.loadLanguageAsync = async function(locale) {
|
|
42
|
+
if (loadedLanguages.includes(locale)) {
|
|
43
|
+
return locale;
|
|
44
|
+
}
|
|
45
|
+
const messages = await importLangFiles(locale);
|
|
46
|
+
i18n.global.setLocaleMessage(locale, messages.default);
|
|
47
|
+
loadedLanguages.push(locale);
|
|
48
|
+
return locale;
|
|
49
|
+
};
|
|
50
|
+
async function setupI18n(options = {}) {
|
|
51
|
+
if (!i18n) {
|
|
52
|
+
const locale = options.locale || "pt-br";
|
|
53
|
+
i18n = vueI18n.createI18n({
|
|
54
|
+
legacy: false,
|
|
55
|
+
locale,
|
|
56
|
+
missing: (locale2, key) => {
|
|
57
|
+
console.warn(`translation missing: locale=${locale2}, key=${key}`);
|
|
58
|
+
},
|
|
59
|
+
...options
|
|
60
|
+
});
|
|
61
|
+
await i18nHelper.loadLanguageAsync(locale);
|
|
62
|
+
i18nHelper.setI18nLanguage(locale);
|
|
63
|
+
}
|
|
64
|
+
return i18n;
|
|
65
|
+
}
|
|
66
|
+
const i18nCreator = async (options = {}, postInstall = (app, options2, i18nHelper2) => {
|
|
67
|
+
}) => {
|
|
68
|
+
const keys = Object.keys(options).filter((key) => !["i18nHelper", "i18nOptions"].includes(key));
|
|
69
|
+
if (keys.length) {
|
|
70
|
+
throw new Error(`Invalid options: ${keys.join(", ")}, expected { i18nOptions, i18nHelper }`);
|
|
71
|
+
}
|
|
72
|
+
if (options.i18nHelper && typeof options.i18nHelper.importLangFile === "function") {
|
|
73
|
+
i18nHelper.importLangFile = options.i18nHelper.importLangFile;
|
|
74
|
+
}
|
|
75
|
+
if (options.i18nHelper && typeof options.i18nHelper.onLanguageSet === "function") {
|
|
76
|
+
i18nHelper.onLanguageSet = options.i18nHelper.onLanguageSet;
|
|
77
|
+
}
|
|
78
|
+
let i18nOptions = {};
|
|
79
|
+
if (options.i18nOptions && typeof options.i18nOptions === "object") {
|
|
80
|
+
i18nOptions = options.i18nOptions;
|
|
81
|
+
}
|
|
82
|
+
i18n = await setupI18n(i18nOptions);
|
|
83
|
+
i18nHelper.global = i18n.global;
|
|
84
|
+
return {
|
|
85
|
+
install: (app, opts) => {
|
|
86
|
+
i18n.install(app, i18nOptions);
|
|
87
|
+
if (typeof postInstall === "function") {
|
|
88
|
+
postInstall(app, options, i18nHelper);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
exports.default = i18nCreator;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const ptbrLocale = {
|
|
4
|
+
locale: {
|
|
5
|
+
// locale name equals filename reference
|
|
6
|
+
name: "pt-br",
|
|
7
|
+
// IANA.ORG convetions according to W3C
|
|
8
|
+
prefix: "pt-BR",
|
|
9
|
+
number: {
|
|
10
|
+
decimal: ",",
|
|
11
|
+
thousands: ".",
|
|
12
|
+
prefix: "",
|
|
13
|
+
suffix: "",
|
|
14
|
+
precision: 2
|
|
15
|
+
},
|
|
16
|
+
date: {
|
|
17
|
+
format: "DD/MM/YYYY"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.default = ptbrLocale;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const index = require("./components/index.js");
|
|
4
|
+
const currency = require("./plugins/currency.js");
|
|
5
|
+
const i18nCreator = require("./locale/i18nCreator.js");
|
|
6
|
+
const install = function(app) {
|
|
7
|
+
app.use(currency.default);
|
|
8
|
+
for (const componentName in index) {
|
|
9
|
+
const component = index[componentName];
|
|
10
|
+
app.component(component.name, component);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
if (typeof window !== "undefined" && window.Vue) {
|
|
14
|
+
install(window.Vue);
|
|
15
|
+
}
|
|
16
|
+
const main = { ...index, install, i18nCreator: i18nCreator.default };
|
|
17
|
+
exports.default = main;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const floatFormatterMixin = {
|
|
4
|
+
inject: ["formatMoney"],
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
formattedValue: this.modelValue
|
|
8
|
+
};
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
allowEmpty: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
15
|
+
customPrecision: {
|
|
16
|
+
default: false
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
watch: {
|
|
20
|
+
modelValue: {
|
|
21
|
+
immediate: true,
|
|
22
|
+
handler(newValue, oldValue) {
|
|
23
|
+
if (newValue === "" && this.allowEmpty) {
|
|
24
|
+
this.formattedValue = "";
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.formattedValue = this.formatMoney(newValue, true, this.locale, this.customPrecision);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
input(evt) {
|
|
33
|
+
this.formattedValue = this.formatMoney(evt, true, this.locale, this.customPrecision);
|
|
34
|
+
const moneyFormatado = this.formatMoney(evt, false, this.locale, this.customPrecision);
|
|
35
|
+
this.$emit("input", moneyFormatado);
|
|
36
|
+
},
|
|
37
|
+
handleChange(evt) {
|
|
38
|
+
this.$emit("change", this.formatMoney(evt, false, this.locale, this.customPrecision));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.default = floatFormatterMixin;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const ptBr = require("../locale/lang/pt-br.js");
|
|
4
|
+
let defaults;
|
|
5
|
+
function setDefaults(app) {
|
|
6
|
+
defaults = app.$i18n ? app.$i18n.t("locale.number") : ptBr.default.locale;
|
|
7
|
+
}
|
|
8
|
+
function formatMoney(input, toString = false, locale = defaults, customPrecision = false) {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
let inputString = `${input}`;
|
|
11
|
+
if (inputString.slice(-1).match(/[.,]/)) {
|
|
12
|
+
inputString = inputString.substring(0, inputString.length - 1);
|
|
13
|
+
}
|
|
14
|
+
const negative = inputString.indexOf("-") >= 0 ? -1 : 1;
|
|
15
|
+
if (toString) {
|
|
16
|
+
input = completeZeros(customPrecision, inputString, locale);
|
|
17
|
+
}
|
|
18
|
+
const precision = customPrecision || locale.number.precision;
|
|
19
|
+
const numbers = onlyNumbers(input);
|
|
20
|
+
const currency = numbersToCurrency(numbers, precision);
|
|
21
|
+
if (toString) {
|
|
22
|
+
let num = negative === -1 ? `-${currency}` : `${currency}`;
|
|
23
|
+
if ((_a = locale == null ? void 0 : locale.number) == null ? void 0 : _a.decimal) {
|
|
24
|
+
const decimalChar = (_b = locale == null ? void 0 : locale.number) == null ? void 0 : _b.decimal;
|
|
25
|
+
num = num.replaceAll(",", decimalChar).replaceAll(".", decimalChar);
|
|
26
|
+
}
|
|
27
|
+
return num;
|
|
28
|
+
}
|
|
29
|
+
return currency * negative;
|
|
30
|
+
}
|
|
31
|
+
function completeZeros(customPrecision, input, locale) {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
const precision = customPrecision || ((_a = locale == null ? void 0 : locale.number) == null ? void 0 : _a.precision) || defaults.precision;
|
|
34
|
+
const decimal = ((_b = locale == null ? void 0 : locale.number) == null ? void 0 : _b.decimal) || defaults.decimal;
|
|
35
|
+
let i = input.lastIndexOf(".");
|
|
36
|
+
const j = input.lastIndexOf(",");
|
|
37
|
+
i = i > j ? i : j;
|
|
38
|
+
const qntDecimais = i ? input.length - i - 1 : 0;
|
|
39
|
+
if (i === -1) {
|
|
40
|
+
input = input + decimal + "0".repeat(precision);
|
|
41
|
+
} else if (i && qntDecimais < precision) {
|
|
42
|
+
input += "0".repeat(precision - qntDecimais);
|
|
43
|
+
}
|
|
44
|
+
return input;
|
|
45
|
+
}
|
|
46
|
+
function onlyNumbers(input) {
|
|
47
|
+
return toStr(input).replace(/\D+/g, "") || "0";
|
|
48
|
+
}
|
|
49
|
+
function fixed(precision = defaults.precision) {
|
|
50
|
+
return between(0, precision, 20);
|
|
51
|
+
}
|
|
52
|
+
function between(min, n, max) {
|
|
53
|
+
return Math.max(min, Math.min(n, max));
|
|
54
|
+
}
|
|
55
|
+
function numbersToCurrency(numbers, precision) {
|
|
56
|
+
const exp = Math.pow(10, precision);
|
|
57
|
+
const float = parseFloat(numbers) / exp;
|
|
58
|
+
return float.toFixed(fixed(precision));
|
|
59
|
+
}
|
|
60
|
+
function toStr(value) {
|
|
61
|
+
return value ? value.toString() : "";
|
|
62
|
+
}
|
|
63
|
+
const Currency = {
|
|
64
|
+
install: (app, options) => {
|
|
65
|
+
setDefaults(app);
|
|
66
|
+
app.provide("formatMoney", formatMoney);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.default = Currency;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const formContextKey = Symbol("formContextKey");
|
|
4
|
+
const formItemContextKey = Symbol("formItemContextKey");
|
|
5
|
+
exports.formContextKey = formContextKey;
|
|
6
|
+
exports.formItemContextKey = formItemContextKey;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const shared_esmBundler = require("../../node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
4
|
+
require("lodash-es");
|
|
5
|
+
require("vue");
|
|
6
|
+
class ElementPlusError extends Error {
|
|
7
|
+
constructor(m) {
|
|
8
|
+
super(m);
|
|
9
|
+
this.name = "ElementPlusError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function throwError(scope, m) {
|
|
13
|
+
throw new ElementPlusError(`[${scope}] ${m}`);
|
|
14
|
+
}
|
|
15
|
+
function debugWarn(scope, message) {
|
|
16
|
+
if (process.env.NODE_ENV !== "production") {
|
|
17
|
+
const error = shared_esmBundler.isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
|
|
18
|
+
console.warn(error);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.debugWarn = debugWarn;
|
|
22
|
+
exports.throwError = throwError;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("../../node_modules/@element-plus/icons-vue/dist/index.js");
|
|
4
|
+
const ValidateComponentsMap = {
|
|
5
|
+
validating: index.Loading,
|
|
6
|
+
success: index.CircleCheck,
|
|
7
|
+
error: index.CircleClose
|
|
8
|
+
};
|
|
9
|
+
exports.ValidateComponentsMap = ValidateComponentsMap;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("lodash-es");
|
|
4
|
+
const vue = require("vue");
|
|
5
|
+
const UPDATE_MODEL_EVENT = "update:modelValue";
|
|
6
|
+
const CHANGE_EVENT = "change";
|
|
7
|
+
const INPUT_EVENT = "input";
|
|
8
|
+
Object.defineProperty(exports, "isVNode", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: () => vue.isVNode
|
|
11
|
+
});
|
|
12
|
+
exports.CHANGE_EVENT = CHANGE_EVENT;
|
|
13
|
+
exports.INPUT_EVENT = INPUT_EVENT;
|
|
14
|
+
exports.UPDATE_MODEL_EVENT = UPDATE_MODEL_EVENT;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const lodashEs = require("lodash-es");
|
|
5
|
+
const shared_esmBundler = require("../../node_modules/@vue/shared/dist/shared.esm-bundler.js");
|
|
6
|
+
const epPropKey = "__epPropKey";
|
|
7
|
+
const isEpProp = (val) => shared_esmBundler.isObject(val) && !!val[epPropKey];
|
|
8
|
+
const buildProp = (prop, key) => {
|
|
9
|
+
if (!shared_esmBundler.isObject(prop) || isEpProp(prop)) return prop;
|
|
10
|
+
const { values, required, default: defaultValue, type, validator } = prop;
|
|
11
|
+
const _validator = values || validator ? (val) => {
|
|
12
|
+
let valid = false;
|
|
13
|
+
let allowedValues = [];
|
|
14
|
+
if (values) {
|
|
15
|
+
allowedValues = Array.from(values);
|
|
16
|
+
if (shared_esmBundler.hasOwn(prop, "default")) {
|
|
17
|
+
allowedValues.push(defaultValue);
|
|
18
|
+
}
|
|
19
|
+
valid || (valid = allowedValues.includes(val));
|
|
20
|
+
}
|
|
21
|
+
if (validator) valid || (valid = validator(val));
|
|
22
|
+
if (!valid && allowedValues.length > 0) {
|
|
23
|
+
const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
|
|
24
|
+
vue.warn(
|
|
25
|
+
`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(
|
|
26
|
+
val
|
|
27
|
+
)}.`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
return valid;
|
|
31
|
+
} : void 0;
|
|
32
|
+
const epProp = {
|
|
33
|
+
type,
|
|
34
|
+
required: !!required,
|
|
35
|
+
validator: _validator,
|
|
36
|
+
[epPropKey]: true
|
|
37
|
+
};
|
|
38
|
+
if (shared_esmBundler.hasOwn(prop, "default")) epProp.default = defaultValue;
|
|
39
|
+
return epProp;
|
|
40
|
+
};
|
|
41
|
+
const buildProps = (props) => lodashEs.fromPairs(
|
|
42
|
+
Object.entries(props).map(([key, option]) => [
|
|
43
|
+
key,
|
|
44
|
+
buildProp(option, key)
|
|
45
|
+
])
|
|
46
|
+
);
|
|
47
|
+
exports.buildProp = buildProp;
|
|
48
|
+
exports.buildProps = buildProps;
|
|
49
|
+
exports.epPropKey = epPropKey;
|
|
50
|
+
exports.isEpProp = isEpProp;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("lodash-es");
|
|
4
|
+
require("vue");
|
|
5
|
+
const index = require("../../node_modules/@vueuse/shared/index.js");
|
|
6
|
+
function scrollIntoView(container, selected) {
|
|
7
|
+
if (!index.isClient) return;
|
|
8
|
+
if (!selected) {
|
|
9
|
+
container.scrollTop = 0;
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const offsetParents = [];
|
|
13
|
+
let pointer = selected.offsetParent;
|
|
14
|
+
while (pointer !== null && container !== pointer && container.contains(pointer)) {
|
|
15
|
+
offsetParents.push(pointer);
|
|
16
|
+
pointer = pointer.offsetParent;
|
|
17
|
+
}
|
|
18
|
+
const top = selected.offsetTop + offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0);
|
|
19
|
+
const bottom = top + selected.offsetHeight;
|
|
20
|
+
const viewRectTop = container.scrollTop;
|
|
21
|
+
const viewRectBottom = viewRectTop + container.clientHeight;
|
|
22
|
+
if (top < viewRectTop) {
|
|
23
|
+
container.scrollTop = top;
|
|
24
|
+
} else if (bottom > viewRectBottom) {
|
|
25
|
+
container.scrollTop = bottom - container.clientHeight;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.scrollIntoView = scrollIntoView;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("lodash-es");
|
|
4
|
+
const vue = require("vue");
|
|
5
|
+
const isUndefined = (val) => val === void 0;
|
|
6
|
+
const isNumber = (val) => typeof val === "number";
|
|
7
|
+
Object.defineProperty(exports, "isVNode", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: () => vue.isVNode
|
|
10
|
+
});
|
|
11
|
+
exports.isNumber = isNumber;
|
|
12
|
+
exports.isUndefined = isUndefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const defaultNamespace = "el";
|
|
5
|
+
const namespaceContextKey = Symbol("namespaceContextKey");
|
|
6
|
+
const useGetDerivedNamespace = (namespaceOverrides) => {
|
|
7
|
+
const derivedNamespace = vue.getCurrentInstance() ? vue.inject(namespaceContextKey, vue.ref(defaultNamespace)) : vue.ref(defaultNamespace);
|
|
8
|
+
const namespace = vue.computed(() => {
|
|
9
|
+
return vue.unref(derivedNamespace) || defaultNamespace;
|
|
10
|
+
});
|
|
11
|
+
return namespace;
|
|
12
|
+
};
|
|
13
|
+
exports.defaultNamespace = defaultNamespace;
|
|
14
|
+
exports.namespaceContextKey = namespaceContextKey;
|
|
15
|
+
exports.useGetDerivedNamespace = useGetDerivedNamespace;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const constants = require("./constants.js");
|
|
5
|
+
const index = require("../../node_modules/element-plus/es/hooks/use-prop/index.js");
|
|
6
|
+
const index$1 = require("../../node_modules/element-plus/es/hooks/use-size/index.js");
|
|
7
|
+
const useFormSize = (fallback, ignore = {}) => {
|
|
8
|
+
const emptyRef = vue.ref(void 0);
|
|
9
|
+
const size = ignore.prop ? emptyRef : index.useProp("size");
|
|
10
|
+
const globalConfig = ignore.global ? emptyRef : index$1.useGlobalSize();
|
|
11
|
+
const form = ignore.form ? { size: void 0 } : vue.inject(constants.formContextKey, void 0);
|
|
12
|
+
const formItem = ignore.formItem ? { size: void 0 } : vue.inject(constants.formItemContextKey, void 0);
|
|
13
|
+
return vue.computed(
|
|
14
|
+
() => size.value || vue.unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig.value || ""
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
const useFormDisabled = (fallback) => {
|
|
18
|
+
const disabled = index.useProp("disabled");
|
|
19
|
+
const form = vue.inject(constants.formContextKey, void 0);
|
|
20
|
+
return vue.computed(
|
|
21
|
+
() => disabled.value || vue.unref(fallback) || (form == null ? void 0 : form.disabled) || false
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
exports.useFormDisabled = useFormDisabled;
|
|
25
|
+
exports.useFormSize = useFormSize;
|