ll-plus 1.0.0 → 1.0.3

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.
Files changed (255) hide show
  1. package/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
  2. package/es/_virtual/_plugin-vue_export-helper.mjs.map +1 -0
  3. package/es/component.mjs +8 -0
  4. package/es/component.mjs.map +1 -0
  5. package/es/components/icon/index.d.ts +55 -10
  6. package/es/components/icon/index.mjs +10 -0
  7. package/es/components/icon/index.mjs.map +1 -0
  8. package/es/components/icon/src/icon.d.ts +27 -3
  9. package/es/components/icon/src/icon.mjs +34 -0
  10. package/es/components/icon/src/icon.mjs.map +1 -0
  11. package/es/components/icon/src/icon.vue.d.ts +56 -10
  12. package/es/components/icon/src/icon.vue.mjs +8 -0
  13. package/es/components/icon/src/icon.vue.mjs.map +1 -0
  14. package/es/components/icon/src/icon.vue2.mjs +59 -0
  15. package/es/components/icon/src/icon.vue2.mjs.map +1 -0
  16. package/es/components/index.d.ts +1 -0
  17. package/es/components/index.mjs +7 -0
  18. package/es/components/index.mjs.map +1 -0
  19. package/es/components/table/index.d.ts +592 -0
  20. package/es/components/table/index.mjs +10 -0
  21. package/es/components/table/index.mjs.map +1 -0
  22. package/es/components/table/src/components/header-search.vue.d.ts +110 -0
  23. package/es/components/table/src/components/header-search.vue.mjs +8 -0
  24. package/es/components/table/src/components/header-search.vue.mjs.map +1 -0
  25. package/es/components/table/src/components/header-search.vue2.mjs +125 -0
  26. package/es/components/table/src/components/header-search.vue2.mjs.map +1 -0
  27. package/es/components/table/src/components/main-table.vue.d.ts +254 -0
  28. package/es/components/table/src/components/main-table.vue.mjs +8 -0
  29. package/es/components/table/src/components/main-table.vue.mjs.map +1 -0
  30. package/es/components/table/src/components/main-table.vue2.mjs +549 -0
  31. package/es/components/table/src/components/main-table.vue2.mjs.map +1 -0
  32. package/es/components/table/src/components/pagination.vue.d.ts +65 -0
  33. package/es/components/table/src/components/pagination.vue.mjs +8 -0
  34. package/es/components/table/src/components/pagination.vue.mjs.map +1 -0
  35. package/es/components/table/src/components/pagination.vue2.mjs +37 -0
  36. package/es/components/table/src/components/pagination.vue2.mjs.map +1 -0
  37. package/es/components/table/src/table.d.ts +148 -0
  38. package/es/components/table/src/table.mjs +196 -0
  39. package/es/components/table/src/table.mjs.map +1 -0
  40. package/es/components/table/src/table.vue.d.ts +586 -0
  41. package/es/components/table/src/table.vue.mjs +8 -0
  42. package/es/components/table/src/table.vue.mjs.map +1 -0
  43. package/es/components/table/src/table.vue2.mjs +134 -0
  44. package/es/components/table/src/table.vue2.mjs.map +1 -0
  45. package/es/defaults.d.ts +4 -0
  46. package/es/defaults.mjs +8 -0
  47. package/es/defaults.mjs.map +1 -0
  48. package/es/index.d.ts +4 -6
  49. package/es/index.mjs +12 -0
  50. package/es/index.mjs.map +1 -0
  51. package/es/ll-plus/defaults.d.ts +4 -0
  52. package/es/ll-plus/index.d.ts +4 -0
  53. package/es/ll-plus/make-installer.d.ts +4 -0
  54. package/es/locale/index.d.ts +10 -0
  55. package/es/locale/index.mjs +6 -0
  56. package/es/locale/index.mjs.map +1 -0
  57. package/es/locale/lang/en_US.d.ts +144 -0
  58. package/es/locale/lang/en_US.mjs +147 -0
  59. package/es/locale/lang/en_US.mjs.map +1 -0
  60. package/es/locale/lang/zh_CN.d.ts +169 -0
  61. package/es/locale/lang/zh_CN.mjs +172 -0
  62. package/es/locale/lang/zh_CN.mjs.map +1 -0
  63. package/es/locale/lang/zh_TW.d.ts +125 -0
  64. package/es/locale/lang/zh_TW.mjs +128 -0
  65. package/es/locale/lang/zh_TW.mjs.map +1 -0
  66. package/es/make-installer.d.ts +4 -0
  67. package/es/make-installer.mjs +12 -0
  68. package/es/make-installer.mjs.map +1 -0
  69. package/es/utils/add-unit.mjs +7 -0
  70. package/es/utils/add-unit.mjs.map +1 -0
  71. package/es/utils/create-namespace.mjs +40 -0
  72. package/es/utils/create-namespace.mjs.map +1 -0
  73. package/es/utils/index.d.ts +2 -1
  74. package/es/utils/index.mjs +8 -0
  75. package/es/utils/index.mjs.map +1 -0
  76. package/es/utils/props/index.d.ts +3 -0
  77. package/es/utils/props/index.mjs +6 -0
  78. package/es/utils/props/index.mjs.map +1 -0
  79. package/es/utils/props/runtime.d.ts +29 -0
  80. package/es/utils/props/runtime.mjs +53 -0
  81. package/es/utils/props/runtime.mjs.map +1 -0
  82. package/es/utils/props/types.d.ts +120 -0
  83. package/es/utils/props/types.mjs +2 -0
  84. package/es/utils/props/types.mjs.map +1 -0
  85. package/es/utils/props/util.d.ts +8 -0
  86. package/es/utils/props/util.mjs +2 -0
  87. package/es/utils/props/util.mjs.map +1 -0
  88. package/es/utils/types.d.ts +10 -0
  89. package/es/utils/types.mjs +30 -0
  90. package/es/utils/types.mjs.map +1 -0
  91. package/es/utils/with-install.mjs +10 -0
  92. package/es/utils/with-install.mjs.map +1 -0
  93. package/global.d.ts +11 -0
  94. package/index.full.js +8305 -0
  95. package/index.full.min.js +25 -0
  96. package/index.full.min.js.map +1 -0
  97. package/index.full.min.mjs +25 -0
  98. package/index.full.min.mjs.map +1 -0
  99. package/index.full.mjs +8288 -0
  100. package/lib/_virtual/_plugin-vue_export-helper.js +14 -0
  101. package/lib/_virtual/_plugin-vue_export-helper.js.map +1 -0
  102. package/lib/component.js +12 -0
  103. package/lib/component.js.map +1 -0
  104. package/lib/components/icon/index.d.ts +55 -10
  105. package/lib/components/icon/index.js +8 -31
  106. package/lib/components/icon/index.js.map +1 -0
  107. package/lib/components/icon/src/icon.d.ts +27 -3
  108. package/lib/components/icon/src/icon.js +36 -0
  109. package/lib/components/icon/src/icon.js.map +1 -0
  110. package/lib/components/icon/src/icon.vue.d.ts +56 -10
  111. package/lib/components/icon/src/icon.vue.js +12 -0
  112. package/lib/components/icon/src/icon.vue.js.map +1 -0
  113. package/lib/components/icon/src/icon.vue2.js +63 -0
  114. package/lib/components/icon/src/icon.vue2.js.map +1 -0
  115. package/lib/components/index.d.ts +1 -0
  116. package/lib/components/index.js +15 -8
  117. package/lib/components/index.js.map +1 -0
  118. package/lib/components/table/index.d.ts +592 -0
  119. package/lib/components/table/index.js +21 -0
  120. package/lib/components/table/index.js.map +1 -0
  121. package/lib/components/table/src/components/header-search.vue.d.ts +110 -0
  122. package/lib/components/table/src/components/header-search.vue.js +12 -0
  123. package/lib/components/table/src/components/header-search.vue.js.map +1 -0
  124. package/lib/components/table/src/components/header-search.vue2.js +129 -0
  125. package/lib/components/table/src/components/header-search.vue2.js.map +1 -0
  126. package/lib/components/table/src/components/main-table.vue.d.ts +254 -0
  127. package/lib/components/table/src/components/main-table.vue.js +12 -0
  128. package/lib/components/table/src/components/main-table.vue.js.map +1 -0
  129. package/lib/components/table/src/components/main-table.vue2.js +553 -0
  130. package/lib/components/table/src/components/main-table.vue2.js.map +1 -0
  131. package/lib/components/table/src/components/pagination.vue.d.ts +65 -0
  132. package/lib/components/table/src/components/pagination.vue.js +12 -0
  133. package/lib/components/table/src/components/pagination.vue.js.map +1 -0
  134. package/lib/components/table/src/components/pagination.vue2.js +41 -0
  135. package/lib/components/table/src/components/pagination.vue2.js.map +1 -0
  136. package/lib/components/table/src/table.d.ts +148 -0
  137. package/lib/components/table/src/table.js +203 -0
  138. package/lib/components/table/src/table.js.map +1 -0
  139. package/lib/components/table/src/table.vue.d.ts +586 -0
  140. package/lib/components/table/src/table.vue.js +12 -0
  141. package/lib/components/table/src/table.vue.js.map +1 -0
  142. package/lib/components/table/src/table.vue2.js +138 -0
  143. package/lib/components/table/src/table.vue2.js.map +1 -0
  144. package/lib/defaults.d.ts +4 -0
  145. package/lib/defaults.js +12 -0
  146. package/lib/defaults.js.map +1 -0
  147. package/lib/index.d.ts +4 -6
  148. package/lib/index.js +20 -15
  149. package/lib/index.js.map +1 -0
  150. package/lib/ll-plus/component.d.ts +3 -0
  151. package/lib/ll-plus/defaults.d.ts +4 -0
  152. package/lib/ll-plus/index.d.ts +4 -0
  153. package/lib/ll-plus/make-installer.d.ts +4 -0
  154. package/lib/locale/index.d.ts +10 -0
  155. package/lib/locale/index.js +12 -0
  156. package/lib/locale/index.js.map +1 -0
  157. package/lib/locale/lang/en_US.d.ts +144 -0
  158. package/lib/locale/lang/en_US.js +151 -0
  159. package/lib/locale/lang/en_US.js.map +1 -0
  160. package/lib/locale/lang/zh_CN.d.ts +169 -0
  161. package/lib/locale/lang/zh_CN.js +176 -0
  162. package/lib/locale/lang/zh_CN.js.map +1 -0
  163. package/lib/locale/lang/zh_TW.d.ts +125 -0
  164. package/lib/locale/lang/zh_TW.js +132 -0
  165. package/lib/locale/lang/zh_TW.js.map +1 -0
  166. package/lib/make-installer.d.ts +4 -0
  167. package/lib/make-installer.js +14 -0
  168. package/lib/make-installer.js.map +1 -0
  169. package/lib/utils/add-unit.js +9 -0
  170. package/lib/utils/add-unit.js.map +1 -0
  171. package/lib/utils/create-namespace.js +34 -34
  172. package/lib/utils/create-namespace.js.map +1 -0
  173. package/lib/utils/index.d.ts +2 -1
  174. package/lib/utils/index.js +18 -18
  175. package/lib/utils/index.js.map +1 -0
  176. package/lib/utils/props/index.d.ts +3 -0
  177. package/lib/utils/props/index.js +14 -0
  178. package/lib/utils/props/index.js.map +1 -0
  179. package/lib/utils/props/runtime.d.ts +29 -0
  180. package/lib/utils/props/runtime.js +59 -0
  181. package/lib/utils/props/runtime.js.map +1 -0
  182. package/lib/utils/props/types.d.ts +120 -0
  183. package/lib/utils/props/types.js +4 -0
  184. package/lib/utils/props/types.js.map +1 -0
  185. package/lib/utils/props/util.d.ts +8 -0
  186. package/lib/utils/props/util.js +4 -0
  187. package/lib/utils/props/util.js.map +1 -0
  188. package/lib/utils/types.d.ts +10 -0
  189. package/lib/utils/types.js +70 -0
  190. package/lib/utils/types.js.map +1 -0
  191. package/lib/utils/with-install.js +8 -6
  192. package/lib/utils/with-install.js.map +1 -0
  193. package/package.json +37 -3
  194. package/theme-chalk/css/icon.css +1 -1
  195. package/theme-chalk/css/index.css +5 -1
  196. package/theme-chalk/css/table.css +5 -0
  197. package/theme-chalk/fonts/iconfont.js +1 -0
  198. package/theme-chalk/fonts/iconfont.json +1262 -0
  199. package/types/packages/component.d.ts +3 -0
  200. package/types/packages/components/icon/index.d.ts +79 -0
  201. package/types/packages/components/icon/src/icon.d.ts +30 -0
  202. package/types/packages/components/icon/src/icon.vue.d.ts +73 -0
  203. package/types/packages/components/index.d.ts +2 -0
  204. package/types/packages/components/table/index.d.ts +592 -0
  205. package/types/packages/components/table/src/components/header-search.vue.d.ts +110 -0
  206. package/types/packages/components/table/src/components/main-table.vue.d.ts +254 -0
  207. package/types/packages/components/table/src/components/pagination.vue.d.ts +65 -0
  208. package/types/packages/components/table/src/table.d.ts +148 -0
  209. package/types/packages/components/table/src/table.vue.d.ts +586 -0
  210. package/types/packages/defaults.d.ts +4 -0
  211. package/types/packages/index.d.ts +4 -0
  212. package/types/packages/ll-plus/component.d.ts +3 -0
  213. package/types/packages/ll-plus/defaults.d.ts +4 -0
  214. package/types/packages/ll-plus/index.d.ts +4 -0
  215. package/types/packages/ll-plus/make-installer.d.ts +4 -0
  216. package/types/packages/locale/index.d.ts +10 -0
  217. package/types/packages/locale/lang/en_US.d.ts +144 -0
  218. package/types/packages/locale/lang/zh_CN.d.ts +169 -0
  219. package/types/packages/locale/lang/zh_TW.d.ts +125 -0
  220. package/types/packages/make-installer.d.ts +4 -0
  221. package/types/{utils → packages/utils}/index.d.ts +2 -1
  222. package/types/packages/utils/props/index.d.ts +3 -0
  223. package/types/packages/utils/props/runtime.d.ts +29 -0
  224. package/types/packages/utils/props/types.d.ts +120 -0
  225. package/types/packages/utils/props/util.d.ts +8 -0
  226. package/types/packages/utils/types.d.ts +10 -0
  227. package/types/tsconfig.web.tsbuildinfo +1 -0
  228. package/entry/types/index.d.ts +0 -6
  229. package/es/components/icon/index.js +0 -33
  230. package/es/components/index.js +0 -1
  231. package/es/components.js +0 -5
  232. package/es/index.js +0 -11
  233. package/es/utils/add-util.js +0 -3
  234. package/es/utils/create-namespace.js +0 -38
  235. package/es/utils/index.js +0 -3
  236. package/es/utils/with-install.js +0 -6
  237. package/index.esm.js +0 -91
  238. package/index.js +0 -101
  239. package/lib/components.js +0 -9
  240. package/lib/utils/add-util.js +0 -7
  241. package/theme-chalk/fonts/iconfont.ttf +0 -0
  242. package/theme-chalk/fonts/iconfont.woff +0 -0
  243. package/theme-chalk/fonts/iconfont.woff2 +0 -0
  244. package/types/components/icon/index.d.ts +0 -34
  245. package/types/components/icon/src/icon.d.ts +0 -6
  246. package/types/components/icon/src/icon.vue.d.ts +0 -27
  247. package/types/components/index.d.ts +0 -1
  248. /package/{entry/types/components.d.ts → es/component.d.ts} +0 -0
  249. /package/es/{components.d.ts → ll-plus/component.d.ts} +0 -0
  250. /package/es/utils/{add-util.d.ts → add-unit.d.ts} +0 -0
  251. /package/lib/{components.d.ts → component.d.ts} +0 -0
  252. /package/lib/utils/{add-util.d.ts → add-unit.d.ts} +0 -0
  253. /package/types/{utils/add-util.d.ts → packages/utils/add-unit.d.ts} +0 -0
  254. /package/types/{utils → packages/utils}/create-namespace.d.ts +0 -0
  255. /package/types/{utils → packages/utils}/with-install.d.ts +0 -0
