@koobiq/components 18.36.0 → 18.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/autocomplete.scss +2 -17
- package/breadcrumbs/breadcrumbs.d.ts +2 -1
- package/breadcrumbs/breadcrumbs.scss +4 -4
- package/button/button.component.d.ts +1 -0
- package/button-toggle/button-toggle.scss +0 -2
- package/content-panel/content-panel.d.ts +1 -1
- package/content-panel/index.d.ts +0 -1
- package/core/common-behaviors/hover.d.ts +15 -0
- package/core/common-behaviors/index.d.ts +1 -1
- package/core/locales/formatters.d.ts +0 -72
- package/core/locales/index.d.ts +0 -2
- package/core/locales/locale-service.d.ts +0 -392
- package/core/option/option.d.ts +3 -2
- package/core/select/common.d.ts +3 -1
- package/core/styles/common/_select.scss +20 -0
- package/core/styles/typography/_typography.scss +23 -82
- package/datepicker/datepicker-module.d.ts +2 -1
- package/dropdown/dropdown-item.scss +8 -7
- package/dropdown/dropdown.scss +5 -14
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +4 -4
- package/esm2022/breadcrumbs/breadcrumbs.mjs +46 -37
- package/esm2022/button/button.component.mjs +6 -4
- package/esm2022/button-toggle/button-toggle.component.mjs +2 -2
- package/esm2022/code-block/code-block-highlight.mjs +6 -1
- package/esm2022/content-panel/content-panel.mjs +2 -2
- package/esm2022/content-panel/index.mjs +1 -2
- package/esm2022/core/common-behaviors/color.mjs +2 -1
- package/esm2022/core/common-behaviors/common-module.mjs +2 -1
- package/esm2022/core/common-behaviors/disabled.mjs +2 -1
- package/esm2022/core/common-behaviors/error-state.mjs +2 -1
- package/esm2022/core/common-behaviors/hover.mjs +34 -0
- package/esm2022/core/common-behaviors/index.mjs +2 -2
- package/esm2022/core/common-behaviors/tabindex.mjs +2 -1
- package/esm2022/core/form-field/field-sizing-content.mjs +5 -2
- package/esm2022/core/formatters/number/formatter.mjs +2 -2
- package/esm2022/core/locales/es-LA.mjs +10 -10
- package/esm2022/core/locales/formatters.mjs +1 -73
- package/esm2022/core/locales/index.mjs +1 -3
- package/esm2022/core/locales/locale-service.mjs +2 -8
- package/esm2022/core/locales/pt-BR.mjs +19 -19
- package/esm2022/core/locales/tk-TM.mjs +24 -24
- package/esm2022/core/option/option.mjs +10 -6
- package/esm2022/core/pop-up/pop-up-trigger.mjs +2 -1
- package/esm2022/core/select/common.mjs +10 -4
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +5 -4
- package/esm2022/datepicker/datepicker-module.mjs +7 -4
- package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
- package/esm2022/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +5 -2
- package/esm2022/file-upload/file-drop.mjs +5 -3
- package/esm2022/file-upload/multiple-file-upload.component.mjs +9 -13
- package/esm2022/file-upload/single-file-upload.component.mjs +9 -4
- package/esm2022/filter-bar/filter-bar.mjs +6 -2
- package/esm2022/filter-bar/filter-search.mjs +3 -3
- package/esm2022/filter-bar/filters.mjs +10 -5
- package/esm2022/filter-bar/pipe-add.mjs +3 -2
- package/esm2022/filter-bar/pipes/base-pipe.mjs +11 -3
- package/esm2022/filter-bar/pipes/pipe-date.mjs +3 -3
- package/esm2022/filter-bar/pipes/pipe-datetime.mjs +3 -3
- package/esm2022/filter-bar/pipes/pipe-multi-select.mjs +5 -4
- package/esm2022/filter-bar/pipes/pipe-multi-tree-select.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-select.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-text.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-title.mjs +24 -19
- package/esm2022/filter-bar/pipes/pipe-tree-select.mjs +2 -2
- package/esm2022/form-field/fieldset.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +2 -2
- package/esm2022/form-field/stepper.mjs +41 -10
- package/esm2022/inline-edit/inline-edit.mjs +9 -5
- package/esm2022/input/input-number.mjs +7 -6
- package/esm2022/input/input.module.mjs +7 -4
- package/esm2022/list/list-selection.component.mjs +31 -15
- package/esm2022/markdown/markdown.component.mjs +7 -7
- package/esm2022/modal/modal-util.mjs +7 -3
- package/esm2022/modal/modal.component.mjs +2 -2
- package/esm2022/modal/modal.service.mjs +2 -1
- package/esm2022/navbar/navbar-item.component.mjs +5 -7
- package/esm2022/navbar/navbar.component.mjs +8 -4
- package/esm2022/navbar/vertical-navbar.component.mjs +2 -2
- package/esm2022/navbar-ic/navbar-ic-header.mjs +20 -4
- package/esm2022/navbar-ic/navbar-ic-item.mjs +7 -8
- package/esm2022/navbar-ic/navbar-ic.animation.mjs +10 -2
- package/esm2022/navbar-ic/navbar-ic.mjs +33 -9
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +17 -4
- package/esm2022/resizer/index.mjs +3 -0
- package/esm2022/resizer/koobiq-components-resizer.mjs +5 -0
- package/esm2022/resizer/module.mjs +17 -0
- package/esm2022/resizer/resizer.mjs +135 -0
- package/esm2022/scrollbar/scrollbar.directive.mjs +4 -3
- package/esm2022/search-expandable/search-expandable.mjs +5 -5
- package/esm2022/select/select.component.mjs +2 -14
- package/esm2022/select/select.module.mjs +8 -4
- package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
- package/esm2022/split-button/split-button.mjs +47 -6
- package/esm2022/tags/tag-input.mjs +24 -28
- package/esm2022/tags/tag-list.component.mjs +76 -87
- package/esm2022/tags/tag.component.mjs +29 -34
- package/esm2022/textarea/textarea.module.mjs +5 -4
- package/esm2022/time-range/constants.mjs +22 -1
- package/esm2022/time-range/time-range-editor.mjs +11 -6
- package/esm2022/time-range/time-range-title-as-form-field.mjs +2 -1
- package/esm2022/time-range/time-range.mjs +8 -3
- package/esm2022/time-range/time-range.service.mjs +43 -106
- package/esm2022/time-range/types.mjs +1 -1
- package/esm2022/timepicker/timepicker.module.mjs +5 -4
- package/esm2022/timezone/timezone-option.component.mjs +2 -2
- package/esm2022/timezone/timezone.module.mjs +6 -4
- package/esm2022/title/title.directive.mjs +6 -2
- package/esm2022/toggle/toggle.component.mjs +3 -3
- package/esm2022/top-bar/top-bar.mjs +2 -2
- package/esm2022/tree/tree-option.component.mjs +7 -6
- package/esm2022/tree/tree-selection.component.mjs +23 -13
- package/esm2022/tree-select/tree-select.component.mjs +97 -79
- package/esm2022/tree-select/tree-select.module.mjs +7 -4
- package/fesm2022/koobiq-components-autocomplete.mjs +3 -3
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +45 -36
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +2 -2
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +5 -3
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +5 -0
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +3 -137
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +90 -478
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +8 -5
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +4 -4
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +4 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +19 -17
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +64 -41
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +44 -17
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +8 -4
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +12 -9
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +30 -14
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +6 -6
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +9 -4
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar-ic.mjs +70 -26
- package/fesm2022/koobiq-components-navbar-ic.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +13 -11
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +18 -5
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-resizer.mjs +156 -0
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -0
- package/fesm2022/koobiq-components-scrollbar.mjs +3 -2
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +4 -4
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +8 -17
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +2 -2
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +46 -5
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +125 -146
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +4 -4
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +81 -112
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +4 -4
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +7 -5
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +5 -1
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +2 -2
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +2 -2
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +102 -82
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +28 -17
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +32 -34
- package/file-upload/file-upload-tokens.scss +1 -2
- package/file-upload/file-upload.scss +4 -7
- package/file-upload/multiple-file-upload.component.d.ts +1 -1
- package/file-upload/multiple-file-upload.component.scss +12 -14
- package/file-upload/single-file-upload.component.d.ts +1 -0
- package/file-upload/single-file-upload.component.scss +5 -7
- package/filter-bar/filter-bar.d.ts +3 -1
- package/filter-bar/filter-search.scss +1 -3
- package/filter-bar/filters.d.ts +1 -0
- package/filter-bar/pipes/base-pipe.d.ts +5 -1
- package/filter-bar/pipes/pipe-date.scss +4 -2
- package/filter-bar/pipes/pipe-title.d.ts +2 -0
- package/form-field/fieldset-tokens.scss +2 -1
- package/form-field/form-field-tokens.scss +2 -2
- package/form-field/form-field.scss +9 -1
- package/form-field/stepper.d.ts +28 -6
- package/inline-edit/inline-edit.d.ts +5 -1
- package/input/input.module.d.ts +2 -1
- package/list/list-selection.component.d.ts +12 -1
- package/markdown/_markdown-theme.scss +0 -1
- package/markdown/markdown.scss +2 -4
- package/modal/modal-tokens.scss +2 -1
- package/modal/modal-util.d.ts +5 -2
- package/modal/modal.scss +3 -4
- package/navbar/_navbar-item_vertical.scss +10 -0
- package/navbar/navbar-brand.scss +5 -2
- package/navbar/vertical-navbar.scss +1 -0
- package/navbar-ic/navbar-ic-header.d.ts +3 -2
- package/navbar-ic/navbar-ic-header.scss +0 -4
- package/navbar-ic/navbar-ic-item.d.ts +1 -0
- package/navbar-ic/navbar-ic-item.scss +0 -4
- package/navbar-ic/navbar-ic.animation.d.ts +1 -0
- package/navbar-ic/navbar-ic.d.ts +7 -0
- package/package.json +16 -10
- package/popover/popover-tokens.scss +1 -0
- package/popover/popover.component.d.ts +5 -1
- package/popover/popover.scss +3 -4
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/resizer/index.d.ts +2 -0
- package/resizer/module.d.ts +7 -0
- package/{content-panel/resizable.d.ts → resizer/resizer.d.ts} +18 -13
- package/schematics/collection.json +5 -0
- package/schematics/migrations/icons-replacement/README.md +93 -0
- package/schematics/migrations/icons-replacement/data.js +92 -0
- package/schematics/migrations/icons-replacement/index.js +84 -0
- package/schematics/migrations/icons-replacement/schema.json +32 -0
- package/schematics/ng-add/index.js +6 -6
- package/scrollbar/scrollbar.component.scss +2 -3
- package/select/select.module.d.ts +2 -1
- package/select/select.scss +1 -17
- package/sidepanel/sidepanel-tokens.scss +2 -0
- package/sidepanel/sidepanel.scss +2 -0
- package/split-button/_split-button-theme.scss +89 -34
- package/split-button/split-button.d.ts +11 -5
- package/split-button/split-button.scss +40 -51
- package/tags/tag-input.d.ts +16 -7
- package/tags/tag-list.component.d.ts +44 -21
- package/tags/tag-list.scss +13 -14
- package/tags/tag.component.d.ts +20 -15
- package/textarea/textarea-tokens.scss +6 -1
- package/textarea/textarea.module.d.ts +2 -1
- package/textarea/textarea.scss +4 -0
- package/time-range/constants.d.ts +12 -1
- package/time-range/time-range-editor.d.ts +7 -9
- package/time-range/time-range-title-as-form-field.d.ts +1 -0
- package/time-range/time-range.d.ts +5 -2
- package/time-range/time-range.service.d.ts +7 -11
- package/time-range/types.d.ts +37 -11
- package/timepicker/timepicker.module.d.ts +2 -1
- package/timezone/timezone-option.component.scss +6 -0
- package/timezone/timezone.module.d.ts +1 -1
- package/toggle/_toggle-theme.scss +8 -5
- package/toggle/toggle-tokens.scss +0 -1
- package/toggle/toggle.scss +11 -15
- package/top-bar/top-bar-tokens.scss +1 -1
- package/top-bar/top-bar.scss +3 -0
- package/tree/tree-option.component.d.ts +1 -0
- package/tree/tree-selection.component.d.ts +11 -2
- package/tree-select/tree-select.component.d.ts +5 -5
- package/tree-select/tree-select.module.d.ts +2 -1
- package/tree-select/tree-select.scss +4 -0
- package/core/common-behaviors/hovered.d.ts +0 -13
- package/core/locales/fa-IR.d.ts +0 -162
- package/core/locales/zh-CN.d.ts +0 -162
- package/esm2022/content-panel/resizable.mjs +0 -138
- package/esm2022/core/common-behaviors/hovered.mjs +0 -31
- package/esm2022/core/locales/fa-IR.mjs +0 -173
- package/esm2022/core/locales/zh-CN.mjs +0 -161
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../core/styles/common';
|
|
1
|
+
@use '../core/styles/common/list';
|
|
2
2
|
@use './split-button-theme';
|
|
3
3
|
|
|
4
4
|
.kbq-split-button {
|
|
@@ -9,74 +9,63 @@
|
|
|
9
9
|
|
|
10
10
|
border-radius: var(--kbq-size-border-radius);
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
&.kbq-split-button_styles-for-nested {
|
|
13
|
+
& .kbq-split-button_first {
|
|
14
|
+
&.kbq-button {
|
|
15
|
+
padding-right: 10px;
|
|
16
|
+
}
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
& .kbq-button-icon:first-child {
|
|
18
|
-
min-width: 0;
|
|
18
|
+
min-width: 0;
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
border-right: none;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
border-top-right-radius: unset;
|
|
23
|
+
border-bottom-right-radius: unset;
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
& .kbq-button-wrapper {
|
|
26
|
+
@include list.kbq-truncate-line();
|
|
27
|
+
}
|
|
27
28
|
}
|
|
28
|
-
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
border-left: none;
|
|
30
|
+
& .kbq-split-button_second {
|
|
31
|
+
border-left: none;
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
border-top-left-radius: unset;
|
|
34
|
+
border-bottom-left-radius: unset;
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
&::before {
|
|
37
|
+
display: block;
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
content: '';
|
|
40
|
+
position: absolute;
|
|
41
|
+
left: 0;
|
|
42
|
+
top: calc(var(--kbq-size-s) - var(--kbq-button-size-border-width));
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
& .kbq-button,
|
|
51
|
-
& .kbq-button-icon {
|
|
52
|
-
&:not(:hover, .cdk-keyboard-focused, .kbq-active, .kbq-progress) {
|
|
53
|
-
& + .kbq-button,
|
|
54
|
-
& + .kbq-button-icon {
|
|
55
|
-
&:not(:hover, .cdk-keyboard-focused, .kbq-active, .kbq-progress) {
|
|
56
|
-
&::before {
|
|
57
|
-
display: block;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
44
|
+
width: 1px;
|
|
45
|
+
height: var(--kbq-size-l);
|
|
60
46
|
}
|
|
61
47
|
}
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
& + .kbq-
|
|
65
|
-
|
|
66
|
-
&.kbq-progress::before {
|
|
67
|
-
display: block;
|
|
68
|
-
}
|
|
49
|
+
& .kbq-split-button_first:not(.kbq-disabled):is(:hover, .kbq-hover, .cdk-keyboard-focused, .kbq-active) {
|
|
50
|
+
& + .kbq-split-button_second::before {
|
|
51
|
+
display: none;
|
|
69
52
|
}
|
|
70
53
|
}
|
|
71
54
|
|
|
72
|
-
&
|
|
73
|
-
|
|
55
|
+
&
|
|
56
|
+
.kbq-split-button_second:not(.kbq-disabled):is(
|
|
57
|
+
:hover,
|
|
58
|
+
.kbq-hover,
|
|
59
|
+
.cdk-keyboard-focused,
|
|
60
|
+
.kbq-active
|
|
61
|
+
)::before {
|
|
62
|
+
display: none;
|
|
74
63
|
}
|
|
75
|
-
}
|
|
76
64
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
65
|
+
& .kbq-button-icon + .kbq-button-icon {
|
|
66
|
+
padding-left: var(--kbq-size-xxs);
|
|
67
|
+
padding-right: var(--kbq-size-xxs);
|
|
68
|
+
}
|
|
80
69
|
}
|
|
81
70
|
}
|
|
82
71
|
|
package/tags/tag-input.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, OnChanges
|
|
1
|
+
import { ElementRef, EventEmitter, OnChanges } from '@angular/core';
|
|
2
2
|
import { NgControl } from '@angular/forms';
|
|
3
3
|
import { KbqAutocompleteTrigger } from '@koobiq/components/autocomplete';
|
|
4
4
|
import { KbqTrim } from '@koobiq/components/form-field';
|
|
@@ -6,6 +6,7 @@ import { KbqTagsDefaultOptions } from './tag-default-options';
|
|
|
6
6
|
import { KbqTagList } from './tag-list.component';
|
|
7
7
|
import { KbqTagTextControl } from './tag-text-control';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@koobiq/components/core";
|
|
9
10
|
/** Represents an input event on a `kbqTagInput`. */
|
|
10
11
|
export interface KbqTagInputEvent {
|
|
11
12
|
/** The native `<input>` element that the event is being fired for. */
|
|
@@ -23,7 +24,6 @@ export interface KbqTagSeparator {
|
|
|
23
24
|
*/
|
|
24
25
|
export declare class KbqTagInput implements KbqTagTextControl, OnChanges {
|
|
25
26
|
private elementRef;
|
|
26
|
-
private renderer;
|
|
27
27
|
private defaultOptions;
|
|
28
28
|
private trimDirective;
|
|
29
29
|
ngControl: NgControl;
|
|
@@ -68,12 +68,17 @@ export declare class KbqTagInput implements KbqTagTextControl, OnChanges {
|
|
|
68
68
|
private _disabled;
|
|
69
69
|
/** Whether the input is empty. */
|
|
70
70
|
get empty(): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* @docs-private
|
|
73
|
+
*
|
|
74
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
75
|
+
*/
|
|
71
76
|
countOfSymbolsForUpdateWidth: number;
|
|
72
|
-
private oneSymbolWidth;
|
|
73
77
|
/** The native input element to which this directive is attached. */
|
|
74
78
|
private inputElement;
|
|
75
|
-
constructor(elementRef: ElementRef<HTMLInputElement>,
|
|
79
|
+
constructor(elementRef: ElementRef<HTMLInputElement>, defaultOptions: KbqTagsDefaultOptions, trimDirective: KbqTrim, ngControl: NgControl, autocompleteTrigger?: KbqAutocompleteTrigger | undefined);
|
|
76
80
|
ngOnChanges(): void;
|
|
81
|
+
/** @docs-private */
|
|
77
82
|
onKeydown(event: KeyboardEvent): void;
|
|
78
83
|
/** Checks to see if the blur should emit the (tagEnd) event. */
|
|
79
84
|
blur(event: FocusEvent): void;
|
|
@@ -83,6 +88,11 @@ export declare class KbqTagInput implements KbqTagTextControl, OnChanges {
|
|
|
83
88
|
get hasDuplicates(): boolean;
|
|
84
89
|
onInput(): void;
|
|
85
90
|
onPaste($event: ClipboardEvent): void;
|
|
91
|
+
/**
|
|
92
|
+
* @docs-private
|
|
93
|
+
*
|
|
94
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
95
|
+
*/
|
|
86
96
|
updateInputWidth(): void;
|
|
87
97
|
/** @docs-private */
|
|
88
98
|
onFocus(): void;
|
|
@@ -92,9 +102,8 @@ export declare class KbqTagInput implements KbqTagTextControl, OnChanges {
|
|
|
92
102
|
private trimValue;
|
|
93
103
|
private getSeparatorByKeyCode;
|
|
94
104
|
private hasControl;
|
|
95
|
-
private setDefaultInputWidth;
|
|
96
105
|
/** Checks whether a keycode is one of the configured separators. */
|
|
97
106
|
private isSeparatorKey;
|
|
98
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTagInput, [null, null,
|
|
99
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTagInput, "input[kbqTagInputFor]", ["kbqTagInput", "kbqTagInputFor"], { "separatorKeyCodes": { "alias": "kbqTagInputSeparatorKeyCodes"; "required": false; }; "distinct": { "alias": "distinct"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "tagList": { "alias": "kbqTagInputFor"; "required": false; }; "addOnBlur": { "alias": "kbqTagInputAddOnBlur"; "required": false; }; "addOnPaste": { "alias": "kbqTagInputAddOnPaste"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "tagEnd": "kbqTagInputTokenEnd"; }, never, never, false,
|
|
107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTagInput, [null, null, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; self: true; }]>;
|
|
108
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTagInput, "input[kbqTagInputFor]", ["kbqTagInput", "kbqTagInputFor"], { "separatorKeyCodes": { "alias": "kbqTagInputSeparatorKeyCodes"; "required": false; }; "distinct": { "alias": "distinct"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "tagList": { "alias": "kbqTagInputFor"; "required": false; }; "addOnBlur": { "alias": "kbqTagInputAddOnBlur"; "required": false; }; "addOnPaste": { "alias": "kbqTagInputAddOnPaste"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "tagEnd": "kbqTagInputTokenEnd"; }, never, never, false, [{ directive: typeof i1.KbqFieldSizingContent; inputs: {}; outputs: {}; }]>;
|
|
100
109
|
}
|
|
@@ -8,7 +8,7 @@ import { CanUpdateErrorState, ErrorStateMatcher, KbqOrientation } from '@koobiq/
|
|
|
8
8
|
import { KbqCleaner, KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
9
9
|
import { Observable, Subject } from 'rxjs';
|
|
10
10
|
import { KbqTagTextControl } from './tag-text-control';
|
|
11
|
-
import { KbqTag, KbqTagEditChange, KbqTagEvent, KbqTagSelectionChange } from './tag.component';
|
|
11
|
+
import { KbqTag, KbqTagEditChange, KbqTagEvent, KbqTagFocusEvent, KbqTagSelectionChange } from './tag.component';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
import * as i1 from "@angular/cdk/drag-drop";
|
|
14
14
|
/** Change event object that is emitted when the tag list value has changed. */
|
|
@@ -43,28 +43,48 @@ export declare class KbqTagList implements KbqFormFieldControl<any>, ControlValu
|
|
|
43
43
|
* @docs-private
|
|
44
44
|
*/
|
|
45
45
|
readonly stateChanges: Subject<void>;
|
|
46
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Combined stream of all of the child tags' selection change events.
|
|
48
|
+
*
|
|
49
|
+
* @docs-private
|
|
50
|
+
*/
|
|
47
51
|
get tagSelectionChanges(): Observable<KbqTagSelectionChange>;
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Combined stream of all of the child tags' focus change events.
|
|
54
|
+
*
|
|
55
|
+
* @docs-private
|
|
56
|
+
*/
|
|
57
|
+
get tagFocusChanges(): Observable<KbqTagFocusEvent>;
|
|
58
|
+
/**
|
|
59
|
+
* Combined stream of all of the child tags' blur change events.
|
|
60
|
+
*
|
|
61
|
+
* @docs-private
|
|
62
|
+
*/
|
|
51
63
|
get tagBlurChanges(): Observable<KbqTagEvent>;
|
|
52
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Combined stream of all of the child tags' remove change events.
|
|
66
|
+
*
|
|
67
|
+
* @docs-private
|
|
68
|
+
*/
|
|
53
69
|
get tagRemoveChanges(): Observable<KbqTagEvent>;
|
|
54
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Combined stream of all of the child tags' edit change events.
|
|
72
|
+
*
|
|
73
|
+
* @docs-private
|
|
74
|
+
*/
|
|
55
75
|
get tagEditChanges(): Observable<KbqTagEditChange>;
|
|
56
76
|
/**
|
|
57
77
|
* The array of selected tags inside tag list.
|
|
58
78
|
*
|
|
59
79
|
* @docs-private
|
|
60
80
|
*/
|
|
61
|
-
get selected(): KbqTag[]
|
|
81
|
+
get selected(): KbqTag[];
|
|
62
82
|
/** @docs-private */
|
|
63
83
|
get canShowCleaner(): boolean;
|
|
64
84
|
/**
|
|
65
|
-
*
|
|
85
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
66
86
|
*
|
|
67
|
-
*
|
|
87
|
+
* @docs-private
|
|
68
88
|
*/
|
|
69
89
|
multiple: boolean;
|
|
70
90
|
/**
|
|
@@ -138,7 +158,12 @@ export declare class KbqTagList implements KbqFormFieldControl<any>, ControlValu
|
|
|
138
158
|
get removable(): boolean;
|
|
139
159
|
set removable(value: boolean);
|
|
140
160
|
private _removable;
|
|
141
|
-
|
|
161
|
+
/**
|
|
162
|
+
* Tab index of the tag list. This property is ignored when the tag list contains a tag input or is disabled.
|
|
163
|
+
*
|
|
164
|
+
* @docs-private
|
|
165
|
+
*/
|
|
166
|
+
get tabIndex(): number | null;
|
|
142
167
|
set tabIndex(value: number);
|
|
143
168
|
private _tabIndex;
|
|
144
169
|
/**
|
|
@@ -206,8 +231,6 @@ export declare class KbqTagList implements KbqFormFieldControl<any>, ControlValu
|
|
|
206
231
|
private tagFocusSubscription;
|
|
207
232
|
/** Subscription to blur changes in the tags. */
|
|
208
233
|
private tagBlurSubscription;
|
|
209
|
-
/** Subscription to selection changes in tags. */
|
|
210
|
-
private tagSelectionSubscription;
|
|
211
234
|
/** Subscription to remove changes in tags. */
|
|
212
235
|
private tagRemoveSubscription;
|
|
213
236
|
/** Subscription to edit changes in tags. */
|
|
@@ -250,13 +273,16 @@ export declare class KbqTagList implements KbqFormFieldControl<any>, ControlValu
|
|
|
250
273
|
*
|
|
251
274
|
* @docs-private
|
|
252
275
|
*/
|
|
253
|
-
onContainerClick(
|
|
276
|
+
onContainerClick(): void;
|
|
254
277
|
/**
|
|
255
|
-
* Focuses the
|
|
256
|
-
* are no eligible tags.
|
|
278
|
+
* Focuses the tag list. If there is a tag input, focuses that instead.
|
|
257
279
|
*/
|
|
258
280
|
focus(): void;
|
|
259
|
-
/**
|
|
281
|
+
/**
|
|
282
|
+
* Focuses the tag input inside the tag list.
|
|
283
|
+
*
|
|
284
|
+
* @docs-private
|
|
285
|
+
*/
|
|
260
286
|
focusInput(): void;
|
|
261
287
|
/**
|
|
262
288
|
* Pass events to the keyboard manager. Available here for tests.
|
|
@@ -294,6 +320,7 @@ export declare class KbqTagList implements KbqFormFieldControl<any>, ControlValu
|
|
|
294
320
|
* @returns True if the index is valid for our list of tags.
|
|
295
321
|
*/
|
|
296
322
|
private isValidIndex;
|
|
323
|
+
private isInputElement;
|
|
297
324
|
private isInputEmpty;
|
|
298
325
|
private isTagElement;
|
|
299
326
|
private selectAll;
|
|
@@ -313,13 +340,9 @@ export declare class KbqTagList implements KbqFormFieldControl<any>, ControlValu
|
|
|
313
340
|
private resetTags;
|
|
314
341
|
private dropSubscriptions;
|
|
315
342
|
/** Listens to user-generated selection events on each tag. */
|
|
316
|
-
private listenToTagsSelection;
|
|
317
|
-
/** Listens to user-generated selection events on each tag. */
|
|
318
343
|
private listenToTagsFocus;
|
|
319
344
|
private listenToTagsRemoved;
|
|
320
345
|
private listenToTagsEdit;
|
|
321
|
-
/** Checks whether an event comes from inside a tag element. */
|
|
322
|
-
private originatesFromTag;
|
|
323
346
|
/** Checks whether any of the tags is focused. */
|
|
324
347
|
private hasFocusedTag;
|
|
325
348
|
private syncTagsRemovableState;
|
package/tags/tag-list.scss
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../core/styles/common/tokens' as *;
|
|
2
|
+
@use '../core/styles/common/input';
|
|
2
3
|
|
|
3
4
|
.kbq-tag-list {
|
|
4
5
|
display: flex;
|
|
@@ -17,22 +18,24 @@
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
.kbq-tag-input {
|
|
20
|
-
|
|
21
|
-
outline: none;
|
|
22
|
-
background: transparent;
|
|
23
|
-
|
|
24
|
-
text-overflow: ellipsis;
|
|
25
|
-
|
|
26
|
-
min-height: unset;
|
|
21
|
+
@include input.kbq-reset-input();
|
|
27
22
|
|
|
28
23
|
padding-top: var(--kbq-tag-size-padding-vertical);
|
|
29
24
|
padding-bottom: var(--kbq-tag-size-padding-vertical);
|
|
30
|
-
padding-left:
|
|
25
|
+
padding-left: var(--kbq-size-xxs);
|
|
31
26
|
padding-right: unset;
|
|
32
27
|
|
|
28
|
+
min-width: var(--kbq-size-3xl);
|
|
29
|
+
max-width: 100%;
|
|
30
|
+
flex-grow: 1;
|
|
31
|
+
|
|
33
32
|
&.kbq-input {
|
|
34
|
-
padding:
|
|
35
|
-
|
|
33
|
+
--kbq-input-size-padding-vertical: 0;
|
|
34
|
+
--kbq-form-field-size-border-radius: 0;
|
|
35
|
+
|
|
36
|
+
padding-left: var(--kbq-size-xxs);
|
|
37
|
+
min-height: unset !important;
|
|
38
|
+
width: auto;
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
|
|
@@ -48,10 +51,6 @@
|
|
|
48
51
|
gap: var(--kbq-tag-list-size-content-gap);
|
|
49
52
|
|
|
50
53
|
.kbq-tag-input {
|
|
51
|
-
max-width: 100%;
|
|
52
|
-
|
|
53
|
-
flex: 1 1 auto;
|
|
54
|
-
|
|
55
54
|
// indicating tag list is empty
|
|
56
55
|
&:first-child {
|
|
57
56
|
padding-left: var(--kbq-size-s);
|
package/tags/tag.component.d.ts
CHANGED
|
@@ -7,9 +7,12 @@ import { Subject } from 'rxjs';
|
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
import * as i1 from "@koobiq/components/core";
|
|
9
9
|
import * as i2 from "@angular/cdk/drag-drop";
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Event object emitted by KbqTag.
|
|
12
|
+
*/
|
|
13
|
+
export type KbqTagEvent = {
|
|
11
14
|
tag: KbqTag;
|
|
12
|
-
}
|
|
15
|
+
};
|
|
13
16
|
/**
|
|
14
17
|
* Event object emitted by KbqTag when the tag is edited.
|
|
15
18
|
*/
|
|
@@ -26,12 +29,18 @@ export declare class KbqTagSelectionChange {
|
|
|
26
29
|
isUserInput: boolean;
|
|
27
30
|
constructor(source: KbqTag, selected: boolean, isUserInput?: boolean);
|
|
28
31
|
}
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Event object emitted when the KbqTag is focused.
|
|
34
|
+
*/
|
|
35
|
+
export type KbqTagFocusEvent = KbqTagEvent & {
|
|
36
|
+
origin: FocusOrigin;
|
|
34
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Object passed to the drag data event when a tag is being dragged.
|
|
40
|
+
*
|
|
41
|
+
* @docs-private
|
|
42
|
+
*/
|
|
43
|
+
export type KbqTagDragData = KbqTagEvent;
|
|
35
44
|
/**
|
|
36
45
|
* Dummy directive to add CSS class to tag avatar.
|
|
37
46
|
* @docs-private
|
|
@@ -80,7 +89,7 @@ export declare class KbqTag extends KbqColorDirective implements IFocusableOptio
|
|
|
80
89
|
*
|
|
81
90
|
* @docs-private
|
|
82
91
|
*/
|
|
83
|
-
readonly onFocus: Subject<
|
|
92
|
+
readonly onFocus: Subject<KbqTagFocusEvent>;
|
|
84
93
|
/**
|
|
85
94
|
* Emits when the tag is blurred.
|
|
86
95
|
*
|
|
@@ -95,7 +104,6 @@ export declare class KbqTag extends KbqColorDirective implements IFocusableOptio
|
|
|
95
104
|
* @docs-private
|
|
96
105
|
*/
|
|
97
106
|
hasFocus: boolean;
|
|
98
|
-
private focusOrigin;
|
|
99
107
|
/** Whether the tag is editable. */
|
|
100
108
|
get editable(): boolean;
|
|
101
109
|
set editable(value: boolean);
|
|
@@ -137,10 +145,7 @@ export declare class KbqTag extends KbqColorDirective implements IFocusableOptio
|
|
|
137
145
|
set value(value: any);
|
|
138
146
|
private _value;
|
|
139
147
|
/**
|
|
140
|
-
* Whether
|
|
141
|
-
* changes to its selected state are always ignored. By default a tag is
|
|
142
|
-
* selectable, and it becomes non-selectable if its parent tag list is
|
|
143
|
-
* not selectable.
|
|
148
|
+
* Whether the tag is selectable.
|
|
144
149
|
*/
|
|
145
150
|
get selectable(): boolean;
|
|
146
151
|
set selectable(value: boolean);
|
|
@@ -202,7 +207,7 @@ export declare class KbqTag extends KbqColorDirective implements IFocusableOptio
|
|
|
202
207
|
*/
|
|
203
208
|
remove(): void;
|
|
204
209
|
/** @docs-private */
|
|
205
|
-
|
|
210
|
+
handleClick(event: MouseEvent): void;
|
|
206
211
|
/** @docs-private */
|
|
207
212
|
handleKeydown(event: KeyboardEvent): void;
|
|
208
213
|
/** @docs-private */
|
|
@@ -227,7 +232,7 @@ export declare class KbqTag extends KbqColorDirective implements IFocusableOptio
|
|
|
227
232
|
private syncDragDisabledState;
|
|
228
233
|
private setupFocusMonitor;
|
|
229
234
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTag, never>;
|
|
230
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTag, "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", ["kbqTag"], { "editable": { "alias": "editable"; "required": false; }; "preventEditSubmit": { "alias": "preventEditSubmit"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "editChange": "editChange"; "selectionChange": "selectionChange"; "destroyed": "destroyed"; "removed": "removed"; }, ["editInputElementRef", "avatar", "trailingIcon", "removeIcon", "contentChildren"], ["[kbq-icon]:not([kbqTagRemove]):not([kbqTagEditSubmit])", "[kbqTagEditInput]", "*", "[kbqTagEditSubmit]", "[kbqTagRemove]"], false, [{ directive: typeof
|
|
235
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTag, "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", ["kbqTag"], { "editable": { "alias": "editable"; "required": false; }; "preventEditSubmit": { "alias": "preventEditSubmit"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "editChange": "editChange"; "selectionChange": "selectionChange"; "destroyed": "destroyed"; "removed": "removed"; }, ["editInputElementRef", "avatar", "trailingIcon", "removeIcon", "contentChildren"], ["[kbq-icon]:not([kbqTagRemove]):not([kbqTagEditSubmit])", "[kbqTagEditInput]", "*", "[kbqTagEditSubmit]", "[kbqTagRemove]"], false, [{ directive: typeof i2.CdkDrag; inputs: {}; outputs: {}; }]>;
|
|
231
236
|
static ngAcceptInputType_editable: unknown;
|
|
232
237
|
static ngAcceptInputType_preventEditSubmit: unknown;
|
|
233
238
|
static ngAcceptInputType_selected: unknown;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
.kbq-textarea {
|
|
1
|
+
:where(.kbq-textarea) {
|
|
2
2
|
--kbq-textarea-size-min-height: 64px;
|
|
3
3
|
--kbq-textarea-size-max-height: 96px;
|
|
4
4
|
--kbq-textarea-size-padding-vertical: 5px;
|
|
5
5
|
--kbq-textarea-size-padding-horizontal: 11px;
|
|
6
|
+
--kbq-textarea-resizer-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="16" height="16" viewBox="0 0 16 16"><path fill="%238a8fa8" d="m13.354 5.354-8 8-.708-.707 8-8zm0 4-4 4-.708-.707 4-4z"/></svg>');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where(.kbq-dark .kbq-textarea) {
|
|
10
|
+
--kbq-textarea-resizer-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="16" height="16" viewBox="0 0 16 16"><path fill="%23626884" d="m13.354 5.354-8 8-.708-.707 8-8zm0 4-4 4-.708-.707 4-4z"/></svg>');
|
|
6
11
|
}
|
|
@@ -2,8 +2,9 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./textarea.component";
|
|
3
3
|
import * as i2 from "@angular/cdk/a11y";
|
|
4
4
|
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "@koobiq/components/form-field";
|
|
5
6
|
export declare class KbqTextareaModule {
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTextareaModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KbqTextareaModule, [typeof i1.KbqTextarea], [typeof i2.A11yModule, typeof i3.FormsModule], [typeof i1.KbqTextarea]>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KbqTextareaModule, [typeof i1.KbqTextarea], [typeof i2.A11yModule, typeof i3.FormsModule], [typeof i1.KbqTextarea, typeof i4.KbqFormFieldModule]>;
|
|
8
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<KbqTextareaModule>;
|
|
9
10
|
}
|
package/textarea/textarea.scss
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { ValidatorFn } from '@angular/forms';
|
|
3
3
|
import { KbqTimeRangeService } from './time-range.service';
|
|
4
|
-
import { KbqTimeRangeType } from './types';
|
|
4
|
+
import { KbqCustomTimeRangeType, KbqTimeRangeType } from './types';
|
|
5
5
|
/** Preset of selectable time ranges, provided by DI. */
|
|
6
6
|
export declare const KBQ_DEFAULT_TIME_RANGE_TYPES: InjectionToken<KbqTimeRangeType[]>;
|
|
7
|
+
/** Preset of custom time ranges, provided by DI. */
|
|
8
|
+
export declare const KBQ_CUSTOM_TIME_RANGE_TYPES: InjectionToken<KbqCustomTimeRangeType[]>;
|
|
9
|
+
/** Time range types in range editor if nothing provided */
|
|
10
|
+
export declare const defaultTimeRangeTypes: KbqTimeRangeType[];
|
|
11
|
+
/** @docs-private */
|
|
7
12
|
export declare function createMissingDateImplError(componentName: string, provider: string): Error;
|
|
13
|
+
/**
|
|
14
|
+
* Validates that the 'from' date-time is not greater than the 'to' date-time in a range form.
|
|
15
|
+
* Returns an error if the start date-time occurs after the end date-time.
|
|
16
|
+
*
|
|
17
|
+
* @param timeRangeService - Service used to manipulate date-time values.
|
|
18
|
+
*/
|
|
8
19
|
export declare const rangeValidator: <T>(timeRangeService: KbqTimeRangeService<T>) => ValidatorFn;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { AbstractControl, ControlValueAccessor, FormControl, FormGroup, FormGroupDirective, NgForm, ValidationErrors, Validator } from '@angular/forms';
|
|
3
3
|
import { ErrorStateMatcher, KbqTimeRangeLocaleConfig } from '@koobiq/components/core';
|
|
4
4
|
import { KbqTimepicker, TimeFormats } from '@koobiq/components/timepicker';
|
|
5
|
-
import { KbqRangeValue, KbqTimeRangeRange, KbqTimeRangeType } from './types';
|
|
5
|
+
import { KbqRangeValue, KbqTimeRangeOptionContext, KbqTimeRangeRange, KbqTimeRangeType } from './types';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
interface FormValue<T> {
|
|
8
8
|
type: FormControl<KbqTimeRangeType>;
|
|
@@ -27,14 +27,12 @@ export declare class KbqTimeRangeEditor<T> implements ControlValueAccessor, Vali
|
|
|
27
27
|
readonly rangeValue: import("@angular/core").InputSignal<Required<KbqRangeValue<T>>>;
|
|
28
28
|
readonly showRangeAsDefault: import("@angular/core").InputSignal<boolean>;
|
|
29
29
|
readonly localeConfiguration: import("@angular/core").InputSignal<KbqTimeRangeLocaleConfig>;
|
|
30
|
+
/** Customizable option output */
|
|
31
|
+
readonly optionTemplate: import("@angular/core").InputSignal<TemplateRef<KbqTimeRangeOptionContext> | undefined>;
|
|
30
32
|
/** @docs-private */
|
|
31
33
|
protected readonly isRangeVisible: import("@angular/core").Signal<boolean>;
|
|
32
34
|
/** @docs-private */
|
|
33
|
-
protected readonly timeRangeTypesWithoutRange: import("@angular/core").Signal<
|
|
34
|
-
type: "lastMinute" | "last5Minutes" | "last15Minutes" | "last30Minutes" | "lastHour" | "last24Hours" | "last3Days" | "last7Days" | "last14Days" | "last30Days" | "last3Months" | "last12Months" | "allTime" | "currentQuarter" | "currentYear";
|
|
35
|
-
translationType: import("./types").KbqTimeRangeTranslationType;
|
|
36
|
-
formattedValue: string;
|
|
37
|
-
}[]>;
|
|
35
|
+
protected readonly timeRangeTypesWithoutRange: import("@angular/core").Signal<KbqTimeRangeOptionContext[]>;
|
|
38
36
|
/** @docs-private */
|
|
39
37
|
protected readonly timepickerList: import("@angular/core").Signal<readonly KbqTimepicker<T>[]>;
|
|
40
38
|
/** @docs-private */
|
|
@@ -49,7 +47,7 @@ export declare class KbqTimeRangeEditor<T> implements ControlValueAccessor, Vali
|
|
|
49
47
|
/** @docs-private */
|
|
50
48
|
validate(): ValidationErrors | null;
|
|
51
49
|
/** Implemented as part of ControlValueAccessor */
|
|
52
|
-
writeValue(value
|
|
50
|
+
writeValue(value?: KbqTimeRangeRange): void;
|
|
53
51
|
/** @docs-private */
|
|
54
52
|
onChange: (_value: KbqTimeRangeRange) => void;
|
|
55
53
|
/** @docs-private */
|
|
@@ -62,6 +60,6 @@ export declare class KbqTimeRangeEditor<T> implements ControlValueAccessor, Vali
|
|
|
62
60
|
private getFormattedOption;
|
|
63
61
|
private concatControlValidationErrors;
|
|
64
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTimeRangeEditor<any>, never>;
|
|
65
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTimeRangeEditor<any>, "kbq-time-range-editor", never, { "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "availableTimeRangeTypes": { "alias": "availableTimeRangeTypes"; "required": false; "isSignal": true; }; "rangeValue": { "alias": "rangeValue"; "required": false; "isSignal": true; }; "showRangeAsDefault": { "alias": "showRangeAsDefault"; "required": true; "isSignal": true; }; "localeConfiguration": { "alias": "localeConfiguration"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTimeRangeEditor<any>, "kbq-time-range-editor", never, { "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "availableTimeRangeTypes": { "alias": "availableTimeRangeTypes"; "required": false; "isSignal": true; }; "rangeValue": { "alias": "rangeValue"; "required": false; "isSignal": true; }; "showRangeAsDefault": { "alias": "showRangeAsDefault"; "required": true; "isSignal": true; }; "localeConfiguration": { "alias": "localeConfiguration"; "required": true; "isSignal": true; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
66
64
|
}
|
|
67
65
|
export {};
|
|
@@ -10,6 +10,7 @@ export declare class KbqTimeRangeTitlePlaceholder {
|
|
|
10
10
|
/** Component simulates `KbqFormFieldControl` allowing to provide custom content inside `KbqFormField` */
|
|
11
11
|
export declare class KbqTimeRangeTitleAsControl implements KbqFormFieldControl<any> {
|
|
12
12
|
private timeRange;
|
|
13
|
+
/** @docs-private */
|
|
13
14
|
controlType: string;
|
|
14
15
|
/** @docs-private */
|
|
15
16
|
stateChanges: Observable<void>;
|
|
@@ -2,7 +2,7 @@ import { InjectionToken, OnInit, Provider, TemplateRef, WritableSignal } from '@
|
|
|
2
2
|
import { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';
|
|
3
3
|
import { KbqTimeRangeLocaleConfig, PopUpPlacements, PopUpSizes } from '@koobiq/components/core';
|
|
4
4
|
import { KbqPopoverTrigger } from '@koobiq/components/popover';
|
|
5
|
-
import { KbqRangeValue, KbqTimeRangeCustomizableTitleContext, KbqTimeRangeRange, KbqTimeRangeType } from './types';
|
|
5
|
+
import { KbqRangeValue, KbqTimeRangeCustomizableTitleContext, KbqTimeRangeOptionContext, KbqTimeRangeRange, KbqTimeRangeType } from './types';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/** Localization configuration provider. */
|
|
8
8
|
export declare const KBQ_TIME_RANGE_LOCALE_CONFIGURATION: InjectionToken<KbqTimeRangeLocaleConfig>;
|
|
@@ -11,6 +11,7 @@ export declare const kbqTimeRangeLocaleConfigurationProvider: (configuration: Kb
|
|
|
11
11
|
export declare class KbqTimeRange<T> implements ControlValueAccessor, OnInit {
|
|
12
12
|
private readonly timeRangeService;
|
|
13
13
|
private readonly localeService;
|
|
14
|
+
/** @docs-private */
|
|
14
15
|
readonly ngControl: NgControl | null;
|
|
15
16
|
/** The minimum selectable date. */
|
|
16
17
|
readonly minDate: import("@angular/core").InputSignal<T | undefined>;
|
|
@@ -22,6 +23,8 @@ export declare class KbqTimeRange<T> implements ControlValueAccessor, OnInit {
|
|
|
22
23
|
readonly availableTimeRangeTypes: import("@angular/core").InputSignal<KbqTimeRangeType[]>;
|
|
23
24
|
/** Customizable trigger output */
|
|
24
25
|
readonly titleTemplate: import("@angular/core").InputSignal<TemplateRef<KbqTimeRangeCustomizableTitleContext> | undefined>;
|
|
26
|
+
/** Customizable option output */
|
|
27
|
+
readonly optionTemplate: import("@angular/core").InputSignal<TemplateRef<KbqTimeRangeOptionContext> | undefined>;
|
|
25
28
|
/** Whether to show popover with arrow */
|
|
26
29
|
readonly arrow: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
27
30
|
/**
|
|
@@ -71,5 +74,5 @@ export declare class KbqTimeRange<T> implements ControlValueAccessor, OnInit {
|
|
|
71
74
|
registerOnTouched(fn: () => void): void;
|
|
72
75
|
private handleAvailableTypesChange;
|
|
73
76
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTimeRange<any>, never>;
|
|
74
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTimeRange<any>, "kbq-time-range", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "defaultRangeValue": { "alias": "defaultRangeValue"; "required": false; "isSignal": true; }; "availableTimeRangeTypes": { "alias": "availableTimeRangeTypes"; "required": false; "isSignal": true; }; "titleTemplate": { "alias": "titleTemplate"; "required": false; "isSignal": true; }; "arrow": { "alias": "arrow"; "required": false; "isSignal": true; }; "showRangeAsDefault": { "alias": "showRangeAsDefault"; "required": false; "isSignal": true; }; "nonNullable": { "alias": "nonNullable"; "required": false; "isSignal": true; }; }, { "valueCorrected": "valueCorrected"; }, never, never, true, never>;
|
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTimeRange<any>, "kbq-time-range", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "defaultRangeValue": { "alias": "defaultRangeValue"; "required": false; "isSignal": true; }; "availableTimeRangeTypes": { "alias": "availableTimeRangeTypes"; "required": false; "isSignal": true; }; "titleTemplate": { "alias": "titleTemplate"; "required": false; "isSignal": true; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; "isSignal": true; }; "arrow": { "alias": "arrow"; "required": false; "isSignal": true; }; "showRangeAsDefault": { "alias": "showRangeAsDefault"; "required": false; "isSignal": true; }; "nonNullable": { "alias": "nonNullable"; "required": false; "isSignal": true; }; }, { "valueCorrected": "valueCorrected"; }, never, never, true, never>;
|
|
75
78
|
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import { DateAdapter, DateFormatter } from '@koobiq/components/core';
|
|
2
|
-
import { KbqRange, KbqRangeValue, KbqTimeRangeRange,
|
|
2
|
+
import { KbqCustomTimeRangeType, KbqRange, KbqRangeValue, KbqTimeRangeRange, KbqTimeRangeTranslationType, KbqTimeRangeType, KbqTimeRangeUnits } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class KbqTimeRangeService<T> {
|
|
5
5
|
readonly dateAdapter: DateAdapter<T>;
|
|
6
6
|
readonly dateFormatter: DateFormatter<T>;
|
|
7
|
-
protected defaultTimeRangeTypes: KbqTimeRangeType[];
|
|
8
7
|
readonly providedDefaultTimeRangeTypes: KbqTimeRangeType[];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
readonly customTimeRangeTypes: KbqCustomTimeRangeType[] | null;
|
|
9
|
+
readonly DEFAULT_RANGE_TYPE: KbqTimeRangeType;
|
|
10
|
+
readonly timeRangeConfig: Record<KbqTimeRangeType, Omit<KbqCustomTimeRangeType, 'type'>>;
|
|
12
11
|
constructor();
|
|
13
12
|
static range: (dateTimeISOString: string) => KbqRange;
|
|
13
|
+
add({ type, ...customTimeRangeConfig }: KbqCustomTimeRangeType): void;
|
|
14
14
|
getTimeRangeTypeUnits(type: KbqTimeRangeType): KbqTimeRangeUnits;
|
|
15
15
|
getTimeRangeUnitByType(type: KbqTimeRangeType): KbqTimeRangeTranslationType;
|
|
16
16
|
getDefaultRangeValue(): Required<KbqRangeValue<T>>;
|
|
17
17
|
getTimeRangeDefaultValue(rangeValue: KbqRangeValue<T>, availableTimeRangeTypes?: KbqTimeRangeType[]): KbqTimeRangeRange;
|
|
18
|
-
calculateTimeRange(type
|
|
18
|
+
calculateTimeRange(type?: KbqTimeRangeType, rangeValue?: KbqRangeValue<T>): KbqRange;
|
|
19
19
|
combineDateAndTime(date: T, time: T): T;
|
|
20
|
-
|
|
21
|
-
lastMinutesRange: (minutes: number) => KbqRange;
|
|
22
|
-
lastHoursRange: (hours: number) => KbqRange;
|
|
23
|
-
lastDaysRange: (days: number) => KbqRange;
|
|
24
|
-
lastMonthsRange: (months: number) => KbqRange;
|
|
20
|
+
lastUnitsRange: (unitsInfo: KbqTimeRangeUnits) => KbqRange;
|
|
25
21
|
checkAndCorrectTimeRangeValue(value: KbqTimeRangeRange | null | undefined, availableTimeRangeTypes: KbqTimeRangeType[], rangeValue: KbqRangeValue<T>): KbqTimeRangeRange;
|
|
26
22
|
omitMilliseconds(date: T): T;
|
|
27
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTimeRangeService<any>, never>;
|