poe-svelte-ui-lib 1.6.2 → 1.6.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.
- package/dist/Input/Input.svelte +68 -77
- package/dist/Input/Input.svelte.d.ts +1 -1
- package/dist/Table/Table.svelte +154 -117
- package/dist/Table/Table.svelte.d.ts +1 -1
- package/dist/Table/TableProps.svelte +442 -399
- package/dist/Table/TableProps.svelte.d.ts +1 -1
- package/dist/Tabs/TabsProps.svelte +18 -16
- package/dist/libIcons/ButtonAdd.svelte +2 -7
- package/dist/libIcons/ButtonRemove.svelte +8 -0
- package/dist/libIcons/ButtonRemove.svelte.d.ts +18 -0
- package/dist/locales/translations.js +221 -218
- package/dist/options.d.ts +5 -0
- package/dist/options.js +161 -157
- package/dist/types.d.ts +30 -23
- package/dist/types.js +1 -1
- package/package.json +2 -2
package/dist/options.d.ts
CHANGED
|
@@ -120,6 +120,11 @@ export declare const optionsStore: import("svelte/store").Readable<{
|
|
|
120
120
|
value: string;
|
|
121
121
|
name: string;
|
|
122
122
|
}[];
|
|
123
|
+
ACTION_TYPE_OPTIONS: {
|
|
124
|
+
id: string;
|
|
125
|
+
value: string;
|
|
126
|
+
name: string;
|
|
127
|
+
}[];
|
|
123
128
|
BUFFER_SIFE_OPTIONS: {
|
|
124
129
|
id: `${string}-${string}-${string}-${string}-${string}`;
|
|
125
130
|
value: number;
|
package/dist/options.js
CHANGED
|
@@ -1,225 +1,229 @@
|
|
|
1
1
|
// $lib/ElementsUI/options.ts
|
|
2
|
-
import { derived } from
|
|
3
|
-
import { t } from
|
|
2
|
+
import { derived } from "svelte/store";
|
|
3
|
+
import { t } from "./locales/i18n";
|
|
4
4
|
function id() {
|
|
5
5
|
return crypto.randomUUID();
|
|
6
6
|
}
|
|
7
|
-
export const optionsStore = derived(t,
|
|
7
|
+
export const optionsStore = derived(t, $t => {
|
|
8
8
|
return {
|
|
9
9
|
HEADER_OPTIONS: [
|
|
10
|
-
{ id: id(), name:
|
|
11
|
-
{ id: id(), name:
|
|
12
|
-
{ id: id(), name:
|
|
13
|
-
{ id: id(), name:
|
|
10
|
+
{ id: id(), name: "GET", value: "GET" },
|
|
11
|
+
{ id: id(), name: "SET", value: "SET" },
|
|
12
|
+
{ id: id(), name: "OK!", value: "OK!" },
|
|
13
|
+
{ id: id(), name: "ER!", value: "ER!" },
|
|
14
14
|
],
|
|
15
15
|
SHORT_ARGUMENT_OPTION: [
|
|
16
|
-
{ id: id(), value:
|
|
17
|
-
{ id: id(), value:
|
|
18
|
-
{ id: id(), value:
|
|
16
|
+
{ id: id(), value: "NoSave", name: $t("constructor.props.action.update") },
|
|
17
|
+
{ id: id(), value: "Save", name: $t("constructor.props.action.save") },
|
|
18
|
+
{ id: id(), value: "NoSend", name: $t("constructor.props.action.nosend") },
|
|
19
19
|
],
|
|
20
20
|
FULL_ARGUMENT_OPTION: [
|
|
21
|
-
{ id: id(), value:
|
|
22
|
-
{ id: id(), value:
|
|
23
|
-
{ id: id(), value:
|
|
21
|
+
{ id: id(), value: "NoSave", name: $t("constructor.props.action.update") },
|
|
22
|
+
{ id: id(), value: "Save", name: $t("constructor.props.action.save") },
|
|
23
|
+
{ id: id(), value: "", name: $t("constructor.props.action.custom") },
|
|
24
24
|
],
|
|
25
25
|
ACCESS_OPTION: [
|
|
26
|
-
{ id: id(), value:
|
|
27
|
-
{ id: id(), value:
|
|
28
|
-
{ id: id(), value:
|
|
26
|
+
{ id: id(), value: "full", name: $t("constructor.props.type.full") },
|
|
27
|
+
{ id: id(), value: "viewOnly", name: $t("constructor.props.type.viewOnly") },
|
|
28
|
+
{ id: id(), value: "hidden", name: $t("constructor.props.type.hidden") },
|
|
29
29
|
],
|
|
30
30
|
INPUT_TYPE_OPTIONS: [
|
|
31
|
-
{ id: id(), value:
|
|
32
|
-
{ id: id(), value:
|
|
33
|
-
{ id: id(), value:
|
|
34
|
-
{ id: id(), value:
|
|
31
|
+
{ id: id(), value: "text", name: $t("constructor.props.type.text") },
|
|
32
|
+
{ id: id(), value: "password", name: $t("constructor.props.type.password") },
|
|
33
|
+
{ id: id(), value: "number", name: $t("constructor.props.type.number") },
|
|
34
|
+
{ id: id(), value: "text-area", name: $t("constructor.props.type.textarea") },
|
|
35
35
|
],
|
|
36
36
|
SELECT_TYPE_OPTIONS: [
|
|
37
|
-
{ id: id(), value:
|
|
38
|
-
{ id: id(), value:
|
|
39
|
-
{ id: id(), value:
|
|
37
|
+
{ id: id(), value: "select", name: $t("constructor.props.type.select") },
|
|
38
|
+
{ id: id(), value: "buttons", name: $t("constructor.props.type.buttons") },
|
|
39
|
+
{ id: id(), value: "input", name: $t("constructor.props.type.selectput") },
|
|
40
40
|
],
|
|
41
41
|
SELECT_VALUE_TYPE_OPTIONS: [
|
|
42
|
-
{ id: id(), value:
|
|
43
|
-
{ id: id(), value:
|
|
42
|
+
{ id: id(), value: "text", name: $t("constructor.props.valuetype.text") },
|
|
43
|
+
{ id: id(), value: "number", name: $t("constructor.props.valuetype.number") },
|
|
44
44
|
],
|
|
45
45
|
SLIDER_TYPE_OPTIONS: [
|
|
46
|
-
{ id: id(), value:
|
|
47
|
-
{ id: id(), value:
|
|
46
|
+
{ id: id(), value: "single", name: $t("constructor.props.type.single") },
|
|
47
|
+
{ id: id(), value: "range", name: $t("constructor.props.type.range") },
|
|
48
48
|
],
|
|
49
49
|
TEXTFIELD_SIZE_OPTIONS: [
|
|
50
|
-
{ id: id(), value:
|
|
51
|
-
{ id: id(), value:
|
|
52
|
-
{ id: id(), value:
|
|
53
|
-
{ id: id(), value:
|
|
54
|
-
{ id: id(), value:
|
|
50
|
+
{ id: id(), value: "small", name: $t("constructor.props.type.small") },
|
|
51
|
+
{ id: id(), value: "base", name: $t("constructor.props.type.base") },
|
|
52
|
+
{ id: id(), value: "large", name: $t("constructor.props.type.large") },
|
|
53
|
+
{ id: id(), value: "huge", name: $t("constructor.props.type.huge") },
|
|
54
|
+
{ id: id(), value: "massive", name: $t("constructor.props.type.massive") },
|
|
55
55
|
],
|
|
56
56
|
COLOR_OPTIONS: [
|
|
57
|
-
{ id: id(), name:
|
|
58
|
-
{ id: id(), name:
|
|
59
|
-
{ id: id(), name:
|
|
60
|
-
{ id: id(), name:
|
|
61
|
-
{ id: id(), name:
|
|
62
|
-
{ id: id(), name:
|
|
63
|
-
{ id: id(), name:
|
|
57
|
+
{ id: id(), name: "", value: "bg-max", class: "bg-max" },
|
|
58
|
+
{ id: id(), name: "", value: "bg-red", class: "bg-red" },
|
|
59
|
+
{ id: id(), name: "", value: "bg-yellow", class: "bg-yellow" },
|
|
60
|
+
{ id: id(), name: "", value: "bg-green", class: "bg-green" },
|
|
61
|
+
{ id: id(), name: "", value: "bg-blue", class: "bg-blue" },
|
|
62
|
+
{ id: id(), name: "", value: "bg-purple", class: "bg-purple" },
|
|
63
|
+
{ id: id(), name: "", value: "bg-gray", class: "bg-gray" },
|
|
64
64
|
],
|
|
65
65
|
TEXT_COLOR_OPTIONS: [
|
|
66
|
-
{ id: id(), name:
|
|
67
|
-
{ id: id(), name:
|
|
68
|
-
{ id: id(), name:
|
|
69
|
-
{ id: id(), name:
|
|
70
|
-
{ id: id(), name:
|
|
71
|
-
{ id: id(), name:
|
|
72
|
-
{ id: id(), name:
|
|
66
|
+
{ id: id(), name: "", value: "text-[#333] dark:text-[#e2e3e7]", class: "bg-[var(--shadow-color)] dark:bg-[#e2e3e7] " },
|
|
67
|
+
{ id: id(), name: "", value: "text-red-500 dark:text-red-400", class: "bg-red-500 dark:bg-red-400" },
|
|
68
|
+
{ id: id(), name: "", value: "text-yellow-500 dark:text-yellow-400", class: "bg-yellow-500 dark:bg-yellow-400" },
|
|
69
|
+
{ id: id(), name: "", value: "text-green-500 dark:text-green-400", class: "bg-green-500 dark:bg-green-400" },
|
|
70
|
+
{ id: id(), name: "", value: "text-blue-500 dark:text-blue-400", class: "bg-blue-500 dark:bg-blue-400" },
|
|
71
|
+
{ id: id(), name: "", value: "text-purple-500 dark:text-purple-400", class: "bg-purple-500 dark:bg-purple-400" },
|
|
72
|
+
{ id: id(), name: "", value: "text-gray-500 dark:text-gray-400", class: "bg-gray-500 dark:bg-gray-400" },
|
|
73
73
|
],
|
|
74
74
|
TEXT_ALIGN_OPTIONS: [
|
|
75
|
-
{ id: id(), value:
|
|
76
|
-
{ id: id(), value:
|
|
77
|
-
{ id: id(), value:
|
|
75
|
+
{ id: id(), value: "text-left", name: $t("constructor.props.align.left") },
|
|
76
|
+
{ id: id(), value: "text-center", name: $t("constructor.props.align.center") },
|
|
77
|
+
{ id: id(), value: "text-right", name: $t("constructor.props.align.right") },
|
|
78
78
|
],
|
|
79
79
|
ALIGN_OPTIONS: [
|
|
80
|
-
{ id: id(), value:
|
|
81
|
-
{ id: id(), value:
|
|
82
|
-
{ id: id(), value:
|
|
80
|
+
{ id: id(), value: "left", name: $t("constructor.props.align.left") },
|
|
81
|
+
{ id: id(), value: "center", name: $t("constructor.props.align.center") },
|
|
82
|
+
{ id: id(), value: "right", name: $t("constructor.props.align.right") },
|
|
83
83
|
],
|
|
84
84
|
JUSTIFY_ALIGN_OPTIONS: [
|
|
85
|
-
{ id: id(), value:
|
|
86
|
-
{ id: id(), value:
|
|
87
|
-
{ id: id(), value:
|
|
85
|
+
{ id: id(), value: "justify-start", name: $t("constructor.props.align.left") },
|
|
86
|
+
{ id: id(), value: "justify-center", name: $t("constructor.props.align.center") },
|
|
87
|
+
{ id: id(), value: "justify-end", name: $t("constructor.props.align.right") },
|
|
88
88
|
],
|
|
89
89
|
ICON_TEXT_POSITION_OPTIONS: [
|
|
90
|
-
{ id: id(), value:
|
|
91
|
-
{ id: id(), value:
|
|
92
|
-
{ id: id(), value:
|
|
93
|
-
{ id: id(), value:
|
|
90
|
+
{ id: id(), value: "flex-row", name: "←" },
|
|
91
|
+
{ id: id(), value: "flex-col", name: "↑" },
|
|
92
|
+
{ id: id(), value: "flex-row-reverse", name: "→" },
|
|
93
|
+
{ id: id(), value: "flex-col-reverse", name: "↓" },
|
|
94
94
|
],
|
|
95
95
|
HEIGHT_OPTIONS: [
|
|
96
|
-
{ id: id(), value:
|
|
97
|
-
{ id: id(), value:
|
|
98
|
-
{ id: id(), value:
|
|
96
|
+
{ id: id(), value: "py-1", name: $t("constructor.props.height.small") },
|
|
97
|
+
{ id: id(), value: "py-2", name: $t("constructor.props.height.medium") },
|
|
98
|
+
{ id: id(), value: "py-3", name: $t("constructor.props.height.large") },
|
|
99
99
|
],
|
|
100
100
|
ACCORDION_TYPE_OPTIONS: [
|
|
101
|
-
{ id: id(), value: false, name: $t(
|
|
102
|
-
{ id: id(), value: true, name: $t(
|
|
101
|
+
{ id: id(), value: false, name: $t("constructor.props.type.main") },
|
|
102
|
+
{ id: id(), value: true, name: $t("constructor.props.type.sub") },
|
|
103
103
|
],
|
|
104
104
|
FILE_ATTACH_TYPE_OPTIONS: [
|
|
105
|
-
{ id: id(), value:
|
|
106
|
-
{ id: id(), value:
|
|
105
|
+
{ id: id(), value: "file", name: $t("constructor.props.type.file") },
|
|
106
|
+
{ id: id(), value: "image", name: $t("constructor.props.type.image") },
|
|
107
107
|
],
|
|
108
108
|
FITMODE_OPTIONS: [
|
|
109
|
-
{ id: id(), value:
|
|
110
|
-
{ id: id(), value:
|
|
109
|
+
{ id: id(), value: "cover", name: $t("constructor.props.type.cover") },
|
|
110
|
+
{ id: id(), value: "contain", name: $t("constructor.props.type.contain") },
|
|
111
111
|
],
|
|
112
112
|
SWITCH_OPTIONS: [
|
|
113
|
-
{ id: id(), value:
|
|
114
|
-
{ id: id(), value:
|
|
115
|
-
{ id: id(), value:
|
|
113
|
+
{ id: id(), value: "horizontal", name: $t("constructor.props.type.horizontal") },
|
|
114
|
+
{ id: id(), value: "vertical", name: $t("constructor.props.type.vertical") },
|
|
115
|
+
{ id: id(), value: "checkbox", name: $t("constructor.props.type.checkbox") },
|
|
116
116
|
],
|
|
117
117
|
INFO_SIDE_OPTIONS: [
|
|
118
|
-
{ id: id(), value:
|
|
119
|
-
{ id: id(), value:
|
|
120
|
-
{ id: id(), value:
|
|
121
|
-
{ id: id(), value:
|
|
118
|
+
{ id: id(), value: "top", name: $t("constructor.props.info.top") },
|
|
119
|
+
{ id: id(), value: "bottom", name: $t("constructor.props.info.bottom") },
|
|
120
|
+
{ id: id(), value: "left", name: $t("constructor.props.info.left") },
|
|
121
|
+
{ id: id(), value: "right", name: $t("constructor.props.info.right") },
|
|
122
122
|
],
|
|
123
123
|
FORM_OPTIONS: [
|
|
124
|
-
{ id: id(), value:
|
|
125
|
-
{ id: id(), value:
|
|
124
|
+
{ id: id(), value: "square", name: $t("constructor.props.type.square") },
|
|
125
|
+
{ id: id(), value: "circle", name: $t("constructor.props.type.circle") },
|
|
126
126
|
],
|
|
127
127
|
TABLE_TYPE_OPTIONS: [
|
|
128
|
-
{ id: id(), value:
|
|
129
|
-
{ id: id(), value:
|
|
128
|
+
{ id: id(), value: "table", name: $t("constructor.props.table.type.table") },
|
|
129
|
+
{ id: id(), value: "logger", name: $t("constructor.props.table.type.logger") },
|
|
130
|
+
],
|
|
131
|
+
ACTION_TYPE_OPTIONS: [
|
|
132
|
+
{ id: id(), value: "buttons", name: $t("constructor.props.table.action.type.buttons") },
|
|
133
|
+
{ id: id(), value: "select", name: $t("constructor.props.table.action.type.select") },
|
|
130
134
|
],
|
|
131
135
|
BUFFER_SIFE_OPTIONS: [
|
|
132
|
-
{ id: crypto.randomUUID(), value: 10, name:
|
|
133
|
-
{ id: crypto.randomUUID(), value: 50, name:
|
|
134
|
-
{ id: crypto.randomUUID(), value: 100, name:
|
|
135
|
-
{ id: crypto.randomUUID(), value: 500, name:
|
|
136
|
-
{ id: crypto.randomUUID(), value: 1000, name:
|
|
136
|
+
{ id: crypto.randomUUID(), value: 10, name: "10" },
|
|
137
|
+
{ id: crypto.randomUUID(), value: 50, name: "50" },
|
|
138
|
+
{ id: crypto.randomUUID(), value: 100, name: "100" },
|
|
139
|
+
{ id: crypto.randomUUID(), value: 500, name: "500" },
|
|
140
|
+
{ id: crypto.randomUUID(), value: 1000, name: "1000" },
|
|
137
141
|
],
|
|
138
142
|
AUTOCOMPLETE_CONSTRUCTOR_OPTIONS: [
|
|
139
|
-
{ id: id(), value:
|
|
140
|
-
{ id: id(), value:
|
|
141
|
-
{ id: id(), value:
|
|
142
|
-
{ id: id(), value:
|
|
143
|
-
{ id: id(), value:
|
|
144
|
-
{ id: id(), value:
|
|
145
|
-
{ id: id(), value:
|
|
146
|
-
{ id: id(), value:
|
|
147
|
-
{ id: id(), value:
|
|
148
|
-
{ id: id(), value:
|
|
149
|
-
{ id: id(), value:
|
|
150
|
-
{ id: id(), value:
|
|
151
|
-
{ id: id(), value:
|
|
152
|
-
{ id: id(), value:
|
|
153
|
-
{ id: id(), value:
|
|
154
|
-
{ id: id(), value:
|
|
143
|
+
{ id: id(), value: "on", name: $t("constructor.props.autocomplete.on") },
|
|
144
|
+
{ id: id(), value: "off", name: $t("constructor.props.autocomplete.off") },
|
|
145
|
+
{ id: id(), value: "given-name", name: $t("constructor.props.autocomplete.given-name") },
|
|
146
|
+
{ id: id(), value: "family-name", name: $t("constructor.props.autocomplete.family-name") },
|
|
147
|
+
{ id: id(), value: "nickname", name: $t("constructor.props.autocomplete.nickname") },
|
|
148
|
+
{ id: id(), value: "username", name: $t("constructor.props.autocomplete.username") },
|
|
149
|
+
{ id: id(), value: "new-password", name: $t("constructor.props.autocomplete.new-password") },
|
|
150
|
+
{ id: id(), value: "current-password", name: $t("constructor.props.autocomplete.current-password") },
|
|
151
|
+
{ id: id(), value: "organization-title", name: $t("constructor.props.autocomplete.organization-title") },
|
|
152
|
+
{ id: id(), value: "country-name", name: $t("constructor.props.autocomplete.country-name") },
|
|
153
|
+
{ id: id(), value: "address-level1", name: $t("constructor.props.autocomplete.address-level1") },
|
|
154
|
+
{ id: id(), value: "address-level2", name: $t("constructor.props.autocomplete.address-level2") },
|
|
155
|
+
{ id: id(), value: "street-address", name: $t("constructor.props.autocomplete.street-address") },
|
|
156
|
+
{ id: id(), value: "postal-code", name: $t("constructor.props.autocomplete.postal-code") },
|
|
157
|
+
{ id: id(), value: "email", name: $t("constructor.props.autocomplete.email") },
|
|
158
|
+
{ id: id(), value: "tel", name: $t("constructor.props.autocomplete.tel") },
|
|
155
159
|
],
|
|
156
160
|
AUTOCOMPLETE_OPTIONS: [
|
|
157
161
|
// Основные значения
|
|
158
|
-
{ id: id(), value:
|
|
159
|
-
{ id: id(), value:
|
|
162
|
+
{ id: id(), value: "on", name: $t("constructor.props.autocomplete.on") },
|
|
163
|
+
{ id: id(), value: "off", name: $t("constructor.props.autocomplete.off") },
|
|
160
164
|
// Имя и фамилия
|
|
161
|
-
{ id: id(), value:
|
|
162
|
-
{ id: id(), value:
|
|
163
|
-
{ id: id(), value:
|
|
164
|
-
{ id: id(), value:
|
|
165
|
-
{ id: id(), value:
|
|
166
|
-
{ id: id(), value:
|
|
167
|
-
{ id: id(), value:
|
|
165
|
+
{ id: id(), value: "name", name: $t("constructor.props.autocomplete.name") },
|
|
166
|
+
{ id: id(), value: "honorific-prefix", name: $t("constructor.props.autocomplete.honorific-prefix") },
|
|
167
|
+
{ id: id(), value: "given-name", name: $t("constructor.props.autocomplete.given-name") },
|
|
168
|
+
{ id: id(), value: "additional-name", name: $t("constructor.props.autocomplete.additional-name") },
|
|
169
|
+
{ id: id(), value: "family-name", name: $t("constructor.props.autocomplete.family-name") },
|
|
170
|
+
{ id: id(), value: "honorific-suffix", name: $t("constructor.props.autocomplete.honorific-suffix") },
|
|
171
|
+
{ id: id(), value: "nickname", name: $t("constructor.props.autocomplete.nickname") },
|
|
168
172
|
// Пользовательская информация
|
|
169
|
-
{ id: id(), value:
|
|
170
|
-
{ id: id(), value:
|
|
171
|
-
{ id: id(), value:
|
|
172
|
-
{ id: id(), value:
|
|
173
|
+
{ id: id(), value: "username", name: $t("constructor.props.autocomplete.username") },
|
|
174
|
+
{ id: id(), value: "new-password", name: $t("constructor.props.autocomplete.new-password") },
|
|
175
|
+
{ id: id(), value: "current-password", name: $t("constructor.props.autocomplete.current-password") },
|
|
176
|
+
{ id: id(), value: "one-time-code", name: $t("constructor.props.autocomplete.one-time-code") },
|
|
173
177
|
// Организация
|
|
174
|
-
{ id: id(), value:
|
|
175
|
-
{ id: id(), value:
|
|
178
|
+
{ id: id(), value: "organization-title", name: $t("constructor.props.autocomplete.organization-title") },
|
|
179
|
+
{ id: id(), value: "organization", name: $t("constructor.props.autocomplete.organization") },
|
|
176
180
|
// Адрес
|
|
177
|
-
{ id: id(), value:
|
|
178
|
-
{ id: id(), value:
|
|
179
|
-
{ id: id(), value:
|
|
180
|
-
{ id: id(), value:
|
|
181
|
-
{ id: id(), value:
|
|
182
|
-
{ id: id(), value:
|
|
183
|
-
{ id: id(), value:
|
|
184
|
-
{ id: id(), value:
|
|
185
|
-
{ id: id(), value:
|
|
186
|
-
{ id: id(), value:
|
|
187
|
-
{ id: id(), value:
|
|
181
|
+
{ id: id(), value: "street-address", name: $t("constructor.props.autocomplete.street-address") },
|
|
182
|
+
{ id: id(), value: "address-line1", name: $t("constructor.props.autocomplete.address-line1") },
|
|
183
|
+
{ id: id(), value: "address-line2", name: $t("constructor.props.autocomplete.address-line2") },
|
|
184
|
+
{ id: id(), value: "address-line3", name: $t("constructor.props.autocomplete.address-line3") },
|
|
185
|
+
{ id: id(), value: "address-level4", name: $t("constructor.props.autocomplete.address-level4") },
|
|
186
|
+
{ id: id(), value: "address-level3", name: $t("constructor.props.autocomplete.address-level3") },
|
|
187
|
+
{ id: id(), value: "address-level2", name: $t("constructor.props.autocomplete.address-level2") },
|
|
188
|
+
{ id: id(), value: "address-level1", name: $t("constructor.props.autocomplete.address-level1") },
|
|
189
|
+
{ id: id(), value: "country", name: $t("constructor.props.autocomplete.country") },
|
|
190
|
+
{ id: id(), value: "country-name", name: $t("constructor.props.autocomplete.country-name") },
|
|
191
|
+
{ id: id(), value: "postal-code", name: $t("constructor.props.autocomplete.postal-code") },
|
|
188
192
|
// Контактная информация
|
|
189
|
-
{ id: id(), value:
|
|
190
|
-
{ id: id(), value:
|
|
191
|
-
{ id: id(), value:
|
|
192
|
-
{ id: id(), value:
|
|
193
|
-
{ id: id(), value:
|
|
194
|
-
{ id: id(), value:
|
|
195
|
-
{ id: id(), value:
|
|
196
|
-
{ id: id(), value:
|
|
197
|
-
{ id: id(), value:
|
|
198
|
-
{ id: id(), value:
|
|
193
|
+
{ id: id(), value: "cc-name", name: $t("constructor.props.autocomplete.cc-name") },
|
|
194
|
+
{ id: id(), value: "cc-given-name", name: $t("constructor.props.autocomplete.cc-given-name") },
|
|
195
|
+
{ id: id(), value: "cc-additional-name", name: $t("constructor.props.autocomplete.cc-additional-name") },
|
|
196
|
+
{ id: id(), value: "cc-family-name", name: $t("constructor.props.autocomplete.cc-family-name") },
|
|
197
|
+
{ id: id(), value: "cc-number", name: $t("constructor.props.autocomplete.cc-number") },
|
|
198
|
+
{ id: id(), value: "cc-exp", name: $t("constructor.props.autocomplete.cc-exp") },
|
|
199
|
+
{ id: id(), value: "cc-exp-month", name: $t("constructor.props.autocomplete.cc-exp-month") },
|
|
200
|
+
{ id: id(), value: "cc-exp-year", name: $t("constructor.props.autocomplete.cc-exp-year") },
|
|
201
|
+
{ id: id(), value: "cc-csc", name: $t("constructor.props.autocomplete.cc-csc") },
|
|
202
|
+
{ id: id(), value: "cc-type", name: $t("constructor.props.autocomplete.cc-type") },
|
|
199
203
|
// Контакт
|
|
200
|
-
{ id: id(), value:
|
|
201
|
-
{ id: id(), value:
|
|
202
|
-
{ id: id(), value:
|
|
203
|
-
{ id: id(), value:
|
|
204
|
-
{ id: id(), value:
|
|
205
|
-
{ id: id(), value:
|
|
206
|
-
{ id: id(), value:
|
|
204
|
+
{ id: id(), value: "transaction-currency", name: $t("constructor.props.autocomplete.transaction-currency") },
|
|
205
|
+
{ id: id(), value: "transaction-amount", name: $t("constructor.props.autocomplete.transaction-amount") },
|
|
206
|
+
{ id: id(), value: "language", name: $t("constructor.props.autocomplete.language") },
|
|
207
|
+
{ id: id(), value: "bday", name: $t("constructor.props.autocomplete.bday") },
|
|
208
|
+
{ id: id(), value: "bday-day", name: $t("constructor.props.autocomplete.bday-day") },
|
|
209
|
+
{ id: id(), value: "bday-month", name: $t("constructor.props.autocomplete.bday-month") },
|
|
210
|
+
{ id: id(), value: "bday-year", name: $t("constructor.props.autocomplete.bday-year") },
|
|
207
211
|
// Связь
|
|
208
|
-
{ id: id(), value:
|
|
209
|
-
{ id: id(), value:
|
|
210
|
-
{ id: id(), value:
|
|
212
|
+
{ id: id(), value: "sex", name: $t("constructor.props.autocomplete.sex") },
|
|
213
|
+
{ id: id(), value: "url", name: $t("constructor.props.autocomplete.url") },
|
|
214
|
+
{ id: id(), value: "photo", name: $t("constructor.props.autocomplete.photo") },
|
|
211
215
|
// Email и телефон
|
|
212
|
-
{ id: id(), value:
|
|
213
|
-
{ id: id(), value:
|
|
214
|
-
{ id: id(), value:
|
|
215
|
-
{ id: id(), value:
|
|
216
|
-
{ id: id(), value:
|
|
217
|
-
{ id: id(), value:
|
|
218
|
-
{ id: id(), value:
|
|
219
|
-
{ id: id(), value:
|
|
220
|
-
{ id: id(), value:
|
|
221
|
-
{ id: id(), value:
|
|
222
|
-
{ id: id(), value:
|
|
216
|
+
{ id: id(), value: "email", name: $t("constructor.props.autocomplete.email") },
|
|
217
|
+
{ id: id(), value: "tel", name: $t("constructor.props.autocomplete.tel") },
|
|
218
|
+
{ id: id(), value: "tel-country-code", name: $t("constructor.props.autocomplete.tel-country-code") },
|
|
219
|
+
{ id: id(), value: "tel-national", name: $t("constructor.props.autocomplete.tel-national") },
|
|
220
|
+
{ id: id(), value: "tel-area-code", name: $t("constructor.props.autocomplete.tel-area-code") },
|
|
221
|
+
{ id: id(), value: "tel-local", name: $t("constructor.props.autocomplete.tel-local") },
|
|
222
|
+
{ id: id(), value: "tel-local-prefix", name: $t("constructor.props.autocomplete.tel-local-prefix") },
|
|
223
|
+
{ id: id(), value: "tel-local-suffix", name: $t("constructor.props.autocomplete.tel-local-suffix") },
|
|
224
|
+
{ id: id(), value: "tel-extension", name: $t("constructor.props.autocomplete.tel-extension") },
|
|
225
|
+
{ id: id(), value: "impp", name: $t("constructor.props.autocomplete.impp") },
|
|
226
|
+
{ id: id(), value: "fax", name: $t("constructor.props.autocomplete.fax") },
|
|
223
227
|
],
|
|
224
228
|
};
|
|
225
229
|
});
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Snippet } from
|
|
2
|
-
import type { Writable } from
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { Writable } from "svelte/store";
|
|
3
3
|
export declare const updateProperty: (path: string, value: string | number | boolean | object | string[], component: UIComponent & {
|
|
4
4
|
properties: Partial<UIComponent["properties"]>;
|
|
5
5
|
}, onPropertyChange: (updates: Partial<{
|
|
@@ -26,8 +26,8 @@ export declare const updateComponent: (component: UIComponent, updates: Partial<
|
|
|
26
26
|
export interface UIComponent {
|
|
27
27
|
id: string;
|
|
28
28
|
name?: string;
|
|
29
|
-
access?:
|
|
30
|
-
type:
|
|
29
|
+
access?: "full" | "viewOnly" | "hidden";
|
|
30
|
+
type: "Button" | "Accordion" | "Input" | "Select" | "Switch" | "ColorPicker" | "Slider" | "TextField" | "Joystick" | "ProgressBar" | "Graph" | "Table" | "Tabs" | "FileAttach" | "Map";
|
|
31
31
|
properties: IAccordionProps | IButtonProps | IInputProps | ISelectProps | ISwitchProps | IColorPickerProps | ISliderProps | ITextFieldProps | IProgressBarProps | IGraphProps | ITableProps<object> | ITabsProps | IFileAttachProps | IJoystickProps | IMapProps;
|
|
32
32
|
position: Required<Position>;
|
|
33
33
|
parentId: string;
|
|
@@ -54,7 +54,7 @@ export interface IButtonProps {
|
|
|
54
54
|
name?: string;
|
|
55
55
|
info?: {
|
|
56
56
|
text: string;
|
|
57
|
-
side:
|
|
57
|
+
side: "top" | "bottom" | "left" | "right";
|
|
58
58
|
};
|
|
59
59
|
icon?: ConstructorOfATypedSvelteComponent | string | null;
|
|
60
60
|
};
|
|
@@ -85,7 +85,7 @@ export interface IAccordionProps {
|
|
|
85
85
|
}
|
|
86
86
|
export interface IInputProps {
|
|
87
87
|
id?: string;
|
|
88
|
-
type?:
|
|
88
|
+
type?: "text" | "password" | "number" | "text-area";
|
|
89
89
|
wrapperClass?: string;
|
|
90
90
|
label?: {
|
|
91
91
|
name?: string;
|
|
@@ -108,7 +108,7 @@ export interface IInputProps {
|
|
|
108
108
|
info?: string;
|
|
109
109
|
copyButton?: boolean;
|
|
110
110
|
regExp?: string | RegExp;
|
|
111
|
-
autocomplete?:
|
|
111
|
+
autocomplete?: "on" | "off" | "given-name" | "family-name" | "nickname" | "username" | "new-password" | "current-password" | "organization-title" | "country-name" | "address-level1" | "address-level2" | "street-address" | "postal-code" | "email" | "tel" | null;
|
|
112
112
|
};
|
|
113
113
|
onUpdate?: (value: string | number) => void;
|
|
114
114
|
}
|
|
@@ -121,7 +121,7 @@ export interface ISelectProps<T = unknown> {
|
|
|
121
121
|
class?: string;
|
|
122
122
|
};
|
|
123
123
|
componentClass?: string;
|
|
124
|
-
type?:
|
|
124
|
+
type?: "select" | "buttons" | "input";
|
|
125
125
|
value?: ISelectOption<T> | null;
|
|
126
126
|
options?: ISelectOption<T>[];
|
|
127
127
|
bitMode?: boolean;
|
|
@@ -152,7 +152,7 @@ export interface ISwitchProps {
|
|
|
152
152
|
hiddenInfo?: string;
|
|
153
153
|
options?: ISelectOption<number>[];
|
|
154
154
|
bitMode?: boolean;
|
|
155
|
-
type?:
|
|
155
|
+
type?: "horizontal" | "vertical" | "checkbox";
|
|
156
156
|
value?: number;
|
|
157
157
|
onChange?: (value: number) => void;
|
|
158
158
|
}
|
|
@@ -174,7 +174,7 @@ export interface ISliderProps {
|
|
|
174
174
|
class?: string;
|
|
175
175
|
};
|
|
176
176
|
value?: number | [number, number];
|
|
177
|
-
type?:
|
|
177
|
+
type?: "single" | "range";
|
|
178
178
|
number?: {
|
|
179
179
|
minNum: number;
|
|
180
180
|
maxNum: number;
|
|
@@ -190,7 +190,7 @@ export interface ITextFieldProps {
|
|
|
190
190
|
content?: {
|
|
191
191
|
name?: string;
|
|
192
192
|
class?: string;
|
|
193
|
-
size?:
|
|
193
|
+
size?: "small" | "base" | "large" | "huge" | "massive";
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
196
|
export interface IProgressBarProps {
|
|
@@ -205,7 +205,7 @@ export interface IProgressBarProps {
|
|
|
205
205
|
maxNum?: number;
|
|
206
206
|
units?: string;
|
|
207
207
|
};
|
|
208
|
-
type?:
|
|
208
|
+
type?: "horizontal" | "vertical";
|
|
209
209
|
wrapperClass?: string;
|
|
210
210
|
}
|
|
211
211
|
export interface IGraphDataObject {
|
|
@@ -234,19 +234,26 @@ export interface ITableHeader<T extends object> {
|
|
|
234
234
|
key: keyof T;
|
|
235
235
|
sortable?: boolean;
|
|
236
236
|
width?: string;
|
|
237
|
-
align?:
|
|
237
|
+
align?: "left" | "center" | "right";
|
|
238
238
|
overflow?: {
|
|
239
239
|
truncated?: boolean;
|
|
240
240
|
formatting?: (text: string) => string;
|
|
241
241
|
copy?: boolean;
|
|
242
242
|
modal?: boolean;
|
|
243
243
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
244
|
+
action?: {
|
|
245
|
+
type: "buttons" | "select" | "none";
|
|
246
|
+
buttons?: {
|
|
247
|
+
name: string | ((row: T) => string);
|
|
248
|
+
class?: string | ((row: T) => string);
|
|
249
|
+
eventHandler?: IUIComponentHandler;
|
|
250
|
+
onClick?: (row: T) => void;
|
|
251
|
+
}[];
|
|
252
|
+
select?: {
|
|
253
|
+
key: string;
|
|
254
|
+
onChange?: () => void;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
250
257
|
image?: {
|
|
251
258
|
src?: string | ((row: T) => string);
|
|
252
259
|
alt?: string;
|
|
@@ -266,7 +273,7 @@ export interface ITableProps<T extends object> {
|
|
|
266
273
|
header?: ITableHeader<T>[];
|
|
267
274
|
body: T[] | T | null;
|
|
268
275
|
footer?: string;
|
|
269
|
-
type?:
|
|
276
|
+
type?: "table" | "logger";
|
|
270
277
|
dataBuffer?: {
|
|
271
278
|
stashData?: boolean;
|
|
272
279
|
rowsAmmount?: number;
|
|
@@ -344,13 +351,13 @@ export interface IFileAttachProps {
|
|
|
344
351
|
name?: string;
|
|
345
352
|
class?: string;
|
|
346
353
|
};
|
|
347
|
-
type?:
|
|
354
|
+
type?: "file" | "image";
|
|
348
355
|
accept?: string;
|
|
349
356
|
imageSize?: {
|
|
350
357
|
height?: string;
|
|
351
358
|
width?: string;
|
|
352
|
-
fitMode?:
|
|
353
|
-
form?:
|
|
359
|
+
fitMode?: "cover" | "contain";
|
|
360
|
+
form?: "square" | "circle";
|
|
354
361
|
};
|
|
355
362
|
disabled?: boolean;
|
|
356
363
|
currentImage?: string | null;
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const updateProperty = (path, value, component, onPropertyChange) => {
|
|
2
2
|
const newProperties = JSON.parse(JSON.stringify(component.properties));
|
|
3
|
-
const parts = path.split(
|
|
3
|
+
const parts = path.split(".");
|
|
4
4
|
let obj = newProperties;
|
|
5
5
|
for (let i = 0; i < parts.length - 1; i++) {
|
|
6
6
|
const part = parts[i];
|