@rippling/rippling-sdk 0.2.0-alpha.34 → 0.2.0-alpha.36

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 (270) hide show
  1. package/client.d.mts +6 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +6 -0
  4. package/client.d.ts.map +1 -1
  5. package/client.js +6 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +6 -0
  8. package/client.mjs.map +1 -1
  9. package/examples/.keep +4 -0
  10. package/examples/manifest/dental-practice-management/dental-practice-management.ts +651 -0
  11. package/examples/manifest/dental-practice-management/manifest.json +1870 -0
  12. package/examples/manifest/gym-membership-management/gym-membership-management.ts +757 -0
  13. package/examples/manifest/gym-membership-management/manifest.json +1975 -0
  14. package/examples/sdui/sdui-crud-todo/rippling-function.ts +367 -0
  15. package/examples/sdui/sdui-crud-todo/sdui-crud-todo.ts +282 -0
  16. package/examples/sdui/sdui-showcase/rippling-function.ts +381 -0
  17. package/examples/sdui/sdui-showcase/sdui-showcase.ts +351 -0
  18. package/examples/sdui/sdui-tab-multi-view/rippling-function.ts +1061 -0
  19. package/examples/sdui/sdui-tab-multi-view/sdui-tab-multi-view.ts +924 -0
  20. package/examples/sdui/vote/rippling-function.ts +330 -0
  21. package/examples/sdui/vote/vote.ts +298 -0
  22. package/lib/manifest/app.d.mts +81 -13
  23. package/lib/manifest/app.d.mts.map +1 -1
  24. package/lib/manifest/app.d.ts +81 -13
  25. package/lib/manifest/app.d.ts.map +1 -1
  26. package/lib/manifest/app.js +37 -16
  27. package/lib/manifest/app.js.map +1 -1
  28. package/lib/manifest/app.mjs +37 -16
  29. package/lib/manifest/app.mjs.map +1 -1
  30. package/lib/manifest/category.d.mts +63 -7
  31. package/lib/manifest/category.d.mts.map +1 -1
  32. package/lib/manifest/category.d.ts +63 -7
  33. package/lib/manifest/category.d.ts.map +1 -1
  34. package/lib/manifest/category.js +45 -10
  35. package/lib/manifest/category.js.map +1 -1
  36. package/lib/manifest/category.mjs +43 -8
  37. package/lib/manifest/category.mjs.map +1 -1
  38. package/lib/manifest/custom-object-field-section.d.mts +56 -6
  39. package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
  40. package/lib/manifest/custom-object-field-section.d.ts +56 -6
  41. package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
  42. package/lib/manifest/custom-object-field-section.js +41 -14
  43. package/lib/manifest/custom-object-field-section.js.map +1 -1
  44. package/lib/manifest/custom-object-field-section.mjs +39 -12
  45. package/lib/manifest/custom-object-field-section.mjs.map +1 -1
  46. package/lib/manifest/custom-object-page-layout.d.mts +201 -41
  47. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
  48. package/lib/manifest/custom-object-page-layout.d.ts +201 -41
  49. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
  50. package/lib/manifest/custom-object-page-layout.js +76 -30
  51. package/lib/manifest/custom-object-page-layout.js.map +1 -1
  52. package/lib/manifest/custom-object-page-layout.mjs +74 -28
  53. package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
  54. package/lib/manifest/custom-object.d.mts +128 -15
  55. package/lib/manifest/custom-object.d.mts.map +1 -1
  56. package/lib/manifest/custom-object.d.ts +128 -15
  57. package/lib/manifest/custom-object.d.ts.map +1 -1
  58. package/lib/manifest/custom-object.js +61 -26
  59. package/lib/manifest/custom-object.js.map +1 -1
  60. package/lib/manifest/custom-object.mjs +61 -26
  61. package/lib/manifest/custom-object.mjs.map +1 -1
  62. package/lib/manifest/field.d.mts +265 -54
  63. package/lib/manifest/field.d.mts.map +1 -1
  64. package/lib/manifest/field.d.ts +265 -54
  65. package/lib/manifest/field.d.ts.map +1 -1
  66. package/lib/manifest/field.js +100 -57
  67. package/lib/manifest/field.js.map +1 -1
  68. package/lib/manifest/field.mjs +100 -57
  69. package/lib/manifest/field.mjs.map +1 -1
  70. package/lib/manifest/list-view.d.mts +105 -14
  71. package/lib/manifest/list-view.d.mts.map +1 -1
  72. package/lib/manifest/list-view.d.ts +105 -14
  73. package/lib/manifest/list-view.d.ts.map +1 -1
  74. package/lib/manifest/list-view.js +50 -14
  75. package/lib/manifest/list-view.js.map +1 -1
  76. package/lib/manifest/list-view.mjs +48 -12
  77. package/lib/manifest/list-view.mjs.map +1 -1
  78. package/lib/manifest/manifest-builder.d.mts +77 -11
  79. package/lib/manifest/manifest-builder.d.mts.map +1 -1
  80. package/lib/manifest/manifest-builder.d.ts +77 -11
  81. package/lib/manifest/manifest-builder.d.ts.map +1 -1
  82. package/lib/manifest/manifest-builder.js +46 -24
  83. package/lib/manifest/manifest-builder.js.map +1 -1
  84. package/lib/manifest/manifest-builder.mjs +44 -22
  85. package/lib/manifest/manifest-builder.mjs.map +1 -1
  86. package/lib/manifest/manifest-function.d.mts +92 -12
  87. package/lib/manifest/manifest-function.d.mts.map +1 -1
  88. package/lib/manifest/manifest-function.d.ts +92 -12
  89. package/lib/manifest/manifest-function.d.ts.map +1 -1
  90. package/lib/manifest/manifest-function.js +40 -11
  91. package/lib/manifest/manifest-function.js.map +1 -1
  92. package/lib/manifest/manifest-function.mjs +38 -9
  93. package/lib/manifest/manifest-function.mjs.map +1 -1
  94. package/lib/manifest/rule.d.mts +94 -16
  95. package/lib/manifest/rule.d.mts.map +1 -1
  96. package/lib/manifest/rule.d.ts +94 -16
  97. package/lib/manifest/rule.d.ts.map +1 -1
  98. package/lib/manifest/rule.js +36 -15
  99. package/lib/manifest/rule.js.map +1 -1
  100. package/lib/manifest/rule.mjs +36 -15
  101. package/lib/manifest/rule.mjs.map +1 -1
  102. package/lib/manifest/sdui-page.d.mts +67 -11
  103. package/lib/manifest/sdui-page.d.mts.map +1 -1
  104. package/lib/manifest/sdui-page.d.ts +67 -11
  105. package/lib/manifest/sdui-page.d.ts.map +1 -1
  106. package/lib/manifest/sdui-page.js +44 -13
  107. package/lib/manifest/sdui-page.js.map +1 -1
  108. package/lib/manifest/sdui-page.mjs +42 -11
  109. package/lib/manifest/sdui-page.mjs.map +1 -1
  110. package/lib/manifest/validation.d.mts +87 -12
  111. package/lib/manifest/validation.d.mts.map +1 -1
  112. package/lib/manifest/validation.d.ts +87 -12
  113. package/lib/manifest/validation.d.ts.map +1 -1
  114. package/lib/manifest/validation.js +41 -15
  115. package/lib/manifest/validation.js.map +1 -1
  116. package/lib/manifest/validation.mjs +39 -13
  117. package/lib/manifest/validation.mjs.map +1 -1
  118. package/lib/sdui/actions.d.mts +25 -0
  119. package/lib/sdui/actions.d.mts.map +1 -0
  120. package/lib/sdui/actions.d.ts +25 -0
  121. package/lib/sdui/actions.d.ts.map +1 -0
  122. package/lib/sdui/actions.js +53 -0
  123. package/lib/sdui/actions.js.map +1 -0
  124. package/lib/sdui/actions.mjs +42 -0
  125. package/lib/sdui/actions.mjs.map +1 -0
  126. package/lib/sdui/component.d.mts +41 -0
  127. package/lib/sdui/component.d.mts.map +1 -0
  128. package/lib/sdui/component.d.ts +41 -0
  129. package/lib/sdui/component.d.ts.map +1 -0
  130. package/lib/sdui/component.js +95 -0
  131. package/lib/sdui/component.js.map +1 -0
  132. package/lib/sdui/component.mjs +91 -0
  133. package/lib/sdui/component.mjs.map +1 -0
  134. package/lib/sdui/components.d.mts +149 -0
  135. package/lib/sdui/components.d.mts.map +1 -0
  136. package/lib/sdui/components.d.ts +149 -0
  137. package/lib/sdui/components.d.ts.map +1 -0
  138. package/lib/sdui/components.js +303 -0
  139. package/lib/sdui/components.js.map +1 -0
  140. package/lib/sdui/components.mjs +298 -0
  141. package/lib/sdui/components.mjs.map +1 -0
  142. package/lib/sdui/conditions.d.mts +25 -0
  143. package/lib/sdui/conditions.d.mts.map +1 -0
  144. package/lib/sdui/conditions.d.ts +25 -0
  145. package/lib/sdui/conditions.d.ts.map +1 -0
  146. package/lib/sdui/conditions.js +47 -0
  147. package/lib/sdui/conditions.js.map +1 -0
  148. package/lib/sdui/conditions.mjs +35 -0
  149. package/lib/sdui/conditions.mjs.map +1 -0
  150. package/lib/sdui/directives.d.mts +18 -0
  151. package/lib/sdui/directives.d.mts.map +1 -0
  152. package/lib/sdui/directives.d.ts +18 -0
  153. package/lib/sdui/directives.d.ts.map +1 -0
  154. package/lib/sdui/directives.js +28 -0
  155. package/lib/sdui/directives.js.map +1 -0
  156. package/lib/sdui/directives.mjs +21 -0
  157. package/lib/sdui/directives.mjs.map +1 -0
  158. package/lib/sdui/index.d.mts +362 -0
  159. package/lib/sdui/index.d.mts.map +1 -0
  160. package/lib/sdui/index.d.ts +362 -0
  161. package/lib/sdui/index.d.ts.map +1 -0
  162. package/lib/sdui/index.js +375 -0
  163. package/lib/sdui/index.js.map +1 -0
  164. package/lib/sdui/index.mjs +199 -0
  165. package/lib/sdui/index.mjs.map +1 -0
  166. package/lib/sdui/props.d.mts +12 -0
  167. package/lib/sdui/props.d.mts.map +1 -0
  168. package/lib/sdui/props.d.ts +12 -0
  169. package/lib/sdui/props.d.ts.map +1 -0
  170. package/lib/sdui/props.js +25 -0
  171. package/lib/sdui/props.js.map +1 -0
  172. package/lib/sdui/props.mjs +21 -0
  173. package/lib/sdui/props.mjs.map +1 -0
  174. package/lib/sdui/render.d.mts +23 -0
  175. package/lib/sdui/render.d.mts.map +1 -0
  176. package/lib/sdui/render.d.ts +23 -0
  177. package/lib/sdui/render.d.ts.map +1 -0
  178. package/lib/sdui/render.js +40 -0
  179. package/lib/sdui/render.js.map +1 -0
  180. package/lib/sdui/render.mjs +37 -0
  181. package/lib/sdui/render.mjs.map +1 -0
  182. package/lib/sdui/state.d.mts +22 -0
  183. package/lib/sdui/state.d.mts.map +1 -0
  184. package/lib/sdui/state.d.ts +22 -0
  185. package/lib/sdui/state.d.ts.map +1 -0
  186. package/lib/sdui/state.js +57 -0
  187. package/lib/sdui/state.js.map +1 -0
  188. package/lib/sdui/state.mjs +53 -0
  189. package/lib/sdui/state.mjs.map +1 -0
  190. package/package.json +11 -1
  191. package/resources/company-legal-entity-workers.d.mts +79 -0
  192. package/resources/company-legal-entity-workers.d.mts.map +1 -0
  193. package/resources/company-legal-entity-workers.d.ts +79 -0
  194. package/resources/company-legal-entity-workers.d.ts.map +1 -0
  195. package/resources/company-legal-entity-workers.js +30 -0
  196. package/resources/company-legal-entity-workers.js.map +1 -0
  197. package/resources/company-legal-entity-workers.mjs +26 -0
  198. package/resources/company-legal-entity-workers.mjs.map +1 -0
  199. package/resources/draft-hires.d.mts +4 -0
  200. package/resources/draft-hires.d.mts.map +1 -1
  201. package/resources/draft-hires.d.ts +4 -0
  202. package/resources/draft-hires.d.ts.map +1 -1
  203. package/resources/files.d.mts +16 -1
  204. package/resources/files.d.mts.map +1 -1
  205. package/resources/files.d.ts +16 -1
  206. package/resources/files.d.ts.map +1 -1
  207. package/resources/headcount-positions.d.mts +2 -2
  208. package/resources/headcount-positions.d.mts.map +1 -1
  209. package/resources/headcount-positions.d.ts +2 -2
  210. package/resources/headcount-positions.d.ts.map +1 -1
  211. package/resources/index.d.mts +1 -0
  212. package/resources/index.d.mts.map +1 -1
  213. package/resources/index.d.ts +1 -0
  214. package/resources/index.d.ts.map +1 -1
  215. package/resources/index.js +4 -2
  216. package/resources/index.js.map +1 -1
  217. package/resources/index.mjs +1 -0
  218. package/resources/index.mjs.map +1 -1
  219. package/resources/legal-entities.d.mts +1 -1
  220. package/resources/legal-entities.d.mts.map +1 -1
  221. package/resources/legal-entities.d.ts +1 -1
  222. package/resources/legal-entities.d.ts.map +1 -1
  223. package/resources/location-factors.d.mts +2 -2
  224. package/resources/location-factors.d.mts.map +1 -1
  225. package/resources/location-factors.d.ts +2 -2
  226. package/resources/location-factors.d.ts.map +1 -1
  227. package/resources/shared.d.mts +1 -1
  228. package/resources/shared.d.mts.map +1 -1
  229. package/resources/shared.d.ts +1 -1
  230. package/resources/shared.d.ts.map +1 -1
  231. package/resources/workers.d.mts +2 -2
  232. package/resources/workers.d.mts.map +1 -1
  233. package/resources/workers.d.ts +2 -2
  234. package/resources/workers.d.ts.map +1 -1
  235. package/src/client.ts +20 -0
  236. package/src/lib/manifest/app.ts +81 -26
  237. package/src/lib/manifest/category.ts +63 -14
  238. package/src/lib/manifest/custom-object-field-section.ts +56 -17
  239. package/src/lib/manifest/custom-object-page-layout.ts +201 -66
  240. package/src/lib/manifest/custom-object.ts +128 -37
  241. package/src/lib/manifest/field.ts +265 -75
  242. package/src/lib/manifest/list-view.ts +105 -25
  243. package/src/lib/manifest/manifest-builder.ts +75 -32
  244. package/src/lib/manifest/manifest-function.ts +92 -22
  245. package/src/lib/manifest/rule.ts +95 -29
  246. package/src/lib/manifest/sdui-page.ts +67 -21
  247. package/src/lib/manifest/validation.ts +87 -24
  248. package/src/lib/sdui/actions.ts +58 -0
  249. package/src/lib/sdui/component.ts +122 -0
  250. package/src/lib/sdui/components.ts +308 -0
  251. package/src/lib/sdui/conditions.ts +59 -0
  252. package/src/lib/sdui/directives.ts +42 -0
  253. package/src/lib/sdui/index.ts +365 -0
  254. package/src/lib/sdui/props.ts +32 -0
  255. package/src/lib/sdui/render.ts +58 -0
  256. package/src/lib/sdui/state.ts +60 -0
  257. package/src/resources/company-legal-entity-workers.ts +115 -0
  258. package/src/resources/draft-hires.ts +5 -0
  259. package/src/resources/files.ts +18 -1
  260. package/src/resources/headcount-positions.ts +2 -0
  261. package/src/resources/index.ts +7 -0
  262. package/src/resources/legal-entities.ts +1 -0
  263. package/src/resources/location-factors.ts +2 -0
  264. package/src/resources/shared.ts +1 -0
  265. package/src/resources/workers.ts +2 -0
  266. package/src/version.ts +1 -1
  267. package/version.d.mts +1 -1
  268. package/version.d.ts +1 -1
  269. package/version.js +1 -1
  270. package/version.mjs +1 -1
