@sixbell-telco/sdk 2.1.0 → 3.1.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/CHANGELOG.md +82 -1
- package/README.md +323 -84
- package/_index.css +17 -3
- package/components/card/card-actions/card-actions.component.d.ts +4 -4
- package/components/card/card-body/card-body.component.d.ts +5 -0
- package/components/card/card-context.d.ts +8 -0
- package/components/card/card-footer/card-footer.component.d.ts +7 -0
- package/components/card/card-header/card-header.component.d.ts +5 -0
- package/components/card/card-header-aside/card-header-aside.component.d.ts +5 -0
- package/components/card/card-section/card-section.component.d.ts +5 -0
- package/components/card/card-section-body/card-section-body.component.d.ts +13 -0
- package/components/card/card-section-footer/card-section-footer.component.d.ts +5 -0
- package/components/card/card-section-group/card-section-group.component.d.ts +16 -0
- package/components/card/card-section-header/card-section-header.component.d.ts +5 -0
- package/components/card/card-section-header-aside/card-section-header-aside.component.d.ts +5 -0
- package/components/card/card-subtitle/card-subtitle.component.d.ts +34 -0
- package/components/card/card-title/card-title.component.d.ts +23 -14
- package/components/card/public-api.d.ts +12 -1
- package/components/card/src/card.component.d.ts +5 -1
- package/components/data-table/actions/actions.component.d.ts +67 -0
- package/components/data-table/actions/actions.types.d.ts +38 -0
- package/components/data-table/public-api.d.ts +2 -0
- package/components/data-table/sortable-header/sortable-header.component.d.ts +2 -0
- package/components/data-table/src/data-table.component.d.ts +14 -5
- package/{directives/typography → components/divider}/index.d.ts +1 -1
- package/components/divider/public-api.d.ts +1 -0
- package/components/divider/src/divider.component.d.ts +13 -0
- package/components/forms/date-picker/src/date-picker.component.d.ts +3 -0
- package/components/forms/form-error/src/form-error.component.d.ts +8 -1
- package/components/forms/input/src/input.component.d.ts +1 -12
- package/components/forms/textarea/src/textarea.component.d.ts +1 -6
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +10 -1
- package/components/paginator/src/paginator.component.d.ts +7 -1
- package/components/table/public-api.d.ts +1 -0
- package/components/table/src/table.component.d.ts +37 -4
- package/components/table/table-action/table-action.component.d.ts +2 -6
- package/components/table/table-actions/table-actions.component.d.ts +52 -6
- package/components/table/table-actions/table-actions.types.d.ts +28 -0
- package/components/{toast → text}/index.d.ts +1 -1
- package/components/text/public-api.d.ts +2 -0
- package/components/text/src/text.component.d.ts +38 -0
- package/directives/only-numbers/public-api.d.ts +0 -5
- package/directives/only-numbers/src/only-numbers.directive.d.ts +1 -13
- package/directives/text/index.d.ts +5 -0
- package/directives/text/public-api.d.ts +1 -0
- package/directives/text/src/text.directive.d.ts +87 -0
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +9 -9
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +10 -11
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-card.mjs +428 -47
- package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +202 -51
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs +44 -0
- package/fesm2022/sixbell-telco-sdk-components-divider.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +6 -6
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +21 -5
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +12 -5
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +3 -15
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +5 -11
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +46 -18
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +439 -47
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-text.mjs +308 -0
- package/fesm2022/sixbell-telco-sdk-components-text.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +12 -12
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +5 -22
- package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs +160 -0
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-formatting.mjs +490 -0
- package/fesm2022/sixbell-telco-sdk-utils-formatting.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +49 -1
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
- package/package.json +100 -92
- package/utils/formatting/README.md +100 -0
- package/utils/formatting/index.d.ts +5 -0
- package/utils/formatting/public-api.d.ts +9 -0
- package/utils/formatting/src/constants/constants.d.ts +18 -0
- package/utils/formatting/src/models/formatting.d.ts +33 -0
- package/utils/formatting/src/pipes/currency/st-currency.pipe.d.ts +9 -0
- package/utils/formatting/src/pipes/date/st-date.pipe.d.ts +9 -0
- package/utils/formatting/src/pipes/decimal/st-decimal.pipe.d.ts +9 -0
- package/utils/formatting/src/pipes/percent/st-percent.pipe.d.ts +9 -0
- package/utils/formatting/src/service/formatting.service.d.ts +13 -0
- package/utils/formatting/src/utils/date-format/date-format.d.ts +9 -0
- package/utils/formatting/src/utils/number-format/number-format.d.ts +12 -0
- package/utils/logger/README.md +8 -19
- package/utils/runtime-config/README.md +1 -1
- package/utils/theme/README.md +21 -2
- package/utils/translation/README.md +40 -10
- package/utils/translation/public-api.d.ts +1 -1
- package/utils/translation/src/constants.d.ts +9 -2
- package/utils/translation/src/models/translation.d.ts +11 -0
- package/utils/translation/src/providers/translation.provider.d.ts +1 -1
- package/utils/translation/src/translation.service.d.ts +6 -1
- package/assets/styles/toast.css +0 -63
- package/components/card/card-content/card-content.component.d.ts +0 -30
- package/components/toast/public-api.d.ts +0 -12
- package/components/toast/services/toast.service.d.ts +0 -35
- package/components/toast/toast-message/toast-message.component.d.ts +0 -70
- package/components/toast/toasts-container/toasts-container.component.d.ts +0 -21
- package/directives/typography/public-api.d.ts +0 -1
- package/directives/typography/src/typography.directive.d.ts +0 -68
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs +0 -250
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +0 -1
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs +0 -126
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Welcome to the Sixbell Telco SDK component library. This is a comprehensive Angular component library featuring 25+ pre-built, production-ready UI components built with Angular 19, Tailwind CSS v4, and DaisyUI.
|
|
4
4
|
|
|
5
|
+
The package is public on npm, but the repository is private and there is no separate public docs page. Because of that, this README keeps setup guidance, provider examples, translation examples, and usage references that public consumers need.
|
|
6
|
+
|
|
5
7
|
## Overview
|
|
6
8
|
|
|
7
9
|
The SDK provides:
|
|
8
10
|
|
|
9
11
|
- **25+ Production-Ready Components**: Button, Card, Form inputs, Data Table, Dialog, Dropdown, and more
|
|
10
|
-
- **Utility Services**: Theme management, i18n translation, logging, and
|
|
11
|
-
- **Directive Support**:
|
|
12
|
+
- **Utility Services**: Theme management, i18n translation, logging, runtime config, and formatting
|
|
13
|
+
- **Directive Support**: Text, auto-focus, click-outside, and only-numbers
|
|
12
14
|
- **Tailwind CSS v4 + DaisyUI**: Modern styling with customizable themes
|
|
13
15
|
- **Multi-Entry Point Architecture**: Granular imports for optimized bundle sizes
|
|
14
16
|
- **Angular 19 Signal-Based**: Modern reactive patterns with Angular signals
|
|
@@ -24,34 +26,34 @@ The SDK provides:
|
|
|
24
26
|
|
|
25
27
|
### General Components
|
|
26
28
|
|
|
27
|
-
| Component | Description
|
|
28
|
-
| ------------- |
|
|
29
|
-
| Accordion | Expandable/collapsible content sections
|
|
30
|
-
| Avatar | User profile pictures with initials fallback
|
|
31
|
-
| Badge | Status and label indicators
|
|
32
|
-
| Button | Interactive buttons with variants and sizes
|
|
33
|
-
| Card |
|
|
34
|
-
| Countdown | Countdown timer with customizable formatting
|
|
35
|
-
| Data Table | Advanced grid with sorting, filtering, pagination |
|
|
36
|
-
| Dialog | Modal dialogs with animations and positioning
|
|
37
|
-
|
|
|
38
|
-
| Dropdown Menu
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
| File
|
|
42
|
-
| Icon | SVG icon component with ng-icons integration
|
|
43
|
-
| Link | Hyperlink component with router support
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
| Tooltip | Floating tooltip with positioning
|
|
54
|
-
| Wizard | Multi-step wizard with validation
|
|
29
|
+
| Component | Description |
|
|
30
|
+
| ------------- | ----------------------------------------------------------------------------- |
|
|
31
|
+
| Accordion | Expandable/collapsible content sections |
|
|
32
|
+
| Avatar | User profile pictures with initials fallback |
|
|
33
|
+
| Badge | Status and label indicators |
|
|
34
|
+
| Button | Interactive buttons with variants and sizes |
|
|
35
|
+
| Card | Compound content shell with contextual headers, sections, and divided footers |
|
|
36
|
+
| Countdown | Countdown timer with customizable formatting |
|
|
37
|
+
| Data Table | Advanced grid with sorting, filtering, pagination, row actions |
|
|
38
|
+
| Dialog | Modal dialogs with animations and positioning |
|
|
39
|
+
| Divider | Semantic divider with orientation, placement, and margin control |
|
|
40
|
+
| Dropdown | Menu dropdown for actions and links |
|
|
41
|
+
| Dropdown Menu | Advanced nested menu system |
|
|
42
|
+
| Dual List | Dual list selection for managing items |
|
|
43
|
+
| File Upload | File uploader and dropzone entry point |
|
|
44
|
+
| Icon | SVG icon component with ng-icons integration |
|
|
45
|
+
| Link | Hyperlink component with router support |
|
|
46
|
+
| Notification | Toast-style notifications |
|
|
47
|
+
| Overlay | Generic overlay with trigger and content |
|
|
48
|
+
| Paginator | Pagination controls for data |
|
|
49
|
+
| Product Card | Product display card with image and actions |
|
|
50
|
+
| Progress | Progress bar with variants |
|
|
51
|
+
| Sonner Toast | Modern toast notifications via ngx-sonner |
|
|
52
|
+
| Tab | Tabbed navigation interface |
|
|
53
|
+
| Table | Data table with inline and dropdown row actions |
|
|
54
|
+
| Text | Polymorphic text component with semantic HTML tags |
|
|
55
|
+
| Tooltip | Floating tooltip with positioning |
|
|
56
|
+
| Wizard | Multi-step wizard with validation |
|
|
55
57
|
|
|
56
58
|
### Form Components
|
|
57
59
|
|
|
@@ -62,6 +64,7 @@ The SDK provides:
|
|
|
62
64
|
| Datepicker | Single and range date selection with time |
|
|
63
65
|
| Form Item | Layout wrapper for fields + full-width errors |
|
|
64
66
|
| Form Error | Error message display for form fields |
|
|
67
|
+
| Form Group | Vertical spacing helper for grouped fields |
|
|
65
68
|
| Input | Text input with variants, icons, and validation |
|
|
66
69
|
| Radio | Radio button group selection |
|
|
67
70
|
| Range | Slider input for numeric ranges |
|
|
@@ -110,16 +113,17 @@ Add the translation key to your SDK translations (example shown for English):
|
|
|
110
113
|
| Logger Service | Theme-aware logging with IndexedDB persistence | [README](utils/logger/) |
|
|
111
114
|
| Theme Service | Runtime theme management with multi-tenant support | [README](utils/theme/) |
|
|
112
115
|
| Translation Service | Multi-language i18n with ngx-translate integration | [README](utils/translation/) |
|
|
116
|
+
| Formatting Service | Reactive locale-aware formatting utilities | [README](utils/formatting/) |
|
|
113
117
|
| Runtime Config | Last-known-good runtime config loader | [README](utils/runtime-config/) |
|
|
114
118
|
|
|
115
119
|
### Directives
|
|
116
120
|
|
|
117
|
-
| Directive | Purpose
|
|
118
|
-
| ------------- |
|
|
119
|
-
| auto-focus | Auto-focus elements when visible
|
|
120
|
-
| click-outside | Detect clicks outside an element
|
|
121
|
-
| only-numbers | Restrict input to numeric values only
|
|
122
|
-
|
|
|
121
|
+
| Directive | Purpose |
|
|
122
|
+
| ------------- | ----------------------------------------------------- |
|
|
123
|
+
| auto-focus | Auto-focus elements when visible |
|
|
124
|
+
| click-outside | Detect clicks outside an element |
|
|
125
|
+
| only-numbers | Restrict input to numeric values only |
|
|
126
|
+
| text | Apply preset-based typography with line-clamp support |
|
|
123
127
|
|
|
124
128
|
## Installation
|
|
125
129
|
|
|
@@ -221,8 +225,23 @@ The `translation.json` file defines available languages and their translation pa
|
|
|
221
225
|
|
|
222
226
|
```json
|
|
223
227
|
{
|
|
228
|
+
"meta": {
|
|
229
|
+
"updatedAt": "2026-02-02T00:00:00Z",
|
|
230
|
+
"hash": "showcase-translations-v2",
|
|
231
|
+
"schemaVersion": "3"
|
|
232
|
+
},
|
|
233
|
+
"additionalLanguages": [],
|
|
224
234
|
"defaultLang": "es",
|
|
225
|
-
"
|
|
235
|
+
"excludeLanguages": [],
|
|
236
|
+
"translationPaths": ["/assets/i18n/", "/assets/i18n/sdk/", "/assets/themes/i18n"],
|
|
237
|
+
"locale": {
|
|
238
|
+
"defaultLocale": "en-US",
|
|
239
|
+
"languageToLocale": {
|
|
240
|
+
"en": "en-US",
|
|
241
|
+
"es": "es-CL",
|
|
242
|
+
"pt": "pt-BR"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
226
245
|
}
|
|
227
246
|
```
|
|
228
247
|
|
|
@@ -243,12 +262,11 @@ The `themes.json` file defines available themes and their variants:
|
|
|
243
262
|
```json
|
|
244
263
|
{
|
|
245
264
|
"meta": {
|
|
246
|
-
"name": "themes",
|
|
247
265
|
"updatedAt": "2026-02-02T00:00:00Z",
|
|
248
|
-
"hash": "themes-
|
|
266
|
+
"hash": "showcase-themes-v1",
|
|
249
267
|
"schemaVersion": "2"
|
|
250
268
|
},
|
|
251
|
-
"themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/
|
|
269
|
+
"themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/wom.json"],
|
|
252
270
|
"defaultTheme": "sixbell_telco",
|
|
253
271
|
"defaultScheme": "system",
|
|
254
272
|
"excludeThemes": []
|
|
@@ -259,37 +277,102 @@ The `themes.json` file defines available themes and their variants:
|
|
|
259
277
|
|
|
260
278
|
```typescript
|
|
261
279
|
// app.config.ts
|
|
262
|
-
import {
|
|
263
|
-
import { ApplicationConfig, importProvidersFrom, isDevMode } from '@angular/core';
|
|
280
|
+
import { ApplicationConfig, isDevMode } from '@angular/core';
|
|
264
281
|
import { provideRouter } from '@angular/router';
|
|
265
282
|
import { provideHttpClient } from '@angular/common/http';
|
|
266
283
|
import { provideLogger } from '@sixbell-telco/sdk/utils/logger';
|
|
267
284
|
import { provideRuntimeTheme } from '@sixbell-telco/sdk/utils/theme';
|
|
268
285
|
import { provideRuntimeTranslation } from '@sixbell-telco/sdk/utils/translation';
|
|
269
|
-
import {
|
|
286
|
+
import { from, timer } from 'rxjs';
|
|
287
|
+
import { switchMap } from 'rxjs/operators';
|
|
288
|
+
|
|
289
|
+
const runtimeUpdateStream$ = timer(0, environment.runtime.pollIntervalMs).pipe(
|
|
290
|
+
switchMap(() => from(fetch(`${environment.runtime.apiBaseUrl}/api/runtime/updates/poll`))),
|
|
291
|
+
switchMap((response) => from(response.json())),
|
|
292
|
+
);
|
|
270
293
|
|
|
271
294
|
export const appConfig: ApplicationConfig = {
|
|
272
295
|
providers: [
|
|
273
296
|
provideRouter(routes),
|
|
274
297
|
provideHttpClient(),
|
|
275
|
-
// CDK Dialog providers (required for dialog component)
|
|
276
|
-
importProvidersFrom(DialogModule),
|
|
277
|
-
// Logger service - configure logging levels and storage
|
|
278
298
|
provideLogger({
|
|
279
|
-
enableLogging:
|
|
299
|
+
enableLogging: isDevMode(),
|
|
280
300
|
logLevel: isDevMode() ? 'debug' : 'warn',
|
|
281
301
|
showTimestamp: true,
|
|
302
|
+
showDate: true,
|
|
282
303
|
persistToIndexedDB: true,
|
|
304
|
+
idbRetentionDays: 7,
|
|
305
|
+
idbMaxLogs: 5000,
|
|
283
306
|
silentMode: !isDevMode(),
|
|
284
307
|
}),
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
308
|
+
...(() => {
|
|
309
|
+
const mode = environment.runtime.defaultMode;
|
|
310
|
+
|
|
311
|
+
if (mode === 'default') {
|
|
312
|
+
return [provideRuntimeTranslation('/assets/translation/translation.json'), provideRuntimeTheme('/assets/themes/themes.json')];
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (mode === 'stream' && environment.runtime.enableStream) {
|
|
316
|
+
return [
|
|
317
|
+
provideRuntimeTranslation(`${environment.runtime.apiBaseUrl}/api/runtime/translation/config`, {
|
|
318
|
+
updateStream: runtimeUpdateStream$,
|
|
319
|
+
}),
|
|
320
|
+
provideRuntimeTheme(`${environment.runtime.apiBaseUrl}/api/runtime/theme/config`, {
|
|
321
|
+
updateStream: runtimeUpdateStream$,
|
|
322
|
+
}),
|
|
323
|
+
];
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return [
|
|
327
|
+
provideRuntimeTranslation(`${environment.runtime.apiBaseUrl}/api/runtime/translation/config`, {
|
|
328
|
+
sse: {
|
|
329
|
+
url: `${environment.runtime.apiBaseUrl}/api/runtime/updates?resource=translation`,
|
|
330
|
+
eventType: 'message',
|
|
331
|
+
},
|
|
332
|
+
}),
|
|
333
|
+
provideRuntimeTheme(`${environment.runtime.apiBaseUrl}/api/runtime/theme/config`, {
|
|
334
|
+
sse: {
|
|
335
|
+
url: `${environment.runtime.apiBaseUrl}/api/runtime/updates?resource=theme`,
|
|
336
|
+
eventType: 'message',
|
|
337
|
+
},
|
|
338
|
+
}),
|
|
339
|
+
];
|
|
340
|
+
})(),
|
|
289
341
|
],
|
|
290
342
|
};
|
|
291
343
|
```
|
|
292
344
|
|
|
345
|
+
### Reactive Formatting Setup
|
|
346
|
+
|
|
347
|
+
Use SDK formatting pipes and services instead of Angular native locale pipes:
|
|
348
|
+
|
|
349
|
+
```html
|
|
350
|
+
{{ createdAt | stDate:'DD/MM/YYYY HH:mm:ss' }} {{ total | stDecimal:'1.0-2' }} {{ amount | stCurrency:'CLP':'symbol':'1.0-0' }} {{ ratio |
|
|
351
|
+
stPercent:'1.0-2' }}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
```typescript
|
|
355
|
+
import { Component, computed, inject } from '@angular/core';
|
|
356
|
+
import { FormattingService } from '@sixbell-telco/sdk/utils/formatting';
|
|
357
|
+
|
|
358
|
+
@Component({
|
|
359
|
+
selector: 'app-formatting-example',
|
|
360
|
+
template: `{{ formattedAmount() }}`,
|
|
361
|
+
})
|
|
362
|
+
export class FormattingExampleComponent {
|
|
363
|
+
private readonly formatting = inject(FormattingService);
|
|
364
|
+
|
|
365
|
+
amount = 1234.5;
|
|
366
|
+
|
|
367
|
+
formattedAmount = computed(() =>
|
|
368
|
+
this.formatting.formatCurrency(this.amount, 'CLP', {
|
|
369
|
+
display: 'symbol',
|
|
370
|
+
digitsInfo: '1.0-0',
|
|
371
|
+
}),
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
293
376
|
**Key Benefits of Runtime Configuration:**
|
|
294
377
|
|
|
295
378
|
- **No Recompilation**: Update themes and languages without rebuilding your application
|
|
@@ -315,12 +398,11 @@ Add your custom theme to `/assets/themes/themes.json`:
|
|
|
315
398
|
```json
|
|
316
399
|
{
|
|
317
400
|
"meta": {
|
|
318
|
-
"name": "themes",
|
|
319
401
|
"updatedAt": "2026-02-02T00:00:00Z",
|
|
320
|
-
"hash": "themes-
|
|
402
|
+
"hash": "showcase-themes-v1",
|
|
321
403
|
"schemaVersion": "2"
|
|
322
404
|
},
|
|
323
|
-
"themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/
|
|
405
|
+
"themes": ["/assets/themes/catalog/sixbell_telco.json", "/assets/themes/catalog/wom.json"],
|
|
324
406
|
"defaultTheme": "sixbell_telco",
|
|
325
407
|
"defaultScheme": "system",
|
|
326
408
|
"excludeThemes": []
|
|
@@ -329,9 +411,9 @@ Add your custom theme to `/assets/themes/themes.json`:
|
|
|
329
411
|
|
|
330
412
|
**Configuration Structure:**
|
|
331
413
|
|
|
332
|
-
- `themes`:
|
|
333
|
-
- `defaultTheme`:
|
|
334
|
-
- `defaultScheme`:
|
|
414
|
+
- `themes`: theme JSON paths
|
|
415
|
+
- `defaultTheme`: initial theme on app startup
|
|
416
|
+
- `defaultScheme`: initial color scheme (`'system'`, `'light'`, or `'dark'`)
|
|
335
417
|
|
|
336
418
|
### 2. Define DaisyUI Themes in Global Styles
|
|
337
419
|
|
|
@@ -403,8 +485,8 @@ Store theme and scheme display names in translation files. Create `/assets/theme
|
|
|
403
485
|
"sdk": {
|
|
404
486
|
"theme": {
|
|
405
487
|
"catalog": {
|
|
406
|
-
"sixbell_telco": "Sixbell
|
|
407
|
-
"
|
|
488
|
+
"sixbell_telco": "Sixbell telco",
|
|
489
|
+
"wom": "Wom"
|
|
408
490
|
},
|
|
409
491
|
"schemes": {
|
|
410
492
|
"system": "System",
|
|
@@ -423,8 +505,8 @@ Store theme and scheme display names in translation files. Create `/assets/theme
|
|
|
423
505
|
"sdk": {
|
|
424
506
|
"theme": {
|
|
425
507
|
"catalog": {
|
|
426
|
-
"sixbell_telco": "Sixbell
|
|
427
|
-
"
|
|
508
|
+
"sixbell_telco": "Sixbell telco",
|
|
509
|
+
"wom": "Wom"
|
|
428
510
|
},
|
|
429
511
|
"schemes": {
|
|
430
512
|
"system": "Sistema",
|
|
@@ -443,8 +525,8 @@ Store theme and scheme display names in translation files. Create `/assets/theme
|
|
|
443
525
|
"sdk": {
|
|
444
526
|
"theme": {
|
|
445
527
|
"catalog": {
|
|
446
|
-
"sixbell_telco": "Sixbell
|
|
447
|
-
"
|
|
528
|
+
"sixbell_telco": "Sixbell telco",
|
|
529
|
+
"wom": "Wom"
|
|
448
530
|
},
|
|
449
531
|
"schemes": {
|
|
450
532
|
"system": "Sistema",
|
|
@@ -479,22 +561,39 @@ Create `/assets/translation/translation.json` in your application:
|
|
|
479
561
|
|
|
480
562
|
```json
|
|
481
563
|
{
|
|
564
|
+
"meta": {
|
|
565
|
+
"updatedAt": "2026-02-02T00:00:00Z",
|
|
566
|
+
"hash": "showcase-translations-v2",
|
|
567
|
+
"schemaVersion": "3"
|
|
568
|
+
},
|
|
569
|
+
"additionalLanguages": [],
|
|
482
570
|
"defaultLang": "es",
|
|
483
|
-
"
|
|
571
|
+
"excludeLanguages": [],
|
|
572
|
+
"translationPaths": ["/assets/i18n/", "/assets/i18n/sdk/", "/assets/themes/i18n"],
|
|
573
|
+
"locale": {
|
|
574
|
+
"defaultLocale": "en-US",
|
|
575
|
+
"languageToLocale": {
|
|
576
|
+
"en": "en-US",
|
|
577
|
+
"es": "es-CL",
|
|
578
|
+
"pt": "pt-BR"
|
|
579
|
+
}
|
|
580
|
+
}
|
|
484
581
|
}
|
|
485
582
|
```
|
|
486
583
|
|
|
487
584
|
**Configuration Structure:**
|
|
488
585
|
|
|
489
|
-
- `defaultLang`:
|
|
490
|
-
- `translationPaths`:
|
|
491
|
-
-
|
|
586
|
+
- `defaultLang`: language code used on app initialization
|
|
587
|
+
- `translationPaths`: list of directories that contain `{lang}.json`
|
|
588
|
+
- `additionalLanguages`: extra languages beyond the built-in SDK defaults
|
|
589
|
+
- `excludeLanguages`: built-in languages to remove from the available list
|
|
590
|
+
- `locale.languageToLocale`: mapping used by `FormattingService` and the formatting pipes
|
|
492
591
|
|
|
493
592
|
### 2. Create Translation Files
|
|
494
593
|
|
|
495
594
|
Create language translation files at the paths defined in `translation.json`. The minimal translation structure includes SDK translations:
|
|
496
595
|
|
|
497
|
-
**English (`/assets/sdk/
|
|
596
|
+
**English (`/assets/i18n/sdk/en.json`):**
|
|
498
597
|
|
|
499
598
|
```json
|
|
500
599
|
{
|
|
@@ -560,6 +659,9 @@ Create language translation files at the paths defined in `translation.json`. Th
|
|
|
560
659
|
"unhandledError": "*Unhandled error"
|
|
561
660
|
}
|
|
562
661
|
},
|
|
662
|
+
"formFields": {
|
|
663
|
+
"optional": "Optional"
|
|
664
|
+
},
|
|
563
665
|
"textarea": {
|
|
564
666
|
"maxCharacters": "{{current}} of {{max}} characters"
|
|
565
667
|
},
|
|
@@ -568,7 +670,15 @@ Create language translation files at the paths defined in `translation.json`. Th
|
|
|
568
670
|
"perPage": "{{count}} / page",
|
|
569
671
|
"totalEntries": "{{total}} entries",
|
|
570
672
|
"entriesRange": "{{range}} of {{total}} entries",
|
|
571
|
-
"emptyListMessage": "No items to show"
|
|
673
|
+
"emptyListMessage": "No items to show",
|
|
674
|
+
"noData": {
|
|
675
|
+
"title": "No data available",
|
|
676
|
+
"message": "There are no records to display at this time."
|
|
677
|
+
},
|
|
678
|
+
"noResults": {
|
|
679
|
+
"title": "No results found",
|
|
680
|
+
"message": "Try adjusting your search criteria"
|
|
681
|
+
}
|
|
572
682
|
},
|
|
573
683
|
"dataTable": {
|
|
574
684
|
"entriesByPage": "Entries per page",
|
|
@@ -645,7 +755,7 @@ Create language translation files at the paths defined in `translation.json`. Th
|
|
|
645
755
|
}
|
|
646
756
|
},
|
|
647
757
|
"fileUploader": {
|
|
648
|
-
"
|
|
758
|
+
"allowedTypesLabel": "Tipos permitidos:"
|
|
649
759
|
}
|
|
650
760
|
},
|
|
651
761
|
"audioPlayer": {
|
|
@@ -890,7 +1000,7 @@ import { inject } from '@angular/core';
|
|
|
890
1000
|
export class MyComponent {
|
|
891
1001
|
private translationService = inject(TranslationService);
|
|
892
1002
|
|
|
893
|
-
availableLanguages = this.translationService.
|
|
1003
|
+
availableLanguages = this.translationService.getAvailableLanguagesConfig();
|
|
894
1004
|
currentLanguage = this.translationService.currentLanguage;
|
|
895
1005
|
|
|
896
1006
|
setLanguage(languageCode: string) {
|
|
@@ -898,7 +1008,7 @@ export class MyComponent {
|
|
|
898
1008
|
}
|
|
899
1009
|
|
|
900
1010
|
getLanguageName(languageCode: string): string {
|
|
901
|
-
return this.translationService.
|
|
1011
|
+
return this.translationService.getLocalizedLanguageName(languageCode);
|
|
902
1012
|
}
|
|
903
1013
|
}
|
|
904
1014
|
```
|
|
@@ -909,15 +1019,15 @@ Translations are automatically loaded and available through the `translate` pipe
|
|
|
909
1019
|
|
|
910
1020
|
```html
|
|
911
1021
|
<!-- Access any translation key -->
|
|
912
|
-
<h1>{{ '
|
|
1022
|
+
<h1>{{ 'ui.showcase' | translate }}</h1>
|
|
913
1023
|
|
|
914
1024
|
<!-- With parameters -->
|
|
915
1025
|
<p>{{ 'welcome.message' | translate: { name: userName } }}</p>
|
|
916
1026
|
|
|
917
1027
|
<!-- In component -->
|
|
918
1028
|
<select (change)="setLanguage($event.target.value)">
|
|
919
|
-
@for (lang of availableLanguages; track lang) {
|
|
920
|
-
<option [value]="lang">{{ getLanguageName(lang) }}</option>
|
|
1029
|
+
@for (lang of availableLanguages; track lang.code) {
|
|
1030
|
+
<option [value]="lang.code">{{ getLanguageName(lang.code) }}</option>
|
|
921
1031
|
}
|
|
922
1032
|
</select>
|
|
923
1033
|
```
|
|
@@ -938,7 +1048,9 @@ Extend the translation files with your application-specific keys:
|
|
|
938
1048
|
}
|
|
939
1049
|
},
|
|
940
1050
|
"sdk": {
|
|
941
|
-
|
|
1051
|
+
"formFields": {
|
|
1052
|
+
"optional": "Optional"
|
|
1053
|
+
}
|
|
942
1054
|
}
|
|
943
1055
|
}
|
|
944
1056
|
```
|
|
@@ -966,6 +1078,85 @@ import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
|
|
|
966
1078
|
})
|
|
967
1079
|
```
|
|
968
1080
|
|
|
1081
|
+
### Using Text Directive & Component
|
|
1082
|
+
|
|
1083
|
+
The **Text Directive** (`stText`) applies preset-based typography styles directly on any HTML element. The **Text Component** (`st-text`) is a polymorphic wrapper that renders the correct semantic HTML tag.
|
|
1084
|
+
|
|
1085
|
+
Both support class overrides — any Tailwind class you put in `class=""` will override the corresponding directive/component default via `tailwind-merge`.
|
|
1086
|
+
|
|
1087
|
+
#### Text Directive
|
|
1088
|
+
|
|
1089
|
+
```typescript
|
|
1090
|
+
import { TextDirective } from '@sixbell-telco/sdk/directives/text';
|
|
1091
|
+
|
|
1092
|
+
@Component({
|
|
1093
|
+
imports: [TextDirective],
|
|
1094
|
+
template: `
|
|
1095
|
+
<!-- Basic presets (1 = largest heading, 10 = smallest body) -->
|
|
1096
|
+
<h1 stText="1">Hero Title</h1>
|
|
1097
|
+
<p stText="7">Body text (default preset)</p>
|
|
1098
|
+
<span stText="9">Small label</span>
|
|
1099
|
+
|
|
1100
|
+
<!-- Override weight and color via inputs -->
|
|
1101
|
+
<p stText="7" stTextWeight="bold" stTextColor="primary">Bold primary text</p>
|
|
1102
|
+
|
|
1103
|
+
<!-- Override any prop via class (wins over defaults) -->
|
|
1104
|
+
<p stText="7" class="text-error font-semibold">Error text with semibold weight</p>
|
|
1105
|
+
<p stText="7" class="text-3xl leading-loose">Larger size and loose line-height</p>
|
|
1106
|
+
|
|
1107
|
+
<!-- Line clamp -->
|
|
1108
|
+
<p stText="7" stTextLineClamp="2">Long text clamped to 2 lines...</p>
|
|
1109
|
+
`
|
|
1110
|
+
})
|
|
1111
|
+
```
|
|
1112
|
+
|
|
1113
|
+
**Available inputs:**
|
|
1114
|
+
|
|
1115
|
+
| Input | Default | Options |
|
|
1116
|
+
| ----------------- | ----------- | ----------------------------------------------------------------------------------- |
|
|
1117
|
+
| `stText` | `'7'` | `'1'`–`'10'` (preset scale) |
|
|
1118
|
+
| `stTextWeight` | `'normal'` | `'bold'`, `'semibold'`, `'medium'`, `'normal'`, `'light'`, `'inherit'` |
|
|
1119
|
+
| `stTextColor` | `'inherit'` | `'base'`, `'base-placeholder'`, `'primary'`, `'secondary'`, `'accent'`, `'inherit'` |
|
|
1120
|
+
| `stTextOverflow` | `'clip'` | `'clip'`, `'ellipsis'`, `'truncate'` |
|
|
1121
|
+
| `stTextLineClamp` | `undefined` | `'1'`–`'6'`, `'none'` |
|
|
1122
|
+
|
|
1123
|
+
**Class overrides:** Any Tailwind utility in `class=""` overrides the corresponding directive default (color, weight, font-size, line-height, tracking, etc.) via `tailwind-merge`.
|
|
1124
|
+
|
|
1125
|
+
#### Text Component
|
|
1126
|
+
|
|
1127
|
+
```typescript
|
|
1128
|
+
import { TextComponent } from '@sixbell-telco/sdk/components/text';
|
|
1129
|
+
|
|
1130
|
+
@Component({
|
|
1131
|
+
imports: [TextComponent],
|
|
1132
|
+
template: `
|
|
1133
|
+
<!-- Semantic tags with presets -->
|
|
1134
|
+
<st-text as="h1" preset="1">Hero Title</st-text>
|
|
1135
|
+
<st-text as="h2" preset="2">Page Title</st-text>
|
|
1136
|
+
<st-text as="p" preset="7">Body paragraph</st-text>
|
|
1137
|
+
<st-text as="span" preset="9" color="primary">Inline label</st-text>
|
|
1138
|
+
|
|
1139
|
+
<!-- Override via inputs -->
|
|
1140
|
+
<st-text as="p" preset="7" weight="bold" color="accent">Bold accent text</st-text>
|
|
1141
|
+
|
|
1142
|
+
<!-- Override via class (wins over defaults) -->
|
|
1143
|
+
<st-text as="p" preset="7" class="text-error font-medium">Custom error text</st-text>
|
|
1144
|
+
<st-text as="h1" preset="1" class="mb-4 border-b border-accent pb-2">Heading with border</st-text>
|
|
1145
|
+
`
|
|
1146
|
+
})
|
|
1147
|
+
```
|
|
1148
|
+
|
|
1149
|
+
**Available inputs:**
|
|
1150
|
+
|
|
1151
|
+
| Input | Default | Options |
|
|
1152
|
+
| ----------- | ----------- | ----------------------------------------------------------------------------------- |
|
|
1153
|
+
| `as` | `'p'` | `'h1'`–`'h6'`, `'p'`, `'span'`, `'div'`, `'label'` |
|
|
1154
|
+
| `preset` | `'7'` | `'1'`–`'10'` |
|
|
1155
|
+
| `weight` | `undefined` | `'bold'`, `'semibold'`, `'medium'`, `'normal'`, `'light'`, `'inherit'` |
|
|
1156
|
+
| `color` | `'base'` | `'base'`, `'base-placeholder'`, `'primary'`, `'secondary'`, `'accent'`, `'inherit'` |
|
|
1157
|
+
| `overflow` | `'clip'` | `'clip'`, `'ellipsis'`, `'truncate'` |
|
|
1158
|
+
| `lineClamp` | `undefined` | `'1'`–`'6'`, `'none'` |
|
|
1159
|
+
|
|
969
1160
|
### Using Services in Components
|
|
970
1161
|
|
|
971
1162
|
```typescript
|
|
@@ -989,8 +1180,8 @@ import { TranslationService } from '@sixbell-telco/sdk/utils/translation';
|
|
|
989
1180
|
|
|
990
1181
|
<!-- Language selector -->
|
|
991
1182
|
<select (change)="changeLanguage($event.target.value)">
|
|
992
|
-
@for (lang of translationService.
|
|
993
|
-
<option [value]="lang">{{ translationService.
|
|
1183
|
+
@for (lang of translationService.getAvailableLanguagesConfig(); track lang.code) {
|
|
1184
|
+
<option [value]="lang.code">{{ translationService.getLocalizedLanguageName(lang.code) }}</option>
|
|
994
1185
|
}
|
|
995
1186
|
</select>
|
|
996
1187
|
</div>
|
|
@@ -1017,16 +1208,53 @@ export class MyComponent {
|
|
|
1017
1208
|
```typescript
|
|
1018
1209
|
import { Component } from '@angular/core';
|
|
1019
1210
|
import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
|
|
1020
|
-
import {
|
|
1211
|
+
import {
|
|
1212
|
+
CardActionsComponent,
|
|
1213
|
+
CardBodyComponent,
|
|
1214
|
+
CardComponent,
|
|
1215
|
+
CardFooterComponent,
|
|
1216
|
+
CardHeaderComponent,
|
|
1217
|
+
CardSectionBodyComponent,
|
|
1218
|
+
CardSectionComponent,
|
|
1219
|
+
CardSectionGroupComponent,
|
|
1220
|
+
CardSubtitleComponent,
|
|
1221
|
+
CardTitleComponent,
|
|
1222
|
+
} from '@sixbell-telco/sdk/components/card';
|
|
1021
1223
|
|
|
1022
1224
|
@Component({
|
|
1023
1225
|
selector: 'app-example',
|
|
1024
1226
|
standalone: true,
|
|
1025
|
-
imports: [
|
|
1227
|
+
imports: [
|
|
1228
|
+
ButtonComponent,
|
|
1229
|
+
CardActionsComponent,
|
|
1230
|
+
CardBodyComponent,
|
|
1231
|
+
CardComponent,
|
|
1232
|
+
CardFooterComponent,
|
|
1233
|
+
CardHeaderComponent,
|
|
1234
|
+
CardSectionBodyComponent,
|
|
1235
|
+
CardSectionComponent,
|
|
1236
|
+
CardSectionGroupComponent,
|
|
1237
|
+
CardSubtitleComponent,
|
|
1238
|
+
CardTitleComponent,
|
|
1239
|
+
],
|
|
1026
1240
|
template: `
|
|
1027
1241
|
<st-card>
|
|
1028
|
-
<
|
|
1029
|
-
|
|
1242
|
+
<st-card-header>
|
|
1243
|
+
<st-card-title>Hello World</st-card-title>
|
|
1244
|
+
<st-card-subtitle>Small supporting text</st-card-subtitle>
|
|
1245
|
+
</st-card-header>
|
|
1246
|
+
<st-card-body>
|
|
1247
|
+
<st-card-section-group [divided]="true">
|
|
1248
|
+
<st-card-section>
|
|
1249
|
+
<st-card-section-body>Welcome to the new compound card API.</st-card-section-body>
|
|
1250
|
+
</st-card-section>
|
|
1251
|
+
</st-card-section-group>
|
|
1252
|
+
</st-card-body>
|
|
1253
|
+
<st-card-footer [divided]="true">
|
|
1254
|
+
<st-card-actions>
|
|
1255
|
+
<st-button variant="primary">Click me!</st-button>
|
|
1256
|
+
</st-card-actions>
|
|
1257
|
+
</st-card-footer>
|
|
1030
1258
|
</st-card>
|
|
1031
1259
|
`,
|
|
1032
1260
|
})
|
|
@@ -1136,6 +1364,7 @@ All SDK components use the `st-` prefix:
|
|
|
1136
1364
|
<st-button>Button</st-button>
|
|
1137
1365
|
<st-input type="text" />
|
|
1138
1366
|
<st-card>Card Content</st-card>
|
|
1367
|
+
<st-divider>OR</st-divider>
|
|
1139
1368
|
```
|
|
1140
1369
|
|
|
1141
1370
|
### Signal-Based API
|
|
@@ -1161,7 +1390,7 @@ npm run test:watch # Watch mode
|
|
|
1161
1390
|
npm run test:coverage # Coverage report
|
|
1162
1391
|
```
|
|
1163
1392
|
|
|
1164
|
-
See `.
|
|
1393
|
+
See `.agents/skills/angular-testing-jest-ngmocks/SKILL.md` for Angular 19 testing patterns.
|
|
1165
1394
|
|
|
1166
1395
|
## Documentation
|
|
1167
1396
|
|
|
@@ -1170,6 +1399,16 @@ See `.github/instructions/testing-basics.instructions.md` for Angular 19 testing
|
|
|
1170
1399
|
- **API Documentation**: JSDoc comments in component files
|
|
1171
1400
|
- **Changelog**: See [CHANGELOG.md](./CHANGELOG.md)
|
|
1172
1401
|
|
|
1402
|
+
## Agent skills release scope
|
|
1403
|
+
|
|
1404
|
+
The SDK skill at `.agents/skills/sixbell-sdk/` follows the same lifecycle as `projects/sdk/CHANGELOG.md`:
|
|
1405
|
+
|
|
1406
|
+
1. During active development, the skill metadata must point to `Unreleased`.
|
|
1407
|
+
2. When a release is created, update the skill metadata to the released version or tag.
|
|
1408
|
+
3. When development starts again, switch the skill metadata back to `Unreleased`.
|
|
1409
|
+
|
|
1410
|
+
This keeps the skill aligned with the current codebase instead of the last published package.
|
|
1411
|
+
|
|
1173
1412
|
## Contributing
|
|
1174
1413
|
|
|
1175
1414
|
When creating new components:
|
|
@@ -1201,4 +1440,4 @@ For issues, questions, or feature requests, please visit the project repository
|
|
|
1201
1440
|
|
|
1202
1441
|
---
|
|
1203
1442
|
|
|
1204
|
-
**Last updated**:
|
|
1443
|
+
**Last updated**: March 19, 2026
|