oasys-lib 1.9.2 → 1.10.0

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.
@@ -57,7 +57,7 @@
57
57
  if (!spaceInput || spaceInput === undefined) {
58
58
  return null;
59
59
  }
60
- // Used for responsive spacing, check if the input is either an object or JSON
60
+ // Used for responsive spacing, check if the input is either an object or JSON
61
61
  if (typeof spaceInput === 'object' || this.stringContainsJson(spaceInput)) {
62
62
  // If JSON then convert this to an object
63
63
  var spaceInputObject_1 = typeof spaceInput === 'object' ? spaceInput : JSON.parse(spaceInput);
@@ -455,9 +455,8 @@
455
455
  }] });
456
456
 
457
457
  var LayoutContainerComponent = /** @class */ (function () {
458
- function LayoutContainerComponent(changes, tokenService) {
458
+ function LayoutContainerComponent(changes) {
459
459
  this.changes = changes;
460
- this.tokenService = tokenService;
461
460
  this.container_fluid = false;
462
461
  this.container_gutter = true;
463
462
  this.prefix = 'ui-layout-container';
@@ -467,44 +466,28 @@
467
466
  this.changes.markForCheck();
468
467
  };
469
468
  LayoutContainerComponent.prototype.ngOnInit = function () {
470
- if (this.container_gutter) {
471
- this.containerGutterNameSmall = this.tokenService.getTokenValue('--semantic-spacing-container-gutter-box-name-small');
472
- this.containerGutterNameLarge = this.tokenService.getTokenValue('--semantic-spacing-container-gutter-box-name-large');
473
- this.containerHorizontalSizes = {
474
- desktop: this.containerGutterNameLarge,
475
- tablet: this.containerGutterNameLarge,
476
- mobile: this.containerGutterNameSmall
477
- };
478
- }
479
- else {
480
- this.containerHorizontalSizes = {
481
- desktop: 'none',
482
- tablet: 'none',
483
- mobile: 'none'
484
- };
485
- }
486
469
  this.containerLayoutClasses = [
487
470
  this.prefix,
488
- this.prefix + "-" + (this.container_fluid ? 'fluid' : '')
489
- ];
471
+ this.container_fluid ? this.prefix + "-fluid" : '',
472
+ this.container_gutter ? '' : this.prefix + "-no-gutter"
473
+ ].flat(10).filter(Boolean);
490
474
  };
491
475
  return LayoutContainerComponent;
492
476
  }());
