@yoka-ui/ui 1.0.4 → 1.0.6
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/@Docs-yoka/exports.generated.md +68 -63
- package/README.md +44 -15
- package/dist/es/business/AiChat/index.js.map +1 -1
- package/dist/es/business/AiChat/intentRecognizer.js.map +1 -1
- package/dist/es/business/AiChat/navigationManager.js +6 -6
- package/dist/es/business/AiChat/navigationManager.js.map +2 -2
- package/dist/es/business/DrawerPageInfo/index.js +2 -2
- package/dist/es/business/DrawerPageInfo/index.js.map +2 -2
- package/dist/es/business/Editor/index.d.ts +1 -1
- package/dist/es/business/Editor/index.js.map +2 -2
- package/dist/es/business/Empty/index.js +1 -1
- package/dist/es/business/Empty/index.js.map +1 -1
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js +3 -3
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
- package/dist/es/business/ModCommonFilter/index.d.ts +1 -1
- package/dist/es/business/ModCommonFilter/index.js.map +2 -2
- package/dist/es/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.js +178 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.js.map +7 -0
- package/dist/es/business/YkLoginModule/index.d.ts +48 -0
- package/dist/es/business/YkLoginModule/index.js +198 -0
- package/dist/es/business/YkLoginModule/index.js.map +7 -0
- package/dist/es/business/YkLoginModule/styles.module.less +169 -0
- package/dist/es/business/YkPorjectSelect/index.d.ts +1 -1
- package/dist/es/business/YkPorjectSelect/index.js +2 -2
- package/dist/es/business/YkPorjectSelect/index.js.map +2 -2
- package/dist/es/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
- package/dist/es/business/YkSqlEdit/index.d.ts +20 -0
- package/dist/es/business/YkSqlEdit/index.js +180 -0
- package/dist/es/business/YkSqlEdit/index.js.map +7 -0
- package/dist/es/business/YkSqlEdit/sql-language.d.ts +11 -0
- package/dist/es/business/YkSqlEdit/sql-language.js +1460 -0
- package/dist/es/business/YkSqlEdit/sql-language.js.map +7 -0
- package/dist/es/components/DebounceInput/index.js.map +2 -2
- package/dist/es/components/MultipleSelect/index.d.ts +14 -0
- package/dist/es/components/MultipleSelect/index.js +1 -1
- package/dist/es/components/MultipleSelect/index.js.map +2 -2
- package/dist/es/components/RefreshButton/index.js.map +2 -2
- package/dist/es/components/SearchWithHistory/index.js +1 -1
- package/dist/es/components/SearchWithHistory/index.js.map +2 -2
- package/dist/es/components/TextWithToolTip/index.d.ts +1 -1
- package/dist/es/components/TextWithToolTip/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/index.d.ts +1 -24
- package/dist/es/components/TreeTransfer/index.js +8 -8
- package/dist/es/components/TreeTransfer/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/utils/index.d.ts +1 -1
- package/dist/es/components/TreeTransfer/utils/index.js.map +2 -2
- package/dist/es/components/YkDateRangePicker/index.d.ts +1 -1
- package/dist/es/components/YkDateRangePicker/index.js +1 -1
- package/dist/es/components/YkDateRangePicker/index.js.map +2 -2
- package/dist/es/components/YkDateRangePicker/index.module.less +2 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +60 -9
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +3 -3
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/index.d.ts +4 -4
- package/dist/es/components/YkRangeDateWithVS/index.js +2 -3
- package/dist/es/components/YkRangeDateWithVS/index.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/index.module.less +23 -4
- package/dist/es/components/YkRangeTimeWithRecent/index.d.ts +1 -18
- package/dist/es/components/YkRangeTimeWithRecent/index.js +27 -7
- package/dist/es/components/YkRangeTimeWithRecent/index.js.map +2 -2
- package/dist/es/creative/ArcCheckbox/index.d.ts +12 -0
- package/dist/es/creative/ArcCheckbox/index.js +49 -0
- package/dist/es/creative/ArcCheckbox/index.js.map +7 -0
- package/dist/es/creative/ArcCheckbox/index.module.less +102 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.js.map +1 -1
- package/dist/es/creative/ButtonWithProgress/index.d.ts +1 -1
- package/dist/es/creative/ButtonWithProgress/index.js.map +2 -2
- package/dist/es/creative/GlassSegmentedRadio/index.d.ts +24 -0
- package/dist/es/creative/GlassSegmentedRadio/index.js +75 -0
- package/dist/es/creative/GlassSegmentedRadio/index.js.map +7 -0
- package/dist/es/creative/GlassSegmentedRadio/index.module.less +241 -0
- package/dist/es/index.d.ts +32 -26
- package/dist/es/index.js +90 -82
- package/dist/es/index.js.map +2 -2
- package/dist/es/index.less +5 -1
- package/dist/es/layout/FlexGrid/index.d.ts +1 -1
- package/dist/es/layout/FlexGrid/index.js.map +2 -2
- package/dist/es/layout/YkContainer/index.js.map +1 -1
- package/dist/es/layout/YkDrawer/index.d.ts +1 -1
- package/dist/es/layout/YkDrawer/index.js +2 -1
- package/dist/es/layout/YkDrawer/index.js.map +2 -2
- package/dist/es/ui/LabelSelect/demo.js +1 -1
- package/dist/es/ui/LabelSelect/demo.js.map +2 -2
- package/dist/es/ui/LabelSelect/index.d.ts +1 -1
- package/dist/es/ui/LabelSelect/index.js +1 -1
- package/dist/es/ui/LabelSelect/index.js.map +2 -2
- package/dist/es/ui/LogicOperator/index.d.ts +1 -1
- package/dist/es/ui/LogicOperator/index.js.map +2 -2
- package/dist/es/ui/YkButton/index.d.ts +1 -1
- package/dist/es/ui/YkButton/index.js.map +2 -2
- package/dist/es/ui/YkCard/index.d.ts +1 -1
- package/dist/es/ui/YkCard/index.js +1 -1
- package/dist/es/ui/YkCard/index.js.map +2 -2
- package/dist/es/ui/YkCheckbox/index.d.ts +1 -1
- package/dist/es/ui/YkCheckbox/index.js.map +2 -2
- package/dist/es/ui/YkDescriptions/index.d.ts +1 -1
- package/dist/es/ui/YkDescriptions/index.js.map +2 -2
- package/dist/es/ui/YkPagination/index.d.ts +1 -1
- package/dist/es/ui/YkPagination/index.js.map +2 -2
- package/dist/es/ui/YkRadio/index.d.ts +1 -1
- package/dist/es/ui/YkRadio/index.js.map +2 -2
- package/dist/es/ui/YkSegmented/index.d.ts +1 -1
- package/dist/es/ui/YkSegmented/index.js.map +2 -2
- package/dist/es/ui/YkSelect/index.d.ts +1 -1
- package/dist/es/ui/YkSelect/index.js.map +2 -2
- package/dist/es/ui/YkSpin/index.d.ts +1 -1
- package/dist/es/ui/YkSpin/index.js.map +2 -2
- package/dist/es/ui/YkStatistic/index.d.ts +1 -1
- package/dist/es/ui/YkStatistic/index.js.map +2 -2
- package/dist/es/ui/YkSwitch/index.d.ts +1 -1
- package/dist/es/ui/YkSwitch/index.js.map +2 -2
- package/dist/es/ui/YkTabs/index.d.ts +1 -1
- package/dist/es/ui/YkTabs/index.js.map +2 -2
- package/dist/es/ui/YkTooltip/index.d.ts +1 -1
- package/dist/es/ui/YkTooltip/index.js.map +2 -2
- package/dist/es/utils/styleUtils.js.map +2 -2
- package/dist/es/utils/ykStorybookDoc.js +1 -1
- package/dist/es/utils/ykStorybookDoc.js.map +1 -1
- package/dist/lib/business/AiChat/index.js.map +1 -1
- package/dist/lib/business/AiChat/intentRecognizer.js.map +1 -1
- package/dist/lib/business/AiChat/navigationManager.js +6 -6
- package/dist/lib/business/AiChat/navigationManager.js.map +2 -2
- package/dist/lib/business/DrawerPageInfo/index.js +1 -1
- package/dist/lib/business/DrawerPageInfo/index.js.map +2 -2
- package/dist/lib/business/Editor/index.d.ts +1 -1
- package/dist/lib/business/Editor/index.js.map +2 -2
- package/dist/lib/business/Empty/index.js +1 -1
- package/dist/lib/business/Empty/index.js.map +1 -1
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js +3 -3
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js +4 -4
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js +3 -3
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
- package/dist/lib/business/ModCommonFilter/index.d.ts +1 -1
- package/dist/lib/business/ModCommonFilter/index.js.map +2 -2
- package/dist/lib/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.js +171 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.js.map +7 -0
- package/dist/lib/business/YkLoginModule/index.d.ts +48 -0
- package/dist/lib/business/YkLoginModule/index.js +206 -0
- package/dist/lib/business/YkLoginModule/index.js.map +7 -0
- package/dist/lib/business/YkLoginModule/styles.module.less +169 -0
- package/dist/lib/business/YkPorjectSelect/index.d.ts +1 -1
- package/dist/lib/business/YkPorjectSelect/index.js +3 -3
- package/dist/lib/business/YkPorjectSelect/index.js.map +2 -2
- package/dist/lib/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
- package/dist/lib/business/YkSqlEdit/index.d.ts +20 -0
- package/dist/lib/business/YkSqlEdit/index.js +202 -0
- package/dist/lib/business/YkSqlEdit/index.js.map +7 -0
- package/dist/lib/business/YkSqlEdit/sql-language.d.ts +11 -0
- package/dist/lib/business/YkSqlEdit/sql-language.js +1493 -0
- package/dist/lib/business/YkSqlEdit/sql-language.js.map +7 -0
- package/dist/lib/components/DebounceInput/index.js.map +2 -2
- package/dist/lib/components/MultipleSelect/index.d.ts +14 -0
- package/dist/lib/components/MultipleSelect/index.js +1 -1
- package/dist/lib/components/MultipleSelect/index.js.map +2 -2
- package/dist/lib/components/RefreshButton/index.js.map +2 -2
- package/dist/lib/components/SearchWithHistory/index.js +1 -1
- package/dist/lib/components/SearchWithHistory/index.js.map +2 -2
- package/dist/lib/components/TextWithToolTip/index.d.ts +1 -1
- package/dist/lib/components/TextWithToolTip/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/index.d.ts +1 -24
- package/dist/lib/components/TreeTransfer/index.js +3 -3
- package/dist/lib/components/TreeTransfer/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/utils/index.d.ts +1 -1
- package/dist/lib/components/TreeTransfer/utils/index.js.map +2 -2
- package/dist/lib/components/YkDateRangePicker/index.d.ts +1 -1
- package/dist/lib/components/YkDateRangePicker/index.js +1 -1
- package/dist/lib/components/YkDateRangePicker/index.js.map +2 -2
- package/dist/lib/components/YkDateRangePicker/index.module.less +2 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +59 -8
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +3 -3
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/index.d.ts +4 -4
- package/dist/lib/components/YkRangeDateWithVS/index.js +4 -5
- package/dist/lib/components/YkRangeDateWithVS/index.js.map +3 -3
- package/dist/lib/components/YkRangeDateWithVS/index.module.less +23 -4
- package/dist/lib/components/YkRangeTimeWithRecent/index.d.ts +1 -18
- package/dist/lib/components/YkRangeTimeWithRecent/index.js +27 -7
- package/dist/lib/components/YkRangeTimeWithRecent/index.js.map +2 -2
- package/dist/lib/creative/ArcCheckbox/index.d.ts +12 -0
- package/dist/lib/creative/ArcCheckbox/index.js +50 -0
- package/dist/lib/creative/ArcCheckbox/index.js.map +7 -0
- package/dist/lib/creative/ArcCheckbox/index.module.less +102 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.js.map +1 -1
- package/dist/lib/creative/ButtonWithProgress/index.d.ts +1 -1
- package/dist/lib/creative/ButtonWithProgress/index.js.map +2 -2
- package/dist/lib/creative/GlassSegmentedRadio/index.d.ts +24 -0
- package/dist/lib/creative/GlassSegmentedRadio/index.js +78 -0
- package/dist/lib/creative/GlassSegmentedRadio/index.js.map +7 -0
- package/dist/lib/creative/GlassSegmentedRadio/index.module.less +241 -0
- package/dist/lib/index.d.ts +32 -26
- package/dist/lib/index.js +37 -25
- package/dist/lib/index.js.map +2 -2
- package/dist/lib/index.less +5 -1
- package/dist/lib/layout/FlexGrid/index.d.ts +1 -1
- package/dist/lib/layout/FlexGrid/index.js.map +2 -2
- package/dist/lib/layout/YkContainer/index.js.map +1 -1
- package/dist/lib/layout/YkDrawer/index.d.ts +1 -1
- package/dist/lib/layout/YkDrawer/index.js +2 -1
- package/dist/lib/layout/YkDrawer/index.js.map +2 -2
- package/dist/lib/ui/LabelSelect/demo.js +1 -1
- package/dist/lib/ui/LabelSelect/demo.js.map +2 -2
- package/dist/lib/ui/LabelSelect/index.d.ts +1 -1
- package/dist/lib/ui/LabelSelect/index.js +1 -1
- package/dist/lib/ui/LabelSelect/index.js.map +2 -2
- package/dist/lib/ui/LogicOperator/index.d.ts +1 -1
- package/dist/lib/ui/LogicOperator/index.js.map +2 -2
- package/dist/lib/ui/YkButton/index.d.ts +1 -1
- package/dist/lib/ui/YkButton/index.js.map +2 -2
- package/dist/lib/ui/YkCard/index.d.ts +1 -1
- package/dist/lib/ui/YkCard/index.js.map +2 -2
- package/dist/lib/ui/YkCheckbox/index.d.ts +1 -1
- package/dist/lib/ui/YkCheckbox/index.js.map +2 -2
- package/dist/lib/ui/YkDescriptions/index.d.ts +1 -1
- package/dist/lib/ui/YkDescriptions/index.js.map +2 -2
- package/dist/lib/ui/YkPagination/index.d.ts +1 -1
- package/dist/lib/ui/YkPagination/index.js.map +2 -2
- package/dist/lib/ui/YkRadio/index.d.ts +1 -1
- package/dist/lib/ui/YkRadio/index.js.map +2 -2
- package/dist/lib/ui/YkSegmented/index.d.ts +1 -1
- package/dist/lib/ui/YkSegmented/index.js.map +2 -2
- package/dist/lib/ui/YkSelect/index.d.ts +1 -1
- package/dist/lib/ui/YkSelect/index.js.map +2 -2
- package/dist/lib/ui/YkSpin/index.d.ts +1 -1
- package/dist/lib/ui/YkSpin/index.js.map +2 -2
- package/dist/lib/ui/YkStatistic/index.d.ts +1 -1
- package/dist/lib/ui/YkStatistic/index.js.map +2 -2
- package/dist/lib/ui/YkSwitch/index.d.ts +1 -1
- package/dist/lib/ui/YkSwitch/index.js.map +2 -2
- package/dist/lib/ui/YkTabs/index.d.ts +1 -1
- package/dist/lib/ui/YkTabs/index.js.map +2 -2
- package/dist/lib/ui/YkTooltip/index.d.ts +1 -1
- package/dist/lib/ui/YkTooltip/index.js.map +2 -2
- package/dist/lib/utils/styleUtils.js.map +2 -2
- package/dist/lib/utils/ykStorybookDoc.js +1 -1
- package/dist/lib/utils/ykStorybookDoc.js.map +1 -1
- package/package.json +43 -45
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
.codeMirrorCustom {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
border: 0.5px solid #ecedf1;
|
|
5
|
+
|
|
6
|
+
&.disabled {
|
|
7
|
+
:global {
|
|
8
|
+
.cm-activeLine,
|
|
9
|
+
.cm-activeLineGutter {
|
|
10
|
+
background-color: transparent !important;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// CodeMirror 语法高亮样式覆盖
|
|
16
|
+
:global {
|
|
17
|
+
color: #888d9d;
|
|
18
|
+
// 关键字 - 蓝色
|
|
19
|
+
.ͼb {
|
|
20
|
+
color: #997bbf !important;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 类型名 - 紫色
|
|
25
|
+
.ͼi {
|
|
26
|
+
color: #997bbf !important;
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 字符串 - 绿色
|
|
31
|
+
.ͼc,
|
|
32
|
+
.ͼf,
|
|
33
|
+
.ͼe {
|
|
34
|
+
color: #9dbd93 !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// 数字 - 橙色
|
|
38
|
+
.ͼd {
|
|
39
|
+
color: #e57271 !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 注释 - 灰色
|
|
43
|
+
.ͼm {
|
|
44
|
+
color: #999999 !important;
|
|
45
|
+
font-style: italic;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 变量名 - 黑色
|
|
49
|
+
.ͼg {
|
|
50
|
+
color: #000000 !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 表名、列名 - 深绿色
|
|
54
|
+
.ͼh {
|
|
55
|
+
color: #006633 !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.cm-dynamic-param {
|
|
59
|
+
color: #4484d2 !important;
|
|
60
|
+
|
|
61
|
+
.ͼi,
|
|
62
|
+
.ͼb,
|
|
63
|
+
.ͼc,
|
|
64
|
+
.ͼd,
|
|
65
|
+
.ͼe,
|
|
66
|
+
.ͼf,
|
|
67
|
+
.ͼg,
|
|
68
|
+
.ͼh {
|
|
69
|
+
color: #4484d2 !important;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// 自定义关键词高亮样式
|
|
76
|
+
:global {
|
|
77
|
+
.cm-custom-keyword {
|
|
78
|
+
color: #997bbf !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.cm-editor {
|
|
82
|
+
outline: none !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.cm-activeLine {
|
|
86
|
+
background-color: rgb(204 238 255 / 60%) !important;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// 确保自定义关键词在语法高亮之上
|
|
90
|
+
.cm-editor .cm-line .cm-custom-keyword {
|
|
91
|
+
position: relative;
|
|
92
|
+
z-index: 10;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:global {
|
|
97
|
+
.cm-scroller {
|
|
98
|
+
font-size: 12px;
|
|
99
|
+
background-color: #f9fbfc;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.cm-gutters {
|
|
103
|
+
background-color: #f6f6f9 !important;
|
|
104
|
+
border: none !important;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cm-gutterElement {
|
|
108
|
+
color: #999 !important;
|
|
109
|
+
|
|
110
|
+
span[title='Fold line'] {
|
|
111
|
+
display: inline-block;
|
|
112
|
+
transform: translateY(-5px);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.cm-tooltip {
|
|
117
|
+
padding: 10px !important;
|
|
118
|
+
background-color: #fff !important;
|
|
119
|
+
border: none !important;
|
|
120
|
+
border-radius: 4px !important;
|
|
121
|
+
box-shadow: 0 0 10px 0 rgba(154, 153, 153, 0.2);
|
|
122
|
+
|
|
123
|
+
.cm-completionLabel {
|
|
124
|
+
color: #666 !important;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.cm-completionMatchedText {
|
|
128
|
+
color: #ff9600 !important;
|
|
129
|
+
text-decoration: none !important;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.cm-tooltip-autocomplete ul li {
|
|
134
|
+
display: flex !important;
|
|
135
|
+
margin-bottom: 5px !important;
|
|
136
|
+
line-height: 30px !important;
|
|
137
|
+
border-radius: 4px !important;
|
|
138
|
+
|
|
139
|
+
.cm-completionDetail {
|
|
140
|
+
margin-left: auto !important;
|
|
141
|
+
padding-right: 10px !important;
|
|
142
|
+
color: #999 !important;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.cm-tooltip.cm-tooltip-autocomplete > ul {
|
|
147
|
+
max-height: 220px !important;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.cm-tooltip-autocomplete ul li[aria-selected] {
|
|
151
|
+
background-color: #f1f8ff !important;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactCodeMirrorRef } from '@uiw/react-codemirror';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type SqlDialectType } from './sql-language';
|
|
4
|
+
export type YkSqlEditProps = {
|
|
5
|
+
value: string;
|
|
6
|
+
previewValue?: string;
|
|
7
|
+
preview?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
height?: string;
|
|
10
|
+
width?: string;
|
|
11
|
+
onChange: (value: string) => void;
|
|
12
|
+
datasourceType?: SqlDialectType;
|
|
13
|
+
keywordOptions?: {
|
|
14
|
+
keywords: string[];
|
|
15
|
+
functions: string[];
|
|
16
|
+
};
|
|
17
|
+
dataTestId?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const YkSqlEdit: React.ForwardRefExoticComponent<YkSqlEditProps & React.RefAttributes<ReactCodeMirrorRef>>;
|
|
20
|
+
export default YkSqlEdit;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/business/YkSqlEdit/index.tsx
|
|
30
|
+
var YkSqlEdit_exports = {};
|
|
31
|
+
__export(YkSqlEdit_exports, {
|
|
32
|
+
default: () => YkSqlEdit_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(YkSqlEdit_exports);
|
|
35
|
+
var import_autocomplete = require("@codemirror/autocomplete");
|
|
36
|
+
var import_lang_sql = require("@codemirror/lang-sql");
|
|
37
|
+
var import_view = require("@codemirror/view");
|
|
38
|
+
var import_react_codemirror = __toESM(require("@uiw/react-codemirror"));
|
|
39
|
+
var import_react = __toESM(require("react"));
|
|
40
|
+
var import_code_mirror_custom_module = __toESM(require("./code-mirror-custom.module.less"));
|
|
41
|
+
var import_sql_language = require("./sql-language");
|
|
42
|
+
function dynamicParamHighlighter() {
|
|
43
|
+
return import_view.ViewPlugin.fromClass(
|
|
44
|
+
class {
|
|
45
|
+
constructor(view) {
|
|
46
|
+
this.decorations = this.buildDecorations(view);
|
|
47
|
+
}
|
|
48
|
+
update(update) {
|
|
49
|
+
if (update.docChanged || update.viewportChanged) {
|
|
50
|
+
this.decorations = this.buildDecorations(update.view);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
buildDecorations(view) {
|
|
54
|
+
const widgets = [];
|
|
55
|
+
const regex = /\{\{.*?\}\}/g;
|
|
56
|
+
for (const { from, to } of view.visibleRanges) {
|
|
57
|
+
const text = view.state.doc.sliceString(from, to);
|
|
58
|
+
let match;
|
|
59
|
+
while ((match = regex.exec(text)) !== null) {
|
|
60
|
+
const start = from + match.index;
|
|
61
|
+
const end = start + match[0].length;
|
|
62
|
+
widgets.push(import_view.Decoration.mark({ class: "cm-dynamic-param" }).range(start, end));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return import_view.Decoration.set(widgets, true);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
decorations: (v) => v.decorations
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function customKeywordHighlighter(allKeywords) {
|
|
74
|
+
return import_view.ViewPlugin.fromClass(
|
|
75
|
+
class {
|
|
76
|
+
constructor(view) {
|
|
77
|
+
this.decorations = this.buildDecorations(view);
|
|
78
|
+
}
|
|
79
|
+
update(update) {
|
|
80
|
+
if (update.docChanged || update.viewportChanged) {
|
|
81
|
+
this.decorations = this.buildDecorations(update.view);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
buildDecorations(view) {
|
|
85
|
+
if (!allKeywords.length)
|
|
86
|
+
return import_view.Decoration.none;
|
|
87
|
+
const widgets = [];
|
|
88
|
+
const regex = new RegExp(`\\b(${allKeywords.join("|")})\\b`, "gi");
|
|
89
|
+
for (const { from, to } of view.visibleRanges) {
|
|
90
|
+
const text = view.state.doc.sliceString(from, to);
|
|
91
|
+
let match;
|
|
92
|
+
while ((match = regex.exec(text)) !== null) {
|
|
93
|
+
const start = from + match.index;
|
|
94
|
+
const end = start + match[0].length;
|
|
95
|
+
widgets.push(
|
|
96
|
+
import_view.Decoration.mark({
|
|
97
|
+
class: "cm-custom-keyword",
|
|
98
|
+
attributes: { "data-keyword": match[0] }
|
|
99
|
+
}).range(start, end)
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return import_view.Decoration.set(widgets, true);
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
decorations: (v) => v.decorations
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
function buildCompletions(keywordOptions) {
|
|
112
|
+
const keywords = (keywordOptions == null ? void 0 : keywordOptions.keywords) ?? [];
|
|
113
|
+
const functions = (keywordOptions == null ? void 0 : keywordOptions.functions) ?? [];
|
|
114
|
+
const allKeywords = [.../* @__PURE__ */ new Set([...keywords, ...functions])];
|
|
115
|
+
return (context) => {
|
|
116
|
+
const word = context.matchBefore(/\w*/);
|
|
117
|
+
if ((word == null ? void 0 : word.from) === (word == null ? void 0 : word.to) && !context.explicit)
|
|
118
|
+
return null;
|
|
119
|
+
const search = ((word == null ? void 0 : word.text) ?? "").toLowerCase();
|
|
120
|
+
const options = allKeywords.filter((kw) => kw.toLowerCase().includes(search)).map((kw) => ({
|
|
121
|
+
label: kw,
|
|
122
|
+
detail: keywords.includes(kw) ? "关键字" : functions.includes(kw) ? "函数" : "",
|
|
123
|
+
boost: kw.toLowerCase().startsWith(search) ? 10 : 1
|
|
124
|
+
})).sort((a, b) => (b.boost ?? 0) - (a.boost ?? 0));
|
|
125
|
+
return {
|
|
126
|
+
from: (word == null ? void 0 : word.from) ?? 0,
|
|
127
|
+
options: options.slice(0, 50)
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
var YkSqlEdit = import_react.default.forwardRef((props, ref) => {
|
|
132
|
+
const {
|
|
133
|
+
value,
|
|
134
|
+
previewValue,
|
|
135
|
+
preview,
|
|
136
|
+
placeholder = "请输入查询语句",
|
|
137
|
+
height = "100%",
|
|
138
|
+
width = "100%",
|
|
139
|
+
onChange,
|
|
140
|
+
datasourceType,
|
|
141
|
+
keywordOptions,
|
|
142
|
+
dataTestId = "native-query-editor"
|
|
143
|
+
} = props;
|
|
144
|
+
const resolvedKeywordOptions = import_react.default.useMemo(() => {
|
|
145
|
+
if (keywordOptions)
|
|
146
|
+
return keywordOptions;
|
|
147
|
+
if (!datasourceType)
|
|
148
|
+
return { keywords: [], functions: [] };
|
|
149
|
+
return {
|
|
150
|
+
keywords: (0, import_sql_language.sqlKeywords)(datasourceType),
|
|
151
|
+
functions: (0, import_sql_language.sqlFunctions)(datasourceType)
|
|
152
|
+
};
|
|
153
|
+
}, [datasourceType, keywordOptions]);
|
|
154
|
+
const allKeywords = import_react.default.useMemo(() => {
|
|
155
|
+
const keywords = resolvedKeywordOptions.keywords ?? [];
|
|
156
|
+
const functions = resolvedKeywordOptions.functions ?? [];
|
|
157
|
+
return [.../* @__PURE__ */ new Set([...keywords, ...functions])];
|
|
158
|
+
}, [resolvedKeywordOptions]);
|
|
159
|
+
const customCompletions = import_react.default.useMemo(() => buildCompletions(resolvedKeywordOptions), [resolvedKeywordOptions]);
|
|
160
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
161
|
+
import_react_codemirror.default,
|
|
162
|
+
{
|
|
163
|
+
ref,
|
|
164
|
+
value: preview ? previewValue ?? value : value,
|
|
165
|
+
className: `${import_code_mirror_custom_module.default.codeMirrorCustom} ${preview ? import_code_mirror_custom_module.default.disabled : ""}`,
|
|
166
|
+
"data-testid": dataTestId,
|
|
167
|
+
placeholder,
|
|
168
|
+
height,
|
|
169
|
+
width,
|
|
170
|
+
editable: !preview,
|
|
171
|
+
autoCorrect: "off",
|
|
172
|
+
extensions: [
|
|
173
|
+
(0, import_lang_sql.sql)({ dialect: import_lang_sql.MySQL }),
|
|
174
|
+
dynamicParamHighlighter(),
|
|
175
|
+
customKeywordHighlighter(allKeywords),
|
|
176
|
+
(0, import_autocomplete.autocompletion)({
|
|
177
|
+
override: [customCompletions]
|
|
178
|
+
})
|
|
179
|
+
],
|
|
180
|
+
onChange: (next) => onChange(next),
|
|
181
|
+
basicSetup: {
|
|
182
|
+
closeBrackets: true,
|
|
183
|
+
autocompletion: true,
|
|
184
|
+
bracketMatching: true,
|
|
185
|
+
highlightSpecialChars: true,
|
|
186
|
+
searchKeymap: true,
|
|
187
|
+
history: true,
|
|
188
|
+
historyKeymap: true,
|
|
189
|
+
drawSelection: true,
|
|
190
|
+
syntaxHighlighting: true,
|
|
191
|
+
defaultKeymap: true,
|
|
192
|
+
dropCursor: true,
|
|
193
|
+
highlightSelectionMatches: true,
|
|
194
|
+
completionKeymap: true,
|
|
195
|
+
highlightActiveLineGutter: true
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
});
|
|
200
|
+
YkSqlEdit.displayName = "YkSqlEdit";
|
|
201
|
+
var YkSqlEdit_default = YkSqlEdit;
|
|
202
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/YkSqlEdit/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import {\n autocompletion,\n type Completion,\n type CompletionContext,\n type CompletionResult,\n} from '@codemirror/autocomplete';\nimport { MySQL, sql } from '@codemirror/lang-sql';\nimport { Decoration, type EditorView, ViewPlugin, type ViewUpdate } from '@codemirror/view';\nimport CodeMirror, { type ReactCodeMirrorRef } from '@uiw/react-codemirror';\nimport React from 'react';\nimport customStyles from './code-mirror-custom.module.less';\nimport { type SqlDialectType, sqlFunctions, sqlKeywords } from './sql-language';\n\nexport type YkSqlEditProps = {\n value: string;\n previewValue?: string;\n preview?: boolean;\n placeholder?: string;\n height?: string;\n width?: string;\n onChange: (value: string) => void;\n\n datasourceType?: SqlDialectType;\n keywordOptions?: {\n keywords: string[];\n functions: string[];\n };\n dataTestId?: string;\n};\n\n// 动态参数高亮插件\nfunction dynamicParamHighlighter() {\n return ViewPlugin.fromClass(\n class {\n decorations;\n constructor(view: EditorView) {\n this.decorations = this.buildDecorations(view);\n }\n update(update: ViewUpdate) {\n if (update.docChanged || update.viewportChanged) {\n this.decorations = this.buildDecorations(update.view);\n }\n }\n buildDecorations(view: EditorView) {\n const widgets = [];\n const regex = /\\{\\{.*?\\}\\}/g;\n for (const { from, to } of view.visibleRanges) {\n const text = view.state.doc.sliceString(from, to);\n let match;\n while ((match = regex.exec(text)) !== null) {\n const start = from + match.index;\n const end = start + match[0].length;\n widgets.push(Decoration.mark({ class: 'cm-dynamic-param' }).range(start, end));\n }\n }\n return Decoration.set(widgets, true);\n }\n },\n {\n decorations: (v) => v.decorations,\n },\n );\n}\n\nfunction customKeywordHighlighter(allKeywords: string[]) {\n return ViewPlugin.fromClass(\n class {\n decorations;\n constructor(view: EditorView) {\n this.decorations = this.buildDecorations(view);\n }\n update(update: ViewUpdate) {\n if (update.docChanged || update.viewportChanged) {\n this.decorations = this.buildDecorations(update.view);\n }\n }\n buildDecorations(view: EditorView) {\n if (!allKeywords.length) return Decoration.none;\n\n const widgets = [];\n const regex = new RegExp(`\\\\b(${allKeywords.join('|')})\\\\b`, 'gi');\n\n for (const { from, to } of view.visibleRanges) {\n const text = view.state.doc.sliceString(from, to);\n let match;\n while ((match = regex.exec(text)) !== null) {\n const start = from + match.index;\n const end = start + match[0].length;\n widgets.push(\n Decoration.mark({\n class: 'cm-custom-keyword',\n attributes: { 'data-keyword': match[0] },\n }).range(start, end),\n );\n }\n }\n return Decoration.set(widgets, true);\n }\n },\n {\n decorations: (v) => v.decorations,\n },\n );\n}\n\nfunction buildCompletions(keywordOptions?: YkSqlEditProps['keywordOptions']) {\n const keywords = keywordOptions?.keywords ?? [];\n const functions = keywordOptions?.functions ?? [];\n const allKeywords = [...new Set([...keywords, ...functions])];\n\n return (context: CompletionContext): CompletionResult | null => {\n const word = context.matchBefore(/\\w*/);\n if (word?.from === word?.to && !context.explicit) return null;\n\n const search = (word?.text ?? '').toLowerCase();\n const options: Completion[] = allKeywords\n .filter((kw) => kw.toLowerCase().includes(search))\n .map((kw) => ({\n label: kw,\n detail: keywords.includes(kw) ? '关键字' : functions.includes(kw) ? '函数' : '',\n boost: kw.toLowerCase().startsWith(search) ? 10 : 1,\n }))\n .sort((a, b) => (b.boost ?? 0) - (a.boost ?? 0));\n\n return {\n from: word?.from ?? 0,\n options: options.slice(0, 50),\n };\n };\n}\n\nconst YkSqlEdit = React.forwardRef<ReactCodeMirrorRef, YkSqlEditProps>((props, ref) => {\n const {\n value,\n previewValue,\n preview,\n placeholder = '请输入查询语句',\n height = '100%',\n width = '100%',\n onChange,\n datasourceType,\n keywordOptions,\n dataTestId = 'native-query-editor',\n } = props;\n\n const resolvedKeywordOptions = React.useMemo(() => {\n if (keywordOptions) return keywordOptions;\n if (!datasourceType) return { keywords: [], functions: [] };\n return {\n keywords: sqlKeywords(datasourceType),\n functions: sqlFunctions(datasourceType),\n };\n }, [datasourceType, keywordOptions]);\n\n const allKeywords = React.useMemo(() => {\n const keywords = resolvedKeywordOptions.keywords ?? [];\n const functions = resolvedKeywordOptions.functions ?? [];\n return [...new Set([...keywords, ...functions])];\n }, [resolvedKeywordOptions]);\n\n const customCompletions = React.useMemo(() => buildCompletions(resolvedKeywordOptions), [resolvedKeywordOptions]);\n\n return (\n <CodeMirror\n ref={ref}\n value={preview ? (previewValue ?? value) : value}\n className={`${customStyles.codeMirrorCustom} ${preview ? customStyles.disabled : ''}`}\n data-testid={dataTestId}\n placeholder={placeholder}\n height={height}\n width={width}\n editable={!preview}\n autoCorrect='off'\n extensions={[\n sql({ dialect: MySQL }),\n dynamicParamHighlighter(),\n customKeywordHighlighter(allKeywords),\n autocompletion({\n override: [customCompletions],\n }),\n ]}\n onChange={(next) => onChange(next)}\n basicSetup={{\n closeBrackets: true,\n autocompletion: true,\n bracketMatching: true,\n highlightSpecialChars: true,\n searchKeymap: true,\n history: true,\n historyKeymap: true,\n drawSelection: true,\n syntaxHighlighting: true,\n defaultKeymap: true,\n dropCursor: true,\n highlightSelectionMatches: true,\n completionKeymap: true,\n highlightActiveLineGutter: true,\n }}\n />\n );\n});\n\nYkSqlEdit.displayName = 'YkSqlEdit';\n\nexport default YkSqlEdit;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAKO;AACP,sBAA2B;AAC3B,kBAAyE;AACzE,8BAAoD;AACpD,mBAAkB;AAClB,uCAAyB;AACzB,0BAA+D;AAoB/D,SAAS,0BAA0B;AACjC,SAAO,uBAAW;AAAA,IAChB,MAAM;AAAA,MAEJ,YAAY,MAAkB;AAC5B,aAAK,cAAc,KAAK,iBAAiB,IAAI;AAAA,MAC/C;AAAA,MACA,OAAO,QAAoB;AACzB,YAAI,OA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BAAyB,WAAW;AAAA,YACpC,oCAAe;AAAA,UACb,UAAU,CAAC,iBAAiB;AAAA,QAC9B,CAAC;AAAA,MACH;AAAA,MACA,UAAU,CAAC,SAAS,SAAS,IAAI;AAAA,MACjC,YAAY;AAAA,QACV,eAAe;AAAA,QACf,gBAAgB;AAAA,QAChB,iBAAiB;AAAA,QACjB,uBAAuB;AAAA,QACvB,cAAc;AAAA,QACd,SAAS;AAAA,QACT,eAAe;AAAA,QACf,eAAe;AAAA,QACf,oBAAoB;AAAA,QACpB,eAAe;AAAA,QACf,YAAY;AAAA,QACZ,2BAA2B;AAAA,QAC3B,kBAAkB;AAAA,QAClB,2BAA2B;AAAA,MAC7B;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,UAAU,cAAc;AAExB,IAAO,oBAAQ;",
|
|
6
|
+
"names": ["React", "CodeMirror", "customStyles"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type SqlDialectType = 'starrocks' | 'impala' | 'hive' | string;
|
|
2
|
+
export declare const defaultKeywords: string[];
|
|
3
|
+
export declare const defaultFunctions: string[];
|
|
4
|
+
export declare const srKeywords: string[];
|
|
5
|
+
export declare const srFunctions: string[];
|
|
6
|
+
export declare const impalaKeywords: string[];
|
|
7
|
+
export declare const impalaFunctions: string[];
|
|
8
|
+
export declare const hiveKeywords: string[];
|
|
9
|
+
export declare const hiveFunctions: string[];
|
|
10
|
+
export declare const sqlKeywords: (type: SqlDialectType) => string[];
|
|
11
|
+
export declare const sqlFunctions: (type: SqlDialectType) => string[];
|