poe-svelte-ui-lib 1.6.1 → 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/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 'svelte/store';
3
- import { t } from './locales/i18n';
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, ($t) => {
7
+ export const optionsStore = derived(t, $t => {
8
8
  return {
9
9
  HEADER_OPTIONS: [
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!' },
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: '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') },
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: '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') },
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: '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') },
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: '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') },
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: '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') },
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: 'text', name: $t('constructor.props.valuetype.text') },
43
- { id: id(), value: 'number', name: $t('constructor.props.valuetype.number') },
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: 'single', name: $t('constructor.props.type.single') },
47
- { id: id(), value: 'range', name: $t('constructor.props.type.range') },
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: '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') },
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: '', 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' },
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: '', 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' },
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: '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') },
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: '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') },
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: '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') },
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: '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: '' },
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: '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') },
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('constructor.props.type.main') },
102
- { id: id(), value: true, name: $t('constructor.props.type.sub') },
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: 'file', name: $t('constructor.props.type.file') },
106
- { id: id(), value: 'image', name: $t('constructor.props.type.image') },
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: 'cover', name: $t('constructor.props.type.cover') },
110
- { id: id(), value: 'contain', name: $t('constructor.props.type.contain') },
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: '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') },
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: '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') },
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: 'square', name: $t('constructor.props.type.square') },
125
- { id: id(), value: 'circle', name: $t('constructor.props.type.circle') },
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: 'table', name: $t('constructor.props.table.type.table') },
129
- { id: id(), value: 'logger', name: $t('constructor.props.table.type.logger') },
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: '10' },
133
- { id: crypto.randomUUID(), value: 50, name: '50' },
134
- { id: crypto.randomUUID(), value: 100, name: '100' },
135
- { id: crypto.randomUUID(), value: 500, name: '500' },
136
- { id: crypto.randomUUID(), value: 1000, name: '1000' },
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: 'on', name: $t('constructor.props.autocomplete.on') },
140
- { id: id(), value: 'off', name: $t('constructor.props.autocomplete.off') },
141
- { id: id(), value: 'given-name', name: $t('constructor.props.autocomplete.given-name') },
142
- { id: id(), value: 'family-name', name: $t('constructor.props.autocomplete.family-name') },
143
- { id: id(), value: 'nickname', name: $t('constructor.props.autocomplete.nickname') },
144
- { id: id(), value: 'username', name: $t('constructor.props.autocomplete.username') },
145
- { id: id(), value: 'new-password', name: $t('constructor.props.autocomplete.new-password') },
146
- { id: id(), value: 'current-password', name: $t('constructor.props.autocomplete.current-password') },
147
- { id: id(), value: 'organization-title', name: $t('constructor.props.autocomplete.organization-title') },
148
- { id: id(), value: 'country-name', name: $t('constructor.props.autocomplete.country-name') },
149
- { id: id(), value: 'address-level1', name: $t('constructor.props.autocomplete.address-level1') },
150
- { id: id(), value: 'address-level2', name: $t('constructor.props.autocomplete.address-level2') },
151
- { id: id(), value: 'street-address', name: $t('constructor.props.autocomplete.street-address') },
152
- { id: id(), value: 'postal-code', name: $t('constructor.props.autocomplete.postal-code') },
153
- { id: id(), value: 'email', name: $t('constructor.props.autocomplete.email') },
154
- { id: id(), value: 'tel', name: $t('constructor.props.autocomplete.tel') },
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: 'on', name: $t('constructor.props.autocomplete.on') },
159
- { id: id(), value: 'off', name: $t('constructor.props.autocomplete.off') },
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: 'name', name: $t('constructor.props.autocomplete.name') },
162
- { id: id(), value: 'honorific-prefix', name: $t('constructor.props.autocomplete.honorific-prefix') },
163
- { id: id(), value: 'given-name', name: $t('constructor.props.autocomplete.given-name') },
164
- { id: id(), value: 'additional-name', name: $t('constructor.props.autocomplete.additional-name') },
165
- { id: id(), value: 'family-name', name: $t('constructor.props.autocomplete.family-name') },
166
- { id: id(), value: 'honorific-suffix', name: $t('constructor.props.autocomplete.honorific-suffix') },
167
- { id: id(), value: 'nickname', name: $t('constructor.props.autocomplete.nickname') },
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: 'username', name: $t('constructor.props.autocomplete.username') },
170
- { id: id(), value: 'new-password', name: $t('constructor.props.autocomplete.new-password') },
171
- { id: id(), value: 'current-password', name: $t('constructor.props.autocomplete.current-password') },
172
- { id: id(), value: 'one-time-code', name: $t('constructor.props.autocomplete.one-time-code') },
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: 'organization-title', name: $t('constructor.props.autocomplete.organization-title') },
175
- { id: id(), value: 'organization', name: $t('constructor.props.autocomplete.organization') },
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: 'street-address', name: $t('constructor.props.autocomplete.street-address') },
178
- { id: id(), value: 'address-line1', name: $t('constructor.props.autocomplete.address-line1') },
179
- { id: id(), value: 'address-line2', name: $t('constructor.props.autocomplete.address-line2') },
180
- { id: id(), value: 'address-line3', name: $t('constructor.props.autocomplete.address-line3') },
181
- { id: id(), value: 'address-level4', name: $t('constructor.props.autocomplete.address-level4') },
182
- { id: id(), value: 'address-level3', name: $t('constructor.props.autocomplete.address-level3') },
183
- { id: id(), value: 'address-level2', name: $t('constructor.props.autocomplete.address-level2') },
184
- { id: id(), value: 'address-level1', name: $t('constructor.props.autocomplete.address-level1') },
185
- { id: id(), value: 'country', name: $t('constructor.props.autocomplete.country') },
186
- { id: id(), value: 'country-name', name: $t('constructor.props.autocomplete.country-name') },
187
- { id: id(), value: 'postal-code', name: $t('constructor.props.autocomplete.postal-code') },
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: 'cc-name', name: $t('constructor.props.autocomplete.cc-name') },
190
- { id: id(), value: 'cc-given-name', name: $t('constructor.props.autocomplete.cc-given-name') },
191
- { id: id(), value: 'cc-additional-name', name: $t('constructor.props.autocomplete.cc-additional-name') },
192
- { id: id(), value: 'cc-family-name', name: $t('constructor.props.autocomplete.cc-family-name') },
193
- { id: id(), value: 'cc-number', name: $t('constructor.props.autocomplete.cc-number') },
194
- { id: id(), value: 'cc-exp', name: $t('constructor.props.autocomplete.cc-exp') },
195
- { id: id(), value: 'cc-exp-month', name: $t('constructor.props.autocomplete.cc-exp-month') },
196
- { id: id(), value: 'cc-exp-year', name: $t('constructor.props.autocomplete.cc-exp-year') },
197
- { id: id(), value: 'cc-csc', name: $t('constructor.props.autocomplete.cc-csc') },
198
- { id: id(), value: 'cc-type', name: $t('constructor.props.autocomplete.cc-type') },
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: 'transaction-currency', name: $t('constructor.props.autocomplete.transaction-currency') },
201
- { id: id(), value: 'transaction-amount', name: $t('constructor.props.autocomplete.transaction-amount') },
202
- { id: id(), value: 'language', name: $t('constructor.props.autocomplete.language') },
203
- { id: id(), value: 'bday', name: $t('constructor.props.autocomplete.bday') },
204
- { id: id(), value: 'bday-day', name: $t('constructor.props.autocomplete.bday-day') },
205
- { id: id(), value: 'bday-month', name: $t('constructor.props.autocomplete.bday-month') },
206
- { id: id(), value: 'bday-year', name: $t('constructor.props.autocomplete.bday-year') },
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: 'sex', name: $t('constructor.props.autocomplete.sex') },
209
- { id: id(), value: 'url', name: $t('constructor.props.autocomplete.url') },
210
- { id: id(), value: 'photo', name: $t('constructor.props.autocomplete.photo') },
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: 'email', name: $t('constructor.props.autocomplete.email') },
213
- { id: id(), value: 'tel', name: $t('constructor.props.autocomplete.tel') },
214
- { id: id(), value: 'tel-country-code', name: $t('constructor.props.autocomplete.tel-country-code') },
215
- { id: id(), value: 'tel-national', name: $t('constructor.props.autocomplete.tel-national') },
216
- { id: id(), value: 'tel-area-code', name: $t('constructor.props.autocomplete.tel-area-code') },
217
- { id: id(), value: 'tel-local', name: $t('constructor.props.autocomplete.tel-local') },
218
- { id: id(), value: 'tel-local-prefix', name: $t('constructor.props.autocomplete.tel-local-prefix') },
219
- { id: id(), value: 'tel-local-suffix', name: $t('constructor.props.autocomplete.tel-local-suffix') },
220
- { id: id(), value: 'tel-extension', name: $t('constructor.props.autocomplete.tel-extension') },
221
- { id: id(), value: 'impp', name: $t('constructor.props.autocomplete.impp') },
222
- { id: id(), value: 'fax', name: $t('constructor.props.autocomplete.fax') },
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 'svelte';
2
- import type { Writable } from 'svelte/store';
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?: 'full' | 'viewOnly' | 'hidden';
30
- type: 'Button' | 'Accordion' | 'Input' | 'Select' | 'Switch' | 'ColorPicker' | 'Slider' | 'TextField' | 'Joystick' | 'ProgressBar' | 'Graph' | 'Table' | 'Tabs' | 'FileAttach' | 'Map';
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: 'top' | 'bottom' | 'left' | 'right';
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?: 'text' | 'password' | 'number' | 'text-area';
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?: '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;
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?: 'select' | 'buttons' | 'input';
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?: 'horizontal' | 'vertical' | 'checkbox';
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?: 'single' | 'range';
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?: 'small' | 'base' | 'large' | 'huge' | 'massive';
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?: 'horizontal' | 'vertical';
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?: 'left' | 'center' | 'right';
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
- buttons?: {
245
- name: string | ((row: T) => string);
246
- class?: string | ((row: T) => string);
247
- eventHandler?: IUIComponentHandler;
248
- onClick?: (row: T) => void;
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?: 'table' | 'logger';
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?: 'file' | 'image';
354
+ type?: "file" | "image";
348
355
  accept?: string;
349
356
  imageSize?: {
350
357
  height?: string;
351
358
  width?: string;
352
- fitMode?: 'cover' | 'contain';
353
- form?: 'square' | 'circle';
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];