@eui/tools 6.11.31 → 6.11.32
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 +9 -0
- package/package.json +1 -1
- package/scripts/app/public/package-init.js +4 -1
- package/scripts/csdr/cli/constants.js +4 -0
- package/scripts/csdr/cli/package-build-frontend.js +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/.eslintrc.json +43 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/assets/i18n/en.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/assets/i18n/fr.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/dependencies-composite.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/src/dummy.spec.ts.TO_REPLACE +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/src/index.ts +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/src/lib/components/main.component.html +42 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/src/lib/components/main.component.ts +8 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/src/lib/constants.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/src/lib/containers/container.component.ts +28 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/src/lib/module.ts +80 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/src/lib/routing-module.ts +23 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/tsconfig.lib.json +33 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/default/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/.eslintrc.json +43 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/assets/i18n/en.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/assets/i18n/fr.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/dependencies-composite.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/src/dummy.spec.ts.TO_REPLACE +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/src/index.ts +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/src/lib/components/participant/participant.component.html +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/src/lib/components/participant/participant.component.ts +19 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/src/lib/module.ts +24 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/tsconfig.lib.json +33 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-default/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/.eslintrc.json +79 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/assets/i18n/en.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/assets/i18n/fr.json +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/dependencies-composite.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/dummy.spec.ts.TO_REPLACE +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/index.ts +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/blocks/sample/components/sample.component.html +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/blocks/sample/components/sample.component.ts +14 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/blocks/sample/containers/container.component.ts +36 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/blocks/sample/models/block.model.ts +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/blocks/sample/models/index.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/blocks/sample/module.ts +37 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/components/sample.component.html +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/components/sample.component.ts +14 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/constants.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/containers/block-store.service.ts +33 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/containers/container.component.ts +44 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/containers/generic-block-resolver.service.ts +32 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/models/block-type.model.ts +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/models/block.model.ts +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/models/index.ts +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/module.ts +60 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/store/actions/block.actions.ts +26 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/store/reducers/block.reducer.ts +48 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/store/reducers/index.ts +22 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/store/selectors/block.selectors.ts +29 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/module.ts +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/tsconfig.lib.json +33 -0
- package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/virtual-remote/16.x/angular-config.json +9 -0
- package/scripts/csdr/cli/skeletons/virtual-remote/16.x/dependencies.json +21 -0
- package/scripts/csdr/config/register.js +2 -1
|
@@ -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/16.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,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"styles": [
|
|
3
|
+
"node_modules/@eui/styles/dist/styles/eui.css",
|
|
4
|
+
"node_modules/@eui/styles/dist/styles/eui-legacy.css",
|
|
5
|
+
"node_modules/@eui/styles/dist/styles/eui-extra-utilities.css",
|
|
6
|
+
"node_modules/@eui/styles/dist/styles/eui-legacy-bootstrap.css",
|
|
7
|
+
"node_modules/@eui/styles/dist/styles/eui-legacy-icons-font.css"
|
|
8
|
+
]
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base": {
|
|
3
|
+
},
|
|
4
|
+
"composite": {
|
|
5
|
+
"@eui/deps-base": "^16.0.0",
|
|
6
|
+
"@module.scope@/@module.name@": "^1.0.0",
|
|
7
|
+
"@cc/shared": "^5.0.0",
|
|
8
|
+
"@csdr/core": "^5.0.0",
|
|
9
|
+
"@csdr/integration": "^4.0.0"
|
|
10
|
+
},
|
|
11
|
+
"INT": {
|
|
12
|
+
},
|
|
13
|
+
"ACC": {
|
|
14
|
+
},
|
|
15
|
+
"DLT": {
|
|
16
|
+
},
|
|
17
|
+
"TRN": {
|
|
18
|
+
},
|
|
19
|
+
"PROD": {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -54,7 +54,7 @@ module.exports.registerCsdrPackage = (pkg, rootPkgScope, rootPkgName, euiVersion
|
|
|
54
54
|
"fullSkeletonSources": true,
|
|
55
55
|
"skeletonConfig": {
|
|
56
56
|
"rootNpmPkg": "@module.rootPkg.scope@/@module.rootPkg.name@",
|
|
57
|
-
"rootCommonModule": "Module",
|
|
57
|
+
"rootCommonModule": "@module.class.name@Module",
|
|
58
58
|
"baseUrl": "@module.rootPkg.name@",
|
|
59
59
|
"elementName": "@module.scope.name@",
|
|
60
60
|
"storeName": "@module.scope.name@"
|
|
@@ -84,6 +84,7 @@ module.exports.registerCsdrPackage = (pkg, rootPkgScope, rootPkgName, euiVersion
|
|
|
84
84
|
replaceModule = tools.replaceAll(replaceModule, '@module.npmPkg.name@', pkg.npmPkgName);
|
|
85
85
|
replaceModule = tools.replaceAll(replaceModule, '@module.rootPkg.scope@', rootPkgScope);
|
|
86
86
|
replaceModule = tools.replaceAll(replaceModule, '@module.rootPkg.name@', rootPkgName);
|
|
87
|
+
replaceModule = tools.replaceAll(replaceModule, '@module.class.name@', tools.camelCaseString(`${rootPkgScope.substr(1)}-${rootPkgName}`, '-', true));
|
|
87
88
|
replaceModule = tools.replaceAll(replaceModule, '@module.scope.name@', `${rootPkgScope.substr(1)}-${rootPkgName}`);
|
|
88
89
|
if (isRemote && remoteConfig && remoteConfig.rmTeamName) {
|
|
89
90
|
replaceModule = tools.replaceAll(replaceModule, '@module.rmTeam.name@', remoteConfig.rmTeamName);
|