@wemake4u/form-player-se 1.0.39 → 1.0.41

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.
Files changed (86) hide show
  1. package/esm2022/lib/builtIn/builtIn.mjs +24 -0
  2. package/esm2022/lib/builtIn/console.json +253 -0
  3. package/esm2022/lib/builtIn/dialog.json +109 -0
  4. package/esm2022/lib/builtIn/feel.json +26 -0
  5. package/esm2022/lib/builtIn/form.json +172 -0
  6. package/esm2022/lib/builtIn/formGroup.json +218 -0
  7. package/esm2022/lib/builtIn/formatter.json +112 -0
  8. package/esm2022/lib/builtIn/function.json +53 -0
  9. package/esm2022/lib/builtIn/register.json +14 -0
  10. package/esm2022/lib/components/setFilter/setFilter.component.mjs +35 -5
  11. package/esm2022/lib/controls/accordion.mjs +50 -3
  12. package/esm2022/lib/controls/control.mjs +70 -25
  13. package/esm2022/lib/controls/factory.mjs +42 -42
  14. package/esm2022/lib/controls/tab.mjs +47 -25
  15. package/esm2022/lib/controls/table.mjs +89 -15
  16. package/esm2022/lib/controls/textfield.mjs +4 -3
  17. package/esm2022/lib/directives/accordionpanel.directive.mjs +10 -5
  18. package/esm2022/lib/directives/collapse.directive.mjs +22 -12
  19. package/esm2022/lib/directives/collapsepatch.directive.mjs +2 -1
  20. package/esm2022/lib/directives/datetime.directive.mjs +18 -21
  21. package/esm2022/lib/directives/dropdown.directive.mjs +31 -16
  22. package/esm2022/lib/directives/grid.directive.mjs +10 -8
  23. package/esm2022/lib/directives/readonly.directive.mjs +10 -9
  24. package/esm2022/lib/directives/register.directive.mjs +32 -15
  25. package/esm2022/lib/directives/required.directive.mjs +57 -0
  26. package/esm2022/lib/directives/tabcontrol.directive.mjs +10 -9
  27. package/esm2022/lib/dynamic-fields/dynamic-fields.component.mjs +28 -5
  28. package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +46 -21
  29. package/esm2022/lib/dynamic-host/dynamic-host.component.mjs +32 -10
  30. package/esm2022/lib/services/event.service.mjs +17 -6
  31. package/esm2022/lib/services/formatter.service.mjs +3 -1
  32. package/esm2022/lib/services/grid.service.mjs +4 -1
  33. package/esm2022/lib/services/listener.service.mjs +23 -0
  34. package/esm2022/lib/services/navigation.service.mjs +35 -0
  35. package/esm2022/lib/services/programmability.service.mjs +54 -38
  36. package/esm2022/lib/services/register.service.mjs +40 -2
  37. package/esm2022/lib/services/state.service.mjs +40 -0
  38. package/esm2022/lib/services/status.service.mjs +10 -5
  39. package/esm2022/lib/services/subscribe.service.mjs +54 -0
  40. package/esm2022/lib/services/validation.service.mjs +11 -2
  41. package/esm2022/lib/utils/deepEqual.mjs +46 -0
  42. package/esm2022/lib/utils/navigation.mjs +20 -0
  43. package/esm2022/lib/utils/observable.mjs +7 -0
  44. package/esm2022/lib/utils/patch.mjs +17 -0
  45. package/esm2022/lib/utils/proxy.mjs +28 -1
  46. package/esm2022/lib/utils/resolveRefs.mjs +67 -0
  47. package/esm2022/public-api.mjs +7 -1
  48. package/fesm2022/wemake4u-form-player-se.mjs +2027 -276
  49. package/fesm2022/wemake4u-form-player-se.mjs.map +1 -1
  50. package/lib/builtIn/builtIn.d.ts +32 -0
  51. package/lib/components/setFilter/setFilter.component.d.ts +1 -0
  52. package/lib/controls/accordion.d.ts +5 -1
  53. package/lib/controls/control.d.ts +31 -12
  54. package/lib/controls/factory.d.ts +2 -4
  55. package/lib/controls/tab.d.ts +9 -6
  56. package/lib/controls/table.d.ts +16 -5
  57. package/lib/controls/textfield.d.ts +1 -1
  58. package/lib/directives/accordionpanel.directive.d.ts +4 -2
  59. package/lib/directives/collapse.directive.d.ts +5 -3
  60. package/lib/directives/datetime.directive.d.ts +7 -8
  61. package/lib/directives/dropdown.directive.d.ts +6 -3
  62. package/lib/directives/grid.directive.d.ts +4 -3
  63. package/lib/directives/readonly.directive.d.ts +3 -4
  64. package/lib/directives/register.directive.d.ts +4 -3
  65. package/lib/directives/required.directive.d.ts +17 -0
  66. package/lib/directives/tabcontrol.directive.d.ts +5 -6
  67. package/lib/dynamic-fields/dynamic-fields.component.d.ts +4 -1
  68. package/lib/dynamic-form/dynamic-form.component.d.ts +4 -1
  69. package/lib/dynamic-host/dynamic-host.component.d.ts +6 -2
  70. package/lib/services/event.service.d.ts +8 -2
  71. package/lib/services/listener.service.d.ts +11 -0
  72. package/lib/services/navigation.service.d.ts +11 -0
  73. package/lib/services/programmability.service.d.ts +8 -9
  74. package/lib/services/register.service.d.ts +9 -0
  75. package/lib/services/state.service.d.ts +14 -0
  76. package/lib/services/status.service.d.ts +5 -1
  77. package/lib/services/subscribe.service.d.ts +14 -0
  78. package/lib/services/validation.service.d.ts +5 -2
  79. package/lib/utils/deepEqual.d.ts +1 -0
  80. package/lib/utils/navigation.d.ts +6 -0
  81. package/lib/utils/observable.d.ts +2 -0
  82. package/lib/utils/patch.d.ts +1 -0
  83. package/lib/utils/proxy.d.ts +2 -0
  84. package/lib/utils/resolveRefs.d.ts +12 -0
  85. package/package.json +1 -1
  86. package/public-api.d.ts +6 -0
