@solcre-org/core-ui 2.14.5 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14786,12 +14786,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
14786
14786
  // Este archivo es generado automáticamente por scripts/update-version.js
14787
14787
  // No edites manualmente este archivo
14788
14788
  const VERSION = {
14789
- full: '2.14.5',
14789
+ full: '2.15.0',
14790
14790
  major: 2,
14791
- minor: 14,
14792
- patch: 5,
14793
- timestamp: '2025-10-03T11:47:24.181Z',
14794
- buildDate: '3/10/2025'
14791
+ minor: 15,
14792
+ patch: 0,
14793
+ timestamp: '2025-10-07T17:43:16.025Z',
14794
+ buildDate: '7/10/2025'
14795
14795
  };
14796
14796
 
14797
14797
  class MainNavComponent {
@@ -16412,6 +16412,262 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
16412
16412
  args: [{ providedIn: 'root' }]
16413
16413
  }] });
16414
16414
 
16415
+ class CustomClassService {
16416
+ rendererFactory;
16417
+ dataStore;
16418
+ renderer;
16419
+ STORE_KEY = 'custom-class-operations';
16420
+ operationCounter = 0;
16421
+ constructor(rendererFactory, dataStore) {
16422
+ this.rendererFactory = rendererFactory;
16423
+ this.dataStore = dataStore;
16424
+ this.renderer = this.rendererFactory.createRenderer(null, null);
16425
+ // Initialize the store
16426
+ this.dataStore.hydrate(this.STORE_KEY, []);
16427
+ }
16428
+ ngOnDestroy() {
16429
+ this.clearHistory();
16430
+ this.dataStore.removeStore(this.STORE_KEY);
16431
+ }
16432
+ addClass(target, classNames, parent) {
16433
+ const elements = this.resolveElements(target, parent);
16434
+ if (elements.length === 0) {
16435
+ this.recordOperation('add', target, classNames, false);
16436
+ return false;
16437
+ }
16438
+ const classes = Array.isArray(classNames) ? classNames : [classNames];
16439
+ elements.forEach(element => {
16440
+ classes.forEach(className => {
16441
+ if (className && className.trim()) {
16442
+ this.renderer.addClass(element, className.trim());
16443
+ }
16444
+ });
16445
+ });
16446
+ this.recordOperation('add', target, classes, true);
16447
+ return true;
16448
+ }
16449
+ removeClass(target, classNames, parent) {
16450
+ const elements = this.resolveElements(target, parent);
16451
+ if (elements.length === 0) {
16452
+ this.recordOperation('remove', target, classNames, false);
16453
+ return false;
16454
+ }
16455
+ const classes = Array.isArray(classNames) ? classNames : [classNames];
16456
+ elements.forEach(element => {
16457
+ classes.forEach(className => {
16458
+ if (className && className.trim()) {
16459
+ this.renderer.removeClass(element, className.trim());
16460
+ }
16461
+ });
16462
+ });
16463
+ this.recordOperation('remove', target, classes, true);
16464
+ return true;
16465
+ }
16466
+ toggleClass(target, classNames, parent) {
16467
+ const elements = this.resolveElements(target, parent);
16468
+ if (elements.length === 0) {
16469
+ this.recordOperation('toggle', target, classNames, false);
16470
+ return false;
16471
+ }
16472
+ const classes = Array.isArray(classNames) ? classNames : [classNames];
16473
+ elements.forEach(element => {
16474
+ classes.forEach(className => {
16475
+ if (className && className.trim()) {
16476
+ const trimmedClass = className.trim();
16477
+ if (element.classList.contains(trimmedClass)) {
16478
+ this.renderer.removeClass(element, trimmedClass);
16479
+ }
16480
+ else {
16481
+ this.renderer.addClass(element, trimmedClass);
16482
+ }
16483
+ }
16484
+ });
16485
+ });
16486
+ this.recordOperation('toggle', target, classes, true);
16487
+ return true;
16488
+ }
16489
+ hasClass(target, className, parent) {
16490
+ const elements = this.resolveElements(target, parent);
16491
+ if (elements.length === 0) {
16492
+ return false;
16493
+ }
16494
+ const element = elements[0];
16495
+ return element.classList.contains(className.trim());
16496
+ }
16497
+ replaceClass(target, oldClass, newClass, parent) {
16498
+ const elements = this.resolveElements(target, parent);
16499
+ if (elements.length === 0) {
16500
+ this.recordOperation('replace', target, [newClass], false, oldClass);
16501
+ return false;
16502
+ }
16503
+ elements.forEach(element => {
16504
+ if (oldClass && oldClass.trim()) {
16505
+ this.renderer.removeClass(element, oldClass.trim());
16506
+ }
16507
+ if (newClass && newClass.trim()) {
16508
+ this.renderer.addClass(element, newClass.trim());
16509
+ }
16510
+ });
16511
+ this.recordOperation('replace', target, [newClass], true, oldClass);
16512
+ return true;
16513
+ }
16514
+ setClass(target, classNames, parent) {
16515
+ const elements = this.resolveElements(target, parent);
16516
+ if (elements.length === 0) {
16517
+ this.recordOperation('set', target, classNames, false);
16518
+ return false;
16519
+ }
16520
+ const classes = Array.isArray(classNames) ? classNames : [classNames];
16521
+ elements.forEach(element => {
16522
+ // Clear all existing classes
16523
+ element.className = '';
16524
+ // Add new classes
16525
+ classes.forEach(className => {
16526
+ if (className && className.trim()) {
16527
+ this.renderer.addClass(element, className.trim());
16528
+ }
16529
+ });
16530
+ });
16531
+ this.recordOperation('set', target, classes, true);
16532
+ return true;
16533
+ }
16534
+ resolveElements(target, parent) {
16535
+ let searchContext = document;
16536
+ // Resolve parent context if provided
16537
+ if (parent) {
16538
+ if (parent instanceof ElementRef) {
16539
+ searchContext = parent.nativeElement;
16540
+ }
16541
+ else if (parent instanceof HTMLElement) {
16542
+ searchContext = parent;
16543
+ }
16544
+ else if (parent && parent.nativeElement instanceof HTMLElement) {
16545
+ searchContext = parent.nativeElement;
16546
+ }
16547
+ else if (typeof parent === 'string') {
16548
+ const parentElement = document.querySelector(parent);
16549
+ if (parentElement instanceof HTMLElement) {
16550
+ searchContext = parentElement;
16551
+ }
16552
+ }
16553
+ }
16554
+ // ElementRef from ViewChild
16555
+ if (target instanceof ElementRef) {
16556
+ const element = target.nativeElement;
16557
+ // If parent is specified, check if element is within parent
16558
+ if (parent && searchContext !== document) {
16559
+ return searchContext.contains(element) ? [element] : [];
16560
+ }
16561
+ return [element];
16562
+ }
16563
+ // Direct HTMLElement
16564
+ if (target instanceof HTMLElement) {
16565
+ // If parent is specified, check if element is within parent
16566
+ if (parent && searchContext !== document) {
16567
+ return searchContext.contains(target) ? [target] : [];
16568
+ }
16569
+ return [target];
16570
+ }
16571
+ // NodeList or HTMLCollection
16572
+ if (target instanceof NodeList || target instanceof HTMLCollection) {
16573
+ const elements = Array.from(target);
16574
+ // Filter by parent if specified
16575
+ if (parent && searchContext !== document) {
16576
+ return elements.filter(el => searchContext.contains(el));
16577
+ }
16578
+ return elements;
16579
+ }
16580
+ // CSS Selector string
16581
+ if (typeof target === 'string') {
16582
+ const elements = searchContext.querySelectorAll(target);
16583
+ return Array.from(elements);
16584
+ }
16585
+ // If it has a nativeElement property (custom wrapper)
16586
+ if (target && target.nativeElement instanceof HTMLElement) {
16587
+ const element = target.nativeElement;
16588
+ // If parent is specified, check if element is within parent
16589
+ if (parent && searchContext !== document) {
16590
+ return searchContext.contains(element) ? [element] : [];
16591
+ }
16592
+ return [element];
16593
+ }
16594
+ return [];
16595
+ }
16596
+ recordOperation(operation, target, classNames, success, oldClass) {
16597
+ const classes = Array.isArray(classNames) ? classNames : [classNames];
16598
+ const targetId = this.getTargetIdentifier(target);
16599
+ const record = {
16600
+ id: `op-${++this.operationCounter}-${Date.now()}`,
16601
+ timestamp: Date.now(),
16602
+ operation,
16603
+ target: targetId,
16604
+ classNames: classes,
16605
+ oldClass,
16606
+ success
16607
+ };
16608
+ this.dataStore.upsertOne(this.STORE_KEY, record);
16609
+ }
16610
+ getTargetIdentifier(target) {
16611
+ if (typeof target === 'string') {
16612
+ return target;
16613
+ }
16614
+ if (target instanceof ElementRef) {
16615
+ return this.getElementSelector(target.nativeElement);
16616
+ }
16617
+ if (target instanceof HTMLElement) {
16618
+ return this.getElementSelector(target);
16619
+ }
16620
+ if (target && target.nativeElement instanceof HTMLElement) {
16621
+ return this.getElementSelector(target.nativeElement);
16622
+ }
16623
+ return 'unknown-target';
16624
+ }
16625
+ getElementSelector(element) {
16626
+ if (element.id) {
16627
+ return `#${element.id}`;
16628
+ }
16629
+ const classes = Array.from(element.classList).join('.');
16630
+ if (classes) {
16631
+ return `.${classes}`;
16632
+ }
16633
+ return element.tagName.toLowerCase();
16634
+ }
16635
+ getOperationHistory() {
16636
+ return [...this.dataStore.selectAll(this.STORE_KEY)()];
16637
+ }
16638
+ getOperationsByType(operation) {
16639
+ return this.getOperationHistory().filter(op => op.operation === operation);
16640
+ }
16641
+ getOperationsByTarget(target) {
16642
+ return this.getOperationHistory().filter(op => op.target === target);
16643
+ }
16644
+ getSuccessfulOperations() {
16645
+ return this.getOperationHistory().filter(op => op.success);
16646
+ }
16647
+ getFailedOperations() {
16648
+ return this.getOperationHistory().filter(op => !op.success);
16649
+ }
16650
+ getOperationCount() {
16651
+ return this.dataStore.count(this.STORE_KEY);
16652
+ }
16653
+ clearHistory() {
16654
+ this.dataStore.clear(this.STORE_KEY);
16655
+ this.operationCounter = 0;
16656
+ }
16657
+ getRecentOperations(limit = 10) {
16658
+ const all = this.getOperationHistory();
16659
+ return all.slice(-limit).reverse();
16660
+ }
16661
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CustomClassService, deps: [{ token: i0.RendererFactory2 }, { token: DataStoreService }], target: i0.ɵɵFactoryTarget.Injectable });
16662
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CustomClassService, providedIn: 'root' });
16663
+ }
16664
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CustomClassService, decorators: [{
16665
+ type: Injectable,
16666
+ args: [{
16667
+ providedIn: 'root'
16668
+ }]
16669
+ }], ctorParameters: () => [{ type: i0.RendererFactory2 }, { type: DataStoreService }] });
16670
+
16415
16671
  const PERMISSION_RESOURCES_PROVIDER = new InjectionToken('PERMISSION_RESOURCES_PROVIDER');
