@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,66 @@
|
|
|
1
|
+
import { MenuComponent } from './MenuComponent';
|
|
2
|
+
export interface ISearchOptions {
|
|
3
|
+
minLength: number;
|
|
4
|
+
keypress: boolean;
|
|
5
|
+
enter: boolean;
|
|
6
|
+
layout: 'menu' | 'inline';
|
|
7
|
+
responsive?: number;
|
|
8
|
+
showOnFocus: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ISearchQueries {
|
|
11
|
+
componentName: string;
|
|
12
|
+
instanseQuery: string;
|
|
13
|
+
attrQuery: string;
|
|
14
|
+
}
|
|
15
|
+
declare const defaultSearchOptions: ISearchOptions;
|
|
16
|
+
declare const defaultSearchQueires: ISearchQueries;
|
|
17
|
+
declare class SearchComponent {
|
|
18
|
+
element: HTMLElement;
|
|
19
|
+
contentElement: HTMLElement;
|
|
20
|
+
formElement: HTMLFormElement;
|
|
21
|
+
inputElement: HTMLInputElement;
|
|
22
|
+
spinnerElement: HTMLElement;
|
|
23
|
+
clearElement: HTMLElement;
|
|
24
|
+
toggleElement: HTMLElement;
|
|
25
|
+
submitElement: HTMLElement;
|
|
26
|
+
toolbarElement: HTMLElement;
|
|
27
|
+
resultsElement: HTMLElement;
|
|
28
|
+
suggestionElement: HTMLElement;
|
|
29
|
+
emptyElement: HTMLElement;
|
|
30
|
+
layout: any;
|
|
31
|
+
options: ISearchOptions;
|
|
32
|
+
queries: ISearchQueries;
|
|
33
|
+
processing: boolean;
|
|
34
|
+
menuObject: MenuComponent | undefined;
|
|
35
|
+
constructor(_element: HTMLElement, _options: ISearchOptions, _queries: ISearchQueries);
|
|
36
|
+
private _getElement;
|
|
37
|
+
private getOption;
|
|
38
|
+
private getResponsiveFormMode;
|
|
39
|
+
private focus;
|
|
40
|
+
private blur;
|
|
41
|
+
private enter;
|
|
42
|
+
private input;
|
|
43
|
+
private handlers;
|
|
44
|
+
update: () => void;
|
|
45
|
+
show: () => void;
|
|
46
|
+
hide: () => void;
|
|
47
|
+
search: () => void;
|
|
48
|
+
complete: () => void;
|
|
49
|
+
clear: () => void;
|
|
50
|
+
isProcessing: () => boolean;
|
|
51
|
+
getQuery: () => string;
|
|
52
|
+
getMenu: () => MenuComponent | undefined;
|
|
53
|
+
getFormElement: () => HTMLFormElement;
|
|
54
|
+
getInputElement(): HTMLInputElement;
|
|
55
|
+
getContentElement(): HTMLElement;
|
|
56
|
+
getElement(): HTMLElement;
|
|
57
|
+
on: (name: string, handler: Function) => void;
|
|
58
|
+
one: (name: string, handler: Function) => void;
|
|
59
|
+
off: (name: string, handlerId: string) => void;
|
|
60
|
+
static getInstance: (el: HTMLElement, componentName?: string) => SearchComponent | null;
|
|
61
|
+
static createInstances: (selector?: string, options?: ISearchOptions, queries?: ISearchQueries) => void;
|
|
62
|
+
static createInsance: (selector?: string, options?: ISearchOptions, queries?: ISearchQueries) => SearchComponent | undefined;
|
|
63
|
+
static bootstrap: (selector?: string) => void;
|
|
64
|
+
static reinitialization: (selector?: string) => void;
|
|
65
|
+
}
|
|
66
|
+
export { SearchComponent, defaultSearchOptions, defaultSearchQueires };
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultSearchQueires = exports.defaultSearchOptions = exports.SearchComponent = void 0;
|
|
4
|
+
var index_1 = require("../_utils/index");
|
|
5
|
+
var MenuComponent_1 = require("./MenuComponent");
|
|
6
|
+
var defaultSearchOptions = {
|
|
7
|
+
minLength: 2,
|
|
8
|
+
keypress: true,
|
|
9
|
+
enter: true,
|
|
10
|
+
layout: 'menu',
|
|
11
|
+
showOnFocus: true, // Always show menu on input focus
|
|
12
|
+
};
|
|
13
|
+
exports.defaultSearchOptions = defaultSearchOptions;
|
|
14
|
+
var defaultSearchQueires = {
|
|
15
|
+
componentName: 'search',
|
|
16
|
+
instanseQuery: '[data-kt-search]',
|
|
17
|
+
attrQuery: 'data-kt-search-',
|
|
18
|
+
};
|
|
19
|
+
exports.defaultSearchQueires = defaultSearchQueires;
|
|
20
|
+
var SearchComponent = /** @class */ (function () {
|
|
21
|
+
function SearchComponent(_element, _options, _queries) {
|
|
22
|
+
var _this = this;
|
|
23
|
+
this.processing = false;
|
|
24
|
+
this._getElement = function (name) {
|
|
25
|
+
return _this.element.querySelector('[data-kt-search-element="' + name + '"]');
|
|
26
|
+
};
|
|
27
|
+
// Get option
|
|
28
|
+
this.getOption = function (name) {
|
|
29
|
+
var attr = _this.element.getAttribute("".concat(_this.queries.attrQuery).concat(name));
|
|
30
|
+
if (attr) {
|
|
31
|
+
var value = (0, index_1.getAttributeValueByBreakpoint)(attr);
|
|
32
|
+
if (value !== null && String(value) === 'true') {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
else if (value !== null && String(value) === 'false') {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
var optionName = (0, index_1.stringSnakeToCamel)(name);
|
|
42
|
+
var option = (0, index_1.getObjectPropertyValueByKey)(_this.options, optionName);
|
|
43
|
+
if (option) {
|
|
44
|
+
return (0, index_1.getAttributeValueByBreakpoint)(option);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
// Check if responsive form mode is enabled
|
|
52
|
+
this.getResponsiveFormMode = function () {
|
|
53
|
+
var responsive = _this.getOption('responsive');
|
|
54
|
+
var width = (0, index_1.getViewPort)().width;
|
|
55
|
+
if (!responsive) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
var breakpoint = (0, index_1.getBreakpoint)(responsive);
|
|
59
|
+
var breakPointNum = -1;
|
|
60
|
+
if (!breakpoint) {
|
|
61
|
+
breakPointNum = parseInt(responsive);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
breakPointNum = +breakpoint;
|
|
65
|
+
}
|
|
66
|
+
if (width < breakPointNum) {
|
|
67
|
+
return 'on';
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
return 'off';
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
// Focus
|
|
74
|
+
this.focus = function () {
|
|
75
|
+
_this.element.classList.add('focus');
|
|
76
|
+
if (_this.getOption('show-on-focus') === true ||
|
|
77
|
+
_this.inputElement.value.length >= _this.options.minLength) {
|
|
78
|
+
_this.show();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
// Blur
|
|
82
|
+
this.blur = function () {
|
|
83
|
+
_this.element.classList.remove('focus');
|
|
84
|
+
};
|
|
85
|
+
// Enter
|
|
86
|
+
this.enter = function (e) {
|
|
87
|
+
var key = e.charCode || e.keyCode || 0;
|
|
88
|
+
if (key === 13) {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
_this.search();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
// Input
|
|
94
|
+
this.input = function () {
|
|
95
|
+
if (_this.getOption('min-length')) {
|
|
96
|
+
var minLength = parseInt(_this.getOption('min-length'));
|
|
97
|
+
if (_this.inputElement.value.length >= minLength) {
|
|
98
|
+
_this.search();
|
|
99
|
+
}
|
|
100
|
+
else if (_this.inputElement.value.length === 0) {
|
|
101
|
+
_this.clear();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
///////////////////////
|
|
106
|
+
// ** Public API ** //
|
|
107
|
+
///////////////////////
|
|
108
|
+
// Update
|
|
109
|
+
this.update = function () {
|
|
110
|
+
// Handle responsive form
|
|
111
|
+
if (_this.layout === 'menu') {
|
|
112
|
+
var responsiveFormMode = _this.getResponsiveFormMode();
|
|
113
|
+
if (responsiveFormMode === 'on' && !_this.contentElement.contains(_this.formElement)) {
|
|
114
|
+
_this.contentElement.prepend(_this.formElement);
|
|
115
|
+
_this.formElement.classList.remove('d-none');
|
|
116
|
+
}
|
|
117
|
+
else if (responsiveFormMode === 'off' && _this.contentElement.contains(_this.formElement)) {
|
|
118
|
+
_this.element.prepend(_this.formElement);
|
|
119
|
+
_this.formElement.classList.add('d-none');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
// Show menu
|
|
124
|
+
this.show = function () {
|
|
125
|
+
if (_this.menuObject) {
|
|
126
|
+
_this.update();
|
|
127
|
+
_this.menuObject.show(_this.element);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
// Hide menu
|
|
131
|
+
this.hide = function () {
|
|
132
|
+
if (_this.menuObject) {
|
|
133
|
+
_this.update();
|
|
134
|
+
_this.menuObject.hide(_this.element);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
// Search
|
|
138
|
+
this.search = function () {
|
|
139
|
+
if (!_this.processing) {
|
|
140
|
+
// Show search spinner
|
|
141
|
+
if (_this.spinnerElement) {
|
|
142
|
+
_this.spinnerElement.classList.remove('d-none');
|
|
143
|
+
}
|
|
144
|
+
// Hide search clear button
|
|
145
|
+
if (_this.clearElement) {
|
|
146
|
+
_this.clearElement.classList.add('d-none');
|
|
147
|
+
}
|
|
148
|
+
// Hide search toolbar
|
|
149
|
+
if (_this.toolbarElement) {
|
|
150
|
+
_this.toolbarElement.classList.add('d-none');
|
|
151
|
+
}
|
|
152
|
+
// Focus input
|
|
153
|
+
_this.inputElement.focus();
|
|
154
|
+
_this.processing = true;
|
|
155
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.search.process', _this);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
// Complete
|
|
159
|
+
this.complete = function () {
|
|
160
|
+
if (_this.spinnerElement) {
|
|
161
|
+
_this.spinnerElement.classList.add('d-none');
|
|
162
|
+
}
|
|
163
|
+
// Show search toolbar
|
|
164
|
+
if (_this.clearElement) {
|
|
165
|
+
_this.clearElement.classList.remove('d-none');
|
|
166
|
+
}
|
|
167
|
+
if (_this.inputElement.value.length === 0) {
|
|
168
|
+
_this.clear();
|
|
169
|
+
}
|
|
170
|
+
// Focus input
|
|
171
|
+
_this.inputElement.focus();
|
|
172
|
+
_this.show();
|
|
173
|
+
_this.processing = false;
|
|
174
|
+
};
|
|
175
|
+
// Clear
|
|
176
|
+
this.clear = function () {
|
|
177
|
+
if (index_1.EventHandlerUtil.trigger(_this.element, 'kt.search.clear') === false) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
// Clear and focus input
|
|
181
|
+
_this.inputElement.value = '';
|
|
182
|
+
_this.inputElement.focus();
|
|
183
|
+
// Hide clear icon
|
|
184
|
+
if (_this.clearElement) {
|
|
185
|
+
_this.clearElement.classList.add('d-none');
|
|
186
|
+
}
|
|
187
|
+
// Show search toolbar
|
|
188
|
+
if (_this.toolbarElement) {
|
|
189
|
+
_this.toolbarElement.classList.remove('d-none');
|
|
190
|
+
}
|
|
191
|
+
// Hide menu
|
|
192
|
+
if (_this.getOption('show-on-focus') === false) {
|
|
193
|
+
_this.hide();
|
|
194
|
+
}
|
|
195
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.search.cleared');
|
|
196
|
+
};
|
|
197
|
+
this.isProcessing = function () {
|
|
198
|
+
return _this.processing;
|
|
199
|
+
};
|
|
200
|
+
this.getQuery = function () {
|
|
201
|
+
return _this.inputElement.value;
|
|
202
|
+
};
|
|
203
|
+
this.getMenu = function () {
|
|
204
|
+
return _this.menuObject;
|
|
205
|
+
};
|
|
206
|
+
this.getFormElement = function () {
|
|
207
|
+
return _this.formElement;
|
|
208
|
+
};
|
|
209
|
+
// Event API
|
|
210
|
+
this.on = function (name, handler) {
|
|
211
|
+
return index_1.EventHandlerUtil.on(_this.element, name, handler);
|
|
212
|
+
};
|
|
213
|
+
this.one = function (name, handler) {
|
|
214
|
+
return index_1.EventHandlerUtil.one(_this.element, name, handler);
|
|
215
|
+
};
|
|
216
|
+
this.off = function (name, handlerId) {
|
|
217
|
+
return index_1.EventHandlerUtil.off(_this.element, name, handlerId);
|
|
218
|
+
};
|
|
219
|
+
// Variables
|
|
220
|
+
this.options = Object.assign(defaultSearchOptions, _options);
|
|
221
|
+
this.queries = _queries;
|
|
222
|
+
// Elements
|
|
223
|
+
this.element = _element;
|
|
224
|
+
this.contentElement = this._getElement('content');
|
|
225
|
+
this.formElement = this._getElement('form');
|
|
226
|
+
this.inputElement = this._getElement('input');
|
|
227
|
+
this.spinnerElement = this._getElement('spinner');
|
|
228
|
+
this.clearElement = this._getElement('clear');
|
|
229
|
+
this.toggleElement = this._getElement('toggle');
|
|
230
|
+
this.submitElement = this._getElement('submit');
|
|
231
|
+
this.toolbarElement = this._getElement('toolbar');
|
|
232
|
+
this.resultsElement = this._getElement('results');
|
|
233
|
+
this.suggestionElement = this._getElement('suggestion');
|
|
234
|
+
this.emptyElement = this._getElement('empty');
|
|
235
|
+
// Layout
|
|
236
|
+
this.layout = this.getOption('layout');
|
|
237
|
+
if (this.layout === 'menu') {
|
|
238
|
+
this.menuObject = new MenuComponent_1.MenuComponent(this.contentElement, MenuComponent_1.defaultMenuOptions);
|
|
239
|
+
}
|
|
240
|
+
// Update
|
|
241
|
+
this.update();
|
|
242
|
+
// Event Handlers
|
|
243
|
+
this.handlers();
|
|
244
|
+
index_1.DataUtil.set(this.element, this.queries.componentName, this);
|
|
245
|
+
}
|
|
246
|
+
SearchComponent.prototype.handlers = function () {
|
|
247
|
+
var _this = this;
|
|
248
|
+
var context = this;
|
|
249
|
+
// Focus
|
|
250
|
+
this.inputElement.addEventListener('focus', this.focus);
|
|
251
|
+
// Blur
|
|
252
|
+
this.inputElement.addEventListener('blur', this.blur);
|
|
253
|
+
// Keypress
|
|
254
|
+
if (this.getOption('keypress') === true) {
|
|
255
|
+
this.inputElement.addEventListener('input', this.input);
|
|
256
|
+
}
|
|
257
|
+
// Submit
|
|
258
|
+
if (this.submitElement) {
|
|
259
|
+
this.submitElement.addEventListener('click', this.search);
|
|
260
|
+
}
|
|
261
|
+
// Enter
|
|
262
|
+
if (this.getOption('enter') === true) {
|
|
263
|
+
this.inputElement.addEventListener('keypress', this.enter);
|
|
264
|
+
}
|
|
265
|
+
// Clear
|
|
266
|
+
if (this.clearElement) {
|
|
267
|
+
this.clearElement.addEventListener('click', this.clear);
|
|
268
|
+
}
|
|
269
|
+
// Menu
|
|
270
|
+
if (this.menuObject) {
|
|
271
|
+
// Toggle menu
|
|
272
|
+
if (this.toggleElement) {
|
|
273
|
+
this.toggleElement.addEventListener('click', this.show);
|
|
274
|
+
this.menuObject.on('kt.menu.dropdown.show', function () {
|
|
275
|
+
// @ts-ignore
|
|
276
|
+
if ((0, index_1.isVisibleElement)(context.toggleElement)) {
|
|
277
|
+
// @ts-ignore
|
|
278
|
+
context.toggleElement.classList.add('active');
|
|
279
|
+
// @ts-ignore
|
|
280
|
+
context.toggleElement.classList.add('show');
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
this.menuObject.on('kt.menu.dropdown.hide', function () {
|
|
284
|
+
// @ts-ignore
|
|
285
|
+
if ((0, index_1.isVisibleElement)(context.toggleElement)) {
|
|
286
|
+
// @ts-ignore
|
|
287
|
+
context.toggleElement.classList.remove('active');
|
|
288
|
+
// @ts-ignore
|
|
289
|
+
context.toggleElement.classList.remove('show');
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
this.menuObject.on('kt.menu.dropdown.shown', function () {
|
|
294
|
+
// @ts-ignore
|
|
295
|
+
context.inputElement.focus();
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
// Window resize handling
|
|
299
|
+
window.addEventListener('resize', function () {
|
|
300
|
+
var timer;
|
|
301
|
+
(0, index_1.throttle)(timer, function () {
|
|
302
|
+
_this.update();
|
|
303
|
+
}, 200);
|
|
304
|
+
});
|
|
305
|
+
};
|
|
306
|
+
SearchComponent.prototype.getInputElement = function () {
|
|
307
|
+
return this.inputElement;
|
|
308
|
+
};
|
|
309
|
+
SearchComponent.prototype.getContentElement = function () {
|
|
310
|
+
return this.contentElement;
|
|
311
|
+
};
|
|
312
|
+
SearchComponent.prototype.getElement = function () {
|
|
313
|
+
return this.element;
|
|
314
|
+
};
|
|
315
|
+
// Static methods
|
|
316
|
+
SearchComponent.getInstance = function (el, componentName) {
|
|
317
|
+
if (componentName === void 0) { componentName = defaultSearchQueires.componentName; }
|
|
318
|
+
var Search = index_1.DataUtil.get(el, componentName);
|
|
319
|
+
if (Search) {
|
|
320
|
+
return Search;
|
|
321
|
+
}
|
|
322
|
+
return null;
|
|
323
|
+
};
|
|
324
|
+
SearchComponent.createInstances = function (selector, options, queries) {
|
|
325
|
+
if (selector === void 0) { selector = defaultSearchQueires.instanseQuery; }
|
|
326
|
+
if (options === void 0) { options = defaultSearchOptions; }
|
|
327
|
+
if (queries === void 0) { queries = defaultSearchQueires; }
|
|
328
|
+
var elements = document.body.querySelectorAll(selector);
|
|
329
|
+
elements.forEach(function (el) {
|
|
330
|
+
var item = el;
|
|
331
|
+
var Search = SearchComponent.getInstance(item);
|
|
332
|
+
if (!Search) {
|
|
333
|
+
Search = new SearchComponent(item, options, queries);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
};
|
|
337
|
+
SearchComponent.createInsance = function (selector, options, queries) {
|
|
338
|
+
if (selector === void 0) { selector = defaultSearchQueires.instanseQuery; }
|
|
339
|
+
if (options === void 0) { options = defaultSearchOptions; }
|
|
340
|
+
if (queries === void 0) { queries = defaultSearchQueires; }
|
|
341
|
+
var element = document.body.querySelector(selector);
|
|
342
|
+
if (!element) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
var item = element;
|
|
346
|
+
var Search = SearchComponent.getInstance(item);
|
|
347
|
+
if (!Search) {
|
|
348
|
+
Search = new SearchComponent(item, options, queries);
|
|
349
|
+
}
|
|
350
|
+
return Search;
|
|
351
|
+
};
|
|
352
|
+
SearchComponent.bootstrap = function (selector) {
|
|
353
|
+
if (selector === void 0) { selector = defaultSearchQueires.instanseQuery; }
|
|
354
|
+
SearchComponent.createInstances(selector);
|
|
355
|
+
};
|
|
356
|
+
SearchComponent.reinitialization = function (selector) {
|
|
357
|
+
if (selector === void 0) { selector = defaultSearchQueires.instanseQuery; }
|
|
358
|
+
SearchComponent.createInstances(selector);
|
|
359
|
+
};
|
|
360
|
+
return SearchComponent;
|
|
361
|
+
}());
|
|
362
|
+
exports.SearchComponent = SearchComponent;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare class CookieComponent {
|
|
2
|
+
/**
|
|
3
|
+
* Returns the cookie with the given name, or undefined if not found
|
|
4
|
+
*
|
|
5
|
+
* @param {string} name - cookie name
|
|
6
|
+
* @returns string | null
|
|
7
|
+
*/
|
|
8
|
+
static get(name: string): string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Please note that a cookie value is encoded,
|
|
11
|
+
* so getCookie uses a built-in decodeURIComponent function to decode it.
|
|
12
|
+
*
|
|
13
|
+
* @param {string} name - cookie name
|
|
14
|
+
* @param {string | number | boolean} value - cookie value
|
|
15
|
+
* @param {any} cookieOptions - cookie options
|
|
16
|
+
* @returns void
|
|
17
|
+
*/
|
|
18
|
+
static set(name: string, value: string | number | boolean, cookieOptions: any): void;
|
|
19
|
+
/**
|
|
20
|
+
* To delete a cookie, we can call it with a negative expiration date
|
|
21
|
+
*
|
|
22
|
+
* @param {string} name
|
|
23
|
+
*/
|
|
24
|
+
static delete(name: string): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.CookieComponent = void 0;
|
|
15
|
+
/* eslint-disable no-useless-escape */
|
|
16
|
+
// DOCS: https://javascript.info/cookie
|
|
17
|
+
var CookieComponent = /** @class */ (function () {
|
|
18
|
+
function CookieComponent() {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Returns the cookie with the given name, or undefined if not found
|
|
22
|
+
*
|
|
23
|
+
* @param {string} name - cookie name
|
|
24
|
+
* @returns string | null
|
|
25
|
+
*/
|
|
26
|
+
CookieComponent.get = function (name) {
|
|
27
|
+
var matches = document.cookie.match(new RegExp('(?:^|; )' + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + '=([^;]*)'));
|
|
28
|
+
return matches ? decodeURIComponent(matches[1]) : undefined;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Please note that a cookie value is encoded,
|
|
32
|
+
* so getCookie uses a built-in decodeURIComponent function to decode it.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} name - cookie name
|
|
35
|
+
* @param {string | number | boolean} value - cookie value
|
|
36
|
+
* @param {any} cookieOptions - cookie options
|
|
37
|
+
* @returns void
|
|
38
|
+
*/
|
|
39
|
+
CookieComponent.set = function (name, value, cookieOptions) {
|
|
40
|
+
var options = __assign({ path: '/' }, cookieOptions);
|
|
41
|
+
if (options.expires instanceof Date) {
|
|
42
|
+
options.expires = options.expires.toUTCString();
|
|
43
|
+
}
|
|
44
|
+
var updatedCookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);
|
|
45
|
+
for (var optionKey in options) {
|
|
46
|
+
updatedCookie += '; ' + optionKey;
|
|
47
|
+
var optionValue = options[optionKey];
|
|
48
|
+
if (optionValue !== true) {
|
|
49
|
+
updatedCookie += '=' + optionValue;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
document.cookie = updatedCookie;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* To delete a cookie, we can call it with a negative expiration date
|
|
56
|
+
*
|
|
57
|
+
* @param {string} name
|
|
58
|
+
*/
|
|
59
|
+
CookieComponent.delete = function (name) {
|
|
60
|
+
CookieComponent.set(name, '', {
|
|
61
|
+
'max-age': -1,
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
return CookieComponent;
|
|
65
|
+
}());
|
|
66
|
+
exports.CookieComponent = CookieComponent;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare class DrawerStore {
|
|
2
|
+
static store: Map<string, DrawerComponent>;
|
|
3
|
+
static set(instanceId: string, drawerComponentObj: DrawerComponent): void;
|
|
4
|
+
static get(instanceId: string): DrawerComponent | undefined;
|
|
5
|
+
static remove(instanceId: string): void;
|
|
6
|
+
static has(instanceId: string): boolean;
|
|
7
|
+
static getAllInstances(): Map<string, DrawerComponent>;
|
|
8
|
+
}
|
|
9
|
+
export interface DrawerOptions {
|
|
10
|
+
overlay: boolean;
|
|
11
|
+
baseClass: string;
|
|
12
|
+
overlayClass: string;
|
|
13
|
+
direction: string;
|
|
14
|
+
}
|
|
15
|
+
declare const defaultDrawerOptions: DrawerOptions;
|
|
16
|
+
declare class DrawerComponent {
|
|
17
|
+
element: HTMLElement;
|
|
18
|
+
overlayElement: HTMLElement | null;
|
|
19
|
+
toggleElement: HTMLElement | null;
|
|
20
|
+
options: DrawerOptions;
|
|
21
|
+
instanceUid: string;
|
|
22
|
+
name: string;
|
|
23
|
+
shown: boolean;
|
|
24
|
+
lastWidth: number;
|
|
25
|
+
closeElement: HTMLElement | null;
|
|
26
|
+
constructor(_element: HTMLElement, options: DrawerOptions);
|
|
27
|
+
private _handlers;
|
|
28
|
+
private _update;
|
|
29
|
+
private _getOption;
|
|
30
|
+
private _toggle;
|
|
31
|
+
private _hide;
|
|
32
|
+
private _show;
|
|
33
|
+
private _createOverlay;
|
|
34
|
+
private _deleteOverlay;
|
|
35
|
+
private _getDirection;
|
|
36
|
+
private _getWidth;
|
|
37
|
+
toggle: () => void;
|
|
38
|
+
show: () => void;
|
|
39
|
+
hide: () => void;
|
|
40
|
+
isShown: () => boolean;
|
|
41
|
+
update: () => void;
|
|
42
|
+
goElement: () => HTMLElement;
|
|
43
|
+
on: (name: string, handler: Function) => void;
|
|
44
|
+
one: (name: string, handler: Function) => void;
|
|
45
|
+
off: (name: string, handerId: string) => void;
|
|
46
|
+
trigger: (name: string, event: Event) => boolean;
|
|
47
|
+
static hasInstace: (elementId: string) => boolean;
|
|
48
|
+
static getInstance: (elementId: string) => DrawerComponent | undefined;
|
|
49
|
+
static hideAll: () => void;
|
|
50
|
+
static updateAll: () => void;
|
|
51
|
+
static createInstances(selector: string): void;
|
|
52
|
+
static handleDismiss: () => void;
|
|
53
|
+
static initGlobalHandlers(): void;
|
|
54
|
+
static bootstrap: () => void;
|
|
55
|
+
static reinitialization: () => void;
|
|
56
|
+
}
|
|
57
|
+
export { DrawerComponent, defaultDrawerOptions };
|