@zeedhi/zd-user-info-vue 1.3.5 → 3.0.1

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