@cerebruminc/cerebellum 12.1.1 → 12.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.
@@ -359,18 +359,18 @@ var ArrayFieldTemplate = function (props) {
359
359
 
360
360
  var DEFAULT_SUBMIT_BUTTON_TEXT = "Submit";
361
361
  var RJSForm = function (props) {
362
- var children = props.children, schema = props.schema, _a = props.submitButtonText, submitButtonText = _a === void 0 ? DEFAULT_SUBMIT_BUTTON_TEXT : _a, templates = props.templates, parentTransformErrors = props.transformErrors, uiSchema = props.uiSchema;
362
+ var children = props.children, schema = props.schema, _a = props.submitButtonText, submitButtonText = _a === void 0 ? DEFAULT_SUBMIT_BUTTON_TEXT : _a, templates = props.templates, parentTransformErrors = props.transformErrors, uiSchema = props.uiSchema, loading = props.loading, backButton = props.backButton, nextButton = props.nextButton;
363
363
  var uiSchemaWithDefaults = _tslib.__assign({ "ui:rootFieldId": "cerebellum_rjsform" }, uiSchema);
364
364
  var templatesWithDefaults = _tslib.__assign({ ArrayFieldTemplate: ArrayFieldTemplate }, templates);
365
365
  return schema ? (jsxRuntime.jsx(StyleHack, { children: jsxRuntime.jsx(Form__default["default"], _tslib.__assign({}, props, { templates: templatesWithDefaults,
366
366
  // NOTE: possibly needed for validateOnBlur. Allow extraErrors to be passed to RJSForm
367
367
  // extraErrors={customErrorSchema}
368
368
  // extraErrorsBlockSubmit // is this depricated?
369
- fields: fields, focusOnFirstError: true, noHtml5Validate: true, schema: schema, showErrorList: false, transformErrors: parentTransformErrors || transformErrors, uiSchema: uiSchemaWithDefaults, validator: validator__default["default"], widgets: widgets }, { children: children || jsxRuntime.jsx(PrimaryButton.PrimaryButton, { buttonType: "submit", onClick: isEmptyObject.noop, text: submitButtonText }, void 0) }), void 0) }, void 0)) : null;
369
+ fields: fields, focusOnFirstError: true, noHtml5Validate: true, schema: schema, showErrorList: false, transformErrors: parentTransformErrors || transformErrors, uiSchema: uiSchemaWithDefaults, validator: validator__default["default"], widgets: widgets }, { children: children || (jsxRuntime.jsx(PrimaryButton.PrimaryButton, { buttonType: "submit", onClick: isEmptyObject.noop, text: submitButtonText, nextButton: nextButton, backButton: backButton, loading: loading }, void 0)) }), void 0) }, void 0)) : null;
370
370
  };
371
371
  RJSForm.defaultProps = {
372
372
  submitButtonText: DEFAULT_SUBMIT_BUTTON_TEXT,
373
373
  };
374
374
 
375
375
  exports.RJSForm = RJSForm;
376
- //# sourceMappingURL=RJSForm-88fbf948.js.map
376
+ //# sourceMappingURL=RJSForm-e368090c.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RJSForm-88fbf948.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RJSForm-e368090c.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var RJSForm = require('./RJSForm-88fbf948.js');
5
+ var RJSForm = require('./RJSForm-e368090c.js');
6
6
  var types = require('./types-92e1c1ae.js');
7
7
  require('./_tslib-955e611e.js');
8
8
  require('react/jsx-runtime');
package/lib/cjs/index.cjs CHANGED
@@ -76,7 +76,7 @@ var PieChart = require('./PieChart-b221fe62.js');
76
76
  var Radio = require('./Radio-eb69f788.js');
77
77
  var RadioGroup = require('./RadioGroup-2654ae70.js');
78
78
  var RadioItem = require('./RadioItem-d4d9b513.js');
79
- var RJSForm = require('./RJSForm-88fbf948.js');
79
+ var RJSForm = require('./RJSForm-e368090c.js');
80
80
  require('./types-92e1c1ae.js');
81
81
  var RJSFormRenderer = require('./RJSFormRenderer-0ea1d6a2.js');
82
82
  require('react-dom');
