@cccteam/ccc-lib 0.0.20 → 0.0.22
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/fesm2022/cccteam-ccc-lib-ccc-resource-modals.mjs +23 -0
- package/fesm2022/cccteam-ccc-lib-ccc-resource-modals.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-ccc-resource-services.mjs +33 -0
- package/fesm2022/cccteam-ccc-lib-ccc-resource-services.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-ccc-resource.mjs +36 -167
- package/fesm2022/cccteam-ccc-lib-ccc-resource.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-forms.mjs +34 -1
- package/fesm2022/cccteam-ccc-lib-forms.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-guards.mjs +33 -0
- package/fesm2022/cccteam-ccc-lib-guards.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-resource-nav.mjs +30 -0
- package/fesm2022/cccteam-ccc-lib-resource-nav.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-resource-route-generator.mjs +61 -0
- package/fesm2022/cccteam-ccc-lib-resource-route-generator.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-types.mjs.map +1 -1
- package/package.json +21 -1
- package/types/cccteam-ccc-lib-ccc-resource-modals.d.ts +8 -0
- package/types/cccteam-ccc-lib-ccc-resource-services.d.ts +13 -0
- package/types/cccteam-ccc-lib-ccc-resource.d.ts +20 -53
- package/types/cccteam-ccc-lib-guards.d.ts +11 -0
- package/types/cccteam-ccc-lib-resource-nav.d.ts +13 -0
- package/types/cccteam-ccc-lib-resource-route-generator.d.ts +6 -0
- package/types/cccteam-ccc-lib-types.d.ts +44 -43
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/material/button';
|
|
4
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
5
|
+
import * as i1 from '@angular/material/dialog';
|
|
6
|
+
import { MatDialogModule, MatDialogActions } from '@angular/material/dialog';
|
|
7
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
8
|
+
|
|
9
|
+
class LeavePageConfirmationModalComponent {
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: LeavePageConfirmationModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.2", type: LeavePageConfirmationModalComponent, isStandalone: true, selector: "ccc-leave-page-confirmation-modal", ngImport: i0, template: "<div mat-dialog-title>You have unsaved changes, are you sure you want to leave?</div>\n<mat-dialog-content>\n <p>Any unsaved changes will be lost.</p>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <button mat-raised-button color=\"warn\" [mat-dialog-close]=\"false\">Cancel</button>\n <button mat-raised-button color=\"accent\" [mat-dialog-close]=\"true\">Confirm</button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }] });
|
|
12
|
+
}
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: LeavePageConfirmationModalComponent, decorators: [{
|
|
14
|
+
type: Component,
|
|
15
|
+
args: [{ selector: 'ccc-leave-page-confirmation-modal', imports: [MatDialogModule, MatFormFieldModule, MatDialogActions, MatButtonModule], template: "<div mat-dialog-title>You have unsaved changes, are you sure you want to leave?</div>\n<mat-dialog-content>\n <p>Any unsaved changes will be lost.</p>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <button mat-raised-button color=\"warn\" [mat-dialog-close]=\"false\">Cancel</button>\n <button mat-raised-button color=\"accent\" [mat-dialog-close]=\"true\">Confirm</button>\n</mat-dialog-actions>\n" }]
|
|
16
|
+
}] });
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Generated bundle index. Do not edit.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export { LeavePageConfirmationModalComponent };
|
|
23
|
+
//# sourceMappingURL=cccteam-ccc-lib-ccc-resource-modals.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cccteam-ccc-lib-ccc-resource-modals.mjs","sources":["../../../projects/ccc-lib/ccc-resource-modals/leave-page-confirmation-modal/leave-page-confirmation-modal.component.ts","../../../projects/ccc-lib/ccc-resource-modals/leave-page-confirmation-modal/leave-page-confirmation-modal.component.html","../../../projects/ccc-lib/ccc-resource-modals/cccteam-ccc-lib-ccc-resource-modals.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogActions, MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\n@Component({\n selector: 'ccc-leave-page-confirmation-modal',\n imports: [MatDialogModule, MatFormFieldModule, MatDialogActions, MatButtonModule],\n templateUrl: './leave-page-confirmation-modal.component.html',\n styleUrls: ['./leave-page-confirmation-modal.component.scss'],\n})\nexport class LeavePageConfirmationModalComponent {}\n","<div mat-dialog-title>You have unsaved changes, are you sure you want to leave?</div>\n<mat-dialog-content>\n <p>Any unsaved changes will be lost.</p>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <button mat-raised-button color=\"warn\" [mat-dialog-close]=\"false\">Cancel</button>\n <button mat-raised-button color=\"accent\" [mat-dialog-close]=\"true\">Confirm</button>\n</mat-dialog-actions>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAWa,mCAAmC,CAAA;uGAAnC,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mCAAmC,6FCXhD,iaAQA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDDY,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,MAAA,EAAA,kBAAA,EAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,MAAA,EAAA,CAAA,IAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,8DAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,8DAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,kBAAkB,8BAAoB,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,iOAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIrE,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAN/C,SAAS;+BACE,mCAAmC,EAAA,OAAA,EACpC,CAAC,eAAe,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,iaAAA,EAAA;;;AEPnF;;AAEG;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, computed, Injectable } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class FormStateService {
|
|
5
|
+
dirtyForms = signal(0, { ...(ngDevMode ? { debugName: "dirtyForms" } : {}) });
|
|
6
|
+
incrementDirtyForms() {
|
|
7
|
+
this.dirtyForms.set(this.dirtyForms() + 1);
|
|
8
|
+
}
|
|
9
|
+
decrementDirtyForms() {
|
|
10
|
+
this.dirtyForms.set(this.dirtyForms() - 1);
|
|
11
|
+
}
|
|
12
|
+
resetDirtyForms() {
|
|
13
|
+
this.dirtyForms.set(0);
|
|
14
|
+
}
|
|
15
|
+
isDirty = computed(() => {
|
|
16
|
+
return this.dirtyForms() > 0;
|
|
17
|
+
}, { ...(ngDevMode ? { debugName: "isDirty" } : {}) });
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: FormStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: FormStateService, providedIn: 'root' });
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: FormStateService, decorators: [{
|
|
22
|
+
type: Injectable,
|
|
23
|
+
args: [{
|
|
24
|
+
providedIn: 'root',
|
|
25
|
+
}]
|
|
26
|
+
}] });
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Generated bundle index. Do not edit.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
export { FormStateService };
|
|
33
|
+
//# sourceMappingURL=cccteam-ccc-lib-ccc-resource-services.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cccteam-ccc-lib-ccc-resource-services.mjs","sources":["../../../projects/ccc-lib/ccc-resource-services/form-state.service.ts","../../../projects/ccc-lib/ccc-resource-services/cccteam-ccc-lib-ccc-resource-services.ts"],"sourcesContent":["import { computed, Injectable, signal } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormStateService {\n dirtyForms = signal(0);\n\n incrementDirtyForms(): void {\n this.dirtyForms.set(this.dirtyForms() + 1);\n }\n\n decrementDirtyForms(): void {\n this.dirtyForms.set(this.dirtyForms() - 1);\n }\n\n resetDirtyForms(): void {\n this.dirtyForms.set(0);\n }\n\n isDirty = computed(() => {\n return this.dirtyForms() > 0;\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAKa,gBAAgB,CAAA;AAC3B,IAAA,UAAU,GAAG,MAAM,CAAC,CAAC,wDAAC;IAEtB,mBAAmB,GAAA;AACjB,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IAC5C;IAEA,mBAAmB,GAAA;AACjB,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IAC5C;IAEA,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB;AAEA,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACtB,QAAA,OAAO,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC;AAC9B,IAAA,CAAC,qDAAC;uGAjBS,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACJD;;AAEG;;;;"}
|