infinity-forge 0.31.4 → 0.31.6
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/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/sites/components/brands-carousel/index.d.ts +1 -1
- package/dist/sites/components/brands-carousel/index.js +3 -3
- package/dist/sites/components/brands-carousel/interfaces.d.ts +1 -1
- package/dist/sites/components/brands-carousel/styles.d.ts +1 -0
- package/dist/sites/components/carousel/component.d.ts +1 -1
- package/dist/sites/components/carousel/component.js +1 -1
- package/dist/sites/components/carousel/index.d.ts +1 -1
- package/dist/sites/components/carousel/index.js +1 -1
- package/dist/sites/components/carousel/interfaces.d.ts +1 -1
- package/dist/sites/components/carousel/versions/index.d.ts +1 -1
- package/dist/sites/components/carousel/versions/index.js +1 -1
- package/dist/sites/components/carousel/versions/version-01/component-01.d.ts +1 -1
- package/dist/sites/components/carousel/versions/version-01/component-01.js +1 -1
- package/dist/sites/components/counter/component.d.ts +1 -1
- package/dist/sites/components/counter/component.js +1 -1
- package/dist/sites/components/counter/index.d.ts +1 -1
- package/dist/sites/components/counter/index.js +1 -1
- package/dist/sites/components/counter/interfaces.d.ts +1 -1
- package/dist/sites/components/counter/versions/index.d.ts +1 -1
- package/dist/sites/components/counter/versions/index.js +1 -1
- package/dist/sites/components/counter/versions/version-01/box/index.d.ts +1 -1
- package/dist/sites/components/counter/versions/version-01/box/index.js +2 -2
- package/dist/sites/components/counter/versions/version-01/box/styles.d.ts +1 -0
- package/dist/sites/components/counter/versions/version-01/component.d.ts +1 -1
- package/dist/sites/components/counter/versions/version-01/component.js +3 -3
- package/dist/sites/components/counter/versions/version-01/styles.d.ts +1 -0
- package/dist/sites/components/head/component.d.ts +1 -1
- package/dist/sites/components/head/index.d.ts +2 -2
- package/dist/sites/components/head/index.js +2 -2
- package/dist/sites/components/header-link/component.d.ts +1 -1
- package/dist/sites/components/header-link/component.js +1 -1
- package/dist/sites/components/header-link/index.d.ts +1 -1
- package/dist/sites/components/header-link/index.js +1 -1
- package/dist/sites/components/header-link/interfaces.d.ts +1 -1
- package/dist/sites/components/header-link/versions/index.d.ts +1 -1
- package/dist/sites/components/header-link/versions/index.js +1 -1
- package/dist/sites/components/header-link/versions/version-01/component.js +2 -2
- package/dist/sites/components/header-link/versions/version-01/component.stories.d.ts +1 -1
- package/dist/sites/components/header-link/versions/version-01/component.stories.js +2 -2
- package/dist/sites/components/header-link/versions/version-01/styles.d.ts +1 -0
- package/dist/sites/components/index.d.ts +6 -6
- package/dist/sites/components/index.js +6 -6
- package/dist/sites/components/mvv/component.d.ts +1 -1
- package/dist/sites/components/mvv/component.js +1 -1
- package/dist/sites/components/mvv/index.d.ts +1 -1
- package/dist/sites/components/mvv/index.js +1 -1
- package/dist/sites/components/mvv/interfaces.d.ts +1 -1
- package/dist/sites/components/mvv/versions/index.d.ts +1 -1
- package/dist/sites/components/mvv/versions/index.js +1 -1
- package/dist/sites/components/mvv/versions/version-01/component.d.ts +1 -1
- package/dist/sites/components/mvv/versions/version-01/component.js +2 -2
- package/dist/sites/components/mvv/versions/version-01/styles.d.ts +1 -0
- package/dist/sites/context/configs/context.d.ts +1 -1
- package/dist/sites/context/configs/context.js +3 -3
- package/dist/sites/context/configs/index.d.ts +2 -2
- package/dist/sites/context/configs/index.js +2 -2
- package/dist/sites/context/configs/interfaces.d.ts +1 -0
- package/dist/sites/context/configs/scripts/acept-cookies/index.js +2 -2
- package/dist/sites/context/configs/scripts/acept-cookies/styles.d.ts +1 -0
- package/dist/sites/context/configs/scripts/acept-ratedr/index.js +2 -2
- package/dist/sites/context/configs/scripts/acept-ratedr/styles.d.ts +1 -0
- package/dist/sites/context/configs/scripts/component.d.ts +1 -1
- package/dist/sites/context/configs/scripts/component.js +4 -4
- package/dist/sites/context/configs/scripts/index.d.ts +5 -5
- package/dist/sites/context/configs/scripts/index.js +5 -5
- package/dist/sites/context/configs/scripts/interfaces.d.ts +1 -1
- package/dist/sites/context/configs/scripts/whatsapp-fixed/index.js +1 -1
- package/dist/sites/context/configs/scripts/whatsapp-fixed/styles.d.ts +1 -0
- package/dist/sites/context/index.d.ts +1 -1
- package/dist/sites/context/index.js +1 -1
- package/dist/sites/hook/index.d.ts +3 -3
- package/dist/sites/hook/index.js +3 -3
- package/dist/sites/index.d.ts +4 -4
- package/dist/sites/index.js +4 -4
- package/dist/sites/interfaces/api-data/index.d.ts +1 -1
- package/dist/sites/interfaces/api-data/index.js +1 -1
- package/dist/sites/interfaces/index.d.ts +2 -2
- package/dist/sites/interfaces/index.js +2 -2
- package/dist/sites/utils/index.d.ts +1 -1
- package/dist/sites/utils/index.js +1 -1
- package/dist/system/container/admin/auth/container.js +11 -0
- package/dist/system/container/admin/auth/index.d.ts +2 -0
- package/dist/system/container/admin/auth/index.js +19 -0
- package/dist/system/container/admin/index.d.ts +3 -0
- package/dist/system/container/admin/index.js +20 -0
- package/dist/system/container/admin/menu/container.js +11 -0
- package/dist/system/container/admin/menu/index.d.ts +2 -0
- package/dist/system/container/admin/menu/index.js +19 -0
- package/dist/system/container/admin/users/container.js +12 -0
- package/dist/system/container/admin/users/index.d.ts +2 -0
- package/dist/system/container/admin/users/index.js +19 -0
- package/dist/system/container/index.d.ts +4 -0
- package/dist/system/container/index.js +21 -0
- package/dist/system/container/main.d.ts +4 -0
- package/dist/system/container/main.js +14 -0
- package/dist/system/container/types.js +19 -0
- package/dist/system/index.d.ts +5 -5
- package/dist/system/index.js +5 -5
- package/dist/system/presentation/components/data/avatar/index.js +2 -2
- package/dist/system/presentation/components/data/buttons/index.d.ts +1 -0
- package/dist/system/presentation/components/data/buttons/index.js +18 -0
- package/dist/system/presentation/components/data/buttons/index.js.map +1 -0
- package/dist/system/presentation/components/data/buttons/sidebar-button/index.d.ts +1 -0
- package/dist/system/presentation/components/data/buttons/sidebar-button/index.js +35 -0
- package/dist/system/presentation/components/data/buttons/sidebar-button/index.js.map +1 -0
- package/dist/system/presentation/components/data/buttons/sidebar-button/styles.d.ts +4 -0
- package/dist/system/presentation/components/data/buttons/sidebar-button/styles.js +14 -0
- package/dist/system/presentation/components/data/buttons/sidebar-button/styles.js.map +1 -0
- package/dist/system/presentation/components/data/chat/card-message/index.d.ts +1 -1
- package/dist/system/presentation/components/data/chat/card-message/index.js +3 -3
- package/dist/system/presentation/components/data/chat/card-message/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/chat/index.d.ts +1 -1
- package/dist/system/presentation/components/data/chat/index.js +5 -5
- package/dist/system/presentation/components/data/chat/interfaces.d.ts +1 -1
- package/dist/system/presentation/components/data/chat/loader/index.js +1 -1
- package/dist/system/presentation/components/data/chat/loader/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/chat/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/detail-card/component.d.ts +2 -0
- package/dist/system/presentation/components/data/detail-card/component.js +43 -0
- package/dist/system/presentation/components/data/detail-card/component.js.map +1 -0
- package/dist/system/presentation/components/data/detail-card/index.d.ts +2 -0
- package/dist/system/presentation/components/data/detail-card/index.js +19 -0
- package/dist/system/presentation/components/data/detail-card/index.js.map +1 -0
- package/dist/system/presentation/components/data/detail-card/interfaces.d.ts +19 -0
- package/dist/system/presentation/components/data/detail-card/interfaces.js +3 -0
- package/dist/system/presentation/components/data/detail-card/interfaces.js.map +1 -0
- package/dist/system/presentation/components/data/detail-card/styles.d.ts +5 -0
- package/dist/system/presentation/components/data/detail-card/styles.js +14 -0
- package/dist/system/presentation/components/data/detail-card/styles.js.map +1 -0
- package/dist/system/presentation/components/data/highlight-icon/index.d.ts +2 -0
- package/dist/system/presentation/components/data/highlight-icon/index.js +40 -0
- package/dist/system/presentation/components/data/highlight-icon/index.js.map +1 -0
- package/dist/system/presentation/components/data/highlight-icon/interfaces.d.ts +8 -0
- package/dist/system/presentation/components/data/highlight-icon/interfaces.js +3 -0
- package/dist/system/presentation/components/data/highlight-icon/interfaces.js.map +1 -0
- package/dist/system/presentation/components/data/highlight-icon/styles.d.ts +7 -0
- package/dist/system/presentation/components/data/highlight-icon/styles.js +14 -0
- package/dist/system/presentation/components/data/highlight-icon/styles.js.map +1 -0
- package/dist/system/presentation/components/data/highlight-text/index.d.ts +1 -1
- package/dist/system/presentation/components/data/highlight-text/index.js +2 -2
- package/dist/system/presentation/components/data/highlight-text/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/highlight-text/styles.js +1 -1
- package/dist/system/presentation/components/data/highlight-text/styles.js.map +1 -1
- package/dist/system/presentation/components/data/index.d.ts +15 -9
- package/dist/system/presentation/components/data/index.js +15 -9
- package/dist/system/presentation/components/data/index.js.map +1 -1
- package/dist/system/presentation/components/data/input-search/index.d.ts +1 -1
- package/dist/system/presentation/components/data/input-search/index.js +3 -3
- package/dist/system/presentation/components/data/input-search/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/logo/index.js +2 -2
- package/dist/system/presentation/components/data/logo/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/overlay/index.d.ts +1 -1
- package/dist/system/presentation/components/data/overlay/index.js +2 -2
- package/dist/system/presentation/components/data/overlay/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/page-wrapper/index.d.ts +1 -1
- package/dist/system/presentation/components/data/page-wrapper/index.js +2 -2
- package/dist/system/presentation/components/data/page-wrapper/interfaces.d.ts +1 -1
- package/dist/system/presentation/components/data/page-wrapper/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/popover/index.d.ts +1 -1
- package/dist/system/presentation/components/data/profile-infos/index.d.ts +2 -0
- package/dist/system/presentation/components/data/profile-infos/index.js +48 -0
- package/dist/system/presentation/components/data/profile-infos/index.js.map +1 -0
- package/dist/system/presentation/components/data/profile-infos/interfaces.d.ts +6 -0
- package/dist/system/presentation/components/data/profile-infos/interfaces.js +3 -0
- package/dist/system/presentation/components/data/profile-infos/interfaces.js.map +1 -0
- package/dist/system/presentation/components/data/profile-infos/profile/index.d.ts +2 -0
- package/dist/system/presentation/components/data/profile-infos/profile/index.js +36 -0
- package/dist/system/presentation/components/data/profile-infos/profile/index.js.map +1 -0
- package/dist/system/presentation/components/data/profile-infos/profile/interfaces.d.ts +10 -0
- package/dist/system/presentation/components/data/profile-infos/profile/interfaces.js +3 -0
- package/dist/system/presentation/components/data/profile-infos/profile/interfaces.js.map +1 -0
- package/dist/system/presentation/components/data/profile-infos/profile/styles.d.ts +5 -0
- package/dist/system/presentation/components/data/profile-infos/profile/styles.js +14 -0
- package/dist/system/presentation/components/data/profile-infos/profile/styles.js.map +1 -0
- package/dist/system/presentation/components/data/profile-infos/styles.d.ts +5 -0
- package/dist/system/presentation/components/data/profile-infos/styles.js +14 -0
- package/dist/system/presentation/components/data/profile-infos/styles.js.map +1 -0
- package/dist/system/presentation/components/{layout/menu/components → data}/select-workspace/custom-styles.js +6 -6
- package/dist/system/presentation/components/data/select-workspace/custom-styles.js.map +1 -0
- package/dist/system/presentation/components/data/select-workspace/index.d.ts +4 -0
- package/dist/system/presentation/components/{layout/menu/components → data}/select-workspace/index.js +5 -5
- package/dist/system/presentation/components/data/select-workspace/index.js.map +1 -0
- package/dist/system/presentation/components/{layout/menu/components/select-workspace/index.d.ts → data/select-workspace/interfaces.d.ts} +1 -5
- package/dist/system/presentation/components/data/select-workspace/interfaces.js +3 -0
- package/dist/system/presentation/components/data/select-workspace/interfaces.js.map +1 -0
- package/dist/system/presentation/components/{layout/menu/components → data}/select-workspace/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/select-workspace/styles.js +14 -0
- package/dist/system/presentation/components/data/select-workspace/styles.js.map +1 -0
- package/dist/system/presentation/components/data/sign-up/index.js +3 -3
- package/dist/system/presentation/components/data/sign-up/styles.d.ts +1 -0
- package/dist/system/presentation/components/data/tab/index.d.ts +2 -0
- package/dist/system/presentation/components/data/tab/index.js +47 -0
- package/dist/system/presentation/components/data/tab/index.js.map +1 -0
- package/dist/system/presentation/components/data/tab/interfaces.d.ts +12 -0
- package/dist/system/presentation/components/data/tab/interfaces.js +3 -0
- package/dist/system/presentation/components/data/tab/interfaces.js.map +1 -0
- package/dist/system/presentation/components/data/tab/styles.d.ts +5 -0
- package/dist/system/presentation/components/data/tab/styles.js +14 -0
- package/dist/system/presentation/components/data/tab/styles.js.map +1 -0
- package/dist/system/presentation/components/index.d.ts +3 -3
- package/dist/system/presentation/components/index.js +3 -3
- package/dist/system/presentation/components/layout/component.d.ts +2 -8
- package/dist/system/presentation/components/layout/component.js +16 -5
- package/dist/system/presentation/components/layout/component.js.map +1 -1
- package/dist/system/presentation/components/layout/header/components/index.d.ts +2 -2
- package/dist/system/presentation/components/layout/header/components/index.js +2 -2
- package/dist/system/presentation/components/layout/header/components/menu-right/index.d.ts +6 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/index.js +23 -8
- package/dist/system/presentation/components/layout/header/components/menu-right/index.js.map +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/card/index.d.ts +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/card/index.js +3 -3
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/index.js +3 -3
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/interfaces.d.ts +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/index.js +4 -4
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/index.js.map +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/card/index.d.ts +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/card/index.js +2 -2
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/card/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/index.js +6 -6
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/index.js.map +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/content/index.js +3 -3
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/content/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/index.js +5 -5
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/index.js.map +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/settings/index.js +4 -4
- package/dist/system/presentation/components/layout/header/components/menu-right/settings/index.js.map +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/settings/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/styles.js +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/styles.js.map +1 -1
- package/dist/system/presentation/components/layout/header/components/search-modal/index.js +4 -4
- package/dist/system/presentation/components/layout/header/components/search-modal/search-list/index.js +3 -3
- package/dist/system/presentation/components/layout/header/components/search-modal/search-list/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/search-modal/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/search-modal/trigger/index.js +2 -2
- package/dist/system/presentation/components/layout/header/components/search-modal/trigger/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/index.d.ts +2 -3
- package/dist/system/presentation/components/layout/header/index.js +15 -5
- package/dist/system/presentation/components/layout/header/index.js.map +1 -1
- package/dist/system/presentation/components/layout/header/version-01/index.d.ts +2 -3
- package/dist/system/presentation/components/layout/header/version-01/index.js +6 -6
- package/dist/system/presentation/components/layout/header/version-01/index.js.map +1 -1
- package/dist/system/presentation/components/layout/header/version-01/styles.d.ts +5 -1
- package/dist/system/presentation/components/layout/header/version-01/styles.js +4 -1
- package/dist/system/presentation/components/layout/header/version-01/styles.js.map +1 -1
- package/dist/system/presentation/components/layout/index.d.ts +3 -3
- package/dist/system/presentation/components/layout/index.js +3 -3
- package/dist/system/presentation/components/layout/interfaces.d.ts +7 -0
- package/dist/system/presentation/components/layout/interfaces.js +3 -0
- package/dist/system/presentation/components/layout/interfaces.js.map +1 -0
- package/dist/system/presentation/components/layout/menu/components/index.d.ts +1 -2
- package/dist/system/presentation/components/layout/menu/components/index.js +1 -2
- package/dist/system/presentation/components/layout/menu/components/index.js.map +1 -1
- package/dist/system/presentation/components/layout/menu/components/menu/index.js +3 -3
- package/dist/system/presentation/components/layout/menu/components/menu/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/menu/index.d.ts +2 -1
- package/dist/system/presentation/components/layout/menu/index.js +4 -2
- package/dist/system/presentation/components/layout/menu/index.js.map +1 -1
- package/dist/system/presentation/components/layout/menu/interfaces.d.ts +5 -0
- package/dist/system/presentation/components/layout/menu/interfaces.js +3 -0
- package/dist/system/presentation/components/layout/menu/interfaces.js.map +1 -0
- package/dist/system/presentation/components/layout/menu/version-01/index.d.ts +2 -4
- package/dist/system/presentation/components/layout/menu/version-01/index.js +9 -6
- package/dist/system/presentation/components/layout/menu/version-01/index.js.map +1 -1
- package/dist/system/presentation/components/layout/menu/version-01/styles.d.ts +6 -1
- package/dist/system/presentation/components/layout/menu/version-01/styles.js +4 -1
- package/dist/system/presentation/components/layout/menu/version-01/styles.js.map +1 -1
- package/dist/system/presentation/components/layout/styles.d.ts +1 -0
- package/dist/system/presentation/components/layout/styles.js +1 -1
- package/dist/system/presentation/components/layout/styles.js.map +1 -1
- package/dist/system/presentation/components/pages/index.d.ts +2 -2
- package/dist/system/presentation/components/pages/index.js +2 -2
- package/dist/system/presentation/components/pages/menus/index.d.ts +1 -1
- package/dist/system/presentation/components/pages/menus/index.js +1 -1
- package/dist/system/presentation/components/pages/menus/page.js +3 -3
- package/dist/system/presentation/components/pages/menus/table/columns.d.ts +2 -2
- package/dist/system/presentation/components/pages/menus/table/columns.js +1 -1
- package/dist/system/presentation/components/pages/menus/table/create.d.ts +2 -2
- package/dist/system/presentation/components/pages/menus/table/create.js +2 -2
- package/dist/system/presentation/components/pages/menus/table/delete.js +2 -2
- package/dist/system/presentation/components/pages/menus/table/edit.d.ts +2 -2
- package/dist/system/presentation/components/pages/menus/table/edit.js +2 -2
- package/dist/system/presentation/components/pages/menus/table/icon/index.js +1 -1
- package/dist/system/presentation/components/pages/menus/table/icon/style.d.ts +1 -0
- package/dist/system/presentation/components/pages/menus/table/index.d.ts +4 -4
- package/dist/system/presentation/components/pages/menus/table/index.js +4 -4
- package/dist/system/presentation/components/pages/users/index.d.ts +1 -1
- package/dist/system/presentation/components/pages/users/index.js +1 -1
- package/dist/system/presentation/components/pages/users/page.js +3 -3
- package/dist/system/presentation/components/pages/users/table/columns.d.ts +2 -2
- package/dist/system/presentation/components/pages/users/table/create.d.ts +2 -2
- package/dist/system/presentation/components/pages/users/table/create.js +2 -2
- package/dist/system/presentation/components/pages/users/table/delete.js +2 -2
- package/dist/system/presentation/components/pages/users/table/edit.d.ts +2 -2
- package/dist/system/presentation/components/pages/users/table/edit.js +2 -2
- package/dist/system/presentation/components/pages/users/table/index.d.ts +4 -4
- package/dist/system/presentation/components/pages/users/table/index.js +4 -4
- package/dist/system/presentation/configs/index.d.ts +2 -2
- package/dist/system/presentation/configs/index.js +2 -2
- package/dist/system/presentation/context/auth/authenticated/index.js +1 -1
- package/dist/system/presentation/context/auth/context.d.ts +1 -1
- package/dist/system/presentation/context/auth/context.js +1 -1
- package/dist/system/presentation/context/auth/index.d.ts +5 -5
- package/dist/system/presentation/context/auth/index.js +5 -5
- package/dist/system/presentation/context/auth/interfaces.d.ts +1 -1
- package/dist/system/presentation/context/auth/login/index.js +3 -3
- package/dist/system/presentation/context/auth/login/styles.d.ts +1 -0
- package/dist/system/presentation/context/auth/private-page/index.js +3 -3
- package/dist/system/presentation/context/auth/unauthenticated/index.js +1 -1
- package/dist/system/presentation/context/container.js +3 -3
- package/dist/system/presentation/context/index.d.ts +3 -3
- package/dist/system/presentation/context/index.js +3 -3
- package/dist/system/presentation/context/system-configs/context.d.ts +1 -1
- package/dist/system/presentation/context/system-configs/context.js +1 -1
- package/dist/system/presentation/context/system-configs/index.d.ts +2 -2
- package/dist/system/presentation/context/system-configs/index.js +2 -2
- package/dist/system/presentation/hooks/index.d.ts +3 -3
- package/dist/system/presentation/hooks/index.js +3 -3
- package/dist/system/presentation/hooks/menu/index.d.ts +1 -1
- package/dist/system/presentation/hooks/menu/index.js +1 -1
- package/dist/system/presentation/hooks/menu/use-load-menu.d.ts +1 -1
- package/dist/system/presentation/hooks/menu/use-load-menu.js +1 -1
- package/dist/system/presentation/hooks/notifications/index.d.ts +2 -2
- package/dist/system/presentation/hooks/notifications/index.js +2 -2
- package/dist/system/presentation/hooks/notifications/use-load-all/index.js +1 -1
- package/dist/system/presentation/hooks/notifications/use-load-no-read/index.d.ts +2 -2
- package/dist/system/presentation/hooks/notifications/use-load-no-read/index.js +1 -1
- package/dist/system/presentation/hooks/ui/index.d.ts +2 -2
- package/dist/system/presentation/hooks/ui/index.js +2 -2
- package/dist/system/presentation/hooks/ui/use-table/component.d.ts +8 -0
- package/dist/system/presentation/hooks/ui/use-table/component.js +26 -0
- package/dist/system/presentation/hooks/ui/use-table/components/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/index.js +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/actions/index.d.ts +5 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/actions/index.js +109 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/create/index.d.ts +4 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/create/index.js +107 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/create/styles.d.ts +1 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/export/index.d.ts +4 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/export/index.js +35 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/export/styles.d.ts +1 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.d.ts +4 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.js +128 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/styles.d.ts +1 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/index.js +9 -9
- package/dist/system/presentation/hooks/ui/use-table/components/table/interfaces.d.ts +2 -2
- package/dist/system/presentation/hooks/ui/use-table/components/table/pagination/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/pagination/index.js +3 -3
- package/dist/system/presentation/hooks/ui/use-table/components/table/pagination/styles.d.ts +1 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/skeleton-table/index.js +2 -2
- package/dist/system/presentation/hooks/ui/use-table/components/table/skeleton-table/styles.d.ts +1 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/styles.d.ts +1 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/index.d.ts +2 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/index.js +50 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/interfaces.d.ts +6 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/styles.d.ts +1 -0
- package/dist/system/presentation/hooks/ui/use-table/index.d.ts +4 -0
- package/dist/system/presentation/hooks/ui/use-table/index.js +21 -0
- package/dist/system/presentation/hooks/ui/use-table/interfaces.d.ts +82 -0
- package/dist/system/presentation/hooks/ui/use-table/query/get-query-arguments-table.d.ts +2 -0
- package/dist/system/presentation/hooks/ui/use-table/query/hook.d.ts +5 -0
- package/dist/system/presentation/hooks/ui/use-table/query/hook.js +50 -0
- package/dist/system/presentation/hooks/ui/use-table/query/index.d.ts +2 -0
- package/dist/system/presentation/hooks/ui/use-table/query/index.js +19 -0
- package/dist/system/presentation/index.d.ts +5 -5
- package/dist/system/presentation/index.js +5 -5
- package/dist/system/presentation/utils/index.d.ts +2 -0
- package/dist/system/presentation/utils/index.js +19 -0
- package/dist/system/presentation/utils/index.js.map +1 -1
- package/dist/system/presentation/utils/sidebar/index.d.ts +2 -0
- package/dist/system/presentation/utils/sidebar/index.js +32 -0
- package/dist/system/presentation/utils/sidebar/index.js.map +1 -0
- package/dist/system/presentation/utils/use-query/index.d.ts +1 -0
- package/dist/system/presentation/utils/use-query/index.js +18 -0
- package/dist/ui/components/accordion/index..d.ts +1 -1
- package/dist/ui/components/accordion/index..js +2 -2
- package/dist/ui/components/accordion/styles.d.ts +1 -0
- package/dist/ui/components/breadcrumb/index.d.ts +1 -1
- package/dist/ui/components/breadcrumb/index.js +2 -2
- package/dist/ui/components/breadcrumb/styles.d.ts +1 -0
- package/dist/ui/components/button/component.d.ts +1 -1
- package/dist/ui/components/button/component.js +2 -2
- package/dist/ui/components/button/index.d.ts +2 -2
- package/dist/ui/components/button/index.js +2 -2
- package/dist/ui/components/button/interfaces.d.ts +1 -1
- package/dist/ui/components/button/styles.d.ts +1 -0
- package/dist/ui/components/container/index.d.ts +1 -1
- package/dist/ui/components/error-boundary/component.d.ts +1 -1
- package/dist/ui/components/error-boundary/component.js +1 -1
- package/dist/ui/components/error-boundary/error-body.d.ts +1 -1
- package/dist/ui/components/error-boundary/index.d.ts +2 -2
- package/dist/ui/components/error-boundary/index.js +2 -2
- package/dist/ui/components/form/checkbox/index.js +56 -0
- package/dist/ui/components/form/checkbox/styles.d.ts +1 -0
- package/dist/ui/components/form/handler/component.d.ts +2 -0
- package/dist/ui/components/form/handler/component.js +25 -0
- package/dist/ui/components/form/handler/custom-submit/index.d.ts +16 -0
- package/dist/ui/components/form/handler/custom-submit/index.js +22 -0
- package/dist/ui/components/form/handler/dynamic_form_handler/component.d.ts +2 -0
- package/dist/ui/components/form/handler/dynamic_form_handler/component.js +113 -0
- package/dist/ui/components/form/handler/dynamic_form_handler/index.d.ts +2 -0
- package/dist/ui/components/form/handler/dynamic_form_handler/index.js +19 -0
- package/dist/ui/components/form/handler/dynamic_form_handler/interfaces.d.ts +27 -0
- package/dist/ui/components/form/handler/dynamic_form_handler/styles.d.ts +1 -0
- package/dist/ui/components/form/handler/form-handler/index.d.ts +2 -0
- package/dist/ui/components/form/handler/form-handler/index.js +201 -0
- package/dist/ui/components/form/handler/index.d.ts +5 -0
- package/dist/ui/components/form/handler/index.js +22 -0
- package/dist/ui/components/form/handler/interfaces.d.ts +31 -0
- package/dist/ui/components/form/handler/styles.d.ts +1 -0
- package/dist/ui/components/form/index.d.ts +14 -0
- package/dist/ui/components/form/index.js +31 -0
- package/dist/ui/components/form/input/index.d.ts +2 -0
- package/dist/ui/components/form/input/index.js +41 -0
- package/dist/ui/components/form/input-control/error/index.js +34 -0
- package/dist/ui/components/form/input-control/error/styles.d.ts +1 -0
- package/dist/ui/components/form/input-control/index.d.ts +2 -0
- package/dist/ui/components/form/input-control/index.js +41 -0
- package/dist/ui/components/form/input-control/label/index.js +34 -0
- package/dist/ui/components/form/input-control/label/styles.d.ts +1 -0
- package/dist/ui/components/form/input-control/loader-input/index.js +34 -0
- package/dist/ui/components/form/input-control/loader-input/styles.d.ts +1 -0
- package/dist/ui/components/form/input-control/styles.d.ts +1 -0
- package/dist/ui/components/form/input-cpf-cnpj/index.d.ts +2 -0
- package/dist/ui/components/form/input-cpf-cnpj/index.js +55 -0
- package/dist/ui/components/form/input-currency/index.d.ts +2 -0
- package/dist/ui/components/form/input-currency/index.js +27 -0
- package/dist/ui/components/form/input-date/index.d.ts +4 -0
- package/dist/ui/components/form/input-date/index.js +47 -0
- package/dist/ui/components/form/input-date/styles.d.ts +1 -0
- package/dist/ui/components/form/input-file/file-card/index.d.ts +5 -0
- package/dist/ui/components/form/input-file/file-card/index.js +65 -0
- package/dist/ui/components/form/input-file/file-card/styles.d.ts +1 -0
- package/dist/ui/components/form/input-file/index.d.ts +2 -0
- package/dist/ui/components/form/input-file/index.js +104 -0
- package/dist/ui/components/form/input-file/styles.d.ts +1 -0
- package/dist/ui/components/form/input-mask/index.d.ts +5 -0
- package/dist/ui/components/form/input-mask/index.js +35 -0
- package/dist/ui/components/form/input-password/index.d.ts +2 -0
- package/dist/ui/components/form/input-password/index.js +55 -0
- package/dist/ui/components/form/input-password/styles.d.ts +1 -0
- package/dist/ui/components/form/input-switch/index.d.ts +2 -0
- package/dist/ui/components/form/input-switch/index.js +24 -0
- package/dist/ui/components/form/interfaces.d.ts +23 -0
- package/dist/ui/components/form/radio/index.js +64 -0
- package/dist/ui/components/form/radio/styles.d.ts +1 -0
- package/dist/ui/components/form/select/index.d.ts +2 -0
- package/dist/ui/components/form/select/index.js +85 -0
- package/dist/ui/components/form/select/interfaces.d.ts +32 -0
- package/dist/ui/components/form/select/styles.d.ts +1 -0
- package/dist/ui/components/form/textarea/index.d.ts +2 -0
- package/dist/ui/components/form/textarea/index.js +29 -0
- package/dist/ui/components/index.d.ts +10 -10
- package/dist/ui/components/index.js +10 -10
- package/dist/ui/components/loader-circle/index.d.ts +2 -0
- package/dist/ui/components/loading-screen/index.d.ts +1 -1
- package/dist/ui/components/loading-screen/index.js +3 -3
- package/dist/ui/components/loading-screen/styles.d.ts +1 -0
- package/dist/ui/components/menu-mobile/components/nav-links/index.d.ts +1 -1
- package/dist/ui/components/menu-mobile/components/nav-links/index.js +2 -2
- package/dist/ui/components/menu-mobile/components/nav-links/interfaces.d.ts +1 -1
- package/dist/ui/components/menu-mobile/components/nav-links/styles.d.ts +1 -0
- package/dist/ui/components/menu-mobile/index.d.ts +1 -1
- package/dist/ui/components/menu-mobile/index.js +4 -4
- package/dist/ui/components/menu-mobile/styles.d.ts +1 -0
- package/dist/ui/components/menu-mobile/top/index.d.ts +1 -1
- package/dist/ui/components/menu-mobile/top/index.js +2 -2
- package/dist/ui/components/menu-mobile/top/interfaces.d.ts +1 -1
- package/dist/ui/components/menu-mobile/top/styles.d.ts +1 -0
- package/dist/ui/components/next-image/index.d.ts +1 -1
- package/dist/ui/components/next-image/index.js +3 -3
- package/dist/ui/components/next-image/styles.d.ts +1 -0
- package/dist/ui/components/sidebar/index.d.ts +1 -1
- package/dist/ui/components/sidebar/index.js +1 -1
- package/dist/ui/components/sidebar/styles.d.ts +1 -0
- package/dist/ui/contexts/index.d.ts +3 -3
- package/dist/ui/contexts/index.js +3 -3
- package/dist/ui/contexts/theme/context.d.ts +1 -1
- package/dist/ui/contexts/theme/context.js +1 -1
- package/dist/ui/contexts/theme/index.d.ts +2 -2
- package/dist/ui/contexts/theme/index.js +2 -2
- package/dist/ui/contexts/toast/index.d.ts +1 -1
- package/dist/ui/contexts/toast/styles.d.ts +1 -0
- package/dist/ui/contexts/toast/toast-item/index.d.ts +1 -1
- package/dist/ui/contexts/toast/toast-item/index.js +2 -2
- package/dist/ui/contexts/toast/toast-item/styles.d.ts +1 -0
- package/dist/ui/icons/render/Globe.d.ts +1 -1
- package/dist/ui/icons/render/LongArrowRight.d.ts +1 -1
- package/dist/ui/index.d.ts +5 -5
- package/dist/ui/index.js +5 -5
- package/dist/ui/utils/buffer/index.d.ts +1 -1
- package/dist/ui/utils/buffer/index.js +1 -1
- package/dist/ui/utils/facebook/index.d.ts +1 -1
- package/dist/ui/utils/facebook/index.js +1 -1
- package/dist/ui/utils/file/index.d.ts +2 -2
- package/dist/ui/utils/file/index.js +2 -2
- package/dist/ui/utils/file/load-file.d.ts +6 -2
- package/dist/ui/utils/file/load-file.js +3 -3
- package/dist/ui/utils/file/load-file.js.map +1 -1
- package/dist/ui/utils/file/upload-file.d.ts +1 -1
- package/dist/ui/utils/file/upload-file.js +6 -6
- package/dist/ui/utils/file/upload-file.js.map +1 -1
- package/dist/ui/utils/index.d.ts +7 -7
- package/dist/ui/utils/index.js +7 -7
- package/dist/ui/utils/libs/index.d.ts +1 -1
- package/dist/ui/utils/libs/index.js +1 -1
- package/dist/ui/utils/libs/next/index.d.ts +2 -2
- package/dist/ui/utils/libs/next/index.js +2 -2
- package/dist/ui/utils/validations/index.d.ts +2 -2
- package/dist/ui/utils/validations/index.js +2 -2
- package/package.json +77 -76
- package/dist/system/presentation/components/layout/menu/components/select-workspace/custom-styles.js.map +0 -1
- package/dist/system/presentation/components/layout/menu/components/select-workspace/index.js.map +0 -1
- package/dist/system/presentation/components/layout/menu/components/select-workspace/styles.js +0 -14
- package/dist/system/presentation/components/layout/menu/components/select-workspace/styles.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- /package/dist/system/presentation/components/{layout/menu/components → data}/select-workspace/custom-styles.d.ts +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
+
function step(op) {
|
|
50
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
52
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
53
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
+
switch (op[0]) {
|
|
55
|
+
case 0: case 1: t = op; break;
|
|
56
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
+
default:
|
|
60
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
+
if (t[2]) _.ops.pop();
|
|
65
|
+
_.trys.pop(); continue;
|
|
66
|
+
}
|
|
67
|
+
op = body.call(thisArg, _);
|
|
68
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73
|
+
exports.DynamicFormHandler = void 0;
|
|
74
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
75
|
+
var component_1 = require("../component.js");
|
|
76
|
+
var loader_circle_1 = require("../../../../../ui/components/loader-circle/index.js");
|
|
77
|
+
var swr_1 = __importStar(require("swr"));
|
|
78
|
+
var Inputs = __importStar(require("../../index.js"));
|
|
79
|
+
var S = __importStar(require("./styles.js"));
|
|
80
|
+
function DynamicFormHandler(props) {
|
|
81
|
+
var _this = this;
|
|
82
|
+
var queryKEY = props.getDetails && props.getDetails.key && props.getDetails.key(props.tableItem);
|
|
83
|
+
function fetcher() {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
+
var _a;
|
|
86
|
+
return __generator(this, function (_b) {
|
|
87
|
+
return [2 /*return*/, (_a = props === null || props === void 0 ? void 0 : props.getDetails) === null || _a === void 0 ? void 0 : _a.fetcher(props.tableItem)];
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
var _a = (0, swr_1.default)(queryKEY && queryKEY, fetcher), data = _a.data, isLoading = _a.isLoading, isValidating = _a.isValidating;
|
|
92
|
+
if ((isLoading || isValidating) && props.getDetails) {
|
|
93
|
+
return (0, jsx_runtime_1.jsx)(loader_circle_1.LoaderCircle, { size: 30, color: '#000' });
|
|
94
|
+
}
|
|
95
|
+
return ((0, jsx_runtime_1.jsxs)(S.DynamiFormHandler, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'header', children: [props.title && (0, jsx_runtime_1.jsx)("h3", { className: 'font-24-bold', children: props.title }), props.subtitle && (0, jsx_runtime_1.jsx)("span", { className: 'font-18-regular', children: props.subtitle })] }), (0, jsx_runtime_1.jsx)(component_1.FormHandler, __assign({}, props, { cleanFieldsOnSubmit: false, onSucess: function (data) { return __awaiter(_this, void 0, void 0, function () {
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
switch (_a.label) {
|
|
98
|
+
case 0: return [4 /*yield*/, props.onSucess(data, undefined, props.tableItem)];
|
|
99
|
+
case 1:
|
|
100
|
+
_a.sent();
|
|
101
|
+
queryKEY && (0, swr_1.mutate)(queryKEY);
|
|
102
|
+
return [2 /*return*/];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}); }, initialData: __assign(__assign({}, data), (props.initialData || {})), children: props.inputs.map(function (row, index) {
|
|
106
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { display: 'grid', gap: 15, gridTemplateColumns: "repeat(".concat(row.length, ", 1fr)") }, children: row.map(function (input) {
|
|
107
|
+
var Element = Inputs[input.InputComponent];
|
|
108
|
+
return (0, jsx_runtime_1.jsx)(Element, __assign({}, input), input.name);
|
|
109
|
+
}) }, index));
|
|
110
|
+
}) }))] }));
|
|
111
|
+
}
|
|
112
|
+
exports.DynamicFormHandler = DynamicFormHandler;
|
|
113
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./component.js"), exports);
|
|
18
|
+
__exportStar(require("./interfaces.js"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IconsNames } from '../../../../../ui/icons/index.js';
|
|
2
|
+
import { IFormHandler } from '../interfaces.js';
|
|
3
|
+
import { ISelectProps } from '../../select/interfaces.js';
|
|
4
|
+
import * as Inputs from '../../index.js';
|
|
5
|
+
type InputProps<T = any> = {
|
|
6
|
+
name: keyof T;
|
|
7
|
+
InputComponent: keyof typeof Inputs;
|
|
8
|
+
} & Partial<Omit<ISelectProps, 'name'>>;
|
|
9
|
+
export type DynamicFormHandlerProps<T = any> = Partial<IFormHandler> & {
|
|
10
|
+
button?: {
|
|
11
|
+
text?: string;
|
|
12
|
+
icon?: IconsNames;
|
|
13
|
+
};
|
|
14
|
+
tableItem?: any;
|
|
15
|
+
title?: string;
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
inputs?: InputProps<T>[][];
|
|
18
|
+
getDetails?: {
|
|
19
|
+
key: (params: {
|
|
20
|
+
[key in keyof T]: T[key];
|
|
21
|
+
}) => string;
|
|
22
|
+
fetcher: (params: {
|
|
23
|
+
[key in keyof T]: T[key];
|
|
24
|
+
}) => Promise<any>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react/experimental" />
|
|
2
3
|
export declare const DynamiFormHandler: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
4
|
ref?: import("react").Ref<HTMLDivElement>;
|
|
4
5
|
}, never>>;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
+
function step(op) {
|
|
50
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
52
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
53
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
+
switch (op[0]) {
|
|
55
|
+
case 0: case 1: t = op; break;
|
|
56
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
+
default:
|
|
60
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
+
if (t[2]) _.ops.pop();
|
|
65
|
+
_.trys.pop(); continue;
|
|
66
|
+
}
|
|
67
|
+
op = body.call(thisArg, _);
|
|
68
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
73
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
74
|
+
if (ar || !(i in from)) {
|
|
75
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
76
|
+
ar[i] = from[i];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
80
|
+
};
|
|
81
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
82
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
83
|
+
var react_1 = require("react");
|
|
84
|
+
var yup = __importStar(require("yup"));
|
|
85
|
+
var formik_1 = require("formik");
|
|
86
|
+
var ui_1 = require("../../../../../ui/index.js");
|
|
87
|
+
var system_1 = require("../../../../../system/index.js");
|
|
88
|
+
var custom_submit_1 = require("../custom-submit/index.js");
|
|
89
|
+
var S = __importStar(require("../styles.js"));
|
|
90
|
+
function FormElement(_a) {
|
|
91
|
+
var button = _a.button, schema = _a.schema, children = _a.children, onSucess = _a.onSucess, customSubmit = _a.customSubmit, onChangeForm = _a.onChangeForm, customAction = _a.customAction, _b = _a.cleanFieldsOnSubmit, cleanFieldsOnSubmit = _b === void 0 ? true : _b;
|
|
92
|
+
var _c = (0, react_1.useState)({ state: '', message: '' }), stateForm = _c[0], setStateForm = _c[1];
|
|
93
|
+
var _d = (0, formik_1.useFormikContext)(), values = _d.values, setErrors = _d.setErrors, setFieldError = _d.setFieldError, setFieldValue = _d.setFieldValue;
|
|
94
|
+
function onSubmit(action) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
var schemaObject, _a, _b, err_1, errors_1, validationErrors_1;
|
|
97
|
+
return __generator(this, function (_c) {
|
|
98
|
+
switch (_c.label) {
|
|
99
|
+
case 0:
|
|
100
|
+
_c.trys.push([0, 5, 6, 7]);
|
|
101
|
+
setErrors({});
|
|
102
|
+
setStateForm({ state: 'loading', message: '' });
|
|
103
|
+
schemaObject = schema && yup.object().shape(schema);
|
|
104
|
+
_a = schema;
|
|
105
|
+
if (!_a) return [3 /*break*/, 2];
|
|
106
|
+
return [4 /*yield*/, schemaObject.validate(values, {
|
|
107
|
+
abortEarly: false,
|
|
108
|
+
})];
|
|
109
|
+
case 1:
|
|
110
|
+
_a = (_c.sent());
|
|
111
|
+
_c.label = 2;
|
|
112
|
+
case 2:
|
|
113
|
+
_a;
|
|
114
|
+
_b = onSucess && !action;
|
|
115
|
+
if (!_b) return [3 /*break*/, 4];
|
|
116
|
+
return [4 /*yield*/, onSucess(values || {}, { setFieldError: setFieldError, setFieldValue: setFieldValue })];
|
|
117
|
+
case 3:
|
|
118
|
+
_b = (_c.sent());
|
|
119
|
+
_c.label = 4;
|
|
120
|
+
case 4:
|
|
121
|
+
_b;
|
|
122
|
+
!action && setStateForm({ state: 'send', message: '' });
|
|
123
|
+
action && action(values, setStateForm);
|
|
124
|
+
if (cleanFieldsOnSubmit) {
|
|
125
|
+
Object.keys(values).forEach(function (key) {
|
|
126
|
+
setFieldValue(key, undefined);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return [3 /*break*/, 7];
|
|
130
|
+
case 5:
|
|
131
|
+
err_1 = _c.sent();
|
|
132
|
+
if (err_1 instanceof yup.ValidationError) {
|
|
133
|
+
errors_1 = err_1.inner.reduce(function (reducer, error) {
|
|
134
|
+
if (reducer && Object.keys(reducer).find(function (r) { return r === error.path; })) {
|
|
135
|
+
return reducer;
|
|
136
|
+
}
|
|
137
|
+
reducer[error.path] = error.message;
|
|
138
|
+
return reducer;
|
|
139
|
+
}, {});
|
|
140
|
+
Object.keys(errors_1).forEach(function (key) {
|
|
141
|
+
setFieldError(key, errors_1[key]);
|
|
142
|
+
});
|
|
143
|
+
setStateForm({ state: 'default', message: '' });
|
|
144
|
+
return [2 /*return*/];
|
|
145
|
+
}
|
|
146
|
+
if (err_1 instanceof system_1.BadRequestError) {
|
|
147
|
+
setStateForm({ state: 'error', message: err_1.error.message });
|
|
148
|
+
return [2 /*return*/];
|
|
149
|
+
}
|
|
150
|
+
if (err_1 instanceof system_1.ConflictError) {
|
|
151
|
+
setStateForm({ state: 'error', message: err_1.error.message });
|
|
152
|
+
return [2 /*return*/];
|
|
153
|
+
}
|
|
154
|
+
if (err_1 instanceof system_1.ValidationError) {
|
|
155
|
+
setStateForm({ state: 'default', message: '' });
|
|
156
|
+
validationErrors_1 = err_1.errors;
|
|
157
|
+
Object.keys(validationErrors_1).forEach(function (key) {
|
|
158
|
+
setFieldError(key, validationErrors_1[key].errors[0]);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
return [3 /*break*/, 7];
|
|
162
|
+
case 6:
|
|
163
|
+
setStateForm(function (state) {
|
|
164
|
+
if (state.state === 'loading') {
|
|
165
|
+
return { message: '', state: 'default' };
|
|
166
|
+
}
|
|
167
|
+
return state;
|
|
168
|
+
});
|
|
169
|
+
return [7 /*endfinally*/];
|
|
170
|
+
case 7: return [2 /*return*/];
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function handleSubmit(action) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
177
|
+
return __generator(this, function (_a) {
|
|
178
|
+
switch (_a.label) {
|
|
179
|
+
case 0: return [4 /*yield*/, onSubmit(action)];
|
|
180
|
+
case 1:
|
|
181
|
+
_a.sent();
|
|
182
|
+
return [2 /*return*/];
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
var handleKeyDown = function (e) {
|
|
188
|
+
if (e.key === 'Enter' && stateForm.state !== 'loading') {
|
|
189
|
+
e.preventDefault();
|
|
190
|
+
onSubmit();
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
(0, react_1.useEffect)(function () {
|
|
194
|
+
onChangeForm && onChangeForm.callbackResult(values);
|
|
195
|
+
}, __spreadArray([values], ((onChangeForm === null || onChangeForm === void 0 ? void 0 : onChangeForm.additionalDependencies) || []), true));
|
|
196
|
+
return ((0, jsx_runtime_1.jsx)(formik_1.Form, { children: (0, jsx_runtime_1.jsxs)(S.FormHandler, { onKeyDown: handleKeyDown, children: [stateForm.state === 'error' && (0, jsx_runtime_1.jsx)("span", { className: 'error-form', children: stateForm.message }), children, (0, jsx_runtime_1.jsxs)("div", { className: 'form-button', children: [customAction && (0, jsx_runtime_1.jsx)(customAction.Component, __assign({}, (customAction.props || {}), { setFieldValue: setFieldValue })), button && ((0, jsx_runtime_1.jsx)(ui_1.Button, __assign({}, button, { type: 'button', onClick: function () { return handleSubmit(); }, loading: stateForm.state === 'loading' }))), customSubmit &&
|
|
197
|
+
customSubmit.length > 0 &&
|
|
198
|
+
customSubmit.map(function (custom, index) { return ((0, jsx_runtime_1.jsx)(custom_submit_1.CustomSubmitButton, __assign({}, custom, { stateForm: stateForm, onSubmit: handleSubmit }), index)); })] })] }) }));
|
|
199
|
+
}
|
|
200
|
+
exports.default = FormElement;
|
|
201
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./interfaces.js"), exports);
|
|
18
|
+
__exportStar(require("./component.js"), exports);
|
|
19
|
+
__exportStar(require("./form-handler/index.js"), exports);
|
|
20
|
+
__exportStar(require("./custom-submit/index.js"), exports);
|
|
21
|
+
__exportStar(require("./dynamic_form_handler/index.js"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from '../../../../ui/index.js';
|
|
3
|
+
import { ICustomSubmitProps } from './custom-submit/index.js';
|
|
4
|
+
import { FormikErrors } from 'formik';
|
|
5
|
+
export interface IFormHandler {
|
|
6
|
+
ref?: any;
|
|
7
|
+
onSucess?: (data: any, handlers?: {
|
|
8
|
+
setFieldError: (field: string, message: string) => void;
|
|
9
|
+
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | FormikErrors<unknown>>;
|
|
10
|
+
}, extraData?: any) => void;
|
|
11
|
+
schema?: any;
|
|
12
|
+
button?: ButtonProps;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
onChangeForm?: {
|
|
15
|
+
callbackResult: (dataForm: any) => void;
|
|
16
|
+
additionalDependencies?: any[];
|
|
17
|
+
};
|
|
18
|
+
customAction?: {
|
|
19
|
+
props?: {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
};
|
|
22
|
+
Component: (props: {
|
|
23
|
+
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => Promise<void | FormikErrors<unknown>>;
|
|
24
|
+
}) => React.ReactNode;
|
|
25
|
+
};
|
|
26
|
+
initialData?: {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
customSubmit?: ICustomSubmitProps[];
|
|
30
|
+
cleanFieldsOnSubmit?: boolean;
|
|
31
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react/experimental" />
|
|
2
3
|
export declare const FormHandler: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
4
|
ref?: import("react").Ref<HTMLDivElement>;
|
|
4
5
|
}, never>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./input/index.js";
|
|
2
|
+
export * from "./radio/index.js";
|
|
3
|
+
export * from "./select/index.js";
|
|
4
|
+
export * from "./handler/index.js";
|
|
5
|
+
export * from "./textarea/index.js";
|
|
6
|
+
export * from "./checkbox/index.js";
|
|
7
|
+
export * from "./input-date/index.js";
|
|
8
|
+
export * from "./input-mask/index.js";
|
|
9
|
+
export * from "./input-file/index.js";
|
|
10
|
+
export * from "./input-switch/index.js";
|
|
11
|
+
export * from "./input-control/index.js";
|
|
12
|
+
export * from "./input-password/index.js";
|
|
13
|
+
export * from "./input-cpf-cnpj/index.js";
|
|
14
|
+
export * from "./input-currency/index.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./input/index.js"), exports);
|
|
18
|
+
__exportStar(require("./radio/index.js"), exports);
|
|
19
|
+
__exportStar(require("./select/index.js"), exports);
|
|
20
|
+
__exportStar(require("./handler/index.js"), exports);
|
|
21
|
+
__exportStar(require("./textarea/index.js"), exports);
|
|
22
|
+
__exportStar(require("./checkbox/index.js"), exports);
|
|
23
|
+
__exportStar(require("./input-date/index.js"), exports);
|
|
24
|
+
__exportStar(require("./input-mask/index.js"), exports);
|
|
25
|
+
__exportStar(require("./input-file/index.js"), exports);
|
|
26
|
+
__exportStar(require("./input-switch/index.js"), exports);
|
|
27
|
+
__exportStar(require("./input-control/index.js"), exports);
|
|
28
|
+
__exportStar(require("./input-password/index.js"), exports);
|
|
29
|
+
__exportStar(require("./input-cpf-cnpj/index.js"), exports);
|
|
30
|
+
__exportStar(require("./input-currency/index.js"), exports);
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Input = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var react_1 = require("react");
|
|
17
|
+
var formik_1 = require("formik");
|
|
18
|
+
var input_control_1 = require("../input-control/index.js");
|
|
19
|
+
function Input(props) {
|
|
20
|
+
var _a = (0, formik_1.useField)({ name: props.name, type: props.type }), field = _a[0], state = _a[1], handlers = _a[2];
|
|
21
|
+
function formatDate(date) {
|
|
22
|
+
var day = date.getDate();
|
|
23
|
+
var month = date.getMonth() + 1;
|
|
24
|
+
var year = date.getFullYear();
|
|
25
|
+
var formattedDay = day < 10 ? '0' + day : day;
|
|
26
|
+
var formattedMonth = month < 10 ? '0' + month : month;
|
|
27
|
+
var formattedDate = year + '-' + formattedMonth + '-' + formattedDay;
|
|
28
|
+
return formattedDate;
|
|
29
|
+
}
|
|
30
|
+
(0, react_1.useEffect)(function () {
|
|
31
|
+
if (state.initialValue) {
|
|
32
|
+
handlers.setValue(props.type === "date" ? state.initialValue instanceof Date ? formatDate(state.initialValue) : state.initialValue.split("T")[0] : state.initialValue);
|
|
33
|
+
}
|
|
34
|
+
}, [state.initialValue]);
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(input_control_1.InputControl, __assign({}, props, { children: (0, jsx_runtime_1.jsx)("input", __assign({ id: props.name, placeholder: props.placeholder, type: props.type || "text", readOnly: props.readOnly }, field, { value: (field.value instanceof Date && props.type === "date") ? formatDate(field.value) : (field.value || ""), onChange: function (ev) {
|
|
36
|
+
field.onChange(ev);
|
|
37
|
+
props.onChangeInput && props.onChangeInput(ev.target.value);
|
|
38
|
+
} })) })));
|
|
39
|
+
}
|
|
40
|
+
exports.Input = Input;
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ErrorMessage = void 0;
|
|
27
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
var S = __importStar(require("./styles.js"));
|
|
29
|
+
function ErrorMessage(_a) {
|
|
30
|
+
var error = _a.error;
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(S.ErrorMessage, { className: 'error-message', children: (0, jsx_runtime_1.jsx)("span", { className: 'font-12-medium', children: error }) }));
|
|
32
|
+
}
|
|
33
|
+
exports.ErrorMessage = ErrorMessage;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react/experimental" />
|
|
2
3
|
export declare const ErrorMessage: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
4
|
ref?: import("react").Ref<HTMLDivElement>;
|
|
4
5
|
}, never>>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.InputControl = void 0;
|
|
27
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
var formik_1 = require("formik");
|
|
29
|
+
var ui_1 = require("../../../../ui/index.js");
|
|
30
|
+
var label_1 = require("./label/index.js");
|
|
31
|
+
var error_1 = require("./error/index.js");
|
|
32
|
+
var loader_input_1 = require("./loader-input/index.js");
|
|
33
|
+
var S = __importStar(require("./styles.js"));
|
|
34
|
+
function InputControl(_a) {
|
|
35
|
+
var icon = _a.icon, name = _a.name, label = _a.label, loading = _a.loading, children = _a.children;
|
|
36
|
+
var errors = (0, formik_1.useFormikContext)().errors;
|
|
37
|
+
var error = errors[name];
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: "input-control-".concat(name), children: (0, jsx_runtime_1.jsxs)(S.InputControl, { "$loading": loading, "$error": !!error, className: 'input_control', "$inputIconSize": (icon === null || icon === void 0 ? void 0 : icon.size) || 20, "$inputIconDirection": (icon === null || icon === void 0 ? void 0 : icon.direction) || 'left', children: [label && (0, jsx_runtime_1.jsx)(label_1.Label, { inputId: name, label: label }), (0, jsx_runtime_1.jsxs)("div", { className: 'input-content', children: [loading && (0, jsx_runtime_1.jsx)(loader_input_1.LoaderInput, {}), icon && ((0, jsx_runtime_1.jsx)("div", { className: 'input-icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: icon.name, fill: icon.color }) })), (0, jsx_runtime_1.jsx)("div", { className: 'input-wrapper', children: children })] }), error && (0, jsx_runtime_1.jsx)(error_1.ErrorMessage, { error: error })] }) }));
|
|
39
|
+
}
|
|
40
|
+
exports.InputControl = InputControl;
|
|
41
|
+
//# sourceMappingURL=index.js.map
|