@eui/tools 6.11.31 → 6.12.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/sandbox.js +26 -9
- package/scripts/app/public/package-init.js +4 -1
- package/scripts/csdr/audit/styles.js +13 -4
- 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/global.js +10 -1
- package/scripts/csdr/config/register.js +2 -1
- package/scripts/csdr/metadata/package.js +29 -0
package/scripts/csdr/cli/skeletons/package/frontend/16.x/participant-ngrx/src/lib/main/module.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { StoreModule } from '@ngrx/store';
|
|
4
|
+
import { EffectsModule } from '@ngrx/effects';
|
|
5
|
+
|
|
6
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
7
|
+
|
|
8
|
+
import { CcSharedModule } from '@cc/shared';
|
|
9
|
+
|
|
10
|
+
// -- Components --
|
|
11
|
+
import { @module.class.name@Component } from './components/sample.component';
|
|
12
|
+
|
|
13
|
+
const COMPONENTS = [
|
|
14
|
+
@module.class.name@Component,
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
// -- Containers --
|
|
18
|
+
import { @module.class.name@ContainerComponent } from './containers/container.component';
|
|
19
|
+
|
|
20
|
+
const CONTAINERS = [
|
|
21
|
+
@module.class.name@ContainerComponent,
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
// -- Effects --
|
|
25
|
+
const EFFECTS = [
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
// -- Reducer --
|
|
29
|
+
import { TOKEN, reducerProvider } from './store/reducers';
|
|
30
|
+
|
|
31
|
+
// -- Services --
|
|
32
|
+
const SERVICES = [
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
// -- Constants --
|
|
36
|
+
import { namespace } from './constants';
|
|
37
|
+
|
|
38
|
+
@NgModule({
|
|
39
|
+
imports: [
|
|
40
|
+
CommonModule,
|
|
41
|
+
StoreModule.forFeature(namespace, TOKEN),
|
|
42
|
+
EffectsModule.forFeature(EFFECTS),
|
|
43
|
+
TranslateModule,
|
|
44
|
+
|
|
45
|
+
CcSharedModule,
|
|
46
|
+
],
|
|
47
|
+
declarations: [
|
|
48
|
+
...COMPONENTS,
|
|
49
|
+
...CONTAINERS,
|
|
50
|
+
],
|
|
51
|
+
providers: [
|
|
52
|
+
reducerProvider,
|
|
53
|
+
...SERVICES,
|
|
54
|
+
],
|
|
55
|
+
exports: [
|
|
56
|
+
@module.class.name@ContainerComponent,
|
|
57
|
+
],
|
|
58
|
+
})
|
|
59
|
+
export class MainParticipantModule {
|
|
60
|
+
}
|
|
@@ -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/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
|
+
}
|
|
@@ -383,7 +383,16 @@ module.exports.getConfigOptions = () => {
|
|
|
383
383
|
const gatesForVersion = audit.styles.gates[v];
|
|
384
384
|
configOptions.AUDIT_STYLES_GATES[v] = {
|
|
385
385
|
"material": gatesForVersion.material,
|
|
386
|
-
"primeng": gatesForVersion.primeng
|
|
386
|
+
"primeng": gatesForVersion.primeng,
|
|
387
|
+
"euiOverrides": gatesForVersion.euiOverrides,
|
|
388
|
+
"sizesPxEm": gatesForVersion.sizesPxEm,
|
|
389
|
+
"boxShadow": gatesForVersion.boxShadow,
|
|
390
|
+
"fontFamily": gatesForVersion.fontFamily,
|
|
391
|
+
"plainColors": gatesForVersion.plainColors,
|
|
392
|
+
"important": gatesForVersion.important,
|
|
393
|
+
"ngDeep": gatesForVersion.ngDeep,
|
|
394
|
+
"inlineStyles": gatesForVersion.inlineStyles,
|
|
395
|
+
"uxCmp": gatesForVersion.uxCmp
|
|
387
396
|
};
|
|
388
397
|
})
|
|
389
398
|
}
|
|
@@ -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);
|
|
@@ -242,6 +242,35 @@ module.exports.getPackageVersionLast = (pkg) => {
|
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
module.exports.getPackageVersionFirst = (pkg) => {
|
|
246
|
+
const pkgVersionsJson = this.getPackageVersionsJson(pkg);
|
|
247
|
+
|
|
248
|
+
if (pkgVersionsJson && pkgVersionsJson.versions) {
|
|
249
|
+
return pkgVersionsJson.versions[0];
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
module.exports.isNewPackageBuild = (pkg) => {
|
|
256
|
+
tools.logInfo('Checking if package is a newly created one : first build date after 2023/06/01');
|
|
257
|
+
|
|
258
|
+
const firstPackageVersion = this.getPackageVersionFirst(pkg);
|
|
259
|
+
|
|
260
|
+
if (firstPackageVersion) {
|
|
261
|
+
const pkgDate = firstPackageVersion.date;
|
|
262
|
+
|
|
263
|
+
const pivotDate = moment('20230601');
|
|
264
|
+
const pkgDateM = moment(pkgDate, 'YYYYMMDD-HH:mm');
|
|
265
|
+
tools.logInfo(`First package build version date : ${pkgDate}`);
|
|
266
|
+
tools.logInfo(`==> NEW package : ${pkgDateM > pivotDate}`);
|
|
267
|
+
return pkgDateM > pivotDate;
|
|
268
|
+
|
|
269
|
+
} else {
|
|
270
|
+
tools.logInfo(`==> no versions metadata found : first build, package is new`);
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
245
274
|
|
|
246
275
|
module.exports.getPackageVersionsByMajor = (pkg, major, isMaster) => {
|
|
247
276
|
const pkgVersions = this.getPackageVersions(pkg);
|