@@ -1,42 +1,42 @@
1
+ 'use strict';
2
+
1
3
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createNamespace = void 0;
4
4
  const _bem = (prefixedName, blockSuffix, element, modifier) => {
5
- if (blockSuffix) {
6
- prefixedName += `-${blockSuffix}`;
7
- }
8
- if (element) {
9
- prefixedName += `__${element}`;
10
- }
11
- if (modifier) {
12
- prefixedName += `--${modifier}`;
13
- }
14
- return prefixedName;
5
+ if (blockSuffix) {
6
+ prefixedName += `-${blockSuffix}`;
7
+ }
8
+ if (element) {
9
+ prefixedName += `__${element}`;
10
+ }
11
+ if (modifier) {
12
+ prefixedName += `--${modifier}`;
13
+ }
14
+ return prefixedName;
15
15
  };
16
16
  function createBEM(prefixedName) {
17
- const b = (blockSuffix = '') => _bem(prefixedName, blockSuffix, '', '');
18
- const e = (element = '') => element ? _bem(prefixedName, '', element, '') : '';
19
- const m = (modifier = '') => modifier ? _bem(prefixedName, '', '', modifier) : '';
20
- const be = (blockSuffix = '', element = '') => blockSuffix && element ? _bem(prefixedName, blockSuffix, element, '') : '';
21
- const em = (element, modifier) => element && modifier ? _bem(prefixedName, '', element, modifier) : '';
22
- const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(prefixedName, blockSuffix, '', modifier) : '';
23
- const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier
24
- ? _bem(prefixedName, blockSuffix, element, modifier)
25
- : '';
26
- const is = (name = '') => (name ? `is-${name}` : '');
27
- return {
28
- b,
29
- e,
30
- m,
31
- be,
32
- em,
33
- bm,
34
- bem,
35
- is
36
- };
17
+ const b = (blockSuffix = "") => _bem(prefixedName, blockSuffix, "", "");
18
+ const e = (element = "") => element ? _bem(prefixedName, "", element, "") : "";
19
+ const m = (modifier = "") => modifier ? _bem(prefixedName, "", "", modifier) : "";
20
+ const be = (blockSuffix = "", element = "") => blockSuffix && element ? _bem(prefixedName, blockSuffix, element, "") : "";
21
+ const em = (element, modifier) => element && modifier ? _bem(prefixedName, "", element, modifier) : "";
22
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(prefixedName, blockSuffix, "", modifier) : "";
23
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(prefixedName, blockSuffix, element, modifier) : "";
24
+ const is = (name = "") => name ? `is-${name}` : "";
25
+ return {
26
+ b,
27
+ e,
28
+ m,
29
+ be,
30
+ em,
31
+ bm,
32
+ bem,
33
+ is
34
+ };
37
35
  }
