byt-ui 0.0.8 → 0.0.10

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2022-09-15 16:57:23
5
- * @LastEditTime: 2022-10-08 13:00:05
5
+ * @LastEditTime: 2022-10-18 12:49:32
6
6
  * @LastEditors: 王国火
7
7
  -->
8
8
  # byt-ui
@@ -48,23 +48,7 @@ export default {
48
48
  }
49
49
  ```
50
50
 
51
- ## npm公司账号
52
- ```
53
- 邮箱bytdev@bonyear.com
54
- 账号bytdev
55
- 密码BYTdev2020
56
- ```
57
51
 
58
- ## npm登录
59
- ```
60
- 执行npm login
61
- 按要求输入以下内容
62
-
63
- Username:bytdev
64
- Password:BYTdev2020
65
- Email:bytdev@bonyear.com
66
- one-time password:一次性密码,每次执行登录会发一封动态密码邮件至该邮箱,需要输入该一次性密码
67
- ```
68
52
 
69
53
  ## npm 发布执行顺序
70
54
  ```
@@ -73,6 +57,12 @@ one-time password:一次性密码,每次执行登录会发一封动态密码
73
57
  3. npm publish
74
58
  ```
75
59
 
60
+ ## 升级依赖包
61
+ ```
62
+ yarn upgrade byt-ui --latest
63
+
64
+ ```
65
+
76
66
  ## 删除已发版本,非必要情况,不允许删除包,删除后24小时内无法上传
77
67
  ```
78
68
  运行 npm unpublish 包名 --force 命令,即可从npm删除已发布的包。
