@pisell/materials 1.0.84 → 1.0.86
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/table/Table/fields/text/Show/index.js +4 -1
- package/es/components/translation/index.d.ts +13 -0
- package/es/components/translation/index.js +154 -0
- package/es/components/translation/index.less +15 -0
- package/es/components/translation/utils.d.ts +7 -0
- package/es/components/translation/utils.js +32 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/lib/components/table/Table/fields/text/Show/index.js +4 -1
- package/lib/components/translation/index.d.ts +13 -0
- package/lib/components/translation/index.js +173 -0
- package/lib/components/translation/index.less +15 -0
- package/lib/components/translation/utils.d.ts +7 -0
- package/lib/components/translation/utils.js +55 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lowcode/radio/snippets.ts +1 -0
- package/lowcode/radio.group/meta.ts +6 -1
- package/lowcode/translation/__screenshots__/input-1.png +0 -0
- package/lowcode/translation/meta.ts +186 -0
- package/lowcode/translation/snippets.ts +12 -0
- package/package.json +1 -1
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'Translation',
|
|
6
|
+
title: '多语言输入框',
|
|
7
|
+
category: '表单',
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "Translation",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "",
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'defaultValue',
|
|
22
|
+
title: { label: '默认值', tip: '默认内容' },
|
|
23
|
+
setter: 'JsonSetter',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'value',
|
|
27
|
+
title: { label: '当前值', tip: '当前值' },
|
|
28
|
+
setter: 'JsonSetter'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'bordered',
|
|
32
|
+
title: { label: '显示边框', tip: '是否有边框' },
|
|
33
|
+
propType: 'bool',
|
|
34
|
+
defaultValue: true,
|
|
35
|
+
setter: 'BoolSetter',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'disabled',
|
|
39
|
+
title: { label: '是否禁用', tip: '是否为禁用状态' },
|
|
40
|
+
propType: 'bool',
|
|
41
|
+
defaultValue: false,
|
|
42
|
+
setter: 'BoolSetter',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'placeholder',
|
|
46
|
+
title: { label: '占位提示', tip: '占位提示' },
|
|
47
|
+
propType: 'string',
|
|
48
|
+
defaultValue: '请输入',
|
|
49
|
+
setter: 'PisellI18nSetter'
|
|
50
|
+
},
|
|
51
|
+
// {
|
|
52
|
+
// name: 'id',
|
|
53
|
+
// title: { label: '输入框ID', tip: '输入框的ID' },
|
|
54
|
+
// propType: 'string',
|
|
55
|
+
// },
|
|
56
|
+
{
|
|
57
|
+
name: 'maxLength',
|
|
58
|
+
title: { label: '最大长度', tip: '最大长度' },
|
|
59
|
+
propType: 'number',
|
|
60
|
+
setter: 'NumberSetter',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'size',
|
|
64
|
+
title: { label: '控件大小', tip: '控件大小' },
|
|
65
|
+
setter: {
|
|
66
|
+
componentName: 'RadioGroupSetter',
|
|
67
|
+
props: {
|
|
68
|
+
options: [
|
|
69
|
+
{
|
|
70
|
+
title: '大',
|
|
71
|
+
value: 'large',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: '中',
|
|
75
|
+
value: 'middle',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: '小',
|
|
79
|
+
value: 'small',
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
propType: { type: 'oneOf', value: ['large', 'middle', 'small'] },
|
|
85
|
+
defaultValue: 'middle',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'addonAfter',
|
|
89
|
+
title: { label: '后置标签', tip: '后置标签' },
|
|
90
|
+
propType: { type: 'oneOfType', value: ['string', 'node'] },
|
|
91
|
+
setter: ['PisellI18nSetter', 'SlotSetter']
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'addonBefore',
|
|
95
|
+
title: { label: '前置标签', tip: '前置标签' },
|
|
96
|
+
propType: { type: 'oneOfType', value: ['string', 'node'] },
|
|
97
|
+
setter: ['PisellI18nSetter', 'SlotSetter']
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'prefix',
|
|
101
|
+
title: { label: '前缀', tip: '前缀' },
|
|
102
|
+
propType: { type: 'oneOfType', value: ['string', 'node'] },
|
|
103
|
+
setter: ['PisellI18nSetter', 'SlotSetter']
|
|
104
|
+
},
|
|
105
|
+
// {
|
|
106
|
+
// name: 'suffix',
|
|
107
|
+
// title: { label: '后缀', tip: '后缀' },
|
|
108
|
+
// propType: { type: 'oneOfType', value: ['string', 'node'] },
|
|
109
|
+
// setter: ['PisellI18nSetter', 'SlotSetter']
|
|
110
|
+
// },
|
|
111
|
+
{
|
|
112
|
+
name: 'onChange',
|
|
113
|
+
title: { label: '输入框内容变化时的回调', tip: '输入框内容变化时的回调' },
|
|
114
|
+
propType: 'func',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: 'onPressEnter',
|
|
118
|
+
title: { label: '按下回车的回调', tip: '按下回车的回调' },
|
|
119
|
+
propType: 'func',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'onFocus',
|
|
123
|
+
title: { label: '获取焦点回调', tip: '获取焦点回调' },
|
|
124
|
+
propType: 'func',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'onKeyDown',
|
|
128
|
+
title: { label: '按键按下时的回调', tip: '按键按下时的回调' },
|
|
129
|
+
propType: 'func',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'onKeyPress',
|
|
133
|
+
title: { label: '按键按下后的回调', tip: '按键按下之后释放之前的回调' },
|
|
134
|
+
propType: 'func',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: 'onKeyUp',
|
|
138
|
+
title: { label: '按键释放回调', tip: '按键释放之后的回调' },
|
|
139
|
+
propType: 'func',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'onBlur',
|
|
143
|
+
title: { label: '失去焦点回调', tip: '失去焦点回调' },
|
|
144
|
+
propType: 'func',
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
configure: {
|
|
148
|
+
supports: {
|
|
149
|
+
style: true,
|
|
150
|
+
events: [
|
|
151
|
+
{
|
|
152
|
+
name: 'onChange',
|
|
153
|
+
template:
|
|
154
|
+
"onChange(event,${extParams}){\n// 输入框内容变化时的回调\nconsole.log('onChange',event);}",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'onPressEnter',
|
|
158
|
+
template:
|
|
159
|
+
"onPressEnter(event,${extParams}){\n// 按下回车的回调\nconsole.log('onPressEnter',event);}",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'onFocus',
|
|
163
|
+
template: "onFocus(event,${extParams}){\n// 获取焦点回调\nconsole.log('onFocus',event);}",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'onKeyDown',
|
|
167
|
+
template:
|
|
168
|
+
"onKeyDown(event,${extParams}){\n// 按键按下时的回调\nconsole.log('onKeyDown',event);}",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'onKeyPress',
|
|
172
|
+
template:
|
|
173
|
+
"onKeyPress(event,${extParams}){\n// 按键按下后的回调\nconsole.log('onKeyPress',event);}",
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'onKeyUp',
|
|
177
|
+
template: "onKeyUp(event,${extParams}){\n// 按键释放回调\nconsole.log('onKeyUp',event);}",
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'onBlur',
|
|
181
|
+
template: "onBlur(event,${extParams}){\n// 按键释放回调\nconsole.log('onBlur',event);}",
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.materials-grid{display:flex;flex-direction:column;height:100%;width:100%}.materials-grid-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-header .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-actions .left-wrap{align-items:center;display:flex;flex:1 1}.materials-grid-actions .left-wrap .pisell-lowcode-form-item{margin-bottom:0}.materials-grid-actions .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions .right-wrap .icon{cursor:pointer;transition:.2s}.materials-grid-actions .right-wrap .icon:hover{color:var(--theme-color)}.materials-grid-actions .right-wrap .button{align-items:center;display:flex;font-size:12px;height:28px;justify-content:center}.filter-dropdown-wrap{display:flex;flex-direction:column;max-height:400px;max-width:calc(100vw - 24px);min-width:250px;padding:4px;width:400px}.filter-dropdown-wrap .filter-dropdown-wrap-content{flex:1 1;overflow:auto}.filter-dropdown-wrap .filter-dropdown-drag-item{align-items:center;background:#f9fafb;background:var(--gray-50,#f9fafb);border-radius:8px;display:flex;margin-bottom:12px;padding:8px 12px 12px}.filter-dropdown-wrap .filter-dropdown-drag-item .dots-six-icon{color:#98a2b3;cursor:pointer;font-size:24px}.filter-dropdown-wrap .filter-dropdown-drag-item .pisell-lowcode-form-item{margin-bottom:0}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right{flex:1 1;margin-left:16px}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right .filter-dropdown-drag-item-title{color:#777;color:var(--text-text-2,#777);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.filter-dropdown-container-wrap{border-bottom:1px solid #e2e2e2;border-bottom:1px solid var(--surface-surface-4,#e2e2e2);margin-bottom:20px;min-height:70px}.filter-dropdown-container-wrap:last-child{border:none}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap{align-items:center;color:#919191;color:var(--text-text-3,#919191);display:flex;font-size:16px;font-style:normal;font-weight:600;line-height:22px;margin-bottom:12px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-title{color:#101828;color:var(--gray-900,#101828);font-size:16px;font-style:normal;font-weight:600;line-height:24px;margin-right:6px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-icon-help{color:#98a2b3;color:var(--gray-400,#98a2b3);font-size:20px}.filter-dropdown-container-wrap .filter-dropdown-container-filter-wrap{min-height:80px}.materials-sort-list-empty{color:#5a5a5a;display:block;padding-top:22px;text-align:center}.materials-grid-summary{margin-bottom:16px}.grid-view-table-wrap{position:relative}.materials-grid-paginator{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:center;margin:0!important;padding:0 20px;width:100%}.materials-grid-paginator .pisell-lowcode-pagination-total-text{color:#667085;color:var(--gray-500,#667085);font-size:14px;font-style:normal;font-weight:500;margin-right:auto}.materials-grid-paginator .pisell-lowcode-pagination-item{border:1px solid #d0d5dd;border-radius:0;border-right:0;margin:0;position:relative}.materials-grid-paginator .pisell-lowcode-pagination-jump-next,.materials-grid-paginator .pisell-lowcode-pagination-jump-prev{border:1px solid #d0d5dd;border-radius:0;border-right:none;margin:0}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover .pisell-lowcode-pagination-item-link-icon{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active:hover{border-color:#d0d5dd!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active{background-color:rgba(0,0,0,.06)}.materials-grid-paginator .pisell-lowcode-pagination-item-active a{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-prev{align-items:center;border:1px solid #d0d5dd;border-radius:8px 0 0 8px;border-right:none;display:flex;justify-content:center;margin:0;min-width:auto}.materials-grid-paginator .pisell-lowcode-pagination-next{align-items:center;border:1px solid #d0d5dd;border-radius:0 8px 8px 0;display:flex;justify-content:center;margin:0;min-width:auto}.paginator-page-btn{align-items:center;border-radius:4px 4px 4px 4px;color:#344054;color:var(--gray-700,#344054);cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;padding:10px 16px;transition:.2s;-ms-user-select:none;user-select:none}.paginator-page-btn .paginator-page-btn-text{font-weight:600}.paginator-page-btn .paginator-page-btn-left-icon,.paginator-page-btn .paginator-page-btn-right-icon{font-size:20px}.paginator-page-btn .paginator-page-btn-left-icon{margin-right:8px}.paginator-page-btn .paginator-page-btn-right-icon{margin-left:8px}.paginator-page-btn.left{margin-right:auto}.paginator-page-btn.left .icon{font-size:18px;margin-right:8px}.paginator-page-btn.right{margin-left:auto}.paginator-page-btn.right .icon{font-size:18px;margin-left:8px;transform:rotate(180deg)}.materials-grid-paginator-mini{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:space-between;margin:0!important;overflow:hidden;padding:0 20px;width:100%}.materials-grid-paginator-mini .paginator-page-btn{padding:8px}.materials-grid-paginator-mini .materials-grid-paginator-center{align-items:center;display:flex;gap:4px;justify-content:center}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-text{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:400}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-value{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:500}.materials-grid-paginator-mini .pisell-lowcode-pagination-next,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev{border:1px solid #d0d5dd;border-radius:8px;margin:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-left-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-left-icon{margin-right:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-right-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-right-icon{margin-left:0}.react-resizable{position:relative}.react-resizable-handle{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+);background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.materials-grid-table-header-cell{align-items:center;display:flex;height:44px;padding:0 14px}.materials-grid-table-header-cell .field-icon{color:#777;font-size:18px}.materials-grid-table-header-cell .materials-grid-table-header-cell-content{color:#1b1b1b;flex:auto;font-size:14px;font-weight:600;overflow:hidden;padding-right:10px;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.materials-grid-table-header-cell .actions{align-items:center;display:flex;gap:8px}.materials-grid-table-header-cell .actions .action{color:#ababab;cursor:pointer;font-size:14px}.editable-cell-value-wrap{height:100%;width:100%}.materials-grid-table-cell{height:1px;padding:0!important}.cell-provider{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:100%;justify-content:center;padding:12px;position:relative;width:100%}.cell-provider.focus{box-shadow:var(--theme-color) 0 0 0 1px!important}
|