twcpt 0.0.2

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 (61) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +189 -0
  3. package/dist/charts-CKv8I1ye.js +879 -0
  4. package/dist/charts-DIdINgA4.cjs +1 -0
  5. package/dist/charts.cjs.js +1 -0
  6. package/dist/charts.css +1 -0
  7. package/dist/charts.d.ts +7 -0
  8. package/dist/charts.es.js +9 -0
  9. package/dist/components/j-ch-bar/index.d.ts +50 -0
  10. package/dist/components/j-ch-bar/types.d.ts +42 -0
  11. package/dist/components/j-ch-bar-line/index.d.ts +49 -0
  12. package/dist/components/j-ch-bar-line/types.d.ts +42 -0
  13. package/dist/components/j-ch-bubble/index.d.ts +54 -0
  14. package/dist/components/j-ch-bubble/types.d.ts +51 -0
  15. package/dist/components/j-ch-line/index.d.ts +57 -0
  16. package/dist/components/j-ch-line/types.d.ts +42 -0
  17. package/dist/components/j-ch-pie-doughnut/index.d.ts +60 -0
  18. package/dist/components/j-ch-pie-doughnut/types.d.ts +55 -0
  19. package/dist/components/j-ch-radar/index.d.ts +49 -0
  20. package/dist/components/j-ch-radar/types.d.ts +42 -0
  21. package/dist/components/j-tw-btn/index.d.ts +606 -0
  22. package/dist/components/j-tw-btn/types.d.ts +104 -0
  23. package/dist/composables/useI18n.d.ts +12 -0
  24. package/dist/global.d.ts +75 -0
  25. package/dist/i18n/en-US/index.d.ts +90 -0
  26. package/dist/i18n/index.d.ts +10 -0
  27. package/dist/i18n/zh-CN/index.d.ts +90 -0
  28. package/dist/index-BrYPwI7i.cjs +1 -0
  29. package/dist/index-C5mRo5Yi.cjs +1 -0
  30. package/dist/index-DsQ7r9Ci.js +76 -0
  31. package/dist/index-s5XCGtM9.js +76 -0
  32. package/dist/index.css +1 -0
  33. package/dist/index.d.ts +68 -0
  34. package/dist/resolver.cjs +1 -0
  35. package/dist/resolver.d.ts +2 -0
  36. package/dist/resolver.mjs +36 -0
  37. package/dist/twcpt-styles.css +1 -0
  38. package/dist/twcpt-styles.d.ts +1 -0
  39. package/dist/twcpt-styles.js +1 -0
  40. package/dist/twcpt.cjs.js +1 -0
  41. package/dist/twcpt.es.js +2003 -0
  42. package/dist/types.d.ts +27 -0
  43. package/dist/utils/chart.d.ts +28 -0
  44. package/dist/utils/custom-svg.d.ts +3 -0
  45. package/dist/utils/helper/array.d.ts +289 -0
  46. package/dist/utils/helper/dom.d.ts +281 -0
  47. package/dist/utils/helper/index.d.ts +11 -0
  48. package/dist/utils/helper/number.d.ts +250 -0
  49. package/dist/utils/helper/object.d.ts +240 -0
  50. package/dist/utils/helper/perf.d.ts +231 -0
  51. package/dist/utils/helper/regex.d.ts +265 -0
  52. package/dist/utils/helper/string.d.ts +248 -0
  53. package/dist/utils/helper/url.d.ts +259 -0
  54. package/dist/utils/icon-map.d.ts +19 -0
  55. package/dist/utils/init.d.ts +35 -0
  56. package/dist/utils/resolver.d.ts +34 -0
  57. package/dist/utils/storage.d.ts +3 -0
  58. package/dist/utils/storageSync.d.ts +20 -0
  59. package/dist/utils/tool.d.ts +103 -0
  60. package/dist/utils/website-config.d.ts +15 -0
  61. package/package.json +90 -0
