@htmlbricks/hb-input-array-tags 0.60.40

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/manifest.json ADDED
@@ -0,0 +1,341 @@
1
+ {
2
+ "definitions": {
3
+ "events": {
4
+ "$ref": "#/definitions/Events",
5
+ "$schema": "http://json-schema.org/draft-07/schema#",
6
+ "definitions": {
7
+ "Events": {
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "setVal": {
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "id": {
14
+ "type": "string"
15
+ },
16
+ "valid": {
17
+ "type": "boolean"
18
+ },
19
+ "value": {
20
+ "type": "string"
21
+ }
22
+ },
23
+ "required": [
24
+ "value",
25
+ "valid",
26
+ "id"
27
+ ],
28
+ "type": "object"
29
+ }
30
+ },
31
+ "required": [
32
+ "setVal"
33
+ ],
34
+ "type": "object"
35
+ }
36
+ }
37
+ },
38
+ "component": {
39
+ "$ref": "#/definitions/Component",
40
+ "$schema": "http://json-schema.org/draft-07/schema#",
41
+ "definitions": {
42
+ "Component": {
43
+ "additionalProperties": false,
44
+ "properties": {
45
+ "id": {
46
+ "type": "string"
47
+ },
48
+ "schemaentry": {
49
+ "$ref": "#/definitions/FormSchemaEntry"
50
+ },
51
+ "show_validation": {
52
+ "enum": [
53
+ "yes",
54
+ "no"
55
+ ],
56
+ "type": "string"
57
+ },
58
+ "style": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "type": "object"
63
+ },
64
+ "FormSchemaEntry": {
65
+ "additionalProperties": false,
66
+ "properties": {
67
+ "id": {
68
+ "description": "This will be both the key of the object when submitting the form's data, and also the id in the DOM.",
69
+ "type": "string"
70
+ },
71
+ "params": {
72
+ "additionalProperties": false,
73
+ "description": "Other parameters that may be specific to a certain kind of form control.",
74
+ "properties": {
75
+ "addTagLabel": {
76
+ "type": "string"
77
+ },
78
+ "allowRemove": {
79
+ "type": "boolean"
80
+ },
81
+ "availableTags": {
82
+ "items": {
83
+ "$ref": "#/definitions/Tag"
84
+ },
85
+ "type": "array"
86
+ },
87
+ "colorVarName": {
88
+ "type": "string"
89
+ },
90
+ "freeTag": {
91
+ "type": "boolean"
92
+ }
93
+ },
94
+ "type": "object"
95
+ },
96
+ "placeholder": {
97
+ "type": "string"
98
+ },
99
+ "readonly": {
100
+ "type": "boolean"
101
+ },
102
+ "required": {
103
+ "description": "This doesn't matter if the dependencies requirements aren't met.",
104
+ "type": "boolean"
105
+ },
106
+ "validationRegex": {
107
+ "type": "string"
108
+ },
109
+ "validationTip": {
110
+ "description": "Shows if value is not valid.",
111
+ "type": "string"
112
+ },
113
+ "value": {
114
+ "description": "Optional default value.",
115
+ "items": {
116
+ "$ref": "#/definitions/Tag"
117
+ },
118
+ "type": "array"
119
+ }
120
+ },
121
+ "required": [
122
+ "id",
123
+ "params"
124
+ ],
125
+ "type": "object"
126
+ },
127
+ "Tag": {
128
+ "additionalProperties": false,
129
+ "properties": {
130
+ "colorVarName": {
131
+ "type": "string"
132
+ },
133
+ "icon": {
134
+ "type": "string"
135
+ },
136
+ "id": {
137
+ "type": "string"
138
+ },
139
+ "label": {
140
+ "type": "string"
141
+ },
142
+ "type": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ "required": [
147
+ "label",
148
+ "id"
149
+ ],
150
+ "type": "object"
151
+ }
152
+ }
153
+ }
154
+ },
155
+ "description": "",
156
+ "storybookArgs": {
157
+ "schemaentry": {
158
+ "control": {
159
+ "type": "object"
160
+ }
161
+ },
162
+ "show_validation": {
163
+ "control": {
164
+ "type": "boolean"
165
+ }
166
+ },
167
+ "setVal": {
168
+ "action": "setVal"
169
+ }
170
+ },
171
+ "styleSetup": {
172
+ "vars": [
173
+ {
174
+ "name": "--bs-primary",
175
+ "valueType": "color",
176
+ "theme": "bootstrap",
177
+ "defaultValue": "#07689f"
178
+ },
179
+ {
180
+ "name": "--bs-secondary",
181
+ "valueType": "color",
182
+ "theme": "bootstrap",
183
+ "defaultValue": "#c9d6df"
184
+ },
185
+ {
186
+ "name": "--bs-success",
187
+ "valueType": "color",
188
+ "theme": "bootstrap",
189
+ "defaultValue": "#11d3bc"
190
+ },
191
+ {
192
+ "name": "--bs-info",
193
+ "valueType": "color",
194
+ "theme": "bootstrap",
195
+ "defaultValue": "#a2d5f2"
196
+ },
197
+ {
198
+ "name": "--bs-warning",
199
+ "valueType": "color",
200
+ "theme": "bootstrap",
201
+ "defaultValue": "#ffc107"
202
+ },
203
+ {
204
+ "name": "--bs-danger",
205
+ "valueType": "color",
206
+ "theme": "bootstrap",
207
+ "defaultValue": "#f67280"
208
+ }
209
+ ],
210
+ "parts": [
211
+ {
212
+ "name": "properties-container",
213
+ "description": "properties container"
214
+ }
215
+ ]
216
+ },
217
+ "contributors": [],
218
+ "htmlSlots": [
219
+ {
220
+ "name": "add-object-label",
221
+ "description": "add property label"
222
+ }
223
+ ],
224
+ "i18n": [],
225
+ "examples": [
226
+ {
227
+ "name": "default",
228
+ "data": {
229
+ "schemaentry": {
230
+ "placeholder": "Insert your last name here...",
231
+ "id": "lastsName",
232
+ "validationTip": "This field cannot be empty.",
233
+ "params": {
234
+ "freeTag": true,
235
+ "allowRemove": true
236
+ }
237
+ }
238
+ }
239
+ },
240
+ {
241
+ "name": "withTags",
242
+ "data": {
243
+ "schemaentry": {
244
+ "placeholder": "Insert your last name here...",
245
+ "id": "lastNamwe",
246
+ "params": {
247
+ "freeTag": true,
248
+ "availableTags": [
249
+ {
250
+ "label": "tag1",
251
+ "id": "tag1"
252
+ },
253
+ {
254
+ "label": "tag2",
255
+ "id": "tag2"
256
+ },
257
+ {
258
+ "label": "tag3",
259
+ "id": "tag3"
260
+ }
261
+ ],
262
+ "allowRemove": true
263
+ }
264
+ }
265
+ }
266
+ },
267
+ {
268
+ "name": "withValues",
269
+ "data": {
270
+ "schemaentry": {
271
+ "value": [
272
+ {
273
+ "label": "tag1",
274
+ "id": "tag1"
275
+ },
276
+ {
277
+ "label": "tag2",
278
+ "id": "tag2"
279
+ },
280
+ {
281
+ "label": "tag3",
282
+ "id": "tag3"
283
+ }
284
+ ],
285
+ "placeholder": "Insert your last name here...",
286
+ "id": "lastNames",
287
+ "params": {
288
+ "freeTag": true,
289
+ "allowRemove": true
290
+ }
291
+ }
292
+ }
293
+ },
294
+ {
295
+ "name": "withColor",
296
+ "data": {
297
+ "schemaentry": {
298
+ "value": [
299
+ {
300
+ "label": "tag1",
301
+ "id": "tag1"
302
+ },
303
+ {
304
+ "label": "tag2",
305
+ "id": "tag2"
306
+ },
307
+ {
308
+ "label": "tag3",
309
+ "id": "tag3"
310
+ }
311
+ ],
312
+ "id": "lastNamed",
313
+ "params": {
314
+ "colorVarName": "--bs-primary",
315
+ "freeTag": true,
316
+ "allowRemove": true
317
+ }
318
+ }
319
+ }
320
+ }
321
+ ],
322
+ "screenshots": [],
323
+ "licenses": [
324
+ {
325
+ "type": "Apache-2.0",
326
+ "path": "LICENSE.md",
327
+ "cost": 0,
328
+ "currency": "EUR"
329
+ }
330
+ ],
331
+ "readmePath": "README.md",
332
+ "name": "hb-input-array-tags",
333
+ "category": "input",
334
+ "tags": [
335
+ "input"
336
+ ],
337
+ "size": {},
338
+ "iifePath": "main.iife.js",
339
+ "repoName": "@htmlbricks/hb-input-array-tags",
340
+ "version": "0.60.40"
341
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@htmlbricks/hb-input-array-tags",
3
+ "version": "0.60.40",
4
+ "contributors": [],
5
+ "description": "",
6
+ "licenses": [
7
+ {
8
+ "type": "Apache-2.0",
9
+ "path": "LICENSE.md",
10
+ "cost": 0,
11
+ "currency": "EUR"
12
+ }
13
+ ],
14
+ "main": "main.iife.js",
15
+ "dependencies": {},
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "private": false
20
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "$ref": "#/definitions/Component",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "Component": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "id": {
9
+ "type": "string"
10
+ },
11
+ "schemaentry": {
12
+ "$ref": "#/definitions/FormSchemaEntry"
13
+ },
14
+ "show_validation": {
15
+ "enum": [
16
+ "yes",
17
+ "no"
18
+ ],
19
+ "type": "string"
20
+ },
21
+ "style": {
22
+ "type": "string"
23
+ }
24
+ },
25
+ "type": "object"
26
+ },
27
+ "FormSchemaEntry": {
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "id": {
31
+ "description": "This will be both the key of the object when submitting the form's data, and also the id in the DOM.",
32
+ "type": "string"
33
+ },
34
+ "params": {
35
+ "additionalProperties": false,
36
+ "description": "Other parameters that may be specific to a certain kind of form control.",
37
+ "properties": {
38
+ "addTagLabel": {
39
+ "type": "string"
40
+ },
41
+ "allowRemove": {
42
+ "type": "boolean"
43
+ },
44
+ "availableTags": {
45
+ "items": {
46
+ "$ref": "#/definitions/Tag"
47
+ },
48
+ "type": "array"
49
+ },
50
+ "colorVarName": {
51
+ "type": "string"
52
+ },
53
+ "freeTag": {
54
+ "type": "boolean"
55
+ }
56
+ },
57
+ "type": "object"
58
+ },
59
+ "placeholder": {
60
+ "type": "string"
61
+ },
62
+ "readonly": {
63
+ "type": "boolean"
64
+ },
65
+ "required": {
66
+ "description": "This doesn't matter if the dependencies requirements aren't met.",
67
+ "type": "boolean"
68
+ },
69
+ "validationRegex": {
70
+ "type": "string"
71
+ },
72
+ "validationTip": {
73
+ "description": "Shows if value is not valid.",
74
+ "type": "string"
75
+ },
76
+ "value": {
77
+ "description": "Optional default value.",
78
+ "items": {
79
+ "$ref": "#/definitions/Tag"
80
+ },
81
+ "type": "array"
82
+ }
83
+ },
84
+ "required": [
85
+ "id",
86
+ "params"
87
+ ],
88
+ "type": "object"
89
+ },
90
+ "Tag": {
91
+ "additionalProperties": false,
92
+ "properties": {
93
+ "colorVarName": {
94
+ "type": "string"
95
+ },
96
+ "icon": {
97
+ "type": "string"
98
+ },
99
+ "id": {
100
+ "type": "string"
101
+ },
102
+ "label": {
103
+ "type": "string"
104
+ },
105
+ "type": {
106
+ "type": "string"
107
+ }
108
+ },
109
+ "required": [
110
+ "label",
111
+ "id"
112
+ ],
113
+ "type": "object"
114
+ }
115
+ }
116
+ }
117
+
@@ -0,0 +1,52 @@
1
+ export type Tag = { label: string, id: string, type?: string, colorVarName?: string, icon?: string }
2
+
3
+
4
+ export type FormSchemaEntry = {
5
+ /**
6
+ * This will be both the key of the object when submitting the form's data,
7
+ * and also the id in the DOM.
8
+ */
9
+ id: string;
10
+
11
+ /**
12
+ * Optional default value.
13
+ */
14
+ value?: Tag[]
15
+
16
+ readonly?: boolean;
17
+
18
+ /**
19
+ * This doesn't matter if the dependencies requirements aren't met.
20
+ */
21
+ required?: boolean;
22
+
23
+ validationRegex?: string;
24
+ /**
25
+ * Shows if value is not valid.
26
+ */
27
+ validationTip?: string;
28
+
29
+ placeholder?: string;
30
+
31
+ /**
32
+ * Other parameters that may be specific to a certain kind of form control.
33
+ */
34
+ params: {
35
+ availableTags?: Tag[]
36
+ freeTag?: boolean
37
+ colorVarName?: string
38
+ allowRemove?: boolean
39
+ addTagLabel?: string
40
+ };
41
+ };
42
+
43
+ export type Component = {
44
+ id?: string;
45
+ style?: string;
46
+ show_validation?: "yes" | "no";
47
+ schemaentry: FormSchemaEntry | undefined;
48
+ };
49
+
50
+ export type Events = {
51
+ setVal: { value: string; valid: boolean; id: string };
52
+ };
@@ -0,0 +1,36 @@
1
+ {
2
+ "$ref": "#/definitions/Events",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "Events": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "setVal": {
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "id": {
12
+ "type": "string"
13
+ },
14
+ "valid": {
15
+ "type": "boolean"
16
+ },
17
+ "value": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": [
22
+ "value",
23
+ "valid",
24
+ "id"
25
+ ],
26
+ "type": "object"
27
+ }
28
+ },
29
+ "required": [
30
+ "setVal"
31
+ ],
32
+ "type": "object"
33
+ }
34
+ }
35
+ }
36
+