@osovitny/anatoly 2.14.42 → 2.14.43

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.
@@ -2238,220 +2238,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
2238
2238
  </file>
2239
2239
  */
2240
2240
 
2241
- /*
2242
- <file>
2243
- Project:
2244
- @osovitny/anatoly
2245
-
2246
- Authors:
2247
- Vadim Osovitny
2248
- Anatoly Osovitny
2249
-
2250
- Created:
2251
- 28 Aug 2018
2252
-
2253
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2254
- </file>
2255
- */
2256
- class BaseComponent {
2257
- constructor() {
2258
- this.subs = new Subs();
2259
- //Component Data => usually loading from API
2260
- this.dataLoading = true;
2261
- this.dataLoaded = false;
2262
- this.dataFound = false;
2263
- }
2264
- getQSId() {
2265
- let id = Utils.getValueByNameInQS("id");
2266
- if (typeof id === "undefined" || id == "")
2267
- return null;
2268
- return id;
2269
- }
2270
- ngOnDestroy() {
2271
- this.subs.unsubscribe();
2272
- }
2273
- }
2274
- BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2275
- BaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BaseComponent, selector: "ng-component", ngImport: i0, template: '', isInline: true });
2276
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseComponent, decorators: [{
2277
- type: Component,
2278
- args: [{
2279
- template: ''
2280
- }]
2281
- }] });
2282
-
2283
- /*
2284
- <file>
2285
- Project:
2286
- @osovitny/anatoly
2287
-
2288
- Authors:
2289
- Vadim Osovitny
2290
- Anatoly Osovitny
2291
-
2292
- Created:
2293
- 20 Nov 2017
2294
-
2295
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2296
- </file>
2297
- */
2298
- class BaseEditComponent extends BaseComponent {
2299
- constructor() {
2300
- super();
2301
- this.formSubmitted = false;
2302
- }
2303
- isActionAdding() {
2304
- let id = Utils.getValueByNameInQS("id");
2305
- return typeof id === "undefined" || id == "";
2306
- }
2307
- getEntityId() {
2308
- return this.getQSId();
2309
- }
2310
- isControlValid(name, frmGroup = null) {
2311
- return !this.isControlInvalid(name, frmGroup);
2312
- }
2313
- isControlInvalid(name, frmGroup = null) {
2314
- if (typeof name === "undefined" || name == "") {
2315
- return false;
2316
- }
2317
- let fg = frmGroup ? frmGroup : this.formGroup;
2318
- if (!fg) {
2319
- return false;
2320
- }
2321
- if (fg.get(name)) {
2322
- return ((this.formSubmitted && fg.get(name).invalid) ||
2323
- (fg.get(name).touched && fg.get(name).invalid));
2324
- }
2325
- return false;
2326
- }
2327
- //FormGroup functions
2328
- getFormValue(name, frmGroup = null) {
2329
- let fg = frmGroup ? frmGroup : this.formGroup;
2330
- return fg.controls[name].value;
2331
- }
2332
- setFormValue(name, value, frmGroup = null) {
2333
- let fg = frmGroup ? frmGroup : this.formGroup;
2334
- fg.controls[name].setValue(value);
2335
- }
2336
- getFormGroupValue(groupName, name, frmGroup = null) {
2337
- let fg = frmGroup ? frmGroup : this.formGroup;
2338
- return fg.controls[groupName].get(name).value;
2339
- }
2340
- setFormGroupValue(groupName, name, value, frmGroup = null) {
2341
- let fg = frmGroup ? frmGroup : this.formGroup;
2342
- fg.controls[groupName].get(name).setValue(value);
2343
- }
2344
- /**
2345
- * Add control to form group
2346
- * @param name
2347
- * @param formControl
2348
- * @param frmGroup
2349
- */
2350
- addControl(name, formControl, frmGroup = null) {
2351
- let fg = frmGroup ? frmGroup : this.formGroup;
2352
- fg.addControl(name, formControl);
2353
- }
2354
- /**
2355
- * Removes control from form group
2356
- * @param name
2357
- * @param frmGroup
2358
- */
2359
- removeControl(name, frmGroup = null) {
2360
- let fg = frmGroup ? frmGroup : this.formGroup;
2361
- if (fg.get(name)) {
2362
- fg.removeControl(name);
2363
- }
2364
- }
2365
- /**
2366
- * return new form control
2367
- * @param formState
2368
- * @param validatorOrOpts
2369
- * @param asyncValidator
2370
- */
2371
- createFormControl(formState, validatorOrOpts, asyncValidator) {
2372
- return new FormControl(formState, validatorOrOpts, asyncValidator);
2373
- }
2374
- /**
2375
- * Set error to control
2376
- * @param controlName formControl name
2377
- * @param err error expect {erroname: boolean} format
2378
- * @param frmGroup
2379
- */
2380
- setControlError(controlName, err, frmGroup = null) {
2381
- let fg = frmGroup ? frmGroup : this.formGroup;
2382
- fg.get(controlName)?.setErrors(err);
2383
- }
2384
- /**
2385
- * Set {invalid: true} for the specified form
2386
- * @param controlName form control name
2387
- * @param frmGroup
2388
- */
2389
- setInValidError(controlName, frmGroup = null) {
2390
- let fg = frmGroup ? frmGroup : this.formGroup;
2391
- fg.get(controlName)?.setErrors({ invalid: true });
2392
- }
2393
- /**
2394
- * returns formgroup controls.
2395
- * main use case is used in html pages
2396
- */
2397
- get fc() {
2398
- return this.formGroup.controls;
2399
- }
2400
- }
2401
- BaseEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2402
- BaseEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BaseEditComponent, selector: "ng-component", inputs: { formGroup: "formGroup", formSubmitted: "formSubmitted" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
2403
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseEditComponent, decorators: [{
2404
- type: Component,
2405
- args: [{
2406
- template: ''
2407
- }]
2408
- }], ctorParameters: function () { return []; }, propDecorators: { formGroup: [{
2409
- type: Input
2410
- }], formSubmitted: [{
2411
- type: Input
2412
- }] } });
2413
-
2414
- /*
2415
- <file>
2416
- Project:
2417
- @osovitny/anatoly
2418
-
2419
- Authors:
2420
- Vadim Osovitny
2421
- Anatoly Osovitny
2422
-
2423
- Created:
2424
- 24 Jan 2022
2425
-
2426
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2427
- </file>
2428
- */
2429
- class BaseDialog extends BaseEditComponent {
2430
- constructor() {
2431
- super();
2432
- this._opened = false;
2433
- }
2434
- get opened() {
2435
- return this._opened;
2436
- }
2437
- open() {
2438
- this._opened = true;
2439
- }
2440
- close() {
2441
- this._opened = false;
2442
- }
2443
- }
2444
- BaseDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
2445
- BaseDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BaseDialog, selector: "ng-component", inputs: { opened: "opened" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
2446
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseDialog, decorators: [{
2447
- type: Component,
2448
- args: [{
2449
- template: ''
2450
- }]
2451
- }], ctorParameters: function () { return []; }, propDecorators: { opened: [{
2452
- type: Input
2453
- }] } });
2454
-
2455
2241
  /*
2456
2242
  <file>
2457
2243
  Project:
@@ -2592,6 +2378,157 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
2592
2378
  type: Output
2593
2379
  }] } });
2594
2380
 
2381
+ /*
2382
+ <file>
2383
+ Project:
2384
+ @osovitny/anatoly
2385
+
2386
+ Authors:
2387
+ Vadim Osovitny
2388
+ Anatoly Osovitny
2389
+
2390
+ Created:
2391
+ 29 July 2022
2392
+
2393
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2394
+ </file>
2395
+ */
2396
+ class CardComponent {
2397
+ }
2398
+ CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2399
+ CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: CardComponent, selector: "anatoly-card", inputs: { class: "class" }, ngImport: i0, template: "<div class='card {{class}}'>\r\n <ng-content select='mex-card-header'></ng-content>\r\n <ng-content select='mex-card-body'></ng-content>\r\n <ng-content></ng-content>\r\n <ng-content select='mex-card-footer'></ng-content>\r\n</div>\r\n" });
2400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardComponent, decorators: [{
2401
+ type: Component,
2402
+ args: [{ selector: 'anatoly-card', template: "<div class='card {{class}}'>\r\n <ng-content select='mex-card-header'></ng-content>\r\n <ng-content select='mex-card-body'></ng-content>\r\n <ng-content></ng-content>\r\n <ng-content select='mex-card-footer'></ng-content>\r\n</div>\r\n" }]
2403
+ }], propDecorators: { class: [{
2404
+ type: Input
2405
+ }] } });
2406
+
2407
+ /*
2408
+ <file>
2409
+ Project:
2410
+ @osovitny/anatoly
2411
+
2412
+ Authors:
2413
+ Vadim Osovitny
2414
+ Anatoly Osovitny
2415
+
2416
+ Created:
2417
+ 29 July 2022
2418
+
2419
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2420
+ </file>
2421
+ */
2422
+ class CardHeaderComponent {
2423
+ constructor() {
2424
+ this.isTitleVisible = false;
2425
+ }
2426
+ set title(val) {
2427
+ if (val) {
2428
+ this.isTitleVisible = true;
2429
+ this.titleValue = val;
2430
+ }
2431
+ }
2432
+ ngOnInit() {
2433
+ if (this.title)
2434
+ this.isTitleVisible = true;
2435
+ }
2436
+ }
2437
+ CardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2438
+ CardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: CardHeaderComponent, selector: "anatoly-card-header", inputs: { class: "class", title: "title" }, ngImport: i0, template: "<div class='card-header {{class}}'>\r\n <h3 *ngIf='isTitleVisible' class='card-title'>{{titleValue}}</h3>\r\n <ng-content></ng-content>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardHeaderComponent, decorators: [{
2440
+ type: Component,
2441
+ args: [{ selector: 'anatoly-card-header', template: "<div class='card-header {{class}}'>\r\n <h3 *ngIf='isTitleVisible' class='card-title'>{{titleValue}}</h3>\r\n <ng-content></ng-content>\r\n</div>\r\n" }]
2442
+ }], propDecorators: { class: [{
2443
+ type: Input
2444
+ }], title: [{
2445
+ type: Input
2446
+ }] } });
2447
+
2448
+ /*
2449
+ <file>
2450
+ Project:
2451
+ @osovitny/anatoly
2452
+
2453
+ Authors:
2454
+ Vadim Osovitny
2455
+ Anatoly Osovitny
2456
+
2457
+ Created:
2458
+ 29 July 2022
2459
+
2460
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2461
+ </file>
2462
+ */
2463
+ class CardBodyComponent {
2464
+ }
2465
+ CardBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2466
+ CardBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: CardBodyComponent, selector: "anatoly-card-body", inputs: { class: "class", styles: "styles" }, ngImport: i0, template: "<div class='card-body {{class}}'>\r\n <ng-content></ng-content>\r\n</div>\r\n" });
2467
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardBodyComponent, decorators: [{
2468
+ type: Component,
2469
+ args: [{ selector: 'anatoly-card-body', template: "<div class='card-body {{class}}'>\r\n <ng-content></ng-content>\r\n</div>\r\n" }]
2470
+ }], propDecorators: { class: [{
2471
+ type: Input
2472
+ }], styles: [{
2473
+ type: Input
2474
+ }] } });
2475
+
2476
+ /*
2477
+ <file>
2478
+ Project:
2479
+ @osovitny/anatoly
2480
+
2481
+ Authors:
2482
+ Vadim Osovitny
2483
+ Anatoly Osovitny
2484
+
2485
+ Created:
2486
+ 29 July 2022
2487
+
2488
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2489
+ </file>
2490
+ */
2491
+ class CardFooterComponent {
2492
+ }
2493
+ CardFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2494
+ CardFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: CardFooterComponent, selector: "anatoly-card-footer", inputs: { class: "class" }, ngImport: i0, template: "<div class='card-footer {{class}}'>\r\n <ng-content></ng-content>\r\n</div>\r\n" });
2495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardFooterComponent, decorators: [{
2496
+ type: Component,
2497
+ args: [{ selector: 'anatoly-card-footer', template: "<div class='card-footer {{class}}'>\r\n <ng-content></ng-content>\r\n</div>\r\n" }]
2498
+ }], propDecorators: { class: [{
2499
+ type: Input
2500
+ }] } });
2501
+
2502
+ /*
2503
+ <file>
2504
+ Project:
2505
+ @osovitny/anatoly
2506
+
2507
+ Authors:
2508
+ Vadim Osovitny
2509
+ Anatoly Osovitny
2510
+
2511
+ Created:
2512
+ 15 Aug 2022
2513
+
2514
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2515
+ </file>
2516
+ */
2517
+ class CheckIconComponent {
2518
+ constructor() {
2519
+ //Inputs
2520
+ this.checked = true;
2521
+ }
2522
+ }
2523
+ CheckIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CheckIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2524
+ CheckIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: CheckIconComponent, selector: "anatoly-check-icon", inputs: { checked: "checked" }, ngImport: i0, template: "<i class='fas' [ngClass]=\"{ 'fa-check-circle text-success': checked, 'fa-times-circle text-danger':!checked }\"></i>\r\n<ng-content></ng-content>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CheckIconComponent, decorators: [{
2526
+ type: Component,
2527
+ args: [{ selector: 'anatoly-check-icon', template: "<i class='fas' [ngClass]=\"{ 'fa-check-circle text-success': checked, 'fa-times-circle text-danger':!checked }\"></i>\r\n<ng-content></ng-content>\r\n" }]
2528
+ }], ctorParameters: function () { return []; }, propDecorators: { checked: [{
2529
+ type: Input
2530
+ }] } });
2531
+
2595
2532
  /*
2596
2533
  <file>
2597
2534
  Project:
@@ -2678,6 +2615,179 @@ const DefaultEditorOptions = {
2678
2615
  imageUploadParams: { uploadType: "", uploadParentId: "" },
2679
2616
  };
2680
2617
 
2618
+ /*
2619
+ <file>
2620
+ Project:
2621
+ @osovitny/anatoly
2622
+
2623
+ Authors:
2624
+ Vadim Osovitny
2625
+ Anatoly Osovitny
2626
+
2627
+ Created:
2628
+ 28 Aug 2018
2629
+
2630
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2631
+ </file>
2632
+ */
2633
+ class BaseComponent {
2634
+ constructor() {
2635
+ this.subs = new Subs();
2636
+ //Component Data => usually loading from API
2637
+ this.dataLoading = true;
2638
+ this.dataLoaded = false;
2639
+ this.dataFound = false;
2640
+ }
2641
+ getQSId() {
2642
+ let id = Utils.getValueByNameInQS("id");
2643
+ if (typeof id === "undefined" || id == "")
2644
+ return null;
2645
+ return id;
2646
+ }
2647
+ ngOnDestroy() {
2648
+ this.subs.unsubscribe();
2649
+ }
2650
+ }
2651
+ BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2652
+ BaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BaseComponent, selector: "ng-component", ngImport: i0, template: '', isInline: true });
2653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseComponent, decorators: [{
2654
+ type: Component,
2655
+ args: [{
2656
+ template: ''
2657
+ }]
2658
+ }] });
2659
+
2660
+ /*
2661
+ <file>
2662
+ Project:
2663
+ @osovitny/anatoly
2664
+
2665
+ Authors:
2666
+ Vadim Osovitny
2667
+ Anatoly Osovitny
2668
+
2669
+ Created:
2670
+ 20 Nov 2017
2671
+
2672
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2673
+ </file>
2674
+ */
2675
+ class BaseEditComponent extends BaseComponent {
2676
+ constructor() {
2677
+ super();
2678
+ this.formSubmitted = false;
2679
+ }
2680
+ isActionAdding() {
2681
+ let id = Utils.getValueByNameInQS("id");
2682
+ return typeof id === "undefined" || id == "";
2683
+ }
2684
+ getEntityId() {
2685
+ return this.getQSId();
2686
+ }
2687
+ isControlValid(name, frmGroup = null) {
2688
+ return !this.isControlInvalid(name, frmGroup);
2689
+ }
2690
+ isControlInvalid(name, frmGroup = null) {
2691
+ if (typeof name === "undefined" || name == "") {
2692
+ return false;
2693
+ }
2694
+ let fg = frmGroup ? frmGroup : this.formGroup;
2695
+ if (!fg) {
2696
+ return false;
2697
+ }
2698
+ if (fg.get(name)) {
2699
+ return ((this.formSubmitted && fg.get(name).invalid) ||
2700
+ (fg.get(name).touched && fg.get(name).invalid));
2701
+ }
2702
+ return false;
2703
+ }
2704
+ //FormGroup functions
2705
+ getFormValue(name, frmGroup = null) {
2706
+ let fg = frmGroup ? frmGroup : this.formGroup;
2707
+ return fg.controls[name].value;
2708
+ }
2709
+ setFormValue(name, value, frmGroup = null) {
2710
+ let fg = frmGroup ? frmGroup : this.formGroup;
2711
+ fg.controls[name].setValue(value);
2712
+ }
2713
+ getFormGroupValue(groupName, name, frmGroup = null) {
2714
+ let fg = frmGroup ? frmGroup : this.formGroup;
2715
+ return fg.controls[groupName].get(name).value;
2716
+ }
2717
+ setFormGroupValue(groupName, name, value, frmGroup = null) {
2718
+ let fg = frmGroup ? frmGroup : this.formGroup;
2719
+ fg.controls[groupName].get(name).setValue(value);
2720
+ }
2721
+ /**
2722
+ * Add control to form group
2723
+ * @param name
2724
+ * @param formControl
2725
+ * @param frmGroup
2726
+ */
2727
+ addControl(name, formControl, frmGroup = null) {
2728
+ let fg = frmGroup ? frmGroup : this.formGroup;
2729
+ fg.addControl(name, formControl);
2730
+ }
2731
+ /**
2732
+ * Removes control from form group
2733
+ * @param name
2734
+ * @param frmGroup
2735
+ */
2736
+ removeControl(name, frmGroup = null) {
2737
+ let fg = frmGroup ? frmGroup : this.formGroup;
2738
+ if (fg.get(name)) {
2739
+ fg.removeControl(name);
2740
+ }
2741
+ }
2742
+ /**
2743
+ * return new form control
2744
+ * @param formState
2745
+ * @param validatorOrOpts
2746
+ * @param asyncValidator
2747
+ */
2748
+ createFormControl(formState, validatorOrOpts, asyncValidator) {
2749
+ return new FormControl(formState, validatorOrOpts, asyncValidator);
2750
+ }
2751
+ /**
2752
+ * Set error to control
2753
+ * @param controlName formControl name
2754
+ * @param err error expect {erroname: boolean} format
2755
+ * @param frmGroup
2756
+ */
2757
+ setControlError(controlName, err, frmGroup = null) {
2758
+ let fg = frmGroup ? frmGroup : this.formGroup;
2759
+ fg.get(controlName)?.setErrors(err);
2760
+ }
2761
+ /**
2762
+ * Set {invalid: true} for the specified form
2763
+ * @param controlName form control name
2764
+ * @param frmGroup
2765
+ */
2766
+ setInValidError(controlName, frmGroup = null) {
2767
+ let fg = frmGroup ? frmGroup : this.formGroup;
2768
+ fg.get(controlName)?.setErrors({ invalid: true });
2769
+ }
2770
+ /**
2771
+ * returns formgroup controls.
2772
+ * main use case is used in html pages
2773
+ */
2774
+ get fc() {
2775
+ return this.formGroup.controls;
2776
+ }
2777
+ }
2778
+ BaseEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2779
+ BaseEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BaseEditComponent, selector: "ng-component", inputs: { formGroup: "formGroup", formSubmitted: "formSubmitted" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
2780
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseEditComponent, decorators: [{
2781
+ type: Component,
2782
+ args: [{
2783
+ template: ''
2784
+ }]
2785
+ }], ctorParameters: function () { return []; }, propDecorators: { formGroup: [{
2786
+ type: Input
2787
+ }], formSubmitted: [{
2788
+ type: Input
2789
+ }] } });
2790
+
2681
2791
  /*
2682
2792
  <file>
2683
2793
  Project:
@@ -3210,40 +3320,38 @@ const Spinkit = {
3210
3320
  </file>
3211
3321
  */
