@sapphire-ion/framework 1.0.17 → 1.0.19
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/esm2022/lib/classes/inputs/table-field-form-builder.mjs +1 -1
- package/esm2022/lib/components/default/default-list/abstract-list.mjs +1 -1
- package/esm2022/lib/components/default/default-list/default-list.component.mjs +4 -4
- package/esm2022/lib/components/default/default-list/header-list/header-list.component.mjs +1 -1
- package/esm2022/lib/components/default/default-list/list.mjs +1 -1
- package/esm2022/lib/components/default/default-pagination/default-pagination.component.mjs +5 -5
- package/esm2022/lib/components/default/default-table/default-table.component.mjs +161 -163
- package/esm2022/lib/components/default/default-table/th-filter/th-filter.component.mjs +3 -3
- package/esm2022/lib/components/default/default-view/abstract-view.mjs +1 -1
- package/esm2022/lib/components/default/default-view/default-view.component.mjs +3 -3
- package/esm2022/lib/components/default/default-view/view.mjs +19 -6
- package/esm2022/lib/components/default-page/default.page.mjs +3 -3
- package/esm2022/lib/components/drawer/drawer-group/drawer-group.component.mjs +3 -3
- package/esm2022/lib/components/drawer/drawer.component.mjs +5 -5
- package/esm2022/lib/components/filter/filter.component.mjs +4 -1
- package/esm2022/lib/components/inputs/custom-input.mjs +1 -1
- package/esm2022/lib/components/inputs/input-bool/input-bool.component.mjs +11 -5
- package/esm2022/lib/components/inputs/input-cep/input-cep.component.mjs +19 -10
- package/esm2022/lib/components/inputs/input-color/input-color.component.mjs +15 -8
- package/esm2022/lib/components/inputs/input-cpf-cnpj/input-cpf-cnpj.component.mjs +46 -15
- package/esm2022/lib/components/inputs/input-date/input-date.component.mjs +12 -6
- package/esm2022/lib/components/inputs/input-decimal/input-decimal.component.mjs +11 -5
- package/esm2022/lib/components/inputs/input-file/input-file.component.mjs +14 -6
- package/esm2022/lib/components/inputs/input-icon/input-icon.component.mjs +12 -6
- package/esm2022/lib/components/inputs/input-select/directives/sion-label-template.directive.mjs +1 -1
- package/esm2022/lib/components/inputs/input-select/directives/sion-option-template.directive.mjs +1 -3
- package/esm2022/lib/components/inputs/input-select/directives/sion-placeholder-template.directive.mjs +1 -1
- package/esm2022/lib/components/inputs/input-select/input-select.component.mjs +13 -5
- package/esm2022/lib/components/inputs/input-select/input.select.configuration.mjs +5 -5
- package/esm2022/lib/components/inputs/input-string/input-string.component.mjs +12 -6
- package/esm2022/lib/components/inputs/input-telefone/input-telefone.component.mjs +22 -11
- package/esm2022/lib/components/inputs/input-textarea/input-textarea.component.mjs +12 -6
- package/esm2022/lib/components/login/login-admin/login-admin.component.mjs +2 -2
- package/esm2022/lib/components/login/login.component.mjs +4 -4
- package/esm2022/lib/components/popover/sion-popover/sion-popover.component.mjs +15 -4
- package/esm2022/lib/components/sion-card/sion-card.component.mjs +26 -0
- package/esm2022/lib/components/stepper/stepper.component.mjs +4 -4
- package/esm2022/lib/guards/error.interceptor.mjs +3 -3
- package/esm2022/lib/index.mjs +4 -2
- package/esm2022/lib/services/generic.service.mjs +84 -0
- package/esm2022/lib/services/usuario.service.mjs +3 -3
- package/esm2022/lib/services/web/http.ativo.service.mjs +4 -22
- package/esm2022/lib/services/web/http.service.mjs +26 -15
- package/esm2022/lib/services/web/storage.service.mjs +3 -3
- package/fesm2022/sapphire-ion-framework.mjs +659 -509
- package/fesm2022/sapphire-ion-framework.mjs.map +1 -1
- package/lib/classes/inputs/table-field-form-builder.d.ts +1 -1
- package/lib/components/default/default-list/abstract-list.d.ts +1 -1
- package/lib/components/default/default-list/default-list.component.d.ts +1 -1
- package/lib/components/default/default-list/list.d.ts +1 -1
- package/lib/components/default/default-pagination/default-pagination.component.d.ts +1 -1
- package/lib/components/default/default-table/default-table.component.d.ts +60 -44
- package/lib/components/default/default-view/abstract-view.d.ts +1 -1
- package/lib/components/default/default-view/default-view.component.d.ts +1 -1
- package/lib/components/default/default-view/view.d.ts +5 -2
- package/lib/components/default-page/default.page.d.ts +1 -1
- package/lib/components/drawer/drawer-group/drawer-group.component.d.ts +1 -1
- package/lib/components/drawer/drawer.component.d.ts +1 -1
- package/lib/components/inputs/custom-input.d.ts +1 -1
- package/lib/components/inputs/input-bool/input-bool.component.d.ts +1 -1
- package/lib/components/inputs/input-cep/input-cep.component.d.ts +3 -3
- package/lib/components/inputs/input-color/input-color.component.d.ts +2 -2
- package/lib/components/inputs/input-cpf-cnpj/input-cpf-cnpj.component.d.ts +3 -4
- package/lib/components/inputs/input-date/input-date.component.d.ts +1 -1
- package/lib/components/inputs/input-decimal/input-decimal.component.d.ts +1 -1
- package/lib/components/inputs/input-file/input-file.component.d.ts +1 -1
- package/lib/components/inputs/input-icon/input-icon.component.d.ts +1 -1
- package/lib/components/inputs/input-select/directives/sion-label-template.directive.d.ts +6 -0
- package/lib/components/inputs/input-select/directives/sion-option-template.directive.d.ts +4 -1
- package/lib/components/inputs/input-select/directives/sion-placeholder-template.directive.d.ts +8 -2
- package/lib/components/inputs/input-select/input-select.component.d.ts +1 -1
- package/lib/components/inputs/input-select/input.select.configuration.d.ts +1 -1
- package/lib/components/inputs/input-string/input-string.component.d.ts +1 -1
- package/lib/components/inputs/input-telefone/input-telefone.component.d.ts +2 -1
- package/lib/components/inputs/input-textarea/input-textarea.component.d.ts +1 -1
- package/lib/components/login/login.component.d.ts +1 -1
- package/lib/components/popover/sion-popover/sion-popover.component.d.ts +1 -0
- package/lib/components/sion-card/sion-card.component.d.ts +11 -0
- package/lib/components/stepper/stepper.component.d.ts +2 -2
- package/lib/guards/error.interceptor.d.ts +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/services/usuario.service.d.ts +1 -1
- package/lib/services/web/http.ativo.service.d.ts +1 -12
- package/lib/services/web/http.service.d.ts +16 -7
- package/lib/services/web/storage.service.d.ts +1 -1
- package/package.json +5 -5
- package/themes/compiled-styles.scss +17 -6
- package/themes/components/default/default-pagination/default-pagination.component.scss +1 -4
- package/themes/components/default/default-table/default-table.component.scss +3 -19
- package/themes/components/inputs/inputs.scss +1 -1
- package/themes/components/popover/sion-popover/sion-popover.component.scss +1 -1
- package/themes/components/sion-card/sion-card.component.scss +0 -0
- package/themes/styles/core.styles.scss +16 -12
- package/themes/styles/login-default.scss +1 -1
- package/themes/styles/styles.scss +1 -1
- package/esm2022/lib/components/inputs/input-cep/input-cep.configuration.mjs +0 -6
- package/esm2022/lib/services/generics.service.mjs +0 -84
- package/lib/components/inputs/input-cep/input-cep.configuration.d.ts +0 -5
- /package/lib/services/{generics.service.d.ts → generic.service.d.ts} +0 -0
|
@@ -3,20 +3,25 @@ import { HttpClient } from '@angular/common/http';
|
|
|
3
3
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
4
4
|
import { NavController } from '@ionic/angular';
|
|
5
5
|
import { ApiUrlProviderService } from './api-url-provider.service';
|
|
6
|
-
import { GenericService } from '
|
|
6
|
+
import { GenericService } from '../generic.service';
|
|
7
7
|
import { ViewFiltros } from '../../classes/filters/view-filtros';
|
|
8
8
|
import { TableField } from '../../classes/inputs/table-field';
|
|
9
9
|
import { View } from '../../components/default/default-view/view';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
export declare abstract class HttpService<V = any> {
|
|
12
|
-
protected http
|
|
13
|
-
protected fb
|
|
14
|
-
protected genericService
|
|
15
|
-
protected navController
|
|
16
|
-
protected apiUrlProviderService
|
|
12
|
+
protected http?: HttpClient;
|
|
13
|
+
protected fb?: FormBuilder;
|
|
14
|
+
protected genericService?: GenericService;
|
|
15
|
+
protected navController?: NavController;
|
|
16
|
+
protected apiUrlProviderService?: ApiUrlProviderService;
|
|
17
17
|
abstract route: string;
|
|
18
18
|
abstract title: string;
|
|
19
|
-
constructor(http
|
|
19
|
+
constructor(http?: HttpClient, fb?: FormBuilder, genericService?: GenericService, navController?: NavController, apiUrlProviderService?: ApiUrlProviderService);
|
|
20
|
+
/**
|
|
21
|
+
* Retorna a rota completa do serviço
|
|
22
|
+
* @return string
|
|
23
|
+
* @example 'https://api.example.com/{route}'
|
|
24
|
+
*/
|
|
20
25
|
get fullRoute(): string;
|
|
21
26
|
/**
|
|
22
27
|
* Retorna os dados de acordo com os filtros
|
|
@@ -33,9 +38,13 @@ export declare abstract class HttpService<V = any> {
|
|
|
33
38
|
Delete(id: number): Observable<void>;
|
|
34
39
|
/** Retorna todos os dados */
|
|
35
40
|
Load(vFiltros?: ViewFiltros): Promise<ViewRetorno<V>>;
|
|
41
|
+
/** Retorna os campos da tabela */
|
|
36
42
|
get lstTableFields(): TableField[];
|
|
43
|
+
/** Retorna os campos da tabela para visualização/edição (se vazio retornara o padrão (lstTableFields)) */
|
|
37
44
|
get lstTableFieldsView(): TableField[];
|
|
45
|
+
/** Retora o TableField padrão de id */
|
|
38
46
|
get defaultId(): TableField;
|
|
47
|
+
/** Retora o TableField padrão de idEmpresa */
|
|
39
48
|
get defaultIdEmpresa(): TableField;
|
|
40
49
|
private get hasFileForm();
|
|
41
50
|
protected _Save(formData: FormData, view: View<HttpService>): Observable<any | void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ApiUrlProviderService } from './api-url-provider.service';
|
|
4
|
-
import { GenericService } from '../
|
|
4
|
+
import { GenericService } from '../generic.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class StorageService {
|
|
7
7
|
private http;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapphire-ion/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^18.2.8",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"@maskito/phone": "^3.1.0",
|
|
14
14
|
"@ngx-translate/core": "^16.0.3",
|
|
15
15
|
"jwt-decode": "^4.0.0",
|
|
16
|
-
"@capawesome/capacitor-file-picker": "^
|
|
17
|
-
"@capacitor/preferences": "^
|
|
18
|
-
"@capacitor/clipboard": "^
|
|
19
|
-
"@capacitor/camera": "^
|
|
16
|
+
"@capawesome/capacitor-file-picker": "^6.2.0",
|
|
17
|
+
"@capacitor/preferences": "^6.0.3",
|
|
18
|
+
"@capacitor/clipboard": "^6.0.2",
|
|
19
|
+
"@capacitor/camera": "^6.1.2",
|
|
20
20
|
"@floating-ui/dom": "^1.6.13",
|
|
21
21
|
"@types/node": "^20.11.2",
|
|
22
22
|
"ts-node": "^8.3.0",
|
|
@@ -1172,6 +1172,10 @@ video {
|
|
|
1172
1172
|
max-height: 100% !important;
|
|
1173
1173
|
}
|
|
1174
1174
|
|
|
1175
|
+
.max-h-10 {
|
|
1176
|
+
max-height: 2.5rem;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1175
1179
|
.max-h-full {
|
|
1176
1180
|
max-height: 100%;
|
|
1177
1181
|
}
|
|
@@ -1249,6 +1253,10 @@ video {
|
|
|
1249
1253
|
width: 12rem;
|
|
1250
1254
|
}
|
|
1251
1255
|
|
|
1256
|
+
.w-5 {
|
|
1257
|
+
width: 1.25rem;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1252
1260
|
.w-56 {
|
|
1253
1261
|
width: 14rem;
|
|
1254
1262
|
}
|
|
@@ -1848,6 +1856,11 @@ video {
|
|
|
1848
1856
|
border-style: none;
|
|
1849
1857
|
}
|
|
1850
1858
|
|
|
1859
|
+
.border-red-500 {
|
|
1860
|
+
--tw-border-opacity: 1;
|
|
1861
|
+
border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1851
1864
|
.border-transparent {
|
|
1852
1865
|
border-color: transparent;
|
|
1853
1866
|
}
|
|
@@ -2048,6 +2061,10 @@ video {
|
|
|
2048
2061
|
padding-bottom: 0px !important;
|
|
2049
2062
|
}
|
|
2050
2063
|
|
|
2064
|
+
.\!pl-2 {
|
|
2065
|
+
padding-left: 0.5rem !important;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2051
2068
|
.\!pl-8 {
|
|
2052
2069
|
padding-left: 2rem !important;
|
|
2053
2070
|
}
|
|
@@ -2371,12 +2388,6 @@ video {
|
|
|
2371
2388
|
margin-right: 0px;
|
|
2372
2389
|
}
|
|
2373
2390
|
|
|
2374
|
-
@supports selector(::-webkit-scrollbar-thumb) {
|
|
2375
|
-
.supports-\[selector\(\:\:-webkit-scrollbar-thumb\)\]\:\!w-\[3\.375rem\] {
|
|
2376
|
-
width: 3.375rem !important;
|
|
2377
|
-
}
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
2391
|
@media (min-width: 640px) {
|
|
2381
2392
|
.sm\:flex-row {
|
|
2382
2393
|
flex-direction: row;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
#pagination{
|
|
2
|
-
background-color: var(--ion-color-
|
|
2
|
+
background-color: color-mix(in srgb, var(--ion-color-dark) 10%, var(--ion-color-light));
|
|
3
3
|
color: var(--ion-color-step-700);
|
|
4
|
-
@media (prefers-color-scheme: light) {
|
|
5
|
-
background-color: var(--ion-framework-table-light);
|
|
6
|
-
}
|
|
7
4
|
}
|
|
8
5
|
|
|
9
6
|
button.page{
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
background-color: var(--ion-color-step-200);
|
|
5
|
-
#up, #down{ opacity: 1 !important; color: var(--ion-color-step-700) !important }
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
.order-switch{
|
|
9
|
-
#up, #down{ opacity: 0; transition: all 300ms; }
|
|
10
|
-
transition: background-color 300ms;
|
|
11
|
-
&.ordering-asc{
|
|
12
|
-
#up { color: var(--ion-color-primary) !important; opacity: 1; }
|
|
13
|
-
#down{ color: var(--ion-color-step-800) !important; opacity: 1; }
|
|
14
|
-
}
|
|
15
|
-
&.ordering-desc{
|
|
16
|
-
#up { color: var(--ion-color-step-800) !important; opacity: 1; }
|
|
17
|
-
#down{ color: var(--ion-color-primary) !important; opacity: 1; }
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
.th:hover > .order{
|
|
2
|
+
opacity: 1;
|
|
3
|
+
background-color: color-mix(in srgb, var(--ion-color-light) 10%, transparent);
|
|
20
4
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@apply absolute z-50 rounded-xl;
|
|
3
3
|
width: max-content;
|
|
4
4
|
position: absolute;
|
|
5
|
-
will-change: left, top, bottom, right,
|
|
5
|
+
will-change: left, top, bottom, right, auto, opacity, filter;
|
|
6
6
|
transition: opacity, transform, filter 0.2s ease-in-out;
|
|
7
7
|
display: none;
|
|
8
8
|
}
|
|
File without changes
|
|
@@ -14,7 +14,6 @@ input-date{
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
:root {
|
|
17
|
-
--ion-framework-table-light: #dfe0e3;
|
|
18
17
|
--ion-table-filter-wrap: nowrap;
|
|
19
18
|
--ion-table-row-wrap: nowrap;
|
|
20
19
|
--ion-color-translucid: color-mix(in srgb, var(--ion-color-medium) 20%, transparent 80%);
|
|
@@ -81,16 +80,14 @@ ion-modal.filter-modal{
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
table{
|
|
84
|
-
color: var(--ion-color-
|
|
83
|
+
color: var(--ion-color-dark);
|
|
85
84
|
@apply min-w-full text-sm text-left rtl:text-right table-fixed;
|
|
86
85
|
thead{
|
|
87
86
|
@apply text-xs uppercase;
|
|
87
|
+
white-space: nowrap;
|
|
88
88
|
user-select: none;
|
|
89
|
-
background-color: var(--ion-color-
|
|
90
|
-
color: var(--ion-color-
|
|
91
|
-
@media (prefers-color-scheme: light) {
|
|
92
|
-
background-color: var(--ion-framework-table-light);
|
|
93
|
-
}
|
|
89
|
+
background-color: color-mix(in srgb, var(--ion-color-dark) 10%, var(--ion-color-light));
|
|
90
|
+
color: var(--ion-color-dark);
|
|
94
91
|
position: sticky;
|
|
95
92
|
position: -webkit-sticky;
|
|
96
93
|
top: 0;
|
|
@@ -98,18 +95,25 @@ table{
|
|
|
98
95
|
}
|
|
99
96
|
tbody{
|
|
100
97
|
tr{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
border-bottom: color-mix(in srgb, var(--ion-color-dark) 50%, transparent 50%) solid 1px;
|
|
104
|
-
&:last-child{
|
|
105
|
-
border: none;
|
|
98
|
+
td{
|
|
99
|
+
color: var(--ion-color-dark);
|
|
106
100
|
}
|
|
101
|
+
border-bottom : color-mix(in srgb, var(--ion-color-dark) 30%, transparent) solid 1px;
|
|
102
|
+
&:last-child{ border: none; }
|
|
107
103
|
&:hover{
|
|
108
104
|
background-color: color-mix(in srgb, var(--ion-color-light) 50%, var(--ion-color-dark) 10%)
|
|
109
105
|
}
|
|
110
106
|
}
|
|
111
107
|
}
|
|
112
108
|
}
|
|
109
|
+
//--background: rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.07);
|
|
110
|
+
//--ion-text-color-rgb: 255,255,255;
|
|
111
|
+
body{
|
|
112
|
+
table{
|
|
113
|
+
color: var(--ion-color-step-700);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
113
117
|
|
|
114
118
|
*{
|
|
115
119
|
font-family: 'Poppins';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "./../src/lib/components/inputs/inputs.scss";
|
|
1
|
+
// @import "./../src/lib/components/inputs/inputs.scss";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export class InputCpfCnpjConfiguration {
|
|
2
|
-
constructor(type = 'CPFCNPJ') {
|
|
3
|
-
this.type = type;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtY2VwLmNvbmZpZ3VyYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvbXBvbmVudHMvaW5wdXRzL2lucHV0LWNlcC9pbnB1dC1jZXAuY29uZmlndXJhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxNQUFNLE9BQU8seUJBQXlCO0lBQ3BDLFlBQW1CLE9BQWdCLFNBQVM7UUFBekIsU0FBSSxHQUFKLElBQUksQ0FBcUI7SUFBRSxDQUFDO0NBQ2hEIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgQ1BGQ25waiA9ICdDUEYnIHwgJ0NOUEonIHwgJ0NQRkNOUEonXHJcbmV4cG9ydCBjbGFzcyBJbnB1dENwZkNucGpDb25maWd1cmF0aW9uIHtcclxuICBjb25zdHJ1Y3RvcihwdWJsaWMgdHlwZTogQ1BGQ25waiA9ICdDUEZDTlBKJyl7fVxyXG59Il19
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Injectable } from "@angular/core";
|
|
2
|
-
import { Title } from '@angular/platform-browser';
|
|
3
|
-
import { AlertController, ToastController } from "@ionic/angular";
|
|
4
|
-
import { EnvironmentService } from './environment.service';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@ionic/angular";
|
|
7
|
-
import * as i2 from "@angular/platform-browser";
|
|
8
|
-
import * as i3 from "./environment.service";
|
|
9
|
-
export class GenericService {
|
|
10
|
-
constructor(toastController, alertController, titleController, coreService) {
|
|
11
|
-
this.toastController = toastController;
|
|
12
|
-
this.alertController = alertController;
|
|
13
|
-
this.titleController = titleController;
|
|
14
|
-
this.coreService = coreService;
|
|
15
|
-
}
|
|
16
|
-
async PresentToast(message, icon = 'alert-circle') {
|
|
17
|
-
const toast = await this.toastController.create({
|
|
18
|
-
message: message,
|
|
19
|
-
duration: 1750,
|
|
20
|
-
icon: icon,
|
|
21
|
-
position: 'bottom',
|
|
22
|
-
translucent: false,
|
|
23
|
-
});
|
|
24
|
-
await toast.present();
|
|
25
|
-
}
|
|
26
|
-
async PresentToastSuccess(message = "Salvo com sucesso!") {
|
|
27
|
-
const toast = await this.toastController.create({
|
|
28
|
-
message: message,
|
|
29
|
-
duration: 1750,
|
|
30
|
-
icon: 'checkmark-circle',
|
|
31
|
-
position: 'bottom',
|
|
32
|
-
translucent: false,
|
|
33
|
-
});
|
|
34
|
-
await toast.present();
|
|
35
|
-
return toast.onDidDismiss();
|
|
36
|
-
}
|
|
37
|
-
static { this.CancelButton = {
|
|
38
|
-
text: 'Cancelar',
|
|
39
|
-
role: 'cancel',
|
|
40
|
-
}; }
|
|
41
|
-
static { this.ConfirmButton = {
|
|
42
|
-
text: 'OK',
|
|
43
|
-
role: 'confirm',
|
|
44
|
-
}; }
|
|
45
|
-
static { this.defaultAlertButtons = [GenericService.ConfirmButton]; }
|
|
46
|
-
async PresentAlert(header, message, buttons = GenericService.defaultAlertButtons) {
|
|
47
|
-
const alert = await this.alertController.create({
|
|
48
|
-
header: header,
|
|
49
|
-
message: message,
|
|
50
|
-
buttons: buttons,
|
|
51
|
-
});
|
|
52
|
-
await alert.present();
|
|
53
|
-
return alert.onDidDismiss();
|
|
54
|
-
}
|
|
55
|
-
SetTitle(title) {
|
|
56
|
-
this.titleController.setTitle(this.coreService.environment.applicationName + " | " + title);
|
|
57
|
-
}
|
|
58
|
-
GetId(activatedRoute, depth = 2) {
|
|
59
|
-
try {
|
|
60
|
-
var Route = activatedRoute;
|
|
61
|
-
for (let i = 0; i < depth; i++) {
|
|
62
|
-
Route = Route.parent;
|
|
63
|
-
}
|
|
64
|
-
if (Route.snapshot.paramMap.has('id')) {
|
|
65
|
-
return Number(Route.snapshot.paramMap.get('id'));
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
return 0;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
catch {
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GenericService, deps: [{ token: i1.ToastController }, { token: i1.AlertController }, { token: i2.Title }, { token: i3.EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
76
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GenericService, providedIn: 'root' }); }
|
|
77
|
-
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GenericService, decorators: [{
|
|
79
|
-
type: Injectable,
|
|
80
|
-
args: [{
|
|
81
|
-
providedIn: 'root'
|
|
82
|
-
}]
|
|
83
|
-
}], ctorParameters: () => [{ type: i1.ToastController }, { type: i1.AlertController }, { type: i2.Title }, { type: i3.EnvironmentService }] });
|
|
84
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJpY3Muc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvc2VydmljZXMvZ2VuZXJpY3Muc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTNDLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUNsRCxPQUFPLEVBQWUsZUFBZSxFQUFFLGVBQWUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRS9FLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHVCQUF1QixDQUFDOzs7OztBQU0zRCxNQUFNLE9BQU8sY0FBYztJQUN6QixZQUNVLGVBQWdDLEVBQ2hDLGVBQWdDLEVBQ2hDLGVBQXNCLEVBQ3RCLFdBQStCO1FBSC9CLG9CQUFlLEdBQWYsZUFBZSxDQUFpQjtRQUNoQyxvQkFBZSxHQUFmLGVBQWUsQ0FBaUI7UUFDaEMsb0JBQWUsR0FBZixlQUFlLENBQU87UUFDdEIsZ0JBQVcs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