@osovitny/anatoly 2.0.37 → 2.0.39

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 (67) hide show
  1. package/bundles/osovitny-anatoly.umd.js +101 -28
  2. package/bundles/osovitny-anatoly.umd.js.map +1 -1
  3. package/bundles/osovitny-anatoly.umd.min.js +2 -2
  4. package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
  5. package/esm2015/lib/core/consts/settings.js +1 -1
  6. package/esm2015/lib/core/consts/urls.js +1 -1
  7. package/esm2015/lib/core/convert.js +1 -1
  8. package/esm2015/lib/core/core.module.js +4 -2
  9. package/esm2015/lib/core/go/base-go.service.js +1 -1
  10. package/esm2015/lib/core/guards/once-import.guard.js +1 -1
  11. package/esm2015/lib/core/guid.js +1 -1
  12. package/esm2015/lib/core/interceptors/httpInterceptor.js +1 -1
  13. package/esm2015/lib/core/localization/localization.module.js +1 -1
  14. package/esm2015/lib/core/localization/localization.service.js +1 -1
  15. package/esm2015/lib/core/localization/localizationSettings.module.js +1 -1
  16. package/esm2015/lib/core/localization/localize.pipe.js +1 -1
  17. package/esm2015/lib/core/localization/utils.js +1 -1
  18. package/esm2015/lib/core/logging/globalErrorHandler.js +1 -1
  19. package/esm2015/lib/core/logging/logging.service.js +1 -1
  20. package/esm2015/lib/core/notifications/alerts.js +1 -1
  21. package/esm2015/lib/core/notifications/interfaces/notification.js +1 -1
  22. package/esm2015/lib/core/notifications/services/notification-service.js +1 -1
  23. package/esm2015/lib/core/services/appcontext.service.js +1 -1
  24. package/esm2015/lib/core/services/dm.service.js +74 -0
  25. package/esm2015/lib/core/services/idle.service.js +1 -1
  26. package/esm2015/lib/core/services/loading.service.js +2 -2
  27. package/esm2015/lib/core/services/web-storage.service.js +1 -1
  28. package/esm2015/lib/core/subs.js +1 -1
  29. package/esm2015/lib/core/utils.js +1 -1
  30. package/esm2015/lib/data/base/base-api.service.js +1 -1
  31. package/esm2015/lib/data/base/grid/base-grid-edit.service.js +1 -1
  32. package/esm2015/lib/data/base/grid/base-grid-read.service.js +1 -1
  33. package/esm2015/lib/data/consts.js +1 -1
  34. package/esm2015/lib/data/data.module.js +1 -1
  35. package/esm2015/lib/data/services/billing-api.service.js +1 -1
  36. package/esm2015/lib/data/services/notifications/notifications-api-service.js +1 -1
  37. package/esm2015/lib/ui/components/base-edit.component.js +1 -1
  38. package/esm2015/lib/ui/components/base.component.js +1 -1
  39. package/esm2015/lib/ui/components/billing/buyaccess-button.component.js +1 -1
  40. package/esm2015/lib/ui/components/billing/subscribe-plan-button.component.js +1 -1
  41. package/esm2015/lib/ui/components/billing/upgrade-plan-button.component.js +1 -1
  42. package/esm2015/lib/ui/components/content-header/content-header.component.js +1 -1
  43. package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +1 -1
  44. package/esm2015/lib/ui/components/html-editor/forms-html-editor.component.js +1 -1
  45. package/esm2015/lib/ui/components/html-editor/html-editor.component.js +1 -1
  46. package/esm2015/lib/ui/components/html-editor/html-editor.defaultoptions.js +1 -1
  47. package/esm2015/lib/ui/components/identity/signin-button.component.js +1 -1
  48. package/esm2015/lib/ui/components/identity/signout-button.component.js +1 -1
  49. package/esm2015/lib/ui/components/identity/signup-button.component.js +1 -1
  50. package/esm2015/lib/ui/components/loading/loading.component.js +1 -1
  51. package/esm2015/lib/ui/components/spinner/spinner.component.js +1 -1
  52. package/esm2015/lib/ui/directives/native-element.directive.js +1 -1
  53. package/esm2015/lib/ui/pipes/filesize.pipe.js +1 -1
  54. package/esm2015/lib/ui/pipes/replace-text.pipe.js +1 -1
  55. package/esm2015/lib/ui/pipes/safeHtml.pipe.js +1 -1
  56. package/esm2015/lib/ui/ui.module.js +1 -1
  57. package/esm2015/lib/ui/validation/form-validation-summary.component.js +1 -1
  58. package/esm2015/lib/ui/validation/item-validation-summary.component.js +1 -1
  59. package/esm2015/lib/ui/validation/validation-summary.component.js +1 -1
  60. package/esm2015/osovitny-anatoly.js +1 -1
  61. package/esm2015/public-api.js +2 -1
  62. package/fesm2015/osovitny-anatoly.js +74 -6
  63. package/fesm2015/osovitny-anatoly.js.map +1 -1
  64. package/lib/core/services/dm.service.d.ts +13 -0
  65. package/osovitny-anatoly.metadata.json +1 -1
  66. package/package.json +7 -7
  67. package/public-api.d.ts +1 -0
