@tsed/react-formio 1.13.1 → 1.13.2

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 (83) hide show
  1. package/dist/components/actions-table/actionsTable.component.d.ts +0 -1
  2. package/dist/components/actions-table/actionsTable.stories.d.ts +0 -1
  3. package/dist/components/alert/alert.component.d.ts +1 -2
  4. package/dist/components/alert/alert.stories.d.ts +0 -1
  5. package/dist/components/card/card.stories.d.ts +0 -1
  6. package/dist/components/form/form.component.d.ts +1 -2
  7. package/dist/components/form/form.component.spec.d.ts +1 -0
  8. package/dist/components/form/form.stories.d.ts +3745 -172
  9. package/dist/components/form/useForm.hook.d.ts +1 -2
  10. package/dist/components/form-access/formAccess.stories.d.ts +1 -2
  11. package/dist/components/form-action/formAction.stories.d.ts +0 -1
  12. package/dist/components/form-builder/formBuilder.stories.d.ts +518 -153
  13. package/dist/components/form-edit/formEdit.component.d.ts +0 -1
  14. package/dist/components/form-edit/formEdit.stories.d.ts +18 -19
  15. package/dist/components/form-settings/formSettings.component.d.ts +0 -1
  16. package/dist/components/form-settings/formSettings.stories.d.ts +1 -2
  17. package/dist/components/forms-table/components/formCell.component.d.ts +0 -1
  18. package/dist/components/forms-table/formsTable.component.d.ts +0 -1
  19. package/dist/components/forms-table/formsTable.stories.d.ts +0 -1
  20. package/dist/components/input-tags/inputTags.component.d.ts +0 -1
  21. package/dist/components/input-tags/inputTags.stories.d.ts +2 -3
  22. package/dist/components/input-text/inputText.component.d.ts +0 -1
  23. package/dist/components/input-text/inputText.stories.d.ts +0 -1
  24. package/dist/components/loader/loader.component.d.ts +1 -1
  25. package/dist/components/loader/loader.stories.d.ts +0 -1
  26. package/dist/components/modal/modal.component.d.ts +1 -1
  27. package/dist/components/modal/modal.stories.d.ts +0 -1
  28. package/dist/components/pagination/pagination.component.d.ts +0 -1
  29. package/dist/components/pagination/pagination.stories.d.ts +0 -1
  30. package/dist/components/react-component/reactComponent.component.d.ts +3 -3
  31. package/dist/components/select/select.stories.d.ts +2 -3
  32. package/dist/components/submissions-table/submissionsTable.component.d.ts +0 -1
  33. package/dist/components/submissions-table/submissionsTable.stories.d.ts +13 -14
  34. package/dist/components/table/components/defaultArrowSort.component.d.ts +0 -1
  35. package/dist/components/table/components/defaultCell.component.d.ts +0 -1
  36. package/dist/components/table/components/defaultCellHeader.component.d.ts +0 -1
  37. package/dist/components/table/components/defaultCellOperations.component.d.ts +0 -1
  38. package/dist/components/table/components/defaultOperationButton.component.d.ts +0 -1
  39. package/dist/components/table/filters/defaultColumnFilter.component.d.ts +0 -1
  40. package/dist/components/table/filters/selectColumnFilter.component.d.ts +0 -1
  41. package/dist/components/table/filters/sliderColumnFilter.component.d.ts +0 -1
  42. package/dist/components/table/table.stories.d.ts +4 -5
  43. package/dist/components/tabs/tabs.component.stories.d.ts +0 -1
  44. package/dist/hooks/useTooltip.d.ts +1 -1
  45. package/dist/index.js +297 -276
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.modern.js +294 -272
  48. package/dist/index.modern.js.map +1 -1
  49. package/dist/stores/auth/auth.selectors.d.ts +1 -1
  50. package/jest.config.js +1 -1
  51. package/package.json +5 -5
  52. package/src/components/__fixtures__/form.fixture.json +23 -0
  53. package/src/components/form/form.component.spec.tsx +56 -0
  54. package/src/components/form/form.component.tsx +2 -2
  55. package/src/components/form/form.stories.tsx +141 -34
  56. package/src/components/form/useForm.hook.ts +39 -38
  57. package/src/components/form-access/formAccess.component.tsx +1 -1
  58. package/src/components/form-access/formAccess.utils.ts +13 -13
  59. package/src/components/form-action/formAction.component.tsx +1 -1
  60. package/src/components/form-builder/formBuilder.component.tsx +1 -1
  61. package/src/components/form-edit/formCtas.component.tsx +32 -30
  62. package/src/components/form-edit/formEdit.component.tsx +1 -1
  63. package/src/components/form-settings/formSettings.utils.ts +3 -3
  64. package/src/components/input-tags/inputTags.component.tsx +3 -3
  65. package/src/components/input-text/inputText.component.tsx +2 -2
  66. package/src/components/modal/modal.component.tsx +2 -2
  67. package/src/components/react-component/reactComponent.component.tsx +9 -6
  68. package/src/components/select/select.component.tsx +2 -2
  69. package/src/components/submissions-table/submissionsTable.component.tsx +6 -6
  70. package/src/components/table/table.component.tsx +58 -44
  71. package/src/components/table/utils/mapFormToColumns.tsx +1 -1
  72. package/src/components/tabs/tabs.component.tsx +1 -1
  73. package/src/hooks/useTooltip.ts +1 -1
  74. package/src/stores/action-info/action-info.selectors.ts +1 -1
  75. package/src/stores/auth/auth.utils.tsx +2 -2
  76. package/src/stores/auth/getAccess.action.ts +2 -2
  77. package/src/stores/auth/logout.action.spec.ts +1 -0
  78. package/src/stores/form/form.selectors.ts +1 -1
  79. package/src/stores/root/root.selectors.ts +2 -2
  80. package/tsconfig.json +10 -27
  81. package/tsconfig.node.json +8 -0
  82. package/craco.config.js +0 -11
  83. package/tsconfig.test.json +0 -6
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import PropTypes from "prop-types";
3
2
  import { FormOptions } from "../../interfaces/FormOptions";
