@gipisistemas/ngx-core 1.0.7 → 1.0.9
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 +168 -168
- package/components/button/button.component.scss +0 -4
- package/components/button-group/button-group.component.scss +0 -4
- package/components/checkbox/checkbox.component.scss +5 -4
- package/components/chips/chips.component.scss +12 -12
- package/components/date-picker/date-picker.component.scss +0 -4
- package/components/date-range-picker/date-range-picker.component.scss +16 -0
- package/components/empty/empty.component.scss +1 -0
- package/components/input/input.component.scss +0 -4
- package/components/input-currency/input-currency.component.scss +0 -4
- package/components/input-file/input-file.component.scss +0 -4
- package/components/input-group/input-group.component.scss +0 -4
- package/components/input-phone/input-phone.component.scss +0 -4
- package/components/label/label.component.scss +11 -0
- package/components/{old-datetime-picker/datetime-picker.component.scss → month-picker/month-picker.component.scss} +12 -7
- package/components/paginator/paginator.component.scss +11 -0
- package/components/password-requeriments/password-requeriments.component.scss +22 -4
- package/components/radio-group/radio-group.component.scss +0 -4
- package/components/select/select.component.scss +0 -4
- package/components/select-enum/select-enum.component.scss +0 -4
- package/components/skeleton/skeleton.component.scss +76 -76
- package/components/split-button/split-button.component.scss +245 -0
- package/components/table/table.component.scss +41 -4
- package/components/toolbar/toolbar.component.scss +22 -22
- package/components/top-nav/top-nav.component.scss +18 -18
- package/components/user-profile/user-profile.component.scss +76 -76
- package/components/year-picker/year-picker.component.scss +37 -0
- package/fesm2022/gipisistemas-ngx-core.mjs +7202 -7188
- package/fesm2022/gipisistemas-ngx-core.mjs.map +1 -1
- package/index.d.ts +6174 -3
- package/package.json +16 -18
- package/theming/_index.scss +19 -19
- package/theming/_theme.scss +10 -0
- package/theming/_utils.scss +409 -13
- package/animations/fly-in-out.animation.d.ts +0 -24
- package/animations/index.d.ts +0 -2
- package/animations/rotate.animation.d.ts +0 -35
- package/base/components/base-form-dialog.component.d.ts +0 -47
- package/base/components/base-form.component.d.ts +0 -54
- package/base/components/base-list-dialog.component.d.ts +0 -69
- package/base/components/base-list.component.d.ts +0 -91
- package/base/components/base.component.d.ts +0 -62
- package/base/index.d.ts +0 -20
- package/base/models/base-applied-filter.model.d.ts +0 -8
- package/base/models/base-authority.model.d.ts +0 -6
- package/base/models/base-filter.model.d.ts +0 -16
- package/base/models/base-form-dialog-data.model.d.ts +0 -11
- package/base/models/base-list-dialog-data.model.d.ts +0 -10
- package/base/models/base-menu.model.d.ts +0 -25
- package/base/models/base-page.model.d.ts +0 -11
- package/base/models/base-query-params.model.d.ts +0 -12
- package/base/models/base-sort.model.d.ts +0 -8
- package/base/models/base-token.model.d.ts +0 -11
- package/base/models/base-user.model.d.ts +0 -18
- package/base/models/base.model.d.ts +0 -20
- package/base/services/base-auth.service.d.ts +0 -31
- package/base/services/base-crud.service.d.ts +0 -178
- package/base/services/base.service.d.ts +0 -97
- package/components/action-row/action-row.component.d.ts +0 -8
- package/components/action-row/index.d.ts +0 -1
- package/components/auto-focus/auto-focus.directive.d.ts +0 -17
- package/components/auto-focus/index.d.ts +0 -1
- package/components/avatar/avatar.component.d.ts +0 -23
- package/components/avatar/index.d.ts +0 -1
- package/components/button/button.component.d.ts +0 -74
- package/components/button/index.d.ts +0 -1
- package/components/button-group/button-group.component.d.ts +0 -39
- package/components/button-group/index.d.ts +0 -2
- package/components/button-group/shared/button-group-option.model.d.ts +0 -6
- package/components/checkbox/checkbox.component.d.ts +0 -74
- package/components/checkbox/index.d.ts +0 -1
- package/components/chips/chips.component.d.ts +0 -46
- package/components/chips/index.d.ts +0 -1
- package/components/confirm-dialog/confirm-dialog.component.d.ts +0 -17
- package/components/confirm-dialog/index.d.ts +0 -4
- package/components/confirm-dialog/shared/confirm-dialog-types.enum.d.ts +0 -7
- package/components/confirm-dialog/shared/confirm-dialog.model.d.ts +0 -25
- package/components/confirm-dialog/shared/confirm-dialog.service.d.ts +0 -17
- package/components/date-picker/date-picker.component.d.ts +0 -54
- package/components/date-picker/index.d.ts +0 -1
- package/components/date-range-picker/date-range-picker.component.d.ts +0 -66
- package/components/date-range-picker/index.d.ts +0 -6
- package/components/date-range-picker/shared/calendar/calendar.component.d.ts +0 -27
- package/components/date-range-picker/shared/default-preset-date-options.d.ts +0 -2
- package/components/date-range-picker/shared/preset-key.enum.d.ts +0 -11
- package/components/date-range-picker/shared/range-selection-strategy.service.d.ts +0 -11
- package/components/date-range-picker/shared/select-date-option.interface.d.ts +0 -32
- package/components/date-range-picker/shared/selected-date-event.interface.d.ts +0 -6
- package/components/datetime-picker/datetime-picker.component.d.ts +0 -122
- package/components/datetime-picker/index.d.ts +0 -1
- package/components/disable-auto-fill/disable-auto-fill.directive.d.ts +0 -11
- package/components/disable-auto-fill/index.d.ts +0 -1
- package/components/echarts/echarts.directive.d.ts +0 -100
- package/components/echarts/index.d.ts +0 -4
- package/components/echarts/shared/echarts-change-filter.d.ts +0 -11
- package/components/echarts/shared/echarts-config.interface.d.ts +0 -5
- package/components/echarts/shared/echarts-theme.type.d.ts +0 -1
- package/components/empty/empty.component.d.ts +0 -13
- package/components/empty/index.d.ts +0 -1
- package/components/expansion-panel/expansion-panel.component.d.ts +0 -36
- package/components/expansion-panel/index.d.ts +0 -1
- package/components/field-error/field-error.component.d.ts +0 -95
- package/components/field-error/index.d.ts +0 -2
- package/components/field-error/shared/field-error-custom-validators.type.d.ts +0 -2
- package/components/fieldset/fieldset.component.d.ts +0 -21
- package/components/fieldset/index.d.ts +0 -1
- package/components/file-drag-and-drop/file-drag-and-drop.component.d.ts +0 -34
- package/components/file-drag-and-drop/index.d.ts +0 -1
- package/components/flex-layout/flex-layout.directive.d.ts +0 -44
- package/components/flex-layout/index.d.ts +0 -1
- package/components/form-wrapper/form-wrapper.component.d.ts +0 -15
- package/components/form-wrapper/index.d.ts +0 -1
- package/components/helpful-tip/helpful-tip.component.d.ts +0 -11
- package/components/helpful-tip/index.d.ts +0 -1
- package/components/icon/icon.component.d.ts +0 -61
- package/components/icon/index.d.ts +0 -1
- package/components/index.d.ts +0 -52
- package/components/input/index.d.ts +0 -4
- package/components/input/input.component.d.ts +0 -81
- package/components/input/shared/input-prefix.directive.d.ts +0 -5
- package/components/input/shared/input-suffix.directive.d.ts +0 -5
- package/components/input/shared/input.directive.d.ts +0 -26
- package/components/input-currency/index.d.ts +0 -1
- package/components/input-currency/input-currency.component.d.ts +0 -64
- package/components/input-file/index.d.ts +0 -1
- package/components/input-file/input-file.component.d.ts +0 -65
- package/components/input-group/index.d.ts +0 -2
- package/components/input-group/input-group-addon.component.d.ts +0 -8
- package/components/input-group/input-group.component.d.ts +0 -14
- package/components/input-phone/index.d.ts +0 -1
- package/components/input-phone/input-phone.component.d.ts +0 -63
- package/components/loading/index.d.ts +0 -1
- package/components/loading/loading.component.d.ts +0 -13
- package/components/lozenge/index.d.ts +0 -3
- package/components/lozenge/lozenge.component.d.ts +0 -20
- package/components/lozenge/shared/lozenge-fill.type.d.ts +0 -4
- package/components/lozenge/shared/lozenge-variant.type.d.ts +0 -1
- package/components/password-requeriments/index.d.ts +0 -3
- package/components/password-requeriments/password-requeriments.component.d.ts +0 -27
- package/components/password-requeriments/shared/password-requeriments.interface.d.ts +0 -5
- package/components/password-requeriments/shared/password-validation.util.d.ts +0 -71
- package/components/pdf-viewer/index.d.ts +0 -4
- package/components/pdf-viewer/pdf-viewer-dialog.component.d.ts +0 -14
- package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -45
- package/components/pdf-viewer/shared/pdf-viewer-dialog.model.d.ts +0 -9
- package/components/pdf-viewer/shared/pdf-viewer-dialog.service.d.ts +0 -14
- package/components/popover/index.d.ts +0 -4
- package/components/popover/popover-target.directive.d.ts +0 -8
- package/components/popover/popover-trigger.directive.d.ts +0 -135
- package/components/popover/popover.component.d.ts +0 -121
- package/components/popover/popover.module.d.ts +0 -9
- package/components/popover/shared/popover-animations.d.ts +0 -14
- package/components/popover/shared/popover-errors.d.ts +0 -14
- package/components/popover/shared/popover-types.type.d.ts +0 -4
- package/components/popover/shared/popover.interface.d.ts +0 -24
- package/components/radio-group/index.d.ts +0 -2
- package/components/radio-group/radio-group.component.d.ts +0 -57
- package/components/radio-group/shared/option-radio-group.type.d.ts +0 -1
- package/components/scroll-fade/index.d.ts +0 -1
- package/components/scroll-fade/scroll-fade.directive.d.ts +0 -24
- package/components/select/index.d.ts +0 -4
- package/components/select/select.component.d.ts +0 -85
- package/components/select/shared/mat-select-media-tracker.d.ts +0 -15
- package/components/select/shared/mat-select-options-helper.d.ts +0 -6
- package/components/select/shared/mat-select.directive.d.ts +0 -127
- package/components/select-enum/index.d.ts +0 -3
- package/components/select-enum/select-enum.component.d.ts +0 -68
- package/components/select-enum/shared/option-select-enum.type.d.ts +0 -6
- package/components/select-enum/shared/select-check-all.component.d.ts +0 -15
- package/components/sidenav/index.d.ts +0 -1
- package/components/sidenav/shared/sidenav-arrow-animations.d.ts +0 -1
- package/components/sidenav/sidenav.component.d.ts +0 -47
- package/components/skeleton/index.d.ts +0 -1
- package/components/skeleton/skeleton.component.d.ts +0 -37
- package/components/stepper/index.d.ts +0 -2
- package/components/stepper/step.component.d.ts +0 -24
- package/components/stepper/stepper.component.d.ts +0 -20
- package/components/table/index.d.ts +0 -9
- package/components/table/shared/table-column-action-type.enum.d.ts +0 -1
- package/components/table/shared/table-column-align-type.enum.d.ts +0 -6
- package/components/table/shared/table-column-builder.model.d.ts +0 -109
- package/components/table/shared/table-column-condition.enum.d.ts +0 -2
- package/components/table/shared/table-column-partial.model.d.ts +0 -6
- package/components/table/shared/table-column.model.d.ts +0 -80
- package/components/table/shared/table-menu-item-context-builder.model.d.ts +0 -61
- package/components/table/shared/table-menu-item-context.model.d.ts +0 -45
- package/components/table/table.component.d.ts +0 -192
- package/components/tabs/index.d.ts +0 -2
- package/components/tabs/tab-group.component.d.ts +0 -24
- package/components/tabs/tab.component.d.ts +0 -30
- package/components/tag/index.d.ts +0 -1
- package/components/tag/tag.component.d.ts +0 -26
- package/components/text-capitalize/index.d.ts +0 -1
- package/components/text-capitalize/text-capitalize.directive.d.ts +0 -18
- package/components/text-ellipsis/index.d.ts +0 -1
- package/components/text-ellipsis/text-ellipsis.directive.d.ts +0 -15
- package/components/textarea/index.d.ts +0 -1
- package/components/textarea/textarea.component.d.ts +0 -72
- package/components/time-clock/index.d.ts +0 -2
- package/components/time-clock/shared/time-clock.interface.d.ts +0 -12
- package/components/time-clock/time-clock.component.d.ts +0 -56
- package/components/toast/index.d.ts +0 -4
- package/components/toast/shared/toast-types.enum.d.ts +0 -7
- package/components/toast/shared/toast.model.d.ts +0 -7
- package/components/toast/shared/toast.service.d.ts +0 -13
- package/components/toast/toast.component.d.ts +0 -18
- package/components/toggle-switch/index.d.ts +0 -1
- package/components/toggle-switch/toggle-switch.component.d.ts +0 -49
- package/components/toolbar/index.d.ts +0 -1
- package/components/toolbar/toolbar.component.d.ts +0 -9
- package/components/top-nav/index.d.ts +0 -1
- package/components/top-nav/top-nav.component.d.ts +0 -9
- package/components/tree-table/index.d.ts +0 -8
- package/components/tree-table/shared/tree-table-arrow-animations.d.ts +0 -1
- package/components/tree-table/shared/tree-table-column-builder.model.d.ts +0 -55
- package/components/tree-table/shared/tree-table-column-condition.enum.d.ts +0 -2
- package/components/tree-table/shared/tree-table-column-partial.model.d.ts +0 -6
- package/components/tree-table/shared/tree-table-column.model.d.ts +0 -40
- package/components/tree-table/shared/tree-table-menu-item-context-builder.model.d.ts +0 -61
- package/components/tree-table/shared/tree-table-menu-item-context.model.d.ts +0 -45
- package/components/tree-table/tree-table.component.d.ts +0 -91
- package/components/user-profile/index.d.ts +0 -1
- package/components/user-profile/shared/user-profile-arrow-animations.d.ts +0 -1
- package/components/user-profile/user-profile.component.d.ts +0 -28
- package/decorators/debounce.decorator.d.ts +0 -33
- package/decorators/index.d.ts +0 -1
- package/enums/index.d.ts +0 -3
- package/enums/menu-type.enum.d.ts +0 -6
- package/enums/sort-direction.enum.d.ts +0 -5
- package/enums/type-operation-dialog.enum.d.ts +0 -12
- package/guards/auth.guard.d.ts +0 -3
- package/guards/index.d.ts +0 -2
- package/guards/public.guard.d.ts +0 -3
- package/interceptors/auth.interceptor.d.ts +0 -2
- package/interceptors/error.interceptor.d.ts +0 -13
- package/interceptors/index.d.ts +0 -2
- package/interfaces/filter-persistence.interface.d.ts +0 -29
- package/interfaces/index.d.ts +0 -2
- package/interfaces/permissions.interface.d.ts +0 -4
- package/pipes/index.d.ts +0 -1
- package/pipes/money.pipe.d.ts +0 -20
- package/public-api.d.ts +0 -14
- package/services/cacheable.service.d.ts +0 -41
- package/services/dialog.service.d.ts +0 -65
- package/services/file-saver.service.d.ts +0 -11
- package/services/filter-indexed-db.service.d.ts +0 -100
- package/services/filter-persistence.service.d.ts +0 -53
- package/services/filter-url.service.d.ts +0 -81
- package/services/index.d.ts +0 -9
- package/services/moment-date-adapter.service.d.ts +0 -8
- package/services/native-date-adapter.service.d.ts +0 -8
- package/services/svg-register.service.d.ts +0 -33
- package/signals/filter.signal.d.ts +0 -41
- package/signals/index.d.ts +0 -1
- package/tokens/allowed-public-routes.token.d.ts +0 -26
- package/tokens/app-messages.token.d.ts +0 -13
- package/tokens/base-auth-service.token.d.ts +0 -5
- package/tokens/echarts-core.token.d.ts +0 -4
- package/tokens/index.d.ts +0 -6
- package/tokens/ngx-currency-options.token.d.ts +0 -5
- package/tokens/paginator-intl.token.d.ts +0 -5
- package/types/booleanish.type.d.ts +0 -1
- package/types/implicit-template.type.d.ts +0 -4
- package/types/index.d.ts +0 -8
- package/types/mixable-object.type.d.ts +0 -1
- package/types/nullable.type.d.ts +0 -1
- package/types/numberish.type.d.ts +0 -1
- package/types/page-event.type.d.ts +0 -6
- package/types/uuid.type.d.ts +0 -1
- package/types/void-listener.type.d.ts +0 -1
- package/utils/array.util.d.ts +0 -13
- package/utils/css.util.d.ts +0 -12
- package/utils/currency.util.d.ts +0 -83
- package/utils/date.util.d.ts +0 -166
- package/utils/document.util.d.ts +0 -126
- package/utils/email.util.d.ts +0 -19
- package/utils/index.d.ts +0 -14
- package/utils/number-to-words.util.d.ts +0 -17
- package/utils/number.util.d.ts +0 -40
- package/utils/object.util.d.ts +0 -83
- package/utils/phone.util.d.ts +0 -103
- package/utils/states.util.d.ts +0 -182
- package/utils/storage.util.d.ts +0 -78
- package/utils/string.util.d.ts +0 -91
- package/utils/uuid.util.d.ts +0 -33
package/README.md
CHANGED
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
# GIPI - ngx-core
|
|
2
|
-
|
|
3
|
-
Este projeto foi gerado utilizando o [Angular CLI](https://github.com/angular/angular-cli) - _versão `19.2.0`_.
|
|
4
|
-
|
|
5
|
-
## 📝 Sobre
|
|
6
|
-
|
|
7
|
-
A biblioteca `ngx-core` fornece utilitários, temas e componentes reutilizáveis para projetos Angular, facilitando o desenvolvimento de interfaces consistentes e responsivas.
|
|
8
|
-
|
|
9
|
-
## 🧩 Pré-requisitos
|
|
10
|
-
|
|
11
|
-
- [Node](https://nodejs.org/en/download) - _vesão `^18.19.1 || ^20.11.1 || ^22.0.0`._
|
|
12
|
-
- [Angular](https://angular.dev/) - _versão `^19.2.0`._
|
|
13
|
-
- [Angular Material](https://material.angular.io/) - _versão `^19.2.0`_.
|
|
14
|
-
- [Extenso](https://github.com/lusofonia/extenso.js) - _versão `^2.1.0`_.
|
|
15
|
-
- [Moment-timezone](https://momentjs.com/timezone/) - _versão `^0.5.47`_.
|
|
16
|
-
|
|
17
|
-
## ⚠️ Estrutura de Commits (Conventional Commits)
|
|
18
|
-
|
|
19
|
-
Este projeto utiliza **Semantic Release** para gerar versões automaticamente.
|
|
20
|
-
A versão (`patch`, `minor`, `major`) é definida de acordo com o **tipo do commit**.
|
|
21
|
-
|
|
22
|
-
### 🔑 Regras principais
|
|
23
|
-
- **fix:** incrementa **patch** → `1.0.0 → 1.0.1`
|
|
24
|
-
- **feat:** incrementa **minor** → `1.0.0 → 1.1.0`
|
|
25
|
-
- **feat!:** ou qualquer commit com **BREAKING CHANGE** no corpo → incrementa **major** → `1.0.0 → 2.0.0`
|
|
26
|
-
|
|
27
|
-
### ✅ Exemplos de commits válidos
|
|
28
|
-
- `fix: corrige bug no botão de login`
|
|
29
|
-
- `feat: adiciona novo componente de avatar`
|
|
30
|
-
- `feat!: altera API de autenticação`
|
|
31
|
-
- `chore: atualiza dependências (não gera release)`
|
|
32
|
-
- `docs: adiciona instruções no README (não gera release)`
|
|
33
|
-
|
|
34
|
-
### ⚠️ Importante
|
|
35
|
-
Sempre coloque dois pontos e um espaço depois do tipo.
|
|
36
|
-
- ✅ fix: descrição
|
|
37
|
-
- ❌ fix:descrição
|
|
38
|
-
|
|
39
|
-
Somente commits fix, feat ou com BREAKING CHANGE geram versão.
|
|
40
|
-
Outros tipos (chore, docs, refactor, etc.) não geram release automaticamente.
|
|
41
|
-
|
|
42
|
-
## 🛠️ Desenvolvimento
|
|
43
|
-
|
|
44
|
-
Para compilar a biblioteca em modo de desenvolvimento, execute:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
npm run watch
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Isso executará o comando:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
ng build --watch --configuration development
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Uma vez compilada. A biblioteca será recarregada automaticamente sempre que houver modificações nos arquivos.
|
|
57
|
-
|
|
58
|
-
## 🖥️ Utilização no aplicativo
|
|
59
|
-
|
|
60
|
-
Para utilizar esta biblioteca, siga os passos abaixo:
|
|
61
|
-
|
|
62
|
-
### 1️⃣ Instalar a biblioteca no aplicativo
|
|
63
|
-
|
|
64
|
-
Instale a biblioteca no seu aplicativo Angular executando:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
npm install caminho-da-lib\\dist\\ngx-core
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Substitua `caminho-da-lib` pelo caminho correto onde a biblioteca foi compilada.
|
|
71
|
-
|
|
72
|
-
### 2️⃣ Configurar `preserveSymlinks`
|
|
73
|
-
|
|
74
|
-
É necessário definir `preserveSymlinks: true` no arquivo `angular.json` para evitar o seguinte erro:
|
|
75
|
-
|
|
76
|
-
```plaintext
|
|
77
|
-
core.mjs:7195 ERROR RuntimeError: NG0203: inject() must be called from an injection context...
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
🔹 No `angular.json`, dentro de `projects -> nome-do-projeto -> architect -> build -> options`, adicione:
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
"preserveSymlinks": true
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### 3️⃣ Adicionar os providers necessários
|
|
87
|
-
|
|
88
|
-
Esses providers são essenciais para o funcionamento da biblioteca.
|
|
89
|
-
No `main.ts` ou no arquivo de configuração `app.config.ts`, adicione os seguintes providers:
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
import { bootstrapApplication } from "@angular/platform-browser";
|
|
93
|
-
import { AppComponent } from "./app/app.component";
|
|
94
|
-
import { importProvidersFrom } from "@angular/core";
|
|
95
|
-
import { MatSnackBarModule } from "@angular/material/snack-bar";
|
|
96
|
-
import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
|
|
97
|
-
import { provideAppMessages, DEFAULT_MESSAGES } from "@gipisistemas/ngx-core";
|
|
98
|
-
|
|
99
|
-
bootstrapApplication(AppComponent, {
|
|
100
|
-
providers: [
|
|
101
|
-
// ...outros providers
|
|
102
|
-
importProvidersFrom(MatSnackBarModule),
|
|
103
|
-
provideHttpClient(withInterceptorsFromDi()),
|
|
104
|
-
provideAppMessages(DEFAULT_MESSAGES),
|
|
105
|
-
],
|
|
106
|
-
}).catch((err) => console.error(err));
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 4️⃣ Temas e estilos globais
|
|
110
|
-
|
|
111
|
-
Definição de temas:
|
|
112
|
-
|
|
113
|
-
🔹 Se não informar o `$custom-theme` no mixin `all-component-themes` a biblioteca irá aderir as paletas de cores, fontes e densidades padrão.
|
|
114
|
-
|
|
115
|
-
##### Palettes
|
|
116
|
-
|
|
117
|
-
- primary: `$palette-primary`
|
|
118
|
-
- secondary: `$palette-secondary`
|
|
119
|
-
- success: `$palette-success`
|
|
120
|
-
- information: `$palette-information`
|
|
121
|
-
- warning: `$palette-warning`
|
|
122
|
-
- danger: `$palette-danger`
|
|
123
|
-
- white: `$palette-white`
|
|
124
|
-
- black: `$palette-black`
|
|
125
|
-
- pastels: `$palette-pastels`
|
|
126
|
-
|
|
127
|
-
##### Typography
|
|
128
|
-
|
|
129
|
-
- font-family: `'Roboto, sans-serif'`
|
|
130
|
-
- font-size: `1.4rem`
|
|
131
|
-
- font-base: `62.5%` - _100% equivale a 16px; Logo 62.5% de 16px = 10px; Assim 1rem equivale 10px;_
|
|
132
|
-
|
|
133
|
-
##### Density
|
|
134
|
-
|
|
135
|
-
- scale: `0`
|
|
136
|
-
|
|
137
|
-
Utilizando tema customizado:
|
|
138
|
-
|
|
139
|
-
```scss
|
|
140
|
-
@use "@gipisistemas/ngx-core" as ngx-core;
|
|
141
|
-
|
|
142
|
-
$custom-theme: ngx-core.define-theme(
|
|
143
|
-
(
|
|
144
|
-
palettes: (
|
|
145
|
-
primary: $palette-primary,
|
|
146
|
-
secondary: $palette-secondary,
|
|
147
|
-
// ... other palettes
|
|
148
|
-
),
|
|
149
|
-
typography: (
|
|
150
|
-
font-family: "Roboto, sans-serif",
|
|
151
|
-
font-size: 1.4rem,
|
|
152
|
-
font-base: 62.5%,
|
|
153
|
-
),
|
|
154
|
-
)
|
|
155
|
-
);
|
|
156
|
-
|
|
157
|
-
@include ngx-core.all-component-themes($custom-theme);
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Utilizando tema padrão:
|
|
161
|
-
|
|
162
|
-
```scss
|
|
163
|
-
@use "@gipisistemas/ngx-core" as ngx-core;
|
|
164
|
-
@include ngx-core.all-component-themes();
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
## 🚀 Produção
|
|
168
|
-
Ainda será implementado
|
|
1
|
+
# GIPI - ngx-core
|
|
2
|
+
|
|
3
|
+
Este projeto foi gerado utilizando o [Angular CLI](https://github.com/angular/angular-cli) - _versão `19.2.0`_.
|
|
4
|
+
|
|
5
|
+
## 📝 Sobre
|
|
6
|
+
|
|
7
|
+
A biblioteca `ngx-core` fornece utilitários, temas e componentes reutilizáveis para projetos Angular, facilitando o desenvolvimento de interfaces consistentes e responsivas.
|
|
8
|
+
|
|
9
|
+
## 🧩 Pré-requisitos
|
|
10
|
+
|
|
11
|
+
- [Node](https://nodejs.org/en/download) - _vesão `^18.19.1 || ^20.11.1 || ^22.0.0`._
|
|
12
|
+
- [Angular](https://angular.dev/) - _versão `^19.2.0`._
|
|
13
|
+
- [Angular Material](https://material.angular.io/) - _versão `^19.2.0`_.
|
|
14
|
+
- [Extenso](https://github.com/lusofonia/extenso.js) - _versão `^2.1.0`_.
|
|
15
|
+
- [Moment-timezone](https://momentjs.com/timezone/) - _versão `^0.5.47`_.
|
|
16
|
+
|
|
17
|
+
## ⚠️ Estrutura de Commits (Conventional Commits)
|
|
18
|
+
|
|
19
|
+
Este projeto utiliza **Semantic Release** para gerar versões automaticamente.
|
|
20
|
+
A versão (`patch`, `minor`, `major`) é definida de acordo com o **tipo do commit**.
|
|
21
|
+
|
|
22
|
+
### 🔑 Regras principais
|
|
23
|
+
- **fix:** incrementa **patch** → `1.0.0 → 1.0.1`
|
|
24
|
+
- **feat:** incrementa **minor** → `1.0.0 → 1.1.0`
|
|
25
|
+
- **feat!:** ou qualquer commit com **BREAKING CHANGE** no corpo → incrementa **major** → `1.0.0 → 2.0.0`
|
|
26
|
+
|
|
27
|
+
### ✅ Exemplos de commits válidos
|
|
28
|
+
- `fix: corrige bug no botão de login`
|
|
29
|
+
- `feat: adiciona novo componente de avatar`
|
|
30
|
+
- `feat!: altera API de autenticação`
|
|
31
|
+
- `chore: atualiza dependências (não gera release)`
|
|
32
|
+
- `docs: adiciona instruções no README (não gera release)`
|
|
33
|
+
|
|
34
|
+
### ⚠️ Importante
|
|
35
|
+
Sempre coloque dois pontos e um espaço depois do tipo.
|
|
36
|
+
- ✅ fix: descrição
|
|
37
|
+
- ❌ fix:descrição
|
|
38
|
+
|
|
39
|
+
Somente commits fix, feat ou com BREAKING CHANGE geram versão.
|
|
40
|
+
Outros tipos (chore, docs, refactor, etc.) não geram release automaticamente.
|
|
41
|
+
|
|
42
|
+
## 🛠️ Desenvolvimento
|
|
43
|
+
|
|
44
|
+
Para compilar a biblioteca em modo de desenvolvimento, execute:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm run watch
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Isso executará o comando:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
ng build --watch --configuration development
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Uma vez compilada. A biblioteca será recarregada automaticamente sempre que houver modificações nos arquivos.
|
|
57
|
+
|
|
58
|
+
## 🖥️ Utilização no aplicativo
|
|
59
|
+
|
|
60
|
+
Para utilizar esta biblioteca, siga os passos abaixo:
|
|
61
|
+
|
|
62
|
+
### 1️⃣ Instalar a biblioteca no aplicativo
|
|
63
|
+
|
|
64
|
+
Instale a biblioteca no seu aplicativo Angular executando:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install caminho-da-lib\\dist\\ngx-core
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Substitua `caminho-da-lib` pelo caminho correto onde a biblioteca foi compilada.
|
|
71
|
+
|
|
72
|
+
### 2️⃣ Configurar `preserveSymlinks`
|
|
73
|
+
|
|
74
|
+
É necessário definir `preserveSymlinks: true` no arquivo `angular.json` para evitar o seguinte erro:
|
|
75
|
+
|
|
76
|
+
```plaintext
|
|
77
|
+
core.mjs:7195 ERROR RuntimeError: NG0203: inject() must be called from an injection context...
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
🔹 No `angular.json`, dentro de `projects -> nome-do-projeto -> architect -> build -> options`, adicione:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
"preserveSymlinks": true
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 3️⃣ Adicionar os providers necessários
|
|
87
|
+
|
|
88
|
+
Esses providers são essenciais para o funcionamento da biblioteca.
|
|
89
|
+
No `main.ts` ou no arquivo de configuração `app.config.ts`, adicione os seguintes providers:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
import { bootstrapApplication } from "@angular/platform-browser";
|
|
93
|
+
import { AppComponent } from "./app/app.component";
|
|
94
|
+
import { importProvidersFrom } from "@angular/core";
|
|
95
|
+
import { MatSnackBarModule } from "@angular/material/snack-bar";
|
|
96
|
+
import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
|
|
97
|
+
import { provideAppMessages, DEFAULT_MESSAGES } from "@gipisistemas/ngx-core";
|
|
98
|
+
|
|
99
|
+
bootstrapApplication(AppComponent, {
|
|
100
|
+
providers: [
|
|
101
|
+
// ...outros providers
|
|
102
|
+
importProvidersFrom(MatSnackBarModule),
|
|
103
|
+
provideHttpClient(withInterceptorsFromDi()),
|
|
104
|
+
provideAppMessages(DEFAULT_MESSAGES),
|
|
105
|
+
],
|
|
106
|
+
}).catch((err) => console.error(err));
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 4️⃣ Temas e estilos globais
|
|
110
|
+
|
|
111
|
+
Definição de temas:
|
|
112
|
+
|
|
113
|
+
🔹 Se não informar o `$custom-theme` no mixin `all-component-themes` a biblioteca irá aderir as paletas de cores, fontes e densidades padrão.
|
|
114
|
+
|
|
115
|
+
##### Palettes
|
|
116
|
+
|
|
117
|
+
- primary: `$palette-primary`
|
|
118
|
+
- secondary: `$palette-secondary`
|
|
119
|
+
- success: `$palette-success`
|
|
120
|
+
- information: `$palette-information`
|
|
121
|
+
- warning: `$palette-warning`
|
|
122
|
+
- danger: `$palette-danger`
|
|
123
|
+
- white: `$palette-white`
|
|
124
|
+
- black: `$palette-black`
|
|
125
|
+
- pastels: `$palette-pastels`
|
|
126
|
+
|
|
127
|
+
##### Typography
|
|
128
|
+
|
|
129
|
+
- font-family: `'Roboto, sans-serif'`
|
|
130
|
+
- font-size: `1.4rem`
|
|
131
|
+
- font-base: `62.5%` - _100% equivale a 16px; Logo 62.5% de 16px = 10px; Assim 1rem equivale 10px;_
|
|
132
|
+
|
|
133
|
+
##### Density
|
|
134
|
+
|
|
135
|
+
- scale: `0`
|
|
136
|
+
|
|
137
|
+
Utilizando tema customizado:
|
|
138
|
+
|
|
139
|
+
```scss
|
|
140
|
+
@use "@gipisistemas/ngx-core" as ngx-core;
|
|
141
|
+
|
|
142
|
+
$custom-theme: ngx-core.define-theme(
|
|
143
|
+
(
|
|
144
|
+
palettes: (
|
|
145
|
+
primary: $palette-primary,
|
|
146
|
+
secondary: $palette-secondary,
|
|
147
|
+
// ... other palettes
|
|
148
|
+
),
|
|
149
|
+
typography: (
|
|
150
|
+
font-family: "Roboto, sans-serif",
|
|
151
|
+
font-size: 1.4rem,
|
|
152
|
+
font-base: 62.5%,
|
|
153
|
+
),
|
|
154
|
+
)
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
@include ngx-core.all-component-themes($custom-theme);
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Utilizando tema padrão:
|
|
161
|
+
|
|
162
|
+
```scss
|
|
163
|
+
@use "@gipisistemas/ngx-core" as ngx-core;
|
|
164
|
+
@include ngx-core.all-component-themes();
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## 🚀 Produção
|
|
168
|
+
Ainda será implementado
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
&[data-state='
|
|
60
|
+
&[data-state='indeterminate']::after {
|
|
61
61
|
content: '-';
|
|
62
62
|
display: block;
|
|
63
63
|
text-align: center;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/* Estado "unchecked" */
|
|
77
|
-
&:not(:checked)[data-state='
|
|
77
|
+
&:not(:checked)[data-state='unchecked'] {
|
|
78
78
|
color: transparent;
|
|
79
79
|
|
|
80
80
|
&.primary {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
|
|
90
90
|
/* Estado "checked" */
|
|
91
91
|
&:checked,
|
|
92
|
-
&[data-state='
|
|
92
|
+
&[data-state='checked'] {
|
|
93
93
|
color: $white-100;
|
|
94
94
|
|
|
95
95
|
&.primary,
|
|
@@ -100,7 +100,8 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/* Estado "indeterminate" */
|
|
103
|
-
|
|
103
|
+
&:indeterminate,
|
|
104
|
+
&[data-state='indeterminate'] {
|
|
104
105
|
&.primary {
|
|
105
106
|
background-color: $white-100;
|
|
106
107
|
border-color: $primary-500;
|
|
@@ -12,24 +12,24 @@
|
|
|
12
12
|
$primary-600: utils.get-color($theme, primary, 600);
|
|
13
13
|
|
|
14
14
|
.g-chips-control .mdc-evolution-chip-set__chips {
|
|
15
|
-
--
|
|
16
|
-
--
|
|
15
|
+
--mat-chip-container-shape-radius: 2rem;
|
|
16
|
+
--mat-chip-container-height: 2.6rem;
|
|
17
17
|
|
|
18
18
|
margin-left: 0 !important;
|
|
19
19
|
align-items: center !important;
|
|
20
20
|
gap: 1rem !important;
|
|
21
21
|
|
|
22
22
|
&:not(.g-chips-control-item-all) {
|
|
23
|
-
--
|
|
24
|
-
--
|
|
25
|
-
--
|
|
23
|
+
--mat-chip-elevated-container-color: #{$secondary-100};
|
|
24
|
+
--mat-chip-outline-color: #{$secondary-200};
|
|
25
|
+
--mat-chip-label-text-color: #{$font-color};
|
|
26
26
|
cursor: default;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.g-chips-control-item-all {
|
|
30
|
-
--
|
|
31
|
-
--
|
|
32
|
-
--
|
|
30
|
+
--mat-chip-elevated-container-color: #{$primary-500};
|
|
31
|
+
--mat-chip-outline-color: #{$primary-600};
|
|
32
|
+
--mat-chip-label-text-color: #{$white-100};
|
|
33
33
|
|
|
34
34
|
.mdc-evolution-chip__cell .mat-mdc-chip-action {
|
|
35
35
|
cursor: pointer;
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
|
|
42
42
|
&.mat-mdc-chip-disabled {
|
|
43
43
|
--mat-chip-disabled-container-opacity: 1;
|
|
44
|
-
--
|
|
45
|
-
--
|
|
46
|
-
--
|
|
44
|
+
--mat-chip-elevated-disabled-container-color: #{$secondary-50};
|
|
45
|
+
--mat-chip-disabled-outline-color: #{$secondary-100};
|
|
46
|
+
--mat-chip-disabled-label-text-color: #{$secondary-100};
|
|
47
47
|
|
|
48
48
|
cursor: not-allowed !important;
|
|
49
49
|
}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
font-family: $font-family !important;
|
|
60
60
|
font-size: 1.2rem !important;
|
|
61
61
|
font-weight: 500 !important;
|
|
62
|
-
line-height: var(--
|
|
62
|
+
line-height: var(--mat-chip-container-height) !important;
|
|
63
63
|
letter-spacing: normal !important;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -20,6 +20,22 @@
|
|
|
20
20
|
|
|
21
21
|
.g-date-range-picker {
|
|
22
22
|
@include utils.mat-form-field-reset($theme);
|
|
23
|
+
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: 4px;
|
|
27
|
+
font-family: $font-family;
|
|
28
|
+
color: $font-color;
|
|
29
|
+
position: relative;
|
|
30
|
+
overflow: visible;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
width: 100%;
|
|
33
|
+
min-height: fit-content;
|
|
34
|
+
height: fit-content;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.g-date-range-picker-form-field {
|
|
38
|
+
width: 100%;
|
|
23
39
|
}
|
|
24
40
|
|
|
25
41
|
.cdk-overlay-pane:has(.g-date-range-picker-ckd-container) {
|
|
@@ -20,10 +20,6 @@
|
|
|
20
20
|
$secondary-300: utils.get-color($theme, secondary, 300);
|
|
21
21
|
$secondary-500: utils.get-color($theme, secondary, 500);
|
|
22
22
|
|
|
23
|
-
.g-input-file-label {
|
|
24
|
-
@include utils.field-label($theme);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
23
|
.g-input-file {
|
|
28
24
|
display: flex;
|
|
29
25
|
flex-direction: column;
|
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
$primary-500: utils.get-color($theme, primary, 500);
|
|
11
11
|
$pastels-secondary: utils.get-color($theme, pastels, secondary);
|
|
12
12
|
|
|
13
|
-
.g-input-group-label {
|
|
14
|
-
@include utils.field-label($theme);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
13
|
.g-input-group {
|
|
18
14
|
display: flex;
|
|
19
15
|
flex-direction: column;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use '../../theming/utils' as utils;
|
|
2
|
+
|
|
3
|
+
@mixin label-theme($theme: ()) {
|
|
4
|
+
$font-family: utils.get-font-family($theme);
|
|
5
|
+
$font-size: utils.get-font-size($theme);
|
|
6
|
+
$font-color: utils.get-font-color($theme);
|
|
7
|
+
|
|
8
|
+
> label {
|
|
9
|
+
@include utils.field-label($theme);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
@use '../../theming/utils' as utils;
|
|
2
|
-
// @import '@ng-matero/extensions/prebuilt-themes/azure-blue.css';
|
|
3
2
|
|
|
4
|
-
@mixin
|
|
3
|
+
@mixin month-picker-theme($theme: ()) {
|
|
5
4
|
$font-family: utils.get-font-family($theme);
|
|
6
5
|
$font-size: utils.get-font-size($theme);
|
|
7
6
|
$font-color: utils.get-font-color($theme);
|
|
8
7
|
|
|
9
|
-
.g-
|
|
10
|
-
@include utils.field-label($theme);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.g-datetime-picker {
|
|
8
|
+
.g-month-picker {
|
|
14
9
|
@include utils.mat-form-field-reset($theme);
|
|
15
10
|
|
|
16
11
|
display: flex;
|
|
@@ -25,4 +20,14 @@
|
|
|
25
20
|
min-height: fit-content;
|
|
26
21
|
height: fit-content;
|
|
27
22
|
}
|
|
23
|
+
|
|
24
|
+
.g-month-picker-calendar {
|
|
25
|
+
.mat-calendar-period-button {
|
|
26
|
+
pointer-events: none !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mat-calendar-arrow {
|
|
30
|
+
display: none !important;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
28
33
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use '../../theming/utils' as utils;
|
|
2
|
+
|
|
3
|
+
@mixin paginator-theme($theme: ()) {
|
|
4
|
+
$font-family: utils.get-font-family($theme);
|
|
5
|
+
$font-size: utils.get-font-size($theme);
|
|
6
|
+
$font-color: utils.get-font-color($theme);
|
|
7
|
+
|
|
8
|
+
.g-paginator {
|
|
9
|
+
@include utils.mat-paginator($theme);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../../theming/utils' as utils;
|
|
2
|
+
@use '../../theming/breakpoints' as media;
|
|
2
3
|
|
|
3
4
|
@mixin password-requeriments-theme($theme: ()) {
|
|
4
5
|
$font-family: utils.get-font-family($theme);
|
|
@@ -15,10 +16,20 @@
|
|
|
15
16
|
flex-direction: row;
|
|
16
17
|
align-items: stretch;
|
|
17
18
|
justify-content: center;
|
|
18
|
-
gap:
|
|
19
|
-
padding:
|
|
19
|
+
gap: 4rem;
|
|
20
|
+
padding: 0.4rem 0;
|
|
20
21
|
width: 100%;
|
|
21
22
|
|
|
23
|
+
@include media.tablet-view {
|
|
24
|
+
gap: 3.2rem;
|
|
25
|
+
padding: 0.6rem 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@include media.mobile-view {
|
|
29
|
+
padding: 0.6rem 0;
|
|
30
|
+
gap: 1.6rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
22
33
|
.g-password-requeriments-group-item {
|
|
23
34
|
display: flex;
|
|
24
35
|
flex-direction: column;
|
|
@@ -26,15 +37,22 @@
|
|
|
26
37
|
justify-content: center;
|
|
27
38
|
height: 100%;
|
|
28
39
|
font-family: $font-family;
|
|
40
|
+
min-width: 6rem;
|
|
41
|
+
|
|
42
|
+
@include media.mobile-view {
|
|
43
|
+
width: 100%;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
}
|
|
29
46
|
|
|
30
47
|
&.g-password-requeriments-group-item-invalid .g-password-requeriments-group-item-title,
|
|
31
|
-
&.g-password-requeriments-group-item-invalid
|
|
48
|
+
&.g-password-requeriments-group-item-invalid
|
|
49
|
+
.g-password-requeriments-group-item-subtitle {
|
|
32
50
|
color: #{utils.get-color($theme, primary, 500)} !important;
|
|
33
51
|
}
|
|
34
52
|
|
|
35
53
|
.g-password-requeriments-group-item-title,
|
|
36
54
|
.g-password-requeriments-group-item-subtitle {
|
|
37
|
-
line-height: 1.
|
|
55
|
+
line-height: 1.6rem;
|
|
38
56
|
color: $font-color;
|
|
39
57
|
text-align: center;
|
|
40
58
|
}
|