@utogether/components 1.0.1 → 1.0.4

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,8 +1,8 @@
1
1
  {
2
2
  "name": "@utogether/components",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "private": false,
5
- "main": "lib/ut-components.umd.js",
5
+ "main": "lib/ut-components.umd.min.js",
6
6
  "scripts": {
7
7
  "serve": "vue-cli-service serve",
8
8
  "build": "vue-cli-service build",
@@ -10,6 +10,7 @@
10
10
  "lint": "vue-cli-service lint"
11
11
  },
12
12
  "dependencies": {
13
+ "await-to-js": "^3.0.0",
13
14
  "core-js": "^3.8.3",
14
15
  "vue": "^3.2.13",
15
16
  "vue-class-component": "^8.0.0-0",
@@ -48,5 +49,7 @@
48
49
  "stylelint-order": "^5.0.0",
49
50
  "typescript": "~4.5.5"
50
51
  },
51
- "files": ["lib/ut-components.umd.js"]
52
+ "files": [
53
+ "lib/ut-components.umd.min.js"
54
+ ]
52
55
  }
@@ -1,452 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("Vue"), require("vuei18n"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["Vue", "vuei18n"], factory);
6
- else if(typeof exports === 'object')
7
- exports["ut-components"] = factory(require("Vue"), require("vuei18n"));
8
- else
9
- root["ut-components"] = factory(root["Vue"], root["vuei18n"]);
10
- })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__740__, __WEBPACK_EXTERNAL_MODULE__63__) {
11
- return /******/ (function() { // webpackBootstrap
12
- /******/ var __webpack_modules__ = ({
13
-
14
- /***/ 358:
15
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
16
-
17
- "use strict";
18
- // ESM COMPAT FLAG
19
- __webpack_require__.r(__webpack_exports__);
20
-
21
- // EXPORTS
22
- __webpack_require__.d(__webpack_exports__, {
23
- "default": function() { return /* binding */ SuEnabledButton; }
24
- });
25
-
26
- // EXTERNAL MODULE: external "Vue"
27
- var external_Vue_ = __webpack_require__(740);
28
- // EXTERNAL MODULE: external "vuei18n"
29
- var external_vuei18n_ = __webpack_require__(63);
30
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/thread-loader@3.0.4_webpack@5.73.0/node_modules/thread-loader/dist/cjs.js!./node_modules/.pnpm/babel-loader@8.2.5_1e6208c184491b2ebbab8f4236ed439d/node_modules/babel-loader/lib/index.js!./node_modules/.pnpm/ts-loader@9.3.0_typescript@4.5.5+webpack@5.73.0/node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/.pnpm/vue-loader@17.0.0_webpack@5.73.0/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/packages/SuEnabledButton.vue?vue&type=script&setup=true&lang=ts
31
-
32
-
33
-
34
-
35
- /* harmony default export */ var SuEnabledButtonvue_type_script_setup_true_lang_ts = (/*#__PURE__*/(0,external_Vue_.defineComponent)({
36
- name: 'SuEnabledButton',
37
- props: {
38
- content: null,
39
- row: {
40
- default: () => {
41
- return {};
42
- }
43
- },
44
- status: {
45
- default: "primary"
46
- },
47
- icon: {
48
- default: ""
49
- },
50
- disabled: {
51
- type: Boolean,
52
- default: false
53
- },
54
- auth: null
55
- },
56
-
57
- setup(__props) {
58
- const props = __props;
59
- const instance = (0,external_Vue_.getCurrentInstance)();
60
- const hasAuthority = instance?.appContext.config.globalProperties.$hasAuthority;
61
- const {
62
- t
63
- } = (0,external_vuei18n_.useI18n)();
64
- const btnprops = (0,external_Vue_.computed)(() => {
65
- const row = props.row;
66
- const icon = row?.icon || row?.enabled * 1 ? "fa fa-pause-circle" : "fa fa-play-circle";
67
- const content = row?.enabled * 1 ? "disabled" : "enabled";
68
- const status = row?.status || row?.enabled * 1 ? "warning" : "success";
69
- return {
70
- icon,
71
- status,
72
- content: t(`message.${content}`)
73
- };
74
- });
75
- return (_ctx, _cache) => {
76
- const _component_vxe_button = (0,external_Vue_.resolveComponent)("vxe-button");
77
-
78
- return (0,external_Vue_.openBlock)(), (0,external_Vue_.createBlock)(_component_vxe_button, {
79
- disabled: __props.auth && !(0,external_Vue_.unref)(hasAuthority)(__props.auth) || __props.disabled,
80
- status: (0,external_Vue_.unref)(btnprops).status,
81
- content: (0,external_Vue_.unref)(btnprops).content,
82
- icon: (0,external_Vue_.unref)(btnprops).icon
83
- }, null, 8, ["disabled", "status", "content", "icon"]);
84
- };
85
- }
86
-
87
- }));
88
- ;// CONCATENATED MODULE: ./src/packages/SuEnabledButton.vue?vue&type=script&setup=true&lang=ts
89
-
90
- ;// CONCATENATED MODULE: ./src/packages/SuEnabledButton.vue
91
-
92
-
93
-
94
- const __exports__ = SuEnabledButtonvue_type_script_setup_true_lang_ts;
95
-
96
- /* harmony default export */ var SuEnabledButton = (__exports__);
97
-
98
- /***/ }),
99
-
100
- /***/ 370:
101
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
102
-
103
- "use strict";
104
- // ESM COMPAT FLAG
105
- __webpack_require__.r(__webpack_exports__);
106
-
107
- // EXPORTS
108
- __webpack_require__.d(__webpack_exports__, {
109
- "default": function() { return /* binding */ SuButton; }
110
- });
111
-
112
- // EXTERNAL MODULE: external "Vue"
113
- var external_Vue_ = __webpack_require__(740);
114
- // EXTERNAL MODULE: external "vuei18n"
115
- var external_vuei18n_ = __webpack_require__(63);
116
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/thread-loader@3.0.4_webpack@5.73.0/node_modules/thread-loader/dist/cjs.js!./node_modules/.pnpm/babel-loader@8.2.5_1e6208c184491b2ebbab8f4236ed439d/node_modules/babel-loader/lib/index.js!./node_modules/.pnpm/ts-loader@9.3.0_typescript@4.5.5+webpack@5.73.0/node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/.pnpm/vue-loader@17.0.0_webpack@5.73.0/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/packages/button/SuButton.vue?vue&type=script&setup=true&lang=ts
117
-
118
-
119
-
120
-
121
- /* harmony default export */ var SuButtonvue_type_script_setup_true_lang_ts = (/*#__PURE__*/(0,external_Vue_.defineComponent)({
122
- name: 'SuButton',
123
- props: {
124
- content: null,
125
- type: null,
126
- status: {
127
- default: "primary"
128
- },
129
- icon: null,
130
- disabled: {
131
- type: Boolean,
132
- default: false
133
- },
134
- round: {
135
- type: Boolean
136
- },
137
- loading: {
138
- type: Boolean,
139
- default: false
140
- },
141
- auth: null
142
- },
143
-
144
- setup(__props) {
145
- const props = __props;
146
- const instance = (0,external_Vue_.getCurrentInstance)();
147
- const hasAuthority = instance.appContext.config.globalProperties.$hasAuthority;
148
- const {
149
- t
150
- } = (0,external_vuei18n_.useI18n)();
151
- const btnprops = (0,external_Vue_.computed)(() => {
152
- let icon = props?.icon;
153
-
154
- if (icon?.includes("fa")) {
155
- icon = `fa ${props.icon}`;
156
- } else if (!icon && props.content === "edit") {
157
- icon = "fa fa-edit";
158
- } else if (!icon && props.content === "del") {
159
- icon = "fa fa-trash";
160
- }
161
-
162
- return {
163
- icon,
164
- content: t(`message.${props.content}`)
165
- };
166
- });
167
- return (_ctx, _cache) => {
168
- const _component_vxe_button = (0,external_Vue_.resolveComponent)("vxe-button");
169
-
170
- return (0,external_Vue_.openBlock)(), (0,external_Vue_.createBlock)(_component_vxe_button, {
171
- disabled: __props.auth && !(0,external_Vue_.unref)(hasAuthority)(__props.auth) || __props.disabled,
172
- status: __props.status,
173
- type: __props.type,
174
- content: (0,external_Vue_.unref)(btnprops).content,
175
- icon: (0,external_Vue_.unref)(btnprops).icon,
176
- loading: __props.loading
177
- }, null, 8, ["disabled", "status", "type", "content", "icon", "loading"]);
178
- };
179
- }
180
-
181
- }));
182
- ;// CONCATENATED MODULE: ./src/packages/button/SuButton.vue?vue&type=script&setup=true&lang=ts
183
-
184
- ;// CONCATENATED MODULE: ./src/packages/button/SuButton.vue
185
-
186
-
187
-
188
- const __exports__ = SuButtonvue_type_script_setup_true_lang_ts;
189
-
190
- /* harmony default export */ var SuButton = (__exports__);
191
-
192
- /***/ }),
193
-
194
- /***/ 592:
195
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
196
-
197
- "use strict";
198
- // ESM COMPAT FLAG
199
- __webpack_require__.r(__webpack_exports__);
200
-
201
- // EXPORTS
202
- __webpack_require__.d(__webpack_exports__, {
203
- "default": function() { return /* binding */ SuEnabledButton; }
204
- });
205
-
206
- // EXTERNAL MODULE: external "Vue"
207
- var external_Vue_ = __webpack_require__(740);
208
- // EXTERNAL MODULE: external "vuei18n"
209
- var external_vuei18n_ = __webpack_require__(63);
210
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/thread-loader@3.0.4_webpack@5.73.0/node_modules/thread-loader/dist/cjs.js!./node_modules/.pnpm/babel-loader@8.2.5_1e6208c184491b2ebbab8f4236ed439d/node_modules/babel-loader/lib/index.js!./node_modules/.pnpm/ts-loader@9.3.0_typescript@4.5.5+webpack@5.73.0/node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/.pnpm/vue-loader@17.0.0_webpack@5.73.0/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/packages/enableButton/SuEnabledButton.vue?vue&type=script&setup=true&lang=ts
211
-
212
-
213
-
214
-
215
- /* harmony default export */ var SuEnabledButtonvue_type_script_setup_true_lang_ts = (/*#__PURE__*/(0,external_Vue_.defineComponent)({
216
- name: 'SuEnabledButton',
217
- props: {
218
- content: null,
219
- row: {
220
- default: () => {
221
- return {};
222
- }
223
- },
224
- status: {
225
- default: "primary"
226
- },
227
- icon: null,
228
- disabled: {
229
- type: Boolean,
230
- default: false
231
- },
232
- auth: null
233
- },
234
-
235
- setup(__props) {
236
- const props = __props;
237
- const instance = (0,external_Vue_.getCurrentInstance)();
238
- const hasAuthority = instance?.appContext.config.globalProperties.$hasAuthority;
239
- const {
240
- t
241
- } = (0,external_vuei18n_.useI18n)();
242
- const btnprops = (0,external_Vue_.computed)(() => {
243
- const row = props?.row;
244
- const icon = row?.enabled * 1 ? "fa fa-pause-circle" : "fa fa-play-circle";
245
- const content = row?.enabled * 1 ? "disabled" : "enabled";
246
- const status = row?.enabled * 1 ? "warning" : "success";
247
- return {
248
- icon,
249
- status,
250
- content: t(`message.${content}`)
251
- };
252
- });
253
- return (_ctx, _cache) => {
254
- const _component_vxe_button = (0,external_Vue_.resolveComponent)("vxe-button");
255
-
256
- return (0,external_Vue_.openBlock)(), (0,external_Vue_.createBlock)(_component_vxe_button, {
257
- disabled: __props.auth && !(0,external_Vue_.unref)(hasAuthority)(__props.auth) || __props.disabled,
258
- status: (0,external_Vue_.unref)(btnprops).status,
259
- content: (0,external_Vue_.unref)(btnprops).content,
260
- icon: (0,external_Vue_.unref)(btnprops).icon
261
- }, null, 8, ["disabled", "status", "content", "icon"]);
262
- };
263
- }
264
-
265
- }));
266
- ;// CONCATENATED MODULE: ./src/packages/enableButton/SuEnabledButton.vue?vue&type=script&setup=true&lang=ts
267
-
268
- ;// CONCATENATED MODULE: ./src/packages/enableButton/SuEnabledButton.vue
269
-
270
-
271
-
272
- const __exports__ = SuEnabledButtonvue_type_script_setup_true_lang_ts;
273
-
274
- /* harmony default export */ var SuEnabledButton = (__exports__);
275
-
276
- /***/ }),
277
-
278
- /***/ 355:
279
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
280
-
281
- var map = {
282
- "./SuEnabledButton.vue": 358,
283
- "./button/SuButton.vue": 370,
284
- "./enableButton/SuEnabledButton.vue": 592
285
- };
286
-
287
-
288
- function webpackContext(req) {
289
- var id = webpackContextResolve(req);
290
- return __webpack_require__(id);
291
- }
292
- function webpackContextResolve(req) {
293
- if(!__webpack_require__.o(map, req)) {
294
- var e = new Error("Cannot find module '" + req + "'");
295
- e.code = 'MODULE_NOT_FOUND';
296
- throw e;
297
- }
298
- return map[req];
299
- }
300
- webpackContext.keys = function webpackContextKeys() {
301
- return Object.keys(map);
302
- };
303
- webpackContext.resolve = webpackContextResolve;
304
- module.exports = webpackContext;
305
- webpackContext.id = 355;
306
-
307
- /***/ }),
308
-
309
- /***/ 740:
310
- /***/ (function(module) {
311
-
312
- "use strict";
313
- module.exports = __WEBPACK_EXTERNAL_MODULE__740__;
314
-
315
- /***/ }),
316
-
317
- /***/ 63:
318
- /***/ (function(module) {
319
-
320
- "use strict";
321
- module.exports = __WEBPACK_EXTERNAL_MODULE__63__;
322
-
323
- /***/ })
324
-
325
- /******/ });
326
- /************************************************************************/
327
- /******/ // The module cache
328
- /******/ var __webpack_module_cache__ = {};
329
- /******/
330
- /******/ // The require function
331
- /******/ function __webpack_require__(moduleId) {
332
- /******/ // Check if module is in cache
333
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
334
- /******/ if (cachedModule !== undefined) {
335
- /******/ return cachedModule.exports;
336
- /******/ }
337
- /******/ // Create a new module (and put it into the cache)
338
- /******/ var module = __webpack_module_cache__[moduleId] = {
339
- /******/ // no module.id needed
340
- /******/ // no module.loaded needed
341
- /******/ exports: {}
342
- /******/ };
343
- /******/
344
- /******/ // Execute the module function
345
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
346
- /******/
347
- /******/ // Return the exports of the module
348
- /******/ return module.exports;
349
- /******/ }
350
- /******/
351
- /************************************************************************/
352
- /******/ /* webpack/runtime/define property getters */
353
- /******/ !function() {
354
- /******/ // define getter functions for harmony exports
355
- /******/ __webpack_require__.d = function(exports, definition) {
356
- /******/ for(var key in definition) {
357
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
358
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
359
- /******/ }
360
- /******/ }
361
- /******/ };
362
- /******/ }();
363
- /******/
364
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
365
- /******/ !function() {
366
- /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
367
- /******/ }();
368
- /******/
369
- /******/ /* webpack/runtime/make namespace object */
370
- /******/ !function() {
371
- /******/ // define __esModule on exports
372
- /******/ __webpack_require__.r = function(exports) {
373
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
374
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
375
- /******/ }
376
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
377
- /******/ };
378
- /******/ }();
379
- /******/
380
- /******/ /* webpack/runtime/publicPath */
381
- /******/ !function() {
382
- /******/ __webpack_require__.p = "";
383
- /******/ }();
384
- /******/
385
- /************************************************************************/
386
- var __webpack_exports__ = {};
387
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
388
- !function() {
389
- "use strict";
390
- // ESM COMPAT FLAG
391
- __webpack_require__.r(__webpack_exports__);
392
-
393
- // EXPORTS
394
- __webpack_require__.d(__webpack_exports__, {
395
- "default": function() { return /* binding */ entry_lib; }
396
- });
397
-
398
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/@vue+cli-service@5.0.4_sass-loader@12.6.0/node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
399
- /* eslint-disable no-var */
400
- // This file is imported into lib/wc client bundles.
401
-
402
- if (typeof window !== 'undefined') {
403
- var currentScript = window.document.currentScript
404
- if (false) { var getCurrentScript; }
405
-
406
- var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
407
- if (src) {
408
- __webpack_require__.p = src[1] // eslint-disable-line
409
- }
410
- }
411
-
412
- // Indicate to webpack that this file can be concatenated
413
- /* harmony default export */ var setPublicPath = (null);
414
-
415
- ;// CONCATENATED MODULE: ./src/packages/index.ts
416
- /*
417
- * @Author: wei.li
418
- * @Date: 2022-06-03 15:15:44
419
- * @LastEditors: wei.li
420
- * @LastEditTime: 2022-06-03 21:26:21
421
- * @Description: file content
422
- */
423
- // @ts-nocheck
424
- const requireComponent = __webpack_require__(355); // console.log(requireComponent.keys());
425
-
426
-
427
- const install = Vue => {
428
- if (install.installed) return;
429
- install.installed = true;
430
- requireComponent.keys().map(path => {
431
- const config = requireComponent(path); // console.log(config);
432
-
433
- const componnetName = config.default.name;
434
- Vue.component(componnetName, config.default || config);
435
- });
436
- };
437
-
438
- /* harmony default export */ var src_packages = ({
439
- install
440
- });
441
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/@vue+cli-service@5.0.4_sass-loader@12.6.0/node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
442
-
443
-
444
- /* harmony default export */ var entry_lib = (src_packages);
445
-
446
-
447
- }();
448
- /******/ return __webpack_exports__;
449
- /******/ })()
450
- ;
451
- });
452
- //# sourceMappingURL=ut-components.umd.js.map