38
36
  function createNamespace(name) {
39
- const prefixedName = `ll-${name}`;
40
- return createBEM(prefixedName);
37
+ const prefixedName = `ll-${name}`;
38
+ return createBEM(prefixedName);
41
39
  }
40
+
42
41
  exports.createNamespace = createNamespace;
42
+ //# sourceMappingURL=create-namespace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-namespace.js","sources":["../../../packages/utils/create-namespace.ts"],"sourcesContent":["const _bem = (\n prefixedName: string,\n blockSuffix: string,\n element: string,\n modifier: string\n) => {\n if (blockSuffix) {\n prefixedName += `-${blockSuffix}`\n }\n if (element) {\n prefixedName += `__${element}`\n }\n if (modifier) {\n prefixedName += `--${modifier}`\n }\n return prefixedName\n}\nfunction createBEM(prefixedName: string) {\n const b = (blockSuffix = '') => _bem(prefixedName, blockSuffix, '', '')\n const e = (element = '') =>\n element ? _bem(prefixedName, '', element, '') : ''\n const m = (modifier = '') =>\n modifier ? _bem(prefixedName, '', '', modifier) : ''\n const be = (blockSuffix = '', element = '') =>\n blockSuffix && element ? _bem(prefixedName, blockSuffix, element, '') : ''\n const em = (element: string, modifier: string) =>\n element && modifier ? _bem(prefixedName, '', element, modifier) : ''\n const bm = (blockSuffix: string, modifier: string) =>\n blockSuffix && modifier ? _bem(prefixedName, blockSuffix, '', modifier) : ''\n const bem = (blockSuffix: string, element: string, modifier: string) =>\n blockSuffix && element && modifier\n ? _bem(prefixedName, blockSuffix, element, modifier)\n : ''\n const is = (name = '') => (name ? `is-${name}` : '')\n return {\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is\n }\n}\nexport function createNamespace(name: string) {\n const prefixedName = `ll-${name}`\n return createBEM(prefixedName)\n}\n// const bem = createNamespace('button')\n// a-button\n// a-button-box\n// a-button__element\n// a-button--disabled\n// console.log(bem.b());\n// console.log(bem.b(\"box\"));\n// console.log(bem.e(\"element\"));\n// console.log(bem.m(\"disabled\"));\n// console.log(bem.is(\"checked\"));\n// console.log(bem.bem(\"box\", \"element\", \"disabled\"));\n"],"names":[],"mappings":";;;AAAA,MAAM,IAAO,GAAA,CACX,YACA,EAAA,WAAA,EACA,SACA,QACG,KAAA;AACH,EAAA,IAAI,WAAa,EAAA;AACf,IAAA,YAAA,IAAgB,IAAI,WAAW,CAAA,CAAA,CAAA;AAAA,GACjC;AACA,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,YAAA,IAAgB,KAAK,OAAO,CAAA,CAAA,CAAA;AAAA,GAC9B;AACA,EAAA,IAAI,QAAU,EAAA;AACZ,IAAA,YAAA,IAAgB,KAAK,QAAQ,CAAA,CAAA,CAAA;AAAA,GAC/B;AACA,EAAO,OAAA,YAAA,CAAA;AACT,CAAA,CAAA;AACA,SAAS,UAAU,YAAsB,EAAA;AACvC,EAAM,MAAA,CAAA,GAAI,CAAC,WAAc,GAAA,EAAA,KAAO,KAAK,YAAc,EAAA,WAAA,EAAa,IAAI,EAAE,CAAA,CAAA;AACtE,EAAM,MAAA,CAAA,GAAI,CAAC,OAAA,GAAU,EACnB,KAAA,OAAA,GAAU,KAAK,YAAc,EAAA,EAAA,EAAI,OAAS,EAAA,EAAE,CAAI,GAAA,EAAA,CAAA;AAClD,EAAM,MAAA,CAAA,GAAI,CAAC,QAAA,GAAW,EACpB,KAAA,QAAA,GAAW,KAAK,YAAc,EAAA,EAAA,EAAI,EAAI,EAAA,QAAQ,CAAI,GAAA,EAAA,CAAA;AACpD,EAAA,MAAM,EAAK,GAAA,CAAC,WAAc,GAAA,EAAA,EAAI,OAAU,GAAA,EAAA,KACtC,WAAe,IAAA,OAAA,GAAU,IAAK,CAAA,YAAA,EAAc,WAAa,EAAA,OAAA,EAAS,EAAE,CAAI,GAAA,EAAA,CAAA;AAC1E,EAAM,MAAA,EAAA,GAAK,CAAC,OAAA,EAAiB,QAC3B,KAAA,OAAA,IAAW,QAAW,GAAA,IAAA,CAAK,YAAc,EAAA,EAAA,EAAI,OAAS,EAAA,QAAQ,CAAI,GAAA,EAAA,CAAA;AACpE,EAAM,MAAA,EAAA,GAAK,CAAC,WAAA,EAAqB,QAC/B,KAAA,WAAA,IAAe,QAAW,GAAA,IAAA,CAAK,YAAc,EAAA,WAAA,EAAa,EAAI,EAAA,QAAQ,CAAI,GAAA,EAAA,CAAA;AAC5E,EAAA,MAAM,GAAM,GAAA,CAAC,WAAqB,EAAA,OAAA,EAAiB,QACjD,KAAA,WAAA,IAAe,OAAW,IAAA,QAAA,GACtB,IAAK,CAAA,YAAA,EAAc,WAAa,EAAA,OAAA,EAAS,QAAQ,CACjD,GAAA,EAAA,CAAA;AACN,EAAA,MAAM,KAAK,CAAC,IAAA,GAAO,OAAQ,IAAO,GAAA,CAAA,GAAA,EAAM,IAAI,CAAK,CAAA,GAAA,EAAA,CAAA;AACjD,EAAO,OAAA;AAAA,IACL,CAAA;AAAA,IACA,CAAA;AAAA,IACA,CAAA;AAAA,IACA,EAAA;AAAA,IACA,EAAA;AAAA,IACA,EAAA;AAAA,IACA,GAAA;AAAA,IACA,EAAA;AAAA,GACF,CAAA;AACF,CAAA;AACO,SAAS,gBAAgB,IAAc,EAAA;AAC5C,EAAM,MAAA,YAAA,GAAe,MAAM,IAAI,CAAA,CAAA,CAAA;AAC/B,EAAA,OAAO,UAAU,YAAY,CAAA,CAAA;AAC/B;;;;"}
@@ -1,3 +1,4 @@
1
- export * from './add-util';
1
+ export * from './props';
2
+ export * from './add-unit';
2
3
  export * from './create-namespace';