4
3
  import { UseFormEditHookProps } from "./useFormEdit.hook";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormEdit } from "../../index";
3
2
  declare const _default: {
4
3
  title: string;
@@ -53,7 +52,7 @@ export declare const Sandbox: {
53
52
  args: {
54
53
  form: {
55
54
  type: string;
56
- tags: any[];
55
+ tags: never[];
57
56
  owner: string;
58
57
  components: {
59
58
  label: string;
@@ -111,16 +110,16 @@ export declare const Sandbox: {
111
110
  unique: boolean;
112
111
  errorLabel: string;
113
112
  key: string;
114
- tags: any[];
113
+ tags: never[];
115
114
  properties: {};
116
115
  conditional: {
117
- show: any;
118
- when: any;
116
+ show: null;
117
+ when: null;
119
118
  eq: string;
120
119
  json: string;
121
120
  };
122
121
  customConditional: string;
123
- logic: any[];
122
+ logic: never[];
124
123
  attributes: {};
125
124
  overlay: {
126
125
  style: string;
@@ -143,7 +142,7 @@ export declare const Sandbox: {
143
142
  roles: string[];
144
143
  type: string;
145
144
  }[];
146
- submissionAccess: any[];
145
+ submissionAccess: never[];
147
146
  controller: string;
148
147
  properties: {};
149
148
  settings: {};
@@ -171,7 +170,7 @@ export declare const WithoutTypeChoices: {
171
170
  args: {
172
171
  form: {
173
172
  type: string;
174
- tags: any[];
173
+ tags: never[];
175
174
  owner: string;
176
175
  components: {
177
176
  label: string;
@@ -229,16 +228,16 @@ export declare const WithoutTypeChoices: {
229
228
  unique: boolean;
230
229
  errorLabel: string;
231
230
  key: string;
232
- tags: any[];
231
+ tags: never[];
233
232
  properties: {};
234
233
  conditional: {
235
- show: any;
236
- when: any;
234
+ show: null;
235
+ when: null;
237
236
  eq: string;
238
237
  json: string;
239
238
  };
240
239
  customConditional: string;
241
- logic: any[];
240
+ logic: never[];
242
241
  attributes: {};
243
242
  overlay: {
244
243
  style: string;
@@ -261,7 +260,7 @@ export declare const WithoutTypeChoices: {
261
260
  roles: string[];
262
261
  type: string;
263
262
  }[];
264
- submissionAccess: any[];
263
+ submissionAccess: never[];
265
264
  controller: string;
266
265
  properties: {};
267
266
  settings: {};
@@ -285,7 +284,7 @@ export declare const WithoutTags: {
285
284
  args: {
286
285
  form: {
287
286
  type: string;
288
- tags: any[];
287
+ tags: never[];
289
288
  owner: string;
290
289
  components: {
291
290
  label: string;
@@ -343,16 +342,16 @@ export declare const WithoutTags: {
343
342
  unique: boolean;
344
343
  errorLabel: string;
345
344
  key: string;
346
- tags: any[];
345
+ tags: never[];
347
346
  properties: {};
348
347
  conditional: {
349
- show: any;
350
- when: any;
348
+ show: null;
349
+ when: null;
351
350
  eq: string;
352
351
  json: string;
353
352
  };
354
353
  customConditional: string;
355
- logic: any[];
354
+ logic: never[];
356
355
  attributes: {};
357
356
  overlay: {
358
357
  style: string;
@@ -375,7 +374,7 @@ export declare const WithoutTags: {
375
374
  roles: string[];
376
375
  type: string;
377
376
  }[];
378
- submissionAccess: any[];
377
+ submissionAccess: never[];
379
378
  controller: string;
380
379
  properties: {};
381
380
  settings: {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormOptions, FormSchema } from "../../interfaces";
3
2
  export interface FormSettingsProps {
4
3
  form: Partial<FormSchema>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormSettings } from "./formSettings.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -33,7 +32,7 @@ export declare const Sandbox: {
33
32
  form: {
34
33
  _id: string;
35
34
  type: string;
36
- tags: any[];
35
+ tags: never[];
37
36
  owner: string;
38
37
  access: {
39
38
  roles: string[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CellProps } from "react-table";
3
2
  import { FormSchema } from "../../../interfaces";
4
3
  export declare function FormsCell(props: CellProps<FormSchema> & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormSchema } from "../../interfaces";
3
2
  import { TableProps } from "../table/table.component";
4
3
  export declare type FormsTableProps = Omit<TableProps<FormSchema>, "columns"> & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormsTable } from "./formsTable.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import PropTypes from "prop-types";
3
2
  import { FormControlProps } from "../form-control/formControl.component";
4
3
  export interface InputTagsProps<T = any> extends Omit<FormControlProps, "description" | "prefix" | "suffix"> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputTags } from "./inputTags.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -58,7 +57,7 @@ export declare const WithPrefix: {
58
57
  (args: any): JSX.Element;
59
58
  args: {
60
59
  label: string;
61
- value: any[];
60
+ value: never[];
62
61
  name: string;
63
62
  size: string;
64
63
  placeholder: string;
@@ -68,7 +67,7 @@ export declare const WithSuffix: {
68
67
  (args: any): JSX.Element;
69
68
  args: {
70
69
  label: string;
71
- value: any[];
70
+ value: never[];
72
71
  name: string;
73
72
  size: string;
74
73
  placeholder: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import PropTypes from "prop-types";
3
2
  import { FormControlProps } from "../form-control/formControl.component";
4
3
  export interface InputTextProps<T = any> extends FormControlProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputText } from "./inputText.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -6,7 +6,7 @@ export interface LoaderProps {
6
6
  icon?: string;
7
7
  className?: string;
8
8
  }
9
- export declare function Loader({ isActive, color, icon, className }: PropsWithChildren<LoaderProps>): JSX.Element;
9
+ export declare function Loader({ isActive, color, icon, className }: PropsWithChildren<LoaderProps>): JSX.Element | null;
10
10
  export declare namespace Loader {
11
11
  var propTypes: {
12
12
  isActive: PropTypes.Requireable<boolean>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Loader } from "./loader.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -12,4 +12,4 @@ export interface ModalProps extends Record<string, any> {
12
12
  footer?: any;
13
13
  title?: string;
14
14
  }
15
- export declare function Modal({ show, children, closeModal, onClose, title, footer: ModalFooter, style, className, ...props }: PropsWithChildren<ModalProps>): JSX.Element;
15
+ export declare function Modal({ show, children, closeModal, onClose, title, footer: ModalFooter, style, className, ...props }: PropsWithChildren<ModalProps>): JSX.Element | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Modal, ModalProps } from "./modal.component";
3
2
  import { RemoveModalProps } from "./removeModal.component";
4
3
  declare const _default: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface PaginationProps {
3
2
  className?: string;
4
3
  pageSizes?: number[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Pagination } from "./pagination.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -2,8 +2,8 @@ import { Components, ComponentSchema } from "formiojs";
2
2
  import { Submission } from "../../interfaces/Submission";
3
3
  export declare class ReactComponent<Data = any> extends Components.components.field {
4
4
  reactInstance: any;
5
- shouldSetValue: boolean;
6
- private dataForSetting;
5
+ shouldSetValue?: boolean;
6
+ private dataForSetting?;
7
7
  /**
8
8
  * This is the first phase of component building where the component is instantiated.
9
9
  *
@@ -70,7 +70,7 @@ export declare class ReactComponent<Data = any> extends Components.components.fi
70
70
  * @param value
71
71
  * @param flags
72
72
  */
73
- updateValue: (value?: Data, flags?: Record<string, any>) => boolean;
73
+ updateValue: (value?: Data | undefined, flags?: Record<string, any> | undefined) => boolean;
74
74
  /**
75
75
  * Get the current value of the component. Should return the value set in the react component.
76
76
  *
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Select } from "./select.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -122,7 +121,7 @@ export declare const TypeMultiple: {
122
121
  args: {
123
122
  label: string;
124
123
  name: string;
125
- value: any[];
124
+ value: never[];
126
125
  size: string;
127
126
  multiple: boolean;
128
127
  placeholder: string;
@@ -137,7 +136,7 @@ export declare const ChoicesjsMultiple: {
137
136
  (args: any): JSX.Element;
138
137
  args: {
139
138
  label: string;
140
- value: any[];
139
+ value: never[];
141
140
  size: string;
142
141
  multiple: boolean;
143
142
  layout: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormSchema, Submission } from "../../interfaces";
3
2
  import { TableProps } from "../table/table.component";
4
3
  export declare type SubmissionsTableProps = Omit<TableProps<Submission>, "columns"> & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SubmissionsTable } from "./submissionsTable.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -50,7 +49,7 @@ export declare const Sandbox: {
50
49
  _id: string;
51
50
  type: string;
52
51
  tags: string[];
53
- owner: any;
52
+ owner: null;
54
53
  components: ({
55
54
  autofocus: boolean;
56
55
  input: boolean;
@@ -90,7 +89,7 @@ export declare const Sandbox: {
90
89
  };
91
90
  labelPosition: string;
92
91
  inputFormat: string;
93
- tags: any[];
92
+ tags: never[];
94
93
  properties: {};
95
94
  id: string;
96
95
  type: string;
@@ -193,7 +192,7 @@ export declare const Sandbox: {
193
192
  };
194
193
  labelPosition: string;
195
194
  inputFormat: string;
196
- tags: any[];
195
+ tags: never[];
197
196
  properties: {};
198
197
  id: string;
199
198
  type: string;
@@ -305,7 +304,7 @@ export declare const Sandbox: {
305
304
  unique: boolean;
306
305
  errorLabel: string;
307
306
  key: string;
308
- tags: any[];
307
+ tags: never[];
309
308
  properties: {};
310
309
  conditional: {
311
310
  show: string;
@@ -365,7 +364,7 @@ export declare const Sandbox: {
365
364
  json: string;
366
365
  url: string;
367
366
  custom: string;
368
- values: any[];
367
+ values: never[];
369
368
  };
370
369
  inputType?: undefined;
371
370
  inputMask?: undefined;
@@ -416,8 +415,8 @@ export declare const Sandbox: {
416
415
  customDefaultValue: string;
417
416
  calculateValue: string;
418
417
  allowCalculateOverride: boolean;
419
- products: any[];
420
- categoryServices: any[];
418
+ products: never[];
419
+ categoryServices: never[];
421
420
  validateOn: string;
422
421
  validate: {
423
422
  required: boolean;
@@ -443,7 +442,7 @@ export declare const Sandbox: {
443
442
  when?: undefined;
444
443
  };
445
444
  customConditional: string;
446
- relavi: any[];
445
+ relavi: never[];
447
446
  minSearch: number;
448
447
  limit: number;
449
448
  input: boolean;
@@ -518,7 +517,7 @@ export declare const Sandbox: {
518
517
  action: string;
519
518
  disableOnInvalid: boolean;
520
519
  theme: string;
521
- tags: any[];
520
+ tags: never[];
522
521
  conditional: {
523
522
  show: string;
524
523
  eq: string;
@@ -616,14 +615,14 @@ export declare const Sandbox: {
616
615
  };
617
616
  data: {
618
617
  _id: string;
619
- owner: any;
620
- roles: any[];
618
+ owner: null;
619
+ roles: never[];
621
620
  data: {
622
621
  id: string;
623
622
  label: string;
624
623
  };
625
- access: any[];
626
- externalIds: any[];
624
+ access: never[];
625
+ externalIds: never[];
627
626
  created: string;
628
627
  modified: string;
629
628
  form: string;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function DefaultArrowSort({ column }: any): JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function DefaultCell({ value, render }: any): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { HeaderGroup } from "react-table";
3
2
  export interface DefaultCellHeaderProps<Data extends object = any> extends Record<string, unknown> {
4
3
  column: HeaderGroup<Data>;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function DefaultCellOperations({ operations, row, onClick, ctx, i18n }: any): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface OperationButtonProps {
3
2
  className?: string;
4
3
  buttonType?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterProps } from "react-table";
3
2
  export declare function DefaultColumnFilter<D extends Record<string, unknown> = {}>(props: FilterProps<D> & {
4
3
  filterId: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { FilterProps } from "react-table";
3
2
  export declare function SelectColumnFilter<D extends Record<string, unknown> = {}>({ column }: FilterProps<D>): JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { FilterProps } from "react-table";
3
2
  export declare function SliderColumnFilter<D extends Record<string, unknown> = {}>({ column: { filterValue, setFilter, preFilteredRows, id } }: FilterProps<D>): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Table } from "./table.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -12,14 +11,14 @@ export declare const Sandbox: {
12
11
  args: {
13
12
  data: {
14
13
  _id: string;
15
- owner: any;
16
- roles: any[];
14
+ owner: null;
15
+ roles: never[];
17
16
  data: {
18
17
  id: string;
19
18
  label: string;
20
19
  };
21
- access: any[];
22
- externalIds: any[];
20
+ access: never[];
21
+ externalIds: never[];
23
22
  created: string;
24
23
  modified: string;
25
24
  form: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Tabs } from "./tabs.component";
3
2
  declare const _default: {
4
3
  title: string;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { Options } from "tooltip.js";
3
- export declare function useTooltip(options: Options): import("react").MutableRefObject<undefined>;
3
+ export declare function useTooltip(options: Options): import("react").MutableRefObject<any>;