@@ -1,11 +1,13 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@ngx-translate/core'), require('date-fns'), require('date-fns/locale/en-US'), require('@angular/common'), require('@ngx-translate/http-loader'), require('sweetalert2'), require('ngx-toastr'), require('uuid'), require('@angular/forms'), require('@angular/platform-browser'), require('angular-froala-wysiwyg')) :
3
- typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs/operators', 'rxjs', '@ngx-translate/core', 'date-fns', 'date-fns/locale/en-US', '@angular/common', '@ngx-translate/http-loader', 'sweetalert2', 'ngx-toastr', 'uuid', '@angular/forms', '@angular/platform-browser', 'angular-froala-wysiwyg'], factory) :
4
- (global = global || self, factory((global.osovitny = global.osovitny || {}, global.osovitny.anatoly = {}), global.ng.core, global.ng.router, global.ng.common.http, global.rxjs.operators, global.rxjs, global.i1$1, global.dateFns, global.enUS, global.ng.common, global.httpLoader, global.Swal, global.i1$2, global.uuid, global.ng.forms, global.ng.platformBrowser, global.angularFroalaWysiwyg));
5
- }(this, (function (exports, i0, router, i1, operators, rxjs, i1$1, dateFns, enUS, common, httpLoader, Swal, i1$2, uuid, forms, platformBrowser, angularFroalaWysiwyg) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@ngx-translate/core'), require('date-fns'), require('date-fns/locale/en-US'), require('@angular/common'), require('@ngx-translate/http-loader'), require('sweetalert2'), require('ngx-toastr'), require('uuid'), require('@angular/platform-browser'), require('@angular/forms'), require('angular-froala-wysiwyg')) :
3
+ typeof define === 'function' && define.amd ? define('@osovitny/anatoly', ['exports', '@angular/core', '@angular/router', '@angular/common/http', 'rxjs/operators', 'rxjs', '@ngx-translate/core', 'date-fns', 'date-fns/locale/en-US', '@angular/common', '@ngx-translate/http-loader', 'sweetalert2', 'ngx-toastr', 'uuid', '@angular/platform-browser', '@angular/forms', 'angular-froala-wysiwyg'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.osovitny = global.osovitny || {}, global.osovitny.anatoly = {}), global.ng.core, global.ng.router, global.ng.common.http, global.rxjs.operators, global.rxjs, global.i1$1, global.dateFns, global.enUS, global.ng.common, global.httpLoader, global.Swal, global.i1$2, global.uuid, global.ng.platformBrowser, global.ng.forms, global.angularFroalaWysiwyg));
5
+ }(this, (function (exports, i0, router, i1, operators, rxjs, i1$1, dateFns, enUS, i2, httpLoader, Swal, i1$2, uuid, i1$3, forms, angularFroalaWysiwyg) { 'use strict';
6
6
 
7
- enUS = enUS && Object.prototype.hasOwnProperty.call(enUS, 'default') ? enUS['default'] : enUS;
8
- Swal = Swal && Object.prototype.hasOwnProperty.call(Swal, 'default') ? Swal['default'] : Swal;
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var enUS__default = /*#__PURE__*/_interopDefaultLegacy(enUS);
10
+ var Swal__default = /*#__PURE__*/_interopDefaultLegacy(Swal);
9
11
 
10
12
  /*
11
13
  <file>
@@ -130,7 +132,7 @@
130
132
  extendStatics = Object.setPrototypeOf ||
131
133
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
132
134
  function (d, b) { for (var p in b)
133
- if (b.hasOwnProperty(p))
135
+ if (Object.prototype.hasOwnProperty.call(b, p))
134
136
  d[p] = b[p]; };
135
137
  return extendStatics(d, b);
136
138
  };
@@ -277,10 +279,10 @@
277
279
  k2 = k;
278
280
  o[k2] = m[k];
279
281
  });
280
- function __exportStar(m, exports) {
282
+ function __exportStar(m, o) {
281
283
  for (var p in m)
282
- if (p !== "default" && !exports.hasOwnProperty(p))
283
- __createBinding(exports, m, p);
284
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
285
+ __createBinding(o, m, p);
284
286
  }
285
287
  function __values(o) {
286
288
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
@@ -390,7 +392,7 @@
390
392
  var result = {};
391
393
  if (mod != null)
392
394
  for (var k in mod)
393
- if (Object.hasOwnProperty.call(mod, k))
395
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
394
396
  __createBinding(result, mod, k);
395
397
  __setModuleDefault(result, mod);
396
398
  return result;
@@ -428,7 +430,7 @@
428
430
  if (that.counter > 0) {
429
431
  that.next(true);
430
432
  }
431
- }, 1000);
433
+ }, 500);
432
434
  };
433
435
  LoadingService.prototype.hide = function () {
434
436
  if (this.counter <= 0) {
@@ -686,10 +688,10 @@
686
688
  var dfnLocale;
687
689
  switch (this.getBrowserLanguage()) {
688
690
  case 'en':
689
- dfnLocale = { locale: enUS };
691
+ dfnLocale = { locale: enUS__default['default'] };
690
692
  break;
691
693
  default:
692
- dfnLocale = { locale: enUS };
694
+ dfnLocale = { locale: enUS__default['default'] };
693
695
  }
694
696
  return dfnLocale;
695
697
  };
@@ -834,7 +836,7 @@
834
836
  }
835
837
  function localizationInitializerFactory(translate, localizationService, injector) {
836
838
  return function () { return new Promise(function (resolve) {
837
- var locationInitialized = injector.get(common.LOCATION_INITIALIZED, Promise.resolve(null));
839
+ var locationInitialized = injector.get(i2.LOCATION_INITIALIZED, Promise.resolve(null));
838
840
  locationInitialized.then(function () {
839
841
  var languageToSet = localizationService.configureTranslationSettings(translate);
840
842
  translate.use(languageToSet).subscribe(function () {
@@ -1029,7 +1031,7 @@
1029
1031
  Alerts.success = function (text, params, title, successAction) {
1030
1032
  text = L10nUtils.getLocalizedValue(text, params, 'OperationSuccessFull');
1031
1033
  title = L10nUtils.getLocalizedValue(title, null, 'Success');
1032
- Swal.fire({
1034
+ Swal__default['default'].fire({
1033
1035
  text: text,
1034
1036
  title: title,
1035
1037
  icon: 'success',
@@ -1044,7 +1046,7 @@
1044
1046
  Alerts.info = function (text, params, title) {
1045
1047
  text = L10nUtils.getLocalizedValue(text, params);
1046
1048
  title = L10nUtils.getLocalizedValue(title, null, 'Info');
1047
- Swal.fire({
1049
+ Swal__default['default'].fire({
1048
1050
  text: text,
1049
1051
  title: title,
1050
1052
  icon: 'info',
@@ -1054,7 +1056,7 @@
1054
1056
  Alerts.warning = function (text, params, title) {
1055
1057
  text = L10nUtils.getLocalizedValue(text, params);
1056
1058
  title = L10nUtils.getLocalizedValue(title, null, 'Warning');
1057
- Swal.fire({
1059
+ Swal__default['default'].fire({
1058
1060
  text: text,
1059
1061
  title: title,
1060
1062
  icon: 'warning',
@@ -1064,7 +1066,7 @@
1064
1066
  Alerts.error = function (text, params, title) {
1065
1067
  text = L10nUtils.getLocalizedValue(text, params, 'ErrorOccured');
1066
1068
  title = L10nUtils.getLocalizedValue(title, null, 'Error');
1067
- Swal.fire({
1069
+ Swal__default['default'].fire({
1068
1070
  text: text,
1069
1071
  title: title,
1070
1072
  icon: 'error',
@@ -1074,7 +1076,7 @@
1074
1076
  Alerts.cancel = function (text, params, title) {
1075
1077
  text = L10nUtils.getLocalizedValue(text, params, 'OperationCancelled');
1076
1078
  title = L10nUtils.getLocalizedValue(title, null, 'Cancelled');
1077
- Swal.fire({
1079
+ Swal__default['default'].fire({
1078
1080
  text: text,
1079
1081
  title: title,
1080
1082
  icon: 'info'
@@ -1089,7 +1091,7 @@
1089
1091
  title = L10nUtils.getLocalizedValue(title, null, 'AreYouSure');
1090
1092
  confirmButtonText = L10nUtils.getLocalizedValue(confirmButtonText, null, 'AreYouSure-ConfirmButtonText');
1091
1093
  cancelButtonText = L10nUtils.getLocalizedValue(cancelButtonText, null, 'AreYouSure-CancelButtonText');
1092
- Swal.fire({
1094
+ Swal__default['default'].fire({
1093
1095
  text: text,
1094
1096
  title: title,
1095
1097
  icon: 'warning',
@@ -1104,7 +1106,7 @@
1104
1106
  }
1105
1107
  }
1106
1108
  // result.dismiss can be 'cancel', 'overlay', 'close', and 'timer'
1107
- else if (result.dismiss == Swal.DismissReason.cancel || result.dismiss == Swal.DismissReason.close) {
1109
+ else if (result.dismiss == Swal__default['default'].DismissReason.cancel || result.dismiss == Swal__default['default'].DismissReason.close) {
1108
1110
  if (cancelAction) {
1109
1111
  cancelAction();
1110
1112
  }
@@ -1629,6 +1631,75 @@
1629
1631
  ];
1630
1632
  SessionStorageService.ctorParameters = function () { return []; };
1631
1633
 
1634
+ /*
1635
+ <file>
1636
+ Project:
1637
+ @osovitny/anatoly
1638
+
1639
+ Authors:
1640
+ Vadim Osovitny
1641
+ Anatoly Osovitny
1642
+
1643
+ Created:
1644
+ 29 Щсе 2020
1645
+
1646
+ Version:
1647
+ 1.0
1648
+
1649
+ Copyright (c) 2016-2020 Osovitny Inc. All rights reserved.
1650
+ </file>
1651
+ */
1652
+ var DigitalMarketingService = /** @class */ (function () {
1653
+ function DigitalMarketingService(title, meta, dom) {
1654
+ this.title = title;
1655
+ this.meta = meta;
1656
+ this.dom = dom;
1657
+ }
1658
+ DigitalMarketingService.prototype.updateTitle = function (title) {
1659
+ this.title.setTitle(title);
1660
+ };
1661
+ DigitalMarketingService.prototype.updateDescription = function (desc) {
1662
+ this.meta.updateTag({ name: 'description', content: desc });
1663
+ };
1664
+ DigitalMarketingService.prototype.updateKeywords = function (keywords) {
1665
+ this.meta.updateTag({ name: 'keywords', content: keywords });
1666
+ };
1667
+ DigitalMarketingService.prototype.updateMetaTags = function (meta) {
1668
+ var _this = this;
1669
+ meta.forEach(function (m) { return _this.meta.updateTag(m); });
1670
+ };
1671
+ DigitalMarketingService.prototype.setCanonicalUrl = function (url) {
1672
+ var canUrl = url === undefined ? this.dom.URL : url;
1673
+ var link = this.dom.createElement('link');
1674
+ link.setAttribute('rel', 'canonical');
1675
+ this.dom.head.appendChild(link);
1676
+ link.setAttribute('href', canUrl);
1677
+ };
1678
+ DigitalMarketingService.prototype.updateCanonicalUrl = function (url) {
1679
+ var canUrl = url === undefined ? this.dom.URL : url;
1680
+ var head = this.dom.getElementsByTagName('head')[0];
1681
+ var link = this.dom.querySelector("link[rel='canonical']") || null;
1682
+ if (link == null) {
1683
+ link = this.dom.createElement('link');
1684
+ head.appendChild(link);
1685
+ }
1686
+ link.setAttribute('rel', 'canonical');
1687
+ link.setAttribute('href', canUrl);
1688
+ };
1689
+ return DigitalMarketingService;
1690
+ }());
1691
+ DigitalMarketingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DigitalMarketingService_Factory() { return new DigitalMarketingService(i0.ɵɵinject(i1$3.Title), i0.ɵɵinject(i1$3.Meta), i0.ɵɵinject(i2.DOCUMENT)); }, token: DigitalMarketingService, providedIn: "root" });
1692
+ DigitalMarketingService.decorators = [
1693
+ { type: i0.Injectable, args: [{
1694
+ providedIn: 'root'
1695
+ },] }
1696
+ ];
1697
+ DigitalMarketingService.ctorParameters = function () { return [
1698
+ { type: i1$3.Title },
1699
+ { type: i1$3.Meta },
1700
+ { type: undefined, decorators: [{ type: i0.Inject, args: [i2.DOCUMENT,] }] }
1701
+ ]; };
1702
+
1632
1703
  var AnatolyCoreModule = /** @class */ (function () {
1633
1704
  function AnatolyCoreModule(injector, parentModule) {
1634
1705
  this.injector = injector;
@@ -1639,13 +1710,14 @@
1639
1710
  }());
1640
1711
  AnatolyCoreModule.decorators = [
1641
1712
  { type: i0.NgModule, args: [{
1642
- imports: [common.CommonModule],
1713
+ imports: [i2.CommonModule],
1643
1714
  exports: [],
1644
1715
  providers: [
1645
1716
  LoggingService,
1646
1717
  NotificationService,
1647
1718
  AppContextService,
1648
- LoadingService
1719
+ LoadingService,
1720
+ DigitalMarketingService
1649
1721
  ],
1650
1722
  },] }
1651
1723
  ];
@@ -1977,7 +2049,7 @@
1977
2049
  AnatolyDataModule.decorators = [
1978
2050
  { type: i0.NgModule, args: [{
1979
2051
  imports: [
1980
- common.CommonModule
2052
+ i2.CommonModule
1981
2053
  ],
1982
2054
  providers: [
1983
2055
  BillingApiService
@@ -2809,7 +2881,7 @@
2809
2881
  ];
2810
2882
  SpinnerComponent.ctorParameters = function () { return [
2811
2883
  { type: router.Router },
2812
- { type: Document, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
2884
+ { type: Document, decorators: [{ type: i0.Inject, args: [i2.DOCUMENT,] }] }
2813
2885
  ]; };
2814
2886
  SpinnerComponent.propDecorators = {
2815
2887
  backgroundColor: [{ type: i0.Input }],
@@ -2965,7 +3037,7 @@
2965
3037
  { type: i0.Pipe, args: [{ name: 'safeHtml' },] }
2966
3038
  ];
2967
3039
  SafeHtmlPipe.ctorParameters = function () { return [
2968
- { type: platformBrowser.DomSanitizer }
3040
+ { type: i1$3.DomSanitizer }
2969
3041
  ]; };
2970
3042
 
2971
3043
  var ValidationSummaryComponent = /** @class */ (function (_super) {
@@ -3161,7 +3233,7 @@
3161
3233
  AnatolyUIModule.decorators = [
3162
3234
  { type: i0.NgModule, args: [{
3163
3235
  imports: [
3164
- common.CommonModule,
3236
+ i2.CommonModule,
3165
3237
  forms.ReactiveFormsModule,
3166
3238
  forms.FormsModule,
3167
3239
  FroalaEditorModuleWithProviders,
@@ -3236,6 +3308,7 @@
3236
3308
  exports.ContextInitState = ContextInitState;
3237
3309
  exports.Convert = Convert;
3238
3310
  exports.DefaultEditorOptions = DefaultEditorOptions;
3311
+ exports.DigitalMarketingService = DigitalMarketingService;
3239
3312
  exports.FileSizePipe = FileSizePipe;
3240
3313
  exports.FormValidationSummaryComponent = FormValidationSummaryComponent;
3241
3314
  exports.FormsHtmlEditorComponent = FormsHtmlEditorComponent;