@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
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface IPasswordMeterOptions {
|
|
2
|
+
minLength: number;
|
|
3
|
+
checkUppercase: boolean;
|
|
4
|
+
checkLowercase: boolean;
|
|
5
|
+
checkDigit: boolean;
|
|
6
|
+
checkChar: boolean;
|
|
7
|
+
scoreHighlightClass: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IPasswordMeterQueries {
|
|
10
|
+
componentName: string;
|
|
11
|
+
instanseQuery: string;
|
|
12
|
+
inputQuery: string;
|
|
13
|
+
visibilityQuery: string;
|
|
14
|
+
highlightQuery: string;
|
|
15
|
+
}
|
|
16
|
+
declare const defaultPasswordMeterOptions: {
|
|
17
|
+
minLength: number;
|
|
18
|
+
checkUppercase: boolean;
|
|
19
|
+
checkLowercase: boolean;
|
|
20
|
+
checkDigit: boolean;
|
|
21
|
+
checkChar: boolean;
|
|
22
|
+
scoreHighlightClass: string;
|
|
23
|
+
};
|
|
24
|
+
declare const defaultPasswordMeterQueires: IPasswordMeterQueries;
|
|
25
|
+
declare class PasswordMeterComponent {
|
|
26
|
+
element: HTMLElement;
|
|
27
|
+
inputElement: HTMLInputElement | null;
|
|
28
|
+
visibilityElement: HTMLElement | null;
|
|
29
|
+
highlightElement: HTMLElement | null;
|
|
30
|
+
options: IPasswordMeterOptions;
|
|
31
|
+
queries: IPasswordMeterQueries;
|
|
32
|
+
score: number;
|
|
33
|
+
checkSteps: number;
|
|
34
|
+
constructor(_element: HTMLElement, _options: IPasswordMeterOptions, _queries: IPasswordMeterQueries);
|
|
35
|
+
private handlers;
|
|
36
|
+
private visitbility;
|
|
37
|
+
private checkScore;
|
|
38
|
+
private checkLength;
|
|
39
|
+
private checkLowerCase;
|
|
40
|
+
private checkUppercase;
|
|
41
|
+
private checkDigit;
|
|
42
|
+
private checkChar;
|
|
43
|
+
private getCheckScore;
|
|
44
|
+
private highlight;
|
|
45
|
+
reset: () => void;
|
|
46
|
+
getScore(): number;
|
|
47
|
+
check(): void;
|
|
48
|
+
static getInstance: (el: HTMLElement, componentName?: string) => PasswordMeterComponent | undefined;
|
|
49
|
+
static createInstances: (selector?: string, options?: IPasswordMeterOptions, queries?: IPasswordMeterQueries) => void;
|
|
50
|
+
static createInsance: (selector?: string, options?: IPasswordMeterOptions, queries?: IPasswordMeterQueries) => PasswordMeterComponent | undefined;
|
|
51
|
+
static bootstrap: (selector?: string) => void;
|
|
52
|
+
static reinitialization: (selector?: string) => void;
|
|
53
|
+
}
|
|
54
|
+
export { PasswordMeterComponent, defaultPasswordMeterOptions, defaultPasswordMeterQueires };
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultPasswordMeterQueires = exports.defaultPasswordMeterOptions = exports.PasswordMeterComponent = void 0;
|
|
4
|
+
/* eslint-disable no-useless-escape */
|
|
5
|
+
var index_1 = require("../_utils/index");
|
|
6
|
+
var defaultPasswordMeterOptions = {
|
|
7
|
+
minLength: 8,
|
|
8
|
+
checkUppercase: true,
|
|
9
|
+
checkLowercase: true,
|
|
10
|
+
checkDigit: true,
|
|
11
|
+
checkChar: true,
|
|
12
|
+
scoreHighlightClass: 'active',
|
|
13
|
+
};
|
|
14
|
+
exports.defaultPasswordMeterOptions = defaultPasswordMeterOptions;
|
|
15
|
+
var defaultPasswordMeterQueires = {
|
|
16
|
+
componentName: 'password-meter',
|
|
17
|
+
instanseQuery: '[data-kt-password-meter]',
|
|
18
|
+
inputQuery: 'input[type]',
|
|
19
|
+
visibilityQuery: '[data-kt-password-meter-control="visibility"]',
|
|
20
|
+
highlightQuery: '[data-kt-password-meter-control="highlight"]',
|
|
21
|
+
};
|
|
22
|
+
exports.defaultPasswordMeterQueires = defaultPasswordMeterQueires;
|
|
23
|
+
var PasswordMeterComponent = /** @class */ (function () {
|
|
24
|
+
function PasswordMeterComponent(_element, _options, _queries) {
|
|
25
|
+
var _this = this;
|
|
26
|
+
///////////////////////
|
|
27
|
+
// ** Public API ** //
|
|
28
|
+
///////////////////////
|
|
29
|
+
this.reset = function () {
|
|
30
|
+
_this.score = 0;
|
|
31
|
+
_this.highlight();
|
|
32
|
+
};
|
|
33
|
+
this.element = _element;
|
|
34
|
+
this.options = Object.assign(defaultPasswordMeterOptions, _options);
|
|
35
|
+
this.queries = _queries;
|
|
36
|
+
this.score = 0;
|
|
37
|
+
this.checkSteps = 5;
|
|
38
|
+
// Elements
|
|
39
|
+
this.inputElement = this.element.querySelector(this.queries.inputQuery);
|
|
40
|
+
this.visibilityElement = this.element.querySelector(this.queries.visibilityQuery);
|
|
41
|
+
this.highlightElement = this.element.querySelector(this.queries.highlightQuery);
|
|
42
|
+
// Event Handlers
|
|
43
|
+
this.handlers();
|
|
44
|
+
index_1.DataUtil.set(this.element, this.queries.componentName, this);
|
|
45
|
+
}
|
|
46
|
+
PasswordMeterComponent.prototype.handlers = function () {
|
|
47
|
+
var _this = this;
|
|
48
|
+
if (this.inputElement) {
|
|
49
|
+
this.inputElement.addEventListener('input', function () {
|
|
50
|
+
_this.check();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
if (this.visibilityElement) {
|
|
54
|
+
this.visibilityElement.addEventListener('click', function () {
|
|
55
|
+
_this.visitbility();
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
PasswordMeterComponent.prototype.visitbility = function () {
|
|
60
|
+
if (this.visibilityElement && this.inputElement) {
|
|
61
|
+
var visibleIcon = this.visibilityElement.querySelector('i:not(.d-none), .:not(.d-none)');
|
|
62
|
+
var hiddenIcon = this.visibilityElement.querySelector('i.d-none, ..d-none');
|
|
63
|
+
var typeAttr = this.inputElement.getAttribute('type') || '';
|
|
64
|
+
if (typeAttr === 'password') {
|
|
65
|
+
this.inputElement.setAttribute('type', 'text');
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.inputElement.setAttribute('type', 'password');
|
|
69
|
+
}
|
|
70
|
+
visibleIcon === null || visibleIcon === void 0 ? void 0 : visibleIcon.classList.add('d-none');
|
|
71
|
+
hiddenIcon === null || hiddenIcon === void 0 ? void 0 : hiddenIcon.classList.remove('d-none');
|
|
72
|
+
this.inputElement.focus();
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
PasswordMeterComponent.prototype.checkScore = function () {
|
|
76
|
+
return 0;
|
|
77
|
+
};
|
|
78
|
+
PasswordMeterComponent.prototype.checkLength = function () {
|
|
79
|
+
if (this.inputElement) {
|
|
80
|
+
return this.inputElement.value.length >= this.options.minLength; // 20 score
|
|
81
|
+
}
|
|
82
|
+
return false;
|
|
83
|
+
};
|
|
84
|
+
PasswordMeterComponent.prototype.checkLowerCase = function () {
|
|
85
|
+
var val = this.inputElement ? this.inputElement.value : '';
|
|
86
|
+
return /[a-z]/.test(val); // 20 score
|
|
87
|
+
};
|
|
88
|
+
PasswordMeterComponent.prototype.checkUppercase = function () {
|
|
89
|
+
var val = this.inputElement ? this.inputElement.value : '';
|
|
90
|
+
return /[A-Z]/.test(val); // 20 score
|
|
91
|
+
};
|
|
92
|
+
PasswordMeterComponent.prototype.checkDigit = function () {
|
|
93
|
+
var val = this.inputElement ? this.inputElement.value : '';
|
|
94
|
+
return /[0-9]/.test(val); // 20 score
|
|
95
|
+
};
|
|
96
|
+
PasswordMeterComponent.prototype.checkChar = function () {
|
|
97
|
+
var val = this.inputElement ? this.inputElement.value : '';
|
|
98
|
+
return /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g.test(val); // 20 score
|
|
99
|
+
};
|
|
100
|
+
PasswordMeterComponent.prototype.getCheckScore = function () {
|
|
101
|
+
var count = 1;
|
|
102
|
+
if (this.options.checkUppercase) {
|
|
103
|
+
count++;
|
|
104
|
+
}
|
|
105
|
+
if (this.options.checkLowercase) {
|
|
106
|
+
count++;
|
|
107
|
+
}
|
|
108
|
+
if (this.options.checkDigit) {
|
|
109
|
+
count++;
|
|
110
|
+
}
|
|
111
|
+
if (this.options.checkChar) {
|
|
112
|
+
count++;
|
|
113
|
+
}
|
|
114
|
+
this.checkSteps = count;
|
|
115
|
+
return 100 / this.checkSteps;
|
|
116
|
+
};
|
|
117
|
+
PasswordMeterComponent.prototype.highlight = function () {
|
|
118
|
+
var _this = this;
|
|
119
|
+
var items = this.highlightElement
|
|
120
|
+
? [].slice.call(this.highlightElement.querySelectorAll('div'))
|
|
121
|
+
: [];
|
|
122
|
+
var total = items.length;
|
|
123
|
+
var index = 0;
|
|
124
|
+
var checkScore = this.getCheckScore();
|
|
125
|
+
var score = this.getScore();
|
|
126
|
+
items.map(function (item) {
|
|
127
|
+
index++;
|
|
128
|
+
if (checkScore * index * (_this.checkSteps / total) <= score) {
|
|
129
|
+
item.classList.add('active');
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
item.classList.remove('active');
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
PasswordMeterComponent.prototype.getScore = function () {
|
|
137
|
+
return this.score;
|
|
138
|
+
};
|
|
139
|
+
PasswordMeterComponent.prototype.check = function () {
|
|
140
|
+
var score = 0;
|
|
141
|
+
var checkScore = this.getCheckScore();
|
|
142
|
+
if (this.checkLength()) {
|
|
143
|
+
score = score + checkScore;
|
|
144
|
+
}
|
|
145
|
+
if (this.options.checkUppercase && this.checkLowerCase()) {
|
|
146
|
+
score = score + checkScore;
|
|
147
|
+
}
|
|
148
|
+
if (this.options.checkLowercase && this.checkUppercase()) {
|
|
149
|
+
score = score + checkScore;
|
|
150
|
+
}
|
|
151
|
+
if (this.options.checkDigit && this.checkDigit()) {
|
|
152
|
+
score = score + checkScore;
|
|
153
|
+
}
|
|
154
|
+
if (this.options.checkChar && this.checkChar()) {
|
|
155
|
+
score = score + checkScore;
|
|
156
|
+
}
|
|
157
|
+
this.score = score;
|
|
158
|
+
this.highlight();
|
|
159
|
+
};
|
|
160
|
+
// Static methods
|
|
161
|
+
PasswordMeterComponent.getInstance = function (el, componentName) {
|
|
162
|
+
if (componentName === void 0) { componentName = defaultPasswordMeterQueires.componentName; }
|
|
163
|
+
var passwordMeter = index_1.DataUtil.get(el, componentName);
|
|
164
|
+
if (passwordMeter) {
|
|
165
|
+
return passwordMeter;
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
PasswordMeterComponent.createInstances = function (selector, options, queries) {
|
|
169
|
+
if (selector === void 0) { selector = defaultPasswordMeterQueires.instanseQuery; }
|
|
170
|
+
if (options === void 0) { options = defaultPasswordMeterOptions; }
|
|
171
|
+
if (queries === void 0) { queries = defaultPasswordMeterQueires; }
|
|
172
|
+
var elements = document.body.querySelectorAll(selector);
|
|
173
|
+
elements.forEach(function (el) {
|
|
174
|
+
var item = el;
|
|
175
|
+
var passwordMeter = PasswordMeterComponent.getInstance(item);
|
|
176
|
+
if (!passwordMeter) {
|
|
177
|
+
passwordMeter = new PasswordMeterComponent(item, options, queries);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
PasswordMeterComponent.createInsance = function (selector, options, queries) {
|
|
182
|
+
if (selector === void 0) { selector = defaultPasswordMeterQueires.instanseQuery; }
|
|
183
|
+
if (options === void 0) { options = defaultPasswordMeterOptions; }
|
|
184
|
+
if (queries === void 0) { queries = defaultPasswordMeterQueires; }
|
|
185
|
+
var element = document.body.querySelector(selector);
|
|
186
|
+
if (!element) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
var item = element;
|
|
190
|
+
var passwordMeter = PasswordMeterComponent.getInstance(item);
|
|
191
|
+
if (!passwordMeter) {
|
|
192
|
+
passwordMeter = new PasswordMeterComponent(item, options, queries);
|
|
193
|
+
}
|
|
194
|
+
return passwordMeter;
|
|
195
|
+
};
|
|
196
|
+
PasswordMeterComponent.bootstrap = function (selector) {
|
|
197
|
+
if (selector === void 0) { selector = defaultPasswordMeterQueires.instanseQuery; }
|
|
198
|
+
PasswordMeterComponent.createInstances(selector);
|
|
199
|
+
};
|
|
200
|
+
PasswordMeterComponent.reinitialization = function (selector) {
|
|
201
|
+
if (selector === void 0) { selector = defaultPasswordMeterQueires.instanseQuery; }
|
|
202
|
+
PasswordMeterComponent.createInstances(selector);
|
|
203
|
+
};
|
|
204
|
+
return PasswordMeterComponent;
|
|
205
|
+
}());
|
|
206
|
+
exports.PasswordMeterComponent = PasswordMeterComponent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface ScrollOptions {
|
|
2
|
+
saveState?: boolean;
|
|
3
|
+
}
|
|
4
|
+
declare const defaultScrollOptions: ScrollOptions;
|
|
5
|
+
declare class ScrollComponent {
|
|
6
|
+
element: HTMLElement;
|
|
7
|
+
options: ScrollOptions;
|
|
8
|
+
id: string;
|
|
9
|
+
constructor(_element: HTMLElement, options: ScrollOptions);
|
|
10
|
+
private getOption;
|
|
11
|
+
private getHeightType;
|
|
12
|
+
private getAutoHeight;
|
|
13
|
+
private setupHeight;
|
|
14
|
+
private setupState;
|
|
15
|
+
private setupScrollHandler;
|
|
16
|
+
private scrollHandler;
|
|
17
|
+
private destroyScrollHandler;
|
|
18
|
+
private resetHeight;
|
|
19
|
+
update: () => void;
|
|
20
|
+
getHeight: () => any;
|
|
21
|
+
getElement: () => HTMLElement;
|
|
22
|
+
static hasInstace(element: HTMLElement): boolean;
|
|
23
|
+
static getInstance(element: HTMLElement): ScrollComponent | undefined;
|
|
24
|
+
static createInstances(selector: string): void;
|
|
25
|
+
static destroyAll(attr?: string): void;
|
|
26
|
+
static bootstrap(attr?: string): void;
|
|
27
|
+
static createInstance: (element: HTMLElement, options?: ScrollOptions) => ScrollComponent | undefined;
|
|
28
|
+
static reinitialization(attr?: string): void;
|
|
29
|
+
static updateAll(): void;
|
|
30
|
+
static resize(): void;
|
|
31
|
+
}
|
|
32
|
+
export { ScrollComponent, defaultScrollOptions };
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultScrollOptions = exports.ScrollComponent = void 0;
|
|
4
|
+
var index_1 = require("../_utils/index");
|
|
5
|
+
var _CookieComponent_1 = require("./_CookieComponent");
|
|
6
|
+
var defaultScrollOptions = {
|
|
7
|
+
saveState: true,
|
|
8
|
+
};
|
|
9
|
+
exports.defaultScrollOptions = defaultScrollOptions;
|
|
10
|
+
var ScrollComponent = /** @class */ (function () {
|
|
11
|
+
function ScrollComponent(_element, options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
this.getOption = function (name) {
|
|
14
|
+
if (_this.element.hasAttribute('data-kt-scroll-' + name) === true) {
|
|
15
|
+
var attr = _this.element.getAttribute('data-kt-scroll-' + name) || '';
|
|
16
|
+
var value = (0, index_1.getAttributeValueByBreakpoint)(attr);
|
|
17
|
+
if (value !== null && String(value) === 'true') {
|
|
18
|
+
value = true;
|
|
19
|
+
}
|
|
20
|
+
else if (value !== null && String(value) === 'false') {
|
|
21
|
+
value = false;
|
|
22
|
+
}
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
var optionName = (0, index_1.stringSnakeToCamel)(name);
|
|
27
|
+
var option = (0, index_1.getObjectPropertyValueByKey)(_this.options, optionName);
|
|
28
|
+
if (option) {
|
|
29
|
+
return (0, index_1.getAttributeValueByBreakpoint)(option);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
this.getHeightType = function () {
|
|
37
|
+
if (_this.getOption('height')) {
|
|
38
|
+
return 'height';
|
|
39
|
+
}
|
|
40
|
+
if (_this.getOption('min-height')) {
|
|
41
|
+
return 'min-height';
|
|
42
|
+
}
|
|
43
|
+
if (_this.getOption('max-height')) {
|
|
44
|
+
return 'max-height';
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
this.getAutoHeight = function () {
|
|
48
|
+
var height = (0, index_1.getViewPort)().height;
|
|
49
|
+
var dependencies = _this.getOption('dependencies');
|
|
50
|
+
var wrappers = _this.getOption('wrappers');
|
|
51
|
+
var offset = _this.getOption('offset');
|
|
52
|
+
// Height dependencies
|
|
53
|
+
if (dependencies !== null) {
|
|
54
|
+
var elements = document.querySelectorAll(dependencies);
|
|
55
|
+
if (elements && elements.length > 0) {
|
|
56
|
+
for (var i = 0, len = elements.length; i < len; i++) {
|
|
57
|
+
var element = elements[i];
|
|
58
|
+
if ((0, index_1.isVisibleElement)(element) === false) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
height = height - parseInt((0, index_1.getCSS)(element, 'height'));
|
|
62
|
+
height = height - parseInt((0, index_1.getCSS)(element, 'margin-top'));
|
|
63
|
+
height = height - parseInt((0, index_1.getCSS)(element, 'margin-bottom'));
|
|
64
|
+
var borderTop_1 = (0, index_1.getCSS)(element, 'border-top');
|
|
65
|
+
if (borderTop_1) {
|
|
66
|
+
height = height - parseInt(borderTop_1);
|
|
67
|
+
}
|
|
68
|
+
var borderBottom_1 = (0, index_1.getCSS)(element, 'border-bottom');
|
|
69
|
+
if (borderBottom_1) {
|
|
70
|
+
height = height - parseInt(borderBottom_1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// Wrappers
|
|
76
|
+
if (wrappers !== null) {
|
|
77
|
+
var elements = document.querySelectorAll(wrappers);
|
|
78
|
+
if (elements && elements.length > 0) {
|
|
79
|
+
for (var i = 0, len = elements.length; i < len; i++) {
|
|
80
|
+
var element = elements[i];
|
|
81
|
+
if (!(0, index_1.isVisibleElement)(element)) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
height = height - parseInt((0, index_1.getCSS)(element, 'margin-top'));
|
|
85
|
+
height = height - parseInt((0, index_1.getCSS)(element, 'margin-bottom'));
|
|
86
|
+
height = height - parseInt((0, index_1.getCSS)(element, 'padding-top'));
|
|
87
|
+
height = height - parseInt((0, index_1.getCSS)(element, 'padding-bottom'));
|
|
88
|
+
var borderTop_2 = (0, index_1.getCSS)(element, 'border-top');
|
|
89
|
+
if (borderTop_2) {
|
|
90
|
+
height = height - parseInt(borderTop_2);
|
|
91
|
+
}
|
|
92
|
+
var borderBottom_2 = (0, index_1.getCSS)(element, 'border-bottom');
|
|
93
|
+
if (borderBottom_2) {
|
|
94
|
+
height = height - parseInt(borderBottom_2);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Custom offset
|
|
100
|
+
if (offset !== null) {
|
|
101
|
+
height = height - parseInt(offset);
|
|
102
|
+
}
|
|
103
|
+
height = height - parseInt((0, index_1.getCSS)(_this.element, 'margin-top'));
|
|
104
|
+
height = height - parseInt((0, index_1.getCSS)(_this.element, 'margin-bottom'));
|
|
105
|
+
var borderTop = (0, index_1.getCSS)(_this.element, 'border-top');
|
|
106
|
+
if (borderTop) {
|
|
107
|
+
height = height - parseInt(borderTop);
|
|
108
|
+
}
|
|
109
|
+
var borderBottom = (0, index_1.getCSS)(_this.element, 'border-bottom');
|
|
110
|
+
if (borderBottom) {
|
|
111
|
+
height = height - parseInt(borderBottom);
|
|
112
|
+
}
|
|
113
|
+
height = String(height) + 'px';
|
|
114
|
+
return height;
|
|
115
|
+
};
|
|
116
|
+
this.setupHeight = function () {
|
|
117
|
+
var height = _this.getHeight();
|
|
118
|
+
var heightType = _this.getHeightType();
|
|
119
|
+
// Set height
|
|
120
|
+
if (height !== null && height.length > 0) {
|
|
121
|
+
index_1.ElementStyleUtil.set(_this.element, heightType, height);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
index_1.ElementStyleUtil.set(_this.element, heightType, '');
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
this.setupState = function () {
|
|
128
|
+
if (_this.getOption('save-state') === true && _this.id) {
|
|
129
|
+
var cookie = _CookieComponent_1.CookieComponent.get(_this.id + 'st');
|
|
130
|
+
if (cookie) {
|
|
131
|
+
var pos = parseInt(cookie);
|
|
132
|
+
if (pos > 0) {
|
|
133
|
+
_this.element.scrollTop = pos;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
this.setupScrollHandler = function () {
|
|
139
|
+
if (_this.getOption('save-state') === true && _this.id) {
|
|
140
|
+
_this.element.addEventListener('scroll', _this.scrollHandler);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
_this.element.removeEventListener('scroll', _this.scrollHandler);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
this.scrollHandler = function () {
|
|
147
|
+
var cookieId = _this.id + 'st';
|
|
148
|
+
_CookieComponent_1.CookieComponent.set(cookieId, _this.element.scrollTop, {});
|
|
149
|
+
};
|
|
150
|
+
this.destroyScrollHandler = function () {
|
|
151
|
+
_this.element.removeEventListener('scroll', _this.scrollHandler);
|
|
152
|
+
};
|
|
153
|
+
this.resetHeight = function () {
|
|
154
|
+
var heghtType = _this.getHeightType();
|
|
155
|
+
if (heghtType) {
|
|
156
|
+
index_1.ElementStyleUtil.set(_this.element, heghtType, '');
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
///////////////////////
|
|
160
|
+
// ** Public API ** //
|
|
161
|
+
///////////////////////
|
|
162
|
+
this.update = function () {
|
|
163
|
+
// Activate/deactivate
|
|
164
|
+
if (_this.getOption('activate') === true ||
|
|
165
|
+
!_this.element.hasAttribute('data-kt-scroll-activate')) {
|
|
166
|
+
_this.setupHeight();
|
|
167
|
+
_this.setupScrollHandler();
|
|
168
|
+
_this.setupState();
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
_this.resetHeight();
|
|
172
|
+
_this.destroyScrollHandler();
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
this.getHeight = function () {
|
|
176
|
+
var heightType = _this.getHeightType();
|
|
177
|
+
var height = _this.getOption(heightType || '');
|
|
178
|
+
if (height instanceof Function) {
|
|
179
|
+
return height.call(height);
|
|
180
|
+
}
|
|
181
|
+
else if (height !== null && typeof height === 'string' && height.toLowerCase() === 'auto') {
|
|
182
|
+
return _this.getAutoHeight();
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
return height;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
this.getElement = function () {
|
|
189
|
+
return _this.element;
|
|
190
|
+
};
|
|
191
|
+
this.element = _element;
|
|
192
|
+
this.options = Object.assign(defaultScrollOptions, options);
|
|
193
|
+
this.id = this.element.getAttribute('id') || '';
|
|
194
|
+
this.update();
|
|
195
|
+
// this.element.setAttribute('data-kt-scrolltop', 'true')
|
|
196
|
+
index_1.DataUtil.set(this.element, 'scroll', this);
|
|
197
|
+
}
|
|
198
|
+
// Static methods
|
|
199
|
+
ScrollComponent.hasInstace = function (element) {
|
|
200
|
+
return index_1.DataUtil.has(element, 'scroll');
|
|
201
|
+
};
|
|
202
|
+
ScrollComponent.getInstance = function (element) {
|
|
203
|
+
if (element !== null && ScrollComponent.hasInstace(element)) {
|
|
204
|
+
var data = index_1.DataUtil.get(element, 'scroll');
|
|
205
|
+
if (data) {
|
|
206
|
+
return data;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
// Create Instances
|
|
211
|
+
ScrollComponent.createInstances = function (selector) {
|
|
212
|
+
var elements = document.body.querySelectorAll(selector);
|
|
213
|
+
elements.forEach(function (element) {
|
|
214
|
+
var item = element;
|
|
215
|
+
var scroll = ScrollComponent.getInstance(item);
|
|
216
|
+
if (!scroll) {
|
|
217
|
+
scroll = new ScrollComponent(item, defaultScrollOptions);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
ScrollComponent.destroyAll = function (attr) {
|
|
222
|
+
if (attr === void 0) { attr = '[data-kt-scroll="true"]'; }
|
|
223
|
+
};
|
|
224
|
+
ScrollComponent.bootstrap = function (attr) {
|
|
225
|
+
if (attr === void 0) { attr = '[data-kt-scroll="true"]'; }
|
|
226
|
+
ScrollComponent.createInstances(attr);
|
|
227
|
+
ScrollComponent.resize();
|
|
228
|
+
};
|
|
229
|
+
ScrollComponent.reinitialization = function (attr) {
|
|
230
|
+
if (attr === void 0) { attr = '[data-kt-scroll="true"]'; }
|
|
231
|
+
ScrollComponent.createInstances(attr);
|
|
232
|
+
};
|
|
233
|
+
ScrollComponent.updateAll = function () {
|
|
234
|
+
var elements = document.body.querySelectorAll('[data-kt-scroll="true"]');
|
|
235
|
+
elements.forEach(function (element) {
|
|
236
|
+
var instance = ScrollComponent.getInstance(element);
|
|
237
|
+
if (instance) {
|
|
238
|
+
instance.update();
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
ScrollComponent.resize = function () {
|
|
243
|
+
// Window Resize Handling
|
|
244
|
+
window.addEventListener('resize', function () {
|
|
245
|
+
var timer;
|
|
246
|
+
(0, index_1.throttle)(timer, function () {
|
|
247
|
+
// Locate and update Drawer instances on window resize
|
|
248
|
+
ScrollComponent.updateAll();
|
|
249
|
+
}, 200);
|
|
250
|
+
});
|
|
251
|
+
};
|
|
252
|
+
ScrollComponent.createInstance = function (element, options) {
|
|
253
|
+
if (options === void 0) { options = defaultScrollOptions; }
|
|
254
|
+
var scroll = ScrollComponent.getInstance(element);
|
|
255
|
+
if (!scroll) {
|
|
256
|
+
scroll = new ScrollComponent(element, options);
|
|
257
|
+
}
|
|
258
|
+
return scroll;
|
|
259
|
+
};
|
|
260
|
+
return ScrollComponent;
|
|
261
|
+
}());
|
|
262
|
+
exports.ScrollComponent = ScrollComponent;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface IScrollTopOptions {
|
|
2
|
+
offset: number;
|
|
3
|
+
speed: number;
|
|
4
|
+
}
|
|
5
|
+
declare const defaultScrollTopOptions: IScrollTopOptions;
|
|
6
|
+
declare class ScrollTopComponent {
|
|
7
|
+
element: HTMLElement;
|
|
8
|
+
options: IScrollTopOptions;
|
|
9
|
+
instanceUid: string;
|
|
10
|
+
constructor(_element: HTMLElement, options: IScrollTopOptions);
|
|
11
|
+
private _handlers;
|
|
12
|
+
private _scroll;
|
|
13
|
+
private _go;
|
|
14
|
+
private _getOption;
|
|
15
|
+
go: () => void;
|
|
16
|
+
getElement: () => HTMLElement;
|
|
17
|
+
static getInstance: (el: HTMLElement) => ScrollTopComponent | undefined;
|
|
18
|
+
static createInstances: (selector: string) => void;
|
|
19
|
+
static createInsance: (selector: string, options?: IScrollTopOptions) => ScrollTopComponent | undefined;
|
|
20
|
+
static bootstrap: () => void;
|
|
21
|
+
static reinitialization: () => void;
|
|
22
|
+
static goTop: () => void;
|
|
23
|
+
}
|
|
24
|
+
export { ScrollTopComponent, defaultScrollTopOptions };
|