clr-lift 0.4.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 (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +71 -0
  3. package/esm2022/clr-lift.mjs +5 -0
  4. package/esm2022/lib/components/alert/alert.component.mjs +31 -0
  5. package/esm2022/lib/components/alerts/alert-container.component.mjs +28 -0
  6. package/esm2022/lib/components/alerts/alert.l10n.mjs +36 -0
  7. package/esm2022/lib/components/alerts/alert.service.mjs +77 -0
  8. package/esm2022/lib/components/alerts/alert.type.mjs +2 -0
  9. package/esm2022/lib/components/alerts/index.mjs +3 -0
  10. package/esm2022/lib/components/callout/callout.component.mjs +11 -0
  11. package/esm2022/lib/components/index.mjs +11 -0
  12. package/esm2022/lib/components/key-value-inputs/index.mjs +3 -0
  13. package/esm2022/lib/components/key-value-inputs/key-value-form-group.type.mjs +2 -0
  14. package/esm2022/lib/components/key-value-inputs/key-value-inputs.component.mjs +110 -0
  15. package/esm2022/lib/components/key-value-inputs/key-value.l10n.mjs +99 -0
  16. package/esm2022/lib/components/page-container/page-container.component.mjs +22 -0
  17. package/esm2022/lib/components/spinner/spinner.component.mjs +26 -0
  18. package/esm2022/lib/components/theme-toggle/theme-toggle.component.mjs +58 -0
  19. package/esm2022/lib/components/theme-toggle/theme-toggle.l10n.mjs +69 -0
  20. package/esm2022/lib/components/timeline-wizard/index.mjs +5 -0
  21. package/esm2022/lib/components/timeline-wizard/timeline-base.component.mjs +105 -0
  22. package/esm2022/lib/components/timeline-wizard/timeline-step.type.mjs +2 -0
  23. package/esm2022/lib/components/timeline-wizard/timeline-wizard.component.mjs +306 -0
  24. package/esm2022/lib/components/timeline-wizard/timeline-wizard.l10n.mjs +75 -0
  25. package/esm2022/lib/components/timeline-wizard/timeline-wizard.service.mjs +60 -0
  26. package/esm2022/lib/components/toast/index.mjs +5 -0
  27. package/esm2022/lib/components/toast/toast-container.component.mjs +53 -0
  28. package/esm2022/lib/components/toast/toast.component.mjs +377 -0
  29. package/esm2022/lib/components/toast/toast.l10n.mjs +94 -0
  30. package/esm2022/lib/components/toast/toast.service.mjs +63 -0
  31. package/esm2022/lib/components/toast/toast.type.mjs +2 -0
  32. package/esm2022/lib/components/tooltip/index.mjs +4 -0
  33. package/esm2022/lib/components/tooltip/positioning-tooltip.directive.mjs +48 -0
  34. package/esm2022/lib/components/tooltip/tooltip.component.mjs +103 -0
  35. package/esm2022/lib/components/tooltip/tooltip.directive.mjs +201 -0
  36. package/esm2022/lib/components/tooltip/tooltip.model.mjs +2 -0
  37. package/esm2022/lib/components/tooltip/tooltip.module.mjs +17 -0
  38. package/esm2022/lib/components/tooltip/tooltip.util.mjs +93 -0
  39. package/esm2022/lib/models/index.mjs +3 -0
  40. package/esm2022/lib/models/page-query.type.mjs +2 -0
  41. package/esm2022/lib/models/rde.type.mjs +2 -0
  42. package/esm2022/lib/operators/dg-state.operator.mjs +18 -0
  43. package/esm2022/lib/operators/index.mjs +2 -0
  44. package/esm2022/lib/pipes/translate.pipe.mjs +22 -0
  45. package/esm2022/lib/services/translation.service.mjs +49 -0
  46. package/esm2022/lib/shared/animation.const.mjs +52 -0
  47. package/esm2022/lib/utils/clr-datagrid.util.mjs +99 -0
  48. package/esm2022/lib/utils/index.mjs +2 -0
  49. package/esm2022/public-api.mjs +8 -0
  50. package/fesm2022/clr-lift.mjs +2307 -0
  51. package/fesm2022/clr-lift.mjs.map +1 -0
  52. package/index.d.ts +5 -0
  53. package/lib/components/alert/alert.component.d.ts +12 -0
  54. package/lib/components/alerts/alert-container.component.d.ts +19 -0
  55. package/lib/components/alerts/alert.l10n.d.ts +1 -0
  56. package/lib/components/alerts/alert.service.d.ts +32 -0
  57. package/lib/components/alerts/alert.type.d.ts +37 -0
  58. package/lib/components/alerts/index.d.ts +3 -0
  59. package/lib/components/callout/callout.component.d.ts +5 -0
  60. package/lib/components/index.d.ts +10 -0
  61. package/lib/components/key-value-inputs/index.d.ts +2 -0
  62. package/lib/components/key-value-inputs/key-value-form-group.type.d.ts +5 -0
  63. package/lib/components/key-value-inputs/key-value-inputs.component.d.ts +33 -0
  64. package/lib/components/key-value-inputs/key-value.l10n.d.ts +1 -0
  65. package/lib/components/page-container/page-container.component.d.ts +7 -0
  66. package/lib/components/spinner/spinner.component.d.ts +8 -0
  67. package/lib/components/theme-toggle/theme-toggle.component.d.ts +20 -0
  68. package/lib/components/theme-toggle/theme-toggle.l10n.d.ts +1 -0
  69. package/lib/components/timeline-wizard/index.d.ts +4 -0
  70. package/lib/components/timeline-wizard/timeline-base.component.d.ts +80 -0
  71. package/lib/components/timeline-wizard/timeline-step.type.d.ts +36 -0
  72. package/lib/components/timeline-wizard/timeline-wizard.component.d.ts +71 -0
  73. package/lib/components/timeline-wizard/timeline-wizard.l10n.d.ts +1 -0
  74. package/lib/components/timeline-wizard/timeline-wizard.service.d.ts +37 -0
  75. package/lib/components/toast/index.d.ts +4 -0
  76. package/lib/components/toast/toast-container.component.d.ts +29 -0
  77. package/lib/components/toast/toast.component.d.ts +38 -0
  78. package/lib/components/toast/toast.l10n.d.ts +1 -0
  79. package/lib/components/toast/toast.service.d.ts +29 -0
  80. package/lib/components/toast/toast.type.d.ts +16 -0
  81. package/lib/components/tooltip/index.d.ts +3 -0
  82. package/lib/components/tooltip/positioning-tooltip.directive.d.ts +9 -0
  83. package/lib/components/tooltip/tooltip.component.d.ts +25 -0
  84. package/lib/components/tooltip/tooltip.directive.d.ts +64 -0
  85. package/lib/components/tooltip/tooltip.model.d.ts +1 -0
  86. package/lib/components/tooltip/tooltip.module.d.ts +8 -0
  87. package/lib/components/tooltip/tooltip.util.d.ts +39 -0
  88. package/lib/models/index.d.ts +2 -0
  89. package/lib/models/page-query.type.d.ts +26 -0
  90. package/lib/models/rde.type.d.ts +75 -0
  91. package/lib/operators/dg-state.operator.d.ts +9 -0
  92. package/lib/operators/index.d.ts +1 -0
  93. package/lib/pipes/translate.pipe.d.ts +8 -0
  94. package/lib/services/translation.service.d.ts +10 -0
  95. package/lib/shared/animation.const.d.ts +34 -0
  96. package/lib/utils/clr-datagrid.util.d.ts +32 -0
  97. package/lib/utils/index.d.ts +1 -0
  98. package/package.json +29 -0
  99. package/public-api.d.ts +4 -0
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Represents a list of items returned by Cloud Director RDE API
3
+ * @template T - The type of the entity in the list.
4
+ * @template V - Additional values associated with the items, defaulting to `undefined`.
5
+ */
6
+ export interface RDEList<T = unknown, V = undefined> {
7
+ /**
8
+ * Total number of results across all pages.
9
+ */
10
+ resultTotal: number;
11
+ /**
12
+ * Total number of pages in the result set.
13
+ */
14
+ pageCount: number;
15
+ /**
16
+ * Current page number.
17
+ */
18
+ page: number;
19
+ /**
20
+ * Number of items per page.
21
+ */
22
+ pageSize: number;
23
+ /**
24
+ * Associations related to the items (type is left as 'unknown' for further specification).
25
+ */
26
+ associations: unknown;
27
+ /**
28
+ * Values associated with the items. If `V` is `undefined`, defaults to an array of `RDEValue<T>`.
29
+ */
30
+ values: V extends undefined ? RDEValue<T>[] : V[];
31
+ }
32
+ /**
33
+ * Represents a value associated with an item in the RDEList.
34
+ * @template T - The type of the entity.
35
+ */
36
+ export interface RDEValue<T> {
37
+ /**
38
+ * Unique identifier for the value.
39
+ */
40
+ id: string;
41
+ /**
42
+ * Type of the entity.
43
+ */
44
+ entityType: string;
45
+ /**
46
+ * Name of the entity.
47
+ */
48
+ name: string;
49
+ /**
50
+ * External identifier for the entity, or `null` if not applicable.
51
+ */
52
+ externalId: string | null;
53
+ /**
54
+ * The actual entity.
55
+ */
56
+ entity: T;
57
+ /**
58
+ * State of the entity: 'RESOLVED', 'RESOLUTION_ERROR', or 'PRE_CREATED'.
59
+ */
60
+ state: 'RESOLVED' | 'RESOLUTION_ERROR' | 'PRE_CREATED';
61
+ /**
62
+ * Owner information.
63
+ */
64
+ owner: {
65
+ name: string;
66
+ id: string;
67
+ };
68
+ /**
69
+ * Organization information.
70
+ */
71
+ org: {
72
+ name: string;
73
+ id: string;
74
+ };
75
+ }
@@ -0,0 +1,9 @@
1
+ import { ClrDatagridStateInterface } from '@clr/angular';
2
+ import { Observable, UnaryFunction } from 'rxjs';
3
+ /**
4
+ * operator for handling Clarity Datagrid state transformations.
5
+ * It is designed for managing Clarity Datagrid filters and supports optional distinctUntilChanged behavior.
6
+ * @param enableDistinctUntilChanged Whether to enable distinctUntilChanged. Defaults to true.
7
+ * @returns A RxJS pipe that takes an observable of ClrDatagridStateInterface or null and returns an observable of ClrDatagridStateInterface.
8
+ */
9
+ export declare function dgState(enableDistinctUntilChanged?: boolean): UnaryFunction<Observable<ClrDatagridStateInterface | null>, Observable<ClrDatagridStateInterface | null>>;
@@ -0,0 +1 @@
1
+ export * from './dg-state.operator';
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TranslatePipe implements PipeTransform {
4
+ private translationService;
5
+ transform(key: string, ...args: any[]): string;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
8
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TranslationService {
3
+ private translations;
4
+ private language;
5
+ loadTranslationsForComponent(componentKey: string, translationsToAdd: Record<string, Record<string, string>>): void;
6
+ translate(key: string, ...args: string[]): string;
7
+ private format;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<TranslationService>;
10
+ }
@@ -0,0 +1,34 @@
1
+ export declare const atomicPrimaryEnterCurve = "cubic-bezier(0, 1.5, 0.5, 1)";
2
+ export declare const atomicPrimaryEnterTiming = 200;
3
+ export declare const atomicPrimaryLeaveCurve = "cubic-bezier(0,.99,0,.99)";
4
+ export declare const atomicPrimaryLeaveTiming = 200;
5
+ export declare const atomicSecondaryEnterCurve = "cubic-bezier(0, 1.5, 0.5, 1)";
6
+ export declare const atomicSecondaryEnterTiming = 400;
7
+ export declare const atomicSecondaryLeaveCurve = "cubic-bezier(0, 1.5, 0.5, 1)";
8
+ export declare const atomicSecondaryLeaveTiming = 100;
9
+ export declare const componentPrimaryEnterCurve = "cubic-bezier(0,.99,0,.99)";
10
+ export declare const componentPrimaryEnterTiming = 400;
11
+ export declare const componentPrimaryLeaveCurve = "cubic-bezier(0,.99,0,.99)";
12
+ export declare const componentPrimaryLeaveTiming = 300;
13
+ export declare const pagePrimaryEnterCurve = "cubic-bezier(0,.99,0,.99)";
14
+ export declare const pagePrimaryEnterTiming = 250;
15
+ export declare const pagePrimaryLeaveCurve = "cubic-bezier(0,.99,0,.99)";
16
+ export declare const pagePrimaryLeaveTiming = 200;
17
+ export declare const progressPrimaryCurve = "cubic-bezier(.17,.4,.8,.79)";
18
+ export declare const progressPrimaryTiming = 790;
19
+ export declare const progressSecondaryCurve = "cubic-bezier(.34,.01,.39,1)";
20
+ export declare const progressSecondaryTiming = 200;
21
+ export declare const linePrimaryEnterCurve = "linear";
22
+ export declare const linePrimaryEnterTiming = 250;
23
+ export declare const linePrimaryEnterDelay = 200;
24
+ export declare const lineSecondaryEnterCurve = "linear";
25
+ export declare const lineSecondaryEnterTiming = 400;
26
+ export declare const lineSecondaryEnterDelay = 200;
27
+ export declare const CLOSE_ICON_DURATION = 300;
28
+ export declare const CLOSE_ICON_DELAY = 350;
29
+ export declare const CLOSE_ICON_CURVE = "cubic-bezier(0, 1.2, 0.7, 1)";
30
+ export declare const GRADIENT_DURATION = 500;
31
+ export declare const GRADIENT_DELAY = 100;
32
+ export declare const GRADIENT_LEAVE_CURVE = "cubic-bezier(0, 1.2, 0.7, 1)";
33
+ export declare const STAGGER_DURATION = 200;
34
+ export declare function multiply(value: number): number;
@@ -0,0 +1,32 @@
1
+ import { ClrDatagridStateInterface } from '@clr/angular';
2
+ import { PageQuery } from '../models/page-query.type';
3
+ /**
4
+ * Converts Clarity Datagrid state into an object suitable for HttpParams.
5
+ * Clarity Datagrid State Example:
6
+ {
7
+ "page": {
8
+ "from": 0,
9
+ "to": 9,
10
+ "size": 10,
11
+ "current": 1
12
+ },
13
+ "sort": {
14
+ "by": "description",
15
+ "reverse": false
16
+ },
17
+ "filters": [
18
+ {
19
+ "property": "name",
20
+ "value": "mike"
21
+ },
22
+ {
23
+ "property": "job",
24
+ "value": "programming"
25
+ }
26
+ ]
27
+ }
28
+ * Convert to HttpParams: {page: 1, pageSize: 10, filter: 'name==*mike*;job==*programming*', sortAsc: 'description'}
29
+ * @param state - The Clarity Datagrid state.
30
+ * @returns {PageQuery} - The converted HttpParams object.
31
+ */
32
+ export declare function convertToHttpParams(state: ClrDatagridStateInterface | null): Partial<PageQuery>;
@@ -0,0 +1 @@
1
+ export * from './clr-datagrid.util';
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "clr-lift",
3
+ "version": "0.4.0",
4
+ "description": "The library is designed to augment the capabilities of the Clarity library by providing a set of reusable components built on top of clarity components.",
5
+ "author": "Guanghui Wang <guanghui-wang@foxmail.com>",
6
+ "peerDependencies": {
7
+ "@angular/common": ">=15.0.0",
8
+ "@angular/core": ">=15.0.0",
9
+ "@clr/angular": ">=15.0.0",
10
+ "ngx-lift": ">=0.1.0"
11
+ },
12
+ "dependencies": {
13
+ "tslib": "^2.3.0"
14
+ },
15
+ "sideEffects": false,
16
+ "module": "fesm2022/clr-lift.mjs",
17
+ "typings": "index.d.ts",
18
+ "exports": {
19
+ "./package.json": {
20
+ "default": "./package.json"
21
+ },
22
+ ".": {
23
+ "types": "./index.d.ts",
24
+ "esm2022": "./esm2022/clr-lift.mjs",
25
+ "esm": "./esm2022/clr-lift.mjs",
26
+ "default": "./fesm2022/clr-lift.mjs"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,4 @@
1
+ export * from './lib/components';
2
+ export * from './lib/models';
3
+ export * from './lib/operators';
4
+ export * from './lib/utils';