@decaf-ts/for-angular 0.0.80 → 0.0.81
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/assets/i18n/ew/en.json +17 -11
- package/fesm2022/decaf-ts-for-angular.mjs +485 -502
- package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
- package/index.d.ts +165 -283
- package/package.json +2 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { HTML5InputTypes, parseValueByType, HTML5CheckTypes, escapeHtml, parseToNumber, RenderingEngine, DecafComponent, UIKeys, RenderingError, UIMediaBreakPoints, DecafEventHandler } from '@decaf-ts/ui-decorators';
|
|
1
|
+
import { HTML5InputTypes, parseValueByType, HTML5CheckTypes, escapeHtml, parseToNumber, RenderingEngine, DecafComponent, ComponentEventNames, UIKeys, RenderingError, UIMediaBreakPoints, LayoutGridGaps, ElementSizes, DecafEventHandler } from '@decaf-ts/ui-decorators';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { InjectionToken, provideEnvironmentInitializer, isDevMode, reflectComponentType, Injector, createEnvironmentInjector, runInInjectionContext, createComponent, inject, NgZone, Injectable, Input, Directive, signal, ChangeDetectorRef, EnvironmentInjector, Renderer2, EventEmitter, ElementRef, Output, ViewChild, Inject, ViewContainerRef, TemplateRef, Component, ViewEncapsulation, HostListener, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1$1 from '@angular/common';
|
|
5
5
|
import { Location, NgComponentOutlet, CommonModule } from '@angular/common';
|
|
6
|
-
import { VALIDATION_PARENT_KEY, ValidationKeys, DEFAULT_PATTERNS, Validation, Primitives, ComparisonValidationKeys, PathProxyEngine, Model, ModelKeys, isValidDate as isValidDate$1, parseDate, sf, ReservedModels } from '@decaf-ts/decorator-validation';
|
|
6
|
+
import { VALIDATION_PARENT_KEY, ValidationKeys, DEFAULT_PATTERNS, Validation, Primitives, ComparisonValidationKeys, PathProxyEngine, Model, ModelKeys, isValidDate as isValidDate$1, parseDate, sf as sf$1, ReservedModels } from '@decaf-ts/decorator-validation';
|
|
7
7
|
import { OperationKeys, InternalError, NotFoundError } from '@decaf-ts/db-decorators';
|
|
8
8
|
import * as i1 from '@angular/forms';
|
|
9
9
|
import { FormGroup, FormControl, FormArray, AbstractControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
10
10
|
import { InjectableRegistryImp } from '@decaf-ts/injectable-decorators';
|
|
11
|
-
import { Logging, LoggedClass } from '@decaf-ts/logging';
|
|
11
|
+
import { Logging, LoggedClass, sf } from '@decaf-ts/logging';
|
|
12
12
|
import { Repository, OrderDirection, Condition } from '@decaf-ts/core';
|
|
13
13
|
import { uses, Metadata, apply, metadata } from '@decaf-ts/decoration';
|
|
14
14
|
import { AnimationController, provideIonicAngular, LoadingController, IonIcon, IonButton, IonModal, IonSpinner, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar, IonInput, IonItem, IonCheckbox, IonRadioGroup, IonRadio, IonSelect, IonSelectOption, IonLabel, IonBadge, IonText, IonTextarea, IonCard, IonCardHeader, IonCardContent, IonCardTitle, IonCardSubtitle, IonList, IonReorder, IonReorderGroup, IonSearchbar, IonChip, IonRefresher, IonThumbnail, IonSkeletonText, IonRefresherContent, IonInfiniteScroll, IonInfiniteScrollContent, IonListHeader, IonItemSliding, IonItemOptions, IonItemOption, IonPopover, NavController } from '@ionic/angular/standalone';
|
|
15
15
|
import { faker } from '@faker-js/faker';
|
|
16
|
-
import { forkJoin, Subject, BehaviorSubject, fromEvent, of, merge, Observable, timer,
|
|
17
|
-
import {
|
|
16
|
+
import { forkJoin, Subject, BehaviorSubject, fromEvent, of, merge, Observable, timer, shareReplay as shareReplay$1, takeUntil as takeUntil$1, firstValueFrom, debounceTime } from 'rxjs';
|
|
17
|
+
import { Title, DomSanitizer } from '@angular/platform-browser';
|
|
18
|
+
import { Router, NavigationStart, NavigationEnd, ActivatedRoute } from '@angular/router';
|
|
19
|
+
import { MenuController } from '@ionic/angular';
|
|
18
20
|
import { TranslateParser, provideTranslateService, TranslateLoader, provideTranslateParser, TranslateService, TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
|
19
21
|
import { provideHttpClient, HttpClient } from '@angular/common/http';
|
|
20
22
|
import { map, distinctUntilChanged, takeUntil, shareReplay, tap, switchMap } from 'rxjs/operators';
|
|
21
|
-
import { Title, DomSanitizer } from '@angular/platform-browser';
|
|
22
|
-
import { MenuController } from '@ionic/angular';
|
|
23
23
|
import { __decorate, __metadata } from 'tslib';
|
|
24
24
|
import { addIcons } from 'ionicons';
|
|
25
25
|
import * as allIcons from 'ionicons/icons';
|
|
@@ -127,32 +127,6 @@ const WindowColorSchemes = {
|
|
|
127
127
|
dark: 'dark',
|
|
128
128
|
undefined: 'undefined',
|
|
129
129
|
};
|
|
130
|
-
const ElementSizes = {
|
|
131
|
-
xsmall: 'xsmall',
|
|
132
|
-
small: 'small',
|
|
133
|
-
medium: 'medium',
|
|
134
|
-
default: 'default',
|
|
135
|
-
large: 'large',
|
|
136
|
-
xLarge: 'xlarge',
|
|
137
|
-
'2xLarge': '2xlarge',
|
|
138
|
-
auto: 'auto',
|
|
139
|
-
expand: 'expand',
|
|
140
|
-
block: 'block',
|
|
141
|
-
};
|
|
142
|
-
const ElementPositions = {
|
|
143
|
-
left: 'left',
|
|
144
|
-
center: 'center',
|
|
145
|
-
right: 'right',
|
|
146
|
-
top: 'top',
|
|
147
|
-
bottom: 'bottom',
|
|
148
|
-
};
|
|
149
|
-
const LayoutGridGaps = {
|
|
150
|
-
small: 'small',
|
|
151
|
-
medium: 'medium',
|
|
152
|
-
large: 'large',
|
|
153
|
-
collapse: 'collapse',
|
|
154
|
-
none: '',
|
|
155
|
-
};
|
|
156
130
|
const ListItemPositions = {
|
|
157
131
|
uid: 'uid',
|
|
158
132
|
title: 'title',
|
|
@@ -202,84 +176,6 @@ const AngularEngineKeys = {
|
|
|
202
176
|
LOADED: 'engineLoaded',
|
|
203
177
|
DARK_PALETTE_CLASS: 'dcf-palette-dark',
|
|
204
178
|
};
|
|
205
|
-
/**
|
|
206
|
-
* @description Form validation state constants.
|
|
207
|
-
* @summary Contains constants representing the possible validation states of a form.
|
|
208
|
-
* These are used to check and handle form validation throughout the application.
|
|
209
|
-
* The VALID state indicates all form controls pass validation, while INVALID
|
|
210
|
-
* indicates one or more validation errors exist.
|
|
211
|
-
* @typedef {Object} FormConstants
|
|
212
|
-
* @property {string} VALID - Constant representing a valid form state
|
|
213
|
-
* @property {string} INVALID - Constant representing an invalid form state
|
|
214
|
-
* @const FormConstants
|
|
215
|
-
* @memberOf module:lib/engine/constants
|
|
216
|
-
*/
|
|
217
|
-
const FormConstants = {
|
|
218
|
-
VALID: 'VALID',
|
|
219
|
-
INVALID: 'INVALID',
|
|
220
|
-
};
|
|
221
|
-
/**
|
|
222
|
-
* @description Event name constants.
|
|
223
|
-
* @summary Contains constants for standardized event names used throughout the application.
|
|
224
|
-
* These constants ensure consistent event naming across components and make it easier to
|
|
225
|
-
* track and handle events. Each constant represents a specific application event type.
|
|
226
|
-
* @typedef {Object} ComponentEventNames
|
|
227
|
-
* @property {string} BackButtonClickEvent - Event fired when back button navigation ends
|
|
228
|
-
* @property {string} Render - Event after component initialize action occurs
|
|
229
|
-
* @property {string} Refresh - Event fired when a refresh action occurs
|
|
230
|
-
* @property {string} Click - Event fired when a click action occurs
|
|
231
|
-
* @property {string} Change - Event fired when a change action occurs
|
|
232
|
-
* @property {string} Submit - Event fired when a form submission occurs
|
|
233
|
-
* @property {string} ValidationError - Event fired when a validation error occurs
|
|
234
|
-
* @property {string} ThemeChange - Event fired when a theme change occurs
|
|
235
|
-
* @property {string} FormGroupLoaded - Event fired when a reactve form group is loaded
|
|
236
|
-
* @const ComponentEventNames
|
|
237
|
-
* @memberOf module:lib/engine/constants
|
|
238
|
-
*/
|
|
239
|
-
const ComponentEventNames = {
|
|
240
|
-
Render: 'render',
|
|
241
|
-
BackButtonClickEvent: 'backButtonNavigationEndEvent',
|
|
242
|
-
Refresh: 'RefreshEvent',
|
|
243
|
-
Click: 'ClickEvent',
|
|
244
|
-
Change: 'ChangeEvent',
|
|
245
|
-
Submit: 'SubmitEvent',
|
|
246
|
-
ValidationError: 'validationErrorEvent',
|
|
247
|
-
ThemeChange: 'themeChangeEvent',
|
|
248
|
-
FormGroupLoaded: 'formGroupLoadedEvent',
|
|
249
|
-
};
|
|
250
|
-
const TransactionHooks = {
|
|
251
|
-
BeforeCreate: 'beforeCreate',
|
|
252
|
-
AfterCreate: 'afterCreate',
|
|
253
|
-
BeforeUpdate: 'beforeUpdate',
|
|
254
|
-
AfterUpdate: 'afterUpdate',
|
|
255
|
-
BeforeDelete: 'beforeDelete',
|
|
256
|
-
AfterDelete: 'afterDelete',
|
|
257
|
-
};
|
|
258
|
-
/**
|
|
259
|
-
* @description Logger level constants.
|
|
260
|
-
* @summary Defines the logging levels used in the application's logging system.
|
|
261
|
-
* Lower numeric values represent more verbose logging, while higher values represent
|
|
262
|
-
* more critical logs. These levels control which log messages are output based on
|
|
263
|
-
* the configured logging threshold.
|
|
264
|
-
* @enum {number}
|
|
265
|
-
* @readonly
|
|
266
|
-
* @property {number} ALL - Log everything (most verbose)
|
|
267
|
-
* @property {number} DEBUG - Log debug information
|
|
268
|
-
* @property {number} INFO - Log informational messages
|
|
269
|
-
* @property {number} WARN - Log warnings
|
|
270
|
-
* @property {number} ERROR - Log errors
|
|
271
|
-
* @property {number} CRITICAL - Log critical errors (least verbose)
|
|
272
|
-
* @memberOf module:lib/engine/constants
|
|
273
|
-
*/
|
|
274
|
-
var LoggerLevels;
|
|
275
|
-
(function (LoggerLevels) {
|
|
276
|
-
LoggerLevels[LoggerLevels["ALL"] = 0] = "ALL";
|
|
277
|
-
LoggerLevels[LoggerLevels["DEBUG"] = 1] = "DEBUG";
|
|
278
|
-
LoggerLevels[LoggerLevels["INFO"] = 2] = "INFO";
|
|
279
|
-
LoggerLevels[LoggerLevels["WARN"] = 3] = "WARN";
|
|
280
|
-
LoggerLevels[LoggerLevels["ERROR"] = 4] = "ERROR";
|
|
281
|
-
LoggerLevels[LoggerLevels["CRITICAL"] = 5] = "CRITICAL";
|
|
282
|
-
})(LoggerLevels || (LoggerLevels = {}));
|
|
283
179
|
/**
|
|
284
180
|
* @description Route direction constants.
|
|
285
181
|
* @summary Defines the possible navigation directions in the application.
|
|
@@ -346,6 +242,8 @@ var ComponentsTagNames;
|
|
|
346
242
|
*/
|
|
347
243
|
var BaseComponentProps;
|
|
348
244
|
(function (BaseComponentProps) {
|
|
245
|
+
BaseComponentProps["MODEL_ID"] = "modelId";
|
|
246
|
+
BaseComponentProps["MODEL"] = "model";
|
|
349
247
|
BaseComponentProps["HANDLERS"] = "handlers";
|
|
350
248
|
BaseComponentProps["LOCALE"] = "locale";
|
|
351
249
|
BaseComponentProps["LOCALE_ROOT"] = "locale_root";
|
|
@@ -550,7 +448,6 @@ class ValidatorFactory {
|
|
|
550
448
|
function getDbAdapterFlavour() {
|
|
551
449
|
return (getOnWindow(DB_ADAPTER_FLAVOUR_TOKEN) || '');
|
|
552
450
|
}
|
|
553
|
-
;
|
|
554
451
|
/**
|
|
555
452
|
* @description Provides an array of component types for dynamic rendering.
|
|
556
453
|
* @summary Helper function to package component constructors for registration with the
|
|
@@ -589,9 +486,7 @@ function provideDecafDynamicComponents(...components) {
|
|
|
589
486
|
*/
|
|
590
487
|
function getModelAndRepository(model, clazz) {
|
|
591
488
|
try {
|
|
592
|
-
const modelName = (typeof model === Primitives.STRING
|
|
593
|
-
? model
|
|
594
|
-
: model.constructor.name);
|
|
489
|
+
const modelName = (typeof model === Primitives.STRING ? model : model.constructor.name);
|
|
595
490
|
const constructor = Model.get((modelName.charAt(0).toUpperCase() + modelName.slice(1)));
|
|
596
491
|
if (!constructor)
|
|
597
492
|
return undefined;
|
|
@@ -685,10 +580,9 @@ const decafPageTransition = (baseEl, opts) => {
|
|
|
685
580
|
};
|
|
686
581
|
function provideDecafPageTransition() {
|
|
687
582
|
return provideIonicAngular({
|
|
688
|
-
navAnimation: decafPageTransition
|
|
583
|
+
navAnimation: decafPageTransition,
|
|
689
584
|
});
|
|
690
585
|
}
|
|
691
|
-
;
|
|
692
586
|
function provideDecafDarkMode() {
|
|
693
587
|
return provideEnvironmentInitializer(() => {
|
|
694
588
|
const doc = getWindowDocument();
|
|
@@ -765,13 +659,13 @@ function getInjectablesRegistry() {
|
|
|
765
659
|
* @function isDevelopmentMode
|
|
766
660
|
* @memberOf module:for-angular
|
|
767
661
|
*/
|
|
768
|
-
function isDevelopmentMode(context =
|
|
662
|
+
function isDevelopmentMode(context = 'localhost') {
|
|
769
663
|
if (!context)
|
|
770
664
|
return isDevMode();
|
|
771
665
|
const win = getWindow();
|
|
772
666
|
return (isDevMode() ||
|
|
773
|
-
win?.[
|
|
774
|
-
win?.[
|
|
667
|
+
win?.['env']?.['CONTEXT'].toLowerCase() !== context.toLowerCase() ||
|
|
668
|
+
win?.['location']?.hostname?.includes(context));
|
|
775
669
|
}
|
|
776
670
|
/**
|
|
777
671
|
* @description Dispatches a custom event to the document window
|
|
@@ -811,9 +705,7 @@ function windowEventEmitter(name, detail, props) {
|
|
|
811
705
|
*/
|
|
812
706
|
function getOnWindowDocument(key) {
|
|
813
707
|
const doc = getWindowDocument();
|
|
814
|
-
return doc instanceof Document
|
|
815
|
-
? doc?.[key] || undefined
|
|
816
|
-
: undefined;
|
|
708
|
+
return doc instanceof Document ? doc?.[key] || undefined : undefined;
|
|
817
709
|
}
|
|
818
710
|
/**
|
|
819
711
|
* @description Retrieves the document object from the window
|
|
@@ -827,7 +719,7 @@ function getOnWindowDocument(key) {
|
|
|
827
719
|
* @memberOf module:for-angular
|
|
828
720
|
*/
|
|
829
721
|
function getWindowDocument() {
|
|
830
|
-
return getOnWindow(
|
|
722
|
+
return getOnWindow('document');
|
|
831
723
|
}
|
|
832
724
|
/**
|
|
833
725
|
* @description Retrieves a property from the window object
|
|
@@ -875,7 +767,7 @@ function setOnWindow(key, value) {
|
|
|
875
767
|
* @memberOf module:for-angular
|
|
876
768
|
*/
|
|
877
769
|
function getWindow() {
|
|
878
|
-
return globalThis?.[
|
|
770
|
+
return globalThis?.['window'];
|
|
879
771
|
}
|
|
880
772
|
/**
|
|
881
773
|
* @description Retrieves the width of the browser window
|
|
@@ -889,7 +781,7 @@ function getWindow() {
|
|
|
889
781
|
* @memberOf module:for-angular
|
|
890
782
|
*/
|
|
891
783
|
function getWindowWidth() {
|
|
892
|
-
return getOnWindow(
|
|
784
|
+
return getOnWindow('innerWidth') || 0;
|
|
893
785
|
}
|
|
894
786
|
/**
|
|
895
787
|
* @description Checks if a value is not undefined
|
|
@@ -924,25 +816,23 @@ function isNotUndefined(prop) {
|
|
|
924
816
|
*/
|
|
925
817
|
function getLocaleFromClassName(instance, suffix) {
|
|
926
818
|
if (typeof instance !== Primitives.STRING)
|
|
927
|
-
instance =
|
|
928
|
-
instance.name ||
|
|
929
|
-
instance?.constructor?.name;
|
|
819
|
+
instance = instance.name || instance?.constructor?.name;
|
|
930
820
|
let name = instance;
|
|
931
821
|
if (suffix)
|
|
932
822
|
name = `${instance}${suffix.charAt(0).toUpperCase() + suffix.slice(1)}`;
|
|
933
823
|
name = name
|
|
934
|
-
.replace(/_|-/g,
|
|
824
|
+
.replace(/_|-/g, '')
|
|
935
825
|
.replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => {
|
|
936
826
|
if (index > 1)
|
|
937
|
-
word =
|
|
827
|
+
word = '.' + word;
|
|
938
828
|
return word.toLowerCase();
|
|
939
829
|
})
|
|
940
|
-
.split(
|
|
830
|
+
.split('.');
|
|
941
831
|
if (name.length < 3)
|
|
942
|
-
return name.reverse().join(
|
|
832
|
+
return name.reverse().join('.');
|
|
943
833
|
const preffix = name[name.length - 1];
|
|
944
834
|
name.pop();
|
|
945
|
-
name = name.join(
|
|
835
|
+
name = name.join('_');
|
|
946
836
|
return `${preffix}.${name}`;
|
|
947
837
|
}
|
|
948
838
|
/**
|
|
@@ -958,7 +848,7 @@ function getLocaleFromClassName(instance, suffix) {
|
|
|
958
848
|
*/
|
|
959
849
|
function getLocaleLanguage() {
|
|
960
850
|
const win = getWindow();
|
|
961
|
-
return win.navigator.language ||
|
|
851
|
+
return win.navigator.language || 'en';
|
|
962
852
|
// return win?.[WINDOW_KEYS.LANGUAGE_SELECTED] || (win.navigator.language || '').split('-')[0] || "en";
|
|
963
853
|
}
|
|
964
854
|
/**
|
|
@@ -977,9 +867,9 @@ function getLocaleLanguage() {
|
|
|
977
867
|
*/
|
|
978
868
|
function generateRandomValue(length = 8, onlyNumbers = false) {
|
|
979
869
|
const chars = onlyNumbers
|
|
980
|
-
?
|
|
981
|
-
:
|
|
982
|
-
let result =
|
|
870
|
+
? '0123456789'
|
|
871
|
+
: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
872
|
+
let result = '';
|
|
983
873
|
for (let i = 0; i < length; i++)
|
|
984
874
|
result += chars.charAt(Math.floor(Math.random() * chars.length));
|
|
985
875
|
return result;
|
|
@@ -998,8 +888,9 @@ function generateRandomValue(length = 8, onlyNumbers = false) {
|
|
|
998
888
|
* @memberOf module:lib/helpers/utils
|
|
999
889
|
*/
|
|
1000
890
|
function stringToBoolean(prop) {
|
|
1001
|
-
if (typeof prop ===
|
|
1002
|
-
prop = prop.toLowerCase() ===
|
|
891
|
+
if (typeof prop === Primitives.STRING) {
|
|
892
|
+
prop = String(prop).toLowerCase() === 'true' ? true : false;
|
|
893
|
+
}
|
|
1003
894
|
return prop;
|
|
1004
895
|
}
|
|
1005
896
|
/**
|
|
@@ -1021,10 +912,9 @@ function isValidDate(date) {
|
|
|
1021
912
|
return ((date instanceof Date && !isNaN(date)) ||
|
|
1022
913
|
(() => {
|
|
1023
914
|
const testRegex = new RegExp(/^\d{4}-\d{2}-\d{2}$/).test(date);
|
|
1024
|
-
if (typeof date !== Primitives.STRING ||
|
|
1025
|
-
(!date?.includes("T") && !testRegex))
|
|
915
|
+
if (typeof date !== Primitives.STRING || (!date?.includes('T') && !testRegex))
|
|
1026
916
|
return false;
|
|
1027
|
-
date = date.split(
|
|
917
|
+
date = date.split('T')[0];
|
|
1028
918
|
if (!new RegExp(/^\d{4}-\d{2}-\d{2}$/).test(date))
|
|
1029
919
|
return false;
|
|
1030
920
|
return !!new Date(date);
|
|
@@ -1055,51 +945,18 @@ function isValidDate(date) {
|
|
|
1055
945
|
function formatDate(date, locale) {
|
|
1056
946
|
if (!locale)
|
|
1057
947
|
locale = getLocaleLanguage();
|
|
1058
|
-
if (typeof date ===
|
|
1059
|
-
date = new Date(typeof date ===
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
948
|
+
if (typeof date === Primitives.STRING || typeof date === 'number') {
|
|
949
|
+
date = new Date(typeof date === Primitives.STRING ? `${date}`.replace(/\//g, '-') : date);
|
|
950
|
+
}
|
|
951
|
+
return !isValidDate(date)
|
|
952
|
+
? `${date}`
|
|
953
|
+
: date.toLocaleString(locale, {
|
|
954
|
+
year: 'numeric',
|
|
955
|
+
day: '2-digit',
|
|
956
|
+
month: '2-digit',
|
|
957
|
+
});
|
|
1068
958
|
}
|
|
1069
959
|
/**
|
|
1070
|
-
* @description Attempts to parse a date string, Date object, or number into a valid Date object.
|
|
1071
|
-
* @summary This function provides robust date parsing functionality that handles the specific
|
|
1072
|
-
* format "DD/MM/YYYY HH:MM:SS:MS". It first validates the input date, and if already valid,
|
|
1073
|
-
* returns it as-is. For string inputs, it parses the date and time components separately,
|
|
1074
|
-
* extracts numeric values, and constructs a new Date object. The function includes validation
|
|
1075
|
-
* to ensure the resulting Date object is valid and logs a warning if parsing fails.
|
|
1076
|
-
* Returns null for invalid or unsupported date formats.
|
|
1077
|
-
*
|
|
1078
|
-
* @param {string | Date | number} date - The date to parse. Can be a Date object, a timestamp number,
|
|
1079
|
-
* or a date string in the format "DD/MM/YYYY HH:MM:SS:MS"
|
|
1080
|
-
* @returns {Date | null} A valid Date object if parsing is successful, or null if the date is invalid
|
|
1081
|
-
* or doesn't match the expected format
|
|
1082
|
-
*
|
|
1083
|
-
* @function parseToValidDate
|
|
1084
|
-
* @memberOf module:lib/helpers/utils
|
|
1085
|
-
*/
|
|
1086
|
-
function parseToValidDate(date) {
|
|
1087
|
-
if (isValidDate(date))
|
|
1088
|
-
return date;
|
|
1089
|
-
if (!`${date}`.includes("/"))
|
|
1090
|
-
return null;
|
|
1091
|
-
const [dateString, timeString] = date.split(" ");
|
|
1092
|
-
const [day, month, year] = dateString.split("/").map(Number);
|
|
1093
|
-
const [hours, minutes, seconds, milliseconds] = timeString
|
|
1094
|
-
.split(":")
|
|
1095
|
-
.map(Number);
|
|
1096
|
-
date = new Date(year, month - 1, day, hours, minutes, seconds, milliseconds);
|
|
1097
|
-
if (!isValidDate(date)) {
|
|
1098
|
-
console.warn("parseToValidDate - Invalid date format", date);
|
|
1099
|
-
return null;
|
|
1100
|
-
}
|
|
1101
|
-
return date;
|
|
1102
|
-
}
|
|
1103
960
|
/**
|
|
1104
961
|
* @description Maps an item object using a provided mapper object and optional additional properties.
|
|
1105
962
|
* @summary This function transforms a source object into a new object based on mapping rules defined
|
|
@@ -1120,8 +977,8 @@ function parseToValidDate(date) {
|
|
|
1120
977
|
*/
|
|
1121
978
|
function itemMapper(item, mapper, props) {
|
|
1122
979
|
return Object.entries(mapper).reduce((accum, [key, prop]) => {
|
|
1123
|
-
const arrayValue = (prop ||
|
|
1124
|
-
let value = item?.[prop] ||
|
|
980
|
+
const arrayValue = (prop || '').split('.');
|
|
981
|
+
let value = item?.[prop] || '';
|
|
1125
982
|
if (!prop) {
|
|
1126
983
|
accum[key] = prop;
|
|
1127
984
|
}
|
|
@@ -1134,7 +991,7 @@ function itemMapper(item, mapper, props) {
|
|
|
1134
991
|
for (const propValue of arrayValue)
|
|
1135
992
|
value = !value
|
|
1136
993
|
? item[propValue]
|
|
1137
|
-
: (typeof value ===
|
|
994
|
+
: (typeof value === 'string' ? JSON.parse(value) : value)[propValue];
|
|
1138
995
|
if (isValidDate(new Date(value)))
|
|
1139
996
|
value = `${formatDate(value)}`;
|
|
1140
997
|
accum[key] = value === null || value === undefined ? prop : value;
|
|
@@ -1167,8 +1024,7 @@ function dataMapper(data, mapper, props) {
|
|
|
1167
1024
|
return [];
|
|
1168
1025
|
return data.reduce((accum, curr) => {
|
|
1169
1026
|
const item = itemMapper(curr, mapper, props);
|
|
1170
|
-
const hasValues = [...new Set(Object.values(item))].filter((value) => value).length >
|
|
1171
|
-
0;
|
|
1027
|
+
const hasValues = [...new Set(Object.values(item))].filter((value) => value).length > 0;
|
|
1172
1028
|
accum.push(hasValues ? item : curr);
|
|
1173
1029
|
return accum;
|
|
1174
1030
|
}, []);
|
|
@@ -1205,8 +1061,8 @@ function removeFocusTrap() {
|
|
|
1205
1061
|
* @function cleanSpaces
|
|
1206
1062
|
* @memberOf module:for-angular
|
|
1207
1063
|
*/
|
|
1208
|
-
function cleanSpaces(value =
|
|
1209
|
-
value = `${value}`.trim().replace(/\s+/g,
|
|
1064
|
+
function cleanSpaces(value = '', lowercase = false) {
|
|
1065
|
+
value = `${value}`.trim().replace(/\s+/g, ' ');
|
|
1210
1066
|
return lowercase ? value.toLowerCase() : value;
|
|
1211
1067
|
}
|
|
1212
1068
|
/**
|
|
@@ -1222,7 +1078,7 @@ function cleanSpaces(value = "", lowercase = false) {
|
|
|
1222
1078
|
* @memberOf module:for-angular
|
|
1223
1079
|
*/
|
|
1224
1080
|
async function isDarkMode() {
|
|
1225
|
-
const { matches } = getWindow().matchMedia(
|
|
1081
|
+
const { matches } = getWindow().matchMedia('(prefers-color-scheme: dark)');
|
|
1226
1082
|
return matches;
|
|
1227
1083
|
}
|
|
1228
1084
|
/**
|
|
@@ -1240,8 +1096,8 @@ async function isDarkMode() {
|
|
|
1240
1096
|
*/
|
|
1241
1097
|
function filterString(original, value, contain = true) {
|
|
1242
1098
|
if (typeof original === Primitives.STRING)
|
|
1243
|
-
original = original.split(
|
|
1244
|
-
return (original.filter((str) => contain ? str.includes(value) : !str.includes(value)) || []).join(
|
|
1099
|
+
original = original.split(' ');
|
|
1100
|
+
return (original.filter((str) => contain ? str.includes(value) : !str.includes(value)) || []).join(' ');
|
|
1245
1101
|
}
|
|
1246
1102
|
/**
|
|
1247
1103
|
* @summary Retrieves the icon associated with a menu item based on its label.
|
|
@@ -1252,11 +1108,8 @@ function filterString(original, value, contain = true) {
|
|
|
1252
1108
|
*/
|
|
1253
1109
|
function getMenuIcon(label, menu) {
|
|
1254
1110
|
const item = menu.find((m) => m.label?.toLowerCase() === label.toLowerCase());
|
|
1255
|
-
return item?.icon ||
|
|
1111
|
+
return item?.icon || '';
|
|
1256
1112
|
}
|
|
1257
|
-
const isClassConstructor = (value) => {
|
|
1258
|
-
return typeof value === "function" && /^class\s/.test(String(value));
|
|
1259
|
-
};
|
|
1260
1113
|
|
|
1261
1114
|
/**
|
|
1262
1115
|
* @module lib/engine/NgxFormService
|
|
@@ -2268,8 +2121,10 @@ class DecafFakerRepository extends LoggedClass {
|
|
|
2268
2121
|
}
|
|
2269
2122
|
get repository() {
|
|
2270
2123
|
if (!this._repository) {
|
|
2271
|
-
const modelName = typeof this.model ===
|
|
2272
|
-
|
|
2124
|
+
const modelName = typeof this.model === Primitives.STRING
|
|
2125
|
+
? this.model
|
|
2126
|
+
: this.model.constructor.name;
|
|
2127
|
+
const constructor = Model.get(String(modelName));
|
|
2273
2128
|
if (!constructor)
|
|
2274
2129
|
throw new InternalError(`Cannot find model ${modelName}. was it registered with @model?`);
|
|
2275
2130
|
try {
|
|
@@ -2307,7 +2162,7 @@ class DecafFakerRepository extends LoggedClass {
|
|
|
2307
2162
|
}
|
|
2308
2163
|
dataFunctions[prop] = this.getPropValueFn(prop, key);
|
|
2309
2164
|
}
|
|
2310
|
-
const data = getFakerData(limit, dataFunctions, typeof this.model ===
|
|
2165
|
+
const data = getFakerData(limit, dataFunctions, typeof this.model === Primitives.STRING ? String(this.model) : this.model?.constructor.name);
|
|
2311
2166
|
if (!values)
|
|
2312
2167
|
return data;
|
|
2313
2168
|
const _values = Object.values(values);
|
|
@@ -2750,7 +2605,7 @@ class NgxRenderingEngine extends RenderingEngine {
|
|
|
2750
2605
|
NgxRenderingEngine._injector = injector;
|
|
2751
2606
|
try {
|
|
2752
2607
|
this._model = model;
|
|
2753
|
-
const formId = Date.now()
|
|
2608
|
+
const formId = `${Date.now()}`.toUpperCase();
|
|
2754
2609
|
const fieldDef = this.toFieldDefinition(model, globalProps);
|
|
2755
2610
|
const props = fieldDef.props;
|
|
2756
2611
|
if (!NgxRenderingEngine._operation)
|
|
@@ -3160,7 +3015,7 @@ class I18nLoader {
|
|
|
3160
3015
|
*/
|
|
3161
3016
|
getTranslation(lang) {
|
|
3162
3017
|
const libKeys = libLanguage[lang] || libLanguage['en'] || {};
|
|
3163
|
-
const httpRequests$ = forkJoin(this.resources.map(config => this.http.get(`${config.prefix}${lang}${this.getSuffix(config.suffix || '.json')}`)));
|
|
3018
|
+
const httpRequests$ = forkJoin(this.resources.map((config) => this.http.get(`${config.prefix}${lang}${this.getSuffix(config.suffix || '.json')}`)));
|
|
3164
3019
|
/**
|
|
3165
3020
|
* @description Recursively merges two translation objects.
|
|
3166
3021
|
* @summary Combines the properties of the source object into the target object.
|
|
@@ -3182,14 +3037,17 @@ class I18nLoader {
|
|
|
3182
3037
|
}
|
|
3183
3038
|
return target;
|
|
3184
3039
|
}
|
|
3185
|
-
return httpRequests$.pipe(map(res => {
|
|
3040
|
+
return httpRequests$.pipe(map((res) => {
|
|
3186
3041
|
const merged = {
|
|
3187
3042
|
...libKeys,
|
|
3188
3043
|
...res.reduce((acc, current) => {
|
|
3189
3044
|
for (const key in current) {
|
|
3190
3045
|
let value = current[key] || {};
|
|
3191
3046
|
if (libKeys[key]) {
|
|
3192
|
-
value = {
|
|
3047
|
+
value = {
|
|
3048
|
+
...libKeys[key],
|
|
3049
|
+
...recursiveMerge(libKeys[key], current[key]),
|
|
3050
|
+
};
|
|
3193
3051
|
}
|
|
3194
3052
|
acc[key] = value;
|
|
3195
3053
|
}
|
|
@@ -3214,10 +3072,7 @@ class I18nParser extends TranslateParser {
|
|
|
3214
3072
|
* @returns {string} - The interpolated translation string.
|
|
3215
3073
|
*/
|
|
3216
3074
|
interpolate(value, params = {}) {
|
|
3217
|
-
|
|
3218
|
-
params = { '0': params };
|
|
3219
|
-
}
|
|
3220
|
-
return sf(value, ...Object.values(params)).replace(/undefined/g, "");
|
|
3075
|
+
return sf(value, params === Primitives.STRING ? { '0': params } : params).replace(/undefined/g, '');
|
|
3221
3076
|
}
|
|
3222
3077
|
}
|
|
3223
3078
|
/**
|
|
@@ -3626,6 +3481,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3626
3481
|
class NgxRepositoryDirective extends DecafComponent {
|
|
3627
3482
|
constructor() {
|
|
3628
3483
|
super(...arguments);
|
|
3484
|
+
/**
|
|
3485
|
+
* @description Store query results for the component.
|
|
3486
|
+
* @summary Holds an array of `Model` instances returned from repository queries.
|
|
3487
|
+
* This is used internally to cache query results that child components may bind to.
|
|
3488
|
+
* @type {M[]}
|
|
3489
|
+
*/
|
|
3490
|
+
this._query = [];
|
|
3491
|
+
/**
|
|
3492
|
+
* @description Backing model data supplied to the component.
|
|
3493
|
+
* @summary Holds the raw `Model` instance or a generic key-value payload that child
|
|
3494
|
+
* components may bind to. When provided, it represents the contextual data the
|
|
3495
|
+
* component should render or mutate.
|
|
3496
|
+
* @type {M | M[] | KeyValue | KeyValue[] | undefined}
|
|
3497
|
+
*/
|
|
3498
|
+
this._data = {};
|
|
3499
|
+
/**
|
|
3500
|
+
* @description Primary key value of the current model instance.
|
|
3501
|
+
* @summary Specifies the primary key value for the current model record being displayed or
|
|
3502
|
+
* manipulated by the component. This identifier is used for CRUD operations that target
|
|
3503
|
+
* specific records, such as read, update, and delete operations. The value corresponds to
|
|
3504
|
+
* the field designated as the primary key in the model definition.
|
|
3505
|
+
* @type {PrimaryKeyType}
|
|
3506
|
+
* @memberOf module:lib/engine/NgxRepositoryDirective
|
|
3507
|
+
*/
|
|
3508
|
+
this.modelId = '';
|
|
3629
3509
|
/**
|
|
3630
3510
|
* @description The starting index for data fetching.
|
|
3631
3511
|
* @summary Specifies the index from which to start fetching data. This is used
|
|
@@ -3664,16 +3544,19 @@ class NgxRepositoryDirective extends DecafComponent {
|
|
|
3664
3544
|
*/
|
|
3665
3545
|
this.indexes = [];
|
|
3666
3546
|
/**
|
|
3667
|
-
* @description
|
|
3668
|
-
* @summary
|
|
3669
|
-
*
|
|
3670
|
-
*
|
|
3671
|
-
*
|
|
3547
|
+
* @description Subject for debouncing repository observation events.
|
|
3548
|
+
* @summary RxJS Subject that collects repository change events and emits them after
|
|
3549
|
+
* a debounce period. This prevents multiple rapid repository changes from triggering
|
|
3550
|
+
* multiple list refresh operations, improving performance and user experience.
|
|
3551
|
+
*
|
|
3552
|
+
* @private
|
|
3553
|
+
* @type {Subject<any>}
|
|
3672
3554
|
*/
|
|
3673
|
-
|
|
3555
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3556
|
+
this.repositoryObserverSubject = new Subject();
|
|
3674
3557
|
}
|
|
3675
3558
|
async initialize() {
|
|
3676
|
-
if (this.repository
|
|
3559
|
+
if (this.repository) {
|
|
3677
3560
|
if (this.filter) {
|
|
3678
3561
|
this._data = await this.query(this.filter.eq(this.modelId));
|
|
3679
3562
|
if (this._data) {
|
|
@@ -3704,7 +3587,7 @@ class NgxRepositoryDirective extends DecafComponent {
|
|
|
3704
3587
|
return this._context;
|
|
3705
3588
|
}
|
|
3706
3589
|
async refresh(model) {
|
|
3707
|
-
if (model) {
|
|
3590
|
+
if (model && Model.isModel(model)) {
|
|
3708
3591
|
this.model = Model.build(model, this.modelName);
|
|
3709
3592
|
this._data = model;
|
|
3710
3593
|
}
|
|
@@ -3716,7 +3599,7 @@ class NgxRepositoryDirective extends DecafComponent {
|
|
|
3716
3599
|
const condtion = this.filter || Condition.attribute(attr);
|
|
3717
3600
|
const type = this.getModelPropertyType(this.repository.class, attr);
|
|
3718
3601
|
if (this.modelId) {
|
|
3719
|
-
return condtion.eq([Primitives.NUMBER, Primitives.BIGINT].includes(
|
|
3602
|
+
return condtion.eq([Primitives.NUMBER, Primitives.BIGINT].includes(type)
|
|
3720
3603
|
? Number(this.modelId)
|
|
3721
3604
|
: this.modelId);
|
|
3722
3605
|
}
|
|
@@ -3756,16 +3639,40 @@ class NgxRepositoryDirective extends DecafComponent {
|
|
|
3756
3639
|
.paginate(limit);
|
|
3757
3640
|
}
|
|
3758
3641
|
async transactionBegin(data, repository, operation) {
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3642
|
+
try {
|
|
3643
|
+
const hook = `before${operation.charAt(0).toUpperCase() + operation.slice(1)}`;
|
|
3644
|
+
const handler = this.handlers?.[hook] || undefined;
|
|
3645
|
+
const model = this.buildTransactionModel(data || {}, repository, operation);
|
|
3646
|
+
if (handler && typeof handler === 'function') {
|
|
3647
|
+
const result = (await handler.bind(this)(model, repository, this.modelId));
|
|
3648
|
+
if (result === false) {
|
|
3649
|
+
return undefined;
|
|
3650
|
+
}
|
|
3766
3651
|
}
|
|
3652
|
+
return model;
|
|
3653
|
+
}
|
|
3654
|
+
catch (error) {
|
|
3655
|
+
this.log.for(this).error(error?.message || String(error));
|
|
3656
|
+
return undefined;
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
async transactionEnd(model, repository, operation) {
|
|
3660
|
+
try {
|
|
3661
|
+
const hook = `after${operation.charAt(0).toUpperCase() + operation.slice(1)}`;
|
|
3662
|
+
const handler = this.handlers?.[hook] || undefined;
|
|
3663
|
+
if (handler && typeof handler === 'function') {
|
|
3664
|
+
const result = (await handler.bind(this)(model, repository, this.modelId));
|
|
3665
|
+
if (result === false) {
|
|
3666
|
+
return undefined;
|
|
3667
|
+
}
|
|
3668
|
+
return result;
|
|
3669
|
+
}
|
|
3670
|
+
return model;
|
|
3671
|
+
}
|
|
3672
|
+
catch (error) {
|
|
3673
|
+
this.log.for(this).error(error?.message || String(error));
|
|
3674
|
+
return undefined;
|
|
3767
3675
|
}
|
|
3768
|
-
return model;
|
|
3769
3676
|
}
|
|
3770
3677
|
/**
|
|
3771
3678
|
* @description Parses and transforms form data for repository operations.
|
|
@@ -3790,8 +3697,9 @@ class NgxRepositoryDirective extends DecafComponent {
|
|
|
3790
3697
|
const pk = Model.pk(repository.class);
|
|
3791
3698
|
const pkType = Metadata.type(repository.class, pk).name;
|
|
3792
3699
|
const modelId = (this.modelId || data[pk]);
|
|
3793
|
-
if (!this.modelId)
|
|
3700
|
+
if (!this.modelId) {
|
|
3794
3701
|
this.modelId = modelId;
|
|
3702
|
+
}
|
|
3795
3703
|
const uid = this.parsePkValue(operation === OperationKeys.DELETE ? data[pk] : modelId, pkType);
|
|
3796
3704
|
if (operation !== OperationKeys.DELETE) {
|
|
3797
3705
|
const properties = Metadata.properties(repository.class);
|
|
@@ -3800,6 +3708,9 @@ class NgxRepositoryDirective extends DecafComponent {
|
|
|
3800
3708
|
: properties.includes(this.pk) && !data[this.pk]
|
|
3801
3709
|
? { [this.pk]: modelId }
|
|
3802
3710
|
: {};
|
|
3711
|
+
if (!String(data?.[pk] || '').trim().length) {
|
|
3712
|
+
data[pk] = undefined;
|
|
3713
|
+
}
|
|
3803
3714
|
return Model.build(Object.assign(data || {}, relation, modelId && !data[this.pk] ? { [this.pk]: modelId } : {}), repository.class.name);
|
|
3804
3715
|
}
|
|
3805
3716
|
return uid;
|
|
@@ -3825,12 +3736,38 @@ class NgxRepositoryDirective extends DecafComponent {
|
|
|
3825
3736
|
getModelPkType(clazz) {
|
|
3826
3737
|
return this.getModelPropertyType(clazz, Model.pk(clazz));
|
|
3827
3738
|
}
|
|
3739
|
+
/**
|
|
3740
|
+
* @description Handles repository observation events with debouncing.
|
|
3741
|
+
* @summary Processes repository change notifications and routes them appropriately.
|
|
3742
|
+
* For CREATE events with a UID, handles them immediately. For other events,
|
|
3743
|
+
* passes them to the debounced observer subject to prevent excessive updates.
|
|
3744
|
+
*
|
|
3745
|
+
* @param {...unknown[]} args - The repository event arguments including table, event type, and UID
|
|
3746
|
+
* @returns {Promise<void>}
|
|
3747
|
+
*/
|
|
3748
|
+
async handleRepositoryRefresh(...args) {
|
|
3749
|
+
const [modelInstance, event, uid] = args;
|
|
3750
|
+
if ([OperationKeys.CREATE, OperationKeys.DELETE].includes(event))
|
|
3751
|
+
return this.handleObserveEvent(modelInstance, event, uid);
|
|
3752
|
+
return this.repositoryObserverSubject.next(args);
|
|
3753
|
+
}
|
|
3754
|
+
async handleObserveEvent(...args) {
|
|
3755
|
+
this.log.for(this.handleObserveEvent).info(`Repository change observed with args: ${args}`);
|
|
3756
|
+
}
|
|
3828
3757
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxRepositoryDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3829
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: NgxRepositoryDirective, isStandalone: true, inputs: { modelName: "modelName", pk: "pk", filter: "filter", filterBy: "filterBy", start: "start", limit: "limit", sortDirection: "sortDirection", sortBy: "sortBy", indexes: "indexes"
|
|
3758
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: NgxRepositoryDirective, isStandalone: true, inputs: { _query: "_query", _data: "_data", model: "model", modelId: "modelId", modelName: "modelName", pk: "pk", filter: "filter", filterBy: "filterBy", start: "start", limit: "limit", sortDirection: "sortDirection", sortBy: "sortBy", indexes: "indexes" }, usesInheritance: true, ngImport: i0 }); }
|
|
3830
3759
|
}
|
|
3831
3760
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxRepositoryDirective, decorators: [{
|
|
3832
3761
|
type: Directive
|
|
3833
|
-
}], propDecorators: {
|
|
3762
|
+
}], propDecorators: { _query: [{
|
|
3763
|
+
type: Input
|
|
3764
|
+
}], _data: [{
|
|
3765
|
+
type: Input
|
|
3766
|
+
}], model: [{
|
|
3767
|
+
type: Input
|
|
3768
|
+
}], modelId: [{
|
|
3769
|
+
type: Input
|
|
3770
|
+
}], modelName: [{
|
|
3834
3771
|
type: Input
|
|
3835
3772
|
}], pk: [{
|
|
3836
3773
|
type: Input
|
|
@@ -3848,8 +3785,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3848
3785
|
type: Input
|
|
3849
3786
|
}], indexes: [{
|
|
3850
3787
|
type: Input
|
|
3851
|
-
}], _data: [{
|
|
3852
|
-
type: Input
|
|
3853
3788
|
}] } });
|
|
3854
3789
|
|
|
3855
3790
|
/**
|
|
@@ -4217,19 +4152,8 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4217
4152
|
*/
|
|
4218
4153
|
this.colorSchema = WindowColorSchemes.light;
|
|
4219
4154
|
this.destroySubscriptions$ = new Subject();
|
|
4220
|
-
/**
|
|
4221
|
-
* @description Subject for debouncing repository observation events.
|
|
4222
|
-
* @summary RxJS Subject that collects repository change events and emits them after
|
|
4223
|
-
* a debounce period. This prevents multiple rapid repository changes from triggering
|
|
4224
|
-
* multiple list refresh operations, improving performance and user experience.
|
|
4225
|
-
*
|
|
4226
|
-
* @private
|
|
4227
|
-
* @type {Subject<any>}
|
|
4228
|
-
*/
|
|
4229
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4230
|
-
this.repositoryObserverSubject = new Subject();
|
|
4231
4155
|
this.value = undefined;
|
|
4232
|
-
this.componentName = componentName || 'NgxComponentDirective';
|
|
4156
|
+
this.componentName = componentName || this.constructor.name || 'NgxComponentDirective';
|
|
4233
4157
|
this.localeRoot = localeRoot;
|
|
4234
4158
|
if (!this.localeRoot && this.componentName)
|
|
4235
4159
|
this.localeRoot = this.componentName;
|
|
@@ -4243,23 +4167,22 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4243
4167
|
}
|
|
4244
4168
|
});
|
|
4245
4169
|
}
|
|
4246
|
-
/**
|
|
4247
|
-
* @description Cleanup lifecycle hook invoked when the directive is destroyed.
|
|
4248
|
-
* @summary Ensures any resources allocated by the directive's media service are
|
|
4249
|
-
* released (DOM listeners, timers, subscriptions, etc.). Implementations should
|
|
4250
|
-
* keep `mediaService.destroy()` idempotent; calling it here prevents leaks when
|
|
4251
|
-
* components are torn down.
|
|
4252
|
-
* @returns {Promise<void>}
|
|
4253
|
-
*/
|
|
4254
|
-
async ngOnDestroy() {
|
|
4255
|
-
this.mediaService.destroy();
|
|
4256
|
-
this.destroySubscriptions$.next();
|
|
4257
|
-
this.destroySubscriptions$.complete();
|
|
4258
|
-
}
|
|
4259
4170
|
async initialize() {
|
|
4260
4171
|
this.mediaService.darkModeEnabled();
|
|
4261
4172
|
// connect component to media service for color scheme toggling
|
|
4262
4173
|
this.mediaService.colorSchemeObserver(this.component);
|
|
4174
|
+
if (!this.initialized && Object.keys(this.props || {}).length) {
|
|
4175
|
+
this.parseProps(this);
|
|
4176
|
+
}
|
|
4177
|
+
this.router.events
|
|
4178
|
+
.pipe(shareReplay$1(1), takeUntil$1(this.destroySubscriptions$))
|
|
4179
|
+
.subscribe(async (event) => {
|
|
4180
|
+
if (event instanceof NavigationStart) {
|
|
4181
|
+
if (this.value) {
|
|
4182
|
+
await this.ngOnDestroy();
|
|
4183
|
+
}
|
|
4184
|
+
}
|
|
4185
|
+
});
|
|
4263
4186
|
this.route = this.router.url.replace('/', '');
|
|
4264
4187
|
const instance = this;
|
|
4265
4188
|
if (this.propsMapperFn) {
|
|
@@ -4272,12 +4195,12 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4272
4195
|
if (!this.initialized) {
|
|
4273
4196
|
const handler = this.handlers?.[ComponentEventNames.Render] || undefined;
|
|
4274
4197
|
if (handler && typeof handler === 'function') {
|
|
4275
|
-
await handler.bind(
|
|
4198
|
+
await handler.bind(instance)(instance, this.name, this.value);
|
|
4276
4199
|
}
|
|
4277
4200
|
// search for event to render event
|
|
4278
4201
|
const event = this.events?.[ComponentEventNames.Render] || undefined;
|
|
4279
4202
|
if (event && typeof event === 'function') {
|
|
4280
|
-
await event.bind(
|
|
4203
|
+
await event.bind(instance)(instance, this.name, this.value);
|
|
4281
4204
|
}
|
|
4282
4205
|
}
|
|
4283
4206
|
await super.initialize();
|
|
@@ -4286,6 +4209,22 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4286
4209
|
this.changeDetectorRef.detectChanges();
|
|
4287
4210
|
}
|
|
4288
4211
|
}
|
|
4212
|
+
/**
|
|
4213
|
+
* @description Cleanup lifecycle hook invoked when the directive is destroyed.
|
|
4214
|
+
* @summary Ensures any resources allocated by the directive's media service are
|
|
4215
|
+
* released (DOM listeners, timers, subscriptions, etc.). Implementations should
|
|
4216
|
+
* keep `mediaService.destroy()` idempotent; calling it here prevents leaks when
|
|
4217
|
+
* components are torn down.
|
|
4218
|
+
* @returns {Promise<void>}
|
|
4219
|
+
*/
|
|
4220
|
+
async ngOnDestroy() {
|
|
4221
|
+
this.value = undefined;
|
|
4222
|
+
this.mediaService.destroy();
|
|
4223
|
+
if (this.destroySubscriptions$) {
|
|
4224
|
+
this.destroySubscriptions$.next();
|
|
4225
|
+
this.destroySubscriptions$.complete();
|
|
4226
|
+
}
|
|
4227
|
+
}
|
|
4289
4228
|
/**
|
|
4290
4229
|
* @description Getter for the current locale context identifier.
|
|
4291
4230
|
* @summary Returns the current locale identifier by calling the getLocale method.
|
|
@@ -4342,8 +4281,9 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4342
4281
|
async ngOnChanges(changes) {
|
|
4343
4282
|
if (changes[ModelKeys.MODEL]) {
|
|
4344
4283
|
const { currentValue } = changes[ModelKeys.MODEL];
|
|
4345
|
-
if (currentValue)
|
|
4284
|
+
if (currentValue) {
|
|
4346
4285
|
this.getModel(currentValue);
|
|
4286
|
+
}
|
|
4347
4287
|
this.locale = this.localeContext;
|
|
4348
4288
|
}
|
|
4349
4289
|
// if (changes[UIKeys.HANDLERS]) {
|
|
@@ -4362,7 +4302,7 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4362
4302
|
if (changes[BaseComponentProps.HANDLERS]) {
|
|
4363
4303
|
const { currentValue, previousValue } = changes[BaseComponentProps.HANDLERS];
|
|
4364
4304
|
if (currentValue && currentValue !== previousValue)
|
|
4365
|
-
this.parseHandlers(currentValue);
|
|
4305
|
+
this.parseHandlers(currentValue, this);
|
|
4366
4306
|
}
|
|
4367
4307
|
if (changes[UIKeys.EVENTS]) {
|
|
4368
4308
|
const { currentValue, previousValue } = changes[UIKeys.EVENTS];
|
|
@@ -4370,7 +4310,7 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4370
4310
|
if (!this._repository) {
|
|
4371
4311
|
this._repository = this.repository;
|
|
4372
4312
|
}
|
|
4373
|
-
this.parseEvents(currentValue);
|
|
4313
|
+
this.parseEvents(currentValue, this);
|
|
4374
4314
|
// for (const key in currentValue) {
|
|
4375
4315
|
// const event = currentValue[key]();
|
|
4376
4316
|
// if (event && typeof event === 'function') {
|
|
@@ -4422,42 +4362,19 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4422
4362
|
this.mediaService.toggleClass([this.component], AngularEngineKeys.DARK_PALETTE_CLASS, this.isDarkMode);
|
|
4423
4363
|
});
|
|
4424
4364
|
}
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
return this.handleObserveEvent(modelInstance, event, uid);
|
|
4439
|
-
return this.repositoryObserverSubject.next(args);
|
|
4440
|
-
}
|
|
4441
|
-
async handleObserveEvent(...args) {
|
|
4442
|
-
this.log.for(this.handleObserveEvent).info(`Repository change observed with args: ${args}`);
|
|
4443
|
-
}
|
|
4444
|
-
parseHandlers(handlers) {
|
|
4445
|
-
// function isClass(value: UIFunctionLike | Constructor<NgxEventHandler>): boolean {
|
|
4446
|
-
// return typeof value === 'function' && /^class\s/.test(String(value));
|
|
4447
|
-
// }
|
|
4448
|
-
Object.entries(handlers).forEach(([key, fn]) => {
|
|
4449
|
-
if (isClassConstructor(fn)) {
|
|
4450
|
-
const clazz = new fn();
|
|
4451
|
-
this.handlers[key] = key in clazz ? clazz[key] : clazz.handle;
|
|
4452
|
-
// !(Object.values(TransactionHooks).includes(key as keyof typeof TransactionHooks))
|
|
4453
|
-
// ? clazz.handle
|
|
4454
|
-
// : clazz[key as keyof NgxEventHandler];
|
|
4455
|
-
}
|
|
4456
|
-
else {
|
|
4457
|
-
this.handlers[key] = fn;
|
|
4458
|
-
}
|
|
4459
|
-
});
|
|
4460
|
-
}
|
|
4365
|
+
// parseHandlers(handlers: Record<string, UIFunctionLike>): void {
|
|
4366
|
+
// // function isClass(value: UIFunctionLike | Constructor<NgxEventHandler>): boolean {
|
|
4367
|
+
// // return typeof value === 'function' && /^class\s/.test(String(value));
|
|
4368
|
+
// // }
|
|
4369
|
+
// Object.entries(handlers).forEach(([key, fn]) => {
|
|
4370
|
+
// if (isClassConstructor<NgxEventHandler>(fn)) {
|
|
4371
|
+
// const clazz = new fn() as NgxEventHandler;
|
|
4372
|
+
// this.handlers[key] = key in clazz ? clazz[key as keyof NgxEventHandler] : clazz.handle;
|
|
4373
|
+
// } else {
|
|
4374
|
+
// this.handlers[key] = fn as UIFunctionLike;
|
|
4375
|
+
// }
|
|
4376
|
+
// });
|
|
4377
|
+
// }
|
|
4461
4378
|
// for (const key in currentValue) {
|
|
4462
4379
|
// const event = currentValue[key]();
|
|
4463
4380
|
// if (event && typeof event === 'function') {
|
|
@@ -4478,17 +4395,25 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4478
4395
|
// }
|
|
4479
4396
|
// }
|
|
4480
4397
|
// }
|
|
4481
|
-
parseEvents(
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4398
|
+
// parseEvents<T extends DecafComponent<Model>>(
|
|
4399
|
+
// events: Record<string, UIFunctionLike>,
|
|
4400
|
+
// ): UIEventProperty {
|
|
4401
|
+
// const result: UIEventProperty = {};
|
|
4402
|
+
// Object.entries(events).forEach(([key, fn]) => {
|
|
4403
|
+
// const event = (fn as UIFunctionLike)();
|
|
4404
|
+
// if (isClassConstructor<DecafComponent<Model>>(event)) {
|
|
4405
|
+
// const fn = new event()[key as keyof DecafComponent<Model>] || undefined;
|
|
4406
|
+
// if (fn) {
|
|
4407
|
+
// this.events[key] = fn;
|
|
4408
|
+
// result[key] = fn;
|
|
4409
|
+
// }
|
|
4410
|
+
// } else {
|
|
4411
|
+
// this.events[key] = fn as UIFunctionLike;
|
|
4412
|
+
// result[key] = fn;
|
|
4413
|
+
// }
|
|
4414
|
+
// });
|
|
4415
|
+
// return result;
|
|
4416
|
+
// }
|
|
4492
4417
|
/**
|
|
4493
4418
|
* @description Retrieves or sets the locale context for the component.
|
|
4494
4419
|
* @summary Gets the locale identifier from the locale context system. If a locale parameter
|
|
@@ -4605,11 +4530,17 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4605
4530
|
* @protected
|
|
4606
4531
|
* @memberOf module:lib/engine/NgxComponentDirective
|
|
4607
4532
|
*/
|
|
4608
|
-
parseProps(instance, skip = []) {
|
|
4533
|
+
parseProps(instance, skip = [AngularEngineKeys.CHILDREN]) {
|
|
4609
4534
|
const props = this.props;
|
|
4610
4535
|
Object.keys(instance).forEach((key) => {
|
|
4611
4536
|
if (Object.keys(this.props).includes(key) && !skip.includes(key)) {
|
|
4612
4537
|
this[key] = props[key];
|
|
4538
|
+
if (key === BaseComponentProps.HANDLERS) {
|
|
4539
|
+
this.parseHandlers(props[key], this);
|
|
4540
|
+
}
|
|
4541
|
+
if (key === UIKeys.EVENTS) {
|
|
4542
|
+
this.parseEvents(props[key], this);
|
|
4543
|
+
}
|
|
4613
4544
|
delete props[key];
|
|
4614
4545
|
}
|
|
4615
4546
|
});
|
|
@@ -4774,7 +4705,7 @@ class NgxComponentDirective extends NgxRepositoryDirective {
|
|
|
4774
4705
|
await this.initialize();
|
|
4775
4706
|
}
|
|
4776
4707
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxComponentDirective, deps: [{ token: CPTKN }, { token: CPTKN }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4777
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: NgxComponentDirective, isStandalone: true, inputs: { enableDarkMode: "enableDarkMode", isDarkMode: "isDarkMode", name: "name", childOf: "childOf", uid: "uid",
|
|
4708
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: NgxComponentDirective, isStandalone: true, inputs: { enableDarkMode: "enableDarkMode", isDarkMode: "isDarkMode", name: "name", childOf: "childOf", uid: "uid", label: "label", formGroup: "formGroup", value: "value", mapper: "mapper", operations: "operations", operation: "operation", row: "row", col: "col", className: "className", translatable: "translatable", locale: "locale", item: "item", props: "props", route: "route", borders: "borders", isModalChild: "isModalChild", handlers: "handlers", events: "events", propsMapperFn: "propsMapperFn" }, outputs: { listenEvent: "listenEvent", refreshEvent: "refreshEvent" }, host: { properties: { "attr.id": "uid" } }, viewQueries: [{ propertyName: "component", first: true, predicate: ["component"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
4778
4709
|
}
|
|
4779
4710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxComponentDirective, decorators: [{
|
|
4780
4711
|
type: Directive,
|
|
@@ -4798,9 +4729,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4798
4729
|
type: Input
|
|
4799
4730
|
}], uid: [{
|
|
4800
4731
|
type: Input
|
|
4801
|
-
}],
|
|
4802
|
-
type: Input
|
|
4803
|
-
}], modelId: [{
|
|
4732
|
+
}], label: [{
|
|
4804
4733
|
type: Input
|
|
4805
4734
|
}], formGroup: [{
|
|
4806
4735
|
type: Input
|
|
@@ -4871,7 +4800,11 @@ class NgxPageDirective extends NgxComponentDirective {
|
|
|
4871
4800
|
* @param {boolean} [hasMenu=true] - Whether this page should display the menu
|
|
4872
4801
|
* @memberOf module:lib/engine/NgxPageDirective
|
|
4873
4802
|
*/
|
|
4874
|
-
constructor(
|
|
4803
|
+
constructor(
|
|
4804
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
4805
|
+
localeRoot = 'NgxPageDirective',
|
|
4806
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
4807
|
+
hasMenu = true) {
|
|
4875
4808
|
super(localeRoot);
|
|
4876
4809
|
/**
|
|
4877
4810
|
* @description Page title text for the current view.
|
|
@@ -5085,8 +5018,7 @@ class NgxModelPageDirective extends NgxPageDirective {
|
|
|
5085
5018
|
async initialize() {
|
|
5086
5019
|
await super.initialize();
|
|
5087
5020
|
await this.refresh(this.modelId);
|
|
5088
|
-
|
|
5089
|
-
this.operations = this.operations.filter((o) => [OperationKeys.UPDATE, OperationKeys.DELETE].includes(o));
|
|
5021
|
+
this.changeDetectorRef.detectChanges();
|
|
5090
5022
|
this.getLocale(this.modelName);
|
|
5091
5023
|
}
|
|
5092
5024
|
// /**
|
|
@@ -5108,8 +5040,9 @@ class NgxModelPageDirective extends NgxPageDirective {
|
|
|
5108
5040
|
* @param {string} [uid] - The unique identifier of the model to load; defaults to modelId
|
|
5109
5041
|
*/
|
|
5110
5042
|
async refresh(uid) {
|
|
5111
|
-
if (!uid)
|
|
5043
|
+
if (!uid) {
|
|
5112
5044
|
uid = this.modelId;
|
|
5045
|
+
}
|
|
5113
5046
|
try {
|
|
5114
5047
|
this._repository = this.repository;
|
|
5115
5048
|
switch (this.operation) {
|
|
@@ -5265,7 +5198,7 @@ class NgxModelPageDirective extends NgxPageDirective {
|
|
|
5265
5198
|
* @param {string} uid - The unique identifier of the model instance to retrieve
|
|
5266
5199
|
* @return {Promise<Model | undefined>} Promise resolving to the model instance or undefined
|
|
5267
5200
|
*/
|
|
5268
|
-
async handleRead(uid, repository, modelName
|
|
5201
|
+
async handleRead(uid, repository, modelName) {
|
|
5269
5202
|
if (!uid) {
|
|
5270
5203
|
this.log.info('No key passed to model page read operation, backing to last page');
|
|
5271
5204
|
return undefined;
|
|
@@ -5275,7 +5208,7 @@ class NgxModelPageDirective extends NgxPageDirective {
|
|
|
5275
5208
|
if (!modelName && this.model?.constructor)
|
|
5276
5209
|
this.modelName = modelName = this.model.constructor.name;
|
|
5277
5210
|
}
|
|
5278
|
-
const getRepository = async (modelName,
|
|
5211
|
+
const getRepository = async (modelName, acc = {}, parent = '') => {
|
|
5279
5212
|
if (this._repository)
|
|
5280
5213
|
return this._repository;
|
|
5281
5214
|
const constructor = Model.get(modelName);
|
|
@@ -5285,10 +5218,10 @@ class NgxModelPageDirective extends NgxPageDirective {
|
|
|
5285
5218
|
const type = this.getModelPropertyType(constructor, prop);
|
|
5286
5219
|
const context = getModelAndRepository(type);
|
|
5287
5220
|
if (!context) {
|
|
5288
|
-
|
|
5289
|
-
return getRepository(type,
|
|
5221
|
+
acc[prop] = {};
|
|
5222
|
+
return getRepository(type, acc, prop);
|
|
5290
5223
|
}
|
|
5291
|
-
const { repository, pk, pkType } = context;
|
|
5224
|
+
const { repository, model, pk, pkType } = context;
|
|
5292
5225
|
if (!this.pk) {
|
|
5293
5226
|
this.pk = pk;
|
|
5294
5227
|
this.pkType = pkType;
|
|
@@ -5302,8 +5235,9 @@ class NgxModelPageDirective extends NgxPageDirective {
|
|
|
5302
5235
|
.execute();
|
|
5303
5236
|
if (modelName === this.modelName) {
|
|
5304
5237
|
const data = query?.length ? (query?.length === 1 ? query[0] : query) : undefined;
|
|
5305
|
-
|
|
5306
|
-
|
|
5238
|
+
acc[prop] = data;
|
|
5239
|
+
const model = await this.transactionEnd(data, repository, OperationKeys.READ);
|
|
5240
|
+
this.model = Model.build({ [prop]: model ? model : data }, modelName);
|
|
5307
5241
|
}
|
|
5308
5242
|
else {
|
|
5309
5243
|
// model[parent] = {
|
|
@@ -5477,8 +5411,8 @@ class NgxModelPageDirective extends NgxPageDirective {
|
|
|
5477
5411
|
return { ...event, success, message, model: result, aborted: false };
|
|
5478
5412
|
}
|
|
5479
5413
|
async batchOperation(context, redirect = false) {
|
|
5480
|
-
const { data, repository, pk } = context.context;
|
|
5481
|
-
return data;
|
|
5414
|
+
// const { data, repository, pk } = context.context;
|
|
5415
|
+
// return data;
|
|
5482
5416
|
// return await this.submit({data}, false, repository, pk);
|
|
5483
5417
|
// const result: boolean[] = [];
|
|
5484
5418
|
// let resultMessage = '';
|
|
@@ -5496,13 +5430,11 @@ class NgxModelPageDirective extends NgxPageDirective {
|
|
|
5496
5430
|
// return {...{data: models}, success, message: resultMessage};
|
|
5497
5431
|
}
|
|
5498
5432
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxModelPageDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5499
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: NgxModelPageDirective, isStandalone: true, inputs: {
|
|
5433
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: NgxModelPageDirective, isStandalone: true, inputs: { operation: "operation" }, usesInheritance: true, ngImport: i0 }); }
|
|
5500
5434
|
}
|
|
5501
5435
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxModelPageDirective, decorators: [{
|
|
5502
5436
|
type: Directive
|
|
5503
|
-
}], propDecorators: {
|
|
5504
|
-
type: Input
|
|
5505
|
-
}], operation: [{
|
|
5437
|
+
}], propDecorators: { operation: [{
|
|
5506
5438
|
type: Input
|
|
5507
5439
|
}] } });
|
|
5508
5440
|
|
|
@@ -5718,6 +5650,7 @@ class ComponentRendererComponent extends NgxRenderableComponentDirective {
|
|
|
5718
5650
|
super(...arguments);
|
|
5719
5651
|
this.children = [];
|
|
5720
5652
|
this.projectable = true;
|
|
5653
|
+
this.pk = '';
|
|
5721
5654
|
this.parent = undefined;
|
|
5722
5655
|
}
|
|
5723
5656
|
/**
|
|
@@ -5781,8 +5714,7 @@ class ComponentRendererComponent extends NgxRenderableComponentDirective {
|
|
|
5781
5714
|
* @memberOf ComponentRendererComponent
|
|
5782
5715
|
*/
|
|
5783
5716
|
createComponent(tag, globals = {}) {
|
|
5784
|
-
const component = NgxRenderingEngine.components(tag)
|
|
5785
|
-
?.constructor;
|
|
5717
|
+
const component = NgxRenderingEngine.components(tag)?.constructor;
|
|
5786
5718
|
const metadata = reflectComponentType(component);
|
|
5787
5719
|
const componentInputs = metadata.inputs;
|
|
5788
5720
|
const props = globals?.['item'] || globals?.['props'] || {};
|
|
@@ -5811,23 +5743,26 @@ class ComponentRendererComponent extends NgxRenderableComponentDirective {
|
|
|
5811
5743
|
const hasRootForm = hasProperty(BaseComponentProps.PARENT_FORM);
|
|
5812
5744
|
if (hasRootForm && this.parentForm)
|
|
5813
5745
|
props[BaseComponentProps.PARENT_FORM] = this.parentForm;
|
|
5814
|
-
props['className'] =
|
|
5815
|
-
props['className'] + ' ' + this.className
|
|
5746
|
+
props['className'] = props['className']
|
|
5747
|
+
? props['className'] + ' ' + this.className
|
|
5748
|
+
: this.className || '';
|
|
5816
5749
|
this.vcr.clear();
|
|
5817
5750
|
// const projectable = (this.children?.length && this.projectable);
|
|
5818
5751
|
// const template = projectable ? this.vcr.createEmbeddedView(this.inner as TemplateRef<unknown>, this.injector).rootNodes : [];
|
|
5819
|
-
this.instance = NgxRenderingEngine.createComponent(component, props, this.injector, metadata, this.vcr, []);
|
|
5752
|
+
this.instance = NgxRenderingEngine.createComponent(component, { ...props, ...{ modelId: props?.modelId || this.modelId, pk: props?.pk || this.pk } }, this.injector, metadata, this.vcr, []);
|
|
5820
5753
|
this.subscribeEvents(component);
|
|
5821
5754
|
}
|
|
5822
5755
|
createParentComponent() {
|
|
5823
5756
|
const { component, inputs } = this.parent;
|
|
5824
5757
|
const metadata = reflectComponentType(component);
|
|
5825
|
-
const template = this.projectable
|
|
5758
|
+
const template = this.projectable
|
|
5759
|
+
? this.vcr.createEmbeddedView(this.inner, this.injector).rootNodes
|
|
5760
|
+
: [];
|
|
5826
5761
|
this.instance = NgxRenderingEngine.createComponent(component, inputs, this.injector, metadata, this.vcr, template);
|
|
5827
5762
|
this.subscribeEvents(component);
|
|
5828
5763
|
}
|
|
5829
5764
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ComponentRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5830
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ComponentRendererComponent, isStandalone: true, selector: "ngx-decaf-component-renderer", inputs: { tag: "tag", children: "children", projectable: "projectable", parent: "parent" }, host: { properties: { "attr.id": "uid" } }, usesInheritance: true, ngImport: i0, template: "<!-- Keep to avoid id conflicts -->\n\n<ng-template #componentOuter></ng-template>\n\n<ng-template #componentInner>\n @if (parent?.children?.length) {\n @for(child of parent.children; track child) {\n @if (!child.children?.length) {\n <ng-container\n *ngComponentOutlet=\"\n child.component;\n injector: child.injector;\n inputs: child.inputs;\n content:child.content;\n \"\n />\n } @else {\n <ngx-decaf-component-renderer [parent]=\"child\"> </ngx-decaf-component-renderer>\n }\n }\n }\n @if (projectable) {\n @if (children?.length) {\n @for(child of children; track child) {\n @if (child.children?.length) {\n <ng-container\n *ngComponentOutlet=\"\n child.component;\n injector: child.injector;\n inputs: child.inputs;\n content:child.content;\n \"\n />\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n child.component;\n injector: child.injector;\n inputs: child.inputs;\n content:child.content;\n \"\n />\n }\n }\n }\n }\n\n</ng-template>\n\n", styles: [""], dependencies: [{ kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "parent"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }] }); }
|
|
5765
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ComponentRendererComponent, isStandalone: true, selector: "ngx-decaf-component-renderer", inputs: { tag: "tag", children: "children", projectable: "projectable", pk: "pk", parent: "parent" }, host: { properties: { "attr.id": "uid" } }, usesInheritance: true, ngImport: i0, template: "<!-- Keep to avoid id conflicts -->\n\n<ng-template #componentOuter></ng-template>\n\n<ng-template #componentInner>\n @if (parent?.children?.length) {\n @for(child of parent.children; track child) {\n @if (!child.children?.length) {\n <ng-container\n *ngComponentOutlet=\"\n child.component;\n injector: child.injector;\n inputs: child.inputs;\n content:child.content;\n \"\n />\n } @else {\n <ngx-decaf-component-renderer [parent]=\"child\"> </ngx-decaf-component-renderer>\n }\n }\n }\n @if (projectable) {\n @if (children?.length) {\n @for(child of children; track child) {\n @if (child.children?.length) {\n <ng-container\n *ngComponentOutlet=\"\n child.component;\n injector: child.injector;\n inputs: child.inputs;\n content:child.content;\n \"\n />\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n child.component;\n injector: child.injector;\n inputs: child.inputs;\n content:child.content;\n \"\n />\n }\n }\n }\n }\n\n</ng-template>\n\n", styles: [""], dependencies: [{ kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "pk", "parent"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }] }); }
|
|
5831
5766
|
}
|
|
5832
5767
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ComponentRendererComponent, decorators: [{
|
|
5833
5768
|
type: Component,
|
|
@@ -5839,6 +5774,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5839
5774
|
type: Input
|
|
5840
5775
|
}], projectable: [{
|
|
5841
5776
|
type: Input
|
|
5777
|
+
}], pk: [{
|
|
5778
|
+
type: Input
|
|
5842
5779
|
}], parent: [{
|
|
5843
5780
|
type: Input
|
|
5844
5781
|
}] } });
|
|
@@ -5907,7 +5844,7 @@ class NgxFormFieldDirective extends NgxComponentDirective {
|
|
|
5907
5844
|
this.checked = false;
|
|
5908
5845
|
/**
|
|
5909
5846
|
* @description Flag tracking if validation error event has been dispatched.
|
|
5910
|
-
* @summary
|
|
5847
|
+
* @summary Proverride duplicate validation error override from being dispatched.
|
|
5911
5848
|
* @type {boolean}
|
|
5912
5849
|
* @private
|
|
5913
5850
|
*/
|
|
@@ -5930,7 +5867,7 @@ class NgxFormFieldDirective extends NgxComponentDirective {
|
|
|
5930
5867
|
* @type {function(string, ...string): string}
|
|
5931
5868
|
* @public
|
|
5932
5869
|
*/
|
|
5933
|
-
this.sf = sf;
|
|
5870
|
+
this.sf = sf$1;
|
|
5934
5871
|
/**
|
|
5935
5872
|
* @description Callback function invoked when the field value changes.
|
|
5936
5873
|
* @summary Function registered by Angular's forms system through registerOnChange.
|
|
@@ -6058,8 +5995,9 @@ class NgxFormFieldDirective extends NgxComponentDirective {
|
|
|
6058
5995
|
* @public
|
|
6059
5996
|
*/
|
|
6060
5997
|
async ngOnChanges(changes) {
|
|
6061
|
-
if (!this.initialized)
|
|
5998
|
+
if (!this.initialized) {
|
|
6062
5999
|
await super.ngOnChanges(changes);
|
|
6000
|
+
}
|
|
6063
6001
|
if (changes['activeFormGroupIndex'] &&
|
|
6064
6002
|
this.multiple &&
|
|
6065
6003
|
!changes['activeFormGroupIndex'].isFirstChange() &&
|
|
@@ -6102,7 +6040,7 @@ class NgxFormFieldDirective extends NgxComponentDirective {
|
|
|
6102
6040
|
}
|
|
6103
6041
|
/**
|
|
6104
6042
|
* @description Clears the current form control value as a response to a UI interact
|
|
6105
|
-
* @summary Set field value as undefined and
|
|
6043
|
+
* @summary Set field value as undefined and proverride event propagation.
|
|
6106
6044
|
* @param {Event} event - The value to set
|
|
6107
6045
|
* @return {void}
|
|
6108
6046
|
* @public
|
|
@@ -6113,7 +6051,7 @@ class NgxFormFieldDirective extends NgxComponentDirective {
|
|
|
6113
6051
|
this.setValue(undefined);
|
|
6114
6052
|
}
|
|
6115
6053
|
/**
|
|
6116
|
-
* @description Handles IonSelect change
|
|
6054
|
+
* @description Handles IonSelect change override emitted from modal child components.
|
|
6117
6055
|
* @summary Forces change detection when rendered inside a modal and synchronizes the select value with the directive state.
|
|
6118
6056
|
* @param {SelectCustomEvent<SelectChangeEventDetail>} event - IonSelect change event containing the selected value.
|
|
6119
6057
|
* @return {void}
|
|
@@ -6300,17 +6238,18 @@ class ModelRendererComponent extends NgxRenderableComponentDirective {
|
|
|
6300
6238
|
* @param {string | M} model - The model to be rendered
|
|
6301
6239
|
*/
|
|
6302
6240
|
async render(model) {
|
|
6303
|
-
model = typeof model ===
|
|
6241
|
+
model = typeof model === Primitives.STRING ? Model.build({}, String(model)) : model;
|
|
6304
6242
|
if (model) {
|
|
6305
6243
|
this.output = model.render(this.globals || {}, this.vcr, this.injector, this.inner, this.projectable);
|
|
6306
6244
|
if (this.output?.inputs)
|
|
6307
|
-
this.rendererId = sf(AngularEngineKeys.RENDERED_ID, this.output.inputs[
|
|
6245
|
+
this.rendererId = sf$1(AngularEngineKeys.RENDERED_ID, this.output.inputs['rendererId']);
|
|
6308
6246
|
this.instance = this.output?.component;
|
|
6309
|
-
const { operation
|
|
6247
|
+
const { operation } = this.globals || {};
|
|
6310
6248
|
// const {inputs} = this.output;
|
|
6311
6249
|
// await this.initProps(inputs || {});
|
|
6312
|
-
if (operation)
|
|
6250
|
+
if (operation) {
|
|
6313
6251
|
this.operation = operation;
|
|
6252
|
+
}
|
|
6314
6253
|
this.subscribeEvents();
|
|
6315
6254
|
}
|
|
6316
6255
|
}
|
|
@@ -6319,7 +6258,7 @@ class ModelRendererComponent extends NgxRenderableComponentDirective {
|
|
|
6319
6258
|
}
|
|
6320
6259
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ModelRendererComponent, decorators: [{
|
|
6321
6260
|
type: Component,
|
|
6322
|
-
args: [{ standalone: true, imports: [], selector:
|
|
6261
|
+
args: [{ standalone: true, imports: [], selector: 'ngx-decaf-model-renderer', host: { '[attr.id]': 'uid' }, template: " <!-- Keep to avoid id conflicts -->\n <div class=\"dcf-hidden\" [id]=\"uid\"></div>\n\n <ng-template #componentOuter></ng-template>\n <!-- <ng-template #inner>\n <div class=\"dcf-grid dcf-grid-small dcf-model-renderer-component dcf-child-width-1-1\" [id]=\"rendererId || ''\">\n @for (child of output?.children; track child) {\n @if (child?.children?.length) {\n <ngx-decaf-component-renderer [parent]=\"child\" />\n } @else {\n <ng-container\n #childComponents\n *ngComponentOutlet=\"\n child.component;\n injector: child.injector;\n inputs: child.inputs;\n content:child.content;\n \"\n />\n }\n }\n </div>\n </ng-template> -->\n" }]
|
|
6323
6262
|
}], propDecorators: { projectable: [{
|
|
6324
6263
|
type: Input
|
|
6325
6264
|
}] } });
|
|
@@ -6464,10 +6403,12 @@ class NgxParentComponentDirective extends NgxComponentDirective {
|
|
|
6464
6403
|
}
|
|
6465
6404
|
async initialize(model) {
|
|
6466
6405
|
await super.initialize();
|
|
6467
|
-
if (model)
|
|
6406
|
+
if (model) {
|
|
6468
6407
|
this.model = model;
|
|
6469
|
-
|
|
6408
|
+
}
|
|
6409
|
+
if (this.model && !this.repository) {
|
|
6470
6410
|
this._repository = this.repository;
|
|
6411
|
+
}
|
|
6471
6412
|
}
|
|
6472
6413
|
async ngOnDestroy() {
|
|
6473
6414
|
await super.ngOnDestroy();
|
|
@@ -6724,9 +6665,8 @@ let ModalComponent = class ModalComponent extends NgxParentComponentDirective {
|
|
|
6724
6665
|
* @returns {Promise<void>} - A promise that resolves when initialization is complete.
|
|
6725
6666
|
*/
|
|
6726
6667
|
async ngOnInit() {
|
|
6727
|
-
if (this.inlineContent && typeof this.inlineContent === Primitives.STRING)
|
|
6728
|
-
this.inlineContent = this.domSanitizer.bypassSecurityTrustHtml(this.inlineContent);
|
|
6729
6668
|
await super.initialize();
|
|
6669
|
+
this.parseInlineContent();
|
|
6730
6670
|
}
|
|
6731
6671
|
/**
|
|
6732
6672
|
* @description Initializes the modal with the provided options.
|
|
@@ -6748,6 +6688,14 @@ let ModalComponent = class ModalComponent extends NgxParentComponentDirective {
|
|
|
6748
6688
|
if (['primary', 'secondary', 'tertiary', 'danger', 'medium', 'dark'].includes(this.headerBackground))
|
|
6749
6689
|
this.iconColor = 'light';
|
|
6750
6690
|
}
|
|
6691
|
+
parseInlineContent() {
|
|
6692
|
+
if (this.inlineContent) {
|
|
6693
|
+
if (this.inlineContent instanceof HTMLElement) {
|
|
6694
|
+
this.inlineContent = this.inlineContent.outerHTML;
|
|
6695
|
+
}
|
|
6696
|
+
this.inlineContent = this.domSanitizer.bypassSecurityTrustHtml(this.inlineContent);
|
|
6697
|
+
}
|
|
6698
|
+
}
|
|
6751
6699
|
/**
|
|
6752
6700
|
* @description Creates and presents the modal.
|
|
6753
6701
|
* @summary Initializes the modal with the provided properties and displays it.
|
|
@@ -6767,6 +6715,7 @@ let ModalComponent = class ModalComponent extends NgxParentComponentDirective {
|
|
|
6767
6715
|
* @returns {Promise<void>} - A promise that resolves when the modal is presented.
|
|
6768
6716
|
*/
|
|
6769
6717
|
async present() {
|
|
6718
|
+
this.parseInlineContent();
|
|
6770
6719
|
this.isOpen = true;
|
|
6771
6720
|
this.changeDetectorRef.detectChanges();
|
|
6772
6721
|
}
|
|
@@ -6827,7 +6776,7 @@ let ModalComponent = class ModalComponent extends NgxParentComponentDirective {
|
|
|
6827
6776
|
await modal.dismiss(event?.data || undefined, ActionRoles.confirm);
|
|
6828
6777
|
}
|
|
6829
6778
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6830
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ModalComponent, isStandalone: true, selector: "ngx-decaf-modal", inputs: { title: "title", isOpen: "isOpen", tag: "tag", options: "options", globals: "globals", inlineContent: "inlineContent", inlineContentPosition: "inlineContentPosition", fullscreen: "fullscreen", expandable: "expandable", lightBox: "lightBox", headerTransparent: "headerTransparent", headerBackground: "headerBackground", showHeader: "showHeader", showCloseButton: "showCloseButton" }, outputs: { willDismissEvent: "willDismissEvent" }, host: { properties: { "attr.id": "uid" } }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["component"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ion-modal\n [id]=\"uid\"\n [class]=\"'dcf-modal-component ' + className\"\n [isOpen]=\"isOpen\"\n (willDismiss)=\"handleWillDismiss($event)\"\n [backdropDismiss]=\"options?.backdropDismiss\"\n [showBackdrop]=\"options?.showBackdrop\"\n [animated]=\"options?.animated\"\n [canDismiss]=\"options?.canDismiss\"\n [class.dcf-fullscreen-modal]=\"fullscreen\"\n [class.dcf-fullscreen-expanded]=\"expanded\"\n [class.dcf-lightbox-modal]=\"lightBox\"\n [class.dcf-modal-no-header]=\"!showHeader\"\n [class.dcf-header-transparent]=\"headerTransparent\"\n [class.dcf-no-title]=\"!title?.length\"\n #component\n>\n <ng-template>\n <ion-header>\n <ion-toolbar [color]=\"headerBackground\">\n @if (title?.length) {\n <ion-title>{{ title | translate }}</ion-title>\n }\n <ion-buttons slot=\"end\">\n @if (expandable && !fullscreen) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n type=\"button\"\n class=\"dcf-button-expand\"\n (click)=\"handleExpandToggle()\"\n >\n <ngx-decaf-icon\n [color]=\"iconColor\"\n [name]=\"expanded ? 'ti-maximize-off' : 'ti-maximize'\"\n />\n </ion-button>\n }\n @if (showCloseButton) {\n <ion-button size=\"small\" type=\"button\" class=\"dcf-button-close\" (click)=\"cancel()\">\n <ngx-decaf-icon [color]=\"iconColor\" name=\"ti-x\" />\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n </ion-header>\n\n <ion-content>\n <section class=\"dcf-modal-body\" [class.dcf-has-title]=\"title?.length\">\n @if (!tag && !model && !inlineContent) {\n <div class=\"dcf-loading-container\">\n <ion-spinner name=\"crescent\" color=\"primary\"></ion-spinner>\n </div>\n } @else {\n @if (inlineContent && inlineContentPosition === 'top') {\n <div class=\"dcf-modal-content\" id=\"dcf-modal-content\" [innerHTML]=\"inlineContent\"></div>\n }\n @if (!tag && model) {\n <ngx-decaf-model-renderer\n (onIonChange)=\"handleEvent($event)\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"globals\"\n />\n } @else if (tag && globals) {\n <ngx-decaf-component-renderer\n [tag]=\"tag\"\n (onIonChange)=\"handleEvent($event)\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"{ props: globals }\"\n />\n }\n @if (inlineContent && inlineContentPosition === 'bottom') {\n <div class=\"dcf-modal-content\" id=\"dcf-modal-content\" [innerHTML]=\"inlineContent\"></div>\n }\n }\n </section>\n </ion-content>\n </ng-template>\n</ion-modal>\n", styles: [".dcf-modal-component{--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-confirm{top:-100px;--max-width: 320px;--max-height: 35vh}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-title{font-weight:500;font-size:1.125rem;line-height:1.75rem;color:var(--dcf-color-gray-8)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-delete .dcf-title{color:var(--dcf-color-danger)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-content{font-weight:400;font-size:.935rem;line-height:1.375rem;color:var(--dcf-color-gray-6);margin-top:1rem}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-buttons-grid{position:absolute;bottom:2rem;right:1rem}.dcf-modal-component ::ng-deep form .dcf-buttons-grid{align-content:center!important;justify-content:center;padding-top:1rem}.dcf-modal-component ion-header{box-shadow:none!important;border-bottom:1px solid var(--dcf-color-gray-2)}.dcf-modal-component ion-button.dcf-button-close{--background: var(--dcf-color-light) !important;--border-radius: var(--dcf-border-radius-small) !important}.dcf-modal-component.dcf-modal-no-header ion-header,.dcf-modal-component.dcf-no-title ion-header{box-shadow:none;border-color:transparent!important}@media (max-width: 768px){.dcf-modal-component .dcf-button-expand{display:none!important}}.dcf-modal-component.dcf-modal-select-interface{--min-width: 300px;--max-width: 500px;--max-height: 50%;--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-select-interface .dcf-modal-body{--max-height: 60%;max-height:60%;padding:0px var(--dcf-padding-small)!important}.dcf-modal-component.dcf-modal-expand{--min-height: 50%;--min-width: 75%;--max-width: 100%}.dcf-modal-component.dcf-fullscreen-expanded,.dcf-modal-component.dcf-fullscreen-modal{--height: 100%;--width: 100%;--max-width: 100%;--border-radius: 0}.dcf-modal-component.dcf-fullscreen-expanded.dcf-header-transparent,.dcf-modal-component.dcf-fullscreen-modal.dcf-header-transparent{padding-left:2rem;padding-bottom:2rem;padding-right:1rem}.dcf-modal-component.dcf-fullscreen-expanded:not(.dcf-header-transparent).dcf-no-title ion-header ion-button,.dcf-modal-component.dcf-fullscreen-modal:not(.dcf-header-transparent).dcf-no-title ion-header ion-button{transform:translate(-5px,5px)}.dcf-modal-component.dcf-lightbox-modal ion-content{--background: transparent !important}.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{display:flex;height:auto;justify-content:center;align-items:center}.dcf-modal-component.dcf-lightbox-modal.dcf-fullscreen-modal{padding:var(--dcf-padding-small)}.dcf-modal-component.dcf-header-transparent ion-header{box-shadow:none!important;border-bottom:none!important}.dcf-modal-component.dcf-header-transparent ion-title{width:calc(100% + 10px);position:relative;top:1.25rem;background:#fff;height:50px!important}.dcf-modal-component.dcf-header-transparent ion-buttons ion-button:not(:last-of-type){position:relative;right:1px}.dcf-modal-component.dcf-header-transparent ion-content[part=background],.dcf-modal-component.dcf-header-transparent ion-content::part(background){border-radius:var(--dcf-border-radius)!important}.dcf-modal-component.dcf-header-transparent .dcf-modal-body.dcf-has-title{padding-top:2rem!important}.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{--background: transparent;--box-shadow: none !important}@media (max-width: 767px){.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{padding:var(--dcf-padding-xsmall)}}.dcf-modal-component.dcf-header-transparent ion-header,.dcf-modal-component.dcf-lightbox-modal ion-header{box-shadow:none!important;border-color:transparent!important;padding:unset!important;margin:unset!important;height:30px}.dcf-modal-component.dcf-header-transparent ion-header ion-buttons,.dcf-modal-component.dcf-lightbox-modal ion-header ion-buttons{background:var(--dcf-color-gray-2)!important;border-radius:var(--dcf-border-radius)!important;box-shadow:var(--dcf-box-shadow)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button{--background: transparent !important;margin:0!important;width:35px!important;height:25px!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button *,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button *{margin:-5px}.dcf-modal-component.dcf-header-transparent ion-header ion-button ngx-decaf-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ngx-decaf-icon{transform:translate(-1px)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button ion-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ion-icon{font-size:1.15rem!important;color:var(--dcf-color-gray-5)}.dcf-modal-component.dcf-header-transparent ion-header ion-toolbar,.dcf-modal-component.dcf-lightbox-modal ion-header ion-toolbar{--background: transparent !important;padding:unset!important;margin:unset!important}.dcf-modal-component.dcf-header-transparent ion-content,.dcf-modal-component.dcf-lightbox-modal ion-content{max-width:calc(100% - 10px)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{background:#fff!important;padding:2px 0 0;border-radius:var(--dcf-border-radius)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body>div,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body>div{border-radius:var(--dcf-border-radius)!important;max-width:calc(100% - 5px)}.dcf-modal-component:not(.dcf-lightbox-modal) .dcf-modal-body{padding:1.5rem 1rem}.dcf-modal-component .dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-modal-component .dcf-loading-container ion-spinner{width:60px;height:60px}\n"], dependencies: [{ kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "parent"] }, { kind: "component", type: ModelRendererComponent, selector: "ngx-decaf-model-renderer", inputs: ["projectable"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
6779
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ModalComponent, isStandalone: true, selector: "ngx-decaf-modal", inputs: { title: "title", isOpen: "isOpen", tag: "tag", options: "options", globals: "globals", inlineContent: "inlineContent", inlineContentPosition: "inlineContentPosition", fullscreen: "fullscreen", expandable: "expandable", lightBox: "lightBox", headerTransparent: "headerTransparent", headerBackground: "headerBackground", showHeader: "showHeader", showCloseButton: "showCloseButton" }, outputs: { willDismissEvent: "willDismissEvent" }, host: { properties: { "attr.id": "uid" } }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["component"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ion-modal\n [id]=\"uid\"\n [class]=\"'dcf-modal-component ' + className\"\n [isOpen]=\"isOpen\"\n (willDismiss)=\"handleWillDismiss($event)\"\n [backdropDismiss]=\"options?.backdropDismiss\"\n [showBackdrop]=\"options?.showBackdrop\"\n [animated]=\"options?.animated\"\n [canDismiss]=\"options?.canDismiss\"\n [class.dcf-fullscreen-modal]=\"fullscreen\"\n [class.dcf-fullscreen-expanded]=\"expanded\"\n [class.dcf-lightbox-modal]=\"lightBox\"\n [class.dcf-modal-no-header]=\"!showHeader\"\n [class.dcf-header-transparent]=\"headerTransparent\"\n [class.dcf-no-title]=\"!title?.length\"\n #component\n>\n <ng-template>\n <ion-header>\n <ion-toolbar [color]=\"headerBackground\">\n @if (title?.length) {\n <ion-title>{{ title | translate }}</ion-title>\n }\n <ion-buttons slot=\"end\">\n @if (expandable && !fullscreen) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n type=\"button\"\n class=\"dcf-button-expand\"\n (click)=\"handleExpandToggle()\"\n >\n <ngx-decaf-icon\n [color]=\"iconColor\"\n [name]=\"expanded ? 'ti-maximize-off' : 'ti-maximize'\"\n />\n </ion-button>\n }\n @if (showCloseButton) {\n <ion-button size=\"small\" type=\"button\" class=\"dcf-button-close\" (click)=\"cancel()\">\n <ngx-decaf-icon [color]=\"iconColor\" name=\"ti-x\" />\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n </ion-header>\n\n <ion-content>\n <section class=\"dcf-modal-body\" [class.dcf-has-title]=\"title?.length\">\n @if (!tag && !model && !inlineContent) {\n <div class=\"dcf-loading-container\">\n <ion-spinner name=\"crescent\" color=\"primary\"></ion-spinner>\n </div>\n } @else {\n @if (inlineContent && inlineContentPosition === 'top') {\n <div class=\"dcf-modal-content\" id=\"dcf-modal-content\" [innerHTML]=\"inlineContent\"></div>\n }\n @if (!tag && model) {\n <ngx-decaf-model-renderer\n (onIonChange)=\"handleEvent($event)\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"globals\"\n />\n } @else if (tag && globals) {\n <ngx-decaf-component-renderer\n [tag]=\"tag\"\n (onIonChange)=\"handleEvent($event)\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"{ props: globals }\"\n />\n }\n @if (inlineContent && inlineContentPosition === 'bottom') {\n <div class=\"dcf-modal-content\" id=\"dcf-modal-content\" [innerHTML]=\"inlineContent\"></div>\n }\n }\n </section>\n </ion-content>\n </ng-template>\n</ion-modal>\n", styles: [".dcf-modal-component{--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-confirm{top:-100px;--max-width: 320px;--max-height: 35vh}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-title{font-weight:500;font-size:1.125rem;line-height:1.75rem;color:var(--dcf-color-gray-8)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-delete .dcf-title{color:var(--dcf-color-danger)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-content{font-weight:400;font-size:.935rem;line-height:1.375rem;color:var(--dcf-color-gray-6);margin-top:1rem}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-buttons-grid{position:absolute;bottom:2rem;right:1rem}.dcf-modal-component ::ng-deep form .dcf-buttons-grid{align-content:center!important;justify-content:center;padding-top:1rem}.dcf-modal-component ion-header{box-shadow:none!important;border-bottom:1px solid var(--dcf-color-gray-2)}.dcf-modal-component ion-button.dcf-button-close{--background: var(--dcf-color-light) !important;--border-radius: var(--dcf-border-radius-small) !important}.dcf-modal-component.dcf-modal-no-header ion-header,.dcf-modal-component.dcf-no-title ion-header{box-shadow:none;border-color:transparent!important}.dcf-modal-component .dcf-modal-content ::ng-deep pre{border:1px solid var(--dcf-color-gray-2);white-space:pre-wrap;overflow-wrap:anywhere;background:rgba(var(--dcf-color-warning-rgb),.175)!important;padding:var(--dcf-padding);border-radius:var(--dcf-border-radius-small);font-size:.9rem!important;font-weight:500;margin-top:2rem}@media (max-width: 768px){.dcf-modal-component .dcf-button-expand{display:none!important}}.dcf-modal-component.dcf-modal-select-interface{--min-width: 300px;--max-width: 500px;--max-height: 50%;--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-select-interface .dcf-modal-body{--max-height: 60%;max-height:60%;padding:0px var(--dcf-padding-small)!important}.dcf-modal-component.dcf-modal-expand{--min-height: 50%;--min-width: 75%;--max-width: 100%}.dcf-modal-component.dcf-fullscreen-expanded,.dcf-modal-component.dcf-fullscreen-modal{--height: 100%;--width: 100%;--max-width: 100%;--border-radius: 0}.dcf-modal-component.dcf-fullscreen-expanded.dcf-header-transparent,.dcf-modal-component.dcf-fullscreen-modal.dcf-header-transparent{padding-left:2rem;padding-bottom:2rem;padding-right:1rem}.dcf-modal-component.dcf-fullscreen-expanded:not(.dcf-header-transparent).dcf-no-title ion-header ion-button,.dcf-modal-component.dcf-fullscreen-modal:not(.dcf-header-transparent).dcf-no-title ion-header ion-button{transform:translate(-5px,5px)}.dcf-modal-component.dcf-lightbox-modal ion-content{--background: transparent !important}.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{display:flex;height:auto;justify-content:center;align-items:center}.dcf-modal-component.dcf-lightbox-modal.dcf-fullscreen-modal{padding:var(--dcf-padding-small)}.dcf-modal-component.dcf-header-transparent ion-header{box-shadow:none!important;border-bottom:none!important}.dcf-modal-component.dcf-header-transparent ion-title{width:calc(100% + 10px);position:relative;top:1.25rem;background:#fff;height:50px!important}.dcf-modal-component.dcf-header-transparent ion-buttons ion-button:not(:last-of-type){position:relative;right:1px}.dcf-modal-component.dcf-header-transparent ion-content[part=background],.dcf-modal-component.dcf-header-transparent ion-content::part(background){border-radius:var(--dcf-border-radius)!important}.dcf-modal-component.dcf-header-transparent .dcf-modal-body.dcf-has-title{padding-top:2rem!important}.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{--background: transparent;--box-shadow: none !important}@media (max-width: 767px){.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{padding:var(--dcf-padding-xsmall)}}.dcf-modal-component.dcf-header-transparent ion-header,.dcf-modal-component.dcf-lightbox-modal ion-header{box-shadow:none!important;border-color:transparent!important;padding:unset!important;margin:unset!important;height:30px}.dcf-modal-component.dcf-header-transparent ion-header ion-buttons,.dcf-modal-component.dcf-lightbox-modal ion-header ion-buttons{background:var(--dcf-color-gray-2)!important;border-radius:var(--dcf-border-radius)!important;box-shadow:var(--dcf-box-shadow)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button{--background: transparent !important;margin:0!important;width:35px!important;height:25px!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button *,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button *{margin:-5px}.dcf-modal-component.dcf-header-transparent ion-header ion-button ngx-decaf-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ngx-decaf-icon{transform:translate(-1px)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button ion-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ion-icon{font-size:1.15rem!important;color:var(--dcf-color-gray-5)}.dcf-modal-component.dcf-header-transparent ion-header ion-toolbar,.dcf-modal-component.dcf-lightbox-modal ion-header ion-toolbar{--background: transparent !important;padding:unset!important;margin:unset!important}.dcf-modal-component.dcf-header-transparent ion-content,.dcf-modal-component.dcf-lightbox-modal ion-content{max-width:calc(100% - 10px)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{background:#fff!important;padding:2px 0 0;border-radius:var(--dcf-border-radius)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body>div,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body>div{border-radius:var(--dcf-border-radius)!important;max-width:calc(100% - 5px)}.dcf-modal-component:not(.dcf-lightbox-modal) .dcf-modal-body{padding:1.5rem 1rem}.dcf-modal-component .dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-modal-component .dcf-loading-container ion-spinner{width:60px;height:60px}\n"], dependencies: [{ kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "pk", "parent"] }, { kind: "component", type: ModelRendererComponent, selector: "ngx-decaf-model-renderer", inputs: ["projectable"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
6831
6780
|
};
|
|
6832
6781
|
ModalComponent = __decorate([
|
|
6833
6782
|
Dynamic(),
|
|
@@ -6848,7 +6797,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6848
6797
|
IonHeader,
|
|
6849
6798
|
IonTitle,
|
|
6850
6799
|
IonToolbar,
|
|
6851
|
-
], host: { '[attr.id]': 'uid' }, template: "<ion-modal\n [id]=\"uid\"\n [class]=\"'dcf-modal-component ' + className\"\n [isOpen]=\"isOpen\"\n (willDismiss)=\"handleWillDismiss($event)\"\n [backdropDismiss]=\"options?.backdropDismiss\"\n [showBackdrop]=\"options?.showBackdrop\"\n [animated]=\"options?.animated\"\n [canDismiss]=\"options?.canDismiss\"\n [class.dcf-fullscreen-modal]=\"fullscreen\"\n [class.dcf-fullscreen-expanded]=\"expanded\"\n [class.dcf-lightbox-modal]=\"lightBox\"\n [class.dcf-modal-no-header]=\"!showHeader\"\n [class.dcf-header-transparent]=\"headerTransparent\"\n [class.dcf-no-title]=\"!title?.length\"\n #component\n>\n <ng-template>\n <ion-header>\n <ion-toolbar [color]=\"headerBackground\">\n @if (title?.length) {\n <ion-title>{{ title | translate }}</ion-title>\n }\n <ion-buttons slot=\"end\">\n @if (expandable && !fullscreen) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n type=\"button\"\n class=\"dcf-button-expand\"\n (click)=\"handleExpandToggle()\"\n >\n <ngx-decaf-icon\n [color]=\"iconColor\"\n [name]=\"expanded ? 'ti-maximize-off' : 'ti-maximize'\"\n />\n </ion-button>\n }\n @if (showCloseButton) {\n <ion-button size=\"small\" type=\"button\" class=\"dcf-button-close\" (click)=\"cancel()\">\n <ngx-decaf-icon [color]=\"iconColor\" name=\"ti-x\" />\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n </ion-header>\n\n <ion-content>\n <section class=\"dcf-modal-body\" [class.dcf-has-title]=\"title?.length\">\n @if (!tag && !model && !inlineContent) {\n <div class=\"dcf-loading-container\">\n <ion-spinner name=\"crescent\" color=\"primary\"></ion-spinner>\n </div>\n } @else {\n @if (inlineContent && inlineContentPosition === 'top') {\n <div class=\"dcf-modal-content\" id=\"dcf-modal-content\" [innerHTML]=\"inlineContent\"></div>\n }\n @if (!tag && model) {\n <ngx-decaf-model-renderer\n (onIonChange)=\"handleEvent($event)\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"globals\"\n />\n } @else if (tag && globals) {\n <ngx-decaf-component-renderer\n [tag]=\"tag\"\n (onIonChange)=\"handleEvent($event)\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"{ props: globals }\"\n />\n }\n @if (inlineContent && inlineContentPosition === 'bottom') {\n <div class=\"dcf-modal-content\" id=\"dcf-modal-content\" [innerHTML]=\"inlineContent\"></div>\n }\n }\n </section>\n </ion-content>\n </ng-template>\n</ion-modal>\n", styles: [".dcf-modal-component{--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-confirm{top:-100px;--max-width: 320px;--max-height: 35vh}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-title{font-weight:500;font-size:1.125rem;line-height:1.75rem;color:var(--dcf-color-gray-8)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-delete .dcf-title{color:var(--dcf-color-danger)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-content{font-weight:400;font-size:.935rem;line-height:1.375rem;color:var(--dcf-color-gray-6);margin-top:1rem}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-buttons-grid{position:absolute;bottom:2rem;right:1rem}.dcf-modal-component ::ng-deep form .dcf-buttons-grid{align-content:center!important;justify-content:center;padding-top:1rem}.dcf-modal-component ion-header{box-shadow:none!important;border-bottom:1px solid var(--dcf-color-gray-2)}.dcf-modal-component ion-button.dcf-button-close{--background: var(--dcf-color-light) !important;--border-radius: var(--dcf-border-radius-small) !important}.dcf-modal-component.dcf-modal-no-header ion-header,.dcf-modal-component.dcf-no-title ion-header{box-shadow:none;border-color:transparent!important}@media (max-width: 768px){.dcf-modal-component .dcf-button-expand{display:none!important}}.dcf-modal-component.dcf-modal-select-interface{--min-width: 300px;--max-width: 500px;--max-height: 50%;--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-select-interface .dcf-modal-body{--max-height: 60%;max-height:60%;padding:0px var(--dcf-padding-small)!important}.dcf-modal-component.dcf-modal-expand{--min-height: 50%;--min-width: 75%;--max-width: 100%}.dcf-modal-component.dcf-fullscreen-expanded,.dcf-modal-component.dcf-fullscreen-modal{--height: 100%;--width: 100%;--max-width: 100%;--border-radius: 0}.dcf-modal-component.dcf-fullscreen-expanded.dcf-header-transparent,.dcf-modal-component.dcf-fullscreen-modal.dcf-header-transparent{padding-left:2rem;padding-bottom:2rem;padding-right:1rem}.dcf-modal-component.dcf-fullscreen-expanded:not(.dcf-header-transparent).dcf-no-title ion-header ion-button,.dcf-modal-component.dcf-fullscreen-modal:not(.dcf-header-transparent).dcf-no-title ion-header ion-button{transform:translate(-5px,5px)}.dcf-modal-component.dcf-lightbox-modal ion-content{--background: transparent !important}.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{display:flex;height:auto;justify-content:center;align-items:center}.dcf-modal-component.dcf-lightbox-modal.dcf-fullscreen-modal{padding:var(--dcf-padding-small)}.dcf-modal-component.dcf-header-transparent ion-header{box-shadow:none!important;border-bottom:none!important}.dcf-modal-component.dcf-header-transparent ion-title{width:calc(100% + 10px);position:relative;top:1.25rem;background:#fff;height:50px!important}.dcf-modal-component.dcf-header-transparent ion-buttons ion-button:not(:last-of-type){position:relative;right:1px}.dcf-modal-component.dcf-header-transparent ion-content[part=background],.dcf-modal-component.dcf-header-transparent ion-content::part(background){border-radius:var(--dcf-border-radius)!important}.dcf-modal-component.dcf-header-transparent .dcf-modal-body.dcf-has-title{padding-top:2rem!important}.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{--background: transparent;--box-shadow: none !important}@media (max-width: 767px){.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{padding:var(--dcf-padding-xsmall)}}.dcf-modal-component.dcf-header-transparent ion-header,.dcf-modal-component.dcf-lightbox-modal ion-header{box-shadow:none!important;border-color:transparent!important;padding:unset!important;margin:unset!important;height:30px}.dcf-modal-component.dcf-header-transparent ion-header ion-buttons,.dcf-modal-component.dcf-lightbox-modal ion-header ion-buttons{background:var(--dcf-color-gray-2)!important;border-radius:var(--dcf-border-radius)!important;box-shadow:var(--dcf-box-shadow)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button{--background: transparent !important;margin:0!important;width:35px!important;height:25px!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button *,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button *{margin:-5px}.dcf-modal-component.dcf-header-transparent ion-header ion-button ngx-decaf-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ngx-decaf-icon{transform:translate(-1px)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button ion-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ion-icon{font-size:1.15rem!important;color:var(--dcf-color-gray-5)}.dcf-modal-component.dcf-header-transparent ion-header ion-toolbar,.dcf-modal-component.dcf-lightbox-modal ion-header ion-toolbar{--background: transparent !important;padding:unset!important;margin:unset!important}.dcf-modal-component.dcf-header-transparent ion-content,.dcf-modal-component.dcf-lightbox-modal ion-content{max-width:calc(100% - 10px)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{background:#fff!important;padding:2px 0 0;border-radius:var(--dcf-border-radius)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body>div,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body>div{border-radius:var(--dcf-border-radius)!important;max-width:calc(100% - 5px)}.dcf-modal-component:not(.dcf-lightbox-modal) .dcf-modal-body{padding:1.5rem 1rem}.dcf-modal-component .dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-modal-component .dcf-loading-container ion-spinner{width:60px;height:60px}\n"] }]
|
|
6800
|
+
], host: { '[attr.id]': 'uid' }, template: "<ion-modal\n [id]=\"uid\"\n [class]=\"'dcf-modal-component ' + className\"\n [isOpen]=\"isOpen\"\n (willDismiss)=\"handleWillDismiss($event)\"\n [backdropDismiss]=\"options?.backdropDismiss\"\n [showBackdrop]=\"options?.showBackdrop\"\n [animated]=\"options?.animated\"\n [canDismiss]=\"options?.canDismiss\"\n [class.dcf-fullscreen-modal]=\"fullscreen\"\n [class.dcf-fullscreen-expanded]=\"expanded\"\n [class.dcf-lightbox-modal]=\"lightBox\"\n [class.dcf-modal-no-header]=\"!showHeader\"\n [class.dcf-header-transparent]=\"headerTransparent\"\n [class.dcf-no-title]=\"!title?.length\"\n #component\n>\n <ng-template>\n <ion-header>\n <ion-toolbar [color]=\"headerBackground\">\n @if (title?.length) {\n <ion-title>{{ title | translate }}</ion-title>\n }\n <ion-buttons slot=\"end\">\n @if (expandable && !fullscreen) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n type=\"button\"\n class=\"dcf-button-expand\"\n (click)=\"handleExpandToggle()\"\n >\n <ngx-decaf-icon\n [color]=\"iconColor\"\n [name]=\"expanded ? 'ti-maximize-off' : 'ti-maximize'\"\n />\n </ion-button>\n }\n @if (showCloseButton) {\n <ion-button size=\"small\" type=\"button\" class=\"dcf-button-close\" (click)=\"cancel()\">\n <ngx-decaf-icon [color]=\"iconColor\" name=\"ti-x\" />\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n </ion-header>\n\n <ion-content>\n <section class=\"dcf-modal-body\" [class.dcf-has-title]=\"title?.length\">\n @if (!tag && !model && !inlineContent) {\n <div class=\"dcf-loading-container\">\n <ion-spinner name=\"crescent\" color=\"primary\"></ion-spinner>\n </div>\n } @else {\n @if (inlineContent && inlineContentPosition === 'top') {\n <div class=\"dcf-modal-content\" id=\"dcf-modal-content\" [innerHTML]=\"inlineContent\"></div>\n }\n @if (!tag && model) {\n <ngx-decaf-model-renderer\n (onIonChange)=\"handleEvent($event)\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"globals\"\n />\n } @else if (tag && globals) {\n <ngx-decaf-component-renderer\n [tag]=\"tag\"\n (onIonChange)=\"handleEvent($event)\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"{ props: globals }\"\n />\n }\n @if (inlineContent && inlineContentPosition === 'bottom') {\n <div class=\"dcf-modal-content\" id=\"dcf-modal-content\" [innerHTML]=\"inlineContent\"></div>\n }\n }\n </section>\n </ion-content>\n </ng-template>\n</ion-modal>\n", styles: [".dcf-modal-component{--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-confirm{top:-100px;--max-width: 320px;--max-height: 35vh}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-title{font-weight:500;font-size:1.125rem;line-height:1.75rem;color:var(--dcf-color-gray-8)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-delete .dcf-title{color:var(--dcf-color-danger)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-content{font-weight:400;font-size:.935rem;line-height:1.375rem;color:var(--dcf-color-gray-6);margin-top:1rem}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-buttons-grid{position:absolute;bottom:2rem;right:1rem}.dcf-modal-component ::ng-deep form .dcf-buttons-grid{align-content:center!important;justify-content:center;padding-top:1rem}.dcf-modal-component ion-header{box-shadow:none!important;border-bottom:1px solid var(--dcf-color-gray-2)}.dcf-modal-component ion-button.dcf-button-close{--background: var(--dcf-color-light) !important;--border-radius: var(--dcf-border-radius-small) !important}.dcf-modal-component.dcf-modal-no-header ion-header,.dcf-modal-component.dcf-no-title ion-header{box-shadow:none;border-color:transparent!important}.dcf-modal-component .dcf-modal-content ::ng-deep pre{border:1px solid var(--dcf-color-gray-2);white-space:pre-wrap;overflow-wrap:anywhere;background:rgba(var(--dcf-color-warning-rgb),.175)!important;padding:var(--dcf-padding);border-radius:var(--dcf-border-radius-small);font-size:.9rem!important;font-weight:500;margin-top:2rem}@media (max-width: 768px){.dcf-modal-component .dcf-button-expand{display:none!important}}.dcf-modal-component.dcf-modal-select-interface{--min-width: 300px;--max-width: 500px;--max-height: 50%;--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-select-interface .dcf-modal-body{--max-height: 60%;max-height:60%;padding:0px var(--dcf-padding-small)!important}.dcf-modal-component.dcf-modal-expand{--min-height: 50%;--min-width: 75%;--max-width: 100%}.dcf-modal-component.dcf-fullscreen-expanded,.dcf-modal-component.dcf-fullscreen-modal{--height: 100%;--width: 100%;--max-width: 100%;--border-radius: 0}.dcf-modal-component.dcf-fullscreen-expanded.dcf-header-transparent,.dcf-modal-component.dcf-fullscreen-modal.dcf-header-transparent{padding-left:2rem;padding-bottom:2rem;padding-right:1rem}.dcf-modal-component.dcf-fullscreen-expanded:not(.dcf-header-transparent).dcf-no-title ion-header ion-button,.dcf-modal-component.dcf-fullscreen-modal:not(.dcf-header-transparent).dcf-no-title ion-header ion-button{transform:translate(-5px,5px)}.dcf-modal-component.dcf-lightbox-modal ion-content{--background: transparent !important}.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{display:flex;height:auto;justify-content:center;align-items:center}.dcf-modal-component.dcf-lightbox-modal.dcf-fullscreen-modal{padding:var(--dcf-padding-small)}.dcf-modal-component.dcf-header-transparent ion-header{box-shadow:none!important;border-bottom:none!important}.dcf-modal-component.dcf-header-transparent ion-title{width:calc(100% + 10px);position:relative;top:1.25rem;background:#fff;height:50px!important}.dcf-modal-component.dcf-header-transparent ion-buttons ion-button:not(:last-of-type){position:relative;right:1px}.dcf-modal-component.dcf-header-transparent ion-content[part=background],.dcf-modal-component.dcf-header-transparent ion-content::part(background){border-radius:var(--dcf-border-radius)!important}.dcf-modal-component.dcf-header-transparent .dcf-modal-body.dcf-has-title{padding-top:2rem!important}.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{--background: transparent;--box-shadow: none !important}@media (max-width: 767px){.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{padding:var(--dcf-padding-xsmall)}}.dcf-modal-component.dcf-header-transparent ion-header,.dcf-modal-component.dcf-lightbox-modal ion-header{box-shadow:none!important;border-color:transparent!important;padding:unset!important;margin:unset!important;height:30px}.dcf-modal-component.dcf-header-transparent ion-header ion-buttons,.dcf-modal-component.dcf-lightbox-modal ion-header ion-buttons{background:var(--dcf-color-gray-2)!important;border-radius:var(--dcf-border-radius)!important;box-shadow:var(--dcf-box-shadow)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button{--background: transparent !important;margin:0!important;width:35px!important;height:25px!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button *,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button *{margin:-5px}.dcf-modal-component.dcf-header-transparent ion-header ion-button ngx-decaf-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ngx-decaf-icon{transform:translate(-1px)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button ion-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ion-icon{font-size:1.15rem!important;color:var(--dcf-color-gray-5)}.dcf-modal-component.dcf-header-transparent ion-header ion-toolbar,.dcf-modal-component.dcf-lightbox-modal ion-header ion-toolbar{--background: transparent !important;padding:unset!important;margin:unset!important}.dcf-modal-component.dcf-header-transparent ion-content,.dcf-modal-component.dcf-lightbox-modal ion-content{max-width:calc(100% - 10px)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{background:#fff!important;padding:2px 0 0;border-radius:var(--dcf-border-radius)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body>div,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body>div{border-radius:var(--dcf-border-radius)!important;max-width:calc(100% - 5px)}.dcf-modal-component:not(.dcf-lightbox-modal) .dcf-modal-body{padding:1.5rem 1rem}.dcf-modal-component .dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-modal-component .dcf-loading-container ion-spinner{width:60px;height:60px}\n"] }]
|
|
6852
6801
|
}], ctorParameters: () => [], propDecorators: { modal: [{
|
|
6853
6802
|
type: ViewChild,
|
|
6854
6803
|
args: ['component']
|
|
@@ -6893,7 +6842,6 @@ let ModalConfirmComponent = class ModalConfirmComponent extends ModalComponent {
|
|
|
6893
6842
|
});
|
|
6894
6843
|
this.translatable = false;
|
|
6895
6844
|
}
|
|
6896
|
-
console.log(this.title);
|
|
6897
6845
|
if (!this.message) {
|
|
6898
6846
|
this.message = await this.translate(`${this.locale}.confirm.operations.${role}.message`, {
|
|
6899
6847
|
'0': uid,
|
|
@@ -7006,7 +6954,7 @@ async function getNgxInlineModal(inlineContent, props = {}, injector) {
|
|
|
7006
6954
|
props,
|
|
7007
6955
|
...{
|
|
7008
6956
|
inlineContent: inlineContent ?? '<div></div>',
|
|
7009
|
-
className: `${props?.className ?? ''} dcf-modal
|
|
6957
|
+
className: `${props?.className ?? ''} dcf-modal`,
|
|
7010
6958
|
},
|
|
7011
6959
|
}, {}, injector || undefined);
|
|
7012
6960
|
}
|
|
@@ -7287,6 +7235,19 @@ let CrudFieldComponent = class CrudFieldComponent extends NgxFormFieldDirective
|
|
|
7287
7235
|
}
|
|
7288
7236
|
await super.initialize();
|
|
7289
7237
|
}
|
|
7238
|
+
/**
|
|
7239
|
+
* @description Component after view initialization lifecycle method.
|
|
7240
|
+
* @summary Calls the parent afterViewInit method for READ and DELETE operations.
|
|
7241
|
+
* This ensures proper initialization of read-only fields that don't require
|
|
7242
|
+
* form functionality but still need view setup.
|
|
7243
|
+
*
|
|
7244
|
+
* @returns {Promise<void>}
|
|
7245
|
+
* @memberOf CrudFieldComponent
|
|
7246
|
+
*/
|
|
7247
|
+
async ngAfterViewInit() {
|
|
7248
|
+
if (this.type === HTML5InputTypes.RADIO && !this.value)
|
|
7249
|
+
this.setValue(this.options[0].value); // TODO: migrate to RenderingEngine
|
|
7250
|
+
}
|
|
7290
7251
|
/**
|
|
7291
7252
|
* Returns a list of options for select or radio inputs, with their `text` property
|
|
7292
7253
|
* localized if it does not already include the word 'options'. The localization key
|
|
@@ -7382,19 +7343,6 @@ let CrudFieldComponent = class CrudFieldComponent extends NgxFormFieldDirective
|
|
|
7382
7343
|
}
|
|
7383
7344
|
}
|
|
7384
7345
|
}
|
|
7385
|
-
/**
|
|
7386
|
-
* @description Component after view initialization lifecycle method.
|
|
7387
|
-
* @summary Calls the parent afterViewInit method for READ and DELETE operations.
|
|
7388
|
-
* This ensures proper initialization of read-only fields that don't require
|
|
7389
|
-
* form functionality but still need view setup.
|
|
7390
|
-
*
|
|
7391
|
-
* @returns {Promise<void>}
|
|
7392
|
-
* @memberOf CrudFieldComponent
|
|
7393
|
-
*/
|
|
7394
|
-
async ngAfterViewInit() {
|
|
7395
|
-
if (this.type === HTML5InputTypes.RADIO && !this.value)
|
|
7396
|
-
this.setValue(this.options[0].value); // TODO: migrate to RenderingEngine
|
|
7397
|
-
}
|
|
7398
7346
|
/**
|
|
7399
7347
|
* @description Component cleanup lifecycle method.
|
|
7400
7348
|
* @summary Performs cleanup operations for READ and DELETE operations by calling
|
|
@@ -7556,6 +7504,16 @@ class NgxFormDirective extends NgxParentComponentDirective {
|
|
|
7556
7504
|
constructor() {
|
|
7557
7505
|
super(...arguments);
|
|
7558
7506
|
this.deepMerge = false;
|
|
7507
|
+
this.path = '';
|
|
7508
|
+
/**
|
|
7509
|
+
* @description Enables multiple item management within the fieldset.
|
|
7510
|
+
* @summary Boolean flag that determines if the fieldset supports adding multiple values.
|
|
7511
|
+
* When true, displays a reorderable list of items with add/remove functionality.
|
|
7512
|
+
*
|
|
7513
|
+
* @type {boolean}
|
|
7514
|
+
* @default false
|
|
7515
|
+
*/
|
|
7516
|
+
this.multiple = false;
|
|
7559
7517
|
/**
|
|
7560
7518
|
* @description Field update trigger mode for form validation.
|
|
7561
7519
|
* @summary Determines when form field validation should be triggered. Options include
|
|
@@ -7676,6 +7634,15 @@ class NgxFormDirective extends NgxParentComponentDirective {
|
|
|
7676
7634
|
this.formGroup = undefined;
|
|
7677
7635
|
}
|
|
7678
7636
|
}
|
|
7637
|
+
async ngOnChanges(changes) {
|
|
7638
|
+
await super.ngOnChanges(changes);
|
|
7639
|
+
// if (changes[BaseComponentProps.MODEL_ID]) {
|
|
7640
|
+
// const { previousValue, currentValue } = changes[BaseComponentProps.MODEL_ID];
|
|
7641
|
+
// if (!previousValue && currentValue) {
|
|
7642
|
+
// await this.refresh(this.operation);
|
|
7643
|
+
// }
|
|
7644
|
+
// }
|
|
7645
|
+
}
|
|
7679
7646
|
async ngAfterViewInit() {
|
|
7680
7647
|
//TODO: ver se isso é necessário
|
|
7681
7648
|
// if (this.formGroup)
|
|
@@ -7812,7 +7779,7 @@ class NgxFormDirective extends NgxParentComponentDirective {
|
|
|
7812
7779
|
return undefined;
|
|
7813
7780
|
}
|
|
7814
7781
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7815
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: NgxFormDirective, isStandalone: true, inputs: { parentFormId: "parentFormId", deepMerge: "deepMerge", updateOn: "updateOn", target: "target", method: "method", options: "options", action: "action", operation: "operation", handlers: "handlers", rendererId: "rendererId", allowClear: "allowClear", match: "match" }, outputs: { submitEvent: "submitEvent", formGroupLoadedEvent: "formGroupLoadedEvent" }, viewQueries: [{ propertyName: "component", first: true, predicate: ["component"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0 }); }
|
|
7782
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: NgxFormDirective, isStandalone: true, inputs: { parentFormId: "parentFormId", deepMerge: "deepMerge", path: "path", multiple: "multiple", updateOn: "updateOn", target: "target", method: "method", options: "options", action: "action", operation: "operation", handlers: "handlers", rendererId: "rendererId", allowClear: "allowClear", match: "match" }, outputs: { submitEvent: "submitEvent", formGroupLoadedEvent: "formGroupLoadedEvent" }, viewQueries: [{ propertyName: "component", first: true, predicate: ["component"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
7816
7783
|
}
|
|
7817
7784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxFormDirective, decorators: [{
|
|
7818
7785
|
type: Directive
|
|
@@ -7820,6 +7787,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
7820
7787
|
type: Input
|
|
7821
7788
|
}], deepMerge: [{
|
|
7822
7789
|
type: Input
|
|
7790
|
+
}], path: [{
|
|
7791
|
+
type: Input
|
|
7792
|
+
}], multiple: [{
|
|
7793
|
+
type: Input
|
|
7823
7794
|
}], component: [{
|
|
7824
7795
|
type: ViewChild,
|
|
7825
7796
|
args: ['component', { static: false, read: ElementRef }]
|
|
@@ -8230,7 +8201,8 @@ let LayoutComponent = class LayoutComponent extends NgxParentComponentDirective
|
|
|
8230
8201
|
* @memberOf LayoutComponent
|
|
8231
8202
|
*/
|
|
8232
8203
|
async ngOnInit() {
|
|
8233
|
-
|
|
8204
|
+
// must always parse props first, parse children case of layout depends on it
|
|
8205
|
+
super.parseProps(this, !this.children.length ? [] : ['children']);
|
|
8234
8206
|
if (this.breakpoint)
|
|
8235
8207
|
this.breakpoint =
|
|
8236
8208
|
`${this.breakpoint.startsWith('x') ? this.breakpoint.substring(0, 2) : this.breakpoint.substring(0, 1)}`.toLowerCase();
|
|
@@ -8239,7 +8211,7 @@ let LayoutComponent = class LayoutComponent extends NgxParentComponentDirective
|
|
|
8239
8211
|
await super.initialize();
|
|
8240
8212
|
}
|
|
8241
8213
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8242
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: LayoutComponent, isStandalone: true, selector: "ngx-decaf-layout", inputs: { gap: "gap", grid: "grid", flexMode: "flexMode", rowCard: "rowCard", maxColsLength: "maxColsLength" }, usesInheritance: true, ngImport: i0, template: "<section class=\"dcf-layout-container\">\n @if (initialized) {\n @for (row of rows; track trackItemFn($index, row); let rowIndex = $index) {\n @if (row?.cols?.length) {\n <div\n [id]=\"uid\"\n [class]=\"\n (!grid ? 'dcf-layout-row ' : 'dcf-layout-row dcf-grid ' + 'dcf-grid-' + gap) +\n ' ' +\n (className || '')\n \"\n [class.dcf-grid-match]=\"match\"\n [class.dcf-grid-bordered]=\"borders\"\n >\n @if (row?.title?.length) {\n <div class=\"dcf-width-1-1 dcf-grid-title\">\n <h3 class=\"\">{{ row.title | translate }}</h3>\n </div>\n }\n @for (child of row.cols; track trackItemFn($index, child.col); let colIndex = $index) {\n <div\n [class]=\"'dcf-grid-col ' + child.colClass\"\n [class.dcf-first-column]=\"$index === 0\"\n [class.dcf-hidden]=\"child.props?.hidden?.includes(operation)\"\n >\n <div>\n @if (child.tag === 'ngx-decaf-crud-form') {\n <ngx-decaf-card\n [className]=\"(match ? 'dcf-height-1-1 dcf-card-layout' : '') + className\"\n [body]=\"cardBody\"\n [type]=\"cardType\"\n >\n <ngx-decaf-model-renderer\n [model]=\"child.props.name\"\n (listenEvent)=\"handleEvent($event)\"\n />\n </ngx-decaf-card>\n } @else {\n <ngx-decaf-component-renderer\n [tag]=\"child.tag\"\n [className]=\"(match ? 'dcf-height-1-1 dcf-card-layout' : '') + className\"\n [parentForm]=\"parentForm || child.parentForm || child?.formGroup\"\n [children]=\"child?.children || []\"\n (listenEvent)=\"handleEvent($event)\"\n [globals]=\"{ props: child.props }\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n }\n</section>\n", styles: [".dcf-grid:first-of-type .dcf-grid .dcf-first-column{padding-top:.25rem!important}.dcf-grid:first-of-type .dcf-grid .dcf-first-column+div{padding-top:.5rem!important}.dcf-grid:first-of-type .dcf-grid .dcf-first-column+div~div{padding-top:.25rem!important}.dcf-grid.dcf-grid-collapse.read>div{margin:var(--dcf-margin-small) 0!important}.dcf-grid.dcf-grid-bordered>div>div{padding:var(--dcf-padding-small) var(--dcf-padding);border-radius:var(--dcf-border-radius-small);border:1px solid var(--dcf-color-gray-2);background:var(--dcf-card-background)!important}.dcf-grid .dcf-grid-title{padding:unset;margin:unset}.dcf-grid .dcf-grid-title>*{padding:unset;margin:unset;padding-left:var(--dcf-padding-small);font-size:1.05rem!important;font-weight:600;background:none;box-shadow:none;display:flex;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dcf-grid.dcf-grid-match ::ng-deep ngx-decaf-component-renderer>*>*{height:100%!important}.dcf-grid.dcf-grid-small.dcf-grid-nested{padding:0 .5rem!important}.dcf-grid.dcf-grid-small>div{margin-bottom:1.75rem}.dcf-grid.dcf-grid-small>div:last-child{margin-bottom:0}.dcf-grid.dcf-grid-small>div.dcf-layout-separator{margin-bottom:1rem}.dcf-grid.dcf-grid-small>div.dcf-grid-bordered:last-child{margin-bottom:0}.dcf-grid.dcf-grid-small+.dcf-grid-small{margin-bottom:1.75rem}.dcf-grid.dcf-grid-small+.dcf-grid-small.dcf-layout-separator{margin-bottom:1rem}::ng-deep ngx-decaf-component-renderer>*>div{margin-bottom:0!important}\n"], dependencies: [{ kind: "component", type: CardComponent, selector: "ngx-decaf-card", inputs: ["type", "title", "body", "subtitle", "color", "separator", "borders", "inlineContent", "inlineContentPosition"] }, { kind: "component", type: ModelRendererComponent, selector: "ngx-decaf-model-renderer", inputs: ["projectable"] }, { kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "parent"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
8214
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: LayoutComponent, isStandalone: true, selector: "ngx-decaf-layout", inputs: { gap: "gap", grid: "grid", flexMode: "flexMode", rowCard: "rowCard", maxColsLength: "maxColsLength" }, usesInheritance: true, ngImport: i0, template: "<section class=\"dcf-layout-container\">\n @if (initialized) {\n @for (row of rows; track trackItemFn($index, row); let rowIndex = $index) {\n @if (row?.cols?.length) {\n <div\n [id]=\"uid\"\n [class]=\"\n (!grid ? 'dcf-layout-row ' : 'dcf-layout-row dcf-grid ' + 'dcf-grid-' + gap) +\n ' ' +\n (className || '')\n \"\n [class.dcf-grid-match]=\"match\"\n [class.dcf-grid-bordered]=\"borders\"\n >\n @if (row?.title?.length) {\n <div class=\"dcf-width-1-1 dcf-grid-title\">\n <h3 class=\"\">{{ row.title | translate }}</h3>\n </div>\n }\n @for (child of row.cols; track trackItemFn($index, child.col); let colIndex = $index) {\n <div\n [class]=\"'dcf-grid-col ' + child.colClass\"\n [class.dcf-first-column]=\"$index === 0\"\n [class.dcf-hidden]=\"child.props?.hidden?.includes(operation)\"\n >\n <div>\n @if (child.tag === 'ngx-decaf-crud-form') {\n <ngx-decaf-card\n [className]=\"(match ? 'dcf-height-1-1 dcf-card-layout' : '') + className\"\n [body]=\"cardBody\"\n [type]=\"cardType\"\n >\n <ngx-decaf-model-renderer\n [model]=\"child.props.name\"\n [pk]=\"pk\"\n (listenEvent)=\"handleEvent($event)\"\n />\n </ngx-decaf-card>\n } @else {\n <ngx-decaf-component-renderer\n [tag]=\"child.tag\"\n [pk]=\"pk\"\n [className]=\"(match ? 'dcf-height-1-1 dcf-card-layout' : '') + className\"\n [parentForm]=\"parentForm || child.parentForm || child?.formGroup\"\n [children]=\"child?.children || []\"\n (listenEvent)=\"handleEvent($event)\"\n [globals]=\"{ props: child.props }\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n }\n</section>\n", styles: [".dcf-grid:first-of-type .dcf-grid .dcf-first-column{padding-top:.25rem!important}.dcf-grid:first-of-type .dcf-grid .dcf-first-column+div{padding-top:.5rem!important}.dcf-grid:first-of-type .dcf-grid .dcf-first-column+div~div{padding-top:.25rem!important}.dcf-grid.dcf-grid-collapse.read>div{margin:var(--dcf-margin-small) 0!important}.dcf-grid.dcf-grid-bordered>div>div{padding:var(--dcf-padding-small) var(--dcf-padding);border-radius:var(--dcf-border-radius-small);border:1px solid var(--dcf-color-gray-2);background:var(--dcf-card-background)!important}.dcf-grid .dcf-grid-title{padding:unset;margin:unset}.dcf-grid .dcf-grid-title>*{padding:unset;margin:unset;padding-left:var(--dcf-padding-small);font-size:1.05rem!important;font-weight:600;background:none;box-shadow:none;display:flex;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dcf-grid.dcf-grid-match ::ng-deep ngx-decaf-component-renderer>*>*{height:100%!important}.dcf-grid.dcf-grid-small.dcf-grid-nested{padding:0 .5rem!important}.dcf-grid.dcf-grid-small>div{margin-bottom:1.75rem}.dcf-grid.dcf-grid-small>div:last-child{margin-bottom:0}.dcf-grid.dcf-grid-small>div.dcf-layout-separator{margin-bottom:1rem}.dcf-grid.dcf-grid-small>div.dcf-grid-bordered:last-child{margin-bottom:0}.dcf-grid.dcf-grid-small+.dcf-grid-small{margin-bottom:1.75rem}.dcf-grid.dcf-grid-small+.dcf-grid-small.dcf-layout-separator{margin-bottom:1rem}::ng-deep ngx-decaf-component-renderer>*>div{margin-bottom:0!important}\n"], dependencies: [{ kind: "component", type: CardComponent, selector: "ngx-decaf-card", inputs: ["type", "title", "body", "subtitle", "color", "separator", "borders", "inlineContent", "inlineContentPosition"] }, { kind: "component", type: ModelRendererComponent, selector: "ngx-decaf-model-renderer", inputs: ["projectable"] }, { kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "pk", "parent"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
8243
8215
|
};
|
|
8244
8216
|
LayoutComponent = __decorate([
|
|
8245
8217
|
Dynamic(),
|
|
@@ -8247,7 +8219,7 @@ LayoutComponent = __decorate([
|
|
|
8247
8219
|
], LayoutComponent);
|
|
8248
8220
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LayoutComponent, decorators: [{
|
|
8249
8221
|
type: Component,
|
|
8250
|
-
args: [{ selector: 'ngx-decaf-layout', imports: [TranslatePipe, CardComponent, ModelRendererComponent, ComponentRendererComponent], standalone: true, template: "<section class=\"dcf-layout-container\">\n @if (initialized) {\n @for (row of rows; track trackItemFn($index, row); let rowIndex = $index) {\n @if (row?.cols?.length) {\n <div\n [id]=\"uid\"\n [class]=\"\n (!grid ? 'dcf-layout-row ' : 'dcf-layout-row dcf-grid ' + 'dcf-grid-' + gap) +\n ' ' +\n (className || '')\n \"\n [class.dcf-grid-match]=\"match\"\n [class.dcf-grid-bordered]=\"borders\"\n >\n @if (row?.title?.length) {\n <div class=\"dcf-width-1-1 dcf-grid-title\">\n <h3 class=\"\">{{ row.title | translate }}</h3>\n </div>\n }\n @for (child of row.cols; track trackItemFn($index, child.col); let colIndex = $index) {\n <div\n [class]=\"'dcf-grid-col ' + child.colClass\"\n [class.dcf-first-column]=\"$index === 0\"\n [class.dcf-hidden]=\"child.props?.hidden?.includes(operation)\"\n >\n <div>\n @if (child.tag === 'ngx-decaf-crud-form') {\n <ngx-decaf-card\n [className]=\"(match ? 'dcf-height-1-1 dcf-card-layout' : '') + className\"\n [body]=\"cardBody\"\n [type]=\"cardType\"\n >\n <ngx-decaf-model-renderer\n [model]=\"child.props.name\"\n (listenEvent)=\"handleEvent($event)\"\n />\n </ngx-decaf-card>\n } @else {\n <ngx-decaf-component-renderer\n [tag]=\"child.tag\"\n [className]=\"(match ? 'dcf-height-1-1 dcf-card-layout' : '') + className\"\n [parentForm]=\"parentForm || child.parentForm || child?.formGroup\"\n [children]=\"child?.children || []\"\n (listenEvent)=\"handleEvent($event)\"\n [globals]=\"{ props: child.props }\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n }\n</section>\n", styles: [".dcf-grid:first-of-type .dcf-grid .dcf-first-column{padding-top:.25rem!important}.dcf-grid:first-of-type .dcf-grid .dcf-first-column+div{padding-top:.5rem!important}.dcf-grid:first-of-type .dcf-grid .dcf-first-column+div~div{padding-top:.25rem!important}.dcf-grid.dcf-grid-collapse.read>div{margin:var(--dcf-margin-small) 0!important}.dcf-grid.dcf-grid-bordered>div>div{padding:var(--dcf-padding-small) var(--dcf-padding);border-radius:var(--dcf-border-radius-small);border:1px solid var(--dcf-color-gray-2);background:var(--dcf-card-background)!important}.dcf-grid .dcf-grid-title{padding:unset;margin:unset}.dcf-grid .dcf-grid-title>*{padding:unset;margin:unset;padding-left:var(--dcf-padding-small);font-size:1.05rem!important;font-weight:600;background:none;box-shadow:none;display:flex;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dcf-grid.dcf-grid-match ::ng-deep ngx-decaf-component-renderer>*>*{height:100%!important}.dcf-grid.dcf-grid-small.dcf-grid-nested{padding:0 .5rem!important}.dcf-grid.dcf-grid-small>div{margin-bottom:1.75rem}.dcf-grid.dcf-grid-small>div:last-child{margin-bottom:0}.dcf-grid.dcf-grid-small>div.dcf-layout-separator{margin-bottom:1rem}.dcf-grid.dcf-grid-small>div.dcf-grid-bordered:last-child{margin-bottom:0}.dcf-grid.dcf-grid-small+.dcf-grid-small{margin-bottom:1.75rem}.dcf-grid.dcf-grid-small+.dcf-grid-small.dcf-layout-separator{margin-bottom:1rem}::ng-deep ngx-decaf-component-renderer>*>div{margin-bottom:0!important}\n"] }]
|
|
8222
|
+
args: [{ selector: 'ngx-decaf-layout', imports: [TranslatePipe, CardComponent, ModelRendererComponent, ComponentRendererComponent], standalone: true, template: "<section class=\"dcf-layout-container\">\n @if (initialized) {\n @for (row of rows; track trackItemFn($index, row); let rowIndex = $index) {\n @if (row?.cols?.length) {\n <div\n [id]=\"uid\"\n [class]=\"\n (!grid ? 'dcf-layout-row ' : 'dcf-layout-row dcf-grid ' + 'dcf-grid-' + gap) +\n ' ' +\n (className || '')\n \"\n [class.dcf-grid-match]=\"match\"\n [class.dcf-grid-bordered]=\"borders\"\n >\n @if (row?.title?.length) {\n <div class=\"dcf-width-1-1 dcf-grid-title\">\n <h3 class=\"\">{{ row.title | translate }}</h3>\n </div>\n }\n @for (child of row.cols; track trackItemFn($index, child.col); let colIndex = $index) {\n <div\n [class]=\"'dcf-grid-col ' + child.colClass\"\n [class.dcf-first-column]=\"$index === 0\"\n [class.dcf-hidden]=\"child.props?.hidden?.includes(operation)\"\n >\n <div>\n @if (child.tag === 'ngx-decaf-crud-form') {\n <ngx-decaf-card\n [className]=\"(match ? 'dcf-height-1-1 dcf-card-layout' : '') + className\"\n [body]=\"cardBody\"\n [type]=\"cardType\"\n >\n <ngx-decaf-model-renderer\n [model]=\"child.props.name\"\n [pk]=\"pk\"\n (listenEvent)=\"handleEvent($event)\"\n />\n </ngx-decaf-card>\n } @else {\n <ngx-decaf-component-renderer\n [tag]=\"child.tag\"\n [pk]=\"pk\"\n [className]=\"(match ? 'dcf-height-1-1 dcf-card-layout' : '') + className\"\n [parentForm]=\"parentForm || child.parentForm || child?.formGroup\"\n [children]=\"child?.children || []\"\n (listenEvent)=\"handleEvent($event)\"\n [globals]=\"{ props: child.props }\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n }\n</section>\n", styles: [".dcf-grid:first-of-type .dcf-grid .dcf-first-column{padding-top:.25rem!important}.dcf-grid:first-of-type .dcf-grid .dcf-first-column+div{padding-top:.5rem!important}.dcf-grid:first-of-type .dcf-grid .dcf-first-column+div~div{padding-top:.25rem!important}.dcf-grid.dcf-grid-collapse.read>div{margin:var(--dcf-margin-small) 0!important}.dcf-grid.dcf-grid-bordered>div>div{padding:var(--dcf-padding-small) var(--dcf-padding);border-radius:var(--dcf-border-radius-small);border:1px solid var(--dcf-color-gray-2);background:var(--dcf-card-background)!important}.dcf-grid .dcf-grid-title{padding:unset;margin:unset}.dcf-grid .dcf-grid-title>*{padding:unset;margin:unset;padding-left:var(--dcf-padding-small);font-size:1.05rem!important;font-weight:600;background:none;box-shadow:none;display:flex;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dcf-grid.dcf-grid-match ::ng-deep ngx-decaf-component-renderer>*>*{height:100%!important}.dcf-grid.dcf-grid-small.dcf-grid-nested{padding:0 .5rem!important}.dcf-grid.dcf-grid-small>div{margin-bottom:1.75rem}.dcf-grid.dcf-grid-small>div:last-child{margin-bottom:0}.dcf-grid.dcf-grid-small>div.dcf-layout-separator{margin-bottom:1rem}.dcf-grid.dcf-grid-small>div.dcf-grid-bordered:last-child{margin-bottom:0}.dcf-grid.dcf-grid-small+.dcf-grid-small{margin-bottom:1.75rem}.dcf-grid.dcf-grid-small+.dcf-grid-small.dcf-layout-separator{margin-bottom:1rem}::ng-deep ngx-decaf-component-renderer>*>div{margin-bottom:0!important}\n"] }]
|
|
8251
8223
|
}], ctorParameters: () => [], propDecorators: { gap: [{
|
|
8252
8224
|
type: Input
|
|
8253
8225
|
}], grid: [{
|
|
@@ -8276,13 +8248,13 @@ let CrudFormComponent = class CrudFormComponent extends NgxFormDirective {
|
|
|
8276
8248
|
*/
|
|
8277
8249
|
async ngOnInit() {
|
|
8278
8250
|
this.options = Object.assign({}, DefaultFormReactiveOptions, { buttons: { submit: { text: this.operation.toLowerCase() } } }, this.options || {});
|
|
8279
|
-
await super.initialize();
|
|
8280
8251
|
if (!this.pk && this.modelName) {
|
|
8281
8252
|
const repo = getModelAndRepository(this.modelName);
|
|
8282
8253
|
if (repo) {
|
|
8283
8254
|
this.pk = repo.pk;
|
|
8284
8255
|
}
|
|
8285
8256
|
}
|
|
8257
|
+
await super.initialize();
|
|
8286
8258
|
}
|
|
8287
8259
|
/**
|
|
8288
8260
|
* @description Handles delete operations by emitting delete events.
|
|
@@ -8298,7 +8270,7 @@ let CrudFormComponent = class CrudFormComponent extends NgxFormDirective {
|
|
|
8298
8270
|
super.submitEventEmit(this.model, 'CrudFormComponent', ComponentEventNames.Submit, this.handlers, OperationKeys.DELETE);
|
|
8299
8271
|
}
|
|
8300
8272
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CrudFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8301
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: CrudFormComponent, isStandalone: true, selector: "ngx-decaf-crud-form", host: { properties: { "attr.id": "uid" } }, usesInheritance: true, ngImport: i0, template: "@if (operation !== 'read' && operation !== 'delete') {\n <form\n [class]=\"'dcf-form-grid ' + operation\"
|
|
8273
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: CrudFormComponent, isStandalone: true, selector: "ngx-decaf-crud-form", host: { properties: { "attr.id": "uid" } }, usesInheritance: true, ngImport: i0, template: "@if (operation !== 'read' && operation !== 'delete') {\n <form\n [class]=\"'dcf-form-grid ' + operation\"\n #component\n [id]=\"rendererId\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submit($event)\"\n novalidate\n [target]=\"target\"\n >\n @if (!children?.length) {\n <ng-content #formContent></ng-content>\n } @else {\n <ngx-decaf-layout\n [className]=\"'dcf-crud-form-grid dcf-grid-nested '\"\n [children]=\"children || []\"\n [pk]=\"pk\"\n [modelId]=\"modelId\"\n (listenEvent)=\"handleEvent($event)\"\n [parentForm]=\"formGroup || parentForm\"\n [operation]=\"operation\"\n [modelId]=\"modelId\"\n [cardType]=\"cardType ?? 'blank'\"\n [match]=\"match ?? false\"\n [gap]=\"'small'\"\n [flexMode]=\"props.flexMode || false\"\n [rows]=\"rows\"\n [borders]=\"borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n [cols]=\"cols\"\n />\n }\n @if (initialized) {\n <div class=\"dcf-buttons-grid dcf-grid dcf-grid-small dcf-flex dcf-flex-right\">\n @if (!action) {\n <div>\n <ion-button fill=\"clear\" (click)=\"handleReset()\">\n @if (options.buttons.clear?.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.clear?.iconSlot\"\n [name]=\"options.buttons.clear?.icon\"\n ></ion-icon>\n }\n {{ locale + '.' + (allowClear ? options.buttons.clear?.text : 'back') | translate }}\n </ion-button>\n </div>\n }\n <div>\n <ion-button type=\"submit\" [expand]=\"action ? 'block' : 'default'\">\n @if (options.buttons.submit.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.submit.iconSlot\"\n [name]=\"options.buttons.submit.icon\"\n ></ion-icon>\n }\n {{ action ? action : (locale + '.' + options.buttons.submit.text | translate) }}\n </ion-button>\n </div>\n </div>\n }\n </form>\n} @else {\n <section #component [id]=\"uid\">\n <ngx-decaf-layout\n [className]=\"''\"\n [pk]=\"pk\"\n [modelId]=\"modelId\"\n [children]=\"children || []\"\n [operation]=\"operation\"\n [cardType]=\"cardType ?? 'blank'\"\n [modelId]=\"modelId\"\n [match]=\"match ?? false\"\n [gap]=\"'small'\"\n (listenEvent)=\"handleEvent($event)\"\n [flexMode]=\"props.flexMode || false\"\n [rows]=\"rows\"\n [borders]=\"borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n [cols]=\"cols\"\n />\n </section>\n\n <section\n [class]=\"'dcf-buttons-grid dcf-grid dcf-grid-small dcf-flex dcf-flex-left ' + operation\"\n [id]=\"uid\"\n >\n @if ([OperationKeys.READ, OperationKeys.DELETE].includes(operation) && modelId) {\n <div>\n <ion-button (click)=\"handleDelete()\" color=\"danger\" type=\"button\">\n @if (options.buttons.submit.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.submit.iconSlot\"\n [name]=\"options.buttons.submit.icon\"\n ></ion-icon>\n }\n {{ locale + '.delete' | translate }}\n </ion-button>\n </div>\n }\n @if (operation === OperationKeys.CREATE || operation === OperationKeys.UPDATE) {\n <div>\n <ion-button type=\"submit\">\n @if (options.buttons.submit.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.submit.iconSlot\"\n [name]=\"options.buttons.submit.icon\"\n ></ion-icon>\n }\n {{ action ? action : (locale + '.' + options.buttons.submit.text | translate) }}\n </ion-button>\n </div>\n }\n <div>\n <ion-button fill=\"clear\" (click)=\"handleReset()\">\n @if (options.buttons.clear?.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.clear?.iconSlot\"\n [name]=\"options.buttons.clear?.icon\"\n ></ion-icon>\n }\n {{\n [OperationKeys.DELETE, OperationKeys.READ, OperationKeys.UPDATE].includes(operation)\n ? (locale + '.back' | translate)\n : options.buttons.clear?.text\n }}\n </ion-button>\n </div>\n </section>\n}\n", styles: [".dcf-buttons-grid{margin-top:var(--dcf-margin-medium);margin-bottom:var(--dcf-margin)}@media (min-width: 577px){.dcf-buttons-grid.dcf-flex.read,.dcf-buttons-grid.dcf-flex.delete{flex-direction:row-reverse}}@media (max-width: 576px){.dcf-buttons-grid.dcf-flex{flex-direction:column-reverse}.dcf-buttons-grid.dcf-flex>div{width:100%}.dcf-buttons-grid.dcf-flex>div+div{margin-top:1rem}.dcf-buttons-grid.dcf-flex ion-button{width:100%}}.dcf-form-grid.create,.dcf-form-grid.update{margin-top:var(--dcf-margin-small)}.dcf-form-grid .dcf-form-item{margin-top:0!important}.dcf-form-grid.read .dcf-form-item{margin-bottom:var(--dcf-margin-small)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: LayoutComponent, selector: "ngx-decaf-layout", inputs: ["gap", "grid", "flexMode", "rowCard", "maxColsLength"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
8302
8274
|
};
|
|
8303
8275
|
CrudFormComponent = __decorate([
|
|
8304
8276
|
Dynamic(),
|
|
@@ -8306,7 +8278,7 @@ CrudFormComponent = __decorate([
|
|
|
8306
8278
|
], CrudFormComponent);
|
|
8307
8279
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CrudFormComponent, decorators: [{
|
|
8308
8280
|
type: Component,
|
|
8309
|
-
args: [{ standalone: true, selector: 'ngx-decaf-crud-form', imports: [TranslatePipe, ReactiveFormsModule, LayoutComponent, IonButton, IonIcon], host: { '[attr.id]': 'uid' }, template: "@if (operation !== 'read' && operation !== 'delete') {\n <form\n [class]=\"'dcf-form-grid ' + operation\"
|
|
8281
|
+
args: [{ standalone: true, selector: 'ngx-decaf-crud-form', imports: [TranslatePipe, ReactiveFormsModule, LayoutComponent, IonButton, IonIcon], host: { '[attr.id]': 'uid' }, template: "@if (operation !== 'read' && operation !== 'delete') {\n <form\n [class]=\"'dcf-form-grid ' + operation\"\n #component\n [id]=\"rendererId\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submit($event)\"\n novalidate\n [target]=\"target\"\n >\n @if (!children?.length) {\n <ng-content #formContent></ng-content>\n } @else {\n <ngx-decaf-layout\n [className]=\"'dcf-crud-form-grid dcf-grid-nested '\"\n [children]=\"children || []\"\n [pk]=\"pk\"\n [modelId]=\"modelId\"\n (listenEvent)=\"handleEvent($event)\"\n [parentForm]=\"formGroup || parentForm\"\n [operation]=\"operation\"\n [modelId]=\"modelId\"\n [cardType]=\"cardType ?? 'blank'\"\n [match]=\"match ?? false\"\n [gap]=\"'small'\"\n [flexMode]=\"props.flexMode || false\"\n [rows]=\"rows\"\n [borders]=\"borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n [cols]=\"cols\"\n />\n }\n @if (initialized) {\n <div class=\"dcf-buttons-grid dcf-grid dcf-grid-small dcf-flex dcf-flex-right\">\n @if (!action) {\n <div>\n <ion-button fill=\"clear\" (click)=\"handleReset()\">\n @if (options.buttons.clear?.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.clear?.iconSlot\"\n [name]=\"options.buttons.clear?.icon\"\n ></ion-icon>\n }\n {{ locale + '.' + (allowClear ? options.buttons.clear?.text : 'back') | translate }}\n </ion-button>\n </div>\n }\n <div>\n <ion-button type=\"submit\" [expand]=\"action ? 'block' : 'default'\">\n @if (options.buttons.submit.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.submit.iconSlot\"\n [name]=\"options.buttons.submit.icon\"\n ></ion-icon>\n }\n {{ action ? action : (locale + '.' + options.buttons.submit.text | translate) }}\n </ion-button>\n </div>\n </div>\n }\n </form>\n} @else {\n <section #component [id]=\"uid\">\n <ngx-decaf-layout\n [className]=\"''\"\n [pk]=\"pk\"\n [modelId]=\"modelId\"\n [children]=\"children || []\"\n [operation]=\"operation\"\n [cardType]=\"cardType ?? 'blank'\"\n [modelId]=\"modelId\"\n [match]=\"match ?? false\"\n [gap]=\"'small'\"\n (listenEvent)=\"handleEvent($event)\"\n [flexMode]=\"props.flexMode || false\"\n [rows]=\"rows\"\n [borders]=\"borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n [cols]=\"cols\"\n />\n </section>\n\n <section\n [class]=\"'dcf-buttons-grid dcf-grid dcf-grid-small dcf-flex dcf-flex-left ' + operation\"\n [id]=\"uid\"\n >\n @if ([OperationKeys.READ, OperationKeys.DELETE].includes(operation) && modelId) {\n <div>\n <ion-button (click)=\"handleDelete()\" color=\"danger\" type=\"button\">\n @if (options.buttons.submit.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.submit.iconSlot\"\n [name]=\"options.buttons.submit.icon\"\n ></ion-icon>\n }\n {{ locale + '.delete' | translate }}\n </ion-button>\n </div>\n }\n @if (operation === OperationKeys.CREATE || operation === OperationKeys.UPDATE) {\n <div>\n <ion-button type=\"submit\">\n @if (options.buttons.submit.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.submit.iconSlot\"\n [name]=\"options.buttons.submit.icon\"\n ></ion-icon>\n }\n {{ action ? action : (locale + '.' + options.buttons.submit.text | translate) }}\n </ion-button>\n </div>\n }\n <div>\n <ion-button fill=\"clear\" (click)=\"handleReset()\">\n @if (options.buttons.clear?.icon) {\n <ion-icon\n aria-hidden=\"true\"\n [slot]=\"options.buttons.clear?.iconSlot\"\n [name]=\"options.buttons.clear?.icon\"\n ></ion-icon>\n }\n {{\n [OperationKeys.DELETE, OperationKeys.READ, OperationKeys.UPDATE].includes(operation)\n ? (locale + '.back' | translate)\n : options.buttons.clear?.text\n }}\n </ion-button>\n </div>\n </section>\n}\n", styles: [".dcf-buttons-grid{margin-top:var(--dcf-margin-medium);margin-bottom:var(--dcf-margin)}@media (min-width: 577px){.dcf-buttons-grid.dcf-flex.read,.dcf-buttons-grid.dcf-flex.delete{flex-direction:row-reverse}}@media (max-width: 576px){.dcf-buttons-grid.dcf-flex{flex-direction:column-reverse}.dcf-buttons-grid.dcf-flex>div{width:100%}.dcf-buttons-grid.dcf-flex>div+div{margin-top:1rem}.dcf-buttons-grid.dcf-flex ion-button{width:100%}}.dcf-form-grid.create,.dcf-form-grid.update{margin-top:var(--dcf-margin-small)}.dcf-form-grid .dcf-form-item{margin-top:0!important}.dcf-form-grid.read .dcf-form-item{margin-bottom:var(--dcf-margin-small)}\n"] }]
|
|
8310
8282
|
}], ctorParameters: () => [] });
|
|
8311
8283
|
|
|
8312
8284
|
/**
|
|
@@ -8883,7 +8855,12 @@ let FieldsetComponent = class FieldsetComponent extends NgxFormDirective {
|
|
|
8883
8855
|
else {
|
|
8884
8856
|
this.activePage = this.getActivePage();
|
|
8885
8857
|
}
|
|
8886
|
-
|
|
8858
|
+
if (this.pk) {
|
|
8859
|
+
this.mapper = Object.assign(this.mapper || {}, { [this.pk]: this.pk });
|
|
8860
|
+
}
|
|
8861
|
+
await this.initialize();
|
|
8862
|
+
}
|
|
8863
|
+
async initialize() {
|
|
8887
8864
|
await super.initialize();
|
|
8888
8865
|
await this.refresh();
|
|
8889
8866
|
}
|
|
@@ -8918,26 +8895,6 @@ let FieldsetComponent = class FieldsetComponent extends NgxFormDirective {
|
|
|
8918
8895
|
*/
|
|
8919
8896
|
async ngAfterViewInit() {
|
|
8920
8897
|
await super.ngAfterViewInit();
|
|
8921
|
-
// console.log(this);
|
|
8922
|
-
// if (!this.collapsable)
|
|
8923
|
-
// this.isOpen = true;
|
|
8924
|
-
// if (this.operation === OperationKeys.READ || this.operation === OperationKeys.DELETE) {
|
|
8925
|
-
// this.isOpen = true;
|
|
8926
|
-
// // hidden remove button
|
|
8927
|
-
// const accordionElement = this.component?.nativeElement.querySelector('ion-accordion-group');
|
|
8928
|
-
// if (accordionElement)
|
|
8929
|
-
// this.renderer.setAttribute(accordionElement, 'value', 'open');
|
|
8930
|
-
// } else {
|
|
8931
|
-
// const inputs = this.component?.nativeElement.querySelectorAll('.dcf-field-required');
|
|
8932
|
-
// this.isRequired = inputs?.length > 0;
|
|
8933
|
-
// if (this.isRequired) {
|
|
8934
|
-
// this.accordionComponent.value = 'open';
|
|
8935
|
-
// this.handleAccordionToggle();
|
|
8936
|
-
// }
|
|
8937
|
-
// }
|
|
8938
|
-
// if (!(this.formGroup instanceof FormArray))
|
|
8939
|
-
// this.formGroup = (this.formGroup as FormGroup)
|
|
8940
|
-
// this.changeDetectorRef.detectChanges();
|
|
8941
8898
|
}
|
|
8942
8899
|
async refresh(operation) {
|
|
8943
8900
|
if (operation) {
|
|
@@ -8977,29 +8934,30 @@ let FieldsetComponent = class FieldsetComponent extends NgxFormDirective {
|
|
|
8977
8934
|
];
|
|
8978
8935
|
}
|
|
8979
8936
|
else {
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
8937
|
+
if (Array.isArray(data)) {
|
|
8938
|
+
this.value = [];
|
|
8939
|
+
data.map((v) => {
|
|
8940
|
+
const formGroup = this.activeFormGroup;
|
|
8941
|
+
if (data.length > formGroup.parent.length)
|
|
8942
|
+
NgxFormService.addGroupToParent(formGroup.parent);
|
|
8943
|
+
if (!Object.keys(this.mapper).length)
|
|
8944
|
+
this.mapper = this.getMapper(v);
|
|
8945
|
+
Object.entries(v).forEach(([key, value]) => {
|
|
8946
|
+
if (key === this.pk)
|
|
8947
|
+
formGroup.addControl(key, new FormControl({ value: value, disabled: false }));
|
|
8948
|
+
const control = formGroup.get(key);
|
|
8949
|
+
if (control instanceof FormControl) {
|
|
8950
|
+
control.setValue(value);
|
|
8951
|
+
control.updateValueAndValidity();
|
|
8952
|
+
formGroup.updateValueAndValidity();
|
|
8953
|
+
}
|
|
8954
|
+
});
|
|
8955
|
+
this.activeFormGroupIndex = formGroup.parent.length - 1;
|
|
8956
|
+
});
|
|
8957
|
+
this.setValue();
|
|
8958
|
+
// this.changeDetectorRef.detectChanges();
|
|
8959
|
+
}
|
|
8960
|
+
// this.getItems(data as []);
|
|
9003
8961
|
}
|
|
9004
8962
|
}
|
|
9005
8963
|
}
|
|
@@ -9347,11 +9305,11 @@ let FieldsetComponent = class FieldsetComponent extends NgxFormDirective {
|
|
|
9347
9305
|
if (formGroup?.length) {
|
|
9348
9306
|
const value = formGroup.controls.map(({ value }) => value).filter((v) => this.hasValue(v));
|
|
9349
9307
|
this.value = value;
|
|
9350
|
-
this.getItems(value
|
|
9308
|
+
this.getItems(value);
|
|
9351
9309
|
}
|
|
9352
9310
|
this.updatingItem = undefined;
|
|
9353
9311
|
}
|
|
9354
|
-
getItems(value
|
|
9312
|
+
getItems(value) {
|
|
9355
9313
|
if (value) {
|
|
9356
9314
|
if (!Array.isArray(value)) {
|
|
9357
9315
|
value = [value];
|
|
@@ -9376,7 +9334,6 @@ let FieldsetComponent = class FieldsetComponent extends NgxFormDirective {
|
|
|
9376
9334
|
index: v.index > 1 ? v.index : index + 1,
|
|
9377
9335
|
};
|
|
9378
9336
|
}),
|
|
9379
|
-
...(this.operation === OperationKeys.UPDATE ? items : []),
|
|
9380
9337
|
];
|
|
9381
9338
|
}
|
|
9382
9339
|
}
|
|
@@ -9411,7 +9368,7 @@ let FieldsetComponent = class FieldsetComponent extends NgxFormDirective {
|
|
|
9411
9368
|
return this.mapper;
|
|
9412
9369
|
}
|
|
9413
9370
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FieldsetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9414
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FieldsetComponent, isStandalone: true, selector: "ngx-decaf-fieldset", inputs: { formControl: "formControl", customTypes: "customTypes", title: "title", description: "description", multiple: "multiple", value: "value", borders: "borders", max: "max", required: "required", ordenable: "ordenable", editable: "editable" }, usesInheritance: true, ngImport: i0, template: "@if (['create', 'update'].includes(operation) || !multiple) {\n <div\n [attr.role]=\"['create', 'update'].includes(operation) ? 'group' : 'region'\"\n [class]=\"'dcf-fieldset-component ' + operation\"\n [class.dcf-blank]=\"!borders\"\n [class.dcf-empty]=\"!items?.length\"\n [class.dcf-open]=\"isOpen\"\n #component\n >\n <div class=\"dcf-width-1-1\">\n <div>\n <div class=\"dcf-grid dcf-grid-collapse dcf-flex dcf-flex-middle dcf-width-1-1\">\n <div class=\"dcf-width-expand\">\n <legend>{{ (title ? title : name) | translate }}</legend>\n </div>\n @if (!isRequired && ['create'].includes(operation) && multiple) {\n <div class=\"dcf-width-auto dcf-delete\">\n <ion-button\n fill=\"clear\"\n size=\"small\"\n (click)=\"handleClear($event)\"\n [class.dcf-invisible]=\"!isOpen\"\n [attr.aria-label]=\"\n (items?.length ? locale + '.clear_items' : locale + '.hidden_form') | translate\n \"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n [name]=\"'ti-' + (items?.length ? 'trash' : 'eye-off')\"\n />\n </ion-button>\n </div>\n }\n </div>\n </div>\n\n <div\n class=\"dcf-fieldset-content\"\n [class.dcf-empty]=\"!items?.length && !isOpen\"\n slot=\"content\"\n >\n @if (activePage) {\n <div\n class=\"dcf-animation dcf-animation-slide-top-small dcf-animation-fast\"\n [class.dcf-disabled]=\"!activePage\"\n >\n <ngx-decaf-layout\n [className]=\"''\"\n [flexMode]=\"props.flexMode ?? false\"\n [match]=\"false\"\n [gap]=\"'small'\"\n [children]=\"activePage || []\"\n [parentForm]=\"formGroup || parentForm\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [borders]=\"activePage?.borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n [hidden]=\"items.length === max && !updatingItem\"\n />\n </div>\n }\n\n @if (multiple && ['create', 'update'].includes(operation)) {\n @if (multiple && items.length) {\n <ion-list class=\"dcf-fields-list\">\n <ion-reorder-group\n [formGroup]=\"formGroup.parent\"\n [disabled]=\"updatingItem\"\n (ionItemReorder)=\"handleReorderItems($any($event))\"\n #accordionComponent\n >\n @for (item of items; track item.index) {\n <ion-item\n [class.not-unique]=\"item.title === isUniqueError\"\n [class.updating]=\"updatingItem?.['index'] === item.index - 1\"\n lines=\"full\"\n [button]=\"false\"\n >\n @if (ordenable) {\n @if (items?.length > 1 && !updatingItem) {\n <ion-reorder slot=\"start\">\n <ion-icon aria-hidden=\"true\" name=\"swap-vertical-outline\"></ion-icon>\n </ion-reorder>\n } @else {\n <div slot=\"start\">\n <ion-icon\n aria-hidden=\"true\"\n class=\"dcf-reorder-disabled\"\n size=\"small\"\n name=\"swap-vertical-outline\"\n disabled\n ></ion-icon>\n </div>\n }\n }\n\n <ion-label\n [color]=\"\n item.title === isUniqueError && !updatingItem?.[pk] === item.title\n ? 'danger'\n : ''\n \"\n >\n @if (ordenable) {\n {{ item.index }}.{{ item.title }}\n } @else {\n @if (item[pk]) {\n {{ pk }}: {{ item[pk] }} -\n }\n {{ item.title }}\n }\n @if (item.description?.length > 0) {\n <br />\n <ion-text class=\"dcf-subtitle\">{{ item.description }}</ion-text>\n }\n </ion-label>\n @if (item.info?.length || item.subinfo?.length) {\n <ion-note slot=\"end\">\n @if (item.info?.length) {\n {{ item.info }}\n <br />\n }\n @if (item.subinfo) {\n {{ item.subinfo }}\n }\n </ion-note>\n }\n <div slot=\"end\">\n @if (editable) {\n @if (!updatingItem || updatingItem?.[pk] !== item.title) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n (click)=\"handleUpdateItem($index)\"\n [attr.aria-label]=\"locale + '.edit_item' | translate\"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n size=\"small\"\n name=\"ti-cash-edit\"\n [color]=\"!isDarkMode ? 'dark' : 'light'\"\n ></ngx-decaf-icon>\n </ion-button>\n }\n }\n @if (!updatingItem) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n color=\"danger\"\n (click)=\"handleRemoveItem($index)\"\n [attr.aria-label]=\"locale + '.remove_item' | translate\"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n size=\"small\"\n name=\"ti-row-remove\"\n [color]=\"!isDarkMode ? 'dark' : 'light'\"\n />\n </ion-button>\n }\n </div>\n </ion-item>\n }\n </ion-reorder-group>\n </ion-list>\n }\n\n @if (isUniqueError) {\n <div\n class=\"dcf-not-unique-container dcf-animation dcf-animation-bottom-small dcf-animation-fast\"\n >\n <div class=\"dcf-grid dcf-grid-collapse dcf-width-1-1\">\n <div class=\"dcf-auto\" [attr.style]=\"'max-width: 50px'\">\n <ion-icon aria-hidden=\"true\" name=\"alert-circle-outline\"></ion-icon>\n </div>\n <div class=\"dcf-width-expand\">\n <ion-text color=\"danger\" class=\"dcf-text-small\">\n {{ locale + '.not_unique' | translate: { value: isUniqueError } }}\n </ion-text>\n </div>\n </div>\n </div>\n }\n\n @if (max) {\n <div class=\"dcf-width-1-1 dcf-max-message-container\">\n <ion-text\n class=\"dcf-text-small\"\n [color]=\"items.length !== max ? (!isDarkMode ? 'medium' : '') : 'primary'\"\n >\n {{\n locale + (items.length !== max ? '.max_items' : '.max_items_reached')\n | translate: { '0': max }\n }}\n </ion-text>\n </div>\n }\n\n <div class=\"dcf-grid dcf-grid-small dcf-flex dcf-buttons-container\">\n @if (updatingItem) {\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n color=\"danger\"\n (click)=\"handleCancelUpdateItem()\"\n [attr.aria-label]=\"locale + '.cancel_update' | translate\"\n >\n {{ locale + '.cancel' | translate }}\n </ion-button>\n </div>\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n (click)=\"handleCreateItem()\"\n [attr.aria-label]=\"locale + '.update_item' | translate\"\n >\n <ion-icon aria-hidden=\"true\" name=\"refresh-outline\" slot=\"start\"></ion-icon>\n {{ locale + '.update_item' | translate }}\n </ion-button>\n </div>\n } @else {\n @if (items.length < max || !max) {\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n class=\"dcf-button-add\"\n [color]=\"isDarkMode ? 'light' : 'dark'\"\n (click)=\"handleCreateItem()\"\n [attr.aria-label]=\"locale + '.create_item' | translate\"\n >\n <!-- <ion-icon aria-hidden=\"true\" name=\"add-outline\" slot=\"start\"></ion-icon> -->\n <ngx-decaf-icon slot=\"icon-only\" name=\"ti-code-plus\" slot=\"start\" />\n {{\n locale +\n (required\n ? items.length\n ? '.add'\n : '.add_first'\n : items.length\n ? '.add'\n : isOpen\n ? '.add_first'\n : '.show_form') | translate\n }}\n </ion-button>\n </div>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n} @else {\n @if (refreshing) {\n <div class=\"dcf-loading-container\">\n <ion-spinner name=\"crescent\" color=\"primary\"></ion-spinner>\n </div>\n } @else {\n <legend>{{ (title ? title : name) | translate }}</legend>\n @if (!items.length) {\n <div class=\"dcf-padding-xsmall\">\n <ion-text>{{ locale + '.empty' | translate }}</ion-text>\n </div>\n } @else {\n @for (item of items; track trackItemFn($index, item)) {\n <div class=\"dcf-fieldset-read-item\">\n <div>\n <ngx-decaf-layout\n [className]=\"operation\"\n [operation]=\"operation\"\n [flexMode]=\"item?.props?.flexMode ?? false\"\n [match]=\"false\"\n [gap]=\"'collapse'\"\n [children]=\"item || []\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [borders]=\"item?.props?.borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n />\n </div>\n </div>\n }\n }\n }\n}\n", styles: ["fieldset{margin:0;padding:0;min-inline-size:auto}.dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-loading-container ion-spinner{width:30px;height:30px}.dcf-fieldset-read-item{border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small);padding:var(--dcf-padding-small) var(--dcf-padding-xsmall);padding-bottom:0;margin-bottom:var(--dcf-margin-small)!important}.dcf-fieldset-component{border-radius:var(--dcf-border-radius-small);border:1px solid var(--dcf-color-gray-3);padding:var(--dcf-padding-small)}.dcf-fieldset-component.create ::ng-deep .dcf-item-readonly{display:none!important}.dcf-fieldset-component.dcf-open.dcf-empty .dcf-button-add{margin-top:1rem!important;margin-bottom:.15rem!important}.dcf-fieldset-component.dcf-blank{border-color:transparent;padding:var(--dcf-padding-xsmall) .25rem}.dcf-fieldset-component:not(.dcf-blank):not(.read):not(.delete){padding:var(--dcf-padding)}.dcf-fieldset-component *{overflow-x:hidden!important}.dcf-max-message-container{padding:0 .125rem;margin-bottom:var(--dcf-margin-xsmall)}legend,.dcf-title{font-weight:500;font-size:1rem;line-height:1.5rem;font-weight:600;margin:0;color:var(--ion-color-text)!important}.dcf-fieldset-content{margin-top:.25rem}.dcf-fieldset-content:not(.dcf-empty){padding:var(--dcf-padding-small) .25rem!important;margin-top:var(--dcf-margin-xsmall)}.dcf-fields-list{margin-top:var(--dcf-margin-small);padding-bottom:var(--dcf-padding)!important;max-height:200px}.dcf-fields-list ion-item{--min-height: 30px;--padding-top: 0rem;--padding-bottom: 0rem;--padding-start: .75rem;--padding-end: .5rem;--inner-padding-start: 0px !important;--inner-padding-end: 0px !important;--border-color: transparent;--background: rgba(var(--dcf-color-primary-rgb), .025) !important;border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small);box-sizing:border-box}.dcf-fields-list ion-item:not(:last-child){margin-bottom:var(--dcf-margin-small)}.dcf-fields-list ion-item ion-icon.dcf-reorder-disabled{width:var(--dcf-spacement);transform:translatey(2px);color:var(--dcf-color-gray-4)}.dcf-fields-list ion-item.updating{--background: rgba(var(--dcf-color-primary-rgb), .1) !important}.dcf-fields-list ion-item.not-unique{--background: rgba(var(--dcf-color-danger-rgb), .05) !important}.dcf-fields-list ion-item .dcf-subtitle{font-size:.925rem;color:var(--ion-color-gray-6)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: IonReorder, selector: "ion-reorder" }, { kind: "component", type: IonReorderGroup, selector: "ion-reorder-group", inputs: ["disabled"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: LayoutComponent, selector: "ngx-decaf-layout", inputs: ["gap", "grid", "flexMode", "rowCard", "maxColsLength"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
9371
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FieldsetComponent, isStandalone: true, selector: "ngx-decaf-fieldset", inputs: { formControl: "formControl", customTypes: "customTypes", title: "title", description: "description", multiple: "multiple", value: "value", borders: "borders", max: "max", required: "required", ordenable: "ordenable", editable: "editable" }, usesInheritance: true, ngImport: i0, template: "@if (['create', 'update'].includes(operation) || !multiple) {\n <div\n [attr.role]=\"['create', 'update'].includes(operation) ? 'group' : 'region'\"\n [class]=\"'dcf-fieldset-component ' + operation\"\n [class.dcf-blank]=\"!borders\"\n [class.dcf-empty]=\"!items?.length\"\n [class.dcf-open]=\"isOpen\"\n #component\n >\n <div class=\"dcf-width-1-1\">\n <div>\n <div class=\"dcf-grid dcf-grid-collapse dcf-flex dcf-flex-middle dcf-width-1-1\">\n <div class=\"dcf-width-expand\">\n <legend>{{ (title ? title : name) | translate }}</legend>\n </div>\n @if (!isRequired && ['create'].includes(operation) && multiple) {\n <div class=\"dcf-width-auto dcf-delete\">\n <ion-button\n fill=\"clear\"\n size=\"small\"\n (click)=\"handleClear($event)\"\n [class.dcf-invisible]=\"!isOpen\"\n [attr.aria-label]=\"\n (items?.length ? locale + '.clear_items' : locale + '.hidden_form') | translate\n \"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n [name]=\"'ti-' + (items?.length ? 'trash' : 'eye-off')\"\n />\n </ion-button>\n </div>\n }\n </div>\n </div>\n <div\n class=\"dcf-fieldset-content\"\n [class.dcf-empty]=\"!items?.length && !isOpen\"\n slot=\"content\"\n >\n @if (activePage) {\n <div\n class=\"dcf-animation dcf-animation-slide-top-small dcf-animation-fast\"\n [class.dcf-disabled]=\"!activePage\"\n >\n <ngx-decaf-layout\n [className]=\"''\"\n [flexMode]=\"props.flexMode ?? false\"\n [match]=\"false\"\n [gap]=\"'small'\"\n [pk]=\"pk\"\n [modelId]=\"modelId\"\n [operation]=\"operation\"\n [children]=\"activePage || []\"\n [parentForm]=\"formGroup || parentForm\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [borders]=\"activePage?.borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n [hidden]=\"items.length === max && !updatingItem\"\n />\n </div>\n }\n\n @if (multiple && ['create', 'update'].includes(operation)) {\n @if (multiple && items.length) {\n <ion-list class=\"dcf-fields-list\">\n <ion-reorder-group\n [formGroup]=\"formGroup.parent\"\n [disabled]=\"updatingItem\"\n (ionItemReorder)=\"handleReorderItems($any($event))\"\n #accordionComponent\n >\n @for (item of items; track item.index) {\n <ion-item\n [class.not-unique]=\"isUniqueError && item.title === isUniqueError\"\n [class.updating]=\"updatingItem?.['index'] === item.index - 1\"\n lines=\"full\"\n [button]=\"false\"\n >\n @if (ordenable) {\n @if (items?.length > 1 && !updatingItem) {\n <ion-reorder slot=\"start\">\n <ion-icon aria-hidden=\"true\" name=\"swap-vertical-outline\"></ion-icon>\n </ion-reorder>\n } @else {\n <div slot=\"start\">\n <ion-icon\n aria-hidden=\"true\"\n class=\"dcf-reorder-disabled\"\n size=\"small\"\n name=\"swap-vertical-outline\"\n disabled\n ></ion-icon>\n </div>\n }\n }\n\n <ion-label\n [color]=\"\n item.title === isUniqueError && !updatingItem?.[pk] === item.title\n ? 'danger'\n : ''\n \"\n >\n @if (ordenable) {\n {{ item.index }}.{{ item.title }}\n } @else {\n @if (item[pk]) {\n {{ pk }}: {{ item[pk] }} -\n }\n {{ item.title }}\n }\n @if (item.description?.length > 0) {\n <br />\n <ion-text class=\"dcf-subtitle\">{{ item.description }}</ion-text>\n }\n </ion-label>\n @if (item.info?.length || item.subinfo?.length) {\n <ion-note slot=\"end\">\n @if (item.info?.length) {\n {{ item.info }}\n <br />\n }\n @if (item.subinfo) {\n {{ item.subinfo }}\n }\n </ion-note>\n }\n <div slot=\"end\">\n @if (editable) {\n @if (!updatingItem || updatingItem?.[pk] !== item.title) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n (click)=\"handleUpdateItem($index)\"\n [attr.aria-label]=\"locale + '.edit_item' | translate\"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n size=\"small\"\n name=\"ti-cash-edit\"\n [color]=\"!isDarkMode ? 'dark' : 'light'\"\n ></ngx-decaf-icon>\n </ion-button>\n }\n }\n @if (!updatingItem) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n color=\"danger\"\n (click)=\"handleRemoveItem($index)\"\n [attr.aria-label]=\"locale + '.remove_item' | translate\"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n size=\"small\"\n name=\"ti-row-remove\"\n [color]=\"!isDarkMode ? 'dark' : 'light'\"\n />\n </ion-button>\n }\n </div>\n </ion-item>\n }\n </ion-reorder-group>\n </ion-list>\n }\n\n @if (isUniqueError) {\n <div\n class=\"dcf-not-unique-container dcf-animation dcf-animation-bottom-small dcf-animation-fast\"\n >\n <div class=\"dcf-grid dcf-grid-collapse dcf-width-1-1\">\n <div class=\"dcf-auto\" [attr.style]=\"'max-width: 50px'\">\n <ion-icon aria-hidden=\"true\" name=\"alert-circle-outline\"></ion-icon>\n </div>\n <div class=\"dcf-width-expand\">\n <ion-text color=\"danger\" class=\"dcf-text-small\">\n {{ locale + '.not_unique' | translate: { value: isUniqueError } }}\n </ion-text>\n </div>\n </div>\n </div>\n }\n\n @if (max) {\n <div class=\"dcf-width-1-1 dcf-max-message-container\">\n <ion-text\n class=\"dcf-text-small\"\n [color]=\"items.length !== max ? (!isDarkMode ? 'medium' : '') : 'primary'\"\n >\n {{\n locale + (items.length !== max ? '.max_items' : '.max_items_reached')\n | translate: { '0': max }\n }}\n </ion-text>\n </div>\n }\n\n <div class=\"dcf-grid dcf-grid-small dcf-flex dcf-buttons-container\">\n @if (updatingItem) {\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n color=\"danger\"\n (click)=\"handleCancelUpdateItem()\"\n [attr.aria-label]=\"locale + '.cancel_update' | translate\"\n >\n {{ locale + '.cancel' | translate }}\n </ion-button>\n </div>\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n (click)=\"handleCreateItem()\"\n [attr.aria-label]=\"locale + '.update_item' | translate\"\n >\n <ion-icon aria-hidden=\"true\" name=\"refresh-outline\" slot=\"start\"></ion-icon>\n {{ locale + '.update_item' | translate }}\n </ion-button>\n </div>\n } @else {\n @if (items.length < max || !max) {\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n class=\"dcf-button-add\"\n [color]=\"isDarkMode ? 'light' : 'dark'\"\n (click)=\"handleCreateItem()\"\n [attr.aria-label]=\"locale + '.create_item' | translate\"\n >\n <!-- <ion-icon aria-hidden=\"true\" name=\"add-outline\" slot=\"start\"></ion-icon> -->\n <ngx-decaf-icon slot=\"icon-only\" name=\"ti-code-plus\" slot=\"start\" />\n {{\n locale +\n (required\n ? items.length\n ? '.add'\n : '.add_first'\n : items.length\n ? '.add'\n : isOpen\n ? '.add_first'\n : '.show_form') | translate\n }}\n </ion-button>\n </div>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n} @else {\n @if (refreshing) {\n <div class=\"dcf-loading-container\">\n <ion-spinner name=\"crescent\" color=\"primary\"></ion-spinner>\n </div>\n } @else {\n <legend>{{ (title ? title : name) | translate }}</legend>\n @if (!items.length) {\n <div class=\"dcf-padding-xsmall\">\n <ion-text>{{ locale + '.empty' | translate }}</ion-text>\n </div>\n } @else {\n @for (item of items; track trackItemFn($index, item)) {\n <div class=\"dcf-fieldset-read-item\">\n <div>\n <ngx-decaf-layout\n [className]=\"operation\"\n [operation]=\"operation\"\n [pk]=\"pk\"\n [model]=\"model\"\n [modelId]=\"modelId\"\n [flexMode]=\"item?.props?.flexMode ?? false\"\n [match]=\"false\"\n [gap]=\"'collapse'\"\n [children]=\"item || []\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [borders]=\"item?.props?.borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n />\n </div>\n </div>\n }\n }\n }\n}\n", styles: ["fieldset{margin:0;padding:0;min-inline-size:auto}.dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-loading-container ion-spinner{width:30px;height:30px}.dcf-fieldset-read-item{border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small);padding:var(--dcf-padding-small) var(--dcf-padding-xsmall);padding-bottom:0;margin-bottom:var(--dcf-margin-small)!important}.dcf-fieldset-component{border-radius:var(--dcf-border-radius-small);border:1px solid var(--dcf-color-gray-3);padding:var(--dcf-padding-small)}.dcf-fieldset-component.create ::ng-deep .dcf-item-readonly{display:none!important}.dcf-fieldset-component.dcf-open.dcf-empty .dcf-button-add{margin-top:1rem!important;margin-bottom:.15rem!important}.dcf-fieldset-component.dcf-blank{border-color:transparent;padding:var(--dcf-padding-xsmall) .25rem}.dcf-fieldset-component:not(.dcf-blank):not(.read):not(.delete){padding:var(--dcf-padding)}.dcf-fieldset-component *{overflow-x:hidden!important}.dcf-max-message-container{padding:0 .125rem;margin-bottom:var(--dcf-margin-xsmall)}legend,.dcf-title{font-weight:500;font-size:1rem;line-height:1.5rem;font-weight:600;margin:0;color:var(--ion-color-text)!important}.dcf-fieldset-content{margin-top:.25rem}.dcf-fieldset-content:not(.dcf-empty){padding:var(--dcf-padding-small) .25rem!important;margin-top:var(--dcf-margin-xsmall)}.dcf-fields-list{margin-top:var(--dcf-margin-small);padding-bottom:var(--dcf-padding)!important;max-height:200px}.dcf-fields-list ion-item{--min-height: 30px;--padding-top: 0rem;--padding-bottom: 0rem;--padding-start: .75rem;--padding-end: .5rem;--inner-padding-start: 0px !important;--inner-padding-end: 0px !important;--border-color: transparent;--background: rgba(var(--dcf-color-primary-rgb), .025) !important;border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small);box-sizing:border-box}.dcf-fields-list ion-item:not(:last-child){margin-bottom:var(--dcf-margin-small)}.dcf-fields-list ion-item ion-icon.dcf-reorder-disabled{width:var(--dcf-spacement);transform:translatey(2px);color:var(--dcf-color-gray-4)}.dcf-fields-list ion-item.updating{--background: rgba(var(--dcf-color-primary-rgb), .1) !important}.dcf-fields-list ion-item.not-unique{--background: rgba(var(--dcf-color-danger-rgb), .05) !important}.dcf-fields-list ion-item .dcf-subtitle{font-size:.925rem;color:var(--ion-color-gray-6)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: IonReorder, selector: "ion-reorder" }, { kind: "component", type: IonReorderGroup, selector: "ion-reorder-group", inputs: ["disabled"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: LayoutComponent, selector: "ngx-decaf-layout", inputs: ["gap", "grid", "flexMode", "rowCard", "maxColsLength"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
9415
9372
|
};
|
|
9416
9373
|
FieldsetComponent = __decorate([
|
|
9417
9374
|
Dynamic(),
|
|
@@ -9433,7 +9390,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
9433
9390
|
LayoutComponent,
|
|
9434
9391
|
IonSpinner,
|
|
9435
9392
|
IconComponent,
|
|
9436
|
-
], template: "@if (['create', 'update'].includes(operation) || !multiple) {\n <div\n [attr.role]=\"['create', 'update'].includes(operation) ? 'group' : 'region'\"\n [class]=\"'dcf-fieldset-component ' + operation\"\n [class.dcf-blank]=\"!borders\"\n [class.dcf-empty]=\"!items?.length\"\n [class.dcf-open]=\"isOpen\"\n #component\n >\n <div class=\"dcf-width-1-1\">\n <div>\n <div class=\"dcf-grid dcf-grid-collapse dcf-flex dcf-flex-middle dcf-width-1-1\">\n <div class=\"dcf-width-expand\">\n <legend>{{ (title ? title : name) | translate }}</legend>\n </div>\n @if (!isRequired && ['create'].includes(operation) && multiple) {\n <div class=\"dcf-width-auto dcf-delete\">\n <ion-button\n fill=\"clear\"\n size=\"small\"\n (click)=\"handleClear($event)\"\n [class.dcf-invisible]=\"!isOpen\"\n [attr.aria-label]=\"\n (items?.length ? locale + '.clear_items' : locale + '.hidden_form') | translate\n \"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n [name]=\"'ti-' + (items?.length ? 'trash' : 'eye-off')\"\n />\n </ion-button>\n </div>\n }\n </div>\n </div>\n\n <div\n class=\"dcf-fieldset-content\"\n [class.dcf-empty]=\"!items?.length && !isOpen\"\n slot=\"content\"\n >\n @if (activePage) {\n <div\n class=\"dcf-animation dcf-animation-slide-top-small dcf-animation-fast\"\n [class.dcf-disabled]=\"!activePage\"\n >\n <ngx-decaf-layout\n [className]=\"''\"\n [flexMode]=\"props.flexMode ?? false\"\n [match]=\"false\"\n [gap]=\"'small'\"\n [children]=\"activePage || []\"\n [parentForm]=\"formGroup || parentForm\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [borders]=\"activePage?.borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n [hidden]=\"items.length === max && !updatingItem\"\n />\n </div>\n }\n\n @if (multiple && ['create', 'update'].includes(operation)) {\n @if (multiple && items.length) {\n <ion-list class=\"dcf-fields-list\">\n <ion-reorder-group\n [formGroup]=\"formGroup.parent\"\n [disabled]=\"updatingItem\"\n (ionItemReorder)=\"handleReorderItems($any($event))\"\n #accordionComponent\n >\n @for (item of items; track item.index) {\n <ion-item\n [class.not-unique]=\"item.title === isUniqueError\"\n [class.updating]=\"updatingItem?.['index'] === item.index - 1\"\n lines=\"full\"\n [button]=\"false\"\n >\n @if (ordenable) {\n @if (items?.length > 1 && !updatingItem) {\n <ion-reorder slot=\"start\">\n <ion-icon aria-hidden=\"true\" name=\"swap-vertical-outline\"></ion-icon>\n </ion-reorder>\n } @else {\n <div slot=\"start\">\n <ion-icon\n aria-hidden=\"true\"\n class=\"dcf-reorder-disabled\"\n size=\"small\"\n name=\"swap-vertical-outline\"\n disabled\n ></ion-icon>\n </div>\n }\n }\n\n <ion-label\n [color]=\"\n item.title === isUniqueError && !updatingItem?.[pk] === item.title\n ? 'danger'\n : ''\n \"\n >\n @if (ordenable) {\n {{ item.index }}.{{ item.title }}\n } @else {\n @if (item[pk]) {\n {{ pk }}: {{ item[pk] }} -\n }\n {{ item.title }}\n }\n @if (item.description?.length > 0) {\n <br />\n <ion-text class=\"dcf-subtitle\">{{ item.description }}</ion-text>\n }\n </ion-label>\n @if (item.info?.length || item.subinfo?.length) {\n <ion-note slot=\"end\">\n @if (item.info?.length) {\n {{ item.info }}\n <br />\n }\n @if (item.subinfo) {\n {{ item.subinfo }}\n }\n </ion-note>\n }\n <div slot=\"end\">\n @if (editable) {\n @if (!updatingItem || updatingItem?.[pk] !== item.title) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n (click)=\"handleUpdateItem($index)\"\n [attr.aria-label]=\"locale + '.edit_item' | translate\"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n size=\"small\"\n name=\"ti-cash-edit\"\n [color]=\"!isDarkMode ? 'dark' : 'light'\"\n ></ngx-decaf-icon>\n </ion-button>\n }\n }\n @if (!updatingItem) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n color=\"danger\"\n (click)=\"handleRemoveItem($index)\"\n [attr.aria-label]=\"locale + '.remove_item' | translate\"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n size=\"small\"\n name=\"ti-row-remove\"\n [color]=\"!isDarkMode ? 'dark' : 'light'\"\n />\n </ion-button>\n }\n </div>\n </ion-item>\n }\n </ion-reorder-group>\n </ion-list>\n }\n\n @if (isUniqueError) {\n <div\n class=\"dcf-not-unique-container dcf-animation dcf-animation-bottom-small dcf-animation-fast\"\n >\n <div class=\"dcf-grid dcf-grid-collapse dcf-width-1-1\">\n <div class=\"dcf-auto\" [attr.style]=\"'max-width: 50px'\">\n <ion-icon aria-hidden=\"true\" name=\"alert-circle-outline\"></ion-icon>\n </div>\n <div class=\"dcf-width-expand\">\n <ion-text color=\"danger\" class=\"dcf-text-small\">\n {{ locale + '.not_unique' | translate: { value: isUniqueError } }}\n </ion-text>\n </div>\n </div>\n </div>\n }\n\n @if (max) {\n <div class=\"dcf-width-1-1 dcf-max-message-container\">\n <ion-text\n class=\"dcf-text-small\"\n [color]=\"items.length !== max ? (!isDarkMode ? 'medium' : '') : 'primary'\"\n >\n {{\n locale + (items.length !== max ? '.max_items' : '.max_items_reached')\n | translate: { '0': max }\n }}\n </ion-text>\n </div>\n }\n\n <div class=\"dcf-grid dcf-grid-small dcf-flex dcf-buttons-container\">\n @if (updatingItem) {\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n color=\"danger\"\n (click)=\"handleCancelUpdateItem()\"\n [attr.aria-label]=\"locale + '.cancel_update' | translate\"\n >\n {{ locale + '.cancel' | translate }}\n </ion-button>\n </div>\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n (click)=\"handleCreateItem()\"\n [attr.aria-label]=\"locale + '.update_item' | translate\"\n >\n <ion-icon aria-hidden=\"true\" name=\"refresh-outline\" slot=\"start\"></ion-icon>\n {{ locale + '.update_item' | translate }}\n </ion-button>\n </div>\n } @else {\n @if (items.length < max || !max) {\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n class=\"dcf-button-add\"\n [color]=\"isDarkMode ? 'light' : 'dark'\"\n (click)=\"handleCreateItem()\"\n [attr.aria-label]=\"locale + '.create_item' | translate\"\n >\n <!-- <ion-icon aria-hidden=\"true\" name=\"add-outline\" slot=\"start\"></ion-icon> -->\n <ngx-decaf-icon slot=\"icon-only\" name=\"ti-code-plus\" slot=\"start\" />\n {{\n locale +\n (required\n ? items.length\n ? '.add'\n : '.add_first'\n : items.length\n ? '.add'\n : isOpen\n ? '.add_first'\n : '.show_form') | translate\n }}\n </ion-button>\n </div>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n} @else {\n @if (refreshing) {\n <div class=\"dcf-loading-container\">\n <ion-spinner name=\"crescent\" color=\"primary\"></ion-spinner>\n </div>\n } @else {\n <legend>{{ (title ? title : name) | translate }}</legend>\n @if (!items.length) {\n <div class=\"dcf-padding-xsmall\">\n <ion-text>{{ locale + '.empty' | translate }}</ion-text>\n </div>\n } @else {\n @for (item of items; track trackItemFn($index, item)) {\n <div class=\"dcf-fieldset-read-item\">\n <div>\n <ngx-decaf-layout\n [className]=\"operation\"\n [operation]=\"operation\"\n [flexMode]=\"item?.props?.flexMode ?? false\"\n [match]=\"false\"\n [gap]=\"'collapse'\"\n [children]=\"item || []\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [borders]=\"item?.props?.borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n />\n </div>\n </div>\n }\n }\n }\n}\n", styles: ["fieldset{margin:0;padding:0;min-inline-size:auto}.dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-loading-container ion-spinner{width:30px;height:30px}.dcf-fieldset-read-item{border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small);padding:var(--dcf-padding-small) var(--dcf-padding-xsmall);padding-bottom:0;margin-bottom:var(--dcf-margin-small)!important}.dcf-fieldset-component{border-radius:var(--dcf-border-radius-small);border:1px solid var(--dcf-color-gray-3);padding:var(--dcf-padding-small)}.dcf-fieldset-component.create ::ng-deep .dcf-item-readonly{display:none!important}.dcf-fieldset-component.dcf-open.dcf-empty .dcf-button-add{margin-top:1rem!important;margin-bottom:.15rem!important}.dcf-fieldset-component.dcf-blank{border-color:transparent;padding:var(--dcf-padding-xsmall) .25rem}.dcf-fieldset-component:not(.dcf-blank):not(.read):not(.delete){padding:var(--dcf-padding)}.dcf-fieldset-component *{overflow-x:hidden!important}.dcf-max-message-container{padding:0 .125rem;margin-bottom:var(--dcf-margin-xsmall)}legend,.dcf-title{font-weight:500;font-size:1rem;line-height:1.5rem;font-weight:600;margin:0;color:var(--ion-color-text)!important}.dcf-fieldset-content{margin-top:.25rem}.dcf-fieldset-content:not(.dcf-empty){padding:var(--dcf-padding-small) .25rem!important;margin-top:var(--dcf-margin-xsmall)}.dcf-fields-list{margin-top:var(--dcf-margin-small);padding-bottom:var(--dcf-padding)!important;max-height:200px}.dcf-fields-list ion-item{--min-height: 30px;--padding-top: 0rem;--padding-bottom: 0rem;--padding-start: .75rem;--padding-end: .5rem;--inner-padding-start: 0px !important;--inner-padding-end: 0px !important;--border-color: transparent;--background: rgba(var(--dcf-color-primary-rgb), .025) !important;border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small);box-sizing:border-box}.dcf-fields-list ion-item:not(:last-child){margin-bottom:var(--dcf-margin-small)}.dcf-fields-list ion-item ion-icon.dcf-reorder-disabled{width:var(--dcf-spacement);transform:translatey(2px);color:var(--dcf-color-gray-4)}.dcf-fields-list ion-item.updating{--background: rgba(var(--dcf-color-primary-rgb), .1) !important}.dcf-fields-list ion-item.not-unique{--background: rgba(var(--dcf-color-danger-rgb), .05) !important}.dcf-fields-list ion-item .dcf-subtitle{font-size:.925rem;color:var(--ion-color-gray-6)}\n"] }]
|
|
9393
|
+
], template: "@if (['create', 'update'].includes(operation) || !multiple) {\n <div\n [attr.role]=\"['create', 'update'].includes(operation) ? 'group' : 'region'\"\n [class]=\"'dcf-fieldset-component ' + operation\"\n [class.dcf-blank]=\"!borders\"\n [class.dcf-empty]=\"!items?.length\"\n [class.dcf-open]=\"isOpen\"\n #component\n >\n <div class=\"dcf-width-1-1\">\n <div>\n <div class=\"dcf-grid dcf-grid-collapse dcf-flex dcf-flex-middle dcf-width-1-1\">\n <div class=\"dcf-width-expand\">\n <legend>{{ (title ? title : name) | translate }}</legend>\n </div>\n @if (!isRequired && ['create'].includes(operation) && multiple) {\n <div class=\"dcf-width-auto dcf-delete\">\n <ion-button\n fill=\"clear\"\n size=\"small\"\n (click)=\"handleClear($event)\"\n [class.dcf-invisible]=\"!isOpen\"\n [attr.aria-label]=\"\n (items?.length ? locale + '.clear_items' : locale + '.hidden_form') | translate\n \"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n [name]=\"'ti-' + (items?.length ? 'trash' : 'eye-off')\"\n />\n </ion-button>\n </div>\n }\n </div>\n </div>\n <div\n class=\"dcf-fieldset-content\"\n [class.dcf-empty]=\"!items?.length && !isOpen\"\n slot=\"content\"\n >\n @if (activePage) {\n <div\n class=\"dcf-animation dcf-animation-slide-top-small dcf-animation-fast\"\n [class.dcf-disabled]=\"!activePage\"\n >\n <ngx-decaf-layout\n [className]=\"''\"\n [flexMode]=\"props.flexMode ?? false\"\n [match]=\"false\"\n [gap]=\"'small'\"\n [pk]=\"pk\"\n [modelId]=\"modelId\"\n [operation]=\"operation\"\n [children]=\"activePage || []\"\n [parentForm]=\"formGroup || parentForm\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [borders]=\"activePage?.borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n [hidden]=\"items.length === max && !updatingItem\"\n />\n </div>\n }\n\n @if (multiple && ['create', 'update'].includes(operation)) {\n @if (multiple && items.length) {\n <ion-list class=\"dcf-fields-list\">\n <ion-reorder-group\n [formGroup]=\"formGroup.parent\"\n [disabled]=\"updatingItem\"\n (ionItemReorder)=\"handleReorderItems($any($event))\"\n #accordionComponent\n >\n @for (item of items; track item.index) {\n <ion-item\n [class.not-unique]=\"isUniqueError && item.title === isUniqueError\"\n [class.updating]=\"updatingItem?.['index'] === item.index - 1\"\n lines=\"full\"\n [button]=\"false\"\n >\n @if (ordenable) {\n @if (items?.length > 1 && !updatingItem) {\n <ion-reorder slot=\"start\">\n <ion-icon aria-hidden=\"true\" name=\"swap-vertical-outline\"></ion-icon>\n </ion-reorder>\n } @else {\n <div slot=\"start\">\n <ion-icon\n aria-hidden=\"true\"\n class=\"dcf-reorder-disabled\"\n size=\"small\"\n name=\"swap-vertical-outline\"\n disabled\n ></ion-icon>\n </div>\n }\n }\n\n <ion-label\n [color]=\"\n item.title === isUniqueError && !updatingItem?.[pk] === item.title\n ? 'danger'\n : ''\n \"\n >\n @if (ordenable) {\n {{ item.index }}.{{ item.title }}\n } @else {\n @if (item[pk]) {\n {{ pk }}: {{ item[pk] }} -\n }\n {{ item.title }}\n }\n @if (item.description?.length > 0) {\n <br />\n <ion-text class=\"dcf-subtitle\">{{ item.description }}</ion-text>\n }\n </ion-label>\n @if (item.info?.length || item.subinfo?.length) {\n <ion-note slot=\"end\">\n @if (item.info?.length) {\n {{ item.info }}\n <br />\n }\n @if (item.subinfo) {\n {{ item.subinfo }}\n }\n </ion-note>\n }\n <div slot=\"end\">\n @if (editable) {\n @if (!updatingItem || updatingItem?.[pk] !== item.title) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n (click)=\"handleUpdateItem($index)\"\n [attr.aria-label]=\"locale + '.edit_item' | translate\"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n size=\"small\"\n name=\"ti-cash-edit\"\n [color]=\"!isDarkMode ? 'dark' : 'light'\"\n ></ngx-decaf-icon>\n </ion-button>\n }\n }\n @if (!updatingItem) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n color=\"danger\"\n (click)=\"handleRemoveItem($index)\"\n [attr.aria-label]=\"locale + '.remove_item' | translate\"\n >\n <ngx-decaf-icon\n slot=\"icon-only\"\n size=\"small\"\n name=\"ti-row-remove\"\n [color]=\"!isDarkMode ? 'dark' : 'light'\"\n />\n </ion-button>\n }\n </div>\n </ion-item>\n }\n </ion-reorder-group>\n </ion-list>\n }\n\n @if (isUniqueError) {\n <div\n class=\"dcf-not-unique-container dcf-animation dcf-animation-bottom-small dcf-animation-fast\"\n >\n <div class=\"dcf-grid dcf-grid-collapse dcf-width-1-1\">\n <div class=\"dcf-auto\" [attr.style]=\"'max-width: 50px'\">\n <ion-icon aria-hidden=\"true\" name=\"alert-circle-outline\"></ion-icon>\n </div>\n <div class=\"dcf-width-expand\">\n <ion-text color=\"danger\" class=\"dcf-text-small\">\n {{ locale + '.not_unique' | translate: { value: isUniqueError } }}\n </ion-text>\n </div>\n </div>\n </div>\n }\n\n @if (max) {\n <div class=\"dcf-width-1-1 dcf-max-message-container\">\n <ion-text\n class=\"dcf-text-small\"\n [color]=\"items.length !== max ? (!isDarkMode ? 'medium' : '') : 'primary'\"\n >\n {{\n locale + (items.length !== max ? '.max_items' : '.max_items_reached')\n | translate: { '0': max }\n }}\n </ion-text>\n </div>\n }\n\n <div class=\"dcf-grid dcf-grid-small dcf-flex dcf-buttons-container\">\n @if (updatingItem) {\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n color=\"danger\"\n (click)=\"handleCancelUpdateItem()\"\n [attr.aria-label]=\"locale + '.cancel_update' | translate\"\n >\n {{ locale + '.cancel' | translate }}\n </ion-button>\n </div>\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n (click)=\"handleCreateItem()\"\n [attr.aria-label]=\"locale + '.update_item' | translate\"\n >\n <ion-icon aria-hidden=\"true\" name=\"refresh-outline\" slot=\"start\"></ion-icon>\n {{ locale + '.update_item' | translate }}\n </ion-button>\n </div>\n } @else {\n @if (items.length < max || !max) {\n <div>\n <ion-button\n size=\"small\"\n fill=\"clear\"\n class=\"dcf-button-add\"\n [color]=\"isDarkMode ? 'light' : 'dark'\"\n (click)=\"handleCreateItem()\"\n [attr.aria-label]=\"locale + '.create_item' | translate\"\n >\n <!-- <ion-icon aria-hidden=\"true\" name=\"add-outline\" slot=\"start\"></ion-icon> -->\n <ngx-decaf-icon slot=\"icon-only\" name=\"ti-code-plus\" slot=\"start\" />\n {{\n locale +\n (required\n ? items.length\n ? '.add'\n : '.add_first'\n : items.length\n ? '.add'\n : isOpen\n ? '.add_first'\n : '.show_form') | translate\n }}\n </ion-button>\n </div>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n} @else {\n @if (refreshing) {\n <div class=\"dcf-loading-container\">\n <ion-spinner name=\"crescent\" color=\"primary\"></ion-spinner>\n </div>\n } @else {\n <legend>{{ (title ? title : name) | translate }}</legend>\n @if (!items.length) {\n <div class=\"dcf-padding-xsmall\">\n <ion-text>{{ locale + '.empty' | translate }}</ion-text>\n </div>\n } @else {\n @for (item of items; track trackItemFn($index, item)) {\n <div class=\"dcf-fieldset-read-item\">\n <div>\n <ngx-decaf-layout\n [className]=\"operation\"\n [operation]=\"operation\"\n [pk]=\"pk\"\n [model]=\"model\"\n [modelId]=\"modelId\"\n [flexMode]=\"item?.props?.flexMode ?? false\"\n [match]=\"false\"\n [gap]=\"'collapse'\"\n [children]=\"item || []\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [borders]=\"item?.props?.borders ?? false\"\n [breakpoint]=\"breakpoint ?? 'large'\"\n />\n </div>\n </div>\n }\n }\n }\n}\n", styles: ["fieldset{margin:0;padding:0;min-inline-size:auto}.dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-loading-container ion-spinner{width:30px;height:30px}.dcf-fieldset-read-item{border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small);padding:var(--dcf-padding-small) var(--dcf-padding-xsmall);padding-bottom:0;margin-bottom:var(--dcf-margin-small)!important}.dcf-fieldset-component{border-radius:var(--dcf-border-radius-small);border:1px solid var(--dcf-color-gray-3);padding:var(--dcf-padding-small)}.dcf-fieldset-component.create ::ng-deep .dcf-item-readonly{display:none!important}.dcf-fieldset-component.dcf-open.dcf-empty .dcf-button-add{margin-top:1rem!important;margin-bottom:.15rem!important}.dcf-fieldset-component.dcf-blank{border-color:transparent;padding:var(--dcf-padding-xsmall) .25rem}.dcf-fieldset-component:not(.dcf-blank):not(.read):not(.delete){padding:var(--dcf-padding)}.dcf-fieldset-component *{overflow-x:hidden!important}.dcf-max-message-container{padding:0 .125rem;margin-bottom:var(--dcf-margin-xsmall)}legend,.dcf-title{font-weight:500;font-size:1rem;line-height:1.5rem;font-weight:600;margin:0;color:var(--ion-color-text)!important}.dcf-fieldset-content{margin-top:.25rem}.dcf-fieldset-content:not(.dcf-empty){padding:var(--dcf-padding-small) .25rem!important;margin-top:var(--dcf-margin-xsmall)}.dcf-fields-list{margin-top:var(--dcf-margin-small);padding-bottom:var(--dcf-padding)!important;max-height:200px}.dcf-fields-list ion-item{--min-height: 30px;--padding-top: 0rem;--padding-bottom: 0rem;--padding-start: .75rem;--padding-end: .5rem;--inner-padding-start: 0px !important;--inner-padding-end: 0px !important;--border-color: transparent;--background: rgba(var(--dcf-color-primary-rgb), .025) !important;border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small);box-sizing:border-box}.dcf-fields-list ion-item:not(:last-child){margin-bottom:var(--dcf-margin-small)}.dcf-fields-list ion-item ion-icon.dcf-reorder-disabled{width:var(--dcf-spacement);transform:translatey(2px);color:var(--dcf-color-gray-4)}.dcf-fields-list ion-item.updating{--background: rgba(var(--dcf-color-primary-rgb), .1) !important}.dcf-fields-list ion-item.not-unique{--background: rgba(var(--dcf-color-danger-rgb), .05) !important}.dcf-fields-list ion-item .dcf-subtitle{font-size:.925rem;color:var(--ion-color-gray-6)}\n"] }]
|
|
9437
9394
|
}], ctorParameters: () => [], propDecorators: { formControl: [{
|
|
9438
9395
|
type: Input
|
|
9439
9396
|
}], customTypes: [{
|
|
@@ -11273,7 +11230,7 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
|
|
|
11273
11230
|
* period. This prevents multiple rapid clicks from triggering multiple events.
|
|
11274
11231
|
*
|
|
11275
11232
|
* @private
|
|
11276
|
-
* @type {Subject<CustomEvent |
|
|
11233
|
+
* @type {Subject<CustomEvent | IListItemCustomEvent | IBaseCustomEvent>}
|
|
11277
11234
|
* @memberOf ListComponent
|
|
11278
11235
|
*/
|
|
11279
11236
|
this.clickItemSubject = new Subject();
|
|
@@ -11402,7 +11359,7 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
|
|
|
11402
11359
|
}
|
|
11403
11360
|
const mapperFn = value?.['valueParserFn'] || undefined;
|
|
11404
11361
|
if (typeof mapperFn === 'function') {
|
|
11405
|
-
const value = await mapperFn(
|
|
11362
|
+
const value = await mapperFn(this, key);
|
|
11406
11363
|
if (typeof value === Primitives.STRING) {
|
|
11407
11364
|
mapper[value] = key;
|
|
11408
11365
|
}
|
|
@@ -11473,8 +11430,7 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
|
|
|
11473
11430
|
this.data = !this.model
|
|
11474
11431
|
? await this.getFromRequest(!!event, start, limit)
|
|
11475
11432
|
: (await this.getFromModel(!!event));
|
|
11476
|
-
|
|
11477
|
-
this.refreshEventEmit(this.data);
|
|
11433
|
+
this.refreshEventEmit(this.data);
|
|
11478
11434
|
if (this.type === ListComponentsTypes.INFINITE) {
|
|
11479
11435
|
if (this.page === this.pages) {
|
|
11480
11436
|
if (event?.target)
|
|
@@ -11611,12 +11567,12 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
|
|
|
11611
11567
|
* debounced click subject. This allows the component to respond to clicks on
|
|
11612
11568
|
* list items regardless of where they originate from.
|
|
11613
11569
|
*
|
|
11614
|
-
* @param {
|
|
11615
|
-
* @returns {void}
|
|
11570
|
+
* @param {IListItemCustomEvent | IBaseCustomEvent} event - The click event
|
|
11571
|
+
* @returns {Promise<void>}
|
|
11616
11572
|
*
|
|
11617
11573
|
* @memberOf ListComponent
|
|
11618
11574
|
*/
|
|
11619
|
-
handleClick(event) {
|
|
11575
|
+
async handleClick(event) {
|
|
11620
11576
|
this.clickItemSubject.next(event);
|
|
11621
11577
|
}
|
|
11622
11578
|
/**
|
|
@@ -11717,7 +11673,7 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
|
|
|
11717
11673
|
* This extracts the relevant data from the event and passes it to parent components.
|
|
11718
11674
|
*
|
|
11719
11675
|
* @private
|
|
11720
|
-
* @param {
|
|
11676
|
+
* @param {IListItemCustomEvent | IBaseCustomEvent} event - The click event
|
|
11721
11677
|
* @returns {void}
|
|
11722
11678
|
*
|
|
11723
11679
|
* @memberOf ListComponent
|
|
@@ -12093,7 +12049,9 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
|
|
|
12093
12049
|
else {
|
|
12094
12050
|
let val;
|
|
12095
12051
|
for (const _value of arrayValue)
|
|
12096
|
-
val = !val
|
|
12052
|
+
val = !val
|
|
12053
|
+
? item[_value]
|
|
12054
|
+
: (typeof val === Primitives.STRING ? JSON.parse(val) : val)[_value];
|
|
12097
12055
|
if (isValidDate(new Date(val)))
|
|
12098
12056
|
val = `${formatDate(val)}`;
|
|
12099
12057
|
accum[key] = val === null || val === undefined ? value : val;
|
|
@@ -12149,7 +12107,7 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
|
|
|
12149
12107
|
.join(', ');
|
|
12150
12108
|
}
|
|
12151
12109
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12152
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ListComponent, isStandalone: true, selector: "ngx-decaf-list", inputs: { type: "type", showSearchbar: "showSearchbar", searchbarPlaceholder: "searchbarPlaceholder", data: "data", source: "source", loadMoreData: "loadMoreData", lines: "lines", inset: "inset", scrollThreshold: "scrollThreshold", scrollPosition: "scrollPosition", loadingText: "loadingText", showRefresher: "showRefresher", createButton: "createButton", loadingSpinner: "loadingSpinner", enableFilter: "enableFilter", disableSort: "disableSort", empty: "empty" }, outputs: { clickEvent: "clickEvent" }, host: { listeners: { "window:ListItemClickEvent": "handleClick($event)", "window:searchbarEvent": "handleSearch($event)" }, properties: { "attr.id": "uid" } }, usesInheritance: true, ngImport: i0, template: "@if (showRefresher) {\n <ion-refresher\n slot=\"fixed\"\n [pullFactor]=\"1\"\n [pullMin]=\"100\"\n [pullMax]=\"200\"\n (ionRefresh)=\"handleRefresh($event)\"\n >\n <ion-refresher-content />\n </ion-refresher>\n}\n\n@if (showSearchbar) {\n <div [hidden]=\"!data?.length && !searching\">\n <div class=\"dcf-grid dcf-grid-small dcf-grid-actions\">\n <div class=\"dcf-width-expand@m dcf-width-1-1\">\n @if (model && enableFilter) {\n @if (data?.length || searching) {\n <ngx-decaf-filter\n [model]=\"model\"\n [indexes]=\"indexes ?? []\"\n [sortDirection]=\"sortDirection\"\n [disableSort]=\"disableSort\"\n (filterEvent)=\"handleFilter($event)\"\n (searchEvent)=\"handleSearch($event)\"\n />\n }\n } @else {\n <ngx-decaf-searchbar\n [placeholder]=\"searchbarPlaceholder\"\n [emitEventToWindow]=\"false\"\n [debounce]=\"500\"\n (searchEvent)=\"handleSearch($event)\"\n />\n }\n </div>\n @if (createButton) {\n <div\n class=\"dcf-width-auto@m dcf-button-container dcf-width-1-1 dcf-flex-middle dcf-flex dcf-flex-center dcf-flex-right@m\"\n >\n <div>\n <ion-button expand=\"block\" (click)=\"changeOperation(OperationKeys.CREATE)\">\n Create\n </ion-button>\n </div>\n </div>\n }\n </div>\n </div>\n}\n@if (initialized && data?.length) {\n <ion-list [id]=\"uid\" [inset]=\"inset\" [lines]=\"lines\">\n @if (item?.tag) {\n @for (child of items; track trackItemFn($index, child)) {\n <ngx-decaf-component-renderer\n [tag]=\"item.tag\"\n (listenEvent)=\"handleEvent($event)\"\n [globals]=\"{\n item: child,\n mapper: mapper,\n route: isModalChild ? route : undefined,\n model: child,\n isModalChild: child.isModalChild,\n emitEvent: child.emitEvent,\n }\"\n ></ngx-decaf-component-renderer>\n }\n } @else {\n <ng-content></ng-content>\n }\n </ion-list>\n\n @if (loadMoreData) {\n @if (pages > 0 && type === 'paginated' && !searchValue?.length) {\n <ngx-decaf-pagination\n [totalPages]=\"pages\"\n [current]=\"page\"\n (clickEvent)=\"handlePaginate($event)\"\n />\n } @else {\n <ion-infinite-scroll\n [class]=\"searchValue?.length ? 'dcf-hidden' : ''\"\n [position]=\"scrollPosition\"\n [threshold]=\"scrollThreshold\"\n (ionInfinite)=\"handleRefresh($event)\"\n >\n <ion-infinite-scroll-content\n [loadingSpinner]=\"loadingSpinner\"\n [loadingText]=\"loadingText\"\n />\n </ion-infinite-scroll>\n }\n }\n} @else {\n @if (refreshing) {\n @for (skl of skeletonData; track $index) {\n <ion-item>\n <ion-thumbnail slot=\"start\">\n <ion-skeleton-text [animated]=\"true\"></ion-skeleton-text>\n </ion-thumbnail>\n <ion-label>\n <ion-skeleton-text [animated]=\"true\"></ion-skeleton-text>\n <ion-text class=\"date\" style=\"width: 20%\">\n <ion-skeleton-text [animated]=\"true\"></ion-skeleton-text>\n </ion-text>\n </ion-label>\n </ion-item>\n }\n } @else {\n @if (!searching) {\n <ngx-decaf-empty-state\n [title]=\"empty.title ? (locale + '.' + empty.title | translate) : ''\"\n [model]=\"empty?.showButton ? model : undefined\"\n [route]=\"route\"\n [modelId]=\"modelId\"\n [buttonLink]=\"empty?.link ?? undefined\"\n [borders]=\"borders\"\n [icon]=\"(item?.icon ?? 'folder-open-outline') || empty.icon\"\n className=\"dcf-empty-data\"\n [subtitle]=\"empty.subtitle ? (locale + '.' + empty.subtitle | translate) : ''\"\n />\n } @else {\n <ngx-decaf-empty-state\n icon=\"search-outline\"\n [model]=\"empty?.showButton ? model : undefined\"\n [route]=\"route\"\n [modelId]=\"modelId\"\n [borders]=\"borders\"\n [operations]=\"operations\"\n [body]=\"'small'\"\n [translatable]=\"true\"\n [title]=\"locale + '.search.title' | translate\"\n [subtitle]=\"locale + '.search.subtitle' | translate: { '0': parseSearchValue() }\"\n [searchValue]=\"searchValue\"\n />\n }\n }\n}\n", styles: ["ion-infinite-scroll{max-height:50px}ion-infinite-scroll:not(.infinite-scroll-loading) ::ng-deep{max-height:1.5rem}ion-infinite-scroll ::ng-deep ion-spinner{--color: var(--dcf-color-primary);padding-top:1rem}@media (max-width: 768px){#end,[slot=end]{display:none!important}}.dcf-grid-actions{padding:0px var(--dcf-padding-small);padding-bottom:0}.dcf-grid-actions .dcf-button-container{margin-top:var(--dcf-margin-small)}@media (max-width: 768px){.dcf-grid-actions .dcf-button-container{width:100%!important}.dcf-grid-actions .dcf-button-container *{width:calc(100% - 5px)!important;display:inline-block;margin-top:0!important;margin-bottom:var(--dcf-margin-xsmall)!important}}.dcf-grid-actions>div:only-child{width:100%}\n"], dependencies: [{ kind: "component", type: IonRefresher, selector: "ion-refresher", inputs: ["closeDuration", "disabled", "mode", "pullFactor", "pullMax", "pullMin", "snapbackDuration"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: PaginationComponent, selector: "ngx-decaf-pagination", inputs: ["totalPages", "current"], outputs: ["clickEvent"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonThumbnail, selector: "ion-thumbnail" }, { kind: "component", type: IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: IonRefresherContent, selector: "ion-refresher-content", inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] }, { kind: "component", type: IonInfiniteScroll, selector: "ion-infinite-scroll", inputs: ["disabled", "position", "threshold"] }, { kind: "component", type: IonInfiniteScrollContent, selector: "ion-infinite-scroll-content", inputs: ["loadingSpinner", "loadingText"] }, { kind: "component", type: SearchbarComponent, selector: "ngx-decaf-searchbar", inputs: ["autocomplete", "autocorrect", "animated", "buttonCancelText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value", "queryKeys", "isVisible", "wrapper", "wrapperColor", "emitEventToWindow"], outputs: ["searchEvent"] }, { kind: "component", type: EmptyStateComponent, selector: "ngx-decaf-empty-state", inputs: ["title", "titleColor", "subtitle", "subtitleColor", "showIcon", "icon", "iconSize", "iconColor", "buttonLink", "buttonText", "buttonFill", "buttonColor", "buttonSize", "searchValue"] }, { kind: "component", type: FilterComponent, selector: "ngx-decaf-filter", inputs: ["multiple", "conditions", "sortOptions", "disableSort"], outputs: ["filterEvent", "searchEvent"] }, { kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "parent"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
12110
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ListComponent, isStandalone: true, selector: "ngx-decaf-list", inputs: { type: "type", showSearchbar: "showSearchbar", searchbarPlaceholder: "searchbarPlaceholder", data: "data", source: "source", loadMoreData: "loadMoreData", lines: "lines", inset: "inset", scrollThreshold: "scrollThreshold", scrollPosition: "scrollPosition", loadingText: "loadingText", showRefresher: "showRefresher", createButton: "createButton", loadingSpinner: "loadingSpinner", enableFilter: "enableFilter", disableSort: "disableSort", empty: "empty" }, outputs: { clickEvent: "clickEvent" }, host: { listeners: { "window:ListItemClickEvent": "handleClick($event)", "window:searchbarEvent": "handleSearch($event)" }, properties: { "attr.id": "uid" } }, usesInheritance: true, ngImport: i0, template: "@if (showRefresher) {\n <ion-refresher\n slot=\"fixed\"\n [pullFactor]=\"1\"\n [pullMin]=\"100\"\n [pullMax]=\"200\"\n (ionRefresh)=\"handleRefresh($event)\"\n >\n <ion-refresher-content />\n </ion-refresher>\n}\n\n@if (showSearchbar) {\n <div [hidden]=\"!data?.length && !searching\">\n <div class=\"dcf-grid dcf-grid-small dcf-grid-actions\">\n <div class=\"dcf-width-expand@m dcf-width-1-1\">\n @if (model && enableFilter) {\n @if (data?.length || searching) {\n <ngx-decaf-filter\n [model]=\"model\"\n [indexes]=\"indexes ?? []\"\n [sortDirection]=\"sortDirection\"\n [disableSort]=\"disableSort\"\n (filterEvent)=\"handleFilter($event)\"\n (searchEvent)=\"handleSearch($event)\"\n />\n }\n } @else {\n <ngx-decaf-searchbar\n [placeholder]=\"searchbarPlaceholder\"\n [emitEventToWindow]=\"false\"\n [debounce]=\"500\"\n (searchEvent)=\"handleSearch($event)\"\n />\n }\n </div>\n @if (createButton) {\n <div\n class=\"dcf-width-auto@m dcf-button-container dcf-width-1-1 dcf-flex-middle dcf-flex dcf-flex-center dcf-flex-right@m\"\n >\n <div>\n <ion-button expand=\"block\" (click)=\"changeOperation(OperationKeys.CREATE)\">\n Create\n </ion-button>\n </div>\n </div>\n }\n </div>\n </div>\n}\n@if (initialized && data?.length) {\n <ion-list [id]=\"uid\" [inset]=\"inset\" [lines]=\"lines\">\n @if (item?.tag) {\n @for (child of items; track trackItemFn($index, child)) {\n <ngx-decaf-component-renderer\n [tag]=\"item.tag\"\n (listenEvent)=\"handleEvent($event)\"\n [globals]=\"{\n item: child,\n mapper: mapper,\n route: isModalChild ? route : undefined,\n model: child,\n isModalChild: child.isModalChild,\n emitEvent: child.emitEvent,\n }\"\n ></ngx-decaf-component-renderer>\n }\n } @else {\n <ng-content></ng-content>\n }\n </ion-list>\n\n @if (loadMoreData) {\n @if (pages > 0 && type === 'paginated' && !searchValue?.length) {\n <ngx-decaf-pagination\n [totalPages]=\"pages\"\n [current]=\"page\"\n (clickEvent)=\"handlePaginate($event)\"\n />\n } @else {\n <ion-infinite-scroll\n [class]=\"searchValue?.length ? 'dcf-hidden' : ''\"\n [position]=\"scrollPosition\"\n [threshold]=\"scrollThreshold\"\n (ionInfinite)=\"handleRefresh($event)\"\n >\n <ion-infinite-scroll-content\n [loadingSpinner]=\"loadingSpinner\"\n [loadingText]=\"loadingText\"\n />\n </ion-infinite-scroll>\n }\n }\n} @else {\n @if (refreshing) {\n @for (skl of skeletonData; track $index) {\n <ion-item>\n <ion-thumbnail slot=\"start\">\n <ion-skeleton-text [animated]=\"true\"></ion-skeleton-text>\n </ion-thumbnail>\n <ion-label>\n <ion-skeleton-text [animated]=\"true\"></ion-skeleton-text>\n <ion-text class=\"date\" style=\"width: 20%\">\n <ion-skeleton-text [animated]=\"true\"></ion-skeleton-text>\n </ion-text>\n </ion-label>\n </ion-item>\n }\n } @else {\n @if (!searching) {\n <ngx-decaf-empty-state\n [title]=\"empty.title ? (locale + '.' + empty.title | translate) : ''\"\n [model]=\"empty?.showButton ? model : undefined\"\n [route]=\"route\"\n [modelId]=\"modelId\"\n [buttonLink]=\"empty?.link ?? undefined\"\n [borders]=\"borders\"\n [icon]=\"(item?.icon ?? 'folder-open-outline') || empty.icon\"\n className=\"dcf-empty-data\"\n [subtitle]=\"empty.subtitle ? (locale + '.' + empty.subtitle | translate) : ''\"\n />\n } @else {\n <ngx-decaf-empty-state\n icon=\"search-outline\"\n [model]=\"empty?.showButton ? model : undefined\"\n [route]=\"route\"\n [modelId]=\"modelId\"\n [borders]=\"borders\"\n [operations]=\"operations\"\n [body]=\"'small'\"\n [translatable]=\"true\"\n [title]=\"locale + '.search.title' | translate\"\n [subtitle]=\"locale + '.search.subtitle' | translate: { '0': parseSearchValue() }\"\n [searchValue]=\"searchValue\"\n />\n }\n }\n}\n", styles: ["ion-infinite-scroll{max-height:50px}ion-infinite-scroll:not(.infinite-scroll-loading) ::ng-deep{max-height:1.5rem}ion-infinite-scroll ::ng-deep ion-spinner{--color: var(--dcf-color-primary);padding-top:1rem}@media (max-width: 768px){#end,[slot=end]{display:none!important}}.dcf-grid-actions{padding:0px var(--dcf-padding-small);padding-bottom:0}.dcf-grid-actions .dcf-button-container{margin-top:var(--dcf-margin-small)}@media (max-width: 768px){.dcf-grid-actions .dcf-button-container{width:100%!important}.dcf-grid-actions .dcf-button-container *{width:calc(100% - 5px)!important;display:inline-block;margin-top:0!important;margin-bottom:var(--dcf-margin-xsmall)!important}}.dcf-grid-actions>div:only-child{width:100%}\n"], dependencies: [{ kind: "component", type: IonRefresher, selector: "ion-refresher", inputs: ["closeDuration", "disabled", "mode", "pullFactor", "pullMax", "pullMin", "snapbackDuration"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: PaginationComponent, selector: "ngx-decaf-pagination", inputs: ["totalPages", "current"], outputs: ["clickEvent"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonThumbnail, selector: "ion-thumbnail" }, { kind: "component", type: IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: IonRefresherContent, selector: "ion-refresher-content", inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] }, { kind: "component", type: IonInfiniteScroll, selector: "ion-infinite-scroll", inputs: ["disabled", "position", "threshold"] }, { kind: "component", type: IonInfiniteScrollContent, selector: "ion-infinite-scroll-content", inputs: ["loadingSpinner", "loadingText"] }, { kind: "component", type: SearchbarComponent, selector: "ngx-decaf-searchbar", inputs: ["autocomplete", "autocorrect", "animated", "buttonCancelText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value", "queryKeys", "isVisible", "wrapper", "wrapperColor", "emitEventToWindow"], outputs: ["searchEvent"] }, { kind: "component", type: EmptyStateComponent, selector: "ngx-decaf-empty-state", inputs: ["title", "titleColor", "subtitle", "subtitleColor", "showIcon", "icon", "iconSize", "iconColor", "buttonLink", "buttonText", "buttonFill", "buttonColor", "buttonSize", "searchValue"] }, { kind: "component", type: FilterComponent, selector: "ngx-decaf-filter", inputs: ["multiple", "conditions", "sortOptions", "disableSort"], outputs: ["filterEvent", "searchEvent"] }, { kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "pk", "parent"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
12153
12111
|
};
|
|
12154
12112
|
ListComponent = __decorate([
|
|
12155
12113
|
Dynamic(),
|
|
@@ -12311,7 +12269,7 @@ let ListItemComponent = class ListItemComponent extends NgxComponentDirective {
|
|
|
12311
12269
|
* are performed on it. The emitted event contains information about the action,
|
|
12312
12270
|
* the item data, and other relevant context for parent components to handle.
|
|
12313
12271
|
*
|
|
12314
|
-
* @type {EventEmitter<
|
|
12272
|
+
* @type {EventEmitter<IListItemCustomEvent>}
|
|
12315
12273
|
* @memberOf ListItemComponent
|
|
12316
12274
|
*/
|
|
12317
12275
|
this.clickEvent = new EventEmitter();
|
|
@@ -12425,7 +12383,7 @@ let ListItemComponent = class ListItemComponent extends NgxComponentDirective {
|
|
|
12425
12383
|
*
|
|
12426
12384
|
* @memberOf ListItemComponent
|
|
12427
12385
|
*/
|
|
12428
|
-
async handleAction(
|
|
12386
|
+
async handleAction(event, action, target) {
|
|
12429
12387
|
event.stopImmediatePropagation();
|
|
12430
12388
|
if (this.actionMenuOpen) {
|
|
12431
12389
|
await this.actionMenuComponent.dismiss();
|
|
@@ -12580,7 +12538,7 @@ let ListItemComponent = class ListItemComponent extends NgxComponentDirective {
|
|
|
12580
12538
|
this.actionMenuOpen = true;
|
|
12581
12539
|
}
|
|
12582
12540
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12583
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ListItemComponent, isStandalone: true, selector: "ngx-decaf-list-item", inputs: { actionsType: "actionsType", lines: "lines", item: "item", icon: "icon", iconSlot: "iconSlot", button: "button", title: "title", description: "description", info: "info", subinfo: "subinfo", emitEvent: "emitEvent" }, outputs: { clickEvent: "clickEvent" }, host: { listeners: { "window:resize": "enableSlideItems($event)" }, properties: { "attr.id": "uid" } }, viewQueries: [{ propertyName: "component", first: true, predicate: ["component"], descendants: true, read: ElementRef }, { propertyName: "actionMenuComponent", first: true, predicate: ["actionMenuComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\n@if (title || description) {\n <ion-item-sliding>\n <ion-item\n [id]=\"uid\"\n [lines]=\"lines\"\n [button]=\"!operations?.length ? false : button\"\n [class]=\"className\"\n (click)=\"operations?.includes(OperationKeys.READ) ? handleAction(OperationKeys.READ, $event, component) : ''\"\n #component\n >\n @if (icon && lines !== 'inset') {\n <div class=\"dcf-icon-container dcf-width-auto\" [slot]=\"iconSlot\">\n <ngx-decaf-icon slot=\"icon-only\" [name]=\"icon\" />\n </div>\n }\n <div class=\"dcf-width-expand\">\n <div class=\"dcf-flex dcf-flex-middle dcf-grid-collapse\" dcf-grid>\n @if (icon && lines === 'inset') {\n <div class=\"dcf-icon\" [slot]=\"iconSlot\">\n <ion-avatar>\n <ion-icon aria-hidden=\"true\" name=\"reader-outline\" size=\"default\" />\n </ion-avatar>\n </div>\n }\n <div class=\"dcf-width-expand@s dcf-width-1-1 dcf-label\">\n @if (title) {\n <ion-label class=\"dcf-item-title\">\n {{ title | translate }}\n </ion-label>\n }\n @if (description) {\n <div class=\"dcf-description\" [innerHTML]=\"description\"></div>\n }\n </div>\n @if (info || subinfo) {\n <div class=\"dcf-width-auto@s dcf-width-expand dcf-info dcf-flex dcf-flex-right@s\">\n <div>\n @if (info) {\n <span [innerHTML]=\"info\"></span>\n }\n @if (subinfo) {\n <div class=\"dcf-subinfo dcf-text-truncate\" [innerHTML]=\"subinfo\" ></div>\n }\n </div>\n </div>\n }\n\n <div class=\"dcf-width-auto dcf-flex dcf-flex-middle dcf-flex-right\">\n @if ((operations?.includes(OperationKeys.DELETE) || operations?.includes(OperationKeys.UPDATE)) && uid) {\n <div class=\"dcf-visible@s\" id=\"dcf-actions\">\n @if(actionsType === 'popover') {\n <ion-button shape=\"round\" fill=\"clear\" color=\"primary\" (click)=\"presentActionsMenu($event)\" [attr.aria-label]=\"locale+'.actions' | translate\">\n <ion-icon slot=\"icon-only\" aria-hidden=\"true\" name=\"ellipsis-vertical-outline\" />\n </ion-button>\n <ion-popover\n #actionMenuComponent\n side=\"bottom\"\n alignment=\"left\"\n [isOpen]=\"actionMenuOpen\"\n (didDismiss)=\"actionMenuOpen = false\">\n <ng-template>\n <ion-content class=\"ion-padding\">\n <ion-list lines=\"none\">\n <ion-list-header>\n <h4 class=\"dcf-text-capitalize\" [innerHTML]=\"'actions' | translate\"></h4>\n </ion-list-header>\n @for (operation of [OperationKeys.UPDATE, OperationKeys.DELETE]; track operation) {\n @if (operations?.includes(operation)) {\n <ion-item [button]=\"true\" (click)=\"handleAction(operation, $event, component)\">\n <div slot=\"start\">\n @if (operation === OperationKeys.UPDATE) {\n <ngx-decaf-icon [button]=\"true\" slot=\"icon-only\" name=\"ti-edit\" />\n } @else {\n <ngx-decaf-icon [button]=\"true\" slot=\"icon-only\" color=\"danger\" name=\"ti-trash\" />\n }\n </div>\n <ion-label class=\"dcf-text-capitalize\">{{ operation | translate }}</ion-label>\n </ion-item>\n }\n }\n </ion-list>\n </ion-content>\n </ng-template>\n </ion-popover>\n } @else {\n <div class=\"dcf-grid-actions dcf-grid dcf-grid-small dcf-flex \">\n @for (operation of [OperationKeys.UPDATE, OperationKeys.DELETE]; track operation) {\n <div>\n @if (operations?.includes(operation)) {\n <ngx-decaf-icon\n (click)=\"handleAction(operation, $event, component)\"\n fill=\"clear\" shape=\"round\"\n [attr.aria-label]=\"(locale +'.operations.' + operation) | translate\"\n [button]=\"true\"\n slot=\"icon-only\"\n [color]=\"operation === OperationKeys.UPDATE ? 'dark' : 'danger'\"\n [name]=\"operation === OperationKeys.UPDATE ? 'ti-edit' : 'ti-trash'\"\n />\n\n }\n </div>\n }\n </div>\n }\n\n </div>\n }\n @if (windowWidth > 639) {\n <div id=\"end\">\n <ng-content select=\"[slot='end']\"></ng-content>\n </div>\n }\n </div>\n </div>\n </div>\n </ion-item>\n @if (showSlideItems && uid) {\n <ion-item-options side=\"end\" (ionSwipe)=\"operations.length === 1 ? handleAction(operations[0], $event, component) : ''\">\n @if (operations?.includes(OperationKeys.UPDATE)) {\n <ion-item-option class=\"dcf-update\" (click)=\"handleAction(OperationKeys.UPDATE, $event, component)\" [expandable]=\"operations.length === 1\">\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"create-outline\" />\n </ion-item-option>\n }\n @if (operations?.includes(OperationKeys.DELETE)) {\n <ion-item-option class=\"dcf-delete\" (click)=\"handleAction(OperationKeys.DELETE, $event, component)\" [expandable]=\"operations.length === 1\">\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"trash\" />\n </ion-item-option>\n }\n </ion-item-options>\n }\n </ion-item-sliding>\n}\n", styles: ["ion-item:not(.dcf-palette-dark){--background-hover-opacity: .1;--background-focused-opacity: .1;--border-color: var(--dcf-color-gray-2)}ion-item:not(.dcf-palette-dark) .dcf-info{color:var(--dcf-color-gray-6)}ion-item:not(.dcf-palette-dark) .dcf-item-title{color:var(--dcf-color-gray-8)}ion-item:not(.dcf-palette-dark) .dcf-description{color:var(--dcf-color-gray-6)}ion-item:not(.dcf-palette-dark)>ion-button{color:var(--dcf-color-gray-7);--background: var(--dcf-color-gray-1) !important}ion-item:not(.dcf-palette-dark) ion-avatar{color:var(--dcf-color-gray-7);background:var(--dcf-color-gray-1)!important}ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete),ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update){background:rgba(var(--dcf-color-dark-rgb),.25)!important}ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete) .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete) ion-icon,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update) .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update) ion-icon{color:var(--dcf-color-gray-7)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete{background:rgba(var(--dcf-color-danger-rgb),.05)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete *,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete ion-icon{color:var(--dcf-color-danger)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update{background:rgba(var(--dcf-color-primary-rgb),.05)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update ion-icon{color:var(--dcf-color-primary)!important}ion-item.dcf-palette-dark{--background-hover-opacity: .25;--background-focused-opacity: .25;--border-color: var(--dcf-color-gray-6)}ion-item.dcf-palette-dark .dcf-description{color:var(--dcf-color-gray-4)}ion-item.dcf-palette-dark ion-button{color:var(--dcf-color-gray-1)!important;--background: var(--dcf-color-gray-7) !important}ion-item.dcf-palette-dark ion-avatar{color:var(--dcf-color-gray-1)!important;background:var(--dcf-background-color)!important}ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete),ion-item.dcf-palette-dark ion-item-option:not(.dcf-update){background:rgba(var(--dcf-color-dark-rgb),1)!important}ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete) .dcf-ti,ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete) ion-icon,ion-item.dcf-palette-dark ion-item-option:not(.dcf-update) .dcf-ti,ion-item.dcf-palette-dark ion-item-option:not(.dcf-update) ion-icon{color:var(--dcf-color-gray-2)!important}ion-item.dcf-palette-dark ion-item-option.dcf-delete{background:rgba(var(--dcf-color-danger-rgb),.05)!important}ion-item.dcf-palette-dark ion-item-option.dcf-delete .dcf-ti,ion-item.dcf-palette-dark ion-item-option.dcf-delete *,ion-item.dcf-palette-dark ion-item-option.dcf-delete ion-icon{color:var(--dcf-color-danger)!important}ion-item.dcf-palette-dark ion-item-option.dcf-update{background:rgba(var(--dcf-color-primary-rgb),.05)!important}ion-item.dcf-palette-dark ion-item-option.dcf-update .dcf-ti,ion-item.dcf-palette-dark ion-item-option.dcf-update ion-icon{color:var(--dcf-color-gray-2)!important}ion-item-sliding{box-sizing:border-box}ion-item-sliding[class*=active-slide]{border-color:var(--dcf-color-gray-3)}ion-item-sliding ion-item-option{color:var(--dcf-color-gray-5);box-shadow:inset 0 0 5px rgba(var(--dcf-color-dark-rgb),.15)!important;background:var(--dcf-color-gray-3)}ion-item{--min-height: 50px;--padding-top: .25rem;--padding-bottom: .25rem;--padding-start: .75rem;--padding-end: .75rem;--inner-padding-start: 0px !important;--inner-padding-end: 0px !important;--background-hover: var(--dcf-color-gray-8);--background-focused: var(--dcf-color-gray-8)}ion-item.item-lines-full{--padding-top: .5rem;--padding-bottom: .5rem;--padding-start: .25rem;-padding-end:.25rem;padding:0 .65rem}ion-item.item-lines-inset{--padding-top: 0rem !important;--padding-bottom: 0rem !important;--inner-padding-top: .5rem !important;--inner-padding-bottom: .65rem !important}ion-item .dcf-info{min-width:10vw;background:transparent!important}ion-item .dcf-grid{padding:0!important;margin:0!important;min-width:100%!important}ion-item .dcf-item-title{font-style:normal;font-weight:600;width:max-content!important}ion-item .dcf-description{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-weight:400;font-size:.925rem}ion-item::part(native){min-width:100%}ion-item [slot=start]{margin-right:.5rem!important}ion-item [slot=end]{margin-left:.5rem!important}ion-item .dcf-info{font-size:.9rem}ion-item .dcf-info .dcf-subinfo.dcf-line{margin-left:.5rem}@media (min-width: var(--dcf-width-sm)){ion-item .dcf-info .dcf-subinfo.dcf-line{display:block;margin-left:0}}ion-item #dcf-actions{padding:5px}@media (max-width: var(--dcf-width-m)){ion-item #dcf-actions{display:none;pointer-events:none!important;cursor:text!important}ion-item #dcf-actions *{display:none;pointer-events:none!important;cursor:text!important}}@media (max-width: var(--dcf-width-m)){ion-item #dcf-end,ion-item [slot=end]{display:none!important}}ion-item #dcf-end{padding-top:5px;display:flex;align-items:flex-end}ion-item .dcf-icon{display:flex;justify-content:center;align-items:center;text-align:center;margin-right:.5rem!important}ion-item .dcf-icon.dcf-grid-icon{min-width:50px;text-align:left;display:flex;justify-content:flex-start}@media (max-width: var(--dcf-width-s)){ion-item .dcf-icon{align-items:flex-start!important}}.dcf-icon-container{background:var(--dcf-color-gray-1);border-radius:50%;width:45px;height:45px;display:flex;justify-content:center;align-items:center}.dcf-icon-container ::ng-deep ion-icon{font-size:20px;transform:translateY(3px)!important}.dcf-icon-container ::ng-deep .ti{top:1px;left:1px}\n"], dependencies: [{ kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonListHeader, selector: "ion-list-header", inputs: ["color", "lines", "mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonItemSliding, selector: "ion-item-sliding", inputs: ["disabled"] }, { kind: "component", type: IonItemOptions, selector: "ion-item-options", inputs: ["side"] }, { kind: "component", type: IonItemOption, selector: "ion-item-option", inputs: ["color", "disabled", "download", "expandable", "href", "mode", "rel", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "component", type: IonPopover, selector: "ion-popover" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
12541
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ListItemComponent, isStandalone: true, selector: "ngx-decaf-list-item", inputs: { actionsType: "actionsType", lines: "lines", item: "item", icon: "icon", iconSlot: "iconSlot", button: "button", title: "title", description: "description", info: "info", subinfo: "subinfo", emitEvent: "emitEvent" }, outputs: { clickEvent: "clickEvent" }, host: { listeners: { "window:resize": "enableSlideItems($event)" }, properties: { "attr.id": "uid" } }, viewQueries: [{ propertyName: "component", first: true, predicate: ["component"], descendants: true, read: ElementRef }, { propertyName: "actionMenuComponent", first: true, predicate: ["actionMenuComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (title || description) {\n <ion-item-sliding>\n <ion-item\n [id]=\"uid\"\n [lines]=\"lines\"\n [button]=\"!operations?.length ? false : button\"\n [class]=\"className\"\n (click)=\"\n operations?.includes(OperationKeys.READ)\n ? handleAction($event, OperationKeys.READ, component)\n : ''\n \"\n #component\n >\n @if (icon && lines !== 'inset') {\n <div class=\"dcf-icon-container dcf-width-auto\" [slot]=\"iconSlot\">\n <ngx-decaf-icon slot=\"icon-only\" [name]=\"icon\" />\n </div>\n }\n <div class=\"dcf-width-expand\">\n <div class=\"dcf-flex dcf-flex-middle dcf-grid-collapse\" dcf-grid>\n @if (icon && lines === 'inset') {\n <div class=\"dcf-icon\" [slot]=\"iconSlot\">\n <ion-avatar>\n <ion-icon aria-hidden=\"true\" name=\"reader-outline\" size=\"default\" />\n </ion-avatar>\n </div>\n }\n <div class=\"dcf-width-expand@s dcf-width-1-1 dcf-label\">\n @if (title) {\n <ion-label class=\"dcf-item-title\">\n {{ title | translate }}\n </ion-label>\n }\n @if (description) {\n <div class=\"dcf-description\" [innerHTML]=\"description\"></div>\n }\n </div>\n @if (info || subinfo) {\n <div class=\"dcf-width-auto@s dcf-width-expand dcf-info dcf-flex dcf-flex-right@s\">\n <div>\n @if (info) {\n <span [innerHTML]=\"info\"></span>\n }\n @if (subinfo) {\n <div class=\"dcf-subinfo dcf-text-truncate\" [innerHTML]=\"subinfo\"></div>\n }\n </div>\n </div>\n }\n\n <div class=\"dcf-width-auto dcf-flex dcf-flex-middle dcf-flex-right\">\n @if (\n (operations?.includes(OperationKeys.DELETE) ||\n operations?.includes(OperationKeys.UPDATE)) &&\n uid\n ) {\n <div class=\"dcf-visible@s\" id=\"dcf-actions\">\n @if (actionsType === 'popover') {\n <ion-button\n shape=\"round\"\n fill=\"clear\"\n color=\"primary\"\n (click)=\"presentActionsMenu($event)\"\n [attr.aria-label]=\"locale + '.actions' | translate\"\n >\n <ion-icon\n slot=\"icon-only\"\n aria-hidden=\"true\"\n name=\"ellipsis-vertical-outline\"\n />\n </ion-button>\n <ion-popover\n #actionMenuComponent\n side=\"bottom\"\n alignment=\"left\"\n [isOpen]=\"actionMenuOpen\"\n (didDismiss)=\"actionMenuOpen = false\"\n >\n <ng-template>\n <ion-content class=\"ion-padding\">\n <ion-list lines=\"none\">\n <ion-list-header>\n <h4\n class=\"dcf-text-capitalize\"\n [innerHTML]=\"'actions' | translate\"\n ></h4>\n </ion-list-header>\n @for (\n operation of [OperationKeys.UPDATE, OperationKeys.DELETE];\n track operation\n ) {\n @if (operations?.includes(operation)) {\n <ion-item\n [button]=\"true\"\n (click)=\"handleAction($event, operation, component)\"\n >\n <div slot=\"start\">\n @if (operation === OperationKeys.UPDATE) {\n <ngx-decaf-icon\n [button]=\"true\"\n slot=\"icon-only\"\n name=\"ti-edit\"\n />\n } @else {\n <ngx-decaf-icon\n [button]=\"true\"\n slot=\"icon-only\"\n color=\"danger\"\n name=\"ti-trash\"\n />\n }\n </div>\n <ion-label class=\"dcf-text-capitalize\">\n {{ operation | translate }}\n </ion-label>\n </ion-item>\n }\n }\n </ion-list>\n </ion-content>\n </ng-template>\n </ion-popover>\n } @else {\n <div class=\"dcf-grid-actions dcf-grid dcf-grid-small dcf-flex\">\n @for (\n operation of [OperationKeys.UPDATE, OperationKeys.DELETE];\n track operation\n ) {\n <div>\n @if (operations?.includes(operation)) {\n <ngx-decaf-icon\n (click)=\"handleAction($event, operation, component)\"\n fill=\"clear\"\n shape=\"round\"\n [attr.aria-label]=\"locale + '.operations.' + operation | translate\"\n [button]=\"true\"\n slot=\"icon-only\"\n [color]=\"operation === OperationKeys.UPDATE ? 'dark' : 'danger'\"\n [name]=\"operation === OperationKeys.UPDATE ? 'ti-edit' : 'ti-trash'\"\n />\n }\n </div>\n }\n </div>\n }\n </div>\n }\n @if (windowWidth > 639) {\n <div id=\"end\">\n <ng-content select=\"[slot='end']\"></ng-content>\n </div>\n }\n </div>\n </div>\n </div>\n </ion-item>\n @if (showSlideItems && uid) {\n <ion-item-options\n side=\"end\"\n (ionSwipe)=\"operations.length === 1 ? handleAction($event, operations[0], component) : ''\"\n >\n @if (operations?.includes(OperationKeys.UPDATE)) {\n <ion-item-option\n class=\"dcf-update\"\n (click)=\"handleAction($event, OperationKeys.UPDATE, component)\"\n [expandable]=\"operations.length === 1\"\n >\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"create-outline\" />\n </ion-item-option>\n }\n @if (operations?.includes(OperationKeys.DELETE)) {\n <ion-item-option\n class=\"dcf-delete\"\n (click)=\"handleAction($event, OperationKeys.DELETE, component)\"\n [expandable]=\"operations.length === 1\"\n >\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"trash\" />\n </ion-item-option>\n }\n </ion-item-options>\n }\n </ion-item-sliding>\n}\n", styles: ["ion-item:not(.dcf-palette-dark){--background-hover-opacity: .1;--background-focused-opacity: .1;--border-color: var(--dcf-color-gray-2)}ion-item:not(.dcf-palette-dark) .dcf-info{color:var(--dcf-color-gray-6)}ion-item:not(.dcf-palette-dark) .dcf-item-title{color:var(--dcf-color-gray-8)}ion-item:not(.dcf-palette-dark) .dcf-description{color:var(--dcf-color-gray-6)}ion-item:not(.dcf-palette-dark)>ion-button{color:var(--dcf-color-gray-7);--background: var(--dcf-color-gray-1) !important}ion-item:not(.dcf-palette-dark) ion-avatar{color:var(--dcf-color-gray-7);background:var(--dcf-color-gray-1)!important}ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete),ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update){background:rgba(var(--dcf-color-dark-rgb),.25)!important}ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete) .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete) ion-icon,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update) .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update) ion-icon{color:var(--dcf-color-gray-7)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete{background:rgba(var(--dcf-color-danger-rgb),.05)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete *,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete ion-icon{color:var(--dcf-color-danger)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update{background:rgba(var(--dcf-color-primary-rgb),.05)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update ion-icon{color:var(--dcf-color-primary)!important}ion-item.dcf-palette-dark{--background-hover-opacity: .25;--background-focused-opacity: .25;--border-color: var(--dcf-color-gray-6)}ion-item.dcf-palette-dark .dcf-description{color:var(--dcf-color-gray-4)}ion-item.dcf-palette-dark ion-button{color:var(--dcf-color-gray-1)!important;--background: var(--dcf-color-gray-7) !important}ion-item.dcf-palette-dark ion-avatar{color:var(--dcf-color-gray-1)!important;background:var(--dcf-background-color)!important}ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete),ion-item.dcf-palette-dark ion-item-option:not(.dcf-update){background:rgba(var(--dcf-color-dark-rgb),1)!important}ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete) .dcf-ti,ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete) ion-icon,ion-item.dcf-palette-dark ion-item-option:not(.dcf-update) .dcf-ti,ion-item.dcf-palette-dark ion-item-option:not(.dcf-update) ion-icon{color:var(--dcf-color-gray-2)!important}ion-item.dcf-palette-dark ion-item-option.dcf-delete{background:rgba(var(--dcf-color-danger-rgb),.05)!important}ion-item.dcf-palette-dark ion-item-option.dcf-delete .dcf-ti,ion-item.dcf-palette-dark ion-item-option.dcf-delete *,ion-item.dcf-palette-dark ion-item-option.dcf-delete ion-icon{color:var(--dcf-color-danger)!important}ion-item.dcf-palette-dark ion-item-option.dcf-update{background:rgba(var(--dcf-color-primary-rgb),.05)!important}ion-item.dcf-palette-dark ion-item-option.dcf-update .dcf-ti,ion-item.dcf-palette-dark ion-item-option.dcf-update ion-icon{color:var(--dcf-color-gray-2)!important}ion-item-sliding{box-sizing:border-box}ion-item-sliding[class*=active-slide]{border-color:var(--dcf-color-gray-3)}ion-item-sliding ion-item-option{color:var(--dcf-color-gray-5);box-shadow:inset 0 0 5px rgba(var(--dcf-color-dark-rgb),.15)!important;background:var(--dcf-color-gray-3)}ion-item{--min-height: 50px;--padding-top: .25rem;--padding-bottom: .25rem;--padding-start: .75rem;--padding-end: .75rem;--inner-padding-start: 0px !important;--inner-padding-end: 0px !important;--background-hover: var(--dcf-color-gray-8);--background-focused: var(--dcf-color-gray-8)}ion-item.item-lines-full{--padding-top: .5rem;--padding-bottom: .5rem;--padding-start: .25rem;-padding-end:.25rem;padding:0 .65rem}ion-item.item-lines-inset{--padding-top: 0rem !important;--padding-bottom: 0rem !important;--inner-padding-top: .5rem !important;--inner-padding-bottom: .65rem !important}ion-item .dcf-info{min-width:10vw;background:transparent!important}ion-item .dcf-grid{padding:0!important;margin:0!important;min-width:100%!important}ion-item .dcf-item-title{font-style:normal;font-weight:600;width:max-content!important}ion-item .dcf-description{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-weight:400;font-size:.925rem}ion-item::part(native){min-width:100%}ion-item [slot=start]{margin-right:.5rem!important}ion-item [slot=end]{margin-left:.5rem!important}ion-item .dcf-info{font-size:.9rem}ion-item .dcf-info .dcf-subinfo.dcf-line{margin-left:.5rem}@media (min-width: var(--dcf-width-sm)){ion-item .dcf-info .dcf-subinfo.dcf-line{display:block;margin-left:0}}ion-item #dcf-actions{padding:5px}@media (max-width: var(--dcf-width-m)){ion-item #dcf-actions{display:none;pointer-events:none!important;cursor:text!important}ion-item #dcf-actions *{display:none;pointer-events:none!important;cursor:text!important}}@media (max-width: var(--dcf-width-m)){ion-item #dcf-end,ion-item [slot=end]{display:none!important}}ion-item #dcf-end{padding-top:5px;display:flex;align-items:flex-end}ion-item .dcf-icon{display:flex;justify-content:center;align-items:center;text-align:center;margin-right:.5rem!important}ion-item .dcf-icon.dcf-grid-icon{min-width:50px;text-align:left;display:flex;justify-content:flex-start}@media (max-width: var(--dcf-width-s)){ion-item .dcf-icon{align-items:flex-start!important}}.dcf-icon-container{background:var(--dcf-color-gray-1);border-radius:50%;width:45px;height:45px;display:flex;justify-content:center;align-items:center}.dcf-icon-container ::ng-deep ion-icon{font-size:20px;transform:translateY(3px)!important}.dcf-icon-container ::ng-deep .ti{top:1px;left:1px}\n"], dependencies: [{ kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonListHeader, selector: "ion-list-header", inputs: ["color", "lines", "mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonItemSliding, selector: "ion-item-sliding", inputs: ["disabled"] }, { kind: "component", type: IonItemOptions, selector: "ion-item-options", inputs: ["side"] }, { kind: "component", type: IonItemOption, selector: "ion-item-option", inputs: ["color", "disabled", "download", "expandable", "href", "mode", "rel", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "component", type: IonPopover, selector: "ion-popover" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
12584
12542
|
};
|
|
12585
12543
|
ListItemComponent = __decorate([
|
|
12586
12544
|
Dynamic(),
|
|
@@ -12602,7 +12560,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
12602
12560
|
IonContent,
|
|
12603
12561
|
IconComponent,
|
|
12604
12562
|
IonPopover,
|
|
12605
|
-
], host: { '[attr.id]': 'uid' }, template: "\n@if (title || description) {\n <ion-item-sliding>\n <ion-item\n [id]=\"uid\"\n [lines]=\"lines\"\n [button]=\"!operations?.length ? false : button\"\n [class]=\"className\"\n (click)=\"operations?.includes(OperationKeys.READ) ? handleAction(OperationKeys.READ, $event, component) : ''\"\n #component\n >\n @if (icon && lines !== 'inset') {\n <div class=\"dcf-icon-container dcf-width-auto\" [slot]=\"iconSlot\">\n <ngx-decaf-icon slot=\"icon-only\" [name]=\"icon\" />\n </div>\n }\n <div class=\"dcf-width-expand\">\n <div class=\"dcf-flex dcf-flex-middle dcf-grid-collapse\" dcf-grid>\n @if (icon && lines === 'inset') {\n <div class=\"dcf-icon\" [slot]=\"iconSlot\">\n <ion-avatar>\n <ion-icon aria-hidden=\"true\" name=\"reader-outline\" size=\"default\" />\n </ion-avatar>\n </div>\n }\n <div class=\"dcf-width-expand@s dcf-width-1-1 dcf-label\">\n @if (title) {\n <ion-label class=\"dcf-item-title\">\n {{ title | translate }}\n </ion-label>\n }\n @if (description) {\n <div class=\"dcf-description\" [innerHTML]=\"description\"></div>\n }\n </div>\n @if (info || subinfo) {\n <div class=\"dcf-width-auto@s dcf-width-expand dcf-info dcf-flex dcf-flex-right@s\">\n <div>\n @if (info) {\n <span [innerHTML]=\"info\"></span>\n }\n @if (subinfo) {\n <div class=\"dcf-subinfo dcf-text-truncate\" [innerHTML]=\"subinfo\" ></div>\n }\n </div>\n </div>\n }\n\n <div class=\"dcf-width-auto dcf-flex dcf-flex-middle dcf-flex-right\">\n @if ((operations?.includes(OperationKeys.DELETE) || operations?.includes(OperationKeys.UPDATE)) && uid) {\n <div class=\"dcf-visible@s\" id=\"dcf-actions\">\n @if(actionsType === 'popover') {\n <ion-button shape=\"round\" fill=\"clear\" color=\"primary\" (click)=\"presentActionsMenu($event)\" [attr.aria-label]=\"locale+'.actions' | translate\">\n <ion-icon slot=\"icon-only\" aria-hidden=\"true\" name=\"ellipsis-vertical-outline\" />\n </ion-button>\n <ion-popover\n #actionMenuComponent\n side=\"bottom\"\n alignment=\"left\"\n [isOpen]=\"actionMenuOpen\"\n (didDismiss)=\"actionMenuOpen = false\">\n <ng-template>\n <ion-content class=\"ion-padding\">\n <ion-list lines=\"none\">\n <ion-list-header>\n <h4 class=\"dcf-text-capitalize\" [innerHTML]=\"'actions' | translate\"></h4>\n </ion-list-header>\n @for (operation of [OperationKeys.UPDATE, OperationKeys.DELETE]; track operation) {\n @if (operations?.includes(operation)) {\n <ion-item [button]=\"true\" (click)=\"handleAction(operation, $event, component)\">\n <div slot=\"start\">\n @if (operation === OperationKeys.UPDATE) {\n <ngx-decaf-icon [button]=\"true\" slot=\"icon-only\" name=\"ti-edit\" />\n } @else {\n <ngx-decaf-icon [button]=\"true\" slot=\"icon-only\" color=\"danger\" name=\"ti-trash\" />\n }\n </div>\n <ion-label class=\"dcf-text-capitalize\">{{ operation | translate }}</ion-label>\n </ion-item>\n }\n }\n </ion-list>\n </ion-content>\n </ng-template>\n </ion-popover>\n } @else {\n <div class=\"dcf-grid-actions dcf-grid dcf-grid-small dcf-flex \">\n @for (operation of [OperationKeys.UPDATE, OperationKeys.DELETE]; track operation) {\n <div>\n @if (operations?.includes(operation)) {\n <ngx-decaf-icon\n (click)=\"handleAction(operation, $event, component)\"\n fill=\"clear\" shape=\"round\"\n [attr.aria-label]=\"(locale +'.operations.' + operation) | translate\"\n [button]=\"true\"\n slot=\"icon-only\"\n [color]=\"operation === OperationKeys.UPDATE ? 'dark' : 'danger'\"\n [name]=\"operation === OperationKeys.UPDATE ? 'ti-edit' : 'ti-trash'\"\n />\n\n }\n </div>\n }\n </div>\n }\n\n </div>\n }\n @if (windowWidth > 639) {\n <div id=\"end\">\n <ng-content select=\"[slot='end']\"></ng-content>\n </div>\n }\n </div>\n </div>\n </div>\n </ion-item>\n @if (showSlideItems && uid) {\n <ion-item-options side=\"end\" (ionSwipe)=\"operations.length === 1 ? handleAction(operations[0], $event, component) : ''\">\n @if (operations?.includes(OperationKeys.UPDATE)) {\n <ion-item-option class=\"dcf-update\" (click)=\"handleAction(OperationKeys.UPDATE, $event, component)\" [expandable]=\"operations.length === 1\">\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"create-outline\" />\n </ion-item-option>\n }\n @if (operations?.includes(OperationKeys.DELETE)) {\n <ion-item-option class=\"dcf-delete\" (click)=\"handleAction(OperationKeys.DELETE, $event, component)\" [expandable]=\"operations.length === 1\">\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"trash\" />\n </ion-item-option>\n }\n </ion-item-options>\n }\n </ion-item-sliding>\n}\n", styles: ["ion-item:not(.dcf-palette-dark){--background-hover-opacity: .1;--background-focused-opacity: .1;--border-color: var(--dcf-color-gray-2)}ion-item:not(.dcf-palette-dark) .dcf-info{color:var(--dcf-color-gray-6)}ion-item:not(.dcf-palette-dark) .dcf-item-title{color:var(--dcf-color-gray-8)}ion-item:not(.dcf-palette-dark) .dcf-description{color:var(--dcf-color-gray-6)}ion-item:not(.dcf-palette-dark)>ion-button{color:var(--dcf-color-gray-7);--background: var(--dcf-color-gray-1) !important}ion-item:not(.dcf-palette-dark) ion-avatar{color:var(--dcf-color-gray-7);background:var(--dcf-color-gray-1)!important}ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete),ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update){background:rgba(var(--dcf-color-dark-rgb),.25)!important}ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete) .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete) ion-icon,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update) .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update) ion-icon{color:var(--dcf-color-gray-7)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete{background:rgba(var(--dcf-color-danger-rgb),.05)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete *,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete ion-icon{color:var(--dcf-color-danger)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update{background:rgba(var(--dcf-color-primary-rgb),.05)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update ion-icon{color:var(--dcf-color-primary)!important}ion-item.dcf-palette-dark{--background-hover-opacity: .25;--background-focused-opacity: .25;--border-color: var(--dcf-color-gray-6)}ion-item.dcf-palette-dark .dcf-description{color:var(--dcf-color-gray-4)}ion-item.dcf-palette-dark ion-button{color:var(--dcf-color-gray-1)!important;--background: var(--dcf-color-gray-7) !important}ion-item.dcf-palette-dark ion-avatar{color:var(--dcf-color-gray-1)!important;background:var(--dcf-background-color)!important}ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete),ion-item.dcf-palette-dark ion-item-option:not(.dcf-update){background:rgba(var(--dcf-color-dark-rgb),1)!important}ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete) .dcf-ti,ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete) ion-icon,ion-item.dcf-palette-dark ion-item-option:not(.dcf-update) .dcf-ti,ion-item.dcf-palette-dark ion-item-option:not(.dcf-update) ion-icon{color:var(--dcf-color-gray-2)!important}ion-item.dcf-palette-dark ion-item-option.dcf-delete{background:rgba(var(--dcf-color-danger-rgb),.05)!important}ion-item.dcf-palette-dark ion-item-option.dcf-delete .dcf-ti,ion-item.dcf-palette-dark ion-item-option.dcf-delete *,ion-item.dcf-palette-dark ion-item-option.dcf-delete ion-icon{color:var(--dcf-color-danger)!important}ion-item.dcf-palette-dark ion-item-option.dcf-update{background:rgba(var(--dcf-color-primary-rgb),.05)!important}ion-item.dcf-palette-dark ion-item-option.dcf-update .dcf-ti,ion-item.dcf-palette-dark ion-item-option.dcf-update ion-icon{color:var(--dcf-color-gray-2)!important}ion-item-sliding{box-sizing:border-box}ion-item-sliding[class*=active-slide]{border-color:var(--dcf-color-gray-3)}ion-item-sliding ion-item-option{color:var(--dcf-color-gray-5);box-shadow:inset 0 0 5px rgba(var(--dcf-color-dark-rgb),.15)!important;background:var(--dcf-color-gray-3)}ion-item{--min-height: 50px;--padding-top: .25rem;--padding-bottom: .25rem;--padding-start: .75rem;--padding-end: .75rem;--inner-padding-start: 0px !important;--inner-padding-end: 0px !important;--background-hover: var(--dcf-color-gray-8);--background-focused: var(--dcf-color-gray-8)}ion-item.item-lines-full{--padding-top: .5rem;--padding-bottom: .5rem;--padding-start: .25rem;-padding-end:.25rem;padding:0 .65rem}ion-item.item-lines-inset{--padding-top: 0rem !important;--padding-bottom: 0rem !important;--inner-padding-top: .5rem !important;--inner-padding-bottom: .65rem !important}ion-item .dcf-info{min-width:10vw;background:transparent!important}ion-item .dcf-grid{padding:0!important;margin:0!important;min-width:100%!important}ion-item .dcf-item-title{font-style:normal;font-weight:600;width:max-content!important}ion-item .dcf-description{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-weight:400;font-size:.925rem}ion-item::part(native){min-width:100%}ion-item [slot=start]{margin-right:.5rem!important}ion-item [slot=end]{margin-left:.5rem!important}ion-item .dcf-info{font-size:.9rem}ion-item .dcf-info .dcf-subinfo.dcf-line{margin-left:.5rem}@media (min-width: var(--dcf-width-sm)){ion-item .dcf-info .dcf-subinfo.dcf-line{display:block;margin-left:0}}ion-item #dcf-actions{padding:5px}@media (max-width: var(--dcf-width-m)){ion-item #dcf-actions{display:none;pointer-events:none!important;cursor:text!important}ion-item #dcf-actions *{display:none;pointer-events:none!important;cursor:text!important}}@media (max-width: var(--dcf-width-m)){ion-item #dcf-end,ion-item [slot=end]{display:none!important}}ion-item #dcf-end{padding-top:5px;display:flex;align-items:flex-end}ion-item .dcf-icon{display:flex;justify-content:center;align-items:center;text-align:center;margin-right:.5rem!important}ion-item .dcf-icon.dcf-grid-icon{min-width:50px;text-align:left;display:flex;justify-content:flex-start}@media (max-width: var(--dcf-width-s)){ion-item .dcf-icon{align-items:flex-start!important}}.dcf-icon-container{background:var(--dcf-color-gray-1);border-radius:50%;width:45px;height:45px;display:flex;justify-content:center;align-items:center}.dcf-icon-container ::ng-deep ion-icon{font-size:20px;transform:translateY(3px)!important}.dcf-icon-container ::ng-deep .ti{top:1px;left:1px}\n"] }]
|
|
12563
|
+
], host: { '[attr.id]': 'uid' }, template: "@if (title || description) {\n <ion-item-sliding>\n <ion-item\n [id]=\"uid\"\n [lines]=\"lines\"\n [button]=\"!operations?.length ? false : button\"\n [class]=\"className\"\n (click)=\"\n operations?.includes(OperationKeys.READ)\n ? handleAction($event, OperationKeys.READ, component)\n : ''\n \"\n #component\n >\n @if (icon && lines !== 'inset') {\n <div class=\"dcf-icon-container dcf-width-auto\" [slot]=\"iconSlot\">\n <ngx-decaf-icon slot=\"icon-only\" [name]=\"icon\" />\n </div>\n }\n <div class=\"dcf-width-expand\">\n <div class=\"dcf-flex dcf-flex-middle dcf-grid-collapse\" dcf-grid>\n @if (icon && lines === 'inset') {\n <div class=\"dcf-icon\" [slot]=\"iconSlot\">\n <ion-avatar>\n <ion-icon aria-hidden=\"true\" name=\"reader-outline\" size=\"default\" />\n </ion-avatar>\n </div>\n }\n <div class=\"dcf-width-expand@s dcf-width-1-1 dcf-label\">\n @if (title) {\n <ion-label class=\"dcf-item-title\">\n {{ title | translate }}\n </ion-label>\n }\n @if (description) {\n <div class=\"dcf-description\" [innerHTML]=\"description\"></div>\n }\n </div>\n @if (info || subinfo) {\n <div class=\"dcf-width-auto@s dcf-width-expand dcf-info dcf-flex dcf-flex-right@s\">\n <div>\n @if (info) {\n <span [innerHTML]=\"info\"></span>\n }\n @if (subinfo) {\n <div class=\"dcf-subinfo dcf-text-truncate\" [innerHTML]=\"subinfo\"></div>\n }\n </div>\n </div>\n }\n\n <div class=\"dcf-width-auto dcf-flex dcf-flex-middle dcf-flex-right\">\n @if (\n (operations?.includes(OperationKeys.DELETE) ||\n operations?.includes(OperationKeys.UPDATE)) &&\n uid\n ) {\n <div class=\"dcf-visible@s\" id=\"dcf-actions\">\n @if (actionsType === 'popover') {\n <ion-button\n shape=\"round\"\n fill=\"clear\"\n color=\"primary\"\n (click)=\"presentActionsMenu($event)\"\n [attr.aria-label]=\"locale + '.actions' | translate\"\n >\n <ion-icon\n slot=\"icon-only\"\n aria-hidden=\"true\"\n name=\"ellipsis-vertical-outline\"\n />\n </ion-button>\n <ion-popover\n #actionMenuComponent\n side=\"bottom\"\n alignment=\"left\"\n [isOpen]=\"actionMenuOpen\"\n (didDismiss)=\"actionMenuOpen = false\"\n >\n <ng-template>\n <ion-content class=\"ion-padding\">\n <ion-list lines=\"none\">\n <ion-list-header>\n <h4\n class=\"dcf-text-capitalize\"\n [innerHTML]=\"'actions' | translate\"\n ></h4>\n </ion-list-header>\n @for (\n operation of [OperationKeys.UPDATE, OperationKeys.DELETE];\n track operation\n ) {\n @if (operations?.includes(operation)) {\n <ion-item\n [button]=\"true\"\n (click)=\"handleAction($event, operation, component)\"\n >\n <div slot=\"start\">\n @if (operation === OperationKeys.UPDATE) {\n <ngx-decaf-icon\n [button]=\"true\"\n slot=\"icon-only\"\n name=\"ti-edit\"\n />\n } @else {\n <ngx-decaf-icon\n [button]=\"true\"\n slot=\"icon-only\"\n color=\"danger\"\n name=\"ti-trash\"\n />\n }\n </div>\n <ion-label class=\"dcf-text-capitalize\">\n {{ operation | translate }}\n </ion-label>\n </ion-item>\n }\n }\n </ion-list>\n </ion-content>\n </ng-template>\n </ion-popover>\n } @else {\n <div class=\"dcf-grid-actions dcf-grid dcf-grid-small dcf-flex\">\n @for (\n operation of [OperationKeys.UPDATE, OperationKeys.DELETE];\n track operation\n ) {\n <div>\n @if (operations?.includes(operation)) {\n <ngx-decaf-icon\n (click)=\"handleAction($event, operation, component)\"\n fill=\"clear\"\n shape=\"round\"\n [attr.aria-label]=\"locale + '.operations.' + operation | translate\"\n [button]=\"true\"\n slot=\"icon-only\"\n [color]=\"operation === OperationKeys.UPDATE ? 'dark' : 'danger'\"\n [name]=\"operation === OperationKeys.UPDATE ? 'ti-edit' : 'ti-trash'\"\n />\n }\n </div>\n }\n </div>\n }\n </div>\n }\n @if (windowWidth > 639) {\n <div id=\"end\">\n <ng-content select=\"[slot='end']\"></ng-content>\n </div>\n }\n </div>\n </div>\n </div>\n </ion-item>\n @if (showSlideItems && uid) {\n <ion-item-options\n side=\"end\"\n (ionSwipe)=\"operations.length === 1 ? handleAction($event, operations[0], component) : ''\"\n >\n @if (operations?.includes(OperationKeys.UPDATE)) {\n <ion-item-option\n class=\"dcf-update\"\n (click)=\"handleAction($event, OperationKeys.UPDATE, component)\"\n [expandable]=\"operations.length === 1\"\n >\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"create-outline\" />\n </ion-item-option>\n }\n @if (operations?.includes(OperationKeys.DELETE)) {\n <ion-item-option\n class=\"dcf-delete\"\n (click)=\"handleAction($event, OperationKeys.DELETE, component)\"\n [expandable]=\"operations.length === 1\"\n >\n <ion-icon aria-hidden=\"true\" slot=\"icon-only\" name=\"trash\" />\n </ion-item-option>\n }\n </ion-item-options>\n }\n </ion-item-sliding>\n}\n", styles: ["ion-item:not(.dcf-palette-dark){--background-hover-opacity: .1;--background-focused-opacity: .1;--border-color: var(--dcf-color-gray-2)}ion-item:not(.dcf-palette-dark) .dcf-info{color:var(--dcf-color-gray-6)}ion-item:not(.dcf-palette-dark) .dcf-item-title{color:var(--dcf-color-gray-8)}ion-item:not(.dcf-palette-dark) .dcf-description{color:var(--dcf-color-gray-6)}ion-item:not(.dcf-palette-dark)>ion-button{color:var(--dcf-color-gray-7);--background: var(--dcf-color-gray-1) !important}ion-item:not(.dcf-palette-dark) ion-avatar{color:var(--dcf-color-gray-7);background:var(--dcf-color-gray-1)!important}ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete),ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update){background:rgba(var(--dcf-color-dark-rgb),.25)!important}ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete) .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-delete) ion-icon,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update) .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option:not(.dcf-update) ion-icon{color:var(--dcf-color-gray-7)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete{background:rgba(var(--dcf-color-danger-rgb),.05)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete *,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-delete ion-icon{color:var(--dcf-color-danger)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update{background:rgba(var(--dcf-color-primary-rgb),.05)!important}ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update .dcf-ti,ion-item:not(.dcf-palette-dark) ion-item-option.dcf-update ion-icon{color:var(--dcf-color-primary)!important}ion-item.dcf-palette-dark{--background-hover-opacity: .25;--background-focused-opacity: .25;--border-color: var(--dcf-color-gray-6)}ion-item.dcf-palette-dark .dcf-description{color:var(--dcf-color-gray-4)}ion-item.dcf-palette-dark ion-button{color:var(--dcf-color-gray-1)!important;--background: var(--dcf-color-gray-7) !important}ion-item.dcf-palette-dark ion-avatar{color:var(--dcf-color-gray-1)!important;background:var(--dcf-background-color)!important}ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete),ion-item.dcf-palette-dark ion-item-option:not(.dcf-update){background:rgba(var(--dcf-color-dark-rgb),1)!important}ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete) .dcf-ti,ion-item.dcf-palette-dark ion-item-option:not(.dcf-delete) ion-icon,ion-item.dcf-palette-dark ion-item-option:not(.dcf-update) .dcf-ti,ion-item.dcf-palette-dark ion-item-option:not(.dcf-update) ion-icon{color:var(--dcf-color-gray-2)!important}ion-item.dcf-palette-dark ion-item-option.dcf-delete{background:rgba(var(--dcf-color-danger-rgb),.05)!important}ion-item.dcf-palette-dark ion-item-option.dcf-delete .dcf-ti,ion-item.dcf-palette-dark ion-item-option.dcf-delete *,ion-item.dcf-palette-dark ion-item-option.dcf-delete ion-icon{color:var(--dcf-color-danger)!important}ion-item.dcf-palette-dark ion-item-option.dcf-update{background:rgba(var(--dcf-color-primary-rgb),.05)!important}ion-item.dcf-palette-dark ion-item-option.dcf-update .dcf-ti,ion-item.dcf-palette-dark ion-item-option.dcf-update ion-icon{color:var(--dcf-color-gray-2)!important}ion-item-sliding{box-sizing:border-box}ion-item-sliding[class*=active-slide]{border-color:var(--dcf-color-gray-3)}ion-item-sliding ion-item-option{color:var(--dcf-color-gray-5);box-shadow:inset 0 0 5px rgba(var(--dcf-color-dark-rgb),.15)!important;background:var(--dcf-color-gray-3)}ion-item{--min-height: 50px;--padding-top: .25rem;--padding-bottom: .25rem;--padding-start: .75rem;--padding-end: .75rem;--inner-padding-start: 0px !important;--inner-padding-end: 0px !important;--background-hover: var(--dcf-color-gray-8);--background-focused: var(--dcf-color-gray-8)}ion-item.item-lines-full{--padding-top: .5rem;--padding-bottom: .5rem;--padding-start: .25rem;-padding-end:.25rem;padding:0 .65rem}ion-item.item-lines-inset{--padding-top: 0rem !important;--padding-bottom: 0rem !important;--inner-padding-top: .5rem !important;--inner-padding-bottom: .65rem !important}ion-item .dcf-info{min-width:10vw;background:transparent!important}ion-item .dcf-grid{padding:0!important;margin:0!important;min-width:100%!important}ion-item .dcf-item-title{font-style:normal;font-weight:600;width:max-content!important}ion-item .dcf-description{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-weight:400;font-size:.925rem}ion-item::part(native){min-width:100%}ion-item [slot=start]{margin-right:.5rem!important}ion-item [slot=end]{margin-left:.5rem!important}ion-item .dcf-info{font-size:.9rem}ion-item .dcf-info .dcf-subinfo.dcf-line{margin-left:.5rem}@media (min-width: var(--dcf-width-sm)){ion-item .dcf-info .dcf-subinfo.dcf-line{display:block;margin-left:0}}ion-item #dcf-actions{padding:5px}@media (max-width: var(--dcf-width-m)){ion-item #dcf-actions{display:none;pointer-events:none!important;cursor:text!important}ion-item #dcf-actions *{display:none;pointer-events:none!important;cursor:text!important}}@media (max-width: var(--dcf-width-m)){ion-item #dcf-end,ion-item [slot=end]{display:none!important}}ion-item #dcf-end{padding-top:5px;display:flex;align-items:flex-end}ion-item .dcf-icon{display:flex;justify-content:center;align-items:center;text-align:center;margin-right:.5rem!important}ion-item .dcf-icon.dcf-grid-icon{min-width:50px;text-align:left;display:flex;justify-content:flex-start}@media (max-width: var(--dcf-width-s)){ion-item .dcf-icon{align-items:flex-start!important}}.dcf-icon-container{background:var(--dcf-color-gray-1);border-radius:50%;width:45px;height:45px;display:flex;justify-content:center;align-items:center}.dcf-icon-container ::ng-deep ion-icon{font-size:20px;transform:translateY(3px)!important}.dcf-icon-container ::ng-deep .ti{top:1px;left:1px}\n"] }]
|
|
12606
12564
|
}], ctorParameters: () => [], propDecorators: { component: [{
|
|
12607
12565
|
type: ViewChild,
|
|
12608
12566
|
args: ['component', { read: ElementRef, static: false }]
|
|
@@ -12798,8 +12756,7 @@ let SteppedFormComponent = class SteppedFormComponent extends NgxFormDirective {
|
|
|
12798
12756
|
this.pages = this.pageTitles.length;
|
|
12799
12757
|
if (this.paginated) {
|
|
12800
12758
|
if (!this.parentForm)
|
|
12801
|
-
this.parentForm = (this.formGroup?.root ||
|
|
12802
|
-
this.formGroup);
|
|
12759
|
+
this.parentForm = (this.formGroup?.root || this.formGroup);
|
|
12803
12760
|
this.children = [
|
|
12804
12761
|
...this.children.map((c) => {
|
|
12805
12762
|
if (!c.props)
|
|
@@ -13496,7 +13453,7 @@ let FileUploadComponent = class FileUploadComponent extends NgxFormFieldDirectiv
|
|
|
13496
13453
|
})));
|
|
13497
13454
|
}
|
|
13498
13455
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13499
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FileUploadComponent, isStandalone: true, selector: "ngx-decaf-file-upload", inputs: { formGroup: "formGroup", name: "name", formControl: "formControl", required: "required", multiple: "multiple", type: "type", label: "label", buttonLabel: "buttonLabel", size: "size", position: "position", accept: "accept", showIcon: "showIcon", enableDirectoryMode: "enableDirectoryMode", previewHandler: "previewHandler", maxFileSize: "maxFileSize" }, outputs: { changeEvent: "changeEvent" }, viewQueries: [{ propertyName: "component", first: true, predicate: ["component"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"decaf-file-component\" #component>\n <input\n id=\"dcf-file-input\"\n type=\"file\"\n placeholder=\"Select files\"\n [attr.accept]=\"accept\"\n [attr.multiple]=\"multiple ? true : null\"\n (change)=\"handleSelection($event)\"\n [multiple]=\"multiple\"\n hidden\n [attr.webkitdirectory]=\"enableDirectoryMode ? true : null\"\n />\n\n <ngx-decaf-card [className]=\"className\" [body]=\"'blank'\">\n @if(['create', 'update'].includes(operation)) {\n <div>\n <div\n [class]=\"\n 'dcf-drop-area '\n + ' dcf-' + size\n + ' dcf-flex dcf-flex-' + position\n + ' dcf-text-' + position\n \"\n\n [class.dcf-dragging]=\"dragging\"\n [class.dcf-has-files]=\"files.length\"\n (drop)=\"!files?.length ? handleDrop($event) : dragging = false\"\n (dragover)=\"!files?.length ? handleDragOver($event) : dragging = false\"\n (dragleave)=\"!files?.length ? handleDragLeave($event) : dragging = false\"\n >\n <div>\n @if (!previewFile) {\n @if(showIcon) {\n <ngx-decaf-icon name=\"cloud-upload-outline\" size=\"large\" />\n }\n <p class=\"dcf-drag-description\">{{ label ? (label | translate) : (locale + \".drag_file\" | translate) }}</p>\n <ion-button class=\"dcf-button-select\" (click)=\"handleClickToSelect()\" size=\"small\">\n {{ buttonLabel ? (buttonLabel | translate) : (locale + (enableDirectoryMode ? \".buttons.select_directory\" : \".buttons.select\") | translate) }}\n </ion-button>\n <div #container>\n <span class=\"dcf-error\" [innerHTML]=\"getErrors(container)\"></span>\n </div>\n } @else {\n @if ((!directoryMode && !multiple) ) {\n <div class=\"dcf-preview dcf-grid dcf-grid-match dcf-grid-collapse\">\n <div class=\"dcf-width-1-4@m dcf-width-1-3@s dcf-flex dcf-flex-center dcf-flex-middle\">\n <div class=\"dcf-preview-image\">\n <ion-img\n [src]=\"previewFile\"\n [title]=\"locale + '.preview' | translate\"\n [alt]=\"locale + '.preview' | translate\"\n />\n <div class=\"dcf-overlay\">\n <ion-button (click)=\"preview(previewFile)\" fill=\"clear\" color=\"light\" size=\"small\">\n {{ locale + \".buttons.preview\" | translate }}\n </ion-button>\n </div>\n </div>\n </div>\n <div class=\"description dcf-flex dcf-flex-middle dcf-width-expand@s\">\n <div>\n <p class=\"dcf-title\">{{ locale + \".preview\" | translate }}</p>\n <p class=\"subtitle\">{{ files[0].name }}</p>\n <ion-button (click)=\"handleClear()\" fill=\"clear\" color=\"danger\" size=\"small\">{{ locale + \".buttons.clear\" | translate }} </ion-button>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"dcf-margin-bottom\">\n {{ locale + \".selection\" | translate: { \"0\": files.length > 10 ? files.length : `0${files.length}` } }}\n @if(errors.length > 0) {\n <br /><span class=\"dcf-error-message\">{{ locale + \".selection_error\" | translate: { \"0\": errors.length > 10 ? errors.length : `0${errors.length}` } }}</span>\n }\n </div>\n <div class=\"dcf-preview-list-container\">\n <ion-list class=\"dcf-preview-list\">\n @for (file of errors; track $index) {\n <ion-item lines=\"full\" class=\"dcf-error-item\">\n <ion-label slot=\"start\">{{ file.name }}</ion-label>\n <div class=\"dcf-error-message\" slot=\"end\">\n {{ locale + \".errors.\" + file.error | translate: { \"0\": file.error === 'max_size' ? maxFileSize / 1024 / 1024 : file.name.split(\".\") } }}\n </div>\n <ion-note slot=\"end\">{{ file.size / 1024 / 1024 | number: \"1.1-1\" }} MB</ion-note>\n </ion-item>\n }\n\n @for (file of files; track $index) {\n <ion-item lines=\"full\">\n <ion-label slot=\"start\">{{ file.name }}</ion-label>\n <ion-note slot=\"end\">{{ file.size / 1024 / 1024 | number: \"1.1-1\" }} MB</ion-note>\n <div class=\"dcf-flex dcf-flex-middle\" slot=\"end\">\n <ngx-decaf-icon\n [button]=\"true\"\n [slot]=\"'icon-only'\"\n (click)=\"preview(file?.source || file, file.type)\"\n [name]=\"file.type.includes('image') ? 'image-outline' : 'document-text-outline'\"\n />\n <ngx-decaf-icon\n [button]=\"true\"\n [slot]=\"'icon-only'\"\n [name]=\"'trash-outline'\"\n (click)=\"removeFile($index)\"\n [color]=\"'danger'\"\n [size]=\"'small'\"\n />\n </div>\n </ion-item>\n }\n </ion-list>\n </div>\n }\n }\n </div>\n </div>\n </div>\n } @else {\n <div [class]=\"(files?.length > 1 ? 'dcf-preview-list-container' : '')\">\n @if(!files?.length) {\n <div class=\"dcf-padding-xsmall\">\n <ion-text>{{ locale + '.empty' | translate }}</ion-text>\n </div>\n } @else {\n @if(files?.length === 1 && isImageFile(files[0])) {\n <div class=\"dcf-preview dcf-grid dcf-grid-match dcf-grid-collapse read\">\n <div class=\"dcf-width-1-4@m dcf-width-1-3@s dcf-flex dcf-flex-center dcf-flex-middle\">\n <div class=\"dcf-preview-image\">\n <ion-img\n [src]=\"previewFile\"\n [title]=\"locale + '.preview' | translate\"\n [alt]=\"locale + '.preview' | translate\"\n />\n <div class=\"dcf-overlay\">\n <ion-button (click)=\"preview(previewFile)\" fill=\"clear\" color=\"light\" size=\"small\">\n {{ locale + \".buttons.preview\" | translate }}\n </ion-button>\n </div>\n </div>\n </div>\n <div class=\"description dcf-flex dcf-flex-middle dcf-width-expand@s\">\n <div>\n <p class=\"dcf-title\">{{ locale + \".preview\" | translate }}</p>\n <p class=\"subtitle\">{{ files[0].name }}</p>\n </div>\n </div>\n </div>\n } @else {\n <ion-list class=\"dcf-preview-list\">\n @for (file of files; track $index) {\n <ion-item lines=\"full\">\n @if(file?.name) {\n <ion-label slot=\"start\">{{ file.name }}</ion-label>\n }\n <div class=\"dcf-flex dcf-flex-middle\" slot=\"end\">\n <ngx-decaf-icon\n [button]=\"true\"\n [slot]=\"'icon-only'\"\n (click)=\"preview(file.source, file.type)\"\n [name]=\"file.type.includes('image') ? 'image-outline' : 'document-text-outline'\"\n />\n </div>\n </ion-item>\n }\n </ion-list>\n }\n }\n </div>\n }\n </ngx-decaf-card>\n</div>\n\n<!-- <ion-card-header>\n <ion-card-title>Upload de Imagem</ion-card-title>\n </ion-card-header>\n\n <ion-card-content>\n <div\n class=\"dcf-drop-area\"\n [class.dragging]=\"dragging\"\n (drop)=\"onDrop($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n >\n <div class=\"dcf-drop-content\">\n <ion-icon name=\"cloud-upload-outline\" size=\"large\"></ion-icon>\n <p>Arraste e solte aqui ou</p>\n <ion-button size=\"small\" fill=\"outline\" (click)=\"triggerFileSelect()\">Selecionar arquivo</ion-button>\n </div>\n </div>\n\n <input\n #fileInput\n type=\"file\"\n [attr.accept]=\"accept\"\n [attr.multiple]=\"multiple ? true : null\"\n (change)=\"onFileSelected($event)\"\n hidden\n />\n\n <div *ngIf=\"previewUrl\" class=\"dcf-preview\">\n <ion-item>\n <div slot=\"start\">\n <ion-img [src]=\"previewUrl\"></ion-img>\n </div>\n <ion-label>\n <h3>Pr\u00E9-visualiza\u00E7\u00E3o</h3>\n <p *ngIf=\"files.length\">{{ files[0].name }}</p>\n </ion-label>\n </ion-item>\n </div>\n\n <ion-list *ngIf=\"files.length\">\n <ion-list-header>\n <ion-label>Arquivos selecionados</ion-label>\n </ion-list-header>\n <ion-item *ngFor=\"let f of files; let i = index\">\n <ion-label>{{ f.name }}</ion-label>\n <ion-note slot=\"end\">{{ (f.size / 1024 / 1024) | number:'1.1-1' }} MB</ion-note>\n <ion-button fill=\"clear\" slot=\"end\" (click)=\"removeFile(i)\">\n <ion-icon slot=\"icon-only\" name=\"close-circle\"></ion-icon>\n </ion-button>\n </ion-item>\n </ion-list>\n\n <div *ngIf=\"errors.length\">\n <ion-list>\n <ion-item *ngFor=\"let err of errors\">\n <ion-icon name=\"alert-circle\" slot=\"start\" color=\"danger\"></ion-icon>\n <ion-label color=\"danger\">{{ err }}</ion-label>\n </ion-item>\n </ion-list>\n </div>\n\n <ion-row class=\"dcf-actions\">\n <ion-col>\n <ion-button expand=\"block\" (click)=\"triggerFileSelect()\">Selecionar</ion-button>\n </ion-col>\n <ion-col>\n <ion-button expand=\"block\" color=\"danger\" fill=\"outline\" (click)=\"clear()\">Limpar</ion-button>\n </ion-col>\n </ion-row>\n </ion-card-content> -->\n", styles: [".decaf-file-component.dcf-palette-dark .dcf-button-select{--background: rgb(var(--dcf-color-light-rgb), .1) !important;--background-hover: rgb(var(--dcf-color-light-rgb), .75) !important;--background-activated: rgb(var(--dcf-color-light-rgb), .4) !important;--background-focused: rgb(var(--dcf-color-light-rgb), .4) !important;--color: var(--dcf-color-light) !important}.decaf-file-component.dcf-palette-dark .dcf-has-files{border-style:solid;border-color:var(--dcf-color-gray-6)!important}.decaf-file-component .dcf-upload-icon{--box-shadow: none !important}.decaf-file-component .dcf-upload-icon ion-icon{width:1.5rem!important}.decaf-file-component ion-button.dcf-button-select{--background: rgb(var(--dcf-color-primary-rgb), .1);--background-hover: rgb(var(--dcf-color-primary-rgb), .75);--background-activated: rgb(var(--dcf-color-primary-rgb), .4);--background-focused: rgb(var(--dcf-color-primary-rgb), .4);--color: var(--dcf-color-primary-shade);--border-radius: var(--dcf-border-radius-small);--box-shadow: none;--padding-top: var(--dcf-padding-xsmall);--padding-bottom: var(--dcf-padding-xsmall);--padding-start: var(--dcf-padding-small);--padding-end: var(--dcf-padding-small);font-weight:500;text-transform:none;margin-top:var(--dcf-margin-small)!important}.decaf-file-component .dcf-error{color:var(--dcf-color-danger)!important;font-size:.8rem!important;font-weight:500!important;line-height:1.1rem;z-index:9999;animation-duration:.05s;animation-timing-function:ease-in;animation-fill-mode:both;animation-name:fadeBottomSmallAnimation}.decaf-file-component .dcf-error .ti,.decaf-file-component .dcf-error ion-icon{position:relative;top:2px!important;min-width:20px;font-size:1rem!important;text-align:left}.decaf-file-component ion-card-content{width:100%}.decaf-file-component .dcf-error-message{color:var(--dcf-color-danger);font-size:.875rem}.decaf-file-component .dcf-drag-description{font-size:1rem;line-height:1.5rem;font-weight:500;margin-bottom:var(--dcf-margin-small)}.decaf-file-component .dcf-drop-area{display:flex;align-items:center;border:1.5px dashed var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small)!important;transition:border-style .15s ease,border-color .15s ease;background:transparent}.decaf-file-component .dcf-drop-area.dcf-large{min-height:180px}.decaf-file-component .dcf-drop-area>div{width:100%}.decaf-file-component .dcf-drop-area.dcf-has-files{border-style:solid;border-color:var(--dcf-color-primary-shade);transition:border-style .15s ease,border-color .15s ease;padding:var(--dcf-spacement) var(--dcf-spacement-small)!important}.decaf-file-component .dcf-drop-area:not(.dcf-has-files){border-style:dashed;padding:var(--dcf-spacement) var(--dcf-spacement-medium)}.decaf-file-component .dcf-drop-area.dcf-dragging{background:#00000008;border-color:var(--ion-color-primary);box-shadow:0 2px 8px #0000000f}.decaf-file-component .dcf-preview{padding:var(--dcf-padding-xsmall) var(--dcf-spacement-small)!important}.decaf-file-component .dcf-preview.read{padding:var(--dcf-spacement)!important}.decaf-file-component .dcf-preview .dcf-preview-image{border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-xsmall);max-width:320px;padding:.5rem;box-sizing:border-box;height:160px;position:relative;cursor:pointer;overflow:hidden}.decaf-file-component .dcf-preview .dcf-preview-image ion-img{height:140px!important;display:block;width:100%}.decaf-file-component .dcf-preview .dcf-preview-image:hover .dcf-overlay{opacity:1}.decaf-file-component .dcf-preview .dcf-preview-image .dcf-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:#0009;display:flex;justify-content:center;align-items:center;opacity:0;transition:opacity .3s ease}.decaf-file-component .dcf-preview .description{text-align:left;padding:1rem;font-size:.75rem}.decaf-file-component .dcf-preview .description .dcf-title{font-size:1rem;font-weight:500}.decaf-file-component .dcf-preview .description ion-button{margin-top:var(--dcf-margin-small)!important}.decaf-file-component .dcf-preview-list-container{max-height:150px;overflow-y:auto}.decaf-file-component .dcf-preview-list-container ion-list{padding:0!important;margin:0!important}@media (max-width: 767px){.decaf-file-component .dcf-preview-list-container ion-list{width:100%;min-width:576px;overflow-x:auto}}.decaf-file-component .dcf-preview-list-container:not(:hover){scrollbar-color:rgba(var(--dcf-color-medium-rgb),.125) transparent!important}.decaf-file-component .dcf-preview-list-container ion-item{font-size:.875rem!important}.decaf-file-component .dcf-preview-list-container ion-item.dcf-error-item{--background: rgba(var(--dcf-color-danger-rgb), .02) !important;--border-color: rgba(var(--dcf-color-danger-rgb), .2) !important}.decaf-file-component .dcf-preview-list-container ion-item ion-item{--padding-top: .25rem;--padding-bottom: 0rem;--inner-padding-start: 0rem;--padding-start: var(--dcf-padding-xsmall) !important;--padding-end: 0rem;--inner-padding-end: var(--dcf-padding-xsmall) !important;--background-hover: var(--dcf-color-gray-8);--background-focused: var(--dcf-color-gray-8);--background-hover-opacity: .1;--background-focused-opacity: .1;--border-color: var(--dcf-color-gray-2)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: CardComponent, selector: "ngx-decaf-card", inputs: ["type", "title", "body", "subtitle", "color", "separator", "borders", "inlineContent", "inlineContentPosition"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
13456
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FileUploadComponent, isStandalone: true, selector: "ngx-decaf-file-upload", inputs: { formGroup: "formGroup", name: "name", formControl: "formControl", required: "required", multiple: "multiple", type: "type", buttonLabel: "buttonLabel", size: "size", position: "position", accept: "accept", showIcon: "showIcon", enableDirectoryMode: "enableDirectoryMode", previewHandler: "previewHandler", maxFileSize: "maxFileSize" }, outputs: { changeEvent: "changeEvent" }, viewQueries: [{ propertyName: "component", first: true, predicate: ["component"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"decaf-file-component\" #component>\n <input\n id=\"dcf-file-input\"\n type=\"file\"\n placeholder=\"Select files\"\n [attr.accept]=\"accept\"\n [attr.multiple]=\"multiple ? true : null\"\n (change)=\"handleSelection($event)\"\n [multiple]=\"multiple\"\n hidden\n [attr.webkitdirectory]=\"enableDirectoryMode ? true : null\"\n />\n\n <ngx-decaf-card [className]=\"className\" [body]=\"'blank'\">\n @if(['create', 'update'].includes(operation)) {\n <div>\n <div\n [class]=\"\n 'dcf-drop-area '\n + ' dcf-' + size\n + ' dcf-flex dcf-flex-' + position\n + ' dcf-text-' + position\n \"\n\n [class.dcf-dragging]=\"dragging\"\n [class.dcf-has-files]=\"files.length\"\n (drop)=\"!files?.length ? handleDrop($event) : dragging = false\"\n (dragover)=\"!files?.length ? handleDragOver($event) : dragging = false\"\n (dragleave)=\"!files?.length ? handleDragLeave($event) : dragging = false\"\n >\n <div>\n @if (!previewFile) {\n @if(showIcon) {\n <ngx-decaf-icon name=\"cloud-upload-outline\" size=\"large\" />\n }\n <p class=\"dcf-drag-description\">{{ label ? (label | translate) : (locale + \".drag_file\" | translate) }}</p>\n <ion-button class=\"dcf-button-select\" (click)=\"handleClickToSelect()\" size=\"small\">\n {{ buttonLabel ? (buttonLabel | translate) : (locale + (enableDirectoryMode ? \".buttons.select_directory\" : \".buttons.select\") | translate) }}\n </ion-button>\n <div #container>\n <span class=\"dcf-error\" [innerHTML]=\"getErrors(container)\"></span>\n </div>\n } @else {\n @if ((!directoryMode && !multiple) ) {\n <div class=\"dcf-preview dcf-grid dcf-grid-match dcf-grid-collapse\">\n <div class=\"dcf-width-1-4@m dcf-width-1-3@s dcf-flex dcf-flex-center dcf-flex-middle\">\n <div class=\"dcf-preview-image\">\n <ion-img\n [src]=\"previewFile\"\n [title]=\"locale + '.preview' | translate\"\n [alt]=\"locale + '.preview' | translate\"\n />\n <div class=\"dcf-overlay\">\n <ion-button (click)=\"preview(previewFile)\" fill=\"clear\" color=\"light\" size=\"small\">\n {{ locale + \".buttons.preview\" | translate }}\n </ion-button>\n </div>\n </div>\n </div>\n <div class=\"description dcf-flex dcf-flex-middle dcf-width-expand@s\">\n <div>\n <p class=\"dcf-title\">{{ locale + \".preview\" | translate }}</p>\n <p class=\"subtitle\">{{ files[0].name }}</p>\n <ion-button (click)=\"handleClear()\" fill=\"clear\" color=\"danger\" size=\"small\">{{ locale + \".buttons.clear\" | translate }} </ion-button>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"dcf-margin-bottom\">\n {{ locale + \".selection\" | translate: { \"0\": files.length > 10 ? files.length : `0${files.length}` } }}\n @if(errors.length > 0) {\n <br /><span class=\"dcf-error-message\">{{ locale + \".selection_error\" | translate: { \"0\": errors.length > 10 ? errors.length : `0${errors.length}` } }}</span>\n }\n </div>\n <div class=\"dcf-preview-list-container\">\n <ion-list class=\"dcf-preview-list\">\n @for (file of errors; track $index) {\n <ion-item lines=\"full\" class=\"dcf-error-item\">\n <ion-label slot=\"start\">{{ file.name }}</ion-label>\n <div class=\"dcf-error-message\" slot=\"end\">\n {{ locale + \".errors.\" + file.error | translate: { \"0\": file.error === 'max_size' ? maxFileSize / 1024 / 1024 : file.name.split(\".\") } }}\n </div>\n <ion-note slot=\"end\">{{ file.size / 1024 / 1024 | number: \"1.1-1\" }} MB</ion-note>\n </ion-item>\n }\n\n @for (file of files; track $index) {\n <ion-item lines=\"full\">\n <ion-label slot=\"start\">{{ file.name }}</ion-label>\n <ion-note slot=\"end\">{{ file.size / 1024 / 1024 | number: \"1.1-1\" }} MB</ion-note>\n <div class=\"dcf-flex dcf-flex-middle\" slot=\"end\">\n <ngx-decaf-icon\n [button]=\"true\"\n [slot]=\"'icon-only'\"\n (click)=\"preview(file?.source || file, file.type)\"\n [name]=\"file.type.includes('image') ? 'image-outline' : 'document-text-outline'\"\n />\n <ngx-decaf-icon\n [button]=\"true\"\n [slot]=\"'icon-only'\"\n [name]=\"'trash-outline'\"\n (click)=\"removeFile($index)\"\n [color]=\"'danger'\"\n [size]=\"'small'\"\n />\n </div>\n </ion-item>\n }\n </ion-list>\n </div>\n }\n }\n </div>\n </div>\n </div>\n } @else {\n <div [class]=\"(files?.length > 1 ? 'dcf-preview-list-container' : '')\">\n @if(!files?.length) {\n <div class=\"dcf-padding-xsmall\">\n <ion-text>{{ locale + '.empty' | translate }}</ion-text>\n </div>\n } @else {\n @if(files?.length === 1 && isImageFile(files[0])) {\n <div class=\"dcf-preview dcf-grid dcf-grid-match dcf-grid-collapse read\">\n <div class=\"dcf-width-1-4@m dcf-width-1-3@s dcf-flex dcf-flex-center dcf-flex-middle\">\n <div class=\"dcf-preview-image\">\n <ion-img\n [src]=\"previewFile\"\n [title]=\"locale + '.preview' | translate\"\n [alt]=\"locale + '.preview' | translate\"\n />\n <div class=\"dcf-overlay\">\n <ion-button (click)=\"preview(previewFile)\" fill=\"clear\" color=\"light\" size=\"small\">\n {{ locale + \".buttons.preview\" | translate }}\n </ion-button>\n </div>\n </div>\n </div>\n <div class=\"description dcf-flex dcf-flex-middle dcf-width-expand@s\">\n <div>\n <p class=\"dcf-title\">{{ locale + \".preview\" | translate }}</p>\n <p class=\"subtitle\">{{ files[0].name }}</p>\n </div>\n </div>\n </div>\n } @else {\n <ion-list class=\"dcf-preview-list\">\n @for (file of files; track $index) {\n <ion-item lines=\"full\">\n @if(file?.name) {\n <ion-label slot=\"start\">{{ file.name }}</ion-label>\n }\n <div class=\"dcf-flex dcf-flex-middle\" slot=\"end\">\n <ngx-decaf-icon\n [button]=\"true\"\n [slot]=\"'icon-only'\"\n (click)=\"preview(file.source, file.type)\"\n [name]=\"file.type.includes('image') ? 'image-outline' : 'document-text-outline'\"\n />\n </div>\n </ion-item>\n }\n </ion-list>\n }\n }\n </div>\n }\n </ngx-decaf-card>\n</div>\n\n<!-- <ion-card-header>\n <ion-card-title>Upload de Imagem</ion-card-title>\n </ion-card-header>\n\n <ion-card-content>\n <div\n class=\"dcf-drop-area\"\n [class.dragging]=\"dragging\"\n (drop)=\"onDrop($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n >\n <div class=\"dcf-drop-content\">\n <ion-icon name=\"cloud-upload-outline\" size=\"large\"></ion-icon>\n <p>Arraste e solte aqui ou</p>\n <ion-button size=\"small\" fill=\"outline\" (click)=\"triggerFileSelect()\">Selecionar arquivo</ion-button>\n </div>\n </div>\n\n <input\n #fileInput\n type=\"file\"\n [attr.accept]=\"accept\"\n [attr.multiple]=\"multiple ? true : null\"\n (change)=\"onFileSelected($event)\"\n hidden\n />\n\n <div *ngIf=\"previewUrl\" class=\"dcf-preview\">\n <ion-item>\n <div slot=\"start\">\n <ion-img [src]=\"previewUrl\"></ion-img>\n </div>\n <ion-label>\n <h3>Pr\u00E9-visualiza\u00E7\u00E3o</h3>\n <p *ngIf=\"files.length\">{{ files[0].name }}</p>\n </ion-label>\n </ion-item>\n </div>\n\n <ion-list *ngIf=\"files.length\">\n <ion-list-header>\n <ion-label>Arquivos selecionados</ion-label>\n </ion-list-header>\n <ion-item *ngFor=\"let f of files; let i = index\">\n <ion-label>{{ f.name }}</ion-label>\n <ion-note slot=\"end\">{{ (f.size / 1024 / 1024) | number:'1.1-1' }} MB</ion-note>\n <ion-button fill=\"clear\" slot=\"end\" (click)=\"removeFile(i)\">\n <ion-icon slot=\"icon-only\" name=\"close-circle\"></ion-icon>\n </ion-button>\n </ion-item>\n </ion-list>\n\n <div *ngIf=\"errors.length\">\n <ion-list>\n <ion-item *ngFor=\"let err of errors\">\n <ion-icon name=\"alert-circle\" slot=\"start\" color=\"danger\"></ion-icon>\n <ion-label color=\"danger\">{{ err }}</ion-label>\n </ion-item>\n </ion-list>\n </div>\n\n <ion-row class=\"dcf-actions\">\n <ion-col>\n <ion-button expand=\"block\" (click)=\"triggerFileSelect()\">Selecionar</ion-button>\n </ion-col>\n <ion-col>\n <ion-button expand=\"block\" color=\"danger\" fill=\"outline\" (click)=\"clear()\">Limpar</ion-button>\n </ion-col>\n </ion-row>\n </ion-card-content> -->\n", styles: [".decaf-file-component.dcf-palette-dark .dcf-button-select{--background: rgb(var(--dcf-color-light-rgb), .1) !important;--background-hover: rgb(var(--dcf-color-light-rgb), .75) !important;--background-activated: rgb(var(--dcf-color-light-rgb), .4) !important;--background-focused: rgb(var(--dcf-color-light-rgb), .4) !important;--color: var(--dcf-color-light) !important}.decaf-file-component.dcf-palette-dark .dcf-has-files{border-style:solid;border-color:var(--dcf-color-gray-6)!important}.decaf-file-component .dcf-upload-icon{--box-shadow: none !important}.decaf-file-component .dcf-upload-icon ion-icon{width:1.5rem!important}.decaf-file-component ion-button.dcf-button-select{--background: rgb(var(--dcf-color-primary-rgb), .1);--background-hover: rgb(var(--dcf-color-primary-rgb), .75);--background-activated: rgb(var(--dcf-color-primary-rgb), .4);--background-focused: rgb(var(--dcf-color-primary-rgb), .4);--color: var(--dcf-color-primary-shade);--border-radius: var(--dcf-border-radius-small);--box-shadow: none;--padding-top: var(--dcf-padding-xsmall);--padding-bottom: var(--dcf-padding-xsmall);--padding-start: var(--dcf-padding-small);--padding-end: var(--dcf-padding-small);font-weight:500;text-transform:none;margin-top:var(--dcf-margin-small)!important}.decaf-file-component .dcf-error{color:var(--dcf-color-danger)!important;font-size:.8rem!important;font-weight:500!important;line-height:1.1rem;z-index:9999;animation-duration:.05s;animation-timing-function:ease-in;animation-fill-mode:both;animation-name:fadeBottomSmallAnimation}.decaf-file-component .dcf-error .ti,.decaf-file-component .dcf-error ion-icon{position:relative;top:2px!important;min-width:20px;font-size:1rem!important;text-align:left}.decaf-file-component ion-card-content{width:100%}.decaf-file-component .dcf-error-message{color:var(--dcf-color-danger);font-size:.875rem}.decaf-file-component .dcf-drag-description{font-size:1rem;line-height:1.5rem;font-weight:500;margin-bottom:var(--dcf-margin-small)}.decaf-file-component .dcf-drop-area{display:flex;align-items:center;border:1.5px dashed var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-small)!important;transition:border-style .15s ease,border-color .15s ease;background:transparent}.decaf-file-component .dcf-drop-area.dcf-large{min-height:180px}.decaf-file-component .dcf-drop-area>div{width:100%}.decaf-file-component .dcf-drop-area.dcf-has-files{border-style:solid;border-color:var(--dcf-color-primary-shade);transition:border-style .15s ease,border-color .15s ease;padding:var(--dcf-spacement) var(--dcf-spacement-small)!important}.decaf-file-component .dcf-drop-area:not(.dcf-has-files){border-style:dashed;padding:var(--dcf-spacement) var(--dcf-spacement-medium)}.decaf-file-component .dcf-drop-area.dcf-dragging{background:#00000008;border-color:var(--ion-color-primary);box-shadow:0 2px 8px #0000000f}.decaf-file-component .dcf-preview{padding:var(--dcf-padding-xsmall) var(--dcf-spacement-small)!important}.decaf-file-component .dcf-preview.read{padding:var(--dcf-spacement)!important}.decaf-file-component .dcf-preview .dcf-preview-image{border:1px solid var(--dcf-color-gray-3);border-radius:var(--dcf-border-radius-xsmall);max-width:320px;padding:.5rem;box-sizing:border-box;height:160px;position:relative;cursor:pointer;overflow:hidden}.decaf-file-component .dcf-preview .dcf-preview-image ion-img{height:140px!important;display:block;width:100%}.decaf-file-component .dcf-preview .dcf-preview-image:hover .dcf-overlay{opacity:1}.decaf-file-component .dcf-preview .dcf-preview-image .dcf-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:#0009;display:flex;justify-content:center;align-items:center;opacity:0;transition:opacity .3s ease}.decaf-file-component .dcf-preview .description{text-align:left;padding:1rem;font-size:.75rem}.decaf-file-component .dcf-preview .description .dcf-title{font-size:1rem;font-weight:500}.decaf-file-component .dcf-preview .description ion-button{margin-top:var(--dcf-margin-small)!important}.decaf-file-component .dcf-preview-list-container{max-height:150px;overflow-y:auto}.decaf-file-component .dcf-preview-list-container ion-list{padding:0!important;margin:0!important}@media (max-width: 767px){.decaf-file-component .dcf-preview-list-container ion-list{width:100%;min-width:576px;overflow-x:auto}}.decaf-file-component .dcf-preview-list-container:not(:hover){scrollbar-color:rgba(var(--dcf-color-medium-rgb),.125) transparent!important}.decaf-file-component .dcf-preview-list-container ion-item{font-size:.875rem!important}.decaf-file-component .dcf-preview-list-container ion-item.dcf-error-item{--background: rgba(var(--dcf-color-danger-rgb), .02) !important;--border-color: rgba(var(--dcf-color-danger-rgb), .2) !important}.decaf-file-component .dcf-preview-list-container ion-item ion-item{--padding-top: .25rem;--padding-bottom: 0rem;--inner-padding-start: 0rem;--padding-start: var(--dcf-padding-xsmall) !important;--padding-end: 0rem;--inner-padding-end: var(--dcf-padding-xsmall) !important;--background-hover: var(--dcf-color-gray-8);--background-focused: var(--dcf-color-gray-8);--background-hover-opacity: .1;--background-focused-opacity: .1;--border-color: var(--dcf-color-gray-2)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: CardComponent, selector: "ngx-decaf-card", inputs: ["type", "title", "body", "subtitle", "color", "separator", "borders", "inlineContent", "inlineContentPosition"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
13500
13457
|
};
|
|
13501
13458
|
FileUploadComponent = __decorate([
|
|
13502
13459
|
Dynamic(),
|
|
@@ -13531,8 +13488,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
13531
13488
|
type: Input
|
|
13532
13489
|
}], type: [{
|
|
13533
13490
|
type: Input
|
|
13534
|
-
}], label: [{
|
|
13535
|
-
type: Input
|
|
13536
13491
|
}], buttonLabel: [{
|
|
13537
13492
|
type: Input
|
|
13538
13493
|
}], size: [{
|
|
@@ -13731,7 +13686,7 @@ class NgxRouterService {
|
|
|
13731
13686
|
* @memberOf RouterService
|
|
13732
13687
|
*/
|
|
13733
13688
|
getQueryParamValue(param) {
|
|
13734
|
-
return
|
|
13689
|
+
return this.parseAllQueryParams(param)?.[0]?.[param] || undefined;
|
|
13735
13690
|
}
|
|
13736
13691
|
/**
|
|
13737
13692
|
* @description Retrieves the last segment of the current URL.
|
|
@@ -13760,9 +13715,7 @@ class NgxRouterService {
|
|
|
13760
13715
|
* @memberOf RouterService
|
|
13761
13716
|
*/
|
|
13762
13717
|
getLastUrlSegment() {
|
|
13763
|
-
return (this.router.url || globalThis.window.location.href)
|
|
13764
|
-
.split('/')
|
|
13765
|
-
.pop();
|
|
13718
|
+
return (this.router.url || globalThis.window.location.href).split('/').pop();
|
|
13766
13719
|
}
|
|
13767
13720
|
/**
|
|
13768
13721
|
* @description Retrieves the current URL of the application.
|
|
@@ -13825,8 +13778,7 @@ class NgxRouterService {
|
|
|
13825
13778
|
const currentNavigation = this.router.getCurrentNavigation();
|
|
13826
13779
|
if (!!currentNavigation &&
|
|
13827
13780
|
currentNavigation.previousNavigation?.finalUrl?.toString() !== undefined)
|
|
13828
|
-
this.previousUrl =
|
|
13829
|
-
currentNavigation.previousNavigation?.finalUrl?.toString();
|
|
13781
|
+
this.previousUrl = currentNavigation.previousNavigation?.finalUrl?.toString();
|
|
13830
13782
|
return this.previousUrl;
|
|
13831
13783
|
}
|
|
13832
13784
|
/**
|
|
@@ -13929,24 +13881,16 @@ let TableComponent = class TableComponent extends ListComponent {
|
|
|
13929
13881
|
}, {});
|
|
13930
13882
|
}
|
|
13931
13883
|
async ngOnInit() {
|
|
13932
|
-
this.
|
|
13884
|
+
// this.parseProps(this);
|
|
13885
|
+
await super.initialize();
|
|
13933
13886
|
this.type = ListComponentsTypes.PAGINATED;
|
|
13934
13887
|
this.empty = Object.assign({}, DefaultListEmptyOptions, this.empty);
|
|
13935
|
-
if (!this.initialized) {
|
|
13936
|
-
this.parseProps(this);
|
|
13937
|
-
}
|
|
13938
13888
|
this.repositoryObserverSubject
|
|
13939
13889
|
.pipe(debounceTime(100), shareReplay$1(1), takeUntil$1(this.destroySubscriptions$))
|
|
13940
13890
|
.subscribe(([modelInstance, event, uid]) => this.handleObserveEvent(modelInstance, event, uid));
|
|
13941
13891
|
this.cols = this._cols;
|
|
13942
|
-
|
|
13943
|
-
this.allowOperations =
|
|
13944
|
-
this.isAllowed(OperationKeys.UPDATE) || this.isAllowed(OperationKeys.DELETE);
|
|
13892
|
+
this.getOperations();
|
|
13945
13893
|
this.searchValue = undefined;
|
|
13946
|
-
if (this.operations) {
|
|
13947
|
-
this.cols.push('actions');
|
|
13948
|
-
}
|
|
13949
|
-
this.headers = this._headers;
|
|
13950
13894
|
const filter = this.routerService.getQueryParamValue('filter');
|
|
13951
13895
|
if (filter) {
|
|
13952
13896
|
const value = this.routerService.getQueryParamValue('value');
|
|
@@ -13967,9 +13911,21 @@ let TableComponent = class TableComponent extends ListComponent {
|
|
|
13967
13911
|
if (this.filterModel) {
|
|
13968
13912
|
await this.getFilterOptions();
|
|
13969
13913
|
}
|
|
13970
|
-
await super.initialize();
|
|
13971
13914
|
await this.refresh();
|
|
13972
13915
|
}
|
|
13916
|
+
getOperations() {
|
|
13917
|
+
if (this.allowOperations) {
|
|
13918
|
+
this.allowOperations =
|
|
13919
|
+
this.isAllowed(OperationKeys.UPDATE) || this.isAllowed(OperationKeys.DELETE);
|
|
13920
|
+
}
|
|
13921
|
+
else {
|
|
13922
|
+
this.operations = [];
|
|
13923
|
+
}
|
|
13924
|
+
if (this.operations?.length) {
|
|
13925
|
+
this.cols.push('actions');
|
|
13926
|
+
}
|
|
13927
|
+
this.headers = this._headers;
|
|
13928
|
+
}
|
|
13973
13929
|
async getFilterOptions() {
|
|
13974
13930
|
const repo = getModelAndRepository(this.filterModel);
|
|
13975
13931
|
if (repo) {
|
|
@@ -13989,54 +13945,81 @@ let TableComponent = class TableComponent extends ListComponent {
|
|
|
13989
13945
|
this.filterOptions = query.map((item) => this.filterOptionsMapper(item));
|
|
13990
13946
|
}
|
|
13991
13947
|
}
|
|
13992
|
-
itemMapper(item, mapper, props = {}) {
|
|
13948
|
+
async itemMapper(item, mapper, props = {}) {
|
|
13993
13949
|
this.model = item;
|
|
13994
|
-
const mapped = super.itemMapper(item, this.cols.filter((c) => c !== 'actions'), props);
|
|
13950
|
+
const mapped = await super.itemMapper(item, this.cols.filter((c) => c !== 'actions'), props);
|
|
13995
13951
|
const { children } = this.props || [];
|
|
13996
|
-
|
|
13997
|
-
|
|
13998
|
-
|
|
13999
|
-
const
|
|
14000
|
-
if (
|
|
14001
|
-
const {
|
|
14002
|
-
if (
|
|
14003
|
-
const
|
|
14004
|
-
const
|
|
14005
|
-
|
|
14006
|
-
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
|
|
13952
|
+
const entries = Object.entries(mapped);
|
|
13953
|
+
const resultEntries = await Promise.all(entries.map(async ([curr, value], index) => {
|
|
13954
|
+
try {
|
|
13955
|
+
const child = children[index];
|
|
13956
|
+
if (child) {
|
|
13957
|
+
const { events, name } = child?.['props'] || {};
|
|
13958
|
+
if (events) {
|
|
13959
|
+
const sequence = (mapper[name]?.sequence || index) + (!this.cols.includes('actions') ? 1 : 0);
|
|
13960
|
+
const evts = this.parseEvents(events, this);
|
|
13961
|
+
for (const [key, evt] of Object.entries(evts)) {
|
|
13962
|
+
const handler = evt;
|
|
13963
|
+
if (key === ComponentEventNames.Render) {
|
|
13964
|
+
if (handler?.name === ComponentEventNames.Render) {
|
|
13965
|
+
value = await handler.bind(this)(this, name, value);
|
|
13966
|
+
}
|
|
13967
|
+
else {
|
|
13968
|
+
const handlerFn = await handler(this, name, value);
|
|
13969
|
+
value =
|
|
13970
|
+
typeof handlerFn === 'function' || handlerFn instanceof Promise
|
|
13971
|
+
? await handlerFn.bind(this)(this, name, value)
|
|
13972
|
+
: handlerFn;
|
|
13973
|
+
}
|
|
13974
|
+
}
|
|
13975
|
+
if (key === 'handleClick' || key === 'handleAction') {
|
|
13976
|
+
props = {
|
|
13977
|
+
...props,
|
|
13978
|
+
handler: {
|
|
13979
|
+
col: String(sequence),
|
|
13980
|
+
handle: handler.bind(this),
|
|
13981
|
+
},
|
|
13982
|
+
};
|
|
13983
|
+
}
|
|
14010
13984
|
}
|
|
14011
13985
|
}
|
|
14012
13986
|
}
|
|
14013
13987
|
}
|
|
14014
|
-
|
|
14015
|
-
|
|
14016
|
-
|
|
14017
|
-
|
|
14018
|
-
}
|
|
14019
|
-
|
|
13988
|
+
catch (error) {
|
|
13989
|
+
this.log
|
|
13990
|
+
.for(this.itemMapper)
|
|
13991
|
+
.error(`Error mapping child events. ${error?.message || error}`);
|
|
13992
|
+
}
|
|
13993
|
+
const propName = this.cols[index];
|
|
13994
|
+
const parserFn = mapper[propName]?.valueParserFn || undefined;
|
|
13995
|
+
const resolvedValue = parserFn ? await parserFn(this, propName, value) : value;
|
|
13996
|
+
return [curr, resolvedValue];
|
|
13997
|
+
}));
|
|
13998
|
+
return resultEntries.reduce((accum, [key, value]) => ({ ...accum, [key]: value }), {
|
|
13999
|
+
...props,
|
|
14000
|
+
});
|
|
14020
14001
|
}
|
|
14021
14002
|
async mapResults(data) {
|
|
14003
|
+
this._data = [...data];
|
|
14022
14004
|
if (!data || !data.length)
|
|
14023
14005
|
return [];
|
|
14024
|
-
return data.
|
|
14025
|
-
...accum,
|
|
14026
|
-
this.itemMapper(curr, this.mapper, { uid: curr[this.pk] }),
|
|
14027
|
-
], []);
|
|
14006
|
+
return await Promise.all(data.map((curr) => this.itemMapper(curr, this.mapper, { uid: curr[this.pk] })));
|
|
14028
14007
|
}
|
|
14029
|
-
async handleAction(event,
|
|
14030
|
-
if (
|
|
14031
|
-
|
|
14008
|
+
async handleAction(event, handler, uid, action) {
|
|
14009
|
+
if (handler) {
|
|
14010
|
+
const handlerFn = await handler(this, event, uid);
|
|
14011
|
+
return typeof handlerFn === 'function' ? handlerFn() : handlerFn;
|
|
14032
14012
|
}
|
|
14033
|
-
|
|
14013
|
+
await this.handleRedirect(event, uid, action);
|
|
14014
|
+
}
|
|
14015
|
+
async handleRedirect(event, uid, action) {
|
|
14016
|
+
if (event instanceof Event) {
|
|
14017
|
+
event.preventDefault();
|
|
14018
|
+
event.stopImmediatePropagation();
|
|
14019
|
+
}
|
|
14020
|
+
if (this.operations.includes(action)) {
|
|
14034
14021
|
await this.router.navigate([`/${this.route}/${action}/${uid}`]);
|
|
14035
14022
|
}
|
|
14036
|
-
event.stopImmediatePropagation();
|
|
14037
|
-
const data = this.items.find((item) => item['uid'] === uid);
|
|
14038
|
-
if (data)
|
|
14039
|
-
this.listenEvent.emit({ name: ComponentEventNames.Click, data });
|
|
14040
14023
|
}
|
|
14041
14024
|
async openFilterSelectOptions(event) {
|
|
14042
14025
|
const type = this.filterOptions.length > 10 ? SelectFieldInterfaces.MODAL : SelectFieldInterfaces.POPOVER;
|
|
@@ -14070,7 +14053,7 @@ let TableComponent = class TableComponent extends ListComponent {
|
|
|
14070
14053
|
}
|
|
14071
14054
|
}
|
|
14072
14055
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
14073
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TableComponent, isStandalone: true, selector: "ngx-decaf-table", inputs: { filterModel: "filterModel", filterOptions: "filterOptions", filterLabel: "filterLabel", filterOptionsMapper: "filterOptionsMapper", allowOperations: "allowOperations" }, usesInheritance: true, ngImport: i0, template: "@if (showSearchbar && (data?.length || searching)) {\n <div class=\"dcf-grid-actions\">\n <div class=\"dcf-grid dcf-grid-small\">\n <div class=\"dcf-width-expand@s\">\n <ngx-decaf-searchbar\n [emitEventToWindow]=\"false\"\n [debounce]=\"500\"\n (searchEvent)=\"handleSearch($event)\"\n />\n </div>\n @if (filterOptions?.length) {\n <div\n class=\"dcf-width-1-3@s dcf-width-1-4@m dcf-select-filter-container dcf-flex dcf-flex-middle\"\n >\n <ion-select\n [id]=\"name\"\n toggleIcon=\"chevron-down-outline\"\n expandedIcon=\"chevron-up-outline\"\n [mode]=\"'md'\"\n fill=\"outline\"\n [value]=\"filterValue ?? ''\"\n [labelPlacement]=\"'floating'\"\n [label]=\"locale + '.filter.label' | translate\"\n (click)=\"openFilterSelectOptions($event)\"\n [placeholder]=\"locale + '.filter.label' | translate\"\n interface=\"popover\"\n >\n <ion-select-option value=\"\">{{ locale + '.filter.all' | translate }}</ion-select-option>\n @for (option of filterOptions; track $index) {\n <ion-select-option value=\"{{ option.value }}\">{{ option.text }}</ion-select-option>\n }\n <ion-button\n fill=\"clear\"\n (click)=\"handleFilterSelectClear($event)\"\n slot=\"end\"\n size=\"small\"\n [disabled]=\"!filterValue\"\n >\n <ngx-decaf-icon fill=\"clear\" slot=\"icon-only\" [name]=\"'ti-input-x'\" />\n </ion-button>\n </ion-select>\n </div>\n }\n </div>\n </div>\n}\n<div class=\"dcf-table-container\" [class.dcf-empty]=\"!data?.length\">\n @if (initialized && data?.length) {\n <table class=\"dcf-table\">\n <thead>\n <tr>\n @for (header of headers; track $index) {\n <th>{{ locale + '.' + header + '.label' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (item of items; track trackItemFn($index, item)) {\n <tr
|
|
14056
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TableComponent, isStandalone: true, selector: "ngx-decaf-table", inputs: { filterModel: "filterModel", filterOptions: "filterOptions", filterLabel: "filterLabel", filterOptionsMapper: "filterOptionsMapper", allowOperations: "allowOperations" }, usesInheritance: true, ngImport: i0, template: "@if (showSearchbar && (data?.length || searching)) {\n <div class=\"dcf-grid-actions\">\n <div class=\"dcf-grid dcf-grid-small\">\n <div class=\"dcf-width-expand@s\">\n <ngx-decaf-searchbar\n [emitEventToWindow]=\"false\"\n [debounce]=\"500\"\n (searchEvent)=\"handleSearch($event)\"\n />\n </div>\n @if (filterOptions?.length) {\n <div\n class=\"dcf-width-1-3@s dcf-width-1-4@m dcf-select-filter-container dcf-flex dcf-flex-middle\"\n >\n <ion-select\n [id]=\"name\"\n toggleIcon=\"chevron-down-outline\"\n expandedIcon=\"chevron-up-outline\"\n [mode]=\"'md'\"\n fill=\"outline\"\n [value]=\"filterValue ?? ''\"\n [labelPlacement]=\"'floating'\"\n [label]=\"locale + '.filter.label' | translate\"\n (click)=\"openFilterSelectOptions($event)\"\n [placeholder]=\"locale + '.filter.label' | translate\"\n interface=\"popover\"\n >\n <ion-select-option value=\"\">{{ locale + '.filter.all' | translate }}</ion-select-option>\n @for (option of filterOptions; track $index) {\n <ion-select-option value=\"{{ option.value }}\">{{ option.text }}</ion-select-option>\n }\n <ion-button\n fill=\"clear\"\n (click)=\"handleFilterSelectClear($event)\"\n slot=\"end\"\n size=\"small\"\n [disabled]=\"!filterValue\"\n >\n <ngx-decaf-icon fill=\"clear\" slot=\"icon-only\" [name]=\"'ti-input-x'\" />\n </ion-button>\n </ion-select>\n </div>\n }\n </div>\n </div>\n}\n<div class=\"dcf-table-container\" [class.dcf-empty]=\"!data?.length\">\n @if (initialized && data?.length) {\n <table class=\"dcf-table\">\n <thead>\n <tr>\n @for (header of headers; track $index) {\n <th>{{ locale + '.' + header + '.label' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (item of items; track trackItemFn($index, item)) {\n <tr>\n @for (col of item | keyvalue; track $index) {\n @if (!['handler', 'actions', 'uid'].includes(col.key)) {\n <td\n (click)=\"\n handleAction(\n $event,\n item?.handler && item?.handler.col === col.key\n ? item.handler.handle\n : undefined,\n item.uid,\n OperationKeys.READ\n )\n \"\n [innerHTML]=\"col.value\"\n ></td>\n } @else {\n @if (allowOperations && col.key !== 'handler') {\n <td class=\"dcf-col-actions\">\n <div class=\"\">\n @if (operations?.includes(OperationKeys.UPDATE)) {\n <ngx-decaf-icon\n [button]=\"true\"\n (click)=\"handleRedirect($event, item.uid, OperationKeys.UPDATE, true)\"\n fill=\"clear\"\n slot=\"icon-only\"\n color=\"primary\"\n name=\"ti-edit\"\n />\n }\n @if (operations?.includes(OperationKeys.DELETE)) {\n <ngx-decaf-icon\n [button]=\"true\"\n (click)=\"handleRedirect($event, item.uid, OperationKeys.DELETE, true)\"\n fill=\"clear\"\n slot=\"icon-only\"\n color=\"danger\"\n name=\"ti-trash\"\n />\n }\n </div>\n </td>\n }\n }\n }\n </tr>\n }\n </tbody>\n </table>\n } @else {\n @if (!searching) {\n <ngx-decaf-empty-state\n [title]=\"'component.list.empty.title' | translate\"\n [subtitle]=\"'component.list.empty.subtitle' | translate\"\n [model]=\"empty?.showButton ? model : undefined\"\n [route]=\"route\"\n [modelId]=\"modelId\"\n [buttonLink]=\"empty?.link ?? undefined\"\n [borders]=\"borders\"\n [icon]=\"(item?.icon ?? 'folder-open-outline') || empty.icon\"\n className=\"dcf-empty-data\"\n />\n } @else {\n <ngx-decaf-empty-state\n icon=\"search-outline\"\n [model]=\"empty?.showButton ? model : undefined\"\n [route]=\"route\"\n [modelId]=\"modelId\"\n [borders]=\"borders\"\n [operations]=\"operations\"\n [body]=\"'small'\"\n [translatable]=\"true\"\n [title]=\"'component.list.search.title' | translate\"\n [subtitle]=\"'component.list.search.subtitle' | translate: { '0': parseSearchValue() }\"\n [searchValue]=\"searchValue\"\n />\n }\n }\n</div>\n@if (loadMoreData) {\n <div class=\"dcf-table-pagination\">\n @if (pages > 0 && !searchValue?.length) {\n <ngx-decaf-pagination\n [totalPages]=\"pages\"\n [current]=\"page\"\n (clickEvent)=\"handlePaginate($event)\"\n />\n }\n </div>\n}\n", styles: [".dcf-table-container{display:block;overflow-x:auto!important;box-sizing:border-box;overflow-y:hidden;scrollbar-width:thin;border-radius:var(--dcf-border-radius-small);box-shadow:var(--dcf-box-shadow-small)!important;background-color:var(--dcf-card-background);border:1px solid var(--dcf-color-gray-2)}.dcf-table-container::-webkit-scrollbar{width:5px}.dcf-table-container table{min-width:680px}.dcf-table{width:100%;border-collapse:collapse;border-radius:var(--dcf-border-radius-xsmall);overflow:hidden;background:var(--dcf-card-background);color:var(--dcf-text-color);font-size:.8rem}.dcf-table thead{background:rgba(var(--dcf-color-primary-rgb),.075);text-transform:uppercase;color:var(--dcf-color-dark);letter-spacing:.06em;font-size:.825rem;white-space:nowrap;width:auto}.dcf-table thead th{text-align:left;padding:.875rem 1rem;font-weight:600;max-width:max-content}.dcf-table tbody tr{transition:background .12s ease,box-shadow .12s ease}.dcf-table tbody tr:hover{background:rgba(var(--dcf-color-primary-rgb),.05);cursor:pointer}.dcf-table tbody tr:not(:last-child){border-bottom:1px solid var(--dcf-color-gray-2)}.dcf-table tbody td{padding:1rem 1.125rem;font-size:.875rem}.dcf-table tbody td:first-child{font-weight:600}.dcf-table tbody td.dcf-col-actions{padding-top:0!important;padding-bottom:0!important}.dcf-table tfoot{font-size:.85rem}.dcf-table tfoot td{padding:.875rem 1.125rem;border-top:1px solid 1px solid var(--dcf-color-gray-2)}.dcf-select-filter-container{min-width:200px}.dcf-buttons-grid{margin-top:var(--dcf-margin-medium);margin-bottom:var(--dcf-margin)}@media (max-width: 480px){.dcf-buttons-grid{flex-direction:row-reverse!important}.dcf-buttons-grid>div{width:100%}.dcf-buttons-grid>div+div{margin-top:1rem}.dcf-buttons-grid ion-button{width:100%}}ion-select{margin-top:.5rem;max-height:40px!important}ion-select ion-button{transform:scale(.75)!important;margin:0!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonSelect, selector: "ion-select", inputs: ["cancelText", "color", "compareWith", "disabled", "errorText", "expandedIcon", "fill", "helperText", "interface", "interfaceOptions", "justify", "label", "labelPlacement", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "shape", "toggleIcon", "value"] }, { kind: "component", type: IonSelectOption, selector: "ion-select-option", inputs: ["disabled", "value"] }, { kind: "component", type: SearchbarComponent, selector: "ngx-decaf-searchbar", inputs: ["autocomplete", "autocorrect", "animated", "buttonCancelText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value", "queryKeys", "isVisible", "wrapper", "wrapperColor", "emitEventToWindow"], outputs: ["searchEvent"] }, { kind: "component", type: EmptyStateComponent, selector: "ngx-decaf-empty-state", inputs: ["title", "titleColor", "subtitle", "subtitleColor", "showIcon", "icon", "iconSize", "iconColor", "buttonLink", "buttonText", "buttonFill", "buttonColor", "buttonSize", "searchValue"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "component", type: PaginationComponent, selector: "ngx-decaf-pagination", inputs: ["totalPages", "current"], outputs: ["clickEvent"] }, { kind: "pipe", type: i1$1.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
14074
14057
|
};
|
|
14075
14058
|
TableComponent = __decorate([
|
|
14076
14059
|
Dynamic()
|
|
@@ -14086,7 +14069,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
14086
14069
|
EmptyStateComponent,
|
|
14087
14070
|
IconComponent,
|
|
14088
14071
|
PaginationComponent,
|
|
14089
|
-
], template: "@if (showSearchbar && (data?.length || searching)) {\n <div class=\"dcf-grid-actions\">\n <div class=\"dcf-grid dcf-grid-small\">\n <div class=\"dcf-width-expand@s\">\n <ngx-decaf-searchbar\n [emitEventToWindow]=\"false\"\n [debounce]=\"500\"\n (searchEvent)=\"handleSearch($event)\"\n />\n </div>\n @if (filterOptions?.length) {\n <div\n class=\"dcf-width-1-3@s dcf-width-1-4@m dcf-select-filter-container dcf-flex dcf-flex-middle\"\n >\n <ion-select\n [id]=\"name\"\n toggleIcon=\"chevron-down-outline\"\n expandedIcon=\"chevron-up-outline\"\n [mode]=\"'md'\"\n fill=\"outline\"\n [value]=\"filterValue ?? ''\"\n [labelPlacement]=\"'floating'\"\n [label]=\"locale + '.filter.label' | translate\"\n (click)=\"openFilterSelectOptions($event)\"\n [placeholder]=\"locale + '.filter.label' | translate\"\n interface=\"popover\"\n >\n <ion-select-option value=\"\">{{ locale + '.filter.all' | translate }}</ion-select-option>\n @for (option of filterOptions; track $index) {\n <ion-select-option value=\"{{ option.value }}\">{{ option.text }}</ion-select-option>\n }\n <ion-button\n fill=\"clear\"\n (click)=\"handleFilterSelectClear($event)\"\n slot=\"end\"\n size=\"small\"\n [disabled]=\"!filterValue\"\n >\n <ngx-decaf-icon fill=\"clear\" slot=\"icon-only\" [name]=\"'ti-input-x'\" />\n </ion-button>\n </ion-select>\n </div>\n }\n </div>\n </div>\n}\n<div class=\"dcf-table-container\" [class.dcf-empty]=\"!data?.length\">\n @if (initialized && data?.length) {\n <table class=\"dcf-table\">\n <thead>\n <tr>\n @for (header of headers; track $index) {\n <th>{{ locale + '.' + header + '.label' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (item of items; track trackItemFn($index, item)) {\n <tr
|
|
14072
|
+
], template: "@if (showSearchbar && (data?.length || searching)) {\n <div class=\"dcf-grid-actions\">\n <div class=\"dcf-grid dcf-grid-small\">\n <div class=\"dcf-width-expand@s\">\n <ngx-decaf-searchbar\n [emitEventToWindow]=\"false\"\n [debounce]=\"500\"\n (searchEvent)=\"handleSearch($event)\"\n />\n </div>\n @if (filterOptions?.length) {\n <div\n class=\"dcf-width-1-3@s dcf-width-1-4@m dcf-select-filter-container dcf-flex dcf-flex-middle\"\n >\n <ion-select\n [id]=\"name\"\n toggleIcon=\"chevron-down-outline\"\n expandedIcon=\"chevron-up-outline\"\n [mode]=\"'md'\"\n fill=\"outline\"\n [value]=\"filterValue ?? ''\"\n [labelPlacement]=\"'floating'\"\n [label]=\"locale + '.filter.label' | translate\"\n (click)=\"openFilterSelectOptions($event)\"\n [placeholder]=\"locale + '.filter.label' | translate\"\n interface=\"popover\"\n >\n <ion-select-option value=\"\">{{ locale + '.filter.all' | translate }}</ion-select-option>\n @for (option of filterOptions; track $index) {\n <ion-select-option value=\"{{ option.value }}\">{{ option.text }}</ion-select-option>\n }\n <ion-button\n fill=\"clear\"\n (click)=\"handleFilterSelectClear($event)\"\n slot=\"end\"\n size=\"small\"\n [disabled]=\"!filterValue\"\n >\n <ngx-decaf-icon fill=\"clear\" slot=\"icon-only\" [name]=\"'ti-input-x'\" />\n </ion-button>\n </ion-select>\n </div>\n }\n </div>\n </div>\n}\n<div class=\"dcf-table-container\" [class.dcf-empty]=\"!data?.length\">\n @if (initialized && data?.length) {\n <table class=\"dcf-table\">\n <thead>\n <tr>\n @for (header of headers; track $index) {\n <th>{{ locale + '.' + header + '.label' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (item of items; track trackItemFn($index, item)) {\n <tr>\n @for (col of item | keyvalue; track $index) {\n @if (!['handler', 'actions', 'uid'].includes(col.key)) {\n <td\n (click)=\"\n handleAction(\n $event,\n item?.handler && item?.handler.col === col.key\n ? item.handler.handle\n : undefined,\n item.uid,\n OperationKeys.READ\n )\n \"\n [innerHTML]=\"col.value\"\n ></td>\n } @else {\n @if (allowOperations && col.key !== 'handler') {\n <td class=\"dcf-col-actions\">\n <div class=\"\">\n @if (operations?.includes(OperationKeys.UPDATE)) {\n <ngx-decaf-icon\n [button]=\"true\"\n (click)=\"handleRedirect($event, item.uid, OperationKeys.UPDATE, true)\"\n fill=\"clear\"\n slot=\"icon-only\"\n color=\"primary\"\n name=\"ti-edit\"\n />\n }\n @if (operations?.includes(OperationKeys.DELETE)) {\n <ngx-decaf-icon\n [button]=\"true\"\n (click)=\"handleRedirect($event, item.uid, OperationKeys.DELETE, true)\"\n fill=\"clear\"\n slot=\"icon-only\"\n color=\"danger\"\n name=\"ti-trash\"\n />\n }\n </div>\n </td>\n }\n }\n }\n </tr>\n }\n </tbody>\n </table>\n } @else {\n @if (!searching) {\n <ngx-decaf-empty-state\n [title]=\"'component.list.empty.title' | translate\"\n [subtitle]=\"'component.list.empty.subtitle' | translate\"\n [model]=\"empty?.showButton ? model : undefined\"\n [route]=\"route\"\n [modelId]=\"modelId\"\n [buttonLink]=\"empty?.link ?? undefined\"\n [borders]=\"borders\"\n [icon]=\"(item?.icon ?? 'folder-open-outline') || empty.icon\"\n className=\"dcf-empty-data\"\n />\n } @else {\n <ngx-decaf-empty-state\n icon=\"search-outline\"\n [model]=\"empty?.showButton ? model : undefined\"\n [route]=\"route\"\n [modelId]=\"modelId\"\n [borders]=\"borders\"\n [operations]=\"operations\"\n [body]=\"'small'\"\n [translatable]=\"true\"\n [title]=\"'component.list.search.title' | translate\"\n [subtitle]=\"'component.list.search.subtitle' | translate: { '0': parseSearchValue() }\"\n [searchValue]=\"searchValue\"\n />\n }\n }\n</div>\n@if (loadMoreData) {\n <div class=\"dcf-table-pagination\">\n @if (pages > 0 && !searchValue?.length) {\n <ngx-decaf-pagination\n [totalPages]=\"pages\"\n [current]=\"page\"\n (clickEvent)=\"handlePaginate($event)\"\n />\n }\n </div>\n}\n", styles: [".dcf-table-container{display:block;overflow-x:auto!important;box-sizing:border-box;overflow-y:hidden;scrollbar-width:thin;border-radius:var(--dcf-border-radius-small);box-shadow:var(--dcf-box-shadow-small)!important;background-color:var(--dcf-card-background);border:1px solid var(--dcf-color-gray-2)}.dcf-table-container::-webkit-scrollbar{width:5px}.dcf-table-container table{min-width:680px}.dcf-table{width:100%;border-collapse:collapse;border-radius:var(--dcf-border-radius-xsmall);overflow:hidden;background:var(--dcf-card-background);color:var(--dcf-text-color);font-size:.8rem}.dcf-table thead{background:rgba(var(--dcf-color-primary-rgb),.075);text-transform:uppercase;color:var(--dcf-color-dark);letter-spacing:.06em;font-size:.825rem;white-space:nowrap;width:auto}.dcf-table thead th{text-align:left;padding:.875rem 1rem;font-weight:600;max-width:max-content}.dcf-table tbody tr{transition:background .12s ease,box-shadow .12s ease}.dcf-table tbody tr:hover{background:rgba(var(--dcf-color-primary-rgb),.05);cursor:pointer}.dcf-table tbody tr:not(:last-child){border-bottom:1px solid var(--dcf-color-gray-2)}.dcf-table tbody td{padding:1rem 1.125rem;font-size:.875rem}.dcf-table tbody td:first-child{font-weight:600}.dcf-table tbody td.dcf-col-actions{padding-top:0!important;padding-bottom:0!important}.dcf-table tfoot{font-size:.85rem}.dcf-table tfoot td{padding:.875rem 1.125rem;border-top:1px solid 1px solid var(--dcf-color-gray-2)}.dcf-select-filter-container{min-width:200px}.dcf-buttons-grid{margin-top:var(--dcf-margin-medium);margin-bottom:var(--dcf-margin)}@media (max-width: 480px){.dcf-buttons-grid{flex-direction:row-reverse!important}.dcf-buttons-grid>div{width:100%}.dcf-buttons-grid>div+div{margin-top:1rem}.dcf-buttons-grid ion-button{width:100%}}ion-select{margin-top:.5rem;max-height:40px!important}ion-select ion-button{transform:scale(.75)!important;margin:0!important}\n"] }]
|
|
14090
14073
|
}], propDecorators: { filterModel: [{
|
|
14091
14074
|
type: Input
|
|
14092
14075
|
}], filterOptions: [{
|
|
@@ -14227,13 +14210,13 @@ class NgxEventHandler extends DecafEventHandler {
|
|
|
14227
14210
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
14228
14211
|
constructor() {
|
|
14229
14212
|
super();
|
|
14230
|
-
|
|
14231
|
-
this.readonly = false;
|
|
14213
|
+
this._data = null;
|
|
14232
14214
|
}
|
|
14233
14215
|
async handle(event, data, instance, ...args) {
|
|
14234
14216
|
this.log.for(this.handle).info(`Handle called with args: ${event}, ${data}, ${instance}`);
|
|
14235
14217
|
}
|
|
14236
14218
|
from(...args) {
|
|
14219
|
+
this.log.for(this.process).info(`Process called with args: ${args}`);
|
|
14237
14220
|
return this;
|
|
14238
14221
|
}
|
|
14239
14222
|
async process(...args) {
|
|
@@ -14377,5 +14360,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
14377
14360
|
* Generated bundle index. Do not edit.
|
|
14378
14361
|
*/
|
|
14379
14362
|
|
|
14380
|
-
export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent,
|
|
14363
|
+
export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_FLAVOUR_TOKEN, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, ModalComponent, ModalConfirmComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxRouterService, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SelectFieldInterfaces, SteppedFormComponent, TableComponent, WindowColorSchemes, cleanSpaces, dataMapper, decafPageTransition, filterString, formatDate, generateRandomValue, getDbAdapterFlavour, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getMenuIcon, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxModalCrudComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, presentModalConfirm, presentNgxInlineModal, presentNgxLightBoxModal, provideDecafDarkMode, provideDecafDbAdapter, provideDecafDynamicComponents, provideDecafI18nConfig, provideDecafI18nLoader, provideDecafPageTransition, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
|
|
14381
14364
|
//# sourceMappingURL=decaf-ts-for-angular.mjs.map
|