@cxtms/cx-schema 1.0.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.
Files changed (133) hide show
  1. package/README.md +384 -0
  2. package/dist/cli.d.ts +6 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +1523 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/index.d.ts +7 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +11 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/types.d.ts +111 -0
  11. package/dist/types.d.ts.map +1 -0
  12. package/dist/types.js +6 -0
  13. package/dist/types.js.map +1 -0
  14. package/dist/utils/schemaLoader.d.ts +17 -0
  15. package/dist/utils/schemaLoader.d.ts.map +1 -0
  16. package/dist/utils/schemaLoader.js +134 -0
  17. package/dist/utils/schemaLoader.js.map +1 -0
  18. package/dist/validator.d.ts +64 -0
  19. package/dist/validator.d.ts.map +1 -0
  20. package/dist/validator.js +380 -0
  21. package/dist/validator.js.map +1 -0
  22. package/dist/workflowValidator.d.ts +64 -0
  23. package/dist/workflowValidator.d.ts.map +1 -0
  24. package/dist/workflowValidator.js +410 -0
  25. package/dist/workflowValidator.js.map +1 -0
  26. package/package.json +50 -0
  27. package/schemas/actions/all.json +26 -0
  28. package/schemas/actions/confirm.json +21 -0
  29. package/schemas/actions/consoleLog.json +16 -0
  30. package/schemas/actions/dialog.json +25 -0
  31. package/schemas/actions/fileDownload.json +16 -0
  32. package/schemas/actions/forEach.json +31 -0
  33. package/schemas/actions/if.json +12 -0
  34. package/schemas/actions/mutation.json +25 -0
  35. package/schemas/actions/navigate.json +18 -0
  36. package/schemas/actions/navigateBack.json +22 -0
  37. package/schemas/actions/navigateBackOrClose.json +21 -0
  38. package/schemas/actions/notification.json +19 -0
  39. package/schemas/actions/openBarcodeScanner.json +104 -0
  40. package/schemas/actions/query.json +32 -0
  41. package/schemas/actions/refresh.json +13 -0
  42. package/schemas/actions/resetDirtyState.json +22 -0
  43. package/schemas/actions/setFields.json +21 -0
  44. package/schemas/actions/setStore.json +13 -0
  45. package/schemas/actions/validateForm.json +15 -0
  46. package/schemas/actions/workflow.json +24 -0
  47. package/schemas/components/README.md +147 -0
  48. package/schemas/components/appComponent.json +50 -0
  49. package/schemas/components/barcodeScanner.json +69 -0
  50. package/schemas/components/button.json +123 -0
  51. package/schemas/components/calendar.json +489 -0
  52. package/schemas/components/card.json +176 -0
  53. package/schemas/components/collection.json +54 -0
  54. package/schemas/components/dataGrid.json +119 -0
  55. package/schemas/components/datasource.json +151 -0
  56. package/schemas/components/dropdown.json +57 -0
  57. package/schemas/components/field-collection.json +618 -0
  58. package/schemas/components/field.json +265 -0
  59. package/schemas/components/form.json +234 -0
  60. package/schemas/components/index.json +68 -0
  61. package/schemas/components/layout.json +69 -0
  62. package/schemas/components/module.json +138 -0
  63. package/schemas/components/navDropdown.json +36 -0
  64. package/schemas/components/navbar.json +78 -0
  65. package/schemas/components/navbarItem.json +28 -0
  66. package/schemas/components/navbarLink.json +36 -0
  67. package/schemas/components/row.json +31 -0
  68. package/schemas/components/tab.json +34 -0
  69. package/schemas/components/tabs.json +35 -0
  70. package/schemas/components/timeline.json +172 -0
  71. package/schemas/components/timelineGrid.json +324 -0
  72. package/schemas/fields/README.md +66 -0
  73. package/schemas/fields/attachment.json +156 -0
  74. package/schemas/fields/autocomplete-googleplaces.json +130 -0
  75. package/schemas/fields/checkbox.json +82 -0
  76. package/schemas/fields/date.json +88 -0
  77. package/schemas/fields/datetime.json +75 -0
  78. package/schemas/fields/email.json +75 -0
  79. package/schemas/fields/index.json +53 -0
  80. package/schemas/fields/number.json +91 -0
  81. package/schemas/fields/password.json +70 -0
  82. package/schemas/fields/radio.json +94 -0
  83. package/schemas/fields/rangedatetime.json +56 -0
  84. package/schemas/fields/select-async.json +334 -0
  85. package/schemas/fields/select.json +115 -0
  86. package/schemas/fields/tel.json +79 -0
  87. package/schemas/fields/text.json +86 -0
  88. package/schemas/fields/textarea.json +95 -0
  89. package/schemas/fields/time.json +91 -0
  90. package/schemas/fields/url.json +74 -0
  91. package/schemas/schema.graphql +10492 -0
  92. package/schemas/schemas.json +598 -0
  93. package/schemas/workflows/activity.json +111 -0
  94. package/schemas/workflows/common/condition.json +48 -0
  95. package/schemas/workflows/common/expression.json +76 -0
  96. package/schemas/workflows/common/mapping.json +134 -0
  97. package/schemas/workflows/input.json +76 -0
  98. package/schemas/workflows/output.json +41 -0
  99. package/schemas/workflows/schedule.json +26 -0
  100. package/schemas/workflows/tasks/accounting-transaction.json +95 -0
  101. package/schemas/workflows/tasks/all.json +34 -0
  102. package/schemas/workflows/tasks/attachment.json +94 -0
  103. package/schemas/workflows/tasks/charge.json +90 -0
  104. package/schemas/workflows/tasks/commodity.json +89 -0
  105. package/schemas/workflows/tasks/contact.json +82 -0
  106. package/schemas/workflows/tasks/csv.json +79 -0
  107. package/schemas/workflows/tasks/document-render.json +105 -0
  108. package/schemas/workflows/tasks/document-send.json +84 -0
  109. package/schemas/workflows/tasks/email-send.json +110 -0
  110. package/schemas/workflows/tasks/error.json +72 -0
  111. package/schemas/workflows/tasks/export.json +90 -0
  112. package/schemas/workflows/tasks/foreach.json +69 -0
  113. package/schemas/workflows/tasks/generic.json +47 -0
  114. package/schemas/workflows/tasks/graphql.json +78 -0
  115. package/schemas/workflows/tasks/httpRequest.json +119 -0
  116. package/schemas/workflows/tasks/job.json +88 -0
  117. package/schemas/workflows/tasks/log.json +73 -0
  118. package/schemas/workflows/tasks/map.json +58 -0
  119. package/schemas/workflows/tasks/order.json +87 -0
  120. package/schemas/workflows/tasks/payment.json +85 -0
  121. package/schemas/workflows/tasks/setVariable.json +76 -0
  122. package/schemas/workflows/tasks/switch.json +75 -0
  123. package/schemas/workflows/tasks/template.json +73 -0
  124. package/schemas/workflows/tasks/validation.json +90 -0
  125. package/schemas/workflows/tasks/while.json +53 -0
  126. package/schemas/workflows/tasks/workflow-execute.json +82 -0
  127. package/schemas/workflows/trigger.json +86 -0
  128. package/schemas/workflows/variable.json +46 -0
  129. package/schemas/workflows/workflow.json +172 -0
  130. package/scripts/postinstall.js +161 -0
  131. package/scripts/setup-vscode.js +80 -0
  132. package/templates/module.yaml +83 -0
  133. package/templates/workflow.yaml +100 -0
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Checkbox Field Type",
4
+ "description": "Schema for checkbox input field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "checkbox"
10
+ },
11
+ "label": {
12
+ "oneOf": [
13
+ { "type": "string" },
14
+ { "$ref": "../schemas.json#/definitions/localized" }
15
+ ],
16
+ "description": "Field label",
17
+ "x-example": {
18
+ "en-US": "I agree to the terms"
19
+ }
20
+ },
21
+ "required": {
22
+ "type": "boolean",
23
+ "description": "Whether field is required",
24
+ "x-example": false
25
+ },
26
+ "disabled": {
27
+ "type": "boolean",
28
+ "description": "Whether field is disabled",
29
+ "x-example": false
30
+ },
31
+ "defaultChecked": {
32
+ "type": "boolean",
33
+ "description": "Default checked state",
34
+ "x-example": false
35
+ },
36
+ "value": {
37
+ "oneOf": [
38
+ { "type": "string" },
39
+ { "type": "number" },
40
+ { "type": "boolean" }
41
+ ],
42
+ "description": "Value when checked",
43
+ "x-example": true
44
+ },
45
+ "uncheckedValue": {
46
+ "oneOf": [
47
+ { "type": "string" },
48
+ { "type": "number" },
49
+ { "type": "boolean" }
50
+ ],
51
+ "description": "Value when unchecked",
52
+ "x-example": false
53
+ },
54
+ "transformValue": {
55
+ "type": "object",
56
+ "description": "Value transformation configuration",
57
+ "properties": {
58
+ "onLoad": {
59
+ "type": "string",
60
+ "description": "Template expression to transform value on load"
61
+ },
62
+ "onChange": {
63
+ "type": "string",
64
+ "description": "Template expression to transform value on change"
65
+ }
66
+ }
67
+ },
68
+ "onChange": {
69
+ "$ref": "../schemas.json#/definitions/actionsList",
70
+ "description": "Actions to execute when field value changes"
71
+ },
72
+ "onBlur": {
73
+ "$ref": "../schemas.json#/definitions/actionsList",
74
+ "description": "Actions to execute when field loses focus"
75
+ },
76
+ "onFocus": {
77
+ "$ref": "../schemas.json#/definitions/actionsList",
78
+ "description": "Actions to execute when field gains focus"
79
+ }
80
+ },
81
+ "required": ["type"]
82
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Date Field Type",
4
+ "description": "Schema for date input field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "date"
10
+ },
11
+ "timezone": {
12
+ "type": "string",
13
+ "description": "Timezone identifier (e.g., America/New_York)",
14
+ "x-example": "America/New_York"
15
+ },
16
+ "label": {
17
+ "oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
18
+ "description": "Field label",
19
+ "x-example": {
20
+ "en-US": "Order Date"
21
+ }
22
+ },
23
+ "placeholder": {
24
+ "type": "string",
25
+ "description": "Field placeholder text",
26
+ "x-example": "Select date"
27
+ },
28
+ "required": {
29
+ "type": "boolean",
30
+ "description": "Whether field is required",
31
+ "x-example": true
32
+ },
33
+ "disabled": {
34
+ "type": "boolean",
35
+ "description": "Whether field is disabled",
36
+ "x-example": false
37
+ },
38
+ "min": {
39
+ "type": "string",
40
+ "format": "date",
41
+ "description": "Minimum date (YYYY-MM-DD)",
42
+ "x-example": "2024-01-01"
43
+ },
44
+ "max": {
45
+ "type": "string",
46
+ "format": "date",
47
+ "description": "Maximum date (YYYY-MM-DD)",
48
+ "x-example": "2025-12-31"
49
+ },
50
+ "format": {
51
+ "type": "string",
52
+ "description": "Date display format",
53
+ "x-example": "MM/DD/YYYY"
54
+ },
55
+ "transformValue": {
56
+ "type": "object",
57
+ "description": "Value transformation configuration",
58
+ "properties": {
59
+ "onLoad": {
60
+ "type": "string",
61
+ "description": "Template expression to transform value on load",
62
+ "x-example": "{{ format value 'YYYY-MM-DD' }}"
63
+ },
64
+ "onChange": {
65
+ "type": "string",
66
+ "description": "Template expression to transform value on change"
67
+ },
68
+ "onBlur": {
69
+ "type": "string",
70
+ "description": "Template expression to transform value on blur"
71
+ }
72
+ }
73
+ },
74
+ "onChange": {
75
+ "$ref": "../schemas.json#/definitions/actionsList",
76
+ "description": "Actions to execute when field value changes"
77
+ },
78
+ "onBlur": {
79
+ "$ref": "../schemas.json#/definitions/actionsList",
80
+ "description": "Actions to execute when field loses focus"
81
+ },
82
+ "onFocus": {
83
+ "$ref": "../schemas.json#/definitions/actionsList",
84
+ "description": "Actions to execute when field gains focus"
85
+ }
86
+ },
87
+ "required": ["type"]
88
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "DateTime Field Type",
4
+ "description": "Schema for datetime input field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": { "type": "string", "const": "datetime" },
8
+ "label": {
9
+ "oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
10
+ "description": "Field label",
11
+ "x-example": { "en-US": "Appointment Time" }
12
+ },
13
+ "placeholder": { "type": "string", "description": "Field placeholder text", "x-example": "Select date/time" },
14
+ "required": { "type": "boolean", "description": "Whether field is required", "x-example": false },
15
+ "disabled": { "type": "boolean", "description": "Whether field is disabled", "x-example": false },
16
+ "options": {
17
+ "type": "object",
18
+ "description": "DateTime configuration options",
19
+ "properties": {
20
+ "dateFormat": {
21
+ "type": "string",
22
+ "description": "Display format for the date/time",
23
+ "x-example": "MM/dd/yyyy h:mm aa"
24
+ },
25
+ "showTimeSelect": {
26
+ "type": "boolean",
27
+ "description": "Show time selection in addition to date",
28
+ "x-example": true
29
+ },
30
+ "showTimeSelectOnly": {
31
+ "type": "boolean",
32
+ "description": "Show only a time picker without date",
33
+ "x-example": false
34
+ },
35
+ "timeIntervals": { "type": "number", "description": "Time selection intervals in minutes", "x-example": 30 },
36
+ "timeCaption": { "type": "string", "description": "Label displayed for the time section", "x-example": "Time" },
37
+ "useTimezone": { "type": "boolean", "description": "Enable timezone-aware date handling", "x-example": false },
38
+ "storeAsUTC": {
39
+ "type": "boolean",
40
+ "description": "When useTimezone is true, store date/time in UTC",
41
+ "x-example": true
42
+ },
43
+ "timezone": {
44
+ "type": "string",
45
+ "description": "Fixed timezone for display (e.g., America/New_York)",
46
+ "x-example": "America/New_York"
47
+ },
48
+ "format": { "type": "string", "description": "Custom storage format; if omitted, inferred by options" }
49
+ },
50
+ "additionalProperties": true
51
+ },
52
+ "transformValue": {
53
+ "type": "object",
54
+ "description": "Value transformation configuration",
55
+ "properties": {
56
+ "onLoad": { "type": "string", "description": "Template expression to transform value on load" },
57
+ "onChange": { "type": "string", "description": "Template expression to transform value on change" },
58
+ "onBlur": { "type": "string", "description": "Template expression to transform value on blur" }
59
+ }
60
+ },
61
+ "onChange": {
62
+ "$ref": "../schemas.json#/definitions/actionsList",
63
+ "description": "Actions to execute when field value changes"
64
+ },
65
+ "onBlur": {
66
+ "$ref": "../schemas.json#/definitions/actionsList",
67
+ "description": "Actions to execute when field loses focus"
68
+ },
69
+ "onFocus": {
70
+ "$ref": "../schemas.json#/definitions/actionsList",
71
+ "description": "Actions to execute when field gains focus"
72
+ }
73
+ },
74
+ "required": ["type"]
75
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Email Field Type",
4
+ "description": "Schema for email input field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "email"
10
+ },
11
+ "label": {
12
+ "oneOf": [
13
+ { "type": "string" },
14
+ { "$ref": "../schemas.json#/definitions/localized" }
15
+ ],
16
+ "description": "Field label",
17
+ "x-example": {
18
+ "en-US": "Email Address"
19
+ }
20
+ },
21
+ "placeholder": {
22
+ "type": "string",
23
+ "description": "Field placeholder text",
24
+ "x-example": "Enter email address"
25
+ },
26
+ "required": {
27
+ "type": "boolean",
28
+ "description": "Whether field is required",
29
+ "x-example": true
30
+ },
31
+ "disabled": {
32
+ "type": "boolean",
33
+ "description": "Whether field is disabled",
34
+ "x-example": false
35
+ },
36
+ "pattern": {
37
+ "type": "string",
38
+ "description": "Custom email validation pattern",
39
+ "x-example": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
40
+ },
41
+ "transformValue": {
42
+ "type": "object",
43
+ "description": "Value transformation configuration",
44
+ "properties": {
45
+ "onLoad": {
46
+ "type": "string",
47
+ "description": "Template expression to transform value on load"
48
+ },
49
+ "onChange": {
50
+ "type": "string",
51
+ "description": "Template expression to transform value on change",
52
+ "x-example": "{{ eval value.toLowerCase().trim() }}"
53
+ },
54
+ "onBlur": {
55
+ "type": "string",
56
+ "description": "Template expression to transform value on blur",
57
+ "x-example": "{{ eval value.toLowerCase().trim() }}"
58
+ }
59
+ }
60
+ },
61
+ "onChange": {
62
+ "$ref": "../schemas.json#/definitions/actionsList",
63
+ "description": "Actions to execute when field value changes"
64
+ },
65
+ "onBlur": {
66
+ "$ref": "../schemas.json#/definitions/actionsList",
67
+ "description": "Actions to execute when field loses focus"
68
+ },
69
+ "onFocus": {
70
+ "$ref": "../schemas.json#/definitions/actionsList",
71
+ "description": "Actions to execute when field gains focus"
72
+ }
73
+ },
74
+ "required": ["type"]
75
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Field Types Index",
4
+ "description": "Index of all available field types for CargoXplorer TMS",
5
+ "definitions": {
6
+ "fieldType": {
7
+ "oneOf": [
8
+ { "$ref": "./text.json" },
9
+ { "$ref": "./number.json" },
10
+ { "$ref": "./email.json" },
11
+ { "$ref": "./password.json" },
12
+ { "$ref": "./tel.json" },
13
+ { "$ref": "./url.json" },
14
+ { "$ref": "./date.json" },
15
+ { "$ref": "./datetime.json" },
16
+ { "$ref": "./rangedatetime.json" },
17
+ { "$ref": "./time.json" },
18
+ { "$ref": "./select.json" },
19
+ { "$ref": "./select-async.json" },
20
+ { "$ref": "./autocomplete-googleplaces.json" },
21
+ { "$ref": "./checkbox.json" },
22
+ { "$ref": "./radio.json" },
23
+ { "$ref": "./textarea.json" },
24
+ { "$ref": "./attachment.json" }
25
+ ]
26
+ }
27
+ },
28
+ "fieldTypes": {
29
+ "text": { "description": "Basic text input field", "schema": "./text.json" },
30
+ "number": { "description": "Numeric input field with validation", "schema": "./number.json" },
31
+ "email": { "description": "Email input field with validation", "schema": "./email.json" },
32
+ "password": { "description": "Password input field with security features", "schema": "./password.json" },
33
+ "tel": { "description": "Telephone number input field", "schema": "./tel.json" },
34
+ "url": { "description": "URL input field with validation", "schema": "./url.json" },
35
+ "date": { "description": "Date picker field", "schema": "./date.json" },
36
+ "datetime": { "description": "Date/time picker field with timezone options", "schema": "./datetime.json" },
37
+ "rangedatetime": { "description": "Date/time range picker field", "schema": "./rangedatetime.json" },
38
+ "time": { "description": "Time picker field", "schema": "./time.json" },
39
+ "select": { "description": "Dropdown select field with static options", "schema": "./select.json" },
40
+ "select-async": {
41
+ "description": "Async dropdown select field with GraphQL queries",
42
+ "schema": "./select-async.json"
43
+ },
44
+ "autocomplete-googleplaces": {
45
+ "description": "Google Places autocomplete field for addresses",
46
+ "schema": "./autocomplete-googleplaces.json"
47
+ },
48
+ "checkbox": { "description": "Checkbox input field", "schema": "./checkbox.json" },
49
+ "radio": { "description": "Radio button group field", "schema": "./radio.json" },
50
+ "textarea": { "description": "Multi-line text input field", "schema": "./textarea.json" },
51
+ "attachment": { "description": "Attachment picker/uploader field (images or files)", "schema": "./attachment.json" }
52
+ }
53
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Number Field Type",
4
+ "description": "Schema for number input field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "number"
10
+ },
11
+ "label": {
12
+ "oneOf": [
13
+ { "type": "string" },
14
+ { "$ref": "../schemas.json#/definitions/localized" }
15
+ ],
16
+ "description": "Field label",
17
+ "x-example": {
18
+ "en-US": "Quantity"
19
+ }
20
+ },
21
+ "placeholder": {
22
+ "type": "string",
23
+ "description": "Field placeholder text",
24
+ "x-example": "Enter quantity"
25
+ },
26
+ "required": {
27
+ "type": "boolean",
28
+ "description": "Whether field is required",
29
+ "x-example": true
30
+ },
31
+ "disabled": {
32
+ "type": "boolean",
33
+ "description": "Whether field is disabled",
34
+ "x-example": false
35
+ },
36
+ "min": {
37
+ "type": "number",
38
+ "description": "Minimum value",
39
+ "x-example": 0
40
+ },
41
+ "max": {
42
+ "type": "number",
43
+ "description": "Maximum value",
44
+ "x-example": 9999
45
+ },
46
+ "step": {
47
+ "type": "number",
48
+ "description": "Step increment",
49
+ "x-example": 1
50
+ },
51
+ "decimals": {
52
+ "type": "number",
53
+ "description": "Number of decimal places",
54
+ "x-example": 2
55
+ },
56
+ "transformValue": {
57
+ "type": "object",
58
+ "description": "Value transformation configuration",
59
+ "properties": {
60
+ "onLoad": {
61
+ "type": "string",
62
+ "description": "Template expression to transform value on load",
63
+ "x-example": "{{ eval Number(value) }}"
64
+ },
65
+ "onChange": {
66
+ "type": "string",
67
+ "description": "Template expression to transform value on change",
68
+ "x-example": "{{ eval Number((pieces * quantity * unitaryValue).toFixed(2)) }}"
69
+ },
70
+ "onBlur": {
71
+ "type": "string",
72
+ "description": "Template expression to transform value on blur",
73
+ "x-example": "{{ eval Number(value).toFixed(2) }}"
74
+ }
75
+ }
76
+ },
77
+ "onChange": {
78
+ "$ref": "../schemas.json#/definitions/actionsList",
79
+ "description": "Actions to execute when field value changes"
80
+ },
81
+ "onBlur": {
82
+ "$ref": "../schemas.json#/definitions/actionsList",
83
+ "description": "Actions to execute when field loses focus"
84
+ },
85
+ "onFocus": {
86
+ "$ref": "../schemas.json#/definitions/actionsList",
87
+ "description": "Actions to execute when field gains focus"
88
+ }
89
+ },
90
+ "required": ["type"]
91
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Password Field Type",
4
+ "description": "Schema for password input field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "password"
10
+ },
11
+ "label": {
12
+ "oneOf": [
13
+ { "type": "string" },
14
+ { "$ref": "../schemas.json#/definitions/localized" }
15
+ ],
16
+ "description": "Field label",
17
+ "x-example": {
18
+ "en-US": "Password"
19
+ }
20
+ },
21
+ "placeholder": {
22
+ "type": "string",
23
+ "description": "Field placeholder text",
24
+ "x-example": "Enter password"
25
+ },
26
+ "required": {
27
+ "type": "boolean",
28
+ "description": "Whether field is required",
29
+ "x-example": true
30
+ },
31
+ "disabled": {
32
+ "type": "boolean",
33
+ "description": "Whether field is disabled",
34
+ "x-example": false
35
+ },
36
+ "minLength": {
37
+ "type": "number",
38
+ "description": "Minimum character length",
39
+ "x-example": 8
40
+ },
41
+ "maxLength": {
42
+ "type": "number",
43
+ "description": "Maximum character length",
44
+ "x-example": 128
45
+ },
46
+ "pattern": {
47
+ "type": "string",
48
+ "description": "Regex pattern for validation",
49
+ "x-example": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$"
50
+ },
51
+ "showToggle": {
52
+ "type": "boolean",
53
+ "description": "Show password visibility toggle",
54
+ "x-example": true
55
+ },
56
+ "onChange": {
57
+ "$ref": "../schemas.json#/definitions/actionsList",
58
+ "description": "Actions to execute when field value changes"
59
+ },
60
+ "onBlur": {
61
+ "$ref": "../schemas.json#/definitions/actionsList",
62
+ "description": "Actions to execute when field loses focus"
63
+ },
64
+ "onFocus": {
65
+ "$ref": "../schemas.json#/definitions/actionsList",
66
+ "description": "Actions to execute when field gains focus"
67
+ }
68
+ },
69
+ "required": ["type"]
70
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Radio Field Type",
4
+ "description": "Schema for radio button field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "radio"
10
+ },
11
+ "label": {
12
+ "oneOf": [
13
+ { "type": "string" },
14
+ { "$ref": "../schemas.json#/definitions/localized" }
15
+ ],
16
+ "description": "Field label",
17
+ "x-example": {
18
+ "en-US": "Payment Method"
19
+ }
20
+ },
21
+ "required": {
22
+ "type": "boolean",
23
+ "description": "Whether field is required",
24
+ "x-example": true
25
+ },
26
+ "disabled": {
27
+ "type": "boolean",
28
+ "description": "Whether field is disabled",
29
+ "x-example": false
30
+ },
31
+ "orientation": {
32
+ "type": "string",
33
+ "enum": ["horizontal", "vertical"],
34
+ "description": "Layout orientation of radio options",
35
+ "x-example": "vertical"
36
+ },
37
+ "items": {
38
+ "type": "array",
39
+ "description": "Radio button options",
40
+ "items": {
41
+ "type": "object",
42
+ "properties": {
43
+ "label": {
44
+ "oneOf": [
45
+ { "type": "string" },
46
+ { "$ref": "../schemas.json#/definitions/localized" }
47
+ ],
48
+ "description": "Option label"
49
+ },
50
+ "value": {
51
+ "oneOf": [
52
+ { "type": "string" },
53
+ { "type": "number" },
54
+ { "type": "boolean" }
55
+ ],
56
+ "description": "Option value"
57
+ },
58
+ "disabled": {
59
+ "type": "boolean",
60
+ "description": "Whether this option is disabled"
61
+ }
62
+ },
63
+ "required": ["label", "value"]
64
+ },
65
+ "x-example": [
66
+ {
67
+ "label": { "en-US": "Credit Card" },
68
+ "value": "credit_card"
69
+ },
70
+ {
71
+ "label": { "en-US": "Bank Transfer" },
72
+ "value": "bank_transfer"
73
+ },
74
+ {
75
+ "label": { "en-US": "Cash" },
76
+ "value": "cash"
77
+ }
78
+ ]
79
+ },
80
+ "onChange": {
81
+ "$ref": "../schemas.json#/definitions/actionsList",
82
+ "description": "Actions to execute when field value changes"
83
+ },
84
+ "onBlur": {
85
+ "$ref": "../schemas.json#/definitions/actionsList",
86
+ "description": "Actions to execute when field loses focus"
87
+ },
88
+ "onFocus": {
89
+ "$ref": "../schemas.json#/definitions/actionsList",
90
+ "description": "Actions to execute when field gains focus"
91
+ }
92
+ },
93
+ "required": ["type", "items"]
94
+ }