@osovitny/anatoly 1.2.1 → 1.2.4

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 (150) hide show
  1. package/bundles/osovitny-anatoly.umd.js +1476 -0
  2. package/bundles/osovitny-anatoly.umd.js.map +1 -0
  3. package/bundles/osovitny-anatoly.umd.min.js +16 -0
  4. package/bundles/osovitny-anatoly.umd.min.js.map +1 -0
  5. package/esm2015/lib/billing/billing.module.js +60 -0
  6. package/esm2015/lib/billing/components/buyaccess/buyaccess-button.component.js +73 -0
  7. package/esm2015/lib/billing/components/subscriptions/subscribe-plan-button.component.js +63 -0
  8. package/esm2015/lib/billing/components/subscriptions/upgrade-plan-button.component.js +55 -0
  9. package/esm2015/lib/billing/index.js +9 -0
  10. package/esm2015/lib/billing/services/base-billing-api.service.js +53 -0
  11. package/esm2015/lib/core/consts.js +11 -0
  12. package/esm2015/lib/core/core.module.js +45 -0
  13. package/esm2015/lib/core/index.js +9 -0
  14. package/esm2015/lib/core/services/appcontext.service.js +72 -0
  15. package/esm2015/lib/core/services/base-api.service.js +71 -0
  16. package/esm2015/lib/core/services/base-go.service.js +36 -0
  17. package/esm2015/lib/core/services/base-gridedit.service.js +98 -0
  18. package/esm2015/lib/identity/components/signin-button.component.js +30 -0
  19. package/esm2015/lib/identity/components/signout-button.component.js +30 -0
  20. package/esm2015/lib/identity/components/signup-button.component.js +31 -0
  21. package/esm2015/lib/identity/identity.module.js +41 -0
  22. package/esm2015/lib/identity/index.js +7 -0
  23. package/esm2015/lib/ui/components/base-edit.component.js +66 -0
  24. package/esm2015/lib/ui/components/base.component.js +37 -0
  25. package/esm2015/lib/ui/components/content-header/content-header.component.js +35 -0
  26. package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +86 -0
  27. package/esm2015/lib/ui/components/html-editor/forms-html-editor.component.js +37 -0
  28. package/esm2015/lib/ui/components/html-editor/html-editor.component.js +49 -0
  29. package/esm2015/lib/ui/components/html-editor/html-editor.defaultoptions.js +38 -0
  30. package/esm2015/lib/ui/components/validation/form-validation-summary.component.js +39 -0
  31. package/esm2015/lib/ui/components/validation/item-validation-summary.component.js +37 -0
  32. package/esm2015/lib/ui/components/validation/validation-summary.component.js +60 -0
  33. package/esm2015/lib/ui/index.js +13 -0
  34. package/esm2015/lib/ui/ui.module.js +77 -0
  35. package/esm2015/osovitny-anatoly.js +5 -0
  36. package/esm2015/public-api.js +5 -0
  37. package/esm5/lib/billing/billing.module.js +63 -0
  38. package/esm5/lib/billing/components/buyaccess/buyaccess-button.component.js +75 -0
  39. package/esm5/lib/billing/components/subscriptions/subscribe-plan-button.component.js +65 -0
  40. package/esm5/lib/billing/components/subscriptions/upgrade-plan-button.component.js +56 -0
  41. package/esm5/lib/billing/index.js +9 -0
  42. package/esm5/lib/billing/services/base-billing-api.service.js +56 -0
  43. package/esm5/lib/core/consts.js +11 -0
  44. package/esm5/lib/core/core.module.js +48 -0
  45. package/esm5/lib/core/index.js +9 -0
  46. package/esm5/lib/core/services/appcontext.service.js +76 -0
  47. package/esm5/lib/core/services/base-api.service.js +72 -0
  48. package/esm5/lib/core/services/base-go.service.js +37 -0
  49. package/esm5/lib/core/services/base-gridedit.service.js +104 -0
  50. package/esm5/lib/identity/components/signin-button.component.js +32 -0
  51. package/esm5/lib/identity/components/signout-button.component.js +32 -0
  52. package/esm5/lib/identity/components/signup-button.component.js +32 -0
  53. package/esm5/lib/identity/identity.module.js +44 -0
  54. package/esm5/lib/identity/index.js +7 -0
  55. package/esm5/lib/ui/components/base-edit.component.js +70 -0
  56. package/esm5/lib/ui/components/base.component.js +39 -0
  57. package/esm5/lib/ui/components/content-header/content-header.component.js +38 -0
  58. package/esm5/lib/ui/components/html-editor/base-html-editor.component.js +90 -0
  59. package/esm5/lib/ui/components/html-editor/forms-html-editor.component.js +40 -0
  60. package/esm5/lib/ui/components/html-editor/html-editor.component.js +51 -0
  61. package/esm5/lib/ui/components/html-editor/html-editor.defaultoptions.js +38 -0
  62. package/esm5/lib/ui/components/validation/form-validation-summary.component.js +42 -0
  63. package/esm5/lib/ui/components/validation/item-validation-summary.component.js +39 -0
  64. package/esm5/lib/ui/components/validation/validation-summary.component.js +65 -0
  65. package/esm5/lib/ui/index.js +13 -0
  66. package/esm5/lib/ui/ui.module.js +80 -0
  67. package/esm5/osovitny-anatoly.js +5 -0
  68. package/esm5/public-api.js +5 -0
  69. package/fesm2015/osovitny-anatoly.js +1207 -0
  70. package/fesm2015/osovitny-anatoly.js.map +1 -0
  71. package/fesm5/osovitny-anatoly.js +1267 -0
  72. package/fesm5/osovitny-anatoly.js.map +1 -0
  73. package/lib/billing/billing.module.d.ts +2 -0
  74. package/lib/billing/components/buyaccess/buyaccess-button.component.d.ts +16 -0
  75. package/lib/billing/components/subscriptions/subscribe-plan-button.component.d.ts +15 -0
  76. package/lib/billing/components/subscriptions/upgrade-plan-button.component.d.ts +9 -0
  77. package/{src/lib/billing/index.ts → lib/billing/index.d.ts} +1 -6
  78. package/lib/billing/services/base-billing-api.service.d.ts +9 -0
  79. package/lib/core/consts.d.ts +5 -0
  80. package/lib/core/core.module.d.ts +2 -0
  81. package/{src/lib/core/index.ts → lib/core/index.d.ts} +1 -6
  82. package/lib/core/services/appcontext.service.d.ts +14 -0
  83. package/lib/core/services/base-api.service.d.ts +18 -0
  84. package/lib/core/services/base-go.service.d.ts +7 -0
  85. package/lib/core/services/base-gridedit.service.d.ts +19 -0
  86. package/lib/identity/components/signin-button.component.d.ts +4 -0
  87. package/lib/identity/components/signout-button.component.d.ts +4 -0
  88. package/lib/identity/components/signup-button.component.d.ts +4 -0
  89. package/lib/identity/identity.module.d.ts +2 -0
  90. package/{src/lib/identity/index.ts → lib/identity/index.d.ts} +1 -4
  91. package/lib/ui/components/base-edit.component.d.ts +14 -0
  92. package/lib/ui/components/base.component.d.ts +7 -0
  93. package/lib/ui/components/content-header/content-header.component.d.ts +5 -0
  94. package/lib/ui/components/html-editor/base-html-editor.component.d.ts +16 -0
  95. package/lib/ui/components/html-editor/forms-html-editor.component.d.ts +6 -0
  96. package/lib/ui/components/html-editor/html-editor.component.d.ts +6 -0
  97. package/lib/ui/components/html-editor/html-editor.defaultoptions.d.ts +1 -0
  98. package/lib/ui/components/validation/form-validation-summary.component.d.ts +6 -0
  99. package/lib/ui/components/validation/item-validation-summary.component.d.ts +6 -0
  100. package/lib/ui/components/validation/validation-summary.component.d.ts +6 -0
  101. package/{src/lib/ui/index.ts → lib/ui/index.d.ts} +1 -6
  102. package/lib/ui/ui.module.d.ts +2 -0
  103. package/osovitny-anatoly.d.ts +4 -0
  104. package/osovitny-anatoly.metadata.json +1 -0
  105. package/package.json +13 -2
  106. package/{src/public-api.ts → public-api.d.ts} +4 -4
  107. package/ng-package.json +0 -7
  108. package/src/lib/billing/billing.module.ts +0 -62
  109. package/src/lib/billing/components/buyaccess/buyaccess-button.component.html +0 -15
  110. package/src/lib/billing/components/buyaccess/buyaccess-button.component.ts +0 -70
  111. package/src/lib/billing/components/subscriptions/subscribe-plan-button.component.html +0 -21
  112. package/src/lib/billing/components/subscriptions/subscribe-plan-button.component.ts +0 -60
  113. package/src/lib/billing/components/subscriptions/upgrade-plan-button.component.html +0 -3
  114. package/src/lib/billing/components/subscriptions/upgrade-plan-button.component.ts +0 -47
  115. package/src/lib/billing/services/base-billing-api.service.ts +0 -56
  116. package/src/lib/core/consts.ts +0 -7
  117. package/src/lib/core/core.module.ts +0 -45
  118. package/src/lib/core/services/appcontext.service.ts +0 -81
  119. package/src/lib/core/services/base-api.service.ts +0 -87
  120. package/src/lib/core/services/base-go.service.ts +0 -33
  121. package/src/lib/core/services/base-gridedit.service.ts +0 -124
  122. package/src/lib/identity/components/signin-button.component.html +0 -1
  123. package/src/lib/identity/components/signin-button.component.ts +0 -27
  124. package/src/lib/identity/components/signout-button.component.html +0 -1
  125. package/src/lib/identity/components/signout-button.component.ts +0 -27
  126. package/src/lib/identity/components/signup-button.component.html +0 -1
  127. package/src/lib/identity/components/signup-button.component.ts +0 -28
  128. package/src/lib/identity/identity.module.ts +0 -41
  129. package/src/lib/ui/components/base-edit.component.ts +0 -77
  130. package/src/lib/ui/components/base.component.ts +0 -45
  131. package/src/lib/ui/components/content-header/content-header.component.html +0 -4
  132. package/src/lib/ui/components/content-header/content-header.component.ts +0 -32
  133. package/src/lib/ui/components/html-editor/base-html-editor.component.ts +0 -97
  134. package/src/lib/ui/components/html-editor/forms-html-editor.component.html +0 -14
  135. package/src/lib/ui/components/html-editor/forms-html-editor.component.ts +0 -35
  136. package/src/lib/ui/components/html-editor/html-editor.component.html +0 -6
  137. package/src/lib/ui/components/html-editor/html-editor.component.ts +0 -51
  138. package/src/lib/ui/components/html-editor/html-editor.defaultoptions.ts +0 -38
  139. package/src/lib/ui/components/validation/form-validation-summary.component.html +0 -4
  140. package/src/lib/ui/components/validation/form-validation-summary.component.ts +0 -36
  141. package/src/lib/ui/components/validation/item-validation-summary.component.html +0 -5
  142. package/src/lib/ui/components/validation/item-validation-summary.component.ts +0 -32
  143. package/src/lib/ui/components/validation/validation-summary.component.ts +0 -74
  144. package/src/lib/ui/index.js +0 -13
  145. package/src/lib/ui/index.js.map +0 -1
  146. package/src/lib/ui/ui.module.ts +0 -83
  147. package/tsconfig.lib.json +0 -32
  148. package/tsconfig.lib.prod.json +0 -6
  149. package/tslint.json +0 -17
  150. package/typings/osovitny-ui/index.d.ts +0 -24
