@opentinyvue/vue-company 2.21.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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 - present TinyVue Authors.
4
+ Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import Company from './src/index';
2
+ export default Company;
package/lib/index.js ADDED
@@ -0,0 +1,74 @@
1
+ function _extends() {
2
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
3
+ for (var e = 1; e < arguments.length; e++) {
4
+ var t = arguments[e];
5
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
6
+ }
7
+ return n;
8
+ }, _extends.apply(null, arguments);
9
+ }
10
+ import { defineComponent, $prefix, $props, $setup } from "@opentinyvue/vue-common";
11
+ import PcTemplate from "./pc.js";
12
+ import "@opentinyvue/vue-theme/company/index.css";
13
+ var template = function template2(mode) {
14
+ var _process$env;
15
+ typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null;
16
+ return PcTemplate;
17
+ };
18
+ var Company = defineComponent({
19
+ name: $prefix + "Company",
20
+ props: _extends({}, $props, {
21
+ clearable: {
22
+ type: Boolean,
23
+ default: function _default() {
24
+ return true;
25
+ }
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ default: function _default2() {
30
+ return false;
31
+ }
32
+ },
33
+ fetchCompany: Function,
34
+ fields: Object,
35
+ max: {
36
+ type: Number,
37
+ default: 1e3
38
+ },
39
+ modelValue: {},
40
+ placeholder: {
41
+ type: String,
42
+ default: function _default3() {
43
+ return "";
44
+ }
45
+ },
46
+ popperAppendToBody: {
47
+ type: Boolean,
48
+ default: function _default4() {
49
+ return true;
50
+ }
51
+ },
52
+ popperClass: String,
53
+ size: String
54
+ }),
55
+ setup: function setup(props, context) {
56
+ return $setup({
57
+ props,
58
+ context,
59
+ template
60
+ });
61
+ }
62
+ });
63
+ var version = "2.21.0";
64
+ Company.model = {
65
+ prop: "modelValue",
66
+ event: "update:modelValue"
67
+ };
68
+ Company.install = function(Vue) {
69
+ Vue.component(Company.name, Company);
70
+ };
71
+ Company.version = version;
72
+ export {
73
+ Company as default
74
+ };
package/lib/pc.js ADDED
@@ -0,0 +1,103 @@
1
+ import { renderless, api } from '@opentinyvue/vue-renderless/company/vue';
2
+ import { defineComponent, props, setup } from '@opentinyvue/vue-common';
3
+ import Select from '@opentinyvue/vue-select';
4
+ import Option from '@opentinyvue/vue-option';
5
+
6
+ function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
7
+ var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
8
+ if (render) {
9
+ options.render = render;
10
+ options.staticRenderFns = staticRenderFns;
11
+ options._compiled = true;
12
+ }
13
+ var hook;
14
+ if (injectStyles) {
15
+ hook = injectStyles;
16
+ }
17
+ if (hook) {
18
+ if (options.functional) {
19
+ options._injectStyles = hook;
20
+ var originalRender = options.render;
21
+ options.render = function renderWithStyleInjection(h, context) {
22
+ hook.call(context);
23
+ return originalRender(h, context);
24
+ };
25
+ } else {
26
+ var existing = options.beforeCreate;
27
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
28
+ }
29
+ }
30
+ return {
31
+ exports: scriptExports,
32
+ options
33
+ };
34
+ }
35
+
36
+ var __vue2_script = defineComponent({
37
+ inheritAttrs: false,
38
+ emits: ["clear", "update:modelValue", "visible-change", "change"],
39
+ props: [].concat(props, ["modelValue", "max", "placeholder", "size", "clearable", "disabled", "fetchCompany", "fields", "popperClass", "popperAppendToBody"]),
40
+ setup: function setup$1(props2, context) {
41
+ return setup({
42
+ props: props2,
43
+ context,
44
+ renderless,
45
+ api
46
+ });
47
+ },
48
+ components: {
49
+ TinySelect: Select,
50
+ TinyOption: Option
51
+ }
52
+ });
53
+ var render = function render2() {
54
+ var _vm = this;
55
+ var _h = _vm.$createElement;
56
+ var _c = _vm._self._c || _h;
57
+ return _c("tiny-select", _vm._b({
58
+ attrs: {
59
+ "filterable": "",
60
+ "size": _vm.size,
61
+ "clearable": _vm.clearable,
62
+ "disabled": _vm.disabled,
63
+ "placeholder": _vm.placeholder
64
+ },
65
+ on: {
66
+ "change": _vm.change,
67
+ "clear": function clear($event) {
68
+ return _vm.$emit("clear");
69
+ },
70
+ "visible-change": function visibleChange($event) {
71
+ return _vm.$emit("visible-change", $event);
72
+ }
73
+ },
74
+ model: {
75
+ value: _vm.state.selectedValue,
76
+ callback: function callback($$v) {
77
+ _vm.$set(_vm.state, "selectedValue", $$v);
78
+ },
79
+ expression: "state.selectedValue"
80
+ }
81
+ }, "tiny-select", _vm.a(_vm.$attrs, ["^on[A-Z]"]), false), _vm._l(_vm.state.options, function(item) {
82
+ return _c("tiny-option", {
83
+ key: item.value,
84
+ attrs: {
85
+ "label": item.label,
86
+ "value": item.value
87
+ }
88
+ });
89
+ }), 1);
90
+ };
91
+ var staticRenderFns = [];
92
+ var __cssModules = {};
93
+ var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
94
+ function __vue2_injectStyles(context) {
95
+ for (var o in __cssModules) {
96
+ this[o] = __cssModules[o];
97
+ }
98
+ }
99
+ var pc = /* @__PURE__ */ function() {
100
+ return __component__.exports;
101
+ }();
102
+
103
+ export { pc as default };
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@opentinyvue/vue-company",
3
+ "version": "2.21.0",
4
+ "description": "",
5
+ "main": "./lib/index.js",
6
+ "module": "./lib/index.js",
7
+ "sideEffects": false,
8
+ "type": "module",
9
+ "dependencies": {
10
+ "@opentinyvue/vue-common": "~2.21.0",
11
+ "@opentinyvue/vue-renderless": "~3.21.0",
12
+ "@opentinyvue/vue-select": "~2.21.0",
13
+ "@opentinyvue/vue-option": "~2.21.0",
14
+ "@opentinyvue/vue-theme": "~3.21.0"
15
+ },
16
+ "license": "MIT",
17
+ "types": "index.d.ts",
18
+ "scripts": {
19
+ "build": "pnpm -w build:ui $npm_package_name",
20
+ "//postversion": "pnpm build"
21
+ }
22
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;