@net7/boilerplate-muruca 5.3.4 → 5.4.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.
@@ -1,6 +1,6 @@
1
1
  import { LibOptions, NetworkLibOptions } from '@net7/components';
2
2
  import { MrSearchConfig } from '../../interfaces/search.interface';
3
- import { ConfigMurucaBreadcrumbsSection, ConfigMurucaCollectionSection, ConfigMurucaContentSection, ConfigMurucaGallerySection, ConfigMurucaHeroSection, ConfigMurucaImageViewerSection, ConfigMurucaInfoBoxSection, ConfigMurucaItemPreviewSection, ConfigMurucaMetadataSection, ConfigMurucaSliderSection, ConfigMurucaTabsSection, ConfigMurucaTextViewerSection, ConfigMurucaTitleSection, ConfigMurucaMetadataDynamicSection, ConfigMurucaButtonSection } from './sections';
3
+ import { ConfigMurucaBreadcrumbsSection, ConfigMurucaCollectionSection, ConfigMurucaContentSection, ConfigMurucaGallerySection, ConfigMurucaHeroSection, ConfigMurucaImageViewerSection, ConfigMurucaInfoBoxSection, ConfigMurucaItemPreviewSection, ConfigMurucaMetadataSection, ConfigMurucaSliderSection, ConfigMurucaTabsSection, ConfigMurucaTextViewerSection, ConfigMurucaTitleSection, ConfigMurucaMetadataDynamicSection, ConfigMurucaButtonSection, ConfigMurucaParallelTextViewerSection } from './sections';
4
4
  export interface ConfigMurucaLayout {
5
5
  /** page title */
6
6
  title: string;
@@ -15,10 +15,12 @@ export interface ConfigMurucaResourceLayout extends ConfigMurucaLayout {
15
15
  /** resource type (used by resource modal) */
16
16
  type: string;
17
17
  /** delay time before scrolling to an anchor */
18
- pageLoad: number;
18
+ pageLoad?: number;
19
+ /** Threshold where the "read-more" button appears */
20
+ maxHeight?: number;
19
21
  /** layout sections (top | content) */
20
22
  sections: {
21
- [key in 'top' | 'content']: (ConfigMurucaTabsSection | ConfigMurucaTitleSection | ConfigMurucaImageViewerSection | ConfigMurucaMetadataSection | ConfigMurucaCollectionSection | ConfigMurucaItemPreviewSection | ConfigMurucaTextViewerSection | ConfigMurucaInfoBoxSection | ConfigMurucaBreadcrumbsSection | ConfigMurucaMetadataDynamicSection | ConfigMurucaButtonSection)[];
23
+ [key in 'top' | 'content']: (ConfigMurucaTabsSection | ConfigMurucaTitleSection | ConfigMurucaImageViewerSection | ConfigMurucaMetadataSection | ConfigMurucaCollectionSection | ConfigMurucaItemPreviewSection | ConfigMurucaTextViewerSection | ConfigMurucaParallelTextViewerSection | ConfigMurucaInfoBoxSection | ConfigMurucaBreadcrumbsSection | ConfigMurucaMetadataDynamicSection | ConfigMurucaButtonSection)[];
22
24
  };
23
25
  }
24
26
  export interface ConfigMurucaItineraryLayout extends ConfigMurucaLayout {
@@ -51,6 +51,15 @@ export interface ConfigMurucaInfoBoxSection extends ConfigMurucaSection {
51
51
  export interface ConfigMurucaTextViewerSection extends ConfigMurucaSection {
52
52
  type: 'text-viewer';
53
53
  }
54
+ export interface ConfigMurucaParallelTextViewerSection extends ConfigMurucaSection {
55
+ type: 'parallel-text-viewer';
56
+ options?: {
57
+ /** grid */
58
+ grid?: any;
59
+ /** panels */
60
+ panels?: any;
61
+ };
62
+ }
54
63
  export interface ConfigMurucaTitleSection extends ConfigMurucaSection {
55
64
  type: 'title';
56
65
  }
@@ -20,6 +20,7 @@ export * from './timeline.ds';
20
20
  export * from './year-header.ds';
21
21
  export * from './gallery.ds';
22
22
  export * from './network.ds';
23
+ export * from './parallel-text-viewer.ds';
23
24
  export * from './search/search-page-title.ds';
24
25
  export * from './search/search-results-title.ds';
25
26
  export * from './search/search-results.ds';
@@ -0,0 +1,12 @@
1
+ import { ParallelTextViewerData } from '@net7/components';
2
+ import { DataSource } from '@net7/core';
3
+ export declare class MrParallelTextViewerDS extends DataSource {
4
+ id: string;
5
+ protected transform(data: ParallelTextViewerData): ParallelTextViewerData;
6
+ displayIndex(): void;
7
+ setupViewClickListeners(): void;
8
+ onClick(payload: any): void;
9
+ viewListenerUpdate(): void;
10
+ changeView(view: any, refresh: any): void;
11
+ scrollElementsIntoView(target: any, type: any, view: any): void;
12
+ }
@@ -8,6 +8,7 @@ export * from './collection.eh';
8
8
  export * from './text-viewer.eh';
9
9
  export * from './button.eh';
10
10
  export * from './network.eh';
11
+ export * from './parallel-text-viewer.eh';
11
12
  export * from './search/search-tags.eh';
12
13
  export * from './search/search-results-title.eh';
13
14
  export * from './search/search-page-title.eh';
@@ -0,0 +1,7 @@
1
+ import { EventHandler } from '@net7/core';
2
+ import { MrParallelTextViewerDS } from '../data-sources/parallel-text-viewer.ds';
3
+ export declare class MrParallelTextViewerEH extends EventHandler {
4
+ layoutId: string;
5
+ dataSource: MrParallelTextViewerDS;
6
+ listen(): void;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@net7/boilerplate-muruca",
3
- "version": "5.3.4",
3
+ "version": "5.4.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.11",
6
6
  "@angular/core": "^17.3.11"
@@ -0,0 +1,122 @@
1
+ /**
2
+ * PARALLEL-TEXT-VIEWER
3
+ *
4
+ * Style for the TEI-Publisher text viewer.
5
+ * This SCSS extends and overwrites the original CSS.
6
+ */
7
+
8
+ /* ------------------------------------ *\
9
+ #PROPERTIES
10
+ \* ------------------------------------ */
11
+ .n7-parallel-text-viewer {
12
+ pb-page {
13
+ --pb-base-font-family: 'Open Sans', sans-serif; // TODO SASS variable should be used: $font-family-main;
14
+ --pb-base-font-size: $font-size-l-xl;
15
+ --pb-base-line-height: 1.42857143;
16
+ --pb-base-font-weight: $font-weight-normal;
17
+ --pb-base-font: var(--pb-base-font-weight) var(--pb-base-font-size)/var(--pb-base-line-height) var(--pb-base-font-family);
18
+ --pb-serif-font-family: #{$font-family-text}; // TODO SASS variable should be used: $font-family-text;
19
+ --pb-content-font-family: var(--pb-serif-font-family);
20
+ --pb-content-font-size: 20px;
21
+ --pb-heading-font-family: 'Open Sans', sans-serif; // TODO SASS variable should be used: "Oswald", Verdana, "Helvetica", sans-serif;
22
+ --pb-heading-font-weight: 400 !important;
23
+ --pb-heading-line-height: 1.2;
24
+ --pb-breadcrumbs-font-size: 18px;
25
+ --pb-color-primary: $color-gray-05; // #303030;
26
+ --pb-color-inverse: #f0f0f0;
27
+ --pb-color-lighter: #35424b;
28
+ --pb-color-focus: #f6a623;
29
+ --pb-header-background-image: none;
30
+ --pb-drawer-background-color: var(--pb-color-inverse);
31
+ --pb-menubar-background-color: #35424b;
32
+ --pb-menubar-background-image: none;
33
+ --pb-menubar-color: var(--pb-color-inverse);
34
+ --pb-toolbar-background-color: #d1dae0;
35
+ --pb-toolbar-background-image: none;
36
+ --pb-toolbar-color: var(--pb-color-primary);
37
+ --paper-tooltip-delay-in: 200;
38
+ --pb-footnote-font-size: 13px;
39
+ --pb-footnote-font-family: var(--pb-content-font-family);
40
+ --pb-footnote-font-weight: var(--pb-content-font-weight);
41
+ --pb-footnote-color: #303030;
42
+ --pb-footnote-padding: 0 0 0 .25em;
43
+ --pb-popover-theme: "material";
44
+ --pb-popover-max-width: 480px;
45
+ --pb-popover-font-size: 16px;
46
+ --pb-popover-line-height: 1.2;
47
+ --pb-popover-placement: "bottom";
48
+ --pb-popover-fallback-placement: "top right left";
49
+ --pb-lang-input-color: var(--pb-color-inverse);
50
+ --pb-lang-label-color: var(--pb-color-inverse);
51
+ --pb-link-color: black;
52
+ --pb-link-font-family: var(--pb-serif-font-family);
53
+ --pb-highlight-color: #f9e976;
54
+ --paper-input-container-focus-color: var(--pb-color-focus);
55
+ --pb-view-max-width: #{$page-readable-width};
56
+ font: var(--pb-base-font);
57
+ color: var(--pb-color-primary);
58
+ margin: 0;
59
+ }
60
+ }
61
+
62
+ /* ------------------------------------ *\
63
+ #PARALLEL-TEXT-VIEWER
64
+ \* ------------------------------------ */
65
+ .n7-parallel-text-viewer {
66
+ border-bottom: 2px solid $color-border-normal;
67
+
68
+ app-header-layout {
69
+ overflow: hidden;
70
+ }
71
+ /* Table of contents */
72
+ pb-drawer {
73
+ position: absolute;
74
+ top: 64px; // 64 is the height of the header of the text viewer
75
+ }
76
+
77
+ pb-view {
78
+ padding-top: $space*5;
79
+ padding-bottom: $space*5;
80
+ }
81
+
82
+ pb-panel {
83
+ ._pb_panel {
84
+ height: 100%;
85
+ }
86
+ }
87
+
88
+ }
89
+
90
+ pb-load {
91
+ ul {
92
+ list-style: none;
93
+ }
94
+
95
+ pb-collapse {
96
+ cursor: pointer;
97
+ }
98
+ }
99
+
100
+ .n7-parallel-text-viewer {
101
+ .place {
102
+ color: red;
103
+ }
104
+ }
105
+
106
+
107
+
108
+ /* ------------------------------------ *\
109
+ #MEDIA-QUERIES
110
+ \* ------------------------------------ */
111
+ @media all and (max-width: $breakpoint-laptop) {
112
+ }
113
+
114
+ @media all and (max-width: $breakpoint-ipad-portrait) {
115
+ }
116
+
117
+ @media all and (max-width: $breakpoint-smartphone-landscape) {
118
+ }
119
+
120
+ /* Retina */
121
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
122
+ }