493
- LayoutContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LayoutContainerComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: TokenService }], target: i0__namespace.ɵɵFactoryTarget.Component });
494
- LayoutContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LayoutContainerComponent, selector: "ui-container", inputs: { container_fluid: "container_fluid", container_gutter: "container_gutter" }, host: { properties: { "class": "containerLayoutClasses" } }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <ui-box\n [box_space_right]=\"containerHorizontalSizes\"\n [box_space_left]=\"containerHorizontalSizes\"\n box_space_top=\"none\"\n box_space_bottom=\"none\"\n box_background=\"none\">\n\n <ng-content></ng-content>\n\n </ui-box>\n ", isInline: true, styles: ["ui-container{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-small);display:block;width:100%;max-width:1440px;margin:0 auto}@media only screen and (max-width: 767px){ui-container{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-small)}}@media only screen and (min-width: 768px){ui-container{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-small)}}@media only screen and (min-width: 1080px){ui-container{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-large)}}@media only screen and (min-width: 1440px){ui-container{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-large)}}@media only screen and (max-width: 767px){ui-container{max-width:100%}}@media only screen and (min-width: 768px){ui-container{max-width:calc(767px - var(--container-component-gutter-size))}}@media only screen and (min-width: 1080px){ui-container{max-width:calc(1080px - var(--container-component-gutter-size))}}@media only screen and (min-width: 1440px){ui-container{max-width:calc(1440px - var(--container-component-gutter-size))}}ui-container.ui-layout-container-fluid{max-width:100%}\n"], components: [{ type: LayoutBoxComponent, selector: "ui-box", inputs: ["box_space", "box_space_top", "box_space_right", "box_space_bottom", "box_space_left", "box_align_x", "box_align_y", "box_fill_mode", "box_background"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
477
+ LayoutContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LayoutContainerComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
478
+ LayoutContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LayoutContainerComponent, selector: "ui-container", inputs: { container_fluid: "container_fluid", container_gutter: "container_gutter" }, host: { properties: { "class": "containerLayoutClasses" } }, usesOnChanges: true, ngImport: i0__namespace, template: "\n <ng-content></ng-content>\n ", isInline: true, styles: [":host{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-small);display:block;width:100%;max-width:1440px;margin:0 auto;padding:0 var(--container-component-gutter-size)}@media only screen and (max-width: 767px){:host{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-small)}}@media only screen and (min-width: 768px){:host{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-small)}}@media only screen and (min-width: 1080px){:host{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-large)}}@media only screen and (min-width: 1440px){:host{--container-component-gutter-size: var(--semantic-spacing-container-gutter-size-large)}}:host.ui-layout-container-no-gutter{padding:0}@media only screen and (max-width: 767px){:host{max-width:100%}}@media only screen and (min-width: 768px){:host{max-width:calc(767px)}}@media only screen and (min-width: 1080px){:host{max-width:calc(1080px)}}@media only screen and (min-width: 1440px){:host{max-width:calc(1440px)}}:host.ui-layout-container-fluid{max-width:100%}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
495
479
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LayoutContainerComponent, decorators: [{
496
480
  type: i0.Component,
497
481
  args: [{
498
482
  selector: 'ui-container',
499
- template: "\n <ui-box\n [box_space_right]=\"containerHorizontalSizes\"\n [box_space_left]=\"containerHorizontalSizes\"\n box_space_top=\"none\"\n box_space_bottom=\"none\"\n box_background=\"none\">\n\n <ng-content></ng-content>\n\n </ui-box>\n ",
483
+ template: "\n <ng-content></ng-content>\n ",
500
484
  host: {
501
485
  '[class]': 'containerLayoutClasses'
502
486
  },
503
487
  styleUrls: ['./container.component.scss'],
504
- encapsulation: i0.ViewEncapsulation.None,
505
488
  changeDetection: i0.ChangeDetectionStrategy.OnPush
506
489
  }]
507
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: TokenService }]; }, propDecorators: { container_fluid: [{
490
+ }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { container_fluid: [{
508
491
  type: i0.Input
509
492
  }], container_gutter: [{
510
493
  type: i0.Input
@@ -957,6 +940,100 @@
957
940
  }]
958
941
  }] });
959
942
 
943
+ var SeoBlockComponent = /** @class */ (function () {
944
+ function SeoBlockComponent() {
945
+ this.expandedLinksVisible = false;
946
+ this.expandedContentVisible = false;
947
+ }
948
+ SeoBlockComponent.prototype.showMoreLinks = function (flag) {
949
+ this.expandedLinksVisible = flag;
950
+ };
951
+ SeoBlockComponent.prototype.showMoreContent = function (flag) {
952
+ this.expandedContentVisible = flag;
953
+ };
954
+ SeoBlockComponent.prototype.ngOnInit = function () {
955
+ var _a;
956
+ // This is to fix a bug in Oasys that threats arrays as string initially
957
+ if (typeof this.links === 'string') {
958
+ this.linksValues = (_a = JSON.parse(this.links)) !== null && _a !== void 0 ? _a : [];
959
+ }
960
+ else {
961
+ this.linksValues = this.links;
962
+ }
963
+ if (this.linksValues.length <= 10) {
964
+ this.linksColumnsNumber = 1;
965
+ }
966
+ else if (this.linksValues.length <= 20) {
967
+ this.linksColumnsNumber = 2;
968
+ }
969
+ else {
970
+ this.linksColumnsNumber = 3;
971
+ }
972
+ };
973
+ return SeoBlockComponent;
974
+ }());
975
+ SeoBlockComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SeoBlockComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
976
+ SeoBlockComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SeoBlockComponent, selector: "ui-seo-block", inputs: { heading_paragraph: "heading_paragraph", heading_links: "heading_links", main_content: "main_content", expanded_content: "expanded_content", links: "links", read_more_content_text: "read_more_content_text", read_less_content_text: "read_less_content_text", show_more_links_text: "show_more_links_text", show_less_links_text: "show_less_links_text", visible_links_on_mobile: "visible_links_on_mobile" }, ngImport: i0__namespace, template: "<ui-box>\n <ui-grid>\n <ui-column columns=\"6\">\n <ui-box box_space=\"none\" [box_space_right]=\"{\n mobile: 'none',\n tablet: 'expanded',\n laptop: 'expanded',\n desktop: 'expanded'\n }\">\n <ui-stack stack_gap=\"near\">\n <ui-box box_space=\"none\">\n <ui-heading heading_type=\"functional-primary\" heading_title=\"{{ heading_paragraph }}\"></ui-heading>\n </ui-box>\n <ui-box box_space=\"none\">\n <span class=\"text-body--default\" class=\"ui-prose\" [innerHTML]=\"main_content\"></span>\n <span class=\"text-body--default\" class=\"ui-prose\" *ngIf=\"expandedContentVisible\"\n [innerHTML]=\"expanded_content\"></span>\n </ui-box>\n <ui-box box_space=\"none\" *ngIf=\"expanded_content\">\n <span *ngIf=\"!expandedContentVisible\" role=\"button\" (click)=\"showMoreContent(true)\"\n class=\"text-link text-link--standalone\">\n {{read_more_content_text}}\n </span>\n <span *ngIf=\"expandedContentVisible\" role=\"button\" (click)=\"showMoreContent(false)\"\n class=\"text-link text-link--standalone\">\n {{read_less_content_text}}\n </span>\n </ui-box>\n </ui-stack>\n </ui-box>\n </ui-column>\n <ui-column columns=\"6\">\n <ui-box box_space=\"none\">\n <ui-stack stack_gap=\"near\">\n <ui-box box_space=\"none\">\n <ui-heading heading_type=\"functional-secondary\" heading_title=\"{{ heading_links }}\"></ui-heading>\n </ui-box>\n <ui-stack stack_gap=\"tight\">\n <ui-box box_space=\"none\" box_fill_mode=\"fit\" [ngStyle]=\"{'column-count': linksColumnsNumber}\"\n class=\"links-container text-body--supporting\">\n <ng-container *ngFor=\"let link of linksValues; index as i\">\n <ui-box box_space=\"none\" box_space_bottom=\"tight\" box_fill_mode=\"fit\" class=\"link-container\"\n [ngClass]=\"{ 'hidden-mobile': i > 4 && !expandedLinksVisible }\">\n <a href=\"{{ link.href }}\">\n {{ link.name }}\n </a>\n </ui-box>\n </ng-container>\n </ui-box>\n <ui-box box_space=\"none\" class=\"hidden-desktop hidden-tablet\" *ngIf=\"linksValues.length > 4\">\n <span *ngIf=\"!expandedLinksVisible\" (click)=\"showMoreLinks(true)\" class=\"text-link text-link--standalone\">\n {{show_more_links_text}}\n </span>\n <span *ngIf=\"expandedLinksVisible\" (click)=\"showMoreLinks(false)\" class=\"text-link text-link--standalone\">\n {{show_less_links_text}}\n </span>\n </ui-box>\n </ui-stack>\n\n </ui-stack>\n </ui-box>\n </ui-column>\n </ui-grid>\n</ui-box>\n", styles: [".links-container{display:block}@media only screen and (max-width: 767px){.links-container{display:flex}}.links-container .link-container{page-break-inside:avoid;break-inside:avoid-column}\n"], components: [{ type: LayoutBoxComponent, selector: "ui-box", inputs: ["box_space", "box_space_top", "box_space_right", "box_space_bottom", "box_space_left", "box_align_x", "box_align_y", "box_fill_mode", "box_background"] }, { type: LayoutGridComponent, selector: "ui-grid", inputs: ["grid_auto", "grid_collapse_below", "grid_gap"] }, { type: LayoutGridColumnComponent, selector: "ui-column", inputs: ["columns"] }, { type: LayoutStackComponent, selector: "ui-stack", inputs: ["stack_gap", "stack_align", "stack_direction", "stack_distribute", "stack_wrap"] }, { type: OasysHeadingComponent, selector: "ui-heading", inputs: ["heading_type", "heading_on_dark", "heading_title", "heading_seo_priority", "heading_priority", "heading_alignment_override", "heading_subtitle", "heading_surtitle"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
977
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SeoBlockComponent, decorators: [{
978
+ type: i0.Component,
979
+ args: [{
980
+ selector: 'ui-seo-block',
981
+ templateUrl: './seo-block.component.html',
982
+ styleUrls: ['./seo-block.component.scss'],
983
+ }]
984
+ }], ctorParameters: function () { return []; }, propDecorators: { heading_paragraph: [{
985
+ type: i0.Input
986
+ }], heading_links: [{
987
+ type: i0.Input
988
+ }], main_content: [{
989
+ type: i0.Input
990
+ }], expanded_content: [{
991
+ type: i0.Input
992
+ }], links: [{
993
+ type: i0.Input
994
+ }], read_more_content_text: [{
995
+ type: i0.Input
996
+ }], read_less_content_text: [{
997
+ type: i0.Input
998
+ }], show_more_links_text: [{
999
+ type: i0.Input
1000
+ }], show_less_links_text: [{
1001
+ type: i0.Input
1002
+ }], visible_links_on_mobile: [{
1003
+ type: i0.Input
1004
+ }] } });
1005
+
1006
+ var OasysSeoBlockModule = /** @class */ (function () {
1007
+ function OasysSeoBlockModule() {
1008
+ }
1009
+ return OasysSeoBlockModule;
1010
+ }());
1011
+ OasysSeoBlockModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OasysSeoBlockModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1012
+ OasysSeoBlockModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OasysSeoBlockModule, declarations: [SeoBlockComponent], imports: [i3.CommonModule,
1013
+ OasysButtonModule,
1014
+ OasysHeadingModule,
1015
+ OasysLayoutModule], exports: [SeoBlockComponent] });
1016
+ OasysSeoBlockModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OasysSeoBlockModule, providers: [TokenService], imports: [[
1017
+ i3.CommonModule,
1018
+ OasysButtonModule,
1019
+ OasysHeadingModule,
1020
+ OasysLayoutModule,
1021
+ ]] });
1022
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OasysSeoBlockModule, decorators: [{
1023
+ type: i0.NgModule,
1024
+ args: [{
1025
+ declarations: [SeoBlockComponent],
1026
+ imports: [
1027
+ i3.CommonModule,
1028
+ OasysButtonModule,
1029
+ OasysHeadingModule,
1030
+ OasysLayoutModule,
1031
+ ],
1032
+ exports: [SeoBlockComponent],
1033
+ providers: [TokenService],
1034
+ }]
1035
+ }] });
1036
+
960
1037
  var TextComponent = /** @class */ (function () {
961
1038
  function TextComponent() {
962
1039
  this.textAlign = 'left';
@@ -1036,7 +1113,9 @@
1036
1113
  exports.OasysHeroModule = OasysHeroModule;
1037
1114
  exports.OasysIconModule = OasysIconModule;
1038
1115
  exports.OasysLayoutModule = OasysLayoutModule;
1116
+ exports.OasysSeoBlockModule = OasysSeoBlockModule;
1039
1117
  exports.OasysTextModule = OasysTextModule;
1118
+ exports.SeoBlockComponent = SeoBlockComponent;
1040
1119
  exports.TextComponent = TextComponent;
1041
1120
 
1042
1121
  Object.defineProperty(exports, '__esModule', { value: true });