@prolibu-suite/cobalt-form-builder 0.2.0
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/CobaltFormBuilder.vue.d.ts +200 -0
- package/dist/CobaltFormBuilder.vue.d.ts.map +1 -0
- package/dist/cobalt-form-builder.cjs +2 -0
- package/dist/cobalt-form-builder.cjs.map +1 -0
- package/dist/cobalt-form-builder.css +1 -0
- package/dist/cobalt-form-builder.js +3446 -0
- package/dist/cobalt-form-builder.js.map +1 -0
- package/dist/components/DesignerTab.vue.d.ts +4 -0
- package/dist/components/DesignerTab.vue.d.ts.map +1 -0
- package/dist/components/EditableText.vue.d.ts +19 -0
- package/dist/components/EditableText.vue.d.ts.map +1 -0
- package/dist/components/FieldCanvas.vue.d.ts +4 -0
- package/dist/components/FieldCanvas.vue.d.ts.map +1 -0
- package/dist/components/FieldCard.vue.d.ts +9 -0
- package/dist/components/FieldCard.vue.d.ts.map +1 -0
- package/dist/components/FieldCardExpanded.vue.d.ts +8 -0
- package/dist/components/FieldCardExpanded.vue.d.ts.map +1 -0
- package/dist/components/FieldToolbox.vue.d.ts +4 -0
- package/dist/components/FieldToolbox.vue.d.ts.map +1 -0
- package/dist/components/JsonTab.vue.d.ts +4 -0
- package/dist/components/JsonTab.vue.d.ts.map +1 -0
- package/dist/components/PageCard.vue.d.ts +7 -0
- package/dist/components/PageCard.vue.d.ts.map +1 -0
- package/dist/components/PreviewTab.vue.d.ts +4 -0
- package/dist/components/PreviewTab.vue.d.ts.map +1 -0
- package/dist/components/PropertiesPanel.vue.d.ts +4 -0
- package/dist/components/PropertiesPanel.vue.d.ts.map +1 -0
- package/dist/fieldCatalog.d.ts +17 -0
- package/dist/fieldCatalog.d.ts.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/stores/schema.d.ts +193 -0
- package/dist/stores/schema.d.ts.map +1 -0
- package/examples/01-contact-form.json +36 -0
- package/examples/02-nps-survey.json +59 -0
- package/examples/03-quiz-vue3.json +59 -0
- package/examples/04-event-registration.json +100 -0
- package/examples/05-themed-dark-form.json +56 -0
- package/examples/06-culture-survey.json +99 -0
- package/examples/07-crm-quotation.json +70 -0
- package/examples/08-landing-page-embed.json +142 -0
- package/package.json +54 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Solicitud Premium",
|
|
3
|
+
"description": "Acceso anticipado a features exclusivas",
|
|
4
|
+
"theme": {
|
|
5
|
+
"colorScheme": "dark",
|
|
6
|
+
"accent": "custom",
|
|
7
|
+
"accentHex": "#F32A73",
|
|
8
|
+
"borderRadius": "rounded",
|
|
9
|
+
"density": "comfortable",
|
|
10
|
+
"background": {
|
|
11
|
+
"color": "#0F1420",
|
|
12
|
+
"imageUrl": "https://images.unsplash.com/photo-1557683316-973673baf926?w=1920&q=80",
|
|
13
|
+
"imageSize": "cover",
|
|
14
|
+
"imageAttachment": "fixed",
|
|
15
|
+
"opacity": 100
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"pages": [
|
|
19
|
+
{
|
|
20
|
+
"name": "main",
|
|
21
|
+
"title": "Cuéntanos sobre ti",
|
|
22
|
+
"fields": {
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "String",
|
|
25
|
+
"required": true,
|
|
26
|
+
"label": "Nombre",
|
|
27
|
+
"full": true
|
|
28
|
+
},
|
|
29
|
+
"email": {
|
|
30
|
+
"type": "String",
|
|
31
|
+
"required": true,
|
|
32
|
+
"format": "email",
|
|
33
|
+
"label": "Email"
|
|
34
|
+
},
|
|
35
|
+
"company": {
|
|
36
|
+
"type": "String",
|
|
37
|
+
"label": "Empresa"
|
|
38
|
+
},
|
|
39
|
+
"use_case": {
|
|
40
|
+
"type": "String",
|
|
41
|
+
"uiCom": "TextArea",
|
|
42
|
+
"label": "¿Para qué planeas usarlo?",
|
|
43
|
+
"required": true,
|
|
44
|
+
"full": true,
|
|
45
|
+
"minLength": 20
|
|
46
|
+
},
|
|
47
|
+
"team_size": {
|
|
48
|
+
"type": "String",
|
|
49
|
+
"enum": ["1-5", "6-20", "21-100", "100+"],
|
|
50
|
+
"label": "Tamaño del equipo",
|
|
51
|
+
"full": true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Auditoría de cultura organizacional",
|
|
3
|
+
"description": "Anónima · 5 min · resultados a tu equipo",
|
|
4
|
+
"pages": [
|
|
5
|
+
{
|
|
6
|
+
"name": "context",
|
|
7
|
+
"title": "Contexto",
|
|
8
|
+
"fields": {
|
|
9
|
+
"intro_section": {
|
|
10
|
+
"uiCom": "Section",
|
|
11
|
+
"label": "Sobre ti",
|
|
12
|
+
"helperText": "Tu rol y tiempo en la empresa nos ayudan a segmentar.",
|
|
13
|
+
"full": true
|
|
14
|
+
},
|
|
15
|
+
"department": {
|
|
16
|
+
"type": "String",
|
|
17
|
+
"enum": ["Engineering", "Product", "Design", "Sales", "Marketing", "Ops", "Otro"],
|
|
18
|
+
"label": "Departamento",
|
|
19
|
+
"required": true
|
|
20
|
+
},
|
|
21
|
+
"tenure": {
|
|
22
|
+
"type": "String",
|
|
23
|
+
"enum": ["<1 año", "1-3 años", "3-5 años", "5+ años"],
|
|
24
|
+
"label": "Antigüedad",
|
|
25
|
+
"required": true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "ratings",
|
|
31
|
+
"title": "Califica tu experiencia",
|
|
32
|
+
"fields": {
|
|
33
|
+
"wellbeing_section": {
|
|
34
|
+
"uiCom": "Section",
|
|
35
|
+
"label": "Bienestar",
|
|
36
|
+
"full": true
|
|
37
|
+
},
|
|
38
|
+
"work_life_balance": {
|
|
39
|
+
"type": "Number",
|
|
40
|
+
"uiCom": "Rating",
|
|
41
|
+
"max": 5,
|
|
42
|
+
"label": "Balance vida-trabajo",
|
|
43
|
+
"full": true
|
|
44
|
+
},
|
|
45
|
+
"team_section": {
|
|
46
|
+
"uiCom": "Section",
|
|
47
|
+
"label": "Equipo y manager",
|
|
48
|
+
"full": true
|
|
49
|
+
},
|
|
50
|
+
"manager_trust": {
|
|
51
|
+
"type": "Number",
|
|
52
|
+
"uiCom": "Rating",
|
|
53
|
+
"max": 5,
|
|
54
|
+
"label": "Confianza en tu manager",
|
|
55
|
+
"full": true
|
|
56
|
+
},
|
|
57
|
+
"team_psychological_safety": {
|
|
58
|
+
"type": "Number",
|
|
59
|
+
"uiCom": "Rating",
|
|
60
|
+
"max": 5,
|
|
61
|
+
"label": "Te sientes seguro/a expresando opiniones",
|
|
62
|
+
"full": true
|
|
63
|
+
},
|
|
64
|
+
"growth_section": {
|
|
65
|
+
"uiCom": "Section",
|
|
66
|
+
"label": "Crecimiento",
|
|
67
|
+
"full": true
|
|
68
|
+
},
|
|
69
|
+
"career_growth": {
|
|
70
|
+
"type": "Number",
|
|
71
|
+
"uiCom": "Slider",
|
|
72
|
+
"min": 0,
|
|
73
|
+
"max": 100,
|
|
74
|
+
"step": 5,
|
|
75
|
+
"label": "Oportunidades de crecimiento (0=ninguna, 100=excelentes)",
|
|
76
|
+
"full": true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "open",
|
|
82
|
+
"title": "Comentarios abiertos",
|
|
83
|
+
"fields": {
|
|
84
|
+
"best": {
|
|
85
|
+
"type": "String",
|
|
86
|
+
"uiCom": "TextArea",
|
|
87
|
+
"label": "¿Qué es lo MEJOR de trabajar aquí?",
|
|
88
|
+
"full": true
|
|
89
|
+
},
|
|
90
|
+
"worst": {
|
|
91
|
+
"type": "String",
|
|
92
|
+
"uiCom": "TextArea",
|
|
93
|
+
"label": "¿Qué cambiarías si pudieras?",
|
|
94
|
+
"full": true
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Crear cotización",
|
|
3
|
+
"pages": [
|
|
4
|
+
{
|
|
5
|
+
"name": "main",
|
|
6
|
+
"title": "Información general",
|
|
7
|
+
"fields": {
|
|
8
|
+
"title": {
|
|
9
|
+
"type": "String",
|
|
10
|
+
"required": true,
|
|
11
|
+
"label": "Título de la cotización",
|
|
12
|
+
"full": true,
|
|
13
|
+
"placeholder": "Renovación licencia 2026"
|
|
14
|
+
},
|
|
15
|
+
"contact": {
|
|
16
|
+
"type": "ObjectId",
|
|
17
|
+
"ref": "Contact",
|
|
18
|
+
"displayName": "name",
|
|
19
|
+
"label": "Contacto principal",
|
|
20
|
+
"required": true
|
|
21
|
+
},
|
|
22
|
+
"company": {
|
|
23
|
+
"type": "ObjectId",
|
|
24
|
+
"ref": "Company",
|
|
25
|
+
"displayName": "name",
|
|
26
|
+
"label": "Empresa",
|
|
27
|
+
"required": true
|
|
28
|
+
},
|
|
29
|
+
"owner": {
|
|
30
|
+
"type": "ObjectId",
|
|
31
|
+
"ref": "User",
|
|
32
|
+
"displayName": "email",
|
|
33
|
+
"label": "Responsable interno"
|
|
34
|
+
},
|
|
35
|
+
"currency": {
|
|
36
|
+
"type": "String",
|
|
37
|
+
"enum": ["USD", "COP", "MXN", "EUR"],
|
|
38
|
+
"label": "Moneda",
|
|
39
|
+
"default": "USD"
|
|
40
|
+
},
|
|
41
|
+
"valid_until": {
|
|
42
|
+
"type": "Date",
|
|
43
|
+
"required": true,
|
|
44
|
+
"label": "Válida hasta"
|
|
45
|
+
},
|
|
46
|
+
"notes": {
|
|
47
|
+
"type": "String",
|
|
48
|
+
"uiCom": "TextArea",
|
|
49
|
+
"label": "Notas internas",
|
|
50
|
+
"full": true,
|
|
51
|
+
"placeholder": "Condiciones especiales, descuentos negociados…"
|
|
52
|
+
},
|
|
53
|
+
"send_copy": {
|
|
54
|
+
"type": "Boolean",
|
|
55
|
+
"label": "Enviar copia al cliente",
|
|
56
|
+
"default": true,
|
|
57
|
+
"full": true
|
|
58
|
+
},
|
|
59
|
+
"client_email": {
|
|
60
|
+
"type": "String",
|
|
61
|
+
"format": "email",
|
|
62
|
+
"label": "Email del cliente",
|
|
63
|
+
"visibleIf": "{send_copy} == true",
|
|
64
|
+
"requiredIf": "{send_copy} == true",
|
|
65
|
+
"full": true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Solicita acceso anticipado",
|
|
3
|
+
"description": "Únete a la lista de espera y sé de los primeros en probarlo",
|
|
4
|
+
"mode": "form",
|
|
5
|
+
"theme": {
|
|
6
|
+
"colorScheme": "light",
|
|
7
|
+
"accent": "custom",
|
|
8
|
+
"accentHex": "#7C3AED",
|
|
9
|
+
"borderRadius": "rounded",
|
|
10
|
+
"density": "comfortable",
|
|
11
|
+
"fontFamily": "Inter, system-ui, sans-serif",
|
|
12
|
+
"background": {
|
|
13
|
+
"color": "#FAF7F2",
|
|
14
|
+
"imageUrl": "https://images.unsplash.com/photo-1557683316-973673baf926?w=2000&q=80",
|
|
15
|
+
"imageSize": "cover",
|
|
16
|
+
"imageAttachment": "fixed",
|
|
17
|
+
"opacity": 100
|
|
18
|
+
},
|
|
19
|
+
"header": {
|
|
20
|
+
"show": true,
|
|
21
|
+
"backgroundColor": null,
|
|
22
|
+
"height": "180px"
|
|
23
|
+
},
|
|
24
|
+
"customCss": ".co-form-wizard__title { font-weight: 800; letter-spacing: -0.04em; background: linear-gradient(135deg, #7C3AED 0%, #F32A73 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }\n.co-form-wizard__title-desc { font-style: italic; }\n[data-co-field-kind=\"text\"] co-input::part(input),\n[data-co-field-kind=\"textarea\"] co-input::part(input) { letter-spacing: 0.01em; }\n.co-form-wizard__page-pill { text-transform: none; letter-spacing: 0.02em; font-weight: 600; font-size: 11px; }\n[data-co-field=\"company\"] { position: relative; }\n[data-co-field=\"company\"]::after { content: \"💼\"; position: absolute; right: -28px; top: 28px; opacity: 0.5; font-size: 16px; }"
|
|
25
|
+
},
|
|
26
|
+
"pages": [
|
|
27
|
+
{
|
|
28
|
+
"name": "you",
|
|
29
|
+
"title": "Cuéntanos sobre ti",
|
|
30
|
+
"description": "Solo lo esencial para reservar tu lugar.",
|
|
31
|
+
"fields": {
|
|
32
|
+
"full_name": {
|
|
33
|
+
"type": "String",
|
|
34
|
+
"required": true,
|
|
35
|
+
"label": "Nombre completo",
|
|
36
|
+
"placeholder": "María González",
|
|
37
|
+
"full": true,
|
|
38
|
+
"minLength": 2
|
|
39
|
+
},
|
|
40
|
+
"email": {
|
|
41
|
+
"type": "String",
|
|
42
|
+
"required": true,
|
|
43
|
+
"format": "email",
|
|
44
|
+
"label": "Email de trabajo",
|
|
45
|
+
"placeholder": "maria@empresa.com"
|
|
46
|
+
},
|
|
47
|
+
"company": {
|
|
48
|
+
"type": "String",
|
|
49
|
+
"required": true,
|
|
50
|
+
"label": "Empresa",
|
|
51
|
+
"placeholder": "Acme Inc."
|
|
52
|
+
},
|
|
53
|
+
"role": {
|
|
54
|
+
"type": "String",
|
|
55
|
+
"enum": [
|
|
56
|
+
"Founder / CEO",
|
|
57
|
+
"Product / Engineering",
|
|
58
|
+
"Sales / Marketing",
|
|
59
|
+
"Operations",
|
|
60
|
+
"Otro"
|
|
61
|
+
],
|
|
62
|
+
"required": true,
|
|
63
|
+
"label": "Tu rol",
|
|
64
|
+
"full": true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "context",
|
|
70
|
+
"title": "Cuéntanos un poco más",
|
|
71
|
+
"description": "Esto nos ayuda a priorizar tu acceso anticipado.",
|
|
72
|
+
"fields": {
|
|
73
|
+
"team_size": {
|
|
74
|
+
"type": "String",
|
|
75
|
+
"enum": ["1-10", "11-50", "51-200", "201-1000", "1000+"],
|
|
76
|
+
"required": true,
|
|
77
|
+
"label": "Tamaño del equipo",
|
|
78
|
+
"full": true
|
|
79
|
+
},
|
|
80
|
+
"current_tools": {
|
|
81
|
+
"type": "String",
|
|
82
|
+
"enum": [
|
|
83
|
+
"HubSpot",
|
|
84
|
+
"Salesforce",
|
|
85
|
+
"Pipedrive",
|
|
86
|
+
"Excel / Sheets",
|
|
87
|
+
"Ninguno",
|
|
88
|
+
"Otro"
|
|
89
|
+
],
|
|
90
|
+
"multiple": true,
|
|
91
|
+
"label": "Herramientas actuales (selecciona varias)",
|
|
92
|
+
"required": true,
|
|
93
|
+
"full": true
|
|
94
|
+
},
|
|
95
|
+
"use_case": {
|
|
96
|
+
"type": "String",
|
|
97
|
+
"uiCom": "TextArea",
|
|
98
|
+
"label": "¿Qué problema esperas resolver?",
|
|
99
|
+
"placeholder": "Una o dos líneas, no más.",
|
|
100
|
+
"required": true,
|
|
101
|
+
"full": true,
|
|
102
|
+
"minLength": 20,
|
|
103
|
+
"maxLength": 280
|
|
104
|
+
},
|
|
105
|
+
"priority": {
|
|
106
|
+
"type": "Number",
|
|
107
|
+
"uiCom": "Rating",
|
|
108
|
+
"max": 5,
|
|
109
|
+
"label": "¿Qué tan urgente es para ti? (1 = curiosidad, 5 = lo necesito ya)",
|
|
110
|
+
"required": true,
|
|
111
|
+
"full": true
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "extras",
|
|
117
|
+
"title": "Casi listo",
|
|
118
|
+
"description": "Detalles opcionales que mejoran tu experiencia.",
|
|
119
|
+
"fields": {
|
|
120
|
+
"newsletter": {
|
|
121
|
+
"type": "Boolean",
|
|
122
|
+
"label": "Recibir tips de producto y novedades",
|
|
123
|
+
"default": true,
|
|
124
|
+
"full": true
|
|
125
|
+
},
|
|
126
|
+
"early_partner": {
|
|
127
|
+
"type": "Boolean",
|
|
128
|
+
"label": "Me interesa ser design partner (sesiones 1-a-1 con el equipo)",
|
|
129
|
+
"default": false,
|
|
130
|
+
"full": true
|
|
131
|
+
},
|
|
132
|
+
"referral": {
|
|
133
|
+
"type": "String",
|
|
134
|
+
"label": "¿Cómo nos conociste?",
|
|
135
|
+
"placeholder": "Twitter, recomendación, blog…",
|
|
136
|
+
"full": true,
|
|
137
|
+
"visibleIf": "{newsletter} == true || {early_partner} == true"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prolibu-suite/cobalt-form-builder",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Visual builder for Cobalt Form schemas. Vue 3 component + standalone playground.",
|
|
6
|
+
"main": "./dist/cobalt-form-builder.cjs",
|
|
7
|
+
"module": "./dist/cobalt-form-builder.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/cobalt-form-builder.js",
|
|
13
|
+
"require": "./dist/cobalt-form-builder.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./style.css": "./dist/cobalt-form-builder.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"examples"
|
|
20
|
+
],
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"vue": "^3.5.0",
|
|
23
|
+
"@prolibu-suite/cobalt-core": "0.1.1",
|
|
24
|
+
"@prolibu-suite/cobalt-form": "0.2.0",
|
|
25
|
+
"@prolibu-suite/cobalt-form-core": "0.2.0",
|
|
26
|
+
"@prolibu-suite/cobalt-vue": "0.1.1",
|
|
27
|
+
"@prolibu-suite/cobalt-tokens": "0.1.1"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"vue-draggable-plus": "^0.6.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
34
|
+
"typescript": "^6.0.3",
|
|
35
|
+
"vite": "^7.1.13",
|
|
36
|
+
"vue": "^3.5.21",
|
|
37
|
+
"vue-tsc": "^3.1.3",
|
|
38
|
+
"@prolibu-suite/cobalt-core": "0.1.1",
|
|
39
|
+
"@prolibu-suite/cobalt-form-core": "0.2.0",
|
|
40
|
+
"@prolibu-suite/cobalt-tokens": "0.1.1",
|
|
41
|
+
"@prolibu-suite/cobalt-vue": "0.1.1",
|
|
42
|
+
"@prolibu-suite/cobalt-form": "0.2.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"dev": "vite",
|
|
49
|
+
"build": "vue-tsc --noEmit && vite build --mode lib && vue-tsc -p tsconfig.lib.json",
|
|
50
|
+
"build:demo": "vue-tsc --noEmit && vite build",
|
|
51
|
+
"preview": "vite preview",
|
|
52
|
+
"clean": "rm -rf dist node_modules/.vite"
|
|
53
|
+
}
|
|
54
|
+
}
|