3212
3322
  class PageSpinnerComponent {
3213
- constructor(router, document) {
3323
+ constructor(router) {
3214
3324
  this.router = router;
3215
- this.document = document;
3216
3325
  this.isSpinnerVisible = true;
3217
3326
  this.Spinkit = Spinkit;
3218
3327
  this.backgroundColor = '#2196f3';
3219
3328
  this.spinner = Spinkit.skLine;
3220
- this.router.events.subscribe({
3221
- next: (event) => {
3222
- if (event instanceof NavigationStart) {
3223
- this.isSpinnerVisible = true;
3224
- }
3225
- else if (event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError) {
3226
- this.isSpinnerVisible = false;
3227
- }
3228
- },
3229
- error: (e) => {
3230
- this.isSpinnerVisible = false;
3329
+ router.events.subscribe({
3330
+ next: (routerEvent) => {
3331
+ this.checkRouterEvent(routerEvent);
3231
3332
  }
3232
3333
  });
3233
3334
  }
3335
+ checkRouterEvent(routerEvent) {
3336
+ if (routerEvent instanceof NavigationStart) {
3337
+ this.isSpinnerVisible = true;
3338
+ }
3339
+ if (routerEvent instanceof NavigationEnd ||
3340
+ routerEvent instanceof NavigationCancel ||
3341
+ routerEvent instanceof NavigationError) {
3342
+ this.isSpinnerVisible = false;
3343
+ }
3344
+ }
3234
3345
  ngOnDestroy() {
3235
3346
  this.isSpinnerVisible = false;
3236
3347
  }
3237
3348
  }
3238
- PageSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PageSpinnerComponent, deps: [{ token: i1.Router }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
3349
+ PageSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PageSpinnerComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
3239
3350
  PageSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: PageSpinnerComponent, selector: "anatoly-pagespinner", inputs: { backgroundColor: "backgroundColor", spinner: "spinner" }, ngImport: i0, template: "<div id=\"http-loader\" *ngIf=\"isSpinnerVisible\">\r\n <div class=\"loader-bg\">\r\n <div class=\"sk-line-material\" [class.colored]=\"!backgroundColor\" *ngIf=\"spinner === Spinkit.skLine\">\r\n <div class=\"sk-child sk-bounce1\" [style.background-color]='backgroundColor'></div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
3240
3351
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PageSpinnerComponent, decorators: [{
3241
3352
  type: Component,
3242
3353
  args: [{ selector: 'anatoly-pagespinner', encapsulation: ViewEncapsulation.None, template: "<div id=\"http-loader\" *ngIf=\"isSpinnerVisible\">\r\n <div class=\"loader-bg\">\r\n <div class=\"sk-line-material\" [class.colored]=\"!backgroundColor\" *ngIf=\"spinner === Spinkit.skLine\">\r\n <div class=\"sk-child sk-bounce1\" [style.background-color]='backgroundColor'></div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
3243
- }], ctorParameters: function () { return [{ type: i1.Router }, { type: Document, decorators: [{
3244
- type: Inject,
3245
- args: [DOCUMENT]
3246
- }] }]; }, propDecorators: { backgroundColor: [{
3354
+ }], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: { backgroundColor: [{
3247
3355
  type: Input
3248
3356
  }], spinner: [{
3249
3357
  type: Input
@@ -3259,114 +3367,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
3259
3367
  Anatoly Osovitny
3260
3368
 
3261
3369
  Created:
3262
- 29 July 2022
3263
-
3264
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
3265
- </file>
3266
- */
3267
- class CardComponent {
3268
- }
3269
- CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3270
- CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: CardComponent, selector: "anatoly-card", inputs: { class: "class" }, ngImport: i0, template: "<div class='card {{class}}'>\r\n <ng-content select='mex-card-header'></ng-content>\r\n <ng-content select='mex-card-body'></ng-content>\r\n <ng-content></ng-content>\r\n <ng-content select='mex-card-footer'></ng-content>\r\n</div>\r\n" });
3271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardComponent, decorators: [{
3272
- type: Component,
3273
- args: [{ selector: 'anatoly-card', template: "<div class='card {{class}}'>\r\n <ng-content select='mex-card-header'></ng-content>\r\n <ng-content select='mex-card-body'></ng-content>\r\n <ng-content></ng-content>\r\n <ng-content select='mex-card-footer'></ng-content>\r\n</div>\r\n" }]
3274
- }], propDecorators: { class: [{
3275
- type: Input
3276
- }] } });
3277
-
3278
- /*
3279
- <file>
3280
- Project:
3281
- @osovitny/anatoly
3282
-
3283
- Authors:
3284
- Vadim Osovitny
3285
- Anatoly Osovitny
3286
-
3287
- Created:
3288
- 29 July 2022
3289
-
3370
+ 24 Jan 2022
3371
+
3290
3372
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
3291
3373
  </file>
3292
3374
  */
3293
- class CardHeaderComponent {
3375
+ class BaseDialog extends BaseEditComponent {
3294
3376
  constructor() {
3295
- this.isTitleVisible = false;
3377
+ super();
3378
+ this._opened = false;
3296
3379
  }
3297
- set title(val) {
3298
- if (val) {
3299
- this.isTitleVisible = true;
3300
- this.titleValue = val;
3301
- }
3380
+ get opened() {
3381
+ return this._opened;
3302
3382
  }
3303
- ngOnInit() {
3304
- if (this.title)
3305
- this.isTitleVisible = true;
3383
+ open() {
3384
+ this._opened = true;
3385
+ }
3386
+ close() {
3387
+ this._opened = false;
3306
3388
  }
3307
3389
  }
3308
- CardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3309
- CardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: CardHeaderComponent, selector: "anatoly-card-header", inputs: { class: "class", title: "title" }, ngImport: i0, template: "<div class='card-header {{class}}'>\r\n <h3 *ngIf='isTitleVisible' class='card-title'>{{titleValue}}</h3>\r\n <ng-content></ng-content>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardHeaderComponent, decorators: [{
3311
- type: Component,
3312
- args: [{ selector: 'anatoly-card-header', template: "<div class='card-header {{class}}'>\r\n <h3 *ngIf='isTitleVisible' class='card-title'>{{titleValue}}</h3>\r\n <ng-content></ng-content>\r\n</div>\r\n" }]
3313
- }], propDecorators: { class: [{
3314
- type: Input
3315
- }], title: [{
3316
- type: Input
3317
- }] } });
3318
-
3319
- /*
3320
- <file>
3321
- Project:
3322
- @osovitny/anatoly
3323
-
3324
- Authors:
3325
- Vadim Osovitny
3326
- Anatoly Osovitny
3327
-
3328
- Created:
3329
- 29 July 2022
3330
-
3331
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
3332
- </file>
3333
- */
3334
- class CardBodyComponent {
3335
- }
3336
- CardBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3337
- CardBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: CardBodyComponent, selector: "anatoly-card-body", inputs: { class: "class", styles: "styles" }, ngImport: i0, template: "<div class='card-body {{class}}'>\r\n <ng-content></ng-content>\r\n</div>\r\n" });
3338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardBodyComponent, decorators: [{
3339
- type: Component,
3340
- args: [{ selector: 'anatoly-card-body', template: "<div class='card-body {{class}}'>\r\n <ng-content></ng-content>\r\n</div>\r\n" }]
3341
- }], propDecorators: { class: [{
3342
- type: Input
3343
- }], styles: [{
3344
- type: Input
3345
- }] } });
3346
-
3347
- /*
3348
- <file>
3349
- Project:
3350
- @osovitny/anatoly
3351
-
3352
- Authors:
3353
- Vadim Osovitny
3354
- Anatoly Osovitny
3355
-
3356
- Created:
3357
- 29 July 2022
3358
-
3359
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
3360
- </file>
3361
- */
3362
- class CardFooterComponent {
3363
- }
3364
- CardFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3365
- CardFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: CardFooterComponent, selector: "anatoly-card-footer", inputs: { class: "class" }, ngImport: i0, template: "<div class='card-footer {{class}}'>\r\n <ng-content></ng-content>\r\n</div>\r\n" });
3366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CardFooterComponent, decorators: [{
3390
+ BaseDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
3391
+ BaseDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BaseDialog, selector: "ng-component", inputs: { opened: "opened" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
3392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BaseDialog, decorators: [{
3367
3393
  type: Component,
3368
- args: [{ selector: 'anatoly-card-footer', template: "<div class='card-footer {{class}}'>\r\n <ng-content></ng-content>\r\n</div>\r\n" }]
3369
- }], propDecorators: { class: [{
3394
+ args: [{
3395
+ template: ''
3396
+ }]
3397
+ }], ctorParameters: function () { return []; }, propDecorators: { opened: [{
3370
3398
  type: Input
3371
3399
  }] } });
3372
3400
 
@@ -4234,23 +4262,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
4234
4262
  const FroalaEditorModuleWithProviders = FroalaEditorModule.forRoot();
4235
4263
  const FroalaViewModuleWithProviders = FroalaViewModule.forRoot();
4236
4264
  const COMPONENTS = [
4265
+ //billing
4237
4266
  BuyAccessButtonComponent,
4238
4267
  SubscribePlanButtonComponent,
4239
- SignInButtonComponent,
4240
- SignUpButtonComponent,
4241
- SignOutButtonComponent,
4242
- NodataComponent,
4243
- //Spinners
4244
- PageSpinnerComponent,
4245
- LoadingComponent,
4246
4268
  //Cards
4247
4269
  CardComponent,
4248
4270
  CardHeaderComponent,
4249
4271
  CardBodyComponent,
4250
4272
  CardFooterComponent,
4273
+ //Check
4274
+ CheckIconComponent,
4251
4275
  //HtmlEditor
4252
4276
  HtmlEditorComponent,
4253
4277
  FormsHtmlEditorComponent,
4278
+ //identity
4279
+ SignInButtonComponent,
4280
+ SignUpButtonComponent,
4281
+ SignOutButtonComponent,
4282
+ ///
4283
+ NodataComponent,
4284
+ //Spinners
4285
+ PageSpinnerComponent,
4286
+ LoadingComponent,
4254
4287
  //Directives
4255
4288
  NativeElementDirective,
4256
4289
  //Forms
@@ -4272,23 +4305,29 @@ const COMPONENTS = [
4272
4305
  class AnatolyUIModule {
4273
4306
  }
4274
4307
  AnatolyUIModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AnatolyUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4275
- AnatolyUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.6", ngImport: i0, type: AnatolyUIModule, declarations: [BuyAccessButtonComponent,
4308
+ AnatolyUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.6", ngImport: i0, type: AnatolyUIModule, declarations: [
4309
+ //billing
4310
+ BuyAccessButtonComponent,
4276
4311
  SubscribePlanButtonComponent,
4277
- SignInButtonComponent,
4278
- SignUpButtonComponent,
4279
- SignOutButtonComponent,
4280
- NodataComponent,
4281
- //Spinners
4282
- PageSpinnerComponent,
4283
- LoadingComponent,
4284
4312
  //Cards
4285
4313
  CardComponent,
4286
4314
  CardHeaderComponent,
4287
4315
  CardBodyComponent,
4288
4316
  CardFooterComponent,
4317
+ //Check
4318
+ CheckIconComponent,
4289
4319
  //HtmlEditor
4290
4320
  HtmlEditorComponent,
4291
4321
  FormsHtmlEditorComponent,
4322
+ //identity
4323
+ SignInButtonComponent,
4324
+ SignUpButtonComponent,
4325
+ SignOutButtonComponent,
4326
+ ///
4327
+ NodataComponent,
4328
+ //Spinners
4329
+ PageSpinnerComponent,
4330
+ LoadingComponent,
4292
4331
  //Directives
4293
4332
  NativeElementDirective,
4294
4333
  //Forms
@@ -4310,23 +4349,29 @@ AnatolyUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
4310
4349
  CommonModule,
4311
4350
  ReactiveFormsModule,
4312
4351
  FormsModule,
4313
- NgxCaptchaModule, i1$7.FroalaEditorModule, i1$7.FroalaViewModule], exports: [BuyAccessButtonComponent,
4352
+ NgxCaptchaModule, i1$7.FroalaEditorModule, i1$7.FroalaViewModule], exports: [
4353
+ //billing
4354
+ BuyAccessButtonComponent,
4314
4355
  SubscribePlanButtonComponent,
4315
- SignInButtonComponent,
4316
- SignUpButtonComponent,
4317
- SignOutButtonComponent,
4318
- NodataComponent,
4319
- //Spinners
4320
- PageSpinnerComponent,
4321
- LoadingComponent,
4322
4356
  //Cards
4323
4357
  CardComponent,
4324
4358
  CardHeaderComponent,
4325
4359
  CardBodyComponent,
4326
4360
  CardFooterComponent,
4361
+ //Check
4362
+ CheckIconComponent,
4327
4363
  //HtmlEditor
4328
4364
  HtmlEditorComponent,
4329
4365
  FormsHtmlEditorComponent,
4366
+ //identity
4367
+ SignInButtonComponent,
4368
+ SignUpButtonComponent,
4369
+ SignOutButtonComponent,
4370
+ ///
4371
+ NodataComponent,
4372
+ //Spinners
4373
+ PageSpinnerComponent,
4374
+ LoadingComponent,
4330
4375
  //Directives
4331
4376
  NativeElementDirective,
4332
4377
  //Forms
@@ -4382,5 +4427,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
4382
4427
  * Generated bundle index. Do not edit.
4383
4428
  */
4384
4429
 
4385
- export { AddressComponent, Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyUIModule, AppContextService, AppCoreSettings, BaseApiService, BaseComponent, BaseDialog, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BaseHtmlEditorComponent, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CompanyComponent, ContactUsDialog, ContactUsForm, ContextInitState, Convert, CoreApiService, DOM, DefaultEditorOptions, DigitalMarketingService, EmailsApiService, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, FroalaEditorModuleWithProviders, FroalaViewModuleWithProviders, GlobalErrorHandler, GoogleAnalyticsService, Guid, HtmlEditorComponent, IdleService, InjectorInstance, ItemValidationSummaryComponent, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, NativeElementDirective, NodataComponent, NotificationService, NotificationsApiService, PageSpinnerComponent, ReplaceTextPipe, SafeHtmlPipe, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, Subs, SubscribePlanButtonComponent, TimezoneDropdownlist, TranslateModuleAtRoot, UrlSlugComponent, Urls, Utils, ValidationSummaryComponent, customTranslateLoaderFactory, localizationInitializerFactory, throwIfAlreadyLoaded };
4430
+ export { AddressComponent, Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyUIModule, AppContextService, AppCoreSettings, BaseApiService, BaseComponent, BaseDialog, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BaseHtmlEditorComponent, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, CompanyComponent, ContactUsDialog, ContactUsForm, ContextInitState, Convert, CoreApiService, DOM, DefaultEditorOptions, DigitalMarketingService, EmailsApiService, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, FroalaEditorModuleWithProviders, FroalaViewModuleWithProviders, GlobalErrorHandler, GoogleAnalyticsService, Guid, HtmlEditorComponent, IdleService, InjectorInstance, ItemValidationSummaryComponent, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, NativeElementDirective, NodataComponent, NotificationService, NotificationsApiService, PageSpinnerComponent, ReplaceTextPipe, SafeHtmlPipe, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, Subs, SubscribePlanButtonComponent, TimezoneDropdownlist, TranslateModuleAtRoot, UrlSlugComponent, Urls, Utils, ValidationSummaryComponent, customTranslateLoaderFactory, localizationInitializerFactory, throwIfAlreadyLoaded };
4386
4431
  //# sourceMappingURL=osovitny-anatoly.mjs.map