@intlayer/design-system 3.0.3 → 3.1.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.
- package/dist/.vite/manifest.json +521 -395
- package/dist/Form-2XHQV7F_.cjs +295 -0
- package/dist/Form-2XHQV7F_.cjs.map +1 -0
- package/dist/Form-BO0i3nT9.js +300 -0
- package/dist/Form-BO0i3nT9.js.map +1 -0
- package/dist/Form-BaHDK0RZ.cjs +298 -0
- package/dist/Form-BaHDK0RZ.cjs.map +1 -0
- package/dist/Form-BfZMqK2D.js +300 -0
- package/dist/Form-BfZMqK2D.js.map +1 -0
- package/dist/Form-C13KWSZs.cjs +299 -0
- package/dist/Form-C13KWSZs.cjs.map +1 -0
- package/dist/Form-C8K2f8ph.js +300 -0
- package/dist/Form-C8K2f8ph.js.map +1 -0
- package/dist/Form-CKvCgz8c.cjs +299 -0
- package/dist/Form-CKvCgz8c.cjs.map +1 -0
- package/dist/Form-Cbk5Lhpd.js +299 -0
- package/dist/Form-Cbk5Lhpd.js.map +1 -0
- package/dist/Form-CiAgFAPb.cjs +300 -0
- package/dist/Form-CiAgFAPb.cjs.map +1 -0
- package/dist/Form-CnBKDneQ.js +296 -0
- package/dist/Form-CnBKDneQ.js.map +1 -0
- package/dist/Form-DERuauvB.cjs +300 -0
- package/dist/Form-DERuauvB.cjs.map +1 -0
- package/dist/Form-DhlDf3ML.cjs +299 -0
- package/dist/Form-DhlDf3ML.cjs.map +1 -0
- package/dist/Form-DkAZ0Jdf.cjs +299 -0
- package/dist/Form-DkAZ0Jdf.cjs.map +1 -0
- package/dist/Form-DqnNP4DA.js +300 -0
- package/dist/Form-DqnNP4DA.js.map +1 -0
- package/dist/Form-DyFBmVya.js +301 -0
- package/dist/Form-DyFBmVya.js.map +1 -0
- package/dist/Form-FW4Odjfm.js +301 -0
- package/dist/Form-FW4Odjfm.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts +0 -1
- package/dist/components/Auth/AuthModal/index.d.ts +0 -1
- package/dist/components/Auth/AuthProvider/index.cjs +5 -21
- package/dist/components/Auth/AuthProvider/index.cjs.map +1 -1
- package/dist/components/Auth/AuthProvider/index.d.ts +4 -3
- package/dist/components/Auth/AuthProvider/index.d.ts.map +1 -1
- package/dist/components/Auth/AuthProvider/index.mjs +6 -22
- package/dist/components/Auth/AuthProvider/index.mjs.map +1 -1
- package/dist/components/Auth/AuthProvider/useSession.cjs +7 -3
- package/dist/components/Auth/AuthProvider/useSession.cjs.map +1 -1
- package/dist/components/Auth/AuthProvider/useSession.d.ts +0 -1
- package/dist/components/Auth/AuthProvider/useSession.d.ts.map +1 -1
- package/dist/components/Auth/AuthProvider/useSession.mjs +7 -3
- package/dist/components/Auth/AuthProvider/useSession.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.d.ts +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts +0 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts +0 -1
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.d.ts +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +10 -10
- package/dist/components/Auth/ChangePasswordForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.d.ts +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.d.ts +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +5 -5
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.d.ts +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +7 -7
- package/dist/components/Auth/ResetPasswordForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts +0 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +1 -1
- package/dist/components/Auth/SignInForm/SignInSchema.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInSchema.d.ts +0 -1
- package/dist/components/Auth/SignInForm/SignInSchema.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/index.content.d.ts +13 -13
- package/dist/components/Auth/SignInForm/index.content.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +0 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +1 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.d.ts +0 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/index.content.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/index.content.d.ts +11 -11
- package/dist/components/Auth/SignUpForm/index.content.mjs.map +1 -1
- package/dist/components/Avatar/index.d.ts +0 -1
- package/dist/components/Badge/index.d.ts +1 -2
- package/dist/components/Breadcrumb/index.d.ts +0 -1
- package/dist/components/Button/Button.cjs +1 -0
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +2 -3
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +1 -0
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Command/index.d.ts +9 -10
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +16 -3
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.d.ts +0 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +0 -1
- package/dist/components/ContentSelector/ContentSelector.d.ts +0 -1
- package/dist/components/CopyToClipboard/index.d.ts +0 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs +30 -24
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +0 -7
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs +30 -24
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.cjs +1 -0
- package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.d.ts +0 -1
- package/dist/components/DictionaryEditor/ItemLayout.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.mjs +1 -0
- package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +7 -5
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +7 -5
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.d.ts +0 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts +0 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +111 -19
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts +1 -5
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +112 -20
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs +18 -20
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +0 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs +19 -21
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +0 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +67 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts +27 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +67 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs +8 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.cjs.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.d.ts +4 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.d.ts.map +1 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs +8 -0
- package/dist/components/DictionaryEditor/validDictionaryChangeButtonsSchema.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +8 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +8 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts +2 -3
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts +2 -3
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +37 -13
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +37 -13
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +21 -6
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +21 -6
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +29 -14
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +29 -14
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs +1 -0
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +18 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +18 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +18 -2
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +18 -2
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +14 -15
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +14 -15
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveFormSchema.d.ts +0 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +12 -12
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +12 -12
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts +0 -1
- package/dist/components/DropDown/index.d.ts +0 -1
- package/dist/components/DropDown/types.d.ts +0 -1
- package/dist/components/EditableField/EditableFieldInput.cjs +12 -5
- package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.d.ts +2 -4
- package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.mjs +13 -6
- package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts +0 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +17 -4
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.d.ts +6 -3
- package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +18 -5
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/Flags/Flag.d.ts +0 -1
- package/dist/components/Footer/index.d.ts +0 -1
- package/dist/components/Form/Form.cjs +1 -1
- package/dist/components/Form/Form.d.ts +2 -1
- package/dist/components/Form/Form.d.ts.map +1 -1
- package/dist/components/Form/Form.mjs +1 -1
- package/dist/components/Form/FormBase.d.ts +0 -1
- package/dist/components/Form/FormBase.d.ts.map +1 -1
- package/dist/components/Form/FormDescription.d.ts +0 -1
- package/dist/components/Form/FormField.d.ts +0 -1
- package/dist/components/Form/FormItem.d.ts +0 -1
- package/dist/components/Form/FormMessage.d.ts +0 -1
- package/dist/components/Form/elements/CheckboxElement.cjs +10 -0
- package/dist/components/Form/elements/CheckboxElement.cjs.map +1 -0
- package/dist/components/Form/elements/CheckboxElement.d.ts +10 -0
- package/dist/components/Form/elements/CheckboxElement.d.ts.map +1 -0
- package/dist/components/Form/elements/CheckboxElement.mjs +10 -0
- package/dist/components/Form/elements/CheckboxElement.mjs.map +1 -0
- package/dist/components/Form/elements/EditableFieldInputElement.cjs +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.d.ts +0 -1
- package/dist/components/Form/elements/EditableFieldInputElement.mjs +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +0 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/FormElement.cjs +1 -1
- package/dist/components/Form/elements/FormElement.d.ts +0 -1
- package/dist/components/Form/elements/FormElement.mjs +1 -1
- package/dist/components/Form/elements/FormElementWrapper.d.ts +0 -1
- package/dist/components/Form/elements/InputElement.cjs +2 -1
- package/dist/components/Form/elements/InputElement.cjs.map +1 -1
- package/dist/components/Form/elements/InputElement.d.ts +2 -3
- package/dist/components/Form/elements/InputElement.d.ts.map +1 -1
- package/dist/components/Form/elements/InputElement.mjs +2 -1
- package/dist/components/Form/elements/InputElement.mjs.map +1 -1
- package/dist/components/Form/elements/InputPasswordElement.cjs +2 -1
- package/dist/components/Form/elements/InputPasswordElement.cjs.map +1 -1
- package/dist/components/Form/elements/InputPasswordElement.d.ts +2 -3
- package/dist/components/Form/elements/InputPasswordElement.d.ts.map +1 -1
- package/dist/components/Form/elements/InputPasswordElement.mjs +2 -1
- package/dist/components/Form/elements/InputPasswordElement.mjs.map +1 -1
- package/dist/components/Form/elements/MultiselectElement.cjs +1 -1
- package/dist/components/Form/elements/MultiselectElement.d.ts +0 -1
- package/dist/components/Form/elements/MultiselectElement.mjs +1 -1
- package/dist/components/Form/elements/SelectElement.cjs +1 -1
- package/dist/components/Form/elements/SelectElement.d.ts +0 -1
- package/dist/components/Form/elements/SelectElement.mjs +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.cjs +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.d.ts +0 -1
- package/dist/components/Form/elements/SwitchSelectorElement.mjs +1 -1
- package/dist/components/Form/elements/TextAreaElement.cjs +1 -1
- package/dist/components/Form/elements/TextAreaElement.d.ts +0 -1
- package/dist/components/Form/elements/TextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/index.cjs +1 -1
- package/dist/components/Form/elements/index.mjs +1 -1
- package/dist/components/Form/index.cjs +1 -1
- package/dist/components/Form/index.mjs +1 -1
- package/dist/components/Form/layout/FormItemLayout.cjs +1 -1
- package/dist/components/Form/layout/FormItemLayout.d.ts +1 -2
- package/dist/components/Form/layout/FormItemLayout.d.ts.map +1 -1
- package/dist/components/Form/layout/FormItemLayout.mjs +1 -1
- package/dist/components/Form/layout/FormLabelLayout.d.ts +0 -1
- package/dist/components/Form/layout/RequiredStar.d.ts +0 -1
- package/dist/components/Form/layout/index.cjs +1 -1
- package/dist/components/Form/layout/index.mjs +1 -1
- package/dist/components/Headers/index.d.ts +0 -1
- package/dist/components/IDE/CodeRender.cjs.map +1 -1
- package/dist/components/IDE/CodeRender.d.ts +0 -1
- package/dist/components/IDE/CodeRender.mjs.map +1 -1
- package/dist/components/IDE/FileList.d.ts +0 -1
- package/dist/components/IDE/FileTree.d.ts +0 -1
- package/dist/components/IDE/IDE.d.ts +0 -1
- package/dist/components/IDE/MarkDownRender.d.ts +0 -1
- package/dist/components/InformationTag/index.d.ts +0 -1
- package/dist/components/Input/Checkbox.cjs +80 -0
- package/dist/components/Input/Checkbox.cjs.map +1 -0
- package/dist/components/Input/Checkbox.d.ts +14 -0
- package/dist/components/Input/Checkbox.d.ts.map +1 -0
- package/dist/components/Input/Checkbox.mjs +80 -0
- package/dist/components/Input/Checkbox.mjs.map +1 -0
- package/dist/components/Input/Input.d.ts +0 -1
- package/dist/components/Input/InputPassword.d.ts +0 -1
- package/dist/components/Input/index.cjs +3 -0
- package/dist/components/Input/index.cjs.map +1 -1
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.mjs +3 -0
- package/dist/components/Input/index.mjs.map +1 -1
- package/dist/components/Label/index.d.ts +0 -1
- package/dist/components/Link/Link.cjs +7 -2
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +3 -3
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +7 -2
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Loader/index.d.ts +0 -1
- package/dist/components/Loader/spinner.d.ts +0 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +0 -1
- package/dist/components/Logo/LogoCircle.d.ts +0 -1
- package/dist/components/Logo/LogoNoFrame.d.ts +0 -1
- package/dist/components/Logo/LogoSquare.d.ts +0 -1
- package/dist/components/Logo/LogoSquircle.d.ts +0 -1
- package/dist/components/Logo/LogoTextOnly.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextBelowCircle.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextBelowNoFrame.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextBelowSquircle.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextCircle.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextNoFrame.d.ts +0 -1
- package/dist/components/Logo/LogoWithTextSquircle.d.ts +0 -1
- package/dist/components/Logo/index.d.ts +0 -1
- package/dist/components/MarkDownRender/index.d.ts +0 -1
- package/dist/components/MaxHeightSmoother/index.d.ts +0 -1
- package/dist/components/MaxWidthSmoother/index.d.ts +0 -1
- package/dist/components/Modal/Modal.cjs +19 -15
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +19 -15
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/Burger.d.ts +0 -1
- package/dist/components/Navbar/DesktopNavbar.cjs +10 -26
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.d.ts +6 -6
- package/dist/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +10 -26
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +3 -57
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.d.ts +6 -7
- package/dist/components/Navbar/MobileNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +3 -57
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Navbar/index.cjs +4 -2
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.d.ts +9 -15
- package/dist/components/Navbar/index.d.ts.map +1 -1
- package/dist/components/Navbar/index.mjs +4 -2
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/Pattern/DotPattern.d.ts +0 -1
- package/dist/components/Pattern/GridPattern.d.ts +0 -1
- package/dist/components/Pattern/SpotLight.d.ts +0 -1
- package/dist/components/Popover/index.d.ts +0 -1
- package/dist/components/PressableSpan/PressableSpan.d.ts +0 -1
- package/dist/components/ProfileDropDown/index.d.ts +0 -1
- package/dist/components/RightDrawer/RightDrawer.d.ts +0 -1
- package/dist/components/Select/Multiselect.d.ts +2 -3
- package/dist/components/Select/Multiselect.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts +1 -2
- package/dist/components/TabSelector/TabSelector.cjs +2 -0
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts +2 -3
- package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +2 -0
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.d.ts +0 -1
- package/dist/components/TextArea/TextArea.cjs +1 -0
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +0 -1
- package/dist/components/TextArea/TextArea.mjs +1 -0
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.d.ts +0 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.d.ts +0 -1
- package/dist/components/Toaster/Toast.d.ts +1 -1
- package/dist/components/Toaster/useToast.d.ts +0 -1
- package/dist/components/WithResizer/index.d.ts +0 -1
- package/dist/components/index.cjs +4 -3
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +4 -3
- package/dist/hooks/intlayerAPIHooks.cjs +16 -3
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +0 -1
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +16 -3
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +1 -5
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +1 -5
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncWrapper.d.ts +0 -1
- package/dist/hooks/useGetAllDictionaries.d.ts +0 -1
- package/dist/hooks/useItemSelector.d.ts +0 -1
- package/dist/index-BUDsCMdX.cjs +204 -0
- package/dist/index-BUDsCMdX.cjs.map +1 -0
- package/dist/index-C09rI9kw.js +205 -0
- package/dist/index-C09rI9kw.js.map +1 -0
- package/dist/libs/intlayer-api/auth.d.ts +0 -1
- package/dist/libs/intlayer-api/dictionary.d.ts +0 -1
- package/dist/libs/intlayer-api/fetcher.cjs +1 -6
- package/dist/libs/intlayer-api/fetcher.cjs.map +1 -1
- package/dist/libs/intlayer-api/fetcher.d.ts.map +1 -1
- package/dist/libs/intlayer-api/fetcher.mjs +1 -6
- package/dist/libs/intlayer-api/fetcher.mjs.map +1 -1
- package/dist/libs/intlayer-api/index.d.ts +0 -1
- package/dist/libs/intlayer-api/organization.d.ts +0 -1
- package/dist/libs/intlayer-api/project.d.ts +0 -1
- package/dist/libs/intlayer-api/user.d.ts +0 -1
- package/dist/tailwind.css +1 -1
- package/dist/utils/cn.d.ts +0 -1
- package/dist/utils/dictionary.cjs +37 -1
- package/dist/utils/dictionary.cjs.map +1 -1
- package/dist/utils/dictionary.d.ts +1 -1
- package/dist/utils/dictionary.d.ts.map +1 -1
- package/dist/utils/dictionary.mjs +38 -2
- package/dist/utils/dictionary.mjs.map +1 -1
- package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs +66 -0
- package/dist/validDictionaryChangeButtons.content-BK9QaXPm.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs +66 -0
- package/dist/validDictionaryChangeButtons.content-CAAscqJI.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js +67 -0
- package/dist/validDictionaryChangeButtons.content-D7AvoBdl.js.map +1 -0
- package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs +45 -0
- package/dist/validDictionaryChangeButtons.content-DQwoUNCC.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js +67 -0
- package/dist/validDictionaryChangeButtons.content-DQxPoIe6.js.map +1 -0
- package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs +66 -0
- package/dist/validDictionaryChangeButtons.content-JUcjGdBx.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js +67 -0
- package/dist/validDictionaryChangeButtons.content-ejY3-sbG.js.map +1 -0
- package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js +46 -0
- package/dist/validDictionaryChangeButtons.content-iyT0lKy7.js.map +1 -0
- package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs +66 -0
- package/dist/validDictionaryChangeButtons.content-u4qShrQh.cjs.map +1 -0
- package/dist/validDictionaryChangeButtons.content-y4up9NU8.js +67 -0
- package/dist/validDictionaryChangeButtons.content-y4up9NU8.js.map +1 -0
- package/dist/zod-BV4nCGJE.js.map +1 -1
- package/dist/zod-DSrtTSD_.cjs.map +1 -1
- package/package.json +81 -54
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, FC, HTMLAttributes } from 'react';
|
|
2
2
|
import { Command, CommandRoot } from '../Command';
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* MultiSelect Docs: {@link: https://shadcn-extension.vercel.app/docs/multi-select}
|
|
6
5
|
*/
|
|
@@ -45,7 +44,7 @@ declare const MultiSelectList: import('react').ForwardRefExoticComponent<Omit<Om
|
|
|
45
44
|
ref?: React.Ref<HTMLDivElement>;
|
|
46
45
|
} & {
|
|
47
46
|
asChild?: boolean;
|
|
48
|
-
}, "key" | keyof HTMLAttributes<HTMLDivElement
|
|
47
|
+
}, "key" | "asChild" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
49
48
|
label?: string;
|
|
50
49
|
} & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
51
50
|
declare const MultiSelectItem: import('react').ForwardRefExoticComponent<{
|
|
@@ -56,7 +55,7 @@ declare const MultiSelectItem: import('react').ForwardRefExoticComponent<{
|
|
|
56
55
|
ref?: React.Ref<HTMLDivElement>;
|
|
57
56
|
} & {
|
|
58
57
|
asChild?: boolean;
|
|
59
|
-
}, "key" | keyof HTMLAttributes<HTMLDivElement
|
|
58
|
+
}, "key" | "asChild" | keyof HTMLAttributes<HTMLDivElement>>, "value" | "onSelect" | "disabled"> & {
|
|
60
59
|
disabled?: boolean;
|
|
61
60
|
onSelect?: (value: string) => void;
|
|
62
61
|
value?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Multiselect.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Multiselect.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,wBAAwB,EAG7B,KAAK,EAAE,EACP,KAAK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AC1C,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,gBAAgB,CAmLzC,CAAC;AAEF,QAAA,MAAM,kBAAkB;oBAGJ,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM;6BAChB,OAAO;kDAiEnC,CAAC;AAIF,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,wBAAwB,CAAC,OAAO,OAAO,CAAC,KAAK,CAAC,CAgCxE,CAAC;AAIF,QAAA,MAAM,kBAAkB,2HAUtB,CAAC;AAIH,QAAA,MAAM,eAAe;eA/XlB,MAAO,SAAS;;UA0dO,MAAO,GAAG;;;;;kKA3ElC,CAAC;AAIH,QAAA,MAAM,eAAe;WAEV,MAAM;;qBArZP,SAAS;;UA+doV,MAAO,GAAG;;;;;;;;;kKAxC/W,CAAC;AAIH,KAAK,eAAe,GAAG,OAAO,eAAe,GAAG;IAC9C,OAAO,EAAE,OAAO,kBAAkB,CAAC;IACnC,KAAK,EAAE,OAAO,gBAAgB,CAAC;IAC/B,OAAO,EAAE,OAAO,kBAAkB,CAAC;IACnC,IAAI,EAAE,OAAO,eAAe,CAAC;IAC7B,IAAI,EAAE,OAAO,eAAe,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,WAAW,EAAsB,eAAe,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { ReactNode, HTMLAttributes } from 'react';
|
|
3
|
-
|
|
4
3
|
export type SwitchSelectorChoice<T = boolean> = {
|
|
5
4
|
content: ReactNode;
|
|
6
5
|
value: T;
|
|
@@ -14,7 +13,7 @@ type SwitchSelectorProps<T = boolean> = {
|
|
|
14
13
|
className?: string;
|
|
15
14
|
} & VariantProps<typeof switchSelectorVariant> & VariantProps<typeof choiceVariant>;
|
|
16
15
|
declare const switchSelectorVariant: (props?: ({
|
|
17
|
-
color?: "text" | "
|
|
16
|
+
color?: "text" | "dark" | "light" | "primary" | "secondary" | "destructive" | "neutral" | null | undefined;
|
|
18
17
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
19
18
|
declare const choiceVariant: (props?: ({
|
|
20
19
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabSelector.cjs","sources":["../../../src/components/TabSelector/TabSelector.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n useRef,\n type HTMLAttributes,\n type ReactElement,\n cloneElement,\n} from 'react';\nimport { useItemSelector } from '../../hooks';\nimport { cn } from '../../utils/cn';\n\nconst tabSelectorVariant = cva(\n 'relative flex size-full flex-row items-center gap-2',\n {\n variants: {\n color: {\n primary:\n 'border-primary text-primary dark:border-primary-dark dark:text-primary-dark',\n secondary:\n 'border-secondary text-secondary dark:border-secondary-dark dark:text-secondary-dark',\n destructive:\n 'border-destructive bg-destructive text-destructive dark:border-destructive-dark dark:bg-destructive-dark',\n neutral:\n 'border-neutral text-neutral dark:border-neutral-dark dark:text-neutral-dark',\n light: 'border-white text-white',\n dark: 'border-neutral-800 text-neutral-800',\n text: 'border-text text-text dark:border-text-dark dark:text-text-dark',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute top-0 z-[-1] h-full w-auto rounded-lg opacity-10 transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n primary:\n 'bg-primary aria-selected:text-text dark:bg-primary-dark dark:aria-selected:text-text-dark',\n secondary:\n 'bg-secondary aria-selected:text-text dark:bg-secondary-dark dark:aria-selected:text-text-dark',\n destructive:\n 'bg-destructive aria-selected:text-text dark:bg-destructive-dark dark:aria-selected:text-text-dark',\n neutral:\n 'bg-neutral aria-selected:text-white dark:bg-neutral-dark dark:aria-selected:text-text',\n light: 'bg-white aria-selected:text-black',\n dark: 'bg-neutral-800 aria-selected:text-white',\n text: 'bg-text aria-selected:text-text-dark dark:bg-text-dark dark:aria-selected:text-text',\n },\n },\n }\n);\n\
|
|
1
|
+
{"version":3,"file":"TabSelector.cjs","sources":["../../../src/components/TabSelector/TabSelector.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n useRef,\n type HTMLAttributes,\n type ReactElement,\n cloneElement,\n} from 'react';\nimport { useItemSelector } from '../../hooks';\nimport { cn } from '../../utils/cn';\n\nconst tabSelectorVariant = cva(\n 'relative flex size-full flex-row items-center gap-2',\n {\n variants: {\n color: {\n primary:\n 'border-primary text-primary dark:border-primary-dark dark:text-primary-dark',\n secondary:\n 'border-secondary text-secondary dark:border-secondary-dark dark:text-secondary-dark',\n destructive:\n 'border-destructive bg-destructive text-destructive dark:border-destructive-dark dark:bg-destructive-dark',\n neutral:\n 'border-neutral text-neutral dark:border-neutral-dark dark:text-neutral-dark',\n light: 'border-white text-white',\n dark: 'border-neutral-800 text-neutral-800',\n text: 'border-text text-text dark:border-text-dark dark:text-text-dark',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute top-0 z-[-1] h-full w-auto rounded-lg opacity-10 transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n primary:\n 'bg-primary aria-selected:text-text dark:bg-primary-dark dark:aria-selected:text-text-dark',\n secondary:\n 'bg-secondary aria-selected:text-text dark:bg-secondary-dark dark:aria-selected:text-text-dark',\n destructive:\n 'bg-destructive aria-selected:text-text dark:bg-destructive-dark dark:aria-selected:text-text-dark',\n neutral:\n 'bg-neutral aria-selected:text-white dark:bg-neutral-dark dark:aria-selected:text-text',\n light: 'bg-white aria-selected:text-black',\n dark: 'bg-neutral-800 aria-selected:text-white',\n text: 'bg-text aria-selected:text-text-dark dark:bg-text-dark dark:aria-selected:text-text',\n },\n },\n }\n);\n\nexport type TabProps = HTMLAttributes<HTMLElement> & {\n key: string | number;\n};\n\ntype TabSelectorProps<T extends TabProps> = {\n tabs: ReactElement<T>[];\n selectedChoice: T['key'];\n onTabClick?: (choice: T['key']) => void;\n hoverable?: boolean;\n} & HTMLAttributes<HTMLElement> &\n VariantProps<typeof tabSelectorVariant>;\n\n/**\n *\n * Component that allows the user to select one of the provided choices.\n *\n * Example:\n * ```jsx\n * <TabSelector\n * selectedChoice=\"option1\"\n * onTabClick={(choice) => console.log(choice)}\n * hoverable={true}\n * >\n * <Button key=\"option1\"/>\n * <Button key=\"option2\"/>\n * <Button key=\"option3\"/>\n * </TabSelector>\n * ```\n */\nexport const TabSelector = <T extends TabProps>({\n tabs,\n selectedChoice,\n onTabClick,\n color = 'primary',\n hoverable = false,\n className,\n}: TabSelectorProps<T>) => {\n const optionsRefs = useRef<HTMLElement[]>([]);\n const indicatorRef = useRef<HTMLDivElement | null>(null);\n const { choiceIndicatorPosition } = useItemSelector(\n optionsRefs,\n undefined,\n hoverable\n );\n\n return (\n <div\n className={cn(\n tabSelectorVariant({\n color,\n }),\n className\n )}\n aria-orientation=\"horizontal\"\n aria-multiselectable=\"false\"\n role=\"tablist\"\n >\n {tabs.map((Tab, index) => {\n const key = Tab.key!;\n\n const isSelected = selectedChoice === key;\n\n return cloneElement(Tab, {\n key: key ?? index,\n role: 'tab',\n onClick: () => onTabClick?.(key),\n 'aria-selected': isSelected,\n ref: (el: HTMLElement) => {\n optionsRefs.current[index] = el!;\n },\n } as unknown as T);\n })}\n {choiceIndicatorPosition && (\n <div\n className={indicatorVariant({\n color,\n })}\n style={choiceIndicatorPosition}\n ref={indicatorRef}\n />\n )}\n </div>\n );\n};\n"],"names":["cva","useRef","useItemSelector","jsxs","cn","cloneElement","jsx"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,MAAM,qBAAqBA,uBAAA;AAAA,EACzB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,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I;AAAA,YAC/B;AAAA,UAAA,CACe;AAAA,QAAA,CAClB;AAAA,QACA,2BACCC,2BAAA,kBAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,iBAAiB;AAAA,cAC1B;AAAA,YAAA,CACD;AAAA,YACD,OAAO;AAAA,YACP,KAAK;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;;"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { HTMLAttributes, ReactElement } from 'react';
|
|
3
|
-
|
|
4
3
|
declare const tabSelectorVariant: (props?: ({
|
|
5
|
-
color?: "text" | "
|
|
4
|
+
color?: "text" | "dark" | "light" | "primary" | "secondary" | "destructive" | "neutral" | null | undefined;
|
|
6
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
type TabProps = HTMLAttributes<HTMLElement> & {
|
|
6
|
+
export type TabProps = HTMLAttributes<HTMLElement> & {
|
|
8
7
|
key: string | number;
|
|
9
8
|
};
|
|
10
9
|
type TabSelectorProps<T extends TabProps> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabSelector.d.ts","sourceRoot":"","sources":["../../../src/components/TabSelector/TabSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAIf,QAAA,MAAM,kBAAkB;;8EAsBvB,CAAC;AAuBF,
|
|
1
|
+
{"version":3,"file":"TabSelector.d.ts","sourceRoot":"","sources":["../../../src/components/TabSelector/TabSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAIf,QAAA,MAAM,kBAAkB;;8EAsBvB,CAAC;AAuBF,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACnD,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,gBAAgB,CAAC,CAAC,SAAS,QAAQ,IAAI;IAC1C,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;IACzB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,cAAc,CAAC,WAAW,CAAC,GAC7B,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE1C;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,QAAQ,sEAO3C,gBAAgB,CAAC,CAAC,CAAC,4CA+CrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabSelector.mjs","sources":["../../../src/components/TabSelector/TabSelector.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n useRef,\n type HTMLAttributes,\n type ReactElement,\n cloneElement,\n} from 'react';\nimport { useItemSelector } from '../../hooks';\nimport { cn } from '../../utils/cn';\n\nconst tabSelectorVariant = cva(\n 'relative flex size-full flex-row items-center gap-2',\n {\n variants: {\n color: {\n primary:\n 'border-primary text-primary dark:border-primary-dark dark:text-primary-dark',\n secondary:\n 'border-secondary text-secondary dark:border-secondary-dark dark:text-secondary-dark',\n destructive:\n 'border-destructive bg-destructive text-destructive dark:border-destructive-dark dark:bg-destructive-dark',\n neutral:\n 'border-neutral text-neutral dark:border-neutral-dark dark:text-neutral-dark',\n light: 'border-white text-white',\n dark: 'border-neutral-800 text-neutral-800',\n text: 'border-text text-text dark:border-text-dark dark:text-text-dark',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute top-0 z-[-1] h-full w-auto rounded-lg opacity-10 transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n primary:\n 'bg-primary aria-selected:text-text dark:bg-primary-dark dark:aria-selected:text-text-dark',\n secondary:\n 'bg-secondary aria-selected:text-text dark:bg-secondary-dark dark:aria-selected:text-text-dark',\n destructive:\n 'bg-destructive aria-selected:text-text dark:bg-destructive-dark dark:aria-selected:text-text-dark',\n neutral:\n 'bg-neutral aria-selected:text-white dark:bg-neutral-dark dark:aria-selected:text-text',\n light: 'bg-white aria-selected:text-black',\n dark: 'bg-neutral-800 aria-selected:text-white',\n text: 'bg-text aria-selected:text-text-dark dark:bg-text-dark dark:aria-selected:text-text',\n },\n },\n }\n);\n\
|
|
1
|
+
{"version":3,"file":"TabSelector.mjs","sources":["../../../src/components/TabSelector/TabSelector.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n useRef,\n type HTMLAttributes,\n type ReactElement,\n cloneElement,\n} from 'react';\nimport { useItemSelector } from '../../hooks';\nimport { cn } from '../../utils/cn';\n\nconst tabSelectorVariant = cva(\n 'relative flex size-full flex-row items-center gap-2',\n {\n variants: {\n color: {\n primary:\n 'border-primary text-primary dark:border-primary-dark dark:text-primary-dark',\n secondary:\n 'border-secondary text-secondary dark:border-secondary-dark dark:text-secondary-dark',\n destructive:\n 'border-destructive bg-destructive text-destructive dark:border-destructive-dark dark:bg-destructive-dark',\n neutral:\n 'border-neutral text-neutral dark:border-neutral-dark dark:text-neutral-dark',\n light: 'border-white text-white',\n dark: 'border-neutral-800 text-neutral-800',\n text: 'border-text text-text dark:border-text-dark dark:text-text-dark',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute top-0 z-[-1] h-full w-auto rounded-lg opacity-10 transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n primary:\n 'bg-primary aria-selected:text-text dark:bg-primary-dark dark:aria-selected:text-text-dark',\n secondary:\n 'bg-secondary aria-selected:text-text dark:bg-secondary-dark dark:aria-selected:text-text-dark',\n destructive:\n 'bg-destructive aria-selected:text-text dark:bg-destructive-dark dark:aria-selected:text-text-dark',\n neutral:\n 'bg-neutral aria-selected:text-white dark:bg-neutral-dark dark:aria-selected:text-text',\n light: 'bg-white aria-selected:text-black',\n dark: 'bg-neutral-800 aria-selected:text-white',\n text: 'bg-text aria-selected:text-text-dark dark:bg-text-dark dark:aria-selected:text-text',\n },\n },\n }\n);\n\nexport type TabProps = HTMLAttributes<HTMLElement> & {\n key: string | number;\n};\n\ntype TabSelectorProps<T extends TabProps> = {\n tabs: ReactElement<T>[];\n selectedChoice: T['key'];\n onTabClick?: (choice: T['key']) => void;\n hoverable?: boolean;\n} & HTMLAttributes<HTMLElement> &\n VariantProps<typeof tabSelectorVariant>;\n\n/**\n *\n * Component that allows the user to select one of the provided choices.\n *\n * Example:\n * ```jsx\n * <TabSelector\n * selectedChoice=\"option1\"\n * onTabClick={(choice) => console.log(choice)}\n * hoverable={true}\n * >\n * <Button key=\"option1\"/>\n * <Button key=\"option2\"/>\n * <Button key=\"option3\"/>\n * </TabSelector>\n * ```\n */\nexport const TabSelector = <T extends TabProps>({\n tabs,\n selectedChoice,\n onTabClick,\n color = 'primary',\n hoverable = false,\n className,\n}: TabSelectorProps<T>) => {\n const optionsRefs = useRef<HTMLElement[]>([]);\n const indicatorRef = useRef<HTMLDivElement | null>(null);\n const { choiceIndicatorPosition } = useItemSelector(\n optionsRefs,\n undefined,\n hoverable\n );\n\n return (\n <div\n className={cn(\n tabSelectorVariant({\n color,\n }),\n className\n )}\n aria-orientation=\"horizontal\"\n aria-multiselectable=\"false\"\n role=\"tablist\"\n >\n {tabs.map((Tab, index) => {\n const key = Tab.key!;\n\n const isSelected = selectedChoice === key;\n\n return cloneElement(Tab, {\n key: key ?? index,\n role: 'tab',\n onClick: () => onTabClick?.(key),\n 'aria-selected': isSelected,\n ref: (el: HTMLElement) => {\n optionsRefs.current[index] = el!;\n },\n } as unknown as T);\n })}\n {choiceIndicatorPosition && (\n <div\n className={indicatorVariant({\n color,\n })}\n style={choiceIndicatorPosition}\n ref={indicatorRef}\n />\n )}\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;;;;;;;;;;AAYA,MAAM,qBAAqB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SACE;AAAA,QACF,WACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,MAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SACE;AAAA,QACF,WACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF;AA+BO,MAAM,cAAc,CAAqB;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ;AACF,MAA2B;AACnB,QAAA,cAAc,OAAsB,CAAA,CAAE;AACtC,QAAA,eAAe,OAA8B,IAAI;AACjD,QAAA,EAAE,4BAA4B;AAAA,IAClC;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAIA,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT,mBAAmB;AAAA,UACjB;AAAA,QAAA,CACD;AAAA,QACD;AAAA,MACF;AAAA,MACA,oBAAiB;AAAA,MACjB,wBAAqB;AAAA,MACrB,MAAK;AAAA,MAEJ,UAAA;AAAA,QAAK,KAAA,IAAI,CAAC,KAAK,UAAU;AACxB,gBAAM,MAAM,IAAI;AAEhB,gBAAM,aAAa,mBAAmB;AAEtC,iBAAO,aAAa,KAAK;AAAA,YACvB,KAAK,OAAO;AAAA,YACZ,MAAM;AAAA,YACN,SAAS,MAAM,aAAa,GAAG;AAAA,YAC/B,iBAAiB;AAAA,YACjB,KAAK,CAAC,OAAoB;AACZ,0BAAA,QAAQ,KAAK,IAAI;AAAA,YAC/B;AAAA,UAAA,CACe;AAAA,QAAA,CAClB;AAAA,QACA,2BACCC,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,iBAAiB;AAAA,cAC1B;AAAA,YAAA,CACD;AAAA,YACD,OAAO;AAAA,YACP,KAAK;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -5,6 +5,7 @@ const require$$0 = require("react");
|
|
|
5
5
|
const utils_cn = require("../../utils/cn.cjs");
|
|
6
6
|
const components_Input_Input = require("../Input/Input.cjs");
|
|
7
7
|
require("../Input/InputPassword.cjs");
|
|
8
|
+
require("../Input/Checkbox.cjs");
|
|
8
9
|
const TextArea = require$$0.forwardRef(
|
|
9
10
|
({ className, variant, validationStyleEnabled = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
10
11
|
"textarea",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.cjs","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import type { VariantProps } from 'class-variance-authority';\nimport {\n forwardRef,\n type TextareaHTMLAttributes,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { inputVariants } from '../Input';\n\nexport type TextAreaProps = DetailedHTMLProps<\n DetailedHTMLProps<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n HTMLTextAreaElement\n >,\n HTMLTextAreaElement\n> & {\n validationStyleEnabled?: boolean;\n} & Omit<VariantProps<typeof inputVariants>, 'validationStyleEnabled'>;\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, variant, validationStyleEnabled = false, ...props }, ref) => (\n <textarea\n className={cn(\n 'resize-none',\n inputVariants({\n variant,\n validationStyleEnabled: validationStyleEnabled\n ? 'enabled'\n : 'disabled',\n className,\n })\n )}\n ref={ref}\n {...props}\n />\n )\n);\n\nTextArea.displayName = 'TextArea';\n"],"names":["forwardRef","jsx","cn","inputVariants"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.cjs","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import type { VariantProps } from 'class-variance-authority';\nimport {\n forwardRef,\n type TextareaHTMLAttributes,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { inputVariants } from '../Input';\n\nexport type TextAreaProps = DetailedHTMLProps<\n DetailedHTMLProps<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n HTMLTextAreaElement\n >,\n HTMLTextAreaElement\n> & {\n validationStyleEnabled?: boolean;\n} & Omit<VariantProps<typeof inputVariants>, 'validationStyleEnabled'>;\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, variant, validationStyleEnabled = false, ...props }, ref) => (\n <textarea\n className={cn(\n 'resize-none',\n inputVariants({\n variant,\n validationStyleEnabled: validationStyleEnabled\n ? 'enabled'\n : 'disabled',\n className,\n })\n )}\n ref={ref}\n {...props}\n />\n )\n);\n\nTextArea.displayName = 'TextArea';\n"],"names":["forwardRef","jsx","cn","inputVariants"],"mappings":";;;;;;;;AAmBO,MAAM,WAAWA,WAAA;AAAA,EACtB,CAAC,EAAE,WAAW,SAAS,yBAAyB,OAAO,GAAG,MAAM,GAAG,QACjEC,2BAAA,kBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,SAAA;AAAA,QACT;AAAA,QACAC,qCAAc;AAAA,UACZ;AAAA,UACA,wBAAwB,yBACpB,YACA;AAAA,UACJ;AAAA,QAAA,CACD;AAAA,MACH;AAAA,MACA;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAAS,cAAc;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { TextareaHTMLAttributes, DetailedHTMLProps } from 'react';
|
|
3
3
|
import { inputVariants } from '../Input';
|
|
4
|
-
|
|
5
4
|
export type TextAreaProps = DetailedHTMLProps<DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, HTMLTextAreaElement> & {
|
|
6
5
|
validationStyleEnabled?: boolean;
|
|
7
6
|
} & Omit<VariantProps<typeof inputVariants>, 'validationStyleEnabled'>;
|
|
@@ -3,6 +3,7 @@ import { forwardRef } from "react";
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { inputVariants } from "../Input/Input.mjs";
|
|
5
5
|
import "../Input/InputPassword.mjs";
|
|
6
|
+
import "../Input/Checkbox.mjs";
|
|
6
7
|
const TextArea = forwardRef(
|
|
7
8
|
({ className, variant, validationStyleEnabled = false, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8
9
|
"textarea",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.mjs","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import type { VariantProps } from 'class-variance-authority';\nimport {\n forwardRef,\n type TextareaHTMLAttributes,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { inputVariants } from '../Input';\n\nexport type TextAreaProps = DetailedHTMLProps<\n DetailedHTMLProps<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n HTMLTextAreaElement\n >,\n HTMLTextAreaElement\n> & {\n validationStyleEnabled?: boolean;\n} & Omit<VariantProps<typeof inputVariants>, 'validationStyleEnabled'>;\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, variant, validationStyleEnabled = false, ...props }, ref) => (\n <textarea\n className={cn(\n 'resize-none',\n inputVariants({\n variant,\n validationStyleEnabled: validationStyleEnabled\n ? 'enabled'\n : 'disabled',\n className,\n })\n )}\n ref={ref}\n {...props}\n />\n )\n);\n\nTextArea.displayName = 'TextArea';\n"],"names":["jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.mjs","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import type { VariantProps } from 'class-variance-authority';\nimport {\n forwardRef,\n type TextareaHTMLAttributes,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { inputVariants } from '../Input';\n\nexport type TextAreaProps = DetailedHTMLProps<\n DetailedHTMLProps<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n HTMLTextAreaElement\n >,\n HTMLTextAreaElement\n> & {\n validationStyleEnabled?: boolean;\n} & Omit<VariantProps<typeof inputVariants>, 'validationStyleEnabled'>;\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, variant, validationStyleEnabled = false, ...props }, ref) => (\n <textarea\n className={cn(\n 'resize-none',\n inputVariants({\n variant,\n validationStyleEnabled: validationStyleEnabled\n ? 'enabled'\n : 'disabled',\n className,\n })\n )}\n ref={ref}\n {...props}\n />\n )\n);\n\nTextArea.displayName = 'TextArea';\n"],"names":["jsx"],"mappings":";;;;;;AAmBO,MAAM,WAAW;AAAA,EACtB,CAAC,EAAE,WAAW,SAAS,yBAAyB,OAAO,GAAG,MAAM,GAAG,QACjEA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,cAAc;AAAA,UACZ;AAAA,UACA,wBAAwB,yBACpB,YACA;AAAA,UACJ;AAAA,QAAA,CACD;AAAA,MACH;AAAA,MACA;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAAS,cAAc;"}
|
|
@@ -4,7 +4,7 @@ import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
|
4
4
|
declare const ToastProvider: import('react').FC<ToastPrimitives.ToastProviderProps>;
|
|
5
5
|
declare const ToastViewport: import('react').ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & import('react').RefAttributes<HTMLOListElement>, "ref"> & import('react').RefAttributes<HTMLOListElement>>;
|
|
6
6
|
declare const Toast: import('react').ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & import('react').RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "success" | "error" | "default" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & import('react').RefAttributes<HTMLLIElement>>;
|
|
9
9
|
declare const ToastAction: import('react').ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
declare const ToastClose: import('react').ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -5,7 +5,6 @@ const components_MaxWidthSmoother_index = require("./MaxWidthSmoother/index.cjs"
|
|
|
5
5
|
const components_RightDrawer_RightDrawer = require("./RightDrawer/RightDrawer.cjs");
|
|
6
6
|
const components_RightDrawer_useRightDrawerStore = require("./RightDrawer/useRightDrawerStore.cjs");
|
|
7
7
|
const components_PressableSpan_PressableSpan = require("./PressableSpan/PressableSpan.cjs");
|
|
8
|
-
const components_ContentEditor_ContentEditor = require("./ContentEditor/ContentEditor.cjs");
|
|
9
8
|
const components_ContentSelector_ContentSelector = require("./ContentSelector/ContentSelector.cjs");
|
|
10
9
|
const components_DictionaryEditor_useEditedContentStore = require("./DictionaryEditor/useEditedContentStore.cjs");
|
|
11
10
|
const components_DictionaryEditor_useEditionPanelStore = require("./DictionaryEditor/useEditionPanelStore.cjs");
|
|
@@ -40,10 +39,11 @@ const components_Flags_Flag = require("./Flags/Flag.cjs");
|
|
|
40
39
|
const components_InformationTag_index = require("./InformationTag/index.cjs");
|
|
41
40
|
const components_Form_FormBase = require("./Form/FormBase.cjs");
|
|
42
41
|
const components_Form_FormField = require("./Form/FormField.cjs");
|
|
43
|
-
const components_Form_layout_FormItemLayout = require("../Form-
|
|
42
|
+
const components_Form_layout_FormItemLayout = require("../Form-DERuauvB.cjs");
|
|
44
43
|
const components_Label_index = require("./Label/index.cjs");
|
|
45
44
|
const components_Input_Input = require("./Input/Input.cjs");
|
|
46
45
|
const components_Input_InputPassword = require("./Input/InputPassword.cjs");
|
|
46
|
+
const components_Input_Checkbox = require("./Input/Checkbox.cjs");
|
|
47
47
|
const components_Auth_ExternalsLoginButtons_ExternalsLoginButtons = require("./Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs");
|
|
48
48
|
const components_Auth_SignInForm_SignInForm = require("./Auth/SignInForm/SignInForm.cjs");
|
|
49
49
|
const components_Auth_SignInForm_SignInSchema = require("./Auth/SignInForm/SignInSchema.cjs");
|
|
@@ -79,7 +79,6 @@ exports.RightDrawer = components_RightDrawer_RightDrawer.RightDrawer;
|
|
|
79
79
|
exports.createRightDrawerStore = components_RightDrawer_useRightDrawerStore.createRightDrawerStore;
|
|
80
80
|
exports.useRightDrawerStore = components_RightDrawer_useRightDrawerStore.useRightDrawerStore;
|
|
81
81
|
exports.PressableSpan = components_PressableSpan_PressableSpan.PressableSpan;
|
|
82
|
-
exports.ContentEditor = components_ContentEditor_ContentEditor.ContentEditor;
|
|
83
82
|
exports.ContentSelector = components_ContentSelector_ContentSelector.ContentSelector;
|
|
84
83
|
exports.useEditedContentStore = components_DictionaryEditor_useEditedContentStore.useEditedContentStore;
|
|
85
84
|
exports.useEditionPanelStore = components_DictionaryEditor_useEditionPanelStore.useEditionPanelStore;
|
|
@@ -123,6 +122,8 @@ exports.Label = components_Label_index.Label;
|
|
|
123
122
|
exports.Input = components_Input_Input.Input;
|
|
124
123
|
exports.inputVariants = components_Input_Input.inputVariants;
|
|
125
124
|
exports.InputPassword = components_Input_InputPassword.InputPassword;
|
|
125
|
+
exports.Checkbox = components_Input_Checkbox.Checkbox;
|
|
126
|
+
exports.checkboxVariants = components_Input_Checkbox.checkboxVariants;
|
|
126
127
|
exports.ExternalsLoginButtons = components_Auth_ExternalsLoginButtons_ExternalsLoginButtons.ExternalsLoginButtons;
|
|
127
128
|
exports.GitHubLoginButton = components_Auth_ExternalsLoginButtons_ExternalsLoginButtons.GitHubLoginButton;
|
|
128
129
|
exports.GoogleLoginButton = components_Auth_ExternalsLoginButtons_ExternalsLoginButtons.GoogleLoginButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,6 @@ export * from './MaxHeightSmoother';
|
|
|
2
2
|
export * from './MaxWidthSmoother';
|
|
3
3
|
export * from './RightDrawer';
|
|
4
4
|
export * from './PressableSpan';
|
|
5
|
-
export * from './ContentEditor';
|
|
6
5
|
export * from './ContentSelector';
|
|
7
6
|
export * from './DictionaryEditor';
|
|
8
7
|
export * from './DictionaryFieldEditor';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qB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7 +3,6 @@ import { MaxWidthSmoother } from "./MaxWidthSmoother/index.mjs";
|
|
|
3
3
|
import { RightDrawer } from "./RightDrawer/RightDrawer.mjs";
|
|
4
4
|
import { createRightDrawerStore, useRightDrawerStore } from "./RightDrawer/useRightDrawerStore.mjs";
|
|
5
5
|
import { PressableSpan } from "./PressableSpan/PressableSpan.mjs";
|
|
6
|
-
import { ContentEditor } from "./ContentEditor/ContentEditor.mjs";
|
|
7
6
|
import { ContentSelector } from "./ContentSelector/ContentSelector.mjs";
|
|
8
7
|
import { useEditedContentStore } from "./DictionaryEditor/useEditedContentStore.mjs";
|
|
9
8
|
import { useEditionPanelStore } from "./DictionaryEditor/useEditionPanelStore.mjs";
|
|
@@ -38,10 +37,11 @@ import { Flag } from "./Flags/Flag.mjs";
|
|
|
38
37
|
import { InformationTag } from "./InformationTag/index.mjs";
|
|
39
38
|
import { useForm } from "./Form/FormBase.mjs";
|
|
40
39
|
import { useFormField } from "./Form/FormField.mjs";
|
|
41
|
-
import { F } from "../Form-
|
|
40
|
+
import { F } from "../Form-DyFBmVya.js";
|
|
42
41
|
import { Label } from "./Label/index.mjs";
|
|
43
42
|
import { Input, inputVariants } from "./Input/Input.mjs";
|
|
44
43
|
import { InputPassword } from "./Input/InputPassword.mjs";
|
|
44
|
+
import { Checkbox, checkboxVariants } from "./Input/Checkbox.mjs";
|
|
45
45
|
import { ExternalsLoginButtons, GitHubLoginButton, GoogleLoginButton } from "./Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs";
|
|
46
46
|
import { SignInForm } from "./Auth/SignInForm/SignInForm.mjs";
|
|
47
47
|
import { getSignInSchema } from "./Auth/SignInForm/SignInSchema.mjs";
|
|
@@ -82,11 +82,11 @@ export {
|
|
|
82
82
|
Breadcrumb,
|
|
83
83
|
Button,
|
|
84
84
|
ChangePasswordForm,
|
|
85
|
+
Checkbox,
|
|
85
86
|
Code,
|
|
86
87
|
Command,
|
|
87
88
|
CommandRoot,
|
|
88
89
|
Container,
|
|
89
|
-
ContentEditor,
|
|
90
90
|
ContentSelector,
|
|
91
91
|
CopyToClipboard,
|
|
92
92
|
DesktopThemeSwitcher,
|
|
@@ -152,6 +152,7 @@ export {
|
|
|
152
152
|
Toaster,
|
|
153
153
|
WithResizer,
|
|
154
154
|
badgeVariants,
|
|
155
|
+
checkboxVariants,
|
|
155
156
|
createRightDrawerStore,
|
|
156
157
|
getChangePasswordSchema,
|
|
157
158
|
getResetPasswordSchema,
|
|
@@ -139,11 +139,24 @@ const useUnselectProject = () => useAsyncWithAuth(
|
|
|
139
139
|
invalidateQueries: ["getSession"]
|
|
140
140
|
}
|
|
141
141
|
);
|
|
142
|
-
const useAddNewAccessKey = () => useAsyncWithAuth(
|
|
143
|
-
|
|
142
|
+
const useAddNewAccessKey = () => useAsyncWithAuth(
|
|
143
|
+
"addNewAccessKey",
|
|
144
|
+
hooks_useIntlayerAPI.useIntlayerAPI().project.addNewAccessKey,
|
|
145
|
+
{
|
|
146
|
+
invalidateQueries: ["getProjects", "getSession"]
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
const useDeleteAccessKey = () => useAsyncWithAuth(
|
|
150
|
+
"deleteAccessKey",
|
|
151
|
+
hooks_useIntlayerAPI.useIntlayerAPI().project.deleteAccessKey,
|
|
152
|
+
{
|
|
153
|
+
invalidateQueries: ["getProjects", "getSession"]
|
|
154
|
+
}
|
|
155
|
+
);
|
|
144
156
|
const useRefreshAccessKey = () => useAsyncWithAuth(
|
|
145
157
|
"refreshAccessKey",
|
|
146
|
-
hooks_useIntlayerAPI.useIntlayerAPI().project.refreshAccessKey
|
|
158
|
+
hooks_useIntlayerAPI.useIntlayerAPI().project.refreshAccessKey,
|
|
159
|
+
{ invalidateQueries: ["getProjects", "getSession"] }
|
|
147
160
|
);
|
|
148
161
|
const useGetDictionaries = () => useAsyncWithAuth(
|
|
149
162
|
"getDictionaries",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intlayerAPIHooks.cjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n'use client';\n\nimport { useAuth } from '../components/Auth/AuthProvider/index';\nimport { useAsync, UseAsyncOptions } from './useAsync/useAsync';\nimport { useIntlayerAPI } from './useIntlayerAPI';\n\nexport const useAsyncWithAuth = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const { csrfToken, oAuth2AccessToken } = useAuth();\n\n return useAsync(key, asyncFunction, {\n ...options,\n enable: Boolean(csrfToken || oAuth2AccessToken),\n });\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = () =>\n useAsyncWithAuth('login', useIntlayerAPI().auth.login, {\n invalidateQueries: ['getSession'],\n });\n\nexport const useRegister = () =>\n useAsyncWithAuth('register', useIntlayerAPI().auth.register, {\n invalidateQueries: ['getSession'],\n });\nexport const useLogout = () =>\n useAsyncWithAuth('logout', useIntlayerAPI().auth.logout, {\n invalidateQueries: ['getSession'],\n });\nexport const useChangePassword = () =>\n useAsyncWithAuth('changePassword', useIntlayerAPI().auth.changePassword);\nexport const useAskResetPassword = () =>\n useAsyncWithAuth('askResetPassword', useIntlayerAPI().auth.askResetPassword);\nexport const useResetPassword = () =>\n useAsyncWithAuth('resetPassword', useIntlayerAPI().auth.resetPassword);\nexport const useVerifyEmail = () =>\n useAsyncWithAuth('verifyEmail', useIntlayerAPI().auth.verifyEmail);\n\nexport const useGetUserByAccount = () =>\n useAsyncWithAuth('getUserByAccount', useIntlayerAPI().user.getUserByAccount);\n\n/**\n * User\n */\n\nexport const useGetUsers = () =>\n useAsyncWithAuth('getUsers', useIntlayerAPI().user.getUsers, {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useCreateUser = () =>\n useAsyncWithAuth('createUser', useIntlayerAPI().user.createUser, {\n invalidateQueries: ['getUsers'],\n });\nexport const useUpdateUser = () =>\n useAsyncWithAuth('updateUser', useIntlayerAPI().user.updateUser, {\n invalidateQueries: ['getSession'],\n });\nexport const useDeleteUser = () =>\n useAsyncWithAuth('deleteUser', useIntlayerAPI().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = () =>\n useAsyncWithAuth(\n 'getOrganizations',\n useIntlayerAPI().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useAddOrganization = () =>\n useAsyncWithAuth(\n 'addOrganization',\n useIntlayerAPI().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useUpdateOrganization = () =>\n useAsyncWithAuth(\n 'updateOrganization',\n useIntlayerAPI().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useUpdateOrganizationMembers = () =>\n useAsyncWithAuth(\n 'updateOrganizationMembers',\n useIntlayerAPI().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useAddOrganizationMember = () =>\n useAsyncWithAuth(\n 'addOrganizationMember',\n useIntlayerAPI().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useDeleteOrganization = () =>\n useAsyncWithAuth(\n 'deleteOrganization',\n useIntlayerAPI().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useSelectOrganization = () =>\n useAsyncWithAuth(\n 'selectOrganization',\n useIntlayerAPI().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useUnselectOrganization = () =>\n useAsyncWithAuth(\n 'unselectOrganization',\n useIntlayerAPI().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = () =>\n useAsyncWithAuth('getProjects', useIntlayerAPI().project.getProjects, {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useAddProject = () =>\n useAsyncWithAuth('addProject', useIntlayerAPI().project.addProject, {\n invalidateQueries: ['getProjects'],\n });\nexport const useUpdateProject = () =>\n useAsyncWithAuth('updateProject', useIntlayerAPI().project.updateProject, {\n invalidateQueries: ['getSession'],\n });\nexport const useUpdateProjectMembers = () =>\n useAsyncWithAuth(\n 'updateProjectMembers',\n useIntlayerAPI().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useDeleteProject = () =>\n useAsyncWithAuth('deleteProject', useIntlayerAPI().project.deleteProject, {\n invalidateQueries: ['getProjects'],\n });\nexport const useSelectProject = () =>\n useAsyncWithAuth('selectProject', useIntlayerAPI().project.selectProject, {\n invalidateQueries: ['getSession'],\n });\nexport const useUnselectProject = () =>\n useAsyncWithAuth(\n 'unselectProject',\n useIntlayerAPI().project.unselectProject,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useAddNewAccessKey = () =>\n useAsyncWithAuth('addNewAccessKey', useIntlayerAPI().project.addNewAccessKey);\nexport const useDeleteAccessKey = () =>\n useAsyncWithAuth('deleteAccessKey', useIntlayerAPI().project.deleteAccessKey);\nexport const useRefreshAccessKey = () =>\n useAsyncWithAuth(\n 'refreshAccessKey',\n useIntlayerAPI().project.refreshAccessKey\n );\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = () =>\n useAsyncWithAuth(\n 'getDictionaries',\n useIntlayerAPI().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useGetDictionariesKeys = () =>\n useAsyncWithAuth(\n 'getDictionariesKeys',\n useIntlayerAPI().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useGetDictionary = () =>\n useAsyncWithAuth('getDictionary', useIntlayerAPI().dictionary.getDictionary, {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useAddDictionary = () =>\n useAsyncWithAuth('addDictionary', useIntlayerAPI().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n });\n\nexport const usePushDictionaries = () =>\n useAsyncWithAuth(\n 'pushDictionaries',\n useIntlayerAPI().dictionary.pushDictionaries,\n {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n }\n );\nexport const useUpdateDictionary = () =>\n useAsyncWithAuth(\n 'updateDictionary',\n useIntlayerAPI().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries'],\n }\n );\nexport const useDeleteDictionary = () =>\n useAsyncWithAuth(\n 'deleteDictionary',\n useIntlayerAPI().dictionary.deleteDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n }\n );\n"],"names":["useAuth","useAsync","useIntlayerAPI"],"mappings":";;;;;;AAOO,MAAM,mBAAmB,CAI9B,KACA,eACA,YACG;AACH,QAAM,EAAE,WAAW,kBAAkB,IAAIA,mCAAQ,QAAA;AAE1C,SAAAC,wBAAA,SAAS,KAAK,eAAe;AAAA,IAClC,GAAG;AAAA,IACH,QAAQ,QAAQ,aAAa,iBAAiB;AAAA,EAAA,CAC/C;AACH;AAMO,MAAM,WAAW,MACtB,iBAAiB,SAASC,qBAAAA,eAAe,EAAE,KAAK,OAAO;AAAA,EACrD,mBAAmB,CAAC,YAAY;AAClC,CAAC;AAEI,MAAM,cAAc,MACzB,iBAAiB,YAAYA,qBAAAA,eAAe,EAAE,KAAK,UAAU;AAAA,EAC3D,mBAAmB,CAAC,YAAY;AAClC,CAAC;AACI,MAAM,YAAY,MACvB,iBAAiB,UAAUA,qBAAAA,eAA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AA,qBAAA,eAAA,EAAiB,WAAW;AAAA,EAC5B;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB,IAAI,KAAK;AAAA;AAAA,EAC3B;AACF;AAEK,MAAM,mBAAmB,MAC9B,iBAAiB,iBAAiBA,qBAAAA,eAAe,EAAE,WAAW,eAAe;AAAA,EAC3E,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB,IAAI,KAAK;AAAA;AAC3B,CAAC;AACI,MAAM,mBAAmB,MAC9B,iBAAiB,iBAAiBA,qBAAAA,eAAe,EAAE,WAAW,eAAe;AAAA,EAC3E,mBAAmB,CAAC,mBAAmB,qBAAqB;AAC9D,CAAC;AAEI,MAAM,sBAAsB,MACjC;AAAA,EACE;AAAA,EACAA,qBAAA,eAAA,EAAiB,WAAW;AAAA,EAC5B;AAAA,IACE,mBAAmB,CAAC,mBAAmB,qBAAqB;AAAA,EAC9D;AACF;AACK,MAAM,sBAAsB,MACjC;AAAA,EACE;AAAA,EACAA,qBAAA,eAAA,EAAiB,WAAW;AAAA,EAC5B;AAAA,IACE,mBAAmB,CAAC,iBAAiB;AAAA,EACvC;AACF;AACK,MAAM,sBAAsB,MACjC;AAAA,EACE;AAAA,EACAA,qBAAA,eAAA,EAAiB,WAAW;AAAA,EAC5B;AAAA,IACE,mBAAmB,CAAC,mBAAmB,qBAAqB;AAAA,EAC9D;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"intlayerAPIHooks.cjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n'use client';\n\nimport { useAuth } from '../components/Auth/AuthProvider/index';\nimport { useAsync, UseAsyncOptions } from './useAsync/useAsync';\nimport { useIntlayerAPI } from './useIntlayerAPI';\n\nexport const useAsyncWithAuth = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const { csrfToken, oAuth2AccessToken } = useAuth();\n\n return useAsync(key, asyncFunction, {\n ...options,\n enable: Boolean(csrfToken || oAuth2AccessToken),\n });\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = () =>\n useAsyncWithAuth('login', useIntlayerAPI().auth.login, {\n invalidateQueries: ['getSession'],\n });\n\nexport const useRegister = () =>\n useAsyncWithAuth('register', useIntlayerAPI().auth.register, {\n invalidateQueries: ['getSession'],\n });\nexport const useLogout = () =>\n useAsyncWithAuth('logout', useIntlayerAPI().auth.logout, {\n invalidateQueries: ['getSession'],\n });\nexport const useChangePassword = () =>\n useAsyncWithAuth('changePassword', useIntlayerAPI().auth.changePassword);\nexport const useAskResetPassword = () =>\n useAsyncWithAuth('askResetPassword', useIntlayerAPI().auth.askResetPassword);\nexport const useResetPassword = () =>\n useAsyncWithAuth('resetPassword', useIntlayerAPI().auth.resetPassword);\nexport const useVerifyEmail = () =>\n useAsyncWithAuth('verifyEmail', useIntlayerAPI().auth.verifyEmail);\n\nexport const useGetUserByAccount = () =>\n useAsyncWithAuth('getUserByAccount', useIntlayerAPI().user.getUserByAccount);\n\n/**\n * User\n */\n\nexport const useGetUsers = () =>\n useAsyncWithAuth('getUsers', useIntlayerAPI().user.getUsers, {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useCreateUser = () =>\n useAsyncWithAuth('createUser', useIntlayerAPI().user.createUser, {\n invalidateQueries: ['getUsers'],\n });\nexport const useUpdateUser = () =>\n useAsyncWithAuth('updateUser', useIntlayerAPI().user.updateUser, {\n invalidateQueries: ['getSession'],\n });\nexport const useDeleteUser = () =>\n useAsyncWithAuth('deleteUser', useIntlayerAPI().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = () =>\n useAsyncWithAuth(\n 'getOrganizations',\n useIntlayerAPI().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useAddOrganization = () =>\n useAsyncWithAuth(\n 'addOrganization',\n useIntlayerAPI().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useUpdateOrganization = () =>\n useAsyncWithAuth(\n 'updateOrganization',\n useIntlayerAPI().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useUpdateOrganizationMembers = () =>\n useAsyncWithAuth(\n 'updateOrganizationMembers',\n useIntlayerAPI().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useAddOrganizationMember = () =>\n useAsyncWithAuth(\n 'addOrganizationMember',\n useIntlayerAPI().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useDeleteOrganization = () =>\n useAsyncWithAuth(\n 'deleteOrganization',\n useIntlayerAPI().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useSelectOrganization = () =>\n useAsyncWithAuth(\n 'selectOrganization',\n useIntlayerAPI().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useUnselectOrganization = () =>\n useAsyncWithAuth(\n 'unselectOrganization',\n useIntlayerAPI().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = () =>\n useAsyncWithAuth('getProjects', useIntlayerAPI().project.getProjects, {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useAddProject = () =>\n useAsyncWithAuth('addProject', useIntlayerAPI().project.addProject, {\n invalidateQueries: ['getProjects'],\n });\nexport const useUpdateProject = () =>\n useAsyncWithAuth('updateProject', useIntlayerAPI().project.updateProject, {\n invalidateQueries: ['getSession'],\n });\nexport const useUpdateProjectMembers = () =>\n useAsyncWithAuth(\n 'updateProjectMembers',\n useIntlayerAPI().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useDeleteProject = () =>\n useAsyncWithAuth('deleteProject', useIntlayerAPI().project.deleteProject, {\n invalidateQueries: ['getProjects'],\n });\nexport const useSelectProject = () =>\n useAsyncWithAuth('selectProject', useIntlayerAPI().project.selectProject, {\n invalidateQueries: ['getSession'],\n });\nexport const useUnselectProject = () =>\n useAsyncWithAuth(\n 'unselectProject',\n useIntlayerAPI().project.unselectProject,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useAddNewAccessKey = () =>\n useAsyncWithAuth(\n 'addNewAccessKey',\n useIntlayerAPI().project.addNewAccessKey,\n {\n invalidateQueries: ['getProjects', 'getSession'],\n }\n );\nexport const useDeleteAccessKey = () =>\n useAsyncWithAuth(\n 'deleteAccessKey',\n useIntlayerAPI().project.deleteAccessKey,\n {\n invalidateQueries: ['getProjects', 'getSession'],\n }\n );\nexport const useRefreshAccessKey = () =>\n useAsyncWithAuth(\n 'refreshAccessKey',\n useIntlayerAPI().project.refreshAccessKey,\n { invalidateQueries: ['getProjects', 'getSession'] }\n );\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = () =>\n useAsyncWithAuth(\n 'getDictionaries',\n useIntlayerAPI().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useGetDictionariesKeys = () =>\n useAsyncWithAuth(\n 'getDictionariesKeys',\n useIntlayerAPI().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useGetDictionary = () =>\n useAsyncWithAuth('getDictionary', useIntlayerAPI().dictionary.getDictionary, {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useAddDictionary = () =>\n useAsyncWithAuth('addDictionary', useIntlayerAPI().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n });\n\nexport const usePushDictionaries = () =>\n useAsyncWithAuth(\n 'pushDictionaries',\n useIntlayerAPI().dictionary.pushDictionaries,\n {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n }\n );\nexport const useUpdateDictionary = () =>\n useAsyncWithAuth(\n 'updateDictionary',\n useIntlayerAPI().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries'],\n }\n );\nexport const useDeleteDictionary = () =>\n useAsyncWithAuth(\n 'deleteDictionary',\n useIntlayerAPI().dictionary.deleteDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n }\n );\n"],"names":["useAuth","useAsync","useIntlayerAPI"],"mappings":";;;;;;AAOO,MAAM,mBAAmB,CAI9B,KACA,eACA,YACG;AACH,QAAM,EAAE,WAAW,kBAAkB,IAAIA,mCAAQ,QAAA;AAE1C,SAAAC,wBAAA,SAAS,KAAK,eAAe;AAAA,IAClC,GAAG;AAAA,IACH,QAAQ,QAAQ,aAAa,iBAAiB;AAAA,EAAA,CAC/C;AACH;AAMO,MAAM,WAAW,MACtB,iBAAiB,SAASC,qBAAAA,eAAe,EAAE,KAAK,OAAO;AAAA,EACrD,mBAAmB,CAAC,YAAY;AAClC,CAAC;AAEI,MAAM,cAAc,MACzB,iBAAiB,YAAYA,qBAAAA,eAAe,EAAE,KAAK,UAAU;AAAA,EAC3D,mBAAmB,CAAC,YAAY;AAClC,CAAC;AACI,MAAM,YAAY,MACvB,iBAAiB,UAAUA,qBAAAA,eAAe,EAAE,KAAK,QAAQ;AAAA,EACvD,mBAAmB,CAAC,YAAY;AA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th: <U extends string, T extends (...args: any[]) => Promise<any>>(key: U, asyncFunction: T, options?: UseAsyncOptions<T>) => import('./useAsync').UseAsyncResult<U, T>;
|
|
4
3
|
/**
|
|
5
4
|
* Auth
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intlayerAPIHooks.d.ts","sourceRoot":"","sources":["../../src/hooks/intlayerAPIHooks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGhE,eAAO,MAAM,gBAAgB,GAC3B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,OAErC,CAAC,iBACS,CAAC,YACN,eAAe,CAAC,CAAC,CAAC,8CAQ7B,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,QAAQ,6NAGjB,CAAC;AAEL,eAAO,MAAM,WAAW,sOAGpB,CAAC;AACL,eAAO,MAAM,SAAS,8IAGlB,CAAC;AACL,eAAO,MAAM,iBAAiB,wPAC4C,CAAC;AAC3E,eAAO,MAAM,mBAAmB,wQAC8C,CAAC;AAC/E,eAAO,MAAM,gBAAgB,yPAC2C,CAAC;AACzE,eAAO,MAAM,cAAc,6PACyC,CAAC;AAErE,eAAO,MAAM,mBAAmB,4WAC8C,CAAC;AAE/E;;GAEG;AAEH,eAAO,MAAM,WAAW,4OAOpB,CAAC;AACL,eAAO,MAAM,aAAa,4OAGtB,CAAC;AACL,eAAO,MAAM,aAAa,4OAGtB,CAAC;AACL,eAAO,MAAM,aAAa,0MAGtB,CAAC;AAEL;;GAEG;AAEH,eAAO,MAAM,mBAAmB,oQAY7B,CAAC;AAEJ,eAAO,MAAM,kBAAkB,mQAO5B,CAAC;AACJ,eAAO,MAAM,qBAAqB,4QAO/B,CAAC;AACJ,eAAO,MAAM,4BAA4B,yRAOtC,CAAC;AACJ,eAAO,MAAM,wBAAwB,6QAOlC,CAAC;AACJ,eA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|
-
const useAddNewAccessKey = () => useAsyncWithAuth(
|
|
141
|
-
|
|
140
|
+
const useAddNewAccessKey = () => useAsyncWithAuth(
|
|
141
|
+
"addNewAccessKey",
|
|
142
|
+
useIntlayerAPI().project.addNewAccessKey,
|
|
143
|
+
{
|
|
144
|
+
invalidateQueries: ["getProjects", "getSession"]
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
const useDeleteAccessKey = () => useAsyncWithAuth(
|
|
148
|
+
"deleteAccessKey",
|
|
149
|
+
useIntlayerAPI().project.deleteAccessKey,
|
|
150
|
+
{
|
|
151
|
+
invalidateQueries: ["getProjects", "getSession"]
|
|
152
|
+
}
|
|
153
|
+
);
|
|
142
154
|
const useRefreshAccessKey = () => useAsyncWithAuth(
|
|
143
155
|
"refreshAccessKey",
|
|
144
|
-
useIntlayerAPI().project.refreshAccessKey
|
|
156
|
+
useIntlayerAPI().project.refreshAccessKey,
|
|
157
|
+
{ invalidateQueries: ["getProjects", "getSession"] }
|
|
145
158
|
);
|
|
146
159
|
const useGetDictionaries = () => useAsyncWithAuth(
|
|
147
160
|
"getDictionaries",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intlayerAPIHooks.mjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n'use client';\n\nimport { useAuth } from '../components/Auth/AuthProvider/index';\nimport { useAsync, UseAsyncOptions } from './useAsync/useAsync';\nimport { useIntlayerAPI } from './useIntlayerAPI';\n\nexport const useAsyncWithAuth = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const { csrfToken, oAuth2AccessToken } = useAuth();\n\n return useAsync(key, asyncFunction, {\n ...options,\n enable: Boolean(csrfToken || oAuth2AccessToken),\n });\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = () =>\n useAsyncWithAuth('login', useIntlayerAPI().auth.login, {\n invalidateQueries: ['getSession'],\n });\n\nexport const useRegister = () =>\n useAsyncWithAuth('register', useIntlayerAPI().auth.register, {\n invalidateQueries: ['getSession'],\n });\nexport const useLogout = () =>\n useAsyncWithAuth('logout', useIntlayerAPI().auth.logout, {\n invalidateQueries: ['getSession'],\n });\nexport const useChangePassword = () =>\n useAsyncWithAuth('changePassword', useIntlayerAPI().auth.changePassword);\nexport const useAskResetPassword = () =>\n useAsyncWithAuth('askResetPassword', useIntlayerAPI().auth.askResetPassword);\nexport const useResetPassword = () =>\n useAsyncWithAuth('resetPassword', useIntlayerAPI().auth.resetPassword);\nexport const useVerifyEmail = () =>\n useAsyncWithAuth('verifyEmail', useIntlayerAPI().auth.verifyEmail);\n\nexport const useGetUserByAccount = () =>\n useAsyncWithAuth('getUserByAccount', useIntlayerAPI().user.getUserByAccount);\n\n/**\n * User\n */\n\nexport const useGetUsers = () =>\n useAsyncWithAuth('getUsers', useIntlayerAPI().user.getUsers, {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useCreateUser = () =>\n useAsyncWithAuth('createUser', useIntlayerAPI().user.createUser, {\n invalidateQueries: ['getUsers'],\n });\nexport const useUpdateUser = () =>\n useAsyncWithAuth('updateUser', useIntlayerAPI().user.updateUser, {\n invalidateQueries: ['getSession'],\n });\nexport const useDeleteUser = () =>\n useAsyncWithAuth('deleteUser', useIntlayerAPI().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = () =>\n useAsyncWithAuth(\n 'getOrganizations',\n useIntlayerAPI().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useAddOrganization = () =>\n useAsyncWithAuth(\n 'addOrganization',\n useIntlayerAPI().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useUpdateOrganization = () =>\n useAsyncWithAuth(\n 'updateOrganization',\n useIntlayerAPI().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useUpdateOrganizationMembers = () =>\n useAsyncWithAuth(\n 'updateOrganizationMembers',\n useIntlayerAPI().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useAddOrganizationMember = () =>\n useAsyncWithAuth(\n 'addOrganizationMember',\n useIntlayerAPI().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useDeleteOrganization = () =>\n useAsyncWithAuth(\n 'deleteOrganization',\n useIntlayerAPI().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useSelectOrganization = () =>\n useAsyncWithAuth(\n 'selectOrganization',\n useIntlayerAPI().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useUnselectOrganization = () =>\n useAsyncWithAuth(\n 'unselectOrganization',\n useIntlayerAPI().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = () =>\n useAsyncWithAuth('getProjects', useIntlayerAPI().project.getProjects, {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useAddProject = () =>\n useAsyncWithAuth('addProject', useIntlayerAPI().project.addProject, {\n invalidateQueries: ['getProjects'],\n });\nexport const useUpdateProject = () =>\n useAsyncWithAuth('updateProject', useIntlayerAPI().project.updateProject, {\n invalidateQueries: ['getSession'],\n });\nexport const useUpdateProjectMembers = () =>\n useAsyncWithAuth(\n 'updateProjectMembers',\n useIntlayerAPI().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useDeleteProject = () =>\n useAsyncWithAuth('deleteProject', useIntlayerAPI().project.deleteProject, {\n invalidateQueries: ['getProjects'],\n });\nexport const useSelectProject = () =>\n useAsyncWithAuth('selectProject', useIntlayerAPI().project.selectProject, {\n invalidateQueries: ['getSession'],\n });\nexport const useUnselectProject = () =>\n useAsyncWithAuth(\n 'unselectProject',\n useIntlayerAPI().project.unselectProject,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useAddNewAccessKey = () =>\n useAsyncWithAuth('addNewAccessKey', useIntlayerAPI().project.addNewAccessKey);\nexport const useDeleteAccessKey = () =>\n useAsyncWithAuth('deleteAccessKey', useIntlayerAPI().project.deleteAccessKey);\nexport const useRefreshAccessKey = () =>\n useAsyncWithAuth(\n 'refreshAccessKey',\n useIntlayerAPI().project.refreshAccessKey\n );\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = () =>\n useAsyncWithAuth(\n 'getDictionaries',\n useIntlayerAPI().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useGetDictionariesKeys = () =>\n useAsyncWithAuth(\n 'getDictionariesKeys',\n useIntlayerAPI().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useGetDictionary = () =>\n useAsyncWithAuth('getDictionary', useIntlayerAPI().dictionary.getDictionary, {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useAddDictionary = () =>\n useAsyncWithAuth('addDictionary', useIntlayerAPI().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n });\n\nexport const usePushDictionaries = () =>\n useAsyncWithAuth(\n 'pushDictionaries',\n useIntlayerAPI().dictionary.pushDictionaries,\n {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n }\n );\nexport const useUpdateDictionary = () =>\n useAsyncWithAuth(\n 'updateDictionary',\n useIntlayerAPI().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries'],\n }\n );\nexport const useDeleteDictionary = () =>\n useAsyncWithAuth(\n 'deleteDictionary',\n useIntlayerAPI().dictionary.deleteDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n }\n );\n"],"names":[],"mappings":";;;;AAOO,MAAM,mBAAmB,CAI9B,KACA,eACA,YACG;AACH,QAAM,EAAE,WAAW,kBAAkB,IAAI,QAAQ;AAE1C,SAAA,SAAS,KAAK,eAAe;AAAA,IAClC,GAAG;AAAA,IACH,QAAQ,QAAQ,aAAa,iBAAiB;AAAA,EAAA,CAC/C;AACH;AAMO,MAAM,WAAW,MACtB,iBAAiB,SAAS,eAAe,EAAE,KAAK,OAAO;AAAA,EACrD,mBAAmB,CAAC,YAAY;AAClC,CAAC;AAEI,MAAM,cAAc,MACzB,iBAAiB,YAAY,eAAe,EAAE,KAAK,UAAU;AAAA,EAC3D,mBAAmB,CAAC,YAAY;AAClC,CAAC;AACI,MAAM,YAAY,MACvB,iBAAiB,UAAU,eAAe,EAAE,KAAK,QAAQ;AAAA,EACvD,mBAAmB,CAAC,YAAY;AAClC,CAAC;AACI,MAAM,oBAAoB,MAC/B,iBAAiB,kBAAkB,eAAe,EAAE,KAAK,cAAc;AAClE,MAAM,sBAAsB,MACjC,iBAAiB,oBAAoB,eAAe,EAAE,KAAK,gBAAgB;AACtE,MAAM,mBAAmB,MAC9B,iBAAiB,iBAAiB,eAAe,EAAE,KAAK,aAAa;AAChE,MAAM,iBAAiB,MAC5B,iBAAiB,eAAe,eAAe,EAAE,KAAK,WAAW;AAE5D,MAAM,sBAAsB,MACjC,iBAAiB,oBAAoB,eAAe,EAAE,KAAK,gBAAgB;AAMtE,MAAM,cAAc,MACzB,iBAAiB,YAAY,eAAe,EAAE,KAAK,UAAU;AAAA,EAC3D,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,WAAW;A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AA,EACA,eAAA,EAAiB,WAAW;AAAA,EAC5B;AAAA,IACE,mBAAmB,CAAC,mBAAmB,qBAAqB;AAAA,EAC9D;AACF;"}
|
|
1
|
+
{"version":3,"file":"intlayerAPIHooks.mjs","sources":["../../src/hooks/intlayerAPIHooks.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n'use client';\n\nimport { useAuth } from '../components/Auth/AuthProvider/index';\nimport { useAsync, UseAsyncOptions } from './useAsync/useAsync';\nimport { useIntlayerAPI } from './useIntlayerAPI';\n\nexport const useAsyncWithAuth = <\n U extends string,\n T extends (...args: any[]) => Promise<any>,\n>(\n key: U,\n asyncFunction: T,\n options?: UseAsyncOptions<T>\n) => {\n const { csrfToken, oAuth2AccessToken } = useAuth();\n\n return useAsync(key, asyncFunction, {\n ...options,\n enable: Boolean(csrfToken || oAuth2AccessToken),\n });\n};\n\n/**\n * Auth\n */\n\nexport const useLogin = () =>\n useAsyncWithAuth('login', useIntlayerAPI().auth.login, {\n invalidateQueries: ['getSession'],\n });\n\nexport const useRegister = () =>\n useAsyncWithAuth('register', useIntlayerAPI().auth.register, {\n invalidateQueries: ['getSession'],\n });\nexport const useLogout = () =>\n useAsyncWithAuth('logout', useIntlayerAPI().auth.logout, {\n invalidateQueries: ['getSession'],\n });\nexport const useChangePassword = () =>\n useAsyncWithAuth('changePassword', useIntlayerAPI().auth.changePassword);\nexport const useAskResetPassword = () =>\n useAsyncWithAuth('askResetPassword', useIntlayerAPI().auth.askResetPassword);\nexport const useResetPassword = () =>\n useAsyncWithAuth('resetPassword', useIntlayerAPI().auth.resetPassword);\nexport const useVerifyEmail = () =>\n useAsyncWithAuth('verifyEmail', useIntlayerAPI().auth.verifyEmail);\n\nexport const useGetUserByAccount = () =>\n useAsyncWithAuth('getUserByAccount', useIntlayerAPI().user.getUserByAccount);\n\n/**\n * User\n */\n\nexport const useGetUsers = () =>\n useAsyncWithAuth('getUsers', useIntlayerAPI().user.getUsers, {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useCreateUser = () =>\n useAsyncWithAuth('createUser', useIntlayerAPI().user.createUser, {\n invalidateQueries: ['getUsers'],\n });\nexport const useUpdateUser = () =>\n useAsyncWithAuth('updateUser', useIntlayerAPI().user.updateUser, {\n invalidateQueries: ['getSession'],\n });\nexport const useDeleteUser = () =>\n useAsyncWithAuth('deleteUser', useIntlayerAPI().user.deleteUser, {\n invalidateQueries: ['getUsers'],\n });\n\n/**\n * Organization\n */\n\nexport const useGetOrganizations = () =>\n useAsyncWithAuth(\n 'getOrganizations',\n useIntlayerAPI().organization.getOrganizations,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useAddOrganization = () =>\n useAsyncWithAuth(\n 'addOrganization',\n useIntlayerAPI().organization.addOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useUpdateOrganization = () =>\n useAsyncWithAuth(\n 'updateOrganization',\n useIntlayerAPI().organization.updateOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useUpdateOrganizationMembers = () =>\n useAsyncWithAuth(\n 'updateOrganizationMembers',\n useIntlayerAPI().organization.updateOrganizationMembers,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useAddOrganizationMember = () =>\n useAsyncWithAuth(\n 'addOrganizationMember',\n useIntlayerAPI().organization.addOrganizationMember,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useDeleteOrganization = () =>\n useAsyncWithAuth(\n 'deleteOrganization',\n useIntlayerAPI().organization.deleteOrganization,\n {\n invalidateQueries: ['getOrganizations'],\n }\n );\nexport const useSelectOrganization = () =>\n useAsyncWithAuth(\n 'selectOrganization',\n useIntlayerAPI().organization.selectOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useUnselectOrganization = () =>\n useAsyncWithAuth(\n 'unselectOrganization',\n useIntlayerAPI().organization.unselectOrganization,\n {\n invalidateQueries: ['getSession'],\n }\n );\n\n/**\n * Project\n */\n\nexport const useGetProjects = () =>\n useAsyncWithAuth('getProjects', useIntlayerAPI().project.getProjects, {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useAddProject = () =>\n useAsyncWithAuth('addProject', useIntlayerAPI().project.addProject, {\n invalidateQueries: ['getProjects'],\n });\nexport const useUpdateProject = () =>\n useAsyncWithAuth('updateProject', useIntlayerAPI().project.updateProject, {\n invalidateQueries: ['getSession'],\n });\nexport const useUpdateProjectMembers = () =>\n useAsyncWithAuth(\n 'updateProjectMembers',\n useIntlayerAPI().project.updateProjectMembers,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useDeleteProject = () =>\n useAsyncWithAuth('deleteProject', useIntlayerAPI().project.deleteProject, {\n invalidateQueries: ['getProjects'],\n });\nexport const useSelectProject = () =>\n useAsyncWithAuth('selectProject', useIntlayerAPI().project.selectProject, {\n invalidateQueries: ['getSession'],\n });\nexport const useUnselectProject = () =>\n useAsyncWithAuth(\n 'unselectProject',\n useIntlayerAPI().project.unselectProject,\n {\n invalidateQueries: ['getSession'],\n }\n );\nexport const useAddNewAccessKey = () =>\n useAsyncWithAuth(\n 'addNewAccessKey',\n useIntlayerAPI().project.addNewAccessKey,\n {\n invalidateQueries: ['getProjects', 'getSession'],\n }\n );\nexport const useDeleteAccessKey = () =>\n useAsyncWithAuth(\n 'deleteAccessKey',\n useIntlayerAPI().project.deleteAccessKey,\n {\n invalidateQueries: ['getProjects', 'getSession'],\n }\n );\nexport const useRefreshAccessKey = () =>\n useAsyncWithAuth(\n 'refreshAccessKey',\n useIntlayerAPI().project.refreshAccessKey,\n { invalidateQueries: ['getProjects', 'getSession'] }\n );\n\n/**\n * Dictionary\n */\n\nexport const useGetDictionaries = () =>\n useAsyncWithAuth(\n 'getDictionaries',\n useIntlayerAPI().dictionary.getDictionaries,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useGetDictionariesKeys = () =>\n useAsyncWithAuth(\n 'getDictionariesKeys',\n useIntlayerAPI().dictionary.getDictionariesKeys,\n {\n cache: true,\n store: true,\n retryLimit: 3,\n autoFetch: true,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n }\n );\n\nexport const useGetDictionary = () =>\n useAsyncWithAuth('getDictionary', useIntlayerAPI().dictionary.getDictionary, {\n cache: true,\n store: true,\n retryLimit: 3,\n revalidation: true,\n revalidateTime: 5 * 60 * 1000, // 5 minutes\n });\nexport const useAddDictionary = () =>\n useAsyncWithAuth('addDictionary', useIntlayerAPI().dictionary.addDictionary, {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n });\n\nexport const usePushDictionaries = () =>\n useAsyncWithAuth(\n 'pushDictionaries',\n useIntlayerAPI().dictionary.pushDictionaries,\n {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n }\n );\nexport const useUpdateDictionary = () =>\n useAsyncWithAuth(\n 'updateDictionary',\n useIntlayerAPI().dictionary.updateDictionary,\n {\n invalidateQueries: ['getDictionaries'],\n }\n );\nexport const useDeleteDictionary = () =>\n useAsyncWithAuth(\n 'deleteDictionary',\n useIntlayerAPI().dictionary.deleteDictionary,\n {\n invalidateQueries: ['getDictionaries', 'getDictionariesKeys'],\n }\n );\n"],"names":[],"mappings":";;;;AAOO,MAAM,mBAAmB,CAI9B,KACA,eACA,YACG;AACH,QAAM,EAAE,WAAW,kBAAkB,IAAI,QAAQ;AAE1C,SAAA,SAAS,KAAK,eAAe;AAAA,IAClC,GAAG;AAAA,IACH,QAAQ,QAAQ,aAAa,iBAAiB;AAAA,EAAA,CAC/C;AACH;AAMO,MAAM,WAAW,MACtB,iBAAiB,SAAS,eAAe,EAAE,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IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB,IAAI,KAAK;AAAA;AAAA,EAC3B;AACF;AAEK,MAAM,yBAAyB,MACpC;AAAA,EACE;AAAA,EACA,eAAA,EAAiB,WAAW;AAAA,EAC5B;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB,IAAI,KAAK;AAAA;AAAA,EAC3B;AACF;AAEK,MAAM,mBAAmB,MAC9B,iBAAiB,iBAAiB,eAAe,EAAE,WAAW,eAAe;AAAA,EAC3E,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB,IAAI,KAAK;AAAA;AAC3B,CAAC;AACI,MAAM,mBAAmB,MAC9B,iBAAiB,iBAAiB,eAAe,EAAE,WAAW,eAAe;AAAA,EAC3E,mBAAmB,CAAC,mBAAmB,qBAAqB;AAC9D,CAAC;AAEI,MAAM,sBAAsB,MACjC;AAAA,EACE;AAAA,EACA,eAAA,EAAiB,WAAW;AAAA,EAC5B;AAAA,IACE,mBAAmB,CAAC,mBAAmB,qBAAqB;AAAA,EAC9D;AACF;AACK,MAAM,sBAAsB,MACjC;AAAA,EACE;AAAA,EACA,eAAA,EAAiB,WAAW;AAAA,EAC5B;AAAA,IACE,mBAAmB,CAAC,iBAAiB;AAAA,EACvC;AACF;AACK,MAAM,sBAAsB,MACjC;AAAA,EACE;AAAA,EACA,eAAA,EAAiB,WAAW;AAAA,EAC5B;AAAA,IACE,mBAAmB,CAAC,mBAAmB,qBAAqB;AAAA,EAC9D;AACF;"}
|
|
@@ -119,7 +119,6 @@ const useAsync = (key, asyncFunction, options) => {
|
|
|
119
119
|
const promise = (async () => {
|
|
120
120
|
setIsLoading(keyWithArgs2, true);
|
|
121
121
|
let response = null;
|
|
122
|
-
let errorResponse = null;
|
|
123
122
|
await asyncFunction(...args2).then((result) => {
|
|
124
123
|
const isResultChanged = JSON.stringify(result) !== JSON.stringify(data);
|
|
125
124
|
response = result;
|
|
@@ -144,20 +143,17 @@ const useAsync = (key, asyncFunction, options) => {
|
|
|
144
143
|
}
|
|
145
144
|
}).catch((error2) => {
|
|
146
145
|
const errorMessage = error2.message ?? "An error occurred";
|
|
146
|
+
console.error(JSON.stringify(error2));
|
|
147
147
|
setData(keyWithArgs2, null);
|
|
148
148
|
setError(keyWithArgs2, errorMessage);
|
|
149
149
|
incrementRetryCount(keyWithArgs2);
|
|
150
150
|
onError?.(errorMessage);
|
|
151
|
-
errorResponse = error2;
|
|
152
151
|
}).finally(() => {
|
|
153
152
|
setIsLoading(keyWithArgs2, false);
|
|
154
153
|
setIsFetched(keyWithArgs2, true);
|
|
155
154
|
setIsInvalidated(keyWithArgs2, false);
|
|
156
155
|
pendingPromises.delete(keyWithArgs2);
|
|
157
156
|
});
|
|
158
|
-
if (errorResponse) {
|
|
159
|
-
throw new Error(errorResponse);
|
|
160
|
-
}
|
|
161
157
|
return response;
|
|
162
158
|
})();
|
|
163
159
|
pendingPromises.set(keyWithArgs2, promise);
|