@zeedhi/zd-user-info-vue 1.3.5 → 3.0.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/package.json CHANGED
@@ -1,26 +1,46 @@
1
1
  {
2
2
  "name": "@zeedhi/zd-user-info-vue",
3
- "version": "1.3.5",
4
- "description": "Implementation of UserInfo componente using Zeedhi Next",
5
- "main": "dist/user-info-vue.umd.js",
6
- "module": "dist/user-info-vue.esm.js",
7
- "typings": "types/index.d.ts",
3
+ "version": "3.0.0",
4
+ "description": "Powered by Zeedhi",
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
8
9
  "publishConfig": {
9
10
  "access": "public"
10
11
  },
12
+ "module": "./dist/user-info-vue.es.js",
13
+ "types": "./dist/types/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "import": "./dist/user-info-vue.es.js",
17
+ "types": "./dist/types/index.d.ts"
18
+ }
19
+ },
11
20
  "scripts": {
12
- "build": "rollup -c",
13
- "lint": "eslint . --ext .ts --fix",
14
- "watch": "rollup -cw"
21
+ "dev": "vite",
22
+ "build": "vue-tsc -b && vite build",
23
+ "preview": "vite preview"
15
24
  },
16
25
  "peerDependencies": {
17
- "@zeedhi/common": "^1.57.0",
18
- "@zeedhi/core": "^1.57.0",
19
- "@zeedhi/vuetify": "^1.57.0",
20
- "@zeedhi/zd-user-info-common": "file:packages/common",
21
- "vue": "2.7.*",
22
- "vue-class-component": "7.2.*",
23
- "vue-property-decorator": "9.1.*"
26
+ "@zeedhi/common": "^3.0.0",
27
+ "@zeedhi/zd-user-info-common": "^3.0.0",
28
+ "vue": "^3.5.13"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "^22.10.2",
32
+ "@vitejs/plugin-vue": "^5.2.1",
33
+ "@vue/tsconfig": "^0.7.0",
34
+ "@zeedhi/common": "^3.0.0",
35
+ "@zeedhi/vuetify": "^3.0.0",
36
+ "@zeedhi/zd-user-info-common": "^3.0.0",
37
+ "sass": "^1.83.0",
38
+ "typescript": "~5.6.2",
39
+ "vite": "^5.4.0",
40
+ "vite-plugin-css-injected-by-js": "^3.5.2",
41
+ "vite-plugin-dts": "^4.3.0",
42
+ "vue": "^3.5.13",
43
+ "vue-tsc": "^2.1.10"
24
44
  },
25
- "gitHead": "dd2dd140aed771097306d0d5a454ff41ce667bf9"
45
+ "gitHead": "4a32d69e039978568226f2285b2f3563bb41d614"
26
46
  }
