@koobiq/components 18.10.0 → 18.12.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.
Files changed (162) hide show
  1. package/autocomplete/autocomplete-trigger.directive.d.ts +0 -1
  2. package/autocomplete/autocomplete.scss +2 -10
  3. package/button/button-tokens.scss +1 -1
  4. package/code-block/_code-block-theme.scss +35 -54
  5. package/code-block/code-block-highlight.d.ts +44 -0
  6. package/code-block/code-block-tokens.scss +7 -11
  7. package/code-block/code-block.d.ts +187 -0
  8. package/code-block/code-block.module.d.ts +2 -8
  9. package/code-block/code-block.scss +103 -127
  10. package/code-block/public-api.d.ts +3 -2
  11. package/code-block/types.d.ts +27 -0
  12. package/core/common-behaviors/error-state.d.ts +3 -3
  13. package/core/error/error-state-matcher.d.ts +3 -0
  14. package/core/locales/index.d.ts +1 -0
  15. package/core/locales/types.d.ts +11 -0
  16. package/core/pop-up/constants.d.ts +9 -0
  17. package/core/select/constants.d.ts +16 -4
  18. package/core/styles/theming/_scrollbar-theme.scss +2 -1
  19. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +7 -8
  20. package/esm2022/autocomplete/autocomplete.component.mjs +2 -2
  21. package/esm2022/button/button.component.mjs +2 -2
  22. package/esm2022/code-block/code-block-highlight.mjs +416 -0
  23. package/esm2022/code-block/code-block.mjs +395 -0
  24. package/esm2022/code-block/code-block.module.mjs +9 -30
  25. package/esm2022/code-block/public-api.mjs +4 -3
  26. package/esm2022/code-block/types.mjs +2 -0
  27. package/esm2022/core/common-behaviors/error-state.mjs +1 -1
  28. package/esm2022/core/error/error-state-matcher.mjs +15 -2
  29. package/esm2022/core/locales/en-US.mjs +1 -1
  30. package/esm2022/core/locales/es-LA.mjs +1 -1
  31. package/esm2022/core/locales/fa-IR.mjs +1 -1
  32. package/esm2022/core/locales/index.mjs +2 -1
  33. package/esm2022/core/locales/pt-BR.mjs +1 -1
  34. package/esm2022/core/locales/ru-RU.mjs +1 -1
  35. package/esm2022/core/locales/types.mjs +2 -0
  36. package/esm2022/core/locales/zh-CN.mjs +1 -1
  37. package/esm2022/core/pop-up/constants.mjs +6 -1
  38. package/esm2022/core/select/constants.mjs +17 -5
  39. package/esm2022/core/version.mjs +2 -2
  40. package/esm2022/datepicker/calendar-header.component.mjs +1 -1
  41. package/esm2022/file-upload/file-upload.mjs +40 -2
  42. package/esm2022/file-upload/multiple-file-upload.component.mjs +43 -47
  43. package/esm2022/file-upload/single-file-upload.component.mjs +41 -45
  44. package/esm2022/form-field/form-field.mjs +6 -6
  45. package/esm2022/form-field/hint.mjs +2 -2
  46. package/esm2022/form-field/password-hint.mjs +2 -2
  47. package/esm2022/loader-overlay/loader-overlay.component.mjs +6 -4
  48. package/esm2022/modal/modal.component.mjs +5 -3
  49. package/esm2022/modal/modal.service.mjs +6 -3
  50. package/esm2022/modal/modal.type.mjs +1 -1
  51. package/esm2022/modal/public-api.mjs +5 -5
  52. package/esm2022/scrollbar/scrollbar.directive.mjs +6 -3
  53. package/esm2022/select/select.component.mjs +22 -12
  54. package/esm2022/sidepanel/sidepanel-config.mjs +1 -1
  55. package/esm2022/sidepanel/sidepanel-container.component.mjs +6 -3
  56. package/esm2022/timezone/timezone-select.component.mjs +3 -1
  57. package/esm2022/toast/toast-container.component.mjs +3 -3
  58. package/esm2022/toast/toast.component.mjs +18 -9
  59. package/esm2022/toast/toast.module.mjs +14 -50
  60. package/esm2022/toast/toast.service.mjs +5 -2
  61. package/esm2022/tooltip/tooltip.component.mjs +5 -2
  62. package/esm2022/tree-select/tree-select.component.mjs +15 -40
  63. package/fesm2022/koobiq-components-autocomplete.mjs +9 -10
  64. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  65. package/fesm2022/koobiq-components-button.mjs +2 -2
  66. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  67. package/fesm2022/koobiq-components-code-block.mjs +378 -341
  68. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  69. package/fesm2022/koobiq-components-core.mjs +36 -7
  70. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  71. package/fesm2022/koobiq-components-datepicker.mjs +1 -1
  72. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  73. package/fesm2022/koobiq-components-file-upload.mjs +107 -76
  74. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  75. package/fesm2022/koobiq-components-form-field.mjs +9 -9
  76. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  77. package/fesm2022/koobiq-components-loader-overlay.mjs +5 -3
  78. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  79. package/fesm2022/koobiq-components-modal.mjs +10 -5
  80. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  81. package/fesm2022/koobiq-components-scrollbar.mjs +5 -2
  82. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  83. package/fesm2022/koobiq-components-select.mjs +21 -11
  84. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  85. package/fesm2022/koobiq-components-sidepanel.mjs +5 -2
  86. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  87. package/fesm2022/koobiq-components-timezone.mjs +2 -0
  88. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  89. package/fesm2022/koobiq-components-toast.mjs +138 -161
  90. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  91. package/fesm2022/koobiq-components-tooltip.mjs +4 -1
  92. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  93. package/fesm2022/koobiq-components-tree-select.mjs +14 -39
  94. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  95. package/file-upload/_file-upload-theme.scss +16 -2
  96. package/file-upload/file-upload.d.ts +29 -2
  97. package/file-upload/multiple-file-upload.component.d.ts +18 -18
  98. package/file-upload/single-file-upload.component.d.ts +17 -16
  99. package/form-field/_hint-theme.scss +1 -1
  100. package/form-field/form-field.d.ts +1 -1
  101. package/form-field/form-field.scss +0 -1
  102. package/loader-overlay/loader-overlay.component.d.ts +1 -0
  103. package/modal/modal.component.d.ts +4 -0
  104. package/modal/modal.service.d.ts +4 -0
  105. package/modal/modal.type.d.ts +6 -1
  106. package/modal/public-api.d.ts +4 -4
  107. package/package.json +4 -4
  108. package/prebuilt-themes/dark-theme.css +1 -1
  109. package/prebuilt-themes/light-theme.css +1 -1
  110. package/prebuilt-themes/theme.css +1 -1
  111. package/schematics/ng-add/index.js +3 -4
  112. package/scrollbar/scrollbar.directive.d.ts +2 -1
  113. package/select/select.component.d.ts +15 -3
  114. package/sidepanel/sidepanel-config.d.ts +2 -0
  115. package/sidepanel/sidepanel-container.component.d.ts +1 -0
  116. package/timezone/timezone-select.component.d.ts +3 -1
  117. package/toast/toast-container.component.d.ts +1 -1
  118. package/toast/toast.component.d.ts +2 -2
  119. package/toast/toast.module.d.ts +1 -7
  120. package/toast/toast.service.d.ts +1 -1
  121. package/tooltip/tooltip.component.d.ts +2 -1
  122. package/tree-select/_tree-select-theme.scss +4 -0
  123. package/tree-select/tree-select.component.d.ts +1 -12
  124. package/accordion/README.md +0 -0
  125. package/alert/README.md +0 -0
  126. package/autocomplete/README.md +0 -0
  127. package/badge/README.md +0 -0
  128. package/button/README.md +0 -0
  129. package/button-toggle/README.md +0 -0
  130. package/checkbox/README.md +0 -1
  131. package/code-block/README.md +0 -36
  132. package/code-block/actionbar.component.d.ts +0 -32
  133. package/code-block/actionbar.component.scss +0 -43
  134. package/code-block/code-block-content.d.ts +0 -28
  135. package/code-block/code-block.component.d.ts +0 -98
  136. package/code-block/code-block.types.d.ts +0 -36
  137. package/datepicker/README.md +0 -0
  138. package/divider/README.md +0 -0
  139. package/dl/README.md +0 -0
  140. package/empty-state/README.md +0 -0
  141. package/esm2022/code-block/actionbar.component.mjs +0 -90
  142. package/esm2022/code-block/code-block-content.mjs +0 -393
  143. package/esm2022/code-block/code-block.component.mjs +0 -283
  144. package/esm2022/code-block/code-block.types.mjs +0 -5
  145. package/file-upload/README.md +0 -0
  146. package/form-field/README.md +0 -0
  147. package/icon/README.md +0 -0
  148. package/link/README.md +0 -0
  149. package/list/README.md +0 -0
  150. package/loader-overlay/README.md +0 -0
  151. package/modal/README.md +0 -35
  152. package/navbar/README.md +0 -42
  153. package/popover/README.md +0 -36
  154. package/progress-bar/README.md +0 -0
  155. package/progress-spinner/README.md +0 -0
  156. package/risk-level/README.md +0 -0
  157. package/table/README.md +0 -0
  158. package/tags/README.md +0 -0
  159. package/textarea/README.md +0 -0
  160. package/timepicker/README.md +0 -0
  161. package/timezone/README.md +0 -0
  162. package/tree-select/README.md +0 -0
@@ -1,17 +1,11 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, Renderer2 } from '@angular/core';
2
- import { ControlValueAccessor, NgControl } from '@angular/forms';
3
- import { CanDisable, KbqLocaleService } from '@koobiq/components/core';
1
+ import { AfterViewInit, DoCheck, ElementRef, EventEmitter } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { CanDisable, ErrorStateMatcher } from '@koobiq/components/core';
4
4
  import { ProgressSpinnerMode } from '@koobiq/components/progress-spinner';
5
- import { Subscription } from 'rxjs';
6
- import { KbqFile, KbqFileItem, KbqFileValidatorFn, KbqInputFile, KbqInputFileLabel } from './file-upload';
5
+ import { KbqFile, KbqFileItem, KbqFileUploadBase, KbqFileValidatorFn, KbqInputFile, KbqInputFileLabel } from './file-upload';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare const KBQ_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION: KbqInputFileLabel;
9
- export declare class KbqSingleFileUploadComponent implements AfterViewInit, OnDestroy, KbqInputFile, CanDisable, ControlValueAccessor {
10
- private cdr;
11
- private renderer;
12
- readonly configuration: KbqInputFileLabel;
13
- private localeService?;
14
- ngControl?: NgControl | undefined;
8
+ export declare class KbqSingleFileUploadComponent extends KbqFileUploadBase implements AfterViewInit, KbqInputFile, CanDisable, ControlValueAccessor, DoCheck {
15
9
  /**
16
10
  * A value responsible for progress spinner type.
17
11
  * Loading logic depends on selected mode */
@@ -27,6 +21,8 @@ export declare class KbqSingleFileUploadComponent implements AfterViewInit, OnDe
27
21
  * @deprecated use FormControl for validation
28
22
  */
29
23
  customValidation?: KbqFileValidatorFn[];
24
+ /** An object used to control the error state of the component. */
25
+ errorStateMatcher: ErrorStateMatcher;
30
26
  private _file;
31
27
  get file(): KbqFileItem | null;
32
28
  set file(currentFile: KbqFileItem | null);
@@ -35,7 +31,6 @@ export declare class KbqSingleFileUploadComponent implements AfterViewInit, OnDe
35
31
  private readonly hint;
36
32
  config: KbqInputFileLabel;
37
33
  separatedCaptionText: string[];
38
- statusChangeSubscription?: Subscription;
39
34
  /** cvaOnChange function registered via registerOnChange (ControlValueAccessor).
40
35
  * @docs-private
41
36
  */
@@ -46,9 +41,15 @@ export declare class KbqSingleFileUploadComponent implements AfterViewInit, OnDe
46
41
  onTouched: () => void;
47
42
  get acceptedFiles(): string;
48
43
  get hasHint(): boolean;
49
- constructor(cdr: ChangeDetectorRef, renderer: Renderer2, configuration: KbqInputFileLabel, localeService?: KbqLocaleService | undefined, ngControl?: NgControl | undefined);
44
+ /**
45
+ * Indicates an invalid state based on file errors or `errorState`,
46
+ * applying a CSS class in HTML for visual feedback.
47
+ */
48
+ get invalid(): boolean;
49
+ readonly configuration: KbqInputFileLabel | null;
50
+ constructor();
50
51
  ngAfterViewInit(): void;
51
- ngOnDestroy(): void;
52
+ ngDoCheck(): void;
52
53
  /** Implemented as part of ControlValueAccessor.
53
54
  * @docs-private */
54
55
  writeValue(file: File | KbqFileItem | null): void;
@@ -72,6 +73,6 @@ export declare class KbqSingleFileUploadComponent implements AfterViewInit, OnDe
72
73
  private validateFile;
73
74
  private initDefaultParams;
74
75
  private getCaptionText;
75
- static ɵfac: i0.ɵɵFactoryDeclaration<KbqSingleFileUploadComponent, [null, null, { optional: true; }, { optional: true; }, { optional: true; self: true; }]>;
76
- static ɵcmp: i0.ɵɵComponentDeclaration<KbqSingleFileUploadComponent, "kbq-single-file-upload,kbq-file-upload:not([multiple])", never, { "progressMode": { "alias": "progressMode"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "customValidation": { "alias": "customValidation"; "required": false; }; "file": { "alias": "file"; "required": false; }; }, { "fileQueueChange": "fileQueueChange"; }, ["hint"], ["[kbq-icon]", "kbq-hint"], false, never>;
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqSingleFileUploadComponent, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<KbqSingleFileUploadComponent, "kbq-single-file-upload,kbq-file-upload:not([multiple])", never, { "progressMode": { "alias": "progressMode"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "customValidation": { "alias": "customValidation"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "file": { "alias": "file"; "required": false; }; }, { "fileQueueChange": "fileQueueChange"; }, ["hint"], ["[kbq-icon]", "kbq-hint"], false, never>;
77
78
  }
@@ -49,7 +49,7 @@
49
49
 
50
50
  @mixin kbq-hint-typography() {
51
51
  .kbq-hint .kbq-hint__text {
52
- @include kbq-typography-level-to-styles-css-variables(typography, text-normal-medium);
52
+ @include kbq-typography-level-to-styles-css-variables(typography, text-normal);
53
53
  }
54
54
 
55
55
  .kbq-hint.kbq-hint_compact .kbq-hint__text {
@@ -62,7 +62,7 @@ export declare class KbqFormField extends KbqFormFieldMixinBase implements After
62
62
  /** Determines whether a class from the NgControl should be forwarded to the host element. */
63
63
  shouldForward(prop: keyof NgControl): boolean;
64
64
  ngOnDestroy(): void;
65
- runFocusMonitor(): void;
65
+ runFocusMonitor: () => void;
66
66
  stopFocusMonitor(): void;
67
67
  /** Throws an error if the form field's control is missing. */
68
68
  protected validateControlChild(): void;
@@ -64,7 +64,6 @@
64
64
 
65
65
  .kbq-form-field__container {
66
66
  position: relative;
67
-
68
67
  border-width: var(--kbq-form-field-size-border-width);
69
68
  border-style: solid;
70
69
  border-color: transparent;
@@ -19,6 +19,7 @@ export declare class KbqLoaderOverlay implements OnInit, OnDestroy {
19
19
  caption: string;
20
20
  compact: boolean;
21
21
  transparent: boolean;
22
+ private parent;
22
23
  get isExternalIndicator(): boolean;
23
24
  get isExternalText(): boolean;
24
25
  get isExternalCaption(): boolean;
@@ -7,6 +7,10 @@ import { KbqModalControlService } from './modal-control.service';
7
7
  import { KbqModalRef } from './modal-ref.class';
8
8
  import { IModalButtonOptions, ModalOptions, ModalSize, ModalType, OnClickCallback } from './modal.type';
9
9
  import * as i0 from "@angular/core";
10
+ /**
11
+ * Duration when perform animations (ms)
12
+ * @docs-private
13
+ */
10
14
  export declare const MODAL_ANIMATE_DURATION = 200;
11
15
  export declare class KbqModalComponent<T = any, R = any> extends KbqModalRef<T, R> implements OnInit, OnChanges, AfterViewInit, OnDestroy, ModalOptions {
12
16
  private overlay;
@@ -8,6 +8,10 @@ import { ConfirmType, IModalOptionsForService } from './modal.type';
8
8
  import * as i0 from "@angular/core";
9
9
  /** Injection token that can be used to access the data that was passed in to a modal. */
10
10
  export declare const KBQ_MODAL_DATA: InjectionToken<unknown>;
11
+ /**
12
+ * A builder used for managing service creating modals
13
+ * @docs-private
14
+ */
11
15
  export declare class ModalBuilderForService {
12
16
  private readonly overlay;
13
17
  readonly options: IModalOptionsForService;
@@ -1,5 +1,5 @@
1
1
  import { OverlayRef } from '@angular/cdk/overlay';
2
- import { EventEmitter, TemplateRef, Type } from '@angular/core';
2
+ import { EventEmitter, Injector, TemplateRef, Type } from '@angular/core';
3
3
  export type OnClickCallback<T> = (instance: T) => (false | void | {}) | Promise<false | void | {}>;
4
4
  export type ModalType = 'default' | 'confirm' | 'custom';
5
5
  export type ConfirmType = 'confirm' | 'success' | 'warn';
@@ -45,6 +45,11 @@ export interface ModalOptions<C = any, R = any> {
45
45
  export interface IModalOptionsForService<T = any> extends ModalOptions<T> {
46
46
  kbqOnOk?: OnClickCallback<T>;
47
47
  kbqOnCancel?: OnClickCallback<T>;
48
+ /**
49
+ * The injector used to create the component that will be attached.
50
+ * If specified, it overrides the injector provided by `KbqModalService`.
51
+ */
52
+ injector?: Injector;
48
53
  }
49
54
  export interface IModalButtonOptions<T = any> {
50
55
  label: string;
@@ -1,6 +1,6 @@
1
- export { KbqModalRef } from './modal-ref.class';
2
- export { KbqModalComponent } from './modal.component';
1
+ export * from './modal-ref.class';
2
+ export * from './modal.component';
3
3
  export * from './modal.directive';
4
- export { KbqModalModule } from './modal.module';
5
- export { KbqModalService } from './modal.service';
4
+ export * from './modal.module';
5
+ export * from './modal.service';
6
6
  export * from './modal.type';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koobiq/components",
3
- "version": "18.10.0",
3
+ "version": "18.12.0",
4
4
  "description": "koobiq",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,9 +24,9 @@
24
24
  "@angular/cdk": "^18.0.0",
25
25
  "@angular/core": "^18.0.0",
26
26
  "@angular/forms": "^18.0.0",
27
- "@koobiq/cdk": "18.10.0",
28
- "@koobiq/angular-moment-adapter": "18.10.0",
29
- "@koobiq/angular-luxon-adapter": "18.10.0",
27
+ "@koobiq/cdk": "18.12.0",
28
+ "@koobiq/angular-moment-adapter": "18.12.0",
29
+ "@koobiq/angular-luxon-adapter": "18.12.0",
30
30
  "@koobiq/date-formatter": "^3.1.4",
31
31
  "@koobiq/icons": "^9.2.0",
32
32
  "@koobiq/tokens-builder": "3.8.1",