@o3r/core 13.4.0-prerelease.9 → 13.4.0-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 +1 -1
- package/builders/app-version/index.js.map +1 -0
- package/builders/app-version/schema.js.map +1 -0
- package/builders/lib-build/index.js.map +1 -0
- package/builders/lib-build/schema.js.map +1 -0
- package/builders/multi-watcher/index.js.map +1 -0
- package/builders/multi-watcher/schema.js.map +1 -0
- package/builders/ngc/index.js.map +1 -0
- package/builders/ngc/schema.js.map +1 -0
- package/builders/pattern-replacement/index.js.map +1 -0
- package/builders/pattern-replacement/schema.js.map +1 -0
- package/builders/run-script/index.js.map +1 -0
- package/builders/run-script/schema.js.map +1 -0
- package/builders/utils.js.map +1 -0
- package/core/application/build-properties.d.ts +50 -0
- package/core/application/build-properties.d.ts.map +1 -0
- package/core/application/build-properties.js +17 -0
- package/core/application/build-properties.js.map +1 -0
- package/core/application/dgp-interfaces.d.ts +35 -0
- package/core/application/dgp-interfaces.d.ts.map +1 -0
- package/core/application/dgp-interfaces.js +2 -0
- package/core/application/dgp-interfaces.js.map +1 -0
- package/core/application/index.d.ts +4 -0
- package/core/application/index.d.ts.map +1 -0
- package/core/application/index.js +4 -0
- package/core/application/index.js.map +1 -0
- package/core/application/runtime.d.ts +14 -0
- package/core/application/runtime.d.ts.map +1 -0
- package/core/application/runtime.js +2 -0
- package/core/application/runtime.js.map +1 -0
- package/core/common/index.d.ts +3 -0
- package/core/common/index.d.ts.map +1 -0
- package/core/common/index.js +3 -0
- package/core/common/index.js.map +1 -0
- package/core/common/interface-utils.d.ts +7 -0
- package/core/common/interface-utils.d.ts.map +1 -0
- package/core/common/interface-utils.js +2 -0
- package/core/common/interface-utils.js.map +1 -0
- package/core/common/label-value.d.ts +8 -0
- package/core/common/label-value.d.ts.map +1 -0
- package/core/common/label-value.js +2 -0
- package/core/common/label-value.js.map +1 -0
- package/core/devkit/devtools-interface.d.ts +34 -0
- package/core/devkit/devtools-interface.d.ts.map +1 -0
- package/core/devkit/devtools-interface.js +2 -0
- package/core/devkit/devtools-interface.js.map +1 -0
- package/core/devkit/index.d.ts +2 -0
- package/core/devkit/index.d.ts.map +1 -0
- package/core/devkit/index.js +2 -0
- package/core/devkit/index.js.map +1 -0
- package/core/index.d.ts +7 -0
- package/core/index.d.ts.map +1 -0
- package/core/index.js +7 -0
- package/core/index.js.map +1 -0
- package/core/interfaces/configuration.d.ts +90 -0
- package/core/interfaces/configuration.d.ts.map +1 -0
- package/core/interfaces/configuration.js +2 -0
- package/core/interfaces/configuration.js.map +1 -0
- package/core/interfaces/context.d.ts +57 -0
- package/core/interfaces/context.d.ts.map +1 -0
- package/core/interfaces/context.js +2 -0
- package/core/interfaces/context.js.map +1 -0
- package/core/interfaces/index.d.ts +5 -0
- package/core/interfaces/index.d.ts.map +1 -0
- package/core/interfaces/index.js +5 -0
- package/core/interfaces/index.js.map +1 -0
- package/core/interfaces/item-identifier.d.ts +14 -0
- package/core/interfaces/item-identifier.d.ts.map +1 -0
- package/core/interfaces/item-identifier.js +2 -0
- package/core/interfaces/item-identifier.js.map +1 -0
- package/core/interfaces/translation.d.ts +7 -0
- package/core/interfaces/translation.d.ts.map +1 -0
- package/core/interfaces/translation.js +2 -0
- package/core/interfaces/translation.js.map +1 -0
- package/core/metadata/component-decorator.d.ts +32 -0
- package/core/metadata/component-decorator.d.ts.map +1 -0
- package/core/metadata/component-decorator.js +18 -0
- package/core/metadata/component-decorator.js.map +1 -0
- package/core/metadata/component-identifier.d.ts +7 -0
- package/core/metadata/component-identifier.d.ts.map +1 -0
- package/core/metadata/component-identifier.js +9 -0
- package/core/metadata/component-identifier.js.map +1 -0
- package/core/metadata/index.d.ts +4 -0
- package/core/metadata/index.d.ts.map +1 -0
- package/core/metadata/index.js +4 -0
- package/core/metadata/index.js.map +1 -0
- package/core/metadata/metadata-interface.d.ts +10 -0
- package/core/metadata/metadata-interface.d.ts.map +1 -0
- package/core/metadata/metadata-interface.js +2 -0
- package/core/metadata/metadata-interface.js.map +1 -0
- package/core/rules-engine/index.d.ts +2 -0
- package/core/rules-engine/index.d.ts.map +1 -0
- package/core/rules-engine/index.js +2 -0
- package/core/rules-engine/index.js.map +1 -0
- package/core/rules-engine/rules-engine-interfaces.d.ts +24 -0
- package/core/rules-engine/rules-engine-interfaces.d.ts.map +1 -0
- package/core/rules-engine/rules-engine-interfaces.js +2 -0
- package/core/rules-engine/rules-engine-interfaces.js.map +1 -0
- package/fesm2022/o3r-core.mjs.map +1 -1
- package/index.d.ts.map +1 -1
- package/log/index.d.ts +2 -0
- package/log/index.d.ts.map +1 -0
- package/log/index.js +2 -0
- package/log/index.js.map +1 -0
- package/log/logger.d.ts +36 -0
- package/log/logger.d.ts.map +1 -0
- package/log/logger.js +2 -0
- package/log/logger.js.map +1 -0
- package/messages/common-message-interface.d.ts +17 -0
- package/messages/common-message-interface.d.ts.map +1 -0
- package/messages/common-message-interface.js +2 -0
- package/messages/common-message-interface.js.map +1 -0
- package/messages/index.d.ts +4 -0
- package/messages/index.d.ts.map +1 -0
- package/messages/index.js +4 -0
- package/messages/index.js.map +1 -0
- package/messages/message-helpers.d.ts +24 -0
- package/messages/message-helpers.d.ts.map +1 -0
- package/messages/message-helpers.js +54 -0
- package/messages/message-helpers.js.map +1 -0
- package/messages/message-interfaces.d.ts +26 -0
- package/messages/message-interfaces.d.ts.map +1 -0
- package/messages/message-interfaces.js +5 -0
- package/messages/message-interfaces.js.map +1 -0
- package/migration.json +5 -0
- package/package.json +14 -11
- package/public_api.d.ts +6 -0
- package/public_api.d.ts.map +1 -0
- package/public_api.js +6 -0
- package/public_api.js.map +1 -0
- package/schematics/add-modules/index.js.map +1 -0
- package/schematics/add-modules/schema.js.map +1 -0
- package/schematics/component/container/index.d.ts.map +1 -1
- package/schematics/component/container/index.js +22 -35
- package/schematics/component/container/index.js.map +1 -0
- package/schematics/component/container/schema.d.ts +2 -0
- package/schematics/component/container/schema.d.ts.map +1 -1
- package/schematics/component/container/schema.js.map +1 -0
- package/schematics/component/container/schema.json +4 -0
- package/schematics/component/container/templates/index.ts.template +2 -2
- package/schematics/component/index.js.map +1 -0
- package/schematics/component/presenter/index.d.ts.map +1 -1
- package/schematics/component/presenter/index.js +10 -39
- package/schematics/component/presenter/index.js.map +1 -0
- package/schematics/component/presenter/schema.d.ts +2 -0
- package/schematics/component/presenter/schema.d.ts.map +1 -1
- package/schematics/component/presenter/schema.js.map +1 -0
- package/schematics/component/presenter/schema.json +4 -0
- package/schematics/component/presenter/templates/index.ts.template +2 -2
- package/schematics/component/schema.d.ts +2 -0
- package/schematics/component/schema.d.ts.map +1 -1
- package/schematics/component/schema.js.map +1 -0
- package/schematics/component/schema.json +4 -0
- package/schematics/component/structures.types.js.map +1 -0
- package/schematics/component/templates/fixtures.ts.template +2 -2
- package/schematics/context-to-component/index.d.ts.map +1 -1
- package/schematics/context-to-component/index.js +8 -6
- package/schematics/context-to-component/index.js.map +1 -0
- package/schematics/context-to-component/schema.js.map +1 -0
- package/schematics/convert-component/index.js.map +1 -0
- package/schematics/convert-component/schema.js.map +1 -0
- package/schematics/ng-add/component-decorator/index.js +1 -1
- package/schematics/ng-add/component-decorator/index.js.map +1 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/project-setup/index.js.map +1 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.js.map +1 -0
- package/schematics/ng-add/updates-for-v8/generators/update-generators-names.js.map +1 -0
- package/schematics/ng-add/updates-for-v8/replaced-packages.js.map +1 -0
- package/schematics/ng-add-create/index.js.map +1 -0
- package/schematics/ng-add-create/schema.js.map +1 -0
- package/schematics/ng-update/index.d.ts +4 -0
- package/schematics/ng-update/index.d.ts.map +1 -1
- package/schematics/ng-update/index.js +5 -1
- package/schematics/ng-update/index.js.map +1 -0
- package/schematics/ng-update/v10.0/configuration.js.map +1 -0
- package/schematics/ng-update/v8.2/import-map.js.map +1 -0
- package/schematics/page/index.d.ts.map +1 -1
- package/schematics/page/index.js +11 -34
- package/schematics/page/index.js.map +1 -0
- package/schematics/page/schema.d.ts +2 -0
- package/schematics/page/schema.d.ts.map +1 -1
- package/schematics/page/schema.js.map +1 -0
- package/schematics/page/schema.json +4 -0
- package/schematics/page/templates/index.ts.template +1 -1
- package/schematics/renovate/index.js.map +1 -0
- package/schematics/renovate/schema.js.map +1 -0
- package/schematics/rule-factories/additional-modules/index.js.map +1 -0
- package/schematics/rule-factories/component/analytics.js.map +1 -0
- package/schematics/rule-factories/component/common.js.map +1 -0
- package/schematics/rule-factories/component/configuration.js.map +1 -0
- package/schematics/rule-factories/component/context.js.map +1 -0
- package/schematics/rule-factories/component/design-token.js.map +1 -0
- package/schematics/rule-factories/component/fixture.js.map +1 -0
- package/schematics/rule-factories/component/localization.js.map +1 -0
- package/schematics/rule-factories/component/rules-engine.js.map +1 -0
- package/schematics/rule-factories/component/theming.js.map +1 -0
- package/schematics/rule-factories/customization-environment/index.js.map +1 -0
- package/schematics/rule-factories/index.js.map +1 -0
- package/schematics/rule-factories/o3r-basic-updates/index.js.map +1 -0
- package/schematics/rule-factories/otter-environment/index.js.map +1 -0
- package/schematics/rule-factories/store/index.js.map +1 -0
- package/schematics/rule-factories/update-package-json/index.js.map +1 -0
- package/schematics/schematics-update/index.js.map +1 -0
- package/schematics/schematics-update/schema.js.map +1 -0
- package/schematics/service/index.d.ts.map +1 -1
- package/schematics/service/index.js +14 -2
- package/schematics/service/index.js.map +1 -0
- package/schematics/service/schema.d.ts +4 -0
- package/schematics/service/schema.d.ts.map +1 -1
- package/schematics/service/schema.js.map +1 -0
- package/schematics/service/schema.json +9 -0
- package/schematics/service/templates/base/__name__/__featureName__/{__name__.__featureName__.service.spec.ts.template → __name__-__featureName__.spec.ts.template} +1 -1
- package/schematics/service/templates/base/__name__/__featureName__/{__name__.__featureName__.service.ts.template → __name__-__featureName__.ts.template} +1 -1
- package/schematics/service/templates/base/__name__/__featureName__/index.ts.template +2 -2
- package/schematics/service/templates/jasmine-core/__name__/fixture/jasmine/index.ts.template +2 -2
- package/schematics/service/templates/jest/__name__/fixture/jest/index.ts.template +2 -2
- package/schematics/shared/presets/{all.preset.d.ts → all-preset.d.ts} +2 -2
- package/schematics/shared/presets/all-preset.d.ts.map +1 -0
- package/schematics/shared/presets/{all.preset.js → all-preset.js} +1 -1
- package/schematics/shared/presets/all-preset.js.map +1 -0
- package/schematics/shared/presets/{basic.preset.d.ts → basic-preset.d.ts} +1 -1
- package/schematics/shared/presets/basic-preset.d.ts.map +1 -0
- package/schematics/shared/presets/{basic.preset.js → basic-preset.js} +1 -1
- package/schematics/shared/presets/basic-preset.js.map +1 -0
- package/schematics/shared/presets/{cms.preset.d.ts → cms-preset.d.ts} +2 -2
- package/schematics/shared/presets/cms-preset.d.ts.map +1 -0
- package/schematics/shared/presets/{cms.preset.js → cms-preset.js} +1 -1
- package/schematics/shared/presets/cms-preset.js.map +1 -0
- package/schematics/shared/presets/{external.preset.d.ts → external-preset.d.ts} +2 -2
- package/schematics/shared/presets/{external.preset.d.ts.map → external-preset.d.ts.map} +1 -1
- package/schematics/shared/presets/{external.preset.js → external-preset.js} +1 -1
- package/schematics/shared/presets/external-preset.js.map +1 -0
- package/schematics/shared/presets/helpers.d.ts +1 -1
- package/schematics/shared/presets/helpers.js.map +1 -0
- package/schematics/shared/presets/index.d.ts +3 -3
- package/schematics/shared/presets/index.js +6 -6
- package/schematics/shared/presets/index.js.map +1 -0
- package/schematics/shared/presets/{preset.interface.d.ts → preset-interface.d.ts} +1 -1
- package/schematics/shared/presets/{preset.interface.d.ts.map → preset-interface.d.ts.map} +1 -1
- package/schematics/shared/presets/{preset.interface.js → preset-interface.js} +1 -1
- package/schematics/shared/presets/preset-interface.js.map +1 -0
- package/schematics/shared/presets/{recommended.preset.d.ts → recommended-preset.d.ts} +2 -2
- package/schematics/shared/presets/recommended-preset.d.ts.map +1 -0
- package/schematics/shared/presets/{recommended.preset.js → recommended-preset.js} +1 -1
- package/schematics/shared/presets/recommended-preset.js.map +1 -0
- package/schematics/show-modules/index.js.map +1 -0
- package/schematics/show-modules/schema.js.map +1 -0
- package/schematics/store/common/helpers.js.map +1 -0
- package/schematics/store/common/schema.js.map +1 -0
- package/schematics/store/common/templates/index.ts.template +1 -1
- package/schematics/store/entity-async/index.js.map +1 -0
- package/schematics/store/entity-async/schema.js.map +1 -0
- package/schematics/store/entity-sync/index.js.map +1 -0
- package/schematics/store/entity-sync/schema.js.map +1 -0
- package/schematics/store/index.js.map +1 -0
- package/schematics/store/schema.js.map +1 -0
- package/schematics/store/simple-async/index.js.map +1 -0
- package/schematics/store/simple-async/schema.js.map +1 -0
- package/schematics/store/simple-sync/index.js.map +1 -0
- package/schematics/store/simple-sync/schema.js.map +1 -0
- package/schematics/store-action/index.js.map +1 -0
- package/schematics/store-action/schema.js.map +1 -0
- package/store/async/async-entity.adapter.d.ts +62 -0
- package/store/async/async-entity.adapter.d.ts.map +1 -0
- package/store/async/async-entity.adapter.js +49 -0
- package/store/async/async-entity.adapter.js.map +1 -0
- package/store/async/async.adapter.d.ts +91 -0
- package/store/async/async.adapter.d.ts.map +1 -0
- package/store/async/async.adapter.js +94 -0
- package/store/async/async.adapter.js.map +1 -0
- package/store/async/async.helpers.d.ts +17 -0
- package/store/async/async.helpers.d.ts.map +1 -0
- package/store/async/async.helpers.js +25 -0
- package/store/async/async.helpers.js.map +1 -0
- package/store/async/async.interfaces.d.ts +91 -0
- package/store/async/async.interfaces.d.ts.map +1 -0
- package/store/async/async.interfaces.js +2 -0
- package/store/async/async.interfaces.js.map +1 -0
- package/store/async/async.operators.d.ts +22 -0
- package/store/async/async.operators.d.ts.map +1 -0
- package/store/async/async.operators.js +75 -0
- package/store/async/async.operators.js.map +1 -0
- package/store/async/async.props.d.ts +7 -0
- package/store/async/async.props.d.ts.map +1 -0
- package/store/async/async.props.js +10 -0
- package/store/async/async.props.js.map +1 -0
- package/store/async/async.serializer.d.ts +29 -0
- package/store/async/async.serializer.d.ts.map +1 -0
- package/store/async/async.serializer.js +34 -0
- package/store/async/async.serializer.js.map +1 -0
- package/store/async/index.d.ts +8 -0
- package/store/async/index.d.ts.map +1 -0
- package/store/async/index.js +8 -0
- package/store/async/index.js.map +1 -0
- package/store/index.d.ts +3 -0
- package/store/index.d.ts.map +1 -0
- package/store/index.js +3 -0
- package/store/index.js.map +1 -0
- package/store/types.d.ts +95 -0
- package/store/types.d.ts.map +1 -0
- package/store/types.js +11 -0
- package/store/types.js.map +1 -0
- package/utils/debug/debug-helper.d.ts +14 -0
- package/utils/debug/debug-helper.d.ts.map +1 -0
- package/utils/debug/debug-helper.js +19 -0
- package/utils/debug/debug-helper.js.map +1 -0
- package/utils/deep-fill/deep-fill.d.ts +37 -0
- package/utils/deep-fill/deep-fill.d.ts.map +1 -0
- package/utils/deep-fill/deep-fill.js +71 -0
- package/utils/deep-fill/deep-fill.js.map +1 -0
- package/utils/index.d.ts +4 -0
- package/utils/index.d.ts.map +1 -0
- package/utils/index.js +4 -0
- package/utils/index.js.map +1 -0
- package/utils/rendering/rendering-helpers.d.ts +10 -0
- package/utils/rendering/rendering-helpers.d.ts.map +1 -0
- package/utils/rendering/rendering-helpers.js +31 -0
- package/utils/rendering/rendering-helpers.js.map +1 -0
- package/schematics/shared/presets/all.preset.d.ts.map +0 -1
- package/schematics/shared/presets/basic.preset.d.ts.map +0 -1
- package/schematics/shared/presets/cms.preset.d.ts.map +0 -1
- package/schematics/shared/presets/recommended.preset.d.ts.map +0 -1
- /package/schematics/context-to-component/templates/{__name__.context.ts.template → __name__-context.ts.template} +0 -0
- /package/schematics/service/templates/base/__name__/__featureName__/{__name__.__featureName__.module.ts.template → __name__-__featureName__-module.ts.template} +0 -0
- /package/schematics/service/templates/jasmine-core/__name__/fixture/jasmine/{__name__.__featureName__.fixture.jasmine.ts.template → __name__-__featureName__-fixture-jasmine.ts.template} +0 -0
- /package/schematics/service/templates/jest/__name__/fixture/jest/{__name__.__featureName__.fixture.jest.ts.template → __name__-__featureName__-fixture-jest.ts.template} +0 -0
- /package/schematics/store/common/templates/{__storeName@dasherize__.module.ts.template → __storeName@dasherize__-module.ts.template} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-message-interface.js","sourceRoot":"","sources":["../../src/messages/common-message-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ContentMessageData, FilterMessageToApplication, OtterMessage, OtterMessageContent } from './message-interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Determine if a message should be handle by the application
|
|
5
|
+
* @param message Message to analyze
|
|
6
|
+
*/
|
|
7
|
+
export declare const isToAppOtterMessage: <T extends OtterMessage>(message?: T) => message is FilterMessageToApplication<T & {
|
|
8
|
+
to: "app";
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Determine if a message is emitted by an Otter tool
|
|
12
|
+
* @param message Message to analyze
|
|
13
|
+
*/
|
|
14
|
+
export declare const isOtterMessage: <T extends OtterMessageContent>(message: any) => message is OtterMessage<T>;
|
|
15
|
+
/**
|
|
16
|
+
* Send an Otter Message
|
|
17
|
+
* @param dataType Type of the message
|
|
18
|
+
* @param content content of the message
|
|
19
|
+
* @param preStringify determine if the message should JSON.stringify before being send (will use the default mechanism otherwise)
|
|
20
|
+
*/
|
|
21
|
+
export declare const sendOtterMessage: <T extends OtterMessageContent>(dataType: T["dataType"], content: ContentMessageData<T>, preStringify?: boolean) => void;
|
|
22
|
+
export declare function filterMessageContent<T extends Event | MessageEvent>(): (source$: Observable<T>) => Observable<OtterMessageContent<string>>;
|
|
23
|
+
export declare function filterMessageContent<T extends Event | MessageEvent, S extends OtterMessageContent>(predicate: (message: any) => message is S): (source$: Observable<T>) => Observable<S>;
|
|
24
|
+
//# sourceMappingURL=message-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-helpers.d.ts","sourceRoot":"","sources":["../../src/messages/message-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,MAAM,CAAC;AACd,OAAO,EAEL,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,EAEpB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,YAAY,EAAE,UAAU,CAAC,KAAG,OAAO,IAAI,0BAA0B,CAAC,CAAC,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAEhI,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,mBAAmB,EAAE,SAAS,GAAG,KAAG,OAAO,IAAI,YAAY,CAAC,CAAC,CAErG,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,mBAAmB,EAAE,UAAU,CAAC,CAAC,UAAU,CAAC,EAAE,SAAS,kBAAkB,CAAC,CAAC,CAAC,EAAE,sBAAmB,SAS3I,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,KAAK,GAAG,YAAY,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5I,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,KAAK,GAAG,YAAY,EAAE,CAAC,SAAS,mBAAmB,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { filter, map, } from 'rxjs';
|
|
2
|
+
import { applicationMessageTarget, otterMessageType, } from './message-interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Determine if a message should be handle by the application
|
|
5
|
+
* @param message Message to analyze
|
|
6
|
+
*/
|
|
7
|
+
export const isToAppOtterMessage = (message) => {
|
|
8
|
+
return message?.to === applicationMessageTarget;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Determine if a message is emitted by an Otter tool
|
|
12
|
+
* @param message Message to analyze
|
|
13
|
+
*/
|
|
14
|
+
export const isOtterMessage = (message) => {
|
|
15
|
+
return message?.type === otterMessageType;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Send an Otter Message
|
|
19
|
+
* @param dataType Type of the message
|
|
20
|
+
* @param content content of the message
|
|
21
|
+
* @param preStringify determine if the message should JSON.stringify before being send (will use the default mechanism otherwise)
|
|
22
|
+
*/
|
|
23
|
+
export const sendOtterMessage = (dataType, content, preStringify = true) => {
|
|
24
|
+
const message = {
|
|
25
|
+
type: otterMessageType,
|
|
26
|
+
content: {
|
|
27
|
+
...content,
|
|
28
|
+
dataType
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return window.postMessage(preStringify ? JSON.stringify(message) : message, '*');
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Filter the Otter message that should be handle by the application and returns it content
|
|
35
|
+
* @param predicate condition to filter the message
|
|
36
|
+
* @returns content of the message
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* Operator to get only Otter messages that match the predicate
|
|
40
|
+
* @param predicate
|
|
41
|
+
*/
|
|
42
|
+
export function filterMessageContent(predicate) {
|
|
43
|
+
return (source$) => {
|
|
44
|
+
const obs = source$.pipe(map((event) => {
|
|
45
|
+
const data = event.data;
|
|
46
|
+
return typeof data === 'string' ? JSON.parse(data) : data;
|
|
47
|
+
}), filter(isOtterMessage), filter(isToAppOtterMessage), map((message) => message.content));
|
|
48
|
+
if (predicate) {
|
|
49
|
+
return obs.pipe(filter(predicate));
|
|
50
|
+
}
|
|
51
|
+
return obs;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=message-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-helpers.js","sourceRoot":"","sources":["../../src/messages/message-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,GAAG,GAEJ,MAAM,MAAM,CAAC;AACd,OAAO,EACL,wBAAwB,EAKxB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAyB,OAAW,EAA4D,EAAE;IACnI,OAAO,OAAO,EAAE,EAAE,KAAK,wBAAwB,CAAC;AAClD,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAgC,OAAY,EAA8B,EAAE;IACxG,OAAO,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC;AAC5C,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAgC,QAAuB,EAAE,OAA8B,EAAE,YAAY,GAAG,IAAI,EAAE,EAAE;IAC9I,MAAM,OAAO,GAAG;QACd,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE;YACP,GAAG,OAAO;YACV,QAAQ;SACT;KACF,CAAC;IACF,OAAO,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AACnF,CAAC,CAAC;AAIF;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAgE,SAA0C;IAE5I,OAAO,CAAC,OAAsB,EAAE,EAAE;QAChC,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CACtB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACZ,MAAM,IAAI,GAAI,KAAsB,CAAC,IAAI,CAAC;YAC1C,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC5D,CAAC,CAAC,EACF,MAAM,CAAC,cAAc,CAAC,EACtB,MAAM,CAAC,mBAAmB,CAAC,EAC3B,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAClC,CAAC;QACF,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Type of a message exchanged within the Otter Framework */
|
|
2
|
+
export declare const otterMessageType = "otter";
|
|
3
|
+
/** Target of a message that should be handled by the application */
|
|
4
|
+
export declare const applicationMessageTarget = "app";
|
|
5
|
+
export interface OtterMessageContent<DataType extends string = string> {
|
|
6
|
+
/** Type of data */
|
|
7
|
+
dataType: DataType;
|
|
8
|
+
}
|
|
9
|
+
export interface OtterMessage<Content extends OtterMessageContent = OtterMessageContent, Target extends string | undefined = undefined | string> {
|
|
10
|
+
/** Type of the message */
|
|
11
|
+
type: typeof otterMessageType;
|
|
12
|
+
/** Version of the message (default to the @o3r/core version ) */
|
|
13
|
+
version?: string;
|
|
14
|
+
/** Target of the message */
|
|
15
|
+
to: Target;
|
|
16
|
+
/** Message content */
|
|
17
|
+
content: Content;
|
|
18
|
+
}
|
|
19
|
+
/** Type helper to retrieve the data types of a union of MessageContent */
|
|
20
|
+
export type MessageDataTypes<T extends OtterMessageContent> = T['dataType'];
|
|
21
|
+
/** Type helper to filter the message that can be received by the application */
|
|
22
|
+
export type FilterMessageToApplication<T extends OtterMessage> = T extends {
|
|
23
|
+
to: infer U;
|
|
24
|
+
} ? U extends (typeof applicationMessageTarget | undefined) ? T : never : never;
|
|
25
|
+
export type ContentMessageData<T extends OtterMessageContent> = T extends any ? Omit<T, 'dataType'> : never;
|
|
26
|
+
//# sourceMappingURL=message-interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-interfaces.d.ts","sourceRoot":"","sources":["../../src/messages/message-interfaces.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,oEAAoE;AACpE,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAE9C,MAAM,WAAW,mBAAmB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM;IACnE,mBAAmB;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,MAAM,WAAW,YAAY,CAAC,OAAO,SAAS,mBAAmB,GAAG,mBAAmB,EAAE,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM;IAC7I,0BAA0B;IAC1B,IAAI,EAAE,OAAO,gBAAgB,CAAC;IAE9B,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;IAEX,sBAAsB;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,mBAAmB,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;AAE5E,gFAAgF;AAChF,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,YAAY,IAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,SAAS,CAAC,OAAO,wBAAwB,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAEzK,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,mBAAmB,IAAI,CAAC,SAAS,GAAG,GACzE,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,GACnB,KAAK,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Type of a message exchanged within the Otter Framework */
|
|
2
|
+
export const otterMessageType = 'otter';
|
|
3
|
+
/** Target of a message that should be handled by the application */
|
|
4
|
+
export const applicationMessageTarget = 'app';
|
|
5
|
+
//# sourceMappingURL=message-interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-interfaces.js","sourceRoot":"","sources":["../../src/messages/message-interfaces.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC,oEAAoE;AACpE,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC"}
|
package/migration.json
CHANGED
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
"version": "12.1.0-prerelease.0",
|
|
21
21
|
"description": "Updates of @o3r/core to v12.1.*",
|
|
22
22
|
"factory": "./schematics/ng-update/index#updateV12_1"
|
|
23
|
+
},
|
|
24
|
+
"migration-all": {
|
|
25
|
+
"version": "*",
|
|
26
|
+
"description": "Run on all versions",
|
|
27
|
+
"factory": "./schematics/ng-update/index#updateAll"
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/core",
|
|
3
|
-
"version": "13.4.0-
|
|
3
|
+
"version": "13.4.0-rc.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@ngrx/entity": "^20.0.0",
|
|
39
39
|
"@ngrx/store": "^20.0.0",
|
|
40
40
|
"@nx/angular": "~21.6.0",
|
|
41
|
-
"@o3r/telemetry": "13.4.0-
|
|
41
|
+
"@o3r/telemetry": "~13.4.0-rc.2",
|
|
42
42
|
"@schematics/angular": "^20.0.0",
|
|
43
43
|
"chokidar": "^4.0.3",
|
|
44
44
|
"globby": "^11.1.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@o3r/schematics": "13.4.0-
|
|
80
|
+
"@o3r/schematics": "~13.4.0-rc.2",
|
|
81
81
|
"tslib": "^2.6.2",
|
|
82
82
|
"uuid": "^11.0.5"
|
|
83
83
|
},
|
|
@@ -89,19 +89,19 @@
|
|
|
89
89
|
"@ngrx/store": "~20.1.0",
|
|
90
90
|
"@ngrx/store-devtools": "~20.1.0",
|
|
91
91
|
"@nx/eslint-plugin": "~21.6.0",
|
|
92
|
-
"@o3r/store-sync": "13.4.0-
|
|
93
|
-
"@stylistic/eslint-plugin": "~5.
|
|
92
|
+
"@o3r/store-sync": "~13.4.0-rc.2",
|
|
93
|
+
"@stylistic/eslint-plugin": "~5.6.0",
|
|
94
94
|
"@types/jest": "~29.5.2",
|
|
95
|
-
"@typescript-eslint/eslint-plugin": "~8.
|
|
96
|
-
"@typescript-eslint/parser": "~8.
|
|
97
|
-
"angular-eslint": "~20.
|
|
95
|
+
"@typescript-eslint/eslint-plugin": "~8.47.0",
|
|
96
|
+
"@typescript-eslint/parser": "~8.47.0",
|
|
97
|
+
"angular-eslint": "~20.6.0",
|
|
98
98
|
"cpy-cli": "^6.0.0",
|
|
99
|
-
"eslint": "~9.
|
|
99
|
+
"eslint": "~9.39.0",
|
|
100
100
|
"eslint-import-resolver-node": "~0.3.9",
|
|
101
101
|
"eslint-import-resolver-typescript": "~4.4.0",
|
|
102
102
|
"eslint-plugin-import": "~2.32.0",
|
|
103
103
|
"eslint-plugin-import-newlines": "~1.4.0",
|
|
104
|
-
"eslint-plugin-jest": "~29.
|
|
104
|
+
"eslint-plugin-jest": "~29.1.0",
|
|
105
105
|
"eslint-plugin-jsdoc": "~54.7.0",
|
|
106
106
|
"eslint-plugin-prefer-arrow": "~1.2.3",
|
|
107
107
|
"eslint-plugin-unicorn": "~60.0.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"jsonc-eslint-parser": "~2.4.0",
|
|
115
115
|
"nx": "~21.6.0",
|
|
116
116
|
"ts-jest": "~29.4.0",
|
|
117
|
-
"typescript-eslint": "~8.
|
|
117
|
+
"typescript-eslint": "~8.47.0",
|
|
118
118
|
"zone.js": "~0.15.0"
|
|
119
119
|
},
|
|
120
120
|
"engines": {
|
|
@@ -125,6 +125,8 @@
|
|
|
125
125
|
"ng-update": {
|
|
126
126
|
"migrations": "./migration.json",
|
|
127
127
|
"packageGroup": [
|
|
128
|
+
"@ama-mfe/messages",
|
|
129
|
+
"@ama-mfe/ng-utils",
|
|
128
130
|
"@ama-sdk/core",
|
|
129
131
|
"@ama-sdk/schematics",
|
|
130
132
|
"@ama-sdk/swagger-builder",
|
|
@@ -157,6 +159,7 @@
|
|
|
157
159
|
"@o3r/rules-engine",
|
|
158
160
|
"@o3r/schematics",
|
|
159
161
|
"@o3r/store-sync",
|
|
162
|
+
"@o3r/style-dictionary",
|
|
160
163
|
"@o3r/stylelint-plugin",
|
|
161
164
|
"@o3r/styling",
|
|
162
165
|
"@o3r/telemetry",
|
package/public_api.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
package/public_api.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public_api.js","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/add-modules/index.ts"],"names":[],"mappings":";;;AAAA,8DAG2C;AAC3C,2DAKoC;AACpC,gDAMyB;AACzB,+CAG2B;AAK3B;;;GAGG;AACH,SAAS,cAAc,CAAC,OAAqC;IAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;YACxE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gHAAgH,CAAC,CAAC;YACvI,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;QACpB,CAAC;QAED,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC;QAC/D,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,iBAAO,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACpF,MAAM,oBAAoB,GAAG,eAAe,CAAC,CAAC,CAAC,MAAM,IAAA,2BAAiB,EAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAClL,MAAM,IAAI,GAAG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AC,GAAG,EAAE,EAAE,CAAC,CAAC;gBACpF,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,KAAK,EAAE,GAAG,CAAC,IAAI;gBACf,KAAK,EAAE,GAAG,CAAC,WAAW;aACvB,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;YAEd,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,IAAA,8BAAiB,EAAC,GAAG,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE,CAAC,CAAC,CAAC;YAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACU,QAAA,YAAY,GAAG,IAAA,iCAAoB,EAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../schematics/add-modules/schema.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/component/container/index.ts"],"names":[],"mappings":"AACA,OAAO,EASL,IAAI,EAML,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/component/container/index.ts"],"names":[],"mappings":"AACA,OAAO,EASL,IAAI,EAML,MAAM,4BAA4B,CAAC;AAgDpC,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAkP5C;;;GAGG;AACH,eAAO,MAAM,4BAA4B,wBAAuD,CAAC"}
|
|
@@ -28,12 +28,12 @@ const getTemplateProperties = (options, componentStructureDef, prefix) => {
|
|
|
28
28
|
...options,
|
|
29
29
|
componentType: options.componentStructure === 'full' ? 'Block' : 'Component',
|
|
30
30
|
presenterModuleName: (0, schematics_2.getComponentModuleName)(inputComponentName, structures_types_1.ComponentStructureDef.Pres),
|
|
31
|
-
componentName: (0, schematics_2.
|
|
32
|
-
presenterComponentName: (0, schematics_2.getComponentName)(inputComponentName, structures_types_1.ComponentStructureDef.Pres),
|
|
31
|
+
componentName: (0, schematics_2.getComponentBaseName)(inputComponentName, componentStructureDef),
|
|
32
|
+
presenterComponentName: (0, schematics_2.getComponentName)(inputComponentName, structures_types_1.ComponentStructureDef.Pres, options.type),
|
|
33
33
|
presenterComponentSelector: `${componentSelector}-${structures_types_1.ComponentStructureDef.Pres.toLowerCase()}`,
|
|
34
34
|
componentSelector: (0, schematics_2.getComponentSelectorWithoutSuffix)(options.componentName, prefix || null),
|
|
35
35
|
folderName,
|
|
36
|
-
name: (0, schematics_2.getComponentFileName)(options.componentName, componentStructureDef), // air-offer | air-offer-cont,
|
|
36
|
+
name: (0, schematics_2.getComponentFileName)(options.componentName, componentStructureDef, options.type), // air-offer | air-offer-cont,
|
|
37
37
|
suffix: componentStructureDef.toLowerCase(), // cont | ''
|
|
38
38
|
description: options.description || ''
|
|
39
39
|
};
|
|
@@ -48,20 +48,17 @@ function ngGenerateComponentContainerFn(options) {
|
|
|
48
48
|
const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
|
49
49
|
const properties = getTemplateProperties(options, structures_types_1.ComponentStructureDef.Cont, options.prefix || workspaceProject?.prefix);
|
|
50
50
|
const destination = (0, schematics_2.getDestinationPath)('@o3r/core:component', options.path, tree, options.projectName);
|
|
51
|
-
const componentDestination = path.posix.join(destination, fullStructureRequested ? path.posix.join(properties.folderName, exports.CONTAINER_FOLDER) : properties.folderName);
|
|
52
|
-
const componentPath = path.posix.join(componentDestination, `${properties.name}.
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const ngTemplatePath = path.posix.join(componentDestination, `${properties.name}.component.html`);
|
|
56
|
-
const o3rTemplatePath = path.posix.join(componentDestination, `${properties.name}.template.html`);
|
|
51
|
+
const componentDestination = path.posix.join(destination, fullStructureRequested ? path.posix.join(properties.folderName, exports.CONTAINER_FOLDER) : `${properties.folderName}${properties.suffix ? ('-' + properties.suffix) : ''}`);
|
|
52
|
+
const componentPath = path.posix.join(componentDestination, `${properties.name}.ts`);
|
|
53
|
+
const specPath = path.posix.join(componentDestination, `${properties.name}.spec.ts`);
|
|
54
|
+
const templatePath = path.posix.join(componentDestination, `${properties.name}.html`);
|
|
57
55
|
const rules = [];
|
|
58
56
|
if (!options.standalone) {
|
|
59
57
|
rules.push((0, schematics_1.externalSchematic)('@schematics/angular', 'module', {
|
|
60
58
|
project: properties.projectName,
|
|
61
59
|
path: componentDestination,
|
|
62
60
|
flat: true,
|
|
63
|
-
name: properties.componentName
|
|
64
|
-
typeSeparator: '.'
|
|
61
|
+
name: properties.componentName
|
|
65
62
|
}));
|
|
66
63
|
}
|
|
67
64
|
rules.push((0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./templates'), [
|
|
@@ -78,7 +75,7 @@ function ngGenerateComponentContainerFn(options) {
|
|
|
78
75
|
viewEncapsulation: 'None',
|
|
79
76
|
changeDetection: 'OnPush',
|
|
80
77
|
style: 'none',
|
|
81
|
-
type:
|
|
78
|
+
type: properties.type,
|
|
82
79
|
skipSelector: false,
|
|
83
80
|
skipTests: false,
|
|
84
81
|
standalone: options.standalone,
|
|
@@ -87,21 +84,11 @@ function ngGenerateComponentContainerFn(options) {
|
|
|
87
84
|
skipImport: true
|
|
88
85
|
}
|
|
89
86
|
: {
|
|
90
|
-
module: `${properties.name}
|
|
87
|
+
module: `${properties.name}-module.ts`,
|
|
91
88
|
export: true
|
|
92
89
|
}),
|
|
93
90
|
flat: true
|
|
94
|
-
}),
|
|
95
|
-
// Angular schematics generate spec file with this pattern: component-name.component.spec.ts
|
|
96
|
-
(0, schematics_1.move)(ngSpecPath, o3rSpecPath),
|
|
97
|
-
// Angular schematics generate template file with this pattern: component-name.component.html
|
|
98
|
-
(0, schematics_1.chain)([
|
|
99
|
-
(0, schematics_1.move)(ngTemplatePath, o3rTemplatePath),
|
|
100
|
-
(t) => {
|
|
101
|
-
t.overwrite(componentPath, t.readText(componentPath).replace(path.basename(ngTemplatePath), path.basename(o3rTemplatePath)));
|
|
102
|
-
return t;
|
|
103
|
-
}
|
|
104
|
-
]), (0, schematics_1.schematic)('convert-component', {
|
|
91
|
+
}), (0, schematics_1.schematic)('convert-component', {
|
|
105
92
|
path: componentPath,
|
|
106
93
|
skipLinter: options.skipLinter,
|
|
107
94
|
componentType: properties.componentType
|
|
@@ -130,7 +117,7 @@ function ngGenerateComponentContainerFn(options) {
|
|
|
130
117
|
}
|
|
131
118
|
])
|
|
132
119
|
: () => {
|
|
133
|
-
const modulePath = path.posix.join(componentDestination, `${properties.name}
|
|
120
|
+
const modulePath = path.posix.join(componentDestination, `${properties.name}-module.ts`);
|
|
134
121
|
const moduleSourceFile = ts.createSourceFile(modulePath, tree.readText(modulePath), ts.ScriptTarget.ES2020, true);
|
|
135
122
|
const changes = (0, ast_utils_1.addImportToModule)(moduleSourceFile, modulePath, properties.presenterModuleName, componentPresenterDestination);
|
|
136
123
|
const recorder = tree.beginUpdate(modulePath);
|
|
@@ -139,16 +126,16 @@ function ngGenerateComponentContainerFn(options) {
|
|
|
139
126
|
return tree;
|
|
140
127
|
};
|
|
141
128
|
const addMockPresenterComponentInSpecFile = () => {
|
|
142
|
-
if (!tree.exists(
|
|
143
|
-
context.logger.warn(`No update applied on spec file because ${
|
|
129
|
+
if (!tree.exists(specPath)) {
|
|
130
|
+
context.logger.warn(`No update applied on spec file because ${specPath} does not exist.`);
|
|
144
131
|
return;
|
|
145
132
|
}
|
|
146
|
-
let specSourceFile = ts.createSourceFile(
|
|
147
|
-
const recorder = tree.beginUpdate(
|
|
133
|
+
let specSourceFile = ts.createSourceFile(specPath, tree.readText(specPath), ts.ScriptTarget.ES2020, true);
|
|
134
|
+
const recorder = tree.beginUpdate(specPath);
|
|
148
135
|
const lastImport = [...specSourceFile.statements].reverse().find((statement) => ts.isImportDeclaration(statement));
|
|
149
136
|
const changes = [
|
|
150
|
-
(0, ast_utils_1.insertImport)(specSourceFile,
|
|
151
|
-
new change_1.InsertChange(
|
|
137
|
+
(0, ast_utils_1.insertImport)(specSourceFile, specPath, 'Component', '@angular/core'),
|
|
138
|
+
new change_1.InsertChange(specPath, lastImport?.getEnd() || 0, `
|
|
152
139
|
@Component({
|
|
153
140
|
template: '',
|
|
154
141
|
selector: '${properties.presenterComponentSelector}'
|
|
@@ -158,7 +145,7 @@ class Mock${properties.presenterComponentName} {}
|
|
|
158
145
|
];
|
|
159
146
|
(0, change_1.applyToUpdateRecorder)(recorder, changes);
|
|
160
147
|
tree.commitUpdate(recorder);
|
|
161
|
-
specSourceFile = ts.createSourceFile(
|
|
148
|
+
specSourceFile = ts.createSourceFile(specPath, tree.readText(specPath), ts.ScriptTarget.ES2020, true);
|
|
162
149
|
const result = ts.transform(specSourceFile, [
|
|
163
150
|
(0, schematics_2.addImportsAndCodeBlockStatementAtSpecInitializationTransformerFactory)([
|
|
164
151
|
`Mock${properties.presenterComponentName}`
|
|
@@ -169,15 +156,15 @@ class Mock${properties.presenterComponentName} {}
|
|
|
169
156
|
newLine: ts.NewLineKind.LineFeed
|
|
170
157
|
});
|
|
171
158
|
const newContent = printer.printFile(result.transformed[0]);
|
|
172
|
-
tree.overwrite(
|
|
159
|
+
tree.overwrite(specPath, newContent);
|
|
173
160
|
return tree;
|
|
174
161
|
};
|
|
175
162
|
rules.push((t) => {
|
|
176
|
-
t.overwrite(
|
|
163
|
+
t.overwrite(templatePath, `<${properties.presenterComponentSelector}></${properties.presenterComponentSelector}>`);
|
|
177
164
|
return t;
|
|
178
165
|
}, addPresenterComponentOrModuleToImport, addMockPresenterComponentInSpecFile);
|
|
179
166
|
}
|
|
180
|
-
rules.push((0, configuration_1.getAddConfigurationRules)(componentPath, options), (0, fixture_1.getAddFixtureRules)(componentPath, options), (0, context_1.getAddContextRules)(componentPath, options), (0, rules_engine_1.getAddRulesEngineRules)(path.posix.join(componentDestination, `${properties.name}.
|
|
167
|
+
rules.push((0, configuration_1.getAddConfigurationRules)(componentPath, options), (0, fixture_1.getAddFixtureRules)(componentPath, options), (0, context_1.getAddContextRules)(componentPath, options), (0, rules_engine_1.getAddRulesEngineRules)(path.posix.join(componentDestination, `${properties.name}.ts`), options));
|
|
181
168
|
return (0, schematics_1.chain)(rules);
|
|
182
169
|
};
|
|
183
170
|
return (0, schematics_1.chain)([
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../schematics/component/container/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAClC,2DAeoC;AACpC,gDAeyB;AACzB,qEAG+C;AAC/C,+DAG4C;AAC5C,iCAAiC;AACjC,gFAEsD;AACtD,oEAEgD;AAChD,oEAEgD;AAChD,8EAEqD;AACrD,4CAEsB;AACtB,0DAE6B;AAKhB,QAAA,gBAAgB,GAAG,WAAW,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,qBAAqB,GAAG,CAAC,OAAqD,EAAE,qBAA4C,EAAE,MAAe,EAAE,EAAE;IACrJ,MAAM,kBAAkB,GAAG,IAAA,kCAAqB,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACxE,MAAM,UAAU,GAAG,IAAA,mCAAsB,EAAC,kBAAkB,CAAC,CAAC;IAC9D,MAAM,iBAAiB,GAAG,IAAA,8CAAiC,EAAC,OAAO,CAAC,aAAa,EAAE,MAAM,IAAI,IAAI,CAAC,CAAC;IAEnG,OAAO;QACL,GAAG,OAAO;QACV,aAAa,EAAE,OAAO,CAAC,kBAAkB,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW;QAC5E,mBAAmB,EAAE,IAAA,mCA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K,EAAC;QACX,aAAa;QACb,sBAAsB,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE,CAAC,CAAC,CAAC,IAAA,2BAAc,GAAE,CAAC;KACnF,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACU,QAAA,4BAA4B,GAAG,IAAA,iCAAoB,EAAC,8BAA8B,CAAC,CAAC"}
|
|
@@ -24,5 +24,7 @@ export interface NgGenerateComponentContainerSchematicsSchema extends SchematicO
|
|
|
24
24
|
skipLinter: boolean;
|
|
25
25
|
/** Whether the generated component is standalone */
|
|
26
26
|
standalone: boolean;
|
|
27
|
+
/** Custom type to append to the component's file name */
|
|
28
|
+
type?: string;
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/component/container/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,4CAA6C,SAAQ,qBAAqB;IACzF,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IAEtB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B,0BAA0B;IAC1B,kBAAkB,EAAE,MAAM,GAAG,WAAW,CAAC;IAEzC,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B,0DAA0D;IAC1D,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE3C,gEAAgE;IAChE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAErC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEjC,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAErC,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;IAEpB,oDAAoD;IACpD,UAAU,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../schematics/component/container/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,4CAA6C,SAAQ,qBAAqB;IACzF,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IAEtB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B,0BAA0B;IAC1B,kBAAkB,EAAE,MAAM,GAAG,WAAW,CAAC;IAEzC,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B,0DAA0D;IAC1D,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE3C,gEAAgE;IAChE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAErC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEjC,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAErC,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;IAEpB,oDAAoD;IACpD,UAAU,EAAE,OAAO,CAAC;IAEpB,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../schematics/component/container/schema.ts"],"names":[],"mappings":""}
|
|
@@ -72,6 +72,10 @@
|
|
|
72
72
|
"type": "boolean",
|
|
73
73
|
"description": "Whether the generated component is standalone.",
|
|
74
74
|
"default": true
|
|
75
|
+
},
|
|
76
|
+
"type": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "Custom type to append to the component's file name"
|
|
75
79
|
}
|
|
76
80
|
},
|
|
77
81
|
"additionalProperties": true,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './<%= name
|
|
2
|
-
<% if (!standalone) { %>export * from './<%= name
|
|
1
|
+
export * from './<%= name %>';
|
|
2
|
+
<% if (!standalone) { %>export * from './<%= name %>-module';
|
|
3
3
|
<% } %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/component/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAClC,+CAE8B;AAC9B,2DAcoC;AACpC,gDAQyB;AAKzB;;;GAGG;AACH,SAAS,0BAA0B,CAAC,OAA4C;IAC9E,OAAO,IAAA,sBAAS,EAAC,qBAAqB,EAAE;QACtC,GAAG,OAAO;QACV,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,SAAS;QAC7C,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,SAAS;QACjD,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;QACnC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;KACvC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,SAAS,0BAA0B,CAAC,OAA4C;IAC9E,OAAO,IAAA,sBAAS,EAAC,qBAAqB,EAAE;QACtC,GAAG,OAAO;QACV,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,SAAS;QAC7C,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;QACnC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,E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AAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/component/presenter/index.ts"],"names":[],"mappings":"AACA,OAAO,EASL,IAAI,EAML,MAAM,4BAA4B,CAAC;AAyCpC,eAAO,MAAM,gBAAgB,cAAc,CAAC;AA2I5C;;;GAGG;AACH,eAAO,MAAM,4BAA4B,wBAAuD,CAAC"}
|
|
@@ -25,11 +25,11 @@ const getTemplateProperties = (options, componentStructureDef, prefix) => {
|
|
|
25
25
|
const structure = componentStructureDef === structures_types_1.ComponentStructureDef.Simple ? '' : componentStructureDef;
|
|
26
26
|
return {
|
|
27
27
|
...options,
|
|
28
|
-
componentName: (0, schematics_2.
|
|
28
|
+
componentName: (0, schematics_2.getComponentBaseName)(inputComponentName, structure),
|
|
29
29
|
componentSelector: (0, schematics_2.getComponentSelectorWithoutSuffix)(options.componentName, prefix || null),
|
|
30
30
|
projectName: options.projectName || (0, schematics_2.getLibraryNameFromPath)(options.path),
|
|
31
31
|
folderName,
|
|
32
|
-
name: (0, schematics_2.getComponentFileName)(options.componentName, structure),
|
|
32
|
+
name: (0, schematics_2.getComponentFileName)(options.componentName, structure, options.type),
|
|
33
33
|
suffix: structure.toLowerCase(),
|
|
34
34
|
description: options.description || ''
|
|
35
35
|
};
|
|
@@ -44,15 +44,10 @@ function ngGenerateComponentPresenterFn(options) {
|
|
|
44
44
|
const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
|
45
45
|
const properties = getTemplateProperties(options, options.componentStructure === 'simple' ? structures_types_1.ComponentStructureDef.Simple : structures_types_1.ComponentStructureDef.Pres, options.prefix || workspaceProject?.prefix);
|
|
46
46
|
const destination = (0, schematics_2.getDestinationPath)('@o3r/core:component', options.path, tree, options.projectName);
|
|
47
|
-
const componentDestination = path.posix.join(destination, fullStructureRequested ? path.posix.join(properties.folderName, exports.PRESENTER_FOLDER) : properties.folderName);
|
|
48
|
-
const componentPath = path.posix.join(componentDestination, `${properties.name}.
|
|
49
|
-
const
|
|
50
|
-
const o3rSpecPath = path.posix.join(componentDestination, `${properties.name}.spec.ts`);
|
|
51
|
-
const ngStylePath = path.posix.join(componentDestination, `${properties.name}.component.scss`);
|
|
52
|
-
const o3rStylePath = path.posix.join(componentDestination, `${properties.name}.style.scss`);
|
|
47
|
+
const componentDestination = path.posix.join(destination, fullStructureRequested ? path.posix.join(properties.folderName, exports.PRESENTER_FOLDER) : `${properties.folderName}${properties.suffix ? ('-' + properties.suffix) : ''}`);
|
|
48
|
+
const componentPath = path.posix.join(componentDestination, `${properties.name}.ts`);
|
|
49
|
+
const stylePath = path.posix.join(componentDestination, `${properties.name}.scss`);
|
|
53
50
|
const o3rDesignTokenPath = path.posix.join(componentDestination, `${properties.name}.theme.json`);
|
|
54
|
-
const ngTemplatePath = path.posix.join(componentDestination, `${properties.name}.component.html`);
|
|
55
|
-
const o3rTemplatePath = path.posix.join(componentDestination, `${properties.name}.template.html`);
|
|
56
51
|
const componentSelector = `${properties.componentSelector}${properties.suffix ? ('-' + properties.suffix) : ''}`;
|
|
57
52
|
const rules = [];
|
|
58
53
|
if (!options.standalone) {
|
|
@@ -60,8 +55,7 @@ function ngGenerateComponentPresenterFn(options) {
|
|
|
60
55
|
project: properties.projectName,
|
|
61
56
|
path: componentDestination,
|
|
62
57
|
flat: true,
|
|
63
|
-
name: properties.componentName
|
|
64
|
-
typeSeparator: '.'
|
|
58
|
+
name: properties.componentName
|
|
65
59
|
}));
|
|
66
60
|
}
|
|
67
61
|
rules.push((0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./templates'), [
|
|
@@ -78,7 +72,7 @@ function ngGenerateComponentPresenterFn(options) {
|
|
|
78
72
|
viewEncapsulation: 'None',
|
|
79
73
|
changeDetection: 'OnPush',
|
|
80
74
|
style: 'scss',
|
|
81
|
-
type:
|
|
75
|
+
type: options.type,
|
|
82
76
|
skipSelector: false,
|
|
83
77
|
standalone: options.standalone,
|
|
84
78
|
...(options.standalone
|
|
@@ -86,37 +80,14 @@ function ngGenerateComponentPresenterFn(options) {
|
|
|
86
80
|
skipImport: true
|
|
87
81
|
}
|
|
88
82
|
: {
|
|
89
|
-
module: `${properties.name}
|
|
83
|
+
module: `${properties.name}-module.ts`,
|
|
90
84
|
export: true
|
|
91
85
|
}),
|
|
92
86
|
flat: true
|
|
93
|
-
}),
|
|
94
|
-
// Angular schematics generate spec file with this pattern: component-name.component.spec.ts
|
|
95
|
-
(0, schematics_1.move)(ngSpecPath, o3rSpecPath),
|
|
96
|
-
// Angular schematics generate style file with this pattern: component-name.component.scss
|
|
97
|
-
(0, schematics_1.chain)([
|
|
98
|
-
(0, schematics_1.move)(ngStylePath, o3rStylePath),
|
|
99
|
-
(t) => {
|
|
100
|
-
// Styling file is empty by default, as we create component with `viewEncapsulation` set to 'None', we should wrap the styling into the selector of the component
|
|
101
|
-
t.overwrite(o3rStylePath, `${componentSelector} {\n\t// Your component custom SCSS\n}\n`);
|
|
102
|
-
return t;
|
|
103
|
-
},
|
|
104
|
-
(t) => {
|
|
105
|
-
t.overwrite(componentPath, t.readText(componentPath).replace(path.basename(ngStylePath), path.basename(o3rStylePath)));
|
|
106
|
-
return t;
|
|
107
|
-
}
|
|
108
|
-
]),
|
|
109
|
-
// Angular schematics generate template file with this pattern: component-name.component.html
|
|
110
|
-
(0, schematics_1.chain)([
|
|
111
|
-
(0, schematics_1.move)(ngTemplatePath, o3rTemplatePath),
|
|
112
|
-
(t) => {
|
|
113
|
-
t.overwrite(componentPath, t.readText(componentPath).replace(path.basename(ngTemplatePath), path.basename(o3rTemplatePath)));
|
|
114
|
-
return t;
|
|
115
|
-
}
|
|
116
|
-
]), (0, schematics_1.schematic)('convert-component', {
|
|
87
|
+
}), (0, schematics_1.schematic)('convert-component', {
|
|
117
88
|
path: componentPath,
|
|
118
89
|
skipLinter: options.skipLinter
|
|
119
|
-
}), (0, configuration_1.getAddConfigurationRules)(componentPath, options), (0, theming_1.getAddThemingRules)(
|
|
90
|
+
}), (0, configuration_1.getAddConfigurationRules)(componentPath, options), (0, theming_1.getAddThemingRules)(stylePath, options), (0, design_token_1.getAddDesignTokenRules)(stylePath, o3rDesignTokenPath, options), (0, localization_1.getAddLocalizationRules)(componentPath, options), (0, fixture_1.getAddFixtureRules)(componentPath, options), (0, analytics_1.getAddAnalyticsRules)(componentPath, options), (0, context_1.getAddContextRules)(componentPath, options));
|
|
120
91
|
return (0, schematics_1.chain)(rules);
|
|
121
92
|
};
|
|
122
93
|
return (0, schematics_1.chain)([
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../schematics/component/presenter/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAClC,2DAeoC;AACpC,gDAWyB;AACzB,wEAEkD;AAClD,gFAEsD;AACtD,oEAEgD;AAChD,8EAEqD;AACrD,oEAEgD;AAChD,8EAEqD;AACrD,oEAEgD;AAIhD,0DAE6B;AAEhB,QAAA,gBAAgB,GAAG,WAAW,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,qBAAqB,GAAG,CAAC,OAA4C,EAAE,qBAA4C,EAAE,MAAe,EAAE,EAAE;IAC5I,MAAM,kBAAkB,GAAG,IAAA,kCAAqB,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACxE,MAAM,UAAU,GAAG,IAAA,mCAAsB,EAAC,kBAAkB,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAW,qBAAqB,KAAK,wCAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,qBAAqB,CAAC;IAE9G,OAAO;QACL,GAAG,OAAO;QACV,aAAa,EAAE,IAAA,iCAAoB,EAAC,kBAAkB,EAAE,SAAS,CAAC;QAClE,iBAAiB,EAAE,IAAA,8CAAiC,EAAC,OAAO,CAAC,aAAa,EAAE,MAAM,IAAI,IAAI,CAAC;QAC3F,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAA,m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,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE,CAAC,CAAC,CAAC,IAAA,2BAAc,GAAE,CAAC;KACnF,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACU,QAAA,4BAA4B,GAAG,IAAA,iCAAoB,EAAC,8BAA8B,CAAC,CAAC"}
|
|
@@ -31,5 +31,7 @@ export interface NgGenerateComponentPresenterSchematicsSchema extends SchematicO
|
|
|
31
31
|
skipLinter: boolean;
|
|
32
32
|
/** Whether the generated component is standalone */
|
|
33
33
|
standalone: boolean;
|
|
34
|
+
/** Custom type to append to the component's file name */
|
|
35
|
+
type?: string;
|
|
34
36
|
}
|
|
35
37
|
//# sourceMappingURL=schema.d.ts.map
|