@onecx/angular-accelerator 7.0.0-rc.1 → 7.0.0-rc.11

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/index.d.ts CHANGED
@@ -40,6 +40,7 @@ export * from './lib/model/breadcrumb-menu-item.model';
40
40
  export * from './lib/model/column-type.model';
41
41
  export * from './lib/model/data-action';
42
42
  export * from './lib/model/button-dialog';
43
+ export * from './lib/model/translation.model';
43
44
  export * from './lib/model/data-sort-direction';
44
45
  export * from './lib/model/data-table-column.model';
45
46
  export * from './lib/model/diagram-column';
@@ -86,7 +86,9 @@ export declare class DataTableComponent extends DataSortBase implements OnInit,
86
86
  selectionEnabledField: string | undefined;
87
87
  allowSelectAll: boolean;
88
88
  paginator: boolean;
89
- page: number;
89
+ _page$: BehaviorSubject<number>;
90
+ get page(): number;
91
+ set page(value: number);
90
92
  tableStyle: {
91
93
  [klass: string]: any;
92
94
  } | undefined;
@@ -198,6 +200,7 @@ export declare class DataTableComponent extends DataSortBase implements OnInit,
198
200
  isRowSelectionDisabled(rowObject: Row): boolean;
199
201
  rowSelectable(event: any): boolean;
200
202
  onSelectionChange(selection: Row[]): void;
203
+ emitSelectionChanged(): void;
201
204
  mergeWithDisabledKeys(newSelectionIds: (string | number)[], disabledRowIds: (string | number)[]): (string | number)[];
202
205
  isSelected(row: Row): boolean;
203
206
  onPageChange(event: any): void;
@@ -3,6 +3,7 @@ import { MenuItem } from 'primeng/api';
3
3
  import { BehaviorSubject, Observable } from 'rxjs';
4
4
  import { BreadcrumbService } from '../../services/breadcrumb.service';
5
5
  import { PrimeIcon } from '../../utils/primeicon.utils';
6
+ import { TranslationKey } from '../../model/translation.model';
6
7
  import * as i0 from "@angular/core";
7
8
  /**
8
9
  * Action definition.
@@ -33,8 +34,6 @@ export interface Action {
33
34
  export interface ObjectDetailItem {
34
35
  label: string;
35
36
  value?: string;
36
- labelTooltip?: string;
37
- valueTooltip?: string;
38
37
  icon?: PrimeIcon;
39
38
  iconStyleClass?: string;
40
39
  labelPipe?: Type<any>;
@@ -43,9 +42,11 @@ export interface ObjectDetailItem {
43
42
  valueCssClass?: string;
44
43
  actionItemIcon?: PrimeIcon;
45
44
  actionItemCallback?: () => void;
46
- actionItemTooltip?: string;
47
- actionItemAriaLabelKey?: string;
48
45
  actionItemAriaLabel?: string;
46
+ actionItemAriaLabelKey?: TranslationKey;
47
+ actionItemTooltipKey?: TranslationKey;
48
+ labelTooltipKey?: TranslationKey;
49
+ valueTooltipKey?: TranslationKey;
49
50
  }
50
51
  export interface HomeItem {
51
52
  menuItem: MenuItem;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Object containing key for translation with parameters object for translation
3
+ *
4
+ * @example
5
+ * ## Assume such translation is in the translation file
6
+ * ```typescript
7
+ * const translations = {
8
+ * MY_KEY = 'text with parameter value = {{value}}',
9
+ * }
10
+ * ```
11
+ *
12
+ * ## TranslationKeyWithParameters declaration
13
+ * ```
14
+ * // will be translated into
15
+ * // text with parameter value = hello
16
+ * const myKey: TranslationKeyWithParameters = {
17
+ * key: 'MY_KEY',
18
+ * parameters: {
19
+ * value: 'hello',
20
+ * },
21
+ * }
22
+ * ```
23
+ */
24
+ export type TranslationKeyWithParameters = {
25
+ key: string;
26
+ parameters?: Record<string, unknown>;
27
+ };
28
+ /**
29
+ * String with key to translation or {@link TranslationKeyWithParameters} object. If provided string cannot be translated it will be displayed as is.
30
+ */
31
+ export type TranslationKey = string | TranslationKeyWithParameters;
@@ -3,38 +3,8 @@ import { DialogService } from 'primeng/dynamicdialog';
3
3
  import { Observable } from 'rxjs';
4
4
  import { ButtonDialogButtonDetails, ButtonDialogCustomButtonDetails } from '../model/button-dialog';
5
5
  import { PrimeIcon } from '../utils/primeicon.utils';
6
+ import { TranslationKey } from '../model/translation.model';
6
7
  import * as i0 from "@angular/core";