16416
16672
  const PERMISSION_ACTIONS_PROVIDER = new InjectionToken('PERMISSION_ACTIONS_PROVIDER');
16417
16673
 
@@ -17997,5 +18253,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
17997
18253
  * Generated bundle index. Do not edit.
17998
18254
  */
17999
18255
 
18000
- export { ALL_COUNTRY_CODES, ActiveFiltersComponent, AgeValidationHelper, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, COMMON_COUNTRIES, CacheBustingInterceptor, CardComponent, CarouselComponent, ChatMessagePosition, ChatMessageType, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreManualRefreshComponent, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, CountryCode, DEFAULT_COUNTRIES, DataListComponent, DataListItemComponent, DataStoreService, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DocumentFieldComponent, DocumentFieldValidators, DocumentPayloadMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, DynamicFieldsHelper, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FilePreviewActionType, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, GalleryAnimationType, GalleryLayoutType, GalleryModalComponent, GalleryModalGlobalService, GenericButtonComponent, GenericChatComponent, GenericChatService, GenericDocumentationComponent, GenericGalleryComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericSkeletonComponent, GenericStepsComponent, GenericSwitchComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LATIN_AMERICA_COUNTRIES, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ManualRefreshService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, PhoneFieldComponent, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SOUTH_AMERICA_COUNTRIES, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SkeletonAnimation, SkeletonService, SkeletonSize, SkeletonType, SmartFieldComponent, SortDirection, SortMode, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TableSortService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UruguayanDocumentValidationHelper, UsersModel, VERSION, ageValidator, calculateAge, equalToValidator, generateRandomUruguayanDocument, getCountryCodeStrings, getLatestBirthDateForAge, getRandomCi, getUruguayanDocumentValidationDigit, getValidationDigit, isSameDate, isValidCountryCode, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader, random, transform, transformUruguayanDocument, uruguayanDocumentValidator, validate, validateAge, validateCi, validateUruguayanDocument, validationDigit };
18256
+ export { ALL_COUNTRY_CODES, ActiveFiltersComponent, AgeValidationHelper, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, COMMON_COUNTRIES, CacheBustingInterceptor, CardComponent, CarouselComponent, ChatMessagePosition, ChatMessageType, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreManualRefreshComponent, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, CountryCode, CustomClassService, DEFAULT_COUNTRIES, DataListComponent, DataListItemComponent, DataStoreService, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DocumentFieldComponent, DocumentFieldValidators, DocumentPayloadMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, DynamicFieldsHelper, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FilePreviewActionType, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, GalleryAnimationType, GalleryLayoutType, GalleryModalComponent, GalleryModalGlobalService, GenericButtonComponent, GenericChatComponent, GenericChatService, GenericDocumentationComponent, GenericGalleryComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericSkeletonComponent, GenericStepsComponent, GenericSwitchComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LATIN_AMERICA_COUNTRIES, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ManualRefreshService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, PhoneFieldComponent, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SOUTH_AMERICA_COUNTRIES, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SkeletonAnimation, SkeletonService, SkeletonSize, SkeletonType, SmartFieldComponent, SortDirection, SortMode, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TableSortService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UruguayanDocumentValidationHelper, UsersModel, VERSION, ageValidator, calculateAge, equalToValidator, generateRandomUruguayanDocument, getCountryCodeStrings, getLatestBirthDateForAge, getRandomCi, getUruguayanDocumentValidationDigit, getValidationDigit, isSameDate, isValidCountryCode, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader, random, transform, transformUruguayanDocument, uruguayanDocumentValidator, validate, validateAge, validateCi, validateUruguayanDocument, validationDigit };
18001
18257
  //# sourceMappingURL=solcre-org-core-ui.mjs.map