@@ -0,0 +1,104 @@
1
+ import { DefineComponent } from 'vue';
2
+ /** 按钮尺寸常量 */
3
+ export declare const JTWBtnSize: {
4
+ readonly LARGE: "large";
5
+ readonly NORMAL: "normal";
6
+ readonly SMALL: "small";
7
+ };
8
+ /** 按钮类型常量 */
9
+ export declare const JTWBtnType: {
10
+ readonly PRIMARY: "primary";
11
+ readonly SECONDARY: "secondary";
12
+ readonly TEXT: "text";
13
+ };
14
+ /** 按钮尺寸类型 */
15
+ export type JTWBtnSizeType = (typeof JTWBtnSize)[keyof typeof JTWBtnSize];
16
+ /** 按钮类型类型 */
17
+ export type JTWBtnTypeType = (typeof JTWBtnType)[keyof typeof JTWBtnType];
18
+ /** Tooltip 配置 */
19
+ export interface JTWBtnTooltipConfig {
20
+ /** 弹出位置,默认 'top' */
21
+ placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
22
+ /** 主题,默认 'dark' */
23
+ effect?: 'dark' | 'light';
24
+ /** 触发方式,默认 'hover' */
25
+ trigger?: 'hover' | 'click' | 'focus' | 'contextmenu';
26
+ /** 是否显示箭头,默认 true */
27
+ showArrow?: boolean;
28
+ /** 延迟显示(毫秒),默认 0 */
29
+ openDelay?: number;
30
+ /** 延迟隐藏(毫秒),默认 200 */
31
+ closeDelay?: number;
32
+ /** 偏移量(像素),默认 5 */
33
+ offset?: number;
34
+ }
35
+ /**
36
+ * @description JTWBtn 按钮组件(基于 Element Plus)
37
+ */
38
+ export interface JTWBtnProps {
39
+ /**
40
+ * 按钮尺寸
41
+ * @default 'large'
42
+ * @values 'large' | 'normal' | 'small'
43
+ */
44
+ size?: JTWBtnSizeType;
45
+ /**
46
+ * 按钮类型
47
+ * @default 'primary'
48
+ * @values 'primary' | 'secondary' | 'text'
49
+ */
50
+ type?: JTWBtnTypeType;
51
+ /**
52
+ * 按钮文本
53
+ * @default ''
54
+ */
55
+ label?: string;
56
+ /**
57
+ * 是否加载中
58
+ * @default false
59
+ */
60
+ loading?: boolean;
61
+ /**
62
+ * Tooltip 提示文字
63
+ * @default ''
64
+ */
65
+ tips?: string | number;
66
+ /**
67
+ * Tooltip 配置
68
+ */
69
+ tooltipConfig?: JTWBtnTooltipConfig;
70
+ }
71
+ /** JTWBtn Emits 接口 */
72
+ export interface JTWBtnEmits {
73
+ (e: 'click', event: MouseEvent): void;
74
+ }
75
+ /** JTWBtn Slots 接口 */
76
+ export interface JTWBtnSlots {
77
+ /** 默认插槽,按钮文本内容 */
78
+ default?: () => any;
79
+ /** 图标插槽 */
80
+ icon?: () => any;
81
+ /** 自定义加载图标插槽 */
82
+ loading?: () => any;
83
+ }
84
+ /** JTWBtn 暴露的方法 */
85
+ export interface JTWBtnExpose {
86
+ /** 按钮根元素 */
87
+ $el: HTMLElement | undefined;
88
+ /** 触发点击 */
89
+ click: () => void;
90
+ }
91
+ /** Emits 配置对象格式 */
92
+ export type JTWBtnEmitsOptions = {
93
+ click: (e: MouseEvent) => true;
94
+ };
95
+ /** JTWBtn 组件类型定义 */
96
+ export type JTWBtnComponent = DefineComponent<JTWBtnProps, JTWBtnExpose, {}, {}, {}, {}, {}, JTWBtnEmitsOptions>;
97
+ /** JTWBtn 实例类型 */
98
+ export type JTWBtnInstance = InstanceType<JTWBtnComponent> & JTWBtnExpose;
99
+ /** JTWBtn 模板 Props(用于全局类型声明) */
100
+ export interface JTWBtnTemplateProps extends JTWBtnProps {
101
+ onClick?: (event: MouseEvent) => void;
102
+ class?: string | Record<string, boolean> | Array<string | Record<string, boolean>>;
103
+ style?: string | Record<string, string>;
104
+ }
@@ -0,0 +1,12 @@
1
+ import { Ref } from 'vue';
2
+ import { Locale } from '../i18n';
3
+ export type { Locale };
4
+ export declare function t(key: string, variables?: Record<string, any>): string;
5
+ export declare function setLocale(locale: Locale): Promise<void>;
6
+ export declare function getLocale(): Locale;
7
+ export declare function useI18n(): {
8
+ t: typeof t;
9
+ locale: Ref<Locale, Locale>;
10
+ setLocale: typeof setLocale;
11
+ getLocale: typeof getLocale;
12
+ };
@@ -0,0 +1,75 @@
1
+ import { JChBarProps, JChBarSlots } from './components/j-ch-bar/types';
2
+ import { JChBarLineProps, JChBarLineSlots } from './components/j-ch-bar-line/types';
3
+ import { JChBubbleProps, JChBubbleSlots } from './components/j-ch-bubble/types';
4
+ import { JChLineProps, JChLineSlots } from './components/j-ch-line/types';
5
+ import { JChPieDoughnutProps, JChPieDoughnutSlots } from './components/j-ch-pie-doughnut/types';
6
+ import { JChRadarProps, JChRadarSlots } from './components/j-ch-radar/types';
7
+ import { JTWBtnTemplateProps, JTWBtnSlots, JTWBtnEmits } from './components/j-tw-btn/types';
8
+ declare module 'vue' {
9
+ export interface GlobalComponents {
10
+ /**
11
+ * JChBar - JChBar 组件
12
+ */
13
+ JChBar: new () => {
14
+ $props: JChBarProps;
15
+ $slots: JChBarSlots;
16
+ $emit: {};
17
+ };
18
+
19
+ /**
20
+ * JChBarLine - JChBarLine 组件
21
+ */
22
+ JChBarLine: new () => {
23
+ $props: JChBarLineProps;
24
+ $slots: JChBarLineSlots;
25
+ $emit: {};
26
+ };
27
+
28
+ /**
29
+ * JChBubble - JChBubble 组件
30
+ */
31
+ JChBubble: new () => {
32
+ $props: JChBubbleProps;
33
+ $slots: JChBubbleSlots;
34
+ $emit: {};
35
+ };
36
+
37
+ /**
38
+ * JChLine - JChLine 组件
39
+ */
40
+ JChLine: new () => {
41
+ $props: JChLineProps;
42
+ $slots: JChLineSlots;
43
+ $emit: {};
44
+ };
45
+
46
+ /**
47
+ * JChPieDoughnut - JChPieDoughnut 组件
48
+ */
49
+ JChPieDoughnut: new () => {
50
+ $props: JChPieDoughnutProps;
51
+ $slots: JChPieDoughnutSlots;
52
+ $emit: {};
53
+ };
54
+
55
+ /**
56
+ * JChRadar - JChRadar 组件
57
+ */
58
+ JChRadar: new () => {
59
+ $props: JChRadarProps;
60
+ $slots: JChRadarSlots;
61
+ $emit: {};
62
+ };
63
+
64
+ /**
65
+ * JTWBtn - JTWBtn 按钮组件(基于 Element Plus)
66
+ */
67
+ JTWBtn: new () => {
68
+ $props: JTWBtnTemplateProps;
69
+ $slots: JTWBtnSlots;
70
+ $emit: JTWBtnEmits;
71
+ };
72
+ }
73
+ }
74
+
75
+ export {};
@@ -0,0 +1,90 @@
1
+ declare const _default: {
2
+ action: {
3
+ confirm: string;
4
+ cancel: string;
5
+ query: string;
6
+ reset: string;
7
+ expandAll: string;
8
+ collapseAll: string;
9
+ viewAll: string;
10
+ loading: string;
11
+ add: string;
12
+ update: string;
13
+ delete: string;
14
+ detail: string;
15
+ addNewItem: string;
16
+ };
17
+ table: {
18
+ action: string;
19
+ };
20
+ messages: {
21
+ success: string;
22
+ error: string;
23
+ pleaseEnter: string;
24
+ pleasePressEnterEnter: string;
25
+ pleaseSelect: string;
26
+ noData: string;
27
+ date: {
28
+ start: string;
29
+ end: string;
30
+ confirm: string;
31
+ hour: string;
32
+ minute: string;
33
+ second: string;
34
+ scrollTooltip: string;
35
+ };
36
+ loading: string;
37
+ formRules: {
38
+ required: string;
39
+ arrMaxLength: string;
40
+ percentageInvalid: string;
41
+ over0: string;
42
+ less100: string;
43
+ addressInvalid: string;
44
+ emailInvalid: string;
45
+ invalidPort: string;
46
+ rangeInt: string;
47
+ rangeNumber: string;
48
+ invalidInput: string;
49
+ alreadyExists: string;
50
+ positiveInt: string;
51
+ nonNegativeInt: string;
52
+ duplicateItemNotAllowed: string;
53
+ maxLengthExceeded: string;
54
+ phoneInvalid: string;
55
+ idCardInvalid: string;
56
+ bankCardInvalid: string;
57
+ carNumberInvalid: string;
58
+ urlInvalid: string;
59
+ ipInvalid: string;
60
+ ipv6Invalid: string;
61
+ qqInvalid: string;
62
+ wechatInvalid: string;
63
+ postcodeInvalid: string;
64
+ chineseOnly: string;
65
+ mustContainChinese: string;
66
+ numberOnly: string;
67
+ numericOnly: string;
68
+ macInvalid: string;
69
+ hexColorInvalid: string;
70
+ };
71
+ jQFile: {
72
+ click_or_drag_file: string;
73
+ file_type_is: string;
74
+ max_file_size: string;
75
+ unsupportFileFormat: string;
76
+ maxFileSizeIs: string;
77
+ };
78
+ pagination: {
79
+ pieces_page: string;
80
+ goto: string;
81
+ total: string;
82
+ };
83
+ inputRecognize: {
84
+ maxItems: string;
85
+ noValidItems: string;
86
+ recognized: string;
87
+ };
88
+ };
89
+ };
90
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export type Locale = 'zh-CN' | 'en-US';
2
+ export interface I18nMessages {
3
+ action: {
4
+ confirm: string;
5
+ cancel: string;
6
+ };
7
+ }
8
+ export declare const loadLocaleMessages: (locale: Locale) => Promise<I18nMessages>;
9
+ export declare const getMessages: (locale: Locale) => Promise<I18nMessages>;
10
+ export declare const messages: Record<Locale, I18nMessages>;
@@ -0,0 +1,90 @@
1
+ declare const _default: {
2
+ action: {
3
+ confirm: string;
4
+ cancel: string;
5
+ query: string;
6
+ reset: string;
7
+ expandAll: string;
8
+ collapseAll: string;
9
+ viewAll: string;
10
+ loading: string;
11
+ add: string;
12
+ update: string;
13
+ delete: string;
14
+ detail: string;
15
+ addNewItem: string;
16
+ };
17
+ table: {
18
+ action: string;
19
+ };
20
+ messages: {
21
+ success: string;
22
+ error: string;
23
+ pleaseEnter: string;
24
+ pleasePressEnterEnter: string;
25
+ pleaseSelect: string;
26
+ noData: string;
27
+ date: {
28
+ start: string;
29
+ end: string;
30
+ confirm: string;
31
+ hour: string;
32
+ minute: string;
33
+ second: string;
34
+ scrollTooltip: string;
35
+ };
36
+ loading: string;
37
+ formRules: {
38
+ required: string;
39
+ arrMaxLength: string;
40
+ percentageInvalid: string;
41
+ over0: string;
42
+ less100: string;
43
+ addressInvalid: string;
44
+ emailInvalid: string;
45
+ invalidPort: string;
46
+ rangeInt: string;
47
+ rangeNumber: string;
48
+ invalidInput: string;
49
+ alreadyExists: string;
50
+ positiveInt: string;
51
+ nonNegativeInt: string;
52
+ duplicateItemNotAllowed: string;
53
+ maxLengthExceeded: string;
54
+ phoneInvalid: string;
55
+ idCardInvalid: string;
56
+ bankCardInvalid: string;
57
+ carNumberInvalid: string;
58
+ urlInvalid: string;
59
+ ipInvalid: string;
60
+ ipv6Invalid: string;
61
+ qqInvalid: string;
62
+ wechatInvalid: string;
63
+ postcodeInvalid: string;
64
+ chineseOnly: string;
65
+ mustContainChinese: string;
66
+ numberOnly: string;
67
+ numericOnly: string;
68
+ macInvalid: string;
69
+ hexColorInvalid: string;
70
+ };
71
+ jQFile: {
72
+ click_or_drag_file: string;
73
+ file_type_is: string;
74
+ max_file_size: string;
75
+ unsupportFileFormat: string;
76
+ maxFileSizeIs: string;
77
+ };
78
+ pagination: {
79
+ pieces_page: string;
80
+ goto: string;
81
+ total: string;
82
+ };
83
+ inputRecognize: {
84
+ maxItems: string;
85
+ noValidItems: string;
86
+ recognized: string;
87
+ };
88
+ };
89
+ };
90
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={action:{confirm:"Confirm",cancel:"Cancel",query:"Query",reset:"Reset",expandAll:"Expand",collapseAll:"Collapse",viewAll:"View All",loading:"Loading...",add:"Add",update:"Edit",delete:"Delete",detail:"Detail",addNewItem:"Add New Item"},table:{action:"Action"},messages:{success:"Operation successful",error:"Operation failed",pleaseEnter:"Please enter",pleasePressEnterEnter:"Please press Enter to enter",pleaseSelect:"Please select",noData:"No data",date:{start:"Start Date",end:"End Date",confirm:"Confirm",hour:"Hour",minute:"Minute",second:"Second",scrollTooltip:"You can scroll the mouse wheel to change the time value"},loading:"Loading...",formRules:{required:"Required",arrMaxLength:"Select up to {max} items",percentageInvalid:"Enter a valid percentage (0-100)",over0:"Value must be greater than 0%",less100:"Value must be less than 100%",addressInvalid:"Invalid format, e.g. {example}",emailInvalid:"Invalid email address",invalidPort:"Invalid port number",rangeInt:"Value must be an integer between {min} and {max}",rangeNumber:"Value must be between {min} and {max}",invalidInput:"Invalid input",alreadyExists:"Already exists",positiveInt:"Value must be a positive integer",nonNegativeInt:"Value must be a non-negative integer",duplicateItemNotAllowed:"Duplicate item not allowed, {value} already exists",maxLengthExceeded:"Maximum {max} items allowed",phoneInvalid:"Invalid phone number",idCardInvalid:"Invalid ID card number",bankCardInvalid:"Invalid bank card number",carNumberInvalid:"Invalid license plate number",urlInvalid:"Invalid URL address",ipInvalid:"Invalid IP address",ipv6Invalid:"Invalid IPv6 address",qqInvalid:"Invalid QQ number",wechatInvalid:"Invalid WeChat ID",postcodeInvalid:"Invalid postal code",chineseOnly:"Chinese characters only",mustContainChinese:"Must contain Chinese characters",numberOnly:"Numbers only",numericOnly:"Numeric values only (decimals allowed)",macInvalid:"Invalid MAC address",hexColorInvalid:"Invalid hex color format"},jQFile:{click_or_drag_file:"Click to upload",file_type_is:"Supported file types: {type}",max_file_size:"Maximum file size: {size}",unsupportFileFormat:"Unsupported file format",maxFileSizeIs:"Maximum file size: {max} MB"},pagination:{pieces_page:"Pieces/page",goto:"Goto",total:"Total {total} items"},inputRecognize:{maxItems:"Maximum {max} items",noValidItems:"No valid items recognized",recognized:"Recognized"}}};exports.default=e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={action:{confirm:"确认",cancel:"取消",query:"搜索",reset:"重置",expandAll:"展开",collapseAll:"收起",viewAll:"查看全部",loading:"加载中...",add:"新增",update:"编辑",delete:"删除",detail:"详情",addNewItem:"添加新项"},table:{action:"操作"},messages:{success:"操作成功",error:"操作失败",pleaseEnter:"请输入",pleasePressEnterEnter:"请按回车键确认",pleaseSelect:"请选择",noData:"无数据",date:{start:"起始时间",end:"结束时间",confirm:"确认",hour:"时",minute:"分",second:"秒",scrollTooltip:"可以滚动鼠标滚轮改变时间值"},loading:"加载中...",formRules:{required:"必填",arrMaxLength:"最多选择 {max} 项",percentageInvalid:"请输入有效的百分比(0-100)",over0:"值必须大于 0%",less100:"值必须小于 100%",addressInvalid:"格式不正确,例如:{example}",emailInvalid:"邮箱格式不正确",invalidPort:"端口号格式不正确",rangeInt:"值必须是 {min} 到 {max} 之间的整数",rangeNumber:"值必须在 {min} 到 {max} 之间",invalidInput:"无效输入",alreadyExists:"已存在",positiveInt:"值必须是正整数",nonNegativeInt:"值必须是非负整数",duplicateItemNotAllowed:"不允许重复项,{value} 已存在",maxLengthExceeded:"最多添加 {max} 项",phoneInvalid:"手机号格式不正确",idCardInvalid:"身份证号格式不正确",bankCardInvalid:"银行卡号格式不正确",carNumberInvalid:"车牌号格式不正确",urlInvalid:"URL 地址格式不正确",ipInvalid:"IP 地址格式不正确",ipv6Invalid:"IPv6 地址格式不正确",qqInvalid:"QQ 号格式不正确",wechatInvalid:"微信号格式不正确",postcodeInvalid:"邮政编码格式不正确",chineseOnly:"只能输入中文",mustContainChinese:"必须包含中文",numberOnly:"只能输入数字",numericOnly:"只能输入数字(可包含小数)",macInvalid:"MAC 地址格式不正确",hexColorInvalid:"十六进制颜色格式不正确"},jQFile:{click_or_drag_file:"点击或拖拽文件到此处上传",file_type_is:"支持的文件类型: {type}",max_file_size:"最大文件大小: {size}",unsupportFileFormat:"不支持的文件格式",maxFileSizeIs:"最大文件大小为 {max} MB"},pagination:{pieces_page:"条/页",goto:"跳转",total:"共 {total} 条"},inputRecognize:{maxItems:"最多识别 {max} 项",noValidItems:"未识别到有效项",recognized:"已识别"}}};exports.default=e;
@@ -0,0 +1,76 @@
1
+ const e = {
2
+ action: {
3
+ confirm: "Confirm",
4
+ cancel: "Cancel",
5
+ query: "Query",
6
+ reset: "Reset",
7
+ expandAll: "Expand",
8
+ collapseAll: "Collapse",
9
+ viewAll: "View All",
10
+ loading: "Loading...",
11
+ add: "Add",
12
+ update: "Edit",
13
+ delete: "Delete",
14
+ detail: "Detail",
15
+ addNewItem: "Add New Item"
16
+ },
17
+ table: {
18
+ action: "Action"
19
+ },
20
+ messages: {
21
+ success: "Operation successful",
22
+ error: "Operation failed",
23
+ pleaseEnter: "Please enter",
24
+ pleasePressEnterEnter: "Please press Enter to enter",
25
+ pleaseSelect: "Please select",
26
+ noData: "No data",
27
+ date: { start: "Start Date", end: "End Date", confirm: "Confirm", hour: "Hour", minute: "Minute", second: "Second", scrollTooltip: "You can scroll the mouse wheel to change the time value" },
28
+ loading: "Loading...",
29
+ formRules: {
30
+ required: "Required",
31
+ arrMaxLength: "Select up to {max} items",
32
+ percentageInvalid: "Enter a valid percentage (0-100)",
33
+ over0: "Value must be greater than 0%",
34
+ less100: "Value must be less than 100%",
35
+ addressInvalid: "Invalid format, e.g. {example}",
36
+ emailInvalid: "Invalid email address",
37
+ invalidPort: "Invalid port number",
38
+ rangeInt: "Value must be an integer between {min} and {max}",
39
+ rangeNumber: "Value must be between {min} and {max}",
40
+ invalidInput: "Invalid input",
41
+ alreadyExists: "Already exists",
42
+ positiveInt: "Value must be a positive integer",
43
+ nonNegativeInt: "Value must be a non-negative integer",
44
+ duplicateItemNotAllowed: "Duplicate item not allowed, {value} already exists",
45
+ maxLengthExceeded: "Maximum {max} items allowed",
46
+ phoneInvalid: "Invalid phone number",
47
+ idCardInvalid: "Invalid ID card number",
48
+ bankCardInvalid: "Invalid bank card number",
49
+ carNumberInvalid: "Invalid license plate number",
50
+ urlInvalid: "Invalid URL address",
51
+ ipInvalid: "Invalid IP address",
52
+ ipv6Invalid: "Invalid IPv6 address",
53
+ qqInvalid: "Invalid QQ number",
54
+ wechatInvalid: "Invalid WeChat ID",
55
+ postcodeInvalid: "Invalid postal code",
56
+ chineseOnly: "Chinese characters only",
57
+ mustContainChinese: "Must contain Chinese characters",
58
+ numberOnly: "Numbers only",
59
+ numericOnly: "Numeric values only (decimals allowed)",
60
+ macInvalid: "Invalid MAC address",
61
+ hexColorInvalid: "Invalid hex color format"
62
+ },
63
+ jQFile: {
64
+ click_or_drag_file: "Click to upload",
65
+ file_type_is: "Supported file types: {type}",
66
+ max_file_size: "Maximum file size: {size}",
67
+ unsupportFileFormat: "Unsupported file format",
68
+ maxFileSizeIs: "Maximum file size: {max} MB"
69
+ },
70
+ pagination: { pieces_page: "Pieces/page", goto: "Goto", total: "Total {total} items" },
71
+ inputRecognize: { maxItems: "Maximum {max} items", noValidItems: "No valid items recognized", recognized: "Recognized" }
72
+ }
73
+ };
74
+ export {
75
+ e as default
76
+ };
@@ -0,0 +1,76 @@
1
+ const e = {
2
+ action: {
3
+ confirm: "确认",
4
+ cancel: "取消",
5
+ query: "搜索",
6
+ reset: "重置",
7
+ expandAll: "展开",
8
+ collapseAll: "收起",
9
+ viewAll: "查看全部",
10
+ loading: "加载中...",
11
+ add: "新增",
12
+ update: "编辑",
13
+ delete: "删除",
14
+ detail: "详情",
15
+ addNewItem: "添加新项"
16
+ },
17
+ table: {
18
+ action: "操作"
19
+ },
20
+ messages: {
21
+ success: "操作成功",
22
+ error: "操作失败",
23
+ pleaseEnter: "请输入",
24
+ pleasePressEnterEnter: "请按回车键确认",
25
+ pleaseSelect: "请选择",
26
+ noData: "无数据",
27
+ date: { start: "起始时间", end: "结束时间", confirm: "确认", hour: "时", minute: "分", second: "秒", scrollTooltip: "可以滚动鼠标滚轮改变时间值" },
28
+ loading: "加载中...",
29
+ formRules: {
30
+ required: "必填",
31
+ arrMaxLength: "最多选择 {max} 项",
32
+ percentageInvalid: "请输入有效的百分比(0-100)",
33
+ over0: "值必须大于 0%",
34
+ less100: "值必须小于 100%",
35
+ addressInvalid: "格式不正确,例如:{example}",
36
+ emailInvalid: "邮箱格式不正确",
37
+ invalidPort: "端口号格式不正确",
38
+ rangeInt: "值必须是 {min} 到 {max} 之间的整数",
39
+ rangeNumber: "值必须在 {min} 到 {max} 之间",
40
+ invalidInput: "无效输入",
41
+ alreadyExists: "已存在",
42
+ positiveInt: "值必须是正整数",
43
+ nonNegativeInt: "值必须是非负整数",
44
+ duplicateItemNotAllowed: "不允许重复项,{value} 已存在",
45
+ maxLengthExceeded: "最多添加 {max} 项",
46
+ phoneInvalid: "手机号格式不正确",
47
+ idCardInvalid: "身份证号格式不正确",
48
+ bankCardInvalid: "银行卡号格式不正确",
49
+ carNumberInvalid: "车牌号格式不正确",
50
+ urlInvalid: "URL 地址格式不正确",
51
+ ipInvalid: "IP 地址格式不正确",
52
+ ipv6Invalid: "IPv6 地址格式不正确",
53
+ qqInvalid: "QQ 号格式不正确",
54
+ wechatInvalid: "微信号格式不正确",
55
+ postcodeInvalid: "邮政编码格式不正确",
56
+ chineseOnly: "只能输入中文",
57
+ mustContainChinese: "必须包含中文",
58
+ numberOnly: "只能输入数字",
59
+ numericOnly: "只能输入数字(可包含小数)",
60
+ macInvalid: "MAC 地址格式不正确",
61
+ hexColorInvalid: "十六进制颜色格式不正确"
62
+ },
63
+ jQFile: {
64
+ click_or_drag_file: "点击或拖拽文件到此处上传",
65
+ file_type_is: "支持的文件类型: {type}",
66
+ max_file_size: "最大文件大小: {size}",
67
+ unsupportFileFormat: "不支持的文件格式",
68
+ maxFileSizeIs: "最大文件大小为 {max} MB"
69
+ },
70
+ pagination: { pieces_page: "条/页", goto: "跳转", total: "共 {total} 条" },
71
+ inputRecognize: { maxItems: "最多识别 {max} 项", noValidItems: "未识别到有效项", recognized: "已识别" }
72
+ }
73
+ };
74
+ export {
75
+ e as default
76
+ };
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ .j-tw-btn[data-v-5a2d1e3c]{border-radius:4px;font-weight:400;letter-spacing:0;transition:background-color .2s,border-color .2s,color .2s}.j-tw-btn.j-tw-btn--large[data-v-5a2d1e3c]{height:34px;padding:0 16px;font-size:14px}.j-tw-btn.j-tw-btn--normal[data-v-5a2d1e3c]{height:28px;padding:0 12px;font-size:12px}.j-tw-btn.j-tw-btn--small[data-v-5a2d1e3c]{height:24px;padding:0 8px;font-size:12px}.j-tw-btn.j-tw-btn--primary[data-v-5a2d1e3c]{--el-button-bg-color: var(--j-color-primary);--el-button-border-color: var(--j-color-primary);--el-button-text-color: var(--j-color-white);--el-button-hover-bg-color: color-mix(in srgb, var(--j-color-primary) 85%, white);--el-button-hover-border-color: color-mix(in srgb, var(--j-color-primary) 85%, white);--el-button-hover-text-color: var(--j-color-white);--el-button-active-bg-color: color-mix(in srgb, var(--j-color-primary) 90%, black);--el-button-active-border-color: color-mix(in srgb, var(--j-color-primary) 90%, black);--el-button-active-text-color: var(--j-color-white);--el-button-disabled-bg-color: color-mix(in srgb, var(--j-color-primary) 50%, white);--el-button-disabled-border-color: color-mix(in srgb, var(--j-color-primary) 50%, white);--el-button-disabled-text-color: var(--j-color-white)}.j-tw-btn.j-tw-btn--secondary[data-v-5a2d1e3c]{--el-button-bg-color: var(--j-color-white);--el-button-border-color: var(--j-color-grey-light);--el-button-text-color: var(--j-color-dark-strong);--el-button-hover-bg-color: var(--j-color-grey-lighter);--el-button-hover-border-color: var(--j-color-grey-medium);--el-button-hover-text-color: var(--j-color-dark);--el-button-active-bg-color: var(--j-color-grey-light);--el-button-active-border-color: var(--j-color-grey);--el-button-active-text-color: var(--j-color-dark-strong);--el-button-disabled-bg-color: var(--j-color-dark-lighter);--el-button-disabled-border-color: var(--j-color-grey-light);--el-button-disabled-text-color: var(--j-color-grey)}.j-tw-btn.j-tw-btn--text[data-v-5a2d1e3c]{--el-button-bg-color: transparent;--el-button-border-color: transparent;--el-button-text-color: var(--j-color-primary);--el-button-hover-bg-color: var(--j-color-blue-light);--el-button-hover-border-color: transparent;--el-button-hover-text-color: var(--j-color-primary);--el-button-active-bg-color: color-mix(in srgb, var(--j-color-blue-light) 80%, var(--j-color-primary));--el-button-active-border-color: transparent;--el-button-active-text-color: var(--j-color-primary);--el-button-disabled-bg-color: transparent;--el-button-disabled-border-color: transparent;--el-button-disabled-text-color: var(--j-color-grey)}
@@ -0,0 +1,68 @@
1
+ /// <reference path="./global.d.ts" />
2
+ import { default as JTWBtn } from './components/j-tw-btn/index';
3
+ export { JChBar, JChBarLine, JChBubble, JChLine, JChPieDoughnut, JChRadar } from './charts';
4
+ export { twcptInit, PAGE_PERMISSION_KEY, PAGE_ACTION_PERMISSION_KEY } from './utils/init';
5
+ export type { TWcptInitOptions, ColorConfig } from './utils/init';
6
+ export { twcptIconMapFn, composeIconMapFn } from './utils/icon-map';
7
+ export type { IconMapFn } from './utils/icon-map';
8
+ export { usePagePermissionSync, usePageActionPermissionSync } from './utils/storageSync';
9
+ export { twcptResolver, twcptResolverWithOptions } from './utils/resolver';
10
+ export type { TwcptResolverOptions } from './utils/resolver';
11
+ export { useI18n, setLocale, getLocale, t } from './composables/useI18n';
12
+ export type { Locale } from './i18n';
13
+ import * as toolUtils from './utils/tool';
14
+ import * as arrayUtils from './utils/helper/array';
15
+ import * as domUtils from './utils/helper/dom';
16
+ import * as numberUtils from './utils/helper/number';
17
+ import * as objectUtils from './utils/helper/object';
18
+ import * as perfUtils from './utils/helper/perf';
19
+ import * as regexUtils from './utils/helper/regex';
20
+ import * as stringUtils from './utils/helper/string';
21
+ import * as urlUtils from './utils/helper/url';
22
+ export declare const jqTool: {
23
+ array: typeof arrayUtils;
24
+ dom: typeof domUtils;
25
+ number: typeof numberUtils;
26
+ object: typeof objectUtils;
27
+ perf: typeof perfUtils;
28
+ regex: typeof regexUtils;
29
+ string: typeof stringUtils;
30
+ url: typeof urlUtils;
31
+ defaultFill(val: any): any;
32
+ formatSize(options: {
33
+ maxUnit?: "B" | "KB" | "MB" | "GB" | "TB";
34
+ numberFormatOptions?: Intl.NumberFormatOptions;
35
+ size: number;
36
+ unit?: "B" | "KB" | "MB" | "GB" | "TB";
37
+ }): string;
38
+ getUpperSize(sizeUnit: {
39
+ size: number;
40
+ unit?: "B" | "KB" | "MB" | "GB" | "TB";
41
+ }, options?: {
42
+ maxUnit?: "B" | "KB" | "MB" | "GB" | "TB";
43
+ }): {
44
+ size: number;
45
+ unit: "B" | "KB" | "MB" | "GB" | "TB";
46
+ };
47
+ defaultFormat(customFormatter?: (val: any, row: any) => string | number, fallbackValue?: string): (val: any, row: any) => any;
48
+ formatDate(dateInput: toolUtils.DateInput, formatString?: toolUtils.DateFormatString): string;
49
+ defaultDateFormat(formatString?: toolUtils.DateFormatString, fallbackValue?: string): (val: toolUtils.DateInput | null | undefined, _row: any) => string;
50
+ defaultDataFormat(fallbackValue?: string, options?: {
51
+ digits?: number;
52
+ unit?: "B" | "KB" | "MB" | "GB" | "TB";
53
+ }): (val: any, row: any) => any;
54
+ defaultAutoDataFormat(fallbackValue?: string, options?: {
55
+ digits?: number;
56
+ unit?: "B" | "KB" | "MB" | "GB" | "TB";
57
+ }): (val: any, row: any) => any;
58
+ convertDataUnit(value: number | string, fromUnit: "B" | "KB" | "MB" | "GB" | "TB", toUnit: "B" | "KB" | "MB" | "GB" | "TB", options?: {
59
+ digits?: number;
60
+ showUnit?: boolean;
61
+ }): string | number;
62
+ setTitleAndLogo: typeof toolUtils.setTitleAndLogo;
63
+ getTitle: typeof toolUtils.getTitle;
64
+ getNavLogo: typeof toolUtils.getNavLogo;
65
+ };
66
+ export type { JQToolType } from './types';
67
+ export type { JTWBtnSize, JTWBtnType, JTWBtnSizeType, JTWBtnTypeType, JTWBtnTooltipConfig, JTWBtnProps, JTWBtnEmits, JTWBtnSlots, JTWBtnExpose, JTWBtnComponent, JTWBtnInstance, JTWBtnTemplateProps, } from './components/j-tw-btn/types';
68
+ export { JTWBtn, };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(){return{type:"component",resolve:e=>{if(e.match(/^(JTW|JC|JCh)[A-Z]/)){const t=e;return{name:t,from:"twcpt",sideEffects:t.startsWith("JCh")?["twcpt/charts"]:void 0}}}}}function i(e={}){const{exclude:t=[],prefix:r=""}=e;return{type:"component",resolve:c=>{const o=r?c.replace(new RegExp(`^${r}`),""):c;if(!(t.includes(o)||t.includes(c))&&o.match(/^(JTW|JC|JCh)[A-Z]/)){const n=o;return{name:n,from:"twcpt",sideEffects:n.startsWith("JCh")?["twcpt/charts"]:void 0}}}}}exports.twcptResolver=s;exports.twcptResolverWithOptions=i;
@@ -0,0 +1,2 @@
1
+ export * from './utils/resolver'
2
+ export {}
@@ -0,0 +1,36 @@
1
+ function s() {
2
+ return {
3
+ type: "component",
4
+ resolve: (e) => {
5
+ if (e.match(/^(JTW|JC|JCh)[A-Z]/)) {
6
+ const t = e;
7
+ return {
8
+ name: t,
9
+ from: "twcpt",
10
+ sideEffects: t.startsWith("JCh") ? ["twcpt/charts"] : void 0
11
+ };
12
+ }
13
+ }
14
+ };
15
+ }
16
+ function p(e = {}) {
17
+ const { exclude: t = [], prefix: o = "" } = e;
18
+ return {
19
+ type: "component",
20
+ resolve: (c) => {
21
+ const n = o ? c.replace(new RegExp(`^${o}`), "") : c;
22
+ if (!(t.includes(n) || t.includes(c)) && n.match(/^(JTW|JC|JCh)[A-Z]/)) {
23
+ const r = n;
24
+ return {
25
+ name: r,
26
+ from: "twcpt",
27
+ sideEffects: r.startsWith("JCh") ? ["twcpt/charts"] : void 0
28
+ };
29
+ }
30
+ }
31
+ };
32
+ }
33
+ export {
34
+ s as twcptResolver,
35
+ p as twcptResolverWithOptions
36
+ };