@@ -1 +0,0 @@
1
- <a href="identity/signup" class="{{classbtn}}">Sign Up</a>
@@ -1,28 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Vadim Osovitny
5
-
6
- Created:
7
- 4 Jul 2018
8
-
9
- Version:
10
- 1.0
11
-
12
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
13
- </file>
14
- */
15
-
16
- import { Component, Input } from '@angular/core';
17
-
18
- @Component({
19
- selector: 'anatoly-signup-button',
20
- templateUrl: './signup-button.component.html'
21
- })
22
-
23
- export class SignUpButtonComponent {
24
- @Input() classbtn: string;
25
-
26
- constructor() {
27
- }
28
- }
@@ -1,41 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Vadim Osovitny
5
-
6
- Created:
7
- 4 Jul 2018
8
-
9
- Version:
10
- 1.0
11
-
12
- Copyright (c) 2018 Osovitny Inc. All rights reserved.
13
- </file>
14
- */
15
-
16
- //System
17
- import { NgModule } from '@angular/core';
18
-
19
- //Custom
20
- import { SignInButtonComponent } from './components/signin-button.component';
21
- import { SignUpButtonComponent } from './components/signup-button.component';
22
- import { SignOutButtonComponent } from './components/signout-button.component';
23
-
24
- @NgModule({
25
- imports: [
26
- ],
27
- exports: [
28
- SignInButtonComponent,
29
- SignUpButtonComponent,
30
- SignOutButtonComponent
31
- ],
32
- declarations: [
33
- SignInButtonComponent,
34
- SignUpButtonComponent,
35
- SignOutButtonComponent
36
- ],
37
- providers: []
38
- })
39
-
40
- export class AnatolyIdentityModule {
41
- }
@@ -1,77 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Vadim Osovitny
5
-
6
- Created:
7
- 20 Nov 2017
8
-
9
- Version:
10
- 1.0
11
-
12
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
13
- </file>
14
- */
15
-
16
- //Node
17
- import { Component, Input } from '@angular/core';
18
- import { FormGroup } from '@angular/forms';
19
-
20
- //Custom
21
- import { BaseComponent } from './base.component';
22
-
23
- export class BaseEditComponent extends BaseComponent {
24
- @Input()
25
- public formGroup: FormGroup;
26
-
27
- @Input()
28
- public formSubmitted: boolean = false;
29
-
30
- constructor() {
31
- super();
32
- }
33
-
34
- isActionAdding() {
35
- var id = osovitny.utils.getValueByNameInQS("id");
36
- if (typeof id === 'undefined' || id == '') return true;
37
-
38
- return false;
39
- }
40
-
41
- getEntityId() {
42
- return this.getQSId();
43
- }
44
-
45
- isItemInvalid(name: string) {
46
- if (typeof name === 'undefined' || name == '') {
47
- return false;
48
- }
49
-
50
- if (!this.formGroup) {
51
- return false;
52
- }
53
-
54
- if (this.formGroup.get(name)) {
55
- return (this.formSubmitted && this.formGroup.get(name).invalid) ||
56
- (this.formGroup.get(name).touched && this.formGroup.get(name).invalid);
57
- }
58
-
59
- return false;
60
- }
61
-
62
- getFormValue(name) {
63
- return this.formGroup.controls[name].value;
64
- }
65
-
66
- setFormValue(name, value) {
67
- this.formGroup.controls[name].setValue(value);
68
- }
69
-
70
- getFormGroupValue(groupName, name) {
71
- return this.formGroup.controls[groupName].get(name).value;
72
- }
73
-
74
- setFormGroupValue(groupName, name, value) {
75
- this.formGroup.controls[groupName].get(name).setValue(value);
76
- }
77
- }
@@ -1,45 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Vadim Osovitny
5
-
6
- Created:
7
- 28 Aug 2018
8
-
9
- Version:
10
- 1.0
11
-
12
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
13
- </file>
14
- */
15
-
16
- //Node
17
- import { Component, Input } from '@angular/core';
18
- import { FormGroup } from '@angular/forms';
19
-
20
- export class BaseComponent {
21
- constructor() {
22
- }
23
-
24
- getQSId() {
25
- var id = osovitny.utils.getValueByNameInQS("id");
26
- if (typeof id === 'undefined' || id == '') return null;
27
-
28
- return id;
29
- }
30
-
31
- showLoading() {
32
- var panelLoading = $('#pnlLoading');
33
- panelLoading.show();
34
- }
35
-
36
- hideLoading() {
37
- var panelLoading = $('#pnlLoading');
38
- panelLoading.hide();
39
- }
40
-
41
- handleError(e) {
42
- this.hideLoading();
43
- osovitny.ui.errorOccurred();
44
- }
45
- }
@@ -1,4 +0,0 @@
1
- <h2 class="page-header">
2
- {{title}}
3
- <!--<small>Optional {{title}}</small>-->
4
- </h2>
@@ -1,32 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Anatoly Osovitny
5
-
6
- Created:
7
- 23 Apr 2018
8
-
9
- Version:
10
- 1.0
11
-
12
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
13
- </file>
14
- */
15
-
16
- //Node
17
- import { Component, Input, OnInit } from '@angular/core';
18
-
19
- @Component({
20
- selector: 'anatoly-content-header',
21
- templateUrl: './content-header.component.html'
22
- })
23
-
24
- export class ContentHeaderComponent implements OnInit {
25
- @Input() title?: string;
26
-
27
- ngOnInit() {
28
- if (this.title == null) {
29
- this.title = '';
30
- }
31
- }
32
- }
@@ -1,97 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Anatoly Osovitny
5
- Vadim Osovitny
6
-
7
- Created:
8
- 12 Dec 2017
9
-
10
- Version:
11
- 1.0
12
-
13
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
14
- </file>
15
- */
16
-
17
- //Node
18
- import { Component, OnInit, Input, AfterViewInit } from '@angular/core';
19
-
20
- //Custom
21
- import { BaseEditComponent } from '../base-edit.component';
22
-
23
- //Consts
24
- import { DefaultEditorOptions } from './html-editor.defaultoptions';
25
-
26
- export class BaseHtmlEditorComponent extends BaseEditComponent implements OnInit {
27
- protected _control;
28
-
29
- //Public members
30
- public options;
31
- public editorInitialized: boolean = false;
32
-
33
- //General params
34
- @Input() editorId: string = '';
35
- @Input() editorLabelText: string = 'Html';
36
- @Input() editorOptions: Object = {};
37
-
38
- constructor() {
39
- super();
40
- }
41
-
42
- ngOnInit() {
43
- let opt = this.editorOptions;
44
- if (typeof this.editorOptions == "string") {
45
- opt = JSON.parse(this.editorOptions);
46
- }
47
-
48
- let newOptions: any = $.extend({}, DefaultEditorOptions, opt);
49
- let key = (<any>window).__froalaEditor_Key;
50
- if (key) {
51
- newOptions = $.extend({}, newOptions, JSON.parse('{ "key": "' + key + '" }'));
52
- }
53
-
54
- if (newOptions.events && newOptions.events.initialized) {
55
- newOptions.events.initialized.overridden = false;
56
- }
57
-
58
- this.options = newOptions;
59
- }
60
-
61
- protected doAfterEditorInitialized(action) {
62
- var that = this;
63
- var timeOut = 500;
64
-
65
- if (this.editorInitialized) {
66
- timeOut = 100;
67
- }
68
-
69
- setTimeout(function () { action(that); }, timeOut);
70
- }
71
-
72
- protected getEditor() {
73
- if (this._control)
74
- return this._control.getEditor();
75
-
76
- return null;
77
- }
78
-
79
- //Public Funcs
80
- public initializeControl(control) {
81
- this._control = control;
82
- this._control.initialize();
83
- this.editorInitialized = true;
84
- }
85
-
86
- public setUploadParams(uploadType, uploadParentId) {
87
- this.doAfterEditorInitialized(function (that) {
88
- var editor = that.getEditor();
89
- if (typeof (editor) == "undefined" || editor == null) {
90
- return;
91
- }
92
-
93
- editor.opts.imageUploadParams.uploadType = uploadType;
94
- editor.opts.imageUploadParams.uploadParentId = uploadParentId;
95
- });
96
- }
97
- }
@@ -1,14 +0,0 @@
1
- <div [formGroup]="formGroup">
2
- <div class="form-group" [ngClass]="{'has-error': isItemInvalid(editorFormKey) }">
3
- <label class="control-label">{{ editorLabelText }}</label>
4
- <textarea id="htmleditor-{{editorId}}" class="htmleditor-{{editorId}}"
5
- [formControlName]="editorFormKey"
6
- [froalaEditor]="options" (froalaInit)="initializeControl($event)">
7
- </textarea>
8
- <anatoly-item-validation-summary [formGroup]="formGroup"
9
- [formSubmitted]="formSubmitted"
10
- [key]="editorFormKey"
11
- [title]="editorLabelText">
12
- </anatoly-item-validation-summary>
13
- </div>
14
- </div>
@@ -1,35 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Anatoly Osovitny
5
- Vadim Osovitny
6
-
7
- Created:
8
- 12 Dec 2017
9
-
10
- Version:
11
- 1.0
12
-
13
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
14
- </file>
15
- */
16
-
17
- //Node
18
- import { Component, Input } from '@angular/core';
19
-
20
- //Custom
21
- import { BaseHtmlEditorComponent } from './base-html-editor.component';
22
-
23
- @Component({
24
- selector: 'anatoly-forms-html-editor',
25
- templateUrl: './forms-html-editor.component.html'
26
- })
27
- export class FormsHtmlEditorComponent extends BaseHtmlEditorComponent {
28
- content;
29
-
30
- @Input() editorFormKey: string = 'html';
31
-
32
- constructor() {
33
- super();
34
- }
35
- }
@@ -1,6 +0,0 @@
1
- <div>
2
- <label>{{ editorLabelText }}</label>
3
- <textarea id="htmleditor-{{editorId}}" class="htmleditor-{{editorId}}"
4
- [froalaEditor]="options" (froalaInit)="initializeControl($event)">
5
- </textarea>
6
- </div>
@@ -1,51 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Anatoly Osovitny
5
- Vadim Osovitny
6
-
7
- Created:
8
- 12 Dec 2017
9
-
10
- Version:
11
- 1.0
12
-
13
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
14
- </file>
15
- */
16
-
17
- //Node
18
- import { Component, Input } from '@angular/core';
19
-
20
- //Custom
21
- import { BaseHtmlEditorComponent } from './base-html-editor.component';
22
-
23
- @Component({
24
- selector: 'anatoly-html-editor',
25
- templateUrl: './html-editor.component.html'
26
- })
27
- export class HtmlEditorComponent extends BaseHtmlEditorComponent {
28
- constructor() {
29
- super();
30
- }
31
-
32
- public setHtml(content) {
33
- this.doAfterEditorInitialized(function (that) {
34
- var editor = that.getEditor();
35
- if (typeof (editor) == "undefined" || editor == null) {
36
- return;
37
- }
38
-
39
- editor.html.set(content);
40
- });
41
- }
42
-
43
- public getHtml() {
44
- var editor = this.getEditor();
45
- if (typeof (editor) == "undefined" || editor == null) {
46
- return;
47
- }
48
-
49
- return editor.html.get(false);
50
- }
51
- }
@@ -1,38 +0,0 @@
1
- export const DefaultEditorOptions: Object = {
2
- placeholderText: 'Edit Your Content Here',
3
- charCounterCount: true,
4
- heightMin: 100,
5
- toolbarInline: false,
6
-
7
- toolbarButtons: {
8
- 'moreText': {
9
- 'buttons': ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript',
10
- 'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 'inlineClass', 'inlineStyle']
11
- },
12
- 'moreParagraph': {
13
- 'buttons': ['alignLeft', 'alignCenter', 'formatOLSimple', 'alignRight', 'alignJustify',
14
- 'formatOL', 'formatUL', 'paragraphFormat', 'paragraphStyle', 'lineHeight', 'outdent', 'indent', 'quote']
15
- },
16
- 'moreRich': {
17
- 'buttons': ['insertLink', 'insertImage', 'insertTable', 'emoticons', 'fontAwesome',
18
- 'specialCharacters', 'embedly']
19
- },
20
- 'moreMisc': {
21
- 'buttons': ['selectAll', 'clearFormatting', 'html', 'undo', 'redo', 'fullscreen'],
22
- 'align': 'right',
23
- }
24
- },
25
-
26
- /*
27
- Upload:
28
- https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
29
- */
30
- imageUploadURL: '/api/HtmlEditor/UploadImage',
31
- imageAllowedTypes: ['jpeg', 'jpg', 'png'],
32
- imageUploadParams: { uploadType: '', uploadParentId: '' },
33
-
34
- events: {
35
- 'image.beforeUpload': function (images) {
36
- }
37
- }
38
- };
@@ -1,4 +0,0 @@
1
- <div class="callout callout-danger" *ngIf="visible">
2
- <h4 class="box-title">There are problems with the form</h4>
3
- <p *ngFor="let error of getErrors()"><span class="help-block " style="color:white">{{error}}</span></p>
4
- </div>
@@ -1,36 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Vadim Osovitny
5
-
6
- Created:
7
- 7 Dec 2017
8
-
9
- Version:
10
- 1.0
11
-
12
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
13
- </file>
14
- */
15
-
16
- //Node
17
- import { Component, Input } from '@angular/core';
18
- import { ValidationSummaryComponent } from "./validation-summary.component";
19
-
20
- @Component({
21
- selector: 'anatoly-form-validation-summary',
22
- templateUrl: './form-validation-summary.component.html'
23
- })
24
-
25
- export class FormValidationSummaryComponent extends ValidationSummaryComponent {
26
- @Input() visible: boolean = false;
27
-
28
- constructor() {
29
- super();
30
- }
31
-
32
- getErrors(): string[] {
33
- var messages = this.getFormValidationMessages();
34
- return messages;
35
- }
36
- }
@@ -1,5 +0,0 @@
1
- <ul class="list-unstyled" *ngIf="isItemInvalid(key)">
2
- <li *ngFor="let error of getValidationMessages(formGroup.get(key), title)">
3
- <span class="help-block">{{ error }}</span>
4
- </li>
5
- </ul>
@@ -1,32 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Vadim Osovitny
5
-
6
- Created:
7
- 6 Dec 2017
8
-
9
- Version:
10
- 1.0
11
-
12
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
13
- </file>
14
- */
15
-
16
- //Node
17
- import { Component, Input } from '@angular/core';
18
- import { ValidationSummaryComponent } from "./validation-summary.component";
19
-
20
- @Component({
21
- selector: 'anatoly-item-validation-summary',
22
- templateUrl: './item-validation-summary.component.html'
23
- })
24
-
25
- export class ItemValidationSummaryComponent extends ValidationSummaryComponent {
26
- @Input() key: string;
27
- @Input() title: string;
28
-
29
- constructor() {
30
- super();
31
- }
32
- }
@@ -1,74 +0,0 @@
1
- /*
2
- <file>
3
- Authors:
4
- Vadim Osovitny
5
-
6
- Created:
7
- 8 Dec 2017
8
-
9
- Version:
10
- 1.0
11
-
12
- Copyright (c) 2016-2019 Osovitny Inc. All rights reserved.
13
- </file>
14
- */
15
-
16
- //Node
17
- import { Input } from '@angular/core';
18
- import { FormGroup } from '@angular/forms';
19
-
20
- //Custom
21
- import { BaseEditComponent } from '../base-edit.component';
22
-
23
- export class ValidationSummaryComponent extends BaseEditComponent {
24
- constructor() {
25
- super();
26
- }
27
-
28
- getFormValidationMessages(): string[] {
29
- let messages: string[] = [];
30
-
31
- Object.keys(this.formGroup.controls).forEach(k => {
32
- var control = this.formGroup.controls[k];
33
-
34
- if ((<FormGroup>control).controls != null) {
35
- Object.keys((<FormGroup>control).controls).forEach(k => {
36
- var child = (<FormGroup>control).controls[k];
37
- this.getValidationMessages(child, k).forEach(m => messages.push(m));
38
- });
39
- }
40
- else {
41
- this.getValidationMessages(control, k).forEach(m => messages.push(m));
42
- }
43
- });
44
-
45
- return messages;
46
- }
47
-
48
- getValidationMessages(state: any, thingName?: string) {
49
- let thing: string = state.path || thingName;
50
- let messages: string[] = [];
51
-
52
- if (state.errors) {
53
- for (let errorName in state.errors) {
54
- if (state.errors.hasOwnProperty(errorName)) {
55
- switch (errorName) {
56
- case 'required':
57
- messages.push(`${thing} is required`);
58
- break;
59
-
60
- case 'minlength':
61
- messages.push(`${thing} must be at least ${state.errors['minlength'].requiredLength} characters`);
62
- break;
63
-
64
- case 'pattern':
65
- messages.push(`${thing} contains illegal characters`);
66
- break;
67
- }
68
- }
69
- }
70
- }
71
-
72
- return messages;
73
- }
74
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var ui_module_1 = require("./ui.module");
4
- exports.AnatolyUIModule = ui_module_1.AnatolyUIModule;
5
- //Base Components
6
- var base_component_1 = require("./components/base.component");
7
- exports.BaseComponent = base_component_1.BaseComponent;
8
- var base_edit_component_1 = require("./components/base-edit.component");
9
- exports.BaseEditComponent = base_edit_component_1.BaseEditComponent;
10
- //Components
11
- var html_editor_component_1 = require("./components/html-editor/html-editor.component");
12
- exports.HtmlEditorComponent = html_editor_component_1.HtmlEditorComponent;
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAAA,yCAA8C;AAArC,sCAAA,eAAe,CAAA;AAExB,iBAAiB;AACjB,8DAA4D;AAAnD,yCAAA,aAAa,CAAA;AACtB,wEAAqE;AAA5D,kDAAA,iBAAiB,CAAA;AAE1B,YAAY;AACZ,wFAAqF;AAA5E,sDAAA,mBAAmB,CAAA"}