@seniorsistemas/data-seniorx-core 1.2.0 → 1.3.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/core/{constants.d.ts → constants/constants.d.ts} +3 -1
- package/core/decorators/sqlDomainFilter.d.ts +1 -1
- package/core/types/{data-list.d.ts → lists.type.d.ts} +1 -1
- package/core/types/semantics.type.d.ts +30 -0
- package/esm2022/core/constants/constants.mjs +11 -0
- package/esm2022/core/handlers/sqlAutoComplete.mjs +2 -2
- package/esm2022/core/handlers/sqlFormatter.mjs +2 -2
- package/esm2022/core/handlers/sqlUppercase.mjs +2 -2
- package/esm2022/core/types/fields.type.mjs +2 -0
- package/esm2022/core/types/lists.type.mjs +2 -0
- package/esm2022/core/types/semantics.type.mjs +16 -0
- package/esm2022/features/button/button.component.mjs +1 -1
- package/esm2022/features/combobox/combobox.component.mjs +12 -10
- package/esm2022/features/inputs.mjs +11 -11
- package/esm2022/features/list/list.component.mjs +23 -9
- package/esm2022/features/modal/modal.component.mjs +43 -16
- package/esm2022/features/panel/panel.component.mjs +3 -3
- package/esm2022/features/searchbox/searchbox.component.mjs +20 -14
- package/esm2022/features/spinner/spinner.component.mjs +32 -11
- package/esm2022/features/spinner/spinner.service.mjs +23 -0
- package/esm2022/features/sql-editor/sql-editor.component.mjs +12 -12
- package/esm2022/features/toast/toast.component.mjs +29 -18
- package/esm2022/features/toast/toast.service.mjs +43 -0
- package/esm2022/locales/en.json +4 -0
- package/esm2022/locales/es-CO.json +4 -0
- package/esm2022/locales/pt.json +4 -0
- package/esm2022/providers/primeng-config.provider.mjs +63 -0
- package/esm2022/providers/services.provider.mjs +7 -0
- package/esm2022/providers/translate.provider.mjs +33 -0
- package/esm2022/public-api.mjs +12 -6
- package/features/button/button.component.d.ts +2 -4
- package/features/combobox/combobox.component.d.ts +3 -4
- package/features/inputs.d.ts +4 -6
- package/features/list/list.component.d.ts +5 -2
- package/features/modal/modal.component.d.ts +10 -6
- package/features/searchbox/searchbox.component.d.ts +6 -5
- package/features/spinner/spinner.component.d.ts +10 -2
- package/features/spinner/spinner.service.d.ts +10 -0
- package/features/sql-editor/sql-editor.component.d.ts +4 -4
- package/features/toast/toast.component.d.ts +12 -8
- package/features/toast/toast.service.d.ts +15 -0
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs +367 -184
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs.map +1 -1
- package/package.json +1 -1
- package/providers/services.provider.d.ts +4 -0
- package/providers/translate.provider.d.ts +7 -0
- package/public-api.d.ts +11 -5
- package/core/types/button.type.d.ts +0 -1
- package/core/types/options.type.d.ts +0 -6
- package/core/types/severity.type.d.ts +0 -2
- package/core/types/size.type.d.ts +0 -1
- package/core/types/values.type.d.ts +0 -5
- package/esm2022/core/constants.mjs +0 -9
- package/esm2022/core/types/button.type.mjs +0 -2
- package/esm2022/core/types/data-list.mjs +0 -2
- package/esm2022/core/types/fields.mjs +0 -2
- package/esm2022/core/types/options.type.mjs +0 -2
- package/esm2022/core/types/severity.type.mjs +0 -2
- package/esm2022/core/types/size.type.mjs +0 -2
- package/esm2022/core/types/values.type.mjs +0 -31
- package/esm2022/primeng-config.provider.mjs +0 -49
- /package/core/types/{fields.d.ts → fields.type.d.ts} +0 -0
- /package/{primeng-config.provider.d.ts → providers/primeng-config.provider.d.ts} +0 -0
|
@@ -1,56 +1,165 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import * as i1$2 from 'primeng/api';
|
|
2
|
+
import { MessageService } from 'primeng/api';
|
|
3
|
+
export { MessageService } from 'primeng/api';
|
|
4
4
|
import { definePreset } from '@primeng/themes';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { makeEnvironmentProviders, EventEmitter, Component, Input, Output, Directive, forwardRef, ViewChild } from '@angular/core';
|
|
6
|
+
import { makeEnvironmentProviders, APP_INITIALIZER, EventEmitter, Component, Input, Output, Directive, forwardRef, ViewChild, Injectable } from '@angular/core';
|
|
7
7
|
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
|
8
8
|
import { providePrimeNG } from 'primeng/config';
|
|
9
9
|
import Aura from '@primeng/themes/aura';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i6 from '@ngx-translate/core';
|
|
11
|
+
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
12
|
+
import { BehaviorSubject } from 'rxjs';
|
|
13
|
+
import { ViewPlugin, Decoration, keymap, EditorView } from '@codemirror/view';
|
|
14
|
+
import { RangeSetBuilder, Prec, StateEffect } from '@codemirror/state';
|
|
15
|
+
import { format } from 'sql-formatter';
|
|
16
|
+
import * as i1 from 'primeng/button';
|
|
11
17
|
import { ButtonModule } from 'primeng/button';
|
|
12
|
-
import * as
|
|
18
|
+
import * as i2 from '@angular/common';
|
|
13
19
|
import { CommonModule } from '@angular/common';
|
|
14
20
|
import * as i1$1 from 'primeng/autocomplete';
|
|
15
21
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
16
22
|
import * as i3 from '@angular/forms';
|
|
17
23
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
18
|
-
import * as
|
|
24
|
+
import * as i3$1 from 'primeng/progressspinner';
|
|
25
|
+
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
26
|
+
import * as i4 from 'primeng/table';
|
|
19
27
|
import { TableModule } from 'primeng/table';
|
|
20
|
-
import * as
|
|
28
|
+
import * as i5 from 'primeng/tooltip';
|
|
21
29
|
import { TooltipModule } from 'primeng/tooltip';
|
|
22
|
-
import * as
|
|
23
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
24
|
-
import * as i1$2 from 'primeng/dialog';
|
|
30
|
+
import * as i4$1 from 'primeng/dialog';
|
|
25
31
|
import { DialogModule } from 'primeng/dialog';
|
|
26
|
-
import * as i1$3 from 'primeng/
|
|
27
|
-
import { MessageService } from 'primeng/api';
|
|
28
|
-
import * as i1$4 from 'primeng/panel';
|
|
32
|
+
import * as i1$3 from 'primeng/panel';
|
|
29
33
|
import { PanelModule } from 'primeng/panel';
|
|
30
|
-
import * as i4$
|
|
34
|
+
import * as i4$2 from 'primeng/inputgroupaddon';
|
|
31
35
|
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
32
36
|
import * as i5$1 from 'primeng/inputgroup';
|
|
33
37
|
import { InputGroupModule } from 'primeng/inputgroup';
|
|
34
|
-
import * as i6 from 'primeng/inputtext';
|
|
38
|
+
import * as i6$1 from 'primeng/inputtext';
|
|
35
39
|
import { InputTextModule } from 'primeng/inputtext';
|
|
40
|
+
import * as i3$2 from 'primeng/blockui';
|
|
41
|
+
import { BlockUIModule } from 'primeng/blockui';
|
|
36
42
|
import { autocompletion } from '@codemirror/autocomplete';
|
|
37
43
|
import { ayuLight } from 'thememirror';
|
|
38
44
|
import { basicSetup } from 'codemirror';
|
|
39
45
|
import { sql, PostgreSQL } from '@codemirror/lang-sql';
|
|
40
|
-
import * as i2$
|
|
46
|
+
import * as i2$1 from 'primeng/toast';
|
|
41
47
|
import { ToastModule } from 'primeng/toast';
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
|
|
49
|
+
const SeniorTheme = definePreset(Aura, {
|
|
50
|
+
semantic: {
|
|
51
|
+
primary: {
|
|
52
|
+
50: '{blue.50}',
|
|
53
|
+
100: '{blue.100}',
|
|
54
|
+
200: '{blue.200}',
|
|
55
|
+
300: '{blue.300}',
|
|
56
|
+
400: '{blue.400}',
|
|
57
|
+
500: '{blue.500}',
|
|
58
|
+
600: '{blue.600}',
|
|
59
|
+
700: '{blue.700}',
|
|
60
|
+
800: '{blue.800}',
|
|
61
|
+
900: '{blue.900}',
|
|
62
|
+
950: '{blue.950}'
|
|
63
|
+
},
|
|
64
|
+
secondary: {
|
|
65
|
+
50: '{slate.50}',
|
|
66
|
+
100: '{slate.100}',
|
|
67
|
+
200: '{slate.200}',
|
|
68
|
+
300: '{slate.300}',
|
|
69
|
+
400: '{slate.400}',
|
|
70
|
+
500: '{slate.500}',
|
|
71
|
+
600: '{slate.600}',
|
|
72
|
+
700: '{slate.700}',
|
|
73
|
+
800: '{slate.800}',
|
|
74
|
+
900: '{slate.900}',
|
|
75
|
+
950: '{slate.950}'
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
components: {
|
|
79
|
+
progressspinner: {
|
|
80
|
+
colorScheme: {
|
|
81
|
+
light: {
|
|
82
|
+
root: {
|
|
83
|
+
['color.1']: '{emerald-500}',
|
|
84
|
+
['color.2']: '{emerald-500}',
|
|
85
|
+
['color.3']: '{emerald-500}',
|
|
86
|
+
['color.4']: '{emerald-500}'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
function provideDataCoreLib() {
|
|
94
|
+
return makeEnvironmentProviders([
|
|
95
|
+
provideAnimationsAsync(),
|
|
96
|
+
providePrimeNG({
|
|
97
|
+
theme: {
|
|
98
|
+
preset: SeniorTheme,
|
|
99
|
+
options: {
|
|
100
|
+
darkModeSelector: false || 'none'
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
]);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function serviceProviders() {
|
|
108
|
+
return [MessageService, SpinnerService, ToastService, TranslateService];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
var en = {
|
|
112
|
+
"platform.datacore.empty_list": "No items found!",
|
|
113
|
+
"platform.datacore.search": "Search..."
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
var es = {
|
|
117
|
+
"platform.datacore.empty_list": "Ningún elemento encontrado!",
|
|
118
|
+
"platform.datacore.search": "Buscar..."
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
var pt = {
|
|
122
|
+
"platform.datacore.empty_list": "Nenhum item encontrado!",
|
|
123
|
+
"platform.datacore.search": "Pesquisar..."
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const defaultLocale = 'pt';
|
|
127
|
+
function provideTranslations() {
|
|
128
|
+
return {
|
|
129
|
+
provide: APP_INITIALIZER,
|
|
130
|
+
multi: true,
|
|
131
|
+
deps: [TranslateService],
|
|
132
|
+
useFactory: (translate) => {
|
|
133
|
+
return () => {
|
|
134
|
+
translate.addLangs(['en', 'es', 'pt']);
|
|
135
|
+
translate.setTranslation('en-US', en);
|
|
136
|
+
translate.setTranslation('en', en);
|
|
137
|
+
translate.setTranslation('es-CO', es);
|
|
138
|
+
translate.setTranslation('es', es);
|
|
139
|
+
translate.setTranslation('pt-BR', pt);
|
|
140
|
+
translate.setTranslation('pt', pt);
|
|
141
|
+
translate.setDefaultLang(defaultLocale);
|
|
142
|
+
translate.use(getSeniorLocale('com.senior.token'));
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function getSeniorLocale(name) {
|
|
148
|
+
const cookies = document.cookie.split('; ');
|
|
149
|
+
const cookie = cookies.find(c => c.startsWith(name + '='));
|
|
150
|
+
const json = JSON.parse(cookie ? decodeURIComponent(cookie.split('=')[1]) : '{}');
|
|
151
|
+
return json.locale ?? defaultLocale;
|
|
152
|
+
}
|
|
46
153
|
|
|
47
154
|
const CONSTANTS = {
|
|
48
155
|
WHITESPACE_REGEX: /\s/,
|
|
49
156
|
PARTIAL_IDENTIFIER_REGEX: /[\w\.]*/,
|
|
50
157
|
FULL_IDENTIFIER_REGEX: /^\w*$/,
|
|
158
|
+
TOAST_DEFAULT_KEY: 'toast-global',
|
|
51
159
|
EMPTY: '',
|
|
52
|
-
|
|
53
|
-
|
|
160
|
+
ONE: 1,
|
|
161
|
+
THREE_K: 3000,
|
|
162
|
+
ZERO: 0
|
|
54
163
|
};
|
|
55
164
|
|
|
56
165
|
const SQL_HELPER = {
|
|
@@ -244,49 +353,21 @@ function getWordBeforeCursor(state, pos) {
|
|
|
244
353
|
return words.length ? words[words.length - 1] : CONSTANTS.EMPTY;
|
|
245
354
|
}
|
|
246
355
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
50: '{blue.50}',
|
|
251
|
-
100: '{blue.100}',
|
|
252
|
-
200: '{blue.200}',
|
|
253
|
-
300: '{blue.300}',
|
|
254
|
-
400: '{blue.400}',
|
|
255
|
-
500: '{blue.500}',
|
|
256
|
-
600: '{blue.600}',
|
|
257
|
-
700: '{blue.700}',
|
|
258
|
-
800: '{blue.800}',
|
|
259
|
-
900: '{blue.900}',
|
|
260
|
-
950: '{blue.950}'
|
|
261
|
-
},
|
|
262
|
-
secondary: {
|
|
263
|
-
50: '{slate.50}',
|
|
264
|
-
100: '{slate.100}',
|
|
265
|
-
200: '{slate.200}',
|
|
266
|
-
300: '{slate.300}',
|
|
267
|
-
400: '{slate.400}',
|
|
268
|
-
500: '{slate.500}',
|
|
269
|
-
600: '{slate.600}',
|
|
270
|
-
700: '{slate.700}',
|
|
271
|
-
800: '{slate.800}',
|
|
272
|
-
900: '{slate.900}',
|
|
273
|
-
950: '{slate.950}'
|
|
274
|
-
}
|
|
356
|
+
function getDimensionStyles(type, value) {
|
|
357
|
+
if (typeof value === 'boolean' || !value) {
|
|
358
|
+
return {};
|
|
275
359
|
}
|
|
276
|
-
}
|
|
277
|
-
function provideDataCoreLib() {
|
|
278
|
-
return makeEnvironmentProviders([
|
|
279
|
-
provideAnimationsAsync(),
|
|
280
|
-
providePrimeNG({
|
|
281
|
-
theme: {
|
|
282
|
-
preset: Theme,
|
|
283
|
-
options: {
|
|
284
|
-
darkModeSelector: false || 'none'
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
})
|
|
288
|
-
]);
|
|
360
|
+
return { [type]: dimensionFormat(value) };
|
|
289
361
|
}
|
|
362
|
+
const dimensionFormat = (value) => {
|
|
363
|
+
if (value === 'w-fill') {
|
|
364
|
+
return '100%';
|
|
365
|
+
}
|
|
366
|
+
else if (typeof value === 'number') {
|
|
367
|
+
return `${value}px`;
|
|
368
|
+
}
|
|
369
|
+
return value;
|
|
370
|
+
};
|
|
290
371
|
|
|
291
372
|
class ButtonComponent {
|
|
292
373
|
disabled = false;
|
|
@@ -298,7 +379,7 @@ class ButtonComponent {
|
|
|
298
379
|
type = 'button';
|
|
299
380
|
onClick = new EventEmitter();
|
|
300
381
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
301
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ButtonComponent, isStandalone: true, selector: "sdc-button", inputs: { disabled: "disabled", icon: "icon", id: "id", label: "label", severity: "severity", size: "size", type: "type" }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<p-button\n (onClick)=\"onClick.emit($event)\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [severity]=\"severity\"\n [size]=\"size\"\n [type]=\"type\"\n>\n <i *ngIf=\"icon\" [class]=\"icon\"></i>\n <span>{{ label }}</span>\n</p-button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
382
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ButtonComponent, isStandalone: true, selector: "sdc-button", inputs: { disabled: "disabled", icon: "icon", id: "id", label: "label", severity: "severity", size: "size", type: "type" }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<p-button\n (onClick)=\"onClick.emit($event)\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [severity]=\"severity\"\n [size]=\"size\"\n [type]=\"type\"\n>\n <i *ngIf=\"icon\" [class]=\"icon\"></i>\n <span>{{ label }}</span>\n</p-button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
302
383
|
}
|
|
303
384
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
304
385
|
type: Component,
|
|
@@ -321,37 +402,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
321
402
|
type: Output
|
|
322
403
|
}] } });
|
|
323
404
|
|
|
324
|
-
function getWidthStyles(width) {
|
|
325
|
-
if (!width || typeof width === 'boolean') {
|
|
326
|
-
return {};
|
|
327
|
-
}
|
|
328
|
-
const format = (value) => {
|
|
329
|
-
if (value === 'w100') {
|
|
330
|
-
return '100%';
|
|
331
|
-
}
|
|
332
|
-
else if (typeof value === 'number') {
|
|
333
|
-
return `${value}px`;
|
|
334
|
-
}
|
|
335
|
-
return value;
|
|
336
|
-
};
|
|
337
|
-
return { width: format(width) };
|
|
338
|
-
}
|
|
339
|
-
function getHeightStyles(height) {
|
|
340
|
-
if (!height || typeof height === 'boolean') {
|
|
341
|
-
return {};
|
|
342
|
-
}
|
|
343
|
-
const format = (value) => {
|
|
344
|
-
if (value === 'h100') {
|
|
345
|
-
return '100%';
|
|
346
|
-
}
|
|
347
|
-
else if (typeof value === 'number') {
|
|
348
|
-
return `${value}px`;
|
|
349
|
-
}
|
|
350
|
-
return value;
|
|
351
|
-
};
|
|
352
|
-
return { height: format(height) };
|
|
353
|
-
}
|
|
354
|
-
|
|
355
405
|
class InputsComponent {
|
|
356
406
|
disabled = false;
|
|
357
407
|
identity = {};
|
|
@@ -361,8 +411,8 @@ class InputsComponent {
|
|
|
361
411
|
placeholder = '';
|
|
362
412
|
required = false;
|
|
363
413
|
size = undefined;
|
|
364
|
-
width = false;
|
|
365
414
|
value = null;
|
|
415
|
+
width = false;
|
|
366
416
|
valueChange = new EventEmitter();
|
|
367
417
|
onChange = (_) => { };
|
|
368
418
|
onTouched = () => { };
|
|
@@ -393,22 +443,22 @@ class InputsComponent {
|
|
|
393
443
|
this.valueChange.emit(this.value);
|
|
394
444
|
}
|
|
395
445
|
getStyles() {
|
|
396
|
-
return
|
|
446
|
+
return getDimensionStyles('width', this.width);
|
|
397
447
|
}
|
|
398
448
|
getSizeStyle() {
|
|
399
449
|
switch (this.size) {
|
|
400
450
|
case 'small':
|
|
401
|
-
return { 'font-size': '12px',
|
|
451
|
+
return { 'font-size': '12px', height: '28px' };
|
|
402
452
|
case 'large':
|
|
403
|
-
return { 'font-size': '16px',
|
|
453
|
+
return { 'font-size': '16px', height: '44px' };
|
|
404
454
|
default:
|
|
405
|
-
return { 'font-size': '14px',
|
|
455
|
+
return { 'font-size': '14px', height: '36px' };
|
|
406
456
|
}
|
|
407
457
|
}
|
|
408
458
|
getInputStyle() {
|
|
409
459
|
return {
|
|
410
460
|
...this.getStyles(),
|
|
411
|
-
...this.getSizeStyle()
|
|
461
|
+
...this.getSizeStyle()
|
|
412
462
|
};
|
|
413
463
|
}
|
|
414
464
|
getInvalidClass() {
|
|
@@ -424,7 +474,7 @@ class InputsComponent {
|
|
|
424
474
|
};
|
|
425
475
|
}
|
|
426
476
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InputsComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
427
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: InputsComponent, inputs: { disabled: "disabled", identity: "identity", invalid: "invalid", label: "label", message: "message", placeholder: "placeholder", required: "required", size: "size",
|
|
477
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: InputsComponent, inputs: { disabled: "disabled", identity: "identity", invalid: "invalid", label: "label", message: "message", placeholder: "placeholder", required: "required", size: "size", value: "value", width: "width" }, outputs: { valueChange: "valueChange" }, ngImport: i0 });
|
|
428
478
|
}
|
|
429
479
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InputsComponent, decorators: [{
|
|
430
480
|
type: Directive
|
|
@@ -444,37 +494,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
444
494
|
type: Input
|
|
445
495
|
}], size: [{
|
|
446
496
|
type: Input
|
|
447
|
-
}], width: [{
|
|
448
|
-
type: Input
|
|
449
497
|
}], value: [{
|
|
450
498
|
type: Input
|
|
499
|
+
}], width: [{
|
|
500
|
+
type: Input
|
|
451
501
|
}], valueChange: [{
|
|
452
502
|
type: Output
|
|
453
503
|
}] } });
|
|
454
504
|
|
|
455
505
|
class ComboboxComponent extends InputsComponent {
|
|
456
|
-
selectedValueEvent = new EventEmitter();
|
|
457
506
|
options = [];
|
|
458
|
-
|
|
459
|
-
}
|
|
507
|
+
selectedValueEvent = new EventEmitter();
|
|
460
508
|
filteredItems = [];
|
|
461
509
|
onSearch(event) {
|
|
462
510
|
const query = event.query.toLowerCase();
|
|
463
511
|
let arr = Array.isArray(this.options) ? this.options : JSON.parse(this.options);
|
|
464
512
|
this.filteredItems = arr.filter(i => i.text.toLowerCase().includes(query));
|
|
513
|
+
if (this.filteredItems.length === 0) {
|
|
514
|
+
this.invalid = true;
|
|
515
|
+
}
|
|
465
516
|
}
|
|
466
517
|
onInput(event) {
|
|
467
518
|
super.onInput(event);
|
|
468
519
|
this.selectedValueEvent.emit(this.value);
|
|
520
|
+
if (this.filteredItems.length > 0) {
|
|
521
|
+
this.invalid = false;
|
|
522
|
+
}
|
|
469
523
|
}
|
|
470
524
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComboboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
471
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ComboboxComponent, isStandalone: true, selector: "sdc-combobox", inputs: { options: "options"
|
|
525
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ComboboxComponent, isStandalone: true, selector: "sdc-combobox", inputs: { options: "options" }, outputs: { selectedValueEvent: "onSelectedItem" }, providers: [
|
|
472
526
|
{
|
|
473
527
|
provide: NG_VALUE_ACCESSOR,
|
|
474
528
|
useExisting: forwardRef(() => ComboboxComponent),
|
|
475
529
|
multi: true
|
|
476
530
|
}
|
|
477
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"field-box\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n\n <p-autocomplete\n (completeMethod)=\"onSearch($event)\"\n (ngModelChange)=\"onInput($event)\"\n [(ngModel)]=\"value\"\n [autoHighlight]=\"true\"\n [disabled]=\"disabled\"\n [dropdown]=\"true\"\n [forceSelection]=\"true\"\n [id]=\"identity.id\"\n [name]=\"identity.name ?? ''\"\n [ngClass]=\"getInvalidClass()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [showClear]=\"true\"\n [style]=\"getInputStyle()\"\n [suggestions]=\"filteredItems\"\n optionLabel=\"text\"\n optionValue=\"value\"\n />\n\n <small\n *ngIf=\"message\"\n [ngClass]=\"getInvalidMessageClass()\"\n >{{ message }}</small>\n</div>\n\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i1$1.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "variant", "fluid"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
531
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"field-box\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n\n <p-autocomplete\n (completeMethod)=\"onSearch($event)\"\n (ngModelChange)=\"onInput($event)\"\n [(ngModel)]=\"value\"\n [autoHighlight]=\"true\"\n [disabled]=\"disabled\"\n [dropdown]=\"true\"\n [forceSelection]=\"true\"\n [id]=\"identity.id\"\n [name]=\"identity.name ?? ''\"\n [ngClass]=\"getInvalidClass()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [showClear]=\"true\"\n [style]=\"getInputStyle()\"\n [suggestions]=\"filteredItems\"\n optionLabel=\"text\"\n optionValue=\"value\"\n />\n\n <small\n *ngIf=\"message\"\n [ngClass]=\"getInvalidMessageClass()\"\n >{{ message }}</small>\n</div>\n\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i1$1.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "variant", "fluid"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
478
532
|
}
|
|
479
533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComboboxComponent, decorators: [{
|
|
480
534
|
type: Component,
|
|
@@ -485,13 +539,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
485
539
|
multi: true
|
|
486
540
|
}
|
|
487
541
|
], template: "<div class=\"field-box\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n\n <p-autocomplete\n (completeMethod)=\"onSearch($event)\"\n (ngModelChange)=\"onInput($event)\"\n [(ngModel)]=\"value\"\n [autoHighlight]=\"true\"\n [disabled]=\"disabled\"\n [dropdown]=\"true\"\n [forceSelection]=\"true\"\n [id]=\"identity.id\"\n [name]=\"identity.name ?? ''\"\n [ngClass]=\"getInvalidClass()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [showClear]=\"true\"\n [style]=\"getInputStyle()\"\n [suggestions]=\"filteredItems\"\n optionLabel=\"text\"\n optionValue=\"value\"\n />\n\n <small\n *ngIf=\"message\"\n [ngClass]=\"getInvalidMessageClass()\"\n >{{ message }}</small>\n</div>\n\n\n" }]
|
|
488
|
-
}], propDecorators: {
|
|
542
|
+
}], propDecorators: { options: [{
|
|
543
|
+
type: Input
|
|
544
|
+
}], selectedValueEvent: [{
|
|
489
545
|
type: Output,
|
|
490
546
|
args: ['onSelectedItem']
|
|
491
|
-
}], options: [{
|
|
492
|
-
type: Input
|
|
493
|
-
}], initValue: [{
|
|
494
|
-
type: Input
|
|
495
547
|
}] } });
|
|
496
548
|
|
|
497
549
|
class HyperlinkComponent {
|
|
@@ -518,7 +570,7 @@ class HyperlinkComponent {
|
|
|
518
570
|
}
|
|
519
571
|
}
|
|
520
572
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HyperlinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
521
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: HyperlinkComponent, isStandalone: true, selector: "sdc-hyperlink", inputs: { href: "href", text: "text", domainFilterToken: "domainFilterToken" }, outputs: { clickEvent: "onClick", domainFilterClickEvent: "onDomainFilter" }, ngImport: i0, template: "<span *ngIf=\"!href\" class=\"hyperlink\" (click)=\"dispatchClickEvent($event)\">\n {{ textContent }}\n</span>\n\n<a *ngIf=\"href\" [href]=\"href\" class=\"hyperlink\" (click)=\"dispatchClickEvent($event)\">\n {{ textContent }}\n</a>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
573
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: HyperlinkComponent, isStandalone: true, selector: "sdc-hyperlink", inputs: { href: "href", text: "text", domainFilterToken: "domainFilterToken" }, outputs: { clickEvent: "onClick", domainFilterClickEvent: "onDomainFilter" }, ngImport: i0, template: "<span *ngIf=\"!href\" class=\"hyperlink\" (click)=\"dispatchClickEvent($event)\">\n {{ textContent }}\n</span>\n\n<a *ngIf=\"href\" [href]=\"href\" class=\"hyperlink\" (click)=\"dispatchClickEvent($event)\">\n {{ textContent }}\n</a>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
522
574
|
}
|
|
523
575
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HyperlinkComponent, decorators: [{
|
|
524
576
|
type: Component,
|
|
@@ -540,6 +592,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
540
592
|
class ListComponent {
|
|
541
593
|
dataItems = [];
|
|
542
594
|
dataActions = [];
|
|
595
|
+
loading = false;
|
|
543
596
|
set items(value) {
|
|
544
597
|
this.dataItems = this.parseArray(value ?? []);
|
|
545
598
|
}
|
|
@@ -549,6 +602,15 @@ class ListComponent {
|
|
|
549
602
|
getTableStyle() {
|
|
550
603
|
return { width: '100%' };
|
|
551
604
|
}
|
|
605
|
+
isEmpty() {
|
|
606
|
+
return this.dataItems?.length === 0 && this.loading === false;
|
|
607
|
+
}
|
|
608
|
+
getStyle() {
|
|
609
|
+
return {
|
|
610
|
+
width: '30px',
|
|
611
|
+
height: '30px'
|
|
612
|
+
};
|
|
613
|
+
}
|
|
552
614
|
parseArray(value) {
|
|
553
615
|
if (Array.isArray(value)) {
|
|
554
616
|
return value;
|
|
@@ -562,12 +624,14 @@ class ListComponent {
|
|
|
562
624
|
}
|
|
563
625
|
}
|
|
564
626
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
565
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ListComponent, isStandalone: true, selector: "sdc-list", inputs: { items: "items", actions: "actions" }, ngImport: i0, template: "<p-table [value]=\"[1]\" [tableStyle]=\"getTableStyle()\">\n <ng-template #body>\n <tr *ngIf=\"
|
|
627
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ListComponent, isStandalone: true, selector: "sdc-list", inputs: { loading: "loading", items: "items", actions: "actions" }, ngImport: i0, template: "<p-table [value]=\"[1]\" [tableStyle]=\"getTableStyle()\">\n <ng-template #body>\n <tr *ngIf=\"loading\">\n <td colspan=\"2\" class=\"center-items\">\n <p-progress-spinner\n [style]=\"getStyle()\"\n animationDuration=\".5s\"\n fill=\"transparent\"\n strokeWidth=\"8\"\n />\n </td>\n </tr>\n <tr *ngIf=\"isEmpty()\">\n <td colspan=\"2\" class=\"center-items\">\n {{ 'platform.datacore.empty_list' | translate }}\n </td>\n </tr>\n <tr *ngFor=\"let item of dataItems\">\n <td class=\"row\">\n <div class=\"content\">\n {{ item.content }} \n </div>\n <div class=\"actions\">\n <p-button\n *ngFor=\"let action of dataActions\"\n (onClick)=\"action.action && action.action(action.name, item.id)\"\n [disabled]=\"action.disabled\"\n [icon]=\"action.icon\"\n [label]=\"action.label\"\n [severity]=\"action.severity\"\n pTooltip=\"{{ action.tooltip ?? ''}}\"\n size=\"small\"\n />\n </div>\n </td>\n </tr>\n </ng-template>\n</p-table>", styles: [".row{align-items:center;display:flex;flex-wrap:wrap;gap:5px}.row>.content{flex:1}.row>.actions{flex:0;display:flex;flex-wrap:nowrap;gap:5px}.center-items{display:flex;align-items:center;justify-content:center;text-align:center;text-transform:uppercase;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i3$1.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
566
628
|
}
|
|
567
629
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ListComponent, decorators: [{
|
|
568
630
|
type: Component,
|
|
569
|
-
args: [{ imports: [CommonModule,
|
|
570
|
-
}], propDecorators: {
|
|
631
|
+
args: [{ imports: [ButtonModule, CommonModule, ProgressSpinnerModule, TableModule, TooltipModule, TranslateModule], standalone: true, selector: 'sdc-list', template: "<p-table [value]=\"[1]\" [tableStyle]=\"getTableStyle()\">\n <ng-template #body>\n <tr *ngIf=\"loading\">\n <td colspan=\"2\" class=\"center-items\">\n <p-progress-spinner\n [style]=\"getStyle()\"\n animationDuration=\".5s\"\n fill=\"transparent\"\n strokeWidth=\"8\"\n />\n </td>\n </tr>\n <tr *ngIf=\"isEmpty()\">\n <td colspan=\"2\" class=\"center-items\">\n {{ 'platform.datacore.empty_list' | translate }}\n </td>\n </tr>\n <tr *ngFor=\"let item of dataItems\">\n <td class=\"row\">\n <div class=\"content\">\n {{ item.content }} \n </div>\n <div class=\"actions\">\n <p-button\n *ngFor=\"let action of dataActions\"\n (onClick)=\"action.action && action.action(action.name, item.id)\"\n [disabled]=\"action.disabled\"\n [icon]=\"action.icon\"\n [label]=\"action.label\"\n [severity]=\"action.severity\"\n pTooltip=\"{{ action.tooltip ?? ''}}\"\n size=\"small\"\n />\n </div>\n </td>\n </tr>\n </ng-template>\n</p-table>", styles: [".row{align-items:center;display:flex;flex-wrap:wrap;gap:5px}.row>.content{flex:1}.row>.actions{flex:0;display:flex;flex-wrap:nowrap;gap:5px}.center-items{display:flex;align-items:center;justify-content:center;text-align:center;text-transform:uppercase;width:100%}\n"] }]
|
|
632
|
+
}], propDecorators: { loading: [{
|
|
633
|
+
type: Input
|
|
634
|
+
}], items: [{
|
|
571
635
|
type: Input
|
|
572
636
|
}], actions: [{
|
|
573
637
|
type: Input
|
|
@@ -576,52 +640,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
576
640
|
class ModalComponent {
|
|
577
641
|
$visible = false;
|
|
578
642
|
modal;
|
|
643
|
+
footerButtons = [];
|
|
579
644
|
header = 'Modal Header';
|
|
580
645
|
height = false;
|
|
581
646
|
maximizable = false;
|
|
647
|
+
maximize = false;
|
|
582
648
|
resizable = false;
|
|
583
649
|
responsive = false;
|
|
584
650
|
width = false;
|
|
585
|
-
|
|
586
|
-
get visible() {
|
|
587
|
-
return this.$visible;
|
|
588
|
-
}
|
|
651
|
+
zIndex = 99999;
|
|
589
652
|
set visible(value) {
|
|
590
653
|
this.$visible = value;
|
|
591
|
-
this.visibleChange.emit(
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
654
|
+
this.visibleChange.emit(this.visible);
|
|
655
|
+
this.maximizeModal();
|
|
656
|
+
this.fixDialogMask();
|
|
657
|
+
}
|
|
658
|
+
get visible() {
|
|
659
|
+
return this.$visible;
|
|
595
660
|
}
|
|
596
661
|
visibleChange = new EventEmitter();
|
|
597
662
|
getStyle() {
|
|
598
663
|
return {
|
|
599
|
-
...
|
|
600
|
-
...
|
|
664
|
+
...getDimensionStyles('width', this.width),
|
|
665
|
+
...getDimensionStyles('height', this.height)
|
|
601
666
|
};
|
|
602
667
|
}
|
|
668
|
+
maximizeModal() {
|
|
669
|
+
if (this.visible && this.maximizable && this.maximize) {
|
|
670
|
+
this.modal.maximize();
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
fixDialogMask() {
|
|
674
|
+
setTimeout(() => {
|
|
675
|
+
const dialogMask = this.modal?.el?.nativeElement?.querySelector('div.p-dialog-mask') ?? null;
|
|
676
|
+
if (!dialogMask) {
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
if (this.visible) {
|
|
680
|
+
dialogMask.style.zIndex = this.zIndex.toString();
|
|
681
|
+
dialogMask.style.display = 'flex';
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
dialogMask.style.display = 'none';
|
|
685
|
+
}
|
|
686
|
+
}, 100);
|
|
687
|
+
}
|
|
603
688
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
604
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ModalComponent, isStandalone: true, selector: "sdc-modal", inputs: { header: "header", height: "height", maximizable: "maximizable", resizable: "resizable", responsive: "responsive", width: "width",
|
|
689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ModalComponent, isStandalone: true, selector: "sdc-modal", inputs: { footerButtons: "footerButtons", header: "header", height: "height", maximizable: "maximizable", maximize: "maximize", resizable: "resizable", responsive: "responsive", width: "width", zIndex: "zIndex", visible: "visible" }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<p-dialog\n [(visible)]=\"visible\"\n [contentStyle]=\"getStyle()\"\n [draggable]=\"false\"\n [header]=\"header\"\n [maximizable]=\"maximizable\"\n [modal]=\"true\"\n [resizable]=\"resizable\"\n [responsive]=\"responsive\"\n #modal\n>\n <ng-content></ng-content>\n <ng-template pTemplate=\"footer\">\n <div class=\"footer\">\n <ng-content select=\"[footer]\"></ng-content>\n <p-button\n *ngFor=\"let btn of footerButtons\"\n (onClick)=\"btn.action()\"\n [icon]=\"btn.icon\"\n [id]=\"btn.id\"\n [label]=\"btn.label\"\n [severity]=\"btn.severity ?? 'primary'\"\n ></p-button>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".footer{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;gap:10px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4$1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }] });
|
|
605
690
|
}
|
|
606
691
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalComponent, decorators: [{
|
|
607
692
|
type: Component,
|
|
608
|
-
args: [{ imports: [CommonModule, DialogModule
|
|
693
|
+
args: [{ imports: [ButtonModule, CommonModule, DialogModule], standalone: true, selector: 'sdc-modal', template: "<p-dialog\n [(visible)]=\"visible\"\n [contentStyle]=\"getStyle()\"\n [draggable]=\"false\"\n [header]=\"header\"\n [maximizable]=\"maximizable\"\n [modal]=\"true\"\n [resizable]=\"resizable\"\n [responsive]=\"responsive\"\n #modal\n>\n <ng-content></ng-content>\n <ng-template pTemplate=\"footer\">\n <div class=\"footer\">\n <ng-content select=\"[footer]\"></ng-content>\n <p-button\n *ngFor=\"let btn of footerButtons\"\n (onClick)=\"btn.action()\"\n [icon]=\"btn.icon\"\n [id]=\"btn.id\"\n [label]=\"btn.label\"\n [severity]=\"btn.severity ?? 'primary'\"\n ></p-button>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".footer{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;gap:10px}\n"] }]
|
|
609
694
|
}], propDecorators: { modal: [{
|
|
610
695
|
type: ViewChild,
|
|
611
696
|
args: ['modal']
|
|
697
|
+
}], footerButtons: [{
|
|
698
|
+
type: Input
|
|
612
699
|
}], header: [{
|
|
613
700
|
type: Input
|
|
614
701
|
}], height: [{
|
|
615
702
|
type: Input
|
|
616
703
|
}], maximizable: [{
|
|
617
704
|
type: Input
|
|
705
|
+
}], maximize: [{
|
|
706
|
+
type: Input
|
|
618
707
|
}], resizable: [{
|
|
619
708
|
type: Input
|
|
620
709
|
}], responsive: [{
|
|
621
710
|
type: Input
|
|
622
711
|
}], width: [{
|
|
623
712
|
type: Input
|
|
624
|
-
}],
|
|
713
|
+
}], zIndex: [{
|
|
625
714
|
type: Input
|
|
626
715
|
}], visible: [{
|
|
627
716
|
type: Input
|
|
@@ -635,11 +724,11 @@ class PanelComponent {
|
|
|
635
724
|
showHeader = false;
|
|
636
725
|
toggleable = false;
|
|
637
726
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
638
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PanelComponent, isStandalone: true, selector: "sdc-panel", inputs: { collapsed: "collapsed", header: "header", showHeader: "showHeader", toggleable: "toggleable" }, ngImport: i0, template: "<p-panel\n [collapsed]=\"collapsed\"\n [header]=\"header\"\n [showHeader]=\"showHeader\"\n [toggleable]=\"toggleable\"\n>\n <p
|
|
727
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PanelComponent, isStandalone: true, selector: "sdc-panel", inputs: { collapsed: "collapsed", header: "header", showHeader: "showHeader", toggleable: "toggleable" }, ngImport: i0, template: "<p-panel\n [collapsed]=\"collapsed\"\n [header]=\"header\"\n [showHeader]=\"showHeader\"\n [toggleable]=\"toggleable\"\n>\n <p>\n <ng-content></ng-content>\n </p>\n</p-panel>\n", styles: ["p{padding-bottom:0;margin-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: PanelModule }, { kind: "component", type: i1$3.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }] });
|
|
639
728
|
}
|
|
640
729
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PanelComponent, decorators: [{
|
|
641
730
|
type: Component,
|
|
642
|
-
args: [{ imports: [PanelModule], standalone: true, selector: 'sdc-panel', template: "<p-panel\n [collapsed]=\"collapsed\"\n [header]=\"header\"\n [showHeader]=\"showHeader\"\n [toggleable]=\"toggleable\"\n>\n <p
|
|
731
|
+
args: [{ imports: [PanelModule], standalone: true, selector: 'sdc-panel', template: "<p-panel\n [collapsed]=\"collapsed\"\n [header]=\"header\"\n [showHeader]=\"showHeader\"\n [toggleable]=\"toggleable\"\n>\n <p>\n <ng-content></ng-content>\n </p>\n</p-panel>\n", styles: ["p{padding-bottom:0;margin-bottom:0}\n"] }]
|
|
643
732
|
}], propDecorators: { collapsed: [{
|
|
644
733
|
type: Input
|
|
645
734
|
}], header: [{
|
|
@@ -651,13 +740,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
651
740
|
}] } });
|
|
652
741
|
|
|
653
742
|
class SearchboxComponent {
|
|
654
|
-
|
|
655
|
-
clearEvent = new EventEmitter();
|
|
743
|
+
value = '';
|
|
656
744
|
width = false;
|
|
657
745
|
disabled = false;
|
|
658
|
-
|
|
746
|
+
placeholder = null;
|
|
747
|
+
searchEvent = new EventEmitter();
|
|
748
|
+
clearEvent = new EventEmitter();
|
|
659
749
|
getStyles() {
|
|
660
|
-
return
|
|
750
|
+
return getDimensionStyles('width', this.width);
|
|
661
751
|
}
|
|
662
752
|
onSearch() {
|
|
663
753
|
this.searchEvent.emit(this.value);
|
|
@@ -667,7 +757,7 @@ class SearchboxComponent {
|
|
|
667
757
|
this.clearEvent.emit();
|
|
668
758
|
}
|
|
669
759
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SearchboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
670
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SearchboxComponent, isStandalone: true, selector: "sdc-searchbox", inputs: { width: "width", disabled: "disabled" }, outputs: { searchEvent: "onSearch", clearEvent: "onClear" }, ngImport: i0, template: "<p-inputgroup [ngStyle]=\"getStyles()\" >\n <input\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n pInputText\n type=\"text\"\n />\n\n <p-inputgroup-addon>\n <p-button\n (onClick)=\"onClear()\"\n [disabled]=\"disabled\" \n icon=\"fas fa-times\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n\n <p-inputgroup-addon>\n <p-button\n (onClick)=\"onSearch()\"\n [disabled]=\"disabled\"\n icon=\"fas fa-search\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n</p-inputgroup>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type:
|
|
760
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SearchboxComponent, isStandalone: true, selector: "sdc-searchbox", inputs: { width: "width", disabled: "disabled", placeholder: "placeholder" }, outputs: { searchEvent: "onSearch", clearEvent: "onClear" }, ngImport: i0, template: "<p-inputgroup [ngStyle]=\"getStyles()\" >\n <input\n (keyup.enter)=\"onSearch()\"\n (keyup.esc)=\"onClear()\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\" placeholder || ('platform.datacore.search' | translate)\"\n pInputText\n type=\"text\"\n />\n\n <p-inputgroup-addon>\n <p-button\n (onClick)=\"onClear()\"\n [disabled]=\"disabled\" \n icon=\"fas fa-times\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n\n <p-inputgroup-addon>\n <p-button\n (onClick)=\"onSearch()\"\n [disabled]=\"disabled\"\n icon=\"fas fa-search\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n</p-inputgroup>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: i4$2.InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i5$1.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["style", "styleClass"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6$1.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
|
|
671
761
|
}
|
|
672
762
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SearchboxComponent, decorators: [{
|
|
673
763
|
type: Component,
|
|
@@ -678,26 +768,81 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
678
768
|
InputGroupAddonModule,
|
|
679
769
|
InputGroupModule,
|
|
680
770
|
InputTextModule,
|
|
681
|
-
ReactiveFormsModule
|
|
682
|
-
|
|
683
|
-
|
|
771
|
+
ReactiveFormsModule,
|
|
772
|
+
TranslateModule
|
|
773
|
+
], standalone: true, selector: 'sdc-searchbox', template: "<p-inputgroup [ngStyle]=\"getStyles()\" >\n <input\n (keyup.enter)=\"onSearch()\"\n (keyup.esc)=\"onClear()\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\" placeholder || ('platform.datacore.search' | translate)\"\n pInputText\n type=\"text\"\n />\n\n <p-inputgroup-addon>\n <p-button\n (onClick)=\"onClear()\"\n [disabled]=\"disabled\" \n icon=\"fas fa-times\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n\n <p-inputgroup-addon>\n <p-button\n (onClick)=\"onSearch()\"\n [disabled]=\"disabled\"\n icon=\"fas fa-search\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n</p-inputgroup>\n" }]
|
|
774
|
+
}], propDecorators: { width: [{
|
|
775
|
+
type: Input
|
|
776
|
+
}], disabled: [{
|
|
777
|
+
type: Input
|
|
778
|
+
}], placeholder: [{
|
|
779
|
+
type: Input
|
|
780
|
+
}], searchEvent: [{
|
|
684
781
|
type: Output,
|
|
685
782
|
args: ['onSearch']
|
|
686
783
|
}], clearEvent: [{
|
|
687
784
|
type: Output,
|
|
688
785
|
args: ['onClear']
|
|
689
|
-
}], width: [{
|
|
690
|
-
type: Input
|
|
691
|
-
}], disabled: [{
|
|
692
|
-
type: Input
|
|
693
786
|
}] } });
|
|
694
787
|
|
|
788
|
+
class SpinnerService {
|
|
789
|
+
spinner = new BehaviorSubject(false);
|
|
790
|
+
start() {
|
|
791
|
+
this.spinner.next(true);
|
|
792
|
+
}
|
|
793
|
+
stop() {
|
|
794
|
+
this.spinner.next(false);
|
|
795
|
+
}
|
|
796
|
+
delay(ms) {
|
|
797
|
+
this.start();
|
|
798
|
+
setTimeout(() => this.stop(), ms);
|
|
799
|
+
}
|
|
800
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
801
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerService, providedIn: 'root' });
|
|
802
|
+
}
|
|
803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerService, decorators: [{
|
|
804
|
+
type: Injectable,
|
|
805
|
+
args: [{ providedIn: 'root' }]
|
|
806
|
+
}] });
|
|
807
|
+
|
|
808
|
+
class SpinnerComponent {
|
|
809
|
+
$service;
|
|
810
|
+
subscription = null;
|
|
811
|
+
loading = false;
|
|
812
|
+
constructor($service) {
|
|
813
|
+
this.$service = $service;
|
|
814
|
+
}
|
|
815
|
+
ngOnInit() {
|
|
816
|
+
this.subscription = this.$service.spinner.subscribe((status) => {
|
|
817
|
+
this.loading = status;
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
ngOnDestroy() {
|
|
821
|
+
if (this.subscription) {
|
|
822
|
+
this.subscription.unsubscribe();
|
|
823
|
+
this.subscription = null;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
getStyle() {
|
|
827
|
+
return {
|
|
828
|
+
width: '50px',
|
|
829
|
+
height: '50px'
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerComponent, deps: [{ token: SpinnerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
833
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SpinnerComponent, isStandalone: true, selector: "sdc-spinner", ngImport: i0, template: "<p-blockUI baseZIndex=\"9999999999\" [blocked]=\"loading\">\n <div class=\"spinner-container\">\n <p-progress-spinner\n [style]=\"getStyle()\"\n animationDuration=\".5s\"\n fill=\"transparent\"\n strokeWidth=\"8\"\n />\n </div>\n</p-blockUI>\n", styles: [".spinner-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i3$1.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "ngmodule", type: BlockUIModule }, { kind: "component", type: i3$2.BlockUI, selector: "p-blockUI, p-blockui, p-block-ui", inputs: ["target", "autoZIndex", "baseZIndex", "styleClass", "blocked"] }] });
|
|
834
|
+
}
|
|
835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerComponent, decorators: [{
|
|
836
|
+
type: Component,
|
|
837
|
+
args: [{ imports: [ProgressSpinnerModule, BlockUIModule], standalone: true, selector: 'sdc-spinner', template: "<p-blockUI baseZIndex=\"9999999999\" [blocked]=\"loading\">\n <div class=\"spinner-container\">\n <p-progress-spinner\n [style]=\"getStyle()\"\n animationDuration=\".5s\"\n fill=\"transparent\"\n strokeWidth=\"8\"\n />\n </div>\n</p-blockUI>\n", styles: [".spinner-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}\n"] }]
|
|
838
|
+
}], ctorParameters: () => [{ type: SpinnerService }] });
|
|
839
|
+
|
|
695
840
|
class SqlEditorComponent {
|
|
696
|
-
|
|
697
|
-
onDomainFilter = new EventEmitter();
|
|
841
|
+
height = null;
|
|
698
842
|
sql = '';
|
|
699
843
|
width = null;
|
|
700
|
-
|
|
844
|
+
onDomainFilter = new EventEmitter();
|
|
845
|
+
editorContainer;
|
|
701
846
|
set schema(value) {
|
|
702
847
|
this.$schema = value;
|
|
703
848
|
this.updateEditorExtensions(); // atualiza se schema mudar
|
|
@@ -773,7 +918,7 @@ class SqlEditorComponent {
|
|
|
773
918
|
});
|
|
774
919
|
}
|
|
775
920
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SqlEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
776
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SqlEditorComponent, isStandalone: true, selector: "sdc-sql-editor", inputs: {
|
|
921
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SqlEditorComponent, isStandalone: true, selector: "sdc-sql-editor", inputs: { height: "height", sql: "sql", width: "width", schema: "schema" }, outputs: { onDomainFilter: "onDomainFilter" }, providers: [
|
|
777
922
|
{
|
|
778
923
|
provide: NG_VALUE_ACCESSOR,
|
|
779
924
|
useExisting: forwardRef(() => SqlEditorComponent),
|
|
@@ -790,17 +935,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
790
935
|
multi: true
|
|
791
936
|
}
|
|
792
937
|
], standalone: true, selector: 'sdc-sql-editor', template: "<div #editorContainer class=\"sdc-sql-editor\" [style]=\"getStyles()\"></div>" }]
|
|
793
|
-
}], propDecorators: {
|
|
794
|
-
type:
|
|
795
|
-
args: ['editorContainer', { static: true }]
|
|
796
|
-
}], onDomainFilter: [{
|
|
797
|
-
type: Output
|
|
938
|
+
}], propDecorators: { height: [{
|
|
939
|
+
type: Input
|
|
798
940
|
}], sql: [{
|
|
799
941
|
type: Input
|
|
800
942
|
}], width: [{
|
|
801
943
|
type: Input
|
|
802
|
-
}],
|
|
803
|
-
type:
|
|
944
|
+
}], onDomainFilter: [{
|
|
945
|
+
type: Output
|
|
946
|
+
}], editorContainer: [{
|
|
947
|
+
type: ViewChild,
|
|
948
|
+
args: ['editorContainer', { static: true }]
|
|
804
949
|
}], schema: [{
|
|
805
950
|
type: Input
|
|
806
951
|
}] } });
|
|
@@ -813,7 +958,7 @@ class TextboxComponent extends InputsComponent {
|
|
|
813
958
|
useExisting: forwardRef(() => TextboxComponent),
|
|
814
959
|
multi: true
|
|
815
960
|
}
|
|
816
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"field-box\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n\n <input\n (input)=\"onInput($event)\"\n [disabled]=\"disabled\"\n [id]=\"identity.id\"\n [name]=\"identity.name\"\n [ngClass]=\"getInvalidClass()\"\n [ngStyle]=\"getInputStyle()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"value\"\n pInputText\n type=\"text\"\n />\n\n <small\n *ngIf=\"message\"\n [ngClass]=\"getInvalidMessageClass()\"\n >{{ message }}</small>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
961
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"field-box\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n\n <input\n (input)=\"onInput($event)\"\n [disabled]=\"disabled\"\n [id]=\"identity.id\"\n [name]=\"identity.name\"\n [ngClass]=\"getInvalidClass()\"\n [ngStyle]=\"getInputStyle()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"value\"\n pInputText\n type=\"text\"\n />\n\n <small\n *ngIf=\"message\"\n [ngClass]=\"getInvalidMessageClass()\"\n >{{ message }}</small>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6$1.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }] });
|
|
817
962
|
}
|
|
818
963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
819
964
|
type: Component,
|
|
@@ -827,43 +972,81 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
827
972
|
}] });
|
|
828
973
|
|
|
829
974
|
class ToastComponent {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
975
|
+
$service;
|
|
976
|
+
$subscriptions = [];
|
|
977
|
+
key = CONSTANTS.TOAST_DEFAULT_KEY;
|
|
978
|
+
zIndex = 999999;
|
|
979
|
+
toast;
|
|
980
|
+
constructor($service) {
|
|
981
|
+
this.$service = $service;
|
|
833
982
|
}
|
|
834
|
-
|
|
835
|
-
this
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
983
|
+
ngOnInit() {
|
|
984
|
+
this.$subscriptions = [
|
|
985
|
+
this.$service.messageObserver.subscribe(() => {
|
|
986
|
+
this.toast.el.nativeElement.children[0].style.zIndex = this.zIndex.toString();
|
|
987
|
+
})
|
|
988
|
+
];
|
|
840
989
|
}
|
|
841
|
-
|
|
842
|
-
this.
|
|
990
|
+
ngOnDestroy() {
|
|
991
|
+
this.$subscriptions.forEach(subscription => subscription?.unsubscribe());
|
|
843
992
|
}
|
|
844
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastComponent, deps: [{ token:
|
|
845
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ToastComponent, isStandalone: true, selector: "sdc-toast",
|
|
993
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastComponent, deps: [{ token: MessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
994
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ToastComponent, isStandalone: true, selector: "sdc-toast", inputs: { key: "key", zIndex: "zIndex" }, viewQueries: [{ propertyName: "toast", first: true, predicate: ["toast"], descendants: true, static: true }], ngImport: i0, template: "<p-toast #toast [key]=\"key\" />\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i2$1.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }] });
|
|
846
995
|
}
|
|
847
996
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastComponent, decorators: [{
|
|
848
997
|
type: Component,
|
|
849
|
-
args: [{
|
|
850
|
-
}], ctorParameters: () => [{ type:
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
loading = false;
|
|
854
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
855
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SpinnerComponent, isStandalone: true, selector: "sdc-spinner", inputs: { loading: "loading" }, ngImport: i0, template: "<p-blockUI [blocked]=\"loading\">\n <div class=\"spinner-container\">\n <p-progressSpinner></p-progressSpinner>\n </div>\n</p-blockUI>", styles: [".spinner-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i1$5.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "ngmodule", type: BlockUIModule }, { kind: "component", type: i2$3.BlockUI, selector: "p-blockUI, p-blockui, p-block-ui", inputs: ["target", "autoZIndex", "baseZIndex", "styleClass", "blocked"] }] });
|
|
856
|
-
}
|
|
857
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerComponent, decorators: [{
|
|
858
|
-
type: Component,
|
|
859
|
-
args: [{ selector: 'sdc-spinner', standalone: true, imports: [ProgressSpinnerModule, BlockUIModule], template: "<p-blockUI [blocked]=\"loading\">\n <div class=\"spinner-container\">\n <p-progressSpinner></p-progressSpinner>\n </div>\n</p-blockUI>", styles: [".spinner-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}\n"] }]
|
|
860
|
-
}], propDecorators: { loading: [{
|
|
998
|
+
args: [{ imports: [ToastModule], standalone: true, selector: 'sdc-toast', template: "<p-toast #toast [key]=\"key\" />\n" }]
|
|
999
|
+
}], ctorParameters: () => [{ type: MessageService }], propDecorators: { key: [{
|
|
1000
|
+
type: Input
|
|
1001
|
+
}], zIndex: [{
|
|
861
1002
|
type: Input
|
|
1003
|
+
}], toast: [{
|
|
1004
|
+
type: ViewChild,
|
|
1005
|
+
args: ['toast', { static: true }]
|
|
862
1006
|
}] } });
|
|
863
1007
|
|
|
1008
|
+
class ToastService {
|
|
1009
|
+
$service;
|
|
1010
|
+
constructor($service) {
|
|
1011
|
+
this.$service = $service;
|
|
1012
|
+
}
|
|
1013
|
+
showInfo(toast) {
|
|
1014
|
+
this.showGlobal(toast, 'info');
|
|
1015
|
+
}
|
|
1016
|
+
showSuccess(toast) {
|
|
1017
|
+
this.showGlobal(toast, 'success');
|
|
1018
|
+
}
|
|
1019
|
+
showWarning(toast) {
|
|
1020
|
+
this.showGlobal(toast, 'warn');
|
|
1021
|
+
}
|
|
1022
|
+
showError(toast) {
|
|
1023
|
+
this.showGlobal(toast, 'error');
|
|
1024
|
+
}
|
|
1025
|
+
clear() {
|
|
1026
|
+
this.$service.clear();
|
|
1027
|
+
}
|
|
1028
|
+
showGlobal(toast, severity) {
|
|
1029
|
+
this.$service.clear(toast.key ?? CONSTANTS.TOAST_DEFAULT_KEY);
|
|
1030
|
+
this.$service.add({
|
|
1031
|
+
closable: toast.closable ?? true,
|
|
1032
|
+
detail: toast.detail instanceof Error ? toast.detail.message : toast.detail,
|
|
1033
|
+
key: toast.key ?? CONSTANTS.TOAST_DEFAULT_KEY,
|
|
1034
|
+
life: toast.life ?? CONSTANTS.THREE_K,
|
|
1035
|
+
severity: severity,
|
|
1036
|
+
sticky: toast.sticky ?? false,
|
|
1037
|
+
summary: toast.summary
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastService, deps: [{ token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1041
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastService });
|
|
1042
|
+
}
|
|
1043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastService, decorators: [{
|
|
1044
|
+
type: Injectable
|
|
1045
|
+
}], ctorParameters: () => [{ type: i1$2.MessageService }] });
|
|
1046
|
+
|
|
864
1047
|
/**
|
|
865
1048
|
* Generated bundle index. Do not edit.
|
|
866
1049
|
*/
|
|
867
1050
|
|
|
868
|
-
export { ButtonComponent, CONSTANTS, ComboboxComponent, HyperlinkComponent, ListComponent, ModalComponent, PanelComponent, SQL_HELPER, SearchboxComponent, SpinnerComponent, SqlEditorComponent, TextboxComponent, ToastComponent, createSqlAutoCompletionHadler, provideDataCoreLib, sqlDomainFilterDecorator, sqlFormatterHandler, sqlUppercaseHandler };
|
|
1051
|
+
export { ButtonComponent, CONSTANTS, ComboboxComponent, HyperlinkComponent, ListComponent, ModalComponent, PanelComponent, SQL_HELPER, SearchboxComponent, SpinnerComponent, SpinnerService, SqlEditorComponent, TextboxComponent, ToastComponent, ToastService, createSqlAutoCompletionHadler, getDimensionStyles, provideDataCoreLib, provideTranslations, serviceProviders, sqlDomainFilterDecorator, sqlFormatterHandler, sqlUppercaseHandler };
|
|
869
1052
|
//# sourceMappingURL=seniorsistemas-data-seniorx-core.mjs.map
|