3
4
  export * from './with-install';
@@ -1,19 +1,19 @@
1
+ 'use strict';
2
+
3
+ require('./props/index.js');
4
+ var addUnit = require('./add-unit.js');
5
+ var createNamespace = require('./create-namespace.js');
6
+ var withInstall = require('./with-install.js');
7
+ var runtime = require('./props/runtime.js');
8
+
1
9
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./add-util"), exports);
18
- __exportStar(require("./create-namespace"), exports);
19
- __exportStar(require("./with-install"), exports);
10
+
11
+ exports.addUnit = addUnit.addUnit;
12
+ exports.createNamespace = createNamespace.createNamespace;
13
+ exports.withInstall = withInstall.withInstall;
14
+ exports.buildProp = runtime.buildProp;
15
+ exports.buildProps = runtime.buildProps;
16
+ exports.definePropType = runtime.definePropType;
17
+ exports.epPropKey = runtime.epPropKey;
18
+ exports.isEpProp = runtime.isEpProp;
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ export * from './util';
2
+ export * from './types';
3
+ export * from './runtime';
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ require('./util.js');
4
+ require('./types.js');
5
+ var runtime = require('./runtime.js');
6
+
7
+ "use strict";
8
+
9
+ exports.buildProp = runtime.buildProp;
10
+ exports.buildProps = runtime.buildProps;
11
+ exports.definePropType = runtime.definePropType;
12
+ exports.epPropKey = runtime.epPropKey;
13
+ exports.isEpProp = runtime.isEpProp;
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ import type { PropType } from 'vue';
2
+ import type { EpProp, EpPropConvert, EpPropFinalized, EpPropInput, EpPropMergeType, IfEpProp, IfNativePropType, NativePropType } from './types';
3
+ export declare const epPropKey = "__epPropKey";
4
+ export declare const definePropType: <T>(val: any) => PropType<T>;
5
+ export declare const isEpProp: (val: unknown) => val is EpProp<any, any, any>;
6
+ /**
7
+ * @description Build prop. It can better optimize prop types
8
+ * @description 生成 prop,能更好地优化类型
9
+ * @example
10
+ // limited options
11
+ // the type will be PropType<'light' | 'dark'>
12
+ buildProp({
13
+ type: String,
14
+ values: ['light', 'dark'],
15
+ } as const)
16
+ * @example
17
+ // limited options and other types
18
+ // the type will be PropType<'small' | 'large' | number>
19
+ buildProp({
20
+ type: [String, Number],
21
+ values: ['small', 'large'],
22
+ validator: (val: unknown): val is number => typeof val === 'number',
23
+ } as const)
24
+ @link see more: https://github.com/element-plus/element-plus/pull/3341
25
+ */
26
+ export declare const buildProp: <Type = never, Value = never, Validator = never, Default extends EpPropMergeType<Type, Value, Validator> = never, Required extends boolean = false>(prop: EpPropInput<Type, Value, Validator, Default, Required>, key?: string) => EpPropFinalized<Type, Value, Validator, Default, Required>;
27
+ export declare const buildProps: <Props extends Record<string, {
28
+ __epPropKey: true;
29
+ } | NativePropType | EpPropInput<any, any, any, any, any>>>(props: Props) => { [K in keyof Props]: IfEpProp<Props[K], Props[K], IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>>; };
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var lodashUnified = require('lodash-unified');
5
+ var shared = require('@vue/shared');
6
+
7
+ "use strict";
8
+ const epPropKey = "__epPropKey";
9
+ const definePropType = (val) => val;
10
+ const isEpProp = (val) => shared.isObject(val) && !!val[epPropKey];
11
+ const buildProp = (prop, key) => {
12
+ if (!shared.isObject(prop) || isEpProp(prop))
13
+ return prop;
14
+ const { values, required, default: defaultValue, type, validator } = prop;
15
+ const _validator = values || validator ? (val) => {
16
+ let valid = false;
17
+ let allowedValues = [];
18
+ if (values) {
19
+ allowedValues = Array.from(values);
20
+ if (shared.hasOwn(prop, "default")) {
21
+ allowedValues.push(defaultValue);
22
+ }
23
+ valid || (valid = allowedValues.includes(val));
24
+ }
25
+ if (validator)
26
+ valid || (valid = validator(val));
27
+ if (!valid && allowedValues.length > 0) {
28
+ const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
29
+ vue.warn(
30
+ `Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(
31
+ val
32
+ )}.`
33
+ );
34
+ }
35
+ return valid;
36
+ } : void 0;
37
+ const epProp = {
38
+ type,
39
+ required: !!required,
40
+ validator: _validator,
41
+ [epPropKey]: true
42
+ };
43
+ if (shared.hasOwn(prop, "default"))
44
+ epProp.default = defaultValue;
45
+ return epProp;
46
+ };
47
+ const buildProps = (props) => lodashUnified.fromPairs(
48
+ Object.entries(props).map(([key, option]) => [
49
+ key,
50
+ buildProp(option, key)
51
+ ])
52
+ );
53
+
54
+ exports.buildProp = buildProp;
55
+ exports.buildProps = buildProps;
56
+ exports.definePropType = definePropType;
57
+ exports.epPropKey = epPropKey;
58
+ exports.isEpProp = isEpProp;
59
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sources":["../../../../packages/utils/props/runtime.ts"],"sourcesContent":["import { warn } from 'vue'\nimport { fromPairs } from 'lodash-unified'\nimport { isObject, hasOwn } from '@vue/shared'\n\nimport type { PropType } from 'vue'\nimport type {\n EpProp,\n EpPropConvert,\n EpPropFinalized,\n EpPropInput,\n EpPropMergeType,\n IfEpProp,\n IfNativePropType,\n NativePropType\n} from './types'\n\nexport const epPropKey = '__epPropKey'\n\nexport const definePropType = <T>(val: any): PropType<T> => val\n\nexport const isEpProp = (val: unknown): val is EpProp<any, any, any> =>\n isObject(val) && !!(val as any)[epPropKey]\n\n/**\n * @description Build prop. It can better optimize prop types\n * @description 生成 prop,能更好地优化类型\n * @example\n // limited options\n // the type will be PropType<'light' | 'dark'>\n buildProp({\n type: String,\n values: ['light', 'dark'],\n } as const)\n * @example\n // limited options and other types\n // the type will be PropType<'small' | 'large' | number>\n buildProp({\n type: [String, Number],\n values: ['small', 'large'],\n validator: (val: unknown): val is number => typeof val === 'number',\n } as const)\n @link see more: https://github.com/element-plus/element-plus/pull/3341\n */\nexport const buildProp = <\n Type = never,\n Value = never,\n Validator = never,\n Default extends EpPropMergeType<Type, Value, Validator> = never,\n Required extends boolean = false\n>(\n prop: EpPropInput<Type, Value, Validator, Default, Required>,\n key?: string\n): EpPropFinalized<Type, Value, Validator, Default, Required> => {\n // filter native prop type and nested prop, e.g `null`, `undefined` (from `buildProps`)\n if (!isObject(prop) || isEpProp(prop)) return prop as any\n\n const { values, required, default: defaultValue, type, validator } = prop\n\n const _validator =\n values || validator\n ? (val: unknown) => {\n let valid = false\n let allowedValues: unknown[] = []\n\n if (values) {\n allowedValues = Array.from(values)\n if (hasOwn(prop, 'default')) {\n allowedValues.push(defaultValue)\n }\n valid ||= allowedValues.includes(val)\n }\n if (validator) valid ||= validator(val)\n\n if (!valid && allowedValues.length > 0) {\n const allowValuesText = [...new Set(allowedValues)]\n .map(value => JSON.stringify(value))\n .join(', ')\n warn(\n `Invalid prop: validation failed${\n key ? ` for prop \"${key}\"` : ''\n }. Expected one of [${allowValuesText}], got value ${JSON.stringify(\n val\n )}.`\n )\n }\n return valid\n }\n : undefined\n\n const epProp: any = {\n type,\n required: !!required,\n validator: _validator,\n [epPropKey]: true\n }\n if (hasOwn(prop, 'default')) epProp.default = defaultValue\n return epProp\n}\n\nexport const buildProps = <\n Props extends Record<\n string,\n | { [epPropKey]: true }\n | NativePropType\n | EpPropInput<any, any, any, any, any>\n >\n>(\n props: Props\n): {\n [K in keyof Props]: IfEpProp<\n Props[K],\n Props[K],\n IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>\n >\n} =>\n fromPairs(\n Object.entries(props).map(([key, option]) => [\n key,\n buildProp(option as any, key)\n ])\n ) as any\n"],"names":["isObject","hasOwn","warn","fromPairs"],"mappings":";;;;;;;AAgBO,MAAM,SAAY,GAAA,cAAA;AAEZ,MAAA,cAAA,GAAiB,CAAI,GAA0B,KAAA,IAAA;AAE/C,MAAA,QAAA,GAAW,CAAC,GACvB,KAAAA,eAAA,CAAS,GAAG,CAAK,IAAA,CAAC,CAAE,GAAA,CAAY,SAAS,EAAA;AAsB9B,MAAA,SAAA,GAAY,CAOvB,IAAA,EACA,GAC+D,KAAA;AAE/D,EAAA,IAAI,CAACA,eAAA,CAAS,IAAI,CAAA,IAAK,SAAS,IAAI,CAAA;AAAG,IAAO,OAAA,IAAA,CAAA;AAE9C,EAAA,MAAM,EAAE,MAAQ,EAAA,QAAA,EAAU,SAAS,YAAc,EAAA,IAAA,EAAM,WAAc,GAAA,IAAA,CAAA;AAErE,EAAA,MAAM,UACJ,GAAA,MAAA,IAAU,SACN,GAAA,CAAC,GAAiB,KAAA;AAChB,IAAA,IAAI,KAAQ,GAAA,KAAA,CAAA;AACZ,IAAA,IAAI,gBAA2B,EAAC,CAAA;AAEhC,IAAA,IAAI,MAAQ,EAAA;AACV,MAAgB,aAAA,GAAA,KAAA,CAAM,KAAK,MAAM,CAAA,CAAA;AACjC,MAAI,IAAAC,aAAA,CAAO,IAAM,EAAA,SAAS,CAAG,EAAA;AAC3B,QAAA,aAAA,CAAc,KAAK,YAAY,CAAA,CAAA;AAAA,OACjC;AACA,MAAU,KAAA,KAAA,KAAA,GAAA,aAAA,CAAc,SAAS,GAAG,CAAA,CAAA,CAAA;AAAA,KACtC;AACA,IAAI,IAAA,SAAA;AAAW,MAAA,KAAA,KAAA,KAAA,GAAU,UAAU,GAAG,CAAA,CAAA,CAAA;AAEtC,IAAA,IAAI,CAAC,KAAA,IAAS,aAAc,CAAA,MAAA,GAAS,CAAG,EAAA;AACtC,MAAA,MAAM,kBAAkB,CAAC,GAAG,IAAI,GAAA,CAAI,aAAa,CAAC,CAAA,CAC/C,GAAI,CAAA,CAAA,KAAA,KAAS,KAAK,SAAU,CAAA,KAAK,CAAC,CAAA,CAClC,KAAK,IAAI,CAAA,CAAA;AACZ,MAAAC,QAAA;AAAA,QACE,CAAA,+BAAA,EACE,MAAM,CAAc,WAAA,EAAA,GAAG,MAAM,EAC/B,CAAA,mBAAA,EAAsB,eAAe,CAAA,aAAA,EAAgB,IAAK,CAAA,SAAA;AAAA,UACxD,GAAA;AAAA,SACD,CAAA,CAAA,CAAA;AAAA,OACH,CAAA;AAAA,KACF;AACA,IAAO,OAAA,KAAA,CAAA;AAAA,GAET,GAAA,KAAA,CAAA,CAAA;AAEN,EAAA,MAAM,MAAc,GAAA;AAAA,IAClB,IAAA;AAAA,IACA,QAAA,EAAU,CAAC,CAAC,QAAA;AAAA,IACZ,SAAW,EAAA,UAAA;AAAA,IACX,CAAC,SAAS,GAAG,IAAA;AAAA,GACf,CAAA;AACA,EAAI,IAAAD,aAAA,CAAO,MAAM,SAAS,CAAA;AAAG,IAAA,MAAA,CAAO,OAAU,GAAA,YAAA,CAAA;AAC9C,EAAO,OAAA,MAAA,CAAA;AACT,EAAA;AAEa,MAAA,UAAA,GAAa,CAQxB,KAQA,KAAAE,uBAAA;AAAA,EACE,MAAA,CAAO,QAAQ,KAAK,CAAA,CAAE,IAAI,CAAC,CAAC,GAAK,EAAA,MAAM,CAAM,KAAA;AAAA,IAC3C,GAAA;AAAA,IACA,SAAA,CAAU,QAAe,GAAG,CAAA;AAAA,GAC7B,CAAA;AACH;;;;;;;;"}
@@ -0,0 +1,120 @@
1
+ import type { epPropKey } from './runtime';
2
+ import type { ExtractPropTypes, PropType } from 'vue';
3
+ import type { IfNever, UnknownToNever, WritableArray } from './util';
4
+ type Value<T> = T[keyof T];
5
+ /**
6
+ * Extract the type of a single prop
7
+ *
8
+ * 提取单个 prop 的参数类型
9
+ *
10
+ * @example
11
+ * ExtractPropType<{ type: StringConstructor }> => string | undefined
12
+ * ExtractPropType<{ type: StringConstructor, required: true }> => string
13
+ * ExtractPropType<{ type: BooleanConstructor }> => boolean
14
+ */
15
+ export type ExtractPropType<T extends object> = Value<ExtractPropTypes<{
16
+ key: T;
17
+ }>>;
18
+ /**
19
+ * Extracts types via `ExtractPropTypes`, accepting `PropType<T>`, `XXXConstructor`, `never`...
20
+ *
21
+ * 通过 `ExtractPropTypes` 提取类型,接受 `PropType<T>`、`XXXConstructor`、`never`...
22
+ *
23
+ * @example
24
+ * ResolvePropType<BooleanConstructor> => boolean
25
+ * ResolvePropType<PropType<T>> => T
26
+ **/
27
+ export type ResolvePropType<T> = IfNever<T, never, ExtractPropType<{
28
+ type: WritableArray<T>;
29
+ required: true;
30
+ }>>;
31
+ /**
32
+ * Merge Type, Value, Validator types
33
+ * 合并 Type、Value、Validator 的类型
34
+ *
35
+ * @example
36
+ * EpPropMergeType<StringConstructor, '1', 1> => 1 | "1" // ignores StringConstructor
37
+ * EpPropMergeType<StringConstructor, never, number> => string | number
38
+ */
39
+ export type EpPropMergeType<Type, Value, Validator> = IfNever<UnknownToNever<Value>, ResolvePropType<Type>, never> | UnknownToNever<Value> | UnknownToNever<Validator>;
40
+ /**
41
+ * Handling default values for input (constraints)
42
+ *
43
+ * 处理输入参数的默认值(约束)
44
+ */
45
+ export type EpPropInputDefault<Required extends boolean, Default> = Required extends true ? never : Default extends Record<string, unknown> | Array<any> ? () => Default : (() => Default) | Default;
46
+ /**
47
+ * Native prop types, e.g: `BooleanConstructor`, `StringConstructor`, `null`, `undefined`, etc.
48
+ *
49
+ * 原生 prop `类型,BooleanConstructor`、`StringConstructor`、`null`、`undefined` 等
50
+ */
51
+ export type NativePropType = ((...args: any) => any) | {
52
+ new (...args: any): any;
53
+ } | undefined | null;
54
+ export type IfNativePropType<T, Y, N> = [T] extends [NativePropType] ? Y : N;
55
+ /**
56
+ * input prop `buildProp` or `buildProps` (constraints)
57
+ *
58
+ * prop 输入参数(约束)
59
+ *
60
+ * @example
61
+ * EpPropInput<StringConstructor, 'a', never, never, true>
62
+ * ⬇️
63
+ * {
64
+ type?: StringConstructor | undefined;
65
+ required?: true | undefined;
66
+ values?: readonly "a"[] | undefined;
67
+ validator?: ((val: any) => boolean) | ((val: any) => val is never) | undefined;
68
+ default?: undefined;
69
+ }
70
+ */
71
+ export type EpPropInput<Type, Value, Validator, Default extends EpPropMergeType<Type, Value, Validator>, Required extends boolean> = {
72
+ type?: Type;
73
+ required?: Required;
74
+ values?: readonly Value[];
75
+ validator?: ((val: any) => val is Validator) | ((val: any) => boolean);
76
+ default?: EpPropInputDefault<Required, Default>;
77
+ };
78
+ /**
79
+ * output prop `buildProp` or `buildProps`.
80
+ *
81
+ * prop 输出参数。
82
+ *
83
+ * @example
84
+ * EpProp<'a', 'b', true>
85
+ * ⬇️
86
+ * {
87
+ readonly type: PropType<"a">;
88
+ readonly required: true;
89
+ readonly validator: ((val: unknown) => boolean) | undefined;
90
+ readonly default: "b";
91
+ __epPropKey: true;
92
+ }
93
+ */
94
+ export type EpProp<Type, Default, Required> = {
95
+ readonly type: PropType<Type>;
96
+ readonly required: [Required] extends [true] ? true : false;
97
+ readonly validator: ((val: unknown) => boolean) | undefined;
98
+ [epPropKey]: true;
99
+ } & IfNever<Default, unknown, {
100
+ readonly default: Default;
101
+ }>;
102
+ /**
103
+ * Determine if it is `EpProp`
104
+ */
105
+ export type IfEpProp<T, Y, N> = T extends {
106
+ [epPropKey]: true;
107
+ } ? Y : N;
108
+ /**
109
+ * Converting input to output.
110
+ *
111
+ * 将输入转换为输出
112
+ */
113
+ export type EpPropConvert<Input> = Input extends EpPropInput<infer Type, infer Value, infer Validator, any, infer Required> ? EpPropFinalized<Type, Value, Validator, Input['default'], Required> : never;
114
+ /**
115
+ * Finalized conversion output
116
+ *
117
+ * 最终转换 EpProp
118
+ */
119
+ export type EpPropFinalized<Type, Value, Validator, Default, Required> = EpProp<EpPropMergeType<Type, Value, Validator>, UnknownToNever<Default>, Required>;
120
+ export {};
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ "use strict";
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,8 @@
1
+ export type Writable<T> = {
2
+ -readonly [P in keyof T]: T[P];
3
+ };
4
+ export type WritableArray<T> = T extends readonly any[] ? Writable<T> : T;
5
+ export type IfNever<T, Y = true, N = false> = [T] extends [never] ? Y : N;
6
+ export type IfUnknown<T, Y, N> = [unknown] extends [T] ? Y : N;
7
+ export type UnknownToNever<T> = IfUnknown<T, never, T>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ "use strict";
4
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,10 @@
1
+ export { isArray, isFunction, isObject, isString, isDate, isPromise, isSymbol } from '@vue/shared';
2
+ export { isVNode } from 'vue';
3
+ export declare const isUndefined: (val: any) => val is undefined;
4
+ export declare const isBoolean: (val: any) => val is boolean;
5
+ export declare const isNumber: (val: any) => val is number;
6
+ export declare const isEmpty: (val: unknown) => boolean;
7
+ export declare const isElement: (e: unknown) => e is Element;
8
+ export declare const isPropAbsent: (prop: unknown) => prop is null | undefined;
9
+ export declare const isStringNumber: (val: string) => boolean;
10
+ export declare const isWindow: (val: unknown) => val is Window;
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ var shared = require('@vue/shared');
4
+ var lodashUnified = require('lodash-unified');
5
+ var vue = require('vue');
6
+
7
+ "use strict";
8
+ const isUndefined = (val) => val === void 0;
9
+ const isBoolean = (val) => typeof val === "boolean";
10
+ const isNumber = (val) => typeof val === "number";
11
+ const isEmpty = (val) => !val && val !== 0 || shared.isArray(val) && val.length === 0 || shared.isObject(val) && !Object.keys(val).length;
12
+ const isElement = (e) => {
13
+ if (typeof Element === "undefined")
14
+ return false;
15
+ return e instanceof Element;
16
+ };
17
+ const isPropAbsent = (prop) => {
18
+ return lodashUnified.isNil(prop);
19
+ };
20
+ const isStringNumber = (val) => {
21
+ if (!shared.isString(val)) {
22
+ return false;
23
+ }
24
+ return !Number.isNaN(Number(val));
25
+ };
26
+ const isWindow = (val) => {
27
+ return val === window;
28
+ };
29
+
30
+ Object.defineProperty(exports, "isArray", {
31
+ enumerable: true,
32
+ get: function () { return shared.isArray; }
33
+ });
34
+ Object.defineProperty(exports, "isDate", {
35
+ enumerable: true,
36
+ get: function () { return shared.isDate; }
37
+ });
38
+ Object.defineProperty(exports, "isFunction", {
39
+ enumerable: true,
40
+ get: function () { return shared.isFunction; }
41
+ });
42
+ Object.defineProperty(exports, "isObject", {
43
+ enumerable: true,
44
+ get: function () { return shared.isObject; }
45
+ });
46
+ Object.defineProperty(exports, "isPromise", {
47
+ enumerable: true,
48
+ get: function () { return shared.isPromise; }
49
+ });
50
+ Object.defineProperty(exports, "isString", {
51
+ enumerable: true,
52
+ get: function () { return shared.isString; }
53
+ });
54
+ Object.defineProperty(exports, "isSymbol", {
55
+ enumerable: true,
56
+ get: function () { return shared.isSymbol; }
57
+ });
58
+ Object.defineProperty(exports, "isVNode", {
59
+ enumerable: true,
60
+ get: function () { return vue.isVNode; }
61
+ });
62
+ exports.isBoolean = isBoolean;
63
+ exports.isElement = isElement;
64
+ exports.isEmpty = isEmpty;
65
+ exports.isNumber = isNumber;
66
+ exports.isPropAbsent = isPropAbsent;
67
+ exports.isStringNumber = isStringNumber;
68
+ exports.isUndefined = isUndefined;
69
+ exports.isWindow = isWindow;
70
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../packages/utils/types.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\n\nexport {\n isArray,\n isFunction,\n isObject,\n isString,\n isDate,\n isPromise,\n isSymbol\n} from '@vue/shared'\nexport { isVNode } from 'vue'\n\nexport const isUndefined = (val: any): val is undefined => val === undefined\nexport const isBoolean = (val: any): val is boolean => typeof val === 'boolean'\nexport const isNumber = (val: any): val is number => typeof val === 'number'\n\nexport const isEmpty = (val: unknown) =>\n (!val && val !== 0) ||\n (isArray(val) && val.length === 0) ||\n (isObject(val) && !Object.keys(val).length)\n\nexport const isElement = (e: unknown): e is Element => {\n if (typeof Element === 'undefined') return false\n return e instanceof Element\n}\n\nexport const isPropAbsent = (prop: unknown): prop is null | undefined => {\n return isNil(prop)\n}\n\nexport const isStringNumber = (val: string): boolean => {\n if (!isString(val)) {\n return false\n }\n return !Number.isNaN(Number(val))\n}\n\nexport const isWindow = (val: unknown): val is Window => {\n return val === window\n}\n"],"names":["isArray","isObject","isNil","isString"],"mappings":";;;;;;;AAca,MAAA,WAAA,GAAc,CAAC,GAAA,KAA+B,GAAQ,KAAA,KAAA,EAAA;AAC5D,MAAM,SAAY,GAAA,CAAC,GAA6B,KAAA,OAAO,GAAQ,KAAA,UAAA;AAC/D,MAAM,QAAW,GAAA,CAAC,GAA4B,KAAA,OAAO,GAAQ,KAAA,SAAA;AAEvD,MAAA,OAAA,GAAU,CAAC,GACrB,KAAA,CAAC,OAAO,GAAQ,KAAA,CAAA,IAChBA,eAAQ,GAAG,CAAA,IAAK,IAAI,MAAW,KAAA,CAAA,IAC/BC,gBAAS,GAAG,CAAA,IAAK,CAAC,MAAO,CAAA,IAAA,CAAK,GAAG,CAAE,CAAA,OAAA;AAEzB,MAAA,SAAA,GAAY,CAAC,CAA6B,KAAA;AACrD,EAAA,IAAI,OAAO,OAAY,KAAA,WAAA;AAAa,IAAO,OAAA,KAAA,CAAA;AAC3C,EAAA,OAAO,CAAa,YAAA,OAAA,CAAA;AACtB,EAAA;AAEa,MAAA,YAAA,GAAe,CAAC,IAA4C,KAAA;AACvE,EAAA,OAAOC,oBAAM,IAAI,CAAA,CAAA;AACnB,EAAA;AAEa,MAAA,cAAA,GAAiB,CAAC,GAAyB,KAAA;AACtD,EAAI,IAAA,CAACC,eAAS,CAAA,GAAG,CAAG,EAAA;AAClB,IAAO,OAAA,KAAA,CAAA;AAAA,GACT;AACA,EAAA,OAAO,CAAC,MAAA,CAAO,KAAM,CAAA,MAAA,CAAO,GAAG,CAAC,CAAA,CAAA;AAClC,EAAA;AAEa,MAAA,QAAA,GAAW,CAAC,GAAgC,KAAA;AACvD,EAAA,OAAO,GAAQ,KAAA,MAAA,CAAA;AACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,12 @@
1
+ 'use strict';
2
+
1
3
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withInstall = void 0;
4
4
  const withInstall = (comp) => {
5
- comp.install = function (app) {
6
- app.component(comp.name, comp);
7
- };
8
- return comp;
5
+ comp.install = function(app) {
6
+ app.component(comp.name, comp);
7
+ };
8
+ return comp;
9
9
  };
10
+
10
11
  exports.withInstall = withInstall;
12
+ //# sourceMappingURL=with-install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-install.js","sources":["../../../packages/utils/with-install.ts"],"sourcesContent":["import type { App, Plugin } from \"vue\"; // 只导入类型 而不是导入值\n\n// 类型必须导出否则生成不了.d.ts文件\nexport type SFCWithInstall<T> = T & Plugin;\n\nexport const withInstall = <T>(comp: T) => {\n (comp as SFCWithInstall<T>).install = function (app: App) {\n app.component((comp as any).name, comp!);\n };\n return comp as SFCWithInstall<T>;\n};"],"names":[],"mappings":";;;AAKa,MAAA,WAAA,GAAc,CAAI,IAAY,KAAA;AACzC,EAAC,IAAA,CAA2B,OAAU,GAAA,SAAU,GAAU,EAAA;AACxD,IAAI,GAAA,CAAA,SAAA,CAAW,IAAa,CAAA,IAAA,EAAM,IAAK,CAAA,CAAA;AAAA,GACzC,CAAA;AACA,EAAO,OAAA,IAAA,CAAA;AACT;;;;"}
package/package.json CHANGED
@@ -1,13 +1,47 @@
1
1
  {
2
2
  "name": "ll-plus",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
- "module": "es/index.js",
6
+ "module": "es/index.mjs",
7
+ "types": "es/index.d.ts",
8
+ "unpkg": "index.full.js",
9
+ "jsdelivr": "index.full.js",
10
+ "keywords": [
11
+ "蓝略",
12
+ "ll-plus"
13
+ ],
14
+ "homepage": "http://192.168.10.11:9980/wunh/ll-plus.git",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "http://192.168.10.11:9980/wunh/ll-plus.git"
18
+ },
19
+ "dependencies": {
20
+ "@ctrl/tinycolor": "^3.6.1",
21
+ "@types/lodash": "^4.17.0",
22
+ "@types/lodash-es": "^4.17.12",
23
+ "@vueuse/core": "^10.9.0",
24
+ "async-validator": "^4.2.5",
25
+ "dayjs": "^1.11.10",
26
+ "lodash": "^4.17.21",
27
+ "lodash-es": "^4.17.21",
28
+ "lodash-unified": "^1.0.3",
29
+ "vue-draggable-next": "^2.2.1",
30
+ "vuedraggable": "^4.0.1"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "*",
34
+ "csstype": "^3.1.3",
35
+ "vue": "^3.4.21",
36
+ "ant-design-vue": "4.x"
37
+ },
38
+ "peerDependencies": {
39
+ "vue": "^3.4.21",
40
+ "ant-design-vue": "4.x"
41
+ },
7
42
  "scripts": {
8
43
  "test": "echo \"Error: no test specified\" && exit 1"
9
44
  },
10
- "keywords": [],
11
45
  "author": "",
12
46
  "license": "ISC"
13
47
  }
