@opentinyvue/vue-dynamic-scroller-item 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 DynamicScrollerItem from './src/index';
2
+ export default DynamicScrollerItem;
package/lib/index.js ADDED
@@ -0,0 +1,65 @@
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
+ var template = function template2(mode) {
13
+ var _process$env;
14
+ typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null;
15
+ return PcTemplate;
16
+ };
17
+ var DynamicScrollerItem = defineComponent({
18
+ name: $prefix + "DynamicScrollerItem",
19
+ props: _extends({}, $props, {
20
+ // eslint-disable-next-line vue/require-prop-types
21
+ item: {
22
+ required: true
23
+ },
24
+ watchData: {
25
+ type: Boolean,
26
+ default: false
27
+ },
28
+ // Indicates if the view is actively used to display an item.
29
+ active: {
30
+ type: Boolean,
31
+ required: true
32
+ },
33
+ index: {
34
+ type: Number,
35
+ default: void 0
36
+ },
37
+ sizeDependencies: {
38
+ type: [Array, Object],
39
+ default: null
40
+ },
41
+ emitResize: {
42
+ type: Boolean,
43
+ default: false
44
+ },
45
+ tag: {
46
+ type: String,
47
+ default: "div"
48
+ }
49
+ }),
50
+ setup: function setup(props, context) {
51
+ return $setup({
52
+ props,
53
+ context,
54
+ template
55
+ });
56
+ }
57
+ });
58
+ var version = "2.21.0";
59
+ DynamicScrollerItem.install = function(Vue) {
60
+ Vue.component(DynamicScrollerItem.name, DynamicScrollerItem);
61
+ };
62
+ DynamicScrollerItem.version = version;
63
+ export {
64
+ DynamicScrollerItem as default
65
+ };
package/lib/pc.js ADDED
@@ -0,0 +1,62 @@
1
+ import { renderless, api } from '@opentinyvue/vue-renderless/dynamic-scroller-item/vue';
2
+ import { defineComponent, props, setup, h } from '@opentinyvue/vue-common';
3
+
4
+ function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
5
+ var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
6
+ if (render) {
7
+ options.render = render;
8
+ options.staticRenderFns = staticRenderFns;
9
+ options._compiled = true;
10
+ }
11
+ var hook;
12
+ if (injectStyles) {
13
+ hook = injectStyles;
14
+ }
15
+ if (hook) {
16
+ if (options.functional) {
17
+ options._injectStyles = hook;
18
+ var originalRender = options.render;
19
+ options.render = function renderWithStyleInjection(h, context) {
20
+ hook.call(context);
21
+ return originalRender(h, context);
22
+ };
23
+ } else {
24
+ var existing = options.beforeCreate;
25
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
26
+ }
27
+ }
28
+ return {
29
+ exports: scriptExports,
30
+ options
31
+ };
32
+ }
33
+
34
+ var __vue2_script = defineComponent({
35
+ emits: ["resize"],
36
+ props: [].concat(props, ["item", "watchData", "active", "index", "sizeDependencies", "emitResize", "tag"]),
37
+ components: {},
38
+ setup: function setup$1(props2, context) {
39
+ return setup({
40
+ props: props2,
41
+ context,
42
+ renderless,
43
+ api
44
+ });
45
+ },
46
+ render: function render() {
47
+ return h(this.tag, this.slots.default ? this.slots.default() : null);
48
+ }
49
+ });
50
+ var __vue2_render, __vue2_staticRenderFns;
51
+ var __cssModules = {};
52
+ var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, __vue2_render, __vue2_staticRenderFns, false, __vue2_injectStyles);
53
+ function __vue2_injectStyles(context) {
54
+ for (var o in __cssModules) {
55
+ this[o] = __cssModules[o];
56
+ }
57
+ }
58
+ var pc = /* @__PURE__ */ function() {
59
+ return __component__.exports;
60
+ }();
61
+
62
+ export { pc as default };
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@opentinyvue/vue-dynamic-scroller-item",
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
+ },
13
+ "license": "MIT",
14
+ "types": "index.d.ts"
15
+ }
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;