@osovitny/anatoly 1.0.1 → 1.2.1

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 (146) hide show
  1. package/README.md +5 -0
  2. package/ng-package.json +7 -0
  3. package/package.json +1 -16
  4. package/src/lib/billing/billing.module.ts +62 -0
  5. package/src/lib/billing/components/buyaccess/buyaccess-button.component.html +15 -0
  6. package/src/lib/billing/components/buyaccess/buyaccess-button.component.ts +70 -0
  7. package/src/lib/billing/components/subscriptions/subscribe-plan-button.component.html +21 -0
  8. package/src/lib/billing/components/subscriptions/subscribe-plan-button.component.ts +60 -0
  9. package/src/lib/billing/components/subscriptions/upgrade-plan-button.component.html +3 -0
  10. package/src/lib/billing/components/subscriptions/upgrade-plan-button.component.ts +47 -0
  11. package/src/lib/billing/index.ts +10 -0
  12. package/src/lib/billing/services/base-billing-api.service.ts +56 -0
  13. package/src/lib/core/consts.ts +7 -0
  14. package/src/lib/core/core.module.ts +45 -0
  15. package/src/lib/core/index.ts +10 -0
  16. package/src/lib/core/services/appcontext.service.ts +81 -0
  17. package/src/lib/core/services/base-api.service.ts +87 -0
  18. package/src/lib/core/services/base-go.service.ts +33 -0
  19. package/src/lib/core/services/base-gridedit.service.ts +124 -0
  20. package/src/lib/identity/components/signin-button.component.html +1 -0
  21. package/src/lib/identity/components/signin-button.component.ts +27 -0
  22. package/src/lib/identity/components/signout-button.component.html +1 -0
  23. package/src/lib/identity/components/signout-button.component.ts +27 -0
  24. package/src/lib/identity/components/signup-button.component.html +1 -0
  25. package/src/lib/identity/components/signup-button.component.ts +28 -0
  26. package/src/lib/identity/identity.module.ts +41 -0
  27. package/src/lib/identity/index.ts +7 -0
  28. package/src/lib/ui/components/base-edit.component.ts +77 -0
  29. package/src/lib/ui/components/base.component.ts +45 -0
  30. package/src/lib/ui/components/content-header/content-header.component.html +4 -0
  31. package/src/lib/ui/components/content-header/content-header.component.ts +32 -0
  32. package/src/lib/ui/components/html-editor/base-html-editor.component.ts +97 -0
  33. package/src/lib/ui/components/html-editor/forms-html-editor.component.html +14 -0
  34. package/src/lib/ui/components/html-editor/forms-html-editor.component.ts +35 -0
  35. package/src/lib/ui/components/html-editor/html-editor.component.html +6 -0
  36. package/src/lib/ui/components/html-editor/html-editor.component.ts +51 -0
  37. package/src/lib/ui/components/html-editor/html-editor.defaultoptions.ts +38 -0
  38. package/src/lib/ui/components/validation/form-validation-summary.component.html +4 -0
  39. package/src/lib/ui/components/validation/form-validation-summary.component.ts +36 -0
  40. package/src/lib/ui/components/validation/item-validation-summary.component.html +5 -0
  41. package/src/lib/ui/components/validation/item-validation-summary.component.ts +32 -0
  42. package/src/lib/ui/components/validation/validation-summary.component.ts +74 -0
  43. package/src/lib/ui/index.js +13 -0
  44. package/src/lib/ui/index.js.map +1 -0
  45. package/src/lib/ui/index.ts +14 -0
  46. package/src/lib/ui/ui.module.ts +83 -0
  47. package/{public-api.d.ts → src/public-api.ts} +4 -4
  48. package/tsconfig.lib.json +32 -0
  49. package/tsconfig.lib.prod.json +6 -0
  50. package/tslint.json +17 -0
  51. package/typings/osovitny-ui/index.d.ts +24 -0
  52. package/bundles/osovitny-anatoly.umd.js +0 -2065
  53. package/bundles/osovitny-anatoly.umd.js.map +0 -1
  54. package/bundles/osovitny-anatoly.umd.min.js +0 -16
  55. package/bundles/osovitny-anatoly.umd.min.js.map +0 -1
  56. package/esm2015/lib/billing/billing.module.js +0 -62
  57. package/esm2015/lib/billing/components/buyaccess/buyaccess-button.component.js +0 -123
  58. package/esm2015/lib/billing/components/subscriptions/subscribe-plan-button.component.js +0 -97
  59. package/esm2015/lib/billing/components/subscriptions/upgrade-plan-button.component.js +0 -84
  60. package/esm2015/lib/billing/index.js +0 -6
  61. package/esm2015/lib/billing/services/base-billing-api.service.js +0 -116
  62. package/esm2015/lib/core/consts.js +0 -15
  63. package/esm2015/lib/core/core.module.js +0 -47
  64. package/esm2015/lib/core/index.js +0 -12
  65. package/esm2015/lib/core/services/appcontext.service.js +0 -123
  66. package/esm2015/lib/core/services/base-api.service.js +0 -154
  67. package/esm2015/lib/core/services/base-go.service.js +0 -58
  68. package/esm2015/lib/core/services/base-gridedit.service.js +0 -202
  69. package/esm2015/lib/identity/components/signin-button.component.js +0 -38
  70. package/esm2015/lib/identity/components/signout-button.component.js +0 -38
  71. package/esm2015/lib/identity/components/signup-button.component.js +0 -39
  72. package/esm2015/lib/identity/identity.module.js +0 -43
  73. package/esm2015/lib/identity/index.js +0 -6
  74. package/esm2015/lib/ui/components/base-edit.component.js +0 -102
  75. package/esm2015/lib/ui/components/base.component.js +0 -57
  76. package/esm2015/lib/ui/components/content-header/content-header.component.js +0 -44
  77. package/esm2015/lib/ui/components/html-editor/html-editor.component.js +0 -267
  78. package/esm2015/lib/ui/components/validation/form-validation-summary.component.js +0 -51
  79. package/esm2015/lib/ui/components/validation/item-validation-summary.component.js +0 -45
  80. package/esm2015/lib/ui/components/validation/validation-summary.component.js +0 -93
  81. package/esm2015/lib/ui/index.js +0 -11
  82. package/esm2015/lib/ui/ui.module.js +0 -72
  83. package/esm2015/osovitny-anatoly.js +0 -9
  84. package/esm2015/public-api.js +0 -9
  85. package/esm5/lib/billing/billing.module.js +0 -66
  86. package/esm5/lib/billing/components/buyaccess/buyaccess-button.component.js +0 -128
  87. package/esm5/lib/billing/components/subscriptions/subscribe-plan-button.component.js +0 -100
  88. package/esm5/lib/billing/components/subscriptions/upgrade-plan-button.component.js +0 -86
  89. package/esm5/lib/billing/index.js +0 -6
  90. package/esm5/lib/billing/services/base-billing-api.service.js +0 -135
  91. package/esm5/lib/core/consts.js +0 -15
  92. package/esm5/lib/core/core.module.js +0 -51
  93. package/esm5/lib/core/index.js +0 -12
  94. package/esm5/lib/core/services/appcontext.service.js +0 -140
  95. package/esm5/lib/core/services/base-api.service.js +0 -205
  96. package/esm5/lib/core/services/base-go.service.js +0 -59
  97. package/esm5/lib/core/services/base-gridedit.service.js +0 -240
  98. package/esm5/lib/identity/components/signin-button.component.js +0 -41
  99. package/esm5/lib/identity/components/signout-button.component.js +0 -41
  100. package/esm5/lib/identity/components/signup-button.component.js +0 -41
  101. package/esm5/lib/identity/identity.module.js +0 -47
  102. package/esm5/lib/identity/index.js +0 -6
  103. package/esm5/lib/ui/components/base-edit.component.js +0 -137
  104. package/esm5/lib/ui/components/base.component.js +0 -72
  105. package/esm5/lib/ui/components/content-header/content-header.component.js +0 -51
  106. package/esm5/lib/ui/components/html-editor/html-editor.component.js +0 -309
  107. package/esm5/lib/ui/components/validation/form-validation-summary.component.js +0 -59
  108. package/esm5/lib/ui/components/validation/item-validation-summary.component.js +0 -49
  109. package/esm5/lib/ui/components/validation/validation-summary.component.js +0 -106
  110. package/esm5/lib/ui/index.js +0 -11
  111. package/esm5/lib/ui/ui.module.js +0 -76
  112. package/esm5/osovitny-anatoly.js +0 -9
  113. package/esm5/public-api.js +0 -9
  114. package/fesm2015/osovitny-anatoly.js +0 -1622
  115. package/fesm2015/osovitny-anatoly.js.map +0 -1
  116. package/fesm5/osovitny-anatoly.js +0 -1877
  117. package/fesm5/osovitny-anatoly.js.map +0 -1
  118. package/lib/billing/billing.module.d.ts +0 -2
  119. package/lib/billing/components/buyaccess/buyaccess-button.component.d.ts +0 -16
  120. package/lib/billing/components/subscriptions/subscribe-plan-button.component.d.ts +0 -15
  121. package/lib/billing/components/subscriptions/upgrade-plan-button.component.d.ts +0 -9
  122. package/lib/billing/index.d.ts +0 -1
  123. package/lib/billing/services/base-billing-api.service.d.ts +0 -9
  124. package/lib/core/consts.d.ts +0 -5
  125. package/lib/core/core.module.d.ts +0 -2
  126. package/lib/core/index.d.ts +0 -5
  127. package/lib/core/services/appcontext.service.d.ts +0 -14
  128. package/lib/core/services/base-api.service.d.ts +0 -18
  129. package/lib/core/services/base-go.service.d.ts +0 -7
  130. package/lib/core/services/base-gridedit.service.d.ts +0 -19
  131. package/lib/identity/components/signin-button.component.d.ts +0 -4
  132. package/lib/identity/components/signout-button.component.d.ts +0 -4
  133. package/lib/identity/components/signup-button.component.d.ts +0 -4
  134. package/lib/identity/identity.module.d.ts +0 -2
  135. package/lib/identity/index.d.ts +0 -1
  136. package/lib/ui/components/base-edit.component.d.ts +0 -14
  137. package/lib/ui/components/base.component.d.ts +0 -7
  138. package/lib/ui/components/content-header/content-header.component.d.ts +0 -5
  139. package/lib/ui/components/html-editor/html-editor.component.d.ts +0 -22
  140. package/lib/ui/components/validation/form-validation-summary.component.d.ts +0 -6
  141. package/lib/ui/components/validation/item-validation-summary.component.d.ts +0 -6
  142. package/lib/ui/components/validation/validation-summary.component.d.ts +0 -6
  143. package/lib/ui/index.d.ts +0 -4
  144. package/lib/ui/ui.module.d.ts +0 -2
  145. package/osovitny-anatoly.d.ts +0 -4
  146. package/osovitny-anatoly.metadata.json +0 -1