@@ -1 +1 @@
1
- .ll-icon{height:1em;width:1em;line-height:1em;display:inline-block;vertical-align:middle}.ll-icon svg{height:1em;width:1em}@font-face{font-family:ll-plus-icons;src:url(ll-plus/theme-chalk/fonts/iconfont.woff2) format("woff2"),url(ll-plus/theme-chalk/fonts/iconfont.woff) format("woff"),url(ll-plus/theme-chalk/fonts/iconfont.ttf) format("truetype")}[class*=ll-icon],[class^=ll-icon]{font-family:ll-plus-icons!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ll-icon-avatar:before{content:"\e617"}.ll-icon-menu-expansion:before{content:"\e67c"}.ll-icon-search:before{content:"\e6b9"}.ll-icon-wenhao:before{content:"\e600"}.ll-icon-windows-shixin:before{content:"\e603"}
1
+ .ll-icon{height:1em;width:1em;line-height:1em;display:inline-flex;justify-content:center;align-items:center;position:relative;fill:currentColor;color:var(--default-icon);font-size:inherit}.ll-icon svg{height:1em;width:1em}.ll-icon__header{color:pink}.ll-icon--primary{color:green}.ll-icon--primary.is-disable{color:#ff0}
@@ -1 +1,5 @@
1
- .ll-icon{height:1em;width:1em;line-height:1em;display:inline-block;vertical-align:middle}.ll-icon svg{height:1em;width:1em}@font-face{font-family:ll-plus-icons;src:url(ll-plus/theme-chalk/fonts/iconfont.woff2) format("woff2"),url(ll-plus/theme-chalk/fonts/iconfont.woff) format("woff"),url(ll-plus/theme-chalk/fonts/iconfont.ttf) format("truetype")}[class*=ll-icon],[class^=ll-icon]{font-family:ll-plus-icons!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ll-icon-avatar:before{content:"\e617"}.ll-icon-menu-expansion:before{content:"\e67c"}.ll-icon-search:before{content:"\e6b9"}.ll-icon-wenhao:before{content:"\e600"}.ll-icon-windows-shixin:before{content:"\e603"}
1
+ @charset "UTF-8";:root{--color-primary-bg:#f0f9ff;--color-primary-bg-hover:#b5e4ff;--color-primary-border:#8cd1ff;--color-primary-border-hover:#63bcff;--color-primary-hover:#3ba3ff;--color-primary:#1187ff;--color-primary-active:#0467d9;--color-primary-text-hover:#3ba3ff;--color-primary-text:#1187ff;--color-primary-text-active:#0467d9;--color-info:#1187ff;--color-success:#52c41a;--color-warning:#faad14;--color-error:#ff4d4f;--color-info:#1187ff;--color-text-base:#000;--color-text:rgba(0, 0, 0, 88%);--color-text-secondary:rgba(0, 0, 0, 65%);--color-text-tertiary:rgba(0, 0, 0, 45%);--color-text-quaternary:rgba(0, 0, 0, 25%);--color-border:#d9d9d9;--color-border-secondary:#f0f0f0;--color-split:rgba(0, 0, 0, 6%);--color-fill:rgba(0, 0, 0, 15%);--color-fill-secondary:rgba(0, 0, 0, 6%);--color-fill-tertiary:rgba(0, 0, 0, 4%);--color-fill-quaternary:rgba(0, 0, 0, 2%);--color-bg-base:#fff;--color-bg-container:#fff;--color-bg-elevated:#fff;--color-bg-layout:#f5f5f5;--color-bg-spotlight:rgba(0, 0, 0, 85%);--color-bg-mask:rgba(0, 0, 0, 45%);--control-item-bg-hover:#f4f4f4;--control-outline:rgba(238, 38, 5, 6%);--main-bg-color:#f4f7fd;--submenu-bg-color:#fff;--menu-search-bg-color:#f6f6f6;--menu-border-color:#f0f0f0;--menu-button-icon-hover:var(
2
+ --color-primary-hover
3
+ );--menu-button-icon-hover-bg:rgba(0, 0, 0, 6%);--collect-icon-color:#faad14;--header-icon-color:rgba(0, 0, 0, 65%);--setting-bg-color:#f4f5f7;--setting-modal-bg-color:#fff;--default-icon:rgba(0, 0, 0, 45%);--default-icon-hover:var(--color-primary-hover);--default-icon-hover-bg:rgba(0, 0, 0, 6%);--default-icon-active:var(--color-primary-active);--default-icon-disable:rgba(0, 0, 0, 25%);--primary-icon:var(--color-primary);--primary-icon-hover:var(--color-primary-hover);--primary-icon-active:var(--color-primary-active);--primary-icon-disabled:rgba(0, 0, 0, 25%);--scroll-color:rgba(0, 0, 0, 25%);--detail-descriptions-label-bg-color:#fafafa}.technology-blue{--color-primary-bg:#f0f9ff;--color-primary-bg-hover:#b5e4ff;--color-primary-border:#8cd1ff;--color-primary-border-hover:#63bcff;--color-primary-hover:#3ba3ff;--color-primary:#1187ff;--color-primary-active:#0467d9;--color-primary-text-hover:#3ba3ff;--color-primary-text:#1187ff;--color-primary-text-active:#0467d9;--color-info:#1187ff}.cyan-blue{--color-primary-bg:#f0f9ff;--color-primary-bg-hover:#ebfaf8;--color-primary-border:#dfedec;--color-primary-border-hover:#afe0de;--color-primary-hover:#83d4d2;--color-primary:#5bc5c7;--color-primary-active:#429ca1;--color-primary-text-hover:#83d4d2;--color-primary-text:#5bc5c7;--color-primary-text-active:#429ca1;--color-info:#5bc5c7;--main-bg-color:#f4f7fd}.dark{--color-primary-bg:#111d2c;--color-primary-bg-hover:#102945;--color-primary-border:#13375b;--color-primary-border-hover:#13487e;--color-primary-hover:#3795e8;--color-primary:#1176dc;--color-primary-active:#125fad;--color-primary-text-hover:#3795e8;--color-primary-text:#1176dc;--color-primary-text-active:#125fad;--dark-color-primary:#1187ff;--color-success:#49aa19;--color-warning:#d89614;--color-error:#dc4446;--color-info:#1176dc;--color-text-base:#fff;--color-text:rgba(255, 255, 255);--color-text-secondary:rgba(255, 255, 255, 75%);--color-text-tertiary:rgba(255, 255, 255, 45%);--color-text-quaternary:rgba(255, 255, 255, 25%);--color-border:#424242;--color-border-secondary:#303030;--color-split:rgba(255, 255, 255, 12%);--color-fill:rgba(255, 255, 255, 18%);--color-fill-secondary:rgba(255, 255, 255, 12%);--color-fill-tertiary:rgba(255, 255, 255, 8%);--color-fill-quaternary:rgba(255, 255, 255, 4%);--color-bg-base:#000;--color-bg-container:#141414;--color-bg-elevated:#1f1f1f;--color-bg-layout:#000;--color-bg-spotlight:#424242;--color-bg-mask:rgba(0, 0, 0, 45%);--control-item-bg-hover:rgba(255, 255, 255, 15%);--control-outline:rgba(238, 38, 56, 11%);--main-bg-color:transparent;--submenu-bg-color:#141414;--menu-search-bg-color:#000;--menu-border-color:#303030;--menu-button-icon-hover:var(
4
+ --color-primary-hover
5
+ );--menu-button-icon-hover-bg:rgba(255, 255, 255, 15%);--collect-icon-color:var(--default-icon);--header-icon-color:rgba(255, 255, 255, 75%);--setting-bg-color:#1f1f1f;--setting-modal-bg-color:#1f1f1f;--default-icon:rgba(255, 255, 255, 75%);--default-icon-disable:rgba(255, 255, 255, 25%);--scroll-color:rgba(255, 255, 255, 25%);--detail-descriptions-label-bg-color:rgba(255, 255, 255, 4%)//type=detail下的LlDescriptions的label背景颜色}.ant-menu-submenu.ant-menu-submenu-popup .ant-menu-submenu.ant-menu-submenu-vertical.ll-menu-sub .ant-menu-submenu-title{display:flex;align-items:center;justify-content:space-between;width:100%}.ant-menu-submenu.ant-menu-submenu-popup .ant-menu-submenu.ant-menu-submenu-vertical.ll-menu-sub .ant-menu-submenu-title .ll-icon{margin-left:20px}.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item{margin-bottom:4px}.ant-dropdown .ant-dropdown-menu :last-child{margin-bottom:0!important}.ant-select:hover .ant-select-selector{border-color:var(--color-primary-hover)!important}.ant-select-dropdown .ant-cascader-menu-item-active,.ant-select-dropdown .ant-select-item-option-selected{color:var(--color-primary)!important}.ant-select-dropdown .ant-cascader-menu .ant-cascader-menu-item{margin-bottom:4px}.ant-select-dropdown .ant-cascader-menu :last-child{margin-bottom:0!important}.rc-virtual-list-holder-inner .ant-select-item{margin-bottom:4px}.rc-virtual-list-holder-inner :last-child{margin-bottom:0!important}.ant-picker-dropdown .ant-picker-cell-selected .ant-picker-cell-inner{background-color:var(--color-primary)!important}.ll-icon{height:1em;width:1em;line-height:1em;display:inline-flex;justify-content:center;align-items:center;position:relative;fill:currentColor;color:var(--default-icon);font-size:inherit}.ll-icon svg{height:1em;width:1em}.ll-icon__header{color:pink}.ll-icon--primary{color:green}.ll-icon--primary.is-disable{color:#ff0}.ll-table{display:flex;position:relative;flex-direction:column;justify-content:space-between;height:100%}.ll-table--fixed-height{flex:1;height:calc(100% - 126px)}.ll-table--fixed-height .ant-table-wrapper{height:100%}.ll-table--fixed-height .ant-table-wrapper .ant-spin-container,.ll-table--fixed-height .ant-table-wrapper .ant-spin-nested-loading,.ll-table--fixed-height .ant-table-wrapper .ant-table,.ll-table--fixed-height .ant-table-wrapper .ant-table-content{height:100%}.ll-table--fixed-height .ant-table-wrapper .ant-table-container{display:flex;flex-direction:column;justify-content:space-between;height:100%}.ll-table--fixed-height .ant-table-wrapper .ant-table-body{flex:1}.ll-table--empty table{height:100%}.ll-table--empty table .ant-table-tbody{height:100%}.ll-table--empty table .ant-table-placeholder{height:100%}.ll-table--empty table .ant-table-placeholder .ant-table-cell{border:none!important}.ll-table__header-wrapper{margin-bottom:20px}.ll-table__header{display:flex;justify-content:space-between;align-items:center}.ll-table__header-right{display:flex;justify-content:space-between;align-items:center}.ll-table__header-menu-icon{display:flex;align-items:center}.ll-table__header-menu-icon:hover{border-color:var(--radio-hover-border-color)}.ll-table__header-menu-icon:hover .ll-icon{color:var(--radio-hover-color)}.ll-table__header-menu-radio-group{height:36px;display:flex;margin-left:20px}.ll-table__header-menu-radio-group .ant-radio-button-wrapper{display:flex;align-items:center;height:100%;padding:0 12px}.ll-table__header-menu-radio-group .ant-radio-button-wrapper :nth-child(2){display:flex;align-items:center}.ll-table__header-menu-radio-group .ant-radio-button-wrapper-checked{border-color:var(--radio-active-border-color)}.ll-table__header-menu-radio-group .ant-radio-button-wrapper-checked .svg-icon{color:var(--radio-active-color)}.ll-table__main-content .table-serial-number-cell{width:50px}.ll-table__main-content table{table-layout:fixed}.ll-table__main-content table .ant-table-tbody .ant-table-cell{color:var(--color-text-base)}.ll-table__main-content .table-operate-cell{width:120px}.ll-table__operate{display:flex;align-items:center}.ll-table__setting-icon{display:flex;align-items:center;justify-content:center;width:36px;padding:0;margin-left:20px;background-color:transparent;border:none}.ll-table__setting-popover{display:flex;flex-direction:column;width:280px}.ll-table__setting-popover .ant-checkbox{margin-right:2px}.ll-table__setting-popover-header{display:flex;align-items:center;justify-content:space-between;padding:12px 17px 12px 42px;border-bottom:1px solid var(--color-fill-secondary)}.ll-table__setting-reset-btn{color:var(--color-primary);cursor:pointer}.ll-table__setting-popover-content{flex:1;padding:0 0 10px;overflow:hidden;border-bottom:1px solid var(--color-fill-secondary)}.ll-table__setting-popover-content>div{height:100%;max-height:250px;padding:0 10px;overflow-y:auto}.ll-table__setting-popover-content>div>div{padding-top:10px}.ll-table__setting-popover-menu{display:flex;align-items:center;justify-content:space-between;height:34px}.ll-table__setting-popover-menu:hover{background:#f4f4f4;border-radius:6px}.ll-table__setting-popover-menu .ant-divider{margin:0 5px;background-color:var(--color-fill-secondary)}.ll-table__setting-popover-menu button:hover{background-color:transparent!important}.ll-table__setting-popover-menu-left{display:flex;align-items:center}.ll-table__setting-popover-menu-right{display:flex;align-items:center}.ll-table__setting-popover-menu-fixed-icon{color:var(--color-primary-active)!important}.ll-table__setting-popover-menu-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px;margin:0;text-align:center;border-radius:2px!important}.ll-table__setting-popover-menu-icon .icon{color:var(--color-primary)}.ll-table__setting-popover-menu-icon:hover .icon{color:var(--color-primary-hover)}.ll-table__setting-popover-menu-icon:active .icon{color:var(--color-primary-active)}.ll-table__pagination{display:flex;align-items:center;justify-content:flex-end;height:50px}.ll-table__pagination .ant-pagination-total-text{line-height:32px}