dts-backoffice-util 18.2.1 → 19.0.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/README.md +71 -30
- package/fesm2022/dts-backoffice-util.mjs +87 -63
- package/fesm2022/dts-backoffice-util.mjs.map +1 -1
- package/lib/components/totvs-map/totvs-map.component.d.ts +5 -2
- package/package.json +4 -6
- package/esm2022/dts-backoffice-util.mjs +0 -5
- package/esm2022/lib/components/totvs-map/totvs-map.component.mjs +0 -74
- package/esm2022/lib/components/totvs-schedule-execution/totvs-schedule-execution.component.mjs +0 -305
- package/esm2022/lib/components/totvs-schedule-execution/totvs-schedule-execution.model.mjs +0 -7
- package/esm2022/lib/components/totvs-schedule-execution/totvs-schedule-execution.service.mjs +0 -208
- package/esm2022/lib/dts-backoffice-util.module.mjs +0 -57
- package/esm2022/lib/interfaces/filter-range.interface.mjs +0 -2
- package/esm2022/lib/interfaces/totvs-response.interface.mjs +0 -2
- package/esm2022/lib/model/session-info.model.mjs +0 -67
- package/esm2022/lib/pipes/dts-date-format.pipe.mjs +0 -20
- package/esm2022/lib/services/breadcrumb-control.service.mjs +0 -99
- package/esm2022/lib/services/cache-params.service.mjs +0 -25
- package/esm2022/lib/services/menu-datasul.service.mjs +0 -118
- package/esm2022/lib/services/profile.service.mjs +0 -55
- package/esm2022/lib/services/report.service.mjs +0 -57
- package/esm2022/lib/services/session-info.service.mjs +0 -36
- package/esm2022/lib/services/translate.service.mjs +0 -23
- package/esm2022/lib/services/validate.service.mjs +0 -42
- package/esm2022/lib/utils/date.util.mjs +0 -56
- package/esm2022/lib/utils/disclaimer.util.mjs +0 -490
- package/esm2022/lib/utils/field-validation.util.mjs +0 -179
- package/esm2022/lib/utils/file.util.mjs +0 -151
- package/esm2022/lib/utils/filter-range.util.mjs +0 -33
- package/esm2022/lib/utils/generic-functions.utils.mjs +0 -170
- package/esm2022/public-api.mjs +0 -40
package/README.md
CHANGED
|
@@ -12,7 +12,8 @@ Segue abaixo as últimas versões da Biblioteca, conforme a versão do PO-UI e A
|
|
|
12
12
|
|
|
13
13
|
| PO-UI | Angular | Versão dtsBackofficeUtil |
|
|
14
14
|
|-|-|-|
|
|
15
|
-
|
|
|
15
|
+
| v19 | v19 | 19.0.0 |
|
|
16
|
+
| v18 | v18 | 18.3.0 |
|
|
16
17
|
| v17 | v17 | 17.1.0 |
|
|
17
18
|
| v16 | v16 | 16.1.0 |
|
|
18
19
|
| v15 | v15 | 15.4.1 |
|
|
@@ -29,7 +30,7 @@ Segue abaixo as últimas versões da Biblioteca, conforme a versão do PO-UI e A
|
|
|
29
30
|
|
|
30
31
|
**Instalação do Pacote:**
|
|
31
32
|
|
|
32
|
-
```
|
|
33
|
+
```cmd
|
|
33
34
|
npm install dts-backoffice-util
|
|
34
35
|
```
|
|
35
36
|
|
|
@@ -177,7 +178,7 @@ private loadLocalStorage(): void {
|
|
|
177
178
|
}
|
|
178
179
|
```
|
|
179
180
|
**Definições no Progress:**
|
|
180
|
-
```
|
|
181
|
+
```ts
|
|
181
182
|
DEFINE TEMP-TABLE tt-param NO-UNDO
|
|
182
183
|
FIELD destino AS INTEGER
|
|
183
184
|
FIELD arquivo AS CHARACTER
|
|
@@ -235,8 +236,8 @@ IScheduleParameters
|
|
|
235
236
|
|
|
236
237
|
| Nome | Tipo | Obrigatório | Descrição |
|
|
237
238
|
|-|-|-|-|
|
|
238
|
-
| enabledStates | string[] | Não | Parâmetro que recebe uma lista de siglas de estados que devem ser habilitados no mapa, aqueles não que forem informados serão desabilitado. Se este parâmetro não for informado, todos os estados ficaram habilitados.<br
|
|
239
|
-
| initialSelectedState | string | Não | Parâmetro para fornecer um estado a ser selecionado no mapa.<br
|
|
239
|
+
| enabledStates | string[] | Não | Parâmetro que recebe uma lista de siglas de estados que devem ser habilitados no mapa, aqueles não que forem informados serão desabilitado. Se este parâmetro não for informado, todos os estados ficaram habilitados.<br>Se o parâmetro receber uma variável, sempre que o conteúdo dela for alterado, o mapa será atualizado automaticamente com o novo valor.
|
|
240
|
+
| initialSelectedState | string | Não | Parâmetro para fornecer um estado a ser selecionado no mapa.<br>Se o parâmetro receber uma variável, sempre que o conteúdo dela for alterado, o mapa será atualizado automaticamente com o novo valor.
|
|
240
241
|
| selectedStateEvent | EventEmitter | Sim | Evento disparado ao selecionar um estado do mapa.<br>**Parâmetros:**<br>- State: Responsável por receber do componente o estado selecionado. |
|
|
241
242
|
---
|
|
242
243
|
**Exemplo de Uso:**
|
|
@@ -248,7 +249,7 @@ Para a utilização, basta chamar o componente no .HTML e fazer a definição no
|
|
|
248
249
|
// EXEMPLO
|
|
249
250
|
<app-totvs-map
|
|
250
251
|
[enabledStates]="enabledStates"
|
|
251
|
-
initialSelectedState="
|
|
252
|
+
[initialSelectedState]="initialSelectedState"
|
|
252
253
|
(selectedStateEvent)="selectedState($event)">
|
|
253
254
|
</app-totvs-map>
|
|
254
255
|
```
|
|
@@ -256,11 +257,25 @@ Para a utilização, basta chamar o componente no .HTML e fazer a definição no
|
|
|
256
257
|
**Definições no JavaScript:**
|
|
257
258
|
```ts
|
|
258
259
|
state: string;
|
|
259
|
-
enabledStates: string[]
|
|
260
|
+
enabledStates: string[];
|
|
261
|
+
initialSelectedState: string;
|
|
260
262
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
+
searchTax(): void {
|
|
264
|
+
this.servTaxSubscription$ = this.servTax
|
|
265
|
+
.getTax()
|
|
266
|
+
.subscribe((response: ITotalTax) => {
|
|
267
|
+
|
|
268
|
+
if (response) {
|
|
269
|
+
...
|
|
270
|
+
this.enabledStates = response.listStates;
|
|
271
|
+
this.initialSelectedState = response.listStates[0];
|
|
272
|
+
}
|
|
273
|
+
});
|
|
263
274
|
}
|
|
275
|
+
|
|
276
|
+
selectedState(state: string) {
|
|
277
|
+
this.state = state;
|
|
278
|
+
}
|
|
264
279
|
```
|
|
265
280
|
|
|
266
281
|
**Alterando as cores do mapa:**
|
|
@@ -268,42 +283,68 @@ selectedState(state: string) {
|
|
|
268
283
|
O mapa já possui as cores da TOTVS como padrão. Mas caso seja necessário alterar alguma cor, deve-se utilizar o código abaixo dentro do styles.css do projeto, alterando os valores.
|
|
269
284
|
|
|
270
285
|
```css
|
|
271
|
-
|
|
272
|
-
|
|
286
|
+
/* Cor padrão de um estado não selecionado */
|
|
287
|
+
.defaultState {
|
|
273
288
|
fill: #0c6c94;
|
|
274
289
|
}
|
|
275
290
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
fill: #
|
|
279
|
-
|
|
280
|
-
cursor: pointer
|
|
291
|
+
/* Cor padrão de um estado não selecionado, quando passar o mouse em cima*/
|
|
292
|
+
.defaultState:hover {
|
|
293
|
+
fill: #29b5c4;
|
|
294
|
+
cursor: pointer;
|
|
281
295
|
}
|
|
282
296
|
|
|
283
|
-
|
|
284
|
-
|
|
297
|
+
/* Cor padrão de um estado pequeno (DF, ES, RJ) não selecionado */
|
|
298
|
+
.defaultStateCircle {
|
|
299
|
+
fill: #0c6c94;
|
|
285
300
|
}
|
|
286
301
|
|
|
287
|
-
|
|
302
|
+
/* Cor padrão de um estado pequeno (DF, ES, RJ) não selecionado, quando passar o mouse em cima */
|
|
303
|
+
.defaultStateCircle:hover {
|
|
304
|
+
fill: #29b5c4;
|
|
288
305
|
cursor: pointer;
|
|
289
|
-
text-decoration: none
|
|
290
306
|
}
|
|
291
307
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
fill:
|
|
308
|
+
/* Cor padrão de um estado desabilitado */
|
|
309
|
+
.disabledState {
|
|
310
|
+
fill: grey !important;
|
|
295
311
|
}
|
|
296
312
|
|
|
297
|
-
|
|
298
|
-
|
|
313
|
+
/* Cor padrão de um estado selecionado */
|
|
314
|
+
.selectedState {
|
|
299
315
|
fill: #29b5c4;
|
|
300
316
|
}
|
|
301
317
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
fill: #
|
|
318
|
+
/* Cor padrão de um estado pequeno (DF, ES, RJ) selecionado */
|
|
319
|
+
.selectedStateCircle {
|
|
320
|
+
fill: #29b5c4;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.disableEvents {
|
|
324
|
+
pointer-events: none;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/* Cor e fonte padrão do nome dos estados */
|
|
328
|
+
.text {
|
|
329
|
+
fill: #fff;
|
|
330
|
+
font: 12px Arial-BoldMT, sans-serif;
|
|
305
331
|
cursor: pointer
|
|
306
332
|
}
|
|
333
|
+
|
|
334
|
+
/* Padrão do estado como um todo - estado + texto (que seria a tag <a>) */
|
|
335
|
+
.stateWithText {
|
|
336
|
+
text-decoration: none
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.stateWithText:hover {
|
|
340
|
+
cursor: pointer;
|
|
341
|
+
text-decoration: none;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/* Cor padrão ao passar o mouse em cima do estado como um todo - estado + texto */
|
|
345
|
+
.stateWithText:hover .defaultState, .stateWithText:hover .defaultStateCircle {
|
|
346
|
+
fill: #29b5c4;
|
|
347
|
+
}
|
|
307
348
|
```
|
|
308
349
|
|
|
309
350
|
# Pipes
|
|
@@ -770,7 +811,7 @@ followUpCallBack(execStatus: IExecutionStatus): boolean {
|
|
|
770
811
|
}
|
|
771
812
|
```
|
|
772
813
|
**Definições no Progress:**
|
|
773
|
-
```
|
|
814
|
+
```ts
|
|
774
815
|
DEFINE TEMP-TABLE tt-param NO-UNDO
|
|
775
816
|
FIELD destino AS INTEGER
|
|
776
817
|
FIELD arquivo AS CHARACTER
|
|
@@ -1047,7 +1088,7 @@ getQrCode(text: string): Observable<Blob> {
|
|
|
1047
1088
|
}
|
|
1048
1089
|
```
|
|
1049
1090
|
**Definições no Progress:**
|
|
1050
|
-
```
|
|
1091
|
+
```ts
|
|
1051
1092
|
// Conteúdo do Método que BackEnd que retorna o Arquivo em Base64
|
|
1052
1093
|
DEFINE VARIABLE v_dir_arq AS CHARACTER NO-UNDO.
|
|
1053
1094
|
DEFINE VARIABLE v_cod_arq AS CHARACTER NO-UNDO.
|