@@ -0,0 +1,36 @@
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
+ }
@@ -0,0 +1,5 @@
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>
@@ -0,0 +1,32 @@
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
+ }
@@ -0,0 +1,74 @@
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
+ }
@@ -0,0 +1,13 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,14 @@
1
+ // Base Components
2
+ export * from './components/base.component';
3
+ export * from './components/base-edit.component';
4
+
5
+ // Components
6
+ export * from './components/content-header/content-header.component';
7
+ export * from './components/validation/validation-summary.component';
8
+ export * from './components/validation/form-validation-summary.component';
9
+ export * from './components/validation/item-validation-summary.component';
10
+ export * from './components/html-editor/html-editor.component';
11
+ export * from './components/html-editor/forms-html-editor.component';
12
+
13
+ //Module
14
+ export { AnatolyUIModule } from './ui.module';
@@ -0,0 +1,83 @@
1
+ /*
2
+ <file>
3
+ Authors:
4
+ Vadim Osovitny
5
+
6
+ Created:
7
+ 3 Jun 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 { NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
18
+ import { CommonModule } from '@angular/common';
19
+ import { HttpClientModule, HttpClientXsrfModule, HttpClientJsonpModule, HttpClient } from '@angular/common/http';
20
+ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
21
+
22
+ //kendo/froala
23
+ import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
24
+ import { GridModule } from '@progress/kendo-angular-grid';
25
+ import { PopupModule } from '@progress/kendo-angular-popup';
26
+ import { ButtonsModule } from '@progress/kendo-angular-buttons';
27
+ import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
28
+
29
+ //Components
30
+ import { FormValidationSummaryComponent } from './components/validation/form-validation-summary.component';
31
+ import { ItemValidationSummaryComponent } from './components/validation/item-validation-summary.component';
32
+ import { ContentHeaderComponent } from './components/content-header/content-header.component';
33
+ import { BaseHtmlEditorComponent } from './components/html-editor/base-html-editor.component';
34
+ import { HtmlEditorComponent } from './components/html-editor/html-editor.component';
35
+ import { FormsHtmlEditorComponent } from './components/html-editor/forms-html-editor.component';
36
+
37
+ @NgModule({
38
+ imports: [
39
+ CommonModule,
40
+ ReactiveFormsModule,
41
+ FormsModule,
42
+ HttpClientModule,
43
+ HttpClientXsrfModule,
44
+ HttpClientJsonpModule,
45
+
46
+ FroalaEditorModule.forRoot(),
47
+ FroalaViewModule.forRoot(),
48
+ GridModule,
49
+ PopupModule,
50
+ ButtonsModule,
51
+ DropDownsModule
52
+ ],
53
+ exports: [
54
+ CommonModule,
55
+ HttpClientModule,
56
+ HttpClientXsrfModule,
57
+ HttpClientJsonpModule,
58
+
59
+ ItemValidationSummaryComponent,
60
+ FormValidationSummaryComponent,
61
+ ContentHeaderComponent,
62
+
63
+ HtmlEditorComponent,
64
+ FormsHtmlEditorComponent
65
+ ],
66
+ declarations: [
67
+ ItemValidationSummaryComponent,
68
+ FormValidationSummaryComponent,
69
+ ContentHeaderComponent,
70
+
71
+ HtmlEditorComponent,
72
+ FormsHtmlEditorComponent
73
+ ],
74
+ providers: [
75
+ ],
76
+ schemas: [
77
+ CUSTOM_ELEMENTS_SCHEMA,
78
+ NO_ERRORS_SCHEMA
79
+ ]
80
+ })
81
+
82
+ export class AnatolyUIModule {
83
+ }
@@ -1,4 +1,4 @@
1
- export * from './lib/core';
2
- export * from './lib/billing';
3
- export * from './lib/identity';
4
- export * from './lib/ui';
1
+ export * from './lib/core';
2
+ export * from './lib/billing';
3
+ export * from './lib/identity';
4
+ export * from './lib/ui';
@@ -0,0 +1,32 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "baseUrl": "./",
5
+ "outDir": "./.ts",
6
+ "target": "es2015",
7
+ "declaration": true,
8
+ "inlineSources": true,
9
+ "paths": {
10
+ },
11
+ "typeRoots": [
12
+ "./typings"
13
+ ],
14
+ "types": [
15
+ "jquery",
16
+ "osovitny-ui"
17
+ ],
18
+ "lib": [
19
+ "dom",
20
+ "es2018"
21
+ ]
22
+ },
23
+ "angularCompilerOptions": {
24
+ "skipTemplateCodegen": true,
25
+ "strictMetadataEmit": true,
26
+ "fullTemplateTypeCheck": true,
27
+ "strictInjectionParameters": true,
28
+ "enableResourceInlining": true
29
+ },
30
+ "exclude": [
31
+ ]
32
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "./tsconfig.lib.json",
3
+ "angularCompilerOptions": {
4
+ "enableIvy": false
5
+ }
6
+ }
package/tslint.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "../../tslint.json",
3
+ "rules": {
4
+ "directive-selector": [
5
+ true,
6
+ "attribute",
7
+ "anatoly",
8
+ "camelCase"
9
+ ],
10
+ "component-selector": [
11
+ true,
12
+ "element",
13
+ "anatoly",
14
+ "kebab-case"
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,24 @@
1
+ declare namespace osovitny.ui {
2
+ function alert(text: String): void;
3
+ function alertInfo(text: String): void;
4
+ function alertWarning(text: String): void;
5
+ function alertError(text: String): void;
6
+ function notImplemented(): void;
7
+ function errorOccurred(): void;
8
+ function areYouSure(text: String, title: String, confirmButtonText: String, cancelButtonText: String, success: Function, cancel?: Function): void;
9
+ function alertSuccess(text: String, title?: String, successAction?: Function): void;
10
+ function alertCancel(text: String): void;
11
+ }
12
+
13
+ declare namespace osovitny.utils.to {
14
+ function int(value: any): Number;
15
+ function bool(value: any): Boolean;
16
+ }
17
+
18
+ declare namespace osovitny.utils.is {
19
+ function emptyString(value: String): Boolean;
20
+ }
21
+
22
+ declare namespace osovitny.utils {
23
+ function getValueByNameInQS(name: String): String;
24
+ }