@net7/boilerplate-common 3.0.1-rc.2
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/README.md +24 -0
- package/esm2020/lib/components/index.mjs +2 -0
- package/esm2020/lib/components/smart-pagination/smart-pagination.mjs +25 -0
- package/esm2020/lib/config-types/common.mjs +2 -0
- package/esm2020/lib/config-types/index.mjs +2 -0
- package/esm2020/lib/data-sources/breadcrumbs.ds.mjs +7 -0
- package/esm2020/lib/data-sources/facets.ds.mjs +9 -0
- package/esm2020/lib/data-sources/footer.ds.mjs +10 -0
- package/esm2020/lib/data-sources/header.ds.mjs +72 -0
- package/esm2020/lib/data-sources/index.mjs +7 -0
- package/esm2020/lib/data-sources/smart-pagination.ds.mjs +131 -0
- package/esm2020/lib/data-sources/subnav.ds.mjs +25 -0
- package/esm2020/lib/event-handlers/breadcrumbs.eh.mjs +20 -0
- package/esm2020/lib/event-handlers/footer.eh.mjs +7 -0
- package/esm2020/lib/event-handlers/header.eh.mjs +27 -0
- package/esm2020/lib/event-handlers/index.mjs +6 -0
- package/esm2020/lib/event-handlers/smart-pagination.eh.mjs +19 -0
- package/esm2020/lib/event-handlers/subnav.eh.mjs +20 -0
- package/esm2020/lib/helpers.mjs +76 -0
- package/esm2020/lib/layouts/index.mjs +11 -0
- package/esm2020/lib/layouts/main-layout/main-layout.config.mjs +24 -0
- package/esm2020/lib/layouts/main-layout/main-layout.ds.mjs +83 -0
- package/esm2020/lib/layouts/main-layout/main-layout.eh.mjs +60 -0
- package/esm2020/lib/layouts/main-layout/main-layout.mjs +45 -0
- package/esm2020/lib/layouts/page404-layout/page404-layout.config.mjs +16 -0
- package/esm2020/lib/layouts/page404-layout/page404-layout.ds.mjs +7 -0
- package/esm2020/lib/layouts/page404-layout/page404-layout.eh.mjs +36 -0
- package/esm2020/lib/layouts/page404-layout/page404-layout.mjs +28 -0
- package/esm2020/lib/models/abstract-layout.mjs +27 -0
- package/esm2020/lib/models/index.mjs +2 -0
- package/esm2020/lib/n7-boilerplate-common.module.mjs +61 -0
- package/esm2020/lib/services/communication-providers/apollo.provider.mjs +87 -0
- package/esm2020/lib/services/communication-providers/communication-provider.interface.mjs +2 -0
- package/esm2020/lib/services/communication-providers/rest.provider.mjs +40 -0
- package/esm2020/lib/services/communication.service.mjs +54 -0
- package/esm2020/lib/services/configuration.service.mjs +18 -0
- package/esm2020/lib/services/index.mjs +10 -0
- package/esm2020/lib/services/json-config.service.mjs +55 -0
- package/esm2020/lib/services/layouts-configuration.service.mjs +27 -0
- package/esm2020/lib/services/local-config.service.mjs +46 -0
- package/esm2020/lib/services/main-state.service.mjs +52 -0
- package/esm2020/net7-boilerplate-common.mjs +5 -0
- package/esm2020/public-api.mjs +14 -0
- package/fesm2015/net7-boilerplate-common.mjs +1161 -0
- package/fesm2015/net7-boilerplate-common.mjs.map +1 -0
- package/fesm2020/net7-boilerplate-common.mjs +1164 -0
- package/fesm2020/net7-boilerplate-common.mjs.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/smart-pagination/smart-pagination.d.ts +9 -0
- package/lib/config-types/common.d.ts +22 -0
- package/lib/config-types/index.d.ts +1 -0
- package/lib/data-sources/breadcrumbs.ds.d.ts +5 -0
- package/lib/data-sources/facets.ds.d.ts +7 -0
- package/lib/data-sources/footer.ds.d.ts +4 -0
- package/lib/data-sources/header.ds.d.ts +9 -0
- package/lib/data-sources/index.d.ts +6 -0
- package/lib/data-sources/smart-pagination.ds.d.ts +89 -0
- package/lib/data-sources/subnav.ds.d.ts +9 -0
- package/lib/event-handlers/breadcrumbs.eh.d.ts +4 -0
- package/lib/event-handlers/footer.eh.d.ts +4 -0
- package/lib/event-handlers/header.eh.d.ts +4 -0
- package/lib/event-handlers/index.d.ts +5 -0
- package/lib/event-handlers/smart-pagination.eh.d.ts +4 -0
- package/lib/event-handlers/subnav.eh.d.ts +4 -0
- package/lib/helpers.d.ts +14 -0
- package/lib/layouts/index.d.ts +8 -0
- package/lib/layouts/main-layout/main-layout.config.d.ts +15 -0
- package/lib/layouts/main-layout/main-layout.d.ts +29 -0
- package/lib/layouts/main-layout/main-layout.ds.d.ts +21 -0
- package/lib/layouts/main-layout/main-layout.eh.d.ts +10 -0
- package/lib/layouts/page404-layout/page404-layout.config.d.ts +13 -0
- package/lib/layouts/page404-layout/page404-layout.d.ts +14 -0
- package/lib/layouts/page404-layout/page404-layout.ds.d.ts +7 -0
- package/lib/layouts/page404-layout/page404-layout.eh.d.ts +5 -0
- package/lib/models/abstract-layout.d.ts +9 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/n7-boilerplate-common.module.d.ts +14 -0
- package/lib/services/communication-providers/apollo.provider.d.ts +14 -0
- package/lib/services/communication-providers/communication-provider.interface.d.ts +3 -0
- package/lib/services/communication-providers/rest.provider.d.ts +10 -0
- package/lib/services/communication.service.d.ts +17 -0
- package/lib/services/configuration.service.d.ts +8 -0
- package/lib/services/index.d.ts +8 -0
- package/lib/services/json-config.service.d.ts +12 -0
- package/lib/services/layouts-configuration.service.d.ts +10 -0
- package/lib/services/local-config.service.d.ts +9 -0
- package/lib/services/main-state.service.d.ts +17 -0
- package/net7-boilerplate-common.d.ts +5 -0
- package/package.json +34 -0
- package/public-api.d.ts +9 -0
- package/src/lib/styles/common/components/_facets-wrapper.scss +38 -0
- package/src/lib/styles/common/layouts/_main-layout.scss +48 -0
- package/src/lib/styles/common/utilities/_utilities.scss +43 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ConfigurationService } from './configuration.service';
|
|
3
|
+
import { ApolloProvider } from './communication-providers/apollo.provider';
|
|
4
|
+
import { RestProvider } from './communication-providers/rest.provider';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CommunicationService {
|
|
7
|
+
private config;
|
|
8
|
+
private apollo;
|
|
9
|
+
private rest;
|
|
10
|
+
private defaultProvider;
|
|
11
|
+
private communicationConfig;
|
|
12
|
+
constructor(config: ConfigurationService, apollo: ApolloProvider, rest: RestProvider);
|
|
13
|
+
request$(requestId: any, options?: any, provider?: any): any;
|
|
14
|
+
handleError(error: any, onError: any): Observable<any>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommunicationService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommunicationService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ConfigurationService {
|
|
3
|
+
private defaults;
|
|
4
|
+
get: (key: any) => any;
|
|
5
|
+
set: (key: any, value: any) => void;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationService, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationService>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './configuration.service';
|
|
2
|
+
export * from './layouts-configuration.service';
|
|
3
|
+
export * from './main-state.service';
|
|
4
|
+
export * from './communication.service';
|
|
5
|
+
export * from './json-config.service';
|
|
6
|
+
export * from './local-config.service';
|
|
7
|
+
export * from './communication-providers/apollo.provider';
|
|
8
|
+
export * from './communication-providers/rest.provider';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { ConfigurationService } from './configuration.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class JsonConfigService {
|
|
5
|
+
private http;
|
|
6
|
+
private config;
|
|
7
|
+
constructor(http: HttpClient, config: ConfigurationService);
|
|
8
|
+
load(path: any): Promise<any>;
|
|
9
|
+
private _handleResponse;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JsonConfigService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<JsonConfigService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class LayoutsConfigurationService {
|
|
3
|
+
private config;
|
|
4
|
+
private defaults;
|
|
5
|
+
constructor(config: any);
|
|
6
|
+
get: (key: any) => any;
|
|
7
|
+
set: (key: any, value: any) => void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutsConfigurationService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LayoutsConfigurationService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConfigurationService } from './configuration.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class LocalConfigService {
|
|
4
|
+
private config;
|
|
5
|
+
constructor(config: ConfigurationService);
|
|
6
|
+
load(config: any): Promise<any>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocalConfigService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LocalConfigService>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReplaySubject } from 'rxjs';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MainStateService {
|
|
4
|
+
private custom;
|
|
5
|
+
private default;
|
|
6
|
+
get$: (key: string) => any;
|
|
7
|
+
getCustom$: (key: string) => any;
|
|
8
|
+
update: (key: string, newValue: any) => void;
|
|
9
|
+
updateCustom: (key: string, newValue: any) => void;
|
|
10
|
+
has: (key: string) => boolean;
|
|
11
|
+
hasCustom: (key: string) => boolean;
|
|
12
|
+
addCustom(key: string, stream$: ReplaySubject<any>): void;
|
|
13
|
+
private _update;
|
|
14
|
+
private _get;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MainStateService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MainStateService>;
|
|
17
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@net7/boilerplate-common",
|
|
3
|
+
"version": "3.0.1-rc.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^13.2.0",
|
|
6
|
+
"@angular/core": "^13.2.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"lodash": "^4.17.15",
|
|
10
|
+
"slugify": "^1.4.0",
|
|
11
|
+
"tippy.js": "^5.1.2",
|
|
12
|
+
"tslib": "^2.3.0"
|
|
13
|
+
},
|
|
14
|
+
"module": "fesm2015/net7-boilerplate-common.mjs",
|
|
15
|
+
"es2020": "fesm2020/net7-boilerplate-common.mjs",
|
|
16
|
+
"esm2020": "esm2020/net7-boilerplate-common.mjs",
|
|
17
|
+
"fesm2020": "fesm2020/net7-boilerplate-common.mjs",
|
|
18
|
+
"fesm2015": "fesm2015/net7-boilerplate-common.mjs",
|
|
19
|
+
"typings": "net7-boilerplate-common.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": {
|
|
22
|
+
"default": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./net7-boilerplate-common.d.ts",
|
|
26
|
+
"esm2020": "./esm2020/net7-boilerplate-common.mjs",
|
|
27
|
+
"es2020": "./fesm2020/net7-boilerplate-common.mjs",
|
|
28
|
+
"es2015": "./fesm2015/net7-boilerplate-common.mjs",
|
|
29
|
+
"node": "./fesm2015/net7-boilerplate-common.mjs",
|
|
30
|
+
"default": "./fesm2020/net7-boilerplate-common.mjs"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false
|
|
34
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './lib/n7-boilerplate-common.module';
|
|
2
|
+
export * from './lib/config-types';
|
|
3
|
+
export * from './lib/services';
|
|
4
|
+
export * from './lib/models';
|
|
5
|
+
export * from './lib/data-sources';
|
|
6
|
+
export * from './lib/event-handlers';
|
|
7
|
+
export * from './lib/layouts';
|
|
8
|
+
export * from './lib/components';
|
|
9
|
+
export * from './lib/helpers';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FACETS-WRAPPER
|
|
3
|
+
*
|
|
4
|
+
* Facets wrapper component.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* ------------------------------------ *\
|
|
8
|
+
#FACETS-WRAPPER
|
|
9
|
+
\* ------------------------------------ */
|
|
10
|
+
.n7-facets-wrapper {
|
|
11
|
+
.n7-facet__section-input-link {
|
|
12
|
+
&.is-hidden {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.n7-facet .n7-facet__input-link.empty-text-link:hover {
|
|
17
|
+
cursor: inherit;
|
|
18
|
+
.n7-facet__input-link-text {
|
|
19
|
+
color: $color-text;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* ------------------------------------ *\
|
|
25
|
+
#MEDIA-QUERIES
|
|
26
|
+
\* ------------------------------------ */
|
|
27
|
+
@media all and (max-width: $breakpoint-laptop) {
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media all and (max-width: $breakpoint-ipad-portrait) {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media all and (max-width: $breakpoint-smartphone-landscape) {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Retina */
|
|
37
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
38
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MAIN LAYOUT
|
|
3
|
+
*
|
|
4
|
+
* Css definining the style for the outer layout wrapper:
|
|
5
|
+
* (projects/n7-boilerplate-lib/src/lib/common/layouts/main-layout/main-layout.html)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ------------------------------------ *\
|
|
9
|
+
MAIN LAYOUT
|
|
10
|
+
\* ------------------------------------ */
|
|
11
|
+
.n7-main-layout {
|
|
12
|
+
min-width: $page-min-width;
|
|
13
|
+
background-color: $color-background-layout;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/* ------------------------------------ *\
|
|
18
|
+
STICKY FOOTER
|
|
19
|
+
\* ------------------------------------ */
|
|
20
|
+
/* Implemented with CSS flex */
|
|
21
|
+
.n7-main-layout {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
min-height: 100%;
|
|
25
|
+
// display: grid;
|
|
26
|
+
// grid-template-rows: 1fr auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.n7-page-content {
|
|
30
|
+
flex: 1 0 auto; /* for sticky footer - prevent element from shrinking */
|
|
31
|
+
|
|
32
|
+
+ * {
|
|
33
|
+
flex: none; /* for sticky footer - prevent element from shrinking */
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* ------------------------------------ *\
|
|
38
|
+
#MEDIA-QUERIES
|
|
39
|
+
\* ------------------------------------ */
|
|
40
|
+
@media all and (max-width: $page-max-width + $space*4) {
|
|
41
|
+
|
|
42
|
+
/* Layout utility class */
|
|
43
|
+
.n7-side-auto-padding {
|
|
44
|
+
padding-left: $space*2;
|
|
45
|
+
padding-right: $space*2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UTILITIES
|
|
3
|
+
*
|
|
4
|
+
* Helper classes for the projects, in order to manage various behaviour
|
|
5
|
+
* ex. sticky sidebar
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/* ------------------------------------ *\
|
|
10
|
+
#STICKY-SIDEBAR
|
|
11
|
+
\* ------------------------------------ */
|
|
12
|
+
.is-sticky {
|
|
13
|
+
align-self: start; /* get the component have its content height when in grid layout */
|
|
14
|
+
position: sticky;
|
|
15
|
+
top: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* ------------------------------------ *\
|
|
19
|
+
#SCROLL-REF
|
|
20
|
+
\* ------------------------------------ */
|
|
21
|
+
.scroll-ref {
|
|
22
|
+
width: 0;
|
|
23
|
+
height: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* ------------------------------------ *\
|
|
27
|
+
#MEDIA-QUERIES
|
|
28
|
+
\* ------------------------------------ */
|
|
29
|
+
@media all and (max-width: $breakpoint-laptop) {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media all and (max-width: $breakpoint-ipad-portrait) {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media all and (max-width: $breakpoint-smartphone-landscape) {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media all and (max-width: $breakpoint-smartphone-portrait) {
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Retina */
|
|
42
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
43
|
+
}
|