@ssplib/react-components 0.0.308 → 0.0.310

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 (105) hide show
  1. package/package.json +18 -22
  2. package/Map-31d95a26.js +0 -2
  3. package/Map-31d95a26.js.map +0 -1
  4. package/Map-644d2f90.js +0 -2
  5. package/Map-644d2f90.js.map +0 -1
  6. package/components/detalhes/Category.d.ts +0 -3
  7. package/components/detalhes/Field.d.ts +0 -8
  8. package/components/detalhes/FieldLabel.d.ts +0 -8
  9. package/components/detalhes/File.d.ts +0 -7
  10. package/components/form/checkbox/CheckBox.d.ts +0 -10
  11. package/components/form/checkbox/CheckBoxAdditional.d.ts +0 -7
  12. package/components/form/checkbox/CheckBoxWarning.d.ts +0 -10
  13. package/components/form/checkbox/RequiredCheckBoxValidator.d.ts +0 -5
  14. package/components/form/date/DatePicker.d.ts +0 -13
  15. package/components/form/date/GenericDatePicker.d.ts +0 -13
  16. package/components/form/date/TimePicker.d.ts +0 -10
  17. package/components/form/file/DropFileUpload.d.ts +0 -16
  18. package/components/form/file/FileUpload.d.ts +0 -13
  19. package/components/form/input/ActiveInput.d.ts +0 -12
  20. package/components/form/input/AutoComplete.d.ts +0 -11
  21. package/components/form/input/FetchAutoComplete.d.ts +0 -19
  22. package/components/form/input/FixedAutoComplete.d.ts +0 -18
  23. package/components/form/input/GenericFetchAutoComplete.d.ts +0 -19
  24. package/components/form/input/GenericInput.d.ts +0 -19
  25. package/components/form/input/GenericMaskInput.d.ts +0 -14
  26. package/components/form/input/GenericMultInput.d.ts +0 -13
  27. package/components/form/input/Input.d.ts +0 -19
  28. package/components/form/input/MaskInput.d.ts +0 -14
  29. package/components/form/input/MultInput.d.ts +0 -13
  30. package/components/form/input/OptionalInput.d.ts +0 -10
  31. package/components/form/input/OtherCheckBox.d.ts +0 -7
  32. package/components/form/stepper/Stepper.d.ts +0 -16
  33. package/components/form/stepper/StepperBlock.d.ts +0 -14
  34. package/components/form/switch/Switch.d.ts +0 -11
  35. package/components/form/switch/ToggleVisibility.d.ts +0 -13
  36. package/components/form/table/FilterSection.d.ts +0 -7
  37. package/components/form/table/GenericTable.d.ts +0 -8
  38. package/components/form/table/Table.d.ts +0 -5
  39. package/components/form/table/TableErrorState.d.ts +0 -9
  40. package/components/form/table/TableLoadingState.d.ts +0 -5
  41. package/components/form/table/types.d.ts +0 -212
  42. package/components/form/table/utils.d.ts +0 -29
  43. package/components/icons/icons.d.ts +0 -3
  44. package/components/loading/LinearProgress.d.ts +0 -2
  45. package/components/loading/LoadingScreen.d.ts +0 -7
  46. package/components/map/AnimatedMarker.d.ts +0 -5
  47. package/components/map/DraggableMarker.d.ts +0 -12
  48. package/components/map/Map.d.ts +0 -17
  49. package/components/map/index.d.ts +0 -1
  50. package/components/modal/Modal.d.ts +0 -7
  51. package/components/navbar/NavBar.d.ts +0 -15
  52. package/components/navbar/TabNavBar.d.ts +0 -17
  53. package/components/providers/FormProvider.d.ts +0 -11
  54. package/components/providers/GenericFormProvider.d.ts +0 -10
  55. package/components/providers/KeycloakAuthProvider.d.ts +0 -10
  56. package/components/providers/OAuthProvider.d.ts +0 -18
  57. package/components/providers/SspComponentsProvider.d.ts +0 -3
  58. package/components/teste/Teste.d.ts +0 -3
  59. package/components/utils/Bt.d.ts +0 -8
  60. package/components/utils/CustomMenu.d.ts +0 -12
  61. package/context/auth.d.ts +0 -2
  62. package/context/form.d.ts +0 -20
  63. package/decorators/FormBaseDecorator.d.ts +0 -2
  64. package/decorators/GenericFormBaseDecorator.d.ts +0 -2
  65. package/decorators/StepperDecorator.d.ts +0 -2
  66. package/index.cjs +0 -3
  67. package/index.cjs.map +0 -1
  68. package/index.d.ts +0 -44
  69. package/index.esm.js +0 -3
  70. package/index.esm.js.map +0 -1
  71. package/stories/Autocomplete.stories.d.ts +0 -6
  72. package/stories/CheckBox.stories.d.ts +0 -6
  73. package/stories/CheckBoxWarning.stories.d.ts +0 -6
  74. package/stories/DatePicker.stories.d.ts +0 -6
  75. package/stories/DetalhesCategory.stories.d.ts +0 -6
  76. package/stories/DetalhesField.stories.d.ts +0 -6
  77. package/stories/DetalhesFieldLabel.stories.d.ts +0 -6
  78. package/stories/DetalhesFile.stories.d.ts +0 -6
  79. package/stories/DropFileUpload.stories.d.ts +0 -6
  80. package/stories/ExemploAssitirValorInput.stories.d.ts +0 -7
  81. package/stories/ExemploInputs.stories.d.ts +0 -7
  82. package/stories/ExemploValoresCompartilhados.stories.d.ts +0 -7
  83. package/stories/FetchAutocomplete.stories.d.ts +0 -6
  84. package/stories/FileUpload.stories.d.ts +0 -6
  85. package/stories/FixedAutocomplete.stories.d.ts +0 -6
  86. package/stories/GenericFetchAutocomplete.stories.d.ts +0 -6
  87. package/stories/GenericInput.stories.d.ts +0 -6
  88. package/stories/GenericTable.stories.d.ts +0 -6
  89. package/stories/Input.stories.d.ts +0 -6
  90. package/stories/LinearProgress.stories.d.ts +0 -6
  91. package/stories/LoadingScreen.stories.d.ts +0 -6
  92. package/stories/Map.stories.d.ts +0 -6
  93. package/stories/MultInput.stories.d.ts +0 -6
  94. package/stories/NavBar.stories.d.ts +0 -6
  95. package/stories/OptionalInput.stories.d.ts +0 -6
  96. package/stories/OtherCheckBox.stories.d.ts +0 -6
  97. package/stories/Stepper.stories.d.ts +0 -6
  98. package/stories/StepperBlock.stories.d.ts +0 -6
  99. package/stories/Switch.stories.d.ts +0 -6
  100. package/stories/Table.stories.d.ts +0 -4
  101. package/stories/TableWithStaticData.stories.d.ts +0 -6
  102. package/stories/Teste.stories.d.ts +0 -6
  103. package/stories/TimePicker.stories.d.ts +0 -6
  104. package/types/auth.d.ts +0 -72
  105. package/types/form.d.ts +0 -64
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import AutoComplete from '../components/form/input/AutoComplete';
3
- declare const meta: Meta<typeof AutoComplete>;
4
- export default meta;
5
- type Story = StoryObj<typeof AutoComplete>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import CheckBox from '../components/form/checkbox/CheckBox';
3
- declare const meta: Meta<typeof CheckBox>;
4
- export default meta;
5
- type Story = StoryObj<typeof CheckBox>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import CheckboxWarning from '../components/form/checkbox/CheckBoxWarning';
3
- declare const meta: Meta<typeof CheckboxWarning>;
4
- export default meta;
5
- type Story = StoryObj<typeof CheckboxWarning>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import DatePicker from '../components/form/date/DatePicker';
3
- declare const meta: Meta<typeof DatePicker>;
4
- export default meta;
5
- type Story = StoryObj<typeof DatePicker>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { Category } from '../components/detalhes/Category';
3
- declare const meta: Meta<typeof Category>;
4
- export default meta;
5
- type Story = StoryObj<typeof Category>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { Field } from '../components/detalhes/Field';
3
- declare const meta: Meta<typeof Field>;
4
- export default meta;
5
- type Story = StoryObj<typeof Field>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { FieldLabel } from '../components/detalhes/FieldLabel';
3
- declare const meta: Meta<typeof FieldLabel>;
4
- export default meta;
5
- type Story = StoryObj<typeof FieldLabel>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { File } from '../components/detalhes/File';
3
- declare const meta: Meta<typeof File>;
4
- export default meta;
5
- type Story = StoryObj<typeof File>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import DropFileUpload from '../components/form/file/DropFileUpload';
3
- declare const meta: Meta<typeof DropFileUpload>;
4
- export default meta;
5
- type Story = StoryObj<typeof DropFileUpload>;
6
- export declare const Base: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import 'react-toastify/ReactToastify.min.css';
3
- declare const meta: Meta<typeof Teste>;
4
- export default meta;
5
- type Story = StoryObj<typeof Teste>;
6
- export declare const Base: Story;
7
- declare function Teste(): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import 'react-toastify/ReactToastify.min.css';
3
- declare const meta: Meta<typeof Teste>;
4
- export default meta;
5
- type Story = StoryObj<typeof Teste>;
6
- export declare const Base: Story;
7
- declare function Teste(): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import 'react-toastify/ReactToastify.min.css';
3
- declare const meta: Meta<typeof Teste>;
4
- export default meta;
5
- type Story = StoryObj<typeof Teste>;
6
- export declare const Base: Story;
7
- declare function Teste(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import FetchAutoComplete from '../components/form/input/FetchAutoComplete';
3
- declare const meta: Meta<typeof FetchAutoComplete>;
4
- export default meta;
5
- type Story = StoryObj<typeof FetchAutoComplete>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import FileUpload from '../components/form/file/FileUpload';
3
- declare const meta: Meta<typeof FileUpload>;
4
- export default meta;
5
- type Story = StoryObj<typeof FileUpload>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { FixedAutoComplete } from '../components/form/input/FixedAutoComplete';
3
- declare const meta: Meta<typeof FixedAutoComplete>;
4
- export default meta;
5
- type Story = StoryObj<typeof FixedAutoComplete>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import GenericFetchAutoComplete from '../components/form/input/GenericFetchAutoComplete';
3
- declare const meta: Meta<typeof GenericFetchAutoComplete>;
4
- export default meta;
5
- type Story = StoryObj<typeof GenericFetchAutoComplete>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import GenericInput from '../components/form/input/GenericInput';
3
- declare const meta: Meta<typeof GenericInput>;
4
- export default meta;
5
- type Story = StoryObj<typeof GenericInput>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { GenericTable } from '../components/form/table/GenericTable';
3
- declare const meta: Meta<typeof GenericTable>;
4
- export default meta;
5
- type Story = StoryObj<typeof GenericTable>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import Input from '../components/form/input/Input';
3
- declare const meta: Meta<typeof Input>;
4
- export default meta;
5
- type Story = StoryObj<typeof Input>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { LinearProgress } from '../components/loading/LinearProgress';
3
- declare const meta: Meta<typeof LinearProgress>;
4
- export default meta;
5
- type Story = StoryObj<typeof LinearProgress>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { LoadingScreen } from '../components/loading/LoadingScreen';
3
- declare const meta: Meta<typeof LoadingScreen>;
4
- export default meta;
5
- type Story = StoryObj<typeof LoadingScreen>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { Map } from '../components/map/Map';
3
- declare const meta: Meta<typeof Map>;
4
- export default meta;
5
- type Story = StoryObj<typeof Map>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import MultInput from '../components/form/input/MultInput';
3
- declare const meta: Meta<typeof MultInput>;
4
- export default meta;
5
- type Story = StoryObj<typeof MultInput>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import NavBar from '../components/navbar/NavBar';
3
- declare const meta: Meta<typeof NavBar>;
4
- export default meta;
5
- type Story = StoryObj<typeof NavBar>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import OptionalInput from '../components/form/input/OptionalInput';
3
- declare const meta: Meta<typeof OptionalInput>;
4
- export default meta;
5
- type Story = StoryObj<typeof OptionalInput>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import OtherCheckBox from '../components/form/input/OtherCheckBox';
3
- declare const meta: Meta<typeof OtherCheckBox>;
4
- export default meta;
5
- type Story = StoryObj<typeof OtherCheckBox>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import Stepper from '../components/form/stepper/Stepper';
3
- declare const meta: Meta<typeof Stepper>;
4
- export default meta;
5
- type Story = StoryObj<typeof Stepper>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import StepperBlock from '../components/form/stepper/StepperBlock';
3
- declare const meta: Meta<typeof StepperBlock>;
4
- export default meta;
5
- type Story = StoryObj<typeof StepperBlock>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import Switch from '../components/form/switch/Switch';
3
- declare const meta: Meta<typeof Switch>;
4
- export default meta;
5
- type Story = StoryObj<typeof Switch>;
6
- export declare const Base: Story;
@@ -1,4 +0,0 @@
1
- import { Meta } from '@storybook/react-webpack5';
2
- import Table from '../components/form/table/Table';
3
- declare const meta: Meta<typeof Table>;
4
- export default meta;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import Table from '../components/form/table/Table';
3
- declare const meta: Meta<typeof Table>;
4
- export default meta;
5
- type Story = StoryObj<typeof Table>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import Teste from '../components/teste/Teste.tsx';
3
- declare const meta: Meta<typeof Teste>;
4
- export default meta;
5
- type Story = StoryObj<typeof Teste>;
6
- export declare const Base: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import TimePicker from '../components/form/date/TimePicker';
3
- declare const meta: Meta<typeof TimePicker>;
4
- export default meta;
5
- type Story = StoryObj<typeof TimePicker>;
6
- export declare const Base: Story;
package/types/auth.d.ts DELETED
@@ -1,72 +0,0 @@
1
- import { KeycloakTokenParsed } from 'keycloak-js';
2
- export interface User extends KeycloakTokenParsed {
3
- token: string | undefined;
4
- roles: any[];
5
- image?: string;
6
- }
7
- export interface AuthData {
8
- isAuth: boolean;
9
- user: User | null | undefined;
10
- userLoaded: boolean;
11
- login: () => void;
12
- logout: () => void;
13
- }
14
- export interface AuthClaims {
15
- sub: string;
16
- email_verified: string;
17
- amr: string[];
18
- profile: string;
19
- kid: string;
20
- iss: string;
21
- phone_number_verified: string;
22
- preferred_username: string;
23
- picture: string;
24
- aud: string;
25
- auth_time: number;
26
- scope: string[];
27
- name: string;
28
- given_name: string;
29
- phone_number: string;
30
- exp: number;
31
- iat: number;
32
- roles: {
33
- code: number;
34
- name: string;
35
- }[];
36
- jti: string;
37
- email: string;
38
- }
39
- export interface AuthReturn {
40
- access_token: string;
41
- token_type: string;
42
- expires_in: number;
43
- scope: string;
44
- id_token: string;
45
- claims: AuthClaims;
46
- ssp_token: string;
47
- }
48
- export interface AuthSspToken {
49
- id: number;
50
- name: string;
51
- email: string;
52
- phone_number: string;
53
- preferred_username: string;
54
- roles: {
55
- code: number;
56
- name: string;
57
- }[];
58
- iat: number;
59
- exp: number;
60
- aud: string;
61
- iss: string;
62
- sub: string;
63
- }
64
- export interface AuthReturnData {
65
- isAuth: boolean;
66
- type: 'govbr' | 'ad';
67
- user: User | null | undefined;
68
- userLoaded: boolean;
69
- login: () => void;
70
- saveUserData: (token: AuthReturn) => void;
71
- logout: () => void;
72
- }
package/types/form.d.ts DELETED
@@ -1,64 +0,0 @@
1
- import type { Dispatch, SetStateAction } from 'react';
2
- import { Control, FieldErrors, FieldValues, UseFormGetValues, UseFormRegister, UseFormReset, UseFormSetValue, UseFormTrigger, UseFormUnregister, UseFormWatch } from 'react-hook-form';
3
- export declare enum FieldType {
4
- INPUT = 0,
5
- MULT_INPUT = 1,
6
- PHONE = 2,
7
- CPF_CNPJ = 3,
8
- CPF = 4,
9
- CNPJ = 5,
10
- RG = 6,
11
- EMAIL = 7,
12
- ACTIVE = 8,
13
- CHECKBOX = 9,
14
- CHECKBOX_WARNING = 10,
15
- OTHER_CHECKBOX = 11,
16
- LABEL = 12,
17
- CUSTOM = 13,
18
- FILE = 14,
19
- MULT_FILE = 15,
20
- DATE = 16,
21
- TIME = 17,
22
- NUMBER = 18,
23
- AUTO_COMPLETE = 19
24
- }
25
- export declare enum ColumnDirection {
26
- ROW = "row",
27
- COLUMN = "column"
28
- }
29
- export interface FormField {
30
- type?: FieldType;
31
- name?: string;
32
- title?: string;
33
- required?: boolean;
34
- customPlaceholder?: string;
35
- size?: number;
36
- customForm?: React.ReactElement;
37
- customData?: any;
38
- }
39
- export interface FormData {
40
- title: string;
41
- required: boolean;
42
- formFields: FormField[];
43
- name?: string;
44
- }
45
- export interface FormContextType {
46
- formRegister: UseFormRegister<FieldValues>;
47
- formWatch: UseFormWatch<FieldValues>;
48
- formReset: UseFormReset<FieldValues>;
49
- formControl: Control<FieldValues, any>;
50
- formSetValue: UseFormSetValue<FieldValues>;
51
- formTrigger: UseFormTrigger<FieldValues>;
52
- formUnregister: UseFormUnregister<FieldValues>;
53
- formGetValues: UseFormGetValues<FieldValues>;
54
- setFilesUid: Dispatch<SetStateAction<{
55
- CO_SEQ_ARQUIVO: number;
56
- CO_TIPO_ARQUIVO: number;
57
- }[]>>;
58
- errors: FieldErrors<FieldValues>;
59
- submiting: boolean;
60
- }
61
- export type FilesID = {
62
- CO_SEQ_ARQUIVO: number;
63
- CO_TIPO_ARQUIVO: number;
64
- }[];