@@ -1,11 +1,15 @@
1
+ import { DestroyRef } from '@angular/core';
1
2
  import { FormService } from './form.service';
2
3
  import { AbstractControl } from '@angular/forms';
3
4
  import { ProgrammabilityService } from '../services/programmability.service';
5
+ import { SubscribeService } from '../services/subscribe.service';
4
6
  import * as i0 from "@angular/core";
5
7
  export declare class StatusService {
6
8
  private programmability;
7
9
  private formService;
8
- constructor(programmability: ProgrammabilityService, formService: FormService);
10
+ private subscribeService;
11
+ private destroyRef;
12
+ constructor(programmability: ProgrammabilityService, formService: FormService, subscribeService: SubscribeService, destroyRef: DestroyRef);
9
13
  createCollection(): StatusCollection;
10
14
  addToCollection(collection: StatusCollection, control: AbstractControl): void;
11
15
  setupCollection(key: any, collection: StatusCollection): void;
@@ -0,0 +1,14 @@
1
+ import { DestroyRef } from '@angular/core';
2
+ import { AbstractControl } from '@angular/forms';
3
+ import { Observable } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SubscribeService {
6
+ get dispatchMode(): DispatchMode;
7
+ set dispatchMode(value: DispatchMode);
8
+ subscribeChanges<T>(observable$: Observable<T>, control: AbstractControl, initial: T, destroyRef: DestroyRef, callback: (() => void) | ((oldValue: T, newValue: T) => void), logFn?: (control: AbstractControl) => void): void;
9
+ private _dispatchMode;
10
+ private dispatch;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SubscribeService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<SubscribeService>;
13
+ }
14
+ export type DispatchMode = 'sync' | 'async';
@@ -1,15 +1,18 @@
1
1
  import { ProgrammabilityService } from '../services/programmability.service';
2
- import { AbstractControl, FormGroup } from '@angular/forms';
2
+ import { AbstractControl, FormGroup, ValidationErrors } from '@angular/forms';
3
3
  import { LanguageService } from '@wemake4u/interact';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class ValidationService {
6
6
  private languageService;
7
7
  private programmability;
8
8
  constructor(languageService: LanguageService, programmability: ProgrammabilityService);
9
- suppress: boolean;
9
+ private _suppress;
10
+ set suppress(value: boolean);
11
+ get suppress(): boolean;
10
12
  createCollection(): ValidationCollection;
11
13
  addToCollection(collection: ValidationCollection, control: AbstractControl, formGroup: FormGroup, component: any): void;
12
14
  setupCollection(collection: ValidationCollection): void;
15
+ validateRequired(control: AbstractControl): ValidationErrors | null;
13
16
  private canAddToCollection;
14
17
  private getRules;
15
18
  private validateRules;
@@ -0,0 +1 @@
1
+ export declare function deepEqual(a: any, b: any, visited?: WeakMap<object, any>): boolean;
@@ -0,0 +1,6 @@
1
+ import { Router } from '@angular/router';
2
+ export declare function navigateTo(router: Router, uri: string): void;
3
+ export declare function parseRoute(uri: string): {
4
+ route: string;
5
+ queryParams: Record<string, string>;
6
+ };
@@ -0,0 +1,2 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare function subscribeOnce<T>(source$: Observable<T>, next: (value: T) => void): void;
@@ -0,0 +1 @@
1
+ export declare function patchFunction<T extends object, K extends keyof T>(instance: T, methodName: K, wrapper: (this: T, args: any[], original: (...args: any[]) => any) => any): void;
@@ -1,2 +1,4 @@
1
1
  export declare function bindFunction(fn: Function, context: any): any;
2
2
  export declare function toProxy(instance: any, seen?: WeakMap<object, any>): any;
3
+ export declare function isProxy(value: any): boolean;
4
+ export declare function getTarget(value: any): any;
@@ -0,0 +1,12 @@
1
+ export interface RefContext {
2
+ parent: any;
3
+ key: string | number | null;
4
+ root: any;
5
+ }
6
+ export type RefResolver = (ref: string, ctx: RefContext) => any;
7
+ export type AsyncRefResolver = (ref: string, ctx: RefContext) => Promise<any>;
8
+ export interface ResolveRefsOptions {
9
+ mergeRef?: boolean;
10
+ }
11
+ export declare function resolveRefs<T>(input: T, resolver: RefResolver, options?: ResolveRefsOptions): T;
12
+ export declare function resolveRefsAsync<T>(input: T, resolver: AsyncRefResolver, options?: ResolveRefsOptions): Promise<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wemake4u/form-player-se",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "^18.2.0",
package/public-api.d.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  export * from './lib/dynamic-form/dynamic-form.component';
2
2
  export * from './lib/utils/toFormData';
3
3
  export * from './lib/utils/syncronize';
4
+ export * from './lib/utils/resolveRefs';
5
+ export * from './lib/utils/observable';
6
+ export * from './lib/utils/deepEqual';
7
+ export * from './lib/utils/navigation';
4
8
  export * from './lib/services/toast.service';
5
9
  export * from './lib/services/sanitize.service';
6
10
  export * from './lib/services/feel.service';
@@ -10,6 +14,8 @@ export * from './lib/services/scope.service';
10
14
  export * from './lib/services/dialog.service';
11
15
  export * from './lib/services/global.service';
12
16
  export * from './lib/services/form.service';
17
+ export * from './lib/services/navigation.service';
13
18
  export * from './lib/interact/confirmation';
14
19
  export * from './lib/interact/notification';
15
20
  export * from './lib/interact/prompt';
21
+ export * from './lib/builtIn/builtIn';