@@ -351,18 +351,18 @@ var ArrayFieldTemplate = function (props) {
351
351
 
352
352
  var DEFAULT_SUBMIT_BUTTON_TEXT = "Submit";
353
353
  var RJSForm = function (props) {
354
- var children = props.children, schema = props.schema, _a = props.submitButtonText, submitButtonText = _a === void 0 ? DEFAULT_SUBMIT_BUTTON_TEXT : _a, templates = props.templates, parentTransformErrors = props.transformErrors, uiSchema = props.uiSchema;
354
+ var children = props.children, schema = props.schema, _a = props.submitButtonText, submitButtonText = _a === void 0 ? DEFAULT_SUBMIT_BUTTON_TEXT : _a, templates = props.templates, parentTransformErrors = props.transformErrors, uiSchema = props.uiSchema, loading = props.loading, backButton = props.backButton, nextButton = props.nextButton;
355
355
  var uiSchemaWithDefaults = __assign({ "ui:rootFieldId": "cerebellum_rjsform" }, uiSchema);
356
356
  var templatesWithDefaults = __assign({ ArrayFieldTemplate: ArrayFieldTemplate }, templates);
357
357
  return schema ? (jsx(StyleHack, { children: jsx(Form, __assign({}, props, { templates: templatesWithDefaults,
358
358
  // NOTE: possibly needed for validateOnBlur. Allow extraErrors to be passed to RJSForm
359
359
  // extraErrors={customErrorSchema}
360
360
  // extraErrorsBlockSubmit // is this depricated?
361
- fields: fields, focusOnFirstError: true, noHtml5Validate: true, schema: schema, showErrorList: false, transformErrors: parentTransformErrors || transformErrors, uiSchema: uiSchemaWithDefaults, validator: validator, widgets: widgets }, { children: children || jsx(PrimaryButton, { buttonType: "submit", onClick: noop, text: submitButtonText }, void 0) }), void 0) }, void 0)) : null;
361
+ fields: fields, focusOnFirstError: true, noHtml5Validate: true, schema: schema, showErrorList: false, transformErrors: parentTransformErrors || transformErrors, uiSchema: uiSchemaWithDefaults, validator: validator, widgets: widgets }, { children: children || (jsx(PrimaryButton, { buttonType: "submit", onClick: noop, text: submitButtonText, nextButton: nextButton, backButton: backButton, loading: loading }, void 0)) }), void 0) }, void 0)) : null;
362
362
  };
363
363
  RJSForm.defaultProps = {
364
364
  submitButtonText: DEFAULT_SUBMIT_BUTTON_TEXT,
365
365
  };
366
366
 
367
367
  export { RJSForm as R };
368
- //# sourceMappingURL=RJSForm-99aa3d74.js.map
368
+ //# sourceMappingURL=RJSForm-2589dc39.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RJSForm-99aa3d74.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RJSForm-2589dc39.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- export { R as RJSForm } from './RJSForm-99aa3d74.js';
1
+ export { R as RJSForm } from './RJSForm-2589dc39.js';
2
2
  export { R as RJSFormFields } from './types-20c5eba5.js';
3
3
  import './_tslib-1a4c929e.js';
4
4
  import 'react/jsx-runtime';
package/lib/esm/index.js CHANGED
@@ -80,7 +80,7 @@ export { P as PieChart } from './PieChart-cbdf1de9.js';
80
80
  export { R as Radio } from './Radio-a25910f6.js';
81
81
  export { R as RadioGroup } from './RadioGroup-5deefd5f.js';
82
82
  export { R as RadioItem } from './RadioItem-5cbc814b.js';
83
- export { R as RJSForm } from './RJSForm-99aa3d74.js';
83
+ export { R as RJSForm } from './RJSForm-2589dc39.js';
84
84
  import './types-20c5eba5.js';
85
85
  export { R as RJSFormRenderer } from './RJSFormRenderer-0cda19b4.js';
86
86
  import 'react-dom';
@@ -11,6 +11,12 @@ export interface RJSFormType extends Omit<FormProps, "schema" | "validator"> {
11
11
  uiSchema?: RJSFormUiSchema;
12
12
  /** An optional implementation of the `ValidatorType` interface. RJSForm uses a custom yup validator by default */
13
13
  validator?: FormProps["validator"];
14
+ /** Displays a loading animation in the button when true */
15
+ loading?: boolean;
16
+ /** Adds an arrow pointing left and pushes the text right */
17
+ backButton?: boolean;
18
+ /** Adds an arrow pointing right and pushes the text left */
19
+ nextButton?: boolean;
14
20
  }
15
21
  export declare enum RJSFormFields {
16
22
  Array = "Array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerebruminc/cerebellum",
3
- "version": "12.1.1",
3
+ "version": "12.2.0",
4
4
  "description": "Cerebrum's React Component Library",
5
5
  "type": "module",
6
6
  "main": "lib/cjs/index.cjs",
@@ -63,7 +63,7 @@
63
63
  "@babel/plugin-transform-runtime": "^7.23.9",
64
64
  "@babel/preset-env": "^7.22.9",
65
65
  "@babel/runtime": "^7.23.9",
66
- "@biomejs/biome": "^1.6.3",
66
+ "@biomejs/biome": "^1.6.4",
67
67
  "@rollup/plugin-commonjs": "^25.0.0",
68
68
  "@rollup/plugin-image": "^3.0.3",
69
69
  "@rollup/plugin-node-resolve": "^15.0.0",