@factorialco/fcode-react-forms 3.5.0 → 3.6.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.
@@ -1,4 +1,5 @@
1
1
  import { SubmitFormParams, SubmitFormResponse, FetchFormSpecsParams, FormData as YepFormData } from '../types';
2
+ export declare const FORM_NOT_AVAILABLE_MESSAGE = "Process form specs couldn't be loaded: the form does not exist, is not enabled, or needs a Factorial token this request did not carry or that was not accepted. Review documentation at https://code.factorialhr.com/docs/forms/";
2
3
  export declare const fetchFormSpecs: ({ hostUrl, headers, team, processId, processVersion, locale, cache, }: FetchFormSpecsParams) => Promise<any>;
3
4
  type ExtractedFile = {
4
5
  key: string;
package/dist/styles.css CHANGED
@@ -1730,6 +1730,30 @@ input[type='number'] {
1730
1730
  color: var(--ycf-base-text-color);
1731
1731
  }
1732
1732
 
1733
+ /* The confirmation's overlay layout is inline (leave-guard.tsx); only its text is styled here. */
1734
+ .fcode-steps-leave-title {
1735
+ margin: 0 0 0.5rem;
1736
+ font-size: 1.125rem;
1737
+ font-weight: 600;
1738
+ }
1739
+
1740
+ .fcode-steps-leave-message {
1741
+ margin: 0 0 1.5rem;
1742
+ }
1743
+
1744
+ .fcode-steps-item.is-substep {
1745
+ padding-left: 1.5rem;
1746
+ font-size: 0.875rem;
1747
+ }
1748
+
1749
+ .fcode-steps-layout-tabs .fcode-steps-item.is-substep {
1750
+ padding-left: 0.5rem;
1751
+ }
1752
+
1753
+ .fcode-steps-item.is-skipped .fcode-steps-item-title {
1754
+ text-decoration: line-through;
1755
+ }
1756
+
1733
1757
  .fcode-steps-item.is-current {
1734
1758
  color: var(--ycf-base-text-color);
1735
1759
  font-weight: 500;
@@ -1808,5 +1832,9 @@ input[type='number'] {
1808
1832
  .fcode-form .fcode-steps-actions {
1809
1833
  display: flex;
1810
1834
  align-items: center;
1835
+ justify-content: flex-end;
1811
1836
  gap: 0.75rem;
1837
+ margin-top: 1.5rem;
1838
+ padding-top: 1rem;
1839
+ border-top: 1px solid var(--ycf-base-border-color);
1812
1840
  }
package/dist/types.d.ts CHANGED
@@ -32,12 +32,18 @@ export interface EmbedFormOptions {
32
32
  stylesheetBaseUrl?: string;
33
33
  className?: string;
34
34
  loadingOverlayDisabled?: boolean;
35
+ /**
36
+ * Message shown under the spinner while the form is submitting. Unset by
37
+ * default, so the spinner shows on its own: the SDK has no translations of
38
+ * its own, and a fixed English default reached users of every locale. Can
39
+ * come from the schema, where `fcode.i18n("key")` translates it.
40
+ */
35
41
  loadingOverlayContent?: string;
36
42
  /**
37
43
  * Message shown while the form schema is loading (e.g. while a
38
44
  * `preRenderProcess` runs). Must be set by the embedder — unlike the other
39
45
  * options it cannot come from the schema, since the schema is what is being
40
- * loaded. Defaults to 'Loading form...'.
46
+ * loaded. Unset by default: the skeleton and spinner show on their own.
41
47
  */
42
48
  loadingContent?: string;
43
49
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/fcode-react-forms",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "Factorial Code allows start process executions from any webpage embedding process input parameters forms. This allows each form submission to start one execution with the information filled in the form, and also allows to manage the execution result into that webpage.",
5
5
  "type": "module",
6
6
  "homepage": "https://code.factorialhr.com/docs/forms/",