@soyfri/template 1.0.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/README.md +39 -0
- package/dist/assets/ts/_utils/DomHelpers.d.ts +29 -0
- package/dist/assets/ts/_utils/DomHelpers.js +380 -0
- package/dist/assets/ts/_utils/ElementAnimateUtil.d.ts +10 -0
- package/dist/assets/ts/_utils/ElementAnimateUtil.js +90 -0
- package/dist/assets/ts/_utils/EventHandlerUtil.d.ts +24 -0
- package/dist/assets/ts/_utils/EventHandlerUtil.js +105 -0
- package/dist/assets/ts/_utils/_DOMEventHandlerUtil.d.ts +6 -0
- package/dist/assets/ts/_utils/_DOMEventHandlerUtil.js +55 -0
- package/dist/assets/ts/_utils/_DataUtil.d.ts +9 -0
- package/dist/assets/ts/_utils/_DataUtil.js +66 -0
- package/dist/assets/ts/_utils/_ElementStyleUtil.d.ts +5 -0
- package/dist/assets/ts/_utils/_ElementStyleUtil.js +23 -0
- package/dist/assets/ts/_utils/_TypesHelpers.d.ts +10 -0
- package/dist/assets/ts/_utils/_TypesHelpers.js +54 -0
- package/dist/assets/ts/_utils/index.d.ts +9 -0
- package/dist/assets/ts/_utils/index.js +28 -0
- package/dist/assets/ts/_utils/models/OffsetModel.d.ts +4 -0
- package/dist/assets/ts/_utils/models/OffsetModel.js +2 -0
- package/dist/assets/ts/_utils/models/ViewPortModel.d.ts +4 -0
- package/dist/assets/ts/_utils/models/ViewPortModel.js +2 -0
- package/dist/assets/ts/components/MenuComponent.d.ts +88 -0
- package/dist/assets/ts/components/MenuComponent.js +857 -0
- package/dist/assets/ts/components/SearchComponent.d.ts +66 -0
- package/dist/assets/ts/components/SearchComponent.js +362 -0
- package/dist/assets/ts/components/_CookieComponent.d.ts +25 -0
- package/dist/assets/ts/components/_CookieComponent.js +66 -0
- package/dist/assets/ts/components/_DrawerComponent.d.ts +57 -0
- package/dist/assets/ts/components/_DrawerComponent.js +325 -0
- package/dist/assets/ts/components/_FeedbackComponent.d.ts +32 -0
- package/dist/assets/ts/components/_FeedbackComponent.js +113 -0
- package/dist/assets/ts/components/_ImageInputComponent.d.ts +43 -0
- package/dist/assets/ts/components/_ImageInputComponent.js +176 -0
- package/dist/assets/ts/components/_PasswordMeterComponent.d.ts +54 -0
- package/dist/assets/ts/components/_PasswordMeterComponent.js +206 -0
- package/dist/assets/ts/components/_ScrollComponent.d.ts +32 -0
- package/dist/assets/ts/components/_ScrollComponent.js +262 -0
- package/dist/assets/ts/components/_ScrollTopComponent.d.ts +24 -0
- package/dist/assets/ts/components/_ScrollTopComponent.js +115 -0
- package/dist/assets/ts/components/_StepperComponent.d.ts +52 -0
- package/dist/assets/ts/components/_StepperComponent.js +256 -0
- package/dist/assets/ts/components/_StickyComponent.d.ts +35 -0
- package/dist/assets/ts/components/_StickyComponent.js +239 -0
- package/dist/assets/ts/components/_SwapperComponent.d.ts +36 -0
- package/dist/assets/ts/components/_SwapperComponent.js +173 -0
- package/dist/assets/ts/components/_ToggleComponent.d.ts +36 -0
- package/dist/assets/ts/components/_ToggleComponent.js +161 -0
- package/dist/assets/ts/components/index.d.ts +13 -0
- package/dist/assets/ts/components/index.js +30 -0
- package/dist/assets/ts/index.d.ts +2 -0
- package/dist/assets/ts/index.js +68 -0
- package/dist/assets/ts/layout/ThemeMode.d.ts +20 -0
- package/dist/assets/ts/layout/ThemeMode.js +182 -0
- package/dist/assets/ts/layout/index.d.ts +1 -0
- package/dist/assets/ts/layout/index.js +17 -0
- package/dist/helpers/AssetHelpers.d.ts +2 -0
- package/dist/helpers/AssetHelpers.js +19 -0
- package/dist/helpers/RouterHelpers.d.ts +2 -0
- package/dist/helpers/RouterHelpers.js +21 -0
- package/dist/helpers/components/KTCard.d.ts +17 -0
- package/dist/helpers/components/KTCard.js +19 -0
- package/dist/helpers/components/KTCardBody.d.ts +9 -0
- package/dist/helpers/components/KTCardBody.js +15 -0
- package/dist/helpers/components/KTIcon.d.ts +8 -0
- package/dist/helpers/components/KTIcon.js +30 -0
- package/dist/helpers/components/KTSVG.d.ts +8 -0
- package/dist/helpers/components/KTSVG.js +12 -0
- package/dist/helpers/crud-helper/consts.d.ts +4 -0
- package/dist/helpers/crud-helper/consts.js +7 -0
- package/dist/helpers/crud-helper/helpers.d.ts +14 -0
- package/dist/helpers/crud-helper/helpers.js +110 -0
- package/dist/helpers/crud-helper/models.d.ts +61 -0
- package/dist/helpers/crud-helper/models.js +21 -0
- package/dist/helpers/dataExamples.d.ts +37 -0
- package/dist/helpers/dataExamples.js +251 -0
- package/dist/helpers/icons-config/icons.d.ts +5 -0
- package/dist/helpers/icons-config/icons.js +578 -0
- package/dist/helpers/index.d.ts +11 -0
- package/dist/helpers/index.js +27 -0
- package/dist/helpers/react18MigrationHelpers.d.ts +6 -0
- package/dist/helpers/react18MigrationHelpers.js +10 -0
- package/dist/i18n/Metronici18n.d.ts +6 -0
- package/dist/i18n/Metronici18n.js +62 -0
- package/dist/i18n/i18nProvider.d.ts +11 -0
- package/dist/i18n/i18nProvider.js +31 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +24 -0
- package/dist/layout/MasterInit.d.ts +2 -0
- package/dist/layout/MasterInit.js +39 -0
- package/dist/layout/MasterLayout.d.ts +3 -0
- package/dist/layout/MasterLayout.js +40 -0
- package/dist/layout/components/content/Content.d.ts +4 -0
- package/dist/layout/components/content/Content.js +27 -0
- package/dist/layout/components/content/index.d.ts +1 -0
- package/dist/layout/components/content/index.js +17 -0
- package/dist/layout/components/footer/Footer.d.ts +3 -0
- package/dist/layout/components/footer/Footer.js +38 -0
- package/dist/layout/components/footer/FooterWrapper.d.ts +3 -0
- package/dist/layout/components/footer/FooterWrapper.js +20 -0
- package/dist/layout/components/footer/index.d.ts +1 -0
- package/dist/layout/components/footer/index.js +17 -0
- package/dist/layout/components/header/Header.d.ts +3 -0
- package/dist/layout/components/header/Header.js +86 -0
- package/dist/layout/components/header/HeaderWrapper.d.ts +2 -0
- package/dist/layout/components/header/HeaderWrapper.js +44 -0
- package/dist/layout/components/header/Navbar.d.ts +3 -0
- package/dist/layout/components/header/Navbar.js +43 -0
- package/dist/layout/components/header/header-menus/MegaMenu.d.ts +3 -0
- package/dist/layout/components/header/header-menus/MegaMenu.js +74 -0
- package/dist/layout/components/header/header-menus/MenuInner.d.ts +2 -0
- package/dist/layout/components/header/header-menus/MenuInner.js +50 -0
- package/dist/layout/components/header/header-menus/MenuInnerWithSub.d.ts +15 -0
- package/dist/layout/components/header/header-menus/MenuInnerWithSub.js +58 -0
- package/dist/layout/components/header/header-menus/MenuItem.d.ts +11 -0
- package/dist/layout/components/header/header-menus/MenuItem.js +28 -0
- package/dist/layout/components/header/header-menus/index.d.ts +1 -0
- package/dist/layout/components/header/header-menus/index.js +17 -0
- package/dist/layout/components/header/index.d.ts +1 -0
- package/dist/layout/components/header/index.js +17 -0
- package/dist/layout/components/scroll-top/ScrollTop.d.ts +2 -0
- package/dist/layout/components/scroll-top/ScrollTop.js +51 -0
- package/dist/layout/components/scroll-top/index.d.ts +1 -0
- package/dist/layout/components/scroll-top/index.js +17 -0
- package/dist/layout/components/sidebar/Sidebar.d.ts +3 -0
- package/dist/layout/components/sidebar/Sidebar.js +133 -0
- package/dist/layout/components/sidebar/SidebarFooter.d.ts +3 -0
- package/dist/layout/components/sidebar/SidebarFooter.js +18 -0
- package/dist/layout/components/sidebar/SidebarLogo.d.ts +7 -0
- package/dist/layout/components/sidebar/SidebarLogo.js +54 -0
- package/dist/layout/components/sidebar/index.d.ts +1 -0
- package/dist/layout/components/sidebar/index.js +17 -0
- package/dist/layout/components/sidebar/sidebar-menu/SidebarMenu.d.ts +3 -0
- package/dist/layout/components/sidebar/sidebar-menu/SidebarMenu.js +15 -0
- package/dist/layout/components/sidebar/sidebar-menu/SidebarMenuItem.d.ts +11 -0
- package/dist/layout/components/sidebar/sidebar-menu/SidebarMenuItem.js +31 -0
- package/dist/layout/components/sidebar/sidebar-menu/SidebarMenuItemWithSub.d.ts +11 -0
- package/dist/layout/components/sidebar/sidebar-menu/SidebarMenuItemWithSub.js +30 -0
- package/dist/layout/components/sidebar/sidebar-menu/SidebarMenuMain.d.ts +3 -0
- package/dist/layout/components/sidebar/sidebar-menu/SidebarMenuMain.js +63 -0
- package/dist/layout/components/toolbar/Toolbar.d.ts +3 -0
- package/dist/layout/components/toolbar/Toolbar.js +88 -0
- package/dist/layout/components/toolbar/ToolbarWrapper.d.ts +3 -0
- package/dist/layout/components/toolbar/ToolbarWrapper.js +34 -0
- package/dist/layout/components/toolbar/index.d.ts +1 -0
- package/dist/layout/components/toolbar/index.js +17 -0
- package/dist/layout/components/toolbar/page-title/PageTitle.d.ts +3 -0
- package/dist/layout/components/toolbar/page-title/PageTitle.js +44 -0
- package/dist/layout/components/toolbar/page-title/PageTitleWrapper.d.ts +3 -0
- package/dist/layout/components/toolbar/page-title/PageTitleWrapper.js +18 -0
- package/dist/layout/components/toolbar/page-title/index.d.ts +1 -0
- package/dist/layout/components/toolbar/page-title/index.js +17 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarAccounting.d.ts +3 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarAccounting.js +68 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarClassic.d.ts +3 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarClassic.js +33 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarExtended.d.ts +3 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarExtended.js +73 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarReports.d.ts +3 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarReports.js +59 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarSaas.d.ts +3 -0
- package/dist/layout/components/toolbar/toolbars/ToolbarSaas.js +59 -0
- package/dist/layout/components/toolbar/toolbars/index.d.ts +5 -0
- package/dist/layout/components/toolbar/toolbars/index.js +21 -0
- package/dist/layout/core/MetronicSplashScreen.d.ts +7 -0
- package/dist/layout/core/MetronicSplashScreen.js +78 -0
- package/dist/layout/core/PageData.d.ts +25 -0
- package/dist/layout/core/PageData.js +96 -0
- package/dist/layout/core/_LayoutConfig.d.ts +2 -0
- package/dist/layout/core/_LayoutConfig.js +140 -0
- package/dist/layout/core/_LayoutProvider.d.ts +17 -0
- package/dist/layout/core/_LayoutProvider.js +114 -0
- package/dist/layout/core/_LayoutSetup.d.ts +33 -0
- package/dist/layout/core/_LayoutSetup.js +218 -0
- package/dist/layout/core/_Models.d.ts +247 -0
- package/dist/layout/core/_Models.js +2 -0
- package/dist/layout/core/index.d.ts +6 -0
- package/dist/layout/core/index.js +22 -0
- package/dist/layout/index.d.ts +12 -0
- package/dist/layout/index.js +33 -0
- package/dist/partials/chat/ChatInner.d.ts +6 -0
- package/dist/partials/chat/ChatInner.js +114 -0
- package/dist/partials/content/activity/Item1.d.ts +3 -0
- package/dist/partials/content/activity/Item1.js +50 -0
- package/dist/partials/content/activity/Item2.d.ts +3 -0
- package/dist/partials/content/activity/Item2.js +23 -0
- package/dist/partials/content/activity/Item3.d.ts +3 -0
- package/dist/partials/content/activity/Item3.js +40 -0
- package/dist/partials/content/activity/Item4.d.ts +3 -0
- package/dist/partials/content/activity/Item4.js +31 -0
- package/dist/partials/content/activity/Item5.d.ts +3 -0
- package/dist/partials/content/activity/Item5.js +40 -0
- package/dist/partials/content/activity/Item6.d.ts +3 -0
- package/dist/partials/content/activity/Item6.js +27 -0
- package/dist/partials/content/activity/Item7.d.ts +3 -0
- package/dist/partials/content/activity/Item7.js +31 -0
- package/dist/partials/content/activity/Item8.d.ts +3 -0
- package/dist/partials/content/activity/Item8.js +26 -0
- package/dist/partials/content/activity/index.d.ts +8 -0
- package/dist/partials/content/activity/index.js +24 -0
- package/dist/partials/content/cards/Card1.d.ts +12 -0
- package/dist/partials/content/cards/Card1.js +28 -0
- package/dist/partials/content/cards/Card2.d.ts +14 -0
- package/dist/partials/content/cards/Card2.js +32 -0
- package/dist/partials/content/cards/Card3.d.ts +12 -0
- package/dist/partials/content/cards/Card3.js +30 -0
- package/dist/partials/content/cards/Card4.d.ts +8 -0
- package/dist/partials/content/cards/Card4.js +19 -0
- package/dist/partials/content/cards/Card5.d.ts +13 -0
- package/dist/partials/content/cards/Card5.js +38 -0
- package/dist/partials/content/code-highlight/CodeBlock.d.ts +7 -0
- package/dist/partials/content/code-highlight/CodeBlock.js +75 -0
- package/dist/partials/content/dropdown/Dropdown1.d.ts +2 -0
- package/dist/partials/content/dropdown/Dropdown1.js +41 -0
- package/dist/partials/content/dropdown/Dropdown2.d.ts +3 -0
- package/dist/partials/content/dropdown/Dropdown2.js +35 -0
- package/dist/partials/content/dropdown/Dropdown3.d.ts +3 -0
- package/dist/partials/content/dropdown/Dropdown3.js +40 -0
- package/dist/partials/content/editor/EditorToolbar.d.ts +58 -0
- package/dist/partials/content/editor/EditorToolbar.js +54 -0
- package/dist/partials/content/portal/Portal.d.ts +12 -0
- package/dist/partials/content/portal/Portal.js +25 -0
- package/dist/partials/index.d.ts +22 -0
- package/dist/partials/index.js +42 -0
- package/dist/partials/layout/InboxCompose.d.ts +7 -0
- package/dist/partials/layout/InboxCompose.js +98 -0
- package/dist/partials/layout/RightToolbar.d.ts +3 -0
- package/dist/partials/layout/RightToolbar.js +18 -0
- package/dist/partials/layout/SearchModal.d.ts +7 -0
- package/dist/partials/layout/SearchModal.js +62 -0
- package/dist/partials/layout/activity-drawer/ActivityDrawer.d.ts +3 -0
- package/dist/partials/layout/activity-drawer/ActivityDrawer.js +40 -0
- package/dist/partials/layout/create-app/CreateApp.d.ts +3 -0
- package/dist/partials/layout/create-app/CreateApp.js +11 -0
- package/dist/partials/layout/drawer-messenger/DrawerMessenger.d.ts +3 -0
- package/dist/partials/layout/drawer-messenger/DrawerMessenger.js +26 -0
- package/dist/partials/layout/header-menus/HeaderNotificationsMenu.d.ts +3 -0
- package/dist/partials/layout/header-menus/HeaderNotificationsMenu.js +58 -0
- package/dist/partials/layout/header-menus/HeaderUserMenu.d.ts +3 -0
- package/dist/partials/layout/header-menus/HeaderUserMenu.js +58 -0
- package/dist/partials/layout/header-menus/Languages.d.ts +3 -0
- package/dist/partials/layout/header-menus/Languages.js +62 -0
- package/dist/partials/layout/help-drawer/HelpDrawer.d.ts +3 -0
- package/dist/partials/layout/help-drawer/HelpDrawer.js +62 -0
- package/dist/partials/layout/help-drawer/ToggleHelpDrawer.d.ts +3 -0
- package/dist/partials/layout/help-drawer/ToggleHelpDrawer.js +9 -0
- package/dist/partials/layout/purchase/PurchaseButton.d.ts +3 -0
- package/dist/partials/layout/purchase/PurchaseButton.js +12 -0
- package/dist/partials/layout/quick-links/QuicLinks.d.ts +3 -0
- package/dist/partials/layout/quick-links/QuicLinks.js +39 -0
- package/dist/partials/layout/search/Search.d.ts +3 -0
- package/dist/partials/layout/search/Search.js +334 -0
- package/dist/partials/layout/search/SearchInner.d.ts +3 -0
- package/dist/partials/layout/search/SearchInner.js +37 -0
- package/dist/partials/layout/theme-mode/ThemeModeProvider.d.ts +17 -0
- package/dist/partials/layout/theme-mode/ThemeModeProvider.js +102 -0
- package/dist/partials/layout/theme-mode/ThemeModeSwitcher.d.ts +9 -0
- package/dist/partials/layout/theme-mode/ThemeModeSwitcher.js +42 -0
- package/dist/partials/modals/create-app-stepper/CreateAppModal.d.ts +7 -0
- package/dist/partials/modals/create-app-stepper/CreateAppModal.js +176 -0
- package/dist/partials/modals/create-app-stepper/IAppModels.d.ts +22 -0
- package/dist/partials/modals/create-app-stepper/IAppModels.js +9 -0
- package/dist/partials/modals/create-app-stepper/steps/Step1.d.ts +4 -0
- package/dist/partials/modals/create-app-stepper/steps/Step1.js +84 -0
- package/dist/partials/modals/create-app-stepper/steps/Step2.d.ts +4 -0
- package/dist/partials/modals/create-app-stepper/steps/Step2.js +57 -0
- package/dist/partials/modals/create-app-stepper/steps/Step3.d.ts +4 -0
- package/dist/partials/modals/create-app-stepper/steps/Step3.js +81 -0
- package/dist/partials/modals/create-app-stepper/steps/Step4.d.ts +4 -0
- package/dist/partials/modals/create-app-stepper/steps/Step4.js +47 -0
- package/dist/partials/modals/create-app-stepper/steps/Step5.d.ts +3 -0
- package/dist/partials/modals/create-app-stepper/steps/Step5.js +18 -0
- package/dist/partials/modals/invite-users/InviteUsers.d.ts +3 -0
- package/dist/partials/modals/invite-users/InviteUsers.js +161 -0
- package/dist/partials/modals/select-location/SelectLocationModal.d.ts +11 -0
- package/dist/partials/modals/select-location/SelectLocationModal.js +58 -0
- package/dist/partials/modals/upgrade-plan/UpgradePlan.d.ts +3 -0
- package/dist/partials/modals/upgrade-plan/UpgradePlan.js +230 -0
- package/dist/partials/widgets/_new/cards/CardsWidget17.d.ts +9 -0
- package/dist/partials/widgets/_new/cards/CardsWidget17.js +122 -0
- package/dist/partials/widgets/_new/cards/CardsWidget20.d.ts +9 -0
- package/dist/partials/widgets/_new/cards/CardsWidget20.js +26 -0
- package/dist/partials/widgets/_new/cards/CardsWidget7.d.ts +11 -0
- package/dist/partials/widgets/_new/cards/CardsWidget7.js +35 -0
- package/dist/partials/widgets/_new/engage/EngageWidget10.d.ts +6 -0
- package/dist/partials/widgets/_new/engage/EngageWidget10.js +31 -0
- package/dist/partials/widgets/_new/lists/ListsWidget26.d.ts +6 -0
- package/dist/partials/widgets/_new/lists/ListsWidget26.js +47 -0
- package/dist/partials/widgets/charts/ChartsWidget1.d.ts +6 -0
- package/dist/partials/widgets/charts/ChartsWidget1.js +182 -0
- package/dist/partials/widgets/charts/ChartsWidget2.d.ts +6 -0
- package/dist/partials/widgets/charts/ChartsWidget2.js +180 -0
- package/dist/partials/widgets/charts/ChartsWidget3.d.ts +6 -0
- package/dist/partials/widgets/charts/ChartsWidget3.js +191 -0
- package/dist/partials/widgets/charts/ChartsWidget4.d.ts +6 -0
- package/dist/partials/widgets/charts/ChartsWidget4.js +196 -0
- package/dist/partials/widgets/charts/ChartsWidget5.d.ts +6 -0
- package/dist/partials/widgets/charts/ChartsWidget5.js +183 -0
- package/dist/partials/widgets/charts/ChartsWidget6.d.ts +6 -0
- package/dist/partials/widgets/charts/ChartsWidget6.js +195 -0
- package/dist/partials/widgets/charts/ChartsWidget7.d.ts +6 -0
- package/dist/partials/widgets/charts/ChartsWidget7.js +215 -0
- package/dist/partials/widgets/charts/ChartsWidget8.d.ts +6 -0
- package/dist/partials/widgets/charts/ChartsWidget8.js +218 -0
- package/dist/partials/widgets/engage/EngageWidget1.d.ts +11 -0
- package/dist/partials/widgets/engage/EngageWidget1.js +25 -0
- package/dist/partials/widgets/engage/EngageWidget2.d.ts +9 -0
- package/dist/partials/widgets/engage/EngageWidget2.js +22 -0
- package/dist/partials/widgets/engage/EngageWidget3.d.ts +9 -0
- package/dist/partials/widgets/engage/EngageWidget3.js +40 -0
- package/dist/partials/widgets/feeds/FeedsWidget2.d.ts +6 -0
- package/dist/partials/widgets/feeds/FeedsWidget2.js +43 -0
- package/dist/partials/widgets/feeds/FeedsWidget3.d.ts +6 -0
- package/dist/partials/widgets/feeds/FeedsWidget3.js +62 -0
- package/dist/partials/widgets/feeds/FeedsWidget4.d.ts +6 -0
- package/dist/partials/widgets/feeds/FeedsWidget4.js +43 -0
- package/dist/partials/widgets/feeds/FeedsWidget5.d.ts +6 -0
- package/dist/partials/widgets/feeds/FeedsWidget5.js +46 -0
- package/dist/partials/widgets/feeds/FeedsWidget6.d.ts +6 -0
- package/dist/partials/widgets/feeds/FeedsWidget6.js +45 -0
- package/dist/partials/widgets/index.d.ts +71 -0
- package/dist/partials/widgets/index.js +97 -0
- package/dist/partials/widgets/lists/ListsWidget1.d.ts +6 -0
- package/dist/partials/widgets/lists/ListsWidget1.js +58 -0
- package/dist/partials/widgets/lists/ListsWidget2.d.ts +6 -0
- package/dist/partials/widgets/lists/ListsWidget2.js +51 -0
- package/dist/partials/widgets/lists/ListsWidget3.d.ts +6 -0
- package/dist/partials/widgets/lists/ListsWidget3.js +69 -0
- package/dist/partials/widgets/lists/ListsWidget4.d.ts +7 -0
- package/dist/partials/widgets/lists/ListsWidget4.js +77 -0
- package/dist/partials/widgets/lists/ListsWidget5.d.ts +6 -0
- package/dist/partials/widgets/lists/ListsWidget5.js +74 -0
- package/dist/partials/widgets/lists/ListsWidget6.d.ts +6 -0
- package/dist/partials/widgets/lists/ListsWidget6.js +48 -0
- package/dist/partials/widgets/lists/ListsWidget7.d.ts +6 -0
- package/dist/partials/widgets/lists/ListsWidget7.js +54 -0
- package/dist/partials/widgets/lists/ListsWidget8.d.ts +6 -0
- package/dist/partials/widgets/lists/ListsWidget8.js +74 -0
- package/dist/partials/widgets/lists/ListsWidget9.d.ts +6 -0
- package/dist/partials/widgets/lists/ListsWidget9.js +89 -0
- package/dist/partials/widgets/mixed/MixedWidget1.d.ts +7 -0
- package/dist/partials/widgets/mixed/MixedWidget1.js +70 -0
- package/dist/partials/widgets/mixed/MixedWidget10.d.ts +8 -0
- package/dist/partials/widgets/mixed/MixedWidget10.js +188 -0
- package/dist/partials/widgets/mixed/MixedWidget11.d.ts +8 -0
- package/dist/partials/widgets/mixed/MixedWidget11.js +180 -0
- package/dist/partials/widgets/mixed/MixedWidget13.d.ts +8 -0
- package/dist/partials/widgets/mixed/MixedWidget13.js +204 -0
- package/dist/partials/widgets/mixed/MixedWidget14.d.ts +8 -0
- package/dist/partials/widgets/mixed/MixedWidget14.js +166 -0
- package/dist/partials/widgets/mixed/MixedWidget15.d.ts +7 -0
- package/dist/partials/widgets/mixed/MixedWidget15.js +49 -0
- package/dist/partials/widgets/mixed/MixedWidget2.d.ts +9 -0
- package/dist/partials/widgets/mixed/MixedWidget2.js +213 -0
- package/dist/partials/widgets/mixed/MixedWidget3.d.ts +8 -0
- package/dist/partials/widgets/mixed/MixedWidget3.js +207 -0
- package/dist/partials/widgets/mixed/MixedWidget4.d.ts +11 -0
- package/dist/partials/widgets/mixed/MixedWidget4.js +43 -0
- package/dist/partials/widgets/mixed/MixedWidget5.d.ts +10 -0
- package/dist/partials/widgets/mixed/MixedWidget5.js +29 -0
- package/dist/partials/widgets/mixed/MixedWidget6.d.ts +8 -0
- package/dist/partials/widgets/mixed/MixedWidget6.js +211 -0
- package/dist/partials/widgets/mixed/MixedWidget7.d.ts +8 -0
- package/dist/partials/widgets/mixed/MixedWidget7.js +125 -0
- package/dist/partials/widgets/mixed/MixedWidget8.d.ts +8 -0
- package/dist/partials/widgets/mixed/MixedWidget8.js +239 -0
- package/dist/partials/widgets/mixed/MixedWidget9.d.ts +8 -0
- package/dist/partials/widgets/mixed/MixedWidget9.js +227 -0
- package/dist/partials/widgets/statistics/StatisticsWidget1.d.ts +10 -0
- package/dist/partials/widgets/statistics/StatisticsWidget1.js +21 -0
- package/dist/partials/widgets/statistics/StatisticsWidget2.d.ts +9 -0
- package/dist/partials/widgets/statistics/StatisticsWidget2.js +18 -0
- package/dist/partials/widgets/statistics/StatisticsWidget3.d.ts +10 -0
- package/dist/partials/widgets/statistics/StatisticsWidget3.js +189 -0
- package/dist/partials/widgets/statistics/StatisticsWidget4.d.ts +10 -0
- package/dist/partials/widgets/statistics/StatisticsWidget4.js +191 -0
- package/dist/partials/widgets/statistics/StatisticsWidget5.d.ts +13 -0
- package/dist/partials/widgets/statistics/StatisticsWidget5.js +17 -0
- package/dist/partials/widgets/statistics/StatisticsWidget6.d.ts +10 -0
- package/dist/partials/widgets/statistics/StatisticsWidget6.js +19 -0
- package/dist/partials/widgets/tables/TablesWidget1.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget1.js +117 -0
- package/dist/partials/widgets/tables/TablesWidget10.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget10.js +174 -0
- package/dist/partials/widgets/tables/TablesWidget11.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget11.js +163 -0
- package/dist/partials/widgets/tables/TablesWidget12.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget12.js +227 -0
- package/dist/partials/widgets/tables/TablesWidget13.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget13.js +186 -0
- package/dist/partials/widgets/tables/TablesWidget2.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget2.js +113 -0
- package/dist/partials/widgets/tables/TablesWidget3.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget3.js +83 -0
- package/dist/partials/widgets/tables/TablesWidget4.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget4.js +357 -0
- package/dist/partials/widgets/tables/TablesWidget5.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget5.js +228 -0
- package/dist/partials/widgets/tables/TablesWidget6.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget6.js +249 -0
- package/dist/partials/widgets/tables/TablesWidget7.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget7.js +249 -0
- package/dist/partials/widgets/tables/TablesWidget8.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget8.js +222 -0
- package/dist/partials/widgets/tables/TablesWidget9.d.ts +6 -0
- package/dist/partials/widgets/tables/TablesWidget9.js +174 -0
- package/dist/partials/widgets/tiles/TilesWidget1.d.ts +8 -0
- package/dist/partials/widgets/tiles/TilesWidget1.js +18 -0
- package/dist/partials/widgets/tiles/TilesWidget2.d.ts +9 -0
- package/dist/partials/widgets/tiles/TilesWidget2.js +28 -0
- package/dist/partials/widgets/tiles/TilesWidget3.d.ts +9 -0
- package/dist/partials/widgets/tiles/TilesWidget3.js +21 -0
- package/dist/partials/widgets/tiles/TilesWidget4.d.ts +6 -0
- package/dist/partials/widgets/tiles/TilesWidget4.js +18 -0
- package/dist/partials/widgets/tiles/TilesWidget5.d.ts +12 -0
- package/dist/partials/widgets/tiles/TilesWidget5.js +19 -0
- package/package.json +73 -0
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Metronic Template NPM Package
|
|
2
|
+
|
|
3
|
+
This NPM package provides essential utilities for integrating the Metronic theme into React projects. It includes helper functions, utility variables, and classes that facilitate the development of consistent and responsive user interfaces.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Theme Layout Helpers**: Functions to streamline the implementation of Metronic's layout components.
|
|
8
|
+
- **Utility Variables**: Predefined variables for consistent theming and styling across your application.
|
|
9
|
+
- **CSS Utility Classes**: A collection of classes to apply common styles effortlessly.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
To install the package, run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install metronic-template
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Import the necessary utilities into your React project:
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
import { layoutHelper } from 'metronic-template';
|
|
25
|
+
// Use layoutHelper in your component
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Dependencies
|
|
29
|
+
|
|
30
|
+
This package serves as a core dependency for multiple React projects, ensuring a unified integration of the Metronic theme.
|
|
31
|
+
|
|
32
|
+
## Repository
|
|
33
|
+
|
|
34
|
+
For more information, documentation, and contributions, visit the GitHub repository: [Metronic Template](https://github.com/soyfrii/Metronic-template)
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
This project is licensed under the MIT License.
|
|
39
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { OffsetModel } from './models/OffsetModel';
|
|
2
|
+
import { ViewPortModel } from './models/ViewPortModel';
|
|
3
|
+
declare function getCSS(el: HTMLElement, styleProp: string): string;
|
|
4
|
+
declare function getCSSVariableValue(variableName: string): string;
|
|
5
|
+
declare function getElementActualCss(el: HTMLElement, prop: any, cache: boolean): number | undefined;
|
|
6
|
+
declare function getElementActualHeight(el: HTMLElement): number | undefined;
|
|
7
|
+
declare function getElementActualWidth(el: HTMLElement, cache?: boolean): number | undefined;
|
|
8
|
+
declare function getElementIndex(element: HTMLElement): number;
|
|
9
|
+
declare function getElementMatches(element: HTMLElement, selector: string): boolean;
|
|
10
|
+
declare function getElementOffset(el: HTMLElement): OffsetModel;
|
|
11
|
+
declare function getElementParents(element: Element, selector: string): Element[];
|
|
12
|
+
declare function getHighestZindex(el: HTMLElement): number | null;
|
|
13
|
+
declare function getScrollTop(): number;
|
|
14
|
+
declare function getViewPort(): ViewPortModel;
|
|
15
|
+
declare function insertAfterElement(el: HTMLElement, referenceNode: HTMLElement): HTMLElement | undefined;
|
|
16
|
+
declare function isElementHasClasses(element: HTMLElement, classesStr: string): boolean;
|
|
17
|
+
declare function isVisibleElement(element: HTMLElement): boolean;
|
|
18
|
+
declare function throttle(timer: number | undefined, func: Function, delay?: number): void;
|
|
19
|
+
declare function getElementChildren(element: HTMLElement, selector: string): Array<HTMLElement> | null;
|
|
20
|
+
declare function getElementChild(element: HTMLElement, selector: string): HTMLElement | null;
|
|
21
|
+
declare function isMobileDevice(): boolean;
|
|
22
|
+
declare function slide(el: HTMLElement, dir: string, speed: number, callback: any): void;
|
|
23
|
+
declare function slideUp(el: HTMLElement, speed: number, callback: any): void;
|
|
24
|
+
declare function slideDown(el: HTMLElement, speed: number, callback: any): void;
|
|
25
|
+
declare function getBreakpoint(breakpoint: string): string | number;
|
|
26
|
+
declare function getAttributeValueByBreakpoint(incomingAttr: string): string | JSON;
|
|
27
|
+
declare function colorLighten(color: string, amount: number): string;
|
|
28
|
+
declare function colorDarken(color: string, amount: number): string;
|
|
29
|
+
export { getBreakpoint, getCSS, getCSSVariableValue, getElementActualCss, getElementActualHeight, getElementActualWidth, getElementIndex, getElementMatches, getElementOffset, getElementParents, getHighestZindex, getScrollTop, getViewPort, insertAfterElement, isElementHasClasses, isVisibleElement, throttle, getElementChildren, getElementChild, isMobileDevice, slide, slideUp, slideDown, getAttributeValueByBreakpoint, colorLighten, colorDarken, };
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.colorDarken = exports.colorLighten = exports.getAttributeValueByBreakpoint = exports.slideDown = exports.slideUp = exports.slide = exports.isMobileDevice = exports.getElementChild = exports.getElementChildren = exports.throttle = exports.isVisibleElement = exports.isElementHasClasses = exports.insertAfterElement = exports.getViewPort = exports.getScrollTop = exports.getHighestZindex = exports.getElementParents = exports.getElementOffset = exports.getElementMatches = exports.getElementIndex = exports.getElementActualWidth = exports.getElementActualHeight = exports.getElementActualCss = exports.getCSSVariableValue = exports.getCSS = exports.getBreakpoint = void 0;
|
|
4
|
+
var _ElementStyleUtil_1 = require("./_ElementStyleUtil");
|
|
5
|
+
var _DataUtil_1 = require("./_DataUtil");
|
|
6
|
+
var ElementAnimateUtil_1 = require("./ElementAnimateUtil");
|
|
7
|
+
var _TypesHelpers_1 = require("./_TypesHelpers");
|
|
8
|
+
function getCSS(el, styleProp) {
|
|
9
|
+
var defaultView = (el.ownerDocument || document).defaultView;
|
|
10
|
+
if (!defaultView) {
|
|
11
|
+
return '';
|
|
12
|
+
}
|
|
13
|
+
// sanitize property name to css notation
|
|
14
|
+
// (hyphen separated words eg. font-Size)
|
|
15
|
+
styleProp = styleProp.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
16
|
+
return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);
|
|
17
|
+
}
|
|
18
|
+
exports.getCSS = getCSS;
|
|
19
|
+
function getCSSVariableValue(variableName) {
|
|
20
|
+
var hex = getComputedStyle(document.documentElement).getPropertyValue(variableName);
|
|
21
|
+
if (hex && hex.length > 0) {
|
|
22
|
+
hex = hex.trim();
|
|
23
|
+
}
|
|
24
|
+
return hex;
|
|
25
|
+
}
|
|
26
|
+
exports.getCSSVariableValue = getCSSVariableValue;
|
|
27
|
+
function getElementActualCss(el, prop, cache) {
|
|
28
|
+
var css = '';
|
|
29
|
+
if (!el.getAttribute('kt-hidden-' + prop) || cache === false) {
|
|
30
|
+
var value
|
|
31
|
+
// the element is hidden so:
|
|
32
|
+
// making the el block so we can meassure its height but still be hidden
|
|
33
|
+
= void 0;
|
|
34
|
+
// the element is hidden so:
|
|
35
|
+
// making the el block so we can meassure its height but still be hidden
|
|
36
|
+
css = el.style.cssText;
|
|
37
|
+
el.style.cssText = 'position: absolute; visibility: hidden; display: block;';
|
|
38
|
+
if (prop === 'width') {
|
|
39
|
+
value = el.offsetWidth;
|
|
40
|
+
}
|
|
41
|
+
else if (prop === 'height') {
|
|
42
|
+
value = el.offsetHeight;
|
|
43
|
+
}
|
|
44
|
+
el.style.cssText = css;
|
|
45
|
+
// store it in cache
|
|
46
|
+
if (value !== undefined) {
|
|
47
|
+
el.setAttribute('kt-hidden-' + prop, value.toString());
|
|
48
|
+
return parseFloat(value.toString());
|
|
49
|
+
}
|
|
50
|
+
return 0;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
// store it in cache
|
|
54
|
+
var attributeValue = el.getAttribute('kt-hidden-' + prop);
|
|
55
|
+
if (attributeValue || attributeValue === '0') {
|
|
56
|
+
return parseFloat(attributeValue);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.getElementActualCss = getElementActualCss;
|
|
61
|
+
function getElementActualHeight(el) {
|
|
62
|
+
return getElementActualCss(el, 'height', false);
|
|
63
|
+
}
|
|
64
|
+
exports.getElementActualHeight = getElementActualHeight;
|
|
65
|
+
function getElementActualWidth(el, cache) {
|
|
66
|
+
return getElementActualCss(el, 'width', false);
|
|
67
|
+
}
|
|
68
|
+
exports.getElementActualWidth = getElementActualWidth;
|
|
69
|
+
function getElementIndex(element) {
|
|
70
|
+
if (element.parentNode) {
|
|
71
|
+
var c = element.parentNode.children;
|
|
72
|
+
for (var i = 0; i < c.length; i++) {
|
|
73
|
+
if (c[i] === element)
|
|
74
|
+
return i;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return -1;
|
|
78
|
+
}
|
|
79
|
+
exports.getElementIndex = getElementIndex;
|
|
80
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
|
|
81
|
+
function getElementMatches(element, selector) {
|
|
82
|
+
var p = Element.prototype;
|
|
83
|
+
var f = p.matches || p.webkitMatchesSelector;
|
|
84
|
+
if (element && element.tagName) {
|
|
85
|
+
return f.call(element, selector);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.getElementMatches = getElementMatches;
|
|
92
|
+
function getElementOffset(el) {
|
|
93
|
+
// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
|
|
94
|
+
// Support: IE <=11 only
|
|
95
|
+
// Running getBoundingClientRect on a
|
|
96
|
+
// disconnected node in IE throws an error
|
|
97
|
+
if (!el.getClientRects().length) {
|
|
98
|
+
return { top: 0, left: 0 };
|
|
99
|
+
}
|
|
100
|
+
// Get document-relative position by adding viewport scroll to viewport-relative gBCR
|
|
101
|
+
var rect = el.getBoundingClientRect();
|
|
102
|
+
var win = el.ownerDocument.defaultView;
|
|
103
|
+
if (win) {
|
|
104
|
+
return {
|
|
105
|
+
top: rect.top + win.pageYOffset,
|
|
106
|
+
left: rect.left + win.pageXOffset,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return rect;
|
|
110
|
+
}
|
|
111
|
+
exports.getElementOffset = getElementOffset;
|
|
112
|
+
function getElementParents(element, selector) {
|
|
113
|
+
// Element.matches() polyfill
|
|
114
|
+
if (!Element.prototype.matches) {
|
|
115
|
+
Element.prototype.matches = function (s) {
|
|
116
|
+
var matches = (document || this.ownerDocument).querySelectorAll(s);
|
|
117
|
+
var i = matches.length;
|
|
118
|
+
while (--i >= 0 && matches.item(i) !== this) { }
|
|
119
|
+
return i > -1;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
// Set up a parent array
|
|
123
|
+
var parents = [];
|
|
124
|
+
var el = element;
|
|
125
|
+
// Push each parent element to the array
|
|
126
|
+
for (; el && el !== document.body; el = el.parentElement) {
|
|
127
|
+
if (selector) {
|
|
128
|
+
if (el.matches(selector)) {
|
|
129
|
+
parents.push(el);
|
|
130
|
+
}
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
parents.push(el);
|
|
134
|
+
}
|
|
135
|
+
// Return our parent array
|
|
136
|
+
return parents;
|
|
137
|
+
}
|
|
138
|
+
exports.getElementParents = getElementParents;
|
|
139
|
+
function getHighestZindex(el) {
|
|
140
|
+
var bufferNode = el;
|
|
141
|
+
var buffer = el;
|
|
142
|
+
while (bufferNode && bufferNode !== document) {
|
|
143
|
+
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
|
144
|
+
// This makes behavior of this function consistent across browsers
|
|
145
|
+
// WebKit always returns auto if the element is positioned
|
|
146
|
+
var position = buffer.style.getPropertyValue('position');
|
|
147
|
+
if (position === 'absolute' || position === 'relative' || position === 'fixed') {
|
|
148
|
+
// IE returns 0 when zIndex is not specified
|
|
149
|
+
// other browsers return a string
|
|
150
|
+
// we ignore the case of nested elements with an explicit value of 0
|
|
151
|
+
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
|
152
|
+
var value = parseInt(buffer.style.getPropertyValue('z-index'));
|
|
153
|
+
if (!isNaN(value) && value !== 0) {
|
|
154
|
+
return value;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
bufferNode = bufferNode.parentNode;
|
|
158
|
+
buffer = bufferNode;
|
|
159
|
+
}
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
exports.getHighestZindex = getHighestZindex;
|
|
163
|
+
function getScrollTop() {
|
|
164
|
+
return (document.scrollingElement || document.documentElement).scrollTop;
|
|
165
|
+
}
|
|
166
|
+
exports.getScrollTop = getScrollTop;
|
|
167
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth
|
|
168
|
+
function getViewPort() {
|
|
169
|
+
return {
|
|
170
|
+
width: window.innerWidth,
|
|
171
|
+
height: window.innerHeight,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
exports.getViewPort = getViewPort;
|
|
175
|
+
function insertAfterElement(el, referenceNode) {
|
|
176
|
+
var _a;
|
|
177
|
+
return (_a = referenceNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(el, referenceNode.nextSibling);
|
|
178
|
+
}
|
|
179
|
+
exports.insertAfterElement = insertAfterElement;
|
|
180
|
+
function isElementHasClasses(element, classesStr) {
|
|
181
|
+
var classes = classesStr.split(' ');
|
|
182
|
+
for (var i = 0; i < classes.length; i++) {
|
|
183
|
+
if (!element.classList.contains(classes[i])) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
exports.isElementHasClasses = isElementHasClasses;
|
|
190
|
+
function isVisibleElement(element) {
|
|
191
|
+
return !(element.offsetWidth === 0 && element.offsetHeight === 0);
|
|
192
|
+
}
|
|
193
|
+
exports.isVisibleElement = isVisibleElement;
|
|
194
|
+
// Throttle function: Input as function which needs to be throttled and delay is the time interval in milliseconds
|
|
195
|
+
function throttle(timer, func, delay) {
|
|
196
|
+
// If setTimeout is already scheduled, no need to do anything
|
|
197
|
+
if (timer) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
// Schedule a setTimeout after delay seconds
|
|
201
|
+
timer = window.setTimeout(function () {
|
|
202
|
+
func();
|
|
203
|
+
// Once setTimeout function execution is finished, timerId = undefined so that in <br>
|
|
204
|
+
// the next scroll event function execution can be scheduled by the setTimeout
|
|
205
|
+
timer = undefined;
|
|
206
|
+
}, delay);
|
|
207
|
+
}
|
|
208
|
+
exports.throttle = throttle;
|
|
209
|
+
function getElementChildren(element, selector) {
|
|
210
|
+
if (!element || !element.childNodes) {
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
var result = [];
|
|
214
|
+
for (var i = 0; i < element.childNodes.length; i++) {
|
|
215
|
+
var child = element.childNodes[i];
|
|
216
|
+
// child.nodeType == 1 => Element, Text, Comment, ProcessingInstruction, CDATASection, EntityReference
|
|
217
|
+
if (child.nodeType === 1 && getElementMatches(child, selector)) {
|
|
218
|
+
result.push(child);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return result;
|
|
222
|
+
}
|
|
223
|
+
exports.getElementChildren = getElementChildren;
|
|
224
|
+
function getElementChild(element, selector) {
|
|
225
|
+
var children = getElementChildren(element, selector);
|
|
226
|
+
return children ? children[0] : null;
|
|
227
|
+
}
|
|
228
|
+
exports.getElementChild = getElementChild;
|
|
229
|
+
function isMobileDevice() {
|
|
230
|
+
var test = getViewPort().width < +getBreakpoint('lg') ? true : false;
|
|
231
|
+
if (test === false) {
|
|
232
|
+
// For use within normal web clients
|
|
233
|
+
test = navigator.userAgent.match(/iPad/i) != null;
|
|
234
|
+
}
|
|
235
|
+
return test;
|
|
236
|
+
}
|
|
237
|
+
exports.isMobileDevice = isMobileDevice;
|
|
238
|
+
function slide(el, dir, speed, callback) {
|
|
239
|
+
if (!el ||
|
|
240
|
+
(dir === 'up' && isVisibleElement(el) === false) ||
|
|
241
|
+
(dir === 'down' && isVisibleElement(el) === true)) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
speed = speed ? speed : 600;
|
|
245
|
+
var calcHeight = getElementActualHeight(el);
|
|
246
|
+
var calcPaddingTop = 0;
|
|
247
|
+
var calcPaddingBottom = 0;
|
|
248
|
+
if (_ElementStyleUtil_1.ElementStyleUtil.get(el, 'padding-top') && _DataUtil_1.DataUtil.get(el, 'slide-padding-top') !== true) {
|
|
249
|
+
_DataUtil_1.DataUtil.set(el, 'slide-padding-top', _ElementStyleUtil_1.ElementStyleUtil.get(el, 'padding-top'));
|
|
250
|
+
}
|
|
251
|
+
if (_ElementStyleUtil_1.ElementStyleUtil.get(el, 'padding-bottom') &&
|
|
252
|
+
_DataUtil_1.DataUtil.has(el, 'slide-padding-bottom') !== true) {
|
|
253
|
+
_DataUtil_1.DataUtil.set(el, 'slide-padding-bottom', _ElementStyleUtil_1.ElementStyleUtil.get(el, 'padding-bottom'));
|
|
254
|
+
}
|
|
255
|
+
if (_DataUtil_1.DataUtil.has(el, 'slide-padding-top')) {
|
|
256
|
+
var data = _DataUtil_1.DataUtil.get(el, 'slide-padding-top');
|
|
257
|
+
calcPaddingTop = parseInt(data);
|
|
258
|
+
}
|
|
259
|
+
if (_DataUtil_1.DataUtil.has(el, 'slide-padding-bottom')) {
|
|
260
|
+
var data = _DataUtil_1.DataUtil.get(el, 'slide-padding-bottom');
|
|
261
|
+
calcPaddingBottom = parseInt(data);
|
|
262
|
+
}
|
|
263
|
+
if (dir === 'up') {
|
|
264
|
+
// up
|
|
265
|
+
el.style.cssText = 'display: block; overflow: hidden;';
|
|
266
|
+
if (calcPaddingTop) {
|
|
267
|
+
ElementAnimateUtil_1.ElementAnimateUtil.animate(0, calcPaddingTop, speed, function (value) {
|
|
268
|
+
el.style.paddingTop = calcPaddingTop - value + 'px';
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
if (calcPaddingBottom) {
|
|
272
|
+
ElementAnimateUtil_1.ElementAnimateUtil.animate(0, calcPaddingBottom, speed, function (value) {
|
|
273
|
+
el.style.paddingBottom = calcPaddingBottom - value + 'px';
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
ElementAnimateUtil_1.ElementAnimateUtil.animate(0, calcHeight || 0, speed, function (value) {
|
|
277
|
+
el.style.height = (calcHeight || 0) - value + 'px';
|
|
278
|
+
}, function () {
|
|
279
|
+
el.style.height = '';
|
|
280
|
+
el.style.display = 'none';
|
|
281
|
+
if (typeof callback === 'function') {
|
|
282
|
+
callback();
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
else if (dir === 'down') {
|
|
287
|
+
// down
|
|
288
|
+
el.style.cssText = 'display: block; overflow: hidden;';
|
|
289
|
+
if (calcPaddingTop) {
|
|
290
|
+
ElementAnimateUtil_1.ElementAnimateUtil.animate(0, calcPaddingTop, speed, function (value) {
|
|
291
|
+
//
|
|
292
|
+
el.style.paddingTop = value + 'px';
|
|
293
|
+
}, function () {
|
|
294
|
+
el.style.paddingTop = '';
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
if (calcPaddingBottom) {
|
|
298
|
+
ElementAnimateUtil_1.ElementAnimateUtil.animate(0, calcPaddingBottom, speed, function (value) {
|
|
299
|
+
el.style.paddingBottom = value + 'px';
|
|
300
|
+
}, function () {
|
|
301
|
+
el.style.paddingBottom = '';
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
ElementAnimateUtil_1.ElementAnimateUtil.animate(0, calcHeight || 0, speed, function (value) {
|
|
305
|
+
el.style.height = value + 'px';
|
|
306
|
+
}, function () {
|
|
307
|
+
el.style.height = '';
|
|
308
|
+
el.style.display = '';
|
|
309
|
+
el.style.overflow = '';
|
|
310
|
+
if (typeof callback === 'function') {
|
|
311
|
+
callback();
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
exports.slide = slide;
|
|
317
|
+
function slideUp(el, speed, callback) {
|
|
318
|
+
slide(el, 'up', speed, callback);
|
|
319
|
+
}
|
|
320
|
+
exports.slideUp = slideUp;
|
|
321
|
+
function slideDown(el, speed, callback) {
|
|
322
|
+
slide(el, 'down', speed, callback);
|
|
323
|
+
}
|
|
324
|
+
exports.slideDown = slideDown;
|
|
325
|
+
function getBreakpoint(breakpoint) {
|
|
326
|
+
var value = getCSSVariableValue('--bs-' + breakpoint);
|
|
327
|
+
if (value) {
|
|
328
|
+
value = parseInt(value.trim());
|
|
329
|
+
}
|
|
330
|
+
return value;
|
|
331
|
+
}
|
|
332
|
+
exports.getBreakpoint = getBreakpoint;
|
|
333
|
+
function getAttributeValueByBreakpoint(incomingAttr) {
|
|
334
|
+
var value = (0, _TypesHelpers_1.toJSON)(incomingAttr);
|
|
335
|
+
if (typeof value !== 'object') {
|
|
336
|
+
return incomingAttr;
|
|
337
|
+
}
|
|
338
|
+
var width = getViewPort().width;
|
|
339
|
+
var resultKey;
|
|
340
|
+
var resultBreakpoint = -1;
|
|
341
|
+
var breakpoint;
|
|
342
|
+
for (var key in value) {
|
|
343
|
+
if (key === 'default') {
|
|
344
|
+
breakpoint = 0;
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
breakpoint = getBreakpoint(key) ? +getBreakpoint(key) : parseInt(key);
|
|
348
|
+
}
|
|
349
|
+
if (breakpoint <= width && breakpoint > resultBreakpoint) {
|
|
350
|
+
resultKey = key;
|
|
351
|
+
resultBreakpoint = breakpoint;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return resultKey ? (0, _TypesHelpers_1.getObjectPropertyValueByKey)(value, resultKey) : value;
|
|
355
|
+
}
|
|
356
|
+
exports.getAttributeValueByBreakpoint = getAttributeValueByBreakpoint;
|
|
357
|
+
function colorLighten(color, amount) {
|
|
358
|
+
var addLight = function (_color, _amount) {
|
|
359
|
+
var cc = parseInt(_color, 16) + _amount;
|
|
360
|
+
var cNum = cc > 255 ? 255 : cc;
|
|
361
|
+
var c = cNum.toString(16).length > 1 ? cNum.toString(16) : "0".concat(cNum.toString(16));
|
|
362
|
+
return c;
|
|
363
|
+
};
|
|
364
|
+
color = color.indexOf('#') >= 0 ? color.substring(1, color.length) : color;
|
|
365
|
+
amount = parseInt(((255 * amount) / 100).toString());
|
|
366
|
+
return (color = "#".concat(addLight(color.substring(0, 2), amount)).concat(addLight(color.substring(2, 4), amount)).concat(addLight(color.substring(4, 6), amount)));
|
|
367
|
+
}
|
|
368
|
+
exports.colorLighten = colorLighten;
|
|
369
|
+
function colorDarken(color, amount) {
|
|
370
|
+
var subtractLight = function (_color, _amount) {
|
|
371
|
+
var cc = parseInt(color, 16) - amount;
|
|
372
|
+
var cNum = cc < 0 ? 0 : cc;
|
|
373
|
+
var c = cNum.toString(16).length > 1 ? cNum.toString(16) : "0".concat(cNum.toString(16));
|
|
374
|
+
return c;
|
|
375
|
+
};
|
|
376
|
+
color = color.indexOf('#') >= 0 ? color.substring(1, color.length) : color;
|
|
377
|
+
amount = parseInt(((255 * amount) / 100).toString());
|
|
378
|
+
return (color = "#".concat(subtractLight(color.substring(0, 2), amount)).concat(subtractLight(color.substring(2, 4), amount)).concat(subtractLight(color.substring(4, 6), amount)));
|
|
379
|
+
}
|
|
380
|
+
exports.colorDarken = colorDarken;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class ElementAnimateUtil {
|
|
2
|
+
static animate(from: number, to: number, duration: number, update: Function, complete?: Function): void;
|
|
3
|
+
static animateClass(element: HTMLElement, animationName: string, callBack?: Function): void;
|
|
4
|
+
static transitionEnd(element: HTMLElement, callBack: Function): void;
|
|
5
|
+
static animationEnd(element: HTMLElement, callBack: Function): void;
|
|
6
|
+
static animationDelay(element: HTMLElement, value: string): void;
|
|
7
|
+
static animationDuration(element: HTMLElement, value: string): void;
|
|
8
|
+
static scrollTo(element: HTMLElement | null, offset: number, duration?: number): void;
|
|
9
|
+
static scrollTop(offset: number, duration: number): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElementAnimateUtil = void 0;
|
|
4
|
+
var _DOMEventHandlerUtil_1 = require("./_DOMEventHandlerUtil");
|
|
5
|
+
var _ElementStyleUtil_1 = require("./_ElementStyleUtil");
|
|
6
|
+
var DomHelpers_1 = require("./DomHelpers");
|
|
7
|
+
var ElementAnimateUtil = /** @class */ (function () {
|
|
8
|
+
function ElementAnimateUtil() {
|
|
9
|
+
}
|
|
10
|
+
ElementAnimateUtil.animate = function (from, to, duration, update, complete) {
|
|
11
|
+
/**
|
|
12
|
+
* TinyAnimate.easings
|
|
13
|
+
* Adapted from jQuery Easing
|
|
14
|
+
*/
|
|
15
|
+
var easings = {
|
|
16
|
+
linear: function (t, b, c, d) {
|
|
17
|
+
return (c * t) / d + b;
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
// Create mock done() function if necessary
|
|
21
|
+
if (!complete) {
|
|
22
|
+
complete = function () { };
|
|
23
|
+
}
|
|
24
|
+
// Animation loop
|
|
25
|
+
// let canceled = false;
|
|
26
|
+
var change = to - from;
|
|
27
|
+
function loop(timestamp) {
|
|
28
|
+
var time = (timestamp || +new Date()) - start;
|
|
29
|
+
if (time >= 0) {
|
|
30
|
+
update(easings.linear(time, from, change, duration));
|
|
31
|
+
}
|
|
32
|
+
if (time >= 0 && time >= duration) {
|
|
33
|
+
update(to);
|
|
34
|
+
if (complete) {
|
|
35
|
+
complete();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
window.requestAnimationFrame(loop);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
update(from);
|
|
43
|
+
// Start animation loop
|
|
44
|
+
var start = window.performance && window.performance.now ? window.performance.now() : +new Date();
|
|
45
|
+
window.requestAnimationFrame(loop);
|
|
46
|
+
};
|
|
47
|
+
ElementAnimateUtil.animateClass = function (element, animationName, callBack) {
|
|
48
|
+
var animateClasses = animationName.split(' ');
|
|
49
|
+
animateClasses.forEach(function (cssClass) { return element.classList.add(cssClass); });
|
|
50
|
+
_DOMEventHandlerUtil_1.DOMEventHandlerUtil.one(element, 'animationend', function () {
|
|
51
|
+
animateClasses.forEach(function (cssClass) { return element.classList.remove(cssClass); });
|
|
52
|
+
});
|
|
53
|
+
if (callBack) {
|
|
54
|
+
_DOMEventHandlerUtil_1.DOMEventHandlerUtil.one(element, 'animationend', callBack);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
ElementAnimateUtil.transitionEnd = function (element, callBack) {
|
|
58
|
+
_DOMEventHandlerUtil_1.DOMEventHandlerUtil.one(element, 'transitionend', callBack);
|
|
59
|
+
};
|
|
60
|
+
ElementAnimateUtil.animationEnd = function (element, callBack) {
|
|
61
|
+
_DOMEventHandlerUtil_1.DOMEventHandlerUtil.one(element, 'animationend', callBack);
|
|
62
|
+
};
|
|
63
|
+
ElementAnimateUtil.animationDelay = function (element, value) {
|
|
64
|
+
_ElementStyleUtil_1.ElementStyleUtil.set(element, 'animation-delay', value);
|
|
65
|
+
};
|
|
66
|
+
ElementAnimateUtil.animationDuration = function (element, value) {
|
|
67
|
+
_ElementStyleUtil_1.ElementStyleUtil.set(element, 'animation-duration', value);
|
|
68
|
+
};
|
|
69
|
+
ElementAnimateUtil.scrollTo = function (element, offset, duration) {
|
|
70
|
+
if (duration === void 0) { duration = 500; }
|
|
71
|
+
var targetPos = element ? (0, DomHelpers_1.getElementOffset)(element).top : 0;
|
|
72
|
+
var scrollPos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
73
|
+
if (offset) {
|
|
74
|
+
scrollPos += offset;
|
|
75
|
+
targetPos = targetPos - offset;
|
|
76
|
+
}
|
|
77
|
+
var from = scrollPos;
|
|
78
|
+
var to = targetPos;
|
|
79
|
+
ElementAnimateUtil.animate(from, to, duration, function (value) {
|
|
80
|
+
document.documentElement.scrollTop = value;
|
|
81
|
+
// document.body.parentNode.scrollTop = value;
|
|
82
|
+
document.body.scrollTop = value;
|
|
83
|
+
}); //, easing, done
|
|
84
|
+
};
|
|
85
|
+
ElementAnimateUtil.scrollTop = function (offset, duration) {
|
|
86
|
+
ElementAnimateUtil.scrollTo(null, offset, duration);
|
|
87
|
+
};
|
|
88
|
+
return ElementAnimateUtil;
|
|
89
|
+
}());
|
|
90
|
+
exports.ElementAnimateUtil = ElementAnimateUtil;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface EventMeta {
|
|
2
|
+
name: string;
|
|
3
|
+
callback: Function;
|
|
4
|
+
one: boolean;
|
|
5
|
+
fired: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class EventHandlerUtil {
|
|
8
|
+
static store: {
|
|
9
|
+
[name: string]: {
|
|
10
|
+
[handlerId: string]: EventMeta;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
private static setEventMetasByName;
|
|
14
|
+
private static getEventMetaByName;
|
|
15
|
+
private static setEventMetaByNameAndHandlerId;
|
|
16
|
+
private static getEventMetaByHandlerId;
|
|
17
|
+
private static setFiredByNameAndHandlerId;
|
|
18
|
+
private static addEvent;
|
|
19
|
+
private static removeEvent;
|
|
20
|
+
static trigger(element: HTMLElement, name: string, target?: any, e?: Event): boolean;
|
|
21
|
+
static on: (element: HTMLElement, name: string, callBack: Function) => void;
|
|
22
|
+
static one(element: HTMLElement, name: string, callBack: Function): void;
|
|
23
|
+
static off(element: HTMLElement, name: string, handerId: string): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventHandlerUtil = void 0;
|
|
4
|
+
var _DataUtil_1 = require("./_DataUtil");
|
|
5
|
+
var _TypesHelpers_1 = require("./_TypesHelpers");
|
|
6
|
+
var EventHandlerUtil = /** @class */ (function () {
|
|
7
|
+
function EventHandlerUtil() {
|
|
8
|
+
}
|
|
9
|
+
EventHandlerUtil.setEventMetasByName = function (name, handlers) {
|
|
10
|
+
EventHandlerUtil.store[name] = handlers;
|
|
11
|
+
};
|
|
12
|
+
EventHandlerUtil.getEventMetaByName = function (name) {
|
|
13
|
+
return EventHandlerUtil.store[name];
|
|
14
|
+
};
|
|
15
|
+
EventHandlerUtil.setEventMetaByNameAndHandlerId = function (name, handlerId, meta) {
|
|
16
|
+
if (EventHandlerUtil.store[name]) {
|
|
17
|
+
EventHandlerUtil.store[name][handlerId] = meta;
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
EventHandlerUtil.store[name] = {};
|
|
21
|
+
EventHandlerUtil.store[name][handlerId] = meta;
|
|
22
|
+
};
|
|
23
|
+
EventHandlerUtil.getEventMetaByHandlerId = function (name, handlerId) {
|
|
24
|
+
var handlersIds = EventHandlerUtil.store[name];
|
|
25
|
+
if (!handlersIds) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
return handlersIds[handlerId];
|
|
29
|
+
};
|
|
30
|
+
EventHandlerUtil.setFiredByNameAndHandlerId = function (name, handerId, fired) {
|
|
31
|
+
var meta = EventHandlerUtil.getEventMetaByHandlerId(name, handerId);
|
|
32
|
+
if (!meta) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
meta.fired = fired;
|
|
36
|
+
EventHandlerUtil.setEventMetaByNameAndHandlerId(name, handerId, meta);
|
|
37
|
+
};
|
|
38
|
+
EventHandlerUtil.addEvent = function (element, name, callback, one) {
|
|
39
|
+
if (one === void 0) { one = false; }
|
|
40
|
+
var handlerId = (0, _TypesHelpers_1.getUniqueIdWithPrefix)('event');
|
|
41
|
+
var data = _DataUtil_1.DataUtil.get(element, name);
|
|
42
|
+
var handlersIds = data ? data : [];
|
|
43
|
+
handlersIds.push(handlerId);
|
|
44
|
+
_DataUtil_1.DataUtil.set(element, name, handlersIds);
|
|
45
|
+
var meta = {
|
|
46
|
+
name: name,
|
|
47
|
+
callback: callback,
|
|
48
|
+
one: one,
|
|
49
|
+
fired: false,
|
|
50
|
+
};
|
|
51
|
+
EventHandlerUtil.setEventMetaByNameAndHandlerId(name, handlerId, meta);
|
|
52
|
+
return handlerId;
|
|
53
|
+
};
|
|
54
|
+
EventHandlerUtil.removeEvent = function (element, name, handerId) {
|
|
55
|
+
_DataUtil_1.DataUtil.removeOne(element, name, handerId);
|
|
56
|
+
var handlersIds = EventHandlerUtil.store[name];
|
|
57
|
+
if (handlersIds) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
delete EventHandlerUtil.store[name][handerId];
|
|
61
|
+
};
|
|
62
|
+
EventHandlerUtil.trigger = function (element, name, target, e) {
|
|
63
|
+
var returnValue = true;
|
|
64
|
+
if (!_DataUtil_1.DataUtil.has(element, name)) {
|
|
65
|
+
return returnValue;
|
|
66
|
+
}
|
|
67
|
+
var eventValue;
|
|
68
|
+
var handlerId;
|
|
69
|
+
var data = _DataUtil_1.DataUtil.get(element, name);
|
|
70
|
+
var handlersIds = data ? data : [];
|
|
71
|
+
for (var i = 0; i < handlersIds.length; i++) {
|
|
72
|
+
handlerId = handlersIds[i];
|
|
73
|
+
if (EventHandlerUtil.store[name] && EventHandlerUtil.store[name][handlerId]) {
|
|
74
|
+
var handler = EventHandlerUtil.store[name][handlerId];
|
|
75
|
+
if (handler.name === name) {
|
|
76
|
+
if (handler.one) {
|
|
77
|
+
if (handler.fired) {
|
|
78
|
+
EventHandlerUtil.store[name][handlerId].fired = true;
|
|
79
|
+
eventValue = handler.callback.call(this, target);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
eventValue = handler.callback.call(this, target);
|
|
84
|
+
}
|
|
85
|
+
if (eventValue === false) {
|
|
86
|
+
returnValue = false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return returnValue;
|
|
92
|
+
};
|
|
93
|
+
EventHandlerUtil.one = function (element, name, callBack) {
|
|
94
|
+
EventHandlerUtil.addEvent(element, name, callBack, true);
|
|
95
|
+
};
|
|
96
|
+
EventHandlerUtil.off = function (element, name, handerId) {
|
|
97
|
+
EventHandlerUtil.removeEvent(element, name, handerId);
|
|
98
|
+
};
|
|
99
|
+
EventHandlerUtil.store = {};
|
|
100
|
+
EventHandlerUtil.on = function (element, name, callBack) {
|
|
101
|
+
EventHandlerUtil.addEvent(element, name, callBack, false);
|
|
102
|
+
};
|
|
103
|
+
return EventHandlerUtil;
|
|
104
|
+
}());
|
|
105
|
+
exports.EventHandlerUtil = EventHandlerUtil;
|