@osovitny/anatoly 2.0.9 → 2.0.10
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.
- package/bundles/osovitny-anatoly.umd.js +549 -136
- package/bundles/osovitny-anatoly.umd.js.map +1 -1
- package/bundles/osovitny-anatoly.umd.min.js +2 -2
- package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
- package/esm2015/lib/core/alerts.js +5 -1
- package/esm2015/lib/core/core.module.js +21 -5
- package/esm2015/lib/core/guards/once-import.guard.js +24 -0
- package/esm2015/lib/core/guid.js +25 -0
- package/esm2015/lib/core/index.js +23 -1
- package/esm2015/lib/core/logging/globalErrorHandler.js +42 -0
- package/esm2015/lib/core/logging/logging.service.js +38 -0
- package/esm2015/lib/core/services/appcontext.service.js +5 -1
- package/esm2015/lib/core/services/base-go.service.js +5 -1
- package/esm2015/lib/core/subs.js +34 -0
- package/esm2015/lib/core/utils.js +29 -5
- package/esm2015/lib/data/base/base-api.service.js +22 -16
- package/esm2015/lib/data/base/grid/base-grid-edit.service.js +15 -13
- package/esm2015/lib/data/base/grid/base-grid-read.service.js +16 -9
- package/esm2015/lib/data/data.module.js +10 -10
- package/esm2015/lib/data/index.js +24 -6
- package/esm2015/lib/data/services/billing-api.service.js +32 -17
- package/esm2015/lib/ui/components/base-edit.component.js +11 -7
- package/esm2015/lib/ui/components/base.component.js +12 -8
- package/esm2015/lib/ui/components/billing/buyaccess-button.component.js +12 -9
- package/esm2015/lib/ui/components/billing/subscribe-plan-button.component.js +10 -6
- package/esm2015/lib/ui/components/billing/upgrade-plan-button.component.js +11 -7
- package/esm2015/lib/ui/components/content-header/content-header.component.js +8 -4
- package/esm2015/lib/ui/components/copy-2-clipboard/copy-2-clipboard.component.js +45 -0
- package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +13 -8
- package/esm2015/lib/ui/components/html-editor/forms-html-editor.component.js +9 -6
- package/esm2015/lib/ui/components/html-editor/html-editor.component.js +10 -7
- package/esm2015/lib/ui/components/html-editor/html-editor.defaultoptions.js +75 -18
- package/esm2015/lib/ui/components/identity/signin-button.component.js +8 -4
- package/esm2015/lib/ui/components/identity/signout-button.component.js +8 -4
- package/esm2015/lib/ui/components/identity/signup-button.component.js +6 -2
- package/esm2015/lib/ui/components/validation/form-validation-summary.component.js +5 -1
- package/esm2015/lib/ui/components/validation/item-validation-summary.component.js +5 -1
- package/esm2015/lib/ui/components/validation/validation-summary.component.js +5 -1
- package/esm2015/lib/ui/index.js +20 -1
- package/esm2015/lib/ui/ui.module.js +12 -4
- package/fesm2015/osovitny-anatoly.js +554 -106
- package/fesm2015/osovitny-anatoly.js.map +1 -1
- package/lib/core/core.module.d.ts +4 -0
- package/lib/core/guards/once-import.guard.d.ts +1 -0
- package/lib/core/guid.d.ts +3 -0
- package/lib/core/index.d.ts +4 -0
- package/lib/core/logging/globalErrorHandler.d.ts +6 -0
- package/lib/core/logging/logging.service.d.ts +5 -0
- package/lib/core/subs.d.ts +8 -0
- package/lib/core/utils.d.ts +4 -2
- package/lib/data/base/base-api.service.d.ts +2 -2
- package/lib/data/base/grid/base-grid-edit.service.d.ts +3 -3
- package/lib/data/base/grid/base-grid-read.service.d.ts +2 -2
- package/lib/data/index.d.ts +5 -5
- package/lib/data/services/billing-api.service.d.ts +2 -2
- package/lib/ui/components/base-edit.component.d.ts +2 -2
- package/lib/ui/components/billing/buyaccess-button.component.d.ts +3 -3
- package/lib/ui/components/billing/subscribe-plan-button.component.d.ts +2 -2
- package/lib/ui/components/billing/upgrade-plan-button.component.d.ts +1 -1
- package/lib/ui/components/content-header/content-header.component.d.ts +1 -1
- package/lib/ui/components/copy-2-clipboard/copy-2-clipboard.component.d.ts +5 -0
- package/lib/ui/components/html-editor/base-html-editor.component.d.ts +2 -2
- package/lib/ui/components/html-editor/forms-html-editor.component.d.ts +1 -1
- package/lib/ui/components/html-editor/html-editor.component.d.ts +1 -1
- package/lib/ui/ui.module.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Swal from 'sweetalert2';
|
|
2
|
-
import {
|
|
2
|
+
import { v4 } from 'uuid';
|
|
3
|
+
import { Injectable, ɵɵdefineInjectable, Injector, NgModule, Optional, SkipSelf, Component, Input } from '@angular/core';
|
|
3
4
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
5
|
import { HttpClient } from '@angular/common/http';
|
|
5
6
|
import { map } from 'rxjs/operators';
|
|
@@ -10,8 +11,12 @@ import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
|
|
|
10
11
|
|
|
11
12
|
/*
|
|
12
13
|
<file>
|
|
14
|
+
Project:
|
|
15
|
+
@osovitny/anatoly
|
|
16
|
+
|
|
13
17
|
Authors:
|
|
14
18
|
Vadim Osovitny
|
|
19
|
+
Anatoly Osovitny
|
|
15
20
|
|
|
16
21
|
Created:
|
|
17
22
|
4 Mar 2020
|
|
@@ -150,11 +155,15 @@ class Alerts {
|
|
|
150
155
|
|
|
151
156
|
/*
|
|
152
157
|
<file>
|
|
158
|
+
Project:
|
|
159
|
+
@osovitny/anatoly
|
|
160
|
+
|
|
153
161
|
Authors:
|
|
154
162
|
Vadim Osovitny
|
|
163
|
+
Anatoly Osovitny
|
|
155
164
|
|
|
156
165
|
Created:
|
|
157
|
-
|
|
166
|
+
26 Jun 2020
|
|
158
167
|
|
|
159
168
|
Version:
|
|
160
169
|
1.0
|
|
@@ -163,22 +172,104 @@ class Alerts {
|
|
|
163
172
|
</file>
|
|
164
173
|
*/
|
|
165
174
|
class Utils {
|
|
166
|
-
static
|
|
167
|
-
return Utils.
|
|
175
|
+
static getValueByNameInQS(name) {
|
|
176
|
+
return Utils.getValueByName(location.search, name);
|
|
168
177
|
}
|
|
169
|
-
static
|
|
178
|
+
static getValueByName(url, name) {
|
|
170
179
|
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
|
171
180
|
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(url);
|
|
172
181
|
return results === null
|
|
173
182
|
? ""
|
|
174
183
|
: decodeURIComponent(results[1].replace(/\+/g, " "));
|
|
175
184
|
}
|
|
185
|
+
static copyToClipBoard(event, val) {
|
|
186
|
+
event.preventDefault();
|
|
187
|
+
let selBox = document.createElement("textarea");
|
|
188
|
+
selBox.style.position = "fixed";
|
|
189
|
+
selBox.style.left = "0";
|
|
190
|
+
selBox.style.top = "0";
|
|
191
|
+
selBox.style.opacity = "0";
|
|
192
|
+
selBox.value = val;
|
|
193
|
+
document.body.appendChild(selBox);
|
|
194
|
+
selBox.focus();
|
|
195
|
+
selBox.select();
|
|
196
|
+
document.execCommand("copy");
|
|
197
|
+
document.body.removeChild(selBox);
|
|
198
|
+
}
|
|
199
|
+
static downloadFile(name, url) {
|
|
200
|
+
var link = document.createElement("a");
|
|
201
|
+
link.download = name;
|
|
202
|
+
link.href = url;
|
|
203
|
+
link.click();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/*
|
|
208
|
+
<file>
|
|
209
|
+
Project:
|
|
210
|
+
@osovitny/anatoly
|
|
211
|
+
|
|
212
|
+
Authors:
|
|
213
|
+
Vadim Osovitny
|
|
214
|
+
Anatoly Osovitny
|
|
215
|
+
|
|
216
|
+
Created:
|
|
217
|
+
26 Jun 2020
|
|
218
|
+
|
|
219
|
+
Version:
|
|
220
|
+
1.0
|
|
221
|
+
|
|
222
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
223
|
+
</file>
|
|
224
|
+
*/
|
|
225
|
+
class Subs {
|
|
226
|
+
constructor() {
|
|
227
|
+
this.subs = [];
|
|
228
|
+
}
|
|
229
|
+
add(...subscriptions) {
|
|
230
|
+
this.subs = this.subs.concat(subscriptions);
|
|
231
|
+
}
|
|
232
|
+
set sink(subscription) {
|
|
233
|
+
this.subs.push(subscription);
|
|
234
|
+
}
|
|
235
|
+
unsubscribe() {
|
|
236
|
+
this.subs.forEach((sub) => sub && sub.unsubscribe());
|
|
237
|
+
this.subs = [];
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/*
|
|
242
|
+
<file>
|
|
243
|
+
Project:
|
|
244
|
+
@osovitny/anatoly
|
|
245
|
+
|
|
246
|
+
Authors:
|
|
247
|
+
Vadim Osovitny
|
|
248
|
+
Anatoly Osovitny
|
|
249
|
+
|
|
250
|
+
Created:
|
|
251
|
+
26 Jun 2020
|
|
252
|
+
|
|
253
|
+
Version:
|
|
254
|
+
1.0
|
|
255
|
+
|
|
256
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
257
|
+
</file>
|
|
258
|
+
*/
|
|
259
|
+
class Guid {
|
|
260
|
+
static newGuid() {
|
|
261
|
+
return v4();
|
|
262
|
+
}
|
|
176
263
|
}
|
|
177
264
|
|
|
178
265
|
/*
|
|
179
266
|
<file>
|
|
267
|
+
Project:
|
|
268
|
+
@osovitny/anatoly
|
|
269
|
+
|
|
180
270
|
Authors:
|
|
181
271
|
Vadim Osovitny
|
|
272
|
+
Anatoly Osovitny
|
|
182
273
|
|
|
183
274
|
Created:
|
|
184
275
|
17 Jun 2018
|
|
@@ -209,11 +300,15 @@ BaseGoService.ctorParameters = () => [
|
|
|
209
300
|
|
|
210
301
|
/*
|
|
211
302
|
<file>
|
|
303
|
+
Project:
|
|
304
|
+
@osovitny/anatoly
|
|
305
|
+
|
|
212
306
|
Authors:
|
|
213
307
|
Vadim Osovitny
|
|
308
|
+
Anatoly Osovitny
|
|
214
309
|
|
|
215
310
|
Created:
|
|
216
|
-
|
|
311
|
+
13 Nov 2017
|
|
217
312
|
|
|
218
313
|
Version:
|
|
219
314
|
1.0
|
|
@@ -227,43 +322,45 @@ class BaseApiService {
|
|
|
227
322
|
this.baseUrl = "";
|
|
228
323
|
}
|
|
229
324
|
serializeParams(data) {
|
|
230
|
-
return data ?
|
|
325
|
+
return data ? "?" + $.param(data) : "";
|
|
231
326
|
}
|
|
232
327
|
//api
|
|
233
328
|
get(action, data, responseType) {
|
|
234
329
|
if (!responseType) {
|
|
235
|
-
responseType =
|
|
330
|
+
responseType = "json";
|
|
236
331
|
}
|
|
237
332
|
var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
|
|
238
|
-
return this.http
|
|
333
|
+
return this.http
|
|
334
|
+
.get(url, { responseType: responseType })
|
|
335
|
+
.pipe(map((res) => res));
|
|
239
336
|
}
|
|
240
337
|
post(action, data, responseType) {
|
|
241
338
|
if (!responseType) {
|
|
242
|
-
responseType =
|
|
339
|
+
responseType = "text";
|
|
243
340
|
}
|
|
244
341
|
var url = `${this.baseUrl}/${action}`;
|
|
245
342
|
return this.http.post(url, data, { responseType: responseType });
|
|
246
343
|
}
|
|
247
344
|
postQS(action, data, responseType) {
|
|
248
345
|
if (!responseType) {
|
|
249
|
-
responseType =
|
|
346
|
+
responseType = "text";
|
|
250
347
|
}
|
|
251
348
|
var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
|
|
252
349
|
return this.http.post(url, null, { responseType: responseType });
|
|
253
350
|
}
|
|
254
351
|
delete(action, data, responseType) {
|
|
255
352
|
if (!responseType) {
|
|
256
|
-
responseType =
|
|
353
|
+
responseType = "text";
|
|
257
354
|
}
|
|
258
355
|
var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
|
|
259
356
|
return this.http.delete(url, { responseType: responseType });
|
|
260
357
|
}
|
|
261
358
|
//gets
|
|
262
359
|
getById(id) {
|
|
263
|
-
return this.get(
|
|
360
|
+
return this.get("getById", { id: id });
|
|
264
361
|
}
|
|
265
362
|
getAll(data) {
|
|
266
|
-
return this.get(
|
|
363
|
+
return this.get("getall", data).pipe(map((res) => res));
|
|
267
364
|
}
|
|
268
365
|
getJsonFile(fileName, jsonUrl, jsonVersion) {
|
|
269
366
|
if (!jsonUrl) {
|
|
@@ -272,12 +369,12 @@ class BaseApiService {
|
|
|
272
369
|
if (!jsonVersion) {
|
|
273
370
|
jsonVersion = "1.0";
|
|
274
371
|
}
|
|
275
|
-
var url = jsonUrl + "/" + fileName +
|
|
276
|
-
return this.http.get(url).pipe(map(res => res));
|
|
372
|
+
var url = jsonUrl + "/" + fileName + "?" + jsonVersion;
|
|
373
|
+
return this.http.get(url).pipe(map((res) => res));
|
|
277
374
|
}
|
|
278
375
|
getNewGuid() {
|
|
279
376
|
var url = `${this.baseUrl}/getNewGuid`;
|
|
280
|
-
return this.http.get(url, { responseType:
|
|
377
|
+
return this.http.get(url, { responseType: "text" });
|
|
281
378
|
}
|
|
282
379
|
}
|
|
283
380
|
BaseApiService.decorators = [
|
|
@@ -289,8 +386,12 @@ BaseApiService.ctorParameters = () => [
|
|
|
289
386
|
|
|
290
387
|
/*
|
|
291
388
|
<file>
|
|
389
|
+
Project:
|
|
390
|
+
@osovitny/anatoly
|
|
391
|
+
|
|
292
392
|
Authors:
|
|
293
393
|
Vadim Osovitny
|
|
394
|
+
Anatoly Osovitny
|
|
294
395
|
|
|
295
396
|
Created:
|
|
296
397
|
13 Nov 2017
|
|
@@ -351,20 +452,151 @@ AppContextService.ctorParameters = () => [
|
|
|
351
452
|
{ type: HttpClient }
|
|
352
453
|
];
|
|
353
454
|
|
|
455
|
+
/*
|
|
456
|
+
<file>
|
|
457
|
+
Project:
|
|
458
|
+
@osovitny/anatoly
|
|
459
|
+
|
|
460
|
+
Authors:
|
|
461
|
+
Vadim Osovitny
|
|
462
|
+
Anatoly Osovitny
|
|
463
|
+
|
|
464
|
+
Created:
|
|
465
|
+
26 Jun 2020
|
|
466
|
+
|
|
467
|
+
Version:
|
|
468
|
+
1.0
|
|
469
|
+
|
|
470
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
471
|
+
</file>
|
|
472
|
+
*/
|
|
473
|
+
class LoggingService {
|
|
474
|
+
constructor() { }
|
|
475
|
+
logError(error) {
|
|
476
|
+
console.error(error);
|
|
477
|
+
}
|
|
478
|
+
logInformation(info) {
|
|
479
|
+
console.info(info);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
LoggingService.ɵprov = ɵɵdefineInjectable({ factory: function LoggingService_Factory() { return new LoggingService(); }, token: LoggingService, providedIn: "root" });
|
|
483
|
+
LoggingService.decorators = [
|
|
484
|
+
{ type: Injectable, args: [{
|
|
485
|
+
providedIn: "root",
|
|
486
|
+
},] }
|
|
487
|
+
];
|
|
488
|
+
LoggingService.ctorParameters = () => [];
|
|
489
|
+
|
|
490
|
+
/*
|
|
491
|
+
<file>
|
|
492
|
+
Project:
|
|
493
|
+
@osovitny/anatoly
|
|
494
|
+
|
|
495
|
+
Authors:
|
|
496
|
+
Vadim Osovitny
|
|
497
|
+
Anatoly Osovitny
|
|
498
|
+
|
|
499
|
+
Created:
|
|
500
|
+
26 Jun 2020
|
|
501
|
+
|
|
502
|
+
Version:
|
|
503
|
+
1.0
|
|
504
|
+
|
|
505
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
506
|
+
</file>
|
|
507
|
+
*/
|
|
508
|
+
class GlobalErrorHandler {
|
|
509
|
+
constructor(injector) {
|
|
510
|
+
this.injector = injector;
|
|
511
|
+
}
|
|
512
|
+
handleError(error) {
|
|
513
|
+
const loggingService = this.injector.get(LoggingService);
|
|
514
|
+
loggingService.logError(error);
|
|
515
|
+
// IMPORTANT: Rethrow the error otherwise it gets swallowed
|
|
516
|
+
throw error;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
GlobalErrorHandler.decorators = [
|
|
520
|
+
{ type: Injectable }
|
|
521
|
+
];
|
|
522
|
+
GlobalErrorHandler.ctorParameters = () => [
|
|
523
|
+
{ type: Injector }
|
|
524
|
+
];
|
|
525
|
+
|
|
526
|
+
/*
|
|
527
|
+
<file>
|
|
528
|
+
Project:
|
|
529
|
+
@osovitny/anatoly
|
|
530
|
+
|
|
531
|
+
Authors:
|
|
532
|
+
Vadim Osovitny
|
|
533
|
+
Anatoly Osovitny
|
|
534
|
+
|
|
535
|
+
Created:
|
|
536
|
+
26 Jun 2020
|
|
537
|
+
|
|
538
|
+
Version:
|
|
539
|
+
1.0
|
|
540
|
+
|
|
541
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
542
|
+
</file>
|
|
543
|
+
*/
|
|
544
|
+
function throwIfAlreadyLoaded(parentModule, moduleName) {
|
|
545
|
+
if (parentModule) {
|
|
546
|
+
throw new Error(`${moduleName} has already been loaded. Import ${moduleName} modules in the AppModule only.`);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
const providers = [
|
|
551
|
+
LoggingService,
|
|
552
|
+
AppContextService,
|
|
553
|
+
];
|
|
554
|
+
let InjectorInstance;
|
|
354
555
|
class AnatolyCoreModule {
|
|
556
|
+
constructor(injector, parentModule) {
|
|
557
|
+
this.injector = injector;
|
|
558
|
+
throwIfAlreadyLoaded(parentModule, "AnatolyCoreModule");
|
|
559
|
+
InjectorInstance = this.injector;
|
|
560
|
+
}
|
|
355
561
|
}
|
|
356
562
|
AnatolyCoreModule.decorators = [
|
|
357
563
|
{ type: NgModule, args: [{
|
|
358
|
-
declarations: [],
|
|
359
564
|
imports: [CommonModule],
|
|
360
|
-
providers: [
|
|
565
|
+
providers: [...providers],
|
|
361
566
|
},] }
|
|
567
|
+
];
|
|
568
|
+
AnatolyCoreModule.ctorParameters = () => [
|
|
569
|
+
{ type: Injector },
|
|
570
|
+
{ type: AnatolyCoreModule, decorators: [{ type: Optional }, { type: SkipSelf }] }
|
|
362
571
|
];
|
|
363
572
|
|
|
364
573
|
/*
|
|
365
574
|
<file>
|
|
575
|
+
Project:
|
|
576
|
+
@osovitny/anatoly
|
|
577
|
+
|
|
578
|
+
Authors:
|
|
579
|
+
Vadim Osovitny
|
|
580
|
+
Anatoly Osovitny
|
|
581
|
+
|
|
582
|
+
Created:
|
|
583
|
+
26 Jun 2020
|
|
584
|
+
|
|
585
|
+
Version:
|
|
586
|
+
1.0
|
|
587
|
+
|
|
588
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
589
|
+
</file>
|
|
590
|
+
*/
|
|
591
|
+
|
|
592
|
+
/*
|
|
593
|
+
<file>
|
|
594
|
+
Project:
|
|
595
|
+
@osovitny/anatoly
|
|
596
|
+
|
|
366
597
|
Authors:
|
|
367
598
|
Vadim Osovitny
|
|
599
|
+
Anatoly Osovitny
|
|
368
600
|
|
|
369
601
|
Created:
|
|
370
602
|
29 Apr 2018
|
|
@@ -383,25 +615,28 @@ class BaseGridReadService extends BehaviorSubject {
|
|
|
383
615
|
this.data = [];
|
|
384
616
|
}
|
|
385
617
|
serializeParams(data) {
|
|
386
|
-
return data ?
|
|
618
|
+
return data ? "?" + $.param(data) : "";
|
|
387
619
|
}
|
|
388
620
|
read(params, success, error) {
|
|
389
621
|
if (this.data.length) {
|
|
390
622
|
return super.next(this.data);
|
|
391
623
|
}
|
|
392
624
|
var url = this.baseReadUrl;
|
|
393
|
-
if (typeof params ===
|
|
625
|
+
if (typeof params === "undefined") {
|
|
394
626
|
params = this.savedReadParams;
|
|
395
627
|
}
|
|
396
628
|
if (params) {
|
|
397
629
|
url = this.baseReadUrl + `${this.serializeParams(params)}`;
|
|
398
630
|
this.savedReadParams = params;
|
|
399
631
|
}
|
|
400
|
-
this.http
|
|
632
|
+
this.http
|
|
633
|
+
.get(url)
|
|
634
|
+
.pipe(map((res) => res))
|
|
635
|
+
.subscribe((data) => {
|
|
401
636
|
super.next(data);
|
|
402
637
|
if (success)
|
|
403
638
|
success();
|
|
404
|
-
}, e => {
|
|
639
|
+
}, (e) => {
|
|
405
640
|
if (error)
|
|
406
641
|
error(e);
|
|
407
642
|
});
|
|
@@ -416,8 +651,12 @@ BaseGridReadService.ctorParameters = () => [
|
|
|
416
651
|
|
|
417
652
|
/*
|
|
418
653
|
<file>
|
|
654
|
+
Project:
|
|
655
|
+
@osovitny/anatoly
|
|
656
|
+
|
|
419
657
|
Authors:
|
|
420
658
|
Vadim Osovitny
|
|
659
|
+
Anatoly Osovitny
|
|
421
660
|
|
|
422
661
|
Created:
|
|
423
662
|
29 Apr 2018
|
|
@@ -442,16 +681,15 @@ class BaseGridEditService extends BaseGridReadService {
|
|
|
442
681
|
return;
|
|
443
682
|
}
|
|
444
683
|
//find orignal data item
|
|
445
|
-
const originalDataItem = this.data.find(item => item.Id === dataItem.Id);
|
|
684
|
+
const originalDataItem = this.data.find((item) => item.Id === dataItem.Id);
|
|
446
685
|
//revert changes
|
|
447
686
|
Object.assign(originalDataItem, dataItem);
|
|
448
687
|
super.next(this.data);
|
|
449
688
|
}
|
|
450
689
|
save(data, isNew, sucess) {
|
|
451
|
-
const action = isNew ?
|
|
690
|
+
const action = isNew ? "add" : "update";
|
|
452
691
|
this.reset();
|
|
453
|
-
this.post(action, data).subscribe(() => {
|
|
454
|
-
}, () => {
|
|
692
|
+
this.post(action, data).subscribe(() => { }, () => {
|
|
455
693
|
this.read();
|
|
456
694
|
}, () => {
|
|
457
695
|
this.read();
|
|
@@ -461,8 +699,7 @@ class BaseGridEditService extends BaseGridReadService {
|
|
|
461
699
|
}
|
|
462
700
|
remove(data, sucess) {
|
|
463
701
|
this.reset();
|
|
464
|
-
this.post(
|
|
465
|
-
}, () => {
|
|
702
|
+
this.post("remove", data).subscribe(() => { }, () => {
|
|
466
703
|
this.read();
|
|
467
704
|
}, () => {
|
|
468
705
|
this.read();
|
|
@@ -472,7 +709,7 @@ class BaseGridEditService extends BaseGridReadService {
|
|
|
472
709
|
}
|
|
473
710
|
post(action, data) {
|
|
474
711
|
var url = this.baseUrl + `${action}${this.serializeParams(data)}`;
|
|
475
|
-
return this.http.post(url, data).pipe(map(res => res));
|
|
712
|
+
return this.http.post(url, data).pipe(map((res) => res));
|
|
476
713
|
}
|
|
477
714
|
}
|
|
478
715
|
BaseGridEditService.decorators = [
|
|
@@ -484,8 +721,12 @@ BaseGridEditService.ctorParameters = () => [
|
|
|
484
721
|
|
|
485
722
|
/*
|
|
486
723
|
<file>
|
|
724
|
+
Project:
|
|
725
|
+
@osovitny/anatoly
|
|
726
|
+
|
|
487
727
|
Authors:
|
|
488
728
|
Vadim Osovitny
|
|
729
|
+
Anatoly Osovitny
|
|
489
730
|
|
|
490
731
|
Created:
|
|
491
732
|
12 Nov 2017
|
|
@@ -500,25 +741,36 @@ class BillingApiService extends BaseApiService {
|
|
|
500
741
|
constructor(http) {
|
|
501
742
|
super(http);
|
|
502
743
|
this.http = http;
|
|
503
|
-
this.baseUrl +=
|
|
744
|
+
this.baseUrl += "billing/";
|
|
504
745
|
}
|
|
505
746
|
requestNewSubscription(requestedPlan, success, error) {
|
|
506
|
-
this.postQS(
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
747
|
+
this.postQS("requestNewSubscription", {
|
|
748
|
+
requestedPlan: requestedPlan,
|
|
749
|
+
}).subscribe((data) => { }, (e) => {
|
|
750
|
+
if (error)
|
|
751
|
+
error();
|
|
752
|
+
}, () => {
|
|
753
|
+
if (success)
|
|
754
|
+
success();
|
|
755
|
+
});
|
|
510
756
|
}
|
|
511
757
|
cancelRequestedSubscription(success, error) {
|
|
512
|
-
this.postQS(
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
758
|
+
this.postQS("cancelRequestedSubscription", null).subscribe((data) => { }, (e) => {
|
|
759
|
+
if (error)
|
|
760
|
+
error();
|
|
761
|
+
}, () => {
|
|
762
|
+
if (success)
|
|
763
|
+
success();
|
|
764
|
+
});
|
|
516
765
|
}
|
|
517
766
|
buyAccess(requestedPlan, success, error) {
|
|
518
|
-
this.postQS(
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
767
|
+
this.postQS("buyAccess", { requestedPlan: requestedPlan }).subscribe((data) => { }, (e) => {
|
|
768
|
+
if (error)
|
|
769
|
+
error();
|
|
770
|
+
}, () => {
|
|
771
|
+
if (success)
|
|
772
|
+
success();
|
|
773
|
+
});
|
|
522
774
|
}
|
|
523
775
|
}
|
|
524
776
|
BillingApiService.decorators = [
|
|
@@ -530,8 +782,12 @@ BillingApiService.ctorParameters = () => [
|
|
|
530
782
|
|
|
531
783
|
/*
|
|
532
784
|
<file>
|
|
785
|
+
Project:
|
|
786
|
+
@osovitny/anatoly
|
|
787
|
+
|
|
533
788
|
Authors:
|
|
534
789
|
Vadim Osovitny
|
|
790
|
+
Anatoly Osovitny
|
|
535
791
|
|
|
536
792
|
Created:
|
|
537
793
|
4 Mar 2020
|
|
@@ -546,21 +802,38 @@ class AnatolyDataModule {
|
|
|
546
802
|
}
|
|
547
803
|
AnatolyDataModule.decorators = [
|
|
548
804
|
{ type: NgModule, args: [{
|
|
549
|
-
imports: [
|
|
550
|
-
|
|
551
|
-
],
|
|
552
|
-
providers: [
|
|
553
|
-
BillingApiService
|
|
554
|
-
]
|
|
805
|
+
imports: [CommonModule],
|
|
806
|
+
providers: [BillingApiService],
|
|
555
807
|
},] }
|
|
556
808
|
];
|
|
557
809
|
|
|
558
|
-
|
|
810
|
+
/*
|
|
811
|
+
<file>
|
|
812
|
+
Project:
|
|
813
|
+
@osovitny/anatoly
|
|
814
|
+
|
|
815
|
+
Authors:
|
|
816
|
+
Vadim Osovitny
|
|
817
|
+
Anatoly Osovitny
|
|
818
|
+
|
|
819
|
+
Created:
|
|
820
|
+
4 Mar 2020
|
|
821
|
+
|
|
822
|
+
Version:
|
|
823
|
+
1.0
|
|
824
|
+
|
|
825
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
826
|
+
</file>
|
|
827
|
+
*/
|
|
559
828
|
|
|
560
829
|
/*
|
|
561
830
|
<file>
|
|
831
|
+
Project:
|
|
832
|
+
@osovitny/anatoly
|
|
833
|
+
|
|
562
834
|
Authors:
|
|
563
835
|
Vadim Osovitny
|
|
836
|
+
Anatoly Osovitny
|
|
564
837
|
|
|
565
838
|
Created:
|
|
566
839
|
1 Jun 2018
|
|
@@ -577,9 +850,9 @@ class SubscribePlanButtonComponent {
|
|
|
577
850
|
this.contextUpdated = false;
|
|
578
851
|
this.isUserSignedIn = false;
|
|
579
852
|
this.currentPlan = 0;
|
|
580
|
-
this.currentPlanTitle =
|
|
853
|
+
this.currentPlanTitle = "";
|
|
581
854
|
this.requestedPlan = 0;
|
|
582
|
-
this.requestedPlanTitle =
|
|
855
|
+
this.requestedPlanTitle = "";
|
|
583
856
|
}
|
|
584
857
|
ngOnInit() {
|
|
585
858
|
if (!this.appcontext.isUserSignedIn()) {
|
|
@@ -600,7 +873,7 @@ class SubscribePlanButtonComponent {
|
|
|
600
873
|
}
|
|
601
874
|
SubscribePlanButtonComponent.decorators = [
|
|
602
875
|
{ type: Component, args: [{
|
|
603
|
-
selector:
|
|
876
|
+
selector: "anatoly-subscribe-plan-button",
|
|
604
877
|
template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classbtn=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\" *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\" *ngIf=\"requestedPlan != null && requestedPlan != 0 && plan == requestedPlan\">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf=\"plan != currentPlan && plan != requestedPlan\"\r\n [currentplantitle]=\"currentPlanTitle\"\r\n [requestedplan]=plan\r\n [requestedplantitle]=\"plantitle\">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n"
|
|
605
878
|
},] }
|
|
606
879
|
];
|
|
@@ -614,8 +887,12 @@ SubscribePlanButtonComponent.propDecorators = {
|
|
|
614
887
|
|
|
615
888
|
/*
|
|
616
889
|
<file>
|
|
890
|
+
Project:
|
|
891
|
+
@osovitny/anatoly
|
|
892
|
+
|
|
617
893
|
Authors:
|
|
618
894
|
Vadim Osovitny
|
|
895
|
+
Anatoly Osovitny
|
|
619
896
|
|
|
620
897
|
Created:
|
|
621
898
|
12 Nov 2017
|
|
@@ -634,9 +911,9 @@ class UpgradePlanButtonComponent {
|
|
|
634
911
|
onUpgradePlan() {
|
|
635
912
|
const text = `Current plan: ${this.currentplantitle} New plan: ${this.requestedplantitle}`;
|
|
636
913
|
const that = this;
|
|
637
|
-
Alerts.AreYouSure(text,
|
|
914
|
+
Alerts.AreYouSure(text, "Change billing plan", "Confirm change", "Cancel", () => {
|
|
638
915
|
that.api.requestNewSubscription(that.requestedplan, () => {
|
|
639
|
-
Alerts.Success(
|
|
916
|
+
Alerts.Success("Your request for changing plan has been sent.", null, () => {
|
|
640
917
|
window.location.reload();
|
|
641
918
|
});
|
|
642
919
|
});
|
|
@@ -645,7 +922,7 @@ class UpgradePlanButtonComponent {
|
|
|
645
922
|
}
|
|
646
923
|
UpgradePlanButtonComponent.decorators = [
|
|
647
924
|
{ type: Component, args: [{
|
|
648
|
-
selector:
|
|
925
|
+
selector: "anatoly-upgrade-plan-button",
|
|
649
926
|
template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n"
|
|
650
927
|
},] }
|
|
651
928
|
];
|
|
@@ -660,6 +937,9 @@ UpgradePlanButtonComponent.propDecorators = {
|
|
|
660
937
|
|
|
661
938
|
/*
|
|
662
939
|
<file>
|
|
940
|
+
Project:
|
|
941
|
+
@osovitny/anatoly
|
|
942
|
+
|
|
663
943
|
Authors:
|
|
664
944
|
Vadim Osovitny
|
|
665
945
|
Anatoly Osovitny
|
|
@@ -680,7 +960,7 @@ class BuyAccessButtonComponent {
|
|
|
680
960
|
this.contextUpdated = false;
|
|
681
961
|
this.isUserSignedIn = false;
|
|
682
962
|
this.currentPlan = 0;
|
|
683
|
-
this.currentPlanTitle =
|
|
963
|
+
this.currentPlanTitle = "";
|
|
684
964
|
}
|
|
685
965
|
ngOnInit() {
|
|
686
966
|
if (!this.appcontext.isUserSignedIn()) {
|
|
@@ -699,9 +979,9 @@ class BuyAccessButtonComponent {
|
|
|
699
979
|
onBuyPlan() {
|
|
700
980
|
const text = `Requested plan: ${this.plantitle} `;
|
|
701
981
|
const that = this;
|
|
702
|
-
Alerts.AreYouSure(text,
|
|
982
|
+
Alerts.AreYouSure(text, "Buying access", "Confirm change", "Cancel", () => {
|
|
703
983
|
that.api.buyAccess(that.plan, () => {
|
|
704
|
-
Alerts.Success(
|
|
984
|
+
Alerts.Success("Access Granted", null, () => {
|
|
705
985
|
window.location.reload();
|
|
706
986
|
});
|
|
707
987
|
});
|
|
@@ -710,7 +990,7 @@ class BuyAccessButtonComponent {
|
|
|
710
990
|
}
|
|
711
991
|
BuyAccessButtonComponent.decorators = [
|
|
712
992
|
{ type: Component, args: [{
|
|
713
|
-
selector:
|
|
993
|
+
selector: "anatoly-buyaccess-button",
|
|
714
994
|
template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classbtn=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\" *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\" *ngIf=\"plan != currentPlan && currentPlan == 1\" (click)=\"onBuyPlan()\">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n"
|
|
715
995
|
},] }
|
|
716
996
|
];
|
|
@@ -725,8 +1005,12 @@ BuyAccessButtonComponent.propDecorators = {
|
|
|
725
1005
|
|
|
726
1006
|
/*
|
|
727
1007
|
<file>
|
|
1008
|
+
Project:
|
|
1009
|
+
@osovitny/anatoly
|
|
1010
|
+
|
|
728
1011
|
Authors:
|
|
729
1012
|
Vadim Osovitny
|
|
1013
|
+
Anatoly Osovitny
|
|
730
1014
|
|
|
731
1015
|
Created:
|
|
732
1016
|
4 Jul 2018
|
|
@@ -734,7 +1018,7 @@ BuyAccessButtonComponent.propDecorators = {
|
|
|
734
1018
|
Version:
|
|
735
1019
|
1.0
|
|
736
1020
|
|
|
737
|
-
Copyright (c)
|
|
1021
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
738
1022
|
</file>
|
|
739
1023
|
*/
|
|
740
1024
|
class SignInButtonComponent {
|
|
@@ -742,7 +1026,7 @@ class SignInButtonComponent {
|
|
|
742
1026
|
}
|
|
743
1027
|
SignInButtonComponent.decorators = [
|
|
744
1028
|
{ type: Component, args: [{
|
|
745
|
-
selector:
|
|
1029
|
+
selector: "anatoly-signin-button",
|
|
746
1030
|
template: "<a href=\"identity/signIn\" class=\"{{classbtn}}\">Sign In</a>\r\n"
|
|
747
1031
|
},] }
|
|
748
1032
|
];
|
|
@@ -753,8 +1037,12 @@ SignInButtonComponent.propDecorators = {
|
|
|
753
1037
|
|
|
754
1038
|
/*
|
|
755
1039
|
<file>
|
|
1040
|
+
Project:
|
|
1041
|
+
@osovitny/anatoly
|
|
1042
|
+
|
|
756
1043
|
Authors:
|
|
757
1044
|
Vadim Osovitny
|
|
1045
|
+
Anatoly Osovitny
|
|
758
1046
|
|
|
759
1047
|
Created:
|
|
760
1048
|
4 Jul 2018
|
|
@@ -762,7 +1050,7 @@ SignInButtonComponent.propDecorators = {
|
|
|
762
1050
|
Version:
|
|
763
1051
|
1.0
|
|
764
1052
|
|
|
765
|
-
Copyright (c)
|
|
1053
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
766
1054
|
</file>
|
|
767
1055
|
*/
|
|
768
1056
|
class SignUpButtonComponent {
|
|
@@ -779,8 +1067,12 @@ SignUpButtonComponent.propDecorators = {
|
|
|
779
1067
|
|
|
780
1068
|
/*
|
|
781
1069
|
<file>
|
|
1070
|
+
Project:
|
|
1071
|
+
@osovitny/anatoly
|
|
1072
|
+
|
|
782
1073
|
Authors:
|
|
783
1074
|
Vadim Osovitny
|
|
1075
|
+
Anatoly Osovitny
|
|
784
1076
|
|
|
785
1077
|
Created:
|
|
786
1078
|
4 Jul 2018
|
|
@@ -788,7 +1080,7 @@ SignUpButtonComponent.propDecorators = {
|
|
|
788
1080
|
Version:
|
|
789
1081
|
1.0
|
|
790
1082
|
|
|
791
|
-
Copyright (c)
|
|
1083
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
792
1084
|
</file>
|
|
793
1085
|
*/
|
|
794
1086
|
class SignOutButtonComponent {
|
|
@@ -796,7 +1088,7 @@ class SignOutButtonComponent {
|
|
|
796
1088
|
}
|
|
797
1089
|
SignOutButtonComponent.decorators = [
|
|
798
1090
|
{ type: Component, args: [{
|
|
799
|
-
selector:
|
|
1091
|
+
selector: "anatoly-signout-button",
|
|
800
1092
|
template: "<a href=\"identity/signOut\" class=\"{{classbtn}}\">Sign Out</a>\r\n"
|
|
801
1093
|
},] }
|
|
802
1094
|
];
|
|
@@ -807,8 +1099,12 @@ SignOutButtonComponent.propDecorators = {
|
|
|
807
1099
|
|
|
808
1100
|
/*
|
|
809
1101
|
<file>
|
|
1102
|
+
Project:
|
|
1103
|
+
@osovitny/anatoly
|
|
1104
|
+
|
|
810
1105
|
Authors:
|
|
811
1106
|
Vadim Osovitny
|
|
1107
|
+
Anatoly Osovitny
|
|
812
1108
|
|
|
813
1109
|
Created:
|
|
814
1110
|
28 Aug 2018
|
|
@@ -821,17 +1117,17 @@ SignOutButtonComponent.propDecorators = {
|
|
|
821
1117
|
*/
|
|
822
1118
|
class BaseComponent {
|
|
823
1119
|
getQSId() {
|
|
824
|
-
|
|
825
|
-
if (typeof id ===
|
|
1120
|
+
let id = Utils.getValueByNameInQS("id");
|
|
1121
|
+
if (typeof id === "undefined" || id === "")
|
|
826
1122
|
return null;
|
|
827
1123
|
return id;
|
|
828
1124
|
}
|
|
829
1125
|
showLoading() {
|
|
830
|
-
|
|
1126
|
+
let panelLoading = $("#pnlLoading");
|
|
831
1127
|
panelLoading.show();
|
|
832
1128
|
}
|
|
833
1129
|
hideLoading() {
|
|
834
|
-
|
|
1130
|
+
let panelLoading = $("#pnlLoading");
|
|
835
1131
|
panelLoading.hide();
|
|
836
1132
|
}
|
|
837
1133
|
handleError(e) {
|
|
@@ -842,8 +1138,12 @@ class BaseComponent {
|
|
|
842
1138
|
|
|
843
1139
|
/*
|
|
844
1140
|
<file>
|
|
1141
|
+
Project:
|
|
1142
|
+
@osovitny/anatoly
|
|
1143
|
+
|
|
845
1144
|
Authors:
|
|
846
1145
|
Vadim Osovitny
|
|
1146
|
+
Anatoly Osovitny
|
|
847
1147
|
|
|
848
1148
|
Created:
|
|
849
1149
|
20 Nov 2017
|
|
@@ -860,8 +1160,8 @@ class BaseEditComponent extends BaseComponent {
|
|
|
860
1160
|
this.formSubmitted = false;
|
|
861
1161
|
}
|
|
862
1162
|
isActionAdding() {
|
|
863
|
-
|
|
864
|
-
if (typeof id ===
|
|
1163
|
+
let id = Utils.getValueByNameInQS("id");
|
|
1164
|
+
if (typeof id === "undefined" || id === "")
|
|
865
1165
|
return true;
|
|
866
1166
|
return false;
|
|
867
1167
|
}
|
|
@@ -869,7 +1169,7 @@ class BaseEditComponent extends BaseComponent {
|
|
|
869
1169
|
return this.getQSId();
|
|
870
1170
|
}
|
|
871
1171
|
isItemInvalid(name) {
|
|
872
|
-
if (typeof name ===
|
|
1172
|
+
if (typeof name === "undefined" || name === "") {
|
|
873
1173
|
return false;
|
|
874
1174
|
}
|
|
875
1175
|
if (!this.formGroup) {
|
|
@@ -901,8 +1201,12 @@ BaseEditComponent.propDecorators = {
|
|
|
901
1201
|
|
|
902
1202
|
/*
|
|
903
1203
|
<file>
|
|
1204
|
+
Project:
|
|
1205
|
+
@osovitny/anatoly
|
|
1206
|
+
|
|
904
1207
|
Authors:
|
|
905
1208
|
Vadim Osovitny
|
|
1209
|
+
Anatoly Osovitny
|
|
906
1210
|
|
|
907
1211
|
Created:
|
|
908
1212
|
8 Dec 2017
|
|
@@ -959,8 +1263,12 @@ class ValidationSummaryComponent extends BaseEditComponent {
|
|
|
959
1263
|
|
|
960
1264
|
/*
|
|
961
1265
|
<file>
|
|
1266
|
+
Project:
|
|
1267
|
+
@osovitny/anatoly
|
|
1268
|
+
|
|
962
1269
|
Authors:
|
|
963
1270
|
Vadim Osovitny
|
|
1271
|
+
Anatoly Osovitny
|
|
964
1272
|
|
|
965
1273
|
Created:
|
|
966
1274
|
7 Dec 2017
|
|
@@ -994,8 +1302,12 @@ FormValidationSummaryComponent.propDecorators = {
|
|
|
994
1302
|
|
|
995
1303
|
/*
|
|
996
1304
|
<file>
|
|
1305
|
+
Project:
|
|
1306
|
+
@osovitny/anatoly
|
|
1307
|
+
|
|
997
1308
|
Authors:
|
|
998
1309
|
Vadim Osovitny
|
|
1310
|
+
Anatoly Osovitny
|
|
999
1311
|
|
|
1000
1312
|
Created:
|
|
1001
1313
|
6 Dec 2017
|
|
@@ -1023,43 +1335,103 @@ ItemValidationSummaryComponent.propDecorators = {
|
|
|
1023
1335
|
controlTitle: [{ type: Input }]
|
|
1024
1336
|
};
|
|
1025
1337
|
|
|
1338
|
+
/*
|
|
1339
|
+
<file>
|
|
1340
|
+
Project:
|
|
1341
|
+
@osovitny/anatoly
|
|
1342
|
+
|
|
1343
|
+
Authors:
|
|
1344
|
+
Vadim Osovitny
|
|
1345
|
+
Anatoly Osovitny
|
|
1346
|
+
|
|
1347
|
+
Created:
|
|
1348
|
+
12 Dec 2017
|
|
1349
|
+
|
|
1350
|
+
Version:
|
|
1351
|
+
1.0
|
|
1352
|
+
|
|
1353
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1354
|
+
</file>
|
|
1355
|
+
*/
|
|
1026
1356
|
const DefaultEditorOptions = {
|
|
1027
|
-
placeholderText:
|
|
1357
|
+
placeholderText: "Edit Your Content Here",
|
|
1028
1358
|
charCounterCount: true,
|
|
1029
1359
|
heightMin: 100,
|
|
1030
1360
|
toolbarInline: false,
|
|
1031
1361
|
toolbarButtons: {
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1362
|
+
moreText: {
|
|
1363
|
+
buttons: [
|
|
1364
|
+
"bold",
|
|
1365
|
+
"italic",
|
|
1366
|
+
"underline",
|
|
1367
|
+
"strikeThrough",
|
|
1368
|
+
"subscript",
|
|
1369
|
+
"superscript",
|
|
1370
|
+
"fontFamily",
|
|
1371
|
+
"fontSize",
|
|
1372
|
+
"textColor",
|
|
1373
|
+
"backgroundColor",
|
|
1374
|
+
"inlineClass",
|
|
1375
|
+
"inlineStyle",
|
|
1376
|
+
],
|
|
1035
1377
|
},
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1378
|
+
moreParagraph: {
|
|
1379
|
+
buttons: [
|
|
1380
|
+
"alignLeft",
|
|
1381
|
+
"alignCenter",
|
|
1382
|
+
"formatOLSimple",
|
|
1383
|
+
"alignRight",
|
|
1384
|
+
"alignJustify",
|
|
1385
|
+
"formatOL",
|
|
1386
|
+
"formatUL",
|
|
1387
|
+
"paragraphFormat",
|
|
1388
|
+
"paragraphStyle",
|
|
1389
|
+
"lineHeight",
|
|
1390
|
+
"outdent",
|
|
1391
|
+
"indent",
|
|
1392
|
+
"quote",
|
|
1393
|
+
],
|
|
1039
1394
|
},
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1395
|
+
moreRich: {
|
|
1396
|
+
buttons: [
|
|
1397
|
+
"insertLink",
|
|
1398
|
+
"insertImage",
|
|
1399
|
+
"insertTable",
|
|
1400
|
+
"emoticons",
|
|
1401
|
+
"fontAwesome",
|
|
1402
|
+
"specialCharacters",
|
|
1403
|
+
"embedly",
|
|
1404
|
+
],
|
|
1405
|
+
},
|
|
1406
|
+
moreMisc: {
|
|
1407
|
+
buttons: [
|
|
1408
|
+
"selectAll",
|
|
1409
|
+
"clearFormatting",
|
|
1410
|
+
"html",
|
|
1411
|
+
"undo",
|
|
1412
|
+
"redo",
|
|
1413
|
+
"fullscreen",
|
|
1414
|
+
],
|
|
1415
|
+
align: "right",
|
|
1043
1416
|
},
|
|
1044
|
-
'moreMisc': {
|
|
1045
|
-
'buttons': ['selectAll', 'clearFormatting', 'html', 'undo', 'redo', 'fullscreen'],
|
|
1046
|
-
'align': 'right',
|
|
1047
|
-
}
|
|
1048
1417
|
},
|
|
1049
1418
|
/*
|
|
1050
1419
|
Upload:
|
|
1051
1420
|
https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload
|
|
1052
1421
|
*/
|
|
1053
|
-
imageUploadURL:
|
|
1054
|
-
imageAllowedTypes: [
|
|
1055
|
-
imageUploadParams: { uploadType:
|
|
1422
|
+
imageUploadURL: "/api/HtmlEditor/UploadImage",
|
|
1423
|
+
imageAllowedTypes: ["jpeg", "jpg", "png"],
|
|
1424
|
+
imageUploadParams: { uploadType: "", uploadParentId: "" },
|
|
1056
1425
|
};
|
|
1057
1426
|
|
|
1058
1427
|
/*
|
|
1059
1428
|
<file>
|
|
1429
|
+
Project:
|
|
1430
|
+
@osovitny/anatoly
|
|
1431
|
+
|
|
1060
1432
|
Authors:
|
|
1061
|
-
Anatoly Osovitny
|
|
1062
1433
|
Vadim Osovitny
|
|
1434
|
+
Anatoly Osovitny
|
|
1063
1435
|
|
|
1064
1436
|
Created:
|
|
1065
1437
|
12 Dec 2017
|
|
@@ -1076,7 +1448,7 @@ class BaseHtmlEditorComponent extends BaseEditComponent {
|
|
|
1076
1448
|
this.froalaEditorInitialized = false;
|
|
1077
1449
|
this.afterInitializedActions = [];
|
|
1078
1450
|
//Inputs
|
|
1079
|
-
this.editorLabelText =
|
|
1451
|
+
this.editorLabelText = "Html";
|
|
1080
1452
|
this.editorOptions = {};
|
|
1081
1453
|
}
|
|
1082
1454
|
ngOnInit() {
|
|
@@ -1120,7 +1492,9 @@ class BaseHtmlEditorComponent extends BaseEditComponent {
|
|
|
1120
1492
|
doAfterInitialized(action) {
|
|
1121
1493
|
let that = this;
|
|
1122
1494
|
if (!this.froalaEditorInitialized) {
|
|
1123
|
-
this.afterInitializedActions.push(() => {
|
|
1495
|
+
this.afterInitializedActions.push(() => {
|
|
1496
|
+
action(that);
|
|
1497
|
+
});
|
|
1124
1498
|
}
|
|
1125
1499
|
else {
|
|
1126
1500
|
action(that);
|
|
@@ -1133,7 +1507,7 @@ class BaseHtmlEditorComponent extends BaseEditComponent {
|
|
|
1133
1507
|
setUploadParams(uploadType, uploadParentId) {
|
|
1134
1508
|
this.doAfterInitialized(function (that) {
|
|
1135
1509
|
var editor = that.getEditor();
|
|
1136
|
-
if (typeof
|
|
1510
|
+
if (typeof editor == "undefined" || editor == null) {
|
|
1137
1511
|
return;
|
|
1138
1512
|
}
|
|
1139
1513
|
editor.opts.imageUploadParams.uploadType = uploadType;
|
|
@@ -1148,9 +1522,12 @@ BaseHtmlEditorComponent.propDecorators = {
|
|
|
1148
1522
|
|
|
1149
1523
|
/*
|
|
1150
1524
|
<file>
|
|
1525
|
+
Project:
|
|
1526
|
+
@osovitny/anatoly
|
|
1527
|
+
|
|
1151
1528
|
Authors:
|
|
1152
|
-
Anatoly Osovitny
|
|
1153
1529
|
Vadim Osovitny
|
|
1530
|
+
Anatoly Osovitny
|
|
1154
1531
|
|
|
1155
1532
|
Created:
|
|
1156
1533
|
12 Dec 2017
|
|
@@ -1168,7 +1545,7 @@ class HtmlEditorComponent extends BaseHtmlEditorComponent {
|
|
|
1168
1545
|
setHtml(content) {
|
|
1169
1546
|
this.doAfterInitialized(function (that) {
|
|
1170
1547
|
var editor = that.getEditor();
|
|
1171
|
-
if (typeof
|
|
1548
|
+
if (typeof editor == "undefined" || editor == null) {
|
|
1172
1549
|
return;
|
|
1173
1550
|
}
|
|
1174
1551
|
editor.html.set(content);
|
|
@@ -1176,7 +1553,7 @@ class HtmlEditorComponent extends BaseHtmlEditorComponent {
|
|
|
1176
1553
|
}
|
|
1177
1554
|
getHtml() {
|
|
1178
1555
|
var editor = this.getEditor();
|
|
1179
|
-
if (typeof
|
|
1556
|
+
if (typeof editor == "undefined" || editor == null) {
|
|
1180
1557
|
return;
|
|
1181
1558
|
}
|
|
1182
1559
|
return editor.html.get(false);
|
|
@@ -1184,7 +1561,7 @@ class HtmlEditorComponent extends BaseHtmlEditorComponent {
|
|
|
1184
1561
|
}
|
|
1185
1562
|
HtmlEditorComponent.decorators = [
|
|
1186
1563
|
{ type: Component, args: [{
|
|
1187
|
-
selector:
|
|
1564
|
+
selector: "anatoly-html-editor",
|
|
1188
1565
|
template: "<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n</div>"
|
|
1189
1566
|
},] }
|
|
1190
1567
|
];
|
|
@@ -1192,9 +1569,12 @@ HtmlEditorComponent.ctorParameters = () => [];
|
|
|
1192
1569
|
|
|
1193
1570
|
/*
|
|
1194
1571
|
<file>
|
|
1572
|
+
Project:
|
|
1573
|
+
@osovitny/anatoly
|
|
1574
|
+
|
|
1195
1575
|
Authors:
|
|
1196
|
-
Anatoly Osovitny
|
|
1197
1576
|
Vadim Osovitny
|
|
1577
|
+
Anatoly Osovitny
|
|
1198
1578
|
|
|
1199
1579
|
Created:
|
|
1200
1580
|
12 Dec 2017
|
|
@@ -1208,7 +1588,7 @@ HtmlEditorComponent.ctorParameters = () => [];
|
|
|
1208
1588
|
class FormsHtmlEditorComponent extends BaseHtmlEditorComponent {
|
|
1209
1589
|
constructor() {
|
|
1210
1590
|
super();
|
|
1211
|
-
this.editorFormKey =
|
|
1591
|
+
this.editorFormKey = "html";
|
|
1212
1592
|
}
|
|
1213
1593
|
setFormValueAfterInitialized(name, value) {
|
|
1214
1594
|
this.doAfterInitialized(function (that) {
|
|
@@ -1218,7 +1598,7 @@ class FormsHtmlEditorComponent extends BaseHtmlEditorComponent {
|
|
|
1218
1598
|
}
|
|
1219
1599
|
FormsHtmlEditorComponent.decorators = [
|
|
1220
1600
|
{ type: Component, args: [{
|
|
1221
|
-
selector:
|
|
1601
|
+
selector: "anatoly-forms-html-editor",
|
|
1222
1602
|
template: "<div [formGroup]=\"formGroup\">\r\n <div class=\"form-group\" [ngClass]=\"{'has-error': isItemInvalid(editorFormKey) }\">\r\n <label class=\"control-label\">{{ editorLabelText }}</label>\r\n <textarea [formControlName]=\"editorFormKey\"\r\n [froalaEditor]=\"options\" (froalaInit)=\"initializeControl($event)\">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]=\"formGroup\"\r\n [formSubmitted]=\"formSubmitted\"\r\n [controlName]=\"editorFormKey\"\r\n [controlTitle]=\"editorLabelText\">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n"
|
|
1223
1603
|
},] }
|
|
1224
1604
|
];
|
|
@@ -1229,7 +1609,11 @@ FormsHtmlEditorComponent.propDecorators = {
|
|
|
1229
1609
|
|
|
1230
1610
|
/*
|
|
1231
1611
|
<file>
|
|
1612
|
+
Project:
|
|
1613
|
+
@osovitny/anatoly
|
|
1614
|
+
|
|
1232
1615
|
Authors:
|
|
1616
|
+
Vadim Osovitny
|
|
1233
1617
|
Anatoly Osovitny
|
|
1234
1618
|
|
|
1235
1619
|
Created:
|
|
@@ -1244,13 +1628,13 @@ FormsHtmlEditorComponent.propDecorators = {
|
|
|
1244
1628
|
class ContentHeaderComponent {
|
|
1245
1629
|
ngOnInit() {
|
|
1246
1630
|
if (this.title == null) {
|
|
1247
|
-
this.title =
|
|
1631
|
+
this.title = "";
|
|
1248
1632
|
}
|
|
1249
1633
|
}
|
|
1250
1634
|
}
|
|
1251
1635
|
ContentHeaderComponent.decorators = [
|
|
1252
1636
|
{ type: Component, args: [{
|
|
1253
|
-
selector:
|
|
1637
|
+
selector: "anatoly-content-header",
|
|
1254
1638
|
template: "<h2 class=\"page-header\">\r\n {{title}}\r\n <!--<small>Optional {{title}}</small>-->\r\n</h2>\r\n"
|
|
1255
1639
|
},] }
|
|
1256
1640
|
];
|
|
@@ -1260,11 +1644,56 @@ ContentHeaderComponent.propDecorators = {
|
|
|
1260
1644
|
|
|
1261
1645
|
/*
|
|
1262
1646
|
<file>
|
|
1647
|
+
Project:
|
|
1648
|
+
@osovitny/anatoly
|
|
1649
|
+
|
|
1650
|
+
Authors:
|
|
1651
|
+
Vadim Osovitny
|
|
1652
|
+
Anatoly Osovitny
|
|
1653
|
+
|
|
1654
|
+
Created:
|
|
1655
|
+
26 Jun 2020
|
|
1656
|
+
|
|
1657
|
+
Version:
|
|
1658
|
+
1.0
|
|
1659
|
+
|
|
1660
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1661
|
+
</file>
|
|
1662
|
+
*/
|
|
1663
|
+
class Copy2ClipboardComponent {
|
|
1664
|
+
constructor() {
|
|
1665
|
+
this.tooltip = "Copy to clipboard";
|
|
1666
|
+
this.text = "";
|
|
1667
|
+
}
|
|
1668
|
+
onCopy2Clipboard(event) {
|
|
1669
|
+
this.tooltip = "Copied";
|
|
1670
|
+
setTimeout(() => {
|
|
1671
|
+
this.tooltip = "Copy to clipboard";
|
|
1672
|
+
}, 1000);
|
|
1673
|
+
Utils.copyToClipBoard(event, this.text);
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
Copy2ClipboardComponent.decorators = [
|
|
1677
|
+
{ type: Component, args: [{
|
|
1678
|
+
selector: "anatoly-copy-2-clipboard",
|
|
1679
|
+
template: "<span kendoTooltip filter=\".helptooltip\" tooltipClass=\"help-tooltip\" [tooltipTemplate]=\"template\">\r\n <ng-template #template let-anchor>\r\n <span [innerHTML]='tooltip'></span>\r\n </ng-template> \r\n \r\n <span class=\"helptooltip\">\r\n <a class=\"btn btn-primary btn-sm active\" (click)=\"onCopy2Clipboard($event)\"><i class=\"fa fa-copy\"></i></a>\r\n </span>\r\n</span>\r\n\r\n"
|
|
1680
|
+
},] }
|
|
1681
|
+
];
|
|
1682
|
+
Copy2ClipboardComponent.propDecorators = {
|
|
1683
|
+
text: [{ type: Input }]
|
|
1684
|
+
};
|
|
1685
|
+
|
|
1686
|
+
/*
|
|
1687
|
+
<file>
|
|
1688
|
+
Project:
|
|
1689
|
+
@osovitny/anatoly
|
|
1690
|
+
|
|
1263
1691
|
Authors:
|
|
1264
1692
|
Vadim Osovitny
|
|
1693
|
+
Anatoly Osovitny
|
|
1265
1694
|
|
|
1266
1695
|
Created:
|
|
1267
|
-
|
|
1696
|
+
26 Jun 2020
|
|
1268
1697
|
|
|
1269
1698
|
Version:
|
|
1270
1699
|
1.0
|
|
@@ -1297,6 +1726,7 @@ AnatolyUIModule.decorators = [
|
|
|
1297
1726
|
HtmlEditorComponent,
|
|
1298
1727
|
FormsHtmlEditorComponent,
|
|
1299
1728
|
ContentHeaderComponent,
|
|
1729
|
+
Copy2ClipboardComponent,
|
|
1300
1730
|
],
|
|
1301
1731
|
exports: [
|
|
1302
1732
|
SubscribePlanButtonComponent,
|
|
@@ -1310,11 +1740,29 @@ AnatolyUIModule.decorators = [
|
|
|
1310
1740
|
HtmlEditorComponent,
|
|
1311
1741
|
FormsHtmlEditorComponent,
|
|
1312
1742
|
ContentHeaderComponent,
|
|
1313
|
-
|
|
1743
|
+
Copy2ClipboardComponent,
|
|
1744
|
+
],
|
|
1314
1745
|
},] }
|
|
1315
1746
|
];
|
|
1316
1747
|
|
|
1317
|
-
|
|
1748
|
+
/*
|
|
1749
|
+
<file>
|
|
1750
|
+
Project:
|
|
1751
|
+
@osovitny/anatoly
|
|
1752
|
+
|
|
1753
|
+
Authors:
|
|
1754
|
+
Vadim Osovitny
|
|
1755
|
+
Anatoly Osovitny
|
|
1756
|
+
|
|
1757
|
+
Created:
|
|
1758
|
+
26 Jun 2020
|
|
1759
|
+
|
|
1760
|
+
Version:
|
|
1761
|
+
1.0
|
|
1762
|
+
|
|
1763
|
+
Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
|
|
1764
|
+
</file>
|
|
1765
|
+
*/
|
|
1318
1766
|
|
|
1319
1767
|
/*
|
|
1320
1768
|
* Public API Surface of anatoly
|
|
@@ -1324,5 +1772,5 @@ AnatolyUIModule.decorators = [
|
|
|
1324
1772
|
* Generated bundle index. Do not edit.
|
|
1325
1773
|
*/
|
|
1326
1774
|
|
|
1327
|
-
export { Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyUIModule, AppContextService, BaseApiService, BaseComponent, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BillingApiService, BuyAccessButtonComponent, ContentHeaderComponent, FormValidationSummaryComponent, FormsHtmlEditorComponent, HtmlEditorComponent, ItemValidationSummaryComponent, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, SubscribePlanButtonComponent, UpgradePlanButtonComponent, Utils, ValidationSummaryComponent };
|
|
1775
|
+
export { Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyUIModule, AppContextService, BaseApiService, BaseComponent, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BillingApiService, BuyAccessButtonComponent, ContentHeaderComponent, FormValidationSummaryComponent, FormsHtmlEditorComponent, GlobalErrorHandler, Guid, HtmlEditorComponent, ItemValidationSummaryComponent, LoggingService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, Subs, SubscribePlanButtonComponent, UpgradePlanButtonComponent, Utils, ValidationSummaryComponent };
|
|
1328
1776
|
//# sourceMappingURL=osovitny-anatoly.js.map
|