quang 19.0.19-3 → 19.0.21
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/README.md +92 -12
- package/auth/README.md +2 -2
- package/components/autocomplete/README.md +55 -0
- package/components/checkbox/README.md +63 -0
- package/components/date/README.md +54 -0
- package/components/input/README.md +58 -0
- package/components/paginator/README.md +43 -0
- package/components/select/README.md +54 -0
- package/components/shared/option-list/option-list.component.d.ts +1 -1
- package/components/table/README.md +63 -0
- package/components/wysiwyg/README.md +55 -0
- package/fesm2022/quang-auth.mjs +18 -18
- package/fesm2022/quang-components-autocomplete.mjs +3 -3
- package/fesm2022/quang-components-checkbox.mjs +3 -3
- package/fesm2022/quang-components-date.mjs +3 -3
- package/fesm2022/quang-components-input.mjs +3 -3
- package/fesm2022/quang-components-paginator.mjs +13 -13
- package/fesm2022/quang-components-select.mjs +3 -3
- package/fesm2022/quang-components-shared.mjs +6 -6
- package/fesm2022/quang-components-table.mjs +5 -5
- package/fesm2022/quang-components-table.mjs.map +1 -1
- package/fesm2022/quang-components-wysiwyg.mjs +3 -4
- package/fesm2022/quang-components-wysiwyg.mjs.map +1 -1
- package/fesm2022/quang-device.mjs +3 -3
- package/fesm2022/quang-loader.mjs +6 -6
- package/fesm2022/quang-overlay-modal.mjs +3 -3
- package/fesm2022/quang-overlay-popover.mjs +8 -8
- package/fesm2022/quang-overlay-popover.mjs.map +1 -1
- package/fesm2022/quang-overlay-shared.mjs +11 -11
- package/fesm2022/quang-overlay-shared.mjs.map +1 -1
- package/fesm2022/quang-overlay-toast.mjs +6 -6
- package/fesm2022/quang-overlay-tooltip.mjs +8 -8
- package/fesm2022/quang-overlay-tooltip.mjs.map +1 -1
- package/fesm2022/quang-translation.mjs +6 -6
- package/loader/README.md +74 -7
- package/overlay/modal/README.md +97 -0
- package/overlay/modal/modal.component.d.ts +1 -1
- package/overlay/popover/README.md +40 -0
- package/overlay/popover/popover.component.d.ts +2 -2
- package/overlay/shared/quang-base-overlay.component.d.ts +2 -2
- package/overlay/toast/README.md +64 -0
- package/overlay/tooltip/README.md +36 -0
- package/overlay/tooltip/tooltip.component.d.ts +2 -2
- package/package.json +5 -5
- package/translation/README.md +23 -10
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# QuangToastComponent
|
|
2
|
+
|
|
3
|
+
The `QuangToastComponent` is an overlay component used directly in its parent component and managed via the `QuangToastService`.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Toast notifications for displaying messages
|
|
8
|
+
- Configurable duration, type, and position (via service)
|
|
9
|
+
- Supports multiple toast instances and custom templates
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- `showAtLeastFor`: `number` — Minimum time (in milliseconds) to show the toast for. Default: `500`.
|
|
14
|
+
|
|
15
|
+
> **Note:** All toast configuration (message, type, position, timing, etc.) is provided via the `QuangToastService.openToast()` method, not as component inputs.
|
|
16
|
+
|
|
17
|
+
## Outputs
|
|
18
|
+
|
|
19
|
+
- *(none)* — Toast dismissal is managed internally by the service.
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
### HTML
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<quang-toast />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### TypeScript
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { inject } from '@angular/core'
|
|
33
|
+
import { QuangToastService } from 'quang/overlay/toast'
|
|
34
|
+
|
|
35
|
+
quangToast = inject(QuangToastService)
|
|
36
|
+
|
|
37
|
+
openToast(type: 'success' | 'error') {
|
|
38
|
+
quangToast.openToast({
|
|
39
|
+
type,
|
|
40
|
+
title: type === 'success' ? 'Success' : 'Error',
|
|
41
|
+
position: 'top-right',
|
|
42
|
+
text: 'This is a toast message',
|
|
43
|
+
timing: 5000,
|
|
44
|
+
showCloseButton: true,
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### ToastData Options
|
|
50
|
+
|
|
51
|
+
- `type`: `'success' | 'warning' | 'error'` (required)
|
|
52
|
+
- `title?`: `string`
|
|
53
|
+
- `position`: `'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center'`
|
|
54
|
+
- `timing`: `number` (required)
|
|
55
|
+
- `text?`: `string`
|
|
56
|
+
- `showCloseButton?`: `boolean`
|
|
57
|
+
- `customTemplate?`: `TemplateRef<any>`
|
|
58
|
+
- `customIcon?`: `string`
|
|
59
|
+
- `hideHeader?`: `boolean`
|
|
60
|
+
- ...and more (see service for full list)
|
|
61
|
+
|
|
62
|
+
## Notes
|
|
63
|
+
|
|
64
|
+
This component uses the `QuangToastService` for managing toast instances dynamically. All toast display logic and configuration is handled via the service.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# QuangTooltipComponent
|
|
2
|
+
|
|
3
|
+
The `QuangTooltipComponent` is a base overlay tooltip with its own style, used via the `[quangTooltip]` directive.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Tooltip overlay for displaying additional information
|
|
8
|
+
- Configurable trigger and position (via directive)
|
|
9
|
+
- Supports animations for showing and hiding
|
|
10
|
+
|
|
11
|
+
## Inputs (via Directive)
|
|
12
|
+
|
|
13
|
+
- `quangTooltip`: `string` (required) — The content to display in the tooltip.
|
|
14
|
+
- `showMethod`: `'click' | 'hover'` — Specifies the trigger for the tooltip. Default: `'hover'`.
|
|
15
|
+
- `quangTooltipPosition`: `'top' | 'bottom' | 'left' | 'right'` — Position of the tooltip. Default: `'top'`.
|
|
16
|
+
- `payload`: `unknown` — Optional data to pass to the tooltip.
|
|
17
|
+
|
|
18
|
+
## Outputs
|
|
19
|
+
|
|
20
|
+
- *(none)* — The tooltip closes automatically when the user clicks outside or triggers the close logic.
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<button
|
|
26
|
+
[quangTooltip]="'This is a tooltip'"
|
|
27
|
+
[showMethod]="'hover'"
|
|
28
|
+
[quangTooltipPosition]="'top'"
|
|
29
|
+
>
|
|
30
|
+
Hover me
|
|
31
|
+
</button>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
This component uses Angular animations for smooth transitions and extends the `QuangBaseOverlayComponent` for dynamic positioning. The tooltip is always used via the `[quangTooltip]` directive.
|
|
@@ -2,10 +2,10 @@ import { ConnectionPositionPair } from '@angular/cdk/overlay';
|
|
|
2
2
|
import { QuangBaseOverlayComponent } from 'quang/overlay/shared';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class QuangTooltipComponent implements QuangBaseOverlayComponent {
|
|
5
|
-
|
|
5
|
+
overlayContent: import("@angular/core").InputSignal<string>;
|
|
6
6
|
quangTooltipPosition: import("@angular/core").InputSignal<"top" | "bottom" | "left" | "right">;
|
|
7
7
|
positionPair: import("@angular/core").WritableSignal<ConnectionPositionPair | null>;
|
|
8
8
|
payload: import("@angular/core").InputSignal<unknown>;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<QuangTooltipComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<QuangTooltipComponent, "quang-tooltip", never, { "
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QuangTooltipComponent, "quang-tooltip", never, { "overlayContent": { "alias": "overlayContent"; "required": true; "isSignal": true; }; "quangTooltipPosition": { "alias": "quangTooltipPosition"; "required": false; "isSignal": true; }; "payload": { "alias": "payload"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quang",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "19.0.
|
|
4
|
+
"version": "19.0.21",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"tslib": "^2.3.0"
|
|
7
7
|
},
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"types": "./auth/index.d.ts",
|
|
63
63
|
"default": "./fesm2022/quang-auth.mjs"
|
|
64
64
|
},
|
|
65
|
-
"./device": {
|
|
66
|
-
"types": "./device/index.d.ts",
|
|
67
|
-
"default": "./fesm2022/quang-device.mjs"
|
|
68
|
-
},
|
|
69
65
|
"./forms": {
|
|
70
66
|
"types": "./forms/index.d.ts",
|
|
71
67
|
"default": "./fesm2022/quang-forms.mjs"
|
|
72
68
|
},
|
|
69
|
+
"./device": {
|
|
70
|
+
"types": "./device/index.d.ts",
|
|
71
|
+
"default": "./fesm2022/quang-device.mjs"
|
|
72
|
+
},
|
|
73
73
|
"./loader": {
|
|
74
74
|
"types": "./loader/index.d.ts",
|
|
75
75
|
"default": "./fesm2022/quang-loader.mjs"
|
package/translation/README.md
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
# Quang Translation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Quang Translation is a wrapper around `@jsverse/transloco` that implements common features for internationalization (i18n) in Angular projects.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Overview
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
This package provides:
|
|
8
|
+
- A translation loader service for loading translation files
|
|
9
|
+
- Providers for configuring translation behavior
|
|
10
|
+
- A translation service for runtime translation management
|
|
11
|
+
- Translation tokens for use throughout your project
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
## QuangTranslationLoaderService
|
|
10
14
|
|
|
11
|
-
`
|
|
15
|
+
[`QuangTranslationLoaderService`](./translation-loader.service.ts) loads translation files dynamically and integrates with Transloco.
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
## Translation Providers
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
Translation providers offer a configurable setup for i18n using the `@jsverse/transloco` library. See [`translation-providers.ts`](./translation-providers.ts) for usage examples and configuration options.
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
## QuangTranslationService
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
[`QuangTranslationService`](./translation.service.ts) manages translations at runtime, leveraging `@jsverse/transloco` for core translation features. It provides methods for switching languages, retrieving translations, and more.
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
## Translation Tokens
|
|
26
|
+
|
|
27
|
+
[`translations.tokens.ts`](./translations.tokens.ts) includes a set of injectable tokens for customizing and extending translation behavior in your project.
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
Refer to the linked files above for implementation details and usage examples. For most applications, you will:
|
|
32
|
+
- Register the translation providers in your app module
|
|
33
|
+
- Use `QuangTranslationService` for runtime translation management
|
|
34
|
+
- Use the provided tokens and loader service as needed for advanced scenarios
|