@energycap/components 0.39.8-schematics.20240229-1407 → 0.39.9-ECAP-23221-bc-file-upload-dialog.20240229-1206

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.
@@ -51,6 +51,8 @@ export declare class ConfirmDialogContext {
51
51
  saveButtonType?: ButtonType;
52
52
  /** Optional cancel button label */
53
53
  cancelLabel?: string;
54
+ /** Optional flag for hiding the cancel (secondary) button */
55
+ hideCancel?: boolean;
54
56
  /** When true, adds the submit tag to the save button so hitting enter triggers the save */
55
57
  saveOnEnter?: boolean;
56
58
  /** Optional alternate save button label */
@@ -50,6 +50,8 @@ export declare class PageViewComponent {
50
50
  */
51
51
  secondaryActionLabel?: string;
52
52
  hideSecondaryAction: boolean;
53
+ /** Flag for hiding the tiny close button in the top-right corner of dialog while in pending state only */
54
+ hideCloseOnPending: boolean;
53
55
  /**
54
56
  * Label for the primary button in the header. Default is 'Save'
55
57
  */
@@ -92,5 +94,5 @@ export declare class PageViewComponent {
92
94
  secondaryAction(event: any): void;
93
95
  closeDialog(): void;
94
96
  static ɵfac: i0.ɵɵFactoryDeclaration<PageViewComponent, never>;
95
- static ɵcmp: i0.ɵɵComponentDeclaration<PageViewComponent, "ec-page-view", never, { "isDialog": "isDialog"; "readonly": "readonly"; "status": "status"; "showHeader": "showHeader"; "errors": "errors"; "breadcrumbs": "breadcrumbs"; "title": "title"; "titleIcon": "titleIcon"; "subTitle": "subTitle"; "subTitleUrl": "subTitleUrl"; "moreActionsLabel": "moreActionsLabel"; "moreActions": "moreActions"; "secondaryActionLabel": "secondaryActionLabel"; "hideSecondaryAction": "hideSecondaryAction"; "primaryActionLabel": "primaryActionLabel"; "hidePrimaryAction": "hidePrimaryAction"; "customTitleTemplate": "customTitleTemplate"; "customActionsTemplate": "customActionsTemplate"; "customHeaderTemplate": "customHeaderTemplate"; "footerTemplate": "footerTemplate"; "customErrorBannerTemplate": "customErrorBannerTemplate"; "stickyFooter": "stickyFooter"; "fitContent": "fitContent"; "bgContent": "bgContent"; }, { "onPrimaryAction": "onPrimaryAction"; "onSecondaryAction": "onSecondaryAction"; }, never, ["*"], false, never>;
97
+ static ɵcmp: i0.ɵɵComponentDeclaration<PageViewComponent, "ec-page-view", never, { "isDialog": "isDialog"; "readonly": "readonly"; "status": "status"; "showHeader": "showHeader"; "errors": "errors"; "breadcrumbs": "breadcrumbs"; "title": "title"; "titleIcon": "titleIcon"; "subTitle": "subTitle"; "subTitleUrl": "subTitleUrl"; "moreActionsLabel": "moreActionsLabel"; "moreActions": "moreActions"; "secondaryActionLabel": "secondaryActionLabel"; "hideSecondaryAction": "hideSecondaryAction"; "hideCloseOnPending": "hideCloseOnPending"; "primaryActionLabel": "primaryActionLabel"; "hidePrimaryAction": "hidePrimaryAction"; "customTitleTemplate": "customTitleTemplate"; "customActionsTemplate": "customActionsTemplate"; "customHeaderTemplate": "customHeaderTemplate"; "footerTemplate": "footerTemplate"; "customErrorBannerTemplate": "customErrorBannerTemplate"; "stickyFooter": "stickyFooter"; "fitContent": "fitContent"; "bgContent": "bgContent"; }, { "onPrimaryAction": "onPrimaryAction"; "onSecondaryAction": "onSecondaryAction"; }, never, ["*"], false, never>;
96
98
  }
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.39.8-schematics.20240229-1407",
4
- "schematics": "./schematics/collection.json",
3
+ "version": "0.39.9-ECAP-23221-bc-file-upload-dialog.20240229-1206",
5
4
  "dependencies": {
6
5
  "tslib": "^2.0.0"
7
6
  },
@@ -1,9 +0,0 @@
1
- {
2
- "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
3
- "schematics": {
4
- "rxjs-7-upgrade": {
5
- "description": "Upgrade your project to RxJS 7",
6
- "factory": "./ng-generate/rxjs-7-upgrade/index#rxjs7Upgrade"
7
- }
8
- }
9
- }
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function rxjs7Upgrade(): Rule;
@@ -1,110 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.rxjs7Upgrade = void 0;
13
- const core_1 = require("@angular-devkit/core");
14
- const workspace_1 = require("@schematics/angular/utility/workspace");
15
- const ts = require("typescript");
16
- const path_1 = require("path");
17
- // import { insertImport, findNodes } from '@schematics/angular/utility/ast-utils';
18
- function rxjs7Upgrade() {
19
- return (tree) => __awaiter(this, void 0, void 0, function* () {
20
- const workspaceHost = createWorkspaceHost(tree);
21
- const { workspace } = yield core_1.workspaces.readWorkspace('/', workspaceHost);
22
- // Get all tsconfig paths from the workspace, including test tsconfigs
23
- const tsConfigPaths = getTsConfigPaths(workspace, tree);
24
- // The base path in the file system for the workspace. This is needed for the typescript compiler to resolve files correctly.
25
- const basePath = process.cwd().replace(/\\/g, '/');
26
- tsConfigPaths.forEach(tsConfigPath => {
27
- const program = createTsProgram(tree, tsConfigPath, basePath);
28
- // const printer = ts.createPrinter();
29
- // The program includes files from the workspace and external libraries for type checking.
30
- // We only want to migrate non-declaration files from the workspace.
31
- const filesToMigrate = program.getSourceFiles().filter(sourceFile => !sourceFile.isDeclarationFile && !program.isSourceFileFromExternalLibrary(sourceFile));
32
- console.log('filesToMigrate', filesToMigrate.map(f => f.fileName));
33
- });
34
- });
35
- function createWorkspaceHost(tree) {
36
- return {
37
- readFile(path) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- const data = tree.read(path);
40
- if (!data) {
41
- throw new Error(`File not found: ${path}`);
42
- }
43
- return core_1.virtualFs.fileBufferToString(data);
44
- });
45
- },
46
- writeFile(path, data) {
47
- return __awaiter(this, void 0, void 0, function* () {
48
- return tree.overwrite(path, data);
49
- });
50
- },
51
- isDirectory(path) {
52
- return __awaiter(this, void 0, void 0, function* () {
53
- return !tree.exists(path) && tree.getDir(path).subfiles.length > 0;
54
- });
55
- },
56
- isFile(path) {
57
- return __awaiter(this, void 0, void 0, function* () {
58
- return tree.exists(path);
59
- });
60
- }
61
- };
62
- }
63
- function getTsConfigPaths(workspace, tree) {
64
- const buildPaths = new Set();
65
- const testPaths = new Set();
66
- for (const [name, target] of (0, workspace_1.allWorkspaceTargets)(workspace)) {
67
- if (name !== 'build' && name !== 'test') {
68
- continue;
69
- }
70
- for (const [, options] of (0, workspace_1.allTargetOptions)(target)) {
71
- if (options.tsConfig && typeof options.tsConfig === 'string' && tree.exists(options.tsConfig)) {
72
- const normalizedPath = (0, core_1.normalize)(options.tsConfig);
73
- name === 'build' ? buildPaths.add(normalizedPath) : testPaths.add(normalizedPath);
74
- }
75
- }
76
- }
77
- return [...buildPaths, ...testPaths];
78
- }
79
- function createTsProgram(tree, tsConfigPath, basePath) {
80
- tsConfigPath = (0, path_1.resolve)(basePath, tsConfigPath);
81
- const parsed = parseTsConfig(tsConfigPath, (0, path_1.dirname)(tsConfigPath));
82
- const options = Object.assign(Object.assign({}, parsed.options), { skipLibCheck: true, skipDefaultLibCheck: true });
83
- const host = createTsCompilerHost(tree, options, basePath);
84
- return ts.createProgram(parsed.fileNames, options, host);
85
- }
86
- function parseTsConfig(tsConfigPath, basePath) {
87
- const { config } = ts.readConfigFile(tsConfigPath, ts.sys.readFile);
88
- const parseHost = {
89
- useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
90
- fileExists: ts.sys.fileExists,
91
- readFile: ts.sys.readFile,
92
- readDirectory: ts.sys.readDirectory
93
- };
94
- return ts.parseJsonConfigFileContent(config, parseHost, basePath, {});
95
- }
96
- function createTsCompilerHost(tree, options, basePath) {
97
- const host = ts.createCompilerHost(options);
98
- // Read files from the virtual tree to prevent conflicting changes between project migrations
99
- host.readFile = (fileName) => {
100
- var _a;
101
- const relativePath = (0, path_1.relative)(basePath, fileName);
102
- const result = (_a = tree.read(relativePath)) === null || _a === void 0 ? void 0 : _a.toString();
103
- // Remove BOM header to prevent TSC parsing errors
104
- return result === null || result === void 0 ? void 0 : result.replace(/^\uFEFF/, '');
105
- };
106
- return host;
107
- }
108
- }
109
- exports.rxjs7Upgrade = rxjs7Upgrade;
110
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/components/schematics/ng-generate/rxjs-7-upgrade/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+CAAwE;AACxE,qEAA8F;AAC9F,iCAAiC;AACjC,+BAAkD;AAClD,mFAAmF;AAEnF,SAAgB,YAAY;IAC1B,OAAO,CAAO,IAAU,EAAE,EAAE;QAC1B,MAAM,aAAa,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,iBAAU,CAAC,aAAa,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;QAEzE,sEAAsE;QACtE,MAAM,aAAa,GAAG,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACxD,6HAA6H;QAC7H,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEnD,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YACnC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;YAC9D,sCAAsC;YACtC,0FAA0F;YAC1F,oEAAoE;YACpE,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,M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