@@ -0,0 +1,308 @@
1
+ /**
2
+ * AUTO-GENERATED from component-manifest.json
3
+ * Generated at: 2026-04-17T04:10:01.126Z
4
+ * Components: 128
5
+ *
6
+ * Do not edit manually. Run: npx tsx scripts/codegen-builder.ts
7
+ */
8
+
9
+ import type { ActionBinding } from './actions';
10
+
11
+ export interface SpecNode {
12
+ type: string;
13
+ props: Record<string, unknown>;
14
+ children: SpecNode[];
15
+ visible?: unknown;
16
+ on?: Record<string, ActionBinding | ActionBinding[]>;
17
+ watch?: Record<string, unknown>;
18
+ repeat?: { statePath: string; key?: string };
19
+ }
20
+
21
+ type EventMap = Record<string, string>;
22
+
23
+ function createComponent(type: string, eventMap: EventMap = {}) {
24
+ return (props: Record<string, unknown> = {}): SpecNode => {
25
+ const node: SpecNode = { type, props: {}, children: [] };
26
+ for (const [key, value] of Object.entries(props)) {
27
+ if (key === 'children') {
28
+ node.children = (Array.isArray(value) ? value : [value]).flat().filter(Boolean) as SpecNode[];
29
+ } else if (key === 'visible') {
30
+ node.visible = value;
31
+ } else if (key === 'watch') {
32
+ node.watch = value as Record<string, unknown>;
33
+ } else if (key === 'repeat') {
34
+ node.repeat = value as { statePath: string; key?: string };
35
+ } else if (eventMap[key]) {
36
+ node.on = node.on || {};
37
+ node.on[eventMap[key]] = value as ActionBinding | ActionBinding[];
38
+ } else {
39
+ node.props[key] = value;
40
+ }
41
+ }
42
+ return node;
43
+ };
44
+ }
45
+
46
+ export const TextInput = createComponent('TextInput', {
47
+ onChange: 'change',
48
+ onBlur: 'blur',
49
+ onFocus: 'focus',
50
+ onClick: 'click',
51
+ onKeydown: 'keydown',
52
+ onKeyup: 'keyup',
53
+ onPaste: 'paste',
54
+ onMouseenter: 'mouseenter',
55
+ onMouseleave: 'mouseleave',
56
+ });
57
+ export const Select = createComponent('Select', {
58
+ onChange: 'change',
59
+ onBlur: 'blur',
60
+ onFocus: 'focus',
61
+ onPaste: 'paste',
62
+ onMenuToggle: 'menuToggle',
63
+ });
64
+ export const AppGroupSelect = createComponent('AppGroupSelect', {
65
+ onChange: 'change',
66
+ onBlur: 'blur',
67
+ onFocus: 'focus',
68
+ onPaste: 'paste',
69
+ onMenuToggle: 'menuToggle',
70
+ });
71
+ export const Checkbox = createComponent('Checkbox', { onChange: 'change', onBlur: 'blur' });
72
+ export const CheckboxGroup = createComponent('CheckboxGroup', { onChange: 'change', onBlur: 'blur' });
73
+ export const Email = createComponent('Email', {
74
+ onChange: 'change',
75
+ onBlur: 'blur',
76
+ onFocus: 'focus',
77
+ onClick: 'click',
78
+ onKeydown: 'keydown',
79
+ onKeyup: 'keyup',
80
+ onPaste: 'paste',
81
+ onMouseenter: 'mouseenter',
82
+ onMouseleave: 'mouseleave',
83
+ });
84
+ export const Number = createComponent('Number', {
85
+ onChange: 'change',
86
+ onBlur: 'blur',
87
+ onChangeRaw: 'changeRaw',
88
+ onChangeCalculationState: 'changeCalculationState',
89
+ });
90
+ export const Date = createComponent('Date', { onChange: 'change', onBlur: 'blur' });
91
+ export const DateRange = createComponent('DateRange', { onChange: 'change', onBlur: 'blur' });
92
+ export const DateInlineMulti = createComponent('DateInlineMulti', { onChange: 'change', onBlur: 'blur' });
93
+ export const Textarea = createComponent('Textarea', { onChange: 'change', onBlur: 'blur', onFocus: 'focus' });
94
+ export const Radio = createComponent('Radio', {
95
+ onChange: 'change',
96
+ onBlur: 'blur',
97
+ onMouseenter: 'mouseenter',
98
+ onMouseleave: 'mouseleave',
99
+ });
100
+ export const Phone = createComponent('Phone', {
101
+ onChange: 'change',
102
+ onBlur: 'blur',
103
+ onFocus: 'focus',
104
+ onClick: 'click',
105
+ onKeydown: 'keydown',
106
+ onKeyup: 'keyup',
107
+ onPaste: 'paste',
108
+ onMouseenter: 'mouseenter',
109
+ onMouseleave: 'mouseleave',
110
+ onCountryCodeChange: 'countryCodeChange',
111
+ });
112
+ export const Password = createComponent('Password', {
113
+ onChange: 'change',
114
+ onBlur: 'blur',
115
+ onFocus: 'focus',
116
+ onClick: 'click',
117
+ onKeydown: 'keydown',
118
+ onKeyup: 'keyup',
119
+ onPaste: 'paste',
120
+ onMouseenter: 'mouseenter',
121
+ onMouseleave: 'mouseleave',
122
+ onReveal: 'reveal',
123
+ });
124
+ export const Switch = createComponent('Switch', { onChange: 'change', onBlur: 'blur' });
125
+ export const FileDrop = createComponent('FileDrop', { onChange: 'change', onBlur: 'blur' });
126
+ export const TextAutoSuggest = createComponent('TextAutoSuggest', {
127
+ onChange: 'change',
128
+ onBlur: 'blur',
129
+ onFocus: 'focus',
130
+ onClick: 'click',
131
+ });
132
+ export const Currency = createComponent('Currency', { onChange: 'change', onBlur: 'blur' });
133
+ export const WorkEmail = createComponent('WorkEmail', {
134
+ onChange: 'change',
135
+ onBlur: 'blur',
136
+ onFocus: 'focus',
137
+ onClick: 'click',
138
+ onKeydown: 'keydown',
139
+ onKeyup: 'keyup',
140
+ onPaste: 'paste',
141
+ onMouseenter: 'mouseenter',
142
+ onMouseleave: 'mouseleave',
143
+ });
144
+ export const Percentage = createComponent('Percentage', { onChange: 'change', onBlur: 'blur' });
145
+ export const SegmentedControl = createComponent('SegmentedControl', { onChange: 'change', onBlur: 'blur' });
146
+ export const Time = createComponent('Time', { onChange: 'change', onBlur: 'blur' });
147
+ export const TimeRange = createComponent('TimeRange', { onChange: 'change', onBlur: 'blur' });
148
+ export const Timezone = createComponent('Timezone', { onChange: 'change', onBlur: 'blur', onFocus: 'focus' });
149
+ export const Slider = createComponent('Slider', {
150
+ onChange: 'change',
151
+ onBlur: 'blur',
152
+ onBeforeChange: 'beforeChange',
153
+ onAfterChange: 'afterChange',
154
+ });
155
+ export const RangeSlider = createComponent('RangeSlider', {
156
+ onChange: 'change',
157
+ onBeforeChange: 'beforeChange',
158
+ onAfterChange: 'afterChange',
159
+ onBlur: 'blur',
160
+ });
161
+ export const Masker = createComponent('Masker', { onChange: 'change', onBlur: 'blur' });
162
+ export const DaySelector = createComponent('DaySelector', { onChange: 'change' });
163
+ export const ColorPicker = createComponent('ColorPicker', { onChange: 'change', onBlur: 'blur' });
164
+ export const SelectableGroup = createComponent('SelectableGroup', { onChange: 'change' });
165
+ export const Ssn = createComponent('Ssn', { onChange: 'change', onBlur: 'blur' });
166
+ export const Sin = createComponent('Sin', { onChange: 'change', onBlur: 'blur' });
167
+ export const Signature = createComponent('Signature', { onChange: 'change' });
168
+ export const Survey = createComponent('Survey', { onChange: 'change' });
169
+ export const Tree = createComponent('Tree', { onChange: 'change', onFooterAction: 'footerAction' });
170
+ export const TreeSelect = createComponent('TreeSelect', { onChange: 'change' });
171
+ export const File = createComponent('File', { onChange: 'change', onDelete: 'delete' });
172
+ export const InputGroup = createComponent('InputGroup');
173
+ export const Field = createComponent('Field');
174
+ export const ActionCard = createComponent('ActionCard', {
175
+ onPressPrimary: 'pressPrimary',
176
+ onPressSecondary: 'pressSecondary',
177
+ });
178
+ export const Alert = createComponent('Alert', {
179
+ onPressPrimary: 'pressPrimary',
180
+ onPressSecondary: 'pressSecondary',
181
+ onDismiss: 'dismiss',
182
+ });
183
+ export const Avatar = createComponent('Avatar', { onPress: 'press' });
184
+ export const Badge = createComponent('Badge');
185
+ export const Chip = createComponent('Chip', { onDismiss: 'dismiss', onPress: 'press' });
186
+ export const Card = createComponent('Card', {
187
+ onEdit: 'edit',
188
+ onDelete: 'delete',
189
+ onAdd: 'add',
190
+ onClick: 'click',
191
+ onAction: 'action',
192
+ });
193
+ export const ContentLoader = createComponent('ContentLoader');
194
+ export const Divider = createComponent('Divider');
195
+ export const Icon = createComponent('Icon', { onPress: 'press' });
196
+ export const Label = createComponent('Label');
197
+ export const ListItem = createComponent('ListItem', { onPress: 'press' });
198
+ export const Modal = createComponent('Modal', { onClose: 'close' });
199
+ export const ModalFooter = createComponent('ModalFooter');
200
+ export const ProgressBar = createComponent('ProgressBar');
201
+ export const Skeleton = createComponent('Skeleton');
202
+ export const Spinner = createComponent('Spinner');
203
+ export const Stepper = createComponent('Stepper', { onClick: 'click' });
204
+ export const TextClip = createComponent('TextClip');
205
+ export const TextSnippet = createComponent('TextSnippet');
206
+ export const Tip = createComponent('Tip');
207
+ export const CheckList = createComponent('CheckList', { onChange: 'change' });
208
+ export const DistributionBar = createComponent('DistributionBar');
209
+ export const ImageViewer = createComponent('ImageViewer');
210
+ export const ObjectUI = createComponent('ObjectUI');
211
+ export const ObjectUITemplate = createComponent('ObjectUITemplate');
212
+ export const ObjectUIHeader = createComponent('ObjectUIHeader');
213
+ export const ObjectUIContent = createComponent('ObjectUIContent');
214
+ export const ObjectUIStats = createComponent('ObjectUIStats', { onActionClick: 'actionClick' });
215
+ export const SnackBar = createComponent('SnackBar', { onDismiss: 'dismiss' });
216
+ export const Video = createComponent('Video');
217
+ export const AvatarList = createComponent('AvatarList');
218
+ export const Image = createComponent('Image', { onPress: 'press', onLoad: 'load', onError: 'error' });
219
+ export const AtomsSeparator = createComponent('AtomsSeparator');
220
+ export const Carousel = createComponent('Carousel', { onDone: 'done' });
221
+ export const TableBasic = createComponent('TableBasic');
222
+ export const LocationCard = createComponent('LocationCard', {
223
+ onEdit: 'edit',
224
+ onDelete: 'delete',
225
+ onClick: 'click',
226
+ onAction: 'action',
227
+ });
228
+ export const LoaderCard = createComponent('LoaderCard');
229
+ export const LayoutCard = createComponent('LayoutCard', { onPress: 'press' });
230
+ export const AppGroupLoader = createComponent('AppGroupLoader');
231
+ export const ChartLoader = createComponent('ChartLoader');
232
+ export const ReportLoader = createComponent('ReportLoader');
233
+ export const ReportShareLoader = createComponent('ReportShareLoader');
234
+ export const ReportViewerLoader = createComponent('ReportViewerLoader');
235
+ export const SettingsLoader = createComponent('SettingsLoader');
236
+ export const ChipGroup = createComponent('ChipGroup', { onOverflowChange: 'overflowChange' });
237
+ export const ModalCloseButton = createComponent('ModalCloseButton');
238
+ export const Status = createComponent('Status');
239
+ export const ApiError = createComponent('ApiError');
240
+ export const Circle = createComponent('Circle');
241
+ export const CountDown = createComponent('CountDown');
242
+ export const Country = createComponent('Country');
243
+ export const ToggleableArrow = createComponent('ToggleableArrow');
244
+ export const TitleCaption = createComponent('TitleCaption');
245
+ export const AiIcon = createComponent('AiIcon');
246
+ export const Breadcrumb = createComponent('Breadcrumb', { onSelect: 'select' });
247
+ export const Button = createComponent('Button', {
248
+ onPress: 'press',
249
+ onPressWhileDisabled: 'pressWhileDisabled',
250
+ onMouseEnter: 'mouseEnter',
251
+ onMouseLeave: 'mouseLeave',
252
+ });
253
+ export const ButtonGroup = createComponent('ButtonGroup');
254
+ export const DraggableList = createComponent('DraggableList', {
255
+ onUpdate: 'update',
256
+ onRemove: 'remove',
257
+ onDragStart: 'dragStart',
258
+ onDragEnd: 'dragEnd',
259
+ });
260
+ export const Drawer = createComponent('Drawer', { onClose: 'close' });
261
+ export const Dropdown = createComponent('Dropdown', { onChange: 'change' });
262
+ export const ExpansionPanel = createComponent('ExpansionPanel', { onToggle: 'toggle' });
263
+ export const ExpansionPanelGroup = createComponent('ExpansionPanelGroup');
264
+ export const FloatingButton = createComponent('FloatingButton', {
265
+ onPress: 'press',
266
+ onPressWhileDisabled: 'pressWhileDisabled',
267
+ onMouseEnter: 'mouseEnter',
268
+ onMouseLeave: 'mouseLeave',
269
+ });
270
+ export const IconButton = createComponent('IconButton', {
271
+ onPress: 'press',
272
+ onPressWhileDisabled: 'pressWhileDisabled',
273
+ onMouseEnter: 'mouseEnter',
274
+ onMouseLeave: 'mouseLeave',
275
+ });
276
+ export const ItemNavigator = createComponent('ItemNavigator', { onNext: 'next', onPrevious: 'previous' });
277
+ export const Link = createComponent('Link', { onPress: 'press' });
278
+ export const MenuList = createComponent('MenuList', { onSelect: 'select' });
279
+ export const NestedList = createComponent('NestedList', { onToggle: 'toggle', onSelect: 'select' });
280
+ export const Paginate = createComponent('Paginate', { onChange: 'change' });
281
+ export const SelectableMenu = createComponent('SelectableMenu', { onChange: 'change' });
282
+ export const ShowMore = createComponent('ShowMore');
283
+ export const Tab = createComponent('Tab', { onChange: 'change' });
284
+ export const Heading = createComponent('Heading');
285
+ export const Text = createComponent('Text');
286
+ export const Box = createComponent('Box');
287
+ export const Grid = createComponent('Grid', {
288
+ onRowClick: 'rowClick',
289
+ onRowAction: 'rowAction',
290
+ onHeaderAction: 'headerAction',
291
+ });
292
+ export const HStack = createComponent('HStack');
293
+ export const LabelGroup = createComponent('LabelGroup');
294
+ export const Layout = createComponent('Layout');
295
+ export const PageContent = createComponent('PageContent');
296
+ export const PageHeader = createComponent('PageHeader');
297
+ export const PageAppLogo = createComponent('PageAppLogo');
298
+ export const PageFooter = createComponent('PageFooter', { onContinue: 'continue' });
299
+ export const Pane = createComponent('Pane', {
300
+ onCollapsedChange: 'collapsedChange',
301
+ onDismiss: 'dismiss',
302
+ onResize: 'resize',
303
+ });
304
+ export const Responsive = createComponent('Responsive');
305
+ export const SplitPane = createComponent('SplitPane');
306
+ export const VStack = createComponent('VStack');
307
+ export const CustomObjectGrid = createComponent('CustomObjectGrid');
308
+ export const ObjectListView = createComponent('ObjectListView');
@@ -0,0 +1,59 @@
1
+ import { extractPath } from './state';
2
+
3
+ export interface StateCondition {
4
+ $state: string;
5
+ eq?: unknown;
6
+ neq?: unknown;
7
+ gt?: number;
8
+ gte?: number;
9
+ lt?: number;
10
+ lte?: number;
11
+ not?: boolean;
12
+ }
13
+
14
+ export type OrCondition = { $or: VisibilityCondition[] };
15
+ export type VisibilityCondition = StateCondition | StateCondition[] | OrCondition;
16
+
17
+ function pathOf(ref: unknown): string {
18
+ return extractPath(ref);
19
+ }
20
+
21
+ export function eq(ref: unknown, value: unknown): StateCondition {
22
+ return { $state: pathOf(ref), eq: value };
23
+ }
24
+
25
+ export function neq(ref: unknown, value: unknown): StateCondition {
26
+ return { $state: pathOf(ref), neq: value };
27
+ }
28
+
29
+ export function gt(ref: unknown, value: number): StateCondition {
30
+ return { $state: pathOf(ref), gt: value };
31
+ }
32
+
33
+ export function gte(ref: unknown, value: number): StateCondition {
34
+ return { $state: pathOf(ref), gte: value };
35
+ }
36
+
37
+ export function lt(ref: unknown, value: number): StateCondition {
38
+ return { $state: pathOf(ref), lt: value };
39
+ }
40
+
41
+ export function lte(ref: unknown, value: number): StateCondition {
42
+ return { $state: pathOf(ref), lte: value };
43
+ }
44
+
45
+ export function truthy(ref: unknown): StateCondition {
46
+ return { $state: pathOf(ref) };
47
+ }
48
+
49
+ export function falsy(ref: unknown): StateCondition {
50
+ return { $state: pathOf(ref), not: true };
51
+ }
52
+
53
+ export function and(...conditions: StateCondition[]): StateCondition[] {
54
+ return conditions;
55
+ }
56
+
57
+ export function or(...conditions: VisibilityCondition[]): OrCondition {
58
+ return { $or: conditions };
59
+ }
@@ -0,0 +1,42 @@
1
+ import type { SpecNode } from './components';
2
+ import { extractPath } from './state';
3
+
4
+ export interface ItemRef {
5
+ $item: string;
6
+ }
7
+
8
+ export interface BindItemRef {
9
+ $bindItem: string;
10
+ }
11
+
12
+ export interface IndexRef {
13
+ $index: true;
14
+ }
15
+
16
+ export function $item(field: string): ItemRef {
17
+ return { $item: field };
18
+ }
19
+
20
+ export function $bindItem(field: string): BindItemRef {
21
+ return { $bindItem: field };
22
+ }
23
+
24
+ export function $index(): IndexRef {
25
+ return { $index: true };
26
+ }
27
+
28
+ export function visible(condition: unknown, element: SpecNode): SpecNode {
29
+ return { ...element, visible: condition };
30
+ }
31
+
32
+ export function repeat(
33
+ stateRef: unknown,
34
+ opts: { key?: string },
35
+ childFn: (item: typeof $item, index: typeof $index, bindItem: typeof $bindItem) => SpecNode,
36
+ ): SpecNode {
37
+ const child = childFn($item, $index, $bindItem);
38
+ return {
39
+ ...child,
40
+ repeat: { statePath: extractPath(stateRef), ...(opts.key ? { key: opts.key } : {}) },
41
+ };
42
+ }