@@ -85397,6 +85397,199 @@ var index = (function () {
85397
85397
  /* harmony default export */ __webpack_exports__["default"] = (index);
85398
85398
 
85399
85399
 
85400
+ /***/ }),
85401
+
85402
+ /***/ 4458:
85403
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
85404
+
85405
+ "use strict";
85406
+ // ESM COMPAT FLAG
85407
+ __webpack_require__.r(__webpack_exports__);
85408
+
85409
+ // EXPORTS
85410
+ __webpack_require__.d(__webpack_exports__, {
85411
+ "getCookie": function() { return /* binding */ getCookie; },
85412
+ "removeCookie": function() { return /* binding */ removeCookie; },
85413
+ "setCookie": function() { return /* binding */ setCookie; }
85414
+ });
85415
+
85416
+ ;// CONCATENATED MODULE: ./node_modules/js-cookie/dist/js.cookie.mjs
85417
+ /*! js-cookie v3.0.1 | MIT */
85418
+ /* eslint-disable no-var */
85419
+ function js_cookie_assign (target) {
85420
+ for (var i = 1; i < arguments.length; i++) {
85421
+ var source = arguments[i];
85422
+ for (var key in source) {
85423
+ target[key] = source[key];
85424
+ }
85425
+ }
85426
+ return target
85427
+ }
85428
+ /* eslint-enable no-var */
85429
+
85430
+ /* eslint-disable no-var */
85431
+ var defaultConverter = {
85432
+ read: function (value) {
85433
+ if (value[0] === '"') {
85434
+ value = value.slice(1, -1);
85435
+ }
85436
+ return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
85437
+ },
85438
+ write: function (value) {
85439
+ return encodeURIComponent(value).replace(
85440
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
85441
+ decodeURIComponent
85442
+ )
85443
+ }
85444
+ };
85445
+ /* eslint-enable no-var */
85446
+
85447
+ /* eslint-disable no-var */
85448
+
85449
+ function init (converter, defaultAttributes) {
85450
+ function set (key, value, attributes) {
85451
+ if (typeof document === 'undefined') {
85452
+ return
85453
+ }
85454
+
85455
+ attributes = js_cookie_assign({}, defaultAttributes, attributes);
85456
+
85457
+ if (typeof attributes.expires === 'number') {
85458
+ attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
85459
+ }
85460
+ if (attributes.expires) {
85461
+ attributes.expires = attributes.expires.toUTCString();
85462
+ }
85463
+
85464
+ key = encodeURIComponent(key)
85465
+ .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
85466
+ .replace(/[()]/g, escape);
85467
+
85468
+ var stringifiedAttributes = '';
85469
+ for (var attributeName in attributes) {
85470
+ if (!attributes[attributeName]) {
85471
+ continue
85472
+ }
85473
+
85474
+ stringifiedAttributes += '; ' + attributeName;
85475
+
85476
+ if (attributes[attributeName] === true) {
85477
+ continue
85478
+ }
85479
+
85480
+ // Considers RFC 6265 section 5.2:
85481
+ // ...
85482
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
85483
+ // character:
85484
+ // Consume the characters of the unparsed-attributes up to,
85485
+ // not including, the first %x3B (";") character.
85486
+ // ...
85487
+ stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
85488
+ }
85489
+
85490
+ return (document.cookie =
85491
+ key + '=' + converter.write(value, key) + stringifiedAttributes)
85492
+ }
85493
+
85494
+ function get (key) {
85495
+ if (typeof document === 'undefined' || (arguments.length && !key)) {
85496
+ return
85497
+ }
85498
+
85499
+ // To prevent the for loop in the first place assign an empty array
85500
+ // in case there are no cookies at all.
85501
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
85502
+ var jar = {};
85503
+ for (var i = 0; i < cookies.length; i++) {
85504
+ var parts = cookies[i].split('=');
85505
+ var value = parts.slice(1).join('=');
85506
+
85507
+ try {
85508
+ var foundKey = decodeURIComponent(parts[0]);
85509
+ jar[foundKey] = converter.read(value, foundKey);
85510
+
85511
+ if (key === foundKey) {
85512
+ break
85513
+ }
85514
+ } catch (e) {}
85515
+ }
85516
+
85517
+ return key ? jar[key] : jar
85518
+ }
85519
+
85520
+ return Object.create(
85521
+ {
85522
+ set: set,
85523
+ get: get,
85524
+ remove: function (key, attributes) {
85525
+ set(
85526
+ key,
85527
+ '',
85528
+ js_cookie_assign({}, attributes, {
85529
+ expires: -1
85530
+ })
85531
+ );
85532
+ },
85533
+ withAttributes: function (attributes) {
85534
+ return init(this.converter, js_cookie_assign({}, this.attributes, attributes))
85535
+ },
85536
+ withConverter: function (converter) {
85537
+ return init(js_cookie_assign({}, this.converter, converter), this.attributes)
85538
+ }
85539
+ },
85540
+ {
85541
+ attributes: { value: Object.freeze(defaultAttributes) },
85542
+ converter: { value: Object.freeze(converter) }
85543
+ }
85544
+ )
85545
+ }
85546
+
85547
+ var api = init(defaultConverter, { path: '/' });
85548
+ /* eslint-enable no-var */
85549
+
85550
+ /* harmony default export */ var js_cookie = (api);
85551
+
85552
+ // EXTERNAL MODULE: ./packages/common/modules/website.js
85553
+ var website = __webpack_require__(2411);
85554
+ ;// CONCATENATED MODULE: ./packages/common/modules/cookie.js
85555
+ /*
85556
+ * @Description:
85557
+ * @Author: 王国火
85558
+ * @Date: 2022-10-18 12:37:03
85559
+ * @LastEditTime: 2022-10-18 12:37:56
85560
+ * @LastEditors: 王国火
85561
+ */
85562
+
85563
+
85564
+ const getCookie = (key, context) => {
85565
+ const searchKey = `${website["default"].key}_${key}`;
85566
+
85567
+ if (context && context.req) {
85568
+ if (context.req.headers.cookie) {
85569
+ const arr = context.req.headers.cookie.split(';');
85570
+ const cookie = arr.find(item => {
85571
+ return item.split('=')[0].trim() === searchKey;
85572
+ });
85573
+ return cookie ? cookie.split('=')[1] : '';
85574
+ } else {
85575
+ return '';
85576
+ }
85577
+ } else {
85578
+ return js_cookie.get(searchKey) ? js_cookie.get(searchKey) : '';
85579
+ }
85580
+ };
85581
+ const setCookie = (key, value, expires = 7, path = '/') => {
85582
+ return js_cookie.set(`${website["default"].key}_${key}`, value, {
85583
+ expires,
85584
+ path
85585
+ });
85586
+ };
85587
+ const removeCookie = (key, path = '/') => {
85588
+ return js_cookie.remove(key, {
85589
+ path
85590
+ });
85591
+ };
85592
+
85400
85593
  /***/ }),
