aril 0.0.6 → 0.0.8
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 +48 -48
- package/esm2022/http/index.mjs +1 -1
- package/esm2022/http/lib/enums.mjs +7 -6
- package/esm2022/http/lib/interfaces.mjs +10 -31
- package/esm2022/http/src/httpClient.mjs +3 -3
- package/esm2022/http/src/serviceBase.mjs +25 -27
- package/esm2022/http/src/serviceStateMethods.mjs +3 -3
- package/esm2022/public-api.mjs +2 -2
- package/esm2022/theme/layout/app/breadcrumb/app.breadcrumb.component.mjs +41 -0
- package/esm2022/theme/layout/app/config/app.config.component.mjs +132 -0
- package/esm2022/theme/layout/app/layout/app.layout.component.mjs +137 -0
- package/esm2022/theme/layout/app/menu/app.menu.component.mjs +381 -0
- package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +25 -0
- package/esm2022/theme/layout/app/sidebar/app.sidebar.component.mjs +41 -0
- package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +29 -0
- package/esm2022/theme/layout/aril-theme-layout.mjs +5 -0
- package/esm2022/theme/layout/index.mjs +2 -0
- package/esm2022/theme/layout/service/app.layout.service.mjs +127 -0
- package/esm2022/theme/layout/service/app.menu.service.mjs +27 -0
- package/esm2022/theme/layout/service/menuchangeevent.mjs +2 -0
- package/esm2022/ui/badge/index.mjs +1 -1
- package/esm2022/ui/badge/src/badge.component.mjs +3 -3
- package/esm2022/ui/button/index.mjs +1 -1
- package/esm2022/ui/button/src/button.component.mjs +2 -2
- package/esm2022/ui/button/src/split-button.component.mjs +3 -3
- package/esm2022/ui/calendar/index.mjs +1 -1
- package/esm2022/ui/calendar/src/calendar.component.mjs +26 -13
- package/esm2022/ui/checkbox/index.mjs +1 -1
- package/esm2022/ui/checkbox/src/check-box.component.mjs +5 -5
- package/esm2022/ui/checkbox/src/tri-state-checkbox.component.mjs +5 -5
- package/esm2022/ui/dxField/index.mjs +1 -1
- package/esm2022/ui/dxField/src/dx-field.component.mjs +5 -5
- package/esm2022/ui/field/index.mjs +1 -1
- package/esm2022/ui/field/src/field.component.mjs +11 -9
- package/esm2022/ui/fileUpload/index.mjs +1 -1
- package/esm2022/ui/fileUpload/src/file-upload.component.mjs +11 -11
- package/esm2022/ui/form/index.mjs +20 -13
- package/esm2022/ui/form/src/form-submit-button.component.mjs +4 -3
- package/esm2022/ui/form/src/form.component.mjs +4 -4
- package/esm2022/ui/index.mjs +2 -2
- package/esm2022/ui/lib/index.mjs +1 -1
- package/esm2022/ui/lib/src/form/form-error-message.component.mjs +9 -9
- package/esm2022/ui/lib/src/form/form-error-message.directive.mjs +1 -1
- package/esm2022/ui/lib/src/form/form-field-builder.mjs +4 -4
- package/esm2022/ui/lib/src/form/form-validation.mjs +3 -3
- package/esm2022/ui/lib/src/grid/flex-grid.directive.mjs +2 -2
- package/esm2022/ui/lib/src/input/baseInput.mjs +4 -4
- package/esm2022/ui/lib/src/input/common-input-validators.service.mjs +6 -6
- package/esm2022/ui/lib/src/input/dx-input-error-message.pipe.mjs +3 -3
- package/esm2022/ui/lib/src/input/input-disabled.directive.mjs +1 -1
- package/esm2022/ui/lib/src/input/input-error-message.pipe.mjs +3 -2
- package/esm2022/ui/lib/src/input/input-transforms.mjs +1 -1
- package/esm2022/ui/lib/src/input/value-accessor.directive.mjs +12 -6
- package/esm2022/ui/mask/index.mjs +1 -1
- package/esm2022/ui/mask/src/mask.component.mjs +9 -9
- package/esm2022/ui/number/index.mjs +1 -1
- package/esm2022/ui/number/src/number.component.mjs +10 -10
- package/esm2022/ui/overlayPanel/index.mjs +1 -1
- package/esm2022/ui/overlayPanel/src/overlay-panel.component.mjs +4 -7
- package/esm2022/ui/panel/index.mjs +1 -1
- package/esm2022/ui/panel/src/panel.component.mjs +4 -4
- package/esm2022/ui/password/index.mjs +1 -1
- package/esm2022/ui/password/src/password.component.mjs +6 -6
- package/esm2022/ui/radioButton/index.mjs +1 -1
- package/esm2022/ui/radioButton/src/radio-button.component.mjs +7 -7
- package/esm2022/ui/selectBox/index.mjs +1 -1
- package/esm2022/ui/selectBox/src/select-box.component.mjs +7 -7
- package/esm2022/ui/switch/index.mjs +1 -1
- package/esm2022/ui/switch/src/switch.component.mjs +6 -6
- package/esm2022/ui/table/index.mjs +24 -17
- package/esm2022/ui/table/src/i18n.mjs +53 -90
- package/esm2022/ui/table/src/table-column.component.mjs +8 -10
- package/esm2022/ui/table/src/table.component.mjs +26 -41
- package/esm2022/ui/tagBox/index.mjs +1 -1
- package/esm2022/ui/tagBox/src/tag-box.component.mjs +12 -12
- package/esm2022/ui/text/index.mjs +1 -1
- package/esm2022/ui/text/src/text.component.mjs +4 -4
- package/esm2022/ui/textArea/index.mjs +1 -1
- package/esm2022/ui/textArea/src/text-area.component.mjs +3 -3
- package/esm2022/ui/tree/index.mjs +1 -1
- package/esm2022/ui/tree/src/tree.component.mjs +29 -45
- package/esm2022/ui/treeTable/index.mjs +1 -1
- package/esm2022/ui/treeTable/src/tree-table.component.mjs +39 -43
- package/esm2022/ui/value/index.mjs +1 -1
- package/esm2022/ui/value/src/value.component.mjs +13 -13
- package/esm2022/util/index.mjs +2 -2
- package/esm2022/util/init-event/index.mjs +1 -1
- package/esm2022/util/init-event/src/init-event.directive.mjs +1 -1
- package/esm2022/util/lib/index.mjs +1 -1
- package/esm2022/util/lib/src/interfaces.mjs +1 -1
- package/esm2022/util/lib/src/types.mjs +1 -1
- package/esm2022/util/primitive-extensions/index.mjs +5 -5
- package/esm2022/util/primitive-extensions/src/boolean.extensions.mjs +1 -1
- package/esm2022/util/primitive-extensions/src/date.extensions.mjs +68 -47
- package/esm2022/util/primitive-extensions/src/number.extensions.mjs +13 -7
- package/esm2022/util/primitive-extensions/src/string.extensions.mjs +4 -4
- package/esm2022/util/pub-sub/index.mjs +1 -1
- package/esm2022/util/pub-sub/src/pub-sub.service.mjs +7 -5
- package/fesm2022/aril-http.mjs +39 -60
- package/fesm2022/aril-http.mjs.map +1 -1
- package/fesm2022/aril-theme-layout.mjs +899 -0
- package/fesm2022/aril-theme-layout.mjs.map +1 -0
- package/fesm2022/aril-ui-badge.mjs +2 -2
- package/fesm2022/aril-ui-badge.mjs.map +1 -1
- package/fesm2022/aril-ui-button.mjs +3 -3
- package/fesm2022/aril-ui-button.mjs.map +1 -1
- package/fesm2022/aril-ui-calendar.mjs +24 -11
- package/fesm2022/aril-ui-calendar.mjs.map +1 -1
- package/fesm2022/aril-ui-checkbox.mjs +8 -8
- package/fesm2022/aril-ui-checkbox.mjs.map +1 -1
- package/fesm2022/aril-ui-dxField.mjs +4 -4
- package/fesm2022/aril-ui-dxField.mjs.map +1 -1
- package/fesm2022/aril-ui-field.mjs +9 -7
- package/fesm2022/aril-ui-field.mjs.map +1 -1
- package/fesm2022/aril-ui-fileUpload.mjs +10 -10
- package/fesm2022/aril-ui-fileUpload.mjs.map +1 -1
- package/fesm2022/aril-ui-form.mjs +23 -20
- package/fesm2022/aril-ui-form.mjs.map +1 -1
- package/fesm2022/aril-ui-lib.mjs +30 -23
- package/fesm2022/aril-ui-lib.mjs.map +1 -1
- package/fesm2022/aril-ui-mask.mjs +10 -10
- package/fesm2022/aril-ui-mask.mjs.map +1 -1
- package/fesm2022/aril-ui-number.mjs +11 -11
- package/fesm2022/aril-ui-number.mjs.map +1 -1
- package/fesm2022/aril-ui-overlayPanel.mjs +2 -5
- package/fesm2022/aril-ui-overlayPanel.mjs.map +1 -1
- package/fesm2022/aril-ui-panel.mjs +2 -2
- package/fesm2022/aril-ui-panel.mjs.map +1 -1
- package/fesm2022/aril-ui-password.mjs +6 -6
- package/fesm2022/aril-ui-password.mjs.map +1 -1
- package/fesm2022/aril-ui-radioButton.mjs +6 -6
- package/fesm2022/aril-ui-radioButton.mjs.map +1 -1
- package/fesm2022/aril-ui-selectBox.mjs +4 -4
- package/fesm2022/aril-ui-selectBox.mjs.map +1 -1
- package/fesm2022/aril-ui-switch.mjs +6 -6
- package/fesm2022/aril-ui-switch.mjs.map +1 -1
- package/fesm2022/aril-ui-table.mjs +99 -150
- package/fesm2022/aril-ui-table.mjs.map +1 -1
- package/fesm2022/aril-ui-tagBox.mjs +10 -10
- package/fesm2022/aril-ui-tagBox.mjs.map +1 -1
- package/fesm2022/aril-ui-text.mjs +3 -3
- package/fesm2022/aril-ui-text.mjs.map +1 -1
- package/fesm2022/aril-ui-textArea.mjs +2 -2
- package/fesm2022/aril-ui-textArea.mjs.map +1 -1
- package/fesm2022/aril-ui-tree.mjs +28 -44
- package/fesm2022/aril-ui-tree.mjs.map +1 -1
- package/fesm2022/aril-ui-treeTable.mjs +38 -42
- package/fesm2022/aril-ui-treeTable.mjs.map +1 -1
- package/fesm2022/aril-ui-value.mjs +11 -11
- package/fesm2022/aril-ui-value.mjs.map +1 -1
- package/fesm2022/aril-ui.mjs +1 -1
- package/fesm2022/aril-ui.mjs.map +1 -1
- package/fesm2022/aril-util-init-event.mjs.map +1 -1
- package/fesm2022/aril-util-lib.mjs.map +1 -1
- package/fesm2022/aril-util-primitive-extensions.mjs +82 -55
- package/fesm2022/aril-util-primitive-extensions.mjs.map +1 -1
- package/fesm2022/aril-util-pub-sub.mjs +6 -4
- package/fesm2022/aril-util-pub-sub.mjs.map +1 -1
- package/fesm2022/aril-util.mjs +1 -1
- package/fesm2022/aril-util.mjs.map +1 -1
- package/fesm2022/aril.mjs +1 -1
- package/fesm2022/aril.mjs.map +1 -1
- package/http/lib/enums.d.ts +6 -5
- package/http/lib/interfaces.d.ts +9 -29
- package/http/src/httpClient.d.ts +3 -3
- package/http/src/serviceBase.d.ts +2 -1
- package/http/src/serviceStateMethods.d.ts +1 -1
- package/package.json +13 -7
- package/styles/ui/ui.common.scss +8 -8
- package/theme/layout/app/breadcrumb/app.breadcrumb.component.d.ts +16 -0
- package/theme/layout/app/breadcrumb/app.breadcrumb.component.html +10 -0
- package/theme/layout/app/breadcrumb/app.breadcrumb.component.ts +50 -0
- package/theme/layout/app/config/app.config.component.d.ts +36 -0
- package/theme/layout/app/config/app.config.component.html +142 -0
- package/theme/layout/app/config/app.config.component.ts +143 -0
- package/theme/layout/app/layout/app.layout.component.d.ts +51 -0
- package/theme/layout/app/layout/app.layout.component.html +13 -0
- package/theme/layout/app/layout/app.layout.component.ts +170 -0
- package/theme/layout/app/menu/app.menu.component.d.ts +44 -0
- package/theme/layout/app/menu/app.menu.component.html +9 -0
- package/theme/layout/app/menu/app.menu.component.ts +343 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.d.ts +10 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.html +152 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.ts +24 -0
- package/theme/layout/app/sidebar/app.sidebar.component.d.ts +15 -0
- package/theme/layout/app/sidebar/app.sidebar.component.html +45 -0
- package/theme/layout/app/sidebar/app.sidebar.component.ts +43 -0
- package/theme/layout/app/topbar/app.topbar.component.d.ts +13 -0
- package/theme/layout/app/topbar/app.topbar.component.html +37 -0
- package/theme/layout/app/topbar/app.topbar.component.ts +28 -0
- package/theme/layout/index.d.ts +1 -0
- package/theme/layout/index.ts +1 -0
- package/theme/layout/ng-package.json +6 -0
- package/theme/layout/service/app.layout.service.d.ts +51 -0
- package/theme/layout/service/app.layout.service.ts +178 -0
- package/theme/layout/service/app.menu.service.d.ts +14 -0
- package/theme/layout/service/app.menu.service.ts +27 -0
- package/theme/layout/service/menuchangeevent.d.ts +4 -0
- package/theme/layout/service/menuchangeevent.ts +4 -0
- package/theme/styles/layout/_animation.scss +53 -53
- package/theme/styles/layout/_breadcrumb.scss +21 -21
- package/theme/styles/layout/_config.scss +42 -42
- package/theme/styles/layout/_content.scss +3 -3
- package/theme/styles/layout/_fonts.scss +40 -36
- package/theme/styles/layout/_layout_dark.scss +5 -5
- package/theme/styles/layout/_layout_dim.scss +5 -5
- package/theme/styles/layout/_layout_light.scss +5 -5
- package/theme/styles/layout/_main.scss +28 -28
- package/theme/styles/layout/_profile.scss +10 -10
- package/theme/styles/layout/_responsive.scss +111 -113
- package/theme/styles/layout/_sidebar_drawer.scss +234 -236
- package/theme/styles/layout/_sidebar_horizontal.scss +163 -163
- package/theme/styles/layout/_sidebar_reveal.scss +201 -203
- package/theme/styles/layout/_sidebar_slim.scss +144 -145
- package/theme/styles/layout/_sidebar_slim_plus.scss +162 -163
- package/theme/styles/layout/_sidebar_vertical.scss +153 -153
- package/theme/styles/layout/_topbar.scss +78 -78
- package/theme/styles/layout/_typography.scss +68 -63
- package/theme/styles/layout/_utils.scss +24 -24
- package/theme/styles/layout/layout.scss +24 -24
- package/theme/styles/layout/menutheme/_colorscheme.scss +11 -11
- package/theme/styles/layout/menutheme/_menutheme.scss +3 -3
- package/theme/styles/layout/menutheme/_primarycolor.scss +16 -16
- package/theme/styles/layout/menutheme/_transparent.scss +26 -26
- package/theme/styles/layout/preloading.scss +84 -84
- package/theme/styles/theme/base/_colors.scss +14 -15
- package/theme/styles/theme/base/_common.scss +39 -38
- package/theme/styles/theme/base/_components.scss +97 -97
- package/theme/styles/theme/base/_mixins.scss +281 -281
- package/theme/styles/theme/base/components/button/_button.scss +535 -535
- package/theme/styles/theme/base/components/button/_speeddial.scss +60 -60
- package/theme/styles/theme/base/components/button/_splitbutton.scss +328 -334
- package/theme/styles/theme/base/components/data/_carousel.scss +31 -31
- package/theme/styles/theme/base/components/data/_datatable.scss +336 -336
- package/theme/styles/theme/base/components/data/_dataview.scss +38 -38
- package/theme/styles/theme/base/components/data/_filter.scss +124 -125
- package/theme/styles/theme/base/components/data/_organizationchart.scss +48 -48
- package/theme/styles/theme/base/components/data/_paginator.scss +78 -78
- package/theme/styles/theme/base/components/data/_timeline.scss +33 -36
- package/theme/styles/theme/base/components/data/_treetable.scss +253 -254
- package/theme/styles/theme/base/components/data/_virtualscroller.scss +24 -24
- package/theme/styles/theme/base/components/file/_fileupload.scss +51 -51
- package/theme/styles/theme/base/components/input/_autocomplete.scss +120 -120
- package/theme/styles/theme/base/components/input/_calendar.scss +250 -250
- package/theme/styles/theme/base/components/input/_cascadeselect.scss +117 -118
- package/theme/styles/theme/base/components/input/_checkbox.scss +71 -71
- package/theme/styles/theme/base/components/input/_chips.scss +49 -49
- package/theme/styles/theme/base/components/input/_colorpicker.scss +11 -11
- package/theme/styles/theme/base/components/input/_dropdown.scss +141 -141
- package/theme/styles/theme/base/components/input/_editor.scss +120 -120
- package/theme/styles/theme/base/components/input/_inputgroup.scss +42 -42
- package/theme/styles/theme/base/components/input/_inputmask.scss +10 -10
- package/theme/styles/theme/base/components/input/_inputnumber.scss +21 -21
- package/theme/styles/theme/base/components/input/_inputswitch.scss +54 -54
- package/theme/styles/theme/base/components/input/_inputtext.scss +62 -62
- package/theme/styles/theme/base/components/input/_listbox.scss +80 -80
- package/theme/styles/theme/base/components/input/_multiselect.scss +158 -160
- package/theme/styles/theme/base/components/input/_password.scss +42 -42
- package/theme/styles/theme/base/components/input/_radiobutton.scss +57 -57
- package/theme/styles/theme/base/components/input/_rating.scss +53 -53
- package/theme/styles/theme/base/components/input/_selectbutton.scss +46 -46
- package/theme/styles/theme/base/components/input/_slider.scss +59 -55
- package/theme/styles/theme/base/components/input/_togglebutton.scss +44 -44
- package/theme/styles/theme/base/components/input/_treeselect.scss +119 -119
- package/theme/styles/theme/base/components/menu/_breadcrumb.scss +33 -33
- package/theme/styles/theme/base/components/menu/_contextmenu.scss +31 -31
- package/theme/styles/theme/base/components/menu/_dock.scss +80 -80
- package/theme/styles/theme/base/components/menu/_megamenu.scss +54 -54
- package/theme/styles/theme/base/components/menu/_menu.scss +30 -30
- package/theme/styles/theme/base/components/menu/_menubar.scss +136 -137
- package/theme/styles/theme/base/components/menu/_panelmenu.scss +151 -151
- package/theme/styles/theme/base/components/menu/_slidemenu.scss +57 -57
- package/theme/styles/theme/base/components/menu/_steps.scss +46 -46
- package/theme/styles/theme/base/components/menu/_tabmenu.scss +60 -61
- package/theme/styles/theme/base/components/menu/_tieredmenu.scss +34 -34
- package/theme/styles/theme/base/components/messages/_inlinemessage.scss +55 -55
- package/theme/styles/theme/base/components/messages/_message.scss +105 -105
- package/theme/styles/theme/base/components/messages/_toast.scss +97 -98
- package/theme/styles/theme/base/components/misc/_avatar.scss +22 -22
- package/theme/styles/theme/base/components/misc/_badge.scss +40 -40
- package/theme/styles/theme/base/components/misc/_chip.scss +39 -39
- package/theme/styles/theme/base/components/misc/_inplace.scss +12 -13
- package/theme/styles/theme/base/components/misc/_progressbar.scss +13 -13
- package/theme/styles/theme/base/components/misc/_scrolltop.scss +20 -20
- package/theme/styles/theme/base/components/misc/_skeleton.scss +6 -6
- package/theme/styles/theme/base/components/misc/_tag.scss +31 -31
- package/theme/styles/theme/base/components/misc/_terminal.scss +1 -1
- package/theme/styles/theme/base/components/multimedia/_galleria.scss +150 -150
- package/theme/styles/theme/base/components/multimedia/_image.scss +35 -35
- package/theme/styles/theme/base/components/overlay/_confirmpopup.scss +57 -59
- package/theme/styles/theme/base/components/overlay/_dialog.scss +56 -56
- package/theme/styles/theme/base/components/overlay/_overlaypanel.scss +58 -60
- package/theme/styles/theme/base/components/overlay/_sidebar.scss +20 -20
- package/theme/styles/theme/base/components/overlay/_tooltip.scss +27 -27
- package/theme/styles/theme/base/components/panel/_accordion.scss +104 -104
- package/theme/styles/theme/base/components/panel/_card.scss +23 -23
- package/theme/styles/theme/base/components/panel/_divider.scss +24 -24
- package/theme/styles/theme/base/components/panel/_fieldset.scss +38 -38
- package/theme/styles/theme/base/components/panel/_panel.scss +61 -61
- package/theme/styles/theme/base/components/panel/_scrollpanel.scss +5 -5
- package/theme/styles/theme/base/components/panel/_splitter.scss +15 -15
- package/theme/styles/theme/base/components/panel/_tabview.scss +68 -68
- package/theme/styles/theme/base/components/panel/_toolbar.scss +8 -8
- package/theme/styles/theme/dark/_extensions.scss +134 -120
- package/theme/styles/theme/dark/_variables.scss +918 -896
- package/theme/styles/theme/dark/blue/theme.scss +14 -14
- package/theme/styles/theme/dark/indigo/theme.scss +14 -14
- package/theme/styles/theme/light/_extensions.scss +116 -102
- package/theme/styles/theme/light/_variables.scss +911 -898
- package/theme/styles/theme/light/blue/theme.scss +14 -14
- package/theme/styles/theme/light/indigo/theme.scss +14 -14
- package/ui/calendar/src/calendar.component.d.ts +2 -2
- package/ui/form/index.d.ts +9 -0
- package/ui/form/src/form-submit-button.component.d.ts +1 -1
- package/ui/form/src/form.component.d.ts +1 -1
- package/ui/lib/src/form/form-validation.d.ts +1 -1
- package/ui/lib/src/input/baseInput.d.ts +2 -2
- package/ui/lib/src/input/common-input-validators.service.d.ts +3 -3
- package/ui/lib/src/input/dx-input-error-message.pipe.d.ts +2 -2
- package/ui/lib/src/input/input-transforms.d.ts +1 -1
- package/ui/mask/src/mask.component.d.ts +3 -3
- package/ui/number/src/number.component.d.ts +4 -4
- package/ui/overlayPanel/src/overlay-panel.component.d.ts +1 -1
- package/ui/password/src/password.component.d.ts +3 -3
- package/ui/selectBox/src/select-box.component.d.ts +2 -2
- package/ui/switch/src/switch.component.d.ts +3 -3
- package/ui/table/index.d.ts +13 -0
- package/ui/table/src/table-column.component.d.ts +6 -5
- package/ui/table/src/table.component.d.ts +8 -15
- package/ui/tree/src/tree.component.d.ts +14 -19
- package/ui/treeTable/src/tree-table.component.d.ts +14 -18
- package/ui/value/src/value.component.d.ts +2 -2
- package/util/lib/src/types.d.ts +2 -2
- package/util/primitive-extensions/index.d.ts +4 -4
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { NgClass, NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectorRef,
|
|
4
|
+
Component,
|
|
5
|
+
ElementRef,
|
|
6
|
+
HostBinding,
|
|
7
|
+
Input,
|
|
8
|
+
OnDestroy,
|
|
9
|
+
OnInit,
|
|
10
|
+
ViewChild,
|
|
11
|
+
inject
|
|
12
|
+
} from '@angular/core';
|
|
13
|
+
import { NavigationEnd, Router, RouterLink, RouterLinkActive } from '@angular/router';
|
|
14
|
+
import { animate, state, style, transition, trigger, AnimationEvent } from '@angular/animations';
|
|
15
|
+
|
|
16
|
+
import { MenuItem } from 'primeng/api';
|
|
17
|
+
import { DomHandler } from 'primeng/dom';
|
|
18
|
+
import { RippleModule } from 'primeng/ripple';
|
|
19
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
20
|
+
|
|
21
|
+
import { Subscription } from 'rxjs';
|
|
22
|
+
import { filter } from 'rxjs/operators';
|
|
23
|
+
|
|
24
|
+
import { MenuService } from '../../service/app.menu.service';
|
|
25
|
+
import { LayoutService } from '../../service/app.layout.service';
|
|
26
|
+
|
|
27
|
+
@Component({
|
|
28
|
+
standalone: true,
|
|
29
|
+
selector: '[app-menuitem]',
|
|
30
|
+
template: `
|
|
31
|
+
<ng-container>
|
|
32
|
+
@if (root) {
|
|
33
|
+
<div class="layout-menuitem-root-text">
|
|
34
|
+
{{ item.label }}
|
|
35
|
+
</div>
|
|
36
|
+
}
|
|
37
|
+
@if (item.items?.length) {
|
|
38
|
+
<a
|
|
39
|
+
[attr.href]="item.url"
|
|
40
|
+
(click)="itemClick($event)"
|
|
41
|
+
(mouseenter)="onMouseEnter()"
|
|
42
|
+
[attr.target]="item.target"
|
|
43
|
+
tabindex="0"
|
|
44
|
+
pRipple
|
|
45
|
+
[pTooltip]="item.label"
|
|
46
|
+
[tooltipDisabled]="!(isSlim && root && !active)">
|
|
47
|
+
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
48
|
+
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
49
|
+
@if (item.items) {
|
|
50
|
+
<i class="pi pi-fw pi-angle-down layout-submenu-toggler"></i>
|
|
51
|
+
}
|
|
52
|
+
</a>
|
|
53
|
+
} @else {
|
|
54
|
+
<a
|
|
55
|
+
(click)="itemClick($event)"
|
|
56
|
+
(mouseenter)="onMouseEnter()"
|
|
57
|
+
[routerLink]="item.routerLink"
|
|
58
|
+
routerLinkActive="active-route"
|
|
59
|
+
[routerLinkActiveOptions]="
|
|
60
|
+
item.routerLinkActiveOptions || {
|
|
61
|
+
paths: 'exact',
|
|
62
|
+
queryParams: 'ignored',
|
|
63
|
+
matrixParams: 'ignored',
|
|
64
|
+
fragment: 'ignored'
|
|
65
|
+
}
|
|
66
|
+
"
|
|
67
|
+
[fragment]="item.fragment"
|
|
68
|
+
[queryParamsHandling]="item.queryParamsHandling"
|
|
69
|
+
[preserveFragment]="item.preserveFragment"
|
|
70
|
+
[skipLocationChange]="item.skipLocationChange"
|
|
71
|
+
[replaceUrl]="item.replaceUrl"
|
|
72
|
+
[state]="item.state"
|
|
73
|
+
[queryParams]="item.queryParams"
|
|
74
|
+
[attr.target]="item.target"
|
|
75
|
+
tabindex="0"
|
|
76
|
+
pRipple
|
|
77
|
+
[pTooltip]="item.label"
|
|
78
|
+
[tooltipDisabled]="!(isSlim && root)">
|
|
79
|
+
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
80
|
+
|
|
81
|
+
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
82
|
+
|
|
83
|
+
@if (item.items) {
|
|
84
|
+
<i class="pi pi-fw pi-angle-down layout-submenu-toggler"></i>
|
|
85
|
+
}
|
|
86
|
+
</a>
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@if (item.items) {
|
|
90
|
+
<ul #submenu [@children]="submenuAnimation" (@children.done)="onSubmenuAnimated($event)">
|
|
91
|
+
@for (child of item.items; track child; let i = $index) {
|
|
92
|
+
<li app-menuitem [item]="child" [index]="i" [parentKey]="key"></li>
|
|
93
|
+
}
|
|
94
|
+
</ul>
|
|
95
|
+
}
|
|
96
|
+
</ng-container>
|
|
97
|
+
`,
|
|
98
|
+
imports: [NgClass, RouterLink, RouterLinkActive, NgTemplateOutlet, TooltipModule, RippleModule],
|
|
99
|
+
animations: [
|
|
100
|
+
trigger('children', [
|
|
101
|
+
state(
|
|
102
|
+
'collapsed',
|
|
103
|
+
style({
|
|
104
|
+
height: '0'
|
|
105
|
+
})
|
|
106
|
+
),
|
|
107
|
+
state(
|
|
108
|
+
'expanded',
|
|
109
|
+
style({
|
|
110
|
+
height: '*'
|
|
111
|
+
})
|
|
112
|
+
),
|
|
113
|
+
state(
|
|
114
|
+
'hidden',
|
|
115
|
+
style({
|
|
116
|
+
display: 'none'
|
|
117
|
+
})
|
|
118
|
+
),
|
|
119
|
+
state(
|
|
120
|
+
'visible',
|
|
121
|
+
style({
|
|
122
|
+
display: 'block'
|
|
123
|
+
})
|
|
124
|
+
),
|
|
125
|
+
transition('collapsed <=> expanded', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
126
|
+
])
|
|
127
|
+
]
|
|
128
|
+
})
|
|
129
|
+
export class AppMenuItemComponent implements OnInit, OnDestroy {
|
|
130
|
+
@Input() item!: MenuItem;
|
|
131
|
+
|
|
132
|
+
@Input() index!: number;
|
|
133
|
+
|
|
134
|
+
@Input() @HostBinding('class.layout-root-menuitem') root!: boolean;
|
|
135
|
+
|
|
136
|
+
@Input() parentKey!: string;
|
|
137
|
+
|
|
138
|
+
@ViewChild('submenu') submenu!: ElementRef;
|
|
139
|
+
|
|
140
|
+
active = false;
|
|
141
|
+
|
|
142
|
+
menuSourceSubscription: Subscription;
|
|
143
|
+
|
|
144
|
+
menuResetSubscription: Subscription;
|
|
145
|
+
|
|
146
|
+
key: string = '';
|
|
147
|
+
|
|
148
|
+
constructor(
|
|
149
|
+
public layoutService: LayoutService,
|
|
150
|
+
private cd: ChangeDetectorRef,
|
|
151
|
+
public router: Router,
|
|
152
|
+
private menuService: MenuService
|
|
153
|
+
) {
|
|
154
|
+
this.menuSourceSubscription = this.menuService.menuSource$.subscribe((value) => {
|
|
155
|
+
Promise.resolve(null).then(() => {
|
|
156
|
+
if (value.routeEvent) {
|
|
157
|
+
this.active = value.key === this.key || value.key.startsWith(this.key + '-') ? true : false;
|
|
158
|
+
} else {
|
|
159
|
+
if (value.key !== this.key && !value.key.startsWith(this.key + '-')) {
|
|
160
|
+
this.active = false;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
this.menuResetSubscription = this.menuService.resetSource$.subscribe(() => {
|
|
167
|
+
this.active = false;
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((params) => {
|
|
171
|
+
if (this.isSlimPlus || this.isSlim || this.isHorizontal) {
|
|
172
|
+
this.active = false;
|
|
173
|
+
} else {
|
|
174
|
+
if (this.item.routerLink) {
|
|
175
|
+
this.updateActiveStateFromRoute();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
ngOnInit() {
|
|
182
|
+
this.key = this.parentKey ? this.parentKey + '-' + this.index : String(this.index);
|
|
183
|
+
|
|
184
|
+
if (!(this.isSlimPlus || this.isSlim || this.isHorizontal) && this.item.routerLink) {
|
|
185
|
+
this.updateActiveStateFromRoute();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
ngAfterViewChecked() {
|
|
190
|
+
if (
|
|
191
|
+
this.root &&
|
|
192
|
+
this.active &&
|
|
193
|
+
this.layoutService.isDesktop() &&
|
|
194
|
+
(this.layoutService.isHorizontal() || this.layoutService.isSlim() || this.layoutService.isSlimPlus())
|
|
195
|
+
) {
|
|
196
|
+
this.calculatePosition(this.submenu?.nativeElement, this.submenu?.nativeElement.parentElement);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
updateActiveStateFromRoute() {
|
|
201
|
+
let activeRoute = this.router.isActive(this.item.routerLink[0], {
|
|
202
|
+
paths: 'exact',
|
|
203
|
+
queryParams: 'ignored',
|
|
204
|
+
matrixParams: 'ignored',
|
|
205
|
+
fragment: 'ignored'
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
if (activeRoute) {
|
|
209
|
+
this.menuService.onMenuStateChange({ key: this.key, routeEvent: true });
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
onSubmenuAnimated(event: AnimationEvent) {
|
|
214
|
+
if (
|
|
215
|
+
event.toState === 'visible' &&
|
|
216
|
+
this.layoutService.isDesktop() &&
|
|
217
|
+
(this.layoutService.isHorizontal() || this.layoutService.isSlim() || this.layoutService.isSlimPlus())
|
|
218
|
+
) {
|
|
219
|
+
const el = <HTMLUListElement>event.element;
|
|
220
|
+
const elParent = <HTMLUListElement>el.parentElement;
|
|
221
|
+
this.calculatePosition(el, elParent);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
calculatePosition(overlay: HTMLElement, target: HTMLElement) {
|
|
226
|
+
if (overlay) {
|
|
227
|
+
const { left, top } = target.getBoundingClientRect();
|
|
228
|
+
const [vWidth, vHeight] = [window.innerWidth, window.innerHeight];
|
|
229
|
+
const [oWidth, oHeight] = [overlay.offsetWidth, overlay.offsetHeight];
|
|
230
|
+
const scrollbarWidth = DomHandler.calculateScrollbarWidth();
|
|
231
|
+
// reset
|
|
232
|
+
overlay.style.top = '';
|
|
233
|
+
overlay.style.left = '';
|
|
234
|
+
|
|
235
|
+
if (this.layoutService.isHorizontal()) {
|
|
236
|
+
const width = left + oWidth + scrollbarWidth;
|
|
237
|
+
overlay.style.left = vWidth < width ? `${left - (width - vWidth)}px` : `${left}px`;
|
|
238
|
+
} else if (this.layoutService.isSlim() || this.layoutService.isSlimPlus()) {
|
|
239
|
+
const height = top + oHeight;
|
|
240
|
+
overlay.style.top = vHeight < height ? `${top - (height - vHeight)}px` : `${top}px`;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
itemClick(event: Event) {
|
|
246
|
+
// avoid processing disabled items
|
|
247
|
+
if (this.item.disabled) {
|
|
248
|
+
event.preventDefault();
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// navigate with hover
|
|
253
|
+
if ((this.root && this.isSlim) || this.isHorizontal || this.isSlimPlus) {
|
|
254
|
+
this.layoutService.state.menuHoverActive = !this.layoutService.state.menuHoverActive;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// execute command
|
|
258
|
+
if (this.item.command) {
|
|
259
|
+
this.item.command({ originalEvent: event, item: this.item });
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// toggle active state
|
|
263
|
+
if (this.item.items) {
|
|
264
|
+
this.active = !this.active;
|
|
265
|
+
|
|
266
|
+
if (this.root && this.active && (this.isSlim || this.isHorizontal || this.isSlimPlus)) {
|
|
267
|
+
this.layoutService.onOverlaySubmenuOpen();
|
|
268
|
+
}
|
|
269
|
+
} else {
|
|
270
|
+
if (this.layoutService.isMobile()) {
|
|
271
|
+
this.layoutService.state.staticMenuMobileActive = false;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if (this.isSlim || this.isHorizontal || this.isSlimPlus) {
|
|
275
|
+
this.menuService.reset();
|
|
276
|
+
this.layoutService.state.menuHoverActive = false;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
this.menuService.onMenuStateChange({ key: this.key });
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
onMouseEnter() {
|
|
284
|
+
// activate item on hover
|
|
285
|
+
if (this.root && (this.isSlim || this.isHorizontal || this.isSlimPlus) && this.layoutService.isDesktop()) {
|
|
286
|
+
if (this.layoutService.state.menuHoverActive) {
|
|
287
|
+
this.active = true;
|
|
288
|
+
this.menuService.onMenuStateChange({ key: this.key });
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
get submenuAnimation() {
|
|
294
|
+
if (
|
|
295
|
+
this.layoutService.isDesktop() &&
|
|
296
|
+
(this.layoutService.isHorizontal() || this.layoutService.isSlim() || this.layoutService.isSlimPlus())
|
|
297
|
+
) {
|
|
298
|
+
return this.active ? 'visible' : 'hidden';
|
|
299
|
+
} else
|
|
300
|
+
return (
|
|
301
|
+
this.root ? 'expanded'
|
|
302
|
+
: this.active ? 'expanded'
|
|
303
|
+
: 'collapsed'
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
get isHorizontal() {
|
|
308
|
+
return this.layoutService.isHorizontal();
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
get isSlim() {
|
|
312
|
+
return this.layoutService.isSlim();
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
get isSlimPlus() {
|
|
316
|
+
return this.layoutService.isSlimPlus();
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
@HostBinding('class.active-menuitem')
|
|
320
|
+
get activeClass() {
|
|
321
|
+
return this.active && !this.root;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
ngOnDestroy() {
|
|
325
|
+
if (this.menuSourceSubscription) {
|
|
326
|
+
this.menuSourceSubscription.unsubscribe();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (this.menuResetSubscription) {
|
|
330
|
+
this.menuResetSubscription.unsubscribe();
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
@Component({
|
|
336
|
+
standalone: true,
|
|
337
|
+
selector: 'app-menu',
|
|
338
|
+
imports: [AppMenuItemComponent],
|
|
339
|
+
templateUrl: './app.menu.component.html'
|
|
340
|
+
})
|
|
341
|
+
export class AppMenuComponent {
|
|
342
|
+
menuService = inject(MenuService);
|
|
343
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayoutService } from '../../service/app.layout.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AppProfileSidebarComponent {
|
|
4
|
+
layoutService: LayoutService;
|
|
5
|
+
constructor(layoutService: LayoutService);
|
|
6
|
+
get visible(): boolean;
|
|
7
|
+
set visible(_val: boolean);
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppProfileSidebarComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppProfileSidebarComponent, "app-profilemenu", never, {}, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<p-sidebar
|
|
2
|
+
[(visible)]="visible"
|
|
3
|
+
position="right"
|
|
4
|
+
[transitionOptions]="'.3s cubic-bezier(0, 0, 0.2, 1)'"
|
|
5
|
+
styleClass="layout-profile-sidebar w-full sm:w-25rem">
|
|
6
|
+
<div class="flex flex-column mx-auto md:mx-0">
|
|
7
|
+
<span class="mb-2 font-semibold">Welcome</span>
|
|
8
|
+
<span class="text-color-secondary font-medium mb-5">Isabella Andolini</span>
|
|
9
|
+
|
|
10
|
+
<ul class="list-none m-0 p-0">
|
|
11
|
+
<li>
|
|
12
|
+
<a
|
|
13
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
14
|
+
<span>
|
|
15
|
+
<i class="pi pi-user text-xl text-primary"></i>
|
|
16
|
+
</span>
|
|
17
|
+
<div class="ml-3">
|
|
18
|
+
<span class="mb-2 font-semibold">Profile</span>
|
|
19
|
+
<p class="text-color-secondary m-0">Lorem ipsum date visale</p>
|
|
20
|
+
</div>
|
|
21
|
+
</a>
|
|
22
|
+
</li>
|
|
23
|
+
<li>
|
|
24
|
+
<a
|
|
25
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
26
|
+
<span>
|
|
27
|
+
<i class="pi pi-user text-xl text-primary"></i>
|
|
28
|
+
</span>
|
|
29
|
+
<div class="ml-3">
|
|
30
|
+
<span class="mb-2 font-semibold">Billing</span>
|
|
31
|
+
<p class="text-color-secondary m-0">Amet mimin mıollit</p>
|
|
32
|
+
</div>
|
|
33
|
+
</a>
|
|
34
|
+
</li>
|
|
35
|
+
<li>
|
|
36
|
+
<a
|
|
37
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
38
|
+
<span>
|
|
39
|
+
<i class="pi pi-cog text-xl text-primary"></i>
|
|
40
|
+
</span>
|
|
41
|
+
<div class="ml-3">
|
|
42
|
+
<span class="mb-2 font-semibold">Settings</span>
|
|
43
|
+
<p class="text-color-secondary m-0">Exercitation veniam</p>
|
|
44
|
+
</div>
|
|
45
|
+
</a>
|
|
46
|
+
</li>
|
|
47
|
+
<li>
|
|
48
|
+
<a
|
|
49
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
50
|
+
<span>
|
|
51
|
+
<i class="pi pi-power-off text-xl text-primary"></i>
|
|
52
|
+
</span>
|
|
53
|
+
<div class="ml-3">
|
|
54
|
+
<span class="mb-2 font-semibold">Sign Out</span>
|
|
55
|
+
<p class="text-color-secondary m-0">Sed ut perspiciatis</p>
|
|
56
|
+
</div>
|
|
57
|
+
</a>
|
|
58
|
+
</li>
|
|
59
|
+
</ul>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div class="flex flex-column mt-5 mx-auto md:mx-0">
|
|
63
|
+
<span class="mb-2 font-semibold">Notifications</span>
|
|
64
|
+
<span class="text-color-secondary font-medium mb-5">You have 3 notifications</span>
|
|
65
|
+
|
|
66
|
+
<ul class="list-none m-0 p-0">
|
|
67
|
+
<li>
|
|
68
|
+
<a
|
|
69
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
70
|
+
<span>
|
|
71
|
+
<i class="pi pi-comment text-xl text-primary"></i>
|
|
72
|
+
</span>
|
|
73
|
+
<div class="ml-3">
|
|
74
|
+
<span class="mb-2 font-semibold">Your post has new comments</span>
|
|
75
|
+
<p class="text-color-secondary m-0">5 min ago</p>
|
|
76
|
+
</div>
|
|
77
|
+
</a>
|
|
78
|
+
</li>
|
|
79
|
+
<li>
|
|
80
|
+
<a
|
|
81
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
82
|
+
<span>
|
|
83
|
+
<i class="pi pi-trash text-xl text-primary"></i>
|
|
84
|
+
</span>
|
|
85
|
+
<div class="ml-3">
|
|
86
|
+
<span class="mb-2 font-semibold">Your post has been deleted</span>
|
|
87
|
+
<p class="text-color-secondary m-0">15min ago</p>
|
|
88
|
+
</div>
|
|
89
|
+
</a>
|
|
90
|
+
</li>
|
|
91
|
+
<li>
|
|
92
|
+
<a
|
|
93
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
94
|
+
<span>
|
|
95
|
+
<i class="pi pi-folder text-xl text-primary"></i>
|
|
96
|
+
</span>
|
|
97
|
+
<div class="ml-3">
|
|
98
|
+
<span class="mb-2 font-semibold">Post has been updated</span>
|
|
99
|
+
<p class="text-color-secondary m-0">3h ago</p>
|
|
100
|
+
</div>
|
|
101
|
+
</a>
|
|
102
|
+
</li>
|
|
103
|
+
</ul>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<div class="flex flex-column mt-5 mx-auto md:mx-0">
|
|
107
|
+
<span class="mb-2 font-semibold">Messages</span>
|
|
108
|
+
<span class="text-color-secondary font-medium mb-5">You have new messages</span>
|
|
109
|
+
|
|
110
|
+
<ul class="list-none m-0 p-0">
|
|
111
|
+
<li>
|
|
112
|
+
<a
|
|
113
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
114
|
+
<span>
|
|
115
|
+
<img src="assets/demo/images/avatar/circle/avatar-m-8.png" alt="Avatar" class="w-2rem h-2rem" />
|
|
116
|
+
</span>
|
|
117
|
+
<div class="ml-3">
|
|
118
|
+
<span class="mb-2 font-semibold">James Robinson</span>
|
|
119
|
+
<p class="text-color-secondary m-0">10 min ago</p>
|
|
120
|
+
</div>
|
|
121
|
+
<p-tag value="3" class="ml-auto"></p-tag>
|
|
122
|
+
</a>
|
|
123
|
+
</li>
|
|
124
|
+
<li>
|
|
125
|
+
<a
|
|
126
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
127
|
+
<span>
|
|
128
|
+
<img src="assets/demo/images/avatar/circle/avatar-f-8.png" alt="Avatar" class="w-2rem h-2rem" />
|
|
129
|
+
</span>
|
|
130
|
+
<div class="ml-3">
|
|
131
|
+
<span class="mb-2 font-semibold">Mary Watson</span>
|
|
132
|
+
<p class="text-color-secondary m-0">15min ago</p>
|
|
133
|
+
</div>
|
|
134
|
+
<p-tag value="1" class="ml-auto"></p-tag>
|
|
135
|
+
</a>
|
|
136
|
+
</li>
|
|
137
|
+
<li>
|
|
138
|
+
<a
|
|
139
|
+
class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
|
|
140
|
+
<span>
|
|
141
|
+
<img src="assets/demo/images/avatar/circle/avatar-f-4.png" alt="Avatar" class="w-2rem h-2rem" />
|
|
142
|
+
</span>
|
|
143
|
+
<div class="ml-3">
|
|
144
|
+
<span class="mb-2 font-semibold">Aisha Webb</span>
|
|
145
|
+
<p class="text-color-secondary m-0">3h ago</p>
|
|
146
|
+
</div>
|
|
147
|
+
<p-tag value="2" class="ml-auto"></p-tag>
|
|
148
|
+
</a>
|
|
149
|
+
</li>
|
|
150
|
+
</ul>
|
|
151
|
+
</div>
|
|
152
|
+
</p-sidebar>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { TagModule } from 'primeng/tag';
|
|
4
|
+
import { SidebarModule } from 'primeng/sidebar';
|
|
5
|
+
|
|
6
|
+
import { LayoutService } from '../../service/app.layout.service';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
standalone: true,
|
|
10
|
+
selector: 'app-profilemenu',
|
|
11
|
+
imports: [SidebarModule, TagModule],
|
|
12
|
+
templateUrl: './app.profilesidebar.component.html'
|
|
13
|
+
})
|
|
14
|
+
export class AppProfileSidebarComponent {
|
|
15
|
+
constructor(public layoutService: LayoutService) {}
|
|
16
|
+
|
|
17
|
+
get visible(): boolean {
|
|
18
|
+
return this.layoutService.state.profileSidebarVisible;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
set visible(_val: boolean) {
|
|
22
|
+
this.layoutService.state.profileSidebarVisible = _val;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { LayoutService } from '../../service/app.layout.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AppSidebarComponent {
|
|
5
|
+
layoutService: LayoutService;
|
|
6
|
+
el: ElementRef;
|
|
7
|
+
timeout: any;
|
|
8
|
+
menuContainer: ElementRef;
|
|
9
|
+
constructor(layoutService: LayoutService, el: ElementRef);
|
|
10
|
+
onMouseEnter(): void;
|
|
11
|
+
onMouseLeave(): void;
|
|
12
|
+
anchor(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppSidebarComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppSidebarComponent, "app-sidebar", never, {}, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<div class="layout-sidebar" (mouseenter)="onMouseEnter()" (mouseleave)="onMouseLeave()">
|
|
2
|
+
<div class="sidebar-header">
|
|
3
|
+
<a [routerLink]="['/']" class="app-logo">
|
|
4
|
+
<svg viewBox="0 0 124 22" fill="none" xmlns="http://www.w3.org/2000/svg" class="app-logo-normal">
|
|
5
|
+
<path
|
|
6
|
+
d="M10.4851 0L0 20.9465H3.53702L10.4856 6.07843L17.2944 20.9465H20.9715L10.4851 0Z"
|
|
7
|
+
fill="var(--logo-color)" />
|
|
8
|
+
<path d="M13.84 15.7927L16.2077 21.0016H11.7682L13.84 15.7927Z" fill="var(--logo-color)" />
|
|
9
|
+
<path d="M9.04645 21.0016L6.67875 15.7927L4.60701 21.0016H9.04645Z" fill="var(--logo-color)" />
|
|
10
|
+
<path
|
|
11
|
+
d="M40.9033 14.5217H34.771L33.1753 18.0007H30.8467L37.9346 2.77661L44.772 18.0007H42.4062L40.9033 14.5217ZM40.022 12.49L37.8975 7.61938L35.6709 12.49H40.022Z"
|
|
12
|
+
fill="var(--logo-color)" />
|
|
13
|
+
<path
|
|
14
|
+
d="M52.4927 12.1838V18.0007H50.3311V3.67651H52.7803C53.9802 3.67651 54.8862 3.76001 55.4985 3.927C56.117 4.09399 56.6613 4.40942 57.1314 4.87329C57.954 5.67733 58.3652 6.69165 58.3652 7.91626C58.3652 9.22746 57.9261 10.2665 57.0479 11.0334C56.1696 11.8004 54.9852 12.1838 53.4946 12.1838H52.4927ZM52.4927 10.1799H53.2998C55.2852 10.1799 56.2778 9.4161 56.2778 7.88843C56.2778 6.41024 55.2542 5.67114 53.207 5.67114H52.4927V10.1799Z"
|
|
15
|
+
fill="var(--logo-color)" />
|
|
16
|
+
<path
|
|
17
|
+
d="M63.6367 10.7737C63.6367 8.75741 64.3758 7.02563 65.854 5.57837C67.326 4.1311 69.0949 3.40747 71.1607 3.40747C73.2017 3.40747 74.952 4.13729 76.4116 5.59692C77.8775 7.05656 78.6104 8.80998 78.6104 10.8572C78.6104 12.9167 77.8744 14.664 76.4024 16.0989C74.9242 17.54 73.1398 18.2605 71.0493 18.2605C69.2001 18.2605 67.5394 17.6204 66.0674 16.3401C64.447 14.9237 63.6367 13.0683 63.6367 10.7737ZM65.8169 10.8015C65.8169 12.3848 66.3488 13.6868 67.4126 14.7073C68.4702 15.7278 69.6918 16.238 71.0772 16.238C72.5801 16.238 73.848 15.7185 74.8809 14.6794C75.9138 13.628 76.4302 12.3477 76.4302 10.8386C76.4302 9.31095 75.9199 8.03068 74.8994 6.9978C73.8851 5.95874 72.6296 5.43921 71.1328 5.43921C69.6423 5.43921 68.3836 5.95874 67.357 6.9978C66.3303 8.0245 65.8169 9.2924 65.8169 10.8015Z"
|
|
18
|
+
fill="var(--logo-color)" />
|
|
19
|
+
<path d="M87.2495 3.67651V15.969H91.4615V18.0007H85.0879V3.67651H87.2495Z" fill="var(--logo-color)" />
|
|
20
|
+
<path d="M99.4327 3.67651V15.969H103.645V18.0007H97.271V3.67651H99.4327Z" fill="var(--logo-color)" />
|
|
21
|
+
<path
|
|
22
|
+
d="M108.146 10.7737C108.146 8.75741 108.885 7.02563 110.363 5.57837C111.835 4.1311 113.604 3.40747 115.67 3.40747C117.711 3.40747 119.461 4.13729 120.921 5.59692C122.387 7.05656 123.12 8.80998 123.12 10.8572C123.12 12.9167 122.384 14.664 120.912 16.0989C119.433 17.54 117.649 18.2605 115.559 18.2605C113.709 18.2605 112.049 17.6204 110.577 16.3401C108.956 14.9237 108.146 13.0683 108.146 10.7737ZM110.326 10.8015C110.326 12.3848 110.858 13.6868 111.922 14.7073C112.98 15.7278 114.201 16.238 115.586 16.238C117.089 16.238 118.357 15.7185 119.39 14.6794C120.423 13.628 120.94 12.3477 120.94 10.8386C120.94 9.31095 120.429 8.03068 119.409 6.9978C118.394 5.95874 117.139 5.43921 115.642 5.43921C114.152 5.43921 112.893 5.95874 111.866 6.9978C110.84 8.0245 110.326 9.2924 110.326 10.8015Z"
|
|
23
|
+
fill="var(--logo-color)" />
|
|
24
|
+
</svg>
|
|
25
|
+
<svg
|
|
26
|
+
width="21"
|
|
27
|
+
height="22"
|
|
28
|
+
viewBox="0 0 21 22"
|
|
29
|
+
fill="none"
|
|
30
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
31
|
+
class="app-logo-small">
|
|
32
|
+
<path
|
|
33
|
+
d="M10.4851 0L0 20.9465H3.53702L10.4856 6.07843L17.2944 20.9465H20.9715L10.4851 0Z"
|
|
34
|
+
fill="var(--logo-color)" />
|
|
35
|
+
<path d="M13.8399 15.793L16.2076 21.0019H11.7681L13.8399 15.793Z" fill="var(--logo-color)" />
|
|
36
|
+
<path d="M9.04637 21.0019L6.67867 15.793L4.60693 21.0019H9.04637Z" fill="var(--logo-color)" />
|
|
37
|
+
</svg>
|
|
38
|
+
</a>
|
|
39
|
+
<button class="layout-sidebar-anchor p-link z-2 mb-2" type="button" (click)="anchor()"></button>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div #menuContainer class="layout-menu-container">
|
|
43
|
+
<app-menu></app-menu>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { RouterLink } from '@angular/router';
|
|
2
|
+
import { Component, ElementRef, ViewChild } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
import { LayoutService } from '../../service/app.layout.service';
|
|
5
|
+
import { AppMenuComponent } from '../menu/app.menu.component';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
standalone: true,
|
|
9
|
+
selector: 'app-sidebar',
|
|
10
|
+
imports: [RouterLink, AppMenuComponent],
|
|
11
|
+
templateUrl: './app.sidebar.component.html'
|
|
12
|
+
})
|
|
13
|
+
export class AppSidebarComponent {
|
|
14
|
+
timeout: any = null;
|
|
15
|
+
|
|
16
|
+
@ViewChild('menuContainer') menuContainer!: ElementRef;
|
|
17
|
+
constructor(
|
|
18
|
+
public layoutService: LayoutService,
|
|
19
|
+
public el: ElementRef
|
|
20
|
+
) {}
|
|
21
|
+
|
|
22
|
+
onMouseEnter() {
|
|
23
|
+
if (!this.layoutService.state.anchored) {
|
|
24
|
+
if (this.timeout) {
|
|
25
|
+
clearTimeout(this.timeout);
|
|
26
|
+
this.timeout = null;
|
|
27
|
+
}
|
|
28
|
+
this.layoutService.state.sidebarActive = true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
onMouseLeave() {
|
|
33
|
+
if (!this.layoutService.state.anchored) {
|
|
34
|
+
if (!this.timeout) {
|
|
35
|
+
this.timeout = setTimeout(() => (this.layoutService.state.sidebarActive = false), 300);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
anchor() {
|
|
41
|
+
this.layoutService.state.anchored = !this.layoutService.state.anchored;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { LayoutService } from '../../service/app.layout.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AppTopbarComponent {
|
|
5
|
+
layoutService: LayoutService;
|
|
6
|
+
menuButton: ElementRef;
|
|
7
|
+
constructor(layoutService: LayoutService);
|
|
8
|
+
onMenuButtonClick(): void;
|
|
9
|
+
onProfileButtonClick(): void;
|
|
10
|
+
onConfigButtonClick(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppTopbarComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AppTopbarComponent, "app-topbar", never, {}, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<div class="layout-topbar">
|
|
2
|
+
<div class="topbar-start">
|
|
3
|
+
<button #menubutton type="button" class="topbar-menubutton p-link p-trigger" (click)="onMenuButtonClick()">
|
|
4
|
+
<i class="pi pi-bars"></i>
|
|
5
|
+
</button>
|
|
6
|
+
|
|
7
|
+
<!-- <app-breadcrumb class="topbar-breadcrumb"></app-breadcrumb> -->
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="topbar-end">
|
|
11
|
+
<ul class="topbar-menu">
|
|
12
|
+
<li class="topbar-search">
|
|
13
|
+
<span class="p-input-icon-left">
|
|
14
|
+
<i class="pi pi-search"></i>
|
|
15
|
+
<input
|
|
16
|
+
type="text"
|
|
17
|
+
pInputText
|
|
18
|
+
placeholder="Search"
|
|
19
|
+
class="p-inputtext p-component p-element w-12rem sm:w-full" />
|
|
20
|
+
</span>
|
|
21
|
+
</li>
|
|
22
|
+
<!-- <li class="ml-3">
|
|
23
|
+
<button
|
|
24
|
+
pButton
|
|
25
|
+
type="button"
|
|
26
|
+
icon="pi pi-cog"
|
|
27
|
+
class="p-button-text p-button-secondary p-button-rounded flex-shrink-0"
|
|
28
|
+
(click)="onConfigButtonClick()"></button>
|
|
29
|
+
</li> -->
|
|
30
|
+
<li class="topbar-profile">
|
|
31
|
+
<button type="button" class="p-link" (click)="onProfileButtonClick()">
|
|
32
|
+
<img src="assets/images/avatar.png" alt="Profile" />
|
|
33
|
+
</button>
|
|
34
|
+
</li>
|
|
35
|
+
</ul>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|