@@ -1,316 +0,0 @@
1
- import { VersionService } from '@zeedhi/core';
2
- import { Prop, Component } from 'vue-property-decorator';
3
- import { PropWatch, ZdComponentRender } from '@zeedhi/vuetify';
4
- import { UserInfo } from '@zeedhi/zd-user-info-common';
5
-
6
- /*! *****************************************************************************
7
- Copyright (c) Microsoft Corporation.
8
-
9
- Permission to use, copy, modify, and/or distribute this software for any
10
- purpose with or without fee is hereby granted.
11
-
12
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
13
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
15
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
17
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18
- PERFORMANCE OF THIS SOFTWARE.
19
- ***************************************************************************** */
20
-
21
- function __decorate(decorators, target, key, desc) {
22
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
24
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
25
- return c > 3 && r && Object.defineProperty(target, key, r), r;
26
- }
27
-
28
- let ZdUserInfo = class ZdUserInfo extends ZdComponentRender {
29
- constructor() {
30
- super(...arguments);
31
- this.instanceType = UserInfo;
32
- }
33
- };
34
- __decorate([
35
- Prop({ type: [Object] })
36
- ], ZdUserInfo.prototype, "activator", void 0);
37
- __decorate([
38
- Prop({ type: [Object], default: () => ({}) })
39
- ], ZdUserInfo.prototype, "avatarProps", void 0);
40
- __decorate([
41
- Prop({ type: [Array], default: () => ([]) })
42
- ], ZdUserInfo.prototype, "bottomSlot", void 0);
43
- __decorate([
44
- Prop({ type: [Array] })
45
- ], ZdUserInfo.prototype, "centerSlot", void 0);
46
- __decorate([
47
- Prop({ type: [Array], default: () => ([]) })
48
- ], ZdUserInfo.prototype, "topSlot", void 0);
49
- __decorate([
50
- Prop({ type: [Array], default: () => ([]) })
51
- ], ZdUserInfo.prototype, "headerSlot", void 0);
52
- __decorate([
53
- PropWatch({ type: [String], default: '' })
54
- ], ZdUserInfo.prototype, "user", void 0);
55
- __decorate([
56
- PropWatch({ type: [String], default: '' })
57
- ], ZdUserInfo.prototype, "userImage", void 0);
58
- __decorate([
59
- PropWatch({ type: [Boolean, String], default: true })
60
- ], ZdUserInfo.prototype, "closeOnClick", void 0);
61
- __decorate([
62
- PropWatch({ type: [Boolean, String], default: true })
63
- ], ZdUserInfo.prototype, "closeOnContentClick", void 0);
64
- __decorate([
65
- PropWatch({ type: [Boolean, String], default: false })
66
- ], ZdUserInfo.prototype, "fixed", void 0);
67
- __decorate([
68
- PropWatch({ type: [Object], default: () => ({}) })
69
- ], ZdUserInfo.prototype, "imageProps", void 0);
70
- __decorate([
71
- PropWatch({ type: [Boolean, String], default: false })
72
- ], ZdUserInfo.prototype, "offsetX", void 0);
73
- __decorate([
74
- PropWatch({ type: [Boolean, String], default: true })
75
- ], ZdUserInfo.prototype, "offsetY", void 0);
76
- __decorate([
77
- PropWatch({ type: [Boolean, String], default: true })
78
- ], ZdUserInfo.prototype, "openOnClick", void 0);
79
- __decorate([
80
- PropWatch({ type: [Boolean, String], default: false })
81
- ], ZdUserInfo.prototype, "openOnHover", void 0);
82
- __decorate([
83
- PropWatch({ type: [Number, String], default: 'auto' })
84
- ], ZdUserInfo.prototype, "height", void 0);
85
- __decorate([
86
- PropWatch({ type: [Number, String] })
87
- ], ZdUserInfo.prototype, "maxHeight", void 0);
88
- __decorate([
89
- PropWatch({ type: [Number, String] })
90
- ], ZdUserInfo.prototype, "maxWidth", void 0);
91
- __decorate([
92
- PropWatch({ type: [Number, String] })
93
- ], ZdUserInfo.prototype, "minHeight", void 0);
94
- __decorate([
95
- PropWatch({ type: [Number, String] })
96
- ], ZdUserInfo.prototype, "minWidth", void 0);
97
- __decorate([
98
- PropWatch({ default: undefined })
99
- ], ZdUserInfo.prototype, "value", void 0);
100
- __decorate([
101
- PropWatch({ type: [String, Object], default: () => ({}) })
102
- ], ZdUserInfo.prototype, "visibleItems", void 0);
103
- ZdUserInfo = __decorate([
104
- Component
105
- ], ZdUserInfo);
106
- var script = ZdUserInfo;
107
-
108
- function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
109
- if (typeof shadowMode !== 'boolean') {
110
- createInjectorSSR = createInjector;
111
- createInjector = shadowMode;
112
- shadowMode = false;
113
- }
114
- // Vue.extend constructor export interop.
115
- const options = typeof script === 'function' ? script.options : script;
116
- // render functions
117
- if (template && template.render) {
118
- options.render = template.render;
119
- options.staticRenderFns = template.staticRenderFns;
120
- options._compiled = true;
121
- // functional template
122
- if (isFunctionalTemplate) {
123
- options.functional = true;
124
- }
125
- }
126
- // scopedId
127
- if (scopeId) {
128
- options._scopeId = scopeId;
129
- }
130
- let hook;
131
- if (moduleIdentifier) {
132
- // server build
133
- hook = function (context) {
134
- // 2.3 injection
135
- context =
136
- context || // cached call
137
- (this.$vnode && this.$vnode.ssrContext) || // stateful
138
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
139
- // 2.2 with runInNewContext: true
140
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
141
- context = __VUE_SSR_CONTEXT__;
142
- }
143
- // inject component styles
144
- if (style) {
145
- style.call(this, createInjectorSSR(context));
146
- }
147
- // register component module identifier for async chunk inference
148
- if (context && context._registeredComponents) {
149
- context._registeredComponents.add(moduleIdentifier);
150
- }
151
- };
152
- // used by ssr in case component is cached and beforeCreate
153
- // never gets called
154
- options._ssrRegister = hook;
155
- }
156
- else if (style) {
157
- hook = shadowMode
158
- ? function (context) {
159
- style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
160
- }
161
- : function (context) {
162
- style.call(this, createInjector(context));
163
- };
164
- }
165
- if (hook) {
166
- if (options.functional) {
167
- // register for functional component in vue file
168
- const originalRender = options.render;
169
- options.render = function renderWithStyleInjection(h, context) {
170
- hook.call(context);
171
- return originalRender(h, context);
172
- };
173
- }
174
- else {
175
- // inject component registration as beforeCreate hook
176
- const existing = options.beforeCreate;
177
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
178
- }
179
- }
180
- return script;
181
- }
182
-
183
- /* script */
184
- const __vue_script__ = script;
185
-
186
- /* template */
187
- var __vue_render__ = function () {
188
- var _vm = this;
189
- var _h = _vm.$createElement;
190
- var _c = _vm._self._c || _h;
191
- return _c(
192
- "zd-dropdown",
193
- { attrs: { "instance-object": _vm.instance, name: "dropdown" } },
194
- [
195
- _vm.instance.headerSlot.length > 0 || _vm.$slots.headerSlot
196
- ? [
197
- _vm._l(_vm.instance.headerSlot, function (child, index) {
198
- return _c(
199
- child.component,
200
- _vm._b(
201
- { key: "top_" + index, tag: "component" },
202
- "component",
203
- child,
204
- false
205
- )
206
- )
207
- }),
208
- _vm._v(" "),
209
- _vm._t("headerSlot"),
210
- ]
211
- : _vm.instance.visibleItems.userName ||
212
- _vm.instance.visibleItems.userName === undefined
213
- ? _c("div", { staticClass: "zd-text-center text-h5 zd-pa-2" }, [
214
- _vm._v(_vm._s(_vm.instance.user)),
215
- ])
216
- : _vm._e(),
217
- _vm._v(" "),
218
- _vm.instance.topSlot.length > 0 || _vm.$slots.topSlot
219
- ? [
220
- _c("v-divider"),
221
- _vm._v(" "),
222
- _vm._l(_vm.instance.topSlot, function (child, index) {
223
- return _c(
224
- child.component,
225
- _vm._b(
226
- { key: "top_" + index, tag: "component" },
227
- "component",
228
- child,
229
- false
230
- )
231
- )
232
- }),
233
- _vm._v(" "),
234
- _vm._t("topSlot"),
235
- ]
236
- : _vm._e(),
237
- _vm._v(" "),
238
- _vm.instance.centerSlot.length > 0 || _vm.$slots.centerSlot
239
- ? [
240
- _c("v-divider"),
241
- _vm._v(" "),
242
- _vm._l(_vm.instance.centerSlot, function (child, index) {
243
- return _c(
244
- child.component,
245
- _vm._b(
246
- { key: "center_" + index, tag: "component" },
247
- "component",
248
- child,
249
- false
250
- )
251
- )
252
- }),
253
- _vm._v(" "),
254
- _vm._t("centerSlot"),
255
- ]
256
- : _vm._e(),
257
- _vm._v(" "),
258
- _vm.instance.bottomSlot.length > 0 || _vm.$slots.bottomSlot
259
- ? [
260
- _c("v-divider"),
261
- _vm._v(" "),
262
- _vm._l(_vm.instance.bottomSlot, function (child, index) {
263
- return _c(
264
- child.component,
265
- _vm._b(
266
- { key: "bottom_" + index, tag: "component" },
267
- "component",
268
- child,
269
- false
270
- )
271
- )
272
- }),
273
- _vm._v(" "),
274
- _vm._t("bottomSlot"),
275
- ]
276
- : _vm._e(),
277
- ],
278
- 2
279
- )
280
- };
281
- var __vue_staticRenderFns__ = [];
282
- __vue_render__._withStripped = true;
283
-
284
- /* style */
285
- const __vue_inject_styles__ = undefined;
286
- /* scoped */
287
- const __vue_scope_id__ = undefined;
288
- /* module identifier */
289
- const __vue_module_identifier__ = undefined;
290
- /* functional template */
291
- const __vue_is_functional_template__ = false;
292
- /* style inject */
293
-
294
- /* style inject SSR */
295
-
296
- /* style inject shadow dom */
297
-
298
-
299
-
300
- const __vue_component__ = /*#__PURE__*/normalizeComponent(
301
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
302
- __vue_inject_styles__,
303
- __vue_script__,
304
- __vue_scope_id__,
305
- __vue_is_functional_template__,
306
- __vue_module_identifier__,
307
- false,
308
- undefined,
309
- undefined,
310
- undefined
311
- );
312
-
313
- const packageContent = require('../package.json');
314
- VersionService.addPackageVersion(packageContent.name, packageContent.version);
315
-
316
- export { __vue_component__ as ZdUserInfo, script as ZdUserInfoClass };