85401
85594
 
85402
85595
  /***/ 30005:
@@ -126808,6 +127001,7 @@ module.exports = zipObject
126808
127001
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
126809
127002
 
126810
127003
  var map = {
127004
+ "./cookie.js": 4458,
126811
127005
  "./store.js": 30005,
126812
127006
  "./validate.js": 98564,
126813
127007
  "./website.js": 2411
@@ -126949,6 +127143,7 @@ __webpack_require__.r(__webpack_exports__);
126949
127143
 
126950
127144
  // EXPORTS
126951
127145
  __webpack_require__.d(__webpack_exports__, {
127146
+ "cookie": function() { return /* reexport */ cookie; },
126952
127147
  "default": function() { return /* binding */ entry_lib; },
126953
127148
  "store": function() { return /* reexport */ store; },
126954
127149
  "validate": function() { return /* reexport */ validate; },
@@ -127752,7 +127947,7 @@ const components = [basic_view, form_view];
127752
127947
  * @Description:
127753
127948
  * @Author: 王国火
127754
127949
  * @Date: 2022-09-19 10:17:14
127755
- * @LastEditTime: 2022-10-08 13:53:07
127950
+ * @LastEditTime: 2022-10-17 11:11:54
127756
127951
  * @LastEditors: 王国火
127757
127952
  */
127758
127953
  // 动态引入
@@ -127763,7 +127958,7 @@ const requireContext = __webpack_require__(26745);
127763
127958
  requireContext.keys().map(key => {
127764
127959
  const reg = /\w+/;
127765
127960
  const k = key.match(reg)[0];
127766
- conmmon[k] = requireContext(key).default || requireContext(key);
127961
+ conmmon[k] = requireContext(key).default || requireContext(key); //conmmon=Object.assign(conmmon,requireContext(key).default||requireContext(key))
127767
127962
  });
127768
127963
  /* harmony default export */ var common = (conmmon);
127769
127964
  // EXTERNAL MODULE: ./node_modules/xe-utils/index.js
@@ -127779,7 +127974,7 @@ var element_ui_common_default = /*#__PURE__*/__webpack_require__.n(element_ui_co
127779
127974
  * @Description:
127780
127975
  * @Author: 王国火
127781
127976
  * @Date: 2022-09-15 17:02:55
127782
- * @LastEditTime: 2022-10-08 16:15:39
127977
+ * @LastEditTime: 2022-10-18 12:39:29
127783
127978
  * @LastEditors: 王国火
127784
127979
  */
127785
127980
  //通用组件
@@ -127815,6 +128010,7 @@ const install = function (Vue) {
127815
128010
  ...Cmps,
127816
128011
  ...common
127817
128012
  });
128013
+ const cookie = common.cookie;
127818
128014
  const store = common.store;
127819
128015
  const validate = common.validate;
127820
128016
  const website = common.website;
package/lib/byt-ui.umd.js CHANGED
@@ -85407,6 +85407,199 @@ var index = (function () {
85407
85407
  /* harmony default export */ __webpack_exports__["default"] = (index);
85408
85408
 
85409
85409
 
85410
+ /***/ }),
85411
+
85412
+ /***/ 33863:
85413
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
85414
+
85415
+ "use strict";
85416
+ // ESM COMPAT FLAG
85417
+ __webpack_require__.r(__webpack_exports__);
85418
+
85419
+ // EXPORTS
85420
+ __webpack_require__.d(__webpack_exports__, {
85421
+ "getCookie": function() { return /* binding */ getCookie; },
85422
+ "removeCookie": function() { return /* binding */ removeCookie; },
85423
+ "setCookie": function() { return /* binding */ setCookie; }
85424
+ });
85425
+
85426
+ ;// CONCATENATED MODULE: ./node_modules/js-cookie/dist/js.cookie.mjs
85427
+ /*! js-cookie v3.0.1 | MIT */
85428
+ /* eslint-disable no-var */
85429
+ function js_cookie_assign (target) {
85430
+ for (var i = 1; i < arguments.length; i++) {
85431
+ var source = arguments[i];
85432
+ for (var key in source) {
85433
+ target[key] = source[key];
85434
+ }
85435
+ }
85436
+ return target
85437
+ }
85438
+ /* eslint-enable no-var */
85439
+
85440
+ /* eslint-disable no-var */
85441
+ var defaultConverter = {
85442
+ read: function (value) {
85443
+ if (value[0] === '"') {
85444
+ value = value.slice(1, -1);
85445
+ }
85446
+ return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
85447
+ },
85448
+ write: function (value) {
85449
+ return encodeURIComponent(value).replace(
85450
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
85451
+ decodeURIComponent
85452
+ )
85453
+ }
85454
+ };
85455
+ /* eslint-enable no-var */
85456
+
85457
+ /* eslint-disable no-var */
85458
+
85459
+ function init (converter, defaultAttributes) {
85460
+ function set (key, value, attributes) {
85461
+ if (typeof document === 'undefined') {
85462
+ return
85463
+ }
85464
+
85465
+ attributes = js_cookie_assign({}, defaultAttributes, attributes);
85466
+
85467
+ if (typeof attributes.expires === 'number') {
85468
+ attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
85469
+ }
85470
+ if (attributes.expires) {
85471
+ attributes.expires = attributes.expires.toUTCString();
85472
+ }
85473
+
85474
+ key = encodeURIComponent(key)
85475
+ .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
85476
+ .replace(/[()]/g, escape);
85477
+
85478
+ var stringifiedAttributes = '';
85479
+ for (var attributeName in attributes) {
85480
+ if (!attributes[attributeName]) {
85481
+ continue
85482
+ }
85483
+
85484
+ stringifiedAttributes += '; ' + attributeName;
85485
+
85486
+ if (attributes[attributeName] === true) {
85487
+ continue
85488
+ }
85489
+
85490
+ // Considers RFC 6265 section 5.2:
85491
+ // ...
85492
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
85493
+ // character:
85494
+ // Consume the characters of the unparsed-attributes up to,
85495
+ // not including, the first %x3B (";") character.
85496
+ // ...
85497
+ stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
85498
+ }
85499
+
85500
+ return (document.cookie =
85501
+ key + '=' + converter.write(value, key) + stringifiedAttributes)
85502
+ }
85503
+
85504
+ function get (key) {
85505
+ if (typeof document === 'undefined' || (arguments.length && !key)) {
85506
+ return
85507
+ }
85508
+
85509
+ // To prevent the for loop in the first place assign an empty array
85510
+ // in case there are no cookies at all.
85511
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
85512
+ var jar = {};
85513
+ for (var i = 0; i < cookies.length; i++) {
85514
+ var parts = cookies[i].split('=');
85515
+ var value = parts.slice(1).join('=');
85516
+
85517
+ try {
85518
+ var foundKey = decodeURIComponent(parts[0]);
85519
+ jar[foundKey] = converter.read(value, foundKey);
85520
+
85521
+ if (key === foundKey) {
85522
+ break
85523
+ }
85524
+ } catch (e) {}
85525
+ }
85526
+
85527
+ return key ? jar[key] : jar
85528
+ }
85529
+
85530
+ return Object.create(
85531
+ {
85532
+ set: set,
85533
+ get: get,
85534
+ remove: function (key, attributes) {
85535
+ set(
85536
+ key,
85537
+ '',
85538
+ js_cookie_assign({}, attributes, {
85539
+ expires: -1
85540
+ })
85541
+ );
85542
+ },
85543
+ withAttributes: function (attributes) {
85544
+ return init(this.converter, js_cookie_assign({}, this.attributes, attributes))
85545
+ },
85546
+ withConverter: function (converter) {
85547
+ return init(js_cookie_assign({}, this.converter, converter), this.attributes)
85548
+ }
85549
+ },
85550
+ {
85551
+ attributes: { value: Object.freeze(defaultAttributes) },
85552
+ converter: { value: Object.freeze(converter) }
85553
+ }
85554
+ )
85555
+ }
85556
+
85557
+ var api = init(defaultConverter, { path: '/' });
85558
+ /* eslint-enable no-var */
85559
+
85560
+ /* harmony default export */ var js_cookie = (api);
85561
+
85562
+ // EXTERNAL MODULE: ./packages/common/modules/website.js
85563
+ var website = __webpack_require__(92502);
85564
+ ;// CONCATENATED MODULE: ./packages/common/modules/cookie.js
85565
+ /*
85566
+ * @Description:
85567
+ * @Author: 王国火
85568
+ * @Date: 2022-10-18 12:37:03
85569
+ * @LastEditTime: 2022-10-18 12:37:56
85570
+ * @LastEditors: 王国火
85571
+ */
85572
+
85573
+
85574
+ const getCookie = (key, context) => {
85575
+ const searchKey = `${website["default"].key}_${key}`;
85576
+
85577
+ if (context && context.req) {
85578
+ if (context.req.headers.cookie) {
85579
+ const arr = context.req.headers.cookie.split(';');
85580
+ const cookie = arr.find(item => {
85581
+ return item.split('=')[0].trim() === searchKey;
85582
+ });
85583
+ return cookie ? cookie.split('=')[1] : '';
85584
+ } else {
85585
+ return '';
85586
+ }
85587
+ } else {
85588
+ return js_cookie.get(searchKey) ? js_cookie.get(searchKey) : '';
85589
+ }
85590
+ };
85591
+ const setCookie = (key, value, expires = 7, path = '/') => {
85592
+ return js_cookie.set(`${website["default"].key}_${key}`, value, {
85593
+ expires,
85594
+ path
85595
+ });
85596
+ };
85597
+ const removeCookie = (key, path = '/') => {
85598
+ return js_cookie.remove(key, {
85599
+ path
85600
+ });
85601
+ };
85602
+
85410
85603
  /***/ }),
85411
85604
 
85412
85605
  /***/ 93985:
@@ -126818,6 +127011,7 @@ module.exports = zipObject
126818
127011
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
126819
127012
 
126820
127013
  var map = {
127014
+ "./cookie.js": 33863,
126821
127015
  "./store.js": 93985,
126822
127016
  "./validate.js": 59666,
126823
127017
  "./website.js": 92502
@@ -126959,6 +127153,7 @@ __webpack_require__.r(__webpack_exports__);
126959
127153
 
126960
127154
  // EXPORTS
126961
127155
  __webpack_require__.d(__webpack_exports__, {
127156
+ "cookie": function() { return /* reexport */ cookie; },
126962
127157
  "default": function() { return /* binding */ entry_lib; },
126963
127158
  "store": function() { return /* reexport */ store; },
126964
127159
  "validate": function() { return /* reexport */ validate; },
@@ -127762,7 +127957,7 @@ const components = [basic_view, form_view];
127762
127957
  * @Description:
127763
127958
  * @Author: 王国火
127764
127959
  * @Date: 2022-09-19 10:17:14
127765
- * @LastEditTime: 2022-10-08 13:53:07
127960
+ * @LastEditTime: 2022-10-17 11:11:54
127766
127961
  * @LastEditors: 王国火
127767
127962
  */
127768
127963
  // 动态引入
@@ -127773,7 +127968,7 @@ const requireContext = __webpack_require__(26745);
127773
127968
  requireContext.keys().map(key => {
127774
127969
  const reg = /\w+/;
127775
127970
  const k = key.match(reg)[0];
127776
- conmmon[k] = requireContext(key).default || requireContext(key);
127971
+ conmmon[k] = requireContext(key).default || requireContext(key); //conmmon=Object.assign(conmmon,requireContext(key).default||requireContext(key))
127777
127972
  });
127778
127973
  /* harmony default export */ var common = (conmmon);
127779
127974
  // EXTERNAL MODULE: ./node_modules/xe-utils/index.js
@@ -127789,7 +127984,7 @@ var element_ui_common_default = /*#__PURE__*/__webpack_require__.n(element_ui_co
127789
127984
  * @Description:
127790
127985
  * @Author: 王国火
127791
127986
  * @Date: 2022-09-15 17:02:55
127792
- * @LastEditTime: 2022-10-08 16:15:39
127987
+ * @LastEditTime: 2022-10-18 12:39:29
127793
127988
  * @LastEditors: 王国火
127794
127989
  */
127795
127990
  //通用组件
@@ -127825,6 +128020,7 @@ const install = function (Vue) {
127825
128020
  ...Cmps,
127826
128021
  ...common
127827
128022
  });
128023
+ const cookie = common.cookie;
127828
128024
  const store = common.store;
127829
128025
  const validate = common.validate;
127830
128026
  const website = common.website;