@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,325 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultDrawerOptions = exports.DrawerComponent = exports.DrawerStore = void 0;
|
|
4
|
+
var index_1 = require("../_utils/index");
|
|
5
|
+
var DrawerStore = /** @class */ (function () {
|
|
6
|
+
function DrawerStore() {
|
|
7
|
+
}
|
|
8
|
+
DrawerStore.set = function (instanceId, drawerComponentObj) {
|
|
9
|
+
if (DrawerStore.has(instanceId)) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
DrawerStore.store.set(instanceId, drawerComponentObj);
|
|
13
|
+
};
|
|
14
|
+
DrawerStore.get = function (instanceId) {
|
|
15
|
+
if (!DrawerStore.has(instanceId)) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
return DrawerStore.store.get(instanceId);
|
|
19
|
+
};
|
|
20
|
+
DrawerStore.remove = function (instanceId) {
|
|
21
|
+
if (!DrawerStore.has(instanceId)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
DrawerStore.store.delete(instanceId);
|
|
25
|
+
};
|
|
26
|
+
DrawerStore.has = function (instanceId) {
|
|
27
|
+
return DrawerStore.store.has(instanceId);
|
|
28
|
+
};
|
|
29
|
+
DrawerStore.getAllInstances = function () {
|
|
30
|
+
return DrawerStore.store;
|
|
31
|
+
};
|
|
32
|
+
DrawerStore.store = new Map();
|
|
33
|
+
return DrawerStore;
|
|
34
|
+
}());
|
|
35
|
+
exports.DrawerStore = DrawerStore;
|
|
36
|
+
var defaultDrawerOptions = {
|
|
37
|
+
overlay: true,
|
|
38
|
+
baseClass: 'drawer',
|
|
39
|
+
overlayClass: 'drawer-overlay',
|
|
40
|
+
direction: 'end',
|
|
41
|
+
};
|
|
42
|
+
exports.defaultDrawerOptions = defaultDrawerOptions;
|
|
43
|
+
var DrawerComponent = /** @class */ (function () {
|
|
44
|
+
function DrawerComponent(_element, options) {
|
|
45
|
+
var _this = this;
|
|
46
|
+
this.overlayElement = null;
|
|
47
|
+
this.toggleElement = null;
|
|
48
|
+
this.name = '';
|
|
49
|
+
this.shown = false;
|
|
50
|
+
this.lastWidth = 0;
|
|
51
|
+
this.closeElement = null;
|
|
52
|
+
this._handlers = function () {
|
|
53
|
+
var togglers = _this._getOption('toggle');
|
|
54
|
+
var closers = _this._getOption('close');
|
|
55
|
+
if (togglers !== null && togglers.length > 0) {
|
|
56
|
+
index_1.DOMEventHandlerUtil.on(document.body, togglers, 'click', function (e) {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
_this.toggleElement = document.getElementById(togglers);
|
|
59
|
+
_this._toggle();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
if (closers !== null && closers.length > 0) {
|
|
63
|
+
index_1.DOMEventHandlerUtil.on(document.body, closers, 'click', function (e) {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
_this.closeElement = document.getElementById(closers);
|
|
66
|
+
_this._hide();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
this._update = function () {
|
|
71
|
+
var width = String(_this._getOption('width'));
|
|
72
|
+
var direction = String(_this._getOption('direction'));
|
|
73
|
+
// Reset state
|
|
74
|
+
var hasBaseClass = _this.element.classList.contains("".concat(_this.options.baseClass, "-on"));
|
|
75
|
+
var bodyCanvasAttr = String(document.body.getAttribute("data-kt-drawer-".concat(_this.name, "-")));
|
|
76
|
+
if (hasBaseClass === true && bodyCanvasAttr === 'on') {
|
|
77
|
+
_this.shown = true;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
_this.shown = false;
|
|
81
|
+
}
|
|
82
|
+
// Activate/deactivate
|
|
83
|
+
if (_this._getOption('activate') === true) {
|
|
84
|
+
_this.element.classList.add(_this.options.baseClass);
|
|
85
|
+
_this.element.classList.add("".concat(_this.options.baseClass, "-").concat(direction));
|
|
86
|
+
index_1.ElementStyleUtil.set(_this.element, 'width', width, true);
|
|
87
|
+
_this.lastWidth = parseInt(width);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
index_1.ElementStyleUtil.set(_this.element, 'width', '');
|
|
91
|
+
_this.element.classList.remove(_this.options.baseClass);
|
|
92
|
+
_this.element.classList.remove("".concat(_this.options.baseClass, "-").concat(direction));
|
|
93
|
+
_this._hide();
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
this._getOption = function (name) {
|
|
97
|
+
var attr = _this.element.getAttribute("data-kt-drawer-".concat(name));
|
|
98
|
+
if (attr) {
|
|
99
|
+
var value = (0, index_1.getAttributeValueByBreakpoint)(attr);
|
|
100
|
+
if (value !== null && String(value) === 'true') {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
if (value !== null && String(value) === 'false') {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
var optionName = (0, index_1.stringSnakeToCamel)(name);
|
|
112
|
+
var option = (0, index_1.getObjectPropertyValueByKey)(_this.options, optionName);
|
|
113
|
+
if (option) {
|
|
114
|
+
return (0, index_1.getAttributeValueByBreakpoint)(option);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
this._toggle = function () {
|
|
122
|
+
if (index_1.EventHandlerUtil.trigger(_this.element, 'kt.drawer.toggle') === false) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (_this.shown) {
|
|
126
|
+
_this._hide();
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
_this._show();
|
|
130
|
+
}
|
|
131
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.drawer.toggled');
|
|
132
|
+
};
|
|
133
|
+
this._hide = function () {
|
|
134
|
+
if (index_1.EventHandlerUtil.trigger(_this.element, 'kt.drawer.hide') === false) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
_this.shown = false;
|
|
138
|
+
_this._deleteOverlay();
|
|
139
|
+
document.body.removeAttribute("data-kt-drawer-".concat(_this.name));
|
|
140
|
+
document.body.removeAttribute("data-kt-drawer");
|
|
141
|
+
_this.element.classList.remove("".concat(_this.options.baseClass, "-on"));
|
|
142
|
+
if (_this.toggleElement != null) {
|
|
143
|
+
_this.toggleElement.classList.remove('active');
|
|
144
|
+
}
|
|
145
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.drawer.after.hidden');
|
|
146
|
+
};
|
|
147
|
+
this._show = function () {
|
|
148
|
+
if (index_1.EventHandlerUtil.trigger(_this.element, 'kt.drawer.show') === false) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
_this.shown = true;
|
|
152
|
+
_this._createOverlay();
|
|
153
|
+
document.body.setAttribute("data-kt-drawer-".concat(_this.name), 'on');
|
|
154
|
+
document.body.setAttribute('data-kt-drawer', 'on');
|
|
155
|
+
_this.element.classList.add("".concat(_this.options.baseClass, "-on"));
|
|
156
|
+
if (_this.toggleElement !== null) {
|
|
157
|
+
_this.toggleElement.classList.add('active');
|
|
158
|
+
}
|
|
159
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.drawer.shown');
|
|
160
|
+
};
|
|
161
|
+
this._createOverlay = function () {
|
|
162
|
+
if (_this._getOption('overlay') === true) {
|
|
163
|
+
_this.overlayElement = document.createElement('DIV');
|
|
164
|
+
var elementZIndex = (0, index_1.getCSS)(_this.element, 'z-index');
|
|
165
|
+
if (elementZIndex) {
|
|
166
|
+
var overlayZindex = parseInt(elementZIndex) - 1;
|
|
167
|
+
index_1.ElementStyleUtil.set(_this.overlayElement, 'z-index', overlayZindex); // update
|
|
168
|
+
}
|
|
169
|
+
document.body.append(_this.overlayElement);
|
|
170
|
+
var overlayClassOption = _this._getOption('overlay-class');
|
|
171
|
+
if (overlayClassOption) {
|
|
172
|
+
_this.overlayElement.classList.add(overlayClassOption.toString());
|
|
173
|
+
}
|
|
174
|
+
if (!_this._getOption('permanent')) {
|
|
175
|
+
_this.overlayElement.addEventListener('click', function (e) {
|
|
176
|
+
e.preventDefault();
|
|
177
|
+
_this._hide();
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
this._deleteOverlay = function () {
|
|
183
|
+
if (_this.overlayElement !== null && _this.overlayElement.parentNode) {
|
|
184
|
+
_this.overlayElement.parentNode.removeChild(_this.overlayElement);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
this._getDirection = function () {
|
|
188
|
+
return String(_this._getOption('direction')) === 'left' ? 'left' : 'right';
|
|
189
|
+
};
|
|
190
|
+
this._getWidth = function () {
|
|
191
|
+
var width = _this._getOption('width');
|
|
192
|
+
if (width && width === 'auto') {
|
|
193
|
+
width = (0, index_1.getCSS)(_this.element, 'width');
|
|
194
|
+
}
|
|
195
|
+
return width;
|
|
196
|
+
};
|
|
197
|
+
///////////////////////
|
|
198
|
+
// ** Public API ** //
|
|
199
|
+
///////////////////////
|
|
200
|
+
this.toggle = function () {
|
|
201
|
+
_this._toggle();
|
|
202
|
+
};
|
|
203
|
+
this.show = function () {
|
|
204
|
+
_this._show();
|
|
205
|
+
};
|
|
206
|
+
this.hide = function () {
|
|
207
|
+
_this._hide();
|
|
208
|
+
};
|
|
209
|
+
this.isShown = function () {
|
|
210
|
+
return _this.shown;
|
|
211
|
+
};
|
|
212
|
+
this.update = function () {
|
|
213
|
+
_this._update();
|
|
214
|
+
};
|
|
215
|
+
this.goElement = function () {
|
|
216
|
+
return _this.element;
|
|
217
|
+
};
|
|
218
|
+
// Event API
|
|
219
|
+
this.on = function (name, handler) {
|
|
220
|
+
return index_1.EventHandlerUtil.on(_this.element, name, handler);
|
|
221
|
+
};
|
|
222
|
+
this.one = function (name, handler) {
|
|
223
|
+
return index_1.EventHandlerUtil.one(_this.element, name, handler);
|
|
224
|
+
};
|
|
225
|
+
this.off = function (name, handerId) {
|
|
226
|
+
return index_1.EventHandlerUtil.off(_this.element, name, handerId);
|
|
227
|
+
};
|
|
228
|
+
this.trigger = function (name, event) {
|
|
229
|
+
return index_1.EventHandlerUtil.trigger(_this.element, name, event);
|
|
230
|
+
};
|
|
231
|
+
this.element = _element;
|
|
232
|
+
this.options = Object.assign(defaultDrawerOptions, options);
|
|
233
|
+
this.instanceUid = (0, index_1.getUniqueIdWithPrefix)('drawer');
|
|
234
|
+
this.overlayElement = null;
|
|
235
|
+
this.name = this.element.getAttribute('data-kt-drawer-name') || '';
|
|
236
|
+
this.shown = false;
|
|
237
|
+
this.toggleElement = null;
|
|
238
|
+
// Event Handlers
|
|
239
|
+
this._handlers();
|
|
240
|
+
// Update Instance
|
|
241
|
+
this._update();
|
|
242
|
+
// Bind Instance
|
|
243
|
+
DrawerStore.set(this.element.id, this);
|
|
244
|
+
}
|
|
245
|
+
// Create Instances
|
|
246
|
+
DrawerComponent.createInstances = function (selector) {
|
|
247
|
+
var elements = document.body.querySelectorAll(selector);
|
|
248
|
+
elements.forEach(function (element) {
|
|
249
|
+
var item = element;
|
|
250
|
+
var drawer = DrawerComponent.getInstance(item.id);
|
|
251
|
+
if (!drawer) {
|
|
252
|
+
drawer = new DrawerComponent(item, defaultDrawerOptions);
|
|
253
|
+
}
|
|
254
|
+
drawer.element = item;
|
|
255
|
+
drawer.hide();
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
// Global Initialization
|
|
259
|
+
DrawerComponent.initGlobalHandlers = function () {
|
|
260
|
+
// Window Resize Handling
|
|
261
|
+
window.addEventListener('resize', function () {
|
|
262
|
+
var timer;
|
|
263
|
+
(0, index_1.throttle)(timer, function () {
|
|
264
|
+
// Locate and update Drawer instances on window resize
|
|
265
|
+
var elements = document.body.querySelectorAll('[data-kt-drawer="true"]');
|
|
266
|
+
elements.forEach(function (el) {
|
|
267
|
+
var item = el;
|
|
268
|
+
var instance = DrawerComponent.getInstance(item.id);
|
|
269
|
+
if (instance) {
|
|
270
|
+
instance.element = item;
|
|
271
|
+
instance.update();
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
}, 200);
|
|
275
|
+
});
|
|
276
|
+
};
|
|
277
|
+
var _a;
|
|
278
|
+
_a = DrawerComponent;
|
|
279
|
+
// Static methods
|
|
280
|
+
DrawerComponent.hasInstace = function (elementId) {
|
|
281
|
+
return DrawerStore.has(elementId);
|
|
282
|
+
};
|
|
283
|
+
DrawerComponent.getInstance = function (elementId) {
|
|
284
|
+
return DrawerStore.get(elementId);
|
|
285
|
+
};
|
|
286
|
+
DrawerComponent.hideAll = function () {
|
|
287
|
+
var oldInstances = DrawerStore.getAllInstances();
|
|
288
|
+
oldInstances.forEach(function (dr) {
|
|
289
|
+
dr.hide();
|
|
290
|
+
});
|
|
291
|
+
};
|
|
292
|
+
DrawerComponent.updateAll = function () {
|
|
293
|
+
var oldInstances = DrawerStore.getAllInstances();
|
|
294
|
+
oldInstances.forEach(function (dr) {
|
|
295
|
+
dr.update();
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
// Dismiss instances
|
|
299
|
+
DrawerComponent.handleDismiss = function () {
|
|
300
|
+
// External drawer toggle handler
|
|
301
|
+
index_1.DOMEventHandlerUtil.on(document.body, '[data-kt-drawer-dismiss="true"]', 'click', function () {
|
|
302
|
+
/* @ts-ignore */
|
|
303
|
+
var element = _a.closest('[data-kt-drawer="true"]');
|
|
304
|
+
if (element) {
|
|
305
|
+
var drawer = DrawerComponent.getInstance(element);
|
|
306
|
+
if (drawer && drawer.isShown()) {
|
|
307
|
+
drawer.hide();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
DrawerComponent.bootstrap = function () {
|
|
313
|
+
DrawerComponent.createInstances('[data-kt-drawer="true"]');
|
|
314
|
+
DrawerComponent.initGlobalHandlers();
|
|
315
|
+
DrawerComponent.handleDismiss();
|
|
316
|
+
};
|
|
317
|
+
DrawerComponent.reinitialization = function () {
|
|
318
|
+
DrawerComponent.createInstances('[data-kt-drawer="true"]');
|
|
319
|
+
DrawerComponent.hideAll();
|
|
320
|
+
DrawerComponent.updateAll();
|
|
321
|
+
DrawerComponent.handleDismiss();
|
|
322
|
+
};
|
|
323
|
+
return DrawerComponent;
|
|
324
|
+
}());
|
|
325
|
+
exports.DrawerComponent = DrawerComponent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface FeedbackOptions {
|
|
2
|
+
width?: number;
|
|
3
|
+
placement?: string;
|
|
4
|
+
content?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const defaultFeedbackOptions: FeedbackOptions;
|
|
8
|
+
declare class FeedbackComponent {
|
|
9
|
+
element: HTMLElement;
|
|
10
|
+
options: FeedbackOptions;
|
|
11
|
+
instanceUid: string;
|
|
12
|
+
shown: boolean;
|
|
13
|
+
constructor(_element: HTMLElement, options: FeedbackOptions);
|
|
14
|
+
private _handlers;
|
|
15
|
+
private _go;
|
|
16
|
+
private showPopup;
|
|
17
|
+
private setPopupTopCenterPosition;
|
|
18
|
+
private hidePopup;
|
|
19
|
+
show: () => this | undefined;
|
|
20
|
+
hide: () => this | undefined;
|
|
21
|
+
isShown: () => any;
|
|
22
|
+
getElement: () => HTMLElement;
|
|
23
|
+
on: (name: string, handler: Function) => void;
|
|
24
|
+
one: (name: string, handler: Function) => void;
|
|
25
|
+
off: (name: string, handerId: string) => void;
|
|
26
|
+
trigger: (name: string, event: Event) => boolean;
|
|
27
|
+
static createInstances(selector: string): void;
|
|
28
|
+
static hasInstace(element: HTMLElement): void;
|
|
29
|
+
static getInstance(element: HTMLElement): void;
|
|
30
|
+
static bootstrap(attr?: string): void;
|
|
31
|
+
}
|
|
32
|
+
export { FeedbackComponent, defaultFeedbackOptions };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultFeedbackOptions = exports.FeedbackComponent = void 0;
|
|
4
|
+
var index_1 = require("../_utils/index");
|
|
5
|
+
var defaultFeedbackOptions = {
|
|
6
|
+
width: 100,
|
|
7
|
+
placement: 'top-center',
|
|
8
|
+
content: '',
|
|
9
|
+
type: 'popup',
|
|
10
|
+
};
|
|
11
|
+
exports.defaultFeedbackOptions = defaultFeedbackOptions;
|
|
12
|
+
var FeedbackComponent = /** @class */ (function () {
|
|
13
|
+
function FeedbackComponent(_element, options) {
|
|
14
|
+
var _this = this;
|
|
15
|
+
this._handlers = function () {
|
|
16
|
+
_this.element.addEventListener('click', function (e) {
|
|
17
|
+
e.preventDefault();
|
|
18
|
+
_this._go();
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
this._go = function () { };
|
|
22
|
+
this.showPopup = function () {
|
|
23
|
+
_this.element = document.createElement('DIV');
|
|
24
|
+
_this.element.classList.add('feedback feedback-popup');
|
|
25
|
+
_this.element.innerHTML = _this.options.content || '';
|
|
26
|
+
if (_this.options.placement === 'top-center') {
|
|
27
|
+
_this.setPopupTopCenterPosition();
|
|
28
|
+
}
|
|
29
|
+
document.body.appendChild(_this.element);
|
|
30
|
+
_this.element.classList.add('feedback-shown');
|
|
31
|
+
_this.shown = true;
|
|
32
|
+
};
|
|
33
|
+
this.setPopupTopCenterPosition = function () {
|
|
34
|
+
var _a;
|
|
35
|
+
var width = (0, index_1.getAttributeValueByBreakpoint)(((_a = _this.options.width) === null || _a === void 0 ? void 0 : _a.toString()) || '0');
|
|
36
|
+
var height = index_1.ElementStyleUtil.get(_this.element, 'height');
|
|
37
|
+
_this.element.classList.add('feedback-top-center');
|
|
38
|
+
index_1.ElementStyleUtil.set(_this.element, 'width', width);
|
|
39
|
+
index_1.ElementStyleUtil.set(_this.element, 'left', '50%');
|
|
40
|
+
index_1.ElementStyleUtil.set(_this.element, 'top', '-' + height);
|
|
41
|
+
};
|
|
42
|
+
this.hidePopup = function () {
|
|
43
|
+
_this.element.remove();
|
|
44
|
+
};
|
|
45
|
+
///////////////////////
|
|
46
|
+
// ** Public API ** //
|
|
47
|
+
///////////////////////
|
|
48
|
+
this.show = function () {
|
|
49
|
+
if (index_1.EventHandlerUtil.trigger(_this.element, 'kt.feedback.show') === false) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (_this.options.type === 'popup') {
|
|
53
|
+
_this.showPopup();
|
|
54
|
+
}
|
|
55
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.feedback.shown');
|
|
56
|
+
return _this;
|
|
57
|
+
};
|
|
58
|
+
this.hide = function () {
|
|
59
|
+
if (index_1.EventHandlerUtil.trigger(_this.element, 'kt.feedback.hide') === false) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (_this.options.type === 'popup') {
|
|
63
|
+
_this.hidePopup();
|
|
64
|
+
}
|
|
65
|
+
_this.shown = false;
|
|
66
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.feedback.hidden');
|
|
67
|
+
return _this;
|
|
68
|
+
};
|
|
69
|
+
this.isShown = function () {
|
|
70
|
+
return _this.isShown;
|
|
71
|
+
};
|
|
72
|
+
this.getElement = function () {
|
|
73
|
+
return _this.element;
|
|
74
|
+
};
|
|
75
|
+
// Event API
|
|
76
|
+
this.on = function (name, handler) {
|
|
77
|
+
return index_1.EventHandlerUtil.on(_this.element, name, handler);
|
|
78
|
+
};
|
|
79
|
+
this.one = function (name, handler) {
|
|
80
|
+
return index_1.EventHandlerUtil.one(_this.element, name, handler);
|
|
81
|
+
};
|
|
82
|
+
this.off = function (name, handerId) {
|
|
83
|
+
return index_1.EventHandlerUtil.off(_this.element, name, handerId);
|
|
84
|
+
};
|
|
85
|
+
this.trigger = function (name, event) {
|
|
86
|
+
return index_1.EventHandlerUtil.trigger(_this.element, name, event);
|
|
87
|
+
};
|
|
88
|
+
this.element = _element;
|
|
89
|
+
this.options = Object.assign(defaultFeedbackOptions, options);
|
|
90
|
+
this.instanceUid = (0, index_1.getUniqueIdWithPrefix)('feedback');
|
|
91
|
+
this.shown = false;
|
|
92
|
+
// Event handlers
|
|
93
|
+
this._handlers(); // will add in the show popup
|
|
94
|
+
index_1.DataUtil.set(this.element, 'feedback', this);
|
|
95
|
+
}
|
|
96
|
+
// Create Instances
|
|
97
|
+
FeedbackComponent.createInstances = function (selector) {
|
|
98
|
+
throw new Error('not implemented');
|
|
99
|
+
};
|
|
100
|
+
// Static methods
|
|
101
|
+
FeedbackComponent.hasInstace = function (element) {
|
|
102
|
+
throw new Error('not implemented');
|
|
103
|
+
};
|
|
104
|
+
FeedbackComponent.getInstance = function (element) {
|
|
105
|
+
throw new Error('not implemented');
|
|
106
|
+
};
|
|
107
|
+
FeedbackComponent.bootstrap = function (attr) {
|
|
108
|
+
if (attr === void 0) { attr = '[data-Feedback]'; }
|
|
109
|
+
throw new Error('not implemented');
|
|
110
|
+
};
|
|
111
|
+
return FeedbackComponent;
|
|
112
|
+
}());
|
|
113
|
+
exports.FeedbackComponent = FeedbackComponent;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface IImageInputOptions {
|
|
2
|
+
}
|
|
3
|
+
export interface IImageInputQueries {
|
|
4
|
+
componentName: string;
|
|
5
|
+
instanseQuery: string;
|
|
6
|
+
inputQuery: string;
|
|
7
|
+
wrapperQuery: string;
|
|
8
|
+
cancelQuery: string;
|
|
9
|
+
removeQuery: string;
|
|
10
|
+
hiddenQuery: string;
|
|
11
|
+
}
|
|
12
|
+
declare const defaultImageInputOptions: {};
|
|
13
|
+
declare const defaultImageInputQueires: IImageInputQueries;
|
|
14
|
+
declare class ImageInputComponent {
|
|
15
|
+
element: HTMLElement;
|
|
16
|
+
inputElement: HTMLInputElement | null;
|
|
17
|
+
wrapperElement: HTMLElement | null;
|
|
18
|
+
cancelElement: HTMLElement | null;
|
|
19
|
+
removeElement: HTMLElement | null;
|
|
20
|
+
hiddenElement: HTMLInputElement | null;
|
|
21
|
+
src: string;
|
|
22
|
+
options: IImageInputOptions;
|
|
23
|
+
queries: IImageInputQueries;
|
|
24
|
+
uid: string;
|
|
25
|
+
value: string;
|
|
26
|
+
constructor(_element: HTMLElement, _options: IImageInputOptions, _queries: IImageInputQueries);
|
|
27
|
+
private handlers;
|
|
28
|
+
private _change;
|
|
29
|
+
private _cancel;
|
|
30
|
+
private _remove;
|
|
31
|
+
getInputElement(): HTMLInputElement | null;
|
|
32
|
+
getElement(): HTMLElement;
|
|
33
|
+
on: (name: string, handler: Function) => void;
|
|
34
|
+
one: (name: string, handler: Function) => void;
|
|
35
|
+
off: (name: string, handlerId: string) => void;
|
|
36
|
+
trigger: (name: string, event: Event) => boolean;
|
|
37
|
+
static getInstance: (el: HTMLElement, componentName?: string) => ImageInputComponent | undefined;
|
|
38
|
+
static createInstances: (selector?: string, options?: IImageInputOptions, queries?: IImageInputQueries) => void;
|
|
39
|
+
static createInsance: (selector?: string, options?: IImageInputOptions, queries?: IImageInputQueries) => ImageInputComponent | undefined;
|
|
40
|
+
static bootstrap: (selector?: string) => void;
|
|
41
|
+
static reinitialization: (selector?: string) => void;
|
|
42
|
+
}
|
|
43
|
+
export { ImageInputComponent, defaultImageInputOptions, defaultImageInputQueires };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultImageInputQueires = exports.defaultImageInputOptions = exports.ImageInputComponent = void 0;
|
|
4
|
+
var index_1 = require("../_utils/index");
|
|
5
|
+
var defaultImageInputOptions = {};
|
|
6
|
+
exports.defaultImageInputOptions = defaultImageInputOptions;
|
|
7
|
+
var defaultImageInputQueires = {
|
|
8
|
+
componentName: 'image-input',
|
|
9
|
+
instanseQuery: '[data-kt-image-input]',
|
|
10
|
+
inputQuery: 'input[type="file"]',
|
|
11
|
+
wrapperQuery: '.image-input-wrapper',
|
|
12
|
+
cancelQuery: '[data-kt-image-input-action="cancel"]',
|
|
13
|
+
removeQuery: '[data-kt-image-input-action="remove"]',
|
|
14
|
+
hiddenQuery: 'input[type="hidden"]',
|
|
15
|
+
};
|
|
16
|
+
exports.defaultImageInputQueires = defaultImageInputQueires;
|
|
17
|
+
var ImageInputComponent = /** @class */ (function () {
|
|
18
|
+
function ImageInputComponent(_element, _options, _queries) {
|
|
19
|
+
var _this = this;
|
|
20
|
+
this.src = '';
|
|
21
|
+
this.value = '';
|
|
22
|
+
// Event Handlers
|
|
23
|
+
this._change = function (e) {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
if (_this.inputElement !== null && _this.inputElement.files && _this.inputElement.files[0]) {
|
|
26
|
+
// Fire change event
|
|
27
|
+
if (index_1.EventHandlerUtil.trigger(_this.element, 'kt.imageinput.change', e) === false) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
var reader = new FileReader();
|
|
31
|
+
reader.onload = function (e) {
|
|
32
|
+
if (_this.wrapperElement && e.target) {
|
|
33
|
+
_this.wrapperElement.style.setProperty('background-image', "url('".concat(e.target.result, "')"));
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
reader.readAsDataURL(_this.inputElement.files[0]);
|
|
37
|
+
_this.element.classList.add('image-input-changed');
|
|
38
|
+
_this.element.classList.remove('image-input-empty');
|
|
39
|
+
// Fire removed event
|
|
40
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.imageinput.changed', e);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
this._cancel = function (e) {
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
// Fire cancel event
|
|
46
|
+
if (index_1.EventHandlerUtil.trigger(_this.element, 'kt.imageinput.cancel', e) === false) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
_this.element.classList.remove('image-input-changed');
|
|
50
|
+
_this.element.classList.remove('image-input-empty');
|
|
51
|
+
_this.element.style.setProperty('background-image', _this.src);
|
|
52
|
+
if (_this.inputElement) {
|
|
53
|
+
_this.inputElement.value = '';
|
|
54
|
+
}
|
|
55
|
+
if (_this.hiddenElement !== null) {
|
|
56
|
+
_this.hiddenElement.value = '0';
|
|
57
|
+
}
|
|
58
|
+
// Fire canceled event
|
|
59
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.imageinput.canceled', e);
|
|
60
|
+
};
|
|
61
|
+
this._remove = function (e) {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
// Fire remove event
|
|
64
|
+
if (index_1.EventHandlerUtil.trigger(_this.element, 'kt.imageinput.remove', e) === false) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
_this.element.classList.remove('image-input-changed');
|
|
68
|
+
_this.element.classList.add('image-input-empty');
|
|
69
|
+
if (_this.wrapperElement) {
|
|
70
|
+
_this.wrapperElement.style.setProperty('background-image', 'none');
|
|
71
|
+
}
|
|
72
|
+
if (_this.inputElement) {
|
|
73
|
+
_this.inputElement.value = '';
|
|
74
|
+
}
|
|
75
|
+
if (_this.hiddenElement !== null) {
|
|
76
|
+
_this.hiddenElement.value = '1';
|
|
77
|
+
}
|
|
78
|
+
// Fire removed event
|
|
79
|
+
index_1.EventHandlerUtil.trigger(_this.element, 'kt.imageinput.removed', e);
|
|
80
|
+
};
|
|
81
|
+
// Event API
|
|
82
|
+
this.on = function (name, handler) {
|
|
83
|
+
return index_1.EventHandlerUtil.on(_this.element, name, handler);
|
|
84
|
+
};
|
|
85
|
+
this.one = function (name, handler) {
|
|
86
|
+
return index_1.EventHandlerUtil.one(_this.element, name, handler);
|
|
87
|
+
};
|
|
88
|
+
this.off = function (name, handlerId) {
|
|
89
|
+
return index_1.EventHandlerUtil.off(_this.element, name, handlerId);
|
|
90
|
+
};
|
|
91
|
+
this.trigger = function (name, event) {
|
|
92
|
+
return index_1.EventHandlerUtil.trigger(_this.element, name, event);
|
|
93
|
+
};
|
|
94
|
+
// Variables
|
|
95
|
+
this.options = Object.assign(defaultImageInputOptions, _options);
|
|
96
|
+
this.queries = _queries;
|
|
97
|
+
this.uid = (0, index_1.getUniqueIdWithPrefix)(this.queries.componentName);
|
|
98
|
+
// Elements
|
|
99
|
+
this.element = _element;
|
|
100
|
+
this.inputElement = this.element.querySelector(this.queries.inputQuery);
|
|
101
|
+
this.wrapperElement = this.element.querySelector(this.queries.wrapperQuery);
|
|
102
|
+
this.cancelElement = this.element.querySelector(this.queries.cancelQuery);
|
|
103
|
+
this.removeElement = this.element.querySelector(this.queries.removeQuery);
|
|
104
|
+
this.hiddenElement = this.element.querySelector(this.queries.hiddenQuery);
|
|
105
|
+
if (this.wrapperElement) {
|
|
106
|
+
this.src = (0, index_1.getCSS)(this.wrapperElement, 'backgroundImage');
|
|
107
|
+
}
|
|
108
|
+
// Event Handlers
|
|
109
|
+
this.handlers();
|
|
110
|
+
index_1.DataUtil.set(this.element, this.queries.componentName, this);
|
|
111
|
+
}
|
|
112
|
+
ImageInputComponent.prototype.handlers = function () {
|
|
113
|
+
this.element.addEventListener('change', this._change);
|
|
114
|
+
if (this.cancelElement) {
|
|
115
|
+
this.cancelElement.addEventListener('click', this._cancel);
|
|
116
|
+
}
|
|
117
|
+
if (this.removeElement) {
|
|
118
|
+
this.removeElement.addEventListener('click', this._cancel);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
///////////////////////
|
|
122
|
+
// ** Public API ** //
|
|
123
|
+
///////////////////////
|
|
124
|
+
ImageInputComponent.prototype.getInputElement = function () {
|
|
125
|
+
return this.inputElement;
|
|
126
|
+
};
|
|
127
|
+
ImageInputComponent.prototype.getElement = function () {
|
|
128
|
+
return this.element;
|
|
129
|
+
};
|
|
130
|
+
// Static methods
|
|
131
|
+
ImageInputComponent.getInstance = function (el, componentName) {
|
|
132
|
+
if (componentName === void 0) { componentName = defaultImageInputQueires.componentName; }
|
|
133
|
+
var ImageInput = index_1.DataUtil.get(el, componentName);
|
|
134
|
+
if (ImageInput) {
|
|
135
|
+
return ImageInput;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
ImageInputComponent.createInstances = function (selector, options, queries) {
|
|
139
|
+
if (selector === void 0) { selector = defaultImageInputQueires.instanseQuery; }
|
|
140
|
+
if (options === void 0) { options = defaultImageInputOptions; }
|
|
141
|
+
if (queries === void 0) { queries = defaultImageInputQueires; }
|
|
142
|
+
var elements = document.body.querySelectorAll(selector);
|
|
143
|
+
elements.forEach(function (el) {
|
|
144
|
+
var item = el;
|
|
145
|
+
var ImageInput = ImageInputComponent.getInstance(item);
|
|
146
|
+
if (!ImageInput) {
|
|
147
|
+
ImageInput = new ImageInputComponent(item, options, queries);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
ImageInputComponent.createInsance = function (selector, options, queries) {
|
|
152
|
+
if (selector === void 0) { selector = defaultImageInputQueires.instanseQuery; }
|
|
153
|
+
if (options === void 0) { options = defaultImageInputOptions; }
|
|
154
|
+
if (queries === void 0) { queries = defaultImageInputQueires; }
|
|
155
|
+
var element = document.body.querySelector(selector);
|
|
156
|
+
if (!element) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
var item = element;
|
|
160
|
+
var ImageInput = ImageInputComponent.getInstance(item);
|
|
161
|
+
if (!ImageInput) {
|
|
162
|
+
ImageInput = new ImageInputComponent(item, options, queries);
|
|
163
|
+
}
|
|
164
|
+
return ImageInput;
|
|
165
|
+
};
|
|
166
|
+
ImageInputComponent.bootstrap = function (selector) {
|
|
167
|
+
if (selector === void 0) { selector = defaultImageInputQueires.instanseQuery; }
|
|
168
|
+
ImageInputComponent.createInstances(selector);
|
|
169
|
+
};
|
|
170
|
+
ImageInputComponent.reinitialization = function (selector) {
|
|
171
|
+
if (selector === void 0) { selector = defaultImageInputQueires.instanseQuery; }
|
|
172
|
+
ImageInputComponent.createInstances(selector);
|
|
173
|
+
};
|
|
174
|
+
return ImageInputComponent;
|
|
175
|
+
}());
|
|
176
|
+
exports.ImageInputComponent = ImageInputComponent;
|