@eui/tools 6.12.64 → 6.13.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.
- package/.version.properties +1 -1
- package/CHANGELOG.md +18 -0
- package/package.json +1 -1
- package/scripts/app/public/package-init.js +3 -2
- package/scripts/csdr/cli/constants.js +4 -0
- package/scripts/csdr/cli/package-build-frontend.js +10 -0
- package/scripts/csdr/cli/package.js +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/.eslintrc.json +43 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/assets/i18n/en.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/assets/i18n/fr.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/dependencies-composite.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/src/dummy.spec.ts.TO_REPLACE +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/src/index.ts +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/src/lib/components/main.component.html +42 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/src/lib/components/main.component.ts +8 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/src/lib/constants.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/src/lib/containers/container.component.ts +28 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/src/lib/module.ts +80 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/src/lib/routing-module.ts +23 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/tsconfig.lib.json +33 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/default/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/.eslintrc.json +43 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/assets/i18n/en.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/assets/i18n/fr.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/dependencies-composite.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/src/dummy.spec.ts.TO_REPLACE +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/src/index.ts +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/src/lib/components/participant/participant.component.html +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/src/lib/components/participant/participant.component.ts +19 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/src/lib/module.ts +24 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/tsconfig.lib.json +33 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-default/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/.eslintrc.json +79 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/assets/i18n/en.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/assets/i18n/fr.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/dependencies-composite.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/dummy.spec.ts.TO_REPLACE +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/index.ts +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/blocks/sample/components/sample.component.html +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/blocks/sample/components/sample.component.ts +14 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/blocks/sample/containers/container.component.ts +36 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/blocks/sample/models/block.model.ts +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/blocks/sample/models/index.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/blocks/sample/module.ts +37 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/components/sample.component.html +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/components/sample.component.ts +14 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/constants.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/containers/block-store.service.ts +33 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/containers/container.component.ts +44 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/containers/generic-block-resolver.service.ts +32 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/models/block-type.model.ts +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/models/block.model.ts +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/models/index.ts +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/module.ts +60 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/store/actions/block.actions.ts +26 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/store/reducers/block.reducer.ts +48 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/store/reducers/index.ts +22 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/main/store/selectors/block.selectors.ts +29 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/lib/module.ts +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/tsconfig.lib.json +33 -0
- package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/virtual-remote/17.x/angular-config.json +8 -0
- package/scripts/csdr/cli/skeletons/virtual-remote/17.x/dependencies.json +21 -0
- package/scripts/csdr/config/config-skeletons.js +1 -21
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui17/tsconfig.app.json +2 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Action } from '@ngrx/store';
|
|
2
|
+
|
|
3
|
+
import { Block } from '../../models';
|
|
4
|
+
|
|
5
|
+
export enum BlockActionType {
|
|
6
|
+
UPSERT_BLOCK = '[@module.class.name@ - Block] Upsert block',
|
|
7
|
+
REMOVE_BLOCK = '[@module.class.name@ - Block] Remove block',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class UpsertBlock implements Action {
|
|
11
|
+
readonly type = BlockActionType.UPSERT_BLOCK;
|
|
12
|
+
|
|
13
|
+
constructor(public payload: { block: Block }) {
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class RemoveBlock implements Action {
|
|
18
|
+
readonly type = BlockActionType.REMOVE_BLOCK;
|
|
19
|
+
|
|
20
|
+
constructor(public payload: { id: string }) {
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type BlockActions =
|
|
25
|
+
UpsertBlock |
|
|
26
|
+
RemoveBlock;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { createSelector } from '@ngrx/store';
|
|
2
|
+
import { createEntityAdapter, Dictionary, EntityAdapter, EntityState } from '@ngrx/entity';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
BlockActionType,
|
|
6
|
+
BlockActions,
|
|
7
|
+
} from '../actions/block.actions';
|
|
8
|
+
|
|
9
|
+
import { Block } from '../../models';
|
|
10
|
+
|
|
11
|
+
export interface State extends EntityState<Block> {
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const adapter: EntityAdapter<Block> = createEntityAdapter<Block>({
|
|
15
|
+
selectId: (block: Block) => block.id,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const initialState: State = adapter.getInitialState({});
|
|
19
|
+
|
|
20
|
+
export function reducer(state = initialState, action: BlockActions): State {
|
|
21
|
+
switch (action.type) {
|
|
22
|
+
case BlockActionType.UPSERT_BLOCK: {
|
|
23
|
+
return adapter.upsertOne(action.payload.block, state);
|
|
24
|
+
}
|
|
25
|
+
case BlockActionType.REMOVE_BLOCK: {
|
|
26
|
+
return adapter.removeOne(action.payload.id, state);
|
|
27
|
+
}
|
|
28
|
+
default: {
|
|
29
|
+
return state;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const {
|
|
35
|
+
selectIds: getIds,
|
|
36
|
+
selectEntities: getEntities,
|
|
37
|
+
selectAll: getAll,
|
|
38
|
+
selectTotal: getTotal,
|
|
39
|
+
} = adapter.getSelectors();
|
|
40
|
+
|
|
41
|
+
export const getEntityById = (id: string) => {
|
|
42
|
+
return createSelector(
|
|
43
|
+
getEntities,
|
|
44
|
+
(entities: Dictionary<Block>) => {
|
|
45
|
+
return entities[id];
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { ActionReducerMap } from '@ngrx/store';
|
|
3
|
+
|
|
4
|
+
import * as fromBlock from './block.reducer';
|
|
5
|
+
|
|
6
|
+
export interface State {
|
|
7
|
+
block: fromBlock.State;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// -----------------
|
|
11
|
+
// ------------ AOT
|
|
12
|
+
export const TOKEN = new InjectionToken<ActionReducerMap<State>>('@module.class.name@Reducers');
|
|
13
|
+
|
|
14
|
+
export function getReducers(): ActionReducerMap<State, any> {
|
|
15
|
+
return {
|
|
16
|
+
block: fromBlock.reducer,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const reducerProvider = [
|
|
21
|
+
{ provide: TOKEN, useFactory: getReducers },
|
|
22
|
+
];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSelector,
|
|
3
|
+
createFeatureSelector,
|
|
4
|
+
} from '@ngrx/store';
|
|
5
|
+
|
|
6
|
+
import { State } from '../reducers';
|
|
7
|
+
|
|
8
|
+
import * as fromBlock from '../reducers/block.reducer';
|
|
9
|
+
|
|
10
|
+
import { Block } from '../../models';
|
|
11
|
+
|
|
12
|
+
import { namespace } from '../../constants';
|
|
13
|
+
|
|
14
|
+
// -----------------
|
|
15
|
+
// --- feature selector
|
|
16
|
+
const get@module.class.name@State = createFeatureSelector<State>(namespace);
|
|
17
|
+
|
|
18
|
+
// -----------------
|
|
19
|
+
// ----- block
|
|
20
|
+
const getBlockState = createSelector(get@module.class.name@State, state => {
|
|
21
|
+
return state.block;
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const getBlockById = (id: string) => {
|
|
25
|
+
return createSelector(
|
|
26
|
+
getBlockState,
|
|
27
|
+
fromBlock.getEntityById(id),
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { MainParticipantModule } from './main/module';
|
|
4
|
+
|
|
5
|
+
import { @module.class.name@BlockSampleModule } from './blocks/sample/module';
|
|
6
|
+
|
|
7
|
+
@NgModule({
|
|
8
|
+
imports: [
|
|
9
|
+
MainParticipantModule,
|
|
10
|
+
@module.class.name@BlockSampleModule,
|
|
11
|
+
],
|
|
12
|
+
exports: [
|
|
13
|
+
MainParticipantModule,
|
|
14
|
+
],
|
|
15
|
+
})
|
|
16
|
+
export class @module.class.name@Module {
|
|
17
|
+
}
|
package/scripts/csdr/cli/skeletons/package/frontend/17.x/participant-ngrx/src/test.ts.TO_REPLACE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
+
|
|
3
|
+
import 'zone.js/dist/zone';
|
|
4
|
+
import 'zone.js/dist/zone-testing';
|
|
5
|
+
import { getTestBed } from '@angular/core/testing';
|
|
6
|
+
import {
|
|
7
|
+
BrowserDynamicTestingModule,
|
|
8
|
+
platformBrowserDynamicTesting,
|
|
9
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
10
|
+
|
|
11
|
+
declare const require: any;
|
|
12
|
+
|
|
13
|
+
// First, initialize the Angular testing environment.
|
|
14
|
+
getTestBed().initTestEnvironment(
|
|
15
|
+
BrowserDynamicTestingModule,
|
|
16
|
+
platformBrowserDynamicTesting(),
|
|
17
|
+
);
|
|
18
|
+
// Then we find all the tests.
|
|
19
|
+
const context = require.context('./', true, /\.spec\.ts$/);
|
|
20
|
+
// And load the modules.
|
|
21
|
+
context.keys().map(context);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.build.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./out-tsc/lib",
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"module": "ES2022",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"inlineSources": true,
|
|
11
|
+
"emitDecoratorMetadata": true,
|
|
12
|
+
"experimentalDecorators": true,
|
|
13
|
+
"useDefineForClassFields": false,
|
|
14
|
+
"importHelpers": true,
|
|
15
|
+
"types": [],
|
|
16
|
+
"lib": [
|
|
17
|
+
"ES2022",
|
|
18
|
+
"dom"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"angularCompilerOptions": {
|
|
22
|
+
"annotateForClosureCompiler": true,
|
|
23
|
+
"skipTemplateCodegen": true,
|
|
24
|
+
"strictMetadataEmit": true,
|
|
25
|
+
"fullTemplateTypeCheck": true,
|
|
26
|
+
"strictInjectionParameters": true,
|
|
27
|
+
"enableResourceInlining": true
|
|
28
|
+
},
|
|
29
|
+
"exclude": [
|
|
30
|
+
"src/test.ts",
|
|
31
|
+
"**/*.spec.ts"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"styles": [
|
|
3
|
+
"node_modules/@eui/styles/dist/styles/eui.css",
|
|
4
|
+
"node_modules/@eui/styles/dist/styles/eui-utilities.css",
|
|
5
|
+
"node_modules/@eui/styles/dist/styles/eui-legacy-bootstrap-utilities.css",
|
|
6
|
+
"node_modules/@eui/styles/dist/styles/eui-legacy-icons-font.css"
|
|
7
|
+
]
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base": {
|
|
3
|
+
},
|
|
4
|
+
"composite": {
|
|
5
|
+
"@eui/deps-base": "^17.0.0",
|
|
6
|
+
"@module.scope@/@module.name@": "^1.0.0",
|
|
7
|
+
"@mywp/shared": "^6.0.0",
|
|
8
|
+
"@csdr/core": "^6.0.0",
|
|
9
|
+
"@csdr/integration": "^5.0.0"
|
|
10
|
+
},
|
|
11
|
+
"INT": {
|
|
12
|
+
},
|
|
13
|
+
"ACC": {
|
|
14
|
+
},
|
|
15
|
+
"DLT": {
|
|
16
|
+
},
|
|
17
|
+
"TRN": {
|
|
18
|
+
},
|
|
19
|
+
"PROD": {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -596,14 +596,8 @@ module.exports.angularProjectDefV17 = {
|
|
|
596
596
|
"with": "apps/@project.name@/src/environments/environment.prod.ts"
|
|
597
597
|
}
|
|
598
598
|
],
|
|
599
|
-
"optimization": false,
|
|
600
599
|
"outputHashing": "all",
|
|
601
|
-
"sourceMap": false,
|
|
602
|
-
"namedChunks": true,
|
|
603
|
-
"aot": true,
|
|
604
600
|
"extractLicenses": true,
|
|
605
|
-
"vendorChunk": false,
|
|
606
|
-
"buildOptimizer": false,
|
|
607
601
|
"budgets": [
|
|
608
602
|
{
|
|
609
603
|
"type": "initial",
|
|
@@ -628,12 +622,7 @@ module.exports.angularProjectDefV17 = {
|
|
|
628
622
|
"fonts": true
|
|
629
623
|
},
|
|
630
624
|
"outputHashing": "all",
|
|
631
|
-
"sourceMap": false,
|
|
632
|
-
"namedChunks": true,
|
|
633
|
-
"aot": true,
|
|
634
625
|
"extractLicenses": true,
|
|
635
|
-
"vendorChunk": false,
|
|
636
|
-
"buildOptimizer": true,
|
|
637
626
|
"budgets": [
|
|
638
627
|
{
|
|
639
628
|
"type": "initial",
|
|
@@ -658,12 +647,7 @@ module.exports.angularProjectDefV17 = {
|
|
|
658
647
|
"fonts": true
|
|
659
648
|
},
|
|
660
649
|
"outputHashing": "all",
|
|
661
|
-
"sourceMap": false,
|
|
662
|
-
"namedChunks": true,
|
|
663
|
-
"aot": true,
|
|
664
650
|
"extractLicenses": true,
|
|
665
|
-
"vendorChunk": false,
|
|
666
|
-
"buildOptimizer": true,
|
|
667
651
|
"budgets": [
|
|
668
652
|
{
|
|
669
653
|
"type": "initial",
|
|
@@ -673,12 +657,8 @@ module.exports.angularProjectDefV17 = {
|
|
|
673
657
|
]
|
|
674
658
|
},
|
|
675
659
|
"development": {
|
|
676
|
-
"buildOptimizer": false,
|
|
677
660
|
"optimization": false,
|
|
678
|
-
"
|
|
679
|
-
"extractLicenses": false,
|
|
680
|
-
"sourceMap": true,
|
|
681
|
-
"namedChunks": true
|
|
661
|
+
"sourceMap": true
|
|
682
662
|
}
|
|
683
663
|
},
|
|
684
664
|
"defaultConfiguration": "production"
|