@acorex/components 6.5.25 → 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 -146
- 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 -15987
- package/fesm2015/acorex-components.mjs.map +0 -1
- package/fesm2020/acorex-components.mjs +0 -15922
- 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 -39
- 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,1003 @@
|
|
1
|
+
import {
|
2
|
+
Component,
|
3
|
+
OnInit,
|
4
|
+
ChangeDetectorRef,
|
5
|
+
ElementRef,
|
6
|
+
Input,
|
7
|
+
ViewChild,
|
8
|
+
ChangeDetectionStrategy,
|
9
|
+
EventEmitter,
|
10
|
+
Output,
|
11
|
+
ContentChild
|
12
|
+
|
13
|
+
} from '@angular/core';
|
14
|
+
import { AXBaseTextComponent, AXValidatableComponent } from '../base/element.class';
|
15
|
+
import { _ } from 'ag-grid-community';
|
16
|
+
import { AXValueEvent } from '../base/events.class';
|
17
|
+
import { AXTranslator } from '@acorex/core';
|
18
|
+
|
19
|
+
export class AXTimePickerItemChangedEvent {
|
20
|
+
minute?: number;
|
21
|
+
second?: number;
|
22
|
+
hour?: number;
|
23
|
+
time: string;
|
24
|
+
|
25
|
+
}
|
26
|
+
export class AXTimePickerChangedEvent extends AXValueEvent<AXTimePickerItemChangedEvent> { }
|
27
|
+
|
28
|
+
@Component({
|
29
|
+
selector: 'ax-time-picker',
|
30
|
+
templateUrl: './time-picker.component.html',
|
31
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
32
|
+
host: { style:'width: 100%' },
|
33
|
+
providers: [{ provide: AXValidatableComponent, useExisting: AXTimePickerComponent }]
|
34
|
+
})
|
35
|
+
export class AXTimePickerComponent extends AXBaseTextComponent implements OnInit {
|
36
|
+
@Output()
|
37
|
+
onValueChanged: EventEmitter<AXTimePickerChangedEvent> = new EventEmitter<AXTimePickerChangedEvent>();
|
38
|
+
|
39
|
+
// @ViewChild('input', { static: true })
|
40
|
+
// @ContentChild('input', { static: true })
|
41
|
+
// input: ElementRef<HTMLInputElement>;
|
42
|
+
|
43
|
+
@Input()
|
44
|
+
timeType: any;
|
45
|
+
|
46
|
+
type: string = 'HHmm';
|
47
|
+
@Input()
|
48
|
+
showCurentTime: boolean = false;
|
49
|
+
|
50
|
+
clearDisabled: boolean = true;
|
51
|
+
HHmmss: any = [/[0-2]/, /[0-9]/, ':', /[0-5]/, /[0-9]/, ':', /[0-5]/, /[0-9]/];
|
52
|
+
HHmm: any = [/[0-2]/, /[0-9]/, ':', /[0-5]/, /[0-9]/];
|
53
|
+
HH: any = [/[0-2]/, /[0-9]/];
|
54
|
+
hhmmss: any = [/[0-1]/, /[0-9]/, ':', /[0-5]/, /[0-9]/, ':', /[0-5]/, /[0-9]/];
|
55
|
+
hhmm: any = [/[0-1]/, /[0-9]/, ':', /[0-5]/, /[0-9]/];
|
56
|
+
hh: any = [/[0-1]/, /[0-9]/];
|
57
|
+
// TODO: apply am pm from locale
|
58
|
+
hhmmssam: any = [/[0-1]/, /[0-9]/, ':', /[0-5]/, /[0-9]/, ':', /[0-5]/, /[0-9]/, ' ', /[a|p|ق|ب]/, AXTranslator.get('dateTime.dayTime.m')];
|
59
|
+
hhmmam: any = [/[0-1]/, /[0-9]/, ':', /[0-5]/, /[0-9]/, ' ', /[a|p|ق|ب]/, AXTranslator.get('dateTime.dayTime.m')];
|
60
|
+
hham: any = [/[0-1]/, /[0-9]/, ' ', /[a|p|ق|ب]/, AXTranslator.get('dateTime.dayTime.m')];
|
61
|
+
textValue: string = '';
|
62
|
+
|
63
|
+
valueHam: string = '-- ' + AXTranslator.get('dateTime.dayTime.am');
|
64
|
+
valueMam: string = '--:-- ' + AXTranslator.get('dateTime.dayTime.am');
|
65
|
+
valueSam: string = '--:--:-- ' + AXTranslator.get('dateTime.dayTime.am');
|
66
|
+
|
67
|
+
|
68
|
+
private _values: string;
|
69
|
+
public get value(): string {
|
70
|
+
return this._values;
|
71
|
+
}
|
72
|
+
public set value(v: string) {
|
73
|
+
if (v === '' || v == null || v === '--:--:--' || v === '--:--' || v === '--' || v === this.valueSam || v === this.valueMam || v === this.valueHam) {
|
74
|
+
this.clearDisabled = false;
|
75
|
+
|
76
|
+
const old = this._values;
|
77
|
+
switch (this.type) {
|
78
|
+
case 'HHmmss':
|
79
|
+
this.textValue = '--:--:--';
|
80
|
+
break;
|
81
|
+
case 'HHmm':
|
82
|
+
this.textValue = '--:--';
|
83
|
+
break;
|
84
|
+
case 'HH':
|
85
|
+
this.textValue = '--';
|
86
|
+
break;
|
87
|
+
case 'hhmmss':
|
88
|
+
this.textValue = '--:--:--';
|
89
|
+
break;
|
90
|
+
case 'hhmm':
|
91
|
+
this.textValue = '--:--';
|
92
|
+
break;
|
93
|
+
case 'hh':
|
94
|
+
this.textValue = '--';
|
95
|
+
break;
|
96
|
+
case 'hhmmssam':
|
97
|
+
this.textValue = this.valueSam;
|
98
|
+
break;
|
99
|
+
case 'hhmmam':
|
100
|
+
this.textValue = this.valueMam;
|
101
|
+
break;
|
102
|
+
case 'hham':
|
103
|
+
this.textValue = this.valueHam;
|
104
|
+
break;
|
105
|
+
}
|
106
|
+
|
107
|
+
this._values = null;
|
108
|
+
if (v !== old) {
|
109
|
+
this.valueChange.emit(null);
|
110
|
+
this.onValueChanged.emit({
|
111
|
+
component: this,
|
112
|
+
value: { hour: null, minute: null, second: null, time: null },
|
113
|
+
oldValue: { time: old },
|
114
|
+
htmlElement: this.ref.nativeElement
|
115
|
+
});
|
116
|
+
}
|
117
|
+
} else {
|
118
|
+
this.clearDisabled = true;
|
119
|
+
if (this._values && v) {
|
120
|
+
const old = this._values;
|
121
|
+
const ind1 = v.charAt(0);
|
122
|
+
const ind2 = v.charAt(1);
|
123
|
+
const ind3 = v.charAt(2);
|
124
|
+
const ind4 = v.charAt(3);
|
125
|
+
const ind5 = v.charAt(4);
|
126
|
+
const ind6 = v.charAt(5);
|
127
|
+
const ind7 = v.charAt(6);
|
128
|
+
const ind8 = v.charAt(7);
|
129
|
+
const ind9 = v.charAt(8);
|
130
|
+
const ind10 = v.charAt(9);
|
131
|
+
|
132
|
+
const indOld4 = old.charAt(9);
|
133
|
+
const indOld7 = old.charAt(9);
|
134
|
+
const indOld10 = old.charAt(9);
|
135
|
+
|
136
|
+
// handle hhmmssAm
|
137
|
+
if (ind1 === '-' && ind2 !== '-' && this.timeType.mask === this.hhmmssam) {
|
138
|
+
this.textValue = '0' + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + ind10 + AXTranslator.get('dateTime.dayTime.m');
|
139
|
+
setTimeout(() => {
|
140
|
+
this.setCaretPosition(this.input.nativeElement, 2);
|
141
|
+
this.cursorPosition = 2;
|
142
|
+
}, 0);
|
143
|
+
}
|
144
|
+
if (ind4 === '-' && ind5 !== '-' && this.timeType.mask === this.hhmmssam) {
|
145
|
+
this.textValue = ind1 + ind2 + ind3 + '0' + ind5 + ind6 + ind7 + ind8 + ind9 + ind10 + AXTranslator.get('dateTime.dayTime.m');
|
146
|
+
setTimeout(() => {
|
147
|
+
this.setCaretPosition(this.input.nativeElement, 5);
|
148
|
+
this.cursorPosition = 5;
|
149
|
+
}, 0);
|
150
|
+
}
|
151
|
+
if (ind7 === '-' && ind8 !== '-' && this.timeType.mask === this.hhmmssam) {
|
152
|
+
this.textValue = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + '0' + ind8 + ind9 + ind10 + AXTranslator.get('dateTime.dayTime.m');
|
153
|
+
setTimeout(() => {
|
154
|
+
this.setCaretPosition(this.input.nativeElement, 8);
|
155
|
+
this.cursorPosition = 8;
|
156
|
+
}, 0);
|
157
|
+
}
|
158
|
+
if (indOld10 === '-' && this.timeType.mask === this.hhmmssam) {
|
159
|
+
this.textValue = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + AXTranslator.get('dateTime.dayTime.am');
|
160
|
+
}
|
161
|
+
|
162
|
+
//
|
163
|
+
if (ind1 === '-' && ind2 !== '-' && this.timeType.mask === this.hhmmam) {
|
164
|
+
this.textValue = '0' + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + AXTranslator.get('dateTime.dayTime.m');
|
165
|
+
setTimeout(() => {
|
166
|
+
this.setCaretPosition(this.input.nativeElement, 2);
|
167
|
+
this.cursorPosition = 2;
|
168
|
+
}, 0);
|
169
|
+
}
|
170
|
+
if (ind4 === '-' && ind5 !== '-' && this.timeType.mask === this.hhmmam) {
|
171
|
+
this.textValue = ind1 + ind2 + ind3 + '0' + ind5 + ind6 + ind7 + AXTranslator.get('dateTime.dayTime.m');
|
172
|
+
setTimeout(() => {
|
173
|
+
this.setCaretPosition(this.input.nativeElement, 5);
|
174
|
+
this.cursorPosition = 5;
|
175
|
+
}, 0);
|
176
|
+
}
|
177
|
+
if (indOld7 === '-' && this.timeType.mask === this.hhmmam) {
|
178
|
+
this.textValue = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + AXTranslator.get('dateTime.dayTime.am');
|
179
|
+
}
|
180
|
+
|
181
|
+
//
|
182
|
+
if (ind1 === '-' && ind2 !== '-' && this.timeType.mask === this.hham) {
|
183
|
+
this.textValue = '0' + ind2 + ind3 + ind4 + AXTranslator.get('dateTime.dayTime.m');
|
184
|
+
setTimeout(() => {
|
185
|
+
this.setCaretPosition(this.input.nativeElement, 2);
|
186
|
+
this.cursorPosition = 2;
|
187
|
+
}, 0);
|
188
|
+
}
|
189
|
+
if (indOld4 === '-' && this.timeType.mask === this.hham) {
|
190
|
+
this.textValue = ind1 + ind2 + ind3 + AXTranslator.get('dateTime.dayTime.am');
|
191
|
+
}
|
192
|
+
|
193
|
+
//
|
194
|
+
if (ind1 === '-' && ind2 !== '-' && (this.timeType.mask === this.hhmmss || this.timeType.mask === this.HHmmss)) {
|
195
|
+
this.textValue = '0' + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8;
|
196
|
+
setTimeout(() => {
|
197
|
+
this.setCaretPosition(this.input.nativeElement, 2);
|
198
|
+
this.cursorPosition = 2;
|
199
|
+
}, 0);
|
200
|
+
}
|
201
|
+
if (ind4 === '-' && ind5 !== '-' && (this.timeType.mask === this.hhmmss || this.timeType.mask === this.HHmmss)) {
|
202
|
+
this.textValue = ind1 + ind2 + ind3 + '0' + ind5 + ind6 + ind7 + ind8;
|
203
|
+
setTimeout(() => {
|
204
|
+
this.setCaretPosition(this.input.nativeElement, 6);
|
205
|
+
this.cursorPosition = 6;
|
206
|
+
}, 0);
|
207
|
+
}
|
208
|
+
if (ind7 === '-' && ind8 !== '-' && (this.timeType.mask === this.hhmmss || this.timeType.mask === this.HHmmss)) {
|
209
|
+
this.textValue = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + '0' + ind8;
|
210
|
+
setTimeout(() => {
|
211
|
+
this.setCaretPosition(this.input.nativeElement, 9);
|
212
|
+
this.cursorPosition = 9;
|
213
|
+
}, 0);
|
214
|
+
}
|
215
|
+
|
216
|
+
//
|
217
|
+
if (ind1 === '-' && ind2 !== '-' && (this.timeType.mask === this.hhmm || this.timeType.mask === this.HHmm)) {
|
218
|
+
this.textValue = '0' + ind2 + ind3 + ind4 + ind5;
|
219
|
+
setTimeout(() => {
|
220
|
+
this.setCaretPosition(this.input.nativeElement, 2);
|
221
|
+
this.cursorPosition = 2;
|
222
|
+
}, 0);
|
223
|
+
}
|
224
|
+
if (ind4 === '-' && ind5 !== '-' && (this.timeType.mask === this.hhmm || this.timeType.mask === this.HHmm)) {
|
225
|
+
this.textValue = ind1 + ind2 + ind3 + '0' + ind5;
|
226
|
+
setTimeout(() => {
|
227
|
+
this.setCaretPosition(this.input.nativeElement, 5);
|
228
|
+
this.cursorPosition = 5;
|
229
|
+
}, 0);
|
230
|
+
}
|
231
|
+
|
232
|
+
//
|
233
|
+
if (ind1 === '-' && ind2 !== '-' && (this.timeType.mask === this.hh || this.timeType.mask === this.HH)) {
|
234
|
+
this.textValue = '0' + ind2;
|
235
|
+
setTimeout(() => {
|
236
|
+
this.setCaretPosition(this.input.nativeElement, 2);
|
237
|
+
this.cursorPosition = 2;
|
238
|
+
}, 0);
|
239
|
+
}
|
240
|
+
}
|
241
|
+
if (v !== this._values) {
|
242
|
+
const old = this._values;
|
243
|
+
this.textValue = v;
|
244
|
+
this._values = (v && v.indexOf('-') === -1) ? v : null;
|
245
|
+
if (v.indexOf('-') === -1) {
|
246
|
+
this.valueChange.emit(v);
|
247
|
+
this.onValueChanged.emit({
|
248
|
+
component: this,
|
249
|
+
value: {
|
250
|
+
time: v,
|
251
|
+
hour: Number(v[0] + v[1]),
|
252
|
+
minute: v[3] && v[3] !== AXTranslator.get('dateTime.dayTime.a') && v[3] !== AXTranslator.get('dateTime.dayTime.p') ? Number(v[3] + v[4]) : null,
|
253
|
+
second: v[6] && v[6] !== AXTranslator.get('dateTime.dayTime.a') && v[6] !== AXTranslator.get('dateTime.dayTime.p') ? Number(v[6] + v[7]) : null
|
254
|
+
},
|
255
|
+
oldValue: { time: old },
|
256
|
+
htmlElement: this.ref.nativeElement
|
257
|
+
});
|
258
|
+
this.cdr.detectChanges();
|
259
|
+
this.clearValidationStyle(this.input.nativeElement);
|
260
|
+
}
|
261
|
+
}
|
262
|
+
}
|
263
|
+
}
|
264
|
+
|
265
|
+
cursorPosition: number = 0;
|
266
|
+
|
267
|
+
constructor(protected cdr: ChangeDetectorRef, ref: ElementRef) {
|
268
|
+
super(cdr, ref);
|
269
|
+
|
270
|
+
this.timeType = 'HHmm';
|
271
|
+
}
|
272
|
+
clearValue() {
|
273
|
+
this.clear();
|
274
|
+
this.handleInputFocus();
|
275
|
+
}
|
276
|
+
|
277
|
+
ngOnInit(): void {
|
278
|
+
switch (this.timeType) {
|
279
|
+
case 'HHmmss':
|
280
|
+
this.type = 'HHmmss';
|
281
|
+
this.timeType = {
|
282
|
+
guide: true,
|
283
|
+
showMask: true,
|
284
|
+
mask: this.HHmmss,
|
285
|
+
keepCharPositions: true,
|
286
|
+
placeholderChar: '-'
|
287
|
+
};
|
288
|
+
this.textValue = this.value ? this.value : '--:--:--';
|
289
|
+
break;
|
290
|
+
case 'HHmm':
|
291
|
+
this.type = 'HHmm';
|
292
|
+
this.timeType = {
|
293
|
+
guide: true,
|
294
|
+
showMask: true,
|
295
|
+
mask: this.HHmm,
|
296
|
+
keepCharPositions: true,
|
297
|
+
placeholderChar: '-'
|
298
|
+
};
|
299
|
+
this.textValue = this.value ? this.value : '--:--';
|
300
|
+
break;
|
301
|
+
case 'HH':
|
302
|
+
this.type = 'HH';
|
303
|
+
this.timeType = {
|
304
|
+
guide: true,
|
305
|
+
showMask: true,
|
306
|
+
mask: this.HH,
|
307
|
+
keepCharPositions: true,
|
308
|
+
placeholderChar: '-'
|
309
|
+
};
|
310
|
+
this.textValue = this.value ? this.value : '--';
|
311
|
+
break;
|
312
|
+
case 'hhmmss':
|
313
|
+
this.type = 'hhmmss';
|
314
|
+
this.timeType = {
|
315
|
+
guide: true,
|
316
|
+
showMask: true,
|
317
|
+
mask: this.hhmmss,
|
318
|
+
keepCharPositions: true,
|
319
|
+
placeholderChar: '-'
|
320
|
+
};
|
321
|
+
this.textValue = this.value ? this.value : '--:--:--';
|
322
|
+
break;
|
323
|
+
case 'hhmm':
|
324
|
+
this.type = 'hhmm';
|
325
|
+
this.timeType = {
|
326
|
+
guide: true,
|
327
|
+
showMask: true,
|
328
|
+
mask: this.hhmm,
|
329
|
+
keepCharPositions: true,
|
330
|
+
placeholderChar: '-'
|
331
|
+
};
|
332
|
+
this.textValue = this.value ? this.value : '--:--';
|
333
|
+
break;
|
334
|
+
case 'hh':
|
335
|
+
this.type = 'hh';
|
336
|
+
|
337
|
+
this.timeType = {
|
338
|
+
guide: true,
|
339
|
+
showMask: true,
|
340
|
+
mask: this.hh,
|
341
|
+
keepCharPositions: true,
|
342
|
+
placeholderChar: '-'
|
343
|
+
};
|
344
|
+
this.textValue = this.value ? this.value : '--';
|
345
|
+
break;
|
346
|
+
case 'hhmmssam':
|
347
|
+
this.type = 'hhmmssam';
|
348
|
+
|
349
|
+
this.timeType = {
|
350
|
+
guide: true,
|
351
|
+
showMask: true,
|
352
|
+
mask: this.hhmmssam,
|
353
|
+
keepCharPositions: true,
|
354
|
+
placeholderChar: '-'
|
355
|
+
};
|
356
|
+
this.textValue = this.value ? this.value : this.valueSam;
|
357
|
+
break;
|
358
|
+
case 'hhmmam':
|
359
|
+
this.type = 'hhmmam';
|
360
|
+
|
361
|
+
this.timeType = {
|
362
|
+
guide: true,
|
363
|
+
showMask: true,
|
364
|
+
mask: this.hhmmam,
|
365
|
+
keepCharPositions: true,
|
366
|
+
placeholderChar: '-'
|
367
|
+
};
|
368
|
+
this.textValue = this.value ? this.value : this.valueMam;
|
369
|
+
|
370
|
+
break;
|
371
|
+
case 'hham':
|
372
|
+
this.type = 'hham';
|
373
|
+
|
374
|
+
this.timeType = {
|
375
|
+
guide: true,
|
376
|
+
showMask: true,
|
377
|
+
mask: this.hham,
|
378
|
+
keepCharPositions: true,
|
379
|
+
placeholderChar: '-'
|
380
|
+
};
|
381
|
+
this.textValue = this.value ? this.value : this.valueHam;
|
382
|
+
break;
|
383
|
+
default:
|
384
|
+
this.type = 'HHmm';
|
385
|
+
this.timeType = {
|
386
|
+
guide: true,
|
387
|
+
showMask: true,
|
388
|
+
mask: this.HHmm,
|
389
|
+
keepCharPositions: true,
|
390
|
+
placeholderChar: '-'
|
391
|
+
};
|
392
|
+
this.textValue = this.value ? this.value : '--:--';
|
393
|
+
break;
|
394
|
+
|
395
|
+
}
|
396
|
+
if (this.showCurentTime === true) {
|
397
|
+
const hour = new Date().getHours() > 10 ? new Date().getHours() : '0' + new Date().getHours();
|
398
|
+
let amHour: any;
|
399
|
+
|
400
|
+
if (new Date().getHours() > 10) {
|
401
|
+
if (new Date().getHours() > 12) {
|
402
|
+
if (new Date().getHours() - 12 < 10) {
|
403
|
+
amHour = '0' + (new Date().getHours() - 12);
|
404
|
+
} else {
|
405
|
+
amHour = new Date().getHours();
|
406
|
+
}
|
407
|
+
} else {
|
408
|
+
amHour = new Date().getHours();
|
409
|
+
}
|
410
|
+
} else {
|
411
|
+
amHour = '0' + new Date().getHours();
|
412
|
+
}
|
413
|
+
|
414
|
+
const min = new Date().getMinutes() > 9 ? new Date().getMinutes() : '0' + new Date().getMinutes();
|
415
|
+
const sec = new Date().getSeconds() > 9 ? new Date().getSeconds() : '0' + new Date().getSeconds();
|
416
|
+
if (this.type === 'hh' || this.type === 'hhmm' || this.type === 'hhmmss' || this.type === 'hhmmssam') {
|
417
|
+
if (hour >= 12) {
|
418
|
+
this.value = amHour + ':' + min + ':' + sec + ' ' + AXTranslator.get('dateTime.dayTime.pm');
|
419
|
+
} else {
|
420
|
+
this.value = amHour + ':' + min + ':' + sec + ' ' + AXTranslator.get('dateTime.dayTime.am');
|
421
|
+
}
|
422
|
+
} else if (this.type === 'hham') {
|
423
|
+
if (hour >= 12) {
|
424
|
+
this.value = amHour + ' ' + AXTranslator.get('dateTime.dayTime.pm');
|
425
|
+
} else {
|
426
|
+
this.value = amHour + ' ' + AXTranslator.get('dateTime.dayTime.am');
|
427
|
+
}
|
428
|
+
} else if (this.type === 'hhmmam') {
|
429
|
+
if (hour >= 12) {
|
430
|
+
this.value = amHour + ':' + min + ' ' + AXTranslator.get('dateTime.dayTime.pm');
|
431
|
+
} else {
|
432
|
+
this.value = amHour + ':' + min + ' ' + AXTranslator.get('dateTime.dayTime.am');
|
433
|
+
}
|
434
|
+
} else {
|
435
|
+
this.value = hour + ':' + min + ':' + sec;
|
436
|
+
}
|
437
|
+
}
|
438
|
+
}
|
439
|
+
|
440
|
+
onStartfocus() {
|
441
|
+
this.input.nativeElement.style.caretColor = 'transparent';
|
442
|
+
setTimeout(() => {
|
443
|
+
this.setCaretPosition(this.input.nativeElement, 0);
|
444
|
+
this.cursorPosition = 0;
|
445
|
+
this.input.nativeElement.style.caretColor = 'auto';
|
446
|
+
}, 0);
|
447
|
+
}
|
448
|
+
|
449
|
+
handleInputFocus() {
|
450
|
+
this.onStartfocus();
|
451
|
+
this.input.nativeElement.focus();
|
452
|
+
}
|
453
|
+
handleInputBlur(e) {
|
454
|
+
if (this.textValue.indexOf('-') !== -1) {
|
455
|
+
switch (this.type) {
|
456
|
+
case 'HHmmss':
|
457
|
+
this.textValue = '--:--:--';
|
458
|
+
break;
|
459
|
+
case 'HHmm':
|
460
|
+
this.textValue = '--:--';
|
461
|
+
break;
|
462
|
+
case 'HH':
|
463
|
+
this.textValue = '--';
|
464
|
+
break;
|
465
|
+
case 'hhmmss':
|
466
|
+
this.textValue = '--:--:--';
|
467
|
+
break;
|
468
|
+
case 'hhmm':
|
469
|
+
this.textValue = '--:--';
|
470
|
+
break;
|
471
|
+
case 'hh':
|
472
|
+
this.textValue = '--';
|
473
|
+
break;
|
474
|
+
case 'hhmmssam':
|
475
|
+
this.textValue = this.valueSam;
|
476
|
+
break;
|
477
|
+
case 'hhmmam':
|
478
|
+
this.textValue = this.valueMam;
|
479
|
+
break;
|
480
|
+
case 'hham':
|
481
|
+
this.textValue = this.valueHam;
|
482
|
+
break;
|
483
|
+
}
|
484
|
+
}
|
485
|
+
}
|
486
|
+
|
487
|
+
handleKeyPress(event: any) {
|
488
|
+
const inputChar = String.fromCharCode(event.charCode);
|
489
|
+
const firstChar = this.textValue.charAt(0);
|
490
|
+
const secondChar = this.textValue.charAt(1);
|
491
|
+
|
492
|
+
setTimeout(() => {
|
493
|
+
if (this.input.nativeElement.selectionStart || this.input.nativeElement.selectionStart === 0) {
|
494
|
+
this.cursorPosition = this.input.nativeElement.selectionStart;
|
495
|
+
// this.cursorPosition += 1 ;
|
496
|
+
}
|
497
|
+
}, 0);
|
498
|
+
|
499
|
+
if (firstChar === '2') {
|
500
|
+
if (secondChar === '' || this.textValue.charAt(1) >= '4' || this.cursorPosition < 3) {
|
501
|
+
if (inputChar >= '4') {
|
502
|
+
event.preventDefault();
|
503
|
+
}
|
504
|
+
}
|
505
|
+
}
|
506
|
+
if (
|
507
|
+
this.timeType.mask === this.hhmmss ||
|
508
|
+
this.timeType.mask === this.hhmm ||
|
509
|
+
this.timeType.mask === this.hh ||
|
510
|
+
this.timeType.mask === this.hhmmssam ||
|
511
|
+
this.timeType.mask === this.hhmmam ||
|
512
|
+
this.timeType.mask === this.hham
|
513
|
+
) {
|
514
|
+
if (firstChar === '1') {
|
515
|
+
if (secondChar === '' || this.textValue.charAt(1) >= '3' || this.cursorPosition < 3) {
|
516
|
+
if (inputChar >= '3') {
|
517
|
+
event.preventDefault();
|
518
|
+
}
|
519
|
+
}
|
520
|
+
}
|
521
|
+
}
|
522
|
+
if (inputChar === '-') {
|
523
|
+
event.preventDefault();
|
524
|
+
}
|
525
|
+
}
|
526
|
+
|
527
|
+
handleKeyUp(event: KeyboardEvent) {
|
528
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
529
|
+
this.input.nativeElement.style.caretColor = 'auto';
|
530
|
+
event.preventDefault();
|
531
|
+
event.stopPropagation();
|
532
|
+
}
|
533
|
+
// up & down button
|
534
|
+
if (event.key === 'ArrowUp') {
|
535
|
+
this.setCaret();
|
536
|
+
}
|
537
|
+
if (event.key === 'ArrowDown') {
|
538
|
+
this.setCaret();
|
539
|
+
}
|
540
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
541
|
+
event.preventDefault();
|
542
|
+
return false;
|
543
|
+
}
|
544
|
+
|
545
|
+
// left & right Button
|
546
|
+
if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
|
547
|
+
if (this.input.nativeElement.selectionStart || this.input.nativeElement.selectionStart === 0) {
|
548
|
+
this.cursorPosition = this.input.nativeElement.selectionStart;
|
549
|
+
}
|
550
|
+
}
|
551
|
+
|
552
|
+
// home button
|
553
|
+
if (event.key === 'Home') {
|
554
|
+
this.cursorPosition = 0;
|
555
|
+
}
|
556
|
+
|
557
|
+
// end button
|
558
|
+
if (event.key === 'End') {
|
559
|
+
if (this.timeType.mask === this.hhmmssam || this.timeType.mask === this.hhmmam || this.timeType.mask === this.hham) {
|
560
|
+
if (this.timeType.mask === this.hhmmssam) {
|
561
|
+
this.cursorPosition = 9;
|
562
|
+
setTimeout(() => {
|
563
|
+
this.setCaretPosition(this.input.nativeElement, this.cursorPosition);
|
564
|
+
this.input.nativeElement.style.caretColor = 'auto';
|
565
|
+
}, 0);
|
566
|
+
}
|
567
|
+
if (this.timeType.mask === this.hhmmam) {
|
568
|
+
this.cursorPosition = 6;
|
569
|
+
setTimeout(() => {
|
570
|
+
this.setCaretPosition(this.input.nativeElement, this.cursorPosition);
|
571
|
+
this.input.nativeElement.style.caretColor = 'auto';
|
572
|
+
}, 0);
|
573
|
+
}
|
574
|
+
if (this.timeType.mask === this.hham) {
|
575
|
+
this.cursorPosition = 3;
|
576
|
+
setTimeout(() => {
|
577
|
+
this.setCaretPosition(this.input.nativeElement, this.cursorPosition);
|
578
|
+
this.input.nativeElement.style.caretColor = 'auto';
|
579
|
+
}, 0);
|
580
|
+
}
|
581
|
+
} else {
|
582
|
+
this.cursorPosition = this.textValue.length;
|
583
|
+
}
|
584
|
+
}
|
585
|
+
|
586
|
+
// backspace Control
|
587
|
+
if (event.key === 'Backspace') {
|
588
|
+
const ind1 = this.textValue.charAt(0);
|
589
|
+
const ind2 = this.textValue.charAt(1);
|
590
|
+
const ind3 = this.textValue.charAt(2);
|
591
|
+
const ind4 = this.textValue.charAt(3);
|
592
|
+
const ind5 = this.textValue.charAt(4);
|
593
|
+
const ind6 = this.textValue.charAt(5);
|
594
|
+
const ind7 = this.textValue.charAt(6);
|
595
|
+
const ind8 = this.textValue.charAt(7);
|
596
|
+
const ind9 = this.textValue.charAt(8);
|
597
|
+
const ind10 = this.textValue.charAt(9);
|
598
|
+
if (this.timeType.mask === this.hhmmssam) {
|
599
|
+
if (ind10 === '-') {
|
600
|
+
this.textValue = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + AXTranslator.get('dateTime.dayTime.am');
|
601
|
+
setTimeout(() => {
|
602
|
+
this.setCaretPosition(this.input.nativeElement, 0);
|
603
|
+
this.cursorPosition = 0;
|
604
|
+
}, 0);
|
605
|
+
}
|
606
|
+
}
|
607
|
+
if (this.timeType.mask === this.hhmmam) {
|
608
|
+
if (ind7 === '-') {
|
609
|
+
this.textValue = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + AXTranslator.get('dateTime.dayTime.am');
|
610
|
+
setTimeout(() => {
|
611
|
+
this.setCaretPosition(this.input.nativeElement, 0);
|
612
|
+
this.cursorPosition = 0;
|
613
|
+
}, 0);
|
614
|
+
}
|
615
|
+
}
|
616
|
+
if (this.timeType.mask === this.hham) {
|
617
|
+
if (ind4 === '-') {
|
618
|
+
this.textValue = ind1 + ind2 + ind3 + AXTranslator.get('dateTime.dayTime.am');
|
619
|
+
setTimeout(() => {
|
620
|
+
this.setCaretPosition(this.input.nativeElement, 0);
|
621
|
+
this.cursorPosition = 0;
|
622
|
+
}, 0);
|
623
|
+
}
|
624
|
+
}
|
625
|
+
|
626
|
+
if (this.textValue.length <= 0) {
|
627
|
+
this.cursorPosition = 0;
|
628
|
+
} else {
|
629
|
+
this.cursorPosition -= 1;
|
630
|
+
}
|
631
|
+
}
|
632
|
+
}
|
633
|
+
|
634
|
+
handleKeyDown(event: KeyboardEvent) {
|
635
|
+
if (event.key === 'End') {
|
636
|
+
if (this.timeType.mask === this.hhmmssam || this.timeType.mask === this.hhmmam || this.timeType.mask === this.hham) {
|
637
|
+
this.input.nativeElement.style.caretColor = 'transparent';
|
638
|
+
} else {
|
639
|
+
this.input.nativeElement.style.caretColor = 'auto';
|
640
|
+
}
|
641
|
+
}
|
642
|
+
|
643
|
+
let newValue = this.textValue;
|
644
|
+
|
645
|
+
const ind1 = newValue.charAt(0);
|
646
|
+
const ind2 = newValue.charAt(1);
|
647
|
+
const ind3 = this.textValue.charAt(2);
|
648
|
+
const ind4 = this.textValue.charAt(3);
|
649
|
+
const ind5 = this.textValue.charAt(4);
|
650
|
+
const ind6 = this.textValue.charAt(5);
|
651
|
+
const ind7 = this.textValue.charAt(6);
|
652
|
+
const ind8 = this.textValue.charAt(7);
|
653
|
+
const ind9 = this.textValue.charAt(8);
|
654
|
+
const ind10 = this.textValue.charAt(9);
|
655
|
+
const ind11 = this.textValue.charAt(10);
|
656
|
+
|
657
|
+
// up key
|
658
|
+
if (event.key === 'ArrowUp') {
|
659
|
+
// hour
|
660
|
+
if (this.cursorPosition <= 2) {
|
661
|
+
const hourind = ind1 + ind2;
|
662
|
+
const newHour = +hourind + 1;
|
663
|
+
newValue = newHour.toString();
|
664
|
+
if (
|
665
|
+
this.timeType.mask === this.hhmmss ||
|
666
|
+
this.timeType.mask === this.hhmm ||
|
667
|
+
this.timeType.mask === this.hh ||
|
668
|
+
this.timeType.mask === this.hhmmssam ||
|
669
|
+
this.timeType.mask === this.hhmmam ||
|
670
|
+
this.timeType.mask === this.hham
|
671
|
+
) {
|
672
|
+
if (hourind === '--') {
|
673
|
+
newValue = '0';
|
674
|
+
}
|
675
|
+
if (ind1 !== '-' && hourind === ind1 + '-') {
|
676
|
+
newValue = '0';
|
677
|
+
}
|
678
|
+
if (ind2 !== '-' && hourind === '-' + ind2) {
|
679
|
+
newValue = '0';
|
680
|
+
}
|
681
|
+
if (+newValue > 12) {
|
682
|
+
newValue = '01';
|
683
|
+
} else if (+newValue < 10) {
|
684
|
+
newValue = '0' + newValue;
|
685
|
+
}
|
686
|
+
} else {
|
687
|
+
if (hourind === '--') {
|
688
|
+
newValue = '0';
|
689
|
+
}
|
690
|
+
if (ind1 !== '-' && hourind === ind1 + '-') {
|
691
|
+
newValue = '0';
|
692
|
+
}
|
693
|
+
if (ind2 !== '-' && hourind === '-' + ind2) {
|
694
|
+
newValue = '0';
|
695
|
+
}
|
696
|
+
if (+newValue > 23) {
|
697
|
+
newValue = '00';
|
698
|
+
} else if (+newValue < 10) {
|
699
|
+
newValue = '0' + newValue;
|
700
|
+
}
|
701
|
+
}
|
702
|
+
const afterHourind = ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + ind10 + ind11;
|
703
|
+
const hour = newValue.toString() + afterHourind;
|
704
|
+
this.textValue = hour;
|
705
|
+
}
|
706
|
+
// minute
|
707
|
+
if (this.cursorPosition >= 3 && this.cursorPosition <= 5) {
|
708
|
+
const hourind = ind4 + ind5;
|
709
|
+
const newHour = +hourind + 1;
|
710
|
+
|
711
|
+
newValue = newHour.toString();
|
712
|
+
if (hourind === '--') {
|
713
|
+
newValue = '0';
|
714
|
+
}
|
715
|
+
if (ind4 !== '-' && hourind === ind4 + '-') {
|
716
|
+
newValue = '0';
|
717
|
+
}
|
718
|
+
if (ind5 !== '-' && hourind === '-' + ind5) {
|
719
|
+
newValue = '0';
|
720
|
+
}
|
721
|
+
if (+newValue > 59) {
|
722
|
+
newValue = '00';
|
723
|
+
} else if (+newValue < 10) {
|
724
|
+
newValue = '0' + newValue;
|
725
|
+
}
|
726
|
+
const beforeHourind = ind1 + ind2 + ind3;
|
727
|
+
const afterHourind = ind6 + ind7 + ind8 + ind9 + ind10 + ind11;
|
728
|
+
const minute = beforeHourind + newValue.toString() + afterHourind;
|
729
|
+
this.textValue = minute;
|
730
|
+
}
|
731
|
+
|
732
|
+
// second
|
733
|
+
if (this.cursorPosition >= 6 && this.cursorPosition <= 8) {
|
734
|
+
const secondind = ind7 + ind8;
|
735
|
+
const newSecond = +secondind + 1;
|
736
|
+
|
737
|
+
newValue = newSecond.toString();
|
738
|
+
if (secondind === '--') {
|
739
|
+
newValue = '0';
|
740
|
+
}
|
741
|
+
if (ind7 !== '-' && secondind === ind7 + '-') {
|
742
|
+
newValue = '0';
|
743
|
+
}
|
744
|
+
if (ind8 !== '-' && secondind === '-' + ind8) {
|
745
|
+
newValue = '0';
|
746
|
+
}
|
747
|
+
if (+newValue > 59) {
|
748
|
+
newValue = '00';
|
749
|
+
} else if (+newValue < 10) {
|
750
|
+
newValue = '0' + newValue;
|
751
|
+
}
|
752
|
+
const beforeHourind = ind1 + ind2 + ind3 + ind4 + ind5 + ind6;
|
753
|
+
const afterHourind = ind9 + ind10 + ind11;
|
754
|
+
const second = beforeHourind + newValue.toString() + afterHourind;
|
755
|
+
this.textValue = second;
|
756
|
+
}
|
757
|
+
|
758
|
+
// type am/PM
|
759
|
+
if (this.timeType.mask === this.hhmmssam) {
|
760
|
+
if (this.cursorPosition > 8) {
|
761
|
+
let typeind = ind10.toString();
|
762
|
+
|
763
|
+
const beforeHourind = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9;
|
764
|
+
const afterHourind = ind11;
|
765
|
+
|
766
|
+
if (ind10 === AXTranslator.get('dateTime.dayTime.p')) {
|
767
|
+
typeind = AXTranslator.get('dateTime.dayTime.a');
|
768
|
+
} else if (ind10 === AXTranslator.get('dateTime.dayTime.a')) {
|
769
|
+
typeind = AXTranslator.get('dateTime.dayTime.p');
|
770
|
+
}
|
771
|
+
this.textValue = beforeHourind + typeind + afterHourind;
|
772
|
+
}
|
773
|
+
}
|
774
|
+
if (this.timeType.mask === this.hhmmam) {
|
775
|
+
if (this.cursorPosition >= 6) {
|
776
|
+
let typeind = ind7.toString();
|
777
|
+
|
778
|
+
const beforeHourind = ind1 + ind2 + ind3 + ind4 + ind5 + ind6;
|
779
|
+
const afterHourind = ind8;
|
780
|
+
|
781
|
+
if (ind7 === AXTranslator.get('dateTime.dayTime.p')) {
|
782
|
+
typeind = AXTranslator.get('dateTime.dayTime.a');
|
783
|
+
} else if (ind7 === AXTranslator.get('dateTime.dayTime.a')) {
|
784
|
+
typeind = AXTranslator.get('dateTime.dayTime.p');
|
785
|
+
}
|
786
|
+
this.textValue = beforeHourind + typeind + afterHourind;
|
787
|
+
}
|
788
|
+
}
|
789
|
+
if (this.timeType.mask === this.hham) {
|
790
|
+
if (this.cursorPosition >= 3) {
|
791
|
+
let typeind2 = ind4.toString();
|
792
|
+
|
793
|
+
const beforeHourind = ind1 + ind2 + ind3;
|
794
|
+
const afterHourind = ind5;
|
795
|
+
|
796
|
+
if (ind4 === AXTranslator.get('dateTime.dayTime.p')) {
|
797
|
+
typeind2 = AXTranslator.get('dateTime.dayTime.a');
|
798
|
+
} else if (ind4 === AXTranslator.get('dateTime.dayTime.a')) {
|
799
|
+
typeind2 = AXTranslator.get('dateTime.dayTime.p');
|
800
|
+
}
|
801
|
+
this.textValue = beforeHourind + typeind2 + afterHourind;
|
802
|
+
}
|
803
|
+
}
|
804
|
+
}
|
805
|
+
|
806
|
+
// key down
|
807
|
+
if (event.key === 'ArrowDown') {
|
808
|
+
// hour
|
809
|
+
if (this.cursorPosition <= 2) {
|
810
|
+
const hourind = ind1 + ind2;
|
811
|
+
const newHour = +hourind - 1;
|
812
|
+
|
813
|
+
newValue = newHour.toString();
|
814
|
+
if (
|
815
|
+
this.timeType.mask === this.hhmmss ||
|
816
|
+
this.timeType.mask === this.hhmm ||
|
817
|
+
this.timeType.mask === this.hh ||
|
818
|
+
this.timeType.mask === this.hhmmssam ||
|
819
|
+
this.timeType.mask === this.hhmmam ||
|
820
|
+
this.timeType.mask === this.hham
|
821
|
+
) {
|
822
|
+
if (hourind === '--') {
|
823
|
+
newValue = '0';
|
824
|
+
}
|
825
|
+
if (ind1 !== '-' && hourind === ind1 + '-') {
|
826
|
+
newValue = '0';
|
827
|
+
}
|
828
|
+
if (ind2 !== '-' && hourind === '-' + ind2) {
|
829
|
+
newValue = '0';
|
830
|
+
}
|
831
|
+
if (+newValue < 1) {
|
832
|
+
newValue = '12';
|
833
|
+
} else if (+newValue < 10) {
|
834
|
+
newValue = '0' + newValue;
|
835
|
+
}
|
836
|
+
} else {
|
837
|
+
if (hourind === '--') {
|
838
|
+
newValue = '0';
|
839
|
+
}
|
840
|
+
if (ind1 !== '-' && hourind === ind1 + '-') {
|
841
|
+
newValue = '0';
|
842
|
+
}
|
843
|
+
if (ind2 !== '-' && hourind === '-' + ind2) {
|
844
|
+
newValue = '0';
|
845
|
+
}
|
846
|
+
if (+newValue < 0) {
|
847
|
+
newValue = '23';
|
848
|
+
} else if (+newValue < 10) {
|
849
|
+
newValue = '0' + newValue;
|
850
|
+
}
|
851
|
+
}
|
852
|
+
const afterHourIndex = ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + ind10 + ind11;
|
853
|
+
const hour = newValue.toString() + afterHourIndex;
|
854
|
+
this.textValue = hour;
|
855
|
+
}
|
856
|
+
// minute
|
857
|
+
if (this.cursorPosition >= 3 && this.cursorPosition <= 5) {
|
858
|
+
const minuteind = ind4 + ind5;
|
859
|
+
const newMinute = +minuteind - 1;
|
860
|
+
|
861
|
+
newValue = newMinute.toString();
|
862
|
+
if (minuteind === '--') {
|
863
|
+
newValue = '0';
|
864
|
+
}
|
865
|
+
if (ind4 !== '-' && minuteind === ind4 + '-') {
|
866
|
+
newValue = '0';
|
867
|
+
}
|
868
|
+
if (ind5 !== '-' && minuteind === '-' + ind5) {
|
869
|
+
newValue = '0';
|
870
|
+
}
|
871
|
+
if (minuteind === '--') {
|
872
|
+
newValue = '0';
|
873
|
+
}
|
874
|
+
if (+newValue < 0) {
|
875
|
+
newValue = '59';
|
876
|
+
} else if (+newValue < 10) {
|
877
|
+
newValue = '0' + newValue;
|
878
|
+
}
|
879
|
+
const beforeMinuteIndex = ind1 + ind2 + ind3;
|
880
|
+
const afterMinuteIndex = ind6 + ind7 + ind8 + ind9 + ind10 + ind11;
|
881
|
+
const minute = beforeMinuteIndex + newValue.toString() + afterMinuteIndex;
|
882
|
+
this.textValue = minute;
|
883
|
+
}
|
884
|
+
|
885
|
+
// second
|
886
|
+
if (this.cursorPosition >= 6 && this.cursorPosition <= 8) {
|
887
|
+
const secondIndex = ind7 + ind8;
|
888
|
+
const newSecond = +secondIndex - 1;
|
889
|
+
|
890
|
+
newValue = newSecond.toString();
|
891
|
+
if (secondIndex === '--') {
|
892
|
+
newValue = '0';
|
893
|
+
}
|
894
|
+
if (ind7 !== '-' && secondIndex === ind7 + '-') {
|
895
|
+
newValue = '0';
|
896
|
+
}
|
897
|
+
if (ind8 !== '-' && secondIndex === '-' + ind8) {
|
898
|
+
newValue = '0';
|
899
|
+
}
|
900
|
+
if (secondIndex === '--') {
|
901
|
+
newValue = '0';
|
902
|
+
}
|
903
|
+
if (+newValue < 0) {
|
904
|
+
newValue = '59';
|
905
|
+
} else if (+newValue < 10) {
|
906
|
+
newValue = '0' + newValue;
|
907
|
+
}
|
908
|
+
const beforesecondIndex = ind1 + ind2 + ind3 + ind4 + ind5 + ind6;
|
909
|
+
const aftersecondIndex = ind9 + ind10 + ind11;
|
910
|
+
const second = beforesecondIndex + newValue.toString() + aftersecondIndex;
|
911
|
+
this.textValue = second;
|
912
|
+
}
|
913
|
+
|
914
|
+
// type
|
915
|
+
if (this.timeType.mask === this.hhmmssam) {
|
916
|
+
if (this.cursorPosition > 8) {
|
917
|
+
let typeind = ind10.toString();
|
918
|
+
|
919
|
+
const beforeHourind = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9;
|
920
|
+
const afterHourind = ind11;
|
921
|
+
|
922
|
+
if (ind10 === AXTranslator.get('dateTime.dayTime.p')) {
|
923
|
+
typeind = AXTranslator.get('dateTime.dayTime.a');
|
924
|
+
} else if (ind10 === AXTranslator.get('dateTime.dayTime.a')) {
|
925
|
+
typeind = AXTranslator.get('dateTime.dayTime.p');
|
926
|
+
}
|
927
|
+
this.textValue = beforeHourind + typeind + afterHourind;
|
928
|
+
}
|
929
|
+
}
|
930
|
+
if (this.timeType.mask === this.hhmmam) {
|
931
|
+
if (this.cursorPosition >= 6) {
|
932
|
+
let typeind = ind7.toString();
|
933
|
+
|
934
|
+
const beforeHourind = ind1 + ind2 + ind3 + ind4 + ind5 + ind6;
|
935
|
+
const afterHourind = ind8;
|
936
|
+
|
937
|
+
if (ind7 === AXTranslator.get('dateTime.dayTime.p')) {
|
938
|
+
typeind = AXTranslator.get('dateTime.dayTime.a');
|
939
|
+
} else if (ind7 === AXTranslator.get('dateTime.dayTime.a')) {
|
940
|
+
typeind = AXTranslator.get('dateTime.dayTime.p');
|
941
|
+
}
|
942
|
+
this.textValue = beforeHourind + typeind + afterHourind;
|
943
|
+
}
|
944
|
+
}
|
945
|
+
if (this.timeType.mask === this.hham) {
|
946
|
+
if (this.cursorPosition >= 3) {
|
947
|
+
let typeind2 = ind4.toString();
|
948
|
+
|
949
|
+
const beforeHourind = ind1 + ind2 + ind3;
|
950
|
+
const afterHourind = ind5;
|
951
|
+
//TO DO this is wrong check index
|
952
|
+
if (ind4 === AXTranslator.get('dateTime.dayTime.p')) {
|
953
|
+
typeind2 = AXTranslator.get('dateTime.dayTime.a');
|
954
|
+
} else if (ind4 === AXTranslator.get('dateTime.dayTime.a')) {
|
955
|
+
typeind2 = AXTranslator.get('dateTime.dayTime.p');
|
956
|
+
}
|
957
|
+
this.textValue = beforeHourind + typeind2 + afterHourind;
|
958
|
+
}
|
959
|
+
}
|
960
|
+
}
|
961
|
+
|
962
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
963
|
+
this.input.nativeElement.style.caretColor = 'transparent';
|
964
|
+
event.preventDefault();
|
965
|
+
event.stopPropagation();
|
966
|
+
return false;
|
967
|
+
}
|
968
|
+
if (event.key === 'Delete') {
|
969
|
+
event.preventDefault();
|
970
|
+
}
|
971
|
+
}
|
972
|
+
|
973
|
+
handleClick(event: KeyboardEvent) {
|
974
|
+
if (this.input.nativeElement.selectionStart || this.input.nativeElement.selectionStart === 0) {
|
975
|
+
this.cursorPosition = this.input.nativeElement.selectionStart;
|
976
|
+
}
|
977
|
+
}
|
978
|
+
|
979
|
+
doGetCaretPosition(ctrl) {
|
980
|
+
let CaretPos = 0;
|
981
|
+
if (ctrl.selectionStart || ctrl.selectionStart === 0) {
|
982
|
+
CaretPos = ctrl.selectionStart;
|
983
|
+
return CaretPos;
|
984
|
+
}
|
985
|
+
}
|
986
|
+
|
987
|
+
setCaretPosition(ctrl, pos) {
|
988
|
+
if (ctrl.setSelectionRange) {
|
989
|
+
ctrl.focus();
|
990
|
+
ctrl.setSelectionRange(pos, pos);
|
991
|
+
} else if (ctrl.createTextRange) {
|
992
|
+
const range = ctrl.createTextRange();
|
993
|
+
range.collapse(true);
|
994
|
+
range.moveEnd('character', pos);
|
995
|
+
range.moveStart('character', pos);
|
996
|
+
range.select();
|
997
|
+
}
|
998
|
+
}
|
999
|
+
|
1000
|
+
setCaret() {
|
1001
|
+
this.setCaretPosition(this.input.nativeElement, this.cursorPosition);
|
1002
|
+
}
|
1003
|
+
}
|