@softpak/components 0.2.1 → 0.2.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/esm2022/spx-patch/release-check.function.mjs +5 -2
- package/esm2022/spx-patch/spx-patch.component.mjs +9 -7
- package/fesm2022/softpak-components-spx-patch.mjs +12 -7
- package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
- package/package.json +36 -36
- package/spx-patch/release-check.function.d.ts +1 -1
- package/spx-patch/spx-patch.component.d.ts +2 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { SpxStorage, SpxStorageKeyEnum } from "@softpak/components/spx-storage";
|
|
2
|
-
export const releaseCheck = (releaseAtLeast) => {
|
|
2
|
+
export const releaseCheck = (releaseAtLeast, orInReleaseList) => {
|
|
3
3
|
const currentRelease = (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00').split('.').map((v) => parseInt(v, 10));
|
|
4
4
|
const requiredRelease = releaseAtLeast.split('.').map((v) => parseInt(v, 10));
|
|
5
|
+
if (orInReleaseList && orInReleaseList.find(release => release === (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00'))) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
5
8
|
if (requiredRelease[0] < currentRelease[0] ||
|
|
6
9
|
requiredRelease[0] === currentRelease[0] && requiredRelease[1] <= currentRelease[1]) {
|
|
7
10
|
return null;
|
|
8
11
|
}
|
|
9
12
|
return releaseAtLeast;
|
|
10
13
|
};
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVsZWFzZS1jaGVjay5mdW5jdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NvZnRwYWsvY29tcG9uZW50cy9zcHgtcGF0Y2gvcmVsZWFzZS1jaGVj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VbMF0gJiYgcmVxdWlyZWRSZWxlYXNlWzFdIDw9IGN1cnJlbnRSZWxlYXNlWzFdXG4gICAgKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICByZXR1cm4gcmVsZWFzZUF0TGVhc3Q7XG59O1xuXG4iXX0=
|
|
@@ -9,13 +9,13 @@ export class SpxPatchComponent {
|
|
|
9
9
|
this.severityWarning = SpxSeverityEnum.warning;
|
|
10
10
|
}
|
|
11
11
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxPatchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: SpxPatchComponent, isStandalone: true, selector: "spx-patch", inputs: { patchCheck: "patchCheck", releaseCheck: "releaseCheck" }, ngImport: i0, template: `<div class="flex flex-col gap-2">
|
|
12
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: SpxPatchComponent, isStandalone: true, selector: "spx-patch", inputs: { spxText: "spxText", patchCheck: "patchCheck", releaseCheck: "releaseCheck" }, ngImport: i0, template: `<div class="flex flex-col gap-2">
|
|
13
13
|
<spx-alert *ngIf="releaseCheck" [spxTitle]="'Requires new release'" [spxSeverity]="severityError">
|
|
14
|
-
This
|
|
14
|
+
{{ spxText ? spxText : 'This new functionality' }} requires release {{releaseCheck}}.
|
|
15
15
|
</spx-alert>
|
|
16
16
|
|
|
17
17
|
<spx-alert *ngIf="patchCheck" [spxTitle]="'Softpak patch'" [spxSeverity]="severityWarning">
|
|
18
|
-
|
|
18
|
+
{{ spxText ? spxText : 'This new functionality' }} requires patch #{{patchCheck}} to be installed.
|
|
19
19
|
</spx-alert>
|
|
20
20
|
</div>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxAlertComponent, selector: "spx-alert", inputs: ["spxAutoclose", "spxCloseable", "spxHideTitle", "spxTitle", "spxMarginTop", "spxSeverity", "tick"], outputs: ["spxClose"] }] }); }
|
|
21
21
|
}
|
|
@@ -30,17 +30,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
30
30
|
],
|
|
31
31
|
template: `<div class="flex flex-col gap-2">
|
|
32
32
|
<spx-alert *ngIf="releaseCheck" [spxTitle]="'Requires new release'" [spxSeverity]="severityError">
|
|
33
|
-
This
|
|
33
|
+
{{ spxText ? spxText : 'This new functionality' }} requires release {{releaseCheck}}.
|
|
34
34
|
</spx-alert>
|
|
35
35
|
|
|
36
36
|
<spx-alert *ngIf="patchCheck" [spxTitle]="'Softpak patch'" [spxSeverity]="severityWarning">
|
|
37
|
-
|
|
37
|
+
{{ spxText ? spxText : 'This new functionality' }} requires patch #{{patchCheck}} to be installed.
|
|
38
38
|
</spx-alert>
|
|
39
39
|
</div>`,
|
|
40
40
|
}]
|
|
41
|
-
}], propDecorators: {
|
|
41
|
+
}], propDecorators: { spxText: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], patchCheck: [{
|
|
42
44
|
type: Input
|
|
43
45
|
}], releaseCheck: [{
|
|
44
46
|
type: Input
|
|
45
47
|
}] } });
|
|
46
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3B4LXBhdGNoLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NvZnRwYWsvY29tcG9uZW50cy9zcHgtcGF0Y2gvc3B4LXBhdGNoLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQ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XJyb3IgPSBTcHhTZXZlcml0eUVudW0uZXJyb3I7XG4gIHNldmVyaXR5V2FybmluZyA9IFNweFNldmVyaXR5RW51bS53YXJuaW5nO1xufVxuIl19
|
|
@@ -13,9 +13,12 @@ const patchCheck = (pair) => {
|
|
|
13
13
|
return release.patchAtLeast;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
const releaseCheck = (releaseAtLeast) => {
|
|
16
|
+
const releaseCheck = (releaseAtLeast, orInReleaseList) => {
|
|
17
17
|
const currentRelease = (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00').split('.').map((v) => parseInt(v, 10));
|
|
18
18
|
const requiredRelease = releaseAtLeast.split('.').map((v) => parseInt(v, 10));
|
|
19
|
+
if (orInReleaseList && orInReleaseList.find(release => release === (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00'))) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
19
22
|
if (requiredRelease[0] < currentRelease[0] ||
|
|
20
23
|
requiredRelease[0] === currentRelease[0] && requiredRelease[1] <= currentRelease[1]) {
|
|
21
24
|
return null;
|
|
@@ -29,13 +32,13 @@ class SpxPatchComponent {
|
|
|
29
32
|
this.severityWarning = SpxSeverityEnum.warning;
|
|
30
33
|
}
|
|
31
34
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxPatchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: SpxPatchComponent, isStandalone: true, selector: "spx-patch", inputs: { patchCheck: "patchCheck", releaseCheck: "releaseCheck" }, ngImport: i0, template: `<div class="flex flex-col gap-2">
|
|
35
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: SpxPatchComponent, isStandalone: true, selector: "spx-patch", inputs: { spxText: "spxText", patchCheck: "patchCheck", releaseCheck: "releaseCheck" }, ngImport: i0, template: `<div class="flex flex-col gap-2">
|
|
33
36
|
<spx-alert *ngIf="releaseCheck" [spxTitle]="'Requires new release'" [spxSeverity]="severityError">
|
|
34
|
-
This
|
|
37
|
+
{{ spxText ? spxText : 'This new functionality' }} requires release {{releaseCheck}}.
|
|
35
38
|
</spx-alert>
|
|
36
39
|
|
|
37
40
|
<spx-alert *ngIf="patchCheck" [spxTitle]="'Softpak patch'" [spxSeverity]="severityWarning">
|
|
38
|
-
|
|
41
|
+
{{ spxText ? spxText : 'This new functionality' }} requires patch #{{patchCheck}} to be installed.
|
|
39
42
|
</spx-alert>
|
|
40
43
|
</div>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxAlertComponent, selector: "spx-alert", inputs: ["spxAutoclose", "spxCloseable", "spxHideTitle", "spxTitle", "spxMarginTop", "spxSeverity", "tick"], outputs: ["spxClose"] }] }); }
|
|
41
44
|
}
|
|
@@ -50,15 +53,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
50
53
|
],
|
|
51
54
|
template: `<div class="flex flex-col gap-2">
|
|
52
55
|
<spx-alert *ngIf="releaseCheck" [spxTitle]="'Requires new release'" [spxSeverity]="severityError">
|
|
53
|
-
This
|
|
56
|
+
{{ spxText ? spxText : 'This new functionality' }} requires release {{releaseCheck}}.
|
|
54
57
|
</spx-alert>
|
|
55
58
|
|
|
56
59
|
<spx-alert *ngIf="patchCheck" [spxTitle]="'Softpak patch'" [spxSeverity]="severityWarning">
|
|
57
|
-
|
|
60
|
+
{{ spxText ? spxText : 'This new functionality' }} requires patch #{{patchCheck}} to be installed.
|
|
58
61
|
</spx-alert>
|
|
59
62
|
</div>`,
|
|
60
63
|
}]
|
|
61
|
-
}], propDecorators: {
|
|
64
|
+
}], propDecorators: { spxText: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], patchCheck: [{
|
|
62
67
|
type: Input
|
|
63
68
|
}], releaseCheck: [{
|
|
64
69
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-patch.mjs","sources":["../../../../projects/softpak/components/spx-patch/patch-check.function.ts","../../../../projects/softpak/components/spx-patch/release-check.function.ts","../../../../projects/softpak/components/spx-patch/spx-patch.component.ts","../../../../projects/softpak/components/spx-patch/softpak-components-spx-patch.ts"],"sourcesContent":["import { SpxStorage, SpxStorageKeyEnum } from \"@softpak/components/spx-storage\";\n\nexport const patchCheck = (pair: { release: string; patchAtLeast: number; }[]) => {\n const release = pair.find(p => p.release === SpxStorage.getSetting(SpxStorageKeyEnum.release));\n if (!release || (parseInt(SpxStorage.getSetting(SpxStorageKeyEnum.patch) ?? '0', 10) >= release.patchAtLeast)) {\n return null;\n }\n return release.patchAtLeast;\n};\n\n","import { SpxStorage, SpxStorageKeyEnum } from \"@softpak/components/spx-storage\";\n\nexport const releaseCheck = (releaseAtLeast: string) => {\n const currentRelease = (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00').split('.').map((v: string) => parseInt(v, 10));\n const requiredRelease = releaseAtLeast.split('.').map((v: string) => parseInt(v, 10));\n \n if (requiredRelease[0] < currentRelease[0] ||\n requiredRelease[0] === currentRelease[0] && requiredRelease[1] <= currentRelease[1]\n ) {\n return null;\n }\n return releaseAtLeast;\n};\n\n","import { NgIf } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-patch',\n standalone: true,\n imports: [\n NgIf,\n SpxAlertComponent,\n ],\n template: `<div class=\"flex flex-col gap-2\">\n <spx-alert *ngIf=\"releaseCheck\" [spxTitle]=\"'Requires new release'\" [spxSeverity]=\"severityError\">\n This
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-patch.mjs","sources":["../../../../projects/softpak/components/spx-patch/patch-check.function.ts","../../../../projects/softpak/components/spx-patch/release-check.function.ts","../../../../projects/softpak/components/spx-patch/spx-patch.component.ts","../../../../projects/softpak/components/spx-patch/softpak-components-spx-patch.ts"],"sourcesContent":["import { SpxStorage, SpxStorageKeyEnum } from \"@softpak/components/spx-storage\";\n\nexport const patchCheck = (pair: { release: string; patchAtLeast: number; }[]) => {\n const release = pair.find(p => p.release === SpxStorage.getSetting(SpxStorageKeyEnum.release));\n if (!release || (parseInt(SpxStorage.getSetting(SpxStorageKeyEnum.patch) ?? '0', 10) >= release.patchAtLeast)) {\n return null;\n }\n return release.patchAtLeast;\n};\n\n","import { SpxStorage, SpxStorageKeyEnum } from \"@softpak/components/spx-storage\";\n\nexport const releaseCheck = (releaseAtLeast: string, orInReleaseList?: string[]) => {\n const currentRelease = (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00').split('.').map((v: string) => parseInt(v, 10));\n const requiredRelease = releaseAtLeast.split('.').map((v: string) => parseInt(v, 10));\n \n if (orInReleaseList && orInReleaseList.find(release => release === (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00'))) {\n return null;\n }\n\n if (requiredRelease[0] < currentRelease[0] ||\n requiredRelease[0] === currentRelease[0] && requiredRelease[1] <= currentRelease[1]\n ) {\n return null;\n }\n return releaseAtLeast;\n};\n\n","import { NgIf } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-patch',\n standalone: true,\n imports: [\n NgIf,\n SpxAlertComponent,\n ],\n template: `<div class=\"flex flex-col gap-2\">\n <spx-alert *ngIf=\"releaseCheck\" [spxTitle]=\"'Requires new release'\" [spxSeverity]=\"severityError\">\n {{ spxText ? spxText : 'This new functionality' }} requires release {{releaseCheck}}.\n </spx-alert>\n\n <spx-alert *ngIf=\"patchCheck\" [spxTitle]=\"'Softpak patch'\" [spxSeverity]=\"severityWarning\">\n {{ spxText ? spxText : 'This new functionality' }} requires patch #{{patchCheck}} to be installed.\n </spx-alert>\n</div>`,\n})\nexport class SpxPatchComponent {\n @Input() spxText!: string;\n @Input() patchCheck!: number | null;\n @Input() releaseCheck!: string | null;\n severityError = SpxSeverityEnum.error;\n severityWarning = SpxSeverityEnum.warning;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAEa,MAAA,UAAU,GAAG,CAAC,IAAkD,KAAI;IAC7E,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/F,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,EAAE;AAC3G,QAAA,OAAO,IAAI,CAAC;KACf;IACD,OAAO,OAAO,CAAC,YAAY,CAAC;AAChC;;MCNa,YAAY,GAAG,CAAC,cAAsB,EAAE,eAA0B,KAAI;AAC/E,IAAA,MAAM,cAAc,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,KAAK,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpI,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,KAAK,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAEtF,IAAI,eAAe,IAAI,eAAe,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,MAAM,UAAU,CA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A,EAAA,aAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAYR,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAjB7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,IAAI;wBACJ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;AAQL,MAAA,CAAA;AACN,iBAAA,CAAA;8BAEU,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;;;ACzBR;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softpak/components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "18.x.x",
|
|
@@ -52,30 +52,24 @@
|
|
|
52
52
|
"esm": "./esm2022/spx-button/softpak-components-spx-button.mjs",
|
|
53
53
|
"default": "./fesm2022/softpak-components-spx-button.mjs"
|
|
54
54
|
},
|
|
55
|
-
"./spx-app-update": {
|
|
56
|
-
"types": "./spx-app-update/index.d.ts",
|
|
57
|
-
"esm2022": "./esm2022/spx-app-update/softpak-components-spx-app-update.mjs",
|
|
58
|
-
"esm": "./esm2022/spx-app-update/softpak-components-spx-app-update.mjs",
|
|
59
|
-
"default": "./fesm2022/softpak-components-spx-app-update.mjs"
|
|
60
|
-
},
|
|
61
55
|
"./spx-capitalize": {
|
|
62
56
|
"types": "./spx-capitalize/index.d.ts",
|
|
63
57
|
"esm2022": "./esm2022/spx-capitalize/softpak-components-spx-capitalize.mjs",
|
|
64
58
|
"esm": "./esm2022/spx-capitalize/softpak-components-spx-capitalize.mjs",
|
|
65
59
|
"default": "./fesm2022/softpak-components-spx-capitalize.mjs"
|
|
66
60
|
},
|
|
67
|
-
"./spx-card": {
|
|
68
|
-
"types": "./spx-card/index.d.ts",
|
|
69
|
-
"esm2022": "./esm2022/spx-card/softpak-components-spx-card.mjs",
|
|
70
|
-
"esm": "./esm2022/spx-card/softpak-components-spx-card.mjs",
|
|
71
|
-
"default": "./fesm2022/softpak-components-spx-card.mjs"
|
|
72
|
-
},
|
|
73
61
|
"./spx-change-details": {
|
|
74
62
|
"types": "./spx-change-details/index.d.ts",
|
|
75
63
|
"esm2022": "./esm2022/spx-change-details/softpak-components-spx-change-details.mjs",
|
|
76
64
|
"esm": "./esm2022/spx-change-details/softpak-components-spx-change-details.mjs",
|
|
77
65
|
"default": "./fesm2022/softpak-components-spx-change-details.mjs"
|
|
78
66
|
},
|
|
67
|
+
"./spx-app-update": {
|
|
68
|
+
"types": "./spx-app-update/index.d.ts",
|
|
69
|
+
"esm2022": "./esm2022/spx-app-update/softpak-components-spx-app-update.mjs",
|
|
70
|
+
"esm": "./esm2022/spx-app-update/softpak-components-spx-app-update.mjs",
|
|
71
|
+
"default": "./fesm2022/softpak-components-spx-app-update.mjs"
|
|
72
|
+
},
|
|
79
73
|
"./spx-channel-selection": {
|
|
80
74
|
"types": "./spx-channel-selection/index.d.ts",
|
|
81
75
|
"esm2022": "./esm2022/spx-channel-selection/softpak-components-spx-channel-selection.mjs",
|
|
@@ -100,6 +94,12 @@
|
|
|
100
94
|
"esm": "./esm2022/spx-form-view/softpak-components-spx-form-view.mjs",
|
|
101
95
|
"default": "./fesm2022/softpak-components-spx-form-view.mjs"
|
|
102
96
|
},
|
|
97
|
+
"./spx-card": {
|
|
98
|
+
"types": "./spx-card/index.d.ts",
|
|
99
|
+
"esm2022": "./esm2022/spx-card/softpak-components-spx-card.mjs",
|
|
100
|
+
"esm": "./esm2022/spx-card/softpak-components-spx-card.mjs",
|
|
101
|
+
"default": "./fesm2022/softpak-components-spx-card.mjs"
|
|
102
|
+
},
|
|
103
103
|
"./spx-helpers": {
|
|
104
104
|
"types": "./spx-helpers/index.d.ts",
|
|
105
105
|
"esm2022": "./esm2022/spx-helpers/softpak-components-spx-helpers.mjs",
|
|
@@ -112,29 +112,17 @@
|
|
|
112
112
|
"esm": "./esm2022/spx-inputs/softpak-components-spx-inputs.mjs",
|
|
113
113
|
"default": "./fesm2022/softpak-components-spx-inputs.mjs"
|
|
114
114
|
},
|
|
115
|
-
"./spx-navigation": {
|
|
116
|
-
"types": "./spx-navigation/index.d.ts",
|
|
117
|
-
"esm2022": "./esm2022/spx-navigation/softpak-components-spx-navigation.mjs",
|
|
118
|
-
"esm": "./esm2022/spx-navigation/softpak-components-spx-navigation.mjs",
|
|
119
|
-
"default": "./fesm2022/softpak-components-spx-navigation.mjs"
|
|
120
|
-
},
|
|
121
115
|
"./spx-number-check": {
|
|
122
116
|
"types": "./spx-number-check/index.d.ts",
|
|
123
117
|
"esm2022": "./esm2022/spx-number-check/softpak-components-spx-number-check.mjs",
|
|
124
118
|
"esm": "./esm2022/spx-number-check/softpak-components-spx-number-check.mjs",
|
|
125
119
|
"default": "./fesm2022/softpak-components-spx-number-check.mjs"
|
|
126
120
|
},
|
|
127
|
-
"./spx-
|
|
128
|
-
"types": "./spx-
|
|
129
|
-
"esm2022": "./esm2022/spx-
|
|
130
|
-
"esm": "./esm2022/spx-
|
|
131
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
132
|
-
},
|
|
133
|
-
"./spx-patch": {
|
|
134
|
-
"types": "./spx-patch/index.d.ts",
|
|
135
|
-
"esm2022": "./esm2022/spx-patch/softpak-components-spx-patch.mjs",
|
|
136
|
-
"esm": "./esm2022/spx-patch/softpak-components-spx-patch.mjs",
|
|
137
|
-
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
121
|
+
"./spx-navigation": {
|
|
122
|
+
"types": "./spx-navigation/index.d.ts",
|
|
123
|
+
"esm2022": "./esm2022/spx-navigation/softpak-components-spx-navigation.mjs",
|
|
124
|
+
"esm": "./esm2022/spx-navigation/softpak-components-spx-navigation.mjs",
|
|
125
|
+
"default": "./fesm2022/softpak-components-spx-navigation.mjs"
|
|
138
126
|
},
|
|
139
127
|
"./spx-progress-bar": {
|
|
140
128
|
"types": "./spx-progress-bar/index.d.ts",
|
|
@@ -142,12 +130,30 @@
|
|
|
142
130
|
"esm": "./esm2022/spx-progress-bar/softpak-components-spx-progress-bar.mjs",
|
|
143
131
|
"default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
|
|
144
132
|
},
|
|
133
|
+
"./spx-patch": {
|
|
134
|
+
"types": "./spx-patch/index.d.ts",
|
|
135
|
+
"esm2022": "./esm2022/spx-patch/softpak-components-spx-patch.mjs",
|
|
136
|
+
"esm": "./esm2022/spx-patch/softpak-components-spx-patch.mjs",
|
|
137
|
+
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
138
|
+
},
|
|
145
139
|
"./spx-spinner": {
|
|
146
140
|
"types": "./spx-spinner/index.d.ts",
|
|
147
141
|
"esm2022": "./esm2022/spx-spinner/softpak-components-spx-spinner.mjs",
|
|
148
142
|
"esm": "./esm2022/spx-spinner/softpak-components-spx-spinner.mjs",
|
|
149
143
|
"default": "./fesm2022/softpak-components-spx-spinner.mjs"
|
|
150
144
|
},
|
|
145
|
+
"./spx-pagination": {
|
|
146
|
+
"types": "./spx-pagination/index.d.ts",
|
|
147
|
+
"esm2022": "./esm2022/spx-pagination/softpak-components-spx-pagination.mjs",
|
|
148
|
+
"esm": "./esm2022/spx-pagination/softpak-components-spx-pagination.mjs",
|
|
149
|
+
"default": "./fesm2022/softpak-components-spx-pagination.mjs"
|
|
150
|
+
},
|
|
151
|
+
"./spx-suggestion": {
|
|
152
|
+
"types": "./spx-suggestion/index.d.ts",
|
|
153
|
+
"esm2022": "./esm2022/spx-suggestion/softpak-components-spx-suggestion.mjs",
|
|
154
|
+
"esm": "./esm2022/spx-suggestion/softpak-components-spx-suggestion.mjs",
|
|
155
|
+
"default": "./fesm2022/softpak-components-spx-suggestion.mjs"
|
|
156
|
+
},
|
|
151
157
|
"./spx-stock-info": {
|
|
152
158
|
"types": "./spx-stock-info/index.d.ts",
|
|
153
159
|
"esm2022": "./esm2022/spx-stock-info/softpak-components-spx-stock-info.mjs",
|
|
@@ -160,12 +166,6 @@
|
|
|
160
166
|
"esm": "./esm2022/spx-storage/softpak-components-spx-storage.mjs",
|
|
161
167
|
"default": "./fesm2022/softpak-components-spx-storage.mjs"
|
|
162
168
|
},
|
|
163
|
-
"./spx-suggestion": {
|
|
164
|
-
"types": "./spx-suggestion/index.d.ts",
|
|
165
|
-
"esm2022": "./esm2022/spx-suggestion/softpak-components-spx-suggestion.mjs",
|
|
166
|
-
"esm": "./esm2022/spx-suggestion/softpak-components-spx-suggestion.mjs",
|
|
167
|
-
"default": "./fesm2022/softpak-components-spx-suggestion.mjs"
|
|
168
|
-
},
|
|
169
169
|
"./spx-toaster": {
|
|
170
170
|
"types": "./spx-toaster/index.d.ts",
|
|
171
171
|
"esm2022": "./esm2022/spx-toaster/softpak-components-spx-toaster.mjs",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const releaseCheck: (releaseAtLeast: string) => string | null;
|
|
1
|
+
export declare const releaseCheck: (releaseAtLeast: string, orInReleaseList?: string[]) => string | null;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SpxPatchComponent {
|
|
4
|
+
spxText: string;
|
|
4
5
|
patchCheck: number | null;
|
|
5
6
|
releaseCheck: string | null;
|
|
6
7
|
severityError: SpxSeverityEnum;
|
|
7
8
|
severityWarning: SpxSeverityEnum;
|
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxPatchComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpxPatchComponent, "spx-patch", never, { "patchCheck": { "alias": "patchCheck"; "required": false; }; "releaseCheck": { "alias": "releaseCheck"; "required": false; }; }, {}, never, never, true, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxPatchComponent, "spx-patch", never, { "spxText": { "alias": "spxText"; "required": false; }; "patchCheck": { "alias": "patchCheck"; "required": false; }; "releaseCheck": { "alias": "releaseCheck"; "required": false; }; }, {}, never, never, true, never>;
|
|
10
11
|
}
|