@acorex/components 6.5.26 → 6.5.27
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/karma.conf.js +32 -0
- package/ng-package.json +10 -0
- package/package.json +12 -32
- package/src/lib/accordion/accordion.component.ts +43 -0
- package/src/lib/accordion/accordion.module.ts +11 -0
- package/src/lib/accordion/api.ts +2 -0
- package/src/lib/base/base-page.class.ts +116 -0
- package/src/lib/base/components.class.ts +9 -0
- package/src/lib/base/element.class.ts +344 -0
- package/src/lib/base/events.class.ts +32 -0
- package/src/lib/button/button.component.html +17 -0
- package/src/lib/button/button.component.ts +72 -0
- package/src/lib/button/button.module.ts +14 -0
- package/src/lib/calendar/calendar-box/calendar-box.component.html +68 -0
- package/src/lib/calendar/calendar-box/calendar-box.component.ts +461 -0
- package/src/lib/calendar/calendar-box/calendar-box.module.ts +16 -0
- package/src/lib/calendar/scheduler/scheduler-views.property.ts +38 -0
- package/{lib/calendar/scheduler/scheduler.class.d.ts → src/lib/calendar/scheduler/scheduler.class.ts} +20 -6
- package/src/lib/calendar/scheduler/scheduler.component.html +9 -0
- package/src/lib/calendar/scheduler/scheduler.component.scss +181 -0
- package/src/lib/calendar/scheduler/scheduler.component.ts +249 -0
- package/src/lib/calendar/scheduler/scheduler.module.ts +45 -0
- package/src/lib/calendar/scheduler/toolbars/scheduler-toolbar-navigator.ts +133 -0
- package/src/lib/calendar/scheduler/toolbars/scheduler-toolbar-views.ts +33 -0
- package/src/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.html +43 -0
- package/src/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.scss +66 -0
- package/src/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.ts +50 -0
- package/src/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.html +45 -0
- package/src/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.scss +19 -0
- package/src/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.ts +103 -0
- package/src/lib/calendar/scheduler/views/month/scheduler-month-view.component.html +39 -0
- package/src/lib/calendar/scheduler/views/month/scheduler-month-view.component.scss +55 -0
- package/src/lib/calendar/scheduler/views/month/scheduler-month-view.component.ts +233 -0
- package/src/lib/calendar/scheduler/views/scheduler-view.component.ts +124 -0
- package/src/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.html +50 -0
- package/src/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.scss +4 -0
- package/src/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.ts +92 -0
- package/src/lib/checkbox/checkbox.component.html +22 -0
- package/src/lib/checkbox/checkbox.component.ts +107 -0
- package/src/lib/checkbox/checkbox.module.ts +11 -0
- package/src/lib/color-picker/color-box/color-box.component.html +37 -0
- package/src/lib/color-picker/color-box/color-box.component.scss +60 -0
- package/src/lib/color-picker/color-box/color-box.component.ts +438 -0
- package/src/lib/color-picker/color-picker.component.html +31 -0
- package/src/lib/color-picker/color-picker.component.ts +87 -0
- package/src/lib/color-picker/color-picker.module.ts +16 -0
- package/src/lib/context-menu/context-menu.component.html +42 -0
- package/src/lib/context-menu/context-menu.component.ts +78 -0
- package/src/lib/context-menu/context-menu.directive.ts +159 -0
- package/src/lib/context-menu/context-menu.module.ts +15 -0
- package/src/lib/data-filter/columns/filter-column-date.component.ts +123 -0
- package/src/lib/data-filter/columns/filter-column-number.component.ts +100 -0
- package/src/lib/data-filter/columns/filter-column-selection.component.ts +69 -0
- package/src/lib/data-filter/columns/filter-column-string.component.ts +100 -0
- package/src/lib/data-filter/filter-panel/filter-panel.component.html +120 -0
- package/src/lib/data-filter/filter-panel/filter-panel.component.scss +143 -0
- package/src/lib/data-filter/filter-panel/filter-panel.component.ts +266 -0
- package/src/lib/data-filter/filter.class.ts +73 -0
- package/src/lib/data-filter/filter.module.ts +52 -0
- package/src/lib/data-filter/toolbar/filter-toolbar.component.html +5 -0
- package/src/lib/data-filter/toolbar/filter-toolbar.component.scss +17 -0
- package/src/lib/data-filter/toolbar/filter-toolbar.component.ts +179 -0
- package/src/lib/data-list/core/data-list.component.ts +62 -0
- package/src/lib/data-list/list/list.component.html +32 -0
- package/src/lib/data-list/list/list.component.scss +64 -0
- package/src/lib/data-list/list/list.component.ts +149 -0
- package/src/lib/data-list/list/list.module.ts +14 -0
- package/src/lib/data-list/list/toolbar-list-view.component.ts +63 -0
- package/src/lib/data-source/datasource.component.ts +50 -0
- package/src/lib/data-source/datasource.module.ts +11 -0
- package/{lib/data-source/read-param.d.ts → src/lib/data-source/read-param.ts} +13 -3
- package/src/lib/date-picker/date-picker.component.html +30 -0
- package/src/lib/date-picker/date-picker.component.scss +5 -0
- package/src/lib/date-picker/date-picker.component.ts +720 -0
- package/src/lib/date-picker/date-picker.module.ts +17 -0
- package/src/lib/dialog/dialog.component.html +5 -0
- package/src/lib/dialog/dialog.component.scss +32 -0
- package/src/lib/dialog/dialog.component.ts +32 -0
- package/src/lib/dialog/dialog.module.ts +13 -0
- package/src/lib/dialog/dialog.service.ts +178 -0
- package/src/lib/drawer/content.component.ts +18 -0
- package/src/lib/drawer/drawer-container.component.ts +37 -0
- package/src/lib/drawer/drawer.component.ts +151 -0
- package/src/lib/drawer/drawer.module.ts +16 -0
- package/src/lib/dropdown/dropdown.component.html +26 -0
- package/src/lib/dropdown/dropdown.component.scss +8 -0
- package/src/lib/dropdown/dropdown.component.ts +197 -0
- package/src/lib/dropdown/dropdown.module.ts +19 -0
- package/src/lib/fieldset/fieldset.component.html +6 -0
- package/src/lib/fieldset/fieldset.component.ts +49 -0
- package/src/lib/fieldset/fieldset.module.ts +11 -0
- package/src/lib/form-group/form-group.component.html +15 -0
- package/src/lib/form-group/form-group.component.ts +39 -0
- package/src/lib/form-group/form-group.module.ts +14 -0
- package/src/lib/label/label.component.html +5 -0
- package/src/lib/label/label.component.ts +18 -0
- package/src/lib/label/label.module.ts +14 -0
- package/src/lib/loading/loading-indicator.component.html +27 -0
- package/src/lib/loading/loading-indicator.component.ts +16 -0
- package/src/lib/loading/loading-panel.component.ts +37 -0
- package/src/lib/loading/loading.module.ts +13 -0
- package/src/lib/loading/loading.service.ts +44 -0
- package/src/lib/menu/menu-item.component.ts +41 -0
- package/src/lib/menu/menu.component.html +74 -0
- package/src/lib/menu/menu.component.ts +111 -0
- package/src/lib/menu/menu.module.ts +13 -0
- package/src/lib/menu/menu2.component.scss +59 -0
- package/src/lib/menu/menu2.component.ts +98 -0
- package/src/lib/number-box/number-box.component.html +32 -0
- package/src/lib/number-box/number-box.component.ts +641 -0
- package/src/lib/number-box/number-box.module.ts +13 -0
- package/src/lib/page/content.component.ts +18 -0
- package/src/lib/page/footer.component.ts +13 -0
- package/src/lib/page/page.component.ts +43 -0
- package/src/lib/page/page.module.ts +14 -0
- package/src/lib/panel-box/panel-box.component.html +19 -0
- package/src/lib/panel-box/panel-box.component.scss +25 -0
- package/src/lib/panel-box/panel-box.component.ts +87 -0
- package/src/lib/panel-box/panel-box.module.ts +10 -0
- package/src/lib/password-box/password-box.component.html +22 -0
- package/src/lib/password-box/password-box.component.ts +30 -0
- package/src/lib/password-box/password-box.module.ts +16 -0
- package/src/lib/popover/custom-cdk-overlay.service.ts +82 -0
- package/src/lib/popover/overlay.service.ts +102 -0
- package/src/lib/popover/popover.component.html +5 -0
- package/src/lib/popover/popover.component.scss +9 -0
- package/src/lib/popover/popover.component.ts +130 -0
- package/src/lib/popover/popover.module.ts +11 -0
- package/src/lib/popup/popup.component.html +33 -0
- package/src/lib/popup/popup.component.scss +167 -0
- package/src/lib/popup/popup.component.ts +184 -0
- package/src/lib/popup/popup.module.ts +16 -0
- package/src/lib/popup/popup.service.ts +103 -0
- package/src/lib/progress-bar/progress-bar.component.html +5 -0
- package/src/lib/progress-bar/progress-bar.component.ts +10 -0
- package/src/lib/progress-bar/progress-bar.module.ts +11 -0
- package/src/lib/property-editor/editors/check-editor/check-editor.ts +44 -0
- package/src/lib/property-editor/editors/check-editor/check.module.ts +14 -0
- package/src/lib/property-editor/editors/color-editor/color.editor.ts +30 -0
- package/src/lib/property-editor/editors/color-editor/color.module.ts +20 -0
- package/src/lib/property-editor/editors/column-editor/column.editor.html +75 -0
- package/src/lib/property-editor/editors/column-editor/column.editor.scss +193 -0
- package/src/lib/property-editor/editors/column-editor/column.editor.ts +124 -0
- package/src/lib/property-editor/editors/column-editor/column.module.ts +28 -0
- package/src/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.html +80 -0
- package/src/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.scss +71 -0
- package/src/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.ts +232 -0
- package/src/lib/property-editor/editors/conditional-color-editor/conditional-color.module.ts +52 -0
- package/src/lib/property-editor/editors/date-editor/date.editor.ts +49 -0
- package/src/lib/property-editor/editors/date-editor/date.module.ts +20 -0
- package/src/lib/property-editor/editors/number-editor/number.editor.ts +46 -0
- package/src/lib/property-editor/editors/number-editor/number.module.ts +20 -0
- package/src/lib/property-editor/editors/range-editor/range.editor.html +67 -0
- package/src/lib/property-editor/editors/range-editor/range.editor.scss +68 -0
- package/src/lib/property-editor/editors/range-editor/range.editor.ts +153 -0
- package/src/lib/property-editor/editors/range-editor/range.module.ts +37 -0
- package/src/lib/property-editor/editors/searchbar-selectbox-editor/searchbar-selectbox-editor.html +8 -0
- package/src/lib/property-editor/editors/searchbar-selectbox-editor/searchbar-selectbox-editor.ts +70 -0
- package/src/lib/property-editor/editors/selectbox-editor/selectbox.editor.html +8 -0
- package/src/lib/property-editor/editors/selectbox-editor/selectbox.editor.ts +77 -0
- package/src/lib/property-editor/editors/selectbox-editor/selectbox.module.ts +18 -0
- package/src/lib/property-editor/editors/selection-editor/selection-editor.ts +52 -0
- package/src/lib/property-editor/editors/selection-editor/selection.module.ts +14 -0
- package/src/lib/property-editor/editors/switch-editor/number.editor.ts +26 -0
- package/src/lib/property-editor/editors/switch-editor/number.module.ts +21 -0
- package/src/lib/property-editor/editors/text-editor/text.editor.html +5 -0
- package/src/lib/property-editor/editors/text-editor/text.editor.ts +31 -0
- package/src/lib/property-editor/editors/text-editor/text.module.ts +20 -0
- package/src/lib/property-editor/editors/textarea-editor/textarea.editor.html +9 -0
- package/src/lib/property-editor/editors/textarea-editor/textarea.editor.ts +37 -0
- package/src/lib/property-editor/editors/textarea-editor/textarea.module.ts +20 -0
- package/src/lib/property-editor/editors/time-editor/time.editor.ts +38 -0
- package/src/lib/property-editor/editors/time-editor/time.module.ts +20 -0
- package/src/lib/property-editor/property-editor-renderer.directive.ts +165 -0
- package/src/lib/property-editor/property-editor.class.ts +178 -0
- package/src/lib/property-editor/property-editor.module.ts +115 -0
- package/src/lib/query-builder/query-builder-group.component.html +68 -0
- package/src/lib/query-builder/query-builder-group.component.ts +122 -0
- package/src/lib/query-builder/query-builder-popup/query-builder-popup.component.html +82 -0
- package/src/lib/query-builder/query-builder-popup/query-builder-popup.component.ts +178 -0
- package/src/lib/query-builder/query-builder-rule.component.html +135 -0
- package/src/lib/query-builder/query-builder-rule.component.ts +390 -0
- package/src/lib/query-builder/query-builder.class.ts +53 -0
- package/src/lib/query-builder/query-builder.component.html +3 -0
- package/src/lib/query-builder/query-builder.component.scss +286 -0
- package/src/lib/query-builder/query-builder.component.ts +220 -0
- package/src/lib/query-builder/query-builder.module.ts +44 -0
- package/src/lib/query-builder/query-builder.service.ts +188 -0
- package/src/lib/search-bar/search-bar.component.html +30 -0
- package/src/lib/search-bar/search-bar.component.scss +114 -0
- package/src/lib/search-bar/search-bar.component.ts +287 -0
- package/src/lib/search-bar/search-bar.module.ts +33 -0
- package/src/lib/searchbox/searchbox.component.html +25 -0
- package/src/lib/searchbox/searchbox.component.ts +85 -0
- package/src/lib/searchbox/searchbox.module.ts +17 -0
- package/src/lib/selectbox/selectbox.component.html +100 -0
- package/src/lib/selectbox/selectbox.component.ts +984 -0
- package/src/lib/selectbox/selectbox.module.ts +31 -0
- package/src/lib/selectbox/selectbox2.component.html +78 -0
- package/src/lib/selectbox/selectbox2.component.ts +603 -0
- package/src/lib/selection-list/selection-list.component.html +21 -0
- package/src/lib/selection-list/selection-list.component.ts +115 -0
- package/src/lib/selection-list/selection-list.module.ts +13 -0
- package/src/lib/switch/switch.component.html +4 -0
- package/src/lib/switch/switch.component.scss +65 -0
- package/src/lib/switch/switch.component.ts +57 -0
- package/src/lib/switch/switch.module.ts +14 -0
- package/src/lib/tab-page/tab-page-Renderer.component.ts +70 -0
- package/src/lib/tab-page/tab-page-host.component.ts +110 -0
- package/src/lib/tab-page/tab-page.module.ts +13 -0
- package/src/lib/tab-page/tab-page.service.ts +176 -0
- package/src/lib/tab-strip/tab-strip.component.html +6 -0
- package/src/lib/tab-strip/tab-strip.component.ts +47 -0
- package/src/lib/tab-strip/tab-strip.module.ts +11 -0
- package/src/lib/tab-view/dynamic-tabs.directive.ts +17 -0
- package/src/lib/tab-view/tab-view.component.html +33 -0
- package/src/lib/tab-view/tab-view.component.scss +0 -0
- package/src/lib/tab-view/tab-view.component.ts +129 -0
- package/src/lib/tab-view/tab-view.module.ts +12 -0
- package/src/lib/tab-view/tab.component.html +8 -0
- package/src/lib/tab-view/tab.component.ts +15 -0
- package/src/lib/textarea/textarea.component.html +13 -0
- package/src/lib/textarea/textarea.component.ts +24 -0
- package/src/lib/textarea/textarea.module.ts +14 -0
- package/src/lib/textbox/textbox.component.html +22 -0
- package/src/lib/textbox/textbox.component.ts +38 -0
- package/src/lib/textbox/textbox.module.ts +16 -0
- package/src/lib/time-picker/time-picker.component.html +21 -0
- package/src/lib/time-picker/time-picker.component.ts +1003 -0
- package/src/lib/time-picker/time-picker.module.ts +15 -0
- package/src/lib/toast/toast-message/toast-message.component.html +17 -0
- package/src/lib/toast/toast-message/toast-message.component.scss +75 -0
- package/src/lib/toast/toast-message/toast-message.component.ts +64 -0
- package/src/lib/toast/toast-wrapper/toast-wrapper.component.scss +15 -0
- package/src/lib/toast/toast-wrapper/toast-wrapper.component.ts +13 -0
- package/src/lib/toast/toast.module.ts +12 -0
- package/src/lib/toast/toast.service.ts +64 -0
- package/src/lib/toolbar/group-button/toolbar-group-button.component.ts +54 -0
- package/src/lib/toolbar/menu/toolbar-menu.component.html +4 -0
- package/src/lib/toolbar/menu/toolbar-menu.component.ts +81 -0
- package/src/lib/toolbar/search/toolbar-search.component.html +4 -0
- package/src/lib/toolbar/search/toolbar-search.component.scss +24 -0
- package/src/lib/toolbar/search/toolbar-search.component.ts +61 -0
- package/src/lib/toolbar/title/toolbar-title.component.ts +35 -0
- package/src/lib/toolbar/toolbar-item.ts +4 -0
- package/src/lib/toolbar/toolbar.component.html +4 -0
- package/src/lib/toolbar/toolbar.component.scss +9 -0
- package/src/lib/toolbar/toolbar.component.ts +16 -0
- package/src/lib/toolbar/toolbar.module.ts +25 -0
- package/src/lib/tooltip/tooltip.directive.ts +101 -0
- package/src/lib/tooltip/tooltip.module.ts +11 -0
- package/src/lib/tree-side-menu/tree-side-menu.component.html +43 -0
- package/src/lib/tree-side-menu/tree-side-menu.component.ts +698 -0
- package/src/lib/tree-side-menu/tree-side-menu.module.ts +19 -0
- package/src/lib/tree-view/tree-view.component.html +46 -0
- package/src/lib/tree-view/tree-view.component.ts +835 -0
- package/src/lib/tree-view/tree-view.module.ts +16 -0
- package/src/lib/upload-file/upload-file.component.html +16 -0
- package/src/lib/upload-file/upload-file.component.ts +230 -0
- package/src/lib/upload-file/upload-file.events.ts +11 -0
- package/src/lib/upload-file/upload-file.module.ts +16 -0
- package/src/lib/validation/validation-form.component.ts +78 -0
- package/src/lib/validation/validation-rule.widget.ts +112 -0
- package/src/lib/validation/validation.class.ts +22 -0
- package/src/lib/validation/validation.component.ts +92 -0
- package/src/lib/validation/validation.module.ts +28 -0
- package/{public-api.d.ts → src/public-api.ts} +61 -2
- package/src/test.ts +28 -0
- package/tsconfig.lib.json +25 -0
- package/tsconfig.lib.prod.json +6 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- package/acorex-components.d.ts +0 -5
- package/esm2020/acorex-components.mjs +0 -5
- package/esm2020/lib/accordion/accordion.component.mjs +0 -44
- package/esm2020/lib/accordion/accordion.module.mjs +0 -20
- package/esm2020/lib/base/base-page.class.mjs +0 -94
- package/esm2020/lib/base/components.class.mjs +0 -17
- package/esm2020/lib/base/element.class.mjs +0 -294
- package/esm2020/lib/base/events.class.mjs +0 -11
- package/esm2020/lib/button/button.component.mjs +0 -71
- package/esm2020/lib/button/button.module.mjs +0 -21
- package/esm2020/lib/calendar/calendar-box/calendar-box.component.mjs +0 -413
- package/esm2020/lib/calendar/calendar-box/calendar-box.module.mjs +0 -22
- package/esm2020/lib/calendar/scheduler/scheduler-views.property.mjs +0 -54
- package/esm2020/lib/calendar/scheduler/scheduler.class.mjs +0 -18
- package/esm2020/lib/calendar/scheduler/scheduler.component.mjs +0 -213
- package/esm2020/lib/calendar/scheduler/scheduler.module.mjs +0 -68
- package/esm2020/lib/calendar/scheduler/toolbars/scheduler-toolbar-navigator.mjs +0 -132
- package/esm2020/lib/calendar/scheduler/toolbars/scheduler-toolbar-views.mjs +0 -37
- package/esm2020/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.mjs +0 -47
- package/esm2020/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.mjs +0 -95
- package/esm2020/lib/calendar/scheduler/views/month/scheduler-month-view.component.mjs +0 -204
- package/esm2020/lib/calendar/scheduler/views/scheduler-view.component.mjs +0 -99
- package/esm2020/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.mjs +0 -77
- package/esm2020/lib/checkbox/checkbox.component.mjs +0 -98
- package/esm2020/lib/checkbox/checkbox.module.mjs +0 -20
- package/esm2020/lib/color-picker/color-box/color-box.component.mjs +0 -422
- package/esm2020/lib/color-picker/color-picker.component.mjs +0 -82
- package/esm2020/lib/color-picker/color-picker.module.mjs +0 -24
- package/esm2020/lib/context-menu/context-menu.component.mjs +0 -65
- package/esm2020/lib/context-menu/context-menu.directive.mjs +0 -135
- package/esm2020/lib/context-menu/context-menu.module.mjs +0 -20
- package/esm2020/lib/data-filter/columns/filter-column-date.component.mjs +0 -138
- package/esm2020/lib/data-filter/columns/filter-column-number.component.mjs +0 -117
- package/esm2020/lib/data-filter/columns/filter-column-selection.component.mjs +0 -74
- package/esm2020/lib/data-filter/columns/filter-column-string.component.mjs +0 -117
- package/esm2020/lib/data-filter/filter-panel/filter-panel.component.mjs +0 -258
- package/esm2020/lib/data-filter/filter.class.mjs +0 -44
- package/esm2020/lib/data-filter/filter.module.mjs +0 -90
- package/esm2020/lib/data-filter/toolbar/filter-toolbar.component.mjs +0 -166
- package/esm2020/lib/data-list/core/data-list.component.mjs +0 -40
- package/esm2020/lib/data-list/list/list.component.mjs +0 -124
- package/esm2020/lib/data-list/list/list.module.mjs +0 -22
- package/esm2020/lib/data-list/list/toolbar-list-view.component.mjs +0 -85
- package/esm2020/lib/data-source/datasource.component.mjs +0 -47
- package/esm2020/lib/data-source/datasource.module.mjs +0 -18
- package/esm2020/lib/data-source/read-param.mjs +0 -5
- package/esm2020/lib/date-picker/date-picker.component.mjs +0 -702
- package/esm2020/lib/date-picker/date-picker.module.mjs +0 -25
- package/esm2020/lib/dialog/dialog.component.mjs +0 -24
- package/esm2020/lib/dialog/dialog.module.mjs +0 -21
- package/esm2020/lib/dialog/dialog.service.mjs +0 -150
- package/esm2020/lib/drawer/content.component.mjs +0 -18
- package/esm2020/lib/drawer/drawer-container.component.mjs +0 -36
- package/esm2020/lib/drawer/drawer.component.mjs +0 -142
- package/esm2020/lib/drawer/drawer.module.mjs +0 -23
- package/esm2020/lib/dropdown/dropdown.component.mjs +0 -176
- package/esm2020/lib/dropdown/dropdown.module.mjs +0 -26
- package/esm2020/lib/fieldset/fieldset.component.mjs +0 -59
- package/esm2020/lib/fieldset/fieldset.module.mjs +0 -19
- package/esm2020/lib/form-group/form-group.component.mjs +0 -34
- package/esm2020/lib/form-group/form-group.module.mjs +0 -21
- package/esm2020/lib/label/label.component.mjs +0 -19
- package/esm2020/lib/label/label.module.mjs +0 -21
- package/esm2020/lib/loading/loading-indicator.component.mjs +0 -17
- package/esm2020/lib/loading/loading-panel.component.mjs +0 -44
- package/esm2020/lib/loading/loading.module.mjs +0 -21
- package/esm2020/lib/loading/loading.service.mjs +0 -45
- package/esm2020/lib/menu/menu-item.component.mjs +0 -47
- package/esm2020/lib/menu/menu.component.mjs +0 -86
- package/esm2020/lib/menu/menu.module.mjs +0 -22
- package/esm2020/lib/menu/menu2.component.mjs +0 -96
- package/esm2020/lib/number-box/number-box.component.mjs +0 -622
- package/esm2020/lib/number-box/number-box.module.mjs +0 -21
- package/esm2020/lib/page/content.component.mjs +0 -32
- package/esm2020/lib/page/footer.component.mjs +0 -19
- package/esm2020/lib/page/page.component.mjs +0 -53
- package/esm2020/lib/page/page.module.mjs +0 -22
- package/esm2020/lib/panel-box/panel-box.component.mjs +0 -88
- package/esm2020/lib/panel-box/panel-box.module.mjs +0 -19
- package/esm2020/lib/password-box/password-box.component.mjs +0 -31
- package/esm2020/lib/password-box/password-box.module.mjs +0 -23
- package/esm2020/lib/popover/custom-cdk-overlay.service.mjs +0 -48
- package/esm2020/lib/popover/overlay.service.mjs +0 -90
- package/esm2020/lib/popover/popover.component.mjs +0 -127
- package/esm2020/lib/popover/popover.module.mjs +0 -19
- package/esm2020/lib/popup/popup.component.mjs +0 -147
- package/esm2020/lib/popup/popup.module.mjs +0 -25
- package/esm2020/lib/popup/popup.service.mjs +0 -93
- package/esm2020/lib/progress-bar/progress-bar.component.mjs +0 -19
- package/esm2020/lib/progress-bar/progress-bar.module.mjs +0 -19
- package/esm2020/lib/property-editor/editors/check-editor/check-editor.mjs +0 -61
- package/esm2020/lib/property-editor/editors/check-editor/check.module.mjs +0 -22
- package/esm2020/lib/property-editor/editors/color-editor/color.editor.mjs +0 -38
- package/esm2020/lib/property-editor/editors/color-editor/color.module.mjs +0 -24
- package/esm2020/lib/property-editor/editors/column-editor/column.editor.mjs +0 -115
- package/esm2020/lib/property-editor/editors/column-editor/column.module.mjs +0 -32
- package/esm2020/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.mjs +0 -211
- package/esm2020/lib/property-editor/editors/conditional-color-editor/conditional-color.module.mjs +0 -78
- package/esm2020/lib/property-editor/editors/date-editor/date.editor.mjs +0 -51
- package/esm2020/lib/property-editor/editors/date-editor/date.module.mjs +0 -24
- package/esm2020/lib/property-editor/editors/number-editor/number.editor.mjs +0 -63
- package/esm2020/lib/property-editor/editors/number-editor/number.module.mjs +0 -24
- package/esm2020/lib/property-editor/editors/range-editor/range.editor.mjs +0 -140
- package/esm2020/lib/property-editor/editors/range-editor/range.module.mjs +0 -61
- package/esm2020/lib/property-editor/editors/searchbar-selectbox-editor/searchbar-selectbox-editor.mjs +0 -72
- package/esm2020/lib/property-editor/editors/selectbox-editor/selectbox.editor.mjs +0 -71
- package/esm2020/lib/property-editor/editors/selectbox-editor/selectbox.module.mjs +0 -25
- package/esm2020/lib/property-editor/editors/selection-editor/selection-editor.mjs +0 -69
- package/esm2020/lib/property-editor/editors/selection-editor/selection.module.mjs +0 -22
- package/esm2020/lib/property-editor/editors/switch-editor/number.editor.mjs +0 -29
- package/esm2020/lib/property-editor/editors/switch-editor/number.module.mjs +0 -25
- package/esm2020/lib/property-editor/editors/text-editor/text.editor.mjs +0 -32
- package/esm2020/lib/property-editor/editors/text-editor/text.module.mjs +0 -24
- package/esm2020/lib/property-editor/editors/textarea-editor/textarea.editor.mjs +0 -32
- package/esm2020/lib/property-editor/editors/textarea-editor/textarea.module.mjs +0 -24
- package/esm2020/lib/property-editor/editors/time-editor/time.editor.mjs +0 -43
- package/esm2020/lib/property-editor/editors/time-editor/time.module.mjs +0 -24
- package/esm2020/lib/property-editor/property-editor-renderer.directive.mjs +0 -154
- package/esm2020/lib/property-editor/property-editor.class.mjs +0 -101
- package/esm2020/lib/property-editor/property-editor.module.mjs +0 -196
- package/esm2020/lib/query-builder/query-builder-group.component.mjs +0 -124
- package/esm2020/lib/query-builder/query-builder-popup/query-builder-popup.component.mjs +0 -171
- package/esm2020/lib/query-builder/query-builder-rule.component.mjs +0 -395
- package/esm2020/lib/query-builder/query-builder.class.mjs +0 -20
- package/esm2020/lib/query-builder/query-builder.component.mjs +0 -82
- package/esm2020/lib/query-builder/query-builder.module.mjs +0 -62
- package/esm2020/lib/query-builder/query-builder.service.mjs +0 -197
- package/esm2020/lib/search-bar/search-bar.component.mjs +0 -283
- package/esm2020/lib/search-bar/search-bar.module.mjs +0 -63
- package/esm2020/lib/searchbox/searchbox.component.mjs +0 -79
- package/esm2020/lib/searchbox/searchbox.module.mjs +0 -24
- package/esm2020/lib/selectbox/selectbox.component.mjs +0 -961
- package/esm2020/lib/selectbox/selectbox.module.mjs +0 -44
- package/esm2020/lib/selectbox/selectbox2.component.mjs +0 -574
- package/esm2020/lib/selection-list/selection-list.component.mjs +0 -108
- package/esm2020/lib/selection-list/selection-list.module.mjs +0 -21
- package/esm2020/lib/switch/switch.component.mjs +0 -51
- package/esm2020/lib/switch/switch.module.mjs +0 -20
- package/esm2020/lib/tab-page/tab-page-Renderer.component.mjs +0 -71
- package/esm2020/lib/tab-page/tab-page-host.component.mjs +0 -116
- package/esm2020/lib/tab-page/tab-page.module.mjs +0 -21
- package/esm2020/lib/tab-page/tab-page.service.mjs +0 -156
- package/esm2020/lib/tab-strip/tab-strip.component.mjs +0 -36
- package/esm2020/lib/tab-strip/tab-strip.module.mjs +0 -19
- package/esm2020/lib/tab-view/dynamic-tabs.directive.mjs +0 -24
- package/esm2020/lib/tab-view/tab-view.component.mjs +0 -105
- package/esm2020/lib/tab-view/tab-view.module.mjs +0 -21
- package/esm2020/lib/tab-view/tab.component.mjs +0 -30
- package/esm2020/lib/textarea/textarea.component.mjs +0 -26
- package/esm2020/lib/textarea/textarea.module.mjs +0 -21
- package/esm2020/lib/textbox/textbox.component.mjs +0 -39
- package/esm2020/lib/textbox/textbox.module.mjs +0 -24
- package/esm2020/lib/time-picker/time-picker.component.mjs +0 -943
- package/esm2020/lib/time-picker/time-picker.module.mjs +0 -22
- package/esm2020/lib/toast/toast-message/toast-message.component.mjs +0 -74
- package/esm2020/lib/toast/toast-wrapper/toast-wrapper.component.mjs +0 -13
- package/esm2020/lib/toast/toast.module.mjs +0 -21
- package/esm2020/lib/toast/toast.service.mjs +0 -44
- package/esm2020/lib/toolbar/group-button/toolbar-group-button.component.mjs +0 -78
- package/esm2020/lib/toolbar/menu/toolbar-menu.component.mjs +0 -57
- package/esm2020/lib/toolbar/search/toolbar-search.component.mjs +0 -54
- package/esm2020/lib/toolbar/title/toolbar-title.component.mjs +0 -47
- package/esm2020/lib/toolbar/toolbar-item.mjs +0 -6
- package/esm2020/lib/toolbar/toolbar.component.mjs +0 -13
- package/esm2020/lib/toolbar/toolbar.module.mjs +0 -40
- package/esm2020/lib/tooltip/tooltip.directive.mjs +0 -100
- package/esm2020/lib/tooltip/tooltip.module.mjs +0 -19
- package/esm2020/lib/tree-side-menu/tree-side-menu.component.mjs +0 -646
- package/esm2020/lib/tree-side-menu/tree-side-menu.module.mjs +0 -35
- package/esm2020/lib/tree-view/tree-view.component.mjs +0 -775
- package/esm2020/lib/tree-view/tree-view.module.mjs +0 -22
- package/esm2020/lib/upload-file/upload-file.component.mjs +0 -208
- package/esm2020/lib/upload-file/upload-file.events.mjs +0 -2
- package/esm2020/lib/upload-file/upload-file.module.mjs +0 -24
- package/esm2020/lib/validation/validation-form.component.mjs +0 -65
- package/esm2020/lib/validation/validation-rule.widget.mjs +0 -111
- package/esm2020/lib/validation/validation.class.mjs +0 -2
- package/esm2020/lib/validation/validation.component.mjs +0 -89
- package/esm2020/lib/validation/validation.module.mjs +0 -34
- package/esm2020/public-api.mjs +0 -158
- package/fesm2015/acorex-components.mjs +0 -15988
- package/fesm2015/acorex-components.mjs.map +0 -1
- package/fesm2020/acorex-components.mjs +0 -15923
- package/fesm2020/acorex-components.mjs.map +0 -1
- package/lib/accordion/accordion.component.d.ts +0 -13
- package/lib/accordion/accordion.module.d.ts +0 -9
- package/lib/base/base-page.class.d.ts +0 -46
- package/lib/base/components.class.d.ts +0 -10
- package/lib/base/element.class.d.ts +0 -106
- package/lib/base/events.class.d.ts +0 -18
- package/lib/button/button.component.d.ts +0 -21
- package/lib/button/button.module.d.ts +0 -8
- package/lib/calendar/calendar-box/calendar-box.component.d.ts +0 -81
- package/lib/calendar/calendar-box/calendar-box.module.d.ts +0 -11
- package/lib/calendar/scheduler/scheduler-views.property.d.ts +0 -19
- package/lib/calendar/scheduler/scheduler.component.d.ts +0 -39
- package/lib/calendar/scheduler/scheduler.module.d.ts +0 -21
- package/lib/calendar/scheduler/toolbars/scheduler-toolbar-navigator.d.ts +0 -25
- package/lib/calendar/scheduler/toolbars/scheduler-toolbar-views.d.ts +0 -14
- package/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.d.ts +0 -16
- package/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.d.ts +0 -26
- package/lib/calendar/scheduler/views/month/scheduler-month-view.component.d.ts +0 -37
- package/lib/calendar/scheduler/views/scheduler-view.component.d.ts +0 -28
- package/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.d.ts +0 -24
- package/lib/checkbox/checkbox.component.d.ts +0 -30
- package/lib/checkbox/checkbox.module.d.ts +0 -9
- package/lib/color-picker/color-box/color-box.component.d.ts +0 -25
- package/lib/color-picker/color-picker.component.d.ts +0 -30
- package/lib/color-picker/color-picker.module.d.ts +0 -13
- package/lib/context-menu/context-menu.component.d.ts +0 -22
- package/lib/context-menu/context-menu.directive.d.ts +0 -38
- package/lib/context-menu/context-menu.module.d.ts +0 -9
- package/lib/data-filter/columns/filter-column-date.component.d.ts +0 -22
- package/lib/data-filter/columns/filter-column-number.component.d.ts +0 -15
- package/lib/data-filter/columns/filter-column-selection.component.d.ts +0 -18
- package/lib/data-filter/columns/filter-column-string.component.d.ts +0 -15
- package/lib/data-filter/filter-panel/filter-panel.component.d.ts +0 -45
- package/lib/data-filter/filter.class.d.ts +0 -40
- package/lib/data-filter/filter.module.d.ts +0 -24
- package/lib/data-filter/toolbar/filter-toolbar.component.d.ts +0 -25
- package/lib/data-list/core/data-list.component.d.ts +0 -15
- package/lib/data-list/list/list.component.d.ts +0 -40
- package/lib/data-list/list/list.module.d.ts +0 -11
- package/lib/data-list/list/toolbar-list-view.component.d.ts +0 -17
- package/lib/data-source/datasource.component.d.ts +0 -16
- package/lib/data-source/datasource.module.d.ts +0 -7
- package/lib/date-picker/date-picker.component.d.ts +0 -81
- package/lib/date-picker/date-picker.module.d.ts +0 -14
- package/lib/dialog/dialog.component.d.ts +0 -14
- package/lib/dialog/dialog.module.d.ts +0 -10
- package/lib/dialog/dialog.service.d.ts +0 -36
- package/lib/drawer/content.component.d.ts +0 -7
- package/lib/drawer/drawer-container.component.d.ts +0 -10
- package/lib/drawer/drawer.component.d.ts +0 -34
- package/lib/drawer/drawer.module.d.ts +0 -10
- package/lib/dropdown/dropdown.component.d.ts +0 -38
- package/lib/dropdown/dropdown.module.d.ts +0 -13
- package/lib/fieldset/fieldset.component.d.ts +0 -11
- package/lib/fieldset/fieldset.module.d.ts +0 -8
- package/lib/form-group/form-group.component.d.ts +0 -14
- package/lib/form-group/form-group.module.d.ts +0 -8
- package/lib/label/label.component.d.ts +0 -9
- package/lib/label/label.module.d.ts +0 -8
- package/lib/loading/loading-indicator.component.d.ts +0 -9
- package/lib/loading/loading-panel.component.d.ts +0 -13
- package/lib/loading/loading.module.d.ts +0 -10
- package/lib/loading/loading.service.d.ts +0 -13
- package/lib/menu/menu-item.component.d.ts +0 -18
- package/lib/menu/menu.component.d.ts +0 -35
- package/lib/menu/menu.module.d.ts +0 -11
- package/lib/menu/menu2.component.d.ts +0 -21
- package/lib/number-box/number-box.component.d.ts +0 -52
- package/lib/number-box/number-box.module.d.ts +0 -10
- package/lib/page/content.component.d.ts +0 -8
- package/lib/page/footer.component.d.ts +0 -5
- package/lib/page/page.component.d.ts +0 -16
- package/lib/page/page.module.d.ts +0 -11
- package/lib/panel-box/panel-box.component.d.ts +0 -19
- package/lib/panel-box/panel-box.module.d.ts +0 -8
- package/lib/password-box/password-box.component.d.ts +0 -12
- package/lib/password-box/password-box.module.d.ts +0 -10
- package/lib/popover/custom-cdk-overlay.service.d.ts +0 -19
- package/lib/popover/overlay.service.d.ts +0 -31
- package/lib/popover/popover.component.d.ts +0 -34
- package/lib/popover/popover.module.d.ts +0 -8
- package/lib/popup/popup.component.d.ts +0 -40
- package/lib/popup/popup.module.d.ts +0 -13
- package/lib/popup/popup.service.d.ts +0 -22
- package/lib/progress-bar/progress-bar.component.d.ts +0 -7
- package/lib/progress-bar/progress-bar.module.d.ts +0 -8
- package/lib/property-editor/editors/check-editor/check-editor.d.ts +0 -19
- package/lib/property-editor/editors/check-editor/check.module.d.ts +0 -11
- package/lib/property-editor/editors/color-editor/color.editor.d.ts +0 -13
- package/lib/property-editor/editors/color-editor/color.module.d.ts +0 -12
- package/lib/property-editor/editors/column-editor/column.editor.d.ts +0 -34
- package/lib/property-editor/editors/column-editor/column.module.d.ts +0 -20
- package/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.d.ts +0 -44
- package/lib/property-editor/editors/conditional-color-editor/conditional-color.module.d.ts +0 -19
- package/lib/property-editor/editors/date-editor/date.editor.d.ts +0 -28
- package/lib/property-editor/editors/date-editor/date.module.d.ts +0 -12
- package/lib/property-editor/editors/number-editor/number.editor.d.ts +0 -20
- package/lib/property-editor/editors/number-editor/number.module.d.ts +0 -12
- package/lib/property-editor/editors/range-editor/range.editor.d.ts +0 -29
- package/lib/property-editor/editors/range-editor/range.module.d.ts +0 -18
- package/lib/property-editor/editors/searchbar-selectbox-editor/searchbar-selectbox-editor.d.ts +0 -29
- package/lib/property-editor/editors/selectbox-editor/selectbox.editor.d.ts +0 -28
- package/lib/property-editor/editors/selectbox-editor/selectbox.module.d.ts +0 -14
- package/lib/property-editor/editors/selection-editor/selection-editor.d.ts +0 -25
- package/lib/property-editor/editors/selection-editor/selection.module.d.ts +0 -11
- package/lib/property-editor/editors/switch-editor/number.editor.d.ts +0 -11
- package/lib/property-editor/editors/switch-editor/number.module.d.ts +0 -13
- package/lib/property-editor/editors/text-editor/text.editor.d.ts +0 -18
- package/lib/property-editor/editors/text-editor/text.module.d.ts +0 -12
- package/lib/property-editor/editors/textarea-editor/textarea.editor.d.ts +0 -17
- package/lib/property-editor/editors/textarea-editor/textarea.module.d.ts +0 -12
- package/lib/property-editor/editors/time-editor/time.editor.d.ts +0 -17
- package/lib/property-editor/editors/time-editor/time.module.d.ts +0 -12
- package/lib/property-editor/property-editor-renderer.directive.d.ts +0 -30
- package/lib/property-editor/property-editor.class.d.ts +0 -92
- package/lib/property-editor/property-editor.module.d.ts +0 -21
- package/lib/query-builder/query-builder-group.component.d.ts +0 -33
- package/lib/query-builder/query-builder-popup/query-builder-popup.component.d.ts +0 -35
- package/lib/query-builder/query-builder-rule.component.d.ts +0 -45
- package/lib/query-builder/query-builder.class.d.ts +0 -45
- package/lib/query-builder/query-builder.component.d.ts +0 -27
- package/lib/query-builder/query-builder.module.d.ts +0 -23
- package/lib/query-builder/query-builder.service.d.ts +0 -18
- package/lib/search-bar/search-bar.component.d.ts +0 -61
- package/lib/search-bar/search-bar.module.d.ts +0 -18
- package/lib/searchbox/searchbox.component.d.ts +0 -22
- package/lib/searchbox/searchbox.module.d.ts +0 -13
- package/lib/selectbox/selectbox.component.d.ts +0 -118
- package/lib/selectbox/selectbox.module.d.ts +0 -15
- package/lib/selectbox/selectbox2.component.d.ts +0 -103
- package/lib/selection-list/selection-list.component.d.ts +0 -32
- package/lib/selection-list/selection-list.module.d.ts +0 -10
- package/lib/switch/switch.component.d.ts +0 -20
- package/lib/switch/switch.module.d.ts +0 -9
- package/lib/tab-page/tab-page-Renderer.component.d.ts +0 -16
- package/lib/tab-page/tab-page-host.component.d.ts +0 -25
- package/lib/tab-page/tab-page.module.d.ts +0 -10
- package/lib/tab-page/tab-page.service.d.ts +0 -30
- package/lib/tab-strip/tab-strip.component.d.ts +0 -28
- package/lib/tab-strip/tab-strip.module.d.ts +0 -8
- package/lib/tab-view/dynamic-tabs.directive.d.ts +0 -16
- package/lib/tab-view/tab-view.component.d.ts +0 -26
- package/lib/tab-view/tab-view.module.d.ts +0 -10
- package/lib/tab-view/tab.component.d.ts +0 -12
- package/lib/textarea/textarea.component.d.ts +0 -12
- package/lib/textarea/textarea.module.d.ts +0 -8
- package/lib/textbox/textbox.component.d.ts +0 -16
- package/lib/textbox/textbox.module.d.ts +0 -11
- package/lib/time-picker/time-picker.component.d.ts +0 -52
- package/lib/time-picker/time-picker.module.d.ts +0 -11
- package/lib/toast/toast-message/toast-message.component.d.ts +0 -18
- package/lib/toast/toast-wrapper/toast-wrapper.component.d.ts +0 -8
- package/lib/toast/toast.module.d.ts +0 -9
- package/lib/toast/toast.service.d.ts +0 -18
- package/lib/toolbar/group-button/toolbar-group-button.component.d.ts +0 -12
- package/lib/toolbar/menu/toolbar-menu.component.d.ts +0 -24
- package/lib/toolbar/search/toolbar-search.component.d.ts +0 -16
- package/lib/toolbar/title/toolbar-title.component.d.ts +0 -9
- package/lib/toolbar/toolbar-item.d.ts +0 -3
- package/lib/toolbar/toolbar.component.d.ts +0 -8
- package/lib/toolbar/toolbar.module.d.ts +0 -14
- package/lib/tooltip/tooltip.directive.d.ts +0 -21
- package/lib/tooltip/tooltip.module.d.ts +0 -8
- package/lib/tree-side-menu/tree-side-menu.component.d.ts +0 -111
- package/lib/tree-side-menu/tree-side-menu.module.d.ts +0 -11
- package/lib/tree-view/tree-view.component.d.ts +0 -121
- package/lib/tree-view/tree-view.module.d.ts +0 -11
- package/lib/upload-file/upload-file.component.d.ts +0 -42
- package/lib/upload-file/upload-file.events.d.ts +0 -10
- package/lib/upload-file/upload-file.module.d.ts +0 -13
- package/lib/validation/validation-form.component.d.ts +0 -19
- package/lib/validation/validation-rule.widget.d.ts +0 -23
- package/lib/validation/validation.class.d.ts +0 -16
- package/lib/validation/validation.component.d.ts +0 -25
- package/lib/validation/validation.module.d.ts +0 -11
@@ -0,0 +1,72 @@
|
|
1
|
+
import { Component, Input, ViewEncapsulation, ElementRef, ViewChild, HostListener } from '@angular/core';
|
2
|
+
import { AXBaseButtonComponent } from '../base/element.class';
|
3
|
+
|
4
|
+
@Component({
|
5
|
+
selector: 'ax-button',
|
6
|
+
encapsulation: ViewEncapsulation.None,
|
7
|
+
templateUrl: './button.component.html'
|
8
|
+
})
|
9
|
+
export class AXButtonComponent extends AXBaseButtonComponent {
|
10
|
+
|
11
|
+
constructor(private el: ElementRef) {
|
12
|
+
super();
|
13
|
+
}
|
14
|
+
|
15
|
+
@ViewChild('container', { static: true }) container: ElementRef<HTMLButtonElement>;
|
16
|
+
|
17
|
+
@Input()
|
18
|
+
type: string = 'primary';
|
19
|
+
|
20
|
+
@Input()
|
21
|
+
icon: string;
|
22
|
+
|
23
|
+
@Input()
|
24
|
+
submitBehavior: boolean = false;
|
25
|
+
|
26
|
+
@Input()
|
27
|
+
cancelBehavior: boolean = false;
|
28
|
+
|
29
|
+
@Input()
|
30
|
+
block: boolean = false;
|
31
|
+
|
32
|
+
@Input()
|
33
|
+
loading: boolean = false;
|
34
|
+
|
35
|
+
@Input()
|
36
|
+
selected: boolean = false;
|
37
|
+
|
38
|
+
ngAfterViewInit(): void {
|
39
|
+
if (this.submitBehavior) {
|
40
|
+
setTimeout(() => {
|
41
|
+
this.focusButton();
|
42
|
+
}, 10);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
handleClick(e: MouseEvent) {
|
49
|
+
if (this.disabled === true) {
|
50
|
+
this.click.emit({
|
51
|
+
component: this,
|
52
|
+
htmlElement: this.el.nativeElement,
|
53
|
+
htmlEvent: e,
|
54
|
+
});
|
55
|
+
e.stopPropagation();
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
@HostListener('document:keydown.escape', ['$event'])
|
60
|
+
onKeydownHandler(e: KeyboardEvent) {
|
61
|
+
if (this.cancelBehavior) {
|
62
|
+
this.handleClick(null);
|
63
|
+
e.stopPropagation();
|
64
|
+
e.preventDefault();
|
65
|
+
return false;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
focusButton() {
|
70
|
+
this.container.nativeElement.focus();
|
71
|
+
}
|
72
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { NgModule } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { AXButtonComponent } from './button.component';
|
4
|
+
|
5
|
+
const COMPONENT = [AXButtonComponent];
|
6
|
+
const MODULES = [CommonModule];
|
7
|
+
|
8
|
+
@NgModule({
|
9
|
+
declarations: [...COMPONENT],
|
10
|
+
imports: [...MODULES],
|
11
|
+
exports: [...COMPONENT],
|
12
|
+
providers: [],
|
13
|
+
})
|
14
|
+
export class AXButtonModule { }
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<div class="ax-calendar-container {{size}}" [ngClass]="type">
|
2
|
+
<div class="ax-calendar-header">
|
3
|
+
<div class="ax-controll-button">
|
4
|
+
<ax-button type="light blank" (click)="next()">
|
5
|
+
{{'common.next' | trans}}
|
6
|
+
</ax-button>
|
7
|
+
</div>
|
8
|
+
<div class="ax-nav-button" [ngSwitch]="view">
|
9
|
+
<ax-button type="light blank" (click)="changeView()">
|
10
|
+
<ng-container *ngSwitchCase="'day'">
|
11
|
+
{{viewRange.startTime.add('day',10) | dt:"MMM YYYY"}}
|
12
|
+
</ng-container>
|
13
|
+
<ng-container *ngSwitchCase="'month'">
|
14
|
+
{{viewRange.startTime | dt:"YYYY"}}
|
15
|
+
</ng-container>
|
16
|
+
<ng-container *ngSwitchDefault>
|
17
|
+
{{viewRange.startTime | dt:"YYYY"}} - {{viewRange.endTime | dt:"YYYY"}}
|
18
|
+
</ng-container>
|
19
|
+
</ax-button>
|
20
|
+
</div>
|
21
|
+
<div class="ax-controll-button">
|
22
|
+
<ax-button type="light blank" (click)="prev()">
|
23
|
+
{{'common.prev' | trans}}
|
24
|
+
</ax-button>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<div class="ax-calendar-body">
|
28
|
+
<ng-container [ngSwitch]="view">
|
29
|
+
<ng-container *ngSwitchCase="'day'">
|
30
|
+
<div class="ax-month-items">
|
31
|
+
<ng-container *ngFor='let w of weekdays'>
|
32
|
+
<div class="ax-month-item">{{w}}</div>
|
33
|
+
</ng-container>
|
34
|
+
</div>
|
35
|
+
<div class="ax-day-items">
|
36
|
+
<ng-container *ngFor="let r of matrix">
|
37
|
+
<div class="ax-day-item ax-state-event" *ngFor="let d of r;trackBy:trackByFn" [title]="getTitle(d.date)" [ngClass]="{'selected': d.selected,'focused':d.focused,'today':d.today,'next-month':d.nextMonth , 'holiday':d.holiday , 'unselect':d.unselect}" [ngStyle]="(findDay(d.date)) ? getStyle(d.date):''"
|
38
|
+
(click)="setDayClick($event,d)">
|
39
|
+
{{d.date.dayInMonth}}</div>
|
40
|
+
</ng-container>
|
41
|
+
|
42
|
+
</div>
|
43
|
+
</ng-container>
|
44
|
+
<div class="ax-month-container" *ngSwitchCase="'month'">
|
45
|
+
<ng-container *ngFor="let r of matrix">
|
46
|
+
<div class="ax-month-item" *ngFor="let d of r;trackBy:trackByFn" [ngClass]="{'selected': d.selected,'focused':d.focused,'today':d.today}" (click)="setMonthClick($event,d.date)">
|
47
|
+
<strong>
|
48
|
+
{{d.date| dt:"MMM"}}
|
49
|
+
</strong>
|
50
|
+
</div>
|
51
|
+
</ng-container>
|
52
|
+
</div>
|
53
|
+
<div class="ax-year-container" *ngSwitchCase="'year'">
|
54
|
+
<ng-container class="calendar-row" *ngFor="let r of matrix">
|
55
|
+
<div class="ax-year-item" *ngFor="let d of r;trackBy:trackByFn" [ngClass]="{'selected': d.selected,'focused':d.focused,'today':d.today}" (click)="setYearClick($event,d.date)">
|
56
|
+
<strong>{{d.date | dt:"YYYY"}}</strong>
|
57
|
+
</div>
|
58
|
+
</ng-container>
|
59
|
+
</div>
|
60
|
+
</ng-container>
|
61
|
+
|
62
|
+
</div>
|
63
|
+
<div class="ax-calendar-footer">
|
64
|
+
<ax-button (click)="setToday()" *ngIf="showTodayButton" type="dark">
|
65
|
+
{{getTodayName()}}
|
66
|
+
</ax-button>
|
67
|
+
</div>
|
68
|
+
</div>
|
@@ -0,0 +1,461 @@
|
|
1
|
+
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, ViewEncapsulation, ElementRef } from '@angular/core';
|
2
|
+
import { AXDateTime, AXDateTimeRange, AXCalendarType, AXTranslator } from '@acorex/core';
|
3
|
+
import { AXBaseSizableComponent, AXElementSize } from '../../base/element.class';
|
4
|
+
import { AXValueEvent } from '../../base/events.class';
|
5
|
+
import { AXConfig } from '@acorex/core';
|
6
|
+
|
7
|
+
export type AXCalendarViewType = 'year' | 'month' | 'day';
|
8
|
+
|
9
|
+
export type AXCalendarHolidays = AXCalendarHoliday[];
|
10
|
+
export type AXCalendarHolidaysFunc = (start: Date, end: Date, type: AXCalendarType) => AXCalendarHoliday[];
|
11
|
+
export interface AXCalendarHoliday {
|
12
|
+
date: Date;
|
13
|
+
title: string;
|
14
|
+
description?: string;
|
15
|
+
}
|
16
|
+
|
17
|
+
export type AXCalendarWeekends = AXCalendarWeekend[];
|
18
|
+
export type AXCalendarWeekendsFunc = (start: Date, end: Date, type: AXCalendarType) => AXCalendarWeekend[];
|
19
|
+
|
20
|
+
export interface AXCalendarWeekend {
|
21
|
+
indexDay: number;
|
22
|
+
}
|
23
|
+
|
24
|
+
@Component({
|
25
|
+
selector: 'ax-calendar-box',
|
26
|
+
templateUrl: './calendar-box.component.html',
|
27
|
+
encapsulation: ViewEncapsulation.None,
|
28
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
29
|
+
})
|
30
|
+
export class AXCalendarBoxComponent implements AXBaseSizableComponent {
|
31
|
+
weekdays: string[] = [];
|
32
|
+
|
33
|
+
private d = {
|
34
|
+
jalali: {
|
35
|
+
locale: AXConfig.get('dateTime.jalali.locale') || 'fa',
|
36
|
+
dir: 'rtl',
|
37
|
+
number: 1
|
38
|
+
},
|
39
|
+
gregorian: {
|
40
|
+
locale: AXConfig.get('dateTime.gregorian.locale') || 'en',
|
41
|
+
dir: 'ltr',
|
42
|
+
number: 0
|
43
|
+
}
|
44
|
+
};
|
45
|
+
|
46
|
+
numRotate: number;
|
47
|
+
|
48
|
+
@Input()
|
49
|
+
size: AXElementSize = 'md';
|
50
|
+
|
51
|
+
@Input()
|
52
|
+
type: AXCalendarType;
|
53
|
+
|
54
|
+
@Input()
|
55
|
+
locale: string;
|
56
|
+
|
57
|
+
@Input()
|
58
|
+
dir: string;
|
59
|
+
|
60
|
+
@Input()
|
61
|
+
min: Date;
|
62
|
+
|
63
|
+
@Input()
|
64
|
+
max: Date;
|
65
|
+
|
66
|
+
@Input()
|
67
|
+
selectableHoliday: boolean = true;
|
68
|
+
|
69
|
+
@Input()
|
70
|
+
dayStyle = [];
|
71
|
+
|
72
|
+
@Input()
|
73
|
+
dayMinMaxResoan = '';
|
74
|
+
|
75
|
+
private getHoliday: AXCalendarHolidays | AXCalendarHolidaysFunc;
|
76
|
+
|
77
|
+
private getWeekend: AXCalendarWeekends | AXCalendarWeekendsFunc;
|
78
|
+
|
79
|
+
@Input('showTodayButton')
|
80
|
+
public showTodayButton: boolean = false;
|
81
|
+
|
82
|
+
matrix: any[] = [];
|
83
|
+
rotated: boolean = false;
|
84
|
+
private _view: AXCalendarViewType = 'day';
|
85
|
+
@Input()
|
86
|
+
public get view(): AXCalendarViewType {
|
87
|
+
return this._view;
|
88
|
+
}
|
89
|
+
public set view(v: AXCalendarViewType) {
|
90
|
+
this._view = v;
|
91
|
+
this.navigate(0);
|
92
|
+
}
|
93
|
+
|
94
|
+
private _depth: AXCalendarViewType = 'day';
|
95
|
+
|
96
|
+
@Input()
|
97
|
+
public get depth(): AXCalendarViewType {
|
98
|
+
return this._depth;
|
99
|
+
}
|
100
|
+
public set depth(v: AXCalendarViewType) {
|
101
|
+
this._depth = v;
|
102
|
+
this.view = v;
|
103
|
+
}
|
104
|
+
|
105
|
+
viewRange: AXDateTimeRange;
|
106
|
+
private holidays: AXCalendarHoliday[] = [];
|
107
|
+
private weekends: AXCalendarWeekend[] = [];
|
108
|
+
|
109
|
+
@Output()
|
110
|
+
onValueChanged: EventEmitter<AXValueEvent<Date>> = new EventEmitter<AXValueEvent<Date>>();
|
111
|
+
|
112
|
+
@Output()
|
113
|
+
onClick: EventEmitter<AXValueEvent<Date>> = new EventEmitter<AXValueEvent<Date>>();
|
114
|
+
|
115
|
+
@Output()
|
116
|
+
valueChange: EventEmitter<Date> = new EventEmitter<Date>();
|
117
|
+
|
118
|
+
private _value: AXDateTime;
|
119
|
+
@Input()
|
120
|
+
public get value(): Date {
|
121
|
+
return this._value?.date;
|
122
|
+
}
|
123
|
+
public set value(v: Date) {
|
124
|
+
let vv: AXDateTime;
|
125
|
+
if (v) {
|
126
|
+
vv = AXDateTime.convert(v);
|
127
|
+
}
|
128
|
+
let unValidDate = false;
|
129
|
+
if (this.max || this.min) {
|
130
|
+
unValidDate = this.isInMInMaxRange(vv);
|
131
|
+
}
|
132
|
+
if (!unValidDate) {
|
133
|
+
if (vv && !vv.equal(this._value)) {
|
134
|
+
this._value = vv;
|
135
|
+
this._value.type = this.type;
|
136
|
+
this.setFocus(this._value.clone());
|
137
|
+
this.valueChange.emit(vv.date);
|
138
|
+
this.onValueChanged.emit({
|
139
|
+
component: this,
|
140
|
+
value: this._value?.date,
|
141
|
+
htmlElement: this.ref.nativeElement
|
142
|
+
});
|
143
|
+
}
|
144
|
+
if (v == undefined) {
|
145
|
+
this._value = null;
|
146
|
+
this.focusedValue = this.today;
|
147
|
+
this.viewRange = this.today.month.range;
|
148
|
+
this.navigate(0);
|
149
|
+
}
|
150
|
+
this.onClick.emit({
|
151
|
+
component: this,
|
152
|
+
value: this._value?.date,
|
153
|
+
htmlElement: this.ref.nativeElement
|
154
|
+
});
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
focusedValue: AXDateTime;
|
159
|
+
get today(): AXDateTime {
|
160
|
+
return new AXDateTime(new Date(), this.type);
|
161
|
+
}
|
162
|
+
|
163
|
+
constructor(private cdr: ChangeDetectorRef, private ref: ElementRef) {
|
164
|
+
// set defaults
|
165
|
+
this.getHoliday = AXConfig.get('dateTime.holidays');
|
166
|
+
this.getWeekend = AXConfig.get('dateTime.weekends');
|
167
|
+
}
|
168
|
+
findDay(date: AXDateTime) {
|
169
|
+
if (this.dayStyle.find((c) => c.date.split('T')[0] == date.toISOString().split('T')[0])) {
|
170
|
+
return true;
|
171
|
+
} else {
|
172
|
+
return false;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
getStyle(date: AXDateTime) {
|
176
|
+
if (this.dayStyle.find((c) => c.date.split('T')[0] == date.toISOString().split('T')[0])) {
|
177
|
+
return this.dayStyle.find((c) => c.date.split('T')[0] == date.toISOString().split('T')[0]).style;
|
178
|
+
} else {
|
179
|
+
return '';
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
getTitle(date: AXDateTime) {
|
184
|
+
if (this.dayStyle.find((c) => c.date.split('T')[0] == date.toISOString().split('T')[0])) {
|
185
|
+
return this.dayStyle.find((c) => c.date.split('T')[0] == date.toISOString().split('T')[0]).text;
|
186
|
+
} else {
|
187
|
+
if (
|
188
|
+
(this.min && this.max && date.compaireNew(new AXDateTime(this.min, this.type), 'YMD', this.type) === -1) ||
|
189
|
+
date.compaireNew(new AXDateTime(this.max, this.type), 'YMD', this.type) === 1
|
190
|
+
) {
|
191
|
+
return this.dayMinMaxResoan;
|
192
|
+
} else {
|
193
|
+
return '';
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
ngOnInit() {
|
199
|
+
this.focusedValue = new AXDateTime(new Date(), this.type);
|
200
|
+
//
|
201
|
+
this.initLayout();
|
202
|
+
//
|
203
|
+
this.viewRange = this.today.month.range;
|
204
|
+
if (this.value) {
|
205
|
+
this.setFocus(new AXDateTime(this.value, this.type));
|
206
|
+
} else {
|
207
|
+
this.setFocus(this.today);
|
208
|
+
}
|
209
|
+
|
210
|
+
this.view = 'day';
|
211
|
+
}
|
212
|
+
|
213
|
+
getViewCompaire(view: AXCalendarViewType) {
|
214
|
+
switch (view) {
|
215
|
+
case 'day':
|
216
|
+
return 'YMD';
|
217
|
+
case 'month':
|
218
|
+
return 'YM';
|
219
|
+
case 'year':
|
220
|
+
return 'Y';
|
221
|
+
}
|
222
|
+
}
|
223
|
+
|
224
|
+
ngAfterViewInit(): void {
|
225
|
+
this.navigate(0);
|
226
|
+
}
|
227
|
+
|
228
|
+
private initLayout() {
|
229
|
+
if (!this.type) {
|
230
|
+
this.type = AXConfig.get('dateTime.type') || 'gregorian';
|
231
|
+
}
|
232
|
+
if (!this.locale) {
|
233
|
+
this.locale = this.d[this.type]?.locale || this.locale;
|
234
|
+
}
|
235
|
+
if (!this.dir) {
|
236
|
+
this.dir = this.d[this.type]?.dir || 'ltr';
|
237
|
+
}
|
238
|
+
this.numRotate = this.d[this.type]?.number || 0;
|
239
|
+
const path = 'dateTime.weekdaysShort';
|
240
|
+
this.weekdays = [
|
241
|
+
AXTranslator.get(`${path}.sun`, this.locale),
|
242
|
+
AXTranslator.get(`${path}.mon`, this.locale),
|
243
|
+
AXTranslator.get(`${path}.tue`, this.locale),
|
244
|
+
AXTranslator.get(`${path}.wed`, this.locale),
|
245
|
+
AXTranslator.get(`${path}.thu`, this.locale),
|
246
|
+
AXTranslator.get(`${path}.fri`, this.locale),
|
247
|
+
AXTranslator.get(`${path}.sat`, this.locale)
|
248
|
+
];
|
249
|
+
}
|
250
|
+
|
251
|
+
getTodayName() {
|
252
|
+
return AXTranslator.get('dateTime.today', this.locale);
|
253
|
+
}
|
254
|
+
|
255
|
+
prev() {
|
256
|
+
this.navigate(-1);
|
257
|
+
}
|
258
|
+
|
259
|
+
next() {
|
260
|
+
this.navigate(1);
|
261
|
+
}
|
262
|
+
|
263
|
+
rotate(array, n) {
|
264
|
+
const len = array.length;
|
265
|
+
return !(n % len) ? array : n > 0 ? array.map((e, i, a) => a[(i + n) % len]) : array.map((e, i, a) => a[(len - ((len - i - n) % len)) % len]);
|
266
|
+
}
|
267
|
+
|
268
|
+
navigate(value: number | AXDateTime) {
|
269
|
+
let start: AXDateTime;
|
270
|
+
let end: AXDateTime;
|
271
|
+
if (this.view === 'day') {
|
272
|
+
let fd: AXDateTime;
|
273
|
+
if (value instanceof AXDateTime) {
|
274
|
+
fd = value.startOf('month');
|
275
|
+
} else {
|
276
|
+
fd = this.viewRange.startTime.add('day', 15).add('month', value).startOf('month');
|
277
|
+
}
|
278
|
+
|
279
|
+
start = fd.firstDayOfWeek;
|
280
|
+
end = fd.endOf('month').endDayOfWeek;
|
281
|
+
|
282
|
+
start = start.add('day', -this.numRotate);
|
283
|
+
end = end.add('day', 7).add('day', -this.numRotate);
|
284
|
+
|
285
|
+
// TODO: apply start of week
|
286
|
+
if (!this.rotated && this.weekdays.length > 0) {
|
287
|
+
if (this.type === 'jalali') {
|
288
|
+
this.weekdays = this.rotate(this.weekdays, -this.numRotate);
|
289
|
+
} else {
|
290
|
+
this.weekdays = this.rotate(this.weekdays, this.numRotate);
|
291
|
+
}
|
292
|
+
|
293
|
+
this.rotated = true;
|
294
|
+
}
|
295
|
+
} else if (this.view === 'month') {
|
296
|
+
let fd: AXDateTime;
|
297
|
+
if (value instanceof AXDateTime) {
|
298
|
+
fd = value.startOf('year');
|
299
|
+
} else {
|
300
|
+
fd = this.viewRange.startTime.add('day', 15).add('year', value).startOf('year');
|
301
|
+
}
|
302
|
+
start = fd;
|
303
|
+
end = fd.endOf('year');
|
304
|
+
} else if (this.view === 'year') {
|
305
|
+
let fd: AXDateTime;
|
306
|
+
if (value instanceof AXDateTime) {
|
307
|
+
fd = value.startOf('year');
|
308
|
+
} else {
|
309
|
+
fd = this.viewRange.startTime
|
310
|
+
.add('day', 15)
|
311
|
+
.add('year', value * 10)
|
312
|
+
.startOf('year');
|
313
|
+
}
|
314
|
+
start = fd.add('year', -4);
|
315
|
+
end = start.add('year', 8).endOf('year');
|
316
|
+
}
|
317
|
+
this.viewRange = new AXDateTimeRange(start, end);
|
318
|
+
//
|
319
|
+
if (this.getHoliday && typeof this.getHoliday === 'function') {
|
320
|
+
this.holidays = this.getHoliday(start.date, end.date, this.type);
|
321
|
+
}
|
322
|
+
|
323
|
+
if (this.getWeekend && typeof this.getWeekend === 'function') {
|
324
|
+
this.weekends = this.getWeekend(start.date, end.date, this.type);
|
325
|
+
}
|
326
|
+
|
327
|
+
//
|
328
|
+
if (this.view === 'day') {
|
329
|
+
this.matrix = this.matrixify(this.applyStyle(this.viewRange.enumurate('day', this.type)), 7);
|
330
|
+
if (this.matrix.length > 0 && this.matrix[0].find((c) => c.nextMonth === false) === undefined) {
|
331
|
+
this.matrix.splice(0, 1);
|
332
|
+
}
|
333
|
+
if (this.matrix[this.matrix.length - 1].find((c) => c.nextMonth === false) === undefined) {
|
334
|
+
this.matrix.splice(this.matrix.length - 1, 1);
|
335
|
+
}
|
336
|
+
} else if (this.view === 'month') {
|
337
|
+
this.matrix = this.matrixify(this.applyStyle(this.viewRange.enumurate('month', this.type)), 3);
|
338
|
+
} else if (this.view === 'year') {
|
339
|
+
this.matrix = this.matrixify(this.applyStyle(this.viewRange.enumurate('year', this.type)), 3);
|
340
|
+
}
|
341
|
+
this.cdr.detectChanges();
|
342
|
+
}
|
343
|
+
|
344
|
+
private applyStyle(dates: AXDateTime[]): any[] {
|
345
|
+
const items: any[] = [];
|
346
|
+
dates.forEach((d, i, j) => {
|
347
|
+
const item: any = {};
|
348
|
+
item.date = d;
|
349
|
+
|
350
|
+
item.selected = d.compaireNew(new AXDateTime(this.value, this.type), this.getViewCompaire(this.view), this.type) === 0;
|
351
|
+
item.focused = d.compaireNew(this.focusedValue, this.getViewCompaire(this.view), this.type) === 0;
|
352
|
+
item.today = this.today && d.compaireNew(this.today, this.getViewCompaire(this.view), this.type) === 0;
|
353
|
+
if (this.view === 'day') {
|
354
|
+
// item.nextMonth = d.compaireNew(this.viewRange.startTime.add('day', 10), 'YM') !== 0;
|
355
|
+
item.nextMonth = d.compaireNew(this.viewRange.startTime.add('day', 10), 'YM', this.type) !== 0;
|
356
|
+
|
357
|
+
item.unselect = this.isInMInMaxRange(d);
|
358
|
+
this.holidays.forEach((h) => {
|
359
|
+
const comp = d.compaireNew(new AXDateTime(h.date, this.type), 'YMD', this.type);
|
360
|
+
if (comp === 0) {
|
361
|
+
item.holiday = true;
|
362
|
+
if (this.selectableHoliday === false) {
|
363
|
+
item.unselect = true;
|
364
|
+
}
|
365
|
+
}
|
366
|
+
});
|
367
|
+
|
368
|
+
const indexDay = i - Math.floor(i / 7) * 7;
|
369
|
+
this.weekends.forEach((cc) => {
|
370
|
+
if (Number(cc) === indexDay) {
|
371
|
+
item.holiday = true;
|
372
|
+
if (this.selectableHoliday === false) {
|
373
|
+
item.unselect = true;
|
374
|
+
}
|
375
|
+
}
|
376
|
+
});
|
377
|
+
}
|
378
|
+
items.push(item);
|
379
|
+
});
|
380
|
+
return items;
|
381
|
+
}
|
382
|
+
|
383
|
+
changeView() {
|
384
|
+
if (this.view === 'day') {
|
385
|
+
this.view = 'month';
|
386
|
+
} else if (this.view === 'month') {
|
387
|
+
this.view = 'year';
|
388
|
+
}
|
389
|
+
}
|
390
|
+
|
391
|
+
matrixify(arr: any[], cols) {
|
392
|
+
const rows = Math.ceil(arr.length / cols);
|
393
|
+
const matrix = [];
|
394
|
+
if (rows * cols === arr.length) {
|
395
|
+
for (let i = 0; i < arr.length; i += cols) {
|
396
|
+
matrix.push(arr.slice(i, cols + i));
|
397
|
+
}
|
398
|
+
}
|
399
|
+
return matrix;
|
400
|
+
}
|
401
|
+
|
402
|
+
setDayClick(event: MouseEvent, item) {
|
403
|
+
if (item.unselect !== true) {
|
404
|
+
this.value = item.date.date;
|
405
|
+
}
|
406
|
+
|
407
|
+
event.stopPropagation();
|
408
|
+
}
|
409
|
+
|
410
|
+
isInMInMaxRange(d) {
|
411
|
+
let r = false;
|
412
|
+
if (d !== undefined) {
|
413
|
+
if (this.min && !this.max) {
|
414
|
+
r = d.compaireNew(new AXDateTime(this.min, this.type), this.getViewCompaire(this.view), this.type) === -1;
|
415
|
+
}
|
416
|
+
if (this.max && !this.min) {
|
417
|
+
r = d.compaireNew(new AXDateTime(this.max, this.type), this.getViewCompaire(this.view), this.type) === 1;
|
418
|
+
}
|
419
|
+
if (this.min && this.max) {
|
420
|
+
r =
|
421
|
+
d.compaireNew(new AXDateTime(this.min, this.type), this.getViewCompaire(this.view), this.type) === -1 ||
|
422
|
+
d.compaireNew(new AXDateTime(this.max, this.type), this.getViewCompaire(this.view), this.type) === 1;
|
423
|
+
}
|
424
|
+
}
|
425
|
+
return r;
|
426
|
+
}
|
427
|
+
|
428
|
+
setMonthClick(event: MouseEvent, date: AXDateTime) {
|
429
|
+
if (this.depth === 'month') {
|
430
|
+
this.value = date.date;
|
431
|
+
} else {
|
432
|
+
this.view = 'day';
|
433
|
+
this.setFocus(new AXDateTime(this.value, this.type).set('year', date.year).set('month', date.monthOfYear));
|
434
|
+
}
|
435
|
+
event.stopPropagation();
|
436
|
+
}
|
437
|
+
|
438
|
+
setYearClick(event: MouseEvent, date: AXDateTime) {
|
439
|
+
if (this.depth === 'year') {
|
440
|
+
this.value = date.date;
|
441
|
+
} else {
|
442
|
+
this.view = 'month';
|
443
|
+
this.setFocus(new AXDateTime(this.value, this.type).set('year', date.year));
|
444
|
+
}
|
445
|
+
event.stopPropagation();
|
446
|
+
}
|
447
|
+
|
448
|
+
setFocus(date: AXDateTime) {
|
449
|
+
this.focusedValue = date;
|
450
|
+
this.navigate(this.focusedValue);
|
451
|
+
}
|
452
|
+
|
453
|
+
setToday() {
|
454
|
+
this.value = this.today.date;
|
455
|
+
this.view = 'day';
|
456
|
+
}
|
457
|
+
|
458
|
+
trackByFn(index, item: any) {
|
459
|
+
return item.date.date.getTime();
|
460
|
+
}
|
461
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { NgModule } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { AXCalendarBoxComponent } from './calendar-box.component';
|
4
|
+
import { AXCoreModule, AXTranslatorModule } from '@acorex/core';
|
5
|
+
import { AXPopoverModule } from '../../popover/popover.module';
|
6
|
+
import { AXButtonModule } from '../../button/button.module';
|
7
|
+
|
8
|
+
|
9
|
+
@NgModule({
|
10
|
+
declarations: [AXCalendarBoxComponent],
|
11
|
+
imports: [CommonModule, AXButtonModule, AXPopoverModule, AXCoreModule,AXTranslatorModule],
|
12
|
+
exports: [AXCalendarBoxComponent],
|
13
|
+
providers: []
|
14
|
+
})
|
15
|
+
export class AXCalendarBoxModule {
|
16
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { Component, ContentChildren, QueryList, Input, Attribute } from '@angular/core';
|
2
|
+
import { AXSchedulerViewType } from './scheduler.class';
|
3
|
+
|
4
|
+
@Component({
|
5
|
+
selector: 'ax-scheduler-view',
|
6
|
+
template: ``
|
7
|
+
})
|
8
|
+
export class AXSchedulerViewProperty {
|
9
|
+
|
10
|
+
constructor(
|
11
|
+
@Attribute('type') public type: AXSchedulerViewType,
|
12
|
+
@Attribute('caption') public caption: string,
|
13
|
+
@Attribute('name') public name: string,
|
14
|
+
) {
|
15
|
+
|
16
|
+
}
|
17
|
+
|
18
|
+
@Input()
|
19
|
+
public interval: number;
|
20
|
+
|
21
|
+
|
22
|
+
ngOnInit(): void {
|
23
|
+
if (!this.interval) {
|
24
|
+
this.interval = 1;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
@Component({
|
30
|
+
selector: 'ax-scheduler-views',
|
31
|
+
template: `
|
32
|
+
<ng-content>
|
33
|
+
</ng-content>`,
|
34
|
+
})
|
35
|
+
export class AXSchedulerViewsProperty {
|
36
|
+
@ContentChildren(AXSchedulerViewProperty) views: QueryList<AXSchedulerViewProperty>;
|
37
|
+
constructor() { }
|
38
|
+
}
|