7
- /**
8
- * Object containing key for translation with parameters object for translation
9
- *
10
- * @example
11
- * ## Assume such translation is in the translation file
12
- * ```typescript
13
- * const translations = {
14
- * MY_KEY = 'text with parameter value = {{value}}',
15
- * }
16
- * ```
17
- *
18
- * ## TranslationKeyWithParameters declaration
19
- * ```
20
- * // will be translated into
21
- * // text with parameter value = hello
22
- * const myKey: TranslationKeyWithParameters = {
23
- * key: 'MY_KEY',
24
- * parameters: {
25
- * value: 'hello',
26
- * },
27
- * }
28
- * ```
29
- */
30
- type TranslationKeyWithParameters = {
31
- key: string;
32
- parameters: Record<string, unknown>;
33
- };
34
- /**
35
- * String with key to translation or {@link TranslationKeyWithParameters} object. If provided string cannot be translated it will be displayed as is.
36
- */
37
- type TranslationKey = string | TranslationKeyWithParameters;
38
8
  /**
39
9
  * Object containing message of type {@link TranslationKey} and icon to be displayed along the message.
40
10
  *
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@onecx/angular-accelerator",
3
- "version": "7.0.0-rc.1",
3
+ "version": "7.0.0-rc.11",
4
4
  "license": "Apache-2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/onecx/onecx-portal-ui-libs"
8
+ },
5
9
  "peerDependencies": {
6
10
  "@angular/common": "^19.0.0",
7
11
  "@angular/core": "^19.0.0",
@@ -12,19 +16,19 @@
12
16
  "@ngx-translate/core": "^16.0.0",
13
17
  "@ngx-translate/http-loader": "^8.0.0",
14
18
  "@ngneat/until-destroy": "^10.0.0",
15
- "@onecx/integration-interface": "^7.0.0-rc.1",
16
- "@onecx/accelerator": "^7.0.0-rc.1",
17
- "@onecx/angular-integration-interface": "^7.0.0-rc.1",
18
- "@onecx/angular-remote-components": "^7.0.0-rc.1",
19
- "@onecx/angular-testing": "^7.0.0-rc.1",
20
- "@onecx/angular-utils": "^7.0.0-rc.1",
19
+ "@onecx/integration-interface": "^7.0.0-rc.11",
20
+ "@onecx/accelerator": "^7.0.0-rc.11",
21
+ "@onecx/angular-integration-interface": "^7.0.0-rc.11",
22
+ "@onecx/angular-remote-components": "^7.0.0-rc.11",
23
+ "@onecx/angular-testing": "^7.0.0-rc.11",
24
+ "@onecx/angular-utils": "^7.0.0-rc.11",
21
25
  "chart.js": "^4.4.3",
22
26
  "d3-scale-chromatic": "^3.1.0",
23
27
  "rxjs": "~7.8.1",
24
28
  "primeng": "^19.0.0",
25
29
  "@storybook/angular": "^8.3.2",
26
30
  "@nx/devkit": "^20.3.0",
27
- "@onecx/nx-migration-utils": "^7.0.0-rc.1"
31
+ "@onecx/nx-migration-utils": "^7.0.0-rc.11"
28
32
  },
29
33
  "dependencies": {
30
34
  "tslib": "^2.3.0"
@@ -1,4 +1,4 @@
1
- import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
1
+ import { BaseHarnessFilters, ComponentHarness, ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
2
  import { ListItemHarness, MenuItemHarness, PBreadcrumbHarness, PButtonHarness, PMenuHarness } from '@onecx/angular-testing';
3
3
  export declare class PageHeaderHarness extends ComponentHarness {
4
4
  static hostSelector: string;
@@ -22,7 +22,7 @@ export declare class PageHeaderHarness extends ComponentHarness {
22
22
  interface ObjectDetailItemHarnessFilters extends BaseHarnessFilters {
23
23
  label?: string;
24
24
  }
25
- declare class ObjectDetailItemHarness extends ComponentHarness {
25
+ declare class ObjectDetailItemHarness extends ContentContainerComponentHarness {
26
26
  static hostSelector: string;
27
27
  getLabelElement: () => Promise<import("@onecx/angular-testing").TestElement>;
28
28
  getValueElement: () => Promise<import("@onecx/angular-testing").TestElement | null>;
@@ -32,5 +32,9 @@ declare class ObjectDetailItemHarness extends ComponentHarness {
32
32
  getValue(): Promise<string | undefined>;
33
33
  getValueStyles(): Promise<string | null | undefined>;
34
34
  getIcon(): Promise<string | null | undefined>;
35
+ getLabelTooltipContent(): Promise<string | null>;
36
+ getValueTooltipContent(): Promise<string | null>;
37
+ getActionItemTooltipContent(): Promise<string | null>;
38
+ private getTooltipFromElement;